var t5=Object.defineProperty;var n5=(e,t,n)=>t in e?t5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Fe=(e,t,n)=>n5(e,typeof t!="symbol"?t+"":t,n);function Rk(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function rv(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Zb={exports:{}},Sh={},Jb={exports:{}},un={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var LI;function r5(){if(LI)return un;LI=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),c=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),h=Symbol.iterator;function g(H){return H===null||typeof H!="object"?null:(H=h&&H[h]||H["@@iterator"],typeof H=="function"?H:null)}var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,v={};function b(H,B,Y){this.props=H,this.context=B,this.refs=v,this.updater=Y||m}b.prototype.isReactComponent={},b.prototype.setState=function(H,B){if(typeof H!="object"&&typeof H!="function"&&H!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,H,B,"setState")},b.prototype.forceUpdate=function(H){this.updater.enqueueForceUpdate(this,H,"forceUpdate")};function w(){}w.prototype=b.prototype;function S(H,B,Y){this.props=H,this.context=B,this.refs=v,this.updater=Y||m}var x=S.prototype=new w;x.constructor=S,C(x,b.prototype),x.isPureReactComponent=!0;var P=Array.isArray,F=Object.prototype.hasOwnProperty,M={current:null},E={key:!0,ref:!0,__self:!0,__source:!0};function I(H,B,Y){var J,te={},Z=null,ae=null;if(B!=null)for(J in B.ref!==void 0&&(ae=B.ref),B.key!==void 0&&(Z=""+B.key),B)F.call(B,J)&&!E.hasOwnProperty(J)&&(te[J]=B[J]);var de=arguments.length-2;if(de===1)te.children=Y;else if(1>>1,B=V[H];if(0>>1;Hs(te,j))Zs(ae,te)?(V[H]=ae,V[Z]=j,H=Z):(V[H]=te,V[J]=j,H=J);else if(Zs(ae,j))V[H]=ae,V[Z]=j,H=Z;else break e}}return W}function s(V,W){var j=V.sortIndex-W.sortIndex;return j!==0?j:V.id-W.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],u=1,h=null,g=3,m=!1,C=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(V){for(var W=n(c);W!==null;){if(W.callback===null)r(c);else if(W.startTime<=V)r(c),W.sortIndex=W.expirationTime,t(l,W);else break;W=n(c)}}function P(V){if(v=!1,x(V),!C)if(n(l)!==null)C=!0,_(F);else{var W=n(c);W!==null&&U(P,W.startTime-V)}}function F(V,W){C=!1,v&&(v=!1,w(I),I=-1),m=!0;var j=g;try{for(x(W),h=n(l);h!==null&&(!(h.expirationTime>W)||V&&!D());){var H=h.callback;if(typeof H=="function"){h.callback=null,g=h.priorityLevel;var B=H(h.expirationTime<=W);W=e.unstable_now(),typeof B=="function"?h.callback=B:h===n(l)&&r(l),x(W)}else r(l);h=n(l)}if(h!==null)var Y=!0;else{var J=n(c);J!==null&&U(P,J.startTime-W),Y=!1}return Y}finally{h=null,g=j,m=!1}}var M=!1,E=null,I=-1,A=5,L=-1;function D(){return!(e.unstable_now()-LV||125H?(V.sortIndex=j,t(c,V),n(l)===null&&V===n(c)&&(v?(w(I),I=-1):v=!0,U(P,j-H))):(V.sortIndex=B,t(l,V),C||m||(C=!0,_(F))),V},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(V){var W=g;return function(){var j=g;g=W;try{return V.apply(this,arguments)}finally{g=j}}}})(nw)),nw}var $I;function a5(){return $I||($I=1,tw.exports=o5()),tw.exports}/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var GI;function l5(){if(GI)return Ls;GI=1;var e=CE(),t=a5();function n(d){for(var f="https://reactjs.org/docs/error-decoder.html?invariant="+d,y=1;y"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),l=Object.prototype.hasOwnProperty,c=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,u={},h={};function g(d){return l.call(h,d)?!0:l.call(u,d)?!1:c.test(d)?h[d]=!0:(u[d]=!0,!1)}function m(d,f,y,R){if(y!==null&&y.type===0)return!1;switch(typeof f){case"function":case"symbol":return!0;case"boolean":return R?!1:y!==null?!y.acceptsBooleans:(d=d.toLowerCase().slice(0,5),d!=="data-"&&d!=="aria-");default:return!1}}function C(d,f,y,R){if(f===null||typeof f>"u"||m(d,f,y,R))return!0;if(R)return!1;if(y!==null)switch(y.type){case 3:return!f;case 4:return f===!1;case 5:return isNaN(f);case 6:return isNaN(f)||1>f}return!1}function v(d,f,y,R,T,O,z){this.acceptsBooleans=f===2||f===3||f===4,this.attributeName=R,this.attributeNamespace=T,this.mustUseProperty=y,this.propertyName=d,this.type=f,this.sanitizeURL=O,this.removeEmptyString=z}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(d){b[d]=new v(d,0,!1,d,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(d){var f=d[0];b[f]=new v(f,1,!1,d[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(d){b[d]=new v(d,2,!1,d.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(d){b[d]=new v(d,2,!1,d,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(d){b[d]=new v(d,3,!1,d.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(d){b[d]=new v(d,3,!0,d,null,!1,!1)}),["capture","download"].forEach(function(d){b[d]=new v(d,4,!1,d,null,!1,!1)}),["cols","rows","size","span"].forEach(function(d){b[d]=new v(d,6,!1,d,null,!1,!1)}),["rowSpan","start"].forEach(function(d){b[d]=new v(d,5,!1,d.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function S(d){return d[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(d){var f=d.replace(w,S);b[f]=new v(f,1,!1,d,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(d){var f=d.replace(w,S);b[f]=new v(f,1,!1,d,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(d){var f=d.replace(w,S);b[f]=new v(f,1,!1,d,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(d){b[d]=new v(d,1,!1,d.toLowerCase(),null,!1,!1)}),b.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(d){b[d]=new v(d,1,!1,d.toLowerCase(),null,!0,!0)});function x(d,f,y,R){var T=b.hasOwnProperty(f)?b[f]:null;(T!==null?T.type!==0:R||!(2le||T[z]!==O[le]){var me=` `+T[z].replace(" at new "," at ");return d.displayName&&me.includes("")&&(me=me.replace("",d.displayName)),me}while(1<=z&&0<=le);break}}}finally{Y=!1,Error.prepareStackTrace=y}return(d=d?d.displayName||d.name:"")?B(d):""}function te(d){switch(d.tag){case 5:return B(d.type);case 16:return B("Lazy");case 13:return B("Suspense");case 19:return B("SuspenseList");case 0:case 2:case 15:return d=J(d.type,!1),d;case 11:return d=J(d.type.render,!1),d;case 1:return d=J(d.type,!0),d;default:return""}}function Z(d){if(d==null)return null;if(typeof d=="function")return d.displayName||d.name||null;if(typeof d=="string")return d;switch(d){case E:return"Fragment";case M:return"Portal";case A:return"Profiler";case I:return"StrictMode";case k:return"Suspense";case G:return"SuspenseList"}if(typeof d=="object")switch(d.$$typeof){case D:return(d.displayName||"Context")+".Consumer";case L:return(d._context.displayName||"Context")+".Provider";case N:var f=d.render;return d=d.displayName,d||(d=f.displayName||f.name||"",d=d!==""?"ForwardRef("+d+")":"ForwardRef"),d;case $:return f=d.displayName||null,f!==null?f:Z(d.type)||"Memo";case _:f=d._payload,d=d._init;try{return Z(d(f))}catch{}}return null}function ae(d){var f=d.type;switch(d.tag){case 24:return"Cache";case 9:return(f.displayName||"Context")+".Consumer";case 10:return(f._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return d=f.render,d=d.displayName||d.name||"",f.displayName||(d!==""?"ForwardRef("+d+")":"ForwardRef");case 7:return"Fragment";case 5:return f;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Z(f);case 8:return f===I?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f}return null}function de(d){switch(typeof d){case"boolean":case"number":case"string":case"undefined":return d;case"object":return d;default:return""}}function ge(d){var f=d.type;return(d=d.nodeName)&&d.toLowerCase()==="input"&&(f==="checkbox"||f==="radio")}function ve(d){var f=ge(d)?"checked":"value",y=Object.getOwnPropertyDescriptor(d.constructor.prototype,f),R=""+d[f];if(!d.hasOwnProperty(f)&&typeof y<"u"&&typeof y.get=="function"&&typeof y.set=="function"){var T=y.get,O=y.set;return Object.defineProperty(d,f,{configurable:!0,get:function(){return T.call(this)},set:function(z){R=""+z,O.call(this,z)}}),Object.defineProperty(d,f,{enumerable:y.enumerable}),{getValue:function(){return R},setValue:function(z){R=""+z},stopTracking:function(){d._valueTracker=null,delete d[f]}}}}function Re(d){d._valueTracker||(d._valueTracker=ve(d))}function ne(d){if(!d)return!1;var f=d._valueTracker;if(!f)return!0;var y=f.getValue(),R="";return d&&(R=ge(d)?d.checked?"true":"false":d.value),d=R,d!==y?(f.setValue(d),!0):!1}function re(d){if(d=d||(typeof document<"u"?document:void 0),typeof d>"u")return null;try{return d.activeElement||d.body}catch{return d.body}}function ce(d,f){var y=f.checked;return j({},f,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:y??d._wrapperState.initialChecked})}function X(d,f){var y=f.defaultValue==null?"":f.defaultValue,R=f.checked!=null?f.checked:f.defaultChecked;y=de(f.value!=null?f.value:y),d._wrapperState={initialChecked:R,initialValue:y,controlled:f.type==="checkbox"||f.type==="radio"?f.checked!=null:f.value!=null}}function ue(d,f){f=f.checked,f!=null&&x(d,"checked",f,!1)}function fe(d,f){ue(d,f);var y=de(f.value),R=f.type;if(y!=null)R==="number"?(y===0&&d.value===""||d.value!=y)&&(d.value=""+y):d.value!==""+y&&(d.value=""+y);else if(R==="submit"||R==="reset"){d.removeAttribute("value");return}f.hasOwnProperty("value")?we(d,f.type,y):f.hasOwnProperty("defaultValue")&&we(d,f.type,de(f.defaultValue)),f.checked==null&&f.defaultChecked!=null&&(d.defaultChecked=!!f.defaultChecked)}function oe(d,f,y){if(f.hasOwnProperty("value")||f.hasOwnProperty("defaultValue")){var R=f.type;if(!(R!=="submit"&&R!=="reset"||f.value!==void 0&&f.value!==null))return;f=""+d._wrapperState.initialValue,y||f===d.value||(d.value=f),d.defaultValue=f}y=d.name,y!==""&&(d.name=""),d.defaultChecked=!!d._wrapperState.initialChecked,y!==""&&(d.name=y)}function we(d,f,y){(f!=="number"||re(d.ownerDocument)!==d)&&(y==null?d.defaultValue=""+d._wrapperState.initialValue:d.defaultValue!==""+y&&(d.defaultValue=""+y))}var Be=Array.isArray;function Ae(d,f,y,R){if(d=d.options,f){f={};for(var T=0;T"+f.valueOf().toString()+"",f=Ye.firstChild;d.firstChild;)d.removeChild(d.firstChild);for(;f.firstChild;)d.appendChild(f.firstChild)}});function Ke(d,f){if(f){var y=d.firstChild;if(y&&y===d.lastChild&&y.nodeType===3){y.nodeValue=f;return}}d.textContent=f}var De={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},je=["Webkit","ms","Moz","O"];Object.keys(De).forEach(function(d){je.forEach(function(f){f=f+d.charAt(0).toUpperCase()+d.substring(1),De[f]=De[d]})});function qe(d,f,y){return f==null||typeof f=="boolean"||f===""?"":y||typeof f!="number"||f===0||De.hasOwnProperty(d)&&De[d]?(""+f).trim():f+"px"}function Ge(d,f){d=d.style;for(var y in f)if(f.hasOwnProperty(y)){var R=y.indexOf("--")===0,T=qe(y,f[y],R);y==="float"&&(y="cssFloat"),R?d.setProperty(y,T):d[y]=T}}var Ce=j({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Oe(d,f){if(f){if(Ce[d]&&(f.children!=null||f.dangerouslySetInnerHTML!=null))throw Error(n(137,d));if(f.dangerouslySetInnerHTML!=null){if(f.children!=null)throw Error(n(60));if(typeof f.dangerouslySetInnerHTML!="object"||!("__html"in f.dangerouslySetInnerHTML))throw Error(n(61))}if(f.style!=null&&typeof f.style!="object")throw Error(n(62))}}function ot(d,f){if(d.indexOf("-")===-1)return typeof f.is=="string";switch(d){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ut=null;function wt(d){return d=d.target||d.srcElement||window,d.correspondingUseElement&&(d=d.correspondingUseElement),d.nodeType===3?d.parentNode:d}var It=null,Gt=null,Nt=null;function jt(d){if(d=ah(d)){if(typeof It!="function")throw Error(n(280));var f=d.stateNode;f&&(f=Qg(f),It(d.stateNode,d.type,f))}}function qt(d){Gt?Nt?Nt.push(d):Nt=[d]:Gt=d}function Ot(){if(Gt){var d=Gt,f=Nt;if(Nt=Gt=null,jt(d),f)for(d=0;d>>=0,d===0?32:31-(zt(d)/Pn|0)|0}var pr=64,hi=4194304;function Qr(d){switch(d&-d){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return d&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return d&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return d}}function Fs(d,f){var y=d.pendingLanes;if(y===0)return 0;var R=0,T=d.suspendedLanes,O=d.pingedLanes,z=y&268435455;if(z!==0){var le=z&~T;le!==0?R=Qr(le):(O&=z,O!==0&&(R=Qr(O)))}else z=y&~T,z!==0?R=Qr(z):O!==0&&(R=Qr(O));if(R===0)return 0;if(f!==0&&f!==R&&(f&T)===0&&(T=R&-R,O=f&-f,T>=O||T===16&&(O&4194240)!==0))return f;if((R&4)!==0&&(R|=y&16),f=d.entangledLanes,f!==0)for(d=d.entanglements,f&=R;0y;y++)f.push(d);return f}function Qs(d,f,y){d.pendingLanes|=f,f!==536870912&&(d.suspendedLanes=0,d.pingedLanes=0),d=d.eventTimes,f=31-rt(f),d[f]=y}function kg(d,f){var y=d.pendingLanes&~f;d.pendingLanes=f,d.suspendedLanes=0,d.pingedLanes=0,d.expiredLanes&=f,d.mutableReadLanes&=f,d.entangledLanes&=f,f=d.entanglements;var R=d.eventTimes;for(d=d.expirationTimes;0=Zd),PT=" ",FT=!1;function TT(d,f){switch(d){case"keyup":return Y4.indexOf(f.keyCode)!==-1;case"keydown":return f.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function MT(d){return d=d.detail,typeof d=="object"&&"data"in d?d.data:null}var tu=!1;function Z4(d,f){switch(d){case"compositionend":return MT(f);case"keypress":return f.which!==32?null:(FT=!0,PT);case"textInput":return d=f.data,d===PT&&FT?null:d;default:return null}}function J4(d,f){if(tu)return d==="compositionend"||!Ay&&TT(d,f)?(d=bT(),Vg=Py=Fa=null,tu=!1,d):null;switch(d){case"paste":return null;case"keypress":if(!(f.ctrlKey||f.altKey||f.metaKey)||f.ctrlKey&&f.altKey){if(f.char&&1=f)return{node:y,offset:f-d};d=R}e:{for(;y;){if(y.nextSibling){y=y.nextSibling;break e}y=y.parentNode}y=void 0}y=NT(y)}}function $T(d,f){return d&&f?d===f?!0:d&&d.nodeType===3?!1:f&&f.nodeType===3?$T(d,f.parentNode):"contains"in d?d.contains(f):d.compareDocumentPosition?!!(d.compareDocumentPosition(f)&16):!1:!1}function GT(){for(var d=window,f=re();f instanceof d.HTMLIFrameElement;){try{var y=typeof f.contentWindow.location.href=="string"}catch{y=!1}if(y)d=f.contentWindow;else break;f=re(d.document)}return f}function ky(d){var f=d&&d.nodeName&&d.nodeName.toLowerCase();return f&&(f==="input"&&(d.type==="text"||d.type==="search"||d.type==="tel"||d.type==="url"||d.type==="password")||f==="textarea"||d.contentEditable==="true")}function l3(d){var f=GT(),y=d.focusedElem,R=d.selectionRange;if(f!==y&&y&&y.ownerDocument&&$T(y.ownerDocument.documentElement,y)){if(R!==null&&ky(y)){if(f=R.start,d=R.end,d===void 0&&(d=f),"selectionStart"in y)y.selectionStart=f,y.selectionEnd=Math.min(d,y.value.length);else if(d=(f=y.ownerDocument||document)&&f.defaultView||window,d.getSelection){d=d.getSelection();var T=y.textContent.length,O=Math.min(R.start,T);R=R.end===void 0?O:Math.min(R.end,T),!d.extend&&O>R&&(T=R,R=O,O=T),T=BT(y,O);var z=BT(y,R);T&&z&&(d.rangeCount!==1||d.anchorNode!==T.node||d.anchorOffset!==T.offset||d.focusNode!==z.node||d.focusOffset!==z.offset)&&(f=f.createRange(),f.setStart(T.node,T.offset),d.removeAllRanges(),O>R?(d.addRange(f),d.extend(z.node,z.offset)):(f.setEnd(z.node,z.offset),d.addRange(f)))}}for(f=[],d=y;d=d.parentNode;)d.nodeType===1&&f.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof y.focus=="function"&&y.focus(),y=0;y=document.documentMode,nu=null,Ny=null,nh=null,By=!1;function VT(d,f,y){var R=y.window===y?y.document:y.nodeType===9?y:y.ownerDocument;By||nu==null||nu!==re(R)||(R=nu,"selectionStart"in R&&ky(R)?R={start:R.selectionStart,end:R.selectionEnd}:(R=(R.ownerDocument&&R.ownerDocument.defaultView||window).getSelection(),R={anchorNode:R.anchorNode,anchorOffset:R.anchorOffset,focusNode:R.focusNode,focusOffset:R.focusOffset}),nh&&th(nh,R)||(nh=R,R=qg(Ny,"onSelect"),0au||(d.current=Xy[au],Xy[au]=null,au--)}function Nn(d,f){au++,Xy[au]=d.current,d.current=f}var Da={},Zr=Ia(Da),Ts=Ia(!1),Gl=Da;function lu(d,f){var y=d.type.contextTypes;if(!y)return Da;var R=d.stateNode;if(R&&R.__reactInternalMemoizedUnmaskedChildContext===f)return R.__reactInternalMemoizedMaskedChildContext;var T={},O;for(O in y)T[O]=f[O];return R&&(d=d.stateNode,d.__reactInternalMemoizedUnmaskedChildContext=f,d.__reactInternalMemoizedMaskedChildContext=T),T}function Ms(d){return d=d.childContextTypes,d!=null}function Zg(){Wn(Ts),Wn(Zr)}function tM(d,f,y){if(Zr.current!==Da)throw Error(n(168));Nn(Zr,f),Nn(Ts,y)}function nM(d,f,y){var R=d.stateNode;if(f=f.childContextTypes,typeof R.getChildContext!="function")return y;R=R.getChildContext();for(var T in R)if(!(T in f))throw Error(n(108,ae(d)||"Unknown",T));return j({},y,R)}function Jg(d){return d=(d=d.stateNode)&&d.__reactInternalMemoizedMergedChildContext||Da,Gl=Zr.current,Nn(Zr,d),Nn(Ts,Ts.current),!0}function rM(d,f,y){var R=d.stateNode;if(!R)throw Error(n(169));y?(d=nM(d,f,Gl),R.__reactInternalMemoizedMergedChildContext=d,Wn(Ts),Wn(Zr),Nn(Zr,d)):Wn(Ts),Nn(Ts,y)}var Go=null,ef=!1,Yy=!1;function sM(d){Go===null?Go=[d]:Go.push(d)}function b3(d){ef=!0,sM(d)}function Aa(){if(!Yy&&Go!==null){Yy=!0;var d=0,f=Sn;try{var y=Go;for(Sn=1;d>=z,T-=z,Vo=1<<32-rt(f)+T|y<Qt?(Nr=Ut,Ut=null):Nr=Ut.sibling;var xn=Ze(Ee,Ut,Me[Qt],ct);if(xn===null){Ut===null&&(Ut=Nr);break}d&&Ut&&xn.alternate===null&&f(Ee,Ut),xe=O(xn,xe,Qt),_t===null?Bt=xn:_t.sibling=xn,_t=xn,Ut=Nr}if(Qt===Me.length)return y(Ee,Ut),Qn&&Hl(Ee,Qt),Bt;if(Ut===null){for(;QtQt?(Nr=Ut,Ut=null):Nr=Ut.sibling;var Ha=Ze(Ee,Ut,xn.value,ct);if(Ha===null){Ut===null&&(Ut=Nr);break}d&&Ut&&Ha.alternate===null&&f(Ee,Ut),xe=O(Ha,xe,Qt),_t===null?Bt=Ha:_t.sibling=Ha,_t=Ha,Ut=Nr}if(xn.done)return y(Ee,Ut),Qn&&Hl(Ee,Qt),Bt;if(Ut===null){for(;!xn.done;Qt++,xn=Me.next())xn=it(Ee,xn.value,ct),xn!==null&&(xe=O(xn,xe,Qt),_t===null?Bt=xn:_t.sibling=xn,_t=xn);return Qn&&Hl(Ee,Qt),Bt}for(Ut=R(Ee,Ut);!xn.done;Qt++,xn=Me.next())xn=Rt(Ut,Ee,Qt,xn.value,ct),xn!==null&&(d&&xn.alternate!==null&&Ut.delete(xn.key===null?Qt:xn.key),xe=O(xn,xe,Qt),_t===null?Bt=xn:_t.sibling=xn,_t=xn);return d&&Ut.forEach(function(e5){return f(Ee,e5)}),Qn&&Hl(Ee,Qt),Bt}function cr(Ee,xe,Me,ct){if(typeof Me=="object"&&Me!==null&&Me.type===E&&Me.key===null&&(Me=Me.props.children),typeof Me=="object"&&Me!==null){switch(Me.$$typeof){case F:e:{for(var Bt=Me.key,_t=xe;_t!==null;){if(_t.key===Bt){if(Bt=Me.type,Bt===E){if(_t.tag===7){y(Ee,_t.sibling),xe=T(_t,Me.props.children),xe.return=Ee,Ee=xe;break e}}else if(_t.elementType===Bt||typeof Bt=="object"&&Bt!==null&&Bt.$$typeof===_&&uM(Bt)===_t.type){y(Ee,_t.sibling),xe=T(_t,Me.props),xe.ref=lh(Ee,_t,Me),xe.return=Ee,Ee=xe;break e}y(Ee,_t);break}else f(Ee,_t);_t=_t.sibling}Me.type===E?(xe=Xl(Me.props.children,Ee.mode,ct,Me.key),xe.return=Ee,Ee=xe):(ct=Mf(Me.type,Me.key,Me.props,null,Ee.mode,ct),ct.ref=lh(Ee,xe,Me),ct.return=Ee,Ee=ct)}return z(Ee);case M:e:{for(_t=Me.key;xe!==null;){if(xe.key===_t)if(xe.tag===4&&xe.stateNode.containerInfo===Me.containerInfo&&xe.stateNode.implementation===Me.implementation){y(Ee,xe.sibling),xe=T(xe,Me.children||[]),xe.return=Ee,Ee=xe;break e}else{y(Ee,xe);break}else f(Ee,xe);xe=xe.sibling}xe=Kb(Me,Ee.mode,ct),xe.return=Ee,Ee=xe}return z(Ee);case _:return _t=Me._init,cr(Ee,xe,_t(Me._payload),ct)}if(Be(Me))return Dt(Ee,xe,Me,ct);if(W(Me))return At(Ee,xe,Me,ct);sf(Ee,Me)}return typeof Me=="string"&&Me!==""||typeof Me=="number"?(Me=""+Me,xe!==null&&xe.tag===6?(y(Ee,xe.sibling),xe=T(xe,Me),xe.return=Ee,Ee=xe):(y(Ee,xe),xe=jb(Me,Ee.mode,ct),xe.return=Ee,Ee=xe),z(Ee)):y(Ee,xe)}return cr}var hu=dM(!0),hM=dM(!1),of=Ia(null),af=null,pu=null,nb=null;function rb(){nb=pu=af=null}function sb(d){var f=of.current;Wn(of),d._currentValue=f}function ib(d,f,y){for(;d!==null;){var R=d.alternate;if((d.childLanes&f)!==f?(d.childLanes|=f,R!==null&&(R.childLanes|=f)):R!==null&&(R.childLanes&f)!==f&&(R.childLanes|=f),d===y)break;d=d.return}}function gu(d,f){af=d,nb=pu=null,d=d.dependencies,d!==null&&d.firstContext!==null&&((d.lanes&f)!==0&&(Is=!0),d.firstContext=null)}function fi(d){var f=d._currentValue;if(nb!==d)if(d={context:d,memoizedValue:f,next:null},pu===null){if(af===null)throw Error(n(308));pu=d,af.dependencies={lanes:0,firstContext:d}}else pu=pu.next=d;return f}var zl=null;function ob(d){zl===null?zl=[d]:zl.push(d)}function pM(d,f,y,R){var T=f.interleaved;return T===null?(y.next=y,ob(f)):(y.next=T.next,T.next=y),f.interleaved=y,zo(d,R)}function zo(d,f){d.lanes|=f;var y=d.alternate;for(y!==null&&(y.lanes|=f),y=d,d=d.return;d!==null;)d.childLanes|=f,y=d.alternate,y!==null&&(y.childLanes|=f),y=d,d=d.return;return y.tag===3?y.stateNode:null}var La=!1;function ab(d){d.updateQueue={baseState:d.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function gM(d,f){d=d.updateQueue,f.updateQueue===d&&(f.updateQueue={baseState:d.baseState,firstBaseUpdate:d.firstBaseUpdate,lastBaseUpdate:d.lastBaseUpdate,shared:d.shared,effects:d.effects})}function Wo(d,f){return{eventTime:d,lane:f,tag:0,payload:null,callback:null,next:null}}function Oa(d,f,y){var R=d.updateQueue;if(R===null)return null;if(R=R.shared,(bn&2)!==0){var T=R.pending;return T===null?f.next=f:(f.next=T.next,T.next=f),R.pending=f,zo(d,y)}return T=R.interleaved,T===null?(f.next=f,ob(R)):(f.next=T.next,T.next=f),R.interleaved=f,zo(d,y)}function lf(d,f,y){if(f=f.updateQueue,f!==null&&(f=f.shared,(y&4194240)!==0)){var R=f.lanes;R&=d.pendingLanes,y|=R,f.lanes=y,_d(d,y)}}function fM(d,f){var y=d.updateQueue,R=d.alternate;if(R!==null&&(R=R.updateQueue,y===R)){var T=null,O=null;if(y=y.firstBaseUpdate,y!==null){do{var z={eventTime:y.eventTime,lane:y.lane,tag:y.tag,payload:y.payload,callback:y.callback,next:null};O===null?T=O=z:O=O.next=z,y=y.next}while(y!==null);O===null?T=O=f:O=O.next=f}else T=O=f;y={baseState:R.baseState,firstBaseUpdate:T,lastBaseUpdate:O,shared:R.shared,effects:R.effects},d.updateQueue=y;return}d=y.lastBaseUpdate,d===null?y.firstBaseUpdate=f:d.next=f,y.lastBaseUpdate=f}function cf(d,f,y,R){var T=d.updateQueue;La=!1;var O=T.firstBaseUpdate,z=T.lastBaseUpdate,le=T.shared.pending;if(le!==null){T.shared.pending=null;var me=le,Le=me.next;me.next=null,z===null?O=Le:z.next=Le,z=me;var et=d.alternate;et!==null&&(et=et.updateQueue,le=et.lastBaseUpdate,le!==z&&(le===null?et.firstBaseUpdate=Le:le.next=Le,et.lastBaseUpdate=me))}if(O!==null){var it=T.baseState;z=0,et=Le=me=null,le=O;do{var Ze=le.lane,Rt=le.eventTime;if((R&Ze)===Ze){et!==null&&(et=et.next={eventTime:Rt,lane:0,tag:le.tag,payload:le.payload,callback:le.callback,next:null});e:{var Dt=d,At=le;switch(Ze=f,Rt=y,At.tag){case 1:if(Dt=At.payload,typeof Dt=="function"){it=Dt.call(Rt,it,Ze);break e}it=Dt;break e;case 3:Dt.flags=Dt.flags&-65537|128;case 0:if(Dt=At.payload,Ze=typeof Dt=="function"?Dt.call(Rt,it,Ze):Dt,Ze==null)break e;it=j({},it,Ze);break e;case 2:La=!0}}le.callback!==null&&le.lane!==0&&(d.flags|=64,Ze=T.effects,Ze===null?T.effects=[le]:Ze.push(le))}else Rt={eventTime:Rt,lane:Ze,tag:le.tag,payload:le.payload,callback:le.callback,next:null},et===null?(Le=et=Rt,me=it):et=et.next=Rt,z|=Ze;if(le=le.next,le===null){if(le=T.shared.pending,le===null)break;Ze=le,le=Ze.next,Ze.next=null,T.lastBaseUpdate=Ze,T.shared.pending=null}}while(!0);if(et===null&&(me=it),T.baseState=me,T.firstBaseUpdate=Le,T.lastBaseUpdate=et,f=T.shared.interleaved,f!==null){T=f;do z|=T.lane,T=T.next;while(T!==f)}else O===null&&(T.shared.lanes=0);Ul|=z,d.lanes=z,d.memoizedState=it}}function mM(d,f,y){if(d=f.effects,f.effects=null,d!==null)for(f=0;fy?y:4,d(!0);var R=hb.transition;hb.transition={};try{d(!1),f()}finally{Sn=y,hb.transition=R}}function kM(){return mi().memoizedState}function R3(d,f,y){var R=$a(d);if(y={lane:R,action:y,hasEagerState:!1,eagerState:null,next:null},NM(d))BM(f,y);else if(y=pM(d,f,y,R),y!==null){var T=gs();Wi(y,d,R,T),$M(y,f,R)}}function E3(d,f,y){var R=$a(d),T={lane:R,action:y,hasEagerState:!1,eagerState:null,next:null};if(NM(d))BM(f,T);else{var O=d.alternate;if(d.lanes===0&&(O===null||O.lanes===0)&&(O=f.lastRenderedReducer,O!==null))try{var z=f.lastRenderedState,le=O(z,y);if(T.hasEagerState=!0,T.eagerState=le,$i(le,z)){var me=f.interleaved;me===null?(T.next=T,ob(f)):(T.next=me.next,me.next=T),f.interleaved=T;return}}catch{}finally{}y=pM(d,f,T,R),y!==null&&(T=gs(),Wi(y,d,R,T),$M(y,f,R))}}function NM(d){var f=d.alternate;return d===nr||f!==null&&f===nr}function BM(d,f){hh=hf=!0;var y=d.pending;y===null?f.next=f:(f.next=y.next,y.next=f),d.pending=f}function $M(d,f,y){if((y&4194240)!==0){var R=f.lanes;R&=d.pendingLanes,y|=R,f.lanes=y,_d(d,y)}}var ff={readContext:fi,useCallback:Jr,useContext:Jr,useEffect:Jr,useImperativeHandle:Jr,useInsertionEffect:Jr,useLayoutEffect:Jr,useMemo:Jr,useReducer:Jr,useRef:Jr,useState:Jr,useDebugValue:Jr,useDeferredValue:Jr,useTransition:Jr,useMutableSource:Jr,useSyncExternalStore:Jr,useId:Jr,unstable_isNewReconciler:!1},P3={readContext:fi,useCallback:function(d,f){return mo().memoizedState=[d,f===void 0?null:f],d},useContext:fi,useEffect:FM,useImperativeHandle:function(d,f,y){return y=y!=null?y.concat([d]):null,pf(4194308,4,IM.bind(null,f,d),y)},useLayoutEffect:function(d,f){return pf(4194308,4,d,f)},useInsertionEffect:function(d,f){return pf(4,2,d,f)},useMemo:function(d,f){var y=mo();return f=f===void 0?null:f,d=d(),y.memoizedState=[d,f],d},useReducer:function(d,f,y){var R=mo();return f=y!==void 0?y(f):f,R.memoizedState=R.baseState=f,d={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:d,lastRenderedState:f},R.queue=d,d=d.dispatch=R3.bind(null,nr,d),[R.memoizedState,d]},useRef:function(d){var f=mo();return d={current:d},f.memoizedState=d},useState:EM,useDebugValue:yb,useDeferredValue:function(d){return mo().memoizedState=d},useTransition:function(){var d=EM(!1),f=d[0];return d=x3.bind(null,d[1]),mo().memoizedState=d,[f,d]},useMutableSource:function(){},useSyncExternalStore:function(d,f,y){var R=nr,T=mo();if(Qn){if(y===void 0)throw Error(n(407));y=y()}else{if(y=f(),kr===null)throw Error(n(349));(_l&30)!==0||bM(R,f,y)}T.memoizedState=y;var O={value:y,getSnapshot:f};return T.queue=O,FM(SM.bind(null,R,O,d),[d]),R.flags|=2048,fh(9,wM.bind(null,R,O,y,f),void 0,null),y},useId:function(){var d=mo(),f=kr.identifierPrefix;if(Qn){var y=Ho,R=Vo;y=(R&~(1<<32-rt(R)-1)).toString(32)+y,f=":"+f+"R"+y,y=ph++,0<\/script>",d=d.removeChild(d.firstChild)):typeof R.is=="string"?d=z.createElement(y,{is:R.is}):(d=z.createElement(y),y==="select"&&(z=d,R.multiple?z.multiple=!0:R.size&&(z.size=R.size))):d=z.createElementNS(d,y),d[go]=f,d[oh]=R,sI(d,f,!1,!1),f.stateNode=d;e:{switch(z=ot(y,R),y){case"dialog":zn("cancel",d),zn("close",d),T=R;break;case"iframe":case"object":case"embed":zn("load",d),T=R;break;case"video":case"audio":for(T=0;Tyu&&(f.flags|=128,R=!0,mh(O,!1),f.lanes=4194304)}else{if(!R)if(d=uf(z),d!==null){if(f.flags|=128,R=!0,y=d.updateQueue,y!==null&&(f.updateQueue=y,f.flags|=4),mh(O,!0),O.tail===null&&O.tailMode==="hidden"&&!z.alternate&&!Qn)return es(f),null}else 2*Tt()-O.renderingStartTime>yu&&y!==1073741824&&(f.flags|=128,R=!0,mh(O,!1),f.lanes=4194304);O.isBackwards?(z.sibling=f.child,f.child=z):(y=O.last,y!==null?y.sibling=z:f.child=z,O.last=z)}return O.tail!==null?(f=O.tail,O.rendering=f,O.tail=f.sibling,O.renderingStartTime=Tt(),f.sibling=null,y=tr.current,Nn(tr,R?y&1|2:y&1),f):(es(f),null);case 22:case 23:return Wb(),R=f.memoizedState!==null,d!==null&&d.memoizedState!==null!==R&&(f.flags|=8192),R&&(f.mode&1)!==0?(ti&1073741824)!==0&&(es(f),f.subtreeFlags&6&&(f.flags|=8192)):es(f),null;case 24:return null;case 25:return null}throw Error(n(156,f.tag))}function O3(d,f){switch(Zy(f),f.tag){case 1:return Ms(f.type)&&Zg(),d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 3:return fu(),Wn(Ts),Wn(Zr),db(),d=f.flags,(d&65536)!==0&&(d&128)===0?(f.flags=d&-65537|128,f):null;case 5:return cb(f),null;case 13:if(Wn(tr),d=f.memoizedState,d!==null&&d.dehydrated!==null){if(f.alternate===null)throw Error(n(340));du()}return d=f.flags,d&65536?(f.flags=d&-65537|128,f):null;case 19:return Wn(tr),null;case 4:return fu(),null;case 10:return sb(f.type._context),null;case 22:case 23:return Wb(),null;case 24:return null;default:return null}}var yf=!1,ts=!1,k3=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function Cu(d,f){var y=d.ref;if(y!==null)if(typeof y=="function")try{y(null)}catch(R){or(d,f,R)}else y.current=null}function Db(d,f,y){try{y()}catch(R){or(d,f,R)}}var aI=!1;function N3(d,f){if(Wy=$g,d=GT(),ky(d)){if("selectionStart"in d)var y={start:d.selectionStart,end:d.selectionEnd};else e:{y=(y=d.ownerDocument)&&y.defaultView||window;var R=y.getSelection&&y.getSelection();if(R&&R.rangeCount!==0){y=R.anchorNode;var T=R.anchorOffset,O=R.focusNode;R=R.focusOffset;try{y.nodeType,O.nodeType}catch{y=null;break e}var z=0,le=-1,me=-1,Le=0,et=0,it=d,Ze=null;t:for(;;){for(var Rt;it!==y||T!==0&&it.nodeType!==3||(le=z+T),it!==O||R!==0&&it.nodeType!==3||(me=z+R),it.nodeType===3&&(z+=it.nodeValue.length),(Rt=it.firstChild)!==null;)Ze=it,it=Rt;for(;;){if(it===d)break t;if(Ze===y&&++Le===T&&(le=z),Ze===O&&++et===R&&(me=z),(Rt=it.nextSibling)!==null)break;it=Ze,Ze=it.parentNode}it=Rt}y=le===-1||me===-1?null:{start:le,end:me}}else y=null}y=y||{start:0,end:0}}else y=null;for(_y={focusedElem:d,selectionRange:y},$g=!1,Mt=f;Mt!==null;)if(f=Mt,d=f.child,(f.subtreeFlags&1028)!==0&&d!==null)d.return=f,Mt=d;else for(;Mt!==null;){f=Mt;try{var Dt=f.alternate;if((f.flags&1024)!==0)switch(f.tag){case 0:case 11:case 15:break;case 1:if(Dt!==null){var At=Dt.memoizedProps,cr=Dt.memoizedState,Ee=f.stateNode,xe=Ee.getSnapshotBeforeUpdate(f.elementType===f.type?At:Vi(f.type,At),cr);Ee.__reactInternalSnapshotBeforeUpdate=xe}break;case 3:var Me=f.stateNode.containerInfo;Me.nodeType===1?Me.textContent="":Me.nodeType===9&&Me.documentElement&&Me.removeChild(Me.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ct){or(f,f.return,ct)}if(d=f.sibling,d!==null){d.return=f.return,Mt=d;break}Mt=f.return}return Dt=aI,aI=!1,Dt}function Ch(d,f,y){var R=f.updateQueue;if(R=R!==null?R.lastEffect:null,R!==null){var T=R=R.next;do{if((T.tag&d)===d){var O=T.destroy;T.destroy=void 0,O!==void 0&&Db(f,y,O)}T=T.next}while(T!==R)}}function bf(d,f){if(f=f.updateQueue,f=f!==null?f.lastEffect:null,f!==null){var y=f=f.next;do{if((y.tag&d)===d){var R=y.create;y.destroy=R()}y=y.next}while(y!==f)}}function Ab(d){var f=d.ref;if(f!==null){var y=d.stateNode;switch(d.tag){case 5:d=y;break;default:d=y}typeof f=="function"?f(d):f.current=d}}function lI(d){var f=d.alternate;f!==null&&(d.alternate=null,lI(f)),d.child=null,d.deletions=null,d.sibling=null,d.tag===5&&(f=d.stateNode,f!==null&&(delete f[go],delete f[oh],delete f[qy],delete f[v3],delete f[y3])),d.stateNode=null,d.return=null,d.dependencies=null,d.memoizedProps=null,d.memoizedState=null,d.pendingProps=null,d.stateNode=null,d.updateQueue=null}function cI(d){return d.tag===5||d.tag===3||d.tag===4}function uI(d){e:for(;;){for(;d.sibling===null;){if(d.return===null||cI(d.return))return null;d=d.return}for(d.sibling.return=d.return,d=d.sibling;d.tag!==5&&d.tag!==6&&d.tag!==18;){if(d.flags&2||d.child===null||d.tag===4)continue e;d.child.return=d,d=d.child}if(!(d.flags&2))return d.stateNode}}function Lb(d,f,y){var R=d.tag;if(R===5||R===6)d=d.stateNode,f?y.nodeType===8?y.parentNode.insertBefore(d,f):y.insertBefore(d,f):(y.nodeType===8?(f=y.parentNode,f.insertBefore(d,y)):(f=y,f.appendChild(d)),y=y._reactRootContainer,y!=null||f.onclick!==null||(f.onclick=Yg));else if(R!==4&&(d=d.child,d!==null))for(Lb(d,f,y),d=d.sibling;d!==null;)Lb(d,f,y),d=d.sibling}function Ob(d,f,y){var R=d.tag;if(R===5||R===6)d=d.stateNode,f?y.insertBefore(d,f):y.appendChild(d);else if(R!==4&&(d=d.child,d!==null))for(Ob(d,f,y),d=d.sibling;d!==null;)Ob(d,f,y),d=d.sibling}var Wr=null,Hi=!1;function ka(d,f,y){for(y=y.child;y!==null;)dI(d,f,y),y=y.sibling}function dI(d,f,y){if(Xn&&typeof Xn.onCommitFiberUnmount=="function")try{Xn.onCommitFiberUnmount(hn,y)}catch{}switch(y.tag){case 5:ts||Cu(y,f);case 6:var R=Wr,T=Hi;Wr=null,ka(d,f,y),Wr=R,Hi=T,Wr!==null&&(Hi?(d=Wr,y=y.stateNode,d.nodeType===8?d.parentNode.removeChild(y):d.removeChild(y)):Wr.removeChild(y.stateNode));break;case 18:Wr!==null&&(Hi?(d=Wr,y=y.stateNode,d.nodeType===8?Ky(d.parentNode,y):d.nodeType===1&&Ky(d,y),Xd(d)):Ky(Wr,y.stateNode));break;case 4:R=Wr,T=Hi,Wr=y.stateNode.containerInfo,Hi=!0,ka(d,f,y),Wr=R,Hi=T;break;case 0:case 11:case 14:case 15:if(!ts&&(R=y.updateQueue,R!==null&&(R=R.lastEffect,R!==null))){T=R=R.next;do{var O=T,z=O.destroy;O=O.tag,z!==void 0&&((O&2)!==0||(O&4)!==0)&&Db(y,f,z),T=T.next}while(T!==R)}ka(d,f,y);break;case 1:if(!ts&&(Cu(y,f),R=y.stateNode,typeof R.componentWillUnmount=="function"))try{R.props=y.memoizedProps,R.state=y.memoizedState,R.componentWillUnmount()}catch(le){or(y,f,le)}ka(d,f,y);break;case 21:ka(d,f,y);break;case 22:y.mode&1?(ts=(R=ts)||y.memoizedState!==null,ka(d,f,y),ts=R):ka(d,f,y);break;default:ka(d,f,y)}}function hI(d){var f=d.updateQueue;if(f!==null){d.updateQueue=null;var y=d.stateNode;y===null&&(y=d.stateNode=new k3),f.forEach(function(R){var T=U3.bind(null,d,R);y.has(R)||(y.add(R),R.then(T,T))})}}function zi(d,f){var y=f.deletions;if(y!==null)for(var R=0;RT&&(T=z),R&=~O}if(R=T,R=Tt()-R,R=(120>R?120:480>R?480:1080>R?1080:1920>R?1920:3e3>R?3e3:4320>R?4320:1960*$3(R/1960))-R,10d?16:d,Ba===null)var R=!1;else{if(d=Ba,Ba=null,Ef=0,(bn&6)!==0)throw Error(n(331));var T=bn;for(bn|=4,Mt=d.current;Mt!==null;){var O=Mt,z=O.child;if((Mt.flags&16)!==0){var le=O.deletions;if(le!==null){for(var me=0;meTt()-Bb?Kl(d,0):Nb|=y),As(d,f)}function EI(d,f){f===0&&((d.mode&1)===0?f=1:(f=hi,hi<<=1,(hi&130023424)===0&&(hi=4194304)));var y=gs();d=zo(d,f),d!==null&&(Qs(d,f,y),As(d,y))}function _3(d){var f=d.memoizedState,y=0;f!==null&&(y=f.retryLane),EI(d,y)}function U3(d,f){var y=0;switch(d.tag){case 13:var R=d.stateNode,T=d.memoizedState;T!==null&&(y=T.retryLane);break;case 19:R=d.stateNode;break;default:throw Error(n(314))}R!==null&&R.delete(f),EI(d,y)}var PI;PI=function(d,f,y){if(d!==null)if(d.memoizedProps!==f.pendingProps||Ts.current)Is=!0;else{if((d.lanes&y)===0&&(f.flags&128)===0)return Is=!1,A3(d,f,y);Is=(d.flags&131072)!==0}else Is=!1,Qn&&(f.flags&1048576)!==0&&iM(f,nf,f.index);switch(f.lanes=0,f.tag){case 2:var R=f.type;vf(d,f),d=f.pendingProps;var T=lu(f,Zr.current);gu(f,y),T=gb(null,f,R,d,T,y);var O=fb();return f.flags|=1,typeof T=="object"&&T!==null&&typeof T.render=="function"&&T.$$typeof===void 0?(f.tag=1,f.memoizedState=null,f.updateQueue=null,Ms(R)?(O=!0,Jg(f)):O=!1,f.memoizedState=T.state!==null&&T.state!==void 0?T.state:null,ab(f),T.updater=mf,f.stateNode=T,T._reactInternals=f,wb(f,R,d,y),f=Eb(null,f,R,!0,O,y)):(f.tag=0,Qn&&O&&Qy(f),ps(null,f,T,y),f=f.child),f;case 16:R=f.elementType;e:{switch(vf(d,f),d=f.pendingProps,T=R._init,R=T(R._payload),f.type=R,T=f.tag=K3(R),d=Vi(R,d),T){case 0:f=Rb(null,f,R,d,y);break e;case 1:f=ZM(null,f,R,d,y);break e;case 11:f=KM(null,f,R,d,y);break e;case 14:f=qM(null,f,R,Vi(R.type,d),y);break e}throw Error(n(306,R,""))}return f;case 0:return R=f.type,T=f.pendingProps,T=f.elementType===R?T:Vi(R,T),Rb(d,f,R,T,y);case 1:return R=f.type,T=f.pendingProps,T=f.elementType===R?T:Vi(R,T),ZM(d,f,R,T,y);case 3:e:{if(JM(f),d===null)throw Error(n(387));R=f.pendingProps,O=f.memoizedState,T=O.element,gM(d,f),cf(f,R,null,y);var z=f.memoizedState;if(R=z.element,O.isDehydrated)if(O={element:R,isDehydrated:!1,cache:z.cache,pendingSuspenseBoundaries:z.pendingSuspenseBoundaries,transitions:z.transitions},f.updateQueue.baseState=O,f.memoizedState=O,f.flags&256){T=mu(Error(n(423)),f),f=eI(d,f,R,y,T);break e}else if(R!==T){T=mu(Error(n(424)),f),f=eI(d,f,R,y,T);break e}else for(ei=Ma(f.stateNode.containerInfo.firstChild),Js=f,Qn=!0,Gi=null,y=hM(f,null,R,y),f.child=y;y;)y.flags=y.flags&-3|4096,y=y.sibling;else{if(du(),R===T){f=_o(d,f,y);break e}ps(d,f,R,y)}f=f.child}return f;case 5:return CM(f),d===null&&eb(f),R=f.type,T=f.pendingProps,O=d!==null?d.memoizedProps:null,z=T.children,Uy(R,T)?z=null:O!==null&&Uy(R,O)&&(f.flags|=32),QM(d,f),ps(d,f,z,y),f.child;case 6:return d===null&&eb(f),null;case 13:return tI(d,f,y);case 4:return lb(f,f.stateNode.containerInfo),R=f.pendingProps,d===null?f.child=hu(f,null,R,y):ps(d,f,R,y),f.child;case 11:return R=f.type,T=f.pendingProps,T=f.elementType===R?T:Vi(R,T),KM(d,f,R,T,y);case 7:return ps(d,f,f.pendingProps,y),f.child;case 8:return ps(d,f,f.pendingProps.children,y),f.child;case 12:return ps(d,f,f.pendingProps.children,y),f.child;case 10:e:{if(R=f.type._context,T=f.pendingProps,O=f.memoizedProps,z=T.value,Nn(of,R._currentValue),R._currentValue=z,O!==null)if($i(O.value,z)){if(O.children===T.children&&!Ts.current){f=_o(d,f,y);break e}}else for(O=f.child,O!==null&&(O.return=f);O!==null;){var le=O.dependencies;if(le!==null){z=O.child;for(var me=le.firstContext;me!==null;){if(me.context===R){if(O.tag===1){me=Wo(-1,y&-y),me.tag=2;var Le=O.updateQueue;if(Le!==null){Le=Le.shared;var et=Le.pending;et===null?me.next=me:(me.next=et.next,et.next=me),Le.pending=me}}O.lanes|=y,me=O.alternate,me!==null&&(me.lanes|=y),ib(O.return,y,f),le.lanes|=y;break}me=me.next}}else if(O.tag===10)z=O.type===f.type?null:O.child;else if(O.tag===18){if(z=O.return,z===null)throw Error(n(341));z.lanes|=y,le=z.alternate,le!==null&&(le.lanes|=y),ib(z,y,f),z=O.sibling}else z=O.child;if(z!==null)z.return=O;else for(z=O;z!==null;){if(z===f){z=null;break}if(O=z.sibling,O!==null){O.return=z.return,z=O;break}z=z.return}O=z}ps(d,f,T.children,y),f=f.child}return f;case 9:return T=f.type,R=f.pendingProps.children,gu(f,y),T=fi(T),R=R(T),f.flags|=1,ps(d,f,R,y),f.child;case 14:return R=f.type,T=Vi(R,f.pendingProps),T=Vi(R.type,T),qM(d,f,R,T,y);case 15:return XM(d,f,f.type,f.pendingProps,y);case 17:return R=f.type,T=f.pendingProps,T=f.elementType===R?T:Vi(R,T),vf(d,f),f.tag=1,Ms(R)?(d=!0,Jg(f)):d=!1,gu(f,y),VM(f,R,T),wb(f,R,T,y),Eb(null,f,R,!0,d,y);case 19:return rI(d,f,y);case 22:return YM(d,f,y)}throw Error(n(156,f.tag))};function FI(d,f){return xt(d,f)}function j3(d,f,y,R){this.tag=d,this.key=y,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=f,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=R,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vi(d,f,y,R){return new j3(d,f,y,R)}function Ub(d){return d=d.prototype,!(!d||!d.isReactComponent)}function K3(d){if(typeof d=="function")return Ub(d)?1:0;if(d!=null){if(d=d.$$typeof,d===N)return 11;if(d===$)return 14}return 2}function Va(d,f){var y=d.alternate;return y===null?(y=vi(d.tag,f,d.key,d.mode),y.elementType=d.elementType,y.type=d.type,y.stateNode=d.stateNode,y.alternate=d,d.alternate=y):(y.pendingProps=f,y.type=d.type,y.flags=0,y.subtreeFlags=0,y.deletions=null),y.flags=d.flags&14680064,y.childLanes=d.childLanes,y.lanes=d.lanes,y.child=d.child,y.memoizedProps=d.memoizedProps,y.memoizedState=d.memoizedState,y.updateQueue=d.updateQueue,f=d.dependencies,y.dependencies=f===null?null:{lanes:f.lanes,firstContext:f.firstContext},y.sibling=d.sibling,y.index=d.index,y.ref=d.ref,y}function Mf(d,f,y,R,T,O){var z=2;if(R=d,typeof d=="function")Ub(d)&&(z=1);else if(typeof d=="string")z=5;else e:switch(d){case E:return Xl(y.children,T,O,f);case I:z=8,T|=8;break;case A:return d=vi(12,y,f,T|2),d.elementType=A,d.lanes=O,d;case k:return d=vi(13,y,f,T),d.elementType=k,d.lanes=O,d;case G:return d=vi(19,y,f,T),d.elementType=G,d.lanes=O,d;case U:return If(y,T,O,f);default:if(typeof d=="object"&&d!==null)switch(d.$$typeof){case L:z=10;break e;case D:z=9;break e;case N:z=11;break e;case $:z=14;break e;case _:z=16,R=null;break e}throw Error(n(130,d==null?d:typeof d,""))}return f=vi(z,y,f,T),f.elementType=d,f.type=R,f.lanes=O,f}function Xl(d,f,y,R){return d=vi(7,d,R,f),d.lanes=y,d}function If(d,f,y,R){return d=vi(22,d,R,f),d.elementType=U,d.lanes=y,d.stateNode={isHidden:!1},d}function jb(d,f,y){return d=vi(6,d,null,f),d.lanes=y,d}function Kb(d,f,y){return f=vi(4,d.children!==null?d.children:[],d.key,f),f.lanes=y,f.stateNode={containerInfo:d.containerInfo,pendingChildren:null,implementation:d.implementation},f}function q3(d,f,y,R,T){this.tag=f,this.containerInfo=d,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=po(0),this.expirationTimes=po(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=po(0),this.identifierPrefix=R,this.onRecoverableError=T,this.mutableSourceEagerHydrationData=null}function qb(d,f,y,R,T,O,z,le,me){return d=new q3(d,f,y,le,me),f===1?(f=1,O===!0&&(f|=8)):f=0,O=vi(3,null,null,f),d.current=O,O.stateNode=d,O.memoizedState={element:R,isDehydrated:y,cache:null,transitions:null,pendingSuspenseBoundaries:null},ab(O),d}function X3(d,f,y){var R=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),ew.exports=l5(),ew.exports}var HI;function c5(){if(HI)return Bf;HI=1;var e=Pk();return Bf.createRoot=e.createRoot,Bf.hydrateRoot=e.hydrateRoot,Bf}var Fk=c5();const BDe=rv(Fk);var to=Pk();const Tk=rv(to),u5=Rk({__proto__:null,default:Tk},[to]);/** * @remix-run/router v1.23.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Zn(){return Zn=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function td(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function h5(){return Math.random().toString(36).substr(2,8)}function WI(e,t){return{usr:e.state,key:e.key,idx:t}}function wp(e,t,n,r){return n===void 0&&(n=null),Zn({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ml(t):t,{state:n,key:t&&t.key||r||h5()})}function Fc(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ml(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function p5(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=fr.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(Zn({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function h(){a=fr.Pop;let b=u(),w=b==null?null:b-c;c=b,l&&l({action:a,location:v.location,delta:w})}function g(b,w){a=fr.Push;let S=wp(v.location,b,w);c=u()+1;let x=WI(S,c),P=v.createHref(S);try{o.pushState(x,"",P)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;s.location.assign(P)}i&&l&&l({action:a,location:v.location,delta:1})}function m(b,w){a=fr.Replace;let S=wp(v.location,b,w);c=u();let x=WI(S,c),P=v.createHref(S);o.replaceState(x,"",P),i&&l&&l({action:a,location:v.location,delta:0})}function C(b){let w=s.location.origin!=="null"?s.location.origin:s.location.href,S=typeof b=="string"?b:Fc(b);return S=S.replace(/ $/,"%20"),pn(w,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,w)}let v={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(zI,h),l=b,()=>{s.removeEventListener(zI,h),l=null}},createHref(b){return t(s,b)},createURL:C,encodeLocation(b){let w=C(b);return{pathname:w.pathname,search:w.search,hash:w.hash}},push:g,replace:m,go(b){return o.go(b)}};return v}var Dn;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(Dn||(Dn={}));const g5=new Set(["lazy","caseSensitive","path","id","index","children"]);function f5(e){return e.index===!0}function Ym(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((s,i)=>{let o=[...n,String(i)],a=typeof s.id=="string"?s.id:o.join("-");if(pn(s.index!==!0||!s.children,"Cannot specify children on an index route"),pn(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),f5(s)){let l=Zn({},s,t(s),{id:a});return r[a]=l,l}else{let l=Zn({},s,t(s),{id:a,children:void 0});return r[a]=l,s.children&&(l.children=Ym(s.children,t,o,r)),l}})}function rc(e,t,n){return n===void 0&&(n="/"),xm(e,t,n,!1)}function xm(e,t,n,r){let s=typeof t=="string"?Ml(t):t,i=wd(s.pathname||"/",n);if(i==null)return null;let o=Mk(e);C5(o);let a=null;for(let l=0;a==null&&l{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(pn(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=na([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(pn(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Mk(i.children,t,u,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:R5(c,i.index),routesMeta:u})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of Ik(i.path))s(i,o,l)}),t}function Ik(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=Ik(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function C5(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:E5(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const v5=/^:[\w-]+$/,y5=3,b5=2,w5=1,S5=10,x5=-2,_I=e=>e==="*";function R5(e,t){let n=e.split("/"),r=n.length;return n.some(_I)&&(r+=x5),t&&(r+=b5),n.filter(s=>!_I(s)).reduce((s,i)=>s+(v5.test(i)?y5:i===""?w5:S5),r)}function E5(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function P5(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a{let{paramName:g,isOptional:m}=u;if(g==="*"){let v=a[h]||"";o=i.slice(0,i.length-v.length).replace(/(.)\/+$/,"$1")}const C=a[h];return m&&!C?c[g]=void 0:c[g]=(C||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function F5(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),td(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function T5(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return td(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function wd(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function M5(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ml(e):e;return{pathname:n?n.startsWith("/")?n:I5(n,t):t,search:A5(r),hash:L5(s)}}function I5(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function rw(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Dk(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function vE(e,t){let n=Dk(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function yE(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ml(e):(s=Zn({},e),pn(!s.pathname||!s.pathname.includes("?"),rw("?","pathname","search",s)),pn(!s.pathname||!s.pathname.includes("#"),rw("#","pathname","hash",s)),pn(!s.search||!s.search.includes("#"),rw("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let h=t.length-1;if(!r&&o.startsWith("..")){let g=o.split("/");for(;g[0]==="..";)g.shift(),h-=1;s.pathname=g.join("/")}a=h>=0?t[h]:"/"}let l=M5(s,a),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const na=e=>e.join("/").replace(/\/\/+/g,"/"),D5=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),A5=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,L5=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Qm{constructor(t,n,r,s){s===void 0&&(s=!1),this.status=t,this.statusText=n||"",this.internal=s,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Sp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Ak=["post","put","patch","delete"],O5=new Set(Ak),k5=["get",...Ak],N5=new Set(k5),B5=new Set([301,302,303,307,308]),$5=new Set([307,308]),sw={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},G5={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},xh={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},bE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,V5=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Lk="remix-router-transitions";function H5(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;pn(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let s;if(e.mapRouteProperties)s=e.mapRouteProperties;else if(e.detectErrorBoundary){let q=e.detectErrorBoundary;s=Q=>({hasErrorBoundary:q(Q)})}else s=V5;let i={},o=Ym(e.routes,s,void 0,i),a,l=e.basename||"/",c=e.dataStrategy||U5,u=e.patchRoutesOnNavigation,h=Zn({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),g=null,m=new Set,C=null,v=null,b=null,w=e.hydrationData!=null,S=rc(o,e.history.location,l),x=!1,P=null;if(S==null&&!u){let q=$s(404,{pathname:e.history.location.pathname}),{matches:Q,route:ie}=nD(o);S=Q,P={[ie.id]:q}}S&&!e.hydrationData&&Ve(S,o,e.history.location.pathname).active&&(S=null);let F;if(S)if(S.some(q=>q.route.lazy))F=!1;else if(!S.some(q=>q.route.loader))F=!0;else if(h.v7_partialHydration){let q=e.hydrationData?e.hydrationData.loaderData:null,Q=e.hydrationData?e.hydrationData.errors:null;if(Q){let ie=S.findIndex(Se=>Q[Se.route.id]!==void 0);F=S.slice(0,ie+1).every(Se=>!YS(Se.route,q,Q))}else F=S.every(ie=>!YS(ie.route,q,Q))}else F=e.hydrationData!=null;else if(F=!1,S=[],h.v7_partialHydration){let q=Ve(null,o,e.history.location.pathname);q.active&&q.matches&&(x=!0,S=q.matches)}let M,E={historyAction:e.history.action,location:e.history.location,matches:S,initialized:F,navigation:sw,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||P,fetchers:new Map,blockers:new Map},I=fr.Pop,A=!1,L,D=!1,N=new Map,k=null,G=!1,$=!1,_=[],U=new Set,V=new Map,W=0,j=-1,H=new Map,B=new Set,Y=new Map,J=new Map,te=new Set,Z=new Map,ae=new Map,de;function ge(){if(g=e.history.listen(q=>{let{action:Q,location:ie,delta:Se}=q;if(de){de(),de=void 0;return}td(ae.size===0||Se!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let Te=It({currentLocation:E.location,nextLocation:ie,historyAction:Q});if(Te&&Se!=null){let We=new Promise(ft=>{de=ft});e.history.go(Se*-1),wt(Te,{state:"blocked",location:ie,proceed(){wt(Te,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),We.then(()=>e.history.go(Se))},reset(){let ft=new Map(E.blockers);ft.set(Te,xh),ne({blockers:ft})}});return}return ue(Q,ie)}),n){i6(t,N);let q=()=>o6(t,N);t.addEventListener("pagehide",q),k=()=>t.removeEventListener("pagehide",q)}return E.initialized||ue(fr.Pop,E.location,{initialHydration:!0}),M}function ve(){g&&g(),k&&k(),m.clear(),L&&L.abort(),E.fetchers.forEach((q,Q)=>De(Q)),E.blockers.forEach((q,Q)=>ut(Q))}function Re(q){return m.add(q),()=>m.delete(q)}function ne(q,Q){Q===void 0&&(Q={}),E=Zn({},E,q);let ie=[],Se=[];h.v7_fetcherPersist&&E.fetchers.forEach((Te,We)=>{Te.state==="idle"&&(te.has(We)?Se.push(We):ie.push(We))}),te.forEach(Te=>{!E.fetchers.has(Te)&&!V.has(Te)&&Se.push(Te)}),[...m].forEach(Te=>Te(E,{deletedFetchers:Se,viewTransitionOpts:Q.viewTransitionOpts,flushSync:Q.flushSync===!0})),h.v7_fetcherPersist?(ie.forEach(Te=>E.fetchers.delete(Te)),Se.forEach(Te=>De(Te))):Se.forEach(Te=>te.delete(Te))}function re(q,Q,ie){var Se,Te;let{flushSync:We}=ie===void 0?{}:ie,ft=E.actionData!=null&&E.navigation.formMethod!=null&&Ui(E.navigation.formMethod)&&E.navigation.state==="loading"&&((Se=q.state)==null?void 0:Se._isRedirect)!==!0,Qe;Q.actionData?Object.keys(Q.actionData).length>0?Qe=Q.actionData:Qe=null:ft?Qe=E.actionData:Qe=null;let Xe=Q.loaderData?eD(E.loaderData,Q.loaderData,Q.matches||[],Q.errors):E.loaderData,at=E.blockers;at.size>0&&(at=new Map(at),at.forEach((mt,Je)=>at.set(Je,xh)));let ht=A===!0||E.navigation.formMethod!=null&&Ui(E.navigation.formMethod)&&((Te=q.state)==null?void 0:Te._isRedirect)!==!0;a&&(o=a,a=void 0),G||I===fr.Pop||(I===fr.Push?e.history.push(q,q.state):I===fr.Replace&&e.history.replace(q,q.state));let vt;if(I===fr.Pop){let mt=N.get(E.location.pathname);mt&&mt.has(q.pathname)?vt={currentLocation:E.location,nextLocation:q}:N.has(q.pathname)&&(vt={currentLocation:q,nextLocation:E.location})}else if(D){let mt=N.get(E.location.pathname);mt?mt.add(q.pathname):(mt=new Set([q.pathname]),N.set(E.location.pathname,mt)),vt={currentLocation:E.location,nextLocation:q}}ne(Zn({},Q,{actionData:Qe,loaderData:Xe,historyAction:I,location:q,initialized:!0,navigation:sw,revalidation:"idle",restoreScrollPosition:Vt(q,Q.matches||E.matches),preventScrollReset:ht,blockers:at}),{viewTransitionOpts:vt,flushSync:We===!0}),I=fr.Pop,A=!1,D=!1,G=!1,$=!1,_=[]}async function ce(q,Q){if(typeof q=="number"){e.history.go(q);return}let ie=XS(E.location,E.matches,l,h.v7_prependBasename,q,h.v7_relativeSplatPath,Q==null?void 0:Q.fromRouteId,Q==null?void 0:Q.relative),{path:Se,submission:Te,error:We}=jI(h.v7_normalizeFormMethod,!1,ie,Q),ft=E.location,Qe=wp(E.location,Se,Q&&Q.state);Qe=Zn({},Qe,e.history.encodeLocation(Qe));let Xe=Q&&Q.replace!=null?Q.replace:void 0,at=fr.Push;Xe===!0?at=fr.Replace:Xe===!1||Te!=null&&Ui(Te.formMethod)&&Te.formAction===E.location.pathname+E.location.search&&(at=fr.Replace);let ht=Q&&"preventScrollReset"in Q?Q.preventScrollReset===!0:void 0,vt=(Q&&Q.flushSync)===!0,mt=It({currentLocation:ft,nextLocation:Qe,historyAction:at});if(mt){wt(mt,{state:"blocked",location:Qe,proceed(){wt(mt,{state:"proceeding",proceed:void 0,reset:void 0,location:Qe}),ce(q,Q)},reset(){let Je=new Map(E.blockers);Je.set(mt,xh),ne({blockers:Je})}});return}return await ue(at,Qe,{submission:Te,pendingError:We,preventScrollReset:ht,replace:Q&&Q.replace,enableViewTransition:Q&&Q.viewTransition,flushSync:vt})}function X(){if(gt(),ne({revalidation:"loading"}),E.navigation.state!=="submitting"){if(E.navigation.state==="idle"){ue(E.historyAction,E.location,{startUninterruptedRevalidation:!0});return}ue(I||E.historyAction,E.navigation.location,{overrideNavigation:E.navigation,enableViewTransition:D===!0})}}async function ue(q,Q,ie){L&&L.abort(),L=null,I=q,G=(ie&&ie.startUninterruptedRevalidation)===!0,Ot(E.location,E.matches),A=(ie&&ie.preventScrollReset)===!0,D=(ie&&ie.enableViewTransition)===!0;let Se=a||o,Te=ie&&ie.overrideNavigation,We=ie!=null&&ie.initialHydration&&E.matches&&E.matches.length>0&&!x?E.matches:rc(Se,Q,l),ft=(ie&&ie.flushSync)===!0;if(We&&E.initialized&&!$&&Q5(E.location,Q)&&!(ie&&ie.submission&&Ui(ie.submission.formMethod))){re(Q,{matches:We},{flushSync:ft});return}let Qe=Ve(We,Se,Q.pathname);if(Qe.active&&Qe.matches&&(We=Qe.matches),!We){let{error:nt,notFoundMatches:pt,route:xt}=Gt(Q.pathname);re(Q,{matches:pt,loaderData:{},errors:{[xt.id]:nt}},{flushSync:ft});return}L=new AbortController;let Xe=wu(e.history,Q,L.signal,ie&&ie.submission),at;if(ie&&ie.pendingError)at=[sc(We).route.id,{type:Dn.error,error:ie.pendingError}];else if(ie&&ie.submission&&Ui(ie.submission.formMethod)){let nt=await fe(Xe,Q,ie.submission,We,Qe.active,{replace:ie.replace,flushSync:ft});if(nt.shortCircuited)return;if(nt.pendingActionResult){let[pt,xt]=nt.pendingActionResult;if(oi(xt)&&Sp(xt.error)&&xt.error.status===404){L=null,re(Q,{matches:nt.matches,loaderData:{},errors:{[pt]:xt.error}});return}}We=nt.matches||We,at=nt.pendingActionResult,Te=iw(Q,ie.submission),ft=!1,Qe.active=!1,Xe=wu(e.history,Xe.url,Xe.signal)}let{shortCircuited:ht,matches:vt,loaderData:mt,errors:Je}=await oe(Xe,Q,We,Qe.active,Te,ie&&ie.submission,ie&&ie.fetcherSubmission,ie&&ie.replace,ie&&ie.initialHydration===!0,ft,at);ht||(L=null,re(Q,Zn({matches:vt||We},tD(at),{loaderData:mt,errors:Je})))}async function fe(q,Q,ie,Se,Te,We){We===void 0&&(We={}),gt();let ft=r6(Q,ie);if(ne({navigation:ft},{flushSync:We.flushSync===!0}),Te){let at=await st(Se,Q.pathname,q.signal);if(at.type==="aborted")return{shortCircuited:!0};if(at.type==="error"){let ht=sc(at.partialMatches).route.id;return{matches:at.partialMatches,pendingActionResult:[ht,{type:Dn.error,error:at.error}]}}else if(at.matches)Se=at.matches;else{let{notFoundMatches:ht,error:vt,route:mt}=Gt(Q.pathname);return{matches:ht,pendingActionResult:[mt.id,{type:Dn.error,error:vt}]}}}let Qe,Xe=zh(Se,Q);if(!Xe.route.action&&!Xe.route.lazy)Qe={type:Dn.error,error:$s(405,{method:q.method,pathname:Q.pathname,routeId:Xe.route.id})};else if(Qe=(await lt("action",E,q,[Xe],Se,null))[Xe.route.id],q.signal.aborted)return{shortCircuited:!0};if(cc(Qe)){let at;return We&&We.replace!=null?at=We.replace:at=QI(Qe.response.headers.get("Location"),new URL(q.url),l)===E.location.pathname+E.location.search,await ze(q,Qe,!0,{submission:ie,replace:at}),{shortCircuited:!0}}if(al(Qe))throw $s(400,{type:"defer-action"});if(oi(Qe)){let at=sc(Se,Xe.route.id);return(We&&We.replace)!==!0&&(I=fr.Push),{matches:Se,pendingActionResult:[at.route.id,Qe]}}return{matches:Se,pendingActionResult:[Xe.route.id,Qe]}}async function oe(q,Q,ie,Se,Te,We,ft,Qe,Xe,at,ht){let vt=Te||iw(Q,We),mt=We||ft||sD(vt),Je=!G&&(!h.v7_partialHydration||!Xe);if(Se){if(Je){let hn=we(ht);ne(Zn({navigation:vt},hn!==void 0?{actionData:hn}:{}),{flushSync:at})}let Xt=await st(ie,Q.pathname,q.signal);if(Xt.type==="aborted")return{shortCircuited:!0};if(Xt.type==="error"){let hn=sc(Xt.partialMatches).route.id;return{matches:Xt.partialMatches,loaderData:{},errors:{[hn]:Xt.error}}}else if(Xt.matches)ie=Xt.matches;else{let{error:hn,notFoundMatches:Xn,route:Ht}=Gt(Q.pathname);return{matches:Xn,loaderData:{},errors:{[Ht.id]:hn}}}}let nt=a||o,[pt,xt]=qI(e.history,E,ie,mt,Q,h.v7_partialHydration&&Xe===!0,h.v7_skipActionErrorRevalidation,$,_,U,te,Y,B,nt,l,ht);if(Nt(Xt=>!(ie&&ie.some(hn=>hn.route.id===Xt))||pt&&pt.some(hn=>hn.route.id===Xt)),j=++W,pt.length===0&&xt.length===0){let Xt=Ce();return re(Q,Zn({matches:ie,loaderData:{},errors:ht&&oi(ht[1])?{[ht[0]]:ht[1].error}:null},tD(ht),Xt?{fetchers:new Map(E.fetchers)}:{}),{flushSync:at}),{shortCircuited:!0}}if(Je){let Xt={};if(!Se){Xt.navigation=vt;let hn=we(ht);hn!==void 0&&(Xt.actionData=hn)}xt.length>0&&(Xt.fetchers=Be(xt)),ne(Xt,{flushSync:at})}xt.forEach(Xt=>{qe(Xt.key),Xt.controller&&V.set(Xt.key,Xt.controller)});let Ct=()=>xt.forEach(Xt=>qe(Xt.key));L&&L.signal.addEventListener("abort",Ct);let{loaderResults:kt,fetcherResults:$t}=await Ft(E,ie,pt,xt,q);if(q.signal.aborted)return{shortCircuited:!0};L&&L.signal.removeEventListener("abort",Ct),xt.forEach(Xt=>V.delete(Xt.key));let Tt=$f(kt);if(Tt)return await ze(q,Tt.result,!0,{replace:Qe}),{shortCircuited:!0};if(Tt=$f($t),Tt)return B.add(Tt.key),await ze(q,Tt.result,!0,{replace:Qe}),{shortCircuited:!0};let{loaderData:wn,errors:fn}=JI(E,ie,kt,ht,xt,$t,Z);Z.forEach((Xt,hn)=>{Xt.subscribe(Xn=>{(Xn||Xt.done)&&Z.delete(hn)})}),h.v7_partialHydration&&Xe&&E.errors&&(fn=Zn({},E.errors,fn));let mn=Ce(),cn=Oe(j),Lr=mn||cn||xt.length>0;return Zn({matches:ie,loaderData:wn,errors:fn},Lr?{fetchers:new Map(E.fetchers)}:{})}function we(q){if(q&&!oi(q[1]))return{[q[0]]:q[1].data};if(E.actionData)return Object.keys(E.actionData).length===0?null:E.actionData}function Be(q){return q.forEach(Q=>{let ie=E.fetchers.get(Q.key),Se=Rh(void 0,ie?ie.data:void 0);E.fetchers.set(Q.key,Se)}),new Map(E.fetchers)}function Ae(q,Q,ie,Se){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");qe(q);let Te=(Se&&Se.flushSync)===!0,We=a||o,ft=XS(E.location,E.matches,l,h.v7_prependBasename,ie,h.v7_relativeSplatPath,Q,Se==null?void 0:Se.relative),Qe=rc(We,ft,l),Xe=Ve(Qe,We,ft);if(Xe.active&&Xe.matches&&(Qe=Xe.matches),!Qe){Ie(q,Q,$s(404,{pathname:ft}),{flushSync:Te});return}let{path:at,submission:ht,error:vt}=jI(h.v7_normalizeFormMethod,!0,ft,Se);if(vt){Ie(q,Q,vt,{flushSync:Te});return}let mt=zh(Qe,at),Je=(Se&&Se.preventScrollReset)===!0;if(ht&&Ui(ht.formMethod)){Pe(q,Q,at,mt,Qe,Xe.active,Te,Je,ht);return}Y.set(q,{routeId:Q,path:at}),_e(q,Q,at,mt,Qe,Xe.active,Te,Je,ht)}async function Pe(q,Q,ie,Se,Te,We,ft,Qe,Xe){gt(),Y.delete(q);function at(rt){if(!rt.route.action&&!rt.route.lazy){let zt=$s(405,{method:Xe.formMethod,pathname:ie,routeId:Q});return Ie(q,Q,zt,{flushSync:ft}),!0}return!1}if(!We&&at(Se))return;let ht=E.fetchers.get(q);Ye(q,s6(Xe,ht),{flushSync:ft});let vt=new AbortController,mt=wu(e.history,ie,vt.signal,Xe);if(We){let rt=await st(Te,new URL(mt.url).pathname,mt.signal,q);if(rt.type==="aborted")return;if(rt.type==="error"){Ie(q,Q,rt.error,{flushSync:ft});return}else if(rt.matches){if(Te=rt.matches,Se=zh(Te,ie),at(Se))return}else{Ie(q,Q,$s(404,{pathname:ie}),{flushSync:ft});return}}V.set(q,vt);let Je=W,pt=(await lt("action",E,mt,[Se],Te,q))[Se.route.id];if(mt.signal.aborted){V.get(q)===vt&&V.delete(q);return}if(h.v7_fetcherPersist&&te.has(q)){if(cc(pt)||oi(pt)){Ye(q,ja(void 0));return}}else{if(cc(pt))if(V.delete(q),j>Je){Ye(q,ja(void 0));return}else return B.add(q),Ye(q,Rh(Xe)),ze(mt,pt,!1,{fetcherSubmission:Xe,preventScrollReset:Qe});if(oi(pt)){Ie(q,Q,pt.error);return}}if(al(pt))throw $s(400,{type:"defer-action"});let xt=E.navigation.location||E.location,Ct=wu(e.history,xt,vt.signal),kt=a||o,$t=E.navigation.state!=="idle"?rc(kt,E.navigation.location,l):E.matches;pn($t,"Didn't find any matches after fetcher action");let Tt=++W;H.set(q,Tt);let wn=Rh(Xe,pt.data);E.fetchers.set(q,wn);let[fn,mn]=qI(e.history,E,$t,Xe,xt,!1,h.v7_skipActionErrorRevalidation,$,_,U,te,Y,B,kt,l,[Se.route.id,pt]);mn.filter(rt=>rt.key!==q).forEach(rt=>{let zt=rt.key,Pn=E.fetchers.get(zt),Yn=Rh(void 0,Pn?Pn.data:void 0);E.fetchers.set(zt,Yn),qe(zt),rt.controller&&V.set(zt,rt.controller)}),ne({fetchers:new Map(E.fetchers)});let cn=()=>mn.forEach(rt=>qe(rt.key));vt.signal.addEventListener("abort",cn);let{loaderResults:Lr,fetcherResults:Xt}=await Ft(E,$t,fn,mn,Ct);if(vt.signal.aborted)return;vt.signal.removeEventListener("abort",cn),H.delete(q),V.delete(q),mn.forEach(rt=>V.delete(rt.key));let hn=$f(Lr);if(hn)return ze(Ct,hn.result,!1,{preventScrollReset:Qe});if(hn=$f(Xt),hn)return B.add(hn.key),ze(Ct,hn.result,!1,{preventScrollReset:Qe});let{loaderData:Xn,errors:Ht}=JI(E,$t,Lr,void 0,mn,Xt,Z);if(E.fetchers.has(q)){let rt=ja(pt.data);E.fetchers.set(q,rt)}Oe(Tt),E.navigation.state==="loading"&&Tt>j?(pn(I,"Expected pending action"),L&&L.abort(),re(E.navigation.location,{matches:$t,loaderData:Xn,errors:Ht,fetchers:new Map(E.fetchers)})):(ne({errors:Ht,loaderData:eD(E.loaderData,Xn,$t,Ht),fetchers:new Map(E.fetchers)}),$=!1)}async function _e(q,Q,ie,Se,Te,We,ft,Qe,Xe){let at=E.fetchers.get(q);Ye(q,Rh(Xe,at?at.data:void 0),{flushSync:ft});let ht=new AbortController,vt=wu(e.history,ie,ht.signal);if(We){let pt=await st(Te,new URL(vt.url).pathname,vt.signal,q);if(pt.type==="aborted")return;if(pt.type==="error"){Ie(q,Q,pt.error,{flushSync:ft});return}else if(pt.matches)Te=pt.matches,Se=zh(Te,ie);else{Ie(q,Q,$s(404,{pathname:ie}),{flushSync:ft});return}}V.set(q,ht);let mt=W,nt=(await lt("loader",E,vt,[Se],Te,q))[Se.route.id];if(al(nt)&&(nt=await wE(nt,vt.signal,!0)||nt),V.get(q)===ht&&V.delete(q),!vt.signal.aborted){if(te.has(q)){Ye(q,ja(void 0));return}if(cc(nt))if(j>mt){Ye(q,ja(void 0));return}else{B.add(q),await ze(vt,nt,!1,{preventScrollReset:Qe});return}if(oi(nt)){Ie(q,Q,nt.error);return}pn(!al(nt),"Unhandled fetcher deferred data"),Ye(q,ja(nt.data))}}async function ze(q,Q,ie,Se){let{submission:Te,fetcherSubmission:We,preventScrollReset:ft,replace:Qe}=Se===void 0?{}:Se;Q.response.headers.has("X-Remix-Revalidate")&&($=!0);let Xe=Q.response.headers.get("Location");pn(Xe,"Expected a Location header on the redirect Response"),Xe=QI(Xe,new URL(q.url),l);let at=wp(E.location,Xe,{_isRedirect:!0});if(n){let pt=!1;if(Q.response.headers.has("X-Remix-Reload-Document"))pt=!0;else if(bE.test(Xe)){const xt=e.history.createURL(Xe);pt=xt.origin!==t.location.origin||wd(xt.pathname,l)==null}if(pt){Qe?t.location.replace(Xe):t.location.assign(Xe);return}}L=null;let ht=Qe===!0||Q.response.headers.has("X-Remix-Replace")?fr.Replace:fr.Push,{formMethod:vt,formAction:mt,formEncType:Je}=E.navigation;!Te&&!We&&vt&&mt&&Je&&(Te=sD(E.navigation));let nt=Te||We;if($5.has(Q.response.status)&&nt&&Ui(nt.formMethod))await ue(ht,at,{submission:Zn({},nt,{formAction:Xe}),preventScrollReset:ft||A,enableViewTransition:ie?D:void 0});else{let pt=iw(at,Te);await ue(ht,at,{overrideNavigation:pt,fetcherSubmission:We,preventScrollReset:ft||A,enableViewTransition:ie?D:void 0})}}async function lt(q,Q,ie,Se,Te,We){let ft,Qe={};try{ft=await j5(c,q,Q,ie,Se,Te,We,i,s)}catch(Xe){return Se.forEach(at=>{Qe[at.route.id]={type:Dn.error,error:Xe}}),Qe}for(let[Xe,at]of Object.entries(ft))if(Z5(at)){let ht=at.result;Qe[Xe]={type:Dn.redirect,response:X5(ht,ie,Xe,Te,l,h.v7_relativeSplatPath)}}else Qe[Xe]=await q5(at);return Qe}async function Ft(q,Q,ie,Se,Te){let We=q.matches,ft=lt("loader",q,Te,ie,Q,null),Qe=Promise.all(Se.map(async ht=>{if(ht.matches&&ht.match&&ht.controller){let mt=(await lt("loader",q,wu(e.history,ht.path,ht.controller.signal),[ht.match],ht.matches,ht.key))[ht.match.route.id];return{[ht.key]:mt}}else return Promise.resolve({[ht.key]:{type:Dn.error,error:$s(404,{pathname:ht.path})}})})),Xe=await ft,at=(await Qe).reduce((ht,vt)=>Object.assign(ht,vt),{});return await Promise.all([t6(Q,Xe,Te.signal,We,q.loaderData),n6(Q,at,Se)]),{loaderResults:Xe,fetcherResults:at}}function gt(){$=!0,_.push(...Nt()),Y.forEach((q,Q)=>{V.has(Q)&&U.add(Q),qe(Q)})}function Ye(q,Q,ie){ie===void 0&&(ie={}),E.fetchers.set(q,Q),ne({fetchers:new Map(E.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function Ie(q,Q,ie,Se){Se===void 0&&(Se={});let Te=sc(E.matches,Q);De(q),ne({errors:{[Te.route.id]:ie},fetchers:new Map(E.fetchers)},{flushSync:(Se&&Se.flushSync)===!0})}function Ke(q){return J.set(q,(J.get(q)||0)+1),te.has(q)&&te.delete(q),E.fetchers.get(q)||G5}function De(q){let Q=E.fetchers.get(q);V.has(q)&&!(Q&&Q.state==="loading"&&H.has(q))&&qe(q),Y.delete(q),H.delete(q),B.delete(q),h.v7_fetcherPersist&&te.delete(q),U.delete(q),E.fetchers.delete(q)}function je(q){let Q=(J.get(q)||0)-1;Q<=0?(J.delete(q),te.add(q),h.v7_fetcherPersist||De(q)):J.set(q,Q),ne({fetchers:new Map(E.fetchers)})}function qe(q){let Q=V.get(q);Q&&(Q.abort(),V.delete(q))}function Ge(q){for(let Q of q){let ie=Ke(Q),Se=ja(ie.data);E.fetchers.set(Q,Se)}}function Ce(){let q=[],Q=!1;for(let ie of B){let Se=E.fetchers.get(ie);pn(Se,"Expected fetcher: "+ie),Se.state==="loading"&&(B.delete(ie),q.push(ie),Q=!0)}return Ge(q),Q}function Oe(q){let Q=[];for(let[ie,Se]of H)if(Se0}function ot(q,Q){let ie=E.blockers.get(q)||xh;return ae.get(q)!==Q&&ae.set(q,Q),ie}function ut(q){E.blockers.delete(q),ae.delete(q)}function wt(q,Q){let ie=E.blockers.get(q)||xh;pn(ie.state==="unblocked"&&Q.state==="blocked"||ie.state==="blocked"&&Q.state==="blocked"||ie.state==="blocked"&&Q.state==="proceeding"||ie.state==="blocked"&&Q.state==="unblocked"||ie.state==="proceeding"&&Q.state==="unblocked","Invalid blocker state transition: "+ie.state+" -> "+Q.state);let Se=new Map(E.blockers);Se.set(q,Q),ne({blockers:Se})}function It(q){let{currentLocation:Q,nextLocation:ie,historyAction:Se}=q;if(ae.size===0)return;ae.size>1&&td(!1,"A router only supports one blocker at a time");let Te=Array.from(ae.entries()),[We,ft]=Te[Te.length-1],Qe=E.blockers.get(We);if(!(Qe&&Qe.state==="proceeding")&&ft({currentLocation:Q,nextLocation:ie,historyAction:Se}))return We}function Gt(q){let Q=$s(404,{pathname:q}),ie=a||o,{matches:Se,route:Te}=nD(ie);return Nt(),{notFoundMatches:Se,route:Te,error:Q}}function Nt(q){let Q=[];return Z.forEach((ie,Se)=>{(!q||q(Se))&&(ie.cancel(),Q.push(Se),Z.delete(Se))}),Q}function jt(q,Q,ie){if(C=q,b=Q,v=ie||null,!w&&E.navigation===sw){w=!0;let Se=Vt(E.location,E.matches);Se!=null&&ne({restoreScrollPosition:Se})}return()=>{C=null,b=null,v=null}}function qt(q,Q){return v&&v(q,Q.map(Se=>m5(Se,E.loaderData)))||q.key}function Ot(q,Q){if(C&&b){let ie=qt(q,Q);C[ie]=b()}}function Vt(q,Q){if(C){let ie=qt(q,Q),Se=C[ie];if(typeof Se=="number")return Se}return null}function Ve(q,Q,ie){if(u)if(q){if(Object.keys(q[0].params).length>0)return{active:!0,matches:xm(Q,ie,l,!0)}}else return{active:!0,matches:xm(Q,ie,l,!0)||[]};return{active:!1,matches:null}}async function st(q,Q,ie,Se){if(!u)return{type:"success",matches:q};let Te=q;for(;;){let We=a==null,ft=a||o,Qe=i;try{await u({signal:ie,path:Q,matches:Te,fetcherKey:Se,patch:(ht,vt)=>{ie.aborted||YI(ht,vt,ft,Qe,s)}})}catch(ht){return{type:"error",error:ht,partialMatches:Te}}finally{We&&!ie.aborted&&(o=[...o])}if(ie.aborted)return{type:"aborted"};let Xe=rc(ft,Q,l);if(Xe)return{type:"success",matches:Xe};let at=xm(ft,Q,l,!0);if(!at||Te.length===at.length&&Te.every((ht,vt)=>ht.route.id===at[vt].route.id))return{type:"success",matches:null};Te=at}}function Ue(q){i={},a=Ym(q,s,void 0,i)}function ke(q,Q){let ie=a==null;YI(q,Q,a||o,i,s),ie&&(o=[...o],ne({}))}return M={get basename(){return l},get future(){return h},get state(){return E},get routes(){return o},get window(){return t},initialize:ge,subscribe:Re,enableScrollRestoration:jt,navigate:ce,fetch:Ae,revalidate:X,createHref:q=>e.history.createHref(q),encodeLocation:q=>e.history.encodeLocation(q),getFetcher:Ke,deleteFetcher:je,dispose:ve,getBlocker:ot,deleteBlocker:ut,patchRoutes:ke,_internalFetchControllers:V,_internalActiveDeferreds:Z,_internalSetRoutes:Ue},M}function z5(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function XS(e,t,n,r,s,i,o,a){let l,c;if(o){l=[];for(let h of t)if(l.push(h),h.route.id===o){c=h;break}}else l=t,c=t[t.length-1];let u=yE(s||".",vE(l,i),wd(e.pathname,n)||e.pathname,a==="path");if(s==null&&(u.search=e.search,u.hash=e.hash),(s==null||s===""||s===".")&&c){let h=SE(u.search);if(c.route.index&&!h)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&h){let g=new URLSearchParams(u.search),m=g.getAll("index");g.delete("index"),m.filter(v=>v).forEach(v=>g.append("index",v));let C=g.toString();u.search=C?"?"+C:""}}return r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:na([n,u.pathname])),Fc(u)}function jI(e,t,n,r){if(!r||!z5(r))return{path:n};if(r.formMethod&&!e6(r.formMethod))return{path:n,error:$s(405,{method:r.formMethod})};let s=()=>({path:n,error:$s(400,{type:"invalid-body"})}),i=r.formMethod||"get",o=e?i.toUpperCase():i.toLowerCase(),a=Nk(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Ui(o))return s();let g=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,C)=>{let[v,b]=C;return""+m+v+"="+b+` `},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:g}}}else if(r.formEncType==="application/json"){if(!Ui(o))return s();try{let g=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:a,formEncType:r.formEncType,formData:void 0,json:g,text:void 0}}}catch{return s()}}}pn(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=QS(r.formData),c=r.formData;else if(r.body instanceof FormData)l=QS(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=ZI(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=ZI(l)}catch{return s()}let u={formMethod:o,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Ui(u.formMethod))return{path:n,submission:u};let h=Ml(n);return t&&h.search&&SE(h.search)&&l.append("index",""),h.search="?"+l,{path:Fc(h),submission:u}}function KI(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(s=>s.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function qI(e,t,n,r,s,i,o,a,l,c,u,h,g,m,C,v){let b=v?oi(v[1])?v[1].error:v[1].data:void 0,w=e.createURL(t.location),S=e.createURL(s),x=n;i&&t.errors?x=KI(n,Object.keys(t.errors)[0],!0):v&&oi(v[1])&&(x=KI(n,v[0]));let P=v?v[1].statusCode:void 0,F=o&&P&&P>=400,M=x.filter((I,A)=>{let{route:L}=I;if(L.lazy)return!0;if(L.loader==null)return!1;if(i)return YS(L,t.loaderData,t.errors);if(W5(t.loaderData,t.matches[A],I)||l.some(k=>k===I.route.id))return!0;let D=t.matches[A],N=I;return XI(I,Zn({currentUrl:w,currentParams:D.params,nextUrl:S,nextParams:N.params},r,{actionResult:b,actionStatus:P,defaultShouldRevalidate:F?!1:a||w.pathname+w.search===S.pathname+S.search||w.search!==S.search||Ok(D,N)}))}),E=[];return h.forEach((I,A)=>{if(i||!n.some(G=>G.route.id===I.routeId)||u.has(A))return;let L=rc(m,I.path,C);if(!L){E.push({key:A,routeId:I.routeId,path:I.path,matches:null,match:null,controller:null});return}let D=t.fetchers.get(A),N=zh(L,I.path),k=!1;g.has(A)?k=!1:c.has(A)?(c.delete(A),k=!0):D&&D.state!=="idle"&&D.data===void 0?k=a:k=XI(N,Zn({currentUrl:w,currentParams:t.matches[t.matches.length-1].params,nextUrl:S,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:P,defaultShouldRevalidate:F?!1:a})),k&&E.push({key:A,routeId:I.routeId,path:I.path,matches:L,match:N,controller:new AbortController})}),[M,E]}function YS(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,s=n!=null&&n[e.id]!==void 0;return!r&&s?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!s}function W5(e,t,n){let r=!t||n.route.id!==t.route.id,s=e[n.route.id]===void 0;return r||s}function Ok(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function XI(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function YI(e,t,n,r,s){var i;let o;if(e){let c=r[e];pn(c,"No route found to patch children into: routeId = "+e),c.children||(c.children=[]),o=c.children}else o=n;let a=t.filter(c=>!o.some(u=>kk(c,u))),l=Ym(a,s,[e||"_","patch",String(((i=o)==null?void 0:i.length)||"0")],r);o.push(...l)}function kk(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var s;return(s=t.children)==null?void 0:s.some(i=>kk(n,i))}):!1}async function _5(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let s=n[e.id];pn(s,"No route found in manifest");let i={};for(let o in r){let l=s[o]!==void 0&&o!=="hasErrorBoundary";td(!l,'Route "'+s.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!g5.has(o)&&(i[o]=r[o])}Object.assign(s,i),Object.assign(s,Zn({},t(s),{lazy:void 0}))}async function U5(e){let{matches:t}=e,n=t.filter(s=>s.shouldLoad);return(await Promise.all(n.map(s=>s.resolve()))).reduce((s,i,o)=>Object.assign(s,{[n[o].route.id]:i}),{})}async function j5(e,t,n,r,s,i,o,a,l,c){let u=i.map(m=>m.route.lazy?_5(m.route,l,a):void 0),h=i.map((m,C)=>{let v=u[C],b=s.some(S=>S.route.id===m.route.id);return Zn({},m,{shouldLoad:b,resolve:async S=>(S&&r.method==="GET"&&(m.route.lazy||m.route.loader)&&(b=!0),b?K5(t,r,m,v,S,c):Promise.resolve({type:Dn.data,result:void 0}))})}),g=await e({matches:h,request:r,params:i[0].params,fetcherKey:o,context:c});try{await Promise.all(u)}catch{}return g}async function K5(e,t,n,r,s,i){let o,a,l=c=>{let u,h=new Promise((C,v)=>u=v);a=()=>u(),t.signal.addEventListener("abort",a);let g=C=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):c({request:t,params:n.params,context:i},...C!==void 0?[C]:[]),m=(async()=>{try{return{type:"data",result:await(s?s(v=>g(v)):g())}}catch(C){return{type:"error",result:C}}})();return Promise.race([m,h])};try{let c=n.route[e];if(r)if(c){let u,[h]=await Promise.all([l(c).catch(g=>{u=g}),r]);if(u!==void 0)throw u;o=h}else if(await r,c=n.route[e],c)o=await l(c);else if(e==="action"){let u=new URL(t.url),h=u.pathname+u.search;throw $s(405,{method:t.method,pathname:h,routeId:n.route.id})}else return{type:Dn.data,result:void 0};else if(c)o=await l(c);else{let u=new URL(t.url),h=u.pathname+u.search;throw $s(404,{pathname:h})}pn(o.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:Dn.error,result:c}}finally{a&&t.signal.removeEventListener("abort",a)}return o}async function q5(e){let{result:t,type:n}=e;if(Bk(t)){let h;try{let g=t.headers.get("Content-Type");g&&/\bapplication\/json\b/.test(g)?t.body==null?h=null:h=await t.json():h=await t.text()}catch(g){return{type:Dn.error,error:g}}return n===Dn.error?{type:Dn.error,error:new Qm(t.status,t.statusText,h),statusCode:t.status,headers:t.headers}:{type:Dn.data,data:h,statusCode:t.status,headers:t.headers}}if(n===Dn.error){if(rD(t)){var r,s;if(t.data instanceof Error){var i,o;return{type:Dn.error,error:t.data,statusCode:(i=t.init)==null?void 0:i.status,headers:(o=t.init)!=null&&o.headers?new Headers(t.init.headers):void 0}}return{type:Dn.error,error:new Qm(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:Sp(t)?t.status:void 0,headers:(s=t.init)!=null&&s.headers?new Headers(t.init.headers):void 0}}return{type:Dn.error,error:t,statusCode:Sp(t)?t.status:void 0}}if(J5(t)){var a,l;return{type:Dn.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((l=t.init)==null?void 0:l.headers)&&new Headers(t.init.headers)}}if(rD(t)){var c,u;return{type:Dn.data,data:t.data,statusCode:(c=t.init)==null?void 0:c.status,headers:(u=t.init)!=null&&u.headers?new Headers(t.init.headers):void 0}}return{type:Dn.data,data:t}}function X5(e,t,n,r,s,i){let o=e.headers.get("Location");if(pn(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!bE.test(o)){let a=r.slice(0,r.findIndex(l=>l.route.id===n)+1);o=XS(new URL(t.url),a,s,!0,o,i),e.headers.set("Location",o)}return e}function QI(e,t,n){if(bE.test(e)){let r=e,s=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=wd(s.pathname,n)!=null;if(s.origin===t.origin&&i)return s.pathname+s.search+s.hash}return e}function wu(e,t,n,r){let s=e.createURL(Nk(t)).toString(),i={signal:n};if(r&&Ui(r.formMethod)){let{formMethod:o,formEncType:a}=r;i.method=o.toUpperCase(),a==="application/json"?(i.headers=new Headers({"Content-Type":a}),i.body=JSON.stringify(r.json)):a==="text/plain"?i.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?i.body=QS(r.formData):i.body=r.formData}return new Request(s,i)}function QS(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function ZI(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Y5(e,t,n,r,s){let i={},o=null,a,l=!1,c={},u=n&&oi(n[1])?n[1].error:void 0;return e.forEach(h=>{if(!(h.route.id in t))return;let g=h.route.id,m=t[g];if(pn(!cc(m),"Cannot handle redirect results in processLoaderData"),oi(m)){let C=m.error;u!==void 0&&(C=u,u=void 0),o=o||{};{let v=sc(e,g);o[v.route.id]==null&&(o[v.route.id]=C)}i[g]=void 0,l||(l=!0,a=Sp(m.error)?m.error.status:500),m.headers&&(c[g]=m.headers)}else al(m)?(r.set(g,m.deferredData),i[g]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!l&&(a=m.statusCode),m.headers&&(c[g]=m.headers)):(i[g]=m.data,m.statusCode&&m.statusCode!==200&&!l&&(a=m.statusCode),m.headers&&(c[g]=m.headers))}),u!==void 0&&n&&(o={[n[0]]:u},i[n[0]]=void 0),{loaderData:i,errors:o,statusCode:a||200,loaderHeaders:c}}function JI(e,t,n,r,s,i,o){let{loaderData:a,errors:l}=Y5(t,n,r,o);return s.forEach(c=>{let{key:u,match:h,controller:g}=c,m=i[u];if(pn(m,"Did not find corresponding fetcher result"),!(g&&g.signal.aborted))if(oi(m)){let C=sc(e.matches,h==null?void 0:h.route.id);l&&l[C.route.id]||(l=Zn({},l,{[C.route.id]:m.error})),e.fetchers.delete(u)}else if(cc(m))pn(!1,"Unhandled fetcher revalidation redirect");else if(al(m))pn(!1,"Unhandled fetcher deferred data");else{let C=ja(m.data);e.fetchers.set(u,C)}}),{loaderData:a,errors:l}}function eD(e,t,n,r){let s=Zn({},t);for(let i of n){let o=i.route.id;if(t.hasOwnProperty(o)?t[o]!==void 0&&(s[o]=t[o]):e[o]!==void 0&&i.route.loader&&(s[o]=e[o]),r&&r.hasOwnProperty(o))break}return s}function tD(e){return e?oi(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function sc(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function nD(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function $s(e,t){let{pathname:n,routeId:r,method:s,type:i,message:o}=t===void 0?{}:t,a="Unknown Server Error",l="Unknown @remix-run/router error";return e===400?(a="Bad Request",s&&n&&r?l="You made a "+s+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):e===403?(a="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",l='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",s&&n&&r?l="You made a "+s.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":s&&(l='Invalid request method "'+s.toUpperCase()+'"')),new Qm(e||500,a,new Error(l),!0)}function $f(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,s]=t[n];if(cc(s))return{key:r,result:s}}}function Nk(e){let t=typeof e=="string"?Ml(e):e;return Fc(Zn({},t,{hash:""}))}function Q5(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Z5(e){return Bk(e.result)&&B5.has(e.result.status)}function al(e){return e.type===Dn.deferred}function oi(e){return e.type===Dn.error}function cc(e){return(e&&e.type)===Dn.redirect}function rD(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function J5(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Bk(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function e6(e){return N5.has(e.toLowerCase())}function Ui(e){return O5.has(e.toLowerCase())}async function t6(e,t,n,r,s){let i=Object.entries(t);for(let o=0;o(g==null?void 0:g.route.id)===a);if(!c)continue;let u=r.find(g=>g.route.id===c.route.id),h=u!=null&&!Ok(u,c)&&(s&&s[c.route.id])!==void 0;al(l)&&h&&await wE(l,n,!1).then(g=>{g&&(t[a]=g)})}}async function n6(e,t,n){for(let r=0;r(c==null?void 0:c.route.id)===i)&&al(a)&&(pn(o,"Expected an AbortController for revalidating fetcher deferred result"),await wE(a,o.signal,!0).then(c=>{c&&(t[s]=c)}))}}async function wE(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:Dn.data,data:e.deferredData.unwrappedData}}catch(s){return{type:Dn.error,error:s}}return{type:Dn.data,data:e.deferredData.data}}}function SE(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function zh(e,t){let n=typeof t=="string"?Ml(t).search:t.search;if(e[e.length-1].route.index&&SE(n||""))return e[e.length-1];let r=Dk(e);return r[r.length-1]}function sD(e){let{formMethod:t,formAction:n,formEncType:r,text:s,formData:i,json:o}=e;if(!(!t||!n||!r)){if(s!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:s};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function iw(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function r6(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Rh(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function s6(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ja(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function i6(e,t){try{let n=e.sessionStorage.getItem(Lk);if(n){let r=JSON.parse(n);for(let[s,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(s,new Set(i||[]))}}catch{}}function o6(e,t){if(t.size>0){let n={};for(let[r,s]of t)n[r]=[...s];try{e.sessionStorage.setItem(Lk,JSON.stringify(n))}catch(r){td(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Zm(){return Zm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),p.useCallback(function(c,u){if(u===void 0&&(u={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let h=yE(c,JSON.parse(o),i,u.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:na([t,h.pathname])),(u.replace?r.replace:r.push)(h,u.state,u)},[t,r,o,i,e])}const c6=p.createContext(null);function u6(e){let t=p.useContext(Ca).outlet;return t&&p.createElement(c6.Provider,{value:e},t)}function $De(){let{matches:e}=p.useContext(Ca),t=e[e.length-1];return t?t.params:{}}function zk(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=p.useContext(Wc),{matches:s}=p.useContext(Ca),{pathname:i}=Jp(),o=JSON.stringify(vE(s,r.v7_relativeSplatPath));return p.useMemo(()=>yE(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function d6(e,t,n,r){Zp()||pn(!1);let{navigator:s}=p.useContext(Wc),{matches:i}=p.useContext(Ca),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Jp(),u;u=c;let h=u.pathname||"/",g=h;if(l!=="/"){let v=l.replace(/^\//,"").split("/");g="/"+h.replace(/^\//,"").split("/").slice(v.length).join("/")}let m=rc(e,{pathname:g});return m6(m&&m.map(v=>Object.assign({},v,{params:Object.assign({},a,v.params),pathname:na([l,s.encodeLocation?s.encodeLocation(v.pathname).pathname:v.pathname]),pathnameBase:v.pathnameBase==="/"?l:na([l,s.encodeLocation?s.encodeLocation(v.pathnameBase).pathname:v.pathnameBase])})),i,n,r)}function h6(){let e=b6(),t=Sp(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return p.createElement(p.Fragment,null,p.createElement("h2",null,"Unexpected Application Error!"),p.createElement("h3",{style:{fontStyle:"italic"}},t),n?p.createElement("pre",{style:s},n):null,null)}const p6=p.createElement(h6,null);class g6 extends p.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?p.createElement(Ca.Provider,{value:this.props.routeContext},p.createElement(Gk.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function f6(e){let{routeContext:t,match:n,children:r}=e,s=p.useContext(sv);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),p.createElement(Ca.Provider,{value:t},r)}function m6(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let u=o.findIndex(h=>h.route.id&&(a==null?void 0:a[h.route.id])!==void 0);u>=0||pn(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,h,g)=>{let m,C=!1,v=null,b=null;n&&(m=a&&h.route.id?a[h.route.id]:void 0,v=h.route.errorElement||p6,l&&(c<0&&g===0?(S6("route-fallback"),C=!0,b=null):c===g&&(C=!0,b=h.route.hydrateFallbackElement||null)));let w=t.concat(o.slice(0,g+1)),S=()=>{let x;return m?x=v:C?x=b:h.route.Component?x=p.createElement(h.route.Component,null):h.route.element?x=h.route.element:x=u,p.createElement(f6,{match:h,routeContext:{outlet:u,matches:w,isDataRoute:n!=null},children:x})};return n&&(h.route.ErrorBoundary||h.route.errorElement||g===0)?p.createElement(g6,{location:n.location,revalidation:n.revalidation,component:v,error:m,children:S(),routeContext:{outlet:null,matches:w,isDataRoute:!0}}):S()},null)}var Wk=(function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e})(Wk||{}),_k=(function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e})(_k||{});function C6(e){let t=p.useContext(sv);return t||pn(!1),t}function v6(e){let t=p.useContext($k);return t||pn(!1),t}function y6(e){let t=p.useContext(Ca);return t||pn(!1),t}function Uk(e){let t=y6(),n=t.matches[t.matches.length-1];return n.route.id||pn(!1),n.route.id}function b6(){var e;let t=p.useContext(Gk),n=v6(_k.UseRouteError),r=Uk();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function w6(){let{router:e}=C6(Wk.UseNavigateStable),t=Uk(),n=p.useRef(!1);return Vk(()=>{n.current=!0}),p.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Zm({fromRouteId:t},i)))},[e,t])}const iD={};function S6(e,t,n){iD[e]||(iD[e]=!0)}function x6(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function GDe(e){return u6(e.context)}function R6(e){let{basename:t="/",children:n=null,location:r,navigationType:s=fr.Pop,navigator:i,static:o=!1,future:a}=e;Zp()&&pn(!1);let l=t.replace(/^\/*/,"/"),c=p.useMemo(()=>({basename:l,navigator:i,static:o,future:Zm({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=Ml(r));let{pathname:u="/",search:h="",hash:g="",state:m=null,key:C="default"}=r,v=p.useMemo(()=>{let b=wd(u,l);return b==null?null:{location:{pathname:b,search:h,hash:g,state:m,key:C},navigationType:s}},[l,u,h,g,m,C,s]);return v==null?null:p.createElement(Wc.Provider,{value:c},p.createElement(xE.Provider,{children:n,value:v}))}new Promise(()=>{});function E6(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:p.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:p.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:p.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.30.1 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function xp(){return xp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[s]=e[s]);return n}function F6(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function T6(e,t){return e.button===0&&(!t||t==="_self")&&!F6(e)}function ZS(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function M6(e,t){let n=ZS(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const I6=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],D6="6";try{window.__reactRouterVersion=D6}catch{}function VDe(e,t){return H5({basename:void 0,future:xp({},void 0,{v7_prependBasename:!0}),history:d5({window:void 0}),hydrationData:A6(),routes:e,mapRouteProperties:E6,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function A6(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=xp({},t,{errors:L6(t.errors)})),t}function L6(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,s]of t)if(s&&s.__type==="RouteErrorResponse")n[r]=new Qm(s.status,s.statusText,s.data,s.internal===!0);else if(s&&s.__type==="Error"){if(s.__subType){let i=window[s.__subType];if(typeof i=="function")try{let o=new i(s.message);o.stack="",n[r]=o}catch{}}if(n[r]==null){let i=new Error(s.message);i.stack="",n[r]=i}}else n[r]=s;return n}const O6=p.createContext({isTransitioning:!1}),k6=p.createContext(new Map),N6="startTransition",oD=Ek[N6],B6="flushSync",aD=u5[B6];function $6(e){oD?oD(e):e()}function Eh(e){aD?aD(e):e()}class G6{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function HDe(e){let{fallbackElement:t,router:n,future:r}=e,[s,i]=p.useState(n.state),[o,a]=p.useState(),[l,c]=p.useState({isTransitioning:!1}),[u,h]=p.useState(),[g,m]=p.useState(),[C,v]=p.useState(),b=p.useRef(new Map),{v7_startTransition:w}=r||{},S=p.useCallback(I=>{w?$6(I):I()},[w]),x=p.useCallback((I,A)=>{let{deletedFetchers:L,flushSync:D,viewTransitionOpts:N}=A;I.fetchers.forEach((G,$)=>{G.data!==void 0&&b.current.set($,G.data)}),L.forEach(G=>b.current.delete(G));let k=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!N||k){D?Eh(()=>i(I)):S(()=>i(I));return}if(D){Eh(()=>{g&&(u&&u.resolve(),g.skipTransition()),c({isTransitioning:!0,flushSync:!0,currentLocation:N.currentLocation,nextLocation:N.nextLocation})});let G=n.window.document.startViewTransition(()=>{Eh(()=>i(I))});G.finished.finally(()=>{Eh(()=>{h(void 0),m(void 0),a(void 0),c({isTransitioning:!1})})}),Eh(()=>m(G));return}g?(u&&u.resolve(),g.skipTransition(),v({state:I,currentLocation:N.currentLocation,nextLocation:N.nextLocation})):(a(I),c({isTransitioning:!0,flushSync:!1,currentLocation:N.currentLocation,nextLocation:N.nextLocation}))},[n.window,g,u,b,S]);p.useLayoutEffect(()=>n.subscribe(x),[n,x]),p.useEffect(()=>{l.isTransitioning&&!l.flushSync&&h(new G6)},[l]),p.useEffect(()=>{if(u&&o&&n.window){let I=o,A=u.promise,L=n.window.document.startViewTransition(async()=>{S(()=>i(I)),await A});L.finished.finally(()=>{h(void 0),m(void 0),a(void 0),c({isTransitioning:!1})}),m(L)}},[S,o,u,n.window]),p.useEffect(()=>{u&&o&&s.location.key===o.location.key&&u.resolve()},[u,g,s.location,o]),p.useEffect(()=>{!l.isTransitioning&&C&&(a(C.state),c({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),v(void 0))},[l.isTransitioning,C]),p.useEffect(()=>{},[]);let P=p.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:I=>n.navigate(I),push:(I,A,L)=>n.navigate(I,{state:A,preventScrollReset:L==null?void 0:L.preventScrollReset}),replace:(I,A,L)=>n.navigate(I,{replace:!0,state:A,preventScrollReset:L==null?void 0:L.preventScrollReset})}),[n]),F=n.basename||"/",M=p.useMemo(()=>({router:n,navigator:P,static:!1,basename:F}),[n,P,F]),E=p.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return p.useEffect(()=>x6(r,n.future),[r,n.future]),p.createElement(p.Fragment,null,p.createElement(sv.Provider,{value:M},p.createElement($k.Provider,{value:s},p.createElement(k6.Provider,{value:b.current},p.createElement(O6.Provider,{value:l},p.createElement(R6,{basename:F,location:s.location,navigationType:s.historyAction,navigator:P,future:E},s.initialized||n.future.v7_partialHydration?p.createElement(V6,{routes:n.routes,future:n.future,state:s}):t))))),null)}const V6=p.memo(H6);function H6(e){let{routes:t,future:n,state:r}=e;return d6(t,void 0,r,n)}const z6=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",W6=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,zDe=p.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:u,viewTransition:h}=t,g=P6(t,I6),{basename:m}=p.useContext(Wc),C,v=!1;if(typeof c=="string"&&W6.test(c)&&(C=c,z6))try{let x=new URL(window.location.href),P=c.startsWith("//")?new URL(x.protocol+c):new URL(c),F=wd(P.pathname,m);P.origin===x.origin&&F!=null?c=F+P.search+P.hash:v=!0}catch{}let b=a6(c,{relative:s}),w=_6(c,{replace:o,state:a,target:l,preventScrollReset:u,relative:s,viewTransition:h});function S(x){r&&r(x),x.defaultPrevented||w(x)}return p.createElement("a",xp({},g,{href:C||b,onClick:v||i?r:S,ref:n,target:l}))});var lD;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lD||(lD={}));var cD;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(cD||(cD={}));function _6(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=Hk(),c=Jp(),u=zk(e,{relative:o});return p.useCallback(h=>{if(T6(h,n)){h.preventDefault();let g=r!==void 0?r:Fc(c)===Fc(u);l(e,{replace:g,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,u,r,s,n,e,i,o,a])}function WDe(e){let t=p.useRef(ZS(e)),n=p.useRef(!1),r=Jp(),s=p.useMemo(()=>M6(r.search,n.current?null:t.current),[r.search]),i=Hk(),o=p.useCallback((a,l)=>{const c=ZS(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}function Yt(e){const t=p.useRef(e);return t.current=e,p.useCallback((...r)=>{var s;return(s=t.current)==null?void 0:s.call(t,...r)},[])}function bs(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}const uD=bs()?p.useLayoutEffect:p.useEffect,on=(e,t)=>{const n=p.useRef(!0);uD(()=>e(n.current),t),uD(()=>(n.current=!1,()=>{n.current=!0}),[])},U6=(e,t)=>{on(n=>{if(!n)return e()},t)},Jm=e=>{const t=p.useRef(!1),[n,r]=p.useState(e);p.useEffect(()=>(t.current=!1,()=>{t.current=!0}),[]);function s(i,o){o&&t.current||r(i)}return[n,s]};function ir(e,t){const[n,r]=p.useState(e),s=t!==void 0?t:n;return on(i=>{i||r(t)},[t]),[s,r]}var ow={exports:{}},In={};/** * @license React * react-is.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var dD;function j6(){if(dD)return In;dD=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),C;C=Symbol.for("react.module.reference");function v(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case e:switch(b=b.type,b){case n:case s:case r:case c:case u:return b;default:switch(b=b&&b.$$typeof,b){case a:case o:case l:case g:case h:case i:return b;default:return w}}case t:return w}}}return In.ContextConsumer=o,In.ContextProvider=i,In.Element=e,In.ForwardRef=l,In.Fragment=n,In.Lazy=g,In.Memo=h,In.Portal=t,In.Profiler=s,In.StrictMode=r,In.Suspense=c,In.SuspenseList=u,In.isAsyncMode=function(){return!1},In.isConcurrentMode=function(){return!1},In.isContextConsumer=function(b){return v(b)===o},In.isContextProvider=function(b){return v(b)===i},In.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},In.isForwardRef=function(b){return v(b)===l},In.isFragment=function(b){return v(b)===n},In.isLazy=function(b){return v(b)===g},In.isMemo=function(b){return v(b)===h},In.isPortal=function(b){return v(b)===t},In.isProfiler=function(b){return v(b)===s},In.isStrictMode=function(b){return v(b)===r},In.isSuspense=function(b){return v(b)===c},In.isSuspenseList=function(b){return v(b)===u},In.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===n||b===s||b===r||b===c||b===u||b===m||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===h||b.$$typeof===i||b.$$typeof===o||b.$$typeof===l||b.$$typeof===C||b.getModuleId!==void 0)},In.typeOf=v,In}var hD;function K6(){return hD||(hD=1,ow.exports=j6()),ow.exports}var aw=K6();function _c(e,t,n){const r=p.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}const q6=Symbol.for("react.element"),X6=Symbol.for("react.transitional.element"),Y6=Symbol.for("react.fragment");function jk(e){return e&&typeof e=="object"&&(e.$$typeof===q6||e.$$typeof===X6)&&e.type===Y6}const Q6=Number(p.version.split(".")[0]),JS=(e,t)=>{typeof e=="function"?e(t):typeof e=="object"&&e&&"current"in e&&(e.current=t)},xs=(...e)=>{const t=e.filter(Boolean);return t.length<=1?t[0]:n=>{e.forEach(r=>{JS(r,n)})}},va=(...e)=>_c(()=>xs(...e),e,(t,n)=>t.length!==n.length||t.every((r,s)=>r!==n[s])),ca=e=>{var n,r;if(!e)return!1;if(RE(e)&&Q6>=19)return!0;const t=aw.isMemo(e)?e.type.type:e.type;return!(typeof t=="function"&&!((n=t.prototype)!=null&&n.render)&&t.$$typeof!==aw.ForwardRef||typeof e=="function"&&!((r=e.prototype)!=null&&r.render)&&e.$$typeof!==aw.ForwardRef)};function RE(e){return p.isValidElement(e)&&!jk(e)}const Z6=e=>RE(e)&&ca(e),Il=e=>{if(e&&RE(e)){const t=e;return t.props.propertyIsEnumerable("ref")?t.props.ref:t.ref}return null};function Gs(e,t){let n=e;for(let r=0;r"u"?Object.keys:Reflect.ownKeys;function qk(e,t={}){const{prepareArray:n}=t,r=n||(()=>[]);let s=pD(e[0]);return e.forEach(i=>{function o(a,l){const c=new Set(l),u=Gs(i,a),h=Array.isArray(u);if(h||J6(u)){if(!c.has(u)){c.add(u);const g=Gs(s,a);h?s=Si(s,a,r(g,u)):(!g||typeof g!="object")&&(s=Si(s,a,pD(u))),eU(u).forEach(m=>{Object.getOwnPropertyDescriptor(u,m).enumerable&&o([...a,m],c)})}}else s=Si(s,a,u)}o([])}),s}function $u(...e){return qk(e)}let ex={};const tU=e=>{};function nU(e,t){}function rU(e,t){}function sU(){ex={}}function Xk(e,t,n){!t&&!ex[n]&&(e(!1,n),ex[n]=!0)}function Jn(e,t){Xk(nU,e,t)}function iU(e,t){Xk(rU,e,t)}Jn.preMessage=tU;Jn.resetWarned=sU;Jn.noteOnce=iU;function Vn(e,t){const n=Object.assign({},e);return Array.isArray(t)&&t.forEach(r=>{delete n[r]}),n}function Tr(e,t={}){let n=[];return K.Children.forEach(e,r=>{r==null&&!t.keepEmpty||(Array.isArray(r)?n=n.concat(Tr(r)):jk(r)&&r.props?n=n.concat(Tr(r.props.children,t)):n.push(r))}),n}function oU(){}const aU=p.createContext({}),Sd=()=>{const e=()=>{};return e.deprecated=oU,e};function nd(e){return e instanceof HTMLElement||e instanceof SVGElement}function ua(e){return e&&typeof e=="object"&&nd(e.nativeElement)?e.nativeElement:nd(e)?e:null}const tx=p.createContext(null);function lU({children:e,onBatchResize:t}){const n=p.useRef(0),r=p.useRef([]),s=p.useContext(tx),i=p.useCallback((o,a,l)=>{n.current+=1;const c=n.current;r.current.push({size:o,element:a,data:l}),Promise.resolve().then(()=>{c===n.current&&(t==null||t(r.current),r.current=[])}),s==null||s(o,a,l)},[t,s]);return p.createElement(tx.Provider,{value:i},e)}const ll=new Map;function cU(e){e.forEach(t=>{var r;const{target:n}=t;(r=ll.get(n))==null||r.forEach(s=>s(n))})}let lw;function Yk(){return lw||(lw=new ResizeObserver(cU)),lw}function uU(e,t){ll.has(e)||(ll.set(e,new Set),Yk().observe(e)),ll.get(e).add(t)}function dU(e,t){ll.has(e)&&(ll.get(e).delete(t),ll.get(e).size||(Yk().unobserve(e),ll.delete(e)))}function Qk(e,t,n,r){const s=p.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),i=Yt(a=>{const{width:l,height:c}=a.getBoundingClientRect(),{offsetWidth:u,offsetHeight:h}=a,g=Math.floor(l),m=Math.floor(c);if(s.current.width!==g||s.current.height!==m||s.current.offsetWidth!==u||s.current.offsetHeight!==h){const C={width:g,height:m,offsetWidth:u,offsetHeight:h};s.current=C;const v=u===Math.round(l)?l:u,b=h===Math.round(c)?c:h,w={...C,offsetWidth:v,offsetHeight:b};r==null||r(w,a),Promise.resolve().then(()=>{n==null||n(w,a)})}}),o=typeof t=="function";p.useEffect(()=>{const a=o?t():t;return a&&e&&uU(a,i),()=>{a&&dU(a,i)}},[e,o?0:t])}function hU(e,t){const{children:n,disabled:r,onResize:s,data:i}=e,o=p.useRef(null),a=p.useContext(tx),l=typeof n=="function",c=l?n(o):n,u=!l&&p.isValidElement(c)&&ca(c),h=u?Il(c):null,g=va(h,o),m=()=>ua(o.current);return p.useImperativeHandle(t,()=>m()),Qk(!r,m,s,(C,v)=>{a==null||a(C,v,i)}),u?p.cloneElement(c,{ref:g}):c}const pU=p.forwardRef(hU);function nx(){return nx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const o=(s==null?void 0:s.key)||`${gU}-${i}`;return p.createElement(pU,nx({},e,{key:o,ref:i===0?t:void 0}),s)})}const Vs=p.forwardRef(fU);Vs.Collection=lU;function Zk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;te.length)&&(t=e.length);for(var n=0,r=Array(t);n+setTimeout(e,16),tN=e=>clearTimeout(e);typeof window<"u"&&"requestAnimationFrame"in window&&(eN=e=>window.requestAnimationFrame(e),tN=e=>window.cancelAnimationFrame(e));let gD=0;const EE=new Map;function nN(e){EE.delete(e)}const dn=(e,t=1)=>{gD+=1;const n=gD;function r(s){if(s===0)nN(n),e();else{const i=eN(()=>{r(s-1)});EE.set(n,i)}}return r(t),n};dn.cancel=e=>{const t=EE.get(e);return nN(e),tN(t)};const Rp="ant",iv="anticon",yU=["outlined","borderless","filled","underlined"],bU=(e,t)=>t||(e?`${Rp}-${e}`:Rp),Kt=p.createContext({getPrefixCls:bU,iconPrefixCls:iv}),{Consumer:_De}=Kt,fD={};function Hn(e){const t=p.useContext(Kt),{getPrefixCls:n,direction:r,getPopupContainer:s,renderEmpty:i}=t,o=t[e];return{classNames:fD,styles:fD,...o,getPrefixCls:n,direction:r,getPopupContainer:s,renderEmpty:i}}function Ep(e){for(var t=0,n,r=0,s=e.length;s>=4;++r,s-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(s){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function sx(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let n=t;for(;n;){if(n===e)return!0;n=n.parentNode}return!1}const mD="data-rc-order",CD="data-rc-priority",wU="rc-util-key",ix=new Map;function rN({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:wU}function ov(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function SU(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function PE(e){return Array.from((ix.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function sN(e,t={}){if(!bs())return null;const{csp:n,prepend:r,priority:s=0}=t,i=SU(r),o=i==="prependQueue",a=document.createElement("style");a.setAttribute(mD,i),o&&s&&a.setAttribute(CD,`${s}`),n!=null&&n.nonce&&(a.nonce=n==null?void 0:n.nonce),a.innerHTML=e;const l=ov(t),{firstChild:c}=l;if(r){if(o){const u=(t.styles||PE(l)).filter(h=>{if(!["prepend","prependQueue"].includes(h.getAttribute(mD)))return!1;const g=Number(h.getAttribute(CD)||0);return s>=g});if(u.length)return l.insertBefore(a,u[u.length-1].nextSibling),a}l.insertBefore(a,c)}else l.appendChild(a);return a}function iN(e,t={}){let{styles:n}=t;return n||(n=PE(ov(t))),n.find(r=>r.getAttribute(rN(t))===e)}function Pp(e,t={}){const n=iN(e,t);n&&ov(t).removeChild(n)}function xU(e,t){const n=ix.get(e);if(!n||!sx(document,n)){const r=sN("",t),{parentNode:s}=r;ix.set(e,s),e.removeChild(r)}}function pl(e,t,n={}){var l,c,u;const r=ov(n),s=PE(r),i={...n,styles:s};xU(r,i);const o=iN(t,i);if(o)return(l=i.csp)!=null&&l.nonce&&o.nonce!==((c=i.csp)==null?void 0:c.nonce)&&(o.nonce=(u=i.csp)==null?void 0:u.nonce),o.innerHTML!==e&&(o.innerHTML=e),o;const a=sN(e,i);return a.setAttribute(rN(i),t),a}function no(e,t,n=!1){const r=new Set;function s(i,o,a=1){const l=r.has(i);if(Jn(!l,"Warning: There may be circular references"),l)return!1;if(i===o)return!0;if(n&&a>1)return!1;r.add(i);const c=a+1;if(Array.isArray(i)){if(!Array.isArray(o)||i.length!==o.length)return!1;for(let u=0;us(i[h],o[h],c))}return!1}return s(e,t)}const RU="%";function ox(e){return e.join(RU)}let vD=0;class EU{constructor(t){Fe(this,"instanceId");Fe(this,"cache",new Map);Fe(this,"updateTimes",new Map);Fe(this,"extracted",new Set);this.instanceId=t}get(t){return this.opGet(ox(t))}opGet(t){return this.cache.get(t)||null}update(t,n){return this.opUpdate(ox(t),n)}opUpdate(t,n){const r=this.cache.get(t),s=n(r);s===null?(this.cache.delete(t),this.updateTimes.delete(t)):(this.cache.set(t,s),this.updateTimes.set(t,vD),vD+=1)}}const FE="data-token-hash",ra="data-css-hash",Qo="__cssinjs_instance__";function PU(){const e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){const t=document.body.querySelectorAll(`style[${ra}]`)||[],{firstChild:n}=document.head;Array.from(t).forEach(s=>{s[Qo]||(s[Qo]=e),s[Qo]===e&&document.head.insertBefore(s,n)});const r={};Array.from(document.querySelectorAll(`style[${ra}]`)).forEach(s=>{var o;const i=s.getAttribute(ra);r[i]?s[Qo]===e&&((o=s.parentNode)==null||o.removeChild(s)):r[i]=!0})}return new EU(e)}const eg=p.createContext({hashPriority:"low",cache:PU(),defaultCache:!0,autoPrefix:!1});function FU(e,t){if(e.length!==t.length)return!1;for(let n=0;n{var i;r?r=(i=r==null?void 0:r.map)==null?void 0:i.get(s):r=void 0}),r!=null&&r.value&&n&&(r.value[1]=this.cacheCallTimes++),r==null?void 0:r.value}get(t){var n;return(n=this.internalGet(t,!0))==null?void 0:n[0]}has(t){return!!this.internalGet(t)}set(t,n){if(!this.has(t)){if(this.size()+1>_u.MAX_CACHE_SIZE+_u.MAX_CACHE_OFFSET){const[s]=this.keys.reduce((i,o)=>{const[,a]=i;return this.internalGet(o)[1]{if(i===t.length-1)r.set(s,{value:[n,this.cacheCallTimes++]});else{const o=r.get(s);o?o.map||(o.map=new Map):r.set(s,{map:new Map}),r=r.get(s).map}})}deleteByPath(t,n){var i;const r=t.get(n[0]);if(n.length===1)return r.map?t.set(n[0],{map:r.map}):t.delete(n[0]),(i=r.value)==null?void 0:i[0];const s=this.deleteByPath(r.map,n.slice(1));return(!r.map||r.map.size===0)&&!r.value&&t.delete(n[0]),s}delete(t){if(this.has(t))return this.keys=this.keys.filter(n=>!FU(n,t)),this.deleteByPath(this.cache,t)}};Fe(_u,"MAX_CACHE_SIZE",20),Fe(_u,"MAX_CACHE_OFFSET",5);let ax=_u,yD=0;class oN{constructor(t){Fe(this,"derivatives");Fe(this,"id");this.derivatives=Array.isArray(t)?t:[t],this.id=yD,t.length===0&&(t.length>0,void 0),yD+=1}getDerivativeToken(t){return this.derivatives.reduce((n,r)=>r(t,n),void 0)}}const cw=new ax;function lx(e){const t=Array.isArray(e)?e:[e];return cw.has(t)||cw.set(t,new oN(t)),cw.get(t)}const TU=new WeakMap,uw={};function MU(e,t){let n=TU;for(let r=0;r{const r=e[n];t+=n,r instanceof oN?t+=r.id:r&&typeof r=="object"?t+=Zh(r):t+=r}),t=Ep(t),bD.set(e,t)),t}function IU(e,t){return Ep(`${t}_${Zh(e)}`)}const cx=bs();function he(e){return typeof e=="number"?`${e}px`:e}function aN(e){const{hashCls:t,hashPriority:n="low"}=e||{};if(!t)return"";const r=`.${t}`;return n==="low"?`:where(${r})`:r}const DU=e=>e!=null,Rm=(e,t="")=>`--${t?`${t}-`:""}${e}`.replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase(),AU=(e,t,n)=>{const{hashCls:r,hashPriority:s="low",scope:i}=n||{};if(!Object.keys(e).length)return"";const o=`${aN({hashCls:r,hashPriority:s})}.${t}`,a=[i].flat().filter(Boolean);return`${a.length?a.map(c=>`${o}.${c}`).join(", "):o}{${Object.entries(e).map(([c,u])=>`${c}:${u};`).join("")}}`},lN=(e,t,n)=>{const{hashCls:r,hashPriority:s="low",prefix:i,unitless:o,ignore:a,preserve:l}=n||{},c={},u={};return Object.entries(e).forEach(([h,g])=>{if(l!=null&&l[h])u[h]=g;else if((typeof g=="string"||typeof g=="number")&&!(a!=null&&a[h])){const m=Rm(h,i);c[m]=typeof g=="number"&&!(o!=null&&o[h])?`${g}px`:String(g),u[h]=`var(${m})`}}),[u,AU(c,t,{scope:n==null?void 0:n.scope,hashCls:r,hashPriority:s})]},Gf=new Map;function TE(e,t,n,r,s){const{cache:i}=p.useContext(eg),o=[e,...t],a=ox(o),l=h=>{i.opUpdate(a,g=>{const[m=0,C]=g||[void 0,void 0],b=C||n(),w=[m,b];return h?h(w):w})};p.useMemo(()=>{l()},[a]);const u=i.opGet(a)[1];return p.useInsertionEffect(()=>(l(([h,g])=>[h+1,g]),Gf.has(a)||(s==null||s(u),Gf.set(a,!0),Promise.resolve().then(()=>{Gf.delete(a)})),()=>{i.opUpdate(a,h=>{const[g=0,m]=h||[];return g-1===0?(r==null||r(m,!1),Gf.delete(a),null):[g-1,m]})}),[a]),u}const LU={},OU="css",ic=new Map;function kU(e){ic.set(e,(ic.get(e)||0)+1)}function NU(e,t){typeof document<"u"&&document.querySelectorAll(`style[${FE}="${e}"]`).forEach(r=>{var s;r[Qo]===t&&((s=r.parentNode)==null||s.removeChild(r))})}const BU=-1;function $U(e,t){ic.set(e,(ic.get(e)||0)-1);const n=new Set;ic.forEach((r,s)=>{r<=0&&n.add(s)}),ic.size-n.size>BU&&n.forEach(r=>{NU(r,t),ic.delete(r)})}const GU=(e,t,n,r)=>{let i={...n.getDerivativeToken(e),...t};return r&&(i=r(i)),i},VU="token";function HU(e,t,n){const{cache:{instanceId:r},container:s,hashPriority:i}=p.useContext(eg),{salt:o="",override:a=LU,formatToken:l,getComputedToken:c,cssVar:u}=n,h=MU(()=>Object.assign({},...t),t),g=Zh(h),m=Zh(a),C=Zh(u);return TE(VU,[o,e.id,g,m,C],()=>{const b=c?c(h,a,e):GU(h,a,e,l),w={...b},S=`${o}_${u.prefix}`,x=Ep(S),P=`${OU}-${x}`;w._tokenKey=IU(w,S);const[F,M]=lN(b,u.key,{prefix:u.prefix,ignore:u.ignore,unitless:u.unitless,preserve:u.preserve,hashPriority:i,hashCls:u.hashed?P:void 0});return F._hashId=x,kU(u.key),[F,P,w,M,u.key]},([,,,,b])=>{$U(b,r)},([,,,b,w])=>{if(!b)return;const S=pl(b,Ep(`css-var-${w}`),{mark:ra,prepend:"queue",attachTo:s,priority:-999});S[Qo]=r,S.setAttribute(FE,w)})}var zU={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},_n="-ms-",Jh="-moz-",Fn="-webkit-",cN="comm",ME="rule",IE="decl",WU="@import",_U="@namespace",uN="@keyframes",UU="@layer",dN=Math.abs,DE=String.fromCharCode,ux=Object.assign;function jU(e,t){return Pr(e,0)^45?(((t<<2^Pr(e,0))<<2^Pr(e,1))<<2^Pr(e,2))<<2^Pr(e,3):0}function hN(e){return e.trim()}function qo(e,t){return(e=t.exec(e))?e[0]:e}function an(e,t,n){return e.replace(t,n)}function Em(e,t,n){return e.indexOf(t,n)}function Pr(e,t){return e.charCodeAt(t)|0}function Tc(e,t,n){return e.slice(t,n)}function ji(e){return e.length}function pN(e){return e.length}function Wh(e,t){return t.push(e),e}function KU(e,t){return e.map(t).join("")}function wD(e,t){return e.filter(function(n){return!qo(n,t)})}var av=1,rd=1,gN=0,Ii=0,vr=0,xd="";function lv(e,t,n,r,s,i,o,a){return{value:e,root:t,parent:n,type:r,props:s,children:i,line:av,column:rd,length:o,return:"",siblings:a}}function Ka(e,t){return ux(lv("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Su(e){for(;e.root;)e=Ka(e.root,{children:[e]});Wh(e,e.siblings)}function qU(){return vr}function XU(){return vr=Ii>0?Pr(xd,--Ii):0,rd--,vr===10&&(rd=1,av--),vr}function Qi(){return vr=Ii2||Fp(vr)>3?"":" "}function JU(e,t){for(;--t&&Qi()&&!(vr<48||vr>102||vr>57&&vr<65||vr>70&&vr<97););return cv(e,Pm()+(t<6&&cl()==32&&Qi()==32))}function dx(e){for(;Qi();)switch(vr){case e:return Ii;case 34:case 39:e!==34&&e!==39&&dx(vr);break;case 40:e===41&&dx(e);break;case 92:Qi();break}return Ii}function ej(e,t){for(;Qi()&&e+vr!==57;)if(e+vr===84&&cl()===47)break;return"/*"+cv(t,Ii-1)+"*"+DE(e===47?e:Qi())}function tj(e){for(;!Fp(cl());)Qi();return cv(e,Ii)}function SD(e){return QU(Fm("",null,null,null,[""],e=YU(e),0,[0],e))}function Fm(e,t,n,r,s,i,o,a,l){for(var c=0,u=0,h=o,g=0,m=0,C=0,v=1,b=1,w=1,S=0,x="",P=s,F=i,M=r,E=x;b;)switch(C=S,S=Qi()){case 40:if(C!=108&&Pr(E,h-1)==58){Em(E+=an(dw(S),"&","&\f"),"&\f",dN(c?a[c-1]:0))!=-1&&(w=-1);break}case 34:case 39:case 91:E+=dw(S);break;case 9:case 10:case 13:case 32:E+=ZU(C);break;case 92:E+=JU(Pm()-1,7);continue;case 47:switch(cl()){case 42:case 47:Wh(nj(ej(Qi(),Pm()),t,n,l),l),(Fp(C||1)==5||Fp(cl()||1)==5)&&ji(E)&&Tc(E,-1,void 0)!==" "&&(E+=" ");break;default:E+="/"}break;case 123*v:a[c++]=ji(E)*w;case 125*v:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+u:w==-1&&(E=an(E,/\f/g,"")),m>0&&(ji(E)-h||v===0&&C===47)&&Wh(m>32?RD(E+";",r,n,h-1,l):RD(an(E," ","")+";",r,n,h-2,l),l);break;case 59:E+=";";default:if(Wh(M=xD(E,t,n,c,u,s,a,x,P=[],F=[],h,i),i),S===123)if(u===0)Fm(E,t,M,M,P,i,h,a,F);else{switch(g){case 99:if(Pr(E,3)===110)break;case 108:if(Pr(E,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Fm(e,M,M,r&&Wh(xD(e,M,M,0,0,s,a,x,s,P=[],h,F),F),s,F,h,a,r?P:F):Fm(E,M,M,M,[""],F,0,a,F)}}c=u=m=0,v=w=1,x=E="",h=o;break;case 58:h=1+ji(E),m=C;default:if(v<1){if(S==123)--v;else if(S==125&&v++==0&&XU()==125)continue}switch(E+=DE(S),S*v){case 38:w=u>0?1:(E+="\f",-1);break;case 44:a[c++]=(ji(E)-1)*w,w=1;break;case 64:cl()===45&&(E+=dw(Qi())),g=cl(),u=h=ji(x=E+=tj(Pm())),S++;break;case 45:C===45&&ji(E)==2&&(v=0)}}return i}function xD(e,t,n,r,s,i,o,a,l,c,u,h){for(var g=s-1,m=s===0?i:[""],C=pN(m),v=0,b=0,w=0;v0?m[S]+" "+x:an(x,/&\f/g,m[S])))&&(l[w++]=P);return lv(e,t,n,s===0?ME:a,l,c,u,h)}function nj(e,t,n,r){return lv(e,t,n,cN,DE(qU()),Tc(e,2,-2),0,r)}function RD(e,t,n,r,s){return lv(e,t,n,IE,Tc(e,0,r),Tc(e,r+1,-1),r,s)}function fN(e,t,n){switch(jU(e,t)){case 5103:return Fn+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:case 6391:case 5879:case 5623:case 6135:case 4599:return Fn+e+e;case 4855:return Fn+e.replace("add","source-over").replace("substract","source-out").replace("intersect","source-in").replace("exclude","xor")+e;case 4789:return Jh+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Fn+e+Jh+e+_n+e+e;case 5936:switch(Pr(e,t+11)){case 114:return Fn+e+_n+an(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Fn+e+_n+an(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Fn+e+_n+an(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return Fn+e+_n+e+e;case 6165:return Fn+e+_n+"flex-"+e+e;case 5187:return Fn+e+an(e,/(\w+).+(:[^]+)/,Fn+"box-$1$2"+_n+"flex-$1$2")+e;case 5443:return Fn+e+_n+"flex-item-"+an(e,/flex-|-self/g,"")+(qo(e,/flex-|baseline/)?"":_n+"grid-row-"+an(e,/flex-|-self/g,""))+e;case 4675:return Fn+e+_n+"flex-line-pack"+an(e,/align-content|flex-|-self/g,"")+e;case 5548:return Fn+e+_n+an(e,"shrink","negative")+e;case 5292:return Fn+e+_n+an(e,"basis","preferred-size")+e;case 6060:return Fn+"box-"+an(e,"-grow","")+Fn+e+_n+an(e,"grow","positive")+e;case 4554:return Fn+an(e,/([^-])(transform)/g,"$1"+Fn+"$2")+e;case 6187:return an(an(an(e,/(zoom-|grab)/,Fn+"$1"),/(image-set)/,Fn+"$1"),e,"")+e;case 5495:case 3959:return an(e,/(image-set\([^]*)/,Fn+"$1$`$1");case 4968:return an(an(e,/(.+:)(flex-)?(.*)/,Fn+"box-pack:$3"+_n+"flex-pack:$3"),/space-between/,"justify")+Fn+e+e;case 4200:if(!qo(e,/flex-|baseline/))return _n+"grid-column-align"+Tc(e,t)+e;break;case 2592:case 3360:return _n+an(e,"template-","")+e;case 4384:case 3616:return n&&n.some(function(r,s){return t=s,qo(r.props,/grid-\w+-end/)})?~Em(e+(n=n[t].value),"span",0)?e:_n+an(e,"-start","")+e+_n+"grid-row-span:"+(~Em(n,"span",0)?qo(n,/\d+/):+qo(n,/\d+/)-+qo(e,/\d+/))+";":_n+an(e,"-start","")+e;case 4896:case 4128:return n&&n.some(function(r){return qo(r.props,/grid-\w+-start/)})?e:_n+an(an(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return an(e,/(.+)-inline(.+)/,Fn+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(ji(e)-1-t>6)switch(Pr(e,t+1)){case 109:if(Pr(e,t+4)!==45)break;case 102:return an(e,/(.+:)(.+)-([^]+)/,"$1"+Fn+"$2-$3$1"+Jh+(Pr(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Em(e,"stretch",0)?fN(an(e,"stretch","fill-available"),t,n)+e:e}break;case 5152:case 5920:return an(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(r,s,i,o,a,l,c){return _n+s+":"+i+c+(o?_n+s+"-span:"+(a?l:+l-+i)+c:"")+e});case 4949:if(Pr(e,t+6)===121)return an(e,":",":"+Fn)+e;break;case 6444:switch(Pr(e,Pr(e,14)===45?18:11)){case 120:return an(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+Fn+(Pr(e,14)===45?"inline-":"")+"box$3$1"+Fn+"$2$3$1"+_n+"$2box$3")+e;case 100:return an(e,":",":"+_n)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return an(e,"scroll-","scroll-snap-")+e}return e}function Tp(e,t){for(var n="",r=0;r-1&&!e.return)switch(e.type){case IE:e.return=fN(e.value,e.length,n);return;case uN:return Tp([Ka(e,{value:an(e.value,"@","@"+Fn)})],r);case ME:if(e.length)return KU(n=e.props,function(s){switch(qo(s,r=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Su(Ka(e,{props:[an(s,/:(read-\w+)/,":"+Jh+"$1")]})),Su(Ka(e,{props:[s]})),ux(e,{props:wD(n,r)});break;case"::placeholder":Su(Ka(e,{props:[an(s,/:(plac\w+)/,":"+Fn+"input-$1")]})),Su(Ka(e,{props:[an(s,/:(plac\w+)/,":"+Jh+"$1")]})),Su(Ka(e,{props:[an(s,/:(plac\w+)/,_n+"input-$1")]})),Su(Ka(e,{props:[s]})),ux(e,{props:wD(n,r)});break}return""})}}const PD="data-ant-cssinjs-cache-path",mN="_FILE_STYLE__";let vc,CN=!0;function ij(){var e;if(!vc&&(vc={},bs())){const t=document.createElement("div");t.className=PD,t.style.position="fixed",t.style.visibility="hidden",t.style.top="-9999px",document.body.appendChild(t);let n=getComputedStyle(t).content||"";n=n.replace(/^"/,"").replace(/"$/,""),n.split(";").forEach(s=>{const[i,o]=s.split(":");vc[i]=o});const r=document.querySelector(`style[${PD}]`);r&&(CN=!1,(e=r.parentNode)==null||e.removeChild(r)),document.body.removeChild(t)}}function oj(e){return ij(),!!vc[e]}function aj(e){const t=vc[e];let n=null;if(t&&bs())if(CN)n=mN;else{const r=document.querySelector(`style[${ra}="${vc[e]}"]`);r?n=r.innerHTML:delete vc[e]}return[n,t]}const lj="_skip_check_",vN="_multi_value_";function hw(e,t){return(t?Tp(SD(e),rj([sj,ED])):Tp(SD(e),ED)).replace(/\{%%%\:[^;];}/g,";")}function cj(e){return typeof e=="object"&&e&&(lj in e||vN in e)}function FD(e,t,n="high"){if(!t)return e;const r=aN({hashCls:t,hashPriority:n});return e.split(",").map(i=>{var c;const o=i.trim().split(/\s+/);let a=o[0]||"";const l=((c=a.match(/^\w+/))==null?void 0:c[0])||"";return a=`${l}${r}${a.slice(l.length)}`,[a,...o.slice(1)].join(" ")}).join(",")}const hx=(e,t={},{root:n,injectHash:r,parentSelectors:s}={root:!0,parentSelectors:[]})=>{const{hashId:i,layer:o,path:a,hashPriority:l,transformers:c=[],linters:u=[]}=t;let h="",g={};function m(b){const w=b.getName(i);if(!g[w]){const[S]=hx(b.style,t,{root:!1,parentSelectors:s});g[w]=`@keyframes ${b.getName(i)}${S}`}}function C(b,w=[]){return b.forEach(S=>{Array.isArray(S)?C(S,w):S&&w.push(S)}),w}return C(Array.isArray(e)?e:[e]).forEach(b=>{const w=typeof b=="string"&&!n?{}:b;if(typeof w=="string")h+=`${w} `;else if(w._keyframe)m(w);else{const S=c.reduce((x,P)=>{var F;return((F=P==null?void 0:P.visit)==null?void 0:F.call(P,x))||x},w);Object.keys(S).forEach(x=>{const P=S[x];if(typeof P=="object"&&P&&(x!=="animationName"||!P._keyframe)&&!cj(P)){let F=!1,M=x.trim(),E=!1;(n||r)&&i?M.startsWith("@")?F=!0:M==="&"?M=FD("",i,l):M=FD(x,i,l):n&&!i&&(M==="&"||M==="")&&(M="",E=!0);const[I,A]=hx(P,t,{root:E,injectHash:F,parentSelectors:[...s,M]});g={...g,...A},h+=`${M}${I}`}else{let F=function(E,I){const A=E.replace(/[A-Z]/g,D=>`-${D.toLowerCase()}`);let L=I;!zU[E]&&typeof L=="number"&&L!==0&&(L=`${L}px`),E==="animationName"&&(I!=null&&I._keyframe)&&(m(I),L=I.getName(i)),h+=`${A}:${L};`};const M=(P==null?void 0:P.value)??P;typeof P=="object"&&(P!=null&&P[vN])&&Array.isArray(M)?M.forEach(E=>{F(x,E)}):DU(M)&&F(x,M)}})}}),n?o&&(h&&(h=`@layer ${o.name} {${h}}`),o.dependencies&&(g[`@layer ${o.name}`]=o.dependencies.map(b=>`@layer ${b}, ${o.name};`).join(` `))):h=`{${h}}`,[h,g]};function yN(e,t){return Ep(`${e.join("%")}${t}`)}const uj="style";function px(e,t){const{path:n,hashId:r,layer:s,nonce:i,clientOnly:o,order:a=0}=e,{mock:l,hashPriority:c,container:u,transformers:h,linters:g,cache:m,layer:C,autoPrefix:v}=p.useContext(eg),b=[r||""];C&&b.push("layer"),b.push(...n);let w=cx;TE(uj,b,()=>{const S=b.join("|");if(oj(S)){const[I,A]=aj(S);if(I)return[I,A,{},o,a]}const x=t(),[P,F]=hx(x,{hashId:r,hashPriority:c,layer:C?s:void 0,path:n.join("-"),transformers:h,linters:g}),M=hw(P,v||!1),E=yN(b,M);return[M,E,F,o,a]},(S,x)=>{const[,P]=S;x&&cx&&Pp(P,{mark:ra,attachTo:u})},S=>{const[x,P,F,,M]=S;if(w&&x!==mN){const E={mark:ra,prepend:C?!1:"queue",attachTo:u,priority:M},I=typeof i=="function"?i():i;I&&(E.csp={nonce:I});const A=[],L=[];Object.keys(F).forEach(N=>{N.startsWith("@layer")?A.push(N):L.push(N)}),A.forEach(N=>{pl(hw(F[N],v||!1),`_layer-${N}`,{...E,prepend:!0})});const D=pl(x,P,E);D[Qo]=m.instanceId,L.forEach(N=>{pl(hw(F[N],v||!1),`_effect-${N}`,E)})}})}const dj="cssVar",hj=(e,t)=>{const{key:n,prefix:r,unitless:s,ignore:i,token:o,hashId:a,scope:l}=e,{cache:{instanceId:c},container:u,hashPriority:h}=p.useContext(eg),{_tokenKey:g}=o,m=Array.isArray(l)?l.join("@@"):l,C=[...e.path,n,m,g];return TE(dj,C,()=>{const b=t(),[w,S]=lN(b,n,{prefix:r,unitless:s,ignore:i,scope:l,hashPriority:h,hashCls:a}),x=yN(C,S);return[w,S,x,n]},([,,b])=>{cx&&Pp(b,{mark:ra,attachTo:u})},([,b,w])=>{if(!b)return;const S=pl(b,w,{mark:ra,prepend:"queue",attachTo:u,priority:-999});S[Qo]=c,S.setAttribute(FE,n)})};class yn{constructor(t,n){Fe(this,"name");Fe(this,"style");Fe(this,"_keyframe",!0);this.name=t,this.style=n}getName(t=""){return t?`${t}-${this.name}`:this.name}}function xu(e){return e.notSplit=!0,e}xu(["borderTop","borderBottom"]),xu(["borderTop"]),xu(["borderBottom"]),xu(["borderLeft","borderRight"]),xu(["borderLeft"]),xu(["borderRight"]);function yr(e){"@babel/helpers - typeof";return yr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yr(e)}function pj(e){if(Array.isArray(e))return e}function gj(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,s,i,o,a=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(a.push(r.value),a.length!==t);l=!0);}catch(u){c=!0,s=u}finally{try{if(!l&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}function fj(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function bN(e,t){return pj(e)||gj(e,t)||Jk(e,t)||fj()}function mj(e,t){if(yr(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(yr(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function wN(e){var t=mj(e,"string");return yr(t)=="symbol"?t:t+""}function $r(e,t,n){return(t=wN(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function lr(e){for(var t=1;t1e4){var r=Date.now();this.lastAccessBeat.forEach(function(s,i){r-s>Ej&&(n.map.delete(i),n.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e})(),LD=new Pj;function Fj(e,t){return K.useMemo(function(){var n=LD.get(t);if(n)return n;var r=e();return LD.set(t,r),r},t)}var Tj=function(){return{}};function Mj(e){var t=e.useCSP,n=t===void 0?Tj:t,r=e.useToken,s=e.usePrefix,i=e.getResetStyles,o=e.getCommonStyle,a=e.getCompUnitless;function l(g,m,C,v){var b=Array.isArray(g)?g[0]:g;function w(I){return"".concat(String(b)).concat(I.slice(0,1).toUpperCase()).concat(I.slice(1))}var S=(v==null?void 0:v.unitless)||{},x=typeof a=="function"?a(g):{},P=lr(lr({},x),{},$r({},w("zIndexPopup"),!0));Object.keys(S).forEach(function(I){P[w(I)]=S[I]});var F=lr(lr({},v),{},{unitless:P,prefixToken:w}),M=u(g,m,C,F),E=c(b,C,F);return function(I){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:I,L=M(I,A),D=v==null?void 0:v.extraCssVarPrefixCls,N=typeof D=="function"?D({prefixCls:I,rootCls:A}):D,k=E(N!=null&&N.length?[A].concat(nn(N)):A);return[L,k]}}function c(g,m,C){var v=C.unitless,b=C.prefixToken,w=C.ignore;return function(S){var x=r(),P=x.cssVar,F=x.realToken;return hj({path:[g],prefix:P.prefix,key:P.key,unitless:v,ignore:w,token:F,scope:S},function(){var M=AD(g,F,m),E=ID(g,F,M,{deprecatedTokens:C==null?void 0:C.deprecatedTokens});return M&&Object.keys(M).forEach(function(I){E[b(I)]=E[I],delete E[I]}),E}),P==null?void 0:P.key}}function u(g,m,C){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},b=Array.isArray(g)?g:[g,g],w=bN(b,1),S=w[0],x=b.join("-"),P=e.layer||{name:"antd"};return function(F){var M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:F,E=r(),I=E.theme,A=E.realToken,L=E.hashId,D=E.token,N=E.cssVar,k=E.zeroRuntime,G=p.useMemo(function(){return k},[]);if(G)return L;var $=s(),_=$.rootPrefixCls,U=$.iconPrefixCls,V=n(),W="css",j=Fj(function(){var te=new Set;return Object.keys(v.unitless||{}).forEach(function(Z){te.add(Rm(Z,N.prefix)),te.add(Rm(Z,MD(S,N.prefix)))}),wj(W,te)},[W,S,N==null?void 0:N.prefix]),H=Rj(),B=H.max,Y=H.min,J={theme:I,token:D,hashId:L,nonce:function(){return V.nonce},clientOnly:v.clientOnly,layer:P,order:v.order||-999};return typeof i=="function"&&px(lr(lr({},J),{},{clientOnly:!1,path:["Shared",_]}),function(){return i(D,{prefix:{rootPrefixCls:_,iconPrefixCls:U},csp:V})}),px(lr(lr({},J),{},{path:[x,F,U]}),function(){if(v.injectStyle===!1)return[];var te=xj(D),Z=te.token,ae=te.flush,de=AD(S,A,C),ge=".".concat(F),ve=ID(S,A,de,{deprecatedTokens:v.deprecatedTokens});de&&yr(de)==="object"&&Object.keys(de).forEach(function(ce){de[ce]="var(".concat(Rm(ce,MD(S,N.prefix)),")")});var Re=En(Z,{componentCls:ge,prefixCls:F,iconCls:".".concat(U),antCls:".".concat(_),calc:j,max:B,min:Y},de),ne=m(Re,{hashId:L,prefixCls:F,rootPrefixCls:_,iconPrefixCls:U});ae(S,ve);var re=typeof o=="function"?o(Re,F,M,v.resetFont):null;return[v.resetStyle===!1?null:re,ne]}),L}}function h(g,m,C){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},b=u(g,m,C,lr({resetStyle:!1,order:-998},v)),w=function(x){var P=x.prefixCls,F=x.rootCls,M=F===void 0?P:F;return b(P,M),null};return w}return{genStyleHooks:l,genSubStyleComponent:h,genComponentStyleHook:u}}const vl=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];function Tm(e){return(e+8)/e}function Ij(e){const t=Array.from({length:10}).map((n,r)=>{const s=r-1,i=e*Math.E**(s/5),o=r>1?Math.floor(i):Math.ceil(i);return Math.floor(o/2)*2});return t[1]=e,t.map(n=>({size:n,lineHeight:Tm(n)}))}const Dj="6.3.0",PN={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Ip={...PN,colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0},Aj={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"},Br=Math.round;function gw(e,t){const n=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],r=n.map(s=>parseFloat(s));for(let s=0;s<3;s+=1)r[s]=t(r[s]||0,n[s]||"",s);return n[3]?r[3]=n[3].includes("%")?r[3]/100:r[3]:r[3]=1,r}const OD=(e,t,n)=>n===0?e:e/100;function Ph(e,t){const n=t||255;return e>n?n:e<0?0:e}class Mn{constructor(t){Fe(this,"isValid",!0);Fe(this,"r",0);Fe(this,"g",0);Fe(this,"b",0);Fe(this,"a",1);Fe(this,"_h");Fe(this,"_hsl_s");Fe(this,"_hsv_s");Fe(this,"_l");Fe(this,"_v");Fe(this,"_max");Fe(this,"_min");Fe(this,"_brightness");function n(r){return r[0]in t&&r[1]in t&&r[2]in t}if(t)if(typeof t=="string"){let s=function(i){return r.startsWith(i)};const r=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(r))this.fromHexString(r);else if(s("rgb"))this.fromRgbString(r);else if(s("hsl"))this.fromHslString(r);else if(s("hsv")||s("hsb"))this.fromHsvString(r);else{const i=Aj[r.toLowerCase()];i&&this.fromHexString(parseInt(i,36).toString(16).padStart(6,"0"))}}else if(t instanceof Mn)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._hsl_s=t._hsl_s,this._hsv_s=t._hsv_s,this._l=t._l,this._v=t._v;else if(n("rgb"))this.r=Ph(t.r),this.g=Ph(t.g),this.b=Ph(t.b),this.a=typeof t.a=="number"?Ph(t.a,1):1;else if(n("hsl"))this.fromHsl(t);else if(n("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){const n=this.toHsv();return n.h=t,this._c(n)}getLuminance(){function t(i){const o=i/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)}const n=t(this.r),r=t(this.g),s=t(this.b);return .2126*n+.7152*r+.0722*s}getHue(){if(typeof this._h>"u"){const t=this.getMax()-this.getMin();t===0?this._h=0:this._h=Br(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g"u"){const t=this.getMax()-this.getMin();t===0?this._hsv_s=0:this._hsv_s=t/this.getMax()}return this._hsv_s}getHSLSaturation(){if(typeof this._hsl_s>"u"){const t=this.getMax()-this.getMin();if(t===0)this._hsl_s=0;else{const n=this.getLightness();this._hsl_s=t/255/(1-Math.abs(2*n-1))}}return this._hsl_s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){const n=this.getHue(),r=this.getSaturation();let s=this.getLightness()-t/100;return s<0&&(s=0),this._c({h:n,s:r,l:s,a:this.a})}lighten(t=10){const n=this.getHue(),r=this.getSaturation();let s=this.getLightness()+t/100;return s>1&&(s=1),this._c({h:n,s:r,l:s,a:this.a})}mix(t,n=50){const r=this._c(t),s=n/100,i=a=>(r[a]-this[a])*s+this[a],o={r:Br(i("r")),g:Br(i("g")),b:Br(i("b")),a:Br(i("a")*100)/100};return this._c(o)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){const n=this._c(t),r=this.a+n.a*(1-this.a),s=i=>Br((this[i]*this.a+n[i]*n.a*(1-this.a))/r);return this._c({r:s("r"),g:s("g"),b:s("b"),a:r})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#";const n=(this.r||0).toString(16);t+=n.length===2?n:"0"+n;const r=(this.g||0).toString(16);t+=r.length===2?r:"0"+r;const s=(this.b||0).toString(16);if(t+=s.length===2?s:"0"+s,typeof this.a=="number"&&this.a>=0&&this.a<1){const i=Br(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getHSLSaturation(),l:this.getLightness(),a:this.a}}toHslString(){const t=this.getHue(),n=Br(this.getHSLSaturation()*100),r=Br(this.getLightness()*100);return this.a!==1?`hsla(${t},${n}%,${r}%,${this.a})`:`hsl(${t},${n}%,${r}%)`}toHsv(){return{h:this.getHue(),s:this.getHSVSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,n,r){const s=this.clone();return s[t]=Ph(n,r),s}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){const n=t.replace("#","");function r(s,i){return parseInt(n[s]+n[i||s],16)}n.length<6?(this.r=r(0),this.g=r(1),this.b=r(2),this.a=n[3]?r(3)/255:1):(this.r=r(0,1),this.g=r(2,3),this.b=r(4,5),this.a=n[6]?r(6,7)/255:1)}fromHsl({h:t,s:n,l:r,a:s}){const i=(t%360+360)%360;if(this._h=i,this._hsl_s=n,this._l=r,this.a=typeof s=="number"?s:1,n<=0){const m=Br(r*255);this.r=m,this.g=m,this.b=m;return}let o=0,a=0,l=0;const c=i/60,u=(1-Math.abs(2*r-1))*n,h=u*(1-Math.abs(c%2-1));c>=0&&c<1?(o=u,a=h):c>=1&&c<2?(o=h,a=u):c>=2&&c<3?(a=u,l=h):c>=3&&c<4?(a=h,l=u):c>=4&&c<5?(o=h,l=u):c>=5&&c<6&&(o=u,l=h);const g=r-u/2;this.r=Br((o+g)*255),this.g=Br((a+g)*255),this.b=Br((l+g)*255)}fromHsv({h:t,s:n,v:r,a:s}){const i=(t%360+360)%360;this._h=i,this._hsv_s=n,this._v=r,this.a=typeof s=="number"?s:1;const o=Br(r*255);if(this.r=o,this.g=o,this.b=o,n<=0)return;const a=i/60,l=Math.floor(a),c=a-l,u=Br(r*(1-n)*255),h=Br(r*(1-n*c)*255),g=Br(r*(1-n*(1-c))*255);switch(l){case 0:this.g=g,this.b=u;break;case 1:this.r=h,this.b=u;break;case 2:this.r=u,this.b=g;break;case 3:this.r=u,this.g=h;break;case 4:this.r=g,this.g=u;break;case 5:default:this.g=u,this.b=h;break}}fromHsvString(t){const n=gw(t,OD);this.fromHsv({h:n[0],s:n[1],v:n[2],a:n[3]})}fromHslString(t){const n=gw(t,OD);this.fromHsl({h:n[0],s:n[1],l:n[2],a:n[3]})}fromRgbString(t){const n=gw(t,(r,s)=>s.includes("%")?Br(r/100*255):r);this.r=n[0],this.g=n[1],this.b=n[2],this.a=n[3]}}const Vf=2,kD=.16,Lj=.05,Oj=.05,kj=.15,FN=5,TN=4,Nj=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function ND(e,t,n){let r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Vf*t:Math.round(e.h)+Vf*t:r=n?Math.round(e.h)+Vf*t:Math.round(e.h)-Vf*t,r<0?r+=360:r>=360&&(r-=360),r}function BD(e,t,n){if(e.h===0&&e.s===0)return e.s;let r;return n?r=e.s-kD*t:t===TN?r=e.s+kD:r=e.s+Lj*t,r>1&&(r=1),n&&t===FN&&r>.1&&(r=.1),r<.06&&(r=.06),Math.round(r*100)/100}function $D(e,t,n){let r;return n?r=e.v+Oj*t:r=e.v-kj*t,r=Math.max(0,Math.min(1,r)),Math.round(r*100)/100}function LE(e,t={}){const n=[],r=new Mn(e),s=r.toHsv();for(let i=FN;i>0;i-=1){const o=new Mn({h:ND(s,i,!0),s:BD(s,i,!0),v:$D(s,i,!0)});n.push(o)}n.push(r);for(let i=1;i<=TN;i+=1){const o=new Mn({h:ND(s,i),s:BD(s,i),v:$D(s,i)});n.push(o)}return t.theme==="dark"?Nj.map(({index:i,amount:o})=>new Mn(t.backgroundColor||"#141414").mix(n[i],o).toHexString()):n.map(i=>i.toHexString())}const fw={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},fx=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];fx.primary=fx[5];const mx=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];mx.primary=mx[5];const Cx=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];Cx.primary=Cx[5];const eC=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];eC.primary=eC[5];const vx=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];vx.primary=vx[5];const yx=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];yx.primary=yx[5];const bx=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];bx.primary=bx[5];const wx=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];wx.primary=wx[5];const tC=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];tC.primary=tC[5];const Sx=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];Sx.primary=Sx[5];const xx=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];xx.primary=xx[5];const Rx=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];Rx.primary=Rx[5];const Ex=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Ex.primary=Ex[5];const mw={red:fx,volcano:mx,orange:Cx,gold:eC,yellow:vx,lime:yx,green:bx,cyan:wx,blue:tC,geekblue:Sx,purple:xx,magenta:Rx,grey:Ex};function Bj(e,{generateColorPalettes:t,generateNeutralColorPalettes:n}){const{colorSuccess:r,colorWarning:s,colorError:i,colorInfo:o,colorPrimary:a,colorBgBase:l,colorTextBase:c}=e,u=t(a),h=t(r),g=t(s),m=t(i),C=t(o),v=n(l,c),b=e.colorLink||e.colorInfo,w=t(b),S=new Mn(m[1]).mix(new Mn(m[3]),50).toHexString(),x={};return vl.forEach(P=>{const F=e[P];if(F){const M=t(F);x[`${P}Hover`]=M[5],x[`${P}Active`]=M[7]}}),{...v,colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:h[1],colorSuccessBgHover:h[2],colorSuccessBorder:h[3],colorSuccessBorderHover:h[4],colorSuccessHover:h[4],colorSuccess:h[6],colorSuccessActive:h[7],colorSuccessTextHover:h[8],colorSuccessText:h[9],colorSuccessTextActive:h[10],colorErrorBg:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:S,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:g[1],colorWarningBgHover:g[2],colorWarningBorder:g[3],colorWarningBorderHover:g[4],colorWarningHover:g[4],colorWarning:g[6],colorWarningActive:g[7],colorWarningTextHover:g[8],colorWarningText:g[9],colorWarningTextActive:g[10],colorInfoBg:C[1],colorInfoBgHover:C[2],colorInfoBorder:C[3],colorInfoBorderHover:C[4],colorInfoHover:C[4],colorInfo:C[6],colorInfoActive:C[7],colorInfoTextHover:C[8],colorInfoText:C[9],colorInfoTextActive:C[10],colorLinkHover:w[4],colorLink:w[6],colorLinkActive:w[7],...x,colorBgMask:new Mn("#000").setA(.45).toRgbString(),colorWhite:"#fff"}}const $j=e=>{let t=e,n=e,r=e,s=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?s=4:e>=8&&(s=6),{borderRadius:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:s}};function Gj(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:s}=e;return{motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:s+1,...$j(r)}}const Vj=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},Hj=e=>{const t=Ij(e),n=t.map(u=>u.size),r=t.map(u=>u.lineHeight),s=n[1],i=n[0],o=n[2],a=r[1],l=r[0],c=r[2];return{fontSizeSM:i,fontSize:s,fontSizeLG:o,fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:a,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(a*s),fontHeightLG:Math.round(c*o),fontHeightSM:Math.round(l*i),lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}};function zj(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const yi=(e,t)=>new Mn(e).setA(t).toRgbString(),Ru=(e,t)=>new Mn(e).darken(t).toHexString(),Wj=e=>{const t=LE(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},_j=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:yi(r,.88),colorTextSecondary:yi(r,.65),colorTextTertiary:yi(r,.45),colorTextQuaternary:yi(r,.25),colorFill:yi(r,.15),colorFillSecondary:yi(r,.06),colorFillTertiary:yi(r,.04),colorFillQuaternary:yi(r,.02),colorBgSolid:yi(r,1),colorBgSolidHover:yi(r,.75),colorBgSolidActive:yi(r,.95),colorBgLayout:Ru(n,4),colorBgContainer:Ru(n,0),colorBgElevated:Ru(n,0),colorBgSpotlight:yi(r,.85),colorBgBlur:"transparent",colorBorder:Ru(n,15),colorBorderDisabled:Ru(n,15),colorBorderSecondary:Ru(n,6)}};function Uj(e){fw.pink=fw.magenta,mw.pink=mw.magenta;const t=Object.keys(PN).map(n=>{const r=e[n]===fw[n]?mw[n]:LE(e[n]);return Array.from({length:10},()=>1).reduce((s,i,o)=>(s[`${n}-${o+1}`]=r[o],s[`${n}${o+1}`]=r[o],s),{})}).reduce((n,r)=>(n={...n,...r},n),{});return{...e,...t,...Bj(e,{generateColorPalettes:Wj,generateNeutralColorPalettes:_j}),...Hj(e.fontSize),...zj(e),...Vj(e),...Gj(e)}}const MN=lx(Uj),Px={token:Ip,override:{override:Ip},hashed:!0},IN=K.createContext(Px);function Cw(e){return e>=0&&e<=255}function _h(e,t){const{r:n,g:r,b:s,a:i}=new Mn(e).toRgb();if(i<1)return e;const{r:o,g:a,b:l}=new Mn(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-o*(1-c))/c),h=Math.round((r-a*(1-c))/c),g=Math.round((s-l*(1-c))/c);if(Cw(u)&&Cw(h)&&Cw(g))return new Mn({r:u,g:h,b:g,a:Math.round(c*100)/100}).toRgbString()}return new Mn({r:n,g:r,b:s,a:1}).toRgbString()}function jj(e){const{override:t,...n}=e,r={...t};Object.keys(Ip).forEach(m=>{delete r[m]});const s={...n,...r},i=480,o=576,a=768,l=992,c=1200,u=1600,h=1920;return s.motion===!1&&(s.motionDurationFast="0s",s.motionDurationMid="0s",s.motionDurationSlow="0s"),{...s,colorFillContent:s.colorFillSecondary,colorFillContentHover:s.colorFill,colorFillAlter:s.colorFillQuaternary,colorBgContainerDisabled:s.colorFillTertiary,colorBorderBg:s.colorBgContainer,colorSplit:_h(s.colorBorderSecondary,s.colorBgContainer),colorTextPlaceholder:s.colorTextQuaternary,colorTextDisabled:s.colorTextQuaternary,colorTextHeading:s.colorText,colorTextLabel:s.colorTextSecondary,colorTextDescription:s.colorTextTertiary,colorTextLightSolid:s.colorWhite,colorHighlight:s.colorError,colorBgTextHover:s.colorFillSecondary,colorBgTextActive:s.colorFill,colorIcon:s.colorTextTertiary,colorIconHover:s.colorText,colorErrorOutline:_h(s.colorErrorBg,s.colorBgContainer),colorWarningOutline:_h(s.colorWarningBg,s.colorBgContainer),fontSizeIcon:s.fontSizeSM,lineWidthFocus:s.lineWidth*3,lineWidth:s.lineWidth,controlOutlineWidth:s.lineWidth*2,controlInteractiveSize:s.controlHeight/2,controlItemBgHover:s.colorFillTertiary,controlItemBgActive:s.colorPrimaryBg,controlItemBgActiveHover:s.colorPrimaryBgHover,controlItemBgActiveDisabled:s.colorFill,controlTmpOutline:s.colorFillQuaternary,controlOutline:_h(s.colorPrimaryBg,s.colorBgContainer),lineType:s.lineType,borderRadius:s.borderRadius,borderRadiusXS:s.borderRadiusXS,borderRadiusSM:s.borderRadiusSM,borderRadiusLG:s.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:s.sizeXXS,paddingXS:s.sizeXS,paddingSM:s.sizeSM,padding:s.size,paddingMD:s.sizeMD,paddingLG:s.sizeLG,paddingXL:s.sizeXL,paddingContentHorizontalLG:s.sizeLG,paddingContentVerticalLG:s.sizeMS,paddingContentHorizontal:s.sizeMS,paddingContentVertical:s.sizeSM,paddingContentHorizontalSM:s.size,paddingContentVerticalSM:s.sizeXS,marginXXS:s.sizeXXS,marginXS:s.sizeXS,marginSM:s.sizeSM,margin:s.size,marginMD:s.sizeMD,marginLG:s.sizeLG,marginXL:s.sizeXL,marginXXL:s.sizeXXL,boxShadow:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowSecondary:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowTertiary:` 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02) `,screenXS:i,screenXSMin:i,screenXSMax:o-1,screenSM:o,screenSMMin:o,screenSMMax:a-1,screenMD:a,screenMDMin:a,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,screenXXLMax:h-1,screenXXXL:h,screenXXXLMin:h,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` 0 1px 2px -2px ${new Mn("rgba(0, 0, 0, 0.16)").toRgbString()}, 0 3px 6px 0 ${new Mn("rgba(0, 0, 0, 0.12)").toRgbString()}, 0 5px 12px 4px ${new Mn("rgba(0, 0, 0, 0.09)").toRgbString()} `,boxShadowDrawerRight:` -6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), -9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerLeft:` 6px 0 16px 0 rgba(0, 0, 0, 0.08), 3px 0 6px -4px rgba(0, 0, 0, 0.12), 9px 0 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerUp:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowDrawerDown:` 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)",...r}}const DN={lineHeight:!0,lineHeightSM:!0,lineHeightLG:!0,lineHeightHeading1:!0,lineHeightHeading2:!0,lineHeightHeading3:!0,lineHeightHeading4:!0,lineHeightHeading5:!0,opacityLoading:!0,fontWeightStrong:!0,zIndexPopupBase:!0,zIndexBase:!0,opacityImage:!0},Kj={motionBase:!0,motionUnit:!0},qj={screenXS:!0,screenXSMin:!0,screenXSMax:!0,screenSM:!0,screenSMMin:!0,screenSMMax:!0,screenMD:!0,screenMDMin:!0,screenMDMax:!0,screenLG:!0,screenLGMin:!0,screenLGMax:!0,screenXL:!0,screenXLMin:!0,screenXLMax:!0,screenXXL:!0,screenXXLMin:!0},AN=(e,t,n)=>{const r=n.getDerivativeToken(e),{override:s,...i}=t;let o={...r,override:s};return o=jj(o),i&&Object.entries(i).forEach(([a,l])=>{const{theme:c,...u}=l;let h=u;c&&(h=AN({...o,...u},{override:u},c)),o[a]=h}),o};function ds(){const{token:e,hashed:t,theme:n,override:r,cssVar:s,zeroRuntime:i}=K.useContext(IN),o={prefix:(s==null?void 0:s.prefix)??"ant",key:(s==null?void 0:s.key)??"css-var-root"},a=`${Dj}-${t||""}`,l=n||MN,[c,u,h]=HU(l,[Ip,e],{salt:a,override:r,getComputedToken:AN,cssVar:{...o,unitless:DN,ignore:Kj,preserve:qj}});return[l,h,t?u:"",c,o,!!i]}const Ro={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},jn=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),dv=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),Dp=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),Xj=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),Yj=(e,t,n,r)=>{const s=`[class^="${t}"], [class*=" ${t}"]`,i=n?`.${n}`:s,o={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}};let a={};return r!==!1&&(a={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:{...a,...o,[s]:o}}},ro=(e,t)=>({outline:`${he(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:["outline-offset","outline"].map(n=>`${n} 0s`).join(", ")}),Fo=(e,t)=>({"&:focus-visible":ro(e,t)}),LN=e=>({[`.${e}`]:{...dv(),[`.${e} .${e}-icon`]:{display:"block"}}}),OE=e=>({color:e.colorLink,textDecoration:e.linkDecoration,outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,border:0,padding:0,background:"none",userSelect:"none",...Fo(e),"&:hover":{color:e.colorLinkHover,textDecoration:e.linkHoverDecoration},"&:focus":{color:e.colorLinkHover,textDecoration:e.linkFocusDecoration},"&:active":{color:e.colorLinkActive,textDecoration:e.linkHoverDecoration}}),{genStyleHooks:Ln,genComponentStyleHook:Qj,genSubStyleComponent:kE}=Mj({usePrefix:()=>{const{getPrefixCls:e,iconPrefixCls:t}=p.useContext(Kt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{const[e,t,n,r,s,i]=ds();return{theme:e,realToken:t,hashId:n,token:r,cssVar:s,zeroRuntime:i}},useCSP:()=>{const{csp:e}=p.useContext(Kt);return e??{}},getResetStyles:(e,t)=>{const n=Xj(e);return[n,{"&":n},LN((t==null?void 0:t.prefix.iconPrefixCls)??iv)]},getCommonStyle:Yj,getCompUnitless:()=>DN}),br=(e,t)=>{const n=`--${e.replace(/\./g,"")}-${t}-`;return[i=>`${n}${i}`,(i,o)=>o?`var(${n}${i}, ${o})`:`var(${n}${i})`]};function Zj(e,t){return vl.reduce((n,r)=>{const s=e[`${r}1`],i=e[`${r}3`],o=e[`${r}6`],a=e[`${r}7`];return{...n,...t(r,{lightColor:s,lightBorderColor:i,darkColor:o,textColor:a})}},{})}const Jj=(e,t)=>(ds(),px({hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce,layer:{name:"antd"}},()=>LN(e)));var e8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"};const NE=p.createContext({});function ON(e){var t;return(t=e==null?void 0:e.getRootNode)==null?void 0:t.call(e)}function t8(e){return ON(e)instanceof ShadowRoot}function nC(e){return t8(e)?ON(e):null}function n8(e){return e.replace(/-(.)/g,(t,n)=>n.toUpperCase())}function r8(e,t){Jn(e,`[@ant-design/icons] ${t}`)}function GD(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function VD(e={}){return Object.keys(e).reduce((t,n)=>{const r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:delete t[n],t[n8(n)]=r}return t},{})}function Fx(e,t,n){return n?K.createElement(e.tag,{key:t,...VD(e.attrs),...n},(e.children||[]).map((r,s)=>Fx(r,`${t}-${e.tag}-${s}`))):K.createElement(e.tag,{key:t,...VD(e.attrs)},(e.children||[]).map((r,s)=>Fx(r,`${t}-${e.tag}-${s}`)))}function kN(e){return LE(e)[0]}function NN(e){return e?Array.isArray(e)?e:[e]:[]}const s8=` .anticon { display: inline-flex; align-items: center; color: inherit; font-style: normal; line-height: 0; text-align: center; text-transform: none; vertical-align: -0.125em; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } .anticon > * { line-height: 1; } .anticon svg { display: inline-block; vertical-align: inherit; } .anticon::before { display: none; } .anticon .anticon-icon { display: block; } .anticon[tabindex] { cursor: pointer; } .anticon-spin::before, .anticon-spin { display: inline-block; -webkit-animation: loadingCircle 1s infinite linear; animation: loadingCircle 1s infinite linear; } @-webkit-keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes loadingCircle { 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } `,i8=e=>{const{csp:t,prefixCls:n,layer:r}=p.useContext(NE);let s=s8;n&&(s=s.replace(/anticon/g,n)),r&&(s=`@layer ${r} { ${s} }`),p.useEffect(()=>{const i=e.current,o=nC(i);pl(s,"@ant-design-icons",{prepend:!r,csp:t,attachTo:o})},[])},ep={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function o8({primaryColor:e,secondaryColor:t}){ep.primaryColor=e,ep.secondaryColor=t||kN(e),ep.calculated=!!t}function a8(){return{...ep}}const Rd=e=>{const{icon:t,className:n,onClick:r,style:s,primaryColor:i,secondaryColor:o,...a}=e,l=p.useRef(null);let c=ep;if(i&&(c={primaryColor:i,secondaryColor:o||kN(i)}),i8(l),r8(GD(t),`icon should be icon definiton, but got ${t}`),!GD(t))return null;let u=t;return u&&typeof u.icon=="function"&&(u={...u,icon:u.icon(c.primaryColor,c.secondaryColor)}),Fx(u.icon,`svg-${u.name}`,{className:n,onClick:r,style:s,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...a,ref:l})};Rd.displayName="IconReact";Rd.getTwoToneColors=a8;Rd.setTwoToneColors=o8;function BN(e){const[t,n]=NN(e);return Rd.setTwoToneColors({primaryColor:t,secondaryColor:n})}function l8(){const e=Rd.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function Tx(){return Tx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:n,icon:r,spin:s,rotate:i,tabIndex:o,onClick:a,twoToneColor:l,...c}=e,{prefixCls:u="anticon",rootClassName:h}=p.useContext(NE),g=ee(h,u,{[`${u}-${r.name}`]:!!r.name,[`${u}-spin`]:!!s||r.name==="loading"},n);let m=o;m===void 0&&a&&(m=-1);const C=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[v,b]=NN(l);return p.createElement("span",Tx({role:"img","aria-label":r.name},c,{ref:t,tabIndex:m,onClick:a,className:g}),p.createElement(Rd,{icon:r,primaryColor:v,secondaryColor:b,style:C}))});vn.getTwoToneColor=l8;vn.setTwoToneColor=BN;function Mx(){return Mx=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,Mx({},e,{ref:t,icon:e8})),$N=p.forwardRef(c8);var u8={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"};function Ix(){return Ix=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,Ix({},e,{ref:t,icon:u8})),hv=p.forwardRef(d8);var h8={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"};function Dx(){return Dx=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,Dx({},e,{ref:t,icon:h8})),Kc=p.forwardRef(p8);var g8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"};function Ax(){return Ax=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,Ax({},e,{ref:t,icon:g8})),GN=p.forwardRef(f8);var m8={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"};function Lx(){return Lx=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,Lx({},e,{ref:t,icon:m8})),VN=p.forwardRef(C8),HN=p.createContext({});function v8({children:e,...t}){return p.createElement(HN.Provider,{value:t},e)}function y8(e){const[,t]=p.useReducer(i=>i+1,0),n=p.useRef(e),r=Yt(()=>n.current),s=Yt(i=>{n.current=typeof i=="function"?i(n.current):i,t()});return[r,s]}const Xo="none",Hf="appear",zf="enter",Wf="leave",HD="none",Ki="prepare",Gu="start",Vu="active",BE="end",zN="prepared";function zD(e,t){const n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit${e}`]=`webkit${t}`,n[`Moz${e}`]=`moz${t}`,n[`ms${e}`]=`MS${t}`,n[`O${e}`]=`o${t.toLowerCase()}`,n}function b8(e,t){const n={animationend:zD("Animation","AnimationEnd"),transitionend:zD("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}const w8=b8(bs(),typeof window<"u"?window:{});let WN={};bs()&&({style:WN}=document.createElement("div"));const _f={};function _N(e){if(_f[e])return _f[e];const t=w8[e];if(t){const n=Object.keys(t),r=n.length;for(let s=0;sr[1].toUpperCase());return e[n]}return`${e}-${t}`}const x8=(e=>{const t=p.useRef();function n(s){s&&(s.removeEventListener(_D,e),s.removeEventListener(WD,e))}function r(s){t.current&&t.current!==s&&n(t.current),s&&s!==t.current&&(s.addEventListener(_D,e),s.addEventListener(WD,e),t.current=s)}return p.useEffect(()=>()=>{n(t.current),t.current=null},[]),[r,n]}),KN=bs()?p.useLayoutEffect:p.useEffect,R8=(()=>{const e=p.useRef(null);function t(){dn.cancel(e.current)}function n(r,s=2){t();const i=dn(()=>{s<=1?r({isCanceled:()=>i!==e.current}):n(r,s-1)});e.current=i}return p.useEffect(()=>()=>{t()},[]),[n,t]}),E8=[Ki,Gu,Vu,BE],P8=[Ki,zN],qN=!1,F8=!0;function XN(e){return e===Vu||e===BE}const T8=((e,t,n)=>{const[r,s]=Jm(HD),[i,o]=R8();function a(){s(Ki,!0)}const l=t?P8:E8;return KN(()=>{if(r!==HD&&r!==BE){const c=l.indexOf(r),u=l[c+1],h=n(r);h===qN?s(u,!0):u&&i(g=>{function m(){g.isCanceled()||s(u,!0)}h===!0?m():Promise.resolve(h).then(m)})}},[e,r]),p.useEffect(()=>()=>{o()},[]),[a,r]});function M8(e,t,n,{motionEnter:r=!0,motionAppear:s=!0,motionLeave:i=!0,motionDeadline:o,motionLeaveImmediately:a,onAppearPrepare:l,onEnterPrepare:c,onLeavePrepare:u,onAppearStart:h,onEnterStart:g,onLeaveStart:m,onAppearActive:C,onEnterActive:v,onLeaveActive:b,onAppearEnd:w,onEnterEnd:S,onLeaveEnd:x,onVisibleChanged:P}){const[F,M]=Jm(),[E,I]=y8(Xo),[A,L]=Jm(null),D=E(),N=p.useRef(!1),k=p.useRef(null);function G(){return n()}const $=p.useRef(!1);function _(){I(Xo),L(null,!0)}const U=Yt(ae=>{const de=E();if(de===Xo)return;const ge=G();if(ae&&!ae.deadline&&ae.target!==ge)return;const ve=$.current;let Re;de===Hf&&ve?Re=w==null?void 0:w(ge,ae):de===zf&&ve?Re=S==null?void 0:S(ge,ae):de===Wf&&ve&&(Re=x==null?void 0:x(ge,ae)),ve&&Re!==!1&&_()}),[V]=x8(U),W=ae=>{switch(ae){case Hf:return{[Ki]:l,[Gu]:h,[Vu]:C};case zf:return{[Ki]:c,[Gu]:g,[Vu]:v};case Wf:return{[Ki]:u,[Gu]:m,[Vu]:b};default:return{}}},j=p.useMemo(()=>W(D),[D]),[H,B]=T8(D,!e,ae=>{var de;if(ae===Ki){const ge=j[Ki];return ge?ge(G()):qN}return B in j&&L(((de=j[B])==null?void 0:de.call(j,G(),null))||null),B===Vu&&D!==Xo&&(V(G()),o>0&&(clearTimeout(k.current),k.current=setTimeout(()=>{U({deadline:!0})},o))),B===zN&&_(),F8}),Y=XN(B);$.current=Y;const J=p.useRef(null);KN(()=>{if(N.current&&J.current===t)return;M(t);const ae=N.current;N.current=!0;let de;!ae&&t&&s&&(de=Hf),ae&&t&&r&&(de=zf),(ae&&!t&&i||!ae&&a&&!t&&i)&&(de=Wf);const ge=W(de);de&&(e||ge[Ki])?(I(de),H()):I(Xo),J.current=t},[t]),p.useEffect(()=>{(D===Hf&&!s||D===zf&&!r||D===Wf&&!i)&&I(Xo)},[s,r,i]),p.useEffect(()=>()=>{N.current=!1,clearTimeout(k.current)},[]);const te=p.useRef(!1);p.useEffect(()=>{F&&(te.current=!0),F!==void 0&&D===Xo&&((te.current||F)&&(P==null||P(F)),te.current=!0)},[F,D]);let Z=A;return j[Ki]&&B===Gu&&(Z={transition:"none",...Z}),[E,B,Z,F??t]}function I8(e){let t=e;typeof e=="object"&&({transitionSupport:t}=e);function n(s,i){return!!(s.motionName&&t&&i!==!1)}const r=p.forwardRef((s,i)=>{const{visible:o=!0,removeOnLeave:a=!0,forceRender:l,children:c,motionName:u,leavedClassName:h,eventProps:g}=s,{motion:m}=p.useContext(HN),C=n(s,m),v=p.useRef();function b(){return ua(v.current)}const[w,S,x,P]=M8(C,o,b,s),F=w(),M=p.useRef(P);P&&(M.current=!0);const E=p.useMemo(()=>{const L={};return Object.defineProperties(L,{nativeElement:{enumerable:!0,get:b},inMotion:{enumerable:!0,get:()=>()=>w()!==Xo},enableMotion:{enumerable:!0,get:()=>()=>C}}),L},[]);p.useImperativeHandle(i,()=>E,[]);let I;const A={...g,visible:o};if(!c)I=null;else if(F===Xo)P?I=c({...A},v):!a&&M.current&&h?I=c({...A,className:h},v):l||!a&&!h?I=c({...A,style:{display:"none"}},v):I=null;else{let L;S===Ki?L="prepare":XN(S)?L="active":S===Gu&&(L="start");const D=UD(u,`${F}-${L}`);I=c({...A,className:ee(UD(u,F),{[D]:D&&L,[u]:typeof u=="string"}),style:x},v)}return p.isValidElement(I)&&ca(I)&&(Il(I)||(I=p.cloneElement(I,{ref:v}))),I});return r.displayName="CSSMotion",r}const Li=I8(S8),D8=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable encType form formAction formEncType formMethod formNoValidate formTarget frameBorder headers height hidden high href hrefLang htmlFor httpEquiv icon id inputMode integrity is keyParams keyType kind label lang list loop low manifest marginHeight marginWidth max maxLength media mediaGroup method min minLength multiple muted name noValidate nonce open optimum pattern placeholder poster preload radioGroup readOnly rel required reversed role rowSpan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style summary tabIndex target title type useMap value width wmode wrap`,A8=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,L8=`${D8} ${A8}`.split(/[\s\n]+/),O8="aria-",k8="data-";function jD(e,t){return e.indexOf(t)===0}function Mr(e,t=!1){let n;t===!1?n={aria:!0,data:!0,attr:!0}:t===!0?n={aria:!0}:n={...t};const r={};return Object.keys(e).forEach(s=>{(n.aria&&(s==="role"||jD(s,O8))||n.data&&jD(s,k8)||n.attr&&L8.includes(s))&&(r[s]=e[s])}),r}const YN={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var N8={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};function Ap(e){"@babel/helpers - typeof";return Ap=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ap(e)}function KD(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function qD(e){for(var t=1;tIm.reduce((e,t)=>({...e,...t}),To.Modal);function H8(e){if(e){const t={...e};return Im.push(t),Mm=YD(),()=>{Im=Im.filter(n=>n!==t),Mm=YD()}}Mm={...To.Modal}}function ZN(){return Mm}const $E=p.createContext(void 0),Lo=(e,t)=>{const n=p.useContext($E),r=p.useMemo(()=>{const i=t||To[e],o=(n==null?void 0:n[e])??{};return{...typeof i=="function"?i():i,...o||{}}},[e,t,n]),s=p.useMemo(()=>{const i=n==null?void 0:n.locale;return n!=null&&n.exist&&!i?To.locale:i},[n]);return[r,s]},z8="internalMark",W8=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;p.useEffect(()=>H8(t==null?void 0:t.Modal),[t]);const s=p.useMemo(()=>({...t,exist:!0}),[t]);return p.createElement($E.Provider,{value:s},n)};function Lp(...e){const t={};return e.forEach(n=>{n&&Object.keys(n).forEach(r=>{n[r]!==void 0&&(t[r]=n[r])})}),t}const qs=e=>e!=null,QD=e=>{if(!e)return;const{closable:t,closeIcon:n}=e;return{closable:t,closeIcon:n}},JN={},ZD=(e,t)=>{if(!e&&(e===!1||t===!1||t===null))return!1;if(e===void 0&&t===void 0)return null;let n={closeIcon:typeof t!="boolean"&&t!==null?t:void 0};return e&&typeof e=="object"&&(n={...n,...e}),n},_8=(e,t,n)=>e===!1?!1:e?Lp(n,t,e):t===!1?!1:t?Lp(n,t):n.closable?n:!1,U8=(e,t,n)=>{const{closeIconRender:r}=t,{closeIcon:s,...i}=e;let o=s;const a=Mr(i,!0);return qs(o)&&(r&&(o=r(o)),o=K.isValidElement(o)?K.cloneElement(o,{"aria-label":n,...o.props,...a}):K.createElement("span",{"aria-label":n,...a},o)),[o,a]},j8=(e,t,n=JN,r="Close")=>{const s=ZD(e==null?void 0:e.closable,e==null?void 0:e.closeIcon),i=ZD(t==null?void 0:t.closable,t==null?void 0:t.closeIcon),o={closeIcon:K.createElement(Kc,null),...n},a=_8(s,i,o),l=typeof a!="boolean"?!!(a!=null&&a.disabled):!1;if(a===!1)return[!1,null,l,{}];const[c,u]=U8(a,o,r);return[!0,c,l,u]},K8=(e,t,n=JN)=>{const[r]=Lo("global",To.global);return K.useMemo(()=>j8(e,t,{closeIcon:K.createElement(Kc,null),...n},r.close),[e,t,n,r.close])},eB=()=>K.useReducer(e=>e+1,0),Ox=(e,t)=>{let n={};return e&&typeof e=="object"&&(n=e),typeof e=="boolean"&&(n={enabled:e}),n.closable===void 0&&t!==void 0&&(n.closable=t),n},q8=(e,t,n,r)=>p.useMemo(()=>{const s=Ox(e,r),i=Ox(t),o={blur:!1,...i,...s,closable:s.closable??r??i.closable??!0},a=o.blur?`${n}-mask-blur`:void 0;return[o.enabled!==!1,{mask:a},!!o.closable]},[e,t,n,r]),tB=(e,...t)=>{const n=e||{};return t.filter(Boolean).reduce((r,s)=>(Object.keys(s||{}).forEach(i=>{const o=n[i],a=s[i];if(o&&typeof o=="object")if(a&&typeof a=="object")r[i]=tB(o,r[i],a);else{const{_default:l}=o;l&&(r[i]=r[i]||{},r[i][l]=ee(r[i][l],a))}else r[i]=ee(r[i],a)}),r),{})},X8=(e,...t)=>p.useMemo(()=>tB.apply(void 0,[e].concat(t)),[e].concat(t)),Y8=(...e)=>e.filter(Boolean).reduce((t,n={})=>(Object.keys(n).forEach(r=>{t[r]={...t[r],...n[r]}}),t),{}),Q8=(...e)=>p.useMemo(()=>Y8.apply(void 0,e),[].concat(e)),kx=(e,t)=>{const n={...e};return Object.keys(t).forEach(r=>{if(r!=="_default"){const s=t[r],i=n[r]||{};n[r]=s?kx(i,s):i}}),n},JD=(e,t)=>typeof e=="function"?e(t):e,Kn=(e,t,n,r)=>{const s=e.map(l=>l?JD(l,n):void 0),i=t.map(l=>l?JD(l,n):void 0),o=X8.apply(void 0,[r].concat(nn(s))),a=Q8.apply(void 0,nn(i));return p.useMemo(()=>r?[kx(o,r),kx(a,r)]:[o,a],[o,a,r])},Z8=e=>{const[t,n]=p.useState(null);return[p.useCallback((s,i,o)=>{const a=t??s,l=Math.min(a||0,s),c=Math.max(a||0,s),u=i.slice(l,c+1).map(e),h=u.some(m=>!o.has(m)),g=[];return u.forEach(m=>{h?(o.has(m)||g.push(m),o.add(m)):(o.delete(m),g.push(m))}),n(h?c:null),g},[t]),n]},eA=e=>e==="horizontal"||e==="vertical",GE=(e,t,n)=>p.useMemo(()=>{const r=eA(e);let s;return r?s=e:typeof t=="boolean"?s=t?"vertical":"horizontal":s=eA(n)?n:"horizontal",[s,s==="vertical"]},[n,e,t]),J8=()=>{const[e,t]=p.useState([]),n=p.useCallback(r=>(t(s=>[].concat(nn(s),[r])),()=>{t(s=>s.filter(i=>i!==r))}),[]);return[e,n]},eK=(e,t)=>(e._antProxy=e._antProxy||{},Object.keys(t).forEach(n=>{if(!(n in e._antProxy)){const r=e[n];e._antProxy[n]=r,e[n]=t[n]}}),e),tK=(e,t)=>p.useImperativeHandle(e,()=>{const n=t(),{nativeElement:r}=n;return typeof Proxy<"u"?new Proxy(r,{get(s,i){return n[i]?n[i]:Reflect.get(s,i)}}):eK(r,n)}),nK=e=>{const t=p.useRef(e),[,n]=eB();return[()=>t.current,r=>{t.current=r,n()}]},pv=K.createContext(void 0),qa=100,rK=10,sK=qa*rK,nB={Modal:qa,Drawer:qa,Popover:qa,Popconfirm:qa,Tooltip:qa,Tour:qa,FloatButton:qa},iK={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1},oK=e=>e in nB,tg=(e,t)=>{const[,n]=ds(),r=K.useContext(pv),s=oK(e);let i;if(t!==void 0)i=[t,t];else{let o=r??0;s?o+=(r?0:n.zIndexPopupBase)+nB[e]:o+=iK[e],i=[r===void 0?t:o,o]}return i},Uf=(e,t,n,r,s)=>({background:e,border:`${he(r.lineWidth)} ${r.lineType} ${t}`,[`${s}-icon`]:{color:n}}),aK=e=>{const{componentCls:t,motionDurationSlow:n,marginXS:r,marginSM:s,fontSize:i,fontSizeLG:o,lineHeight:a,borderRadiusLG:l,motionEaseInOutCirc:c,withDescriptionIconSize:u,colorText:h,colorTextHeading:g,withDescriptionPadding:m,defaultPadding:C}=e;return{[t]:{...jn(e),position:"relative",display:"flex",alignItems:"center",padding:C,wordWrap:"break-word",borderRadius:l,[`&${t}-rtl`]:{direction:"rtl"},[`${t}-section`]:{flex:1,minWidth:0},[`${t}-icon`]:{marginInlineEnd:r,lineHeight:0},"&-description":{display:"none",fontSize:i,lineHeight:a},"&-title":{color:g},[`&${t}-motion-leave`]:{overflow:"hidden",opacity:1,transition:["max-height","opacity","padding-top","padding-bottom","margin-bottom"].map(v=>`${v} ${n} ${c}`).join(", ")},[`&${t}-motion-leave-active`]:{maxHeight:0,marginBottom:"0 !important",paddingTop:0,paddingBottom:0,opacity:0}},[`${t}-with-description`]:{alignItems:"flex-start",padding:m,[`${t}-icon`]:{marginInlineEnd:s,fontSize:u,lineHeight:0},[`${t}-title`]:{display:"block",marginBottom:r,color:g,fontSize:o},[`${t}-description`]:{display:"block",color:h}},[`${t}-banner`]:{marginBottom:0,border:"0 !important",borderRadius:0}}},lK=e=>{const{componentCls:t,colorSuccess:n,colorSuccessBorder:r,colorSuccessBg:s,colorWarning:i,colorWarningBorder:o,colorWarningBg:a,colorError:l,colorErrorBorder:c,colorErrorBg:u,colorInfo:h,colorInfoBorder:g,colorInfoBg:m}=e;return{[t]:{"&-success":Uf(s,r,n,e,t),"&-info":Uf(m,g,h,e,t),"&-warning":Uf(a,o,i,e,t),"&-error":{...Uf(u,c,l,e,t),[`${t}-description > pre`]:{margin:0,padding:0}}}}},cK=e=>{const{componentCls:t,iconCls:n,motionDurationMid:r,marginXS:s,fontSizeIcon:i,colorIcon:o,colorIconHover:a}=e;return{[t]:{"&-actions":{marginInlineStart:s},[`${t}-close-icon`]:{marginInlineStart:s,padding:0,overflow:"hidden",fontSize:i,lineHeight:he(i),backgroundColor:"transparent",border:"none",outline:"none",cursor:"pointer",[`${n}-close`]:{color:o,transition:`color ${r}`,"&:hover":{color:a}}},"&-close-text":{color:o,transition:`color ${r}`,"&:hover":{color:a}}}}},uK=e=>({withDescriptionIconSize:e.fontSizeHeading3,defaultPadding:`${e.paddingContentVerticalSM}px 12px`,withDescriptionPadding:`${e.paddingMD}px ${e.paddingContentHorizontalLG}px`}),dK=Ln("Alert",e=>[aK(e),lK(e),cK(e)],uK),hK=e=>{const{icon:t,type:n,className:r,style:s,successIcon:i,infoIcon:o,warningIcon:a,errorIcon:l}=e,c={success:i??p.createElement($N,null),info:o??p.createElement(VN,null),error:l??p.createElement(hv,null),warning:a??p.createElement(GN,null)};return p.createElement("span",{className:r,style:s},t??c[n])},pK=e=>{const{isClosable:t,prefixCls:n,closeIcon:r,handleClose:s,ariaProps:i,className:o,style:a}=e,l=r===!0||r===void 0?p.createElement(Kc,null):r;return t?p.createElement("button",{type:"button",onClick:s,className:ee(`${n}-close-icon`,o),tabIndex:0,style:a,...i},l):null},rB=p.forwardRef((e,t)=>{const{description:n,prefixCls:r,message:s,title:i,banner:o,className:a,rootClassName:l,style:c,onMouseEnter:u,onMouseLeave:h,onClick:g,afterClose:m,showIcon:C,closable:v,closeText:b,closeIcon:w,action:S,id:x,styles:P,classNames:F,...M}=e,E=i??s,[I,A]=p.useState(!1),L=p.useRef(null);p.useImperativeHandle(t,()=>({nativeElement:L.current}));const{getPrefixCls:D,direction:N,closable:k,closeIcon:G,className:$,style:_,classNames:U,styles:V,successIcon:W,infoIcon:j,warningIcon:H,errorIcon:B}=Hn("alert"),Y=D("alert",r),[J,te]=dK(Y),{onClose:Z,afterClose:ae}=v&&typeof v=="object"?v:{},de=we=>{var Be;A(!0),(Be=Z??e.onClose)==null||Be(we)},ge=p.useMemo(()=>e.type!==void 0?e.type:o?"warning":"info",[e.type,o]),ve=p.useMemo(()=>typeof v=="object"&&v.closeIcon||b?!0:typeof v=="boolean"?v:w!==!1&&qs(w)?!0:!!k,[b,w,v,k]),Re=o&&C===void 0?!0:C,ne={...e,prefixCls:Y,type:ge,showIcon:Re,closable:ve},[re,ce]=Kn([U,F],[V,P],{props:ne}),X=ee(Y,`${Y}-${ge}`,{[`${Y}-with-description`]:!!n,[`${Y}-no-icon`]:!Re,[`${Y}-banner`]:!!o,[`${Y}-rtl`]:N==="rtl"},$,a,l,re.root,te,J),ue=Mr(M,{aria:!0,data:!0}),fe=p.useMemo(()=>typeof v=="object"&&v.closeIcon?v.closeIcon:b||(w!==void 0?w:typeof k=="object"&&k.closeIcon?k.closeIcon:G),[w,v,k,b,G]),oe=p.useMemo(()=>{const we=v??k;return typeof we=="object"?Mr(we,{data:!0,aria:!0}):{}},[v,k]);return p.createElement(Li,{visible:!I,motionName:`${Y}-motion`,motionAppear:!1,motionEnter:!1,onLeaveStart:we=>({maxHeight:we.offsetHeight}),onLeaveEnd:ae??m},({className:we,style:Be},Ae)=>p.createElement("div",{id:x,ref:xs(L,Ae),"data-show":!I,className:ee(X,we),style:{...ce.root,..._,...c,...Be},onMouseEnter:u,onMouseLeave:h,onClick:g,role:"alert",...ue},Re?p.createElement(hK,{className:ee(`${Y}-icon`,re.icon),style:ce.icon,description:n,icon:e.icon,prefixCls:Y,type:ge,successIcon:W,infoIcon:j,warningIcon:H,errorIcon:B}):null,p.createElement("div",{className:ee(`${Y}-section`,re.section),style:ce.section},E?p.createElement("div",{className:ee(`${Y}-title`,re.title),style:ce.title},E):null,n?p.createElement("div",{className:ee(`${Y}-description`,re.description),style:ce.description},n):null),S?p.createElement("div",{className:ee(`${Y}-actions`,re.actions),style:ce.actions},S):null,p.createElement(pK,{className:re.close,style:ce.close,isClosable:ve,prefixCls:Y,closeIcon:fe,handleClose:de,ariaProps:oe})))});function gK(e,t,n){return t=Mc(t),SN(e,uv()?Reflect.construct(t,n||[],Mc(e).constructor):t.apply(e,n))}let fK=(function(e){function t(){var n;return Uc(this,t),n=gK(this,t,arguments),n.state={error:void 0,info:{componentStack:""}},n}return AE(t,e),jc(t,[{key:"componentDidCatch",value:function(r,s){this.setState({error:r,info:s})}},{key:"render",value:function(){const{message:r,title:s,description:i,id:o,children:a}=this.props,{error:l,info:c}=this.state,u=s??r,h=(c==null?void 0:c.componentStack)||null,g=typeof u>"u"?(l||"").toString():u,m=typeof i>"u"?h:i;return l?p.createElement(rB,{id:o,type:"error",title:g,description:p.createElement("pre",{style:{fontSize:"0.9em",overflowX:"auto"}},m)}):a}}])})(p.Component);const mK=rB;mK.ErrorBoundary=fK;function Nx(e){return qs(e)&&e===e.window}const CK=e=>{var n;if(typeof window>"u")return 0;let t=0;return Nx(e)?t=e.pageYOffset:e instanceof Document?t=e.documentElement.scrollTop:(e instanceof HTMLElement||e)&&(t=e.scrollTop),e&&!Nx(e)&&typeof t!="number"&&(t=(n=(e.ownerDocument??e).documentElement)==null?void 0:n.scrollTop),t};function vK(e,t,n,r){const s=n-t;return e/=r/2,e<1?s/2*e*e*e+t:s/2*((e-=2)*e*e+2)+t}function yK(e,t={}){const{getContainer:n=()=>window,callback:r,duration:s=450}=t,i=n(),o=CK(i),a=Date.now();let l;const c=()=>{const h=Date.now()-a,g=vK(h>s?s:h,o,e,s);Nx(i)?i.scrollTo(window.pageXOffset,g):i instanceof Document||i.constructor.name==="HTMLDocument"?i.documentElement.scrollTop=g:i.scrollTop=g,h{dn.cancel(l)}}const Rs=e=>`${e}-css-var`,bK=p.createContext(void 0),sB=p.createContext(null);let wK=!1;function SK(e){return wK}const tA=[];function xK(e,t){const[n]=p.useState(()=>bs()?document.createElement("div"):null),r=p.useRef(!1),s=p.useContext(sB),[i,o]=p.useState(tA),a=s||(r.current?void 0:u=>{o(h=>[u,...h])});function l(){n.parentElement||document.body.appendChild(n),r.current=!0}function c(){var u;(u=n.parentElement)==null||u.removeChild(n),r.current=!1}return on(()=>(e?s?s(l):l():c(),c),[e]),on(()=>{i.length&&(i.forEach(u=>u()),o(tA))},[i]),[n,a]}let vw;function iB(e){const t=`rc-scrollbar-measure-${Math.random().toString(36).substring(7)}`,n=document.createElement("div");n.id=t;const r=n.style;r.position="absolute",r.left="0",r.top="0",r.width="100px",r.height="100px",r.overflow="scroll";let s,i;if(e){const l=getComputedStyle(e);r.scrollbarColor=l.scrollbarColor,r.scrollbarWidth=l.scrollbarWidth;const c=getComputedStyle(e,"::-webkit-scrollbar"),u=parseInt(c.width,10),h=parseInt(c.height,10);try{const g=u?`width: ${c.width};`:"",m=h?`height: ${c.height};`:"";pl(` #${t}::-webkit-scrollbar { ${g} ${m} }`,t)}catch(g){console.error(g),s=u,i=h}}document.body.appendChild(n);const o=e&&s&&!isNaN(s)?s:n.offsetWidth-n.clientWidth,a=e&&i&&!isNaN(i)?i:n.offsetHeight-n.clientHeight;return document.body.removeChild(n),Pp(t),{width:o,height:a}}function nA(e){return typeof document>"u"?0:(vw===void 0&&(vw=iB()),vw.width)}function Bx(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:iB(e)}function RK(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}const EK=`rc-util-locker-${Date.now()}`;let rA=0;function PK(e){const t=!!e,[n]=p.useState(()=>(rA+=1,`${EK}_${rA}`));on(()=>{if(t){const r=Bx(document.body).width,s=RK();pl(` html body { overflow-y: hidden; ${s?`width: calc(100% - ${r}px);`:""} }`,n)}else Pp(n);return()=>{Pp(n)}},[t,n])}function FK(){return{...Ek}.useId}let sA=0;function oB(e,t){const r=String(t).replace(/[^a-zA-Z0-9_.:-]/g,"-");return`${e}-${r}`}const iA=FK(),ya=iA?(function(t){const n=iA();return t||n}):(function(t){const[n,r]=p.useState("ssr-id");return p.useEffect(()=>{const s=sA;sA+=1,r(`rc_unique_${s}`)},[]),t||n});let uc=[];const TK=200;let aB=0;const lB=e=>{if(e.key==="Escape"&&!e.isComposing){if(Date.now()-aB=0;r-=1)uc[r].onEsc({top:r===n-1,event:e})}},cB=()=>{aB=Date.now()};function MK(){window.addEventListener("keydown",lB),window.addEventListener("compositionend",cB)}function IK(){uc.length===0&&(window.removeEventListener("keydown",lB),window.removeEventListener("compositionend",cB))}function DK(e,t){const n=ya(),r=Yt(t),s=()=>{uc.find(o=>o.id===n)||uc.push({id:n,onEsc:r})},i=()=>{uc=uc.filter(o=>o.id!==n)};p.useMemo(()=>{e?s():e||i()},[e]),p.useEffect(()=>{if(e)return s(),MK(),()=>{i(),IK()}},[e])}const oA=e=>e===!1?!1:!bs()||!e?null:typeof e=="string"?document.querySelector(e):typeof e=="function"?e():e,gv=p.forwardRef((e,t)=>{const{open:n,autoLock:r,getContainer:s,debug:i,autoDestroy:o=!0,children:a,onEsc:l}=e,[c,u]=p.useState(n),h=c||n;p.useEffect(()=>{(o||n)&&u(n)},[n,o]);const[g,m]=p.useState(()=>oA(s));p.useEffect(()=>{const F=oA(s);m(()=>F??null)});const[C,v]=xK(h&&!g),b=g??C;PK(r&&n&&bs()&&(b===C||b===document.body)),DK(n,l);let w=null;a&&ca(a)&&t&&(w=Il(a));const S=va(w,t);if(!h||!bs()||g===void 0)return null;const x=b===!1||SK();let P=a;return t&&(P=p.cloneElement(a,{ref:S})),p.createElement(sB.Provider,{value:v},x?P:to.createPortal(P,b))});function AK(e){const{prefixCls:t,align:n,arrow:r,arrowPos:s}=e,{className:i,content:o,style:a}=r||{},{x:l=0,y:c=0}=s,u=p.useRef(null);if(!n||!n.points)return null;const h={position:"absolute"};if(n.autoArrow!==!1){const g=n.points[0],m=n.points[1],C=g[0],v=g[1],b=m[0],w=m[1];C===b||!["t","b"].includes(C)?h.top=c:C==="t"?h.top=0:h.bottom=0,v===w||!["l","r"].includes(v)?h.left=l:v==="l"?h.left=0:h.right=0}return p.createElement("div",{ref:u,className:ee(`${t}-arrow`,i),style:{...h,...a}},o)}function $x(){return $x=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement("div",{style:{zIndex:r},className:ee(`${t}-mask`,o&&`${t}-mobile-mask`,a)})):null}const OK=p.memo(({children:e})=>e,(e,t)=>t.cache);function uB(e,t,n,r,s,i,o,a){var u;const l="auto",c=e?{}:{left:"-1000vw",top:"-1000vh",right:l,bottom:l};if(!e&&(t||!n)){const{points:h}=r,g=r.dynamicInset||((u=r._experimental)==null?void 0:u.dynamicInset),m=g&&h[0][1]==="r",C=g&&h[0][0]==="b";m?(c.right=s,c.left=l):(c.left=o,c.right=l),C?(c.bottom=i,c.top=l):(c.top=a,c.bottom=l)}return c}function Gx(){return Gx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{onEsc:n,popup:r,className:s,prefixCls:i,style:o,target:a,onVisibleChanged:l,open:c,keepDom:u,fresh:h,onClick:g,mask:m,arrow:C,arrowPos:v,align:b,motion:w,maskMotion:S,mobile:x,forceRender:P,getPopupContainer:F,autoDestroy:M,portal:E,children:I,zIndex:A,onMouseEnter:L,onMouseLeave:D,onPointerEnter:N,onPointerDownCapture:k,ready:G,offsetX:$,offsetY:_,offsetR:U,offsetB:V,onAlign:W,onPrepare:j,onResize:H,stretch:B,targetWidth:Y,targetHeight:J}=e,te=typeof r=="function"?r():r,Z=c||u,ae=!!x,[de,ge,ve]=p.useMemo(()=>x?[x.mask,x.maskMotion,x.motion]:[m,S,w],[x,m,S,w]),Re=(F==null?void 0:F.length)>0,[ne,re]=p.useState(!F||!Re);on(()=>{!ne&&Re&&a&&re(!0)},[ne,Re,a]);const ce=Yt((fe,oe)=>{H==null||H(fe,oe),W()}),X=uB(ae,G,c,b,U,V,$,_);if(!ne)return null;const ue={};return B&&(B.includes("height")&&J?ue.height=J:B.includes("minHeight")&&J&&(ue.minHeight=J),B.includes("width")&&Y?ue.width=Y:B.includes("minWidth")&&Y&&(ue.minWidth=Y)),c||(ue.pointerEvents="none"),p.createElement(E,{open:P||Z,getContainer:F&&(()=>F(a)),autoDestroy:M,onEsc:n},p.createElement(LK,{prefixCls:i,open:c,zIndex:A,mask:de,motion:ge,mobile:ae}),p.createElement(Vs,{onResize:ce,disabled:!c},fe=>p.createElement(Li,Gx({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:P,leavedClassName:`${i}-hidden`},ve,{onAppearPrepare:j,onEnterPrepare:j,visible:c,onVisibleChanged:oe=>{var we;(we=w==null?void 0:w.onVisibleChanged)==null||we.call(w,oe),l(oe)}}),({className:oe,style:we},Be)=>{const Ae=ee(i,oe,s,{[`${i}-mobile`]:ae});return p.createElement("div",{ref:xs(fe,t,Be),className:Ae,style:{"--arrow-x":`${v.x||0}px`,"--arrow-y":`${v.y||0}px`,...X,...ue,...we,boxSizing:"border-box",zIndex:A,...o},onMouseEnter:L,onMouseLeave:D,onPointerEnter:N,onClick:g,onPointerDownCapture:k},C&&p.createElement(AK,{prefixCls:i,arrow:C,arrowPos:v,align:b}),p.createElement(OK,{cache:!c&&!h},te))})),I)}),rC=p.createContext(null),hB=p.createContext(null);function aA(e){return e?Array.isArray(e)?e:[e]:[]}function kK(e,t,n){return p.useMemo(()=>{const r=aA(t??e),s=aA(n??e),i=new Set(r),o=new Set(s);return i.has("hover")&&!i.has("click")&&i.add("touch"),o.has("hover")&&!o.has("click")&&o.add("touch"),[i,o]},[e,t,n])}const fv=(e=>{if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){const{width:t,height:n}=e.getBBox();if(t||n)return!0}if(e.getBoundingClientRect){const{width:t,height:n}=e.getBoundingClientRect();if(t||n)return!0}}return!1});function NK(e=[],t=[],n){const r=(s,i)=>s[i]||"";return n?r(e,0)===r(t,0):r(e,0)===r(t,0)&&r(e,1)===r(t,1)}function pB(e,t,n,r){var o;const{points:s}=n,i=Object.keys(e);for(let a=0;ar.includes(a))&&t.push(n),n=n.parentElement}return t}function Op(e,t=1){return Number.isNaN(e)?t:e}function Fh(e){return Op(parseFloat(e),0)}function lA(e,t){const n={...e};return(t||[]).forEach(r=>{if(r instanceof HTMLBodyElement||r instanceof HTMLHtmlElement)return;const{overflow:s,overflowClipMargin:i,borderTopWidth:o,borderBottomWidth:a,borderLeftWidth:l,borderRightWidth:c}=ng(r).getComputedStyle(r),u=r.getBoundingClientRect(),{offsetHeight:h,clientHeight:g,offsetWidth:m,clientWidth:C}=r,v=Fh(o),b=Fh(a),w=Fh(l),S=Fh(c),x=Op(Math.round(u.width/m*1e3)/1e3),P=Op(Math.round(u.height/h*1e3)/1e3),F=(m-C-w-S)*x,M=(h-g-v-b)*P,E=v*P,I=b*P,A=w*x,L=S*x;let D=0,N=0;if(s==="clip"){const U=Fh(i);D=U*x,N=U*P}const k=u.x+A-D,G=u.y+E-N,$=k+u.width+2*D-A-L-F,_=G+u.height+2*N-E-I-M;n.left=Math.max(n.left,k),n.top=Math.max(n.top,G),n.right=Math.min(n.right,$),n.bottom=Math.min(n.bottom,_)}),n}function cA(e,t=0){const n=`${t}`,r=n.match(/^(.*)\%$/);return r?e*(parseFloat(r[1])/100):parseFloat(n)}function uA(e,t){const[n,r]=t||[];return[cA(e.width,n),cA(e.height,r)]}function dA(e=""){return[e[0],e[1]]}function Eu(e,t){const n=t[0],r=t[1];let s,i;return n==="t"?i=e.y:n==="b"?i=e.y+e.height:i=e.y+e.height/2,r==="l"?s=e.x:r==="r"?s=e.x+e.width:s=e.x+e.width/2,{x:s,y:i}}function za(e,t){const n={t:"b",b:"t",l:"r",r:"l"},r=[...e];return r[t]=n[e[t]]||"c",r}function hA(e){return e.join("")}function gB(e,t,n,r,s,i,o,a){const[l,c]=p.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:s[r]||{}}),u=p.useRef(0),h=p.useMemo(()=>!t||a?[]:Vx(t),[t]),g=p.useRef({});e||(()=>{g.current={}})();const C=Yt(()=>{var w,S;if(t&&n&&e&&!a){let ot=function(Ht,rt,zt=ue){const Pn=$.x+Ht,Yn=$.y+rt,pr=Pn+te,hi=Yn+J,Qr=Math.max(Pn,zt.left),Fs=Math.max(Yn,zt.top),Ys=Math.min(pr,zt.right),yt=Math.min(hi,zt.bottom);return Math.max(0,(Ys-Qr)*(yt-Fs))},Se=function(){ke=$.y+Oe,q=ke+J,Q=$.x+Ce,ie=Q+te};const x=t,P=x.ownerDocument,F=ng(x),{position:M}=F.getComputedStyle(x),E=x.style.left,I=x.style.top,A=x.style.right,L=x.style.bottom,D=x.style.overflow,N={...s[r],...i},k=P.createElement("div");(w=x.parentElement)==null||w.appendChild(k),k.style.left=`${x.offsetLeft}px`,k.style.top=`${x.offsetTop}px`,k.style.position=M,k.style.height=`${x.offsetHeight}px`,k.style.width=`${x.offsetWidth}px`,x.style.left="0",x.style.top="0",x.style.right="auto",x.style.bottom="auto",x.style.overflow="hidden";let G;if(Array.isArray(n))G={x:n[0],y:n[1],width:0,height:0};else{const Ht=n.getBoundingClientRect();Ht.x=Ht.x??Ht.left,Ht.y=Ht.y??Ht.top,G={x:Ht.x,y:Ht.y,width:Ht.width,height:Ht.height}}const $=x.getBoundingClientRect(),{height:_,width:U}=F.getComputedStyle(x);$.x=$.x??$.left,$.y=$.y??$.top;const{clientWidth:V,clientHeight:W,scrollWidth:j,scrollHeight:H,scrollTop:B,scrollLeft:Y}=P.documentElement,J=$.height,te=$.width,Z=G.height,ae=G.width,de={left:0,top:0,right:V,bottom:W},ge={left:-Y,top:-B,right:j-Y,bottom:H-B};let{htmlRegion:ve}=N;const Re="visible",ne="visibleFirst";ve!=="scroll"&&ve!==ne&&(ve=Re);const re=ve===ne,ce=lA(ge,h),X=lA(de,h),ue=ve===Re?X:ce,fe=re?X:ue;x.style.left="auto",x.style.top="auto",x.style.right="0",x.style.bottom="0";const oe=x.getBoundingClientRect();x.style.left=E,x.style.top=I,x.style.right=A,x.style.bottom=L,x.style.overflow=D,(S=x.parentElement)==null||S.removeChild(k);const we=Op(Math.round(te/parseFloat(U)*1e3)/1e3),Be=Op(Math.round(J/parseFloat(_)*1e3)/1e3);if(we===0||Be===0||nd(n)&&!fv(n))return;const{offset:Ae,targetOffset:Pe}=N;let[_e,ze]=uA($,Ae);const[lt,Ft]=uA(G,Pe);G.x-=lt,G.y-=Ft;const[gt,Ye]=N.points||[],Ie=dA(Ye),Ke=dA(gt),De=Eu(G,Ie),je=Eu($,Ke),qe={...N};let Ge=[Ke,Ie],Ce=De.x-je.x+_e,Oe=De.y-je.y+ze;const ut=ot(Ce,Oe),wt=ot(Ce,Oe,X),It=Eu(G,["t","l"]),Gt=Eu($,["t","l"]),Nt=Eu(G,["b","r"]),jt=Eu($,["b","r"]),qt=N.overflow||{},{adjustX:Ot,adjustY:Vt,shiftX:Ve,shiftY:st}=qt,Ue=Ht=>typeof Ht=="boolean"?Ht:Ht>=0;let ke,q,Q,ie;Se();const Te=Ue(Vt),We=Ke[0]===Ie[0];if(Te&&Ke[0]==="t"&&(q>fe.bottom||g.current.bt)){let Ht=Oe;We?Ht-=J-Z:Ht=It.y-jt.y-ze;const rt=ot(Ce,Ht),zt=ot(Ce,Ht,X);rt>ut||rt===ut&&(!re||zt>=wt)?(g.current.bt=!0,Oe=Ht,ze=-ze,Ge=[za(Ge[0],0),za(Ge[1],0)]):g.current.bt=!1}if(Te&&Ke[0]==="b"&&(keut||rt===ut&&(!re||zt>=wt)?(g.current.tb=!0,Oe=Ht,ze=-ze,Ge=[za(Ge[0],0),za(Ge[1],0)]):g.current.tb=!1}const ft=Ue(Ot),Qe=Ke[1]===Ie[1];if(ft&&Ke[1]==="l"&&(ie>fe.right||g.current.rl)){let Ht=Ce;Qe?Ht-=te-ae:Ht=It.x-jt.x-_e;const rt=ot(Ht,Oe),zt=ot(Ht,Oe,X);rt>ut||rt===ut&&(!re||zt>=wt)?(g.current.rl=!0,Ce=Ht,_e=-_e,Ge=[za(Ge[0],1),za(Ge[1],1)]):g.current.rl=!1}if(ft&&Ke[1]==="r"&&(Qut||rt===ut&&(!re||zt>=wt)?(g.current.lr=!0,Ce=Ht,_e=-_e,Ge=[za(Ge[0],1),za(Ge[1],1)]):g.current.lr=!1}qe.points=[hA(Ge[0]),hA(Ge[1])],Se();const Xe=Ve===!0?0:Ve;typeof Xe=="number"&&(QX.right&&(Ce-=ie-X.right-_e,G.x>X.right-Xe&&(Ce+=G.x-X.right+Xe)));const at=st===!0?0:st;typeof at=="number"&&(keX.bottom&&(Oe-=q-X.bottom-ze,G.y>X.bottom-at&&(Oe+=G.y-X.bottom+at)));const ht=$.x+Ce,vt=ht+te,mt=$.y+Oe,Je=mt+J,nt=G.x,pt=nt+ae,xt=G.y,Ct=xt+Z,kt=Math.max(ht,nt),$t=Math.min(vt,pt),wn=(kt+$t)/2-ht,fn=Math.max(mt,xt),mn=Math.min(Je,Ct),Lr=(fn+mn)/2-mt;o==null||o(t,qe);let Xt=oe.right-$.x-(Ce+$.width),hn=oe.bottom-$.y-(Oe+$.height);we===1&&(Ce=Math.floor(Ce),Xt=Math.floor(Xt)),Be===1&&(Oe=Math.floor(Oe),hn=Math.floor(hn));const Xn={ready:!0,offsetX:Ce/we,offsetY:Oe/Be,offsetR:Xt/we,offsetB:hn/Be,arrowX:wn/we,arrowY:Lr/Be,scaleX:we,scaleY:Be,align:qe};c(Xn)}}),v=()=>{u.current+=1;const w=u.current;Promise.resolve().then(()=>{u.current===w&&C()})},b=()=>{c(w=>({...w,ready:!1}))};return on(b,[r]),on(()=>{e||b()},[e]),[l.ready,l.offsetX,l.offsetY,l.offsetR,l.offsetB,l.arrowX,l.arrowY,l.scaleX,l.scaleY,l.align,v]}function fB(){const e=p.useRef(null),t=()=>{e.current&&(clearTimeout(e.current),e.current=null)},n=(r,s)=>{t(),s===0?r():e.current=setTimeout(()=>{r()},s*1e3)};return p.useEffect(()=>()=>{t()},[]),n}function BK(e,t,n,r,s){on(()=>{if(e&&t&&n){let h=function(){r(),s()};const i=t,o=n,a=Vx(i),l=Vx(o),c=ng(o),u=new Set([c,...a,...l]);return u.forEach(g=>{g.addEventListener("scroll",h,{passive:!0})}),c.addEventListener("resize",h,{passive:!0}),r(),()=>{u.forEach(g=>{g.removeEventListener("scroll",h),c.removeEventListener("resize",h)})}}},[e,t,n])}function $K(e,t,n,r,s,i,o,a){const l=p.useRef(e);l.current=e;const c=p.useRef(!1);p.useEffect(()=>{if(t&&r&&(!s||i)){const h=()=>{c.current=!1},g=v=>{var b,w;l.current&&!o(((w=(b=v.composedPath)==null?void 0:b.call(v))==null?void 0:w[0])||v.target)&&!c.current&&a(!1)},m=ng(r);m.addEventListener("pointerdown",h,!0),m.addEventListener("mousedown",g,!0),m.addEventListener("contextmenu",g,!0);const C=nC(n);return C&&(C.addEventListener("mousedown",g,!0),C.addEventListener("contextmenu",g,!0)),()=>{m.removeEventListener("pointerdown",h,!0),m.removeEventListener("mousedown",g,!0),m.removeEventListener("contextmenu",g,!0),C&&(C.removeEventListener("mousedown",g,!0),C.removeEventListener("contextmenu",g,!0))}}},[t,n,r,s,i]);function u(){c.current=!0}return u}function GK(){const[e,t]=K.useState(null),[n,r]=K.useState(!1),[s,i]=K.useState(!1),o=K.useRef(null),a=Yt(c=>{c===!1?(o.current=null,r(!1)):s&&n?o.current=c:(r(!0),t(c),o.current=null,n||i(!0))}),l=Yt(c=>{c?(i(!1),o.current&&(t(o.current),o.current=null)):(i(!1),o.current=null)});return[a,n,e,l]}function Hx(){return Hx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t,isMobile:n,ready:r,open:s,align:i,offsetR:o,offsetB:a,offsetX:l,offsetY:c,arrowPos:u,popupSize:h,motion:g,uniqueContainerClassName:m,uniqueContainerStyle:C}=e,v=`${t}-unique-container`,[b,w]=K.useState(!1),S=uB(n,r,s,i,o,a,l,c),x=K.useRef(S);r&&(x.current=S);const P={};return h&&(P.width=h.width,P.height=h.height),K.createElement(Li,Hx({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,leavedClassName:`${v}-hidden`},g,{visible:s,onVisibleChanged:F=>{w(F)}}),({className:F,style:M})=>{const E=ee(v,F,m,{[`${v}-visible`]:b});return K.createElement("div",{className:E,style:{"--arrow-x":`${(u==null?void 0:u.x)||0}px`,"--arrow-y":`${(u==null?void 0:u.y)||0}px`,...x.current,...P,...M,...C}})})},HK=({children:e,postTriggerProps:t})=>{const[n,r,s,i]=GK(),o=p.useMemo(()=>!s||!t?s:t(s),[s,t]),[a,l]=p.useState(null),[c,u]=p.useState(null),h=p.useRef(null),g=Yt(V=>{h.current=V,nd(V)&&a!==V&&l(V)}),m=p.useRef(null),C=fB(),v=Yt((V,W)=>{m.current=W,C(()=>{n(V)},V.delay)}),b=V=>{C(()=>{var W;(W=m.current)!=null&&W.call(m)||n(!1)},V)},w=Yt(V=>{i(V)}),[S,x,P,F,M,E,I,,,A,L]=gB(r,a,o==null?void 0:o.target,o==null?void 0:o.popupPlacement,(o==null?void 0:o.builtinPlacements)||{},o==null?void 0:o.popupAlign,void 0,!1),D=p.useMemo(()=>{var W;if(!o)return"";const V=pB(o.builtinPlacements||{},o.prefixCls||"",A,!1);return ee(V,(W=o.getPopupClassNameFromAlign)==null?void 0:W.call(o,A))},[A,o==null?void 0:o.getPopupClassNameFromAlign,o==null?void 0:o.builtinPlacements,o==null?void 0:o.prefixCls]),N=p.useMemo(()=>({show:v,hide:b}),[]);p.useEffect(()=>{L()},[o==null?void 0:o.target]);const k=Yt(()=>(L(),Promise.resolve())),G=p.useRef({}),$=p.useContext(rC),_=p.useMemo(()=>({registerSubPopup:(V,W)=>{G.current[V]=W,$==null||$.registerSubPopup(V,W)}}),[$]),U=o==null?void 0:o.prefixCls;return p.createElement(hB.Provider,{value:N},e,o&&p.createElement(rC.Provider,{value:_},p.createElement(dB,{ref:g,portal:gv,onEsc:o.onEsc,prefixCls:U,popup:o.popup,className:ee(o.popupClassName,D,`${U}-unique-controlled`),style:o.popupStyle,target:o.target,open:r,keepDom:!0,fresh:!0,autoDestroy:!1,onVisibleChanged:w,ready:S,offsetX:x,offsetY:P,offsetR:F,offsetB:M,onAlign:L,onPrepare:k,onResize:V=>u({width:V.offsetWidth,height:V.offsetHeight}),arrowPos:{x:E,y:I},align:A,zIndex:o.zIndex,mask:o.mask,arrow:o.arrow,motion:o.popupMotion,maskMotion:o.maskMotion,getPopupContainer:o.getPopupContainer},p.createElement(VK,{prefixCls:U,isMobile:!1,ready:S,open:r,align:A,offsetR:F,offsetB:M,offsetX:x,offsetY:P,arrowPos:{x:E,y:I},popupSize:c,motion:o.popupMotion,uniqueContainerClassName:ee(o.uniqueContainerClassName,D),uniqueContainerStyle:o.uniqueContainerStyle}))))};function zK(e=gv){return p.forwardRef((n,r)=>{const{prefixCls:s="rc-trigger-popup",children:i,action:o="hover",showAction:a,hideAction:l,popupVisible:c,defaultPopupVisible:u,onOpenChange:h,afterOpenChange:g,onPopupVisibleChange:m,afterPopupVisibleChange:C,mouseEnterDelay:v,mouseLeaveDelay:b=.1,focusDelay:w,blurDelay:S,mask:x,maskClosable:P=!0,getPopupContainer:F,forceRender:M,autoDestroy:E,popup:I,popupClassName:A,uniqueContainerClassName:L,uniqueContainerStyle:D,popupStyle:N,popupPlacement:k,builtinPlacements:G={},popupAlign:$,zIndex:_,stretch:U,getPopupClassNameFromAlign:V,fresh:W,unique:j,alignPoint:H,onPopupClick:B,onPopupAlign:Y,arrow:J,popupMotion:te,maskMotion:Z,mobile:ae,...de}=n,ge=E||!1,ve=c===void 0,Re=!!ae,ne=p.useRef({}),re=p.useContext(rC),ce=p.useMemo(()=>({registerSubPopup:(yt,tn)=>{ne.current[yt]=tn,re==null||re.registerSubPopup(yt,tn)}}),[re]),X=p.useContext(hB),ue=ya(),[fe,oe]=p.useState(null),we=p.useRef(null),Be=Yt(yt=>{we.current=yt,nd(yt)&&fe!==yt&&oe(yt),re==null||re.registerSubPopup(ue,yt)}),[Ae,Pe]=p.useState(null),_e=p.useRef(null),ze=Yt(yt=>{const tn=ua(yt);nd(tn)&&Ae!==tn&&(Pe(tn),_e.current=tn)}),lt={},Ft=Yt(yt=>{var Sr,po;const tn=Ae;return(tn==null?void 0:tn.contains(yt))||((Sr=nC(tn))==null?void 0:Sr.host)===yt||yt===tn||(fe==null?void 0:fe.contains(yt))||((po=nC(fe))==null?void 0:po.host)===yt||yt===fe||Object.values(ne.current).some(Qs=>(Qs==null?void 0:Qs.contains(yt))||yt===Qs)}),gt=J?{...J!==!0?J:{}}:null,[Ye,Ie]=ir(u||!1,c),Ke=Ye||!1,De=p.useMemo(()=>{const yt=typeof i=="function"?i({open:Ke}):i;return p.Children.only(yt)},[i,Ke]),je=(De==null?void 0:De.props)||{},qe=Yt(()=>Ke),Ge=Yt((yt=0)=>({popup:I,target:Ae,delay:yt,prefixCls:s,popupClassName:A,uniqueContainerClassName:L,uniqueContainerStyle:D,popupStyle:N,popupPlacement:k,builtinPlacements:G,popupAlign:$,zIndex:_,mask:x,maskClosable:P,popupMotion:te,maskMotion:Z,arrow:gt,getPopupContainer:F,getPopupClassNameFromAlign:V,id:ue,onEsc:wt}));on(()=>{X&&j&&Ae&&!ve&&!re&&(Ke?X.show(Ge(v),qe):X.hide(b))},[Ke,Ae]);const Ce=p.useRef(Ke);Ce.current=Ke;const Oe=Yt(yt=>{to.flushSync(()=>{Ke!==yt&&(Ie(yt),h==null||h(yt),m==null||m(yt))})}),ot=fB(),ut=(yt,tn=0)=>{if(c!==void 0){ot(()=>{Oe(yt)},tn);return}if(X&&j&&ve&&!re){yt?X.show(Ge(tn),qe):X.hide(tn);return}ot(()=>{Oe(yt)},tn)};function wt({top:yt}){yt&&ut(!1)}const[It,Gt]=p.useState(!1);on(yt=>{(!yt||Ke)&&Gt(!0)},[Ke]);const[Nt,jt]=p.useState(null),[qt,Ot]=p.useState(null),Vt=yt=>{Ot([yt.clientX,yt.clientY])},[Ve,st,Ue,ke,q,Q,ie,Se,Te,We,ft]=gB(Ke,fe,H&&qt!==null?qt:Ae,k,G,$,Y,Re),[Qe,Xe]=kK(o,a,l),at=Qe.has("click"),ht=Xe.has("click")||Xe.has("contextMenu"),vt=Yt(()=>{It||ft()});BK(Ke,Ae,fe,vt,()=>{Ce.current&&H&&ht&&ut(!1)}),on(()=>{vt()},[qt,k]),on(()=>{Ke&&!(G!=null&&G[k])&&vt()},[JSON.stringify($)]);const Je=p.useMemo(()=>{const yt=pB(G,s,We,H);return ee(yt,V==null?void 0:V(We))},[We,V,G,s,H]);p.useImperativeHandle(r,()=>({nativeElement:_e.current,popupElement:we.current,forceAlign:vt}));const[nt,pt]=p.useState(0),[xt,Ct]=p.useState(0),kt=()=>{if(U&&Ae){const yt=Ae.getBoundingClientRect();pt(yt.width),Ct(yt.height)}},$t=()=>{kt(),vt()},Tt=yt=>{Gt(!1),ft(),g==null||g(yt),C==null||C(yt)},wn=()=>new Promise(yt=>{kt(),jt(()=>yt)});on(()=>{Nt&&(ft(),Nt(),jt(null))},[Nt]);function fn(yt,tn,Sr,po,Qs){lt[yt]=(kg,..._d)=>{var Sn;(!Qs||!Qs())&&(po==null||po(kg),ut(tn,Sr)),(Sn=je[yt])==null||Sn.call(je,kg,..._d)}}const mn=Qe.has("touch"),cn=Xe.has("touch"),Lr=p.useRef(!1);(mn||cn)&&(lt.onTouchStart=(...yt)=>{var tn;Lr.current=!0,Ce.current&&cn?ut(!1):!Ce.current&&mn&&ut(!0),(tn=je.onTouchStart)==null||tn.call(je,...yt)}),(at||ht)&&(lt.onClick=(yt,...tn)=>{var Sr;Ce.current&&ht?ut(!1):!Ce.current&&at&&(Vt(yt),ut(!0)),(Sr=je.onClick)==null||Sr.call(je,yt,...tn),Lr.current=!1});const Xt=$K(Ke,ht||cn,Ae,fe,x,P,Ft,ut),hn=Qe.has("hover"),Xn=Xe.has("hover");let Ht,rt;const zt=()=>Lr.current;if(hn){const yt=tn=>{Vt(tn)};fn("onMouseEnter",!0,v,yt,zt),fn("onPointerEnter",!0,v,yt,zt),Ht=tn=>{(Ke||It)&&(fe!=null&&fe.contains(tn.target))&&ut(!0,v)},H&&(lt.onMouseMove=tn=>{var Sr;(Sr=je.onMouseMove)==null||Sr.call(je,tn)})}Xn&&(fn("onMouseLeave",!1,b,void 0,zt),fn("onPointerLeave",!1,b,void 0,zt),rt=()=>{ut(!1,b)}),Qe.has("focus")&&fn("onFocus",!0,w),Xe.has("focus")&&fn("onBlur",!1,S),Qe.has("contextMenu")&&(lt.onContextMenu=(yt,...tn)=>{var Sr;Ce.current&&Xe.has("contextMenu")?ut(!1):(Vt(yt),ut(!0)),yt.preventDefault(),(Sr=je.onContextMenu)==null||Sr.call(je,yt,...tn)});const Pn=p.useRef(!1);Pn.current||(Pn.current=M||Ke||It);const Yn={...je,...lt},pr={};["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"].forEach(yt=>{de[yt]&&(pr[yt]=(...tn)=>{var Sr;(Sr=Yn[yt])==null||Sr.call(Yn,...tn),de[yt](...tn)})});const Qr={x:Q,y:ie};Qk(Ke,Ae,$t);const Fs=va(ze,Il(De)),Ys=p.cloneElement(De,{...Yn,...pr,ref:Fs});return p.createElement(p.Fragment,null,Ys,Pn.current&&(!X||!j)&&p.createElement(rC.Provider,{value:ce},p.createElement(dB,{portal:e,ref:Be,prefixCls:s,popup:I,className:ee(A,!Re&&Je),style:N,target:Ae,onMouseEnter:Ht,onMouseLeave:rt,onPointerEnter:Ht,zIndex:_,open:Ke,keepDom:It,fresh:W,onClick:B,onPointerDownCapture:Xt,mask:x,motion:te,maskMotion:Z,onVisibleChanged:Tt,onPrepare:wn,forceRender:M,autoDestroy:ge,getPopupContainer:F,onEsc:wt,align:We,arrow:gt,arrowPos:Qr,ready:Ve,offsetX:st,offsetY:Ue,offsetR:ke,offsetB:q,onAlign:vt,stretch:U,targetWidth:nt/Se,targetHeight:xt/Te,mobile:ae})))})}const mv=zK(gv);function mB(e){return e&&K.isValidElement(e)&&e.type===K.Fragment}const WK=(e,t,n)=>K.isValidElement(e)?K.cloneElement(e,typeof n=="function"?n(e.props||{}):n):t;function Xr(e,t){return WK(e,e,t)}const _K=({children:e})=>{const{getPrefixCls:t}=K.useContext(Kt),n=t();return K.isValidElement(e)?K.createElement(Li,{visible:!0,motionName:`${n}-fade`,motionAppear:!0,motionEnter:!0,motionLeave:!1,removeOnLeave:!1},({style:r,className:s})=>Xr(e,i=>({className:ee(i.className,s),style:{...i.style,...r}}))):e},jf=[null,null];function UK(e){if(jf[0]!==e){const t={};Object.keys(e).forEach(n=>{t[n]={...e[n],dynamicInset:!1}}),jf[0]=e,jf[1]=t}return jf[1]}const CB=({children:e})=>{const t=n=>{const{id:r,builtinPlacements:s,popup:i}=n,o=typeof i=="function"?i():i,a=UK(s);return{...n,getPopupContainer:null,arrow:!1,popup:K.createElement(_K,{key:r},o),builtinPlacements:a}};return K.createElement(HK,{postTriggerProps:t},e)},so=p.createContext(!1),vB=({children:e,disabled:t})=>{const n=p.useContext(so);return p.createElement(so.Provider,{value:t??n},e)},sd=p.createContext(void 0),jK=({children:e,size:t})=>{const n=p.useContext(sd);return p.createElement(sd.Provider,{value:t||n},e)};function KK(){const e=p.useContext(so),t=p.useContext(sd);return{componentDisabled:e,componentSize:t}}function qK(e,t,n){Sd();const r=e||{},s=r.inherit===!1||!t?{...Px,hashed:(t==null?void 0:t.hashed)??Px.hashed,cssVar:t==null?void 0:t.cssVar}:t,i=p.useId();return _c(()=>{var c;if(!e)return t;const o={...s.components};Object.keys(e.components||{}).forEach(u=>{o[u]={...o[u],...e.components[u]}});const a=`css-var-${i.replace(/:/g,"")}`,l={prefix:n==null?void 0:n.prefixCls,...s.cssVar,...r.cssVar,key:((c=r.cssVar)==null?void 0:c.key)||a};return{...s,...r,token:{...s.token,...r.token},components:o,cssVar:l}},[r,s],(o,a)=>o.some((l,c)=>{const u=a[c];return!no(l,u,!0)}))}const pA=p.createContext(!0);function XK(e){const t=p.useContext(pA),{children:n}=e,[,r]=ds(),{motion:s}=r,i=p.useRef(!1);return i.current||(i.current=t!==s),i.current?p.createElement(pA.Provider,{value:s},p.createElement(v8,{motion:s},n)):n}const YK=()=>null,QK=({iconPrefixCls:e,csp:t})=>(Jj(e,t),null),ZK=["getTargetContainer","getPopupContainer","renderEmpty","input","pagination","form","select","button"];let sC,yB,bB,wB;function yw(){return sC||Rp}function JK(){return yB||iv}const e7=e=>{const{prefixCls:t,iconPrefixCls:n,theme:r,holderRender:s}=e;t!==void 0&&(sC=t),n!==void 0&&(yB=n),"holderRender"in e&&(wB=s),r&&(bB=r)},t7=()=>({getPrefixCls:(e,t)=>t||(e?`${yw()}-${e}`:yw()),getIconPrefixCls:JK,getRootPrefixCls:()=>sC||yw(),getTheme:()=>bB,holderRender:wB}),n7=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,alert:s,affix:i,anchor:o,app:a,form:l,locale:c,componentSize:u,direction:h,space:g,splitter:m,virtual:C,dropdownMatchSelectWidth:v,popupMatchSelectWidth:b,popupOverflow:w,legacyLocale:S,parentContext:x,iconPrefixCls:P,theme:F,componentDisabled:M,segmented:E,statistic:I,spin:A,calendar:L,carousel:D,cascader:N,collapse:k,typography:G,checkbox:$,descriptions:_,divider:U,drawer:V,skeleton:W,steps:j,image:H,layout:B,list:Y,mentions:J,modal:te,progress:Z,result:ae,slider:de,breadcrumb:ge,masonry:ve,menu:Re,pagination:ne,input:re,textArea:ce,otp:X,empty:ue,badge:fe,radio:oe,rate:we,ribbon:Be,switch:Ae,transfer:Pe,avatar:_e,message:ze,tag:lt,table:Ft,card:gt,cardMeta:Ye,tabs:Ie,timeline:Ke,timePicker:De,upload:je,notification:qe,tree:Ge,colorPicker:Ce,datePicker:Oe,rangePicker:ot,flex:ut,wave:wt,dropdown:It,warning:Gt,tour:Nt,tooltip:jt,popover:qt,popconfirm:Ot,qrcode:Vt,floatButton:Ve,floatButtonGroup:st,variant:Ue,inputNumber:ke,treeSelect:q,watermark:Q}=e,ie=p.useCallback((nt,pt)=>{const{prefixCls:xt}=e;if(pt)return pt;const Ct=xt||x.getPrefixCls("");return nt?`${Ct}-${nt}`:Ct},[x.getPrefixCls,e.prefixCls]),Se=P||x.iconPrefixCls||iv,Te=n||x.csp,We=qK(F,x.theme,{prefixCls:ie("")}),ft={csp:Te,autoInsertSpaceInButton:r,alert:s,affix:i,anchor:o,app:a,locale:c||S,direction:h,space:g,splitter:m,virtual:C,popupMatchSelectWidth:b??v,popupOverflow:w,getPrefixCls:ie,iconPrefixCls:Se,theme:We,segmented:E,statistic:I,spin:A,calendar:L,carousel:D,cascader:N,collapse:k,typography:G,checkbox:$,descriptions:_,divider:U,drawer:V,skeleton:W,steps:j,image:H,input:re,textArea:ce,otp:X,layout:B,list:Y,mentions:J,modal:te,progress:Z,result:ae,slider:de,breadcrumb:ge,masonry:ve,menu:Re,pagination:ne,empty:ue,badge:fe,radio:oe,rate:we,ribbon:Be,switch:Ae,transfer:Pe,avatar:_e,message:ze,tag:lt,table:Ft,card:gt,cardMeta:Ye,tabs:Ie,timeline:Ke,timePicker:De,upload:je,notification:qe,tree:Ge,colorPicker:Ce,datePicker:Oe,rangePicker:ot,flex:ut,wave:wt,dropdown:It,warning:Gt,tour:Nt,tooltip:jt,popover:qt,popconfirm:Ot,qrcode:Vt,floatButton:Ve,floatButtonGroup:st,variant:Ue,inputNumber:ke,treeSelect:q,watermark:Q},Qe={...x};Object.keys(ft).forEach(nt=>{ft[nt]!==void 0&&(Qe[nt]=ft[nt])}),ZK.forEach(nt=>{const pt=e[nt];pt&&(Qe[nt]=pt)}),typeof r<"u"&&(Qe.button={autoInsertSpace:r,...Qe.button});const Xe=_c(()=>Qe,Qe,(nt,pt)=>{const xt=Object.keys(nt),Ct=Object.keys(pt);return xt.length!==Ct.length||xt.some(kt=>nt[kt]!==pt[kt])}),{layer:at}=p.useContext(eg),ht=p.useMemo(()=>({prefixCls:Se,csp:Te,layer:at?"antd":void 0}),[Se,Te,at]);let vt=p.createElement(p.Fragment,null,p.createElement(QK,{iconPrefixCls:Se,csp:Te}),p.createElement(YK,{dropdownMatchSelectWidth:v}),t);const mt=p.useMemo(()=>{var nt,pt,xt,Ct;return $u(((nt=To.Form)==null?void 0:nt.defaultValidateMessages)||{},((xt=(pt=Xe.locale)==null?void 0:pt.Form)==null?void 0:xt.defaultValidateMessages)||{},((Ct=Xe.form)==null?void 0:Ct.validateMessages)||{},(l==null?void 0:l.validateMessages)||{})},[Xe,l==null?void 0:l.validateMessages]);Object.keys(mt).length>0&&(vt=p.createElement(bK.Provider,{value:mt},vt)),c&&(vt=p.createElement(W8,{locale:c,_ANT_MARK__:z8},vt)),vt=p.createElement(NE.Provider,{value:ht},vt),u&&(vt=p.createElement(jK,{size:u},vt)),vt=p.createElement(XK,null,vt),jt!=null&&jt.unique&&(vt=p.createElement(CB,null,vt));const Je=p.useMemo(()=>{const{algorithm:nt,token:pt,components:xt,cssVar:Ct,...kt}=We||{},$t=nt&&(!Array.isArray(nt)||nt.length>0)?lx(nt):MN,Tt={};Object.entries(xt||{}).forEach(([fn,mn])=>{const cn={...mn};"algorithm"in cn&&(cn.algorithm===!0?cn.theme=$t:(Array.isArray(cn.algorithm)||typeof cn.algorithm=="function")&&(cn.theme=lx(cn.algorithm)),delete cn.algorithm),Tt[fn]=cn});const wn={...Ip,...pt};return{...kt,theme:$t,token:wn,components:Tt,override:{override:wn,...Tt},cssVar:Ct}},[We]);return F&&(vt=p.createElement(IN.Provider,{value:Je},vt)),Xe.warning&&(vt=p.createElement(aU.Provider,{value:Xe.warning},vt)),M!==void 0&&(vt=p.createElement(vB,{disabled:M},vt)),p.createElement(Kt.Provider,{value:Xe},vt)},ba=e=>{const t=p.useContext(Kt),n=p.useContext($E);return p.createElement(n7,{parentContext:t,legacyLocale:n,...e})};ba.ConfigContext=Kt;ba.SizeContext=sd;ba.config=e7;ba.useConfig=KK;Object.defineProperty(ba,"SizeContext",{get:()=>sd});const Et={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,CAPS_LOCK:20,ESC:27,SPACE:32,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,N:78,P:80,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,SEMICOLON:186,EQUALS:187,WIN_KEY:224};var r7={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"};function zx(){return zx=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,zx({},e,{ref:t,icon:r7})),Cv=p.forwardRef(s7),iC="__rc_react_root__";function SB(e,t){const n=t[iC]||Fk.createRoot(t);n.render(e),t[iC]=n}async function xB(e){return Promise.resolve().then(()=>{var t;(t=e[iC])==null||t.unmount(),delete e[iC]})}const bw=()=>({height:0,opacity:0}),gA=e=>{const{scrollHeight:t}=e;return{height:t,opacity:1}},i7=e=>({height:e?e.offsetHeight:0}),ww=(e,t)=>(t==null?void 0:t.deadline)===!0||t.propertyName==="height",RB=(e=Rp)=>({motionName:`${e}-motion-collapse`,onAppearStart:bw,onEnterStart:bw,onAppearActive:gA,onEnterActive:gA,onLeaveStart:i7,onLeaveActive:bw,onAppearEnd:ww,onEnterEnd:ww,onLeaveEnd:ww,motionDeadline:500}),Ic=(e,t,n)=>n!==void 0?n:`${e}-${t}`,o7=e=>{const{componentCls:t,colorPrimary:n,motionDurationSlow:r,motionEaseInOut:s,motionEaseOutCirc:i,antCls:o}=e,[,a]=br(o,"wave");return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:a("color",n),boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:["box-shadow 0.4s","opacity 2s"].map(l=>`${l} ${i}`).join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:["box-shadow","opacity"].map(l=>`${l} ${r} ${s}`).join(",")}}}}},a7=Qj("Wave",o7),vv=`${Rp}-wave-target`;function fA(e){return e&&typeof e=="string"&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"&&e!=="canvastext"}function l7(e,t=null){const n=getComputedStyle(e),{borderTopColor:r,borderColor:s,backgroundColor:i}=n;return t&&fA(n[t])?n[t]:[r,s,i].find(fA)??null}function Sw(e){return Number.isNaN(e)?0:e}const c7=e=>{const{className:t,target:n,component:r,colorSource:s}=e,i=p.useRef(null),{getPrefixCls:o}=p.useContext(Kt),a=o(),[l]=br(a,"wave"),[c,u]=p.useState(null),[h,g]=p.useState([]),[m,C]=p.useState(0),[v,b]=p.useState(0),[w,S]=p.useState(0),[x,P]=p.useState(0),[F,M]=p.useState(!1),E={left:m,top:v,width:w,height:x,borderRadius:h.map(L=>`${L}px`).join(" ")};c&&(E[l("color")]=c);function I(){const L=getComputedStyle(n);u(l7(n,s));const D=L.position==="static",{borderLeftWidth:N,borderTopWidth:k}=L;C(D?n.offsetLeft:Sw(-Number.parseFloat(N))),b(D?n.offsetTop:Sw(-Number.parseFloat(k))),S(n.offsetWidth),P(n.offsetHeight);const{borderTopLeftRadius:G,borderTopRightRadius:$,borderBottomLeftRadius:_,borderBottomRightRadius:U}=L;g([G,$,U,_].map(V=>Sw(Number.parseFloat(V))))}if(p.useEffect(()=>{if(n){const L=dn(()=>{I(),M(!0)});let D;return typeof ResizeObserver<"u"&&(D=new ResizeObserver(I),D.observe(n)),()=>{dn.cancel(L),D==null||D.disconnect()}}},[n]),!F)return null;const A=(r==="Checkbox"||r==="Radio")&&(n==null?void 0:n.classList.contains(vv));return p.createElement(Li,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(L,D)=>{var N;if(D.deadline||D.propertyName==="opacity"){const k=(N=i.current)==null?void 0:N.parentElement;xB(k).then(()=>{k==null||k.remove()})}return!1}},({className:L},D)=>p.createElement("div",{ref:xs(i,D),className:ee(t,L,{"wave-quick":A}),style:E}))},u7=(e,t)=>{var s;const{component:n}=t;if(n==="Checkbox"&&!((s=e.querySelector("input"))!=null&&s.checked))return;const r=document.createElement("div");r.style.position="absolute",r.style.left="0px",r.style.top="0px",e==null||e.insertBefore(r,e==null?void 0:e.firstChild),SB(p.createElement(c7,{...t,target:e}),r)},d7=(e,t,n,r)=>{const{wave:s}=p.useContext(Kt),[,i,o]=ds(),a=Yt(u=>{const h=e.current;if(s!=null&&s.disabled||!h)return;const g=h.querySelector(`.${vv}`)||h,{showEffect:m}=s||{};(m||u7)(g,{className:t,token:i,component:n,event:u,hashId:o,colorSource:r})}),l=p.useRef(null);return p.useEffect(()=>()=>{dn.cancel(l.current)},[]),u=>{dn.cancel(l.current),l.current=dn(()=>{a(u)})}},VE=e=>{const{children:t,disabled:n,component:r,colorSource:s}=e,{getPrefixCls:i}=p.useContext(Kt),o=p.useRef(null),a=i("wave"),l=a7(a),c=d7(o,ee(a,l),r,s);if(K.useEffect(()=>{const h=o.current;if(!h||h.nodeType!==window.Node.ELEMENT_NODE||n)return;const g=m=>{!fv(m.target)||!h.getAttribute||h.getAttribute("disabled")||h.disabled||h.className.includes("disabled")&&!h.className.includes("disabled:")||h.getAttribute("aria-disabled")==="true"||h.className.includes("-leave")||c(m)};return h.addEventListener("click",g,!0),()=>{h.removeEventListener("click",g,!0)}},[n]),!K.isValidElement(t))return t??null;const u=ca(t)?xs(Il(t),o):o;return Xr(t,{ref:u})},Oi=e=>{const t=K.useContext(sd);return K.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},h7=e=>{const{componentCls:t}=e;return{[t]:{display:"inline-flex","&-block":{display:"flex",width:"100%"},"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"}}}},p7=Ln(["Space","Compact"],e=>[h7(e)],()=>({}),{resetStyle:!1}),yv=p.createContext(null),qc=(e,t)=>{const n=p.useContext(yv),r=p.useMemo(()=>{if(!n)return"";const{compactDirection:s,isFirstItem:i,isLastItem:o}=n,a=s==="vertical"?"-vertical-":"-";return ee(`${e}-compact${a}item`,{[`${e}-compact${a}first-item`]:i,[`${e}-compact${a}last-item`]:o,[`${e}-compact${a}item-rtl`]:t==="rtl"})},[e,t,n]);return{compactSize:n==null?void 0:n.compactSize,compactDirection:n==null?void 0:n.compactDirection,compactItemClassnames:r}},g7=e=>{const{children:t}=e;return p.createElement(yv.Provider,{value:null},t)},f7=e=>{const{children:t,...n}=e;return p.createElement(yv.Provider,{value:p.useMemo(()=>n,[n])},t)},EB=e=>{const{getPrefixCls:t,direction:n}=p.useContext(Kt),{size:r,direction:s,orientation:i,block:o,prefixCls:a,className:l,rootClassName:c,children:u,vertical:h,...g}=e,[m,C]=GE(i,h,s),v=Oi(M=>r??M),b=t("space-compact",a),[w]=p7(b),S=ee(b,w,{[`${b}-rtl`]:n==="rtl",[`${b}-block`]:o,[`${b}-vertical`]:C},l,c),x=p.useContext(yv),P=Tr(u),F=p.useMemo(()=>P.map((M,E)=>{const I=(M==null?void 0:M.key)||`${b}-item-${E}`;return p.createElement(f7,{key:I,compactSize:v,compactDirection:m,isFirstItem:E===0&&(!x||(x==null?void 0:x.isFirstItem)),isLastItem:E===P.length-1&&(!x||(x==null?void 0:x.isLastItem))},M)}),[P,x,m,v,b]);return P.length===0?null:p.createElement("div",{className:S,...g},F)},PB=p.createContext(void 0),m7=e=>{const{getPrefixCls:t,direction:n}=p.useContext(Kt),{prefixCls:r,size:s,className:i,...o}=e,a=t("btn-group",r),[,,l]=ds(),c=p.useMemo(()=>{switch(s){case"large":return"lg";case"small":return"sm";default:return""}},[s]),u=ee(a,{[`${a}-${c}`]:c,[`${a}-rtl`]:n==="rtl"},i,l);return p.createElement(PB.Provider,{value:s},p.createElement("div",{...o,className:u}))},mA=/^[\u4E00-\u9FA5]{2}$/,Wx=mA.test.bind(mA);function FB(e){return e==="danger"?{danger:!0}:{type:e}}function CA(e){return typeof e=="string"}function xw(e){return e==="text"||e==="link"}function C7(e,t,n,r){if(!qs(e)||e==="")return;const s=t?" ":"";return typeof e!="string"&&typeof e!="number"&&CA(e.type)&&Wx(e.props.children)?Xr(e,i=>{const o=ee(i.className,r)||void 0,a={...n,...i.style};return{...i,children:i.children.split("").join(s),className:o,style:a}}):CA(e)?K.createElement("span",{className:r,style:n},Wx(e)?e.split("").join(s):e):mB(e)?K.createElement("span",{className:r,style:n},e):Xr(e,i=>({...i,className:ee(i.className,r)||void 0,style:{...i.style,...n}}))}function v7(e,t,n,r){let s=!1;const i=[];return K.Children.forEach(e,o=>{const a=typeof o,l=a==="string"||a==="number";if(s&&l){const c=i.length-1,u=i[c];i[c]=`${u}${o}`}else i.push(o);s=l}),K.Children.map(i,o=>C7(o,t,n,r))}["default","primary","danger"].concat(nn(vl));const TB=p.forwardRef((e,t)=>{const{className:n,style:r,children:s,prefixCls:i}=e,o=ee(`${i}-icon`,n);return K.createElement("span",{ref:t,className:o,style:r},s)}),vA=p.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:s,iconClassName:i}=e,o=ee(`${n}-loading-icon`,r);return K.createElement(TB,{prefixCls:n,className:o,style:s,ref:t},K.createElement(Cv,{className:i}))}),Rw=()=>({width:0,opacity:0,transform:"scale(0)"}),Ew=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),y7=e=>{const{prefixCls:t,loading:n,existIcon:r,className:s,style:i,mount:o}=e,a=!!n;return r?K.createElement(vA,{prefixCls:t,className:s,style:i}):K.createElement(Li,{visible:a,motionName:`${t}-loading-icon-motion`,motionAppear:!o,motionEnter:!o,motionLeave:!o,removeOnLeave:!0,onAppearStart:Rw,onAppearActive:Ew,onEnterStart:Rw,onEnterActive:Ew,onLeaveStart:Ew,onLeaveActive:Rw},({className:l,style:c},u)=>{const h={...i,...c};return K.createElement(vA,{prefixCls:t,className:ee(s,l),style:h,ref:u})})},yA=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),b7=e=>{const{componentCls:t,fontSize:n,lineWidth:r,groupBorderColor:s,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(r).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:n}},yA(`${t}-primary`,s),yA(`${t}-danger`,i)]}},Pw=e=>Math.round(Number(e||0)),w7=e=>{if(e instanceof Mn)return e;if(e&&typeof e=="object"&&"h"in e&&"b"in e){const{b:t,...n}=e;return{...n,v:t}}return typeof e=="string"&&/hsb/.test(e)?e.replace(/hsb/,"hsv"):e};class kp extends Mn{constructor(t){super(w7(t))}toHsbString(){const t=this.toHsb(),n=Pw(t.s*100),r=Pw(t.b*100),s=Pw(t.h),i=t.a,o=`hsb(${s}, ${n}%, ${r}%)`,a=`hsba(${s}, ${n}%, ${r}%, ${i.toFixed(i===0?0:2)})`;return i===1?o:a}toHsb(){const{v:t,...n}=this.toHsv();return{...n,b:t,a:this.a}}}const S7=e=>e instanceof kp?e:new kp(e);S7("#1677ff");const x7=(e,t)=>(e==null?void 0:e.replace(/[^0-9a-f]/gi,"").slice(0,t?8:6))||"",R7=(e,t)=>e?x7(e,t):"";let _x=(function(){function e(t){var r;if(Uc(this,e),this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)==null?void 0:r.map(s=>({color:new e(s.color),percent:s.percent})),this.cleared=t.cleared;return}const n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:s,percent:i})=>({color:new e(s),percent:i})),this.metaColor=new kp(this.colors[0].color.metaColor)):this.metaColor=new kp(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return jc(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return R7(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){const{colors:n}=this;return n?`linear-gradient(90deg, ${n.map(s=>`${s.color.toRgbString()} ${s.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(n){return!n||this.isGradient()!==n.isGradient()?!1:this.isGradient()?this.colors.length===n.colors.length&&this.colors.every((r,s)=>{const i=n.colors[s];return r.percent===i.percent&&r.color.equals(i.color)}):this.toHexString()===n.toHexString()}}])})();var E7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};function Ux(){return Ux=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,Ux({},e,{ref:t,icon:E7})),jx=p.forwardRef(P7);function Ri(){return Ri=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{componentCls:t,antCls:n,motionDurationMid:r,motionEaseInOut:s}=e;return{[t]:{[`${n}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`${["height","opacity"].map(i=>`${i} ${r} ${s}`).join(", ")} !important`}},[`${n}-motion-collapse`]:{overflow:"hidden",transition:`${["height","opacity"].map(i=>`${i} ${r} ${s}`).join(", ")} !important`}}}},F7=e=>({animationDuration:e,animationFillMode:"both"}),T7=e=>({animationDuration:e,animationFillMode:"both"}),bv=(e,t,n,r,s=!1)=>{const i=s?"&":"";return{[` ${i}${e}-enter, ${i}${e}-appear `]:{...F7(r),animationPlayState:"paused"},[`${i}${e}-leave`]:{...T7(r),animationPlayState:"paused"},[` ${i}${e}-enter${e}-enter-active, ${i}${e}-appear${e}-appear-active `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:n,animationPlayState:"running",pointerEvents:"none"}}},M7=new yn("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),I7=new yn("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),IB=(e,t=!1)=>{const{antCls:n}=e,r=`${n}-fade`,s=t?"&":"";return[bv(r,M7,I7,e.motionDurationMid,t),{[` ${s}${r}-enter, ${s}${r}-appear `]:{opacity:0,animationTimingFunction:"linear"},[`${s}${r}-leave`]:{animationTimingFunction:"linear"}}]},D7=new yn("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),A7=new yn("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),L7=new yn("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),O7=new yn("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),k7=new yn("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),N7=new yn("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),B7=new yn("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),$7=new yn("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),G7={"move-up":{inKeyframes:B7,outKeyframes:$7},"move-down":{inKeyframes:D7,outKeyframes:A7},"move-left":{inKeyframes:L7,outKeyframes:O7},"move-right":{inKeyframes:k7,outKeyframes:N7}},oC=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:s,outKeyframes:i}=G7[t];return[bv(r,s,i,e.motionDurationMid),{[` ${r}-enter, ${r}-appear `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},HE=new yn("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),zE=new yn("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),WE=new yn("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),_E=new yn("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),V7=new yn("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),H7=new yn("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),z7=new yn("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),W7=new yn("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),_7={"slide-up":{inKeyframes:HE,outKeyframes:zE},"slide-down":{inKeyframes:WE,outKeyframes:_E},"slide-left":{inKeyframes:V7,outKeyframes:H7},"slide-right":{inKeyframes:z7,outKeyframes:W7}},yl=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:s,outKeyframes:i}=_7[t];return[bv(r,s,i,e.motionDurationMid),{[` ${r}-enter, ${r}-appear `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]},U7=new yn("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),j7=new yn("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),bA=new yn("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),wA=new yn("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),K7=new yn("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),q7=new yn("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),X7=new yn("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),Y7=new yn("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),Q7=new yn("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),Z7=new yn("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),J7=new yn("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),e9=new yn("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),t9={zoom:{inKeyframes:U7,outKeyframes:j7},"zoom-big":{inKeyframes:bA,outKeyframes:wA},"zoom-big-fast":{inKeyframes:bA,outKeyframes:wA},"zoom-left":{inKeyframes:X7,outKeyframes:Y7},"zoom-right":{inKeyframes:Q7,outKeyframes:Z7},"zoom-up":{inKeyframes:K7,outKeyframes:q7},"zoom-down":{inKeyframes:J7,outKeyframes:e9}},wv=(e,t)=>{const{antCls:n}=e,r=`${n}-${t}`,{inKeyframes:s,outKeyframes:i}=t9[t];return[bv(r,s,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` ${r}-enter, ${r}-appear `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${r}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]},n9=e=>e instanceof _x?e:new _x(e),r9=(e,t)=>{const{r:n,g:r,b:s,a:i}=e.toRgb(),o=new kp(e.toRgbString()).onBackground(t).toHsv();return i<=.5?o.v>.5:n*.299+r*.587+s*.114>192},DB=e=>{const{paddingInline:t,onlyIconSize:n,borderColorDisabled:r}=e;return En(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:n,colorBorderDisabled:r})},AB=e=>{const t=e.contentFontSize??e.fontSize,n=e.contentFontSizeSM??e.fontSize,r=e.contentFontSizeLG??e.fontSizeLG,s=e.contentLineHeight??Tm(t),i=e.contentLineHeightSM??Tm(n),o=e.contentLineHeightLG??Tm(r),a=r9(new _x(e.colorBgSolid),"#fff")?"#000":"#fff",l=vl.reduce((h,g)=>({...h,[`${g}ShadowColor`]:`0 ${he(e.controlOutlineWidth)} 0 ${_h(e[`${g}1`],e.colorBgContainer)}`}),{}),c=e.colorBgContainerDisabled,u=e.colorBgContainerDisabled;return{...l,fontWeight:400,iconGap:e.marginXS,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorderDisabled,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:a,contentFontSize:t,contentFontSizeSM:n,contentFontSizeLG:r,contentLineHeight:s,contentLineHeightSM:i,contentLineHeightLG:o,paddingBlock:Math.max((e.controlHeight-t*s)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-n*i)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-r*o)/2-e.lineWidth,0),defaultBgDisabled:c,dashedBgDisabled:u}},s9=e=>{const{componentCls:t,antCls:n,lineWidth:r}=e,[s,i]=br(n,"btn");return{[t]:[{[s("border-width")]:r,[s("border-color")]:"#000",[s("border-color-hover")]:i("border-color"),[s("border-color-active")]:i("border-color"),[s("border-color-disabled")]:i("border-color"),[s("border-style")]:"solid",[s("text-color")]:"#000",[s("text-color-hover")]:i("text-color"),[s("text-color-active")]:i("text-color"),[s("text-color-disabled")]:i("text-color"),[s("bg-color")]:"#ddd",[s("bg-color-hover")]:i("bg-color"),[s("bg-color-active")]:i("bg-color"),[s("bg-color-disabled")]:e.colorBgContainerDisabled,[s("bg-color-container")]:e.colorBgContainer,[s("shadow")]:"none"},{border:[i("border-width"),i("border-style"),i("border-color")].join(" "),color:i("text-color"),backgroundColor:i("bg-color"),[`&:not(:disabled):not(${t}-disabled)`]:{"&:hover":{border:[i("border-width"),i("border-style"),i("border-color-hover")].join(" "),color:i("text-color-hover"),backgroundColor:i("bg-color-hover")},"&:active":{border:[i("border-width"),i("border-style"),i("border-color-active")].join(" "),color:i("text-color-active"),backgroundColor:i("bg-color-active")}}},{[`&${t}-variant-solid`]:{[s("solid-bg-color")]:i("color-base"),[s("solid-bg-color-hover")]:i("color-hover"),[s("solid-bg-color-active")]:i("color-active"),[s("border-color")]:"transparent",[s("text-color")]:e.colorTextLightSolid,[s("bg-color")]:i("solid-bg-color"),[s("bg-color-hover")]:i("solid-bg-color-hover"),[s("bg-color-active")]:i("solid-bg-color-active"),boxShadow:i("shadow")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[s("border-color")]:i("color-base"),[s("border-color-hover")]:i("color-hover"),[s("border-color-active")]:i("color-active"),[s("bg-color")]:i("bg-color-container"),[s("text-color")]:i("color-base"),[s("text-color-hover")]:i("color-hover"),[s("text-color-active")]:i("color-active"),boxShadow:i("shadow")},[`&${t}-variant-dashed`]:{[s("border-style")]:"dashed",[s("bg-color-disabled")]:e.dashedBgDisabled},[`&${t}-variant-filled`]:{[s("border-color")]:"transparent",[s("text-color")]:i("color-base"),[s("bg-color")]:i("color-light"),[s("bg-color-hover")]:i("color-light-hover"),[s("bg-color-active")]:i("color-light-active")},[`&${t}-variant-text, &${t}-variant-link`]:{[s("border-color")]:"transparent",[s("text-color")]:i("color-base"),[s("text-color-hover")]:i("color-hover"),[s("text-color-active")]:i("color-active"),[s("bg-color")]:"transparent",[s("bg-color-hover")]:"transparent",[s("bg-color-active")]:"transparent",[`&:disabled, &${e.componentCls}-disabled`]:{background:"transparent",borderColor:"transparent"}},[`&${t}-variant-text`]:{[s("bg-color-hover")]:i("color-light"),[s("bg-color-active")]:i("color-light-active")}},{[`&${t}-variant-link`]:{[s("color-base")]:e.colorLink,[s("color-hover")]:e.colorLinkHover,[s("color-active")]:e.colorLinkActive,[s("bg-color-hover")]:e.linkHoverBg},[`&${t}-color-primary`]:{[s("color-base")]:e.colorPrimary,[s("color-hover")]:e.colorPrimaryHover,[s("color-active")]:e.colorPrimaryActive,[s("color-light")]:e.colorPrimaryBg,[s("color-light-hover")]:e.colorPrimaryBgHover,[s("color-light-active")]:e.colorPrimaryBorder,[s("shadow")]:e.primaryShadow,[`&${t}-variant-solid`]:{[s("text-color")]:e.primaryColor,[s("text-color-hover")]:i("text-color"),[s("text-color-active")]:i("text-color")}},[`&${t}-color-dangerous`]:{[s("color-base")]:e.colorError,[s("color-hover")]:e.colorErrorHover,[s("color-active")]:e.colorErrorActive,[s("color-light")]:e.colorErrorBg,[s("color-light-hover")]:e.colorErrorBgFilledHover,[s("color-light-active")]:e.colorErrorBgActive,[s("shadow")]:e.dangerShadow,[`&${t}-variant-solid`]:{[s("text-color")]:e.dangerColor,[s("text-color-hover")]:i("text-color"),[s("text-color-active")]:i("text-color")}},[`&${t}-color-default`]:{[s("solid-bg-color")]:e.colorBgSolid,[s("solid-bg-color-hover")]:e.colorBgSolidHover,[s("solid-bg-color-active")]:e.colorBgSolidActive,[s("color-base")]:e.defaultBorderColor,[s("color-hover")]:e.defaultHoverBorderColor,[s("color-active")]:e.defaultActiveBorderColor,[s("color-light")]:e.colorFillTertiary,[s("color-light-hover")]:e.colorFillSecondary,[s("color-light-active")]:e.colorFill,[s("text-color")]:e.defaultColor,[s("text-color-hover")]:e.defaultHoverColor,[s("text-color-active")]:e.defaultActiveColor,[s("shadow")]:e.defaultShadow,[`&${t}-variant-outlined`]:{[s("bg-color-disabled")]:e.defaultBgDisabled},[`&${t}-variant-solid`]:{[s("text-color")]:e.solidTextColor,[s("text-color-hover")]:i("text-color"),[s("text-color-active")]:i("text-color")},[`&${t}-variant-filled, &${t}-variant-text`]:{[s("text-color-hover")]:i("text-color"),[s("text-color-active")]:i("text-color")},[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[s("text-color")]:e.defaultColor,[s("text-color-hover")]:e.defaultHoverColor,[s("text-color-active")]:e.defaultActiveColor,[s("bg-color-container")]:e.defaultBg,[s("bg-color-hover")]:e.defaultHoverBg,[s("bg-color-active")]:e.defaultActiveBg},[`&${t}-variant-text`]:{[s("text-color")]:e.textTextColor,[s("text-color-hover")]:e.textTextHoverColor,[s("text-color-active")]:e.textTextActiveColor,[s("bg-color-hover")]:e.textHoverBg},[`&${t}-background-ghost`]:{[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[s("text-color")]:e.defaultGhostColor,[s("border-color")]:e.defaultGhostBorderColor}}}},vl.map(o=>{const a=e[`${o}6`],l=e[`${o}1`],c=e[`${o}Hover`],u=e[`${o}2`],h=e[`${o}3`],g=e[`${o}Active`],m=e[`${o}ShadowColor`];return{[`&${t}-color-${o}`]:{[s("color-base")]:a,[s("color-hover")]:c,[s("color-active")]:g,[s("color-light")]:l,[s("color-light-hover")]:u,[s("color-light-active")]:h,[s("shadow")]:m}}}),{[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",borderColor:e.colorBorderDisabled,background:i("bg-color-disabled"),color:e.colorTextDisabled,boxShadow:"none"}},{[`&${t}-background-ghost`]:{[s("bg-color")]:e.ghostBg,[s("bg-color-hover")]:e.ghostBg,[s("bg-color-active")]:e.ghostBg,[s("shadow")]:"none",[`&${t}-variant-outlined, &${t}-variant-dashed`]:{[s("bg-color-hover")]:e.ghostBg,[s("bg-color-active")]:e.ghostBg}}}]}},i9=e=>{const{componentCls:t,iconCls:n,fontWeight:r,opacityLoading:s,motionDurationSlow:i,motionEaseInOut:o,iconGap:a,calc:l}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:a,alignItems:"center",justifyContent:"center",fontWeight:r,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation","&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:dv(),"> a":{color:"currentColor"},"&:not(:disabled)":Fo(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${n})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"}},[`&${t}-loading`]:{opacity:s,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${o}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(a).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(a).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(a).mul(-1).equal()}}}}}},o9=e=>({minWidth:e.controlHeight,paddingInline:0,borderRadius:"50%"}),UE=(e,t="")=>{const{componentCls:n,controlHeight:r,fontSize:s,borderRadius:i,buttonPaddingHorizontal:o,iconCls:a,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:s,height:r,padding:`${he(l)} ${he(o)}`,borderRadius:i,[`&${n}-icon-only`]:{width:r,[a]:{fontSize:c}}}},{[`${n}${n}-circle${t}`]:o9(e)},{[`${n}${n}-round${t}`]:{borderRadius:e.controlHeight,[`&:not(${n}-icon-only)`]:{paddingInline:e.buttonPaddingHorizontal}}}]},a9=e=>{const t=En(e,{fontSize:e.contentFontSize});return UE(t,e.componentCls)},l9=e=>{const t=En(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return UE(t,`${e.componentCls}-sm`)},c9=e=>{const t=En(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return UE(t,`${e.componentCls}-lg`)},u9=e=>{const{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},d9=Ln("Button",e=>{const t=DB(e);return[i9(t),a9(t),l9(t),c9(t),u9(t),s9(t),b7(t)]},AB,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function h9(e,t,n,r){const{focusElCls:s,focus:i,borderElCls:o}=n,a=o?"> *":"",l=["hover",i?"focus":null,"active"].filter(Boolean).map(c=>`&:${c} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${r}-status-success)`]:{zIndex:2},"&-item":{[l]:{zIndex:3},...s?{[`&${s}`]:{zIndex:3}}:{},[`&[disabled] ${a}`]:{zIndex:0}}}}function p9(e,t,n){const{borderElCls:r}=n,s=r?`> ${r}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${s}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${s}, &${e}-sm ${s}, &${e}-lg ${s}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${s}, &${e}-sm ${s}, &${e}-lg ${s}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Sv(e,t={focus:!0}){const{componentCls:n}=e,{componentCls:r}=t,s=r||n,i=`${s}-compact`;return{[i]:{...h9(e,i,t,s),...p9(s,i,t)}}}function g9(e,t,n){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},[`&-item:not(${n}-status-success)`]:{zIndex:2},"&-item":{"&:hover,&:focus,&:active":{zIndex:3},"&[disabled]":{zIndex:0}}}}function f9(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function m9(e){const t=`${e.componentCls}-compact-vertical`;return{[t]:{...g9(e,t,e.componentCls),...f9(e.componentCls,t)}}}const C9=e=>{const{antCls:t,componentCls:n,lineWidth:r,calc:s,colorBgContainer:i}=e,o=`${n}-variant-solid:not([disabled])`,a=s(r).mul(-1).equal(),[l,c]=br(t,"btn"),u=h=>({[`${n}-compact${h?"-vertical":""}-item`]:{[l("compact-connect-border-color")]:c("bg-color-hover"),[`&${o}`]:{transition:"none",[`& + ${o}:before`]:[{position:"absolute",backgroundColor:c("compact-connect-border-color"),content:'""'},h?{top:a,insetInline:a,height:r}:{insetBlock:a,insetInlineStart:a,width:r}],"&:hover:before":{display:"none"}}}});return[u(),u(!0),{[`${o}${n}-color-default`]:{[l("compact-connect-border-color")]:`color-mix(in srgb, ${c("bg-color-hover")} 75%, ${i})`}}]},v9=kE(["Button","compact"],e=>{const t=DB(e);return[Sv(t),m9(t),C9(t)]},AB);function y9(e){if(typeof e=="object"&&e){let t=e==null?void 0:e.delay;return t=!Number.isNaN(t)&&typeof t=="number"?t:0,{loading:t<=0,delay:t}}return{loading:!!e,delay:0}}const b9={default:["default","outlined"],primary:["primary","solid"],dashed:["default","dashed"],link:["link","link"],text:["default","text"]},w9=K.forwardRef((e,t)=>{const{_skipSemantic:n,loading:r=!1,prefixCls:s,color:i,variant:o,type:a,danger:l=!1,shape:c,size:u,disabled:h,className:g,rootClassName:m,children:C,icon:v,iconPosition:b,iconPlacement:w,ghost:S=!1,block:x=!1,htmlType:P="button",classNames:F,styles:M,style:E,autoInsertSpace:I,autoFocus:A,...L}=e,D=Tr(C),N=a||"default",{getPrefixCls:k,direction:G,autoInsertSpace:$,className:_,style:U,classNames:V,styles:W,loadingIcon:j,shape:H,color:B,variant:Y}=Hn("button"),J=c||H||"default",[te,Z]=p.useMemo(()=>{if(i&&o)return[i,o];if(a||l){const st=b9[N]||[];return l?["danger",st[1]]:st}return B&&Y?[B,Y]:["default","outlined"]},[i,o,a,l,B,Y,N]),[ae,de]=p.useMemo(()=>S&&Z==="solid"?[te,"outlined"]:[te,Z],[te,Z,S]),ge=ae==="danger",ve=ge?"dangerous":ae,Re=I??$??!0,ne=k("btn",s),[re,ce]=d9(ne),X=p.useContext(so),ue=h??X,fe=p.useContext(PB),oe=p.useMemo(()=>y9(r),[r]),[we,Be]=p.useState(oe.loading),[Ae,Pe]=p.useState(!1),_e=p.useRef(null),ze=va(t,_e),lt=D.length===1&&!v&&!xw(de),Ft=p.useRef(!0);K.useEffect(()=>(Ft.current=!1,()=>{Ft.current=!0}),[]),on(()=>{let st=null;oe.delay>0?st=setTimeout(()=>{st=null,Be(!0)},oe.delay):Be(oe.loading);function Ue(){st&&(clearTimeout(st),st=null)}return Ue},[oe.delay,oe.loading]),p.useEffect(()=>{if(!_e.current||!Re)return;const st=_e.current.textContent||"";lt&&Wx(st)?Ae||Pe(!0):Ae&&Pe(!1)}),p.useEffect(()=>{A&&_e.current&&_e.current.focus()},[]);const gt=K.useCallback(st=>{var Ue;if(we||ue){st.preventDefault();return}(Ue=e.onClick)==null||Ue.call(e,("href"in e,st))},[e.onClick,we,ue]),{compactSize:Ye,compactItemClassnames:Ie}=qc(ne,G),Ke={large:"lg",small:"sm",middle:void 0,medium:void 0},De=Oi(st=>u??Ye??fe??st),je=De?Ke[De]??"":"",qe=we?"loading":v,Ge=w??b??"start",Ce=Vn(L,["navigate"]),Oe={...e,type:N,color:ae,variant:de,danger:ge,shape:J,size:De,disabled:ue,loading:we,iconPlacement:Ge},[ot,ut]=Kn([n?void 0:V,F],[n?void 0:W,M],{props:Oe}),wt=ee(ne,re,ce,{[`${ne}-${J}`]:J!=="default"&&J!=="square"&&J,[`${ne}-${N}`]:N,[`${ne}-dangerous`]:l,[`${ne}-color-${ve}`]:ve,[`${ne}-variant-${de}`]:de,[`${ne}-${je}`]:je,[`${ne}-icon-only`]:!C&&C!==0&&!!qe,[`${ne}-background-ghost`]:S&&!xw(de),[`${ne}-loading`]:we,[`${ne}-two-chinese-chars`]:Ae&&Re&&!we,[`${ne}-block`]:x,[`${ne}-rtl`]:G==="rtl",[`${ne}-icon-end`]:Ge==="end"},Ie,g,m,_,ot.root),It={...ut.root,...U,...E},Gt={className:ot.icon,style:ut.icon},Nt=st=>K.createElement(TB,{prefixCls:ne,...Gt},st),jt=K.createElement(y7,{existIcon:!!v,prefixCls:ne,loading:we,mount:Ft.current,...Gt}),qt=r&&typeof r=="object"&&r.icon||j;let Ot;v&&!we?Ot=Nt(v):r&&qt?Ot=Nt(qt):Ot=jt;const Vt=qs(C)?v7(C,lt&&Re,ut.content,ot.content):null;if(Ce.href!==void 0)return K.createElement("a",{...Ce,className:ee(wt,{[`${ne}-disabled`]:ue}),href:ue?void 0:Ce.href,style:It,onClick:gt,ref:ze,tabIndex:ue?-1:0,"aria-disabled":ue},Ot,Vt);let Ve=K.createElement("button",{...L,type:P,className:wt,style:It,onClick:gt,disabled:ue,ref:ze},Ot,Vt,Ie&&K.createElement(v9,{prefixCls:ne}));return xw(de)||(Ve=K.createElement(VE,{component:"Button",disabled:we},Ve)),Ve}),Mo=w9;Mo.Group=m7;Mo.__ANT_BUTTON=!0;const Fw=e=>typeof(e==null?void 0:e.then)=="function",LB=e=>{const{type:t,children:n,prefixCls:r,buttonProps:s,close:i,autoFocus:o,emitEvent:a,isSilent:l,quitOnNullishReturnValue:c,actionFn:u}=e,h=p.useRef(!1),g=p.useRef(null),[m,C]=Jm(!1),v=(...S)=>{i==null||i(...S)};p.useEffect(()=>{let S=null;return o&&(S=setTimeout(()=>{var x;(x=g.current)==null||x.focus({preventScroll:!0})})),()=>{S&&clearTimeout(S)}},[o]);const b=S=>{Fw(S)&&(C(!0),S.then((...x)=>{C(!1,!0),v.apply(void 0,x),h.current=!1},x=>{if(C(!1,!0),h.current=!1,!(l!=null&&l()))return Promise.reject(x)}))},w=S=>{if(h.current)return;if(h.current=!0,!u){v();return}let x;if(a){if(x=u(S),c&&!Fw(x)){h.current=!1,v(S);return}}else if(u.length)x=u(i),h.current=!1;else if(x=u(),!Fw(x)){v();return}b(x)};return p.createElement(Mo,{...FB(t),onClick:w,loading:m,prefixCls:r,...s,ref:g},n)},rg=K.createContext({}),{Provider:OB}=rg,SA=()=>{const{autoFocusButton:e,cancelButtonProps:t,cancelTextLocale:n,isSilent:r,mergedOkCancel:s,rootPrefixCls:i,close:o,onCancel:a,onConfirm:l,onClose:c}=p.useContext(rg);return s?K.createElement(LB,{isSilent:r,actionFn:a,close:(...u)=>{o==null||o(...u),l==null||l(!1),c==null||c()},autoFocus:e==="cancel",buttonProps:t,prefixCls:`${i}-btn`},n):null},xA=()=>{const{autoFocusButton:e,close:t,isSilent:n,okButtonProps:r,rootPrefixCls:s,okTextLocale:i,okType:o,onConfirm:a,onOk:l,onClose:c}=p.useContext(rg);return K.createElement(LB,{isSilent:n,type:o||"primary",actionFn:l,close:(...u)=>{t==null||t(...u),a==null||a(!0),c==null||c()},autoFocus:e==="ok",buttonProps:r,prefixCls:`${s}-btn`},i)},kB=p.createContext({});function RA(e,t,n){let r=t;return!r&&n&&(r=`${e}-${n}`),r}function EA(e,t){let n=e[`page${t?"Y":"X"}Offset`];const r=`scroll${t?"Top":"Left"}`;if(typeof n!="number"){const s=e.document;n=s.documentElement[r],typeof n!="number"&&(n=s.body[r])}return n}function S9(e){const t=e.getBoundingClientRect(),n={left:t.left,top:t.top},r=e.ownerDocument,s=r.defaultView||r.parentWindow;return n.left+=EA(s),n.top+=EA(s,!0),n}function PA(e,t=!1){if(fv(e)){const n=e.nodeName.toLowerCase(),r=["input","select","textarea","button"].includes(n)||e.isContentEditable||n==="a"&&!!e.getAttribute("href"),s=e.getAttribute("tabindex"),i=Number(s);let o=null;return s&&!Number.isNaN(i)?o=i:r&&o===null&&(o=0),r&&e.disabled&&(o=null),o!==null&&(o>=0||t&&o<0)}return!1}function jE(e,t=!1){const n=[...e.querySelectorAll("*")].filter(r=>PA(r,t));return PA(e,t)&&n.unshift(e),n}function NB(e,t){if(!e)return;e.focus(t);const{cursor:n}=t||{};if(n&&(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement)){const 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)}}}let ju=null,Ya=[];const Kx=new Map,KE=new Map;function qE(){return Ya[Ya.length-1]}function x9(e){const t=qE();if(e&&t){let n;for(const[s,i]of Kx.entries())if(i===t){n=s;break}const r=KE.get(n);return!!r&&(r===e||r.contains(e))}return!1}function R9(e){const{activeElement:t}=document;return e===t||e.contains(t)}function Tw(){const e=qE(),{activeElement:t}=document;if(!x9(t))if(e&&!R9(e)){const n=jE(e),r=n.includes(ju)?ju:n[0];r==null||r.focus({preventScroll:!0})}else ju=t}function FA(e){if(e.key==="Tab"){const{activeElement:t}=document,n=qE(),r=jE(n),s=r[r.length-1];e.shiftKey&&t===r[0]?ju=s:!e.shiftKey&&t===s&&(ju=r[0])}}function E9(e,t){return e&&(Kx.set(t,e),Ya=Ya.filter(n=>n!==e),Ya.push(e),window.addEventListener("focusin",Tw),window.addEventListener("keydown",FA,!0),Tw()),()=>{ju=null,Ya=Ya.filter(n=>n!==e),Kx.delete(t),KE.delete(t),Ya.length===0&&(window.removeEventListener("focusin",Tw),window.removeEventListener("keydown",FA,!0))}}function P9(e,t){const n=ya();return p.useEffect(()=>{if(e){const s=t();if(s)return E9(s,n)}},[e,n]),[s=>{s&&KE.set(n,s)}]}const F9=p.memo(({children:e})=>e,(e,{shouldUpdate:t})=>!t);function aC(){return aC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,className:r,style:s,title:i,ariaId:o,footer:a,closable:l,closeIcon:c,onClose:u,children:h,bodyStyle:g,bodyProps:m,modalRender:C,onMouseDown:v,onMouseUp:b,holderRef:w,visible:S,forceRender:x,width:P,height:F,classNames:M,styles:E,isFixedPos:I,focusTrap:A}=e,{panel:L}=K.useContext(kB),D=p.useRef(null),N=va(w,L,D),[k]=P9(S&&I&&A!==!1,()=>D.current);K.useImperativeHandle(t,()=>({focus:()=>{var B;(B=D.current)==null||B.focus({preventScroll:!0})}}));const G={};P!==void 0&&(G.width=P),F!==void 0&&(G.height=F);const $=a?K.createElement("div",{className:ee(`${n}-footer`,M==null?void 0:M.footer),style:{...E==null?void 0:E.footer}},a):null,_=i?K.createElement("div",{className:ee(`${n}-header`,M==null?void 0:M.header),style:{...E==null?void 0:E.header}},K.createElement("div",{className:ee(`${n}-title`,M==null?void 0:M.title),id:o,style:{...E==null?void 0:E.title}},i)):null,U=p.useMemo(()=>typeof l=="object"&&l!==null?l:l?{closeIcon:c??K.createElement("span",{className:`${n}-close-x`})}:{},[l,c,n]),V=Mr(U,!0),W=typeof l=="object"&&l.disabled,j=l?K.createElement("button",aC({type:"button",onClick:u,"aria-label":"Close"},V,{className:`${n}-close`,disabled:W}),U.closeIcon):null,H=K.createElement("div",{className:ee(`${n}-container`,M==null?void 0:M.container),style:E==null?void 0:E.container},j,_,K.createElement("div",aC({className:ee(`${n}-body`,M==null?void 0:M.body),style:{...g,...E==null?void 0:E.body}},m),h),$);return K.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?o:null,"aria-modal":"true",ref:N,style:{...s,...G},className:ee(n,r),onMouseDown:v,onMouseUp:b,tabIndex:-1,onFocus:B=>{k(B.target)}},K.createElement(F9,{shouldUpdate:S||x},C?C(H):H))});function qx(){return qx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,title:r,style:s,className:i,visible:o,forceRender:a,destroyOnHidden:l,motionName:c,ariaId:u,onVisibleChanged:h,mousePosition:g}=e,m=p.useRef(null),C=p.useRef(null);p.useImperativeHandle(t,()=>({...C.current,inMotion:m.current.inMotion,enableMotion:m.current.enableMotion}));const[v,b]=p.useState(),w={};v&&(w.transformOrigin=v);function S(){var P;if(!((P=m.current)!=null&&P.nativeElement))return;const x=S9(m.current.nativeElement);b(g&&(g.x||g.y)?`${g.x-x.left}px ${g.y-x.top}px`:"")}return p.createElement(Li,{visible:o,onVisibleChanged:h,onAppearPrepare:S,onEnterPrepare:S,forceRender:a,motionName:c,removeOnLeave:l,ref:m},({className:x,style:P},F)=>p.createElement(BB,qx({},e,{ref:C,title:r,ariaId:u,prefixCls:n,holderRef:F,style:{...P,...s,...w},className:ee(i,x)})))});function Xx(){return Xx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t,style:n,visible:r,maskProps:s,motionName:i,className:o}=e;return p.createElement(Li,{key:"mask",visible:r,motionName:i,leavedClassName:`${t}-mask-hidden`},({className:a,style:l},c)=>p.createElement("div",Xx({ref:c,style:{...l,...n},className:ee(`${t}-mask`,a,o)},s)))};function tp(){return tp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:t="rc-dialog",zIndex:n,visible:r=!1,focusTriggerAfterClose:s=!0,wrapStyle:i,wrapClassName:o,wrapProps:a,onClose:l,afterOpenChange:c,afterClose:u,transitionName:h,animation:g,closable:m=!0,mask:C=!0,maskTransitionName:v,maskAnimation:b,maskClosable:w=!0,maskStyle:S,maskProps:x,rootClassName:P,rootStyle:F,classNames:M,styles:E}=e,I=p.useRef(null),A=p.useRef(null),L=p.useRef(null),[D,N]=p.useState(r),[k,G]=p.useState(!1),$=ya();function _(){sx(A.current,document.activeElement)||(I.current=document.activeElement)}function U(){var te;sx(A.current,document.activeElement)||(te=L.current)==null||te.focus()}function V(){if(N(!1),C&&I.current&&s){try{I.current.focus({preventScroll:!0})}catch{}I.current=null}D&&(u==null||u())}function W(te){te?U():V(),c==null||c(te)}function j(te){l==null||l(te)}const H=p.useRef(!1);let B=null;w&&(B=te=>{A.current===te.target&&H.current&&j(te)});function Y(te){H.current=te.target===A.current}p.useEffect(()=>{if(r){if(H.current=!1,N(!0),_(),A.current){const te=getComputedStyle(A.current);G(te.position==="fixed")}}else D&&L.current.enableMotion()&&!L.current.inMotion()&&V()},[r]);const J={zIndex:n,...i,...E==null?void 0:E.wrapper,display:D?null:"none"};return p.createElement("div",tp({className:ee(`${t}-root`,P),style:F},Mr(e,{data:!0})),p.createElement(M9,{prefixCls:t,visible:C&&r,motionName:RA(t,v,b),style:{zIndex:n,...S,...E==null?void 0:E.mask},maskProps:x,className:M==null?void 0:M.mask}),p.createElement("div",tp({className:ee(`${t}-wrap`,o,M==null?void 0:M.wrapper),ref:A,onClick:B,onMouseDown:Y,style:J},a),p.createElement(T9,tp({},e,{isFixedPos:k,ref:L,closable:m,ariaId:$,prefixCls:t,visible:r&&D,onClose:j,onVisibleChanged:W,motionName:RA(t,h,g)}))))};function Yx(){return Yx=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{visible:t,getContainer:n,forceRender:r,destroyOnHidden:s=!1,afterClose:i,closable:o,panelRef:a,keyboard:l=!0,onClose:c}=e,[u,h]=p.useState(t),g=p.useMemo(()=>({panel:a}),[a]),m=({top:C,event:v})=>{if(C&&l){v.stopPropagation(),c==null||c(v);return}};return p.useEffect(()=>{t&&h(!0)},[t]),!r&&s&&!u?null:p.createElement(kB.Provider,{value:g},p.createElement(gv,{open:t||r||u,onEsc:m,autoDestroy:!1,getContainer:n,autoLock:t||u},p.createElement(I9,Yx({},e,{destroyOnHidden:s,afterClose:()=>{const C=o&&typeof o=="object"?o:{},{afterClose:v}=C||{};v==null||v(),i==null||i(),h(!1)}}))))},dc="RC_FORM_INTERNAL_HOOKS",On=()=>{Jn(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},id=p.createContext({getFieldValue:On,getFieldsValue:On,getFieldError:On,getFieldWarning:On,getFieldsError:On,isFieldsTouched:On,isFieldTouched:On,isFieldValidating:On,isFieldsValidating:On,resetFields:On,setFields:On,setFieldValue:On,setFieldsValue:On,validateFields:On,submit:On,getInternalHooks:()=>(On(),{dispatch:On,initEntityValue:On,registerField:On,useSubscribe:On,setInitialValues:On,destroyForm:On,setCallbacks:On,registerWatch:On,getFields:On,setValidateMessages:On,setPreserve:On,getInitialValue:On})}),lC=p.createContext(null);function Qx(e){return e==null?[]:Array.isArray(e)?e:[e]}function A9(e){return e&&!!e._init}function Zx(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",tel:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Jx=Zx();function L9(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function O9(e,t,n){if(uv())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var s=new(e.bind.apply(e,r));return n&&Mp(s,n.prototype),s}function e0(e){var t=typeof Map=="function"?new Map:void 0;return e0=function(r){if(r===null||!L9(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(r))return t.get(r);t.set(r,s)}function s(){return O9(r,arguments,Mc(this).constructor)}return s.prototype=Object.create(r.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),Mp(s,r)},e0(e)}var k9=/%[sdj%]/g,N9=function(){};function t0(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function li(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=i)return a;switch(a){case"%s":return String(n[s++]);case"%d":return Number(n[s++]);case"%j":try{return JSON.stringify(n[s++])}catch{return"[Circular]"}break;default:return a}});return o}return e}function B9(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"||e==="tel"}function Ir(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||B9(t)&&typeof e=="string"&&!e)}function $9(e,t,n){var r=[],s=0,i=e.length;function o(a){r.push.apply(r,nn(a||[])),s++,s===i&&n(r)}e.forEach(function(a){t(a,o)})}function TA(e,t,n){var r=0,s=e.length;function i(o){if(o&&o.length){n(o);return}var a=r;r=r+1,at.max?s.push(li(i.messages[h].max,t.fullField,t.max)):a&&l&&(ut.max)&&s.push(li(i.messages[h].range,t.fullField,t.min,t.max))},$B=function(t,n,r,s,i,o){t.required&&(!r.hasOwnProperty(t.field)||Ir(n,o||t.type))&&s.push(li(i.messages.required,t.fullField))},Kf;const j9=(function(){if(Kf)return Kf;var e="[a-fA-F\\d:]",t=function(M){return M&&M.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},n="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",r="[a-fA-F\\d]{1,4}",s=["(?:".concat(r,":){7}(?:").concat(r,"|:)"),"(?:".concat(r,":){6}(?:").concat(n,"|:").concat(r,"|:)"),"(?:".concat(r,":){5}(?::").concat(n,"|(?::").concat(r,"){1,2}|:)"),"(?:".concat(r,":){4}(?:(?::").concat(r,"){0,1}:").concat(n,"|(?::").concat(r,"){1,3}|:)"),"(?:".concat(r,":){3}(?:(?::").concat(r,"){0,2}:").concat(n,"|(?::").concat(r,"){1,4}|:)"),"(?:".concat(r,":){2}(?:(?::").concat(r,"){0,3}:").concat(n,"|(?::").concat(r,"){1,5}|:)"),"(?:".concat(r,":){1}(?:(?::").concat(r,"){0,4}:").concat(n,"|(?::").concat(r,"){1,6}|:)"),"(?::(?:(?::".concat(r,"){0,5}:").concat(n,"|(?::").concat(r,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",o="(?:".concat(s.join("|"),")").concat(i),a=new RegExp("(?:^".concat(n,"$)|(?:^").concat(o,"$)")),l=new RegExp("^".concat(n,"$")),c=new RegExp("^".concat(o,"$")),u=function(M){return M&&M.exact?a:new RegExp("(?:".concat(t(M)).concat(n).concat(t(M),")|(?:").concat(t(M)).concat(o).concat(t(M),")"),"g")};u.v4=function(F){return F&&F.exact?l:new RegExp("".concat(t(F)).concat(n).concat(t(F)),"g")},u.v6=function(F){return F&&F.exact?c:new RegExp("".concat(t(F)).concat(o).concat(t(F)),"g")};var h="(?:(?:[a-z]+:)?//)",g="(?:\\S+(?::\\S*)?@)?",m=u.v4().source,C=u.v6().source,v="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",b="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",w="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",S="(?::\\d{2,5})?",x='(?:[/?#][^\\s"]*)?',P="(?:".concat(h,"|www\\.)").concat(g,"(?:localhost|").concat(m,"|").concat(C,"|").concat(v).concat(b).concat(w,")").concat(S).concat(x);return Kf=new RegExp("(?:^".concat(P,"$)"),"i"),Kf});var Mw={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,tel:/^(\+[0-9]{1,3}[-\s\u2011]?)?(\([0-9]{1,4}\)[-\s\u2011]?)?([0-9]+[-\s\u2011]?)*[0-9]+$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Uh={integer:function(t){return Uh.number(t)&&parseInt(t,10)===t},float:function(t){return Uh.number(t)&&!Uh.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return yr(t)==="object"&&!Uh.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Mw.email)},tel:function(t){return typeof t=="string"&&t.length<=32&&!!t.match(Mw.tel)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(j9())},hex:function(t){return typeof t=="string"&&!!t.match(Mw.hex)}},K9=function(t,n,r,s,i){if(t.required&&n===void 0){$B(t,n,r,s,i);return}var o=["integer","float","array","regexp","object","method","email","tel","number","date","url","hex"],a=t.type;o.indexOf(a)>-1?Uh[a](n)||s.push(li(i.messages.types[a],t.fullField,t.type)):a&&yr(n)!==t.type&&s.push(li(i.messages.types[a],t.fullField,t.type))},q9=function(t,n,r,s,i){(/^\s+$/.test(n)||n==="")&&s.push(li(i.messages.whitespace,t.fullField))};const gn={required:$B,whitespace:q9,type:K9,range:U9,enum:W9,pattern:_9};var X9=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n)&&!t.required)return r();gn.required(t,n,s,o,i)}r(o)},Y9=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(n==null&&!t.required)return r();gn.required(t,n,s,o,i,"array"),n!=null&&(gn.type(t,n,s,o,i),gn.range(t,n,s,o,i))}r(o)},Q9=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n)&&!t.required)return r();gn.required(t,n,s,o,i),n!==void 0&&gn.type(t,n,s,o,i)}r(o)},Z9=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n,"date")&&!t.required)return r();if(gn.required(t,n,s,o,i),!Ir(n,"date")){var l;n instanceof Date?l=n:l=new Date(n),gn.type(t,l,s,o,i),l&&gn.range(t,l.getTime(),s,o,i)}}r(o)},J9="enum",eq=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n)&&!t.required)return r();gn.required(t,n,s,o,i),n!==void 0&&gn[J9](t,n,s,o,i)}r(o)},tq=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n)&&!t.required)return r();gn.required(t,n,s,o,i),n!==void 0&&(gn.type(t,n,s,o,i),gn.range(t,n,s,o,i))}r(o)},nq=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n)&&!t.required)return r();gn.required(t,n,s,o,i),n!==void 0&&(gn.type(t,n,s,o,i),gn.range(t,n,s,o,i))}r(o)},rq=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n)&&!t.required)return r();gn.required(t,n,s,o,i),n!==void 0&&gn.type(t,n,s,o,i)}r(o)},sq=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(n===""&&(n=void 0),Ir(n)&&!t.required)return r();gn.required(t,n,s,o,i),n!==void 0&&(gn.type(t,n,s,o,i),gn.range(t,n,s,o,i))}r(o)},iq=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n)&&!t.required)return r();gn.required(t,n,s,o,i),n!==void 0&&gn.type(t,n,s,o,i)}r(o)},oq=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n,"string")&&!t.required)return r();gn.required(t,n,s,o,i),Ir(n,"string")||gn.pattern(t,n,s,o,i)}r(o)},aq=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n)&&!t.required)return r();gn.required(t,n,s,o,i),Ir(n)||gn.type(t,n,s,o,i)}r(o)},lq=function(t,n,r,s,i){var o=[],a=Array.isArray(n)?"array":yr(n);gn.required(t,n,s,o,i,a),r(o)},cq=function(t,n,r,s,i){var o=[],a=t.required||!t.required&&s.hasOwnProperty(t.field);if(a){if(Ir(n,"string")&&!t.required)return r();gn.required(t,n,s,o,i,"string"),Ir(n,"string")||(gn.type(t,n,s,o,i),gn.range(t,n,s,o,i),gn.pattern(t,n,s,o,i),t.whitespace===!0&&gn.whitespace(t,n,s,o,i))}r(o)},qf=function(t,n,r,s,i){var o=t.type,a=[],l=t.required||!t.required&&s.hasOwnProperty(t.field);if(l){if(Ir(n,o)&&!t.required)return r();gn.required(t,n,s,a,i,o),Ir(n,o)||gn.type(t,n,s,a,i)}r(a)};const np={string:cq,method:rq,number:sq,boolean:Q9,regexp:aq,integer:nq,float:tq,array:Y9,object:iq,enum:eq,pattern:oq,date:Z9,url:qf,hex:qf,email:qf,tel:qf,required:lq,any:X9};var sg=(function(){function e(t){Uc(this,e),$r(this,"rules",null),$r(this,"_messages",Jx),this.define(t)}return jc(e,[{key:"define",value:function(n){var r=this;if(!n)throw new Error("Cannot configure a schema with no rules");if(yr(n)!=="object"||Array.isArray(n))throw new Error("Rules must be an object");this.rules={},Object.keys(n).forEach(function(s){var i=n[s];r.rules[s]=Array.isArray(i)?i:[i]})}},{key:"messages",value:function(n){return n&&(this._messages=DA(Zx(),n)),this._messages}},{key:"validate",value:function(n){var r=this,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},o=n,a=s,l=i;if(typeof a=="function"&&(l=a,a={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,o),Promise.resolve(o);function c(C){var v=[],b={};function w(x){if(Array.isArray(x)){var P;v=(P=v).concat.apply(P,nn(x))}else v.push(x)}for(var S=0;S0&&arguments[0]!==void 0?arguments[0]:[],I=Array.isArray(E)?E:[E];!a.suppressWarning&&I.length&&e.warning("async-validator:",I),I.length&&b.message!==void 0&&b.message!==null&&(I=[].concat(b.message));var A=I.map(IA(b,o));if(a.first&&A.length)return m[b.field]=1,v(A);if(!w)v(A);else{if(b.required&&!C.value)return b.message!==void 0?A=[].concat(b.message).map(IA(b,o)):a.error&&(A=[a.error(b,li(a.messages.required,b.field))]),v(A);var L={};b.defaultField&&Object.keys(C.value).map(function(k){L[k]=b.defaultField}),L=lr(lr({},L),C.rule.fields);var D={};Object.keys(L).forEach(function(k){var G=L[k],$=Array.isArray(G)?G:[G];D[k]=$.map(S.bind(null,k))});var N=new e(D);N.messages(a.messages),C.rule.options&&(C.rule.options.messages=a.messages,C.rule.options.error=a.error),N.validate(C.value,C.rule.options||a,function(k){var G=[];A&&A.length&&G.push.apply(G,nn(A)),k&&k.length&&G.push.apply(G,nn(k)),v(G.length?G:null)})}}var P;if(b.asyncValidator)P=b.asyncValidator(b,C.value,x,C.source,a);else if(b.validator){try{P=b.validator(b,C.value,x,C.source,a)}catch(E){var F,M;(F=(M=console).error)===null||F===void 0||F.call(M,E),a.suppressValidatorError||setTimeout(function(){throw E},0),x(E.message)}P===!0?x():P===!1?x(typeof b.message=="function"?b.message(b.fullField||b.field):b.message||"".concat(b.fullField||b.field," fails")):P instanceof Array?x(P):P instanceof Error&&x(P.message)}P&&P.then&&P.then(function(){return x()},function(E){return x(E)})},function(C){c(C)},o)}},{key:"getType",value:function(n){if(n.type===void 0&&n.pattern instanceof RegExp&&(n.type="pattern"),typeof n.validator!="function"&&n.type&&!np.hasOwnProperty(n.type))throw new Error(li("Unknown rule type %s",n.type));return n.type||"string"}},{key:"getValidationMethod",value:function(n){if(typeof n.validator=="function")return n.validator;var r=Object.keys(n),s=r.indexOf("message");return s!==-1&&r.splice(s,1),r.length===1&&r[0]==="required"?np.required:np[this.getType(n)]||void 0}}]),e})();$r(sg,"register",function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");np[t]=n});$r(sg,"warning",N9);$r(sg,"messages",Jx);$r(sg,"validators",np);const Os="'${name}' is not a valid ${type}",GB={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Os,method:Os,array:Os,object:Os,number:Os,date:Os,boolean:Os,integer:Os,float:Os,regexp:Os,email:Os,tel:Os,url:Os,hex:Os},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}},AA=sg;function uq(e,t){return e.replace(/\\?\$\{\w+\}/g,n=>{if(n.startsWith("\\"))return n.slice(1);const r=n.slice(2,-1);return t[r]})}const LA="CODE_LOGIC_ERROR";async function n0(e,t,n,r,s){const i={...n};if(delete i.ruleIndex,AA.warning=()=>{},i.validator){const g=i.validator;i.validator=(...m)=>{try{return g(...m)}catch(C){return console.error(C),Promise.reject(LA)}}}let o=null;i&&i.type==="array"&&i.defaultField&&(o=i.defaultField,delete i.defaultField);const a=new AA({[e]:[i]}),l=$u(GB,r.validateMessages);a.messages(l);let c=[];try{await Promise.resolve(a.validate({[e]:t},{...r}))}catch(g){g.errors&&(c=g.errors.map(({message:m},C)=>{const v=m===LA?l.default:m;return p.isValidElement(v)?p.cloneElement(v,{key:`error_${C}`}):v}))}if(!c.length&&o&&Array.isArray(t)&&t.length>0)return(await Promise.all(t.map((m,C)=>n0(`${e}.${C}`,m,o,r,s)))).reduce((m,C)=>[...m,...C],[]);const u={...n,name:e,enum:(n.enum||[]).join(", "),...s};return c.map(g=>typeof g=="string"?uq(g,u):g)}function dq(e,t,n,r,s,i){const o=e.join("."),a=n.map((c,u)=>{const h=c.validator,g={...c,ruleIndex:u};return h&&(g.validator=(m,C,v)=>{let b=!1;const S=h(m,C,(...x)=>{Promise.resolve().then(()=>{Jn(!b,"Your validator function has already return a promise. `callback` will be ignored."),b||v(...x)})});b=S&&typeof S.then=="function"&&typeof S.catch=="function",Jn(b,"`callback` is deprecated. Please return a promise instead."),b&&S.then(()=>{v()}).catch(x=>{v(x||" ")})}),g}).sort(({warningOnly:c,ruleIndex:u},{warningOnly:h,ruleIndex:g})=>!!c==!!h?u-g:c?1:-1);let l;if(s===!0)l=new Promise(async(c,u)=>{for(let h=0;hn0(o,t,u,r,i).then(h=>({errors:h,rule:u})));l=(s?pq(c):hq(c)).then(u=>Promise.reject(u))}return l.catch(c=>c),l}async function hq(e){return Promise.all(e).then(t=>[].concat(...t))}async function pq(e){let t=0;return new Promise(n=>{e.forEach(r=>{r.then(s=>{s.errors.length&&n([s]),t+=1,t===e.length&&n([])})})})}function ar(e){return Qx(e)}function OA(e,t){let n={};return t.forEach(r=>{const s=Gs(e,r);n=Si(n,r,s)}),n}function Ku(e,t,n=!1){return e&&e.some(r=>cC(t,r,n))}function cC(e,t,n=!1){return!e||!t||!n&&e.length!==t.length?!1:t.every((r,s)=>e[s]===r)}function gq(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||typeof e!="object"||typeof t!="object")return!1;const n=Object.keys(e),r=Object.keys(t);return[...new Set([...n,...r])].every(i=>{const o=e[i],a=t[i];return typeof o=="function"&&typeof a=="function"?!0:o===a})}function fq(e,...t){const n=t[0];return n&&n.target&&typeof n.target=="object"&&e in n.target?n.target[e]:n}function kA(e,t,n){const{length:r}=e;if(t<0||t>=r||n<0||n>=r)return e;const s=e[t],i=t-n;return i>0?[...e.slice(0,n),s,...e.slice(n,t),...e.slice(t+1,r)]:i<0?[...e.slice(0,t),...e.slice(t+1,n+1),s,...e.slice(n+1,r)]:e}function r0(){return r0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{preserve:n,isListField:r,name:s}=this.props;this.cancelRegisterFunc&&this.cancelRegisterFunc(r,n,ar(s)),this.cancelRegisterFunc=null});Fe(this,"getNamePath",()=>{const{name:n,fieldContext:r}=this.props,{prefixName:s=[]}=r;return n!==void 0?[...s,...n]:[]});Fe(this,"getRules",()=>{const{rules:n=[],fieldContext:r}=this.props;return n.map(s=>typeof s=="function"?s(r):s)});Fe(this,"refresh",()=>{this.mounted&&this.setState(({resetCount:n})=>({resetCount:n+1}))});Fe(this,"metaCache",null);Fe(this,"triggerMetaEvent",n=>{const{onMetaChange:r}=this.props;if(r){const s={...this.getMeta(),destroy:n};no(this.metaCache,s)||r(s),this.metaCache=s}else this.metaCache=null});Fe(this,"onStoreChange",(n,r,s)=>{const{shouldUpdate:i,dependencies:o=[],onReset:a}=this.props,{store:l}=s,c=this.getNamePath(),u=this.getValue(n),h=this.getValue(l),g=r&&Ku(r,c);switch(s.type==="valueUpdate"&&s.source==="external"&&!no(u,h)&&(this.touched=!0,this.dirty=!0,this.validatePromise=null,this.errors=Yl,this.warnings=Th,this.triggerMetaEvent()),s.type){case"reset":if(!r||g){this.touched=!1,this.dirty=!1,this.validatePromise=void 0,this.errors=Yl,this.warnings=Th,this.triggerMetaEvent(),a==null||a(),this.refresh();return}break;case"remove":{if(i&&Iw(i,n,l,u,h,s)){this.reRender();return}break}case"setField":{const{data:m}=s;if(g){"touched"in m&&(this.touched=m.touched),"validating"in m&&!("originRCField"in m)&&(this.validatePromise=m.validating?Promise.resolve([]):null),"errors"in m&&(this.errors=m.errors||Yl),"warnings"in m&&(this.warnings=m.warnings||Th),this.dirty=!0,this.triggerMetaEvent(),this.reRender();return}else if("value"in m&&Ku(r,c,!0)){this.reRender();return}if(i&&!c.length&&Iw(i,n,l,u,h,s)){this.reRender();return}break}case"dependenciesUpdate":{if(o.map(ar).some(C=>Ku(s.relatedFields,C))){this.reRender();return}break}default:if(g||(!o.length||c.length||i)&&Iw(i,n,l,u,h,s)){this.reRender();return}break}i===!0&&this.reRender()});Fe(this,"validateRules",n=>{const r=this.getNamePath(),s=this.getValue(),{triggerName:i,validateOnly:o=!1}=n||{},a=Promise.resolve().then(async()=>{if(!this.mounted)return[];const{validateFirst:l=!1,messageVariables:c,validateDebounce:u}=this.props;let h=this.getRules();if(i&&(h=h.filter(m=>m).filter(m=>{const{validateTrigger:C}=m;return C?Qx(C).includes(i):!0})),u&&i&&(await new Promise(m=>{setTimeout(m,u)}),this.validatePromise!==a))return[];const g=dq(r,s,h,n,l,c);return g.catch(m=>m).then((m=Yl)=>{var C;if(this.validatePromise===a){this.validatePromise=null;const v=[],b=[];(C=m.forEach)==null||C.call(m,({rule:{warningOnly:w},errors:S=Yl})=>{w?b.push(...S):v.push(...S)}),this.errors=v,this.warnings=b,this.triggerMetaEvent(),this.reRender()}}),g});return o||(this.validatePromise=a,this.dirty=!0,this.errors=Yl,this.warnings=Th,this.triggerMetaEvent(),this.reRender()),a});Fe(this,"isFieldValidating",()=>!!this.validatePromise);Fe(this,"isFieldTouched",()=>this.touched);Fe(this,"isFieldDirty",()=>{if(this.dirty||this.props.initialValue!==void 0)return!0;const{fieldContext:n}=this.props,{getInitialValue:r}=n.getInternalHooks(dc);return r(this.getNamePath())!==void 0});Fe(this,"getErrors",()=>this.errors);Fe(this,"getWarnings",()=>this.warnings);Fe(this,"isListField",()=>this.props.isListField);Fe(this,"isList",()=>this.props.isList);Fe(this,"isPreserve",()=>this.props.preserve);Fe(this,"getMeta",()=>(this.prevValidating=this.isFieldValidating(),{touched:this.isFieldTouched(),validating:this.prevValidating,errors:this.errors,warnings:this.warnings,name:this.getNamePath(),validated:this.validatePromise===null}));Fe(this,"getOnlyChild",n=>{if(typeof n=="function"){const s=this.getMeta();return{...this.getOnlyChild(n(this.getControlled(),s,this.props.fieldContext)),isFunction:!0}}const r=Tr(n);return r.length!==1||!p.isValidElement(r[0])?{child:r,isFunction:!1}:{child:r[0],isFunction:!1}});Fe(this,"getValue",n=>{const{getFieldsValue:r}=this.props.fieldContext,s=this.getNamePath();return Gs(n||r(!0),s)});Fe(this,"getControlled",(n={})=>{const{name:r,trigger:s="onChange",validateTrigger:i,getValueFromEvent:o,normalize:a,valuePropName:l="value",getValueProps:c,fieldContext:u}=this.props,h=i!==void 0?i:u.validateTrigger,g=this.getNamePath(),{getInternalHooks:m,getFieldsValue:C}=u,{dispatch:v}=m(dc),b=this.getValue(),w=c||(M=>({[l]:M})),S=n[s],x=r!==void 0?w(b):{},P={...n,...x};return P[s]=(...M)=>{this.touched=!0,this.dirty=!0,this.triggerMetaEvent();let E;o?E=o(...M):E=fq(l,...M),a&&(E=a(E,b,C(!0))),E!==b&&v({type:"updateValue",namePath:g,value:E}),S&&S(...M)},Qx(h||[]).forEach(M=>{const E=P[M];P[M]=(...I)=>{E&&E(...I);const{rules:A}=this.props;A&&A.length&&v({type:"validateField",namePath:g,triggerName:M})}}),P});if(n.fieldContext){const{getInternalHooks:r}=n.fieldContext,{initEntityValue:s}=r(dc);s(this)}}componentDidMount(){const{shouldUpdate:n,fieldContext:r}=this.props;if(this.mounted=!0,r){const{getInternalHooks:s}=r,{registerField:i}=s(dc);this.cancelRegisterFunc=i(this)}n===!0&&this.reRender()}componentWillUnmount(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}reRender(){this.mounted&&this.forceUpdate()}render(){const{resetCount:n}=this.state,{children:r}=this.props,{child:s,isFunction:i}=this.getOnlyChild(r);let o;return i?o=s:p.isValidElement(s)?o=p.cloneElement(s,this.getControlled(s.props)):(Jn(!s,"`children` of Field is not validate ReactElement."),o=s),p.createElement(p.Fragment,{key:n},o)}}Fe(VB,"contextType",id);function HB({name:e,...t}){const n=p.useContext(id),r=p.useContext(lC),s=e!==void 0?ar(e):void 0,i=t.isListField??!!r;let o="keep";return i||(o=`_${(s||[]).join("_")}`),p.createElement(VB,r0({key:o,name:s,isListField:i},t,{fieldContext:n}))}function mq({name:e,initialValue:t,children:n,rules:r,validateTrigger:s,isListField:i}){const o=p.useContext(id),a=p.useContext(lC),c=p.useRef({keys:[],id:0}).current,u=p.useMemo(()=>[...ar(o.prefixName)||[],...ar(e)],[o.prefixName,e]),h=p.useMemo(()=>({...o,prefixName:u}),[o,u]),g=p.useMemo(()=>({getKey:C=>{const v=u.length,b=C[v];return[c.keys[b],C.slice(v+1)]}}),[c,u]);if(typeof n!="function")return Jn(!1,"Form.List only accepts function as children."),null;const m=(C,v,{source:b})=>b==="internal"?!1:C!==v;return p.createElement(lC.Provider,{value:g},p.createElement(id.Provider,{value:h},p.createElement(HB,{name:[],shouldUpdate:m,rules:r,validateTrigger:s,initialValue:t,isList:!0,isListField:i??!!a},({value:C=[],onChange:v},b)=>{const{getFieldValue:w}=o,S=()=>w(u||[])||[],x={add:(F,M)=>{const E=S();M>=0&&M<=E.length?(c.keys=[...c.keys.slice(0,M),c.id,...c.keys.slice(M)],v([...E.slice(0,M),F,...E.slice(M)])):(c.keys=[...c.keys,c.id],v([...E,F])),c.id+=1},remove:F=>{const M=S(),E=new Set(Array.isArray(F)?F:[F]);E.size<=0||(c.keys=c.keys.filter((I,A)=>!E.has(A)),v(M.filter((I,A)=>!E.has(A))))},move(F,M){if(F===M)return;const E=S();F<0||F>=E.length||M<0||M>=E.length||(c.keys=kA(c.keys,F,M),v(kA(E,F,M)))}};let P=C||[];return Array.isArray(P)||(P=[]),n(P.map((F,M)=>{let E=c.keys[M];return E===void 0&&(c.keys[M]=c.id,E=c.keys[M],c.id+=1),{name:M,key:E,isListField:!0}}),x,b)})))}function Cq(e){let t=!1,n=e.length;const r=[];return e.length?new Promise((s,i)=>{e.forEach((o,a)=>{o.catch(l=>(t=!0,l)).then(l=>{n-=1,r[a]=l,!(n>0)&&(t&&i(r),s(r))})})}):Promise.resolve([])}const s0="__@field_split__";function Xf(e){return e.map(t=>`${typeof t}:${t}`).join(s0)}class Fu{constructor(){Fe(this,"kvs",new Map)}set(t,n){this.kvs.set(Xf(t),n)}get(t){return this.kvs.get(Xf(t))}getAsPrefix(t){const n=Xf(t),r=n+s0,s=[],i=this.kvs.get(n);return i!==void 0&&s.push(i),this.kvs.forEach((o,a)=>{a.startsWith(r)&&s.push(o)}),s}update(t,n){const r=this.get(t),s=n(r);s?this.set(t,s):this.delete(t)}delete(t){this.kvs.delete(Xf(t))}map(t){return[...this.kvs.entries()].map(([n,r])=>{const s=n.split(s0);return t({key:s.map(i=>{const[,o,a]=i.match(/^([^:]*):(.*)$/);return o==="number"?Number(a):a}),value:r})})}toJSON(){const t={};return this.map(({key:n,value:r})=>(t[n.join(".")]=r,null)),t}}const vq=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)};class yq{constructor(t){Fe(this,"namePathList",[]);Fe(this,"taskId",0);Fe(this,"watcherList",new Set);Fe(this,"form");this.form=t}register(t){return this.watcherList.add(t),()=>{this.watcherList.delete(t)}}notify(t){t.forEach(n=>{this.namePathList.every(r=>!cC(r,n))&&this.namePathList.push(n)}),this.doBatch()}doBatch(){this.taskId+=1;const t=this.taskId;vq(()=>{if(t===this.taskId&&this.watcherList.size){const n=this.form.getForm(),r=n.getFieldsValue(),s=n.getFieldsValue(!0);this.watcherList.forEach(i=>{i(r,s,this.namePathList)}),this.namePathList=[]}})}}class bq{constructor(t){Fe(this,"formHooked",!1);Fe(this,"forceRootUpdate");Fe(this,"subscribable",!0);Fe(this,"store",{});Fe(this,"fieldEntities",[]);Fe(this,"initialValues",{});Fe(this,"callbacks",{});Fe(this,"validateMessages",null);Fe(this,"preserve",null);Fe(this,"lastValidatePromise",null);Fe(this,"watcherCenter",new yq(this));Fe(this,"getForm",()=>({getFieldValue:this.getFieldValue,getFieldsValue:this.getFieldsValue,getFieldError:this.getFieldError,getFieldWarning:this.getFieldWarning,getFieldsError:this.getFieldsError,isFieldsTouched:this.isFieldsTouched,isFieldTouched:this.isFieldTouched,isFieldValidating:this.isFieldValidating,isFieldsValidating:this.isFieldsValidating,resetFields:this.resetFields,setFields:this.setFields,setFieldValue:this.setFieldValue,setFieldsValue:this.setFieldsValue,validateFields:this.validateFields,submit:this.submit,_init:!0,getInternalHooks:this.getInternalHooks}));Fe(this,"getInternalHooks",t=>t===dc?(this.formHooked=!0,{dispatch:this.dispatch,initEntityValue:this.initEntityValue,registerField:this.registerField,useSubscribe:this.useSubscribe,setInitialValues:this.setInitialValues,destroyForm:this.destroyForm,setCallbacks:this.setCallbacks,setValidateMessages:this.setValidateMessages,getFields:this.getFields,setPreserve:this.setPreserve,getInitialValue:this.getInitialValue,registerWatch:this.registerWatch}):(Jn(!1,"`getInternalHooks` is internal usage. Should not call directly."),null));Fe(this,"useSubscribe",t=>{this.subscribable=t});Fe(this,"prevWithoutPreserves",null);Fe(this,"setInitialValues",(t,n)=>{var r;if(this.initialValues=t||{},n){let s=$u(t,this.store);(r=this.prevWithoutPreserves)==null||r.map(({key:i})=>{s=Si(s,i,Gs(t,i))}),this.prevWithoutPreserves=null,this.updateStore(s)}});Fe(this,"destroyForm",t=>{if(t)this.updateStore({});else{const n=new Fu;this.getFieldEntities(!0).forEach(r=>{this.isMergedPreserve(r.isPreserve())||n.set(r.getNamePath(),!0)}),this.prevWithoutPreserves=n}});Fe(this,"getInitialValue",t=>{const n=Gs(this.initialValues,t);return t.length?$u(n):n});Fe(this,"setCallbacks",t=>{this.callbacks=t});Fe(this,"setValidateMessages",t=>{this.validateMessages=t});Fe(this,"setPreserve",t=>{this.preserve=t});Fe(this,"registerWatch",t=>this.watcherCenter.register(t));Fe(this,"notifyWatch",(t=[])=>{this.watcherCenter.notify(t)});Fe(this,"timeoutId",null);Fe(this,"warningUnhooked",()=>{});Fe(this,"updateStore",t=>{this.store=t});Fe(this,"getFieldEntities",(t=!1)=>t?this.fieldEntities.filter(n=>n.getNamePath().length):this.fieldEntities);Fe(this,"getFieldsMap",(t=!1)=>{const n=new Fu;return this.getFieldEntities(t).forEach(r=>{const s=r.getNamePath();n.set(s,r)}),n});Fe(this,"getFieldEntitiesForNamePathList",(t,n=!1)=>{if(!t)return this.getFieldEntities(!0);const r=this.getFieldsMap(!0);return n?t.flatMap(s=>{const i=ar(s),o=r.getAsPrefix(i);return o.length?o:[{INVALIDATE_NAME_PATH:i}]}):t.map(s=>{const i=ar(s);return r.get(i)||{INVALIDATE_NAME_PATH:ar(s)}})});Fe(this,"getFieldsValue",(t,n)=>{this.warningUnhooked();let r,s;if(t===!0||Array.isArray(t)?(r=t,s=n):t&&typeof t=="object"&&(s=t.filter),r===!0&&!s)return this.store;const i=this.getFieldEntitiesForNamePathList(Array.isArray(r)?r:null,!0),o=[],a=[];i.forEach(c=>{var h;const u=c.INVALIDATE_NAME_PATH||c.getNamePath();if((h=c.isList)!=null&&h.call(c)){a.push(u);return}if(!s)o.push(u);else{const g="getMeta"in c?c.getMeta():null;s(g)&&o.push(u)}});let l=OA(this.store,o.map(ar));return a.forEach(c=>{Gs(l,c)||(l=Si(l,c,[]))}),l});Fe(this,"getFieldValue",t=>{this.warningUnhooked();const n=ar(t);return Gs(this.store,n)});Fe(this,"getFieldsError",t=>(this.warningUnhooked(),this.getFieldEntitiesForNamePathList(t).map((r,s)=>r&&!r.INVALIDATE_NAME_PATH?{name:r.getNamePath(),errors:r.getErrors(),warnings:r.getWarnings()}:{name:ar(t[s]),errors:[],warnings:[]})));Fe(this,"getFieldError",t=>{this.warningUnhooked();const n=ar(t);return this.getFieldsError([n])[0].errors});Fe(this,"getFieldWarning",t=>{this.warningUnhooked();const n=ar(t);return this.getFieldsError([n])[0].warnings});Fe(this,"isFieldsTouched",(...t)=>{this.warningUnhooked();const[n,r]=t;let s,i=!1;t.length===0?s=null:t.length===1?Array.isArray(n)?(s=n.map(ar),i=!1):(s=null,i=n):(s=n.map(ar),i=r);const o=this.getFieldEntities(!0),a=h=>h.isFieldTouched();if(!s)return i?o.every(h=>a(h)||h.isList()):o.some(a);const l=new Fu;s.forEach(h=>{l.set(h,[])}),o.forEach(h=>{const g=h.getNamePath();s.forEach(m=>{m.every((C,v)=>g[v]===C)&&l.update(m,C=>[...C,h])})});const c=h=>h.some(a),u=l.map(({value:h})=>h);return i?u.every(c):u.some(c)});Fe(this,"isFieldTouched",t=>(this.warningUnhooked(),this.isFieldsTouched([t])));Fe(this,"isFieldsValidating",t=>{this.warningUnhooked();const n=this.getFieldEntities();if(!t)return n.some(s=>s.isFieldValidating());const r=t.map(ar);return n.some(s=>{const i=s.getNamePath();return Ku(r,i)&&s.isFieldValidating()})});Fe(this,"isFieldValidating",t=>(this.warningUnhooked(),this.isFieldsValidating([t])));Fe(this,"resetWithFieldInitialValue",(t={})=>{const n=new Fu,r=this.getFieldEntities(!0);r.forEach(o=>{const{initialValue:a}=o.props,l=o.getNamePath();if(a!==void 0){const c=n.get(l)||new Set;c.add({entity:o,value:a}),n.set(l,c)}});const s=o=>{o.forEach(a=>{const{initialValue:l}=a.props;if(l!==void 0){const c=a.getNamePath();if(this.getInitialValue(c)!==void 0)Jn(!1,`Form already set 'initialValues' with path '${c.join(".")}'. Field can not overwrite it.`);else{const h=n.get(c);if(h&&h.size>1)Jn(!1,`Multiple Field with path '${c.join(".")}' set 'initialValue'. Can not decide which one to pick.`);else if(h){const g=this.getFieldValue(c);!a.isListField()&&(!t.skipExist||g===void 0)&&this.updateStore(Si(this.store,c,[...h][0].value))}}}})};let i;t.entities?i=t.entities:t.namePathList?(i=[],t.namePathList.forEach(o=>{const a=n.get(o);a&&i.push(...[...a].map(l=>l.entity))})):i=r,s(i)});Fe(this,"resetFields",t=>{this.warningUnhooked();const n=this.store;if(!t){this.updateStore($u(this.initialValues)),this.resetWithFieldInitialValue(),this.notifyObservers(n,null,{type:"reset"}),this.notifyWatch();return}const r=t.map(ar);r.forEach(s=>{const i=this.getInitialValue(s);this.updateStore(Si(this.store,s,i))}),this.resetWithFieldInitialValue({namePathList:r}),this.notifyObservers(n,r,{type:"reset"}),this.notifyWatch(r)});Fe(this,"setFields",t=>{this.warningUnhooked();const n=this.store,r=[];t.forEach(s=>{const{name:i,...o}=s,a=ar(i);r.push(a),"value"in o&&this.updateStore(Si(this.store,a,o.value)),this.notifyObservers(n,[a],{type:"setField",data:s})}),this.notifyWatch(r)});Fe(this,"getFields",()=>this.getFieldEntities(!0).map(r=>{const s=r.getNamePath(),o={...r.getMeta(),name:s,value:this.getFieldValue(s)};return Object.defineProperty(o,"originRCField",{value:!0}),o}));Fe(this,"initEntityValue",t=>{const{initialValue:n}=t.props;if(n!==void 0){const r=t.getNamePath();Gs(this.store,r)===void 0&&this.updateStore(Si(this.store,r,n))}});Fe(this,"isMergedPreserve",t=>(t!==void 0?t:this.preserve)??!0);Fe(this,"registerField",t=>{this.fieldEntities.push(t);const n=t.getNamePath();if(this.notifyWatch([n]),t.props.initialValue!==void 0){const r=this.store;this.resetWithFieldInitialValue({entities:[t],skipExist:!0}),this.notifyObservers(r,[t.getNamePath()],{type:"valueUpdate",source:"internal"})}return(r,s,i=[])=>{if(this.fieldEntities=this.fieldEntities.filter(o=>o!==t),!this.isMergedPreserve(s)&&(!r||i.length>1)){const o=r?void 0:this.getInitialValue(n);if(n.length&&this.getFieldValue(n)!==o&&this.fieldEntities.every(a=>!cC(a.getNamePath(),n))){const a=this.store;this.updateStore(Si(a,n,o,!0)),this.notifyObservers(a,[n],{type:"remove"}),this.triggerDependenciesUpdate(a,n)}}this.notifyWatch([n])}});Fe(this,"dispatch",t=>{switch(t.type){case"updateValue":{const{namePath:n,value:r}=t;this.updateValue(n,r);break}case"validateField":{const{namePath:n,triggerName:r}=t;this.validateFields([n],{triggerName:r});break}}});Fe(this,"notifyObservers",(t,n,r)=>{if(this.subscribable){const s={...r,store:this.getFieldsValue(!0)};this.getFieldEntities().forEach(({onStoreChange:i})=>{i(t,n,s)})}else this.forceRootUpdate()});Fe(this,"triggerDependenciesUpdate",(t,n)=>{const r=this.getDependencyChildrenFields(n);return r.length&&this.validateFields(r),this.notifyObservers(t,r,{type:"dependenciesUpdate",relatedFields:[n,...r]}),r});Fe(this,"updateValue",(t,n)=>{const r=ar(t),s=this.store;this.updateStore(Si(this.store,r,n)),this.notifyObservers(s,[r],{type:"valueUpdate",source:"internal"}),this.notifyWatch([r]);const i=this.triggerDependenciesUpdate(s,r),{onValuesChange:o}=this.callbacks;if(o){const a=this.getFieldsMap(!0).get(r),l=OA(this.store,[r]),c=this.getFieldsValue(),u=qk([c,l],{prepareArray:h=>a!=null&&a.isList()?[]:[...h||[]]});o(l,u)}this.triggerOnFieldsChange([r,...i])});Fe(this,"setFieldsValue",t=>{this.warningUnhooked();const n=this.store;if(t){const r=$u(this.store,t);this.updateStore(r)}this.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),this.notifyWatch()});Fe(this,"setFieldValue",(t,n)=>{this.setFields([{name:t,value:n,errors:[],warnings:[],touched:!0}])});Fe(this,"getDependencyChildrenFields",t=>{const n=new Set,r=[],s=new Fu;this.getFieldEntities().forEach(o=>{const{dependencies:a}=o.props;(a||[]).forEach(l=>{const c=ar(l);s.update(c,(u=new Set)=>(u.add(o),u))})});const i=o=>{(s.get(o)||new Set).forEach(l=>{if(!n.has(l)){n.add(l);const c=l.getNamePath();l.isFieldDirty()&&c.length&&(r.push(c),i(c))}})};return i(t),r});Fe(this,"triggerOnFieldsChange",(t,n)=>{const{onFieldsChange:r}=this.callbacks;if(r){const s=this.getFields();if(n){const o=new Fu;n.forEach(({name:a,errors:l})=>{o.set(a,l)}),s.forEach(a=>{a.errors=o.get(a.name)||a.errors})}const i=s.filter(({name:o})=>Ku(t,o));i.length&&r(i,s)}});Fe(this,"validateFields",(t,n)=>{this.warningUnhooked();let r,s;Array.isArray(t)||typeof t=="string"||typeof n=="string"?(r=t,s=n):s=t;const i=!!r,o=i?r.map(ar):[],a=[...o],l=[],c=String(Date.now()),u=new Set,{recursive:h,dirty:g}=s||{};this.getFieldEntities(!0).forEach(b=>{const w=b.getNamePath();if(i||((!b.isList()||!o.some(S=>cC(S,w,!0)))&&a.push(w),o.push(w)),!(!b.props.rules||!b.props.rules.length)&&!(g&&!b.isFieldDirty())&&(u.add(w.join(c)),!i||Ku(o,w,h))){const S=b.validateRules({validateMessages:{...GB,...this.validateMessages},...s});l.push(S.then(()=>({name:w,errors:[],warnings:[]})).catch(x=>{var M;const P=[],F=[];return(M=x.forEach)==null||M.call(x,({rule:{warningOnly:E},errors:I})=>{E?F.push(...I):P.push(...I)}),P.length?Promise.reject({name:w,errors:P,warnings:F}):{name:w,errors:P,warnings:F}}))}});const m=Cq(l);this.lastValidatePromise=m,m.catch(b=>b).then(b=>{const w=b.map(({name:S})=>S);this.notifyObservers(this.store,w,{type:"validateFinish"}),this.triggerOnFieldsChange(w,b)});const C=m.then(()=>this.lastValidatePromise===m?Promise.resolve(this.getFieldsValue(a)):Promise.reject([])).catch(b=>{var x,P;const w=b.filter(F=>F&&F.errors.length),S=(P=(x=w[0])==null?void 0:x.errors)==null?void 0:P[0];return Promise.reject({message:S,values:this.getFieldsValue(o),errorFields:w,outOfDate:this.lastValidatePromise!==m})});C.catch(b=>b);const v=o.filter(b=>u.has(b.join(c)));return this.triggerOnFieldsChange(v),C});Fe(this,"submit",()=>{this.warningUnhooked(),this.validateFields().then(t=>{const{onFinish:n}=this.callbacks;if(n)try{n(t)}catch(r){console.error(r)}}).catch(t=>{const{onFinishFailed:n}=this.callbacks;n&&n(t)})});this.forceRootUpdate=t}}function zB(e){const t=p.useRef(null),[,n]=p.useState({});if(!t.current)if(e)t.current=e;else{const r=()=>{n({})},s=new bq(r);t.current=s.getForm()}return[t.current]}const i0=p.createContext({triggerFormChange:()=>{},triggerFormFinish:()=>{},registerForm:()=>{},unregisterForm:()=>{}}),wq=({validateMessages:e,onFormChange:t,onFormFinish:n,children:r})=>{const s=p.useContext(i0),i=p.useRef({});return p.createElement(i0.Provider,{value:{...s,validateMessages:{...s.validateMessages,...e},triggerFormChange:(o,a)=>{t&&t(o,{changedFields:a,forms:i.current}),s.triggerFormChange(o,a)},triggerFormFinish:(o,a)=>{n&&n(o,{values:a,forms:i.current}),s.triggerFormFinish(o,a)},registerForm:(o,a)=>{o&&(i.current={...i.current,[o]:a}),s.registerForm(o,a)},unregisterForm:o=>{const a={...i.current};delete a[o],i.current=a,s.unregisterForm(o)}}},r)};function o0(){return o0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const b=p.useRef(null),w=p.useContext(i0),[S]=zB(r),{useSubscribe:x,setInitialValues:P,setCallbacks:F,setValidateMessages:M,setPreserve:E,destroyForm:I}=S.getInternalHooks(dc);p.useImperativeHandle(v,()=>({...S,nativeElement:b.current})),p.useEffect(()=>(w.registerForm(e,S),()=>{w.unregisterForm(e)}),[w,S,e]),M({...w.validateMessages,...a}),F({onValuesChange:c,onFieldsChange:($,..._)=>{w.triggerFormChange(e,$),u&&u($,..._)},onFinish:$=>{w.triggerFormFinish(e,$),h&&h($)},onFinishFailed:g}),E(s);const A=p.useRef(null);P(t,!A.current),A.current||(A.current=!0),p.useEffect(()=>()=>I(m),[]);let L;const D=typeof i=="function";if(D){const $=S.getFieldsValue(!0);L=i($,S)}else L=i;x(!D);const N=p.useRef(null);p.useEffect(()=>{gq(N.current||[],n||[])||S.setFields(n||[]),N.current=n},[n,S]);const k=p.useMemo(()=>({...S,validateTrigger:l}),[S,l]),G=p.createElement(lC.Provider,{value:null},p.createElement(id.Provider,{value:k},L));return o===!1?G:p.createElement(o,o0({},C,{ref:b,onSubmit:$=>{$.preventDefault(),$.stopPropagation(),S.submit()},onReset:$=>{var _;$.preventDefault(),S.resetFields(),(_=C.onReset)==null||_.call(C,$)}}),G)};function Dw(e){try{return JSON.stringify(e)}catch{return Math.random()}}function xq(...e){const[t,n={}]=e,r=A9(n)?{form:n}:n,s=r.form,[i,o]=p.useState(()=>typeof t=="function"?t({}):void 0),a=p.useMemo(()=>Dw(i),[i]),l=p.useRef(a);l.current=a;const c=p.useContext(id),u=s||c,h=u&&u._init,{getFieldsValue:g,getInternalHooks:m}=u,{registerWatch:C}=m(dc),v=Yt((w,S)=>{const x=r.preserve?S??g(!0):w??g(),P=typeof t=="function"?t(x):Gs(x,ar(t));Dw(i)!==Dw(P)&&o(P)}),b=typeof t=="function"?t:JSON.stringify(t);return p.useEffect(()=>{h&&v()},[h,b]),p.useEffect(()=>h?C((S,x)=>{v(S,x)}):void 0,[h]),i}const Rq=p.forwardRef(Sq),ig=Rq;ig.FormProvider=wq;ig.Field=HB;ig.List=mq;ig.useForm=zB;ig.useWatch=xq;const Di=p.createContext({}),Eq=({children:e,status:t,override:n})=>{const r=p.useContext(Di),s=p.useMemo(()=>{const i={...r};return n&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,n,r]);return p.createElement(Di.Provider,{value:s},e)},Pq=p.createContext(void 0),od=e=>{const{space:t,form:n,children:r}=e;if(!qs(r))return null;let s=r;return n&&(s=K.createElement(Eq,{override:!0,status:!0},s)),t&&(s=K.createElement(g7,null,s)),s},Fq=e=>{if(bs()&&window.document.documentElement){const t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(r=>r in n.style)}return!1};function NA(e,t){return Fq(e)}const Tq=()=>bs()&&window.document.documentElement;function Mq(e,t,n){return p.useMemo(()=>({...{trap:t??!0,focusTriggerAfterClose:n??!0},...e}),[e,t,n])}const xv=e=>{const{prefixCls:t,className:n,style:r,size:s,shape:i}=e,o=ee({[`${t}-lg`]:s==="large",[`${t}-sm`]:s==="small"}),a=ee({[`${t}-circle`]:i==="circle",[`${t}-square`]:i==="square",[`${t}-round`]:i==="round"}),l=p.useMemo(()=>typeof s=="number"?{width:s,height:s,lineHeight:`${s}px`}:{},[s]);return p.createElement("span",{className:ee(t,o,a,n),style:{...l,...r}})},Iq=new yn("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),XE=e=>({height:e,lineHeight:he(e)}),gl=e=>({width:e,...XE(e)}),Dq=e=>({background:e.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:Iq,animationDuration:e.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),Aw=(e,t)=>({width:t(e).mul(5).equal(),minWidth:t(e).mul(5).equal(),...XE(e)}),Aq=e=>{const{skeletonAvatarCls:t,gradientFromColor:n,controlHeight:r,controlHeightLG:s,controlHeightSM:i}=e;return{[t]:{display:"inline-block",verticalAlign:"top",background:n,...gl(r)},[`${t}${t}-circle`]:{borderRadius:"50%"},[`${t}${t}-lg`]:{...gl(s)},[`${t}${t}-sm`]:{...gl(i)}}},Lq=e=>{const{controlHeight:t,borderRadiusSM:n,skeletonInputCls:r,controlHeightLG:s,controlHeightSM:i,gradientFromColor:o,calc:a}=e;return{[r]:{display:"inline-block",verticalAlign:"top",background:o,borderRadius:n,...Aw(t,a)},[`${r}-lg`]:{...Aw(s,a)},[`${r}-sm`]:{...Aw(i,a)}}},WB=e=>{const{gradientFromColor:t,borderRadiusSM:n,imageSizeBase:r,calc:s}=e;return{display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"middle",background:t,borderRadius:n,...gl(s(r).mul(2).equal())}},Oq=e=>({[e.skeletonNodeCls]:{...WB(e)}}),kq=e=>{const{skeletonImageCls:t,imageSizeBase:n,calc:r}=e;return{[t]:{...WB(e),[`${t}-path`]:{fill:"#bfbfbf"},[`${t}-svg`]:{...gl(n),maxWidth:r(n).mul(4).equal(),maxHeight:r(n).mul(4).equal()},[`${t}-svg${t}-svg-circle`]:{borderRadius:"50%"}},[`${t}${t}-circle`]:{borderRadius:"50%"}}},Lw=(e,t,n)=>{const{skeletonButtonCls:r}=e;return{[`${n}${r}-circle`]:{width:t,minWidth:t,borderRadius:"50%"},[`${n}${r}-round`]:{borderRadius:t}}},Ow=(e,t)=>({width:t(e).mul(2).equal(),minWidth:t(e).mul(2).equal(),...XE(e)}),Nq=e=>{const{borderRadiusSM:t,skeletonButtonCls:n,controlHeight:r,controlHeightLG:s,controlHeightSM:i,gradientFromColor:o,calc:a}=e;return{[n]:{display:"inline-block",verticalAlign:"top",background:o,borderRadius:t,width:a(r).mul(2).equal(),minWidth:a(r).mul(2).equal(),...Ow(r,a)},...Lw(e,r,n),[`${n}-lg`]:{...Ow(s,a)},...Lw(e,s,`${n}-lg`),[`${n}-sm`]:{...Ow(i,a)},...Lw(e,i,`${n}-sm`)}},Bq=e=>{const{componentCls:t,skeletonAvatarCls:n,skeletonTitleCls:r,skeletonParagraphCls:s,skeletonButtonCls:i,skeletonInputCls:o,skeletonNodeCls:a,skeletonImageCls:l,controlHeight:c,controlHeightLG:u,controlHeightSM:h,gradientFromColor:g,padding:m,marginSM:C,borderRadius:v,titleHeight:b,blockRadius:w,paragraphLiHeight:S,controlHeightXS:x,paragraphMarginTop:P}=e;return{[t]:{display:"table",width:"100%",[`${t}-header`]:{display:"table-cell",paddingInlineEnd:m,verticalAlign:"top",[n]:{display:"inline-block",verticalAlign:"top",background:g,...gl(c)},[`${n}-circle`]:{borderRadius:"50%"},[`${n}-lg`]:{...gl(u)},[`${n}-sm`]:{...gl(h)}},[`${t}-section`]:{display:"table-cell",width:"100%",verticalAlign:"top",[r]:{width:"100%",height:b,background:g,borderRadius:w,[`+ ${s}`]:{marginBlockStart:h}},[s]:{padding:0,"> li":{width:"100%",height:S,listStyle:"none",background:g,borderRadius:w,"+ li":{marginBlockStart:x}}},[`${s}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${t}-section`]:{[`${r}, ${s} > li`]:{borderRadius:v}}},[`${t}-with-avatar ${t}-section`]:{[r]:{marginBlockStart:C,[`+ ${s}`]:{marginBlockStart:P}}},[`${t}${t}-element`]:{display:"inline-block",width:"auto",...Nq(e),...Aq(e),...Lq(e),...Oq(e),...kq(e)},[`${t}${t}-block`]:{width:"100%",[i]:{width:"100%"},[o]:{width:"100%"}},[`${t}${t}-active`]:{[` ${r}, ${s} > li, ${n}, ${i}, ${o}, ${a}, ${l} `]:{...Dq(e)}}}},$q=e=>{const{colorFillContent:t,colorFill:n}=e,r=t,s=n;return{color:r,colorGradientEnd:s,gradientFromColor:r,gradientToColor:s,titleHeight:e.controlHeight/2,blockRadius:e.borderRadiusSM,paragraphMarginTop:e.marginLG+e.marginXXS,paragraphLiHeight:e.controlHeight/2}},og=Ln("Skeleton",e=>{const{componentCls:t,calc:n}=e,r=En(e,{skeletonAvatarCls:`${t}-avatar`,skeletonTitleCls:`${t}-title`,skeletonParagraphCls:`${t}-paragraph`,skeletonButtonCls:`${t}-button`,skeletonInputCls:`${t}-input`,skeletonNodeCls:`${t}-node`,skeletonImageCls:`${t}-image`,imageSizeBase:n(e.controlHeight).mul(1.5).equal(),borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${e.gradientFromColor} 25%, ${e.gradientToColor} 37%, ${e.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return Bq(r)},$q,{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),Gq=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:s,active:i,style:o,styles:a,shape:l="circle",size:c="default",...u}=e,{getPrefixCls:h}=p.useContext(Kt),g=h("skeleton",t),[m,C]=og(g),v=ee(g,`${g}-element`,{[`${g}-active`]:i},r==null?void 0:r.root,n,s,m,C);return p.createElement("div",{className:v,style:a==null?void 0:a.root},p.createElement(xv,{prefixCls:`${g}-avatar`,className:r==null?void 0:r.content,style:{...a==null?void 0:a.content,...o},shape:l,size:c,...u}))},Vq=e=>{const{prefixCls:t,className:n,rootClassName:r,classNames:s,active:i,style:o,styles:a,block:l=!1,size:c="default",...u}=e,{getPrefixCls:h}=p.useContext(Kt),g=h("skeleton",t),[m,C]=og(g),v=ee(g,`${g}-element`,{[`${g}-active`]:i,[`${g}-block`]:l},s==null?void 0:s.root,n,r,m,C);return p.createElement("div",{className:v,style:a==null?void 0:a.root},p.createElement(xv,{prefixCls:`${g}-button`,className:s==null?void 0:s.content,style:{...a==null?void 0:a.content,...o},size:c,...u}))},_B=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:s,internalClassName:i,style:o,styles:a,active:l,children:c}=e,{getPrefixCls:u}=p.useContext(Kt),h=u("skeleton",t),[g,m]=og(h),C=ee(h,`${h}-element`,{[`${h}-active`]:l},g,r==null?void 0:r.root,n,s,m);return p.createElement("div",{className:C,style:a==null?void 0:a.root},p.createElement("div",{className:ee(r==null?void 0:r.content,i||`${h}-node`),style:{...a==null?void 0:a.content,...o}},c))},Hq=e=>{const{getPrefixCls:t}=p.useContext(Kt),n=t("skeleton",e.prefixCls);return p.createElement(_B,{...e,internalClassName:`${n}-image`},p.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${n}-image-svg`},p.createElement("title",null,"Image placeholder"),p.createElement("path",{d:"M365.7 329.1q0 45.8-32 77.7t-77.7 32-77.7-32-32-77.7 32-77.6 77.7-32 77.7 32 32 77.6M951 548.6v256H146.3V694.9L329 512l91.5 91.4L713 311zm54.8-402.3H91.4q-7.4 0-12.8 5.4T73 164.6v694.8q0 7.5 5.5 12.9t12.8 5.4h914.3q7.5 0 12.9-5.4t5.4-12.9V164.6q0-7.5-5.4-12.9t-12.9-5.4m91.4 18.3v694.8q0 37.8-26.8 64.6t-64.6 26.9H91.4q-37.7 0-64.6-26.9T0 859.4V164.6q0-37.8 26.8-64.6T91.4 73h914.3q37.8 0 64.6 26.9t26.8 64.6",className:`${n}-image-path`})))},zq=e=>{const{prefixCls:t,className:n,classNames:r,rootClassName:s,active:i,block:o,style:a,styles:l,size:c="default",...u}=e,{getPrefixCls:h}=p.useContext(Kt),g=h("skeleton",t),[m,C]=og(g),v=ee(g,`${g}-element`,{[`${g}-active`]:i,[`${g}-block`]:o},r==null?void 0:r.root,n,s,m,C);return p.createElement("div",{className:v,style:l==null?void 0:l.root},p.createElement(xv,{prefixCls:`${g}-input`,className:r==null?void 0:r.content,style:{...l==null?void 0:l.content,...a},size:c,...u}))},Wq=(e,t)=>{const{width:n,rows:r=2}=t;if(Array.isArray(n))return n[e];if(r-1===e)return n},_q=e=>{const{prefixCls:t,className:n,style:r,rows:s=0}=e,i=Array.from({length:s}).map((o,a)=>p.createElement("li",{key:a,style:{width:Wq(a,e)}}));return p.createElement("ul",{className:ee(t,n),style:r},i)},Uq=({prefixCls:e,className:t,width:n,style:r})=>p.createElement("h3",{className:ee(e,t),style:{width:n,...r}});function kw(e){return e&&typeof e=="object"?e:{}}function jq(e,t){return e&&!t?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function Kq(e,t){return!e&&t?{width:"38%"}:e&&t?{width:"50%"}:{}}function qq(e,t){const n={};return(!e||!t)&&(n.width="61%"),!e&&t?n.rows=3:n.rows=2,n}const Ed=e=>{const{prefixCls:t,loading:n,className:r,rootClassName:s,classNames:i,style:o,styles:a,children:l,avatar:c=!1,title:u=!0,paragraph:h=!0,active:g,round:m}=e,{getPrefixCls:C,direction:v,className:b,style:w,classNames:S,styles:x}=Hn("skeleton"),P=C("skeleton",t),[F,M]=og(P),E={...e,avatar:c,title:u,paragraph:h},[I,A]=Kn([S,i],[x,a],{props:E});if(n||!("loading"in e)){const L=!!c,D=!!u,N=!!h;let k;if(L){const _={className:I.avatar,prefixCls:`${P}-avatar`,...jq(D,N),...kw(c),style:A.avatar};k=p.createElement("div",{className:ee(I.header,`${P}-header`),style:A.header},p.createElement(xv,{..._}))}let G;if(D||N){let _;if(D){const V={className:I.title,prefixCls:`${P}-title`,...Kq(L,N),...kw(u),style:A.title};_=p.createElement(Uq,{...V})}let U;if(N){const V={className:I.paragraph,prefixCls:`${P}-paragraph`,...qq(L,D),...kw(h),style:A.paragraph};U=p.createElement(_q,{...V})}G=p.createElement("div",{className:ee(I.section,`${P}-section`),style:A.section},_,U)}const $=ee(P,{[`${P}-with-avatar`]:L,[`${P}-active`]:g,[`${P}-rtl`]:v==="rtl",[`${P}-round`]:m},I.root,b,r,s,F,M);return p.createElement("div",{className:$,style:{...A.root,...w,...o}},k,G)}return l??null};Ed.Button=Vq;Ed.Avatar=Gq;Ed.Input=zq;Ed.Image=Hq;Ed.Node=_B;function BA(){}const Xq=p.createContext({add:BA,remove:BA});function Yq(e){const t=p.useContext(Xq),n=p.useRef(null);return Yt(s=>{if(s){const i=e?s.querySelector(e):s;i&&(t.add(i),n.current=i)}else t.remove(n.current)})}const $A=()=>{const{cancelButtonProps:e,cancelTextLocale:t,onCancel:n}=p.useContext(rg);return K.createElement(Mo,{onClick:n,...e},t)},GA=()=>{const{confirmLoading:e,okButtonProps:t,okType:n,okTextLocale:r,onOk:s}=p.useContext(rg);return K.createElement(Mo,{...FB(n),loading:e,onClick:s,...t},r)};function UB(e,t){return K.createElement("span",{className:`${e}-close-x`},t||K.createElement(Kc,{className:`${e}-close-icon`}))}const jB=e=>{const{okText:t,okType:n="primary",cancelText:r,confirmLoading:s,onOk:i,onCancel:o,okButtonProps:a,cancelButtonProps:l,footer:c}=e,[u]=Lo("Modal",ZN()),h=t||(u==null?void 0:u.okText),g=r||(u==null?void 0:u.cancelText),m=K.useMemo(()=>({confirmLoading:s,okButtonProps:a,cancelButtonProps:l,okTextLocale:h,cancelTextLocale:g,okType:n,onOk:i,onCancel:o}),[s,a,l,h,g,n,i,o]);let C;return typeof c=="function"||typeof c>"u"?(C=K.createElement(K.Fragment,null,K.createElement($A,null),K.createElement(GA,null)),typeof c=="function"&&(C=c(C,{OkBtn:GA,CancelBtn:$A})),C=K.createElement(OB,{value:m},C)):C=c,K.createElement(vB,{disabled:!1},C)},Qq=e=>{const{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},Zq=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},Jq=(e,t)=>{const{componentCls:n,gridColumns:r,antCls:s}=e,[i,o]=br(s,"grid"),[,a]=br(s,"col"),l={};for(let c=r;c>=0;c--)c===0?(l[`${n}${t}-${c}`]={display:"none"},l[`${n}-push-${c}`]={insetInlineStart:"auto"},l[`${n}-pull-${c}`]={insetInlineEnd:"auto"},l[`${n}${t}-push-${c}`]={insetInlineStart:"auto"},l[`${n}${t}-pull-${c}`]={insetInlineEnd:"auto"},l[`${n}${t}-offset-${c}`]={marginInlineStart:0},l[`${n}${t}-order-${c}`]={order:0}):(l[`${n}${t}-${c}`]=[{[i("display")]:"block",display:"block"},{display:o("display"),flex:`0 0 ${c/r*100}%`,maxWidth:`${c/r*100}%`}],l[`${n}${t}-push-${c}`]={insetInlineStart:`${c/r*100}%`},l[`${n}${t}-pull-${c}`]={insetInlineEnd:`${c/r*100}%`},l[`${n}${t}-offset-${c}`]={marginInlineStart:`${c/r*100}%`},l[`${n}${t}-order-${c}`]={order:c});return l[`${n}${t}-flex`]={flex:a(`${t.replace(/-/,"")}-flex`)},l},a0=(e,t)=>Jq(e,t),eX=(e,t,n)=>({[`@media (min-width: ${he(t)})`]:{...a0(e,n)}}),tX=()=>({}),nX=()=>({}),rX=Ln("Grid",Qq,tX),KB=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),sX=Ln("Grid",e=>{const t=En(e,{gridColumns:24}),n=KB(t);return delete n.xs,[Zq(t),a0(t,""),a0(t,"-xs"),Object.keys(n).map(r=>eX(t,n[r],`-${r}`)).reduce((r,s)=>({...r,...s}),{})]},nX);function VA(e){return{position:e,inset:0}}const iX=e=>{const{componentCls:t,antCls:n}=e;return[{[`${t}-root`]:{[`${t}${n}-zoom-enter, ${t}${n}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${n}-zoom-leave ${t}-container`]:{pointerEvents:"none"},[`${t}-mask`]:{...VA("fixed"),zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`&${t}-mask-blur`]:{backdropFilter:"blur(4px)"},[`${t}-hidden`]:{display:"none"}},[`${t}-wrap`]:{...VA("fixed"),zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"}}},{[`${t}-root`]:IB(e)}]},oX=e=>{const{componentCls:t,motionDurationMid:n}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${he(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:{...jn(e),pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${he(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto","&:focus-visible":{borderRadius:e.borderRadiusLG,...ro(e)},[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-container`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:{position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:["color","background-color"].map(r=>`${r} ${n}`).join(", "),"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:he(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive},...Fo(e)},[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${he(e.borderRadiusLG)} ${he(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${he(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}}},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-container, ${t}-body, ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},aX=e=>{const{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},lX=e=>{const{componentCls:t}=e,n=KB(e),r={...n};delete r.xs;const s=`--${t.replace(".","")}-`,i=Object.keys(r).map(o=>({[`@media (min-width: ${he(r[o])})`]:{width:`var(${s}${o}-width)`}}));return{[`${t}-root`]:{[t]:[].concat(nn(Object.keys(n).map((o,a)=>{const l=Object.keys(n)[a-1];return l?{[`${s}${o}-width`]:`var(${s}${l}-width)`}:null})),[{width:`var(${s}xs-width)`}],nn(i))}}},qB=e=>{const t=e.padding,n=e.fontSizeHeading5,r=e.lineHeightHeading5;return En(e,{modalHeaderHeight:e.calc(e.calc(r).mul(n).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},XB=e=>({footerBg:"transparent",headerBg:"transparent",titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${he(e.paddingMD)} ${he(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${he(e.padding)} ${he(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${he(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${he(e.paddingXS)} ${he(e.padding)}`:0,footerBorderTop:e.wireframe?`${he(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${he(e.borderRadiusLG)} ${he(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${he(e.padding*2)} ${he(e.padding*2)} ${he(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM,mask:!0}),YB=Ln("Modal",e=>{const t=qB(e);return[oX(t),aX(t),iX(t),wv(t,"zoom"),lX(t)]},XB,{unitless:{titleLineHeight:!0}});let l0;const cX=e=>{l0={x:e.pageX,y:e.pageY},setTimeout(()=>{l0=null},100)};Tq()&&document.documentElement.addEventListener("click",cX,!0);const QB=e=>{const{prefixCls:t,className:n,rootClassName:r,open:s,wrapClassName:i,centered:o,getContainer:a,style:l,width:c=520,footer:u,classNames:h,styles:g,children:m,loading:C,confirmLoading:v,zIndex:b,mousePosition:w,onOk:S,onCancel:x,okButtonProps:P,cancelButtonProps:F,destroyOnHidden:M,destroyOnClose:E,panelRef:I=null,closable:A,mask:L,modalRender:D,maskClosable:N,focusTriggerAfterClose:k,focusable:G,...$}=e,{getPopupContainer:_,getPrefixCls:U,direction:V,className:W,style:j,classNames:H,styles:B,centered:Y,cancelButtonProps:J,okButtonProps:te,mask:Z}=Hn("modal"),{modal:ae}=p.useContext(Kt),[de,ge]=p.useMemo(()=>typeof A=="boolean"?[void 0,void 0]:[A==null?void 0:A.afterClose,A==null?void 0:A.onClose],[A]),ve=U("modal",t),Re=U(),[ne,re,ce]=q8(L,Z,ve,N),X=Mq(G,ne,k),ue=It=>{v||(x==null||x(It),ge==null||ge())},fe=It=>{S==null||S(It),ge==null||ge()},oe=Rs(ve),[we,Be]=YB(ve,oe),Ae=ee(i,{[`${ve}-centered`]:o??Y,[`${ve}-wrap-rtl`]:V==="rtl"}),Pe=u!==null&&!C?p.createElement(jB,{...e,okButtonProps:{...te,...P},onOk:fe,cancelButtonProps:{...J,...F},onCancel:ue}):null,[_e,ze,lt,Ft]=K8(QD(e),QD(ae),{closable:!0,closeIcon:p.createElement(Kc,{className:`${ve}-close-icon`}),closeIconRender:It=>UB(ve,It)}),gt=_e?{disabled:lt,closeIcon:ze,afterClose:de,...Ft}:!1,Ye=D?It=>p.createElement("div",{className:`${ve}-render`},D(It)):void 0,Ie=`.${ve}-${D?"render":"container"}`,Ke=Yq(Ie),De=xs(I,Ke),[je,qe]=tg("Modal",b),Ge={...e,width:c,panelRef:I,focusTriggerAfterClose:X.focusTriggerAfterClose,focusable:X,mask:ne,maskClosable:ce,zIndex:je},[Ce,Oe]=Kn([H,h,re],[B,g],{props:Ge}),[ot,ut]=p.useMemo(()=>c&&typeof c=="object"?[void 0,c]:[c,void 0],[c]),wt=p.useMemo(()=>{const It={};return ut&&Object.keys(ut).forEach(Gt=>{const Nt=ut[Gt];Nt!==void 0&&(It[`--${ve}-${Gt}-width`]=typeof Nt=="number"?`${Nt}px`:Nt)}),It},[ve,ut]);return p.createElement(od,{form:!0,space:!0},p.createElement(pv.Provider,{value:qe},p.createElement(D9,{width:ot,...$,zIndex:je,getContainer:a===void 0?_:a,prefixCls:ve,rootClassName:ee(we,r,Be,oe,Ce.root),rootStyle:Oe.root,footer:Pe,visible:s,mousePosition:w??l0,onClose:ue,closable:gt,closeIcon:ze,transitionName:Ic(Re,"zoom",e.transitionName),maskTransitionName:Ic(Re,"fade",e.maskTransitionName),mask:ne,maskClosable:ce,className:ee(we,n,W),style:{...j,...l,...wt},classNames:{...Ce,wrapper:ee(Ce.wrapper,Ae)},styles:Oe,panelRef:De,destroyOnHidden:M??E,modalRender:Ye,focusTriggerAfterClose:X.focusTriggerAfterClose,focusTrap:X.trap},C?p.createElement(Ed,{active:!0,title:!1,paragraph:{rows:4},className:`${ve}-body-skeleton`}):m)))},uX=e=>{const{componentCls:t,titleFontSize:n,titleLineHeight:r,modalConfirmIconSize:s,fontSize:i,lineHeight:o,modalTitleHeight:a,fontHeight:l,confirmBodyPadding:c}=e,u=`${t}-confirm`;return{[u]:{"&-rtl":{direction:"rtl"},[`${e.antCls}-modal-header`]:{display:"none"},[`${u}-body-wrapper`]:{...Dp()},[`&${t} ${t}-body`]:{padding:c},[`${u}-body`]:{display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${e.iconCls}`]:{flex:"none",fontSize:s,marginInlineEnd:e.confirmIconMarginInlineEnd,marginTop:e.calc(e.calc(l).sub(s).equal()).div(2).equal()},[`&-has-title > ${e.iconCls}`]:{marginTop:e.calc(e.calc(a).sub(s).equal()).div(2).equal()}},[`${u}-paragraph`]:{display:"flex",flexDirection:"column",flex:"auto",rowGap:e.marginXS,maxWidth:`calc(100% - ${he(e.marginSM)})`},[`${e.iconCls} + ${u}-paragraph`]:{maxWidth:`calc(100% - ${he(e.calc(e.modalConfirmIconSize).add(e.marginSM).equal())})`},[`${u}-title`]:{color:e.colorTextHeading,fontWeight:e.fontWeightStrong,fontSize:n,lineHeight:r},[`${u}-container`]:{color:e.colorText,fontSize:i,lineHeight:o},[`${u}-btns`]:{textAlign:"end",marginTop:e.confirmBtnsMarginTop,[`${e.antCls}-btn + ${e.antCls}-btn`]:{marginBottom:0,marginInlineStart:e.marginXS}}},[`${u}-error ${u}-body > ${e.iconCls}`]:{color:e.colorError},[`${u}-warning ${u}-body > ${e.iconCls}, ${u}-confirm ${u}-body > ${e.iconCls}`]:{color:e.colorWarning},[`${u}-info ${u}-body > ${e.iconCls}`]:{color:e.colorInfo},[`${u}-success ${u}-body > ${e.iconCls}`]:{color:e.colorSuccess}}},dX=kE(["Modal","confirm"],e=>{const t=qB(e);return uX(t)},XB,{order:-1e3}),ZB=e=>{const{prefixCls:t,icon:n,okText:r,cancelText:s,confirmPrefixCls:i,type:o,okCancel:a,footer:l,locale:c,autoFocusButton:u,focusable:h,...g}=e;let m=n;if(!n&&n!==null)switch(o){case"info":m=p.createElement(VN,null);break;case"success":m=p.createElement($N,null);break;case"error":m=p.createElement(hv,null);break;default:m=p.createElement(GN,null)}const C=a??o==="confirm",v=p.useMemo(()=>{const L=(h==null?void 0:h.autoFocusButton)||u;return L||L===null?L:"ok"},[u,h==null?void 0:h.autoFocusButton]),[b]=Lo("Modal"),w=c||b,S=r||(C?w==null?void 0:w.okText:w==null?void 0:w.justOkText),x=s||(w==null?void 0:w.cancelText),{closable:P}=g,{onClose:F}=P&&typeof P=="object"?P:{},M=p.useMemo(()=>({autoFocusButton:v,cancelTextLocale:x,okTextLocale:S,mergedOkCancel:C,onClose:F,...g}),[v,x,S,C,F,g]),E=p.createElement(p.Fragment,null,p.createElement(SA,null),p.createElement(xA,null)),I=e.title!==void 0&&e.title!==null,A=`${i}-body`;return p.createElement("div",{className:`${i}-body-wrapper`},p.createElement("div",{className:ee(A,{[`${A}-has-title`]:I})},m,p.createElement("div",{className:`${i}-paragraph`},I&&p.createElement("span",{className:`${i}-title`},e.title),p.createElement("div",{className:`${i}-content`},e.content))),l===void 0||typeof l=="function"?p.createElement(OB,{value:M},p.createElement("div",{className:`${i}-btns`},typeof l=="function"?l(E,{OkBtn:xA,CancelBtn:SA}):E)):l,p.createElement(dX,{prefixCls:t}))},hX=e=>{const{close:t,zIndex:n,maskStyle:r,direction:s,prefixCls:i,wrapClassName:o,rootPrefixCls:a,bodyStyle:l,closable:c=!1,onConfirm:u,styles:h,title:g,mask:m,maskClosable:C,okButtonProps:v,cancelButtonProps:b}=e,{cancelButtonProps:w,okButtonProps:S}=Hn("modal"),x=`${i}-confirm`,P=e.width||416,F=e.style||{},M=ee(x,`${x}-${e.type}`,{[`${x}-rtl`]:s==="rtl"},e.className),E=p.useMemo(()=>{const L=Ox(m,C);return L.closable??(L.closable=!1),L},[m,C]),[,I]=ds(),A=p.useMemo(()=>n!==void 0?n:I.zIndexPopupBase+sK,[n,I]);return p.createElement(QB,{...e,className:M,wrapClassName:ee({[`${x}-centered`]:!!e.centered},o),onCancel:()=>{t==null||t({triggerCancel:!0}),u==null||u(!1)},title:g,footer:null,transitionName:Ic(a||"","zoom",e.transitionName),maskTransitionName:Ic(a||"","fade",e.maskTransitionName),mask:E,style:F,styles:{body:l,mask:r,...h},width:P,zIndex:A,closable:c},p.createElement(ZB,{...e,confirmPrefixCls:x,okButtonProps:{...S,...v},cancelButtonProps:{...w,...b}}))},JB=e=>{const{rootPrefixCls:t,iconPrefixCls:n,direction:r,theme:s}=e;return p.createElement(ba,{prefixCls:t,iconPrefixCls:n,direction:r,theme:s},p.createElement(hX,{...e}))},hc=[];let e$="";function t$(){return e$}const pX=e=>{var c;const{prefixCls:t,getContainer:n,direction:r}=e,s=ZN(),i=p.useContext(Kt),o=t$()||i.getPrefixCls(),a=t||`${o}-modal`;let l=n;return l===!1&&(l=void 0),K.createElement(JB,{...e,rootPrefixCls:o,prefixCls:a,iconPrefixCls:i.iconPrefixCls,theme:i.theme,direction:r??i.direction,locale:((c=i.locale)==null?void 0:c.Modal)??s,getContainer:l})};function ag(e){const t=t7(),n=document.createDocumentFragment();let r={...e,close:a,open:!0},s;function i(...c){var h;c.some(g=>g==null?void 0:g.triggerCancel)&&((h=e.onCancel)==null||h.call(e,()=>{},...c.slice(1)));for(let g=0;g{})}const o=c=>{clearTimeout(s),s=setTimeout(()=>{const u=t.getPrefixCls(void 0,t$()),h=t.getIconPrefixCls(),g=t.getTheme(),m=K.createElement(pX,{...c});SB(K.createElement(ba,{prefixCls:u,iconPrefixCls:h,theme:g},typeof t.holderRender=="function"?t.holderRender(m):m),n)})};function a(...c){r={...r,open:!1,afterClose:()=>{typeof e.afterClose=="function"&&e.afterClose(),i.apply(this,c)}},o(r)}function l(c){typeof c=="function"?r=c(r):r={...r,...c},o(r)}return o(r),hc.push(a),{destroy:a,update:l}}function n$(e){return{...e,type:"warning"}}function r$(e){return{...e,type:"info"}}function s$(e){return{...e,type:"success"}}function i$(e){return{...e,type:"error"}}function o$(e){return{...e,type:"confirm"}}function gX({rootPrefixCls:e}){e$=e}const fX=({afterClose:e,config:t,...n},r)=>{const[s,i]=p.useState(!0),[o,a]=p.useState(t),{direction:l,getPrefixCls:c}=p.useContext(Kt),u=c("modal"),h=c(),g=()=>{var b;e(),(b=o.afterClose)==null||b.call(o)},m=(...b)=>{var S;i(!1),b.some(x=>x==null?void 0:x.triggerCancel)&&((S=o.onCancel)==null||S.call(o,()=>{},...b.slice(1)))};p.useImperativeHandle(r,()=>({destroy:m,update:b=>{a(w=>{const S=typeof b=="function"?b(w):b;return{...w,...S}})}}));const C=o.okCancel??o.type==="confirm",[v]=Lo("Modal",To.Modal);return p.createElement(JB,{prefixCls:u,rootPrefixCls:h,...o,close:m,open:s,afterClose:g,okText:o.okText||(C?v==null?void 0:v.okText:v==null?void 0:v.justOkText),direction:o.direction||l,cancelText:o.cancelText||(v==null?void 0:v.cancelText),...n})},mX=p.forwardRef(fX);let HA=0;const CX=p.memo(p.forwardRef((e,t)=>{const[n,r]=J8();return p.useImperativeHandle(t,()=>({patchElement:r}),[r]),p.createElement(p.Fragment,null,n)}));function vX(){const e=p.useRef(null),[t,n]=p.useState([]);p.useEffect(()=>{t.length&&(nn(t).forEach(o=>{o()}),n([]))},[t]);const r=p.useCallback(i=>function(a){var v;HA+=1;const l=p.createRef();let c;const u=new Promise(b=>{c=b});let h=!1,g;const m=p.createElement(mX,{key:`modal-${HA}`,config:i(a),ref:l,afterClose:()=>{g==null||g()},isSilent:()=>h,onConfirm:b=>{c(b)}});return g=(v=e.current)==null?void 0:v.patchElement(m),g&&hc.push(g),{destroy:()=>{function b(){var w;(w=l.current)==null||w.destroy()}l.current?b():n(w=>[].concat(nn(w),[b]))},update:b=>{function w(){var S;(S=l.current)==null||S.update(b)}l.current?w():n(S=>[].concat(nn(S),[w]))},then:b=>(h=!0,u.then(b))}},[]);return[p.useMemo(()=>({info:r(r$),success:r(s$),error:r(i$),warning:r(n$),confirm:r(o$)}),[r]),p.createElement(CX,{key:"modal-holder",ref:e})]}function a$(e){return t=>p.createElement(ba,{theme:{token:{motion:!1,zIndexPopupBase:0}}},p.createElement(e,{...t}))}const YE=(e,t,n,r,s)=>a$(o=>{const{prefixCls:a,style:l}=o,c=p.useRef(null),[u,h]=p.useState(0),[g,m]=p.useState(0),[C,v]=ir(!1,o.open),{getPrefixCls:b}=p.useContext(Kt),w=b(r||"select",a);p.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){const P=new ResizeObserver(M=>{const E=M[0].target;h(E.offsetHeight+8),m(E.offsetWidth)}),F=setInterval(()=>{var I;const M=s?`.${s(w)}`:`.${w}-dropdown`,E=(I=c.current)==null?void 0:I.querySelector(M);E&&(clearInterval(F),P.observe(E))},10);return()=>{clearInterval(F),P.disconnect()}}},[w]);let S={...o,style:{...l,margin:0},open:C,getPopupContainer:()=>c.current};n&&(S=n(S)),t&&Object.assign(S,{[t]:{overflow:{adjustX:!1,adjustY:!1}}});const x={paddingBottom:u,position:"relative",minWidth:g};return p.createElement("div",{ref:c,style:x},p.createElement(e,{...S}))}),yX=(e,t,n,r,s=!1,i,o)=>{const a=p.useMemo(()=>typeof n=="boolean"?{allowClear:n}:n&&typeof n=="object"?n:{allowClear:!1},[n]);return p.useMemo(()=>{const l=!s&&a.allowClear!==!1&&(t.length||i)&&!(o==="combobox"&&i==="");return{allowClear:l,clearIcon:l?a.clearIcon||r||"×":null}},[a,r,s,t.length,i,o])},l$=p.createContext(null);function Xc(){return p.useContext(l$)}function bX(e=250){const t=p.useRef(null),n=p.useRef(null);p.useEffect(()=>()=>{window.clearTimeout(n.current)},[]);function r(s){(s||t.current===null)&&(t.current=s),window.clearTimeout(n.current),n.current=window.setTimeout(()=>{t.current=null},e)}return[()=>t.current,r]}function c$(e,t){return e.filter(n=>n).some(n=>n.contains(t)||n===t)}function wX(e,t,n,r){const s=Yt(i=>{if(r)return;let o=i.target;o.shadowRoot&&i.composed&&(o=i.composedPath()[0]||o),i._ori_target&&(o=i._ori_target),t&&!c$(e(),o)&&n(!1)});p.useEffect(()=>(window.addEventListener("mousedown",s),()=>window.removeEventListener("mousedown",s)),[s])}function c0(){return c0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const t=e===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}},xX=(e,t)=>{const{prefixCls:n,disabled:r,visible:s,children:i,popupElement:o,animation:a,transitionName:l,popupStyle:c,popupClassName:u,direction:h="ltr",placement:g,builtinPlacements:m,popupMatchSelectWidth:C,popupRender:v,popupAlign:b,getPopupContainer:w,empty:S,onPopupVisibleChange:x,onPopupMouseEnter:P,onPopupMouseDown:F,onPopupBlur:M,...E}=e,I=`${n}-dropdown`;let A=o;v&&(A=v(o));const L=p.useMemo(()=>m||SX(C),[m,C]),D=a?`${I}-${a}`:l,N=typeof C=="number",k=p.useMemo(()=>N?null:C===!1?"minWidth":"width",[C,N]);let G=c;N&&(G={...c,width:C});const $=p.useRef(null);return p.useImperativeHandle(t,()=>({getPopupElement:()=>{var _;return(_=$.current)==null?void 0:_.popupElement}})),p.createElement(mv,c0({},E,{showAction:x?["click"]:[],hideAction:x?["click"]:[],popupPlacement:g||(h==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:L,prefixCls:I,popupMotion:{motionName:D},popup:p.createElement("div",{onMouseEnter:P,onMouseDown:F,onBlur:M},A),ref:$,stretch:k,popupAlign:b,popupVisible:s,getPopupContainer:w,popupClassName:ee(u,{[`${I}-empty`]:S}),popupStyle:G,onPopupVisibleChange:x}),i)},RX=p.forwardRef(xX);function zA(e,t){const{key:n}=e;let r;return"value"in e&&({value:r}=e),n??(r!==void 0?r:`rc-index-key-${t}`)}function u0(e){return typeof e<"u"&&!Number.isNaN(e)}function u$(e,t){const{label:n,value:r,options:s,groupLabel:i}=e||{},o=n||(t?"children":"label");return{label:o,value:r||"value",options:s||"options",groupLabel:i||o}}function EX(e,{fieldNames:t,childrenAsData:n}={}){const r=[],{label:s,value:i,options:o,groupLabel:a}=u$(t,!1);function l(c,u){Array.isArray(c)&&c.forEach(h=>{if(u||!(o in h)){const g=h[i];r.push({key:zA(h,r.length),groupOption:u,data:h,label:h[s],value:g})}else{let g=h[a];g===void 0&&n&&(g=h.label),r.push({key:zA(h,r.length),group:!0,data:h,label:g}),l(h[o],!0)}})}return l(e,!1),r}function d0(e){const t={...e};return"props"in t||Object.defineProperty(t,"props",{get(){return Jn(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}const PX=(e,t,n)=>{if(!t||!t.length)return null;let r=!1;const s=(o,[a,...l])=>{if(!a)return[o];const c=o.split(a);return r=r||c.length>1,c.reduce((u,h)=>[...u,...s(h,l)],[]).filter(Boolean)},i=s(e,t);return r?typeof n<"u"?i.slice(0,n):i:null};function FX(e){const{visible:t,values:n}=e;if(!t)return null;const r=50;return p.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`${n.slice(0,r).map(({label:s,value:i})=>["number","string"].includes(typeof s)?s:i).join(", ")}`,n.length>r?", ...":null)}const TX=e=>{const t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(null)},QE=(e,t=1)=>{if(t<=0){e();return}TX(()=>{QE(e,t-1)})};function MX(e,t,n,r){const[s,i]=p.useState(!1);p.useEffect(()=>{i(!0)},[]);const[o,a]=ir(e,t),[l,c]=p.useState(!1),u=s?o:!1,h=r(u),g=p.useRef(0),m=Yt(v=>{n&&h!==v&&n(v),a(v)}),C=Yt((v,b={})=>{const{cancelFun:w}=b;g.current+=1;const S=g.current,x=typeof v=="boolean"?v:!h;c(!x);function P(){S===g.current&&!(w!=null&&w())&&(m(x),c(!1))}x?P():QE(()=>{P()})});return[u,h,C,l]}function Nw(e){const{children:t,...n}=e;return t?p.createElement("div",n,t):null}const d$=p.createContext(null);function lg(){return p.useContext(d$)}const h$=p.forwardRef((e,t)=>{const{onChange:n,onKeyDown:r,onBlur:s,style:i,syncWidth:o,value:a,className:l,autoComplete:c,...u}=e,{prefixCls:h,mode:g,onSearch:m,onSearchSubmit:C,onInputBlur:v,autoFocus:b,tokenWithEnter:w,placeholder:S,components:{input:x="input"}}=lg(),{id:P,classNames:F,styles:M,open:E,activeDescendantId:I,role:A,disabled:L}=Xc()||{},D=ee(`${h}-input`,F==null?void 0:F.input,l),N=p.useRef(!1),k=p.useRef(null),G=p.useRef(null);p.useImperativeHandle(t,()=>G.current);const $=te=>{let{value:Z}=te.target;if(w&&k.current&&/[\r\n]/.test(k.current)){const ae=k.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Z=Z.replace(ae,k.current)}k.current=null,m&&m(Z,!0,N.current),n==null||n(te)},_=te=>{const{key:Z}=te,{value:ae}=te.currentTarget;Z==="Enter"&&g==="tags"&&!N.current&&C&&C(ae),r==null||r(te)},U=te=>{v==null||v(),s==null||s(te)},V=()=>{N.current=!0},W=te=>{if(N.current=!1,g!=="combobox"){const{value:Z}=te.currentTarget;m==null||m(Z,!0,!1)}},j=te=>{const{clipboardData:Z}=te,ae=Z==null?void 0:Z.getData("text");k.current=ae||""},[H,B]=p.useState(void 0);on(()=>{const te=G.current;if(o&&te){te.style.width="0px";const Z=te.scrollWidth;B(Z),te.style.width=""}},[o,a]);const Y={id:P,type:g==="combobox"?"text":"search",...u,ref:G,style:{...M==null?void 0:M.input,...i,"--select-input-width":H},autoFocus:b,autoComplete:c||"off",className:D,disabled:L,value:a||"",onChange:$,onKeyDown:_,onBlur:U,onPaste:j,onCompositionStart:V,onCompositionEnd:W,role:A||"combobox","aria-expanded":E||!1,"aria-haspopup":"listbox","aria-owns":E?`${P}_list`:void 0,"aria-autocomplete":"list","aria-controls":E?`${P}_list`:void 0,"aria-activedescendant":E?I:void 0};if(p.isValidElement(x)){const te=x.props||{},Z={placeholder:e.placeholder||S,...Y,...te};return Object.keys(te).forEach(ae=>{const de=te[ae];typeof de=="function"&&(Z[ae]=(...ge)=>{var ve;de(...ge),(ve=Y[ae])==null||ve.call(Y,...ge)})}),Z.ref=xs(x.ref,Y.ref),p.cloneElement(x,Z)}const J=x;return p.createElement(J,Y)});function p$(e){const{prefixCls:t,placeholder:n,displayValues:r}=lg(),{classNames:s,styles:i}=Xc(),{show:o=!0}=e;return r.length?null:p.createElement("div",{className:ee(`${t}-placeholder`,s==null?void 0:s.placeholder),style:{visibility:o?"visible":"hidden",...i==null?void 0:i.placeholder}},n)}const ZE=p.createContext(null);function g$(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function IX(e){return e!=null}function DX(e){return!e&&e!==0}function WA(e){return["string","number"].includes(typeof e)}function h0(e){let t;return e&&(WA(e.title)?t=e.title.toString():WA(e.label)&&(t=e.label.toString())),t}function p0(){return p0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,searchValue:r,activeValue:s,displayValues:i,maxLength:o,mode:a}=lg(),{triggerOpen:l,title:c,showSearch:u,classNames:h,styles:g}=Xc(),m=p.useContext(ZE),[C,v]=p.useState(!1),b=a==="combobox",w=i[0],S=p.useMemo(()=>b&&s&&!C&&l?s:u?r:"",[b,s,C,l,r,u]),[x,P,F,M]=p.useMemo(()=>{let A,L,D;if(w&&(m!=null&&m.flattenOptions)){const k=m.flattenOptions.find(G=>G.value===w.value);k!=null&&k.data&&(A=k.data.className,L=k.data.style,D=h0(k.data))}return w&&!D&&(D=h0(w)),c!==void 0&&(D=c),[A,L,D,!!A||!!L]},[w,m==null?void 0:m.flattenOptions,c]);p.useEffect(()=>{b&&v(!1)},[b,s]);const E=w&&w.label!==null&&w.label!==void 0&&String(w.label).trim()!=="",I=w?M?p.createElement("div",{className:ee(`${n}-content-value`,x),style:{...S?{visibility:"hidden"}:{},...P},title:F},w.label):w.label:p.createElement(p$,{show:!S});return p.createElement("div",{className:ee(`${n}-content`,E&&`${n}-content-has-value`,S&&`${n}-content-has-search-value`,M&&`${n}-content-has-option-style`,h==null?void 0:h.content),style:g==null?void 0:g.content,title:M?void 0:F},I,p.createElement(h$,p0({ref:t},e,{value:S,maxLength:a==="combobox"?o:void 0,onChange:A=>{var L;v(!0),(L=e.onChange)==null||L.call(e,A)}})))}),Tu=void 0;function LX(e,t){const{prefixCls:n,invalidate:r,item:s,renderItem:i,responsive:o,responsiveDisabled:a,registerSize:l,itemKey:c,className:u,style:h,children:g,display:m,order:C,component:v="div",...b}=e,w=o&&!m;function S(E){l(c,E)}p.useEffect(()=>()=>{S(null)},[]);const x=i&&s!==Tu?i(s,{index:C}):g;let P;r||(P={opacity:w?0:1,height:w?0:Tu,overflowY:w?"hidden":Tu,order:o?C:Tu,pointerEvents:w?"none":Tu,position:w?"absolute":Tu});const F={};w&&(F["aria-hidden"]=!0);let M=p.createElement(v,Ri({className:ee(!r&&n,u),style:{...P,...h}},F,b,{ref:t}),x);return o&&(M=p.createElement(Vs,{onResize:({offsetWidth:E})=>{S(E)},disabled:a},M)),M}const jh=p.forwardRef(LX);function OX(e){if(typeof MessageChannel>"u")dn(e);else{const t=new MessageChannel;t.port1.onmessage=()=>e(),t.port2.postMessage(void 0)}}function kX(){const e=p.useRef(null);return n=>{e.current||(e.current=[],OX(()=>{to.unstable_batchedUpdates(()=>{e.current.forEach(r=>{r()}),e.current=null})})),e.current.push(n)}}function Mu(e,t){const[n,r]=p.useState(t),s=Yt(i=>{e(()=>{r(i)})});return[n,s]}const uC=K.createContext(null),NX=(e,t)=>{const n=p.useContext(uC);if(!n){const{component:a="div",...l}=e;return p.createElement(a,Ri({},l,{ref:t}))}const{className:r,...s}=n,{className:i,...o}=e;return p.createElement(uC.Provider,{value:null},p.createElement(jh,Ri({ref:t,className:ee(r,i)},s,o)))},BX=p.forwardRef(NX),f$="responsive",m$="invalidate";function $X(e){return`+ ${e.length} ...`}function GX(e,t){const{prefixCls:n="rc-overflow",data:r=[],renderItem:s,renderRawItem:i,itemKey:o,itemWidth:a=10,ssr:l,style:c,className:u,maxCount:h,renderRest:g,renderRawRest:m,prefix:C,suffix:v,component:b="div",itemComponent:w,onVisibleChange:S,...x}=e,P=l==="full",F=kX(),[M,E]=Mu(F,null),I=M||0,[A,L]=Mu(F,new Map),[D,N]=Mu(F,0),[k,G]=Mu(F,0),[$,_]=Mu(F,0),[U,V]=Mu(F,0),[W,j]=p.useState(null),[H,B]=p.useState(null),Y=p.useMemo(()=>H===null&&P?Number.MAX_SAFE_INTEGER:H||0,[H,M]),[J,te]=p.useState(!1),Z=`${n}-item`,ae=Math.max(D,k),de=h===f$,ge=r.length&&de,ve=h===m$,Re=ge||typeof h=="number"&&r.length>h,ne=p.useMemo(()=>{let De=r;return ge?M===null&&P?De=r:De=r.slice(0,Math.min(r.length,I/a)):typeof h=="number"&&(De=r.slice(0,h)),De},[r,a,M,h,ge]),re=p.useMemo(()=>ge?r.slice(Y+1):r.slice(ne.length),[r,ne,ge,Y]),ce=p.useCallback((De,je)=>typeof o=="function"?o(De):(o&&(De==null?void 0:De[o]))??je,[o]),X=p.useCallback(s||(De=>De),[s]);function ue(De,je,qe){H===De&&(je===void 0||je===W)||(B(De),qe||(te(De{const Ge=new Map(qe);return je===null?Ge.delete(De):Ge.set(De,je),Ge})}function we(De,je){G(je),N(k)}function Be(De,je){_(je)}function Ae(De,je){V(je)}function Pe(De){return A.get(ce(ne[De],De))}on(()=>{if(I&&typeof ae=="number"&&ne){let De=$+U;const je=ne.length,qe=je-1;if(!je){ue(0,null);return}for(let Ge=0;GeI){ue(Ge-1,De-Ce-U+k);break}}v&&Pe(0)+U>I&&j(null)}},[I,A,k,$,U,ce,ne]);const _e=J&&!!re.length;let ze={};W!==null&&ge&&(ze={position:"absolute",left:W,top:0});const lt={prefixCls:Z,responsive:ge,component:w,invalidate:ve},Ft=i?(De,je)=>{const qe=ce(De,je);return p.createElement(uC.Provider,{key:qe,value:{...lt,order:je,item:De,itemKey:qe,registerSize:oe,display:je<=Y}},i(De,je))}:(De,je)=>{const qe=ce(De,je);return p.createElement(jh,Ri({},lt,{order:je,key:qe,item:De,renderItem:X,itemKey:qe,registerSize:oe,display:je<=Y}))},gt={order:_e?Y:Number.MAX_SAFE_INTEGER,className:`${Z}-rest`,registerSize:we,display:_e},Ye=g||$X,Ie=m?p.createElement(uC.Provider,{value:{...lt,...gt}},m(re)):p.createElement(jh,Ri({},lt,gt),typeof Ye=="function"?Ye(re):Ye),Ke=p.createElement(b,Ri({className:ee(!ve&&n,u),style:c,ref:t},x),C&&p.createElement(jh,Ri({},lt,{responsive:de,responsiveDisabled:!ge,order:-1,className:`${Z}-prefix`,registerSize:Be,display:!0}),C),ne.map(Ft),Re?Ie:null,v&&p.createElement(jh,Ri({},lt,{responsive:de,responsiveDisabled:!ge,order:Y,className:`${Z}-suffix`,registerSize:Ae,display:!0,style:ze}),v));return de?p.createElement(Vs,{onResize:fe,disabled:!ge},Ke):Ke}const sa=p.forwardRef(GX);sa.Item=BX;sa.RESPONSIVE=f$;sa.INVALIDATE=m$;const C$=e=>{const{className:t,style:n,customizeIcon:r,customizeIconProps:s,children:i,onMouseDown:o,onClick:a}=e,l=typeof r=="function"?r(s):r;return p.createElement("span",{className:t,onMouseDown:c=>{c.preventDefault(),o==null||o(c)},style:{userSelect:"none",WebkitUserSelect:"none",...n},unselectable:"on",onClick:a,"aria-hidden":!0},l!==void 0?l:p.createElement("span",{className:ee(t.split(/\s+/).map(c=>`${c}-icon`))},i))};function g0(){return g0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{e.preventDefault(),e.stopPropagation()},HX=p.forwardRef(function({inputProps:t},n){const{prefixCls:r,displayValues:s,searchValue:i,mode:o,onSelectorRemove:a,removeIcon:l}=lg(),{disabled:c,showSearch:u,triggerOpen:h,rawOpen:g,toggleOpen:m,autoClearSearchValue:C,tagRender:v,maxTagPlaceholder:b,maxTagTextLength:w,maxTagCount:S,classNames:x,styles:P}=Xc(),F=`${r}-selection-item`;let M=i;!g&&o==="multiple"&&C!==!1&&(M="");const E=u&&M||"",I=u&&!c,A=l??"×",L=b??(V=>`+ ${V.length} ...`),D=v,N=V=>{m(V)},k=V=>{a==null||a(V)},G=(V,W,j,H,B)=>p.createElement("span",{title:h0(V),className:ee(F,{[`${F}-disabled`]:j},x==null?void 0:x.item),style:P==null?void 0:P.item},p.createElement("span",{className:ee(`${F}-content`,x==null?void 0:x.itemContent),style:P==null?void 0:P.itemContent},W),H&&p.createElement(C$,{className:ee(`${F}-remove`,x==null?void 0:x.itemRemove),style:P==null?void 0:P.itemRemove,onMouseDown:_A,onClick:B,customizeIcon:A},"×")),$=(V,W,j,H,B,Y,J)=>{const te=Z=>{_A(Z),N(!h)};return p.createElement("span",{onMouseDown:te},D({label:W,value:V,index:J==null?void 0:J.index,disabled:j,closable:H,onClose:B,isMaxTag:!!Y}))},_=(V,W)=>{const{disabled:j,label:H,value:B}=V,Y=!c&&!j;let J=H;if(typeof w=="number"&&(typeof H=="string"||typeof H=="number")){const Z=String(J);Z.length>w&&(J=`${Z.slice(0,w)}...`)}const te=Z=>{Z&&Z.stopPropagation(),k(V)};return typeof D=="function"?$(B,J,j,Y,te,void 0,W):G(V,J,j,Y,te)},U=V=>{if(!s.length)return null;const W=typeof L=="function"?L(V):L;return typeof D=="function"?$(void 0,W,!1,!1,void 0,!0):G({title:W},W,!1)};return p.createElement(sa,{prefixCls:`${r}-content`,className:x==null?void 0:x.content,style:P==null?void 0:P.content,prefix:!s.length&&!E&&p.createElement(p$,null),data:s,renderItem:_,renderRest:U,suffix:p.createElement(h$,g0({ref:n,disabled:c,readOnly:!I},t,{value:E||"",syncWidth:!0})),itemKey:VX,maxCount:S})}),zX=p.forwardRef(function(t,n){const{multiple:r,onInputKeyDown:s,tabIndex:i}=lg(),o=Xc(),{showSearch:a}=o,c={...Mr(o,{aria:!0}),onKeyDown:s,readOnly:!a,tabIndex:i};return r?p.createElement(HX,{ref:n,inputProps:c}):p.createElement(AX,{ref:n,inputProps:c})});function WX(e){return e&&![Et.ESC,Et.SHIFT,Et.BACKSPACE,Et.TAB,Et.WIN_KEY,Et.ALT,Et.META,Et.WIN_KEY_RIGHT,Et.CTRL,Et.SEMICOLON,Et.EQUALS,Et.CAPS_LOCK,Et.CONTEXT_MENU,Et.UP,Et.LEFT,Et.RIGHT,Et.F1,Et.F2,Et.F3,Et.F4,Et.F5,Et.F6,Et.F7,Et.F8,Et.F9,Et.F10,Et.F11,Et.F12].includes(e)}function dC(){return dC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{which:de}=ae,ge=W.current instanceof HTMLTextAreaElement;if(!ge&&D&&(de===Et.UP||de===Et.DOWN)&&ae.preventDefault(),M&&M(ae),ge&&!D&&~[Et.UP,Et.DOWN,Et.LEFT,Et.RIGHT].indexOf(de))return;!(ae.ctrlKey||ae.altKey||ae.metaKey)&&WX(de)&&N(!0)});p.useImperativeHandle(n,()=>({focus:ae=>{var de,ge;(ge=(de=W.current||V.current).focus)==null||ge.call(de,ae)},blur:()=>{var ae,de;(de=(ae=W.current||V.current).blur)==null||de.call(ae)},nativeElement:V.current}));const H=Yt(ae=>{var de;if(!G){const ge=ua(W.current);ae.nativeEvent._ori_target=ge,ge&&ae.target!==ge&&!ge.contains(ae.target)&&ae.preventDefault();const ve=D&&!u&&(m==="combobox"||k);ae.nativeEvent._select_lazy?D&&N(!1):((de=W.current)==null||de.focus(),ve||N())}P==null||P(ae)}),{root:B}=A,Y=Vn(L,_X),J=Mr(Y,{aria:!0}),te=Object.keys(J),Z={...t,onInputKeyDown:j};return B?p.isValidElement(B)?p.cloneElement(B,{...Y,ref:xs(B.ref,V)}):p.createElement(B,dC({},Y,{ref:V})):p.createElement(d$.Provider,{value:Z},p.createElement("div",dC({},Vn(Y,te),{ref:V,className:s,style:i,onMouseDown:H}),p.createElement(Nw,{className:ee(`${r}-prefix`,_==null?void 0:_.prefix),style:U==null?void 0:U.prefix},o),p.createElement(zX,{ref:W}),p.createElement(Nw,{className:ee(`${r}-suffix`,{[`${r}-suffix-loading`]:$},_==null?void 0:_.suffix),style:U==null?void 0:U.suffix},a),l&&p.createElement(Nw,{className:ee(`${r}-clear`,_==null?void 0:_.clear),style:U==null?void 0:U.clear,onMouseDown:ae=>{ae.nativeEvent._select_lazy=!0,F==null||F(ae)}},l),c))});function jX(e,t,n){return p.useMemo(()=>{let{root:r,input:s}=e||{};return n&&(r=n()),t&&(s=t()),{root:r,input:s}},[e,t,n])}function f0(){return f0=Object.assign?Object.assign.bind():function(e){for(var t=1;te==="tags"||e==="multiple",KX=p.forwardRef((e,t)=>{const{id:n,prefixCls:r,className:s,styles:i,classNames:o,showSearch:a,tagRender:l,showScrollBar:c="optional",direction:u,omitDomProps:h,displayValues:g,onDisplayValuesChange:m,emptyOptions:C,notFoundContent:v="Not Found",onClear:b,maxCount:w,placeholder:S,mode:x,disabled:P,loading:F,getInputElement:M,getRawInputElement:E,open:I,defaultOpen:A,onPopupVisibleChange:L,activeValue:D,onActiveValueChange:N,activeDescendantId:k,searchValue:G,autoClearSearchValue:$,onSearch:_,onSearchSplit:U,tokenSeparators:V,allowClear:W,prefix:j,suffix:H,suffixIcon:B,clearIcon:Y,OptionList:J,animation:te,transitionName:Z,popupStyle:ae,popupClassName:de,popupMatchSelectWidth:ge,popupRender:ve,popupAlign:Re,placement:ne,builtinPlacements:re,getPopupContainer:ce,showAction:X=[],onFocus:ue,onBlur:fe,onKeyUp:oe,onKeyDown:we,onMouseDown:Be,components:Ae,...Pe}=e,_e=m0(x),ze=p.useRef(null),lt=p.useRef(null),Ft=p.useRef(null),[gt,Ye]=p.useState(!1);p.useImperativeHandle(t,()=>{var Je,nt;return{focus:(Je=ze.current)==null?void 0:Je.focus,blur:(nt=ze.current)==null?void 0:nt.blur,scrollTo:pt=>{var xt;return(xt=Ft.current)==null?void 0:xt.scrollTo(pt)},nativeElement:ua(ze.current)}});const Ie=jX(Ae,M,E),Ke=p.useMemo(()=>{var nt;if(x!=="combobox")return G;const Je=(nt=g[0])==null?void 0:nt.value;return typeof Je=="string"||typeof Je=="number"?String(Je):""},[G,x,g]),De=x==="combobox"&&typeof M=="function"&&M()||null,je=!v&&C,[qe,Ge,Ce,Oe]=MX(A||!1,I,L,Je=>P||je?!1:Je),ot=p.useMemo(()=>(V||[]).some(Je=>[` `,`\r `].includes(Je)),[V]),ut=(Je,nt,pt)=>{if(_e&&u0(w)&&g.length>=w)return;let xt=!0,Ct=Je;N==null||N(null);const kt=PX(Je,V,u0(w)?w-g.length:void 0),$t=pt?null:kt;return x!=="combobox"&&$t&&(Ct="",U==null||U($t),Ce(!1),xt=!1),_&&Ke!==Ct&&_(Ct,{source:nt?"typing":"effect"}),Je&&nt&&xt&&Ce(!0),xt},wt=Je=>{!Je||!Je.trim()||_(Je,{source:"submit"})};p.useEffect(()=>{!qe&&!_e&&x!=="combobox"&&ut("",!1,!1)},[qe]),p.useEffect(()=>{P&&(Ce(!1),Ye(!1))},[P,Ge]);const[It,Gt]=bX(),Nt=p.useRef(!1),jt=Je=>{var kt;const nt=It(),{key:pt}=Je,xt=pt==="Enter",Ct=pt===" ";if(xt||Ct){const $t=x==="combobox";(Ct&&!($t||a)||xt&&!$t)&&Je.preventDefault(),Ge||Ce(!0)}if(Gt(!!Ke),pt==="Backspace"&&!nt&&_e&&!Ke&&g.length){const $t=[...g];let Tt=null;for(let wn=$t.length-1;wn>=0;wn-=1){const fn=$t[wn];if(!fn.disabled){$t.splice(wn,1),Tt=fn;break}}Tt&&m($t,{type:"remove",values:[Tt]})}Ge&&(!xt||!Nt.current)&&!Ct&&(xt&&(Nt.current=!0),(kt=Ft.current)==null||kt.onKeyDown(Je)),we==null||we(Je)},qt=(Je,...nt)=>{var pt;Ge&&((pt=Ft.current)==null||pt.onKeyUp(Je,...nt)),Je.key==="Enter"&&(Nt.current=!1),oe==null||oe(Je,...nt)},Ot=Yt(Je=>{const nt=g.filter(pt=>pt!==Je);m(nt,{type:"remove",values:[Je]})}),Vt=()=>{Nt.current=!1},Ve=()=>{var Je;return[ua(ze.current),(Je=lt.current)==null?void 0:Je.getPopupElement()]};wX(Ve,Ge,Ce,!!Ie.root);const st=p.useRef(!1),Ue=Je=>{Ye(!0),P||(X.includes("focus")&&Ce(!0),ue==null||ue(Je))},ke=()=>{Ge&&!st.current&&Ce(!1,{cancelFun:()=>c$(Ve(),document.activeElement)})},q=Je=>{Ye(!1),Ke&&(x==="tags"?_(Ke,{source:"submit"}):x==="multiple"&&_("",{source:"blur"})),ke(),P||fe==null||fe(Je)},Q=(Je,...nt)=>{var Ct;const{target:pt}=Je,xt=(Ct=lt.current)==null?void 0:Ct.getPopupElement();xt!=null&&xt.contains(pt)&&Ce&&Ce(!0),Be==null||Be(Je,...nt),st.current=!0,QE(()=>{st.current=!1})},[,ie]=p.useState({});function Se(){ie({})}let Te;Ie.root&&(Te=Je=>{Ce(Je)});const We=p.useMemo(()=>({...e,notFoundContent:v,open:Ge,triggerOpen:Ge,rawOpen:qe,id:n,showSearch:a,multiple:_e,toggleOpen:Ce,showScrollBar:c,styles:i,classNames:o,lockOptions:Oe}),[e,v,Ce,n,a,_e,Ge,qe,c,i,o,Oe]),ft=p.useMemo(()=>{const Je=H??B;return typeof Je=="function"?Je({searchValue:Ke,open:Ge,focused:gt,showSearch:a,loading:F}):Je},[H,B,Ke,Ge,gt,a,F]),Qe=()=>{var Je;b==null||b(),(Je=ze.current)==null||Je.focus(),m([],{type:"clear",values:g}),ut("",!1,!1)},{allowClear:Xe,clearIcon:at}=yX(r,g,W,Y,P,Ke,x),ht=p.createElement(J,{ref:Ft}),vt=ee(r,s,{[`${r}-focused`]:gt,[`${r}-multiple`]:_e,[`${r}-single`]:!_e,[`${r}-allow-clear`]:Xe,[`${r}-show-arrow`]:ft!=null,[`${r}-disabled`]:P,[`${r}-loading`]:F,[`${r}-open`]:Ge,[`${r}-customize-input`]:De,[`${r}-show-search`]:a});let mt=p.createElement(UX,f0({},Pe,{ref:ze,prefixCls:r,className:vt,focused:gt,prefix:j,suffix:ft,clearIcon:at,multiple:_e,mode:x,displayValues:g,placeholder:S,searchValue:Ke,activeValue:D,onSearch:ut,onSearchSubmit:wt,onInputBlur:Vt,onFocus:Ue,onBlur:q,onClearMouseDown:Qe,onKeyDown:jt,onKeyUp:qt,onSelectorRemove:Ot,tokenWithEnter:ot,onMouseDown:Q,components:Ie}));return mt=p.createElement(RX,{ref:lt,disabled:P,prefixCls:r,visible:Ge,popupElement:ht,animation:te,transitionName:Z,popupStyle:ae,popupClassName:de,direction:u,popupMatchSelectWidth:ge,popupRender:ve,popupAlign:Re,placement:ne,builtinPlacements:re,getPopupContainer:ce,empty:C,onPopupVisibleChange:Te,onPopupMouseEnter:Se,onPopupMouseDown:Q,onPopupBlur:ke},mt),p.createElement(l$.Provider,{value:We},p.createElement(FX,{visible:gt&&!Ge,values:g}),mt)}),JE=()=>null;JE.isSelectOptGroup=!0;const eP=()=>null;eP.isSelectOption=!0;const v$=p.forwardRef(({height:e,offsetY:t,offsetX:n,children:r,prefixCls:s,onInnerResize:i,innerProps:o,rtl:a,extra:l},c)=>{let u={},h={display:"flex",flexDirection:"column"};return t!==void 0&&(u={height:e,position:"relative",overflow:"hidden"},h={...h,transform:`translateY(${t}px)`,[a?"marginRight":"marginLeft"]:-n,position:"absolute",left:0,right:0,top:0}),p.createElement("div",{style:u},p.createElement(Vs,{onResize:({offsetHeight:g})=>{g&&i&&i()}},p.createElement("div",Ri({style:h,className:ee({[`${s}-holder-inner`]:s}),ref:c},o),r,l)))});v$.displayName="Filler";function qX({children:e,setRef:t}){const n=p.useCallback(r=>{t(r)},[]);return p.cloneElement(e,{ref:n})}function XX(e,t,n,r,s,i,o,{getKey:a}){return e.slice(t,n+1).map((l,c)=>{const u=t+c,h=o(l,u,{style:{width:r},offsetX:s}),g=a(l);return p.createElement(qX,{key:g,setRef:m=>i(l,m)},h)})}function YX(e,t,n){const r=e.length,s=t.length;let i,o;if(r===0&&s===0)return null;r{const a=YX(r||[],e||[],t);(a==null?void 0:a.index)!==void 0&&o(e[a.index]),s(e)},[e]),[i]}const UA=typeof navigator=="object"&&/Firefox/i.test(navigator.userAgent),y$=((e,t,n,r)=>{const s=p.useRef(!1),i=p.useRef(null);function o(){clearTimeout(i.current),s.current=!0,i.current=setTimeout(()=>{s.current=!1},50)}const a=p.useRef({top:e,bottom:t,left:n,right:r});return a.current.top=e,a.current.bottom=t,a.current.left=n,a.current.right=r,(l,c,u=!1)=>{const h=l?c<0&&a.current.left||c>0&&a.current.right:c<0&&a.current.top||c>0&&a.current.bottom;return u&&h?(clearTimeout(i.current),s.current=!1):(!h||s.current)&&o(),!s.current&&h}});function ZX(e,t,n,r,s,i,o){const a=p.useRef(0),l=p.useRef(null),c=p.useRef(null),u=p.useRef(!1),h=y$(t,n,r,s);function g(S,x){if(dn.cancel(l.current),h(!1,x))return;const P=S;if(!P._virtualHandled)P._virtualHandled=!0;else return;a.current+=x,c.current=x,UA||P.preventDefault(),l.current=dn(()=>{const F=u.current?10:1;o(a.current*F,!1),a.current=0})}function m(S,x){o(x,!0),UA||S.preventDefault()}const C=p.useRef(null),v=p.useRef(null);function b(S){if(!e)return;dn.cancel(v.current),v.current=dn(()=>{C.current=null},2);const{deltaX:x,deltaY:P,shiftKey:F}=S;let M=x,E=P;(C.current==="sx"||!C.current&&F&&P&&!x)&&(M=P,E=0,C.current="sx");const I=Math.abs(M),A=Math.abs(E);C.current===null&&(C.current=i&&I>A?"x":"y"),C.current==="y"?g(S,E):m(S,M)}function w(S){e&&(u.current=S.detail===c.current)}return[b,w]}function JX(e,t,n,r){const[s,i]=p.useMemo(()=>[new Map,[]],[e,n.id,r]);return(a,l=a)=>{let c=s.get(a),u=s.get(l);if(c===void 0||u===void 0){const h=e.length;for(let g=i.length;g{let m=!1;i.current.forEach((C,v)=>{if(C&&C.offsetParent){const{offsetHeight:b}=C,{marginTop:w,marginBottom:S}=getComputedStyle(C),x=jA(w),P=jA(S),F=b+x+P;o.current.get(v)!==F&&(o.current.set(v,F),m=!0)}}),m&&s(C=>C+1)};if(h)g();else{a.current+=1;const m=a.current;Promise.resolve().then(()=>{m===a.current&&g()})}}function u(h,g){const m=e(h);i.current.get(m),g?(i.current.set(m,g),c()):i.current.delete(m)}return p.useEffect(()=>l,[]),[u,c,o.current,r]}const KA=14/15;function nY(e,t,n){const r=p.useRef(!1),s=p.useRef(0),i=p.useRef(0),o=p.useRef(null),a=p.useRef(null);let l;const c=g=>{if(r.current){const m=Math.ceil(g.touches[0].pageX),C=Math.ceil(g.touches[0].pageY);let v=s.current-m,b=i.current-C;const w=Math.abs(v)>Math.abs(b);w?s.current=m:i.current=C;const S=n(w,w?v:b,!1,g);S&&g.preventDefault(),clearInterval(a.current),S&&(a.current=setInterval(()=>{w?v*=KA:b*=KA;const x=Math.floor(w?v:b);(!n(w,x,!0)||Math.abs(x)<=.1)&&clearInterval(a.current)},16))}},u=()=>{r.current=!1,l()},h=g=>{l(),g.touches.length===1&&!r.current&&(r.current=!0,s.current=Math.ceil(g.touches[0].pageX),i.current=Math.ceil(g.touches[0].pageY),o.current=g.target,o.current.addEventListener("touchmove",c,{passive:!1}),o.current.addEventListener("touchend",u,{passive:!0}))};l=()=>{o.current&&(o.current.removeEventListener("touchmove",c),o.current.removeEventListener("touchend",u))},on(()=>(e&&t.current.addEventListener("touchstart",h,{passive:!0}),()=>{var g;(g=t.current)==null||g.removeEventListener("touchstart",h),l(),clearInterval(a.current)}),[e])}function qA(e){return Math.floor(e**.5)}function C0(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function rY(e,t,n){p.useEffect(()=>{const r=t.current;if(e&&r){let s=!1,i,o;const a=()=>{dn.cancel(i)},l=()=>{a(),i=dn(()=>{n(o),l()})},c=()=>{s=!1,a()},u=g=>{if(g.target.draggable||g.button!==0)return;const m=g;m._virtualHandled||(m._virtualHandled=!0,s=!0)},h=g=>{if(s){const m=C0(g,!1),{top:C,bottom:v}=r.getBoundingClientRect();if(m<=C){const b=C-m;o=-qA(b),l()}else if(m>=v){const b=m-v;o=qA(b),l()}else a()}};return r.addEventListener("mousedown",u),r.ownerDocument.addEventListener("mouseup",c),r.ownerDocument.addEventListener("mousemove",h),r.ownerDocument.addEventListener("dragend",c),()=>{r.removeEventListener("mousedown",u),r.ownerDocument.removeEventListener("mouseup",c),r.ownerDocument.removeEventListener("mousemove",h),r.ownerDocument.removeEventListener("dragend",c),a()}}},[e])}const sY=10;function iY(e,t,n,r,s,i,o,a){const l=p.useRef(),[c,u]=p.useState(null);return on(()=>{if(c&&c.times({...x}));return}i();const{targetAlign:h,originAlign:g,index:m,offset:C}=c,v=e.current.clientHeight;let b=!1,w=h,S=null;if(v){const x=h||g;let P=0,F=0,M=0;const E=Math.min(t.length-1,m);for(let A=0;A<=E;A+=1){const L=s(t[A]);F=P;const D=n.get(L);M=F+(D===void 0?r:D),P=M}let I=x==="top"?C:v-C;for(let A=E;A>=0;A-=1){const L=s(t[A]),D=n.get(L);if(D===void 0){b=!0;break}if(I-=D,I<=0)break}switch(x){case"top":S=F-C;break;case"bottom":S=M-v+C;break;default:{const{scrollTop:A}=e.current,L=A+v;FL&&(w="bottom")}}S!==null&&o(S),S!==c.lastTop&&(b=!0)}b&&u({...c,times:c.times+1,targetAlign:w,lastTop:S})}},[c,e.current]),h=>{if(h==null){a();return}if(dn.cancel(l.current),typeof h=="number")o(h);else if(h&&typeof h=="object"){let g;const{align:m}=h;"index"in h?{index:g}=h:g=t.findIndex(v=>s(v)===h.key);const{offset:C=0}=h;u({times:0,index:g,offset:C,originAlign:m})}}}const XA=p.forwardRef((e,t)=>{const{prefixCls:n,rtl:r,scrollOffset:s,scrollRange:i,onStartMove:o,onStopMove:a,onScroll:l,horizontal:c,spinSize:u,containerSize:h,style:g,thumbStyle:m,showScrollBar:C}=e,[v,b]=p.useState(!1),[w,S]=p.useState(null),[x,P]=p.useState(null),F=!r,M=p.useRef(),E=p.useRef(),[I,A]=p.useState(C),L=p.useRef(),D=()=>{C===!0||C===!1||(clearTimeout(L.current),A(!0),L.current=setTimeout(()=>{A(!1)},3e3))},N=i-h||0,k=h-u||0,G=p.useMemo(()=>s===0||N===0?0:s/N*k,[s,N,k]),$=Y=>{Y.stopPropagation(),Y.preventDefault()},_=p.useRef({top:G,dragging:v,pageY:w,startTop:x});_.current={top:G,dragging:v,pageY:w,startTop:x};const U=Y=>{b(!0),S(C0(Y,c)),P(_.current.top),o(),Y.stopPropagation(),Y.preventDefault()};p.useEffect(()=>{const Y=Z=>{Z.preventDefault()},J=M.current,te=E.current;return J.addEventListener("touchstart",Y,{passive:!1}),te.addEventListener("touchstart",U,{passive:!1}),()=>{J.removeEventListener("touchstart",Y),te.removeEventListener("touchstart",U)}},[]);const V=p.useRef();V.current=N;const W=p.useRef();W.current=k,p.useEffect(()=>{if(v){let Y;const J=Z=>{const{dragging:ae,pageY:de,startTop:ge}=_.current;dn.cancel(Y);const ve=M.current.getBoundingClientRect(),Re=h/(c?ve.width:ve.height);if(ae){const ne=(C0(Z,c)-de)*Re;let re=ge;!F&&c?re-=ne:re+=ne;const ce=V.current,X=W.current,ue=X?re/X:0;let fe=Math.ceil(ue*ce);fe=Math.max(fe,0),fe=Math.min(fe,ce),Y=dn(()=>{l(fe,c)})}},te=()=>{b(!1),a()};return window.addEventListener("mousemove",J,{passive:!0}),window.addEventListener("touchmove",J,{passive:!0}),window.addEventListener("mouseup",te,{passive:!0}),window.addEventListener("touchend",te,{passive:!0}),()=>{window.removeEventListener("mousemove",J),window.removeEventListener("touchmove",J),window.removeEventListener("mouseup",te),window.removeEventListener("touchend",te),dn.cancel(Y)}}},[v]),p.useEffect(()=>(D(),()=>{clearTimeout(L.current)}),[s]),p.useImperativeHandle(t,()=>({delayHidden:D}));const j=`${n}-scrollbar`,H={position:"absolute",visibility:I?null:"hidden"},B={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return c?(Object.assign(H,{height:8,left:0,right:0,bottom:0}),Object.assign(B,{height:"100%",width:u,[F?"left":"right"]:G})):(Object.assign(H,{width:8,top:0,bottom:0,[F?"right":"left"]:0}),Object.assign(B,{width:"100%",height:u,top:G})),p.createElement("div",{ref:M,className:ee(j,{[`${j}-horizontal`]:c,[`${j}-vertical`]:!c,[`${j}-visible`]:I}),style:{...H,...g},onMouseDown:$,onMouseMove:D},p.createElement("div",{ref:E,className:ee(`${j}-thumb`,{[`${j}-thumb-moving`]:v}),style:{...B,...m},onMouseDown:U}))}),oY=20;function YA(e=0,t=0){let n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,oY),Math.floor(n)}const aY=[],lY={overflowY:"auto",overflowAnchor:"none"};function cY(e,t){const{prefixCls:n="rc-virtual-list",className:r,height:s,itemHeight:i,fullHeight:o=!0,style:a,data:l,children:c,itemKey:u,virtual:h,direction:g,scrollWidth:m,component:C="div",onScroll:v,onVirtualScroll:b,onVisibleChange:w,innerProps:S,extraRender:x,styles:P,showScrollBar:F="optional",...M}=e,E=p.useCallback(Ue=>typeof u=="function"?u(Ue):Ue==null?void 0:Ue[u],[u]),[I,A,L,D]=tY(E),N=!!(h!==!1&&s&&i),k=p.useMemo(()=>Object.values(L.maps).reduce((Ue,ke)=>Ue+ke,0),[L.id,L.maps]),G=N&&l&&(Math.max(i*l.length,k)>s||!!m),$=g==="rtl",_=ee(n,{[`${n}-rtl`]:$},r),U=l||aY,V=p.useRef(),W=p.useRef(),j=p.useRef(),[H,B]=p.useState(0),[Y,J]=p.useState(0),[te,Z]=p.useState(!1),ae=()=>{Z(!0)},de=()=>{Z(!1)},ge={getKey:E};function ve(Ue){B(ke=>{let q;typeof Ue=="function"?q=Ue(ke):q=Ue;const Q=gt(q);return V.current.scrollTop=Q,Q})}const Re=p.useRef({start:0,end:U.length}),ne=p.useRef(),[re]=QX(U,E);ne.current=re;const{scrollHeight:ce,start:X,end:ue,offset:fe}=p.useMemo(()=>{var Se;if(!N)return{scrollHeight:void 0,start:0,end:U.length-1,offset:void 0};if(!G)return{scrollHeight:((Se=W.current)==null?void 0:Se.offsetHeight)||0,start:0,end:U.length-1,offset:void 0};let Ue=0,ke,q,Q;const ie=U.length;for(let Te=0;Te=H&&ke===void 0&&(ke=Te,q=Ue),Xe>H+s&&Q===void 0&&(Q=Te),Ue=Xe}return ke===void 0&&(ke=0,q=0,Q=Math.ceil(s/i)),Q===void 0&&(Q=U.length-1),Q=Math.min(Q+1,U.length-1),{scrollHeight:Ue,start:ke,end:Q,offset:q}},[G,N,H,U,D,s]);Re.current.start=X,Re.current.end=ue,p.useLayoutEffect(()=>{const Ue=L.getRecord();if(Ue.size===1){const ke=Array.from(Ue.keys())[0],q=Ue.get(ke),Q=U[X];if(Q&&q===void 0&&E(Q)===ke){const Te=L.get(ke)-i;ve(We=>We+Te)}}L.resetRecord()},[ce]);const[oe,we]=p.useState({width:0,height:s}),Be=Ue=>{we({width:Ue.offsetWidth,height:Ue.offsetHeight})},Ae=p.useRef(),Pe=p.useRef(),_e=p.useMemo(()=>YA(oe.width,m),[oe.width,m]),ze=p.useMemo(()=>YA(oe.height,ce),[oe.height,ce]),lt=ce-s,Ft=p.useRef(lt);Ft.current=lt;function gt(Ue){let ke=Ue;return Number.isNaN(Ft.current)||(ke=Math.min(ke,Ft.current)),ke=Math.max(ke,0),ke}const Ye=H<=0,Ie=H>=lt,Ke=Y<=0,De=Y>=m,je=y$(Ye,Ie,Ke,De),qe=()=>({x:$?-Y:Y,y:H}),Ge=p.useRef(qe()),Ce=Yt(Ue=>{if(b){const ke={...qe(),...Ue};(Ge.current.x!==ke.x||Ge.current.y!==ke.y)&&(b(ke),Ge.current=ke)}});function Oe(Ue,ke){const q=Ue;ke?(to.flushSync(()=>{J(q)}),Ce()):ve(q)}function ot(Ue){const{scrollTop:ke}=Ue.currentTarget;ke!==H&&ve(ke),v==null||v(Ue),Ce()}const ut=Ue=>{let ke=Ue;const q=m?m-oe.width:0;return ke=Math.max(ke,0),ke=Math.min(ke,q),ke},wt=Yt((Ue,ke)=>{ke?(to.flushSync(()=>{J(q=>{const Q=q+($?-Ue:Ue);return ut(Q)})}),Ce()):ve(q=>q+Ue)}),[It,Gt]=ZX(N,Ye,Ie,Ke,De,!!m,wt);nY(N,V,(Ue,ke,q,Q)=>{const ie=Q;return je(Ue,ke,q)?!1:!ie||!ie._virtualHandled?(ie&&(ie._virtualHandled=!0),It({preventDefault(){},deltaX:Ue?ke:0,deltaY:Ue?0:ke}),!0):!1}),rY(G,V,Ue=>{ve(ke=>ke+Ue)}),on(()=>{function Ue(q){const Q=Ye&&q.detail<0,ie=Ie&&q.detail>0;N&&!Q&&!ie&&q.preventDefault()}const ke=V.current;return ke.addEventListener("wheel",It,{passive:!1}),ke.addEventListener("DOMMouseScroll",Gt,{passive:!0}),ke.addEventListener("MozMousePixelScroll",Ue,{passive:!1}),()=>{ke.removeEventListener("wheel",It),ke.removeEventListener("DOMMouseScroll",Gt),ke.removeEventListener("MozMousePixelScroll",Ue)}},[N,Ye,Ie]),on(()=>{if(m){const Ue=ut(Y);J(Ue),Ce({x:Ue})}},[oe.width,m]);const Nt=()=>{var Ue,ke;(Ue=Ae.current)==null||Ue.delayHidden(),(ke=Pe.current)==null||ke.delayHidden()},jt=iY(V,U,L,i,E,()=>A(!0),ve,Nt);p.useImperativeHandle(t,()=>({nativeElement:j.current,getScrollInfo:qe,scrollTo:Ue=>{function ke(q){return q&&typeof q=="object"&&("left"in q||"top"in q)}ke(Ue)?(Ue.left!==void 0&&J(ut(Ue.left)),jt(Ue.top)):jt(Ue)}})),on(()=>{if(w){const Ue=U.slice(X,ue+1);w(Ue,U)}},[X,ue,U]);const qt=JX(U,E,L,i),Ot=x==null?void 0:x({start:X,end:ue,virtual:G,offsetX:Y,offsetY:fe,rtl:$,getSize:qt}),Vt=XX(U,X,ue,m,Y,I,c,ge);let Ve=null;s&&(Ve={[o?"height":"maxHeight"]:s,...lY},N&&(Ve.overflowY="hidden",m&&(Ve.overflowX="hidden"),te&&(Ve.pointerEvents="none")));const st={};return $&&(st.dir="rtl"),p.createElement("div",Ri({ref:j,style:{...a,position:"relative"},className:_},st,M),p.createElement(Vs,{onResize:Be},p.createElement(C,{className:`${n}-holder`,style:Ve,ref:V,onScroll:ot,onMouseEnter:Nt},p.createElement(v$,{prefixCls:n,height:ce,offsetX:Y,offsetY:fe,scrollWidth:m,onInnerResize:A,ref:W,innerProps:S,rtl:$,extra:Ot},Vt))),G&&ce>s&&p.createElement(XA,{ref:Ae,prefixCls:n,scrollOffset:H,scrollRange:ce,rtl:$,onScroll:Oe,onStartMove:ae,onStopMove:de,spinSize:ze,containerSize:oe.height,style:P==null?void 0:P.verticalScrollBar,thumbStyle:P==null?void 0:P.verticalScrollBarThumb,showScrollBar:F}),G&&m>oe.width&&p.createElement(XA,{ref:Pe,prefixCls:n,scrollOffset:Y,scrollRange:m,rtl:$,onScroll:Oe,onStartMove:ae,onStopMove:de,spinSize:_e,containerSize:oe.width,horizontal:!0,style:P==null?void 0:P.horizontalScrollBar,thumbStyle:P==null?void 0:P.horizontalScrollBarThumb,showScrollBar:F}))}const Rv=p.forwardRef(cY);Rv.displayName="List";function uY(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}function rp(){return rp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var ve,Re;const{prefixCls:n,id:r,open:s,multiple:i,mode:o,searchValue:a,toggleOpen:l,notFoundContent:c,onPopupScroll:u,showScrollBar:h,lockOptions:g}=Xc(),{maxCount:m,flattenOptions:C,onActiveValue:v,defaultActiveFirstOption:b,onSelect:w,menuItemSelectedIcon:S,rawValues:x,fieldNames:P,virtual:F,direction:M,listHeight:E,listItemHeight:I,optionRender:A,classNames:L,styles:D}=p.useContext(ZE),N=`${n}-item`,k=_c(()=>C,[s,g],(ne,re)=>re[0]&&!re[1]),G=p.useRef(null),$=p.useMemo(()=>i&&u0(m)&&(x==null?void 0:x.size)>=m,[i,m,x==null?void 0:x.size]),_=ne=>{ne.preventDefault()},U=ne=>{var re;(re=G.current)==null||re.scrollTo(typeof ne=="number"?{index:ne}:ne)},V=p.useCallback(ne=>o==="combobox"?!1:x.has(ne),[o,[...x].toString(),x.size]),W=(ne,re=1)=>{const ce=k.length;for(let X=0;XW(0)),B=(ne,re=!1)=>{H(ne);const ce={source:re?"keyboard":"mouse"},X=k[ne];if(!X){v(null,-1,ce);return}v(X.value,ne,ce)};p.useEffect(()=>{B(b!==!1?W(0):-1)},[k.length,a]);const Y=p.useCallback(ne=>o==="combobox"?String(ne).toLowerCase()===a.toLowerCase():x.has(ne),[o,a,[...x].toString(),x.size]);p.useEffect(()=>{var re;let ne;if(!i&&s&&x.size===1){const ce=Array.from(x)[0],X=k.findIndex(({data:ue})=>a?String(ue.value).startsWith(a):ue.value===ce);X!==-1&&(B(X),ne=setTimeout(()=>{U(X)}))}return s&&((re=G.current)==null||re.scrollTo(void 0)),()=>clearTimeout(ne)},[s,a]);const J=ne=>{ne!==void 0&&w(ne,{selected:!x.has(ne)}),i||l(!1)};if(p.useImperativeHandle(t,()=>({onKeyDown:ne=>{const{which:re,ctrlKey:ce}=ne;switch(re){case Et.N:case Et.P:case Et.UP:case Et.DOWN:{let X=0;if(re===Et.UP?X=-1:re===Et.DOWN?X=1:uY()&&ce&&(re===Et.N?X=1:re===Et.P&&(X=-1)),X!==0){const ue=W(j+X,X);U(ue),B(ue,!0)}break}case Et.TAB:case Et.ENTER:{const X=k[j];if(!X||X.data.disabled)return J(void 0);!$||x.has(X.value)?J(X.value):J(void 0),s&&ne.preventDefault();break}case Et.ESC:l(!1),s&&ne.stopPropagation()}},onKeyUp:()=>{},scrollTo:ne=>{U(ne)}})),k.length===0)return p.createElement("div",{role:"listbox",id:`${r}_list`,className:`${N}-empty`,onMouseDown:_},c);const te=Object.keys(P).map(ne=>P[ne]),Z=ne=>ne.label;function ae(ne,re){const{group:ce}=ne;return{role:ce?"presentation":"option",id:`${r}_list_${re}`}}const de=ne=>{const re=k[ne];if(!re)return null;const ce=re.data||{},{value:X}=ce,{group:ue}=re,fe=Mr(ce,!0),oe=Z(re);return re?p.createElement("div",rp({"aria-label":typeof oe=="string"&&!ue?oe:null},fe,{key:ne},ae(re,ne),{"aria-selected":Y(X)}),X):null},ge={role:"listbox",id:`${r}_list`};return p.createElement(p.Fragment,null,F&&p.createElement("div",rp({},ge,{style:{height:0,width:0,overflow:"hidden"}}),de(j-1),de(j),de(j+1)),p.createElement(Rv,{itemKey:"key",ref:G,data:k,height:E,itemHeight:I,fullHeight:!1,onMouseDown:_,onScroll:u,virtual:F,direction:M,innerProps:F?null:ge,showScrollBar:h,className:(ve=L==null?void 0:L.popup)==null?void 0:ve.list,style:(Re=D==null?void 0:D.popup)==null?void 0:Re.list},(ne,re)=>{var Ce,Oe;const{group:ce,groupOption:X,data:ue,label:fe,value:oe}=ne,{key:we}=ue;if(ce){const ot=ue.title??(QA(fe)?fe.toString():void 0);return p.createElement("div",{className:ee(N,`${N}-group`,ue.className),title:ot},fe!==void 0?fe:we)}const{disabled:Be,title:Ae,children:Pe,style:_e,className:ze,...lt}=ue,Ft=Vn(lt,te),gt=V(oe),Ye=Be||!gt&&$,Ie=`${N}-option`,Ke=ee(N,Ie,ze,(Ce=L==null?void 0:L.popup)==null?void 0:Ce.listItem,{[`${Ie}-grouped`]:X,[`${Ie}-active`]:j===re&&!Ye,[`${Ie}-disabled`]:Ye,[`${Ie}-selected`]:gt}),De=Z(ne),je=!S||typeof S=="function"||gt,qe=typeof De=="number"?De:De||oe;let Ge=QA(qe)?qe.toString():void 0;return Ae!==void 0&&(Ge=Ae),p.createElement("div",rp({},Mr(Ft),F?{}:ae(ne,re),{"aria-selected":F?void 0:Y(oe),className:Ke,title:Ge,onMouseMove:()=>{j===re||Ye||B(re)},onClick:()=>{Ye||J(oe)},style:{...(Oe=D==null?void 0:D.popup)==null?void 0:Oe.listItem,..._e}}),p.createElement("div",{className:`${Ie}-content`},typeof A=="function"?A(ne,{index:re}):qe),p.isValidElement(S)||gt,je&&p.createElement(C$,{className:`${N}-option-state`,customizeIcon:S,customizeIconProps:{value:oe,disabled:Ye,isSelected:gt}},gt?"✓":null))}))},hY=p.forwardRef(dY),pY=((e,t)=>{const n=p.useRef({values:new Map,options:new Map}),r=p.useMemo(()=>{const{values:i,options:o}=n.current,a=e.map(u=>{var h;return u.label===void 0?{...u,label:(h=i.get(u.value))==null?void 0:h.label}:u}),l=new Map,c=new Map;return a.forEach(u=>{l.set(u.value,u),c.set(u.value,t.get(u.value)||o.get(u.value))}),n.current.values=l,n.current.options=c,a},[e,t]),s=p.useCallback(i=>t.get(i)||n.current.options.get(i),[t]);return[r,s]});function Bw(e,t){return g$(e).join("").toUpperCase().includes(t)}const gY=((e,t,n,r,s)=>p.useMemo(()=>{if(!n||r===!1)return e;const{options:i,label:o,value:a}=t,l=[],c=typeof r=="function",u=n.toUpperCase(),h=c?r:(m,C)=>s&&s.length?s.some(v=>Bw(C[v],u)):C[i]?Bw(C[o!=="children"?o:"label"],u):Bw(C[a],u),g=c?m=>d0(m):m=>m;return e.forEach(m=>{if(m[i]){if(h(n,g(m)))l.push(m);else{const v=m[i].filter(b=>h(n,g(b)));v.length&&l.push({...m,[i]:v})}return}h(n,g(m))&&l.push(m)}),l},[e,r,s,n,t]));function fY(e){const{key:t,props:{children:n,value:r,...s}}=e;return{key:t,value:r!==void 0?r:t,children:n,...s}}function b$(e,t=!1){return Tr(e).map((n,r)=>{if(!p.isValidElement(n)||!n.type)return null;const{type:{isSelectOptGroup:s},key:i,props:{children:o,...a}}=n;return t||!s?fY(n):{key:`__RC_SELECT_GRP__${i===null?r:i}__`,label:i,...a,options:b$(o)}}).filter(n=>n)}const mY=(e,t,n,r,s)=>p.useMemo(()=>{let i=e;!e&&(i=b$(t));const a=new Map,l=new Map,c=(h,g,m)=>{m&&typeof m=="string"&&h.set(g[m],g)},u=(h,g=!1)=>{for(let m=0;m{c(l,C,v)}),c(l,C,s)):u(C[n.options],!0)}};return u(i),{options:i,valueOptions:a,labelOptions:l}},[e,t,n,r,s]);function ZA(e){const t=p.useRef();return t.current=e,p.useCallback((...r)=>t.current(...r),[])}function CY(e,t,n){const{filterOption:r,searchValue:s,optionFilterProp:i,filterSort:o,onSearch:a,autoClearSearchValue:l}=t;return p.useMemo(()=>{const c=typeof e=="object",u={filterOption:r,searchValue:s,optionFilterProp:i,filterSort:o,onSearch:a,autoClearSearchValue:l,...c?e:{}};return[c||n==="combobox"||n==="tags"||n==="multiple"&&e===void 0?!0:e,u]},[n,e,r,s,i,o,a,l])}function v0(){return v0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{id:n,mode:r,prefixCls:s="rc-select",backfill:i,fieldNames:o,showSearch:a,searchValue:l,onSearch:c,autoClearSearchValue:u,filterOption:h,optionFilterProp:g,filterSort:m,onSelect:C,onDeselect:v,onActive:b,popupMatchSelectWidth:w=!0,optionLabelProp:S,options:x,optionRender:P,children:F,defaultActiveFirstOption:M,menuItemSelectedIcon:E,virtual:I,direction:A,listHeight:L=200,listItemHeight:D=20,labelRender:N,value:k,defaultValue:G,labelInValue:$,onChange:_,maxCount:U,classNames:V,styles:W,...j}=e,H={searchValue:l,onSearch:c,autoClearSearchValue:u,filterOption:h,optionFilterProp:g,filterSort:m},[B,Y]=CY(a,H,r),{filterOption:J,searchValue:te,optionFilterProp:Z,filterSort:ae,onSearch:de,autoClearSearchValue:ge=!0}=Y,ve=p.useMemo(()=>Z?Array.isArray(Z)?Z:[Z]:[],[Z]),Re=ya(n),ne=m0(r),re=!!(!x&&F),ce=p.useMemo(()=>J===void 0&&r==="combobox"?!1:J,[J,r]),X=p.useMemo(()=>u$(o,re),[JSON.stringify(o),re]),[ue,fe]=ir("",te),oe=ue||"",we=mY(x,F,X,ve,S),{valueOptions:Be,labelOptions:Ae,options:Pe}=we,_e=p.useCallback(Q=>g$(Q).map(Se=>{let Te,We,ft,Qe;yY(Se)?Te=Se:(We=Se.label,Te=Se.value);const Xe=Be.get(Te);return Xe&&(We===void 0&&(We=Xe==null?void 0:Xe[S||X.label]),ft=Xe==null?void 0:Xe.disabled,Qe=Xe==null?void 0:Xe.title),{label:We,value:Te,key:Te,disabled:ft,title:Qe}}),[X,S,Be]),[ze,lt]=ir(G,k),Ft=p.useMemo(()=>{var Se;const ie=_e(ne&&ze===null?[]:ze);return r==="combobox"&&DX((Se=ie[0])==null?void 0:Se.value)?[]:ie},[ze,_e,r,ne]),[gt,Ye]=pY(Ft,Be),Ie=p.useMemo(()=>{if(!r&>.length===1){const Q=gt[0];if(Q.value===null&&(Q.label===null||Q.label===void 0))return[]}return gt.map(Q=>({...Q,label:(typeof N=="function"?N(Q):Q.label)??Q.value}))},[r,gt,N]),Ke=p.useMemo(()=>new Set(gt.map(Q=>Q.value)),[gt]);p.useEffect(()=>{var Q;if(r==="combobox"){const ie=(Q=gt[0])==null?void 0:Q.value;fe(IX(ie)?String(ie):"")}},[gt]);const De=ZA((Q,ie)=>{const Se=ie??Q;return{[X.value]:Q,[X.label]:Se}}),je=p.useMemo(()=>{if(r!=="tags")return Pe;const Q=[...Pe],ie=Se=>Be.has(Se);return[...gt].sort((Se,Te)=>Se.value{const Te=Se.value;ie(Te)||Q.push(De(Te,Se.label))}),Q},[De,Pe,Be,gt,r]),qe=gY(je,X,oe,ce,ve),Ge=p.useMemo(()=>{const Q=ie=>ve.length?ve.some(Se=>(ie==null?void 0:ie[Se])===oe):(ie==null?void 0:ie.value)===oe;return r!=="tags"||!oe||qe.some(ie=>Q(ie))||qe.some(ie=>ie[X.value]===oe)?qe:[De(oe),...qe]},[De,ve,r,qe,oe,X]),Ce=Q=>[...Q].sort((Se,Te)=>ae(Se,Te,{searchValue:oe})).map(Se=>Array.isArray(Se.options)?{...Se,options:Se.options.length>0?Ce(Se.options):Se.options}:Se),Oe=p.useMemo(()=>ae?Ce(Ge):Ge,[Ge,ae,oe]),ot=p.useMemo(()=>EX(Oe,{fieldNames:X,childrenAsData:re}),[Oe,X,re]),ut=Q=>{const ie=_e(Q);if(lt(ie),_&&(ie.length!==gt.length||ie.some((Se,Te)=>{var We;return((We=gt[Te])==null?void 0:We.value)!==(Se==null?void 0:Se.value)}))){const Se=$?ie.map(({label:We,value:ft})=>({label:We,value:ft})):ie.map(We=>We.value),Te=ie.map(We=>d0(Ye(We.value)));_(ne?Se:Se[0],ne?Te:Te[0])}},[wt,It]=p.useState(null),[Gt,Nt]=p.useState(0),jt=M!==void 0?M:r!=="combobox",qt=p.useRef(),Ot=p.useCallback((Q,ie,{source:Se="keyboard"}={})=>{Nt(ie),i&&r==="combobox"&&Q!==null&&Se==="keyboard"&&It(String(Q));const Te=Promise.resolve().then(()=>{qt.current===Te&&(b==null||b(Q))});qt.current=Te},[i,r,b]),Vt=(Q,ie,Se)=>{const Te=()=>{const We=Ye(Q);return[$?{label:We==null?void 0:We[X.label],value:Q}:Q,d0(We)]};if(ie&&C){const[We,ft]=Te();C(We,ft)}else if(!ie&&v&&Se!=="clear"){const[We,ft]=Te();v(We,ft)}},Ve=ZA((Q,ie)=>{let Se;const Te=ne?ie.selected:!0;Te?Se=ne?[...gt,Q]:[Q]:Se=gt.filter(We=>We.value!==Q),ut(Se),Vt(Q,Te),r==="combobox"?It(""):(!m0||ge)&&(fe(""),It(""))}),st=(Q,ie)=>{ut(Q);const{type:Se,values:Te}=ie;(Se==="remove"||Se==="clear")&&Te.forEach(We=>{Vt(We.value,!1,Se)})},Ue=(Q,ie)=>{if(fe(Q),It(null),ie.source==="submit"){const Se=(Q||"").trim();if(Se){const Te=Array.from(new Set([...Ke,Se]));ut(Te),Vt(Se,!0),fe("")}return}ie.source!=="blur"&&(r==="combobox"&&ut(Q),de==null||de(Q))},ke=Q=>{let ie=Q;r!=="tags"&&(ie=Q.map(Te=>{const We=Ae.get(Te);return We==null?void 0:We.value}).filter(Te=>Te!==void 0));const Se=Array.from(new Set([...Ke,...ie]));ut(Se),Se.forEach(Te=>{Vt(Te,!0)})},q=p.useMemo(()=>({...we,flattenOptions:ot,onActiveValue:Ot,defaultActiveFirstOption:jt,onSelect:Ve,menuItemSelectedIcon:E,rawValues:Ke,fieldNames:X,virtual:I!==!1&&w!==!1,direction:A,listHeight:L,listItemHeight:D,childrenAsData:re,maxCount:U,optionRender:P,classNames:V,styles:W}),[U,we,ot,Ot,jt,Ve,E,Ke,X,I,w,A,L,D,re,P,V,W]);return p.createElement(ZE.Provider,{value:q},p.createElement(KX,v0({},j,{id:Re,prefixCls:s,ref:t,omitDomProps:vY,mode:r,classNames:V,styles:W,displayValues:Ie,onDisplayValuesChange:st,maxCount:U,direction:A,showSearch:B,searchValue:oe,onSearch:Ue,autoClearSearchValue:ge,onSearchSplit:ke,popupMatchSelectWidth:w,OptionList:hY,emptyOptions:!ot.length,activeValue:wt,activeDescendantId:`${Re}_list_${Gt}`})))}),tP=bY;tP.Option=eP;tP.OptGroup=JE;const Np=(e,t,n)=>ee({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:n}),Ev=(e,t)=>t||e,wY=()=>{const[,e]=ds(),[t]=Lo("Empty"),r=new Mn(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return p.createElement("svg",{style:r,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,(t==null?void 0:t.description)||"Empty"),p.createElement("g",{fill:"none",fillRule:"evenodd"},p.createElement("g",{transform:"translate(24 31.7)"},p.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.8",cy:"106.9",rx:"67.8",ry:"12.7"}),p.createElement("path",{fill:"#aeb8c2",d:"M122 69.7 98.1 40.2a6 6 0 0 0-4.6-2.2H42.1a6 6 0 0 0-4.6 2.2l-24 29.5V85H122z"}),p.createElement("path",{fill:"#f5f5f7",d:"M33.8 0h68a4 4 0 0 1 4 4v93.3a4 4 0 0 1-4 4h-68a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4"}),p.createElement("path",{fill:"#dce0e6",d:"M42.7 10h50.2a2 2 0 0 1 2 2v25a2 2 0 0 1-2 2H42.7a2 2 0 0 1-2-2V12a2 2 0 0 1 2-2m.2 39.8h49.8a2.3 2.3 0 1 1 0 4.5H42.9a2.3 2.3 0 0 1 0-4.5m0 11.7h49.8a2.3 2.3 0 1 1 0 4.6H42.9a2.3 2.3 0 0 1 0-4.6m79 43.5a7 7 0 0 1-6.8 5.4H20.5a7 7 0 0 1-6.7-5.4l-.2-1.8V69.7h26.3c2.9 0 5.2 2.4 5.2 5.4s2.4 5.4 5.3 5.4h34.8c2.9 0 5.3-2.4 5.3-5.4s2.3-5.4 5.2-5.4H122v33.5q0 1-.2 1.8"})),p.createElement("path",{fill:"#dce0e6",d:"m149.1 33.3-6.8 2.6a1 1 0 0 1-1.3-1.2l2-6.2q-4.1-4.5-4.2-10.4c0-10 10.1-18.1 22.6-18.1S184 8.1 184 18.1s-10.1 18-22.6 18q-6.8 0-12.3-2.8"}),p.createElement("g",{fill:"#fff",transform:"translate(149.7 15.4)"},p.createElement("circle",{cx:"20.7",cy:"3.2",r:"2.8"}),p.createElement("path",{d:"M5.7 5.6H0L2.9.7zM9.3.7h5v5h-5z"}))))},SY=()=>{const[,e]=ds(),[t]=Lo("Empty"),{colorFill:n,colorFillTertiary:r,colorFillQuaternary:s,colorBgContainer:i}=e,{borderColor:o,shadowColor:a,contentColor:l}=p.useMemo(()=>({borderColor:new Mn(n).onBackground(i).toHexString(),shadowColor:new Mn(r).onBackground(i).toHexString(),contentColor:new Mn(s).onBackground(i).toHexString()}),[n,r,s,i]);return p.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},p.createElement("title",null,(t==null?void 0:t.description)||"Empty"),p.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},p.createElement("ellipse",{fill:a,cx:"32",cy:"33",rx:"32",ry:"7"}),p.createElement("g",{fillRule:"nonzero",stroke:o},p.createElement("path",{d:"M55 12.8 44.9 1.3Q44 0 42.9 0H21.1q-1.2 0-2 1.3L9 12.8V22h46z"}),p.createElement("path",{d:"M41.6 16c0-1.7 1-3 2.2-3H55v18.1c0 2.2-1.3 3.9-3 3.9H12c-1.7 0-3-1.7-3-3.9V13h11.2c1.2 0 2.2 1.3 2.2 3s1 2.9 2.2 2.9h14.8c1.2 0 2.2-1.4 2.2-3",fill:l}))))},xY=e=>{const{componentCls:t,margin:n,marginXS:r,marginXL:s,fontSize:i,lineHeight:o}=e;return{[t]:{marginInline:r,fontSize:i,lineHeight:o,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:r,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:n},"&-normal":{marginBlock:s,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:r,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},RY=Ln("Empty",e=>{const{componentCls:t,controlHeightLG:n,calc:r}=e,s=En(e,{emptyImgCls:`${t}-img`,emptyImgHeight:r(n).mul(2.5).equal(),emptyImgHeightMD:n,emptyImgHeightSM:r(n).mul(.875).equal()});return xY(s)}),w$=p.createElement(wY,null),S$=p.createElement(SY,null),Zo=e=>{const{className:t,rootClassName:n,prefixCls:r,image:s,description:i,children:o,imageStyle:a,style:l,classNames:c,styles:u,...h}=e,{getPrefixCls:g,direction:m,className:C,style:v,classNames:b,styles:w,image:S}=Hn("empty"),x=g("empty",r),[P,F]=RY(x),[M,E]=Kn([b,c],[w,u],{props:e}),[I]=Lo("Empty"),A=typeof i<"u"?i:I==null?void 0:I.description,L=typeof A=="string"?A:"empty",D=s??S??w$;let N=null;return typeof D=="string"?N=p.createElement("img",{draggable:!1,alt:L,src:D}):N=D,p.createElement("div",{className:ee(P,F,x,C,{[`${x}-normal`]:D===S$,[`${x}-rtl`]:m==="rtl"},t,n,M.root),style:{...E.root,...v,...l},...h},p.createElement("div",{className:ee(`${x}-image`,M.image),style:{...a,...E.image}},N),A&&p.createElement("div",{className:ee(`${x}-description`,M.description),style:E.description},A),o&&p.createElement("div",{className:ee(`${x}-footer`,M.footer),style:E.footer},o))};Zo.PRESENTED_IMAGE_DEFAULT=w$;Zo.PRESENTED_IMAGE_SIMPLE=S$;const nP=e=>{const{componentName:t}=e,{getPrefixCls:n}=p.useContext(Kt),r=n("empty");switch(t){case"Table":case"List":return K.createElement(Zo,{image:Zo.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return K.createElement(Zo,{image:Zo.PRESENTED_IMAGE_SIMPLE,className:`${r}-small`});case"Table.filter":return null;default:return K.createElement(Zo,null)}},rP=(e,t,n)=>{const{variant:r,[e]:s}=p.useContext(Kt),i=p.useContext(Pq),o=s==null?void 0:s.variant;let a;typeof t<"u"?a=t:n===!1?a="borderless":a=i??o??r??"outlined";const l=yU.includes(a);return[a,l]},EY=e=>{const n={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:{...n,points:["tl","bl"],offset:[0,4]},bottomRight:{...n,points:["tr","br"],offset:[0,4]},topLeft:{...n,points:["bl","tl"],offset:[0,-4]},topRight:{...n,points:["br","tr"],offset:[0,-4]}}};function PY(e,t){return e||EY(t)}const JA=e=>{const{optionHeight:t,optionFontSize:n,optionLineHeight:r,optionPadding:s}=e;return{position:"relative",display:"block",minHeight:t,padding:s,color:e.colorText,fontWeight:"normal",fontSize:n,lineHeight:r,boxSizing:"border-box"}},FY=e=>{const{antCls:t,componentCls:n}=e,r=`${n}-item`,s=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,o=`&${t}-slide-up-leave${t}-slide-up-leave-active`,a=`${n}-dropdown-placement-`,l=`${r}-option-selected`;return[{[`${n}-dropdown`]:{...jn(e),position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[` ${s}${a}bottomLeft, ${i}${a}bottomLeft `]:{animationName:HE},[` ${s}${a}topLeft, ${i}${a}topLeft, ${s}${a}topRight, ${i}${a}topRight `]:{animationName:WE},[`${o}${a}bottomLeft`]:{animationName:zE},[` ${o}${a}topLeft, ${o}${a}topRight `]:{animationName:_E},"&-hidden":{display:"none"},[r]:{...JA(e),cursor:"pointer",transition:`background-color ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":{flex:"auto",...Ro},"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${r}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${r}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${r}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${r}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":{...JA(e),color:e.colorTextDisabled}},[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}}},yl(e,"slide-up"),yl(e,"slide-down"),oC(e,"move-up"),oC(e,"move-down")]},TY=e=>{const{componentCls:t}=e;return{[`&${t}-customize`]:{border:0,padding:0,fontSize:"inherit",lineHeight:"inherit",[`${t}-placeholder`]:{display:"none"},[`${t}-content`]:{margin:0,padding:0,"&-value":{display:"none"}}}}},e1=4,MY=e=>{const{componentCls:t,calc:n,iconCls:r,paddingXS:s,paddingXXS:i,INTERNAL_FIXED_ITEM_MARGIN:o,lineWidth:a,colorIcon:l,colorIconHover:c,inputPaddingHorizontalBase:u,antCls:h}=e,[g,m]=br(h,"select");return{"&-multiple":{[g("multi-item-background")]:e.multipleItemBg,[g("multi-item-border-color")]:"transparent",[g("multi-item-border-radius")]:e.borderRadiusSM,[g("multi-item-height")]:e.multipleItemHeight,[g("multi-padding-base")]:`calc((${m("height")} - ${m("multi-item-height")}) / 2)`,[g("multi-padding-vertical")]:`calc(${m("multi-padding-base")} - ${o} - ${a})`,[g("multi-item-padding-horizontal")]:`calc(${u} - ${m("multi-padding-vertical")} - ${a} * 2)`,paddingBlock:m("multi-padding-vertical"),paddingInlineStart:`calc(${m("multi-padding-base")} - ${a})`,[`${t}-prefix`]:{marginInlineStart:m("multi-item-padding-horizontal")},[`${t}-prefix + ${t}-content`]:{[`${t}-placeholder`]:{insetInlineStart:0},[`${t}-content-item${t}-content-item-suffix`]:{marginInlineStart:0}},[`${t}-placeholder`]:{position:"absolute",lineHeight:m("line-height"),insetInlineStart:m("multi-item-padding-horizontal"),width:`calc(100% - ${m("multi-item-padding-horizontal")})`,top:"50%",transform:"translateY(-50%)"},[`${t}-content`]:{flexWrap:"wrap",alignItems:"center",lineHeight:1,"&-item-prefix":{height:m("font-size")},"&-item":{lineHeight:1,maxWidth:`calc(100% - ${e1}px)`},[`${t}-content-item-prefix + ${t}-content-item-suffix, ${t}-content-item-suffix:first-child`]:{marginInlineStart:m("multi-item-padding-horizontal")},[`${t}-selection-item`]:{lineHeight:`calc(${m("multi-item-height")} - ${a} * 2)`,border:`${a} solid ${m("multi-item-border-color")}`,display:"flex",marginBlock:o,marginInlineEnd:n(o).mul(2).equal(),background:m("multi-item-background"),borderRadius:m("multi-item-border-radius"),paddingInlineStart:s,paddingInlineEnd:i,transition:["height","line-height","padding"].map(C=>`${C} ${e.motionDurationSlow}`).join(","),"&-content":{...Ro,marginInlineEnd:i},"&-remove":{...dv(),display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}}},[`${t}-input`]:{lineHeight:n(o).mul(2).add(m("multi-item-height")).equal(),width:"calc(var(--select-input-width, 0) * 1px)",minWidth:e1,maxWidth:"100%",transition:`line-height ${e.motionDurationSlow}`}},[`&${t}-sm`]:{[g("multi-item-height")]:e.multipleItemHeightSM,[g("multi-item-border-radius")]:e.borderRadiusXS},[`&${t}-lg`]:{[g("multi-item-height")]:e.multipleItemHeightLG,[g("multi-item-border-radius")]:e.borderRadius},[`&${t}-filled`]:{[g("multi-item-border-color")]:e.colorSplit,[g("multi-item-background")]:e.colorBgContainer,[`&${t}-disabled`]:{[g("multi-item-border-color")]:"transparent"}}}}},$w=(e,t)=>{const{componentCls:n,antCls:r}=e,[s]=br(r,"select"),{border:i,borderHover:o,borderActive:a,borderOutline:l}=t,c=t.background||e.selectorBg||e.colorBgContainer;return{[s("border-color")]:i,[s("background-color")]:c,[s("color")]:t.color||e.colorText,[`&:not(${n}-disabled)`]:{"&:hover":{[s("border-color")]:o,[s("background-color")]:t.backgroundHover||c},[`&${n}-focused`]:{[s("border-color")]:a,[s("background-color")]:t.backgroundActive||c,boxShadow:`0 0 0 ${he(e.controlOutlineWidth)} ${l}`}},[`&${n}-disabled`]:{[s("border-color")]:t.borderDisabled||t.border,[s("background-color")]:t.backgroundDisabled||t.background}}},Yf=(e,t,n,r={},s={},i)=>{const{componentCls:o}=e;return{[`&${o}-${t}`]:[$w(e,n),{[`&${o}-status-error`]:$w(e,{...n,color:r.color||e.colorError,...r}),[`&${o}-status-warning`]:$w(e,{...n,color:s.color||e.colorWarning,...s})},i]}},IY=e=>{const{componentCls:t,fontHeight:n,controlHeight:r,iconCls:s,antCls:i,calc:o}=e,[a,l]=br(i,"select");return{[t]:[{[a("border-radius")]:e.borderRadius,[a("border-color")]:"#000",[a("border-size")]:e.lineWidth,[a("background-color")]:e.colorBgContainer,[a("font-size")]:e.fontSize,[a("line-height")]:e.lineHeight,[a("font-height")]:n,[a("color")]:e.colorText,[a("height")]:r,[a("padding-horizontal")]:o(e.paddingSM).sub(e.lineWidth).equal(),[a("padding-vertical")]:`calc((${l("height")} - ${l("font-height")}) / 2 - ${l("border-size")})`,...jn(e,!0),display:"inline-flex",flexWrap:"nowrap",position:"relative",transition:`all ${e.motionDurationSlow}`,alignItems:"flex-start",outline:0,cursor:"pointer",borderRadius:l("border-radius"),borderWidth:l("border-size"),borderStyle:e.lineType,borderColor:l("border-color"),background:l("background-color"),fontSize:l("font-size"),lineHeight:l("line-height"),color:l("color"),paddingInline:l("padding-horizontal"),paddingBlock:l("padding-vertical"),[`${t}-prefix`]:{flex:"none",lineHeight:1},[`${t}-placeholder`]:{...Ro,color:e.colorTextPlaceholder,pointerEvents:"none",zIndex:1},[`${t}-content`]:{flex:"auto",minWidth:0,position:"relative",display:"flex",marginInlineEnd:o(e.paddingXXS).mul(1.5).equal(),"&:before":{content:'"\\a0"',width:0,overflow:"hidden"},"input[readonly]":{cursor:"inherit",caretColor:"transparent"}},[`${t}-suffix`]:{flex:"none",color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,"> :not(:last-child)":{marginInlineEnd:e.marginXS}},[`${t}-prefix, ${t}-suffix`]:{alignSelf:"center",[s]:{verticalAlign:"top"}},"&-disabled":{background:e.colorBgContainerDisabled,color:e.colorTextDisabled,cursor:"not-allowed",input:{cursor:"not-allowed"}},"&-sm":{[a("height")]:e.controlHeightSM,[a("padding-horizontal")]:o(e.paddingXS).sub(e.lineWidth).equal(),[a("border-radius")]:e.borderRadiusSM,[`${t}-clear`]:{insetInlineEnd:l("padding-horizontal")}},"&-lg":{[a("height")]:e.controlHeightLG,[a("font-size")]:e.fontSizeLG,[a("line-height")]:e.lineHeightLG,[a("font-height")]:e.fontHeightLG,[a("border-radius")]:e.borderRadiusLG}},{[`&:not(${t}-customize)`]:{[`${t}-input`]:{outline:"none",background:"transparent",appearance:"none",border:0,margin:0,padding:0,color:l("color"),"&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},{[`&-single:not(${t}-customize)`]:{[`${t}-input`]:{position:"absolute",insetInline:0,insetBlock:`calc(${l("padding-vertical")} * -1)`,lineHeight:`calc(${l("font-height")} + ${l("padding-vertical")} * 2)`},[`${t}-content`]:{...Ro,alignSelf:"center","&-has-value":{display:"block","&:before":{display:"none"}},"&-has-search-value":{color:"transparent"},"&-value":{transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,zIndex:1}},[`&${t}-open ${t}-content`]:{color:e.colorTextPlaceholder}}},{[`&-show-search:not(${t}-customize-input):not(${t}-disabled)`]:{cursor:"text"}},MY(e),Yf(e,"outlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:e.activeOutlineColor,borderDisabled:e.colorBorderDisabled},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError,borderOutline:e.colorErrorOutline},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning,borderOutline:e.colorWarningOutline}),Yf(e,"filled",{border:"transparent",borderHover:"transparent",borderActive:e.activeBorderColor,borderOutline:"transparent",borderDisabled:e.colorBorderDisabled,background:e.colorFillTertiary,backgroundHover:e.colorFillSecondary,backgroundActive:e.colorBgContainer},{background:e.colorErrorBg,backgroundHover:e.colorErrorBgHover,borderActive:e.colorError},{background:e.colorWarningBg,backgroundHover:e.colorWarningBgHover,borderActive:e.colorWarning}),Yf(e,"borderless",{border:"transparent",borderHover:"transparent",borderActive:"transparent",borderOutline:"transparent",background:"transparent"}),Yf(e,"underlined",{border:e.colorBorder,borderHover:e.hoverBorderColor,borderActive:e.activeBorderColor,borderOutline:"transparent"},{border:e.colorError,borderHover:e.colorErrorHover,borderActive:e.colorError},{border:e.colorWarning,borderHover:e.colorWarningHover,borderActive:e.colorWarning},{borderRadius:0,borderTopColor:"transparent",borderRightColor:"transparent",borderLeftColor:"transparent"}),TY(e)]}},DY=e=>{const{fontSize:t,lineHeight:n,lineWidth:r,controlHeight:s,controlHeightSM:i,controlHeightLG:o,paddingXXS:a,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:h,controlItemBgActive:g,controlItemBgHover:m,colorBgContainer:C,colorFillSecondary:v,colorBgContainerDisabled:b,colorTextDisabled:w,colorPrimaryHover:S,colorPrimary:x,controlOutline:P}=e,F=a*2,M=r*2,E=Math.min(s-F,s-M),I=Math.min(i-F,i-M),A=Math.min(o-F,o-M);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(a/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:h,optionSelectedBg:g,optionActiveBg:m,optionPadding:`${(s-t*n)/2}px ${l}px`,optionFontSize:t,optionLineHeight:n,optionHeight:s,selectorBg:C,clearBg:C,singleItemHeightLG:o,multipleItemBg:v,multipleItemBorderColor:"transparent",multipleItemHeight:E,multipleItemHeightSM:I,multipleItemHeightLG:A,multipleSelectorBgDisabled:b,multipleItemColorDisabled:w,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:S,activeBorderColor:x,activeOutlineColor:P,selectAffixPadding:a}},AY=e=>{const{antCls:t,componentCls:n,motionDurationMid:r,inputPaddingHorizontalBase:s}=e,i={[`${n}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[n]:{...jn(e),[`${n}-selection-item`]:{flex:1,fontWeight:"normal",position:"relative",userSelect:"none",...Ro,[`> ${t}-typography`]:{display:"inline"}},[`${n}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${n}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:s,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:["color","opacity"].map(o=>`${o} ${r} ease`).join(", "),textRendering:"auto",transform:"translateZ(0)","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":i,"&:hover":i},[`${n}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${n}-has-feedback`]:{[`${n}-clear`]:{insetInlineEnd:e.calc(s).add(e.fontSize).add(e.paddingXS).equal()}}}}}},LY=e=>{const{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},AY(e),FY(e),{[`${t}-rtl`]:{direction:"rtl"}},Sv(e,{focusElCls:`${t}-focused`})]},OY=Ln("Select",(e,{rootPrefixCls:t})=>{const n=En(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(e.lineWidth).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[LY(n),IY(n)]},DY,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var kY={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"};function y0(){return y0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,y0({},e,{ref:t,icon:kY})),x$=p.forwardRef(NY);var BY={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"};function b0(){return b0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,b0({},e,{ref:t,icon:BY})),sP=p.forwardRef($Y);var GY={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"};function w0(){return w0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,w0({},e,{ref:t,icon:GY})),iP=p.forwardRef(VY);function HY({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:n,removeIcon:r,loading:s,loadingIcon:i,multiple:o,hasFeedback:a,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:h}){const g=t??p.createElement(hv,null),m=w=>e===null&&!a&&!u?null:p.createElement(p.Fragment,null,l!==!1&&w,a&&c);let C=null;e!==void 0?C=m(e):s?C=m(i??p.createElement(Cv,{spin:!0})):C=({open:w,showSearch:S})=>m(w&&S?p.createElement(iP,null):p.createElement(sP,null));let v=null;n!==void 0?v=n:o?v=p.createElement(x$,null):v=null;let b=null;return r!==void 0?b=r:b=p.createElement(Kc,null),{clearIcon:g,suffixIcon:C,itemIcon:v,removeIcon:b}}function zY(e){return K.useMemo(()=>{if(e)return(...t)=>K.createElement(od,{space:!0},e.apply(void 0,t))},[e])}function WY(e,t){return t!==void 0?t:e!==null}const R$="SECRET_COMBOBOX_MODE_DO_NOT_USE",_Y=(e,t)=>{var ie,Se,Te,We,ft;const{prefixCls:n,bordered:r,className:s,rootClassName:i,getPopupContainer:o,popupClassName:a,dropdownClassName:l,listHeight:c=256,placement:u,listItemHeight:h,size:g,disabled:m,notFoundContent:C,status:v,builtinPlacements:b,dropdownMatchSelectWidth:w,popupMatchSelectWidth:S,direction:x,style:P,allowClear:F,variant:M,popupStyle:E,dropdownStyle:I,transitionName:A,tagRender:L,maxCount:D,prefix:N,dropdownRender:k,popupRender:G,onDropdownVisibleChange:$,onOpenChange:_,styles:U,classNames:V,...W}=e,{getPopupContainer:j,getPrefixCls:H,renderEmpty:B,direction:Y,virtual:J,popupMatchSelectWidth:te,popupOverflow:Z}=p.useContext(Kt),{showSearch:ae,style:de,styles:ge,className:ve,classNames:Re}=Hn("select"),[,ne]=ds(),re=h??(ne==null?void 0:ne.controlHeight),ce=H("select",n),X=H(),ue=x??Y,{compactSize:fe,compactItemClassnames:oe}=qc(ce,ue),[we,Be]=rP("select",M,r),Ae=Rs(ce),[Pe,_e]=OY(ce,Ae),ze=p.useMemo(()=>{const{mode:Qe}=e;if(Qe!=="combobox")return Qe===R$?"combobox":Qe},[e.mode]),lt=ze==="multiple"||ze==="tags",Ft=WY(e.suffixIcon,e.showArrow),gt=S??w??te,Ye=zY(G||k),Ie=_||$,{status:Ke,hasFeedback:De,isFormItemInput:je,feedbackIcon:qe}=p.useContext(Di),Ge=Ev(Ke,v);let Ce;C!==void 0?Ce=C:ze==="combobox"?Ce=null:Ce=(B==null?void 0:B("Select"))||p.createElement(nP,{componentName:"Select"});const{suffixIcon:Oe,itemIcon:ot,removeIcon:ut,clearIcon:wt}=HY({...W,multiple:lt,hasFeedback:De,feedbackIcon:qe,showSuffixIcon:Ft,componentName:"Select"}),It=F===!0?{clearIcon:wt}:F,Gt=Vn(W,["suffixIcon","itemIcon"]),Nt=Oi(Qe=>g??fe??Qe),jt=p.useContext(so),qt=m??jt,Ot={...e,variant:we,status:Ge,disabled:qt,size:Nt},[Vt,Ve]=Kn([Re,V],[ge,U],{props:Ot},{popup:{_default:"root"}}),st=ee((ie=Vt.popup)==null?void 0:ie.root,a,l,{[`${ce}-dropdown-${ue}`]:ue==="rtl"},i,_e,Ae,Pe),Ue={...(Se=Ve.popup)==null?void 0:Se.root,...E??I},ke=ee({[`${ce}-lg`]:Nt==="large",[`${ce}-sm`]:Nt==="small",[`${ce}-rtl`]:ue==="rtl",[`${ce}-${we}`]:Be,[`${ce}-in-form-item`]:je},Np(ce,Ge,De),oe,ve,s,Vt.root,i,_e,Ae,Pe),q=p.useMemo(()=>u!==void 0?u:ue==="rtl"?"bottomRight":"bottomLeft",[u,ue]),[Q]=tg("SelectLike",((We=(Te=Ve.popup)==null?void 0:Te.root)==null?void 0:We.zIndex)??(Ue==null?void 0:Ue.zIndex));return p.createElement(tP,{ref:t,virtual:J,classNames:Vt,styles:Ve,showSearch:ae,...Gt,style:{...Ve.root,...de,...P},popupMatchSelectWidth:gt,transitionName:Ic(X,"slide-up",A),builtinPlacements:PY(b,Z),listHeight:c,listItemHeight:re,mode:ze,prefixCls:ce,placement:q,direction:ue,prefix:N,suffixIcon:Oe,menuItemSelectedIcon:ot,removeIcon:ut,allowClear:It,notFoundContent:Ce,className:ke,getPopupContainer:o||j,popupClassName:st,disabled:qt,popupStyle:{...(ft=Ve.popup)==null?void 0:ft.root,...Ue,zIndex:Q},maxCount:lt?D:void 0,tagRender:lt?L:void 0,popupRender:Ye,onPopupVisibleChange:Ie})},Io=p.forwardRef(_Y),UY=YE(Io,"popupAlign");Io.SECRET_COMBOBOX_MODE_DO_NOT_USE=R$;Io.Option=eP;Io.OptGroup=JE;Io._InternalPanelDoNotUseOrYouWillBeFired=UY;const{Option:t1}=Io;function n1(e){return(e==null?void 0:e.type)&&(e.type.isSelectOption||e.type.isSelectOptGroup)}const jY=(e,t)=>{const{prefixCls:n,className:r,style:s,popupClassName:i,dropdownClassName:o,children:a,dataSource:l,rootClassName:c,dropdownStyle:u,dropdownRender:h,popupRender:g,onDropdownVisibleChange:m,onOpenChange:C,styles:v,classNames:b}=e,w=Tr(a),S=g||h,x=C||m;let P;w.length===1&&p.isValidElement(w[0])&&!n1(w[0])&&([P]=w);const F=P?()=>P:void 0;let M;w.length&&n1(w[0])?M=a:M=l?l.map(G=>{if(p.isValidElement(G))return G;switch(typeof G){case"string":return p.createElement(t1,{key:G,value:G},G);case"object":{const{value:$}=G;return p.createElement(t1,{key:$,value:$},G.text)}default:return}}):[];const{getPrefixCls:E}=p.useContext(Kt),I=E("select",n),A={...e,dataSource:l,status:e.status,popupMatchSelectWidth:e.popupMatchSelectWidth||e.dropdownMatchSelectWidth,popupRender:S,onOpenChange:x},[L,D]=Kn([b],[v],{props:A},{popup:{_default:"root"}}),N=p.useMemo(()=>{var G,$,_;return{root:ee(`${I}-auto-complete`,r,c,L.root,{[`${I}-customize`]:P}),prefix:L.prefix,input:L.input,placeholder:L.placeholder,content:L.content,popup:{root:ee(i,o,(G=L.popup)==null?void 0:G.root),list:($=L.popup)==null?void 0:$.list,listItem:(_=L.popup)==null?void 0:_.listItem}}},[I,r,c,L,i,o]),k=p.useMemo(()=>{var G,$,_;return{root:{...D.root,...s},input:D.input,prefix:D.prefix,placeholder:D.placeholder,content:D.content,popup:{root:{...u,...(G=D.popup)==null?void 0:G.root},list:($=D.popup)==null?void 0:$.list,listItem:(_=D.popup)==null?void 0:_.listItem}}},[D,s,u]);return p.createElement(Io,{ref:t,suffixIcon:null,...Vn(e,["dataSource","dropdownClassName","popupClassName"]),prefixCls:I,classNames:N,styles:k,mode:Io.SECRET_COMBOBOX_MODE_DO_NOT_USE,popupRender:S,onPopupVisibleChange:x,getInputElement:F},M)},E$=p.forwardRef(jY),{Option:KY}=Io,qY=YE(E$,"popupAlign",e=>Vn(e,["visible"])),P$=E$;P$.Option=KY;P$._InternalPanelDoNotUseOrYouWillBeFired=qY;const ia=["xxxl","xxl","xl","lg","md","sm","xs"],XY=[].concat(ia).reverse(),YY=e=>({xs:`(max-width: ${e.screenXSMax}px)`,sm:`(min-width: ${e.screenSM}px)`,md:`(min-width: ${e.screenMD}px)`,lg:`(min-width: ${e.screenLG}px)`,xl:`(min-width: ${e.screenXL}px)`,xxl:`(min-width: ${e.screenXXL}px)`,xxxl:`(min-width: ${e.screenXXXL}px)`}),QY=e=>{const t=e,n=[].concat(ia).reverse();return n.forEach((r,s)=>{const i=r.toUpperCase(),o=`screen${i}Min`,a=`screen${i}`;if(!(t[o]<=t[a]))throw new Error(`${o}<=${a} fails : !(${t[o]}<=${t[a]})`);if(s{const[,e]=ds(),t=YY(QY(e));return K.useMemo(()=>{const n=new Map;let r=-1,s={};return{responsiveMap:t,matchHandlers:{},dispatch(i){return s=i,n.forEach(o=>o(s)),n.size>=1},subscribe(i){return n.size||this.register(),r+=1,n.set(r,i),i(s),r},unsubscribe(i){n.delete(i),n.size||this.unregister()},register(){Object.entries(t).forEach(([i,o])=>{const a=({matches:c})=>{this.dispatch({...s,[i]:c})},l=window.matchMedia(o);typeof(l==null?void 0:l.addEventListener)=="function"&&l.addEventListener("change",a),this.matchHandlers[o]={mql:l,listener:a},a(l)})},unregister(){Object.values(t).forEach(i=>{var a;const o=this.matchHandlers[i];typeof((a=o==null?void 0:o.mql)==null?void 0:a.removeEventListener)=="function"&&o.mql.removeEventListener("change",o==null?void 0:o.listener)}),n.clear()}}},[t])};function Pv(e=!0,t={}){const n=p.useRef(t),[,r]=eB(),s=ZY();return on(()=>{const i=s.subscribe(o=>{n.current=o,e&&r()});return()=>s.unsubscribe(i)},[]),n.current}const F$=e=>{const{children:t,prefixCls:n,id:r,classNames:s,styles:i,className:o,style:a}=e;return p.createElement("div",{id:r,className:ee(`${n}-container`,s==null?void 0:s.container,o),style:{...i==null?void 0:i.container,...a},role:"tooltip"},typeof t=="function"?t():t)},Iu={shiftX:64,adjustY:1},Du={adjustX:1,shiftY:!0},bi=[0,0],JY={left:{points:["cr","cl"],overflow:Du,offset:[-4,0],targetOffset:bi},right:{points:["cl","cr"],overflow:Du,offset:[4,0],targetOffset:bi},top:{points:["bc","tc"],overflow:Iu,offset:[0,-4],targetOffset:bi},bottom:{points:["tc","bc"],overflow:Iu,offset:[0,4],targetOffset:bi},topLeft:{points:["bl","tl"],overflow:Iu,offset:[0,-4],targetOffset:bi},leftTop:{points:["tr","tl"],overflow:Du,offset:[-4,0],targetOffset:bi},topRight:{points:["br","tr"],overflow:Iu,offset:[0,-4],targetOffset:bi},rightTop:{points:["tl","tr"],overflow:Du,offset:[4,0],targetOffset:bi},bottomRight:{points:["tr","br"],overflow:Iu,offset:[0,4],targetOffset:bi},rightBottom:{points:["bl","br"],overflow:Du,offset:[4,0],targetOffset:bi},bottomLeft:{points:["tl","bl"],overflow:Iu,offset:[0,4],targetOffset:bi},leftBottom:{points:["br","bl"],overflow:Du,offset:[-4,0],targetOffset:bi}};function S0(){return S0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{trigger:n=["hover"],mouseEnterDelay:r=0,mouseLeaveDelay:s=.1,prefixCls:i="rc-tooltip",children:o,onVisibleChange:a,afterVisibleChange:l,motion:c,placement:u="right",align:h={},destroyOnHidden:g=!1,defaultVisible:m,getTooltipContainer:C,arrowContent:v,overlay:b,id:w,showArrow:S=!0,classNames:x,styles:P,...F}=e,M=ya(w),E=p.useRef(null);p.useImperativeHandle(t,()=>E.current);const I={...F};"visible"in e&&(I.popupVisible=e.visible);const A=p.useMemo(()=>{if(!S)return!1;const D=S===!0?{}:S;return{...D,className:ee(D.className,x==null?void 0:x.arrow),style:{...D.style,...P==null?void 0:P.arrow},content:D.content??v}},[S,x==null?void 0:x.arrow,P==null?void 0:P.arrow,v]),L=({open:D})=>{const N=p.Children.only(o),k={"aria-describedby":b&&D?M:void 0};return p.cloneElement(N,k)};return p.createElement(mv,S0({popupClassName:x==null?void 0:x.root,prefixCls:i,popup:p.createElement(F$,{key:"content",prefixCls:i,id:M,classNames:x,styles:P},b),action:n,builtinPlacements:JY,popupPlacement:u,ref:E,popupAlign:h,getPopupContainer:C,onOpenChange:a,afterOpenChange:l,popupMotion:c,defaultPopupVisible:m,autoDestroy:g,mouseLeaveDelay:s,popupStyle:P==null?void 0:P.root,mouseEnterDelay:r,arrow:A,uniqueContainerClassName:x==null?void 0:x.uniqueContainer,uniqueContainerStyle:P==null?void 0:P.uniqueContainer},I),L)});function T$(e){const{sizePopupArrow:t,borderRadiusXS:n,borderRadiusOuter:r}=e,s=t/2,i=0,o=s,a=r*1/Math.sqrt(2),l=s-r*(1-1/Math.sqrt(2)),c=s-n*(1/Math.sqrt(2)),u=r*(Math.sqrt(2)-1)+n*(1/Math.sqrt(2)),h=2*s-c,g=u,m=2*s-a,C=l,v=2*s-i,b=o,w=s*Math.sqrt(2)+r*(Math.sqrt(2)-2),S=r*(Math.sqrt(2)-1),x=`polygon(${S}px 100%, 50% ${S}px, ${2*s-S}px 100%, ${S}px 100%)`,P=`path('M ${i} ${o} A ${r} ${r} 0 0 0 ${a} ${l} L ${c} ${u} A ${n} ${n} 0 0 1 ${h} ${g} L ${m} ${C} A ${r} ${r} 0 0 0 ${v} ${b} Z')`;return{arrowShadowWidth:w,arrowPath:P,arrowPolygon:x}}const tQ=(e,t,n)=>{const{sizePopupArrow:r,arrowPolygon:s,arrowPath:i,arrowShadowWidth:o,borderRadiusXS:a,calc:l}=e;return{pointerEvents:"none",width:r,height:r,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:r,height:l(r).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[s,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:o,height:o,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${he(a)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:n,zIndex:0,background:"transparent"}}},M$=8;function oP(e){const{contentRadius:t,limitVerticalRadius:n}=e,r=t>12?t+2:12;return{arrowOffsetHorizontal:r,arrowOffsetVertical:n?M$:r}}function Qf(e,t){return e?t:{}}const I$=(e,t,n)=>{const{componentCls:r,boxShadowPopoverArrow:s,arrowOffsetVertical:i,arrowOffsetHorizontal:o,antCls:a}=e,[l]=br(a,"tooltip"),{arrowDistance:c=0,arrowPlacement:u={left:!0,right:!0,top:!0,bottom:!0}}=n||{};return{[r]:{[`${r}-arrow`]:[{position:"absolute",zIndex:1,display:"block",...tQ(e,t,s),"&:before":{background:t}}],...Qf(!!u.top,{[[`&-placement-top > ${r}-arrow`,`&-placement-topLeft > ${r}-arrow`,`&-placement-topRight > ${r}-arrow`].join(",")]:{bottom:c,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{[l("arrow-offset-x")]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-topRight":{[l("arrow-offset-x")]:`calc(100% - ${he(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...Qf(!!u.bottom,{[[`&-placement-bottom > ${r}-arrow`,`&-placement-bottomLeft > ${r}-arrow`,`&-placement-bottomRight > ${r}-arrow`].join(",")]:{top:c,transform:"translateY(-100%)"},[`&-placement-bottom > ${r}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{[l("arrow-offset-x")]:o,[`> ${r}-arrow`]:{left:{_skip_check_:!0,value:o}}},"&-placement-bottomRight":{[l("arrow-offset-x")]:`calc(100% - ${he(o)})`,[`> ${r}-arrow`]:{right:{_skip_check_:!0,value:o}}}}),...Qf(!!u.left,{[[`&-placement-left > ${r}-arrow`,`&-placement-leftTop > ${r}-arrow`,`&-placement-leftBottom > ${r}-arrow`].join(",")]:{right:{_skip_check_:!0,value:c},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:i},[`&-placement-leftBottom > ${r}-arrow`]:{bottom:i}}),...Qf(!!u.right,{[[`&-placement-right > ${r}-arrow`,`&-placement-rightTop > ${r}-arrow`,`&-placement-rightBottom > ${r}-arrow`].join(",")]:{left:{_skip_check_:!0,value:c},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:i},[`&-placement-rightBottom > ${r}-arrow`]:{bottom:i}})}}};function nQ(e,t,n,r){if(r===!1)return{adjustX:!1,adjustY:!1};const s=r&&typeof r=="object"?r:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+n,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+n,i.shiftX=!0,i.adjustX=!0;break}const o={...i,...s};return o.shiftX||(o.adjustX=!0),o.shiftY||(o.adjustY=!0),o}const r1={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"]}},rQ={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"]}},sQ=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function D$(e){const{arrowWidth:t,autoAdjustOverflow:n,arrowPointAtCenter:r,offset:s,borderRadius:i,visibleFirst:o}=e,a=t/2,l={},c=oP({contentRadius:i,limitVerticalRadius:!0});return Object.keys(r1).forEach(u=>{const g={...r&&rQ[u]||r1[u],offset:[0,0],dynamicInset:!0};switch(l[u]=g,sQ.has(u)&&(g.autoArrow=!1),u){case"top":case"topLeft":case"topRight":g.offset[1]=-a-s;break;case"bottom":case"bottomLeft":case"bottomRight":g.offset[1]=a+s;break;case"left":case"leftTop":case"leftBottom":g.offset[0]=-a-s;break;case"right":case"rightTop":case"rightBottom":g.offset[0]=a+s;break}if(r)switch(u){case"topLeft":case"bottomLeft":g.offset[0]=-c.arrowOffsetHorizontal-a;break;case"topRight":case"bottomRight":g.offset[0]=c.arrowOffsetHorizontal+a;break;case"leftTop":case"rightTop":g.offset[1]=-c.arrowOffsetHorizontal*2+a;break;case"leftBottom":case"rightBottom":g.offset[1]=c.arrowOffsetHorizontal*2-a;break}g.overflow=nQ(u,c,t,n),o&&(g.htmlRegion="visibleFirst")}),l}const iQ=(e,t)=>{const n=r=>typeof r=="boolean"?{show:r}:r||{};return K.useMemo(()=>{const r=n(e),s=n(t);return{...s,...r,show:r.show??s.show??!0}},[e,t])},s1="50%",oQ=e=>{const{calc:t,componentCls:n,tooltipMaxWidth:r,tooltipColor:s,tooltipBg:i,tooltipBorderRadius:o,zIndexPopup:a,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:h,arrowOffsetHorizontal:g,sizePopupArrow:m,antCls:C}=e,[v,b]=br(C,"tooltip"),w=t(o).add(m).add(g).equal(),x={minWidth:t(o).mul(2).add(m).equal(),minHeight:l,padding:`${he(e.calc(u).div(2).equal())} ${he(h)}`,color:b("overlay-color",s),textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:o,boxShadow:c,boxSizing:"border-box"},P={[v("valid-offset-x")]:b("arrow-offset-x","var(--arrow-x)"),transformOrigin:[b("valid-offset-x",s1),`var(--arrow-y, ${s1})`].join(" ")};return[{[n]:{...jn(e),position:"absolute",zIndex:a,display:"block",width:"max-content",maxWidth:r,visibility:"visible",...P,"&-hidden":{display:"none"},[v("arrow-background-color")]:i,[`${n}-container`]:[x,IB(e,!0)],[`&:has(~ ${n}-unique-container)`]:{[`${n}-container`]:{border:"none",background:"transparent",boxShadow:"none"}},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:w},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${n}-inner`]:{borderRadius:e.min(o,M$)}},[`${n}-content`]:{position:"relative"},...Zj(e,(F,{darkColor:M})=>({[`&${n}-${F}`]:{[`${n}-container`]:{backgroundColor:M},[`${n}-arrow`]:{[v("arrow-background-color")]:M}}})),"&-rtl":{direction:"rtl"}}},I$(e,b("arrow-background-color")),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}},{[`${n}-unique-container`]:{...x,...P,position:"absolute",zIndex:t(a).sub(1).equal(),"&-hidden":{display:"none"},"&-visible":{transition:`all ${e.motionDurationSlow}`}}}]},aQ=e=>({zIndexPopup:e.zIndexPopupBase+70,maxWidth:250,...oP({contentRadius:e.borderRadius,limitVerticalRadius:!0}),...T$(En(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))}),A$=(e,t,n=!0)=>Ln("Tooltip",s=>{const{borderRadius:i,colorTextLightSolid:o,colorBgSpotlight:a,maxWidth:l}=s,c=En(s,{tooltipMaxWidth:l,tooltipColor:o,tooltipBorderRadius:i,tooltipBg:a});return[oQ(c),wv(s,"zoom-big-fast")]},aQ,{resetStyle:!1,injectStyle:n})(e,t),lQ=vl.map(e=>`${e}-inverse`);function cQ(e,t=!0){return t?[].concat(nn(lQ),nn(vl)).includes(e):vl.includes(e)}const L$=(e,t,n)=>{const r=cQ(n),[s]=br(e,"tooltip"),i=ee({[`${t}-${n}`]:n&&r}),o={},a={},l=n9(n).toRgb(),u=(.299*l.r+.587*l.g+.114*l.b)/255<.5?"#FFF":"#000";return n&&!r&&(o.background=n,o[s("overlay-color")]=u,a[s("arrow-background-color")]=n),{className:i,overlayStyle:o,arrowStyle:a}},uQ=e=>{const{prefixCls:t,className:n,placement:r="top",title:s,color:i,overlayInnerStyle:o,classNames:a,styles:l}=e,{getPrefixCls:c}=p.useContext(Kt),u=c("tooltip",t),h=c(),g=Rs(u),[m,C]=A$(u,g),v=L$(h,u,i),b=v.arrowStyle,w=p.useMemo(()=>({container:{...o,...v.overlayStyle}}),[o,v.overlayStyle]),S={...e,placement:r},[x,P]=Kn([a],[w,l],{props:S}),F=ee(g,m,C,u,`${u}-pure`,`${u}-placement-${r}`,n,v.className);return p.createElement("div",{className:F,style:b},p.createElement("div",{className:`${u}-arrow`}),p.createElement(F$,{...e,className:m,prefixCls:u,classNames:x,styles:P},s))},dQ=p.forwardRef((e,t)=>{const{prefixCls:n,openClassName:r,getTooltipContainer:s,color:i,children:o,afterOpenChange:a,arrow:l,destroyTooltipOnHide:c,destroyOnHidden:u,title:h,overlay:g,trigger:m,builtinPlacements:C,autoAdjustOverflow:v=!0,motion:b,getPopupContainer:w,placement:S="top",mouseEnterDelay:x=.1,mouseLeaveDelay:P=.1,rootClassName:F,styles:M,classNames:E,onOpenChange:I,overlayInnerStyle:A,overlayStyle:L,overlayClassName:D,...N}=e,[,k]=ds(),{getPopupContainer:G,getPrefixCls:$,direction:_,className:U,style:V,classNames:W,styles:j,arrow:H,trigger:B}=Hn("tooltip"),Y=iQ(l,H),J=Y.show,te=m||B||"hover";Sd();const Z=p.useRef(null),ae=()=>{var Oe;(Oe=Z.current)==null||Oe.forceAlign()};p.useImperativeHandle(t,()=>{var Oe,ot;return{forceAlign:ae,nativeElement:(Oe=Z.current)==null?void 0:Oe.nativeElement,popupElement:(ot=Z.current)==null?void 0:ot.popupElement}});const[de,ge]=ir(e.defaultOpen??!1,e.open),ve=!h&&!g&&h!==0,Re=Oe=>{ge(ve?!1:Oe),!ve&&I&&I(Oe)},ne=p.useMemo(()=>C||D$({arrowPointAtCenter:(Y==null?void 0:Y.pointAtCenter)??!1,autoAdjustOverflow:v,arrowWidth:J?k.sizePopupArrow:0,borderRadius:k.borderRadius,offset:k.marginXXS,visibleFirst:!0}),[Y,C,k,J,v]),re=p.useMemo(()=>h===0?h:g||h||"",[g,h]),ce=p.createElement(od,{space:!0,form:!0},typeof re=="function"?re():re),X={...e,trigger:te,color:i,placement:S,builtinPlacements:C,openClassName:r,arrow:l,autoAdjustOverflow:v,getPopupContainer:w,children:o,destroyTooltipOnHide:c,destroyOnHidden:u},[ue,fe]=Kn([W,E],[j,M],{props:X}),oe=$("tooltip",n),we=$(),Be=e["data-popover-inject"];let Ae=de;!("open"in e)&&ve&&(Ae=!1);const Pe=p.isValidElement(o)&&!mB(o)?o:p.createElement("span",null,o),_e=Pe.props,ze=!_e.className||typeof _e.className=="string"?ee(_e.className,r||`${oe}-open`):_e.className,lt=Rs(oe),[Ft,gt]=A$(oe,lt,!Be),Ye=L$(we,oe,i),Ie=Ye.arrowStyle,Ke=ee(lt,Ft,gt),De=ee(D,{[`${oe}-rtl`]:_==="rtl"},Ye.className,F,Ke,U,ue.root),[je,qe]=tg("Tooltip",N.zIndex),Ge={...fe.container,...A,...Ye.overlayStyle},Ce=p.createElement(eQ,{unique:!0,...N,trigger:te,zIndex:je,showArrow:J,placement:S,mouseEnterDelay:x,mouseLeaveDelay:P,prefixCls:oe,classNames:{root:De,container:ue.container,arrow:ue.arrow,uniqueContainer:ee(Ke,ue.container)},styles:{root:{...Ie,...fe.root,...V,...L},container:Ge,uniqueContainer:Ge,arrow:fe.arrow},getTooltipContainer:w||s||G,ref:Z,builtinPlacements:ne,overlay:ce,visible:Ae,onVisibleChange:Re,afterVisibleChange:a,arrowContent:p.createElement("span",{className:`${oe}-arrow-content`}),motion:{motionName:Ic(we,"zoom-big-fast",typeof(b==null?void 0:b.motionName)=="string"?b==null?void 0:b.motionName:void 0),motionDeadline:1e3},destroyOnHidden:u??!!c},Ae?Xr(Pe,{className:ze}):Pe);return p.createElement(pv.Provider,{value:qe},Ce)}),bl=dQ;bl._InternalPanelDoNotUseOrYouWillBeFired=uQ;bl.UniqueProvider=CB;const aP=K.createContext({});var hQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"};function x0(){return x0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,x0({},e,{ref:t,icon:hQ})),R0=p.forwardRef(pQ),{ESC:gQ,TAB:fQ}=Et;function mQ({visible:e,triggerRef:t,onVisibleChange:n,autoFocus:r,overlayRef:s}){const i=p.useRef(!1),o=()=>{var c,u;e&&((u=(c=t.current)==null?void 0:c.focus)==null||u.call(c),n==null||n(!1))},a=()=>{var c;return(c=s.current)!=null&&c.focus?(s.current.focus(),i.current=!0,!0):!1},l=c=>{switch(c.keyCode){case gQ:o();break;case fQ:{let u=!1;i.current||(u=a()),u?c.preventDefault():o();break}}};p.useEffect(()=>e?(window.addEventListener("keydown",l),r&&dn(a,3),()=>{window.removeEventListener("keydown",l),i.current=!1}):()=>{i.current=!1},[e])}const CQ=p.forwardRef((e,t)=>{const{overlay:n,arrow:r,prefixCls:s}=e,i=p.useMemo(()=>{let a;return typeof n=="function"?a=n():a=n,a},[n]),o=xs(t,Il(i));return K.createElement(K.Fragment,null,r&&K.createElement("div",{className:`${s}-arrow`}),K.cloneElement(i,{ref:ca(i)?o:void 0}))}),Au={adjustX:1,adjustY:1},Lu=[0,0],vQ={topLeft:{points:["bl","tl"],overflow:Au,offset:[0,-4],targetOffset:Lu},top:{points:["bc","tc"],overflow:Au,offset:[0,-4],targetOffset:Lu},topRight:{points:["br","tr"],overflow:Au,offset:[0,-4],targetOffset:Lu},bottomLeft:{points:["tl","bl"],overflow:Au,offset:[0,4],targetOffset:Lu},bottom:{points:["tc","bc"],overflow:Au,offset:[0,4],targetOffset:Lu},bottomRight:{points:["tr","br"],overflow:Au,offset:[0,4],targetOffset:Lu}};function E0(){return E0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var j;const{arrow:n=!1,prefixCls:r="rc-dropdown",transitionName:s,animation:i,align:o,placement:a="bottomLeft",placements:l=vQ,getPopupContainer:c,showAction:u,hideAction:h,overlayClassName:g,overlayStyle:m,visible:C,trigger:v=["hover"],autoFocus:b,overlay:w,children:S,onVisibleChange:x,...P}=e,[F,M]=K.useState(),E="visible"in e?C:F,I=i?`${r}-${i}`:s,A=K.useRef(null),L=K.useRef(null),D=K.useRef(null);K.useImperativeHandle(t,()=>A.current);const N=H=>{M(H),x==null||x(H)};mQ({visible:E,triggerRef:D,onVisibleChange:N,autoFocus:b,overlayRef:L});const k=H=>{const{onOverlayClick:B}=e;M(!1),B&&B(H)},G=()=>K.createElement(CQ,{ref:L,overlay:w,prefixCls:r,arrow:n}),$=()=>typeof w=="function"?G:G(),_=()=>{const{minOverlayWidthMatchTrigger:H,alignPoint:B}=e;return"minOverlayWidthMatchTrigger"in e?H:!B},U=()=>{const{openClassName:H}=e;return H!==void 0?H:`${r}-open`},V=K.cloneElement(S,{className:ee((j=S.props)==null?void 0:j.className,E&&U()),ref:ca(S)?xs(D,Il(S)):void 0});let W=h;return!W&&v.indexOf("contextMenu")!==-1&&(W=["click"]),K.createElement(mv,E0({builtinPlacements:l},P,{prefixCls:r,ref:A,popupClassName:ee(g,{[`${r}-show-arrow`]:n}),popupStyle:m,action:v,showAction:u,hideAction:W,popupPlacement:a,popupAlign:o,popupMotion:{motionName:I},popupVisible:E,stretch:_()?"minWidth":"",popup:$(),onOpenChange:N,onPopupClick:k,getPopupContainer:c}),V)}),yQ=e=>typeof e!="object"&&typeof e!="function"||e===null,k$=p.createContext(null);function N$(e,t){return`${e}-${t}`}function B$(e){const t=p.useContext(k$);return N$(t,e)}const io=p.createContext(null);function bQ(e,t){const n={...e};return Object.keys(t).forEach(r=>{const s=t[r];s!==void 0&&(n[r]=s)}),n}function Bp({children:e,locked:t,...n}){const r=p.useContext(io),s=_c(()=>bQ(r,n),[r,n],(i,o)=>!t&&(i[0]!==o[0]||!no(i[1],o[1],!0)));return p.createElement(io.Provider,{value:s},e)}const wQ=[],$$=p.createContext(null);function Fv(){return p.useContext($$)}const G$=p.createContext(wQ);function Pd(e){const t=p.useContext(G$);return p.useMemo(()=>e!==void 0?[...t,e]:t,[t,e])}const V$=p.createContext(null),lP=p.createContext({}),{LEFT:P0,RIGHT:F0,UP:T0,DOWN:Dm,ENTER:Am,ESC:H$,HOME:Mh,END:Ih}=Et,i1=[T0,Dm,P0,F0];function SQ(e,t,n,r){var m;const s="prev",i="next",o="children",a="parent";if(e==="inline"&&r===Am)return{inlineTrigger:!0};const l={[T0]:s,[Dm]:i},c={[P0]:n?i:s,[F0]:n?s:i,[Dm]:o,[Am]:o},u={[T0]:s,[Dm]:i,[Am]:o,[H$]:a,[P0]:n?o:a,[F0]:n?a:o};switch((m={inline:l,horizontal:c,vertical:u,inlineSub:l,horizontalSub:u,verticalSub:u}[`${e}${t?"":"Sub"}`])==null?void 0:m[r]){case s:return{offset:-1,sibling:!0};case i:return{offset:1,sibling:!0};case a:return{offset:-1,sibling:!1};case o:return{offset:1,sibling:!1};default:return null}}function xQ(e){let t=e;for(;t;){if(t.getAttribute("data-menu-list"))return t;t=t.parentElement}return null}function RQ(e,t){let n=e||document.activeElement;for(;n;){if(t.has(n))return n;n=n.parentElement}return null}function cP(e,t){return jE(e,!0).filter(r=>t.has(r))}function o1(e,t,n,r=1){if(!e)return null;const s=cP(e,t),i=s.length;let o=s.findIndex(a=>n===a);return r<0?o===-1?o=i-1:o-=1:r>0&&(o+=1),o=(o+i)%i,s[o]}const hC=(e,t)=>{const n=new Set,r=new Map,s=new Map;return e.forEach(i=>{const o=document.querySelector(`[data-menu-id='${N$(t,i)}']`);o&&(n.add(o),s.set(o,i),r.set(i,o))}),{elements:n,key2element:r,element2key:s}};function EQ(e,t,n,r,s,i,o,a,l,c){const u=p.useRef(),h=p.useRef();h.current=t;const g=()=>{dn.cancel(u.current)};return p.useEffect(()=>()=>{g()},[]),m=>{const{which:C}=m;if([...i1,Am,H$,Mh,Ih].includes(C)){const v=i();let b=hC(v,r);const{elements:w,key2element:S,element2key:x}=b,P=S.get(t),F=RQ(P,w),M=x.get(F),E=SQ(e,o(M,!0).length===1,n,C);if(!E&&C!==Mh&&C!==Ih)return;(i1.includes(C)||[Mh,Ih].includes(C))&&m.preventDefault();const I=A=>{if(A){let L=A;const D=A.querySelector("a");D!=null&&D.getAttribute("href")&&(L=D);const N=x.get(A);a(N),g(),u.current=dn(()=>{h.current===N&&L.focus()})}};if([Mh,Ih].includes(C)||E.sibling||!F){let A;!F||e==="inline"?A=s.current:A=xQ(F);let L;const D=cP(A,w);C===Mh?L=D[0]:C===Ih?L=D[D.length-1]:L=o1(A,w,F,E.offset),I(L)}else if(E.inlineTrigger)l(M);else if(E.offset>0)l(M,!0),g(),u.current=dn(()=>{b=hC(v,r);const A=F.getAttribute("aria-controls"),L=document.getElementById(A),D=o1(L,b.elements);I(D)},5);else if(E.offset<0){const A=o(M,!0),L=A[A.length-2],D=S.get(L);l(L,!1),I(D)}}c==null||c(m)}}function PQ(e){Promise.resolve().then(e)}const uP="__RC_UTIL_PATH_SPLIT__",a1=e=>e.join(uP),FQ=e=>e.split(uP),M0="rc-menu-more";function TQ(){const[,e]=p.useState({}),t=p.useRef(new Map),n=p.useRef(new Map),[r,s]=p.useState([]),i=p.useRef(0),o=p.useRef(!1),a=()=>{o.current||e({})},l=p.useCallback((v,b)=>{const w=a1(b);n.current.set(w,v),t.current.set(v,w),i.current+=1;const S=i.current;PQ(()=>{S===i.current&&a()})},[]),c=p.useCallback((v,b)=>{const w=a1(b);n.current.delete(w),t.current.delete(v)},[]),u=p.useCallback(v=>{s(v)},[]),h=p.useCallback((v,b)=>{const w=t.current.get(v)||"",S=FQ(w);return b&&r.includes(S[0])&&S.unshift(M0),S},[r]),g=p.useCallback((v,b)=>v.filter(w=>w!==void 0).some(w=>h(w,!0).includes(b)),[h]),m=()=>{const v=[...t.current.keys()];return r.length&&v.push(M0),v},C=p.useCallback(v=>{const b=`${t.current.get(v)}${uP}`,w=new Set;return[...n.current.keys()].forEach(S=>{S.startsWith(b)&&w.add(n.current.get(S))}),w},[]);return p.useEffect(()=>()=>{o.current=!0},[]),{registerPath:l,unregisterPath:c,refreshOverflowKeys:u,isSubPathKey:g,getKeyPath:h,getKeys:m,getSubPathKeys:C}}function Kh(e){const t=p.useRef(e);t.current=e;const n=p.useCallback((...r)=>{var s;return(s=t.current)==null?void 0:s.call(t,...r)},[]);return e?n:void 0}function z$(e,t,n,r){const{activeKey:s,onActive:i,onInactive:o}=p.useContext(io),a={active:s===e};return t||(a.onMouseEnter=l=>{n==null||n({key:e,domEvent:l}),i(e)},a.onMouseLeave=l=>{r==null||r({key:e,domEvent:l}),o(e)}),a}function W$(e){const{mode:t,rtl:n,inlineIndent:r}=p.useContext(io);if(t!=="inline")return null;const s=e;return n?{paddingRight:s*r}:{paddingLeft:s*r}}function _$({icon:e,props:t,children:n}){let r;return e===null||e===!1?null:(typeof e=="function"?r=p.createElement(e,{...t}):typeof e!="boolean"&&(r=e),r||n||null)}function pC({item:e,...t}){return Object.defineProperty(t,"item",{get:()=>(Jn(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),e)}),t}function $p(){return $p=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{style:n,className:r,eventKey:s,warnKey:i,disabled:o,itemIcon:a,children:l,role:c,onMouseEnter:u,onMouseLeave:h,onClick:g,onKeyDown:m,onFocus:C,...v}=e,b=B$(s),{prefixCls:w,onItemClick:S,disabled:x,overflowDisabled:P,itemIcon:F,selectedKeys:M,onActive:E}=p.useContext(io),{_internalRenderMenuItem:I}=p.useContext(lP),A=`${w}-item`,L=p.useRef(),D=p.useRef(),N=x||o,k=va(t,D),G=Pd(s),$=Z=>({key:s,keyPath:[...G].reverse(),item:L.current,domEvent:Z}),_=a||F,{active:U,...V}=z$(s,N,u,h),W=M.includes(s),j=W$(G.length),H=Z=>{if(N)return;const ae=$(Z);g==null||g(pC(ae)),S(ae)},B=Z=>{if(m==null||m(Z),Z.which===Et.ENTER){const ae=$(Z);g==null||g(pC(ae)),S(ae)}},Y=Z=>{E(s),C==null||C(Z)},J={};e.role==="option"&&(J["aria-selected"]=W);let te=p.createElement(MQ,$p({ref:L,elementRef:k,role:c===null?"none":c||"menuitem",tabIndex:o?null:-1,"data-menu-id":P&&b?null:b},Vn(v,["extra"]),V,J,{component:"li","aria-disabled":o,style:{...j,...n},className:ee(A,{[`${A}-active`]:U,[`${A}-selected`]:W,[`${A}-disabled`]:N},r),onClick:H,onKeyDown:B,onFocus:Y}),l,p.createElement(_$,{props:{...e,isSelected:W},icon:_}));return I&&(te=I(te,e,{selected:W})),te});function DQ(e,t){const{eventKey:n}=e,r=Fv(),s=Pd(n);return p.useEffect(()=>{if(r)return r.registerPath(n,s),()=>{r.unregisterPath(n,s)}},[s]),r?null:p.createElement(IQ,$p({},e,{ref:t}))}const cg=p.forwardRef(DQ);function I0(){return I0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:s,mode:i,rtl:o}=p.useContext(io);return p.createElement("ul",I0({className:ee(s,o&&`${s}-rtl`,`${s}-sub`,`${s}-${i==="inline"?"inline":"vertical"}`,e),role:"menu"},n,{"data-menu-list":!0,ref:r}),t)},U$=p.forwardRef(AQ);function dP(e,t){return Tr(e).map((n,r)=>{var s;if(p.isValidElement(n)){const{key:i}=n;let o=((s=n.props)==null?void 0:s.eventKey)??i;o==null&&(o=`tmp_key-${[...t,r].join("-")}`);const l={key:o,eventKey:o};return p.cloneElement(n,l)}return n})}const os={adjustX:1,adjustY:1},LQ={topLeft:{points:["bl","tl"],overflow:os},topRight:{points:["br","tr"],overflow:os},bottomLeft:{points:["tl","bl"],overflow:os},bottomRight:{points:["tr","br"],overflow:os},leftTop:{points:["tr","tl"],overflow:os},leftBottom:{points:["br","bl"],overflow:os},rightTop:{points:["tl","tr"],overflow:os},rightBottom:{points:["bl","br"],overflow:os}},OQ={topLeft:{points:["bl","tl"],overflow:os},topRight:{points:["br","tr"],overflow:os},bottomLeft:{points:["tl","bl"],overflow:os},bottomRight:{points:["tr","br"],overflow:os},rightTop:{points:["tr","tl"],overflow:os},rightBottom:{points:["br","bl"],overflow:os},leftTop:{points:["tl","tr"],overflow:os},leftBottom:{points:["bl","br"],overflow:os}};function j$(e,t,n){if(t)return t;if(n)return n[e]||n.other}const kQ={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function NQ({prefixCls:e,visible:t,children:n,popup:r,popupStyle:s,popupClassName:i,popupOffset:o,disabled:a,mode:l,onVisibleChange:c}){const{getPopupContainer:u,rtl:h,subMenuOpenDelay:g,subMenuCloseDelay:m,builtinPlacements:C,triggerSubMenuAction:v,forceSubMenuRender:b,rootClassName:w,motion:S,defaultMotions:x}=p.useContext(io),[P,F]=p.useState(!1),M=h?{...OQ,...C}:{...LQ,...C},E=kQ[l],I=j$(l,S,x),A=p.useRef(I);l!=="inline"&&(A.current=I);const L={...A.current,leavedClassName:`${e}-hidden`,removeOnLeave:!1,motionAppear:!0},D=p.useRef();return p.useEffect(()=>(D.current=dn(()=>{F(t)}),()=>{dn.cancel(D.current)}),[t]),p.createElement(mv,{prefixCls:e,popupClassName:ee(`${e}-popup`,{[`${e}-rtl`]:h},i,w),stretch:l==="horizontal"?"minWidth":null,getPopupContainer:u,builtinPlacements:M,popupPlacement:E,popupVisible:P,popup:r,popupStyle:s,popupAlign:o&&{offset:o},action:a?[]:[v],mouseEnterDelay:g,mouseLeaveDelay:m,onPopupVisibleChange:c,forceRender:b,popupMotion:L,fresh:!0},n)}function D0(){return D0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{u.current&&g(!1)},[c]);const C={...j$(s,a,l)};n.length>1&&(C.motionAppear=!1);const v=C.onVisibleChanged;return C.onVisibleChanged=b=>(!u.current&&!b&&g(!0),v==null?void 0:v(b)),h?null:p.createElement(Bp,{mode:s,locked:!u.current},p.createElement(Li,D0({visible:m},C,{forceRender:o,removeOnLeave:!1,leavedClassName:`${i}-hidden`}),({className:b,style:w})=>p.createElement(U$,{id:e,className:b,style:w},r)))}function Gp(){return Gp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{style:n,className:r,styles:s,classNames:i,title:o,eventKey:a,warnKey:l,disabled:c,internalPopupClose:u,children:h,itemIcon:g,expandIcon:m,popupClassName:C,popupOffset:v,popupStyle:b,onClick:w,onMouseEnter:S,onMouseLeave:x,onTitleClick:P,onTitleMouseEnter:F,onTitleMouseLeave:M,popupRender:E,...I}=e,A=B$(a),{prefixCls:L,mode:D,openKeys:N,disabled:k,overflowDisabled:G,activeKey:$,selectedKeys:_,itemIcon:U,expandIcon:V,onItemClick:W,onOpenChange:j,onActive:H,popupRender:B}=p.useContext(io),{_internalRenderSubMenuItem:Y}=p.useContext(lP),{isSubPathKey:J}=p.useContext(V$),te=Pd(),Z=`${L}-submenu`,ae=k||c,de=p.useRef(),ge=p.useRef(),ve=g??U,Re=m??V,ne=N.includes(a),re=!G&&ne,ce=J(_,a),{active:X,...ue}=z$(a,ae,F,M),[fe,oe]=p.useState(!1),we=Ce=>{ae||oe(Ce)},Be=Ce=>{we(!0),S==null||S({key:a,domEvent:Ce})},Ae=Ce=>{we(!1),x==null||x({key:a,domEvent:Ce})},Pe=p.useMemo(()=>X||(D!=="inline"?fe||J([$],a):!1),[D,X,$,fe,a,J]),_e=W$(te.length),ze=Ce=>{ae||(P==null||P({key:a,domEvent:Ce}),D==="inline"&&j(a,!ne))},lt=Kh(Ce=>{w==null||w(pC(Ce)),W(Ce)}),Ft=Ce=>{D!=="inline"&&j(a,Ce)},gt=()=>{H(a)},Ye=A&&`${A}-popup`,Ie=p.useMemo(()=>p.createElement(_$,{icon:D!=="horizontal"?Re:void 0,props:{...e,isOpen:re,isSubMenu:!0}},p.createElement("i",{className:`${Z}-arrow`})),[D,Re,e,re,Z]);let Ke=p.createElement("div",Gp({role:"menuitem",style:_e,className:`${Z}-title`,tabIndex:ae?null:-1,ref:de,title:typeof o=="string"?o:null,"data-menu-id":G&&A?null:A,"aria-expanded":re,"aria-haspopup":!0,"aria-controls":Ye,"aria-disabled":ae,onClick:ze,onFocus:gt},ue),o,Ie);const De=p.useRef(D);D!=="inline"&&te.length>1?De.current="vertical":De.current=D;const je=De.current,qe=p.useMemo(()=>{const Ce=p.createElement(Bp,{classNames:i,styles:s,mode:je==="horizontal"?"vertical":je},p.createElement(U$,{id:Ye,ref:ge},h)),Oe=E||B;return Oe?Oe(Ce,{item:e,keys:te}):Ce},[E,B,te,Ye,h,e,je]);if(!G){const Ce=De.current;Ke=p.createElement(NQ,{mode:Ce,prefixCls:Z,visible:!u&&re&&D!=="inline",popupClassName:C,popupOffset:v,popupStyle:b,popup:qe,disabled:ae,onVisibleChange:Ft},Ke)}let Ge=p.createElement(sa.Item,Gp({ref:t,role:"none"},I,{component:"li",style:n,className:ee(Z,`${Z}-${D}`,r,{[`${Z}-open`]:re,[`${Z}-active`]:Pe,[`${Z}-selected`]:ce,[`${Z}-disabled`]:ae}),onMouseEnter:Be,onMouseLeave:Ae}),Ke,!G&&p.createElement(BQ,{id:Ye,open:re,keyPath:te},h));return Y&&(Ge=Y(Ge,e,{selected:ce,active:Pe,open:re,disabled:ae})),p.createElement(Bp,{classNames:i,styles:s,onItemClick:lt,mode:D==="horizontal"?"vertical":D,itemIcon:ve,expandIcon:Re},Ge)}),Tv=p.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,s=Pd(n),i=dP(r,s),o=Fv();p.useEffect(()=>{if(o)return o.registerPath(n,s),()=>{o.unregisterPath(n,s)}},[s]);let a;return o?a=i:a=p.createElement($Q,Gp({ref:t},e),i),p.createElement(G$.Provider,{value:s},a)});function hP({className:e,style:t}){const{prefixCls:n}=p.useContext(io);return Fv()?null:p.createElement("li",{role:"separator",className:ee(`${n}-item-divider`,e),style:t})}function gC(){return gC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:n,title:r,eventKey:s,children:i,...o}=e,{prefixCls:a,classNames:l,styles:c}=p.useContext(io),u=`${a}-item-group`;return p.createElement("li",gC({ref:t,role:"presentation"},o,{onClick:h=>h.stopPropagation(),className:ee(u,n)}),p.createElement("div",{role:"presentation",className:ee(`${u}-title`,l==null?void 0:l.listTitle),style:c==null?void 0:c.listTitle,title:typeof r=="string"?r:void 0},r),p.createElement("ul",{role:"group",className:ee(`${u}-list`,l==null?void 0:l.list),style:c==null?void 0:c.list},i))}),pP=p.forwardRef((e,t)=>{const{eventKey:n,children:r}=e,s=Pd(n),i=dP(r,s);return Fv()?i:p.createElement(GQ,gC({ref:t},Vn(e,["warnKey"])),i)});function Hu(){return Hu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{if(a&&typeof a=="object"){const{label:c,children:u,key:h,type:g,extra:m,...C}=a,v=h??`tmp-${l}`;return u||g==="group"?g==="group"?p.createElement(s,Hu({key:v},C,{title:c}),A0(u,t,n)):p.createElement(i,Hu({key:v},C,{title:c}),A0(u,t,n)):g==="divider"?p.createElement(o,Hu({key:v},C)):p.createElement(r,Hu({key:v},C,{extra:m}),c,(!!m||m===0)&&p.createElement("span",{className:`${n}-item-extra`},m))}return null}).filter(a=>a)}function l1(e,t,n,r,s){let i=e;const o={divider:hP,item:cg,group:pP,submenu:Tv,...r};return t&&(i=A0(t,o,s)),dP(i,n)}function L0(){return L0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var vt;const{prefixCls:n="rc-menu",rootClassName:r,style:s,className:i,styles:o,classNames:a,tabIndex:l=0,items:c,children:u,direction:h,id:g,mode:m="vertical",inlineCollapsed:C,disabled:v,disabledOverflow:b,subMenuOpenDelay:w=.1,subMenuCloseDelay:S=.1,forceSubMenuRender:x,defaultOpenKeys:P,openKeys:F,activeKey:M,defaultActiveFirst:E,selectable:I=!0,multiple:A=!1,defaultSelectedKeys:L,selectedKeys:D,onSelect:N,onDeselect:k,inlineIndent:G=24,motion:$,defaultMotions:_,triggerSubMenuAction:U="hover",builtinPlacements:V,itemIcon:W,expandIcon:j,overflowedIndicator:H="...",overflowedIndicatorPopupClassName:B,getPopupContainer:Y,onClick:J,onOpenChange:te,onKeyDown:Z,openAnimation:ae,openTransitionName:de,_internalRenderMenuItem:ge,_internalRenderSubMenuItem:ve,_internalComponents:Re,popupRender:ne,...re}=e,[ce,X]=p.useMemo(()=>[l1(u,c,Ql,Re,n),l1(u,c,Ql,{},n)],[u,c,Re]),[ue,fe]=p.useState(!1),oe=p.useRef(),we=ya(g?`rc-menu-uuid-${g}`:"rc-menu-uuid"),Be=h==="rtl",[Ae,Pe]=ir(P,F),_e=Ae||Ql,ze=(mt,Je=!1)=>{function nt(){Pe(mt),te==null||te(mt)}Je?to.flushSync(nt):nt()},[lt,Ft]=p.useState(_e),gt=p.useRef(!1),[Ye,Ie]=p.useMemo(()=>(m==="inline"||m==="vertical")&&C?["vertical",C]:[m,!1],[m,C]),Ke=Ye==="inline",[De,je]=p.useState(Ye),[qe,Ge]=p.useState(Ie);p.useEffect(()=>{je(Ye),Ge(Ie),gt.current&&(Ke?Pe(lt):ze(Ql))},[Ye,Ie]);const[Ce,Oe]=p.useState(0),ot=Ce>=ce.length-1||De!=="horizontal"||b;p.useEffect(()=>{Ke&&Ft(_e)},[_e]),p.useEffect(()=>(gt.current=!0,()=>{gt.current=!1}),[]);const{registerPath:ut,unregisterPath:wt,refreshOverflowKeys:It,isSubPathKey:Gt,getKeyPath:Nt,getKeys:jt,getSubPathKeys:qt}=TQ(),Ot=p.useMemo(()=>({registerPath:ut,unregisterPath:wt}),[ut,wt]),Vt=p.useMemo(()=>({isSubPathKey:Gt}),[Gt]);p.useEffect(()=>{It(ot?Ql:ce.slice(Ce+1).map(mt=>mt.key))},[Ce,ot]);const[Ve,st]=ir(M||E&&((vt=ce[0])==null?void 0:vt.key),M),Ue=Kh(mt=>{st(mt)}),ke=Kh(()=>{st(void 0)});p.useImperativeHandle(t,()=>({list:oe.current,focus:mt=>{var Tt,wn;const Je=jt(),{elements:nt,key2element:pt,element2key:xt}=hC(Je,we),Ct=cP(oe.current,nt);let kt;Ve&&Je.includes(Ve)?kt=Ve:kt=Ct[0]?xt.get(Ct[0]):(Tt=ce.find(fn=>!fn.props.disabled))==null?void 0:Tt.key;const $t=pt.get(kt);kt&&$t&&((wn=$t==null?void 0:$t.focus)==null||wn.call($t,mt))},findItem:({key:mt})=>{const Je=jt(),{key2element:nt}=hC(Je,we);return nt.get(mt)||null}}));const[q,Q]=ir(L||[],D),ie=p.useMemo(()=>Array.isArray(q)?q:q==null?Ql:[q],[q]),Se=mt=>{if(I){const{key:Je}=mt,nt=ie.includes(Je);let pt;A?nt?pt=ie.filter(Ct=>Ct!==Je):pt=[...ie,Je]:pt=[Je],Q(pt);const xt={...mt,selectedKeys:pt};nt?k==null||k(xt):N==null||N(xt)}!A&&_e.length&&De!=="inline"&&ze(Ql)},Te=Kh(mt=>{J==null||J(pC(mt)),Se(mt)}),We=Kh((mt,Je)=>{let nt=_e.filter(pt=>pt!==mt);if(Je)nt.push(mt);else if(De!=="inline"){const pt=qt(mt);nt=nt.filter(xt=>!pt.has(xt))}no(_e,nt,!0)||ze(nt,!0)}),Qe=EQ(De,Ve,Be,we,oe,jt,Nt,st,(mt,Je)=>{const nt=Je??!_e.includes(mt);We(mt,nt)},Z);p.useEffect(()=>{fe(!0)},[]);const Xe=p.useMemo(()=>({_internalRenderMenuItem:ge,_internalRenderSubMenuItem:ve}),[ge,ve]),at=De!=="horizontal"||b?ce:ce.map((mt,Je)=>p.createElement(Bp,{key:mt.key,overflowDisabled:Je>Ce,classNames:a,styles:o},mt)),ht=p.createElement(sa,L0({id:g,ref:oe,prefixCls:`${n}-overflow`,component:"ul",itemComponent:cg,className:ee(n,`${n}-root`,`${n}-${De}`,i,{[`${n}-inline-collapsed`]:qe,[`${n}-rtl`]:Be},r),dir:h,style:s,role:"menu",tabIndex:l,data:at,renderRawItem:mt=>mt,renderRawRest:mt=>{const Je=mt.length,nt=Je?ce.slice(-Je):null;return p.createElement(Tv,{eventKey:M0,title:H,disabled:ot,internalPopupClose:Je===0,popupClassName:B},nt)},maxCount:De!=="horizontal"||b?sa.INVALIDATE:sa.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:mt=>{Oe(mt)},onKeyDown:Qe},re));return p.createElement(lP.Provider,{value:Xe},p.createElement(k$.Provider,{value:we},p.createElement(Bp,{prefixCls:n,rootClassName:r,classNames:a,styles:o,mode:De,openKeys:_e,rtl:Be,disabled:v,motion:ue?$:null,defaultMotions:ue?_:null,activeKey:Ve,onActive:Ue,onInactive:ke,selectedKeys:ie,inlineIndent:G,subMenuOpenDelay:w,subMenuCloseDelay:S,forceSubMenuRender:x,builtinPlacements:V,triggerSubMenuAction:U,getPopupContainer:Y,itemIcon:W,expandIcon:j,onItemClick:Te,onOpenChange:We,popupRender:ne},p.createElement(V$.Provider,{value:Vt},ht),p.createElement("div",{style:{display:"none"},"aria-hidden":!0},p.createElement($$.Provider,{value:Ot},X)))))}),Fd=VQ;Fd.Item=cg;Fd.SubMenu=Tv;Fd.ItemGroup=pP;Fd.Divider=hP;const K$=p.createContext({});var HQ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"};function O0(){return O0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,O0({},e,{ref:t,icon:HQ})),gP=p.forwardRef(zQ),fC=p.createContext({prefixCls:"",firstLevel:!0,inlineCollapsed:!1,styles:null,classNames:null}),q$=e=>{const{prefixCls:t,className:n,dashed:r,...s}=e,{getPrefixCls:i}=p.useContext(Kt),o=i("menu",t),a=ee({[`${o}-item-divider-dashed`]:!!r},n);return p.createElement(hP,{className:a,...s})},X$=e=>{var E,I;const{className:t,children:n,icon:r,title:s,danger:i,extra:o}=e,{prefixCls:a,firstLevel:l,direction:c,disableMenuItemTitleTooltip:u,tooltip:h,inlineCollapsed:g,styles:m,classNames:C}=p.useContext(fC),v=A=>{var N,k;const L=n==null?void 0:n[0],D=p.createElement("span",{className:ee(`${a}-title-content`,l?C==null?void 0:C.itemContent:(N=C==null?void 0:C.subMenu)==null?void 0:N.itemContent,{[`${a}-title-content-with-extra`]:!!o||o===0}),style:l?m==null?void 0:m.itemContent:(k=m==null?void 0:m.subMenu)==null?void 0:k.itemContent},n);return(!r||p.isValidElement(n)&&n.type==="span")&&n&&A&&l&&typeof L=="string"?p.createElement("div",{className:`${a}-inline-collapsed-noicon`},L.charAt(0)):D},{siderCollapsed:b}=p.useContext(K$);let w=s;typeof s>"u"?w=l?n:"":s===!1&&(w="");const S=h===!1?void 0:h,x=S&&S.title!==void 0?S.title:w,P={...S??null,title:x};!b&&!g&&(P.title=null,P.open=!1);const F=Tr(n).length;let M=p.createElement(cg,{...Vn(e,["title","icon","danger"]),className:ee(l?C==null?void 0:C.item:(E=C==null?void 0:C.subMenu)==null?void 0:E.item,{[`${a}-item-danger`]:i,[`${a}-item-only-child`]:(r?F+1:F)===1},t),style:{...l?m==null?void 0:m.item:(I=m==null?void 0:m.subMenu)==null?void 0:I.item,...e.style},title:typeof s=="string"?s:void 0},Xr(r,A=>{var L,D;return{className:ee(`${a}-item-icon`,l?C==null?void 0:C.itemIcon:(L=C==null?void 0:C.subMenu)==null?void 0:L.itemIcon,A.className),style:{...l?m==null?void 0:m.itemIcon:(D=m==null?void 0:m.subMenu)==null?void 0:D.itemIcon,...A.style}}}),v(g));if(!u&&h!==!1){const A=S&&S.placement?S.placement:c==="rtl"?"left":"right",L=`${a}-inline-collapsed-tooltip`,D=k=>({...k,root:ee(L,k==null?void 0:k.root)}),N=S&&typeof S.classNames=="function"?k=>{const G=S.classNames(k);return D(G)}:D(S==null?void 0:S.classNames);M=p.createElement(bl,{...P,placement:A,classNames:N},M)}return M},mC=p.createContext(null),Y$=p.forwardRef((e,t)=>{const{children:n,...r}=e,s=p.useContext(mC),i=p.useMemo(()=>({...s,...r}),[s,r.prefixCls,r.mode,r.selectable,r.rootClassName]),o=Z6(n),a=va(t,o?Il(n):null);return p.createElement(mC.Provider,{value:i},p.createElement(od,{space:!0},o?p.cloneElement(n,{ref:a}):n))}),WQ=e=>{const{componentCls:t,motionDurationSlow:n,horizontalLineHeight:r,colorSplit:s,lineWidth:i,lineType:o,itemPaddingInline:a}=e;return{[`${t}-horizontal`]:{lineHeight:r,border:0,borderBottom:`${he(i)} ${o} ${s}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${t}-item, ${t}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:a},[`> ${t}-item:hover, > ${t}-item-active, > ${t}-submenu ${t}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${t}-item, ${t}-submenu-title`]:{transition:["border-color","background-color"].map(l=>`${l} ${n}`).join(",")},[`${t}-submenu-arrow`]:{display:"none"}}}},_Q=({componentCls:e,menuArrowOffset:t,calc:n})=>({[`${e}-rtl`]:{direction:"rtl"},[`${e}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${e}-rtl${e}-vertical, ${e}-submenu-rtl ${e}-vertical`]:{[`${e}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(${he(n(t).mul(-1).equal())})`},"&::after":{transform:`rotate(45deg) translateY(${he(t)})`}}}}),c1=e=>ro(e),u1=(e,t)=>{const{componentCls:n,itemColor:r,itemSelectedColor:s,subMenuItemSelectedColor:i,groupTitleColor:o,itemBg:a,subMenuItemBg:l,itemSelectedBg:c,activeBarHeight:u,activeBarWidth:h,activeBarBorderWidth:g,motionDurationSlow:m,motionEaseInOut:C,motionEaseOut:v,itemPaddingInline:b,motionDurationMid:w,itemHoverColor:S,lineType:x,colorSplit:P,itemDisabledColor:F,dangerItemColor:M,dangerItemHoverColor:E,dangerItemSelectedColor:I,dangerItemActiveBg:A,dangerItemSelectedBg:L,popupBg:D,itemHoverBg:N,itemActiveBg:k,menuSubMenuBg:G,horizontalItemSelectedColor:$,horizontalItemSelectedBg:_,horizontalItemBorderRadius:U,horizontalItemHoverBg:V}=e;return{[`${n}-${t}, ${n}-${t} > ${n}`]:{color:r,background:a,[`&${n}-root:focus-visible`]:{...c1(e)},[`${n}-item`]:{"&-group-title, &-extra":{color:o}},[`${n}-submenu-selected > ${n}-submenu-title`]:{color:i},[`${n}-item, ${n}-submenu-title`]:{color:r,[`&:not(${n}-item-disabled):focus-visible`]:{...c1(e)}},[`${n}-item-disabled, ${n}-submenu-disabled`]:{color:`${F} !important`},[`${n}-item:not(${n}-item-selected):not(${n}-submenu-selected)`]:{[`&:hover, > ${n}-submenu-title:hover`]:{color:S}},[`&:not(${n}-horizontal)`]:{[`${n}-item:not(${n}-item-selected)`]:{"&:hover":{backgroundColor:N},"&:active":{backgroundColor:k}},[`${n}-submenu-title`]:{"&:hover":{backgroundColor:N},"&:active":{backgroundColor:k}}},[`${n}-item-danger`]:{color:M,[`&${n}-item:hover`]:{[`&:not(${n}-item-selected):not(${n}-submenu-selected)`]:{color:E}},[`&${n}-item:active`]:{background:A}},[`${n}-item a`]:{"&, &:hover":{color:"inherit"}},[`${n}-item-selected`]:{color:s,[`&${n}-item-danger`]:{color:I},"a, a:hover":{color:"inherit"}},[`& ${n}-item-selected`]:{backgroundColor:c,[`&${n}-item-danger`]:{backgroundColor:L}},[`&${n}-submenu > ${n}`]:{backgroundColor:G},[`&${n}-popup > ${n}`]:{backgroundColor:D},[`&${n}-submenu-popup > ${n}`]:{backgroundColor:D},[`&${n}-horizontal`]:{...t==="dark"?{borderBottom:0}:{},[`> ${n}-item, > ${n}-submenu`]:{top:g,marginTop:e.calc(g).mul(-1).equal(),marginBottom:0,borderRadius:U,"&::after":{position:"absolute",insetInline:b,bottom:0,borderBottom:`${he(u)} solid transparent`,transition:`border-color ${m} ${C}`,content:'""'},"&:hover, &-active, &-open":{background:V,"&::after":{borderBottomWidth:u,borderBottomColor:$}},"&-selected":{color:$,backgroundColor:_,"&:hover":{backgroundColor:_},"&::after":{borderBottomWidth:u,borderBottomColor:$}}}},[`&${n}-root`]:{[`&${n}-inline, &${n}-vertical`]:{borderInlineEnd:`${he(g)} ${x} ${P}`}},[`&${n}-inline`]:{[`${n}-sub${n}-inline`]:{background:l},[`${n}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${he(h)} solid ${s}`,transform:"scaleY(0.0001)",opacity:0,transition:["transform","opacity"].map(W=>`${W} ${w} ${v}`).join(","),content:'""'},[`&${n}-item-danger`]:{"&::after":{borderInlineEndColor:I}}},[`${n}-selected, ${n}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:["transform","opacity"].map(W=>`${W} ${w} ${C}`).join(",")}}}}}},d1=e=>{const{componentCls:t,itemHeight:n,itemMarginInline:r,padding:s,menuArrowSize:i,marginXS:o,itemMarginBlock:a,itemWidth:l,itemPaddingInline:c}=e,u=e.calc(i).add(s).add(o).equal();return{[`${t}-item`]:{position:"relative",overflow:"hidden"},[`${t}-item, ${t}-submenu-title`]:{height:n,lineHeight:he(n),paddingInline:c,overflow:"hidden",textOverflow:"ellipsis",marginInline:r,marginBlock:a,width:l},[`> ${t}-item, > ${t}-submenu > ${t}-submenu-title`]:{height:n,lineHeight:he(n)},[`${t}-item-group-list ${t}-submenu-title, ${t}-submenu-title`]:{paddingInlineEnd:u}}},UQ=e=>{const{componentCls:t,iconCls:n,itemHeight:r,colorTextLightSolid:s,dropdownWidth:i,controlHeightLG:o,motionEaseOut:a,paddingXL:l,itemMarginInline:c,fontSizeLG:u,motionDurationFast:h,motionDurationSlow:g,paddingXS:m,boxShadowSecondary:C,collapsedWidth:v,collapsedIconSize:b}=e,w={height:r,lineHeight:he(r),listStylePosition:"inside",listStyleType:"disc"};return[{[t]:{"&-inline, &-vertical":{[`&${t}-root`]:{boxShadow:"none"},...d1(e)}},[`${t}-submenu-popup`]:{[`${t}-vertical`]:{...d1(e),boxShadow:C}}},{[`${t}-submenu-popup ${t}-vertical${t}-sub`]:{minWidth:i,maxHeight:`calc(100vh - ${he(e.calc(o).mul(2.5).equal())})`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${t}-inline`]:{width:"100%",[`&${t}-root`]:{[`${t}-item, ${t}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${g}`,`background-color ${g}`,`padding ${h} ${a}`].join(","),[`> ${t}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${t}-sub${t}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${t}-submenu > ${t}-submenu-title`]:w,[`& ${t}-item-group-title`]:{paddingInlineStart:l}},[`${t}-item`]:w}},{[`${t}-inline-collapsed`]:{width:v,[`&${t}-root`]:{[`${t}-item, ${t}-submenu ${t}-submenu-title`]:{[`> ${t}-inline-collapsed-noicon`]:{fontSize:u,textAlign:"center"}}},[`> ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-item, > ${t}-item-group > ${t}-item-group-list > ${t}-submenu > ${t}-submenu-title, > ${t}-submenu > ${t}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${he(e.calc(b).div(2).equal())} - ${he(c)})`,textOverflow:"clip",[` ${t}-submenu-arrow, ${t}-submenu-expand-icon `]:{opacity:0},[`${t}-item-icon, ${n}`]:{margin:0,fontSize:b,lineHeight:he(r),"+ span":{display:"inline-block",opacity:0}}},[`${t}-item-icon, ${n}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${t}-item-icon, ${n}`]:{display:"none"},"a, a:hover":{color:s}},[`${t}-item-group-title`]:{...Ro,paddingInline:m}}}]},h1=e=>{const{componentCls:t,motionDurationSlow:n,motionDurationMid:r,motionEaseInOut:s,motionEaseOut:i,iconCls:o,iconSize:a,iconMarginInlineEnd:l}=e;return{[`${t}-item, ${t}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${n}`,`background-color ${n}`,`padding calc(${n} + 0.1s) ${s}`].join(","),[`${t}-item-icon, ${o}`]:{minWidth:a,fontSize:a,transition:[`font-size ${r} ${i}`,`margin ${n} ${s}`,`color ${n}`].join(","),"+ span":{marginInlineStart:l,opacity:1,transition:[`opacity ${n} ${s}`,`margin ${n}`,`color ${n}`].join(",")}},[`${t}-item-icon`]:{...dv()},[`&${t}-item-only-child`]:{[`> ${o}, > ${t}-item-icon`]:{marginInlineEnd:0}}},[`${t}-item-disabled, ${t}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important",cursor:"not-allowed",pointerEvents:"none"},[`> ${t}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},p1=e=>{const{componentCls:t,motionDurationSlow:n,motionEaseInOut:r,borderRadius:s,menuArrowSize:i,menuArrowOffset:o}=e;return{[`${t}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:e.margin,width:i,color:"currentcolor",transform:"translateY(-50%)",transition:["transform","opacity"].map(a=>`${a} ${n}`).join(",")},"&-arrow":{"&::before, &::after":{position:"absolute",width:e.calc(i).mul(.6).equal(),height:e.calc(i).mul(.15).equal(),backgroundColor:"currentcolor",borderRadius:s,transition:["background-color","transform","top","color"].map(a=>`${a} ${n} ${r}`).join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(${he(e.calc(o).mul(-1).equal())})`},"&::after":{transform:`rotate(-45deg) translateY(${he(o)})`}}}}},jQ=e=>{const{antCls:t,componentCls:n,fontSize:r,motionDurationSlow:s,motionDurationMid:i,motionEaseInOut:o,paddingXS:a,padding:l,colorSplit:c,lineWidth:u,zIndexPopup:h,borderRadiusLG:g,subMenuItemBorderRadius:m,menuArrowSize:C,menuArrowOffset:v,lineType:b,groupTitleLineHeight:w,groupTitleFontSize:S}=e;return[{"":{[n]:{...Dp(),"&-hidden":{display:"none"}}},[`${n}-submenu-hidden`]:{display:"none"}},{[n]:{...jn(e),...Dp(),marginBottom:0,paddingInlineStart:0,fontSize:r,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${s} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${n}-item`]:{flex:"none"}},[`${n}-item, ${n}-submenu, ${n}-submenu-title`]:{borderRadius:e.itemBorderRadius},[`${n}-item-group-title`]:{padding:`${he(a)} ${he(l)}`,fontSize:S,lineHeight:w,transition:`all ${s}`},[`&-horizontal ${n}-submenu`]:{transition:["border-color","background-color"].map(x=>`${x} ${s} ${o}`).join(",")},[`${n}-submenu, ${n}-submenu-inline`]:{transition:[`border-color ${s}`,`background-color ${s}`,`padding ${i}`].map(x=>`${x} ${o}`).join(",")},[`${n}-submenu ${n}-sub`]:{cursor:"initial",transition:["background-color","padding"].map(x=>`${x} ${s} ${o}`).join(",")},[`${n}-title-content`]:{transition:`color ${s}`,"&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},[`> ${t}-typography-ellipsis-single-line`]:{display:"inline",verticalAlign:"unset"},[`${n}-item-extra`]:{marginInlineStart:"auto",paddingInlineStart:e.padding}},[`${n}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${n}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:c,borderStyle:b,borderWidth:0,borderTopWidth:u,marginBlock:u,padding:0,"&-dashed":{borderStyle:"dashed"}},...h1(e),[`${n}-item-group`]:{[`${n}-item-group-list`]:{margin:0,padding:0,[`${n}-item, ${n}-submenu-title`]:{paddingInline:`${he(e.calc(r).mul(2).equal())} ${he(l)}`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:h,borderRadius:g,boxShadow:"none",transformOrigin:"0 0",[`&${n}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:0,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'},[`> ${n}`]:{borderRadius:g,...h1(e),...p1(e),[`${n}-item, ${n}-submenu > ${n}-submenu-title`]:{borderRadius:m},[`${n}-submenu-title::after`]:{transition:`transform ${s} ${o}`}}},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:e.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:e.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:e.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:e.paddingXS}},...p1(e),[`&-inline-collapsed ${n}-submenu-arrow, &-inline ${n}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${he(v)})`},"&::after":{transform:`rotate(45deg) translateX(${he(e.calc(v).mul(-1).equal())})`}},[`${n}-submenu-open${n}-submenu-inline > ${n}-submenu-title > ${n}-submenu-arrow`]:{transform:`translateY(${he(e.calc(C).mul(.2).mul(-1).equal())})`,"&::after":{transform:`rotate(-45deg) translateX(${he(e.calc(v).mul(-1).equal())})`},"&::before":{transform:`rotate(45deg) translateX(${he(v)})`}}}},{[`${t}-layout-header`]:{[n]:{lineHeight:"inherit"}}}]},KQ=e=>{const{colorPrimary:t,colorError:n,colorTextDisabled:r,colorErrorBg:s,colorText:i,colorTextDescription:o,colorBgContainer:a,colorFillAlter:l,colorFillContent:c,lineWidth:u,lineWidthBold:h,controlItemBgActive:g,colorBgTextHover:m,controlHeightLG:C,lineHeight:v,colorBgElevated:b,marginXXS:w,padding:S,fontSize:x,controlHeightSM:P,fontSizeLG:F,colorTextLightSolid:M,colorErrorHover:E}=e,I=e.activeBarWidth??0,A=e.activeBarBorderWidth??u,L=e.itemMarginInline??e.marginXXS,D=new Mn(M).setA(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:e.zIndexPopupBase+50,radiusItem:e.borderRadiusLG,itemBorderRadius:e.borderRadiusLG,radiusSubMenuItem:e.borderRadiusSM,subMenuItemBorderRadius:e.borderRadiusSM,colorItemText:i,itemColor:i,colorItemTextHover:i,itemHoverColor:i,colorItemTextHoverHorizontal:t,horizontalItemHoverColor:t,colorGroupTitle:o,groupTitleColor:o,colorItemTextSelected:t,itemSelectedColor:t,subMenuItemSelectedColor:t,colorItemTextSelectedHorizontal:t,horizontalItemSelectedColor:t,colorItemBg:a,itemBg:a,colorItemBgHover:m,itemHoverBg:m,colorItemBgActive:c,itemActiveBg:g,colorSubItemBg:l,subMenuItemBg:l,colorItemBgSelected:g,itemSelectedBg:g,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:I,colorActiveBarHeight:h,activeBarHeight:h,colorActiveBarBorderSize:u,activeBarBorderWidth:A,colorItemTextDisabled:r,itemDisabledColor:r,colorDangerItemText:n,dangerItemColor:n,colorDangerItemTextHover:n,dangerItemHoverColor:n,colorDangerItemTextSelected:n,dangerItemSelectedColor:n,colorDangerItemBgActive:s,dangerItemActiveBg:s,colorDangerItemBgSelected:s,dangerItemSelectedBg:s,itemMarginInline:L,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:C,groupTitleLineHeight:v,collapsedWidth:C*2,popupBg:b,itemMarginBlock:w,itemPaddingInline:S,horizontalLineHeight:`${C*1.15}px`,iconSize:x,iconMarginInlineEnd:P-x,collapsedIconSize:F,groupTitleFontSize:x,darkItemDisabledColor:new Mn(M).setA(.25).toRgbString(),darkItemColor:D,darkDangerItemColor:n,darkItemBg:"#001529",darkPopupBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:M,darkItemSelectedBg:t,darkDangerItemSelectedBg:n,darkItemHoverBg:"transparent",darkGroupTitleColor:D,darkItemHoverColor:M,darkDangerItemHoverColor:E,darkDangerItemSelectedColor:M,darkDangerItemActiveBg:n,itemWidth:I?`calc(100% + ${A}px)`:`calc(100% - ${L*2}px)`}},qQ=(e,t=e,n=!0)=>Ln("Menu",s=>{const{colorBgElevated:i,controlHeightLG:o,fontSize:a,darkItemColor:l,darkDangerItemColor:c,darkItemBg:u,darkSubMenuItemBg:h,darkItemSelectedColor:g,darkItemSelectedBg:m,darkDangerItemSelectedBg:C,darkItemHoverBg:v,darkGroupTitleColor:b,darkItemHoverColor:w,darkItemDisabledColor:S,darkDangerItemHoverColor:x,darkDangerItemSelectedColor:P,darkDangerItemActiveBg:F,popupBg:M,darkPopupBg:E}=s,I=s.calc(a).div(7).mul(5).equal(),A=En(s,{menuArrowSize:I,menuHorizontalHeight:s.calc(o).mul(1.15).equal(),menuArrowOffset:s.calc(I).mul(.25).equal(),menuSubMenuBg:i,calc:s.calc,popupBg:M}),L=En(A,{itemColor:l,itemHoverColor:w,groupTitleColor:b,itemSelectedColor:g,subMenuItemSelectedColor:g,itemBg:u,popupBg:E,subMenuItemBg:h,itemActiveBg:"transparent",itemSelectedBg:m,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:v,itemDisabledColor:S,dangerItemColor:c,dangerItemHoverColor:x,dangerItemSelectedColor:P,dangerItemActiveBg:F,dangerItemSelectedBg:C,menuSubMenuBg:h,horizontalItemSelectedColor:g,horizontalItemSelectedBg:m});return[jQ(A),WQ(A),UQ(A),u1(A,"light"),u1(L,"dark"),_Q(A),MB(A),yl(A,"slide-up"),yl(A,"slide-down"),wv(A,"zoom-big")]},KQ,{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]],injectStyle:n,unitless:{groupTitleLineHeight:!0}})(e,t),Q$=e=>{var v,b,w,S,x,P;const{popupClassName:t,icon:n,title:r,theme:s}=e,i=p.useContext(fC),{prefixCls:o,inlineCollapsed:a,theme:l,classNames:c,styles:u}=i,h=Pd();let g;if(!n)g=a&&!h.length&&r&&typeof r=="string"?p.createElement("div",{className:`${o}-inline-collapsed-noicon`},r.charAt(0)):p.createElement("span",{className:`${o}-title-content`},r);else{const F=p.isValidElement(r)&&r.type==="span";g=p.createElement(p.Fragment,null,Xr(n,M=>({className:ee(M.className,`${o}-item-icon`,c==null?void 0:c.itemIcon),style:{...M.style,...u==null?void 0:u.itemIcon}})),F?r:p.createElement("span",{className:`${o}-title-content`},r))}const m=p.useMemo(()=>({...i,firstLevel:!1}),[i]),[C]=tg("Menu");return p.createElement(fC.Provider,{value:m},p.createElement(Tv,{...Vn(e,["icon"]),title:g,classNames:{list:(v=c==null?void 0:c.subMenu)==null?void 0:v.list,listTitle:(b=c==null?void 0:c.subMenu)==null?void 0:b.itemTitle},styles:{list:(w=u==null?void 0:u.subMenu)==null?void 0:w.list,listTitle:(S=u==null?void 0:u.subMenu)==null?void 0:S.itemTitle},popupClassName:ee(o,t,(x=c==null?void 0:c.popup)==null?void 0:x.root,`${o}-${s||l}`),popupStyle:{zIndex:C,...e.popupStyle,...(P=u==null?void 0:u.popup)==null?void 0:P.root}}))};function Gw(e){return e===null||e===!1}const XQ={item:X$,submenu:Q$,divider:q$},YQ=p.forwardRef((e,t)=>{var ve;const n=p.useContext(mC),r=n||{},{prefixCls:s,className:i,style:o,theme:a="light",expandIcon:l,_internalDisableMenuItemTitleTooltip:c,tooltip:u,inlineCollapsed:h,siderCollapsed:g,rootClassName:m,mode:C,selectable:v,onClick:b,overflowedIndicatorPopupClassName:w,classNames:S,styles:x,...P}=e,{menu:F}=p.useContext(Kt),{getPrefixCls:M,getPopupContainer:E,direction:I,className:A,style:L,classNames:D,styles:N}=Hn("menu"),k=M(),G=Vn(P,["collapsedWidth"]);(ve=r.validator)==null||ve.call(r,{mode:C});const $=Yt((...Re)=>{var ne;b==null||b(...Re),(ne=r.onClick)==null||ne.call(r)}),_=r.mode||C,U=v??r.selectable,V=h??g,W={...e,mode:_,inlineCollapsed:V,selectable:U,theme:a},[j,H]=Kn([D,S],[N,x],{props:W},{popup:{_default:"root"},subMenu:{_default:"item"}}),B={horizontal:{motionName:`${k}-slide-up`},inline:RB(k),other:{motionName:`${k}-zoom-big`}},Y=M("menu",s||r.prefixCls),J=Rs(Y),[te,Z]=qQ(Y,J,!n),ae=ee(`${Y}-${a}`,A,i),de=p.useMemo(()=>{var ne;if(typeof l=="function"||Gw(l))return l||null;if(typeof r.expandIcon=="function"||Gw(r.expandIcon))return r.expandIcon||null;if(typeof(F==null?void 0:F.expandIcon)=="function"||Gw(F==null?void 0:F.expandIcon))return(F==null?void 0:F.expandIcon)||null;const Re=l??(r==null?void 0:r.expandIcon)??(F==null?void 0:F.expandIcon);return Xr(Re,{className:ee(`${Y}-submenu-expand-icon`,p.isValidElement(Re)?(ne=Re.props)==null?void 0:ne.className:void 0)})},[l,r==null?void 0:r.expandIcon,F==null?void 0:F.expandIcon,Y]),ge=p.useMemo(()=>({prefixCls:Y,inlineCollapsed:V||!1,direction:I,firstLevel:!0,theme:a,mode:_,disableMenuItemTitleTooltip:c,tooltip:u,classNames:j,styles:H}),[Y,V,I,c,a,_,j,H,u]);return p.createElement(mC.Provider,{value:null},p.createElement(fC.Provider,{value:ge},p.createElement(Fd,{getPopupContainer:E,overflowedIndicator:p.createElement(gP,null),overflowedIndicatorPopupClassName:ee(Y,`${Y}-${a}`,w),classNames:{list:j.list,listTitle:j.itemTitle},styles:{list:H.list,listTitle:H.itemTitle},mode:_,selectable:U,onClick:$,...G,inlineCollapsed:V,style:{...H.root,...L,...o},className:ae,prefixCls:Y,direction:I,defaultMotions:B,expandIcon:de,ref:t,rootClassName:ee(m,te,r.rootClassName,Z,J,j.root),_internalComponents:XQ})))}),Td=p.forwardRef((e,t)=>{const n=p.useRef(null),r=p.useContext(K$);return p.useImperativeHandle(t,()=>({menu:n.current,focus:s=>{var i;(i=n.current)==null||i.focus(s)}})),p.createElement(YQ,{ref:n,...e,...r})});Td.Item=X$;Td.SubMenu=Q$;Td.Divider=q$;Td.ItemGroup=pP;const QQ=e=>{const{componentCls:t,menuCls:n,colorError:r,colorTextLightSolid:s}=e,i=`${n}-item`;return{[`${t}, ${t}-menu-submenu`]:{[`${n} ${i}`]:{[`&${i}-danger:not(${i}-disabled)`]:{color:r,"&:hover":{color:s,backgroundColor:r}}}}}},ZQ=e=>{const{componentCls:t,menuCls:n,zIndexPopup:r,dropdownArrowDistance:s,sizePopupArrow:i,antCls:o,iconCls:a,motionDurationMid:l,paddingBlock:c,fontSize:u,dropdownEdgeChildPadding:h,colorTextDisabled:g,fontSizeIcon:m,controlPaddingHorizontal:C,colorBgElevated:v}=e;return[{[t]:{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:r,display:"block","&::before":{position:"absolute",insetBlock:e.calc(i).div(2).sub(s).equal(),zIndex:-9999,opacity:1e-4,content:'""'},"&-menu-vertical":{maxHeight:"100vh",overflowY:"auto"},[`&-trigger${o}-btn`]:{[`& > ${a}-down, & > ${o}-btn-icon > ${a}-down`]:{fontSize:m}},[`${t}-wrap`]:{position:"relative",[`${o}-btn > ${a}-down`]:{fontSize:m},[`${a}-down::before`]:{transition:`transform ${l}`}},[`${t}-wrap-open`]:{[`${a}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottomLeft, &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottomLeft, &${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottom, &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottom, &${o}-slide-down-enter${o}-slide-down-enter-active${t}-placement-bottomRight, &${o}-slide-down-appear${o}-slide-down-appear-active${t}-placement-bottomRight`]:{animationName:HE},[`&${o}-slide-up-enter${o}-slide-up-enter-active${t}-placement-topLeft, &${o}-slide-up-appear${o}-slide-up-appear-active${t}-placement-topLeft, &${o}-slide-up-enter${o}-slide-up-enter-active${t}-placement-top, &${o}-slide-up-appear${o}-slide-up-appear-active${t}-placement-top, &${o}-slide-up-enter${o}-slide-up-enter-active${t}-placement-topRight, &${o}-slide-up-appear${o}-slide-up-appear-active${t}-placement-topRight`]:{animationName:WE},[`&${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomLeft, &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottom, &${o}-slide-down-leave${o}-slide-down-leave-active${t}-placement-bottomRight`]:{animationName:zE},[`&${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topLeft, &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-top, &${o}-slide-up-leave${o}-slide-up-leave-active${t}-placement-topRight`]:{animationName:_E}}},I$(e,v,{arrowPlacement:{top:!0,bottom:!0}}),{[`${t} ${n}`]:{position:"relative",margin:0},[`${n}-submenu-popup`]:{position:"absolute",zIndex:r,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${t}, ${t}-menu-submenu`]:{...jn(e),[n]:{padding:h,listStyleType:"none",backgroundColor:v,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,...Fo(e),"&:empty":{padding:0,boxShadow:"none"},[`${n}-item-group-title`]:{padding:`${he(c)} ${he(C)}`,color:e.colorTextDescription,transition:`all ${l}`},[`${n}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${n}-item-icon`]:{minWidth:u,marginInlineEnd:e.marginXS,fontSize:e.fontSizeSM},[`${n}-title-content`]:{flex:"auto","&-with-extra":{display:"inline-flex",alignItems:"center",width:"100%"},"> a":{color:"inherit",transition:`all ${l}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}},[`${n}-item-extra`]:{paddingInlineStart:e.padding,marginInlineStart:"auto",fontSize:e.fontSizeSM,color:e.colorTextDescription}},[`${n}-item, ${n}-submenu-title`]:{display:"flex",margin:0,padding:`${he(c)} ${he(C)}`,color:e.colorText,fontWeight:"normal",fontSize:u,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${l}`,borderRadius:e.borderRadiusSM,"&:hover, &-active":{backgroundColor:e.controlItemBgHover},...Fo(e),"&-selected":{color:e.colorPrimary,backgroundColor:e.controlItemBgActive,"&:hover, &-active":{backgroundColor:e.controlItemBgActiveHover}},"&-disabled":{color:g,cursor:"not-allowed","&:hover":{color:g,backgroundColor:v,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${he(e.marginXXS)} 0`,overflow:"hidden",lineHeight:0,backgroundColor:e.colorSplit},[`${t}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:e.paddingXS,[`${t}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:e.colorIcon,fontSize:m,fontStyle:"normal"}}},[`${n}-item-group-list`]:{margin:`0 ${he(e.marginXS)}`,padding:0,listStyle:"none"},[`${n}-submenu-title`]:{paddingInlineEnd:e.calc(C).add(e.fontSizeSM).equal()},[`${n}-submenu-vertical`]:{position:"relative"},[`${n}-submenu${n}-submenu-disabled ${t}-menu-submenu-title`]:{[`&, ${t}-menu-submenu-arrow-icon`]:{color:g,backgroundColor:v,cursor:"not-allowed"}},[`${n}-submenu-selected ${t}-menu-submenu-title`]:{color:e.colorPrimary}}}},[yl(e,"slide-up"),yl(e,"slide-down"),oC(e,"move-up"),oC(e,"move-down"),wv(e,"zoom-big")]]},JQ=e=>({zIndexPopup:e.zIndexPopupBase+50,paddingBlock:(e.controlHeight-e.fontSize*e.lineHeight)/2,...oP({contentRadius:e.borderRadiusLG,limitVerticalRadius:!0}),...T$(e)}),eZ=Ln("Dropdown",e=>{const{marginXXS:t,sizePopupArrow:n,paddingXXS:r,componentCls:s}=e,i=En(e,{menuCls:`${s}-menu`,dropdownArrowDistance:e.calc(n).div(2).add(t).equal(),dropdownEdgeChildPadding:r});return[ZQ(i),QQ(i)]},JQ,{resetStyle:!1}),ug=e=>{const{menu:t,arrow:n,prefixCls:r,children:s,trigger:i,disabled:o,dropdownRender:a,popupRender:l,getPopupContainer:c,overlayClassName:u,rootClassName:h,overlayStyle:g,open:m,onOpenChange:C,mouseEnterDelay:v=.15,mouseLeaveDelay:b=.1,autoAdjustOverflow:w=!0,placement:S="",transitionName:x,classNames:P,styles:F,destroyPopupOnHide:M,destroyOnHidden:E}=e,{getPrefixCls:I,direction:A,getPopupContainer:L,className:D,style:N,classNames:k,styles:G}=Hn("dropdown"),$={...e,mouseEnterDelay:v,mouseLeaveDelay:b,autoAdjustOverflow:w},[_,U]=Kn([k,P],[G,F],{props:$}),V={...N,...g,...U.root},W=l||a;Sd();const j=p.useMemo(()=>{const Ae=I();return x!==void 0?x:S.includes("top")?`${Ae}-slide-down`:`${Ae}-slide-up`},[I,S,x]),H=p.useMemo(()=>S?S.includes("Center")?S.slice(0,S.indexOf("Center")):S:A==="rtl"?"bottomRight":"bottomLeft",[S,A]),B=I("dropdown",r),Y=Rs(B),[J,te]=eZ(B,Y),[,Z]=ds(),ae=p.Children.only(yQ(s)?p.createElement("span",null,s):s),de=Xr(ae,{className:ee(`${B}-trigger`,{[`${B}-rtl`]:A==="rtl"},ae.props.className),disabled:ae.props.disabled??o}),ge=o?[]:i,ve=!!(ge!=null&&ge.includes("contextMenu")),[Re,ne]=ir(!1,m),re=Yt(Ae=>{C==null||C(Ae,{source:"trigger"}),ne(Ae)}),ce=ee(u,h,J,te,Y,D,_.root,{[`${B}-rtl`]:A==="rtl"}),X=D$({arrowPointAtCenter:typeof n=="object"&&n.pointAtCenter,autoAdjustOverflow:w,offset:Z.marginXXS,arrowWidth:n?Z.sizePopupArrow:0,borderRadius:Z.borderRadius}),ue=Yt(()=>{t!=null&&t.selectable&&(t!=null&&t.multiple)||(C==null||C(!1,{source:"menu"}),ne(!1))}),fe=()=>{const Ae=Vn(_,["root"]),Pe=Vn(U,["root"]);let _e;return t!=null&&t.items&&(_e=p.createElement(Td,{...t,classNames:{...Ae,subMenu:{...Ae}},styles:{...Pe,subMenu:{...Pe}}})),W&&(_e=W(_e)),_e=p.Children.only(typeof _e=="string"?p.createElement("span",null,_e):_e),p.createElement(Y$,{prefixCls:`${B}-menu`,rootClassName:ee(te,Y),expandIcon:p.createElement("span",{className:`${B}-menu-submenu-arrow`},A==="rtl"?p.createElement(R0,{className:`${B}-menu-submenu-arrow-icon`}):p.createElement(jx,{className:`${B}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:ue,validator:({mode:ze})=>{}},_e)},[oe,we]=tg("Dropdown",V.zIndex);let Be=p.createElement(O$,{alignPoint:ve,...Vn(e,["rootClassName","onOpenChange"]),mouseEnterDelay:v,mouseLeaveDelay:b,visible:Re,builtinPlacements:X,arrow:!!n,overlayClassName:ce,prefixCls:B,getPopupContainer:c||L,transitionName:j,trigger:ge,overlay:fe,placement:H,onVisibleChange:re,overlayStyle:{...V,zIndex:oe},autoDestroy:E??M},de);return oe&&(Be=p.createElement(pv.Provider,{value:we},Be)),Be},tZ=YE(ug,"align",void 0,"dropdown",e=>e),nZ=e=>p.createElement(tZ,{...e},p.createElement("span",null));ug._InternalPanelDoNotUseOrYouWillBeFired=nZ;const Mv=({children:e})=>{const{getPrefixCls:t}=p.useContext(Kt),n=t("breadcrumb"),r=p.useContext(aP),{classNames:s,styles:i}=r;return p.createElement("li",{className:ee(`${n}-separator`,s==null?void 0:s.separator),style:i==null?void 0:i.separator,"aria-hidden":"true"},e===""?e:e||"/")};Mv.__ANT_BREADCRUMB_SEPARATOR=!0;function rZ(e,t){if(!qs(e.title))return null;const n=Object.keys(t).join("|");return typeof e.title=="object"?e.title:String(e.title).replace(new RegExp(`:(${n})`,"g"),(r,s)=>t[s]||r)}function Z$(e,t,n,r){if(!qs(n))return null;const{className:s,onClick:i,...o}=t,a={...Mr(o,{data:!0,aria:!0}),onClick:i};return r!==void 0?p.createElement("a",{...a,className:ee(`${e}-link`,s),href:r},n):p.createElement("span",{...a,className:ee(`${e}-link`,s)},n)}function sZ(e,t){return(r,s,i,o,a)=>{if(t)return t(r,s,i,o);const l=rZ(r,s);return Z$(e,r,l,a)}}const J$=e=>{const{prefixCls:t,separator:n="/",children:r,menu:s,dropdownProps:i,href:o,dropdownIcon:a}=e,l=p.useContext(aP),{classNames:c,styles:u}=l,g=(m=>{if(s){const C={...i};if(s){const{items:v,...b}=s||{};C.menu={...b,items:v==null?void 0:v.map(({key:w,title:S,label:x,path:P,...F},M)=>{let E=x??S;return P&&(E=p.createElement("a",{href:`${o}${P}`},E)),{...F,key:w??M,label:E}})}}return p.createElement(ug,{placement:"bottom",...C},p.createElement("span",{className:`${t}-overlay-link`},m,a))}return m})(r);return qs(g)?p.createElement(p.Fragment,null,p.createElement("li",{className:ee(`${t}-item`,c==null?void 0:c.item),style:u==null?void 0:u.item},g),n&&p.createElement(Mv,null,n)):null},eG=e=>{const{prefixCls:t,children:n,href:r,...s}=e,{getPrefixCls:i}=p.useContext(Kt),o=i("breadcrumb",t);return p.createElement(J$,{...s,prefixCls:o},Z$(o,s,n,r))};eG.__ANT_BREADCRUMB_ITEM=!0;const iZ=e=>{const{componentCls:t,iconCls:n,calc:r}=e;return{[t]:{...jn(e),color:e.itemColor,fontSize:e.fontSize,[n]:{fontSize:e.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},[`${t}-item a`]:{color:e.linkColor,transition:`color ${e.motionDurationMid}`,padding:`0 ${he(e.paddingXXS)}`,borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",marginInline:r(e.marginXXS).mul(-1).equal(),"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover},...Fo(e)},[`${t}-item:last-child`]:{color:e.lastItemColor},[`${t}-separator`]:{marginInline:e.separatorMargin,color:e.separatorColor},[`${t}-link`]:{[` > ${n} + span, > ${n} + a `]:{marginInlineStart:e.marginXXS}},[`${t}-overlay-link`]:{borderRadius:e.borderRadiusSM,height:e.fontHeight,display:"inline-block",padding:`0 ${he(e.paddingXXS)}`,marginInline:r(e.marginXXS).mul(-1).equal(),[`> ${n}`]:{marginInlineStart:e.marginXXS,fontSize:e.fontSizeIcon},"&:hover":{color:e.linkHoverColor,backgroundColor:e.colorBgTextHover,a:{color:e.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}}},oZ=e=>({itemColor:e.colorTextDescription,lastItemColor:e.colorText,iconFontSize:e.fontSize,linkColor:e.colorTextDescription,linkHoverColor:e.colorText,separatorColor:e.colorTextDescription,separatorMargin:e.marginXS}),aZ=Ln("Breadcrumb",e=>{const t=En(e,{});return iZ(t)},oZ);function lZ(e){const{breadcrumbName:t,children:n,...r}=e,s={title:t,...r};return n&&(s.menu={items:n.map(({breadcrumbName:i,...o})=>({...o,title:i}))}),s}function cZ(e,t){return p.useMemo(()=>e||(t?t.map(lZ):null),[e,t])}const uZ=(e,t)=>{if(t===void 0)return t;let n=(t||"").replace(/^\//,"");return Object.keys(e).forEach(r=>{n=n.replace(`:${r}`,e[r])}),n},dZ=e=>{const{prefixCls:t,separator:n,style:r,className:s,rootClassName:i,routes:o,items:a,children:l,itemRender:c,params:u={},classNames:h,styles:g,dropdownIcon:m,...C}=e,{getPrefixCls:v,direction:b,className:w,style:S,classNames:x,styles:P,separator:F,dropdownIcon:M}=Hn("breadcrumb"),E=n??F??"/",I=m??M??p.createElement(sP,null);let A;const L=v("breadcrumb",t),[D,N]=aZ(L),k=cZ(a,o),G=p.useMemo(()=>({...e,separator:E}),[e,E]),[$,_]=Kn([x,h],[P,g],{props:G}),U=sZ(L,c);if(k&&k.length>0){const H=[],B=a||o;A=k.map((Y,J)=>{const{path:te,key:Z,type:ae,menu:de,onClick:ge,className:ve,style:Re,separator:ne,dropdownProps:re}=Y,ce=uZ(u,te);ce!==void 0&&H.push(ce);const X=Z??J;if(ae==="separator")return p.createElement(Mv,{key:X},ne);const ue={},fe=J===k.length-1;de&&(ue.menu=de);let{href:oe}=Y;return H.length&&ce!==void 0&&(oe=`#/${H.join("/")}`),p.createElement(J$,{key:X,...ue,...Mr(Y,{data:!0,aria:!0}),className:ve,style:Re,dropdownProps:re,dropdownIcon:I,href:oe,separator:fe?"":E,onClick:ge,prefixCls:L},U(Y,u,B,H,oe))})}else if(l){const H=Tr(l).length;A=Tr(l).map((B,Y)=>{if(!B)return B;const J=Y===H-1;return Xr(B,{separator:J?"":E,key:Y})})}const V=ee(L,w,{[`${L}-rtl`]:b==="rtl"},s,i,$.root,D,N),W={..._.root,...S,...r},j=p.useMemo(()=>({classNames:$,styles:_}),[$,_]);return p.createElement(aP.Provider,{value:j},p.createElement("nav",{className:V,style:W,...C},p.createElement("ol",null,A)))},tG=dZ;tG.Item=eG;tG.Separator=Mv;function hZ(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function pZ(e){return hZ(e).join("_")}const nG=p.createContext(void 0),gZ=nG.Provider,rG=p.createContext(void 0),fZ=rG.Provider;function k0(){return k0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n="rc-checkbox",className:r,style:s,checked:i,disabled:o,defaultChecked:a=!1,type:l="checkbox",title:c,onChange:u,...h}=e,g=p.useRef(null),m=p.useRef(null),[C,v]=ir(a,i);p.useImperativeHandle(t,()=>({focus:S=>{var x;(x=g.current)==null||x.focus(S)},blur:()=>{var S;(S=g.current)==null||S.blur()},input:g.current,nativeElement:m.current}));const b=ee(n,r,{[`${n}-checked`]:C,[`${n}-disabled`]:o}),w=S=>{o||("checked"in e||v(S.target.checked),u==null||u({target:{...e,type:l,checked:S.target.checked},stopPropagation(){S.stopPropagation()},preventDefault(){S.preventDefault()},nativeEvent:S.nativeEvent}))};return p.createElement("span",{className:b,title:c,style:s,ref:m},p.createElement("input",k0({},h,{className:`${n}-input`,ref:g,onChange:w,disabled:o,checked:!!C,type:l})))});function iG(e){const t=K.useRef(null),n=()=>{dn.cancel(t.current),t.current=null};return[()=>{n(),t.current=dn(()=>{t.current=null})},i=>{t.current&&(i.stopPropagation(),n()),e==null||e(i)}]}const mZ=e=>{const{componentCls:t,antCls:n}=e,r=`${t}-group`;return{[r]:{...jn(e),display:"inline-block",fontSize:0,[`&${r}-rtl`]:{direction:"rtl"},[`&${r}-block`]:{display:"flex"},[`${n}-badge ${n}-badge-count`]:{zIndex:1},[`> ${n}-badge:not(:first-child) > ${n}-button-wrapper`]:{borderInlineStart:"none"},"&-vertical":{display:"flex",flexDirection:"column",rowGap:e.marginXS,[`${t}-wrapper`]:{marginInlineEnd:0}}}}},CZ=e=>{const{componentCls:t,wrapperMarginInlineEnd:n,colorPrimary:r,colorPrimaryHover:s,radioSize:i,motionDurationSlow:o,motionDurationMid:a,motionEaseInOutCirc:l,colorBgContainer:c,colorBorder:u,lineWidth:h,colorBgContainerDisabled:g,colorTextDisabled:m,paddingXS:C,dotColorDisabled:v,dotSize:b,lineType:w,radioColor:S,radioBgColor:x}=e;return{[`${t}-wrapper`]:{...jn(e),display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:n,cursor:"pointer","&:last-child":{marginInlineEnd:0},[`&${t}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:e.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},"&-block":{flex:1,justifyContent:"center"},[t]:{...jn(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",boxSizing:"border-box",display:"block",width:`calc(${i} * 1px)`,height:`calc(${i} * 1px)`,backgroundColor:c,border:`${he(h)} ${w} ${u}`,borderRadius:"50%",transition:`all ${a}`,"&:after":{content:'""',position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%) scale(0)",width:`calc(${b} * 1px)`,height:`calc(${b} * 1px)`,backgroundColor:S,borderRadius:"50%",transformOrigin:"50% 50%",opacity:0,transition:`all ${o} ${l}`},[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:ro(e)},[`&:hover ${t}`]:{borderColor:r},[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:s,borderColor:"transparent"},[`${t}-checked`]:{backgroundColor:x,borderColor:r,"&::after":{transform:"translate(-50%, -50%)",opacity:1}},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},background:g,borderColor:u,"&::after":{backgroundColor:v}},[`${t}-disabled + span`]:{color:m,cursor:"not-allowed"},[`span${t} + *`]:{paddingInlineStart:C,paddingInlineEnd:C}}}},vZ=e=>{const{buttonColor:t,controlHeight:n,componentCls:r,lineWidth:s,lineType:i,colorBorder:o,motionDurationMid:a,buttonPaddingInline:l,fontSize:c,buttonBg:u,fontSizeLG:h,controlHeightLG:g,controlHeightSM:m,paddingXS:C,borderRadius:v,borderRadiusSM:b,borderRadiusLG:w,buttonCheckedBg:S,buttonSolidCheckedColor:x,colorTextDisabled:P,colorBgContainerDisabled:F,buttonCheckedBgDisabled:M,buttonCheckedColorDisabled:E,colorPrimary:I,colorPrimaryHover:A,colorPrimaryActive:L,buttonSolidCheckedBg:D,buttonSolidCheckedHoverBg:N,buttonSolidCheckedActiveBg:k,calc:G}=e;return{[`${r}-button-wrapper`]:{position:"relative",display:"inline-block",height:n,margin:0,paddingInline:l,paddingBlock:0,color:t,fontSize:c,lineHeight:he(G(n).sub(G(s).mul(2)).equal()),background:u,border:`${he(s)} ${i} ${o}`,borderBlockStartWidth:G(s).add(.02).equal(),borderInlineEndWidth:s,cursor:"pointer",transition:["color","background-color","box-shadow"].map($=>`${$} ${a}`).join(","),a:{color:t},[`> ${r}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:last-child)":{marginInlineEnd:G(s).mul(-1).equal()},"&:first-child":{borderInlineStart:`${he(s)} ${i} ${o}`,borderStartStartRadius:v,borderEndStartRadius:v},"&:last-child":{borderStartEndRadius:v,borderEndEndRadius:v},"&:first-child:last-child":{borderRadius:v},[`${r}-group-large &`]:{height:g,fontSize:h,lineHeight:he(G(g).sub(G(s).mul(2)).equal()),"&:first-child":{borderStartStartRadius:w,borderEndStartRadius:w},"&:last-child":{borderStartEndRadius:w,borderEndEndRadius:w}},[`${r}-group-small &`]:{height:m,paddingInline:G(C).sub(s).equal(),paddingBlock:0,lineHeight:he(G(m).sub(G(s).mul(2)).equal()),"&:first-child":{borderStartStartRadius:b,borderEndStartRadius:b},"&:last-child":{borderStartEndRadius:b,borderEndEndRadius:b}},"&:hover":{position:"relative",color:I},"&:has(:focus-visible)":ro(e),[`${r}, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${r}-button-wrapper-disabled)`]:{zIndex:1,color:I,background:S,borderColor:I,"&::before":{backgroundColor:I},"&:first-child":{borderColor:I},"&:hover":{color:A,borderColor:A,"&::before":{backgroundColor:A}},"&:active":{color:L,borderColor:L,"&::before":{backgroundColor:L}}},[`${r}-group-solid &-checked:not(${r}-button-wrapper-disabled)`]:{color:x,background:D,borderColor:D,"&:hover":{color:x,background:N,borderColor:N},"&:active":{color:x,background:k,borderColor:k}},"&-disabled":{color:P,backgroundColor:F,borderColor:o,cursor:"not-allowed","&:first-child, &:hover":{color:P,backgroundColor:F,borderColor:o}},[`&-disabled${r}-button-wrapper-checked`]:{color:E,backgroundColor:M,borderColor:o,boxShadow:"none"},"&-block":{flex:1,textAlign:"center"}}}},yZ=e=>{const{wireframe:t,padding:n,marginXS:r,lineWidth:s,fontSizeLG:i,colorText:o,colorBgContainer:a,colorTextDisabled:l,controlItemBgActiveDisabled:c,colorTextLightSolid:u,colorPrimary:h,colorPrimaryHover:g,colorPrimaryActive:m,colorWhite:C}=e,v=4,b=i,w=t?b-v*2:b-(v+s)*2;return{radioSize:b,dotSize:w,dotColorDisabled:l,buttonSolidCheckedColor:u,buttonSolidCheckedBg:h,buttonSolidCheckedHoverBg:g,buttonSolidCheckedActiveBg:m,buttonBg:a,buttonCheckedBg:a,buttonColor:o,buttonCheckedBgDisabled:c,buttonCheckedColorDisabled:l,buttonPaddingInline:n-s,wrapperMarginInlineEnd:r,radioColor:t?h:C,radioBgColor:t?a:h}},oG=Ln("Radio",e=>{const{controlOutline:t,controlOutlineWidth:n}=e,r=`0 0 0 ${he(n)} ${t}`,i=En(e,{radioFocusShadow:r,radioButtonFocusShadow:r});return[mZ(i),CZ(i),vZ(i)]},yZ,{unitless:{radioSize:!0,dotSize:!0}}),bZ=(e,t)=>{const n=p.useContext(nG),r=p.useContext(rG),{getPrefixCls:s,direction:i,className:o,style:a,classNames:l,styles:c}=Hn("radio"),u=p.useRef(null),h=xs(t,u),{isFormItemInput:g}=p.useContext(Di),m=B=>{var Y,J;(Y=e.onChange)==null||Y.call(e,B),(J=n==null?void 0:n.onChange)==null||J.call(n,B)},{prefixCls:C,className:v,rootClassName:b,children:w,style:S,title:x,classNames:P,styles:F,...M}=e,E=s("radio",C),I=((n==null?void 0:n.optionType)||r)==="button",A=I?`${E}-button`:E,L=Rs(E),[D,N]=oG(E,L),k={...M},G=p.useContext(so);let $=k.checked;n&&(k.name=n.name,k.onChange=m,$=e.value===n.value,k.disabled=k.disabled??n.disabled),k.disabled=k.disabled??G;const _={...e,...k,checked:$},[U,V]=Kn([l,P],[c,F],{props:_}),W=ee(`${A}-wrapper`,{[`${A}-wrapper-checked`]:$,[`${A}-wrapper-disabled`]:k.disabled,[`${A}-wrapper-rtl`]:i==="rtl",[`${A}-wrapper-in-form-item`]:g,[`${A}-wrapper-block`]:!!(n!=null&&n.block)},o,v,b,U.root,D,N,L),[j,H]=iG(k.onClick);return p.createElement(VE,{component:"Radio",disabled:k.disabled},p.createElement("label",{className:W,style:{...V.root,...a,...S},onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,title:x,onClick:j},p.createElement(sG,{...k,checked:$,className:ee(U.icon,{[vv]:!I}),style:V.icon,type:"radio",prefixCls:A,ref:h,onClick:H}),w!==void 0?p.createElement("span",{className:ee(`${A}-label`,U.label),style:V.label},w):null))},CC=p.forwardRef(bZ),wZ=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=p.useContext(Kt),{name:s}=p.useContext(Di),i=ya(pZ(s)),{prefixCls:o,className:a,rootClassName:l,options:c,buttonStyle:u="outline",disabled:h,children:g,size:m,style:C,id:v,optionType:b,name:w=i,defaultValue:S,value:x,block:P=!1,onChange:F,onMouseEnter:M,onMouseLeave:E,onFocus:I,onBlur:A,orientation:L,vertical:D,role:N="radiogroup"}=e,[k,G]=ir(S,x),$=p.useCallback(Z=>{const ae=k,de=Z.target.value;"value"in e||G(de),de!==ae&&(F==null||F(Z))},[k,G,F]),_=n("radio",o),U=`${_}-group`,V=Rs(_),[W,j]=oG(_,V);let H=g;c&&c.length>0&&(H=c.map(Z=>typeof Z=="string"||typeof Z=="number"?p.createElement(CC,{key:Z.toString(),prefixCls:_,disabled:h,value:Z,checked:k===Z},Z):p.createElement(CC,{key:`radio-group-value-options-${Z.value}`,prefixCls:_,disabled:Z.disabled||h,value:Z.value,checked:k===Z.value,title:Z.title,style:Z.style,className:Z.className,id:Z.id,required:Z.required},Z.label)));const B=Oi(m),[,Y]=GE(L,D),J=ee(U,`${U}-${u}`,{[`${U}-${B}`]:B,[`${U}-rtl`]:r==="rtl",[`${U}-block`]:P},a,l,W,j,V),te=p.useMemo(()=>({onChange:$,value:k,disabled:h,name:w,optionType:b,block:P}),[$,k,h,w,b,P]);return p.createElement("div",{...Mr(e,{aria:!0,data:!0}),role:N,className:ee(J,{[`${_}-group-vertical`]:Y}),style:C,onMouseEnter:M,onMouseLeave:E,onFocus:I,onBlur:A,id:v,ref:t},p.createElement(gZ,{value:te},H))}),SZ=p.memo(wZ),xZ=(e,t)=>{const{getPrefixCls:n}=p.useContext(Kt),{prefixCls:r,...s}=e,i=n("radio",r);return p.createElement(fZ,{value:"button"},p.createElement(CC,{prefixCls:i,...s,type:"radio",ref:t}))},RZ=p.forwardRef(xZ),dg=CC;dg.Button=RZ;dg.Group=SZ;dg.__ANT_RADIO=!0;function hg(e){return En(e,{inputAffixPadding:e.paddingXXS})}const pg=e=>{const{controlHeight:t,fontSize:n,lineHeight:r,lineWidth:s,controlHeightSM:i,controlHeightLG:o,fontSizeLG:a,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:h,colorFillAlter:g,colorPrimaryHover:m,colorPrimary:C,controlOutlineWidth:v,controlOutline:b,colorErrorOutline:w,colorWarningOutline:S,colorBgContainer:x,inputFontSize:P,inputFontSizeLG:F,inputFontSizeSM:M}=e,E=P||n,I=M||E,A=F||a,L=Math.round((t-E*r)/2*10)/10-s,D=Math.round((i-I*r)/2*10)/10-s,N=Math.ceil((o-A*l)/2*10)/10-s;return{paddingBlock:Math.max(L,0),paddingBlockSM:Math.max(D,0),paddingBlockLG:Math.max(N,0),paddingInline:c-s,paddingInlineSM:u-s,paddingInlineLG:h-s,addonBg:g,activeBorderColor:C,hoverBorderColor:m,activeShadow:`0 0 0 ${v}px ${b}`,errorActiveShadow:`0 0 0 ${v}px ${w}`,warningActiveShadow:`0 0 0 ${v}px ${S}`,hoverBg:x,activeBg:x,inputFontSize:E,inputFontSizeLG:A,inputFontSizeSM:I}},EZ=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),Iv=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])":{...EZ(En(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled}))}}),fP=(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}}),g1=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...fP(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}},[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),PZ=(e,t)=>({"&-outlined":{...fP(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow}),[`&${e.componentCls}-disabled, &[disabled]`]:{...Iv(e)},...g1(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...g1(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),f1=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),FZ=e=>({"&-outlined":{[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},...f1(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText}),...f1(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText}),[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:{...Iv(e)}}}}),TZ=(e,t)=>{const{componentCls:n}=e;return{"&-borderless":{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}}},aG=(e,t)=>({background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(t==null?void 0:t.inputColor)??"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}),m1=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...aG(e,t),[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}}),MZ=(e,t)=>({"&-filled":{...aG(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,inputColor:e.colorText}),[`&${e.componentCls}-disabled, &[disabled]`]:{...Iv(e)},...m1(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError}),...m1(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning}),...t}}),C1=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),IZ=e=>({"&-filled":{[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}},...C1(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText}),...C1(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:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}}}),lG=(e,t)=>({background:e.colorBgContainer,borderWidth:`${he(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}}),v1=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:{...lG(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`}}),DZ=(e,t)=>({"&-underlined":{...lG(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"},...v1(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError}),...v1(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning}),...t}}),AZ=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),mP=e=>{const{paddingBlockLG:t,lineHeightLG:n,borderRadiusLG:r,paddingInlineLG:s}=e;return{padding:`${he(t)} ${he(s)}`,fontSize:e.inputFontSizeLG,lineHeight:n,borderRadius:r}},CP=e=>({padding:`${he(e.paddingBlockSM)} ${he(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),vP=(e,t={})=>({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${he(e.paddingBlock)} ${he(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`,...AZ(e.colorTextPlaceholder),"&-lg":{...mP(e),...t.largeStyle},"&-sm":{...CP(e),...t.smallStyle},"&-rtl, &-textarea-rtl":{direction:"rtl"}}),LZ=e=>{const{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`]:{...mP(e)},[`&-sm ${t}, &-sm > ${t}-group-addon`]:{...CP(e)},[`&-lg ${n}-select-single`]:{height:e.controlHeightLG},[`&-sm ${n}-select-single`]:{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 ${he(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${n}-select`]:{margin:`${he(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${he(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${n}-select-single:not(${n}-select-customize-input):not(${n}-pagination-size-changer)`]:{backgroundColor:"inherit",border:`${he(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}},[`${n}-cascader-picker`]:{margin:`-9px ${he(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}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${n}-select`]:{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`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0},"&:not(:first-child)":{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:{display:"block",...Dp(),[`${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-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-auto-complete:first-child ${t}, & > ${n}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, & > ${n}-select:last-child, & > ${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`]:{}}}}},OZ=e=>{const{componentCls:t,controlHeightSM:n,lineWidth:r,calc:s}=e,o=s(n).sub(s(r).mul(2)).sub(16).div(2).equal();return{[t]:{...jn(e),...vP(e),...PZ(e),...MZ(e),...TZ(e),...DZ(e),'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:n,paddingTop:o,paddingBottom:o}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}}}},kZ=e=>{const{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 ${he(e.inputAffixPadding)}`}}}},NZ=e=>{const{componentCls:t,inputAffixPadding:n,colorTextDescription:r,motionDurationSlow:s,colorIcon:i,colorIconHover:o,iconCls:a}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[l]:{...vP(e),display:"inline-flex","&-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}},...kZ(e),[`${a}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${s}`,"&:hover":{color:o}}},[`${t}-underlined`]:{borderRadius:0},[c]:{[`${a}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},BZ=e=>{const{componentCls:t,borderRadiusLG:n,borderRadiusSM:r}=e;return{[`${t}-group`]:{...jn(e),...LZ(e),"&-rtl":{direction:"rtl"},"&-wrapper":{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}},...FZ(e),...IZ(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}}}}}},$Z=e=>{const{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},cG=Ln(["Input","Shared"],e=>{const t=En(e,hg(e));return[OZ(t),NZ(t)]},pg,{resetFont:!1}),uG=Ln(["Input","Component"],e=>{const t=En(e,hg(e));return[BZ(t),$Z(t),Sv(t,{focus:!0,focusElCls:`${t.componentCls}-affix-wrapper-focused`})]},pg,{resetFont:!1});var GZ={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};function N0(){return N0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,N0({},e,{ref:t,icon:GZ})),HZ=p.forwardRef(VZ);var Dh={exports:{}},y1;function zZ(){if(y1)return Dh.exports;y1=1,Dh.exports=r,Dh.exports.isMobile=r,Dh.exports.default=r;const e=/(android|bb\d+|meego).+mobile|armv7l|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|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,n=/android|ipad|playbook|silk/i;function r(s){s||(s={});let i=s.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return!1;let o=e.test(i)&&!t.test(i)||!!s.tablet&&n.test(i);return!o&&s.tablet&&s.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(o=!0),o}return Dh.exports}var WZ=zZ();const _Z=rv(WZ);let Vw;const UZ=(()=>(typeof Vw>"u"&&(Vw=_Z()),Vw)),yP=p.createContext(null),jZ=e=>{const{activeTabOffset:t,horizontal:n,rtl:r,indicator:s={}}=e,{size:i,align:o="center"}=s,[a,l]=p.useState(),c=p.useRef(),u=K.useCallback(g=>typeof i=="function"?i(g):typeof i=="number"?i:g,[i]);function h(){dn.cancel(c.current)}return p.useEffect(()=>{const g={};if(t)if(n){g.width=u(t.width);const m=r?"right":"left";o==="start"&&(g[m]=t[m]),o==="center"&&(g[m]=t[m]+t.width/2,g.transform=r?"translateX(50%)":"translateX(-50%)"),o==="end"&&(g[m]=t[m]+t.width,g.transform="translateX(-100%)")}else g.height=u(t.height),o==="start"&&(g.top=t.top),o==="center"&&(g.top=t.top+t.height/2,g.transform="translateY(-50%)"),o==="end"&&(g.top=t.top+t.height,g.transform="translateY(-100%)");return h(),c.current=dn(()=>{a&&g&&Object.keys(g).every(C=>{const v=g[C],b=a[C];return typeof v=="number"&&typeof b=="number"?Math.round(v)===Math.round(b):v===b})||l(g)}),h},[JSON.stringify(t),n,r,o,u]),{style:a}},b1={width:0,height:0,left:0,top:0};function KZ(e,t,n){return p.useMemo(()=>{var o,a;const r=new Map,s=t.get((o=e[0])==null?void 0:o.key)||b1,i=s.left+s.width;for(let l=0;lr.key).join("_"),t,n])}function w1(e,t){const n=p.useRef(e),[,r]=p.useState({});function s(i){const o=typeof i=="function"?i(n.current):i;o!==n.current&&t(o,n.current),n.current=o,r({})}return[n.current,s]}const qZ=.1,S1=.01,Lm=20,x1=.995**Lm;function XZ(e,t){const[n,r]=p.useState(),[s,i]=p.useState(0),[o,a]=p.useState(0),[l,c]=p.useState(),u=p.useRef();function h(w){const{screenX:S,screenY:x}=w.touches[0];r({x:S,y:x}),window.clearInterval(u.current)}function g(w){if(!n)return;const{screenX:S,screenY:x}=w.touches[0];r({x:S,y:x});const P=S-n.x,F=x-n.y;t(P,F);const M=Date.now();i(M),a(M-s),c({x:P,y:F})}function m(){if(n&&(r(null),c(null),l)){const w=l.x/o,S=l.y/o,x=Math.abs(w),P=Math.abs(S);if(Math.max(x,P){if(Math.abs(F)M?(P=S,C.current="x"):(P=x,C.current="y"),t(-P,-P)&&w.preventDefault()}const b=p.useRef(null);b.current={onTouchStart:h,onTouchMove:g,onTouchEnd:m,onWheel:v},p.useEffect(()=>{function w(F){b.current.onTouchStart(F)}function S(F){b.current.onTouchMove(F)}function x(F){b.current.onTouchEnd(F)}function P(F){b.current.onWheel(F)}return document.addEventListener("touchmove",S,{passive:!1}),document.addEventListener("touchend",x,{passive:!0}),e.current.addEventListener("touchstart",w,{passive:!0}),e.current.addEventListener("wheel",P,{passive:!1}),()=>{document.removeEventListener("touchmove",S),document.removeEventListener("touchend",x)}},[])}function dG(e){const[t,n]=p.useState(0),r=p.useRef(0),s=p.useRef();return s.current=e,U6(()=>{var i;(i=s.current)==null||i.call(s)},[t]),()=>{r.current===t&&(r.current+=1,n(r.current))}}function YZ(e){const t=p.useRef([]),[,n]=p.useState({}),r=p.useRef(typeof e=="function"?e():e),s=dG(()=>{let o=r.current;t.current.forEach(a=>{o=a(o)}),t.current=[],r.current=o,n({})});function i(o){t.current.push(o),s()}return[r.current,i]}const R1={width:0,height:0,left:0,top:0,right:0};function QZ(e,t,n,r,s,i,{tabs:o,tabPosition:a,rtl:l}){let c,u,h;return["top","bottom"].includes(a)?(c="width",u=l?"right":"left",h=Math.abs(n)):(c="height",u="top",h=-n),p.useMemo(()=>{if(!o.length)return[0,0];const g=o.length;let m=g;for(let v=0;vMath.floor(h+t)){m=v-1;break}}let C=0;for(let v=g-1;v>=0;v-=1)if((e.get(o[v].key)||R1)[u]m?[0,-1]:[C,m]},[e,t,r,s,i,h,a,o.map(g=>g.key).join("_"),l])}function E1(e){let t;return e instanceof Map?(t={},e.forEach((n,r)=>{t[r]=n})):t=e,JSON.stringify(t)}const ZZ="TABS_DQ";function hG(e){return String(e).replace(/"/g,ZZ)}function bP(e,t,n,r){return!(!n||r||e===!1||e===void 0&&(t===!1||t===null))}const pG=p.forwardRef((e,t)=>{const{prefixCls:n,editable:r,locale:s,style:i}=e;return!r||r.showAdd===!1?null:p.createElement("button",{ref:t,type:"button",className:`${n}-nav-add`,style:i,"aria-label":(s==null?void 0:s.addAriaLabel)||"Add tab",onClick:o=>{r.onEdit("add",{event:o})}},r.addIcon||"+")}),P1=p.forwardRef((e,t)=>{const{position:n,prefixCls:r,extra:s}=e;if(!s)return null;let i,o={};return typeof s=="object"&&!p.isValidElement(s)?o=s:o.right=s,n==="right"&&(i=o.right),n==="left"&&(i=o.left),i?p.createElement("div",{className:`${r}-extra-content`,ref:t},i):null});function B0(){return B0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,id:r,tabs:s,locale:i,mobile:o,more:a={},style:l,className:c,editable:u,tabBarGutter:h,rtl:g,removeAriaLabel:m,onTabClick:C,getPopupContainer:v,popupClassName:b,popupStyle:w}=e,[S,x]=p.useState(!1),[P,F]=p.useState(null),{icon:M="More"}=a,E=`${r}-more-popup`,I=`${n}-dropdown`,A=P!==null?`${E}-${P}`:null,L=i==null?void 0:i.dropdownAriaLabel;function D(V,W){V.preventDefault(),V.stopPropagation(),u.onEdit("remove",{key:W,event:V})}const N=p.createElement(Fd,{onClick:({key:V,domEvent:W})=>{C(V,W),x(!1)},prefixCls:`${I}-menu`,id:E,tabIndex:-1,role:"listbox","aria-activedescendant":A,selectedKeys:[P],"aria-label":L!==void 0?L:"expanded dropdown"},s.map(V=>{const{closable:W,disabled:j,closeIcon:H,key:B,label:Y}=V,J=bP(W,H,u,j);return p.createElement(cg,{key:B,id:`${E}-${B}`,role:"option","aria-controls":r&&`${r}-panel-${B}`,disabled:j},p.createElement("span",null,Y),J&&p.createElement("button",{type:"button","aria-label":m||"remove",tabIndex:0,className:`${I}-menu-item-remove`,onClick:te=>{te.stopPropagation(),D(te,B)}},H||u.removeIcon||"×"))}));function k(V){const W=s.filter(B=>!B.disabled);let j=W.findIndex(B=>B.key===P)||0;const H=W.length;for(let B=0;B{const V=document.getElementById(A);V!=null&&V.scrollIntoView&&V.scrollIntoView(!1)},[A,P]),p.useEffect(()=>{S||F(null)},[S]);const $={marginInlineStart:h};s.length||($.visibility="hidden",$.order=1);const _=ee(b,{[`${I}-rtl`]:g}),U=o?null:p.createElement(O$,B0({prefixCls:I,overlay:N,visible:s.length?S:!1,onVisibleChange:x,overlayClassName:_,overlayStyle:w,mouseEnterDelay:.1,mouseLeaveDelay:.1,getPopupContainer:v},a),p.createElement("button",{type:"button",className:`${n}-nav-more`,style:$,"aria-haspopup":"listbox","aria-controls":E,id:`${r}-more`,"aria-expanded":S,onKeyDown:G},M));return p.createElement("div",{className:ee(`${n}-nav-operations`,c),style:l,ref:t},U,p.createElement(pG,{prefixCls:n,locale:i,editable:u}))}),eJ=p.memo(JZ,(e,t)=>t.tabMoving),tJ=e=>{const{prefixCls:t,id:n,active:r,focus:s,tab:{key:i,label:o,disabled:a,closeIcon:l,icon:c},closable:u,renderWrapper:h,removeAriaLabel:g,editable:m,onClick:C,onFocus:v,onBlur:b,onKeyDown:w,onMouseDown:S,onMouseUp:x,style:P,className:F,tabCount:M,currentPosition:E}=e,I=`${t}-tab`,A=bP(u,l,m,a);function L($){a||C($)}function D($){$.preventDefault(),$.stopPropagation(),m.onEdit("remove",{key:i,event:$})}const N=p.useMemo(()=>c&&typeof o=="string"?p.createElement("span",null,o):o,[o,c]),k=p.useRef(null);p.useEffect(()=>{s&&k.current&&k.current.focus()},[s]);const G=p.createElement("div",{key:i,"data-node-key":hG(i),className:ee(I,F,{[`${I}-with-remove`]:A,[`${I}-active`]:r,[`${I}-disabled`]:a,[`${I}-focus`]:s}),style:P,onClick:L},p.createElement("div",{ref:k,role:"tab","aria-selected":r,id:n&&`${n}-tab-${i}`,className:`${I}-btn`,"aria-controls":n&&`${n}-panel-${i}`,"aria-disabled":a,tabIndex:a?null:r?0:-1,onClick:$=>{$.stopPropagation(),L($)},onKeyDown:w,onMouseDown:S,onMouseUp:x,onFocus:v,onBlur:b},s&&p.createElement("div",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},`Tab ${E} of ${M}`),c&&p.createElement("span",{className:`${I}-icon`},c),o&&N),A&&p.createElement("button",{type:"button","aria-label":g||"remove",tabIndex:r?0:-1,className:`${I}-remove`,onClick:$=>{$.stopPropagation(),D($)}},l||m.removeIcon||"×"));return h?h(G):G};function $0(){return $0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{offsetWidth:n,offsetHeight:r,offsetTop:s,offsetLeft:i}=e,{width:o,height:a,left:l,top:c}=e.getBoundingClientRect();return Math.abs(o-n)<1?[o,a,l-t.left,c-t.top]:[n,r,i,s]},Ou=e=>{const{offsetWidth:t=0,offsetHeight:n=0}=e.current||{};if(e.current){const{width:r,height:s}=e.current.getBoundingClientRect();if(Math.abs(r-t)<1)return[r,s]}return[t,n]},Zf=(e,t)=>e[t?0:1],F1=p.forwardRef((e,t)=>{const{className:n,style:r,id:s,animated:i,activeKey:o,rtl:a,extra:l,editable:c,locale:u,tabPosition:h,tabBarGutter:g,children:m,onTabClick:C,onTabScroll:v,indicator:b,classNames:w,styles:S}=e,{prefixCls:x,tabs:P}=p.useContext(yP),F=p.useRef(null),M=p.useRef(null),E=p.useRef(null),I=p.useRef(null),A=p.useRef(null),L=p.useRef(null),D=p.useRef(null),N=h==="top"||h==="bottom",[k,G]=w1(0,(ke,q)=>{N&&v&&v({direction:ke>q?"left":"right"})}),[$,_]=w1(0,(ke,q)=>{!N&&v&&v({direction:ke>q?"top":"bottom"})}),[U,V]=p.useState([0,0]),[W,j]=p.useState([0,0]),[H,B]=p.useState([0,0]),[Y,J]=p.useState([0,0]),[te,Z]=YZ(new Map),ae=KZ(P,te,W[0]),de=Zf(U,N),ge=Zf(W,N),ve=Zf(H,N),Re=Zf(Y,N),ne=Math.floor(de)ue?ue:ke}const oe=p.useRef(null),[we,Be]=p.useState();function Ae(){Be(Date.now())}function Pe(){oe.current&&clearTimeout(oe.current)}XZ(I,(ke,q)=>{function Q(ie,Se){ie(Te=>fe(Te+Se))}return ne?(N?Q(G,ke):Q(_,q),Pe(),Ae(),!0):!1}),p.useEffect(()=>(Pe(),we&&(oe.current=setTimeout(()=>{Be(0)},100)),Pe),[we]);const[_e,ze]=QZ(ae,re,N?k:$,ge,ve,Re,{...e,tabs:P}),lt=Yt((ke=o)=>{const q=ae.get(ke)||{width:0,height:0,left:0,right:0,top:0};if(N){let Q=k;a?q.rightk+re&&(Q=q.right+q.width-re):q.left<-k?Q=-q.left:q.left+q.width>-k+re&&(Q=-(q.left+q.width-re)),_(0),G(fe(Q))}else{let Q=$;q.top<-$?Q=-q.top:q.top+q.height>-$+re&&(Q=-(q.top+q.height-re)),G(0),_(fe(Q))}}),[Ft,gt]=p.useState(),[Ye,Ie]=p.useState(!1),Ke=P.filter(ke=>!ke.disabled).map(ke=>ke.key),De=ke=>{const q=Ke.indexOf(Ft||o),Q=Ke.length,ie=(q+ke+Q)%Q,Se=Ke[ie];gt(Se)},je=(ke,q)=>{const Q=Ke.indexOf(ke),ie=P.find(Te=>Te.key===ke);bP(ie==null?void 0:ie.closable,ie==null?void 0:ie.closeIcon,c,ie==null?void 0:ie.disabled)&&(q.preventDefault(),q.stopPropagation(),c.onEdit("remove",{key:ke,event:q}),Q===Ke.length-1?De(-1):De(1))},qe=(ke,q)=>{Ie(!0),q.button===1&&je(ke,q)},Ge=ke=>{const{code:q}=ke,Q=a&&N,ie=Ke[0],Se=Ke[Ke.length-1];switch(q){case"ArrowLeft":{N&&De(Q?1:-1);break}case"ArrowRight":{N&&De(Q?-1:1);break}case"ArrowUp":{ke.preventDefault(),N||De(-1);break}case"ArrowDown":{ke.preventDefault(),N||De(1);break}case"Home":{ke.preventDefault(),gt(ie);break}case"End":{ke.preventDefault(),gt(Se);break}case"Enter":case"Space":{ke.preventDefault(),C(Ft??o,ke);break}case"Backspace":case"Delete":{je(Ft,ke);break}}},Ce={};N?Ce.marginInlineStart=g:Ce.marginTop=g;const Oe=P.map((ke,q)=>{const{key:Q}=ke;return p.createElement(tJ,{id:s,prefixCls:x,key:Q,tab:ke,className:w==null?void 0:w.item,style:q===0?S==null?void 0:S.item:{...Ce,...S==null?void 0:S.item},closable:ke.closable,editable:c,active:Q===o,focus:Q===Ft,renderWrapper:m,removeAriaLabel:u==null?void 0:u.removeAriaLabel,tabCount:Ke.length,currentPosition:q+1,onClick:ie=>{C(Q,ie)},onKeyDown:Ge,onFocus:()=>{Ye||gt(Q),lt(Q),Ae(),I.current&&(a||(I.current.scrollLeft=0),I.current.scrollTop=0)},onBlur:()=>{gt(void 0)},onMouseDown:ie=>qe(Q,ie),onMouseUp:()=>{Ie(!1)}})}),ot=()=>Z(()=>{var Q;const ke=new Map,q=(Q=A.current)==null?void 0:Q.getBoundingClientRect();return P.forEach(({key:ie})=>{var Te;const Se=(Te=A.current)==null?void 0:Te.querySelector(`[data-node-key="${hG(ie)}"]`);if(Se){const[We,ft,Qe,Xe]=nJ(Se,q);ke.set(ie,{width:We,height:ft,left:Qe,top:Xe})}}),ke});p.useEffect(()=>{ot()},[P.map(ke=>ke.key).join("_")]);const ut=dG(()=>{const ke=Ou(F),q=Ou(M),Q=Ou(E);V([ke[0]-q[0]-Q[0],ke[1]-q[1]-Q[1]]);const ie=Ou(D);B(ie);const Se=Ou(L);J(Se);const Te=Ou(A);j([Te[0]-ie[0],Te[1]-ie[1]]),ot()}),wt=P.slice(0,_e),It=P.slice(ze+1),Gt=[...wt,...It],Nt=ae.get(o),{style:jt}=jZ({activeTabOffset:Nt,horizontal:N,indicator:b,rtl:a});p.useEffect(()=>{lt()},[o,X,ue,E1(Nt),E1(ae),N]),p.useEffect(()=>{ut()},[a]);const qt=!!Gt.length,Ot=`${x}-nav-wrap`;let Vt,Ve,st,Ue;return N?a?(Ve=k>0,Vt=k!==ue):(Vt=k<0,Ve=k!==X):(st=$<0,Ue=$!==X),p.createElement(Vs,{onResize:ut},p.createElement("div",{ref:va(t,F),role:"tablist","aria-orientation":N?"horizontal":"vertical",className:ee(`${x}-nav`,n,w==null?void 0:w.header),style:{...S==null?void 0:S.header,...r},onKeyDown:()=>{Ae()}},p.createElement(P1,{ref:M,position:"left",extra:l,prefixCls:x}),p.createElement(Vs,{onResize:ut},p.createElement("div",{className:ee(Ot,{[`${Ot}-ping-left`]:Vt,[`${Ot}-ping-right`]:Ve,[`${Ot}-ping-top`]:st,[`${Ot}-ping-bottom`]:Ue}),ref:I},p.createElement(Vs,{onResize:ut},p.createElement("div",{ref:A,className:`${x}-nav-list`,style:{transform:`translate(${k}px, ${$}px)`,transition:we?"none":void 0}},Oe,p.createElement(pG,{ref:D,prefixCls:x,locale:u,editable:c,style:{...Oe.length===0?void 0:Ce,visibility:qt?"hidden":null}}),p.createElement("div",{className:ee(`${x}-ink-bar`,w==null?void 0:w.indicator,{[`${x}-ink-bar-animated`]:i.inkBar}),style:{...jt,...S==null?void 0:S.indicator}}))))),p.createElement(eJ,$0({},e,{removeAriaLabel:u==null?void 0:u.removeAriaLabel,ref:L,prefixCls:x,tabs:Gt,className:!qt&&ce,popupStyle:S==null?void 0:S.popup,tabMoving:!!we})),p.createElement(P1,{ref:E,position:"right",extra:l,prefixCls:x})))}),rJ=({renderTabBar:e,...t})=>e?e(t,F1):p.createElement(F1,t),sJ=p.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:s,id:i,active:o,tabKey:a,children:l}=e,c=p.Children.count(l)>0;return p.createElement("div",{id:i&&`${i}-panel-${a}`,role:"tabpanel",tabIndex:o&&c?0:-1,"aria-labelledby":i&&`${i}-tab-${a}`,"aria-hidden":!o,style:s,className:ee(n,o&&`${n}-active`,r),ref:t},l)});function vC(){return vC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{id:t,activeKey:n,animated:r,tabPosition:s,destroyOnHidden:i,contentStyle:o,contentClassName:a}=e,{prefixCls:l,tabs:c}=p.useContext(yP),u=r.tabPane,h=`${l}-tabpane`;return p.createElement("div",{className:ee(`${l}-content-holder`)},p.createElement("div",{className:ee(`${l}-content`,`${l}-content-${s}`,{[`${l}-content-animated`]:u})},c.map(g=>{const{key:m,forceRender:C,style:v,className:b,destroyOnHidden:w,...S}=g,x=m===n;return p.createElement(Li,vC({key:m,visible:x,forceRender:C,removeOnLeave:!!(i??w),leavedClassName:`${h}-hidden`},r.tabPaneMotion),({style:P,className:F},M)=>p.createElement(sJ,vC({},S,{prefixCls:h,id:t,tabKey:m,animated:u,active:x,style:{...o,...v,...P},className:ee(a,b,F),ref:M})))})))};function oJ(e={inkBar:!0,tabPane:!1}){let t;return e===!1?t={inkBar:!1,tabPane:!1}:e===!0?t={inkBar:!0,tabPane:!1}:t={inkBar:!0,...typeof e=="object"?e:{}},t.tabPaneMotion&&t.tabPane===void 0&&(t.tabPane=!0),!t.tabPaneMotion&&t.tabPane&&(t.tabPane=!1),t}function sp(){return sp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var ae;const{id:n,prefixCls:r="rc-tabs",className:s,items:i,direction:o,activeKey:a,defaultActiveKey:l,editable:c,animated:u,tabPosition:h="top",tabBarGutter:g,tabBarStyle:m,tabBarExtraContent:C,locale:v,more:b,destroyOnHidden:w,renderTabBar:S,onChange:x,onTabClick:P,onTabScroll:F,getPopupContainer:M,popupClassName:E,indicator:I,classNames:A,styles:L,...D}=e,N=p.useMemo(()=>(i||[]).filter(de=>de&&typeof de=="object"&&"key"in de),[i]),k=o==="rtl",G=oJ(u),[$,_]=p.useState(!1);p.useEffect(()=>{_(UZ())},[]);const[U,V]=ir(l??((ae=N[0])==null?void 0:ae.key),a),[W,j]=p.useState(()=>N.findIndex(de=>de.key===U));p.useEffect(()=>{var ge;let de=N.findIndex(ve=>ve.key===U);de===-1&&(de=Math.max(0,Math.min(W,N.length-1)),V((ge=N[de])==null?void 0:ge.key)),j(de)},[N.map(de=>de.key).join("_"),U,W]);const[H,B]=ir(null,n);p.useEffect(()=>{n||(B(`rc-tabs-${T1}`),T1+=1)},[]);function Y(de,ge){P==null||P(de,ge);const ve=de!==U;V(de),ve&&(x==null||x(de))}const J={id:H,activeKey:U,animated:G,tabPosition:h,rtl:k,mobile:$},te={...J,editable:c,locale:v,more:b,tabBarGutter:g,onTabClick:Y,onTabScroll:F,extra:C,style:m,getPopupContainer:M,popupClassName:ee(E,A==null?void 0:A.popup),indicator:I,styles:L,classNames:A},Z=p.useMemo(()=>({tabs:N,prefixCls:r}),[N,r]);return p.createElement(yP.Provider,{value:Z},p.createElement("div",sp({ref:t,id:n,className:ee(r,`${r}-${h}`,{[`${r}-mobile`]:$,[`${r}-editable`]:c,[`${r}-rtl`]:k},s)},D),p.createElement(rJ,sp({},te,{renderTabBar:S})),p.createElement(iJ,sp({destroyOnHidden:w},J,{contentStyle:L==null?void 0:L.content,contentClassName:A==null?void 0:A.content,animated:G}))))}),lJ={motionAppear:!1,motionEnter:!0,motionLeave:!0};function cJ(e,t={inkBar:!0,tabPane:!1}){let n;return t===!1?n={inkBar:!1,tabPane:!1}:t===!0?n={inkBar:!0,tabPane:!0}:n={inkBar:!0,...typeof t=="object"?t:{}},n.tabPane&&(n.tabPaneMotion={...lJ,motionName:Ic(e,"switch")}),n}function uJ(e){return e.filter(t=>t)}function dJ(e,t){if(e)return e.map(r=>({...r,destroyOnHidden:r.destroyOnHidden??r.destroyInactiveTabPane}));const n=Tr(t).map(r=>{if(p.isValidElement(r)){const{key:s,props:i}=r,{tab:o,...a}=i||{};return{key:String(s),...a,label:o}}return null});return uJ(n)}const hJ=e=>{const{componentCls:t,motionDurationSlow:n}=e;return[{[t]:{[`${t}-switch`]:{"&-appear, &-enter":{transition:"none","&-start":{opacity:0},"&-active":{opacity:1,transition:`opacity ${n}`}},"&-leave":{position:"absolute",transition:"none",inset:0,"&-start":{opacity:1},"&-active":{opacity:0,transition:`opacity ${n}`}}}}},[yl(e,"slide-up"),yl(e,"slide-down")]]},pJ=e=>{const{componentCls:t,tabsCardPadding:n,cardBg:r,cardGutter:s,colorBorderSecondary:i,itemSelectedColor:o}=e;return{[`${t}-card`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{margin:0,padding:n,background:r,border:`${he(e.lineWidth)} ${e.lineType} ${i}`,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`},[`${t}-tab-active`]:{color:o,background:e.colorBgContainer},[`${t}-tab-focus:has(${t}-tab-btn:focus-visible)`]:ro(e,-3),[`& ${t}-tab${t}-tab-focus ${t}-tab-btn:focus-visible`]:{outline:"none"},[`${t}-ink-bar`]:{visibility:"hidden"}},[`&${t}-top, &${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginLeft:{_skip_check_:!0,value:he(s)}}}},[`&${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`${he(e.borderRadiusLG)} ${he(e.borderRadiusLG)} 0 0`},[`${t}-tab-active`]:{borderBottomColor:e.colorBgContainer}}},[`&${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:`0 0 ${he(e.borderRadiusLG)} ${he(e.borderRadiusLG)}`},[`${t}-tab-active`]:{borderTopColor:e.colorBgContainer}}},[`&${t}-left, &${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginTop:he(s)}}},[`&${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${he(e.borderRadiusLG)} 0 0 ${he(e.borderRadiusLG)}`}},[`${t}-tab-active`]:{borderRightColor:{_skip_check_:!0,value:e.colorBgContainer}}}},[`&${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${he(e.borderRadiusLG)} ${he(e.borderRadiusLG)} 0`}},[`${t}-tab-active`]:{borderLeftColor:{_skip_check_:!0,value:e.colorBgContainer}}}}}}},gJ=e=>{const{componentCls:t,itemHoverColor:n,dropdownEdgeChildVerticalPadding:r}=e;return{[`${t}-dropdown`]:{...jn(e),position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:e.zIndexPopup,display:"block","&-hidden":{display:"none"},[`${t}-dropdown-menu`]:{maxHeight:e.tabsDropdownHeight,margin:0,padding:`${he(r)} 0`,overflowX:"hidden",overflowY:"auto",textAlign:{_skip_check_:!0,value:"left"},listStyleType:"none",backgroundColor:e.colorBgContainer,backgroundClip:"padding-box",borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,"&-item":{...Ro,display:"flex",alignItems:"center",minWidth:e.tabsDropdownWidth,margin:0,padding:`${he(e.paddingXXS)} ${he(e.paddingSM)}`,color:e.colorText,fontWeight:"normal",fontSize:e.fontSize,lineHeight:e.lineHeight,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"> span":{flex:1,whiteSpace:"nowrap"},"&-remove":{flex:"none",marginLeft:{_skip_check_:!0,value:e.marginSM},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:0,cursor:"pointer","&:hover":{color:n}},"&:hover":{background:e.controlItemBgHover},"&-disabled":{"&, &:hover":{color:e.colorTextDisabled,background:"transparent",cursor:"not-allowed"}}}}}}},fJ=e=>{const{componentCls:t,margin:n,colorBorderSecondary:r,horizontalMargin:s,verticalItemPadding:i,verticalItemMargin:o,motionDurationSlow:a,calc:l}=e;return{[`${t}-top, ${t}-bottom`]:{flexDirection:"column",[`> ${t}-nav, > div > ${t}-nav`]:{margin:s,"&::before":{position:"absolute",right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},borderBottom:`${he(e.lineWidth)} ${e.lineType} ${r}`,content:"''"},[`${t}-ink-bar`]:{height:e.lineWidthBold,"&-animated":{transition:["width","left","right"].map(c=>`${c} ${a}`).join(", ")}},[`${t}-nav-wrap`]:{"&::before, &::after":{top:0,bottom:0,width:e.controlHeight},"&::before":{left:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowLeft},"&::after":{right:{_skip_check_:!0,value:0},boxShadow:e.boxShadowTabsOverflowRight},[`&${t}-nav-wrap-ping-left::before`]:{opacity:1},[`&${t}-nav-wrap-ping-right::after`]:{opacity:1}}}},[`${t}-top`]:{[`> ${t}-nav, > div > ${t}-nav`]:{"&::before":{bottom:0},[`${t}-ink-bar`]:{bottom:0}}},[`${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,marginTop:n,marginBottom:0,"&::before":{top:0},[`${t}-ink-bar`]:{top:0}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0}},[`${t}-left, ${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{flexDirection:"column",minWidth:l(e.controlHeight).mul(1.25).equal(),[`${t}-tab`]:{padding:i,textAlign:"center"},[`${t}-tab + ${t}-tab`]:{margin:o},[`${t}-nav-wrap`]:{flexDirection:"column","&::before, &::after":{right:{_skip_check_:!0,value:0},left:{_skip_check_:!0,value:0},height:e.controlHeight},"&::before":{top:0,boxShadow:e.boxShadowTabsOverflowTop},"&::after":{bottom:0,boxShadow:e.boxShadowTabsOverflowBottom},[`&${t}-nav-wrap-ping-top::before`]:{opacity:1},[`&${t}-nav-wrap-ping-bottom::after`]:{opacity:1}},[`${t}-ink-bar`]:{width:e.lineWidthBold,"&-animated":{transition:["height","top"].map(c=>`${c} ${a}`).join(", ")}},[`${t}-nav-list, ${t}-nav-operations`]:{flex:"1 0 auto",flexDirection:"column"}}},[`${t}-left`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-ink-bar`]:{right:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{marginLeft:{_skip_check_:!0,value:he(l(e.lineWidth).mul(-1).equal())},borderLeft:{_skip_check_:!0,value:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingLeft:{_skip_check_:!0,value:e.paddingLG}}}},[`${t}-right`]:{[`> ${t}-nav, > div > ${t}-nav`]:{order:1,[`${t}-ink-bar`]:{left:{_skip_check_:!0,value:0}}},[`> ${t}-content-holder, > div > ${t}-content-holder`]:{order:0,marginRight:{_skip_check_:!0,value:l(e.lineWidth).mul(-1).equal()},borderRight:{_skip_check_:!0,value:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},[`> ${t}-content > ${t}-tabpane`]:{paddingRight:{_skip_check_:!0,value:e.paddingLG}}}}}},mJ=e=>{const{componentCls:t,cardPaddingSM:n,cardPaddingLG:r,cardHeightSM:s,cardHeightLG:i,horizontalItemPaddingSM:o,horizontalItemPaddingLG:a}=e;return{[t]:{"&-small":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:o,fontSize:e.titleFontSizeSM}}},"&-large":{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:a,fontSize:e.titleFontSizeLG,lineHeight:e.lineHeightLG}}}},[`${t}-card`]:{[`&${t}-small`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:n},[`${t}-nav-add`]:{minWidth:s,minHeight:s}},[`&${t}-bottom`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`0 0 ${he(e.borderRadius)} ${he(e.borderRadius)}`}},[`&${t}-top`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:`${he(e.borderRadius)} ${he(e.borderRadius)} 0 0`}},[`&${t}-right`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`0 ${he(e.borderRadius)} ${he(e.borderRadius)} 0`}}},[`&${t}-left`]:{[`> ${t}-nav ${t}-tab`]:{borderRadius:{_skip_check_:!0,value:`${he(e.borderRadius)} 0 0 ${he(e.borderRadius)}`}}}},[`&${t}-large`]:{[`> ${t}-nav`]:{[`${t}-tab`]:{padding:r},[`${t}-nav-add`]:{minWidth:i,minHeight:i}}}}}},CJ=e=>{const{componentCls:t,itemActiveColor:n,itemHoverColor:r,iconCls:s,tabsHorizontalItemMargin:i,horizontalItemPadding:o,itemSelectedColor:a,itemColor:l}=e,c=`${t}-tab`;return{[c]:{position:"relative",WebkitTouchCallout:"none",WebkitTapHighlightColor:"transparent",display:"inline-flex",alignItems:"center",padding:o,fontSize:e.titleFontSize,background:"transparent",border:0,outline:"none",cursor:"pointer",color:l,"&-btn, &-remove":{"&:focus:not(:focus-visible), &:active":{color:n}},"&-btn":{outline:"none",transition:`all ${e.motionDurationSlow}`,[`${c}-icon:not(:last-child)`]:{marginInlineEnd:e.marginSM}},"&-remove":{flex:"none",lineHeight:1,marginRight:{_skip_check_:!0,value:e.calc(e.marginXXS).mul(-1).equal()},marginLeft:{_skip_check_:!0,value:e.marginXS},color:e.colorIcon,fontSize:e.fontSizeSM,background:"transparent",border:"none",outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}`,"&:hover":{color:e.colorTextHeading},...Fo(e)},"&:hover":{color:r},[`&${c}-active ${c}-btn`]:{color:a},[`&${c}-focus ${c}-btn:focus-visible`]:ro(e),[`&${c}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${c}-disabled ${c}-btn, &${c}-disabled ${t}-remove`]:{"&:focus, &:active":{color:e.colorTextDisabled}},[`& ${c}-remove ${s}`]:{margin:0,verticalAlign:"middle"},[`${s}:not(:last-child)`]:{marginRight:{_skip_check_:!0,value:e.marginSM}}},[`${c} + ${c}`]:{margin:{_skip_check_:!0,value:i}}}},vJ=e=>{const{componentCls:t,tabsHorizontalItemMarginRTL:n,iconCls:r,cardGutter:s,calc:i}=e;return{[`${t}-rtl`]:{direction:"rtl",[`${t}-nav`]:{[`${t}-tab`]:{margin:{_skip_check_:!0,value:n},[`${t}-tab:last-of-type`]:{marginLeft:{_skip_check_:!0,value:0}},[r]:{marginRight:{_skip_check_:!0,value:0},marginLeft:{_skip_check_:!0,value:he(e.marginSM)}},[`${t}-tab-remove`]:{marginRight:{_skip_check_:!0,value:he(e.marginXS)},marginLeft:{_skip_check_:!0,value:he(i(e.marginXXS).mul(-1).equal())},[r]:{margin:0}}}},[`&${t}-left`]:{[`> ${t}-nav`]:{order:1},[`> ${t}-content-holder`]:{order:0}},[`&${t}-right`]:{[`> ${t}-nav`]:{order:0},[`> ${t}-content-holder`]:{order:1}},[`&${t}-card${t}-top, &${t}-card${t}-bottom`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-tab + ${t}-tab`]:{marginRight:{_skip_check_:!0,value:s},marginLeft:{_skip_check_:!0,value:0}}}}},[`${t}-dropdown-rtl`]:{direction:"rtl"},[`${t}-menu-item`]:{[`${t}-dropdown-rtl`]:{textAlign:{_skip_check_:!0,value:"right"}}}}},yJ=e=>{const{componentCls:t,tabsCardPadding:n,cardHeight:r,cardGutter:s,itemHoverColor:i,itemActiveColor:o,colorBorderSecondary:a}=e;return{[t]:{...jn(e),display:"flex",[`> ${t}-nav, > div > ${t}-nav`]:{position:"relative",display:"flex",flex:"none",alignItems:"center",[`${t}-nav-wrap`]:{position:"relative",display:"flex",flex:"auto",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",transform:"translate(0)","&::before, &::after":{position:"absolute",zIndex:1,opacity:0,transition:`opacity ${e.motionDurationSlow}`,content:"''",pointerEvents:"none"}},[`${t}-nav-list`]:{position:"relative",display:"flex",transition:`opacity ${e.motionDurationSlow}`},[`${t}-nav-operations`]:{display:"flex",alignSelf:"stretch"},[`${t}-nav-operations-hidden`]:{position:"absolute",visibility:"hidden",pointerEvents:"none"},[`${t}-nav-more`]:{position:"relative",padding:n,background:"transparent",border:0,color:e.colorText,"&::after":{position:"absolute",right:{_skip_check_:!0,value:0},bottom:0,left:{_skip_check_:!0,value:0},height:e.calc(e.controlHeightLG).div(8).equal(),transform:"translateY(100%)",content:"''"}},[`${t}-nav-add`]:{minWidth:r,minHeight:r,marginLeft:{_skip_check_:!0,value:s},background:"transparent",border:`${he(e.lineWidth)} ${e.lineType} ${a}`,borderRadius:`${he(e.borderRadiusLG)} ${he(e.borderRadiusLG)} 0 0`,outline:"none",cursor:"pointer",color:e.colorText,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOut}`,"&:hover":{color:i},"&:active, &:focus:not(:focus-visible)":{color:o},...Fo(e,-3)}},[`${t}-extra-content`]:{flex:"none"},[`${t}-ink-bar`]:{position:"absolute",background:e.inkBarColor,pointerEvents:"none"},...CJ(e),[`${t}-content`]:{position:"relative",width:"100%"},[`${t}-content-holder`]:{flex:"auto",minWidth:0,minHeight:0},[`${t}-tabpane`]:{...Fo(e),"&-hidden":{display:"none"}}},[`${t}-centered`]:{[`> ${t}-nav, > div > ${t}-nav`]:{[`${t}-nav-wrap`]:{[`&:not([class*='${t}-nav-wrap-ping']) > ${t}-nav-list`]:{margin:"auto"}}}}}},bJ=e=>{const{cardHeight:t,cardHeightSM:n,cardHeightLG:r,controlHeight:s,controlHeightLG:i}=e,o=t||i,a=n||s,l=r||i+8;return{zIndexPopup:e.zIndexPopupBase+50,cardBg:e.colorFillAlter,cardHeight:o,cardHeightSM:a,cardHeightLG:l,cardPadding:`${(o-e.fontHeight)/2-e.lineWidth}px ${e.padding}px`,cardPaddingSM:`${(a-e.fontHeight)/2-e.lineWidth}px ${e.paddingXS}px`,cardPaddingLG:`${(l-e.fontHeightLG)/2-e.lineWidth}px ${e.padding}px`,titleFontSize:e.fontSize,titleFontSizeLG:e.fontSizeLG,titleFontSizeSM:e.fontSize,inkBarColor:e.colorPrimary,horizontalMargin:`0 0 ${e.margin}px 0`,horizontalItemGutter:32,horizontalItemMargin:"",horizontalItemMarginRTL:"",horizontalItemPadding:`${e.paddingSM}px 0`,horizontalItemPaddingSM:`${e.paddingXS}px 0`,horizontalItemPaddingLG:`${e.padding}px 0`,verticalItemPadding:`${e.paddingXS}px ${e.paddingLG}px`,verticalItemMargin:`${e.margin}px 0 0 0`,itemColor:e.colorText,itemSelectedColor:e.colorPrimary,itemHoverColor:e.colorPrimaryHover,itemActiveColor:e.colorPrimaryActive,cardGutter:e.marginXXS/2}},wJ=Ln("Tabs",e=>{const t=En(e,{tabsCardPadding:e.cardPadding,dropdownEdgeChildVerticalPadding:e.paddingXXS,tabsDropdownHeight:200,tabsDropdownWidth:120,tabsHorizontalItemMargin:`0 0 0 ${he(e.horizontalItemGutter)}`,tabsHorizontalItemMarginRTL:`0 0 0 ${he(e.horizontalItemGutter)}`});return[mJ(t),vJ(t),fJ(t),gJ(t),pJ(t),yJ(t),hJ(t)]},bJ),SJ=()=>null,xJ=p.forwardRef((e,t)=>{var X,ue,fe,oe;const{type:n,className:r,rootClassName:s,size:i,onEdit:o,hideAdd:a,centered:l,addIcon:c,removeIcon:u,moreIcon:h,more:g,popupClassName:m,children:C,items:v,animated:b,style:w,indicatorSize:S,indicator:x,classNames:P,styles:F,destroyInactiveTabPane:M,destroyOnHidden:E,tabPlacement:I,tabPosition:A,...L}=e,{prefixCls:D}=L,{getPrefixCls:N,direction:k,getPopupContainer:G,className:$,style:_,classNames:U,styles:V}=Hn("tabs"),{tabs:W}=p.useContext(Kt),j=N("tabs",D),H=Rs(j),[B,Y]=wJ(j,H),J=p.useRef(null);p.useImperativeHandle(t,()=>({nativeElement:J.current}));let te;n==="editable-card"&&(te={onEdit:(we,{key:Be,event:Ae})=>{o==null||o(we==="add"?Ae:Be,we)},removeIcon:u??(W==null?void 0:W.removeIcon)??p.createElement(Kc,null),addIcon:(c??(W==null?void 0:W.addIcon))||p.createElement(HZ,null),showAdd:a!==!0});const Z=N(),ae=Oi(i),de=dJ(v,C),ge=cJ(j,b),ve={align:(x==null?void 0:x.align)??((X=W==null?void 0:W.indicator)==null?void 0:X.align),size:(x==null?void 0:x.size)??S??((ue=W==null?void 0:W.indicator)==null?void 0:ue.size)??(W==null?void 0:W.indicatorSize)},Re=p.useMemo(()=>{const we=I??A??void 0,Be=k==="rtl";switch(we){case"start":return Be?"right":"left";case"end":return Be?"left":"right";default:return we}},[I,A,k]),ne={...e,size:ae,tabPlacement:Re,items:de},[re,ce]=Kn([U,P],[V,F],{props:ne},{popup:{_default:"root"}});return p.createElement(aJ,{ref:J,direction:k,getPopupContainer:G,...L,items:de,className:ee({[`${j}-${ae}`]:ae,[`${j}-card`]:["card","editable-card"].includes(n),[`${j}-editable-card`]:n==="editable-card",[`${j}-centered`]:l},$,r,s,re.root,B,Y,H),classNames:{...re,popup:ee(m,B,Y,H,(fe=re.popup)==null?void 0:fe.root)},styles:ce,style:{...ce.root,..._,...w},editable:te,more:{icon:((oe=W==null?void 0:W.more)==null?void 0:oe.icon)??(W==null?void 0:W.moreIcon)??h??p.createElement(gP,null),transitionName:`${Z}-slide-up`,...g},prefixCls:j,animated:ge,indicator:ve,destroyOnHidden:E??M,tabPosition:Re})}),RJ=xJ;RJ.TabPane=SJ;function EJ(e,t,n){var r=n||{},s=r.noTrailing,i=s===void 0?!1:s,o=r.noLeading,a=o===void 0?!1:o,l=r.debounceMode,c=l===void 0?void 0:l,u,h=!1,g=0;function m(){u&&clearTimeout(u)}function C(b){var w=b||{},S=w.upcomingOnly,x=S===void 0?!1:S;m(),h=!x}function v(){for(var b=arguments.length,w=new Array(b),S=0;Se?a?(g=Date.now(),i||(u=setTimeout(c?M:F,e))):F():i!==!0&&(u=setTimeout(c?M:F,c===void 0?e-P:e))}return v.cancel=C,v}function PJ(e,t,n){var r={},s=r.atBegin,i=s===void 0?!1:s;return EJ(e,t,{debounceMode:i!==!1})}function ms(e,t){return e[t]}function gG(e,t){return`${e}-${t}`}function FJ(e){return e&&e.type&&e.type.isTreeNode}function gg(e,t){return e??t}function ad(e){const{title:t,_title:n,key:r,children:s}=e||{},i=t||"title";return{title:i,_title:n||[i],key:r||"key",children:s||"children"}}function fG(e){function t(n){return Tr(n).map(s=>{if(!FJ(s))return Jn(!s,"Tree/TreeNode can only accept TreeNode as children."),null;const{key:i}=s,{children:o,...a}=s.props,l={key:i,...a},c=t(o);return c.length&&(l.children=c),l}).filter(s=>s)}return t(e)}function Hw(e,t,n){const{_title:r,key:s,children:i}=ad(n),o=new Set(t===!0?[]:t),a=[];function l(c,u=null){return c.map((h,g)=>{const m=gG(u?u.pos:"0",g),C=gg(h[s],m);let v;for(let w=0;wg[i]:typeof i=="function"&&(u=g=>i(g)):u=(g,m)=>gg(g[a],m);function h(g,m,C,v){const b=g?g[c]:e,w=g?gG(C.pos,m):"0",S=g?[...v,g]:[];if(g){const x=u(g,w),P={node:g,index:m,pos:w,key:x,parentPos:C.node?C.pos:null,level:C.level+1,nodes:S};t(P)}b&&b.forEach((x,P)=>{h(x,P,{node:g,pos:w,level:C?C.level+1:-1},S)})}h(null)}function wP(e,{initWrapper:t,processEntity:n,onProcessFinished:r,externalGetKey:s,childrenPropName:i,fieldNames:o}={},a){const l=s||a,c={},u={};let h={posEntities:c,keyEntities:u};return t&&(h=t(h)||h),TJ(e,g=>{const{node:m,index:C,pos:v,key:b,parentPos:w,level:S,nodes:x}=g,P={node:m,nodes:x,index:C,key:b,pos:v,level:S},F=gg(b,v);c[v]=P,u[F]=P,P.parent=c[w],P.parent&&(P.parent.children=P.parent.children||[],P.parent.children.push(P)),n&&n(P,h)},{externalGetKey:l,childrenPropName:i,fieldNames:o}),r&&r(h),h}function mG(e,t,n,r){return e===!1?!1:e||!t&&!n||t&&r&&!n}function ip(e,{expandedKeys:t,selectedKeys:n,loadedKeys:r,loadingKeys:s,checkedKeys:i,halfCheckedKeys:o,dragOverNodeKey:a,dropPosition:l,keyEntities:c}){const u=ms(c,e);return{eventKey:e,expanded:t.indexOf(e)!==-1,selected:n.indexOf(e)!==-1,loaded:r.indexOf(e)!==-1,loading:s.indexOf(e)!==-1,checked:i.indexOf(e)!==-1,halfChecked:o.indexOf(e)!==-1,pos:String(u?u.pos:""),dragOver:a===e&&l===0,dragOverGapTop:a===e&&l===-1,dragOverGapBottom:a===e&&l===1}}function Cr(e){const{data:t,expanded:n,selected:r,checked:s,loaded:i,loading:o,halfChecked:a,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:h,active:g,eventKey:m}=e,C={...t,expanded:n,selected:r,checked:s,loaded:i,loading:o,halfChecked:a,dragOver:l,dragOverGapTop:c,dragOverGapBottom:u,pos:h,active:g,key:m};return"props"in C||Object.defineProperty(C,"props",{get(){return Jn(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),C}function CG(e,t){const n=new Set;return e.forEach(r=>{t.has(r)||n.add(r)}),n}function MJ(e){const{disabled:t,disableCheckbox:n,checkable:r}=e||{};return!!(t||n)||r===!1}function IJ(e,t,n,r){const s=new Set(e),i=new Set;for(let a=0;a<=n;a+=1)(t.get(a)||new Set).forEach(c=>{const{key:u,node:h,children:g=[]}=c;s.has(u)&&!r(h)&&g.filter(m=>!r(m.node)).forEach(m=>{s.add(m.key)})});const o=new Set;for(let a=n;a>=0;a-=1)(t.get(a)||new Set).forEach(c=>{const{parent:u,node:h}=c;if(r(h)||!c.parent||o.has(c.parent.key))return;if(r(c.parent.node)){o.add(u.key);return}let g=!0,m=!1;(u.children||[]).filter(C=>!r(C.node)).forEach(({key:C})=>{const v=s.has(C);g&&!v&&(g=!1),!m&&(v||i.has(C))&&(m=!0)}),g&&s.add(u.key),m&&i.add(u.key),o.add(u.key)});return{checkedKeys:Array.from(s),halfCheckedKeys:Array.from(CG(i,s))}}function DJ(e,t,n,r,s){const i=new Set(e);let o=new Set(t);for(let l=0;l<=r;l+=1)(n.get(l)||new Set).forEach(u=>{const{key:h,node:g,children:m=[]}=u;!i.has(h)&&!o.has(h)&&!s(g)&&m.filter(C=>!s(C.node)).forEach(C=>{i.delete(C.key)})});o=new Set;const a=new Set;for(let l=r;l>=0;l-=1)(n.get(l)||new Set).forEach(u=>{const{parent:h,node:g}=u;if(s(g)||!u.parent||a.has(u.parent.key))return;if(s(u.parent.node)){a.add(h.key);return}let m=!0,C=!1;(h.children||[]).filter(v=>!s(v.node)).forEach(({key:v})=>{const b=i.has(v);m&&!b&&(m=!1),!C&&(b||o.has(v))&&(C=!0)}),m||i.delete(h.key),C&&o.add(h.key),a.add(h.key)});return{checkedKeys:Array.from(i),halfCheckedKeys:Array.from(CG(o,i))}}function qu(e,t,n,r){const s=[];let i;r?i=r:i=MJ;const o=new Set(e.filter(u=>{const h=!!ms(n,u);return h||s.push(u),h})),a=new Map;let l=0;Object.keys(n).forEach(u=>{const h=n[u],{level:g}=h;let m=a.get(g);m||(m=new Set,a.set(g,m)),m.add(h),l=Math.max(l,g)}),Jn(!s.length,`Tree missing follow keys: ${s.slice(0,100).map(u=>`'${u}'`).join(", ")}`);let c;return t===!0?c=IJ(o,a,l,i):c=DJ(o,t.halfCheckedKeys,a,l,i),c}const AJ=e=>{const{checkboxCls:t,checkboxSize:n,lineWidth:r}=e,s=`${t}-wrapper`;return[{[`${t}-group`]:{...jn(e),display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}},[s]:{...jn(e),display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${s}`]:{marginInlineStart:0},[`&${s}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}},[t]:{...jn(e),position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",alignSelf:"center",boxSizing:"border-box",display:"block",width:n,height:n,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${he(r)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:`calc(${n} / 2 - ${r})`,insetInlineStart:`calc(${n} / 4 - ${r})`,display:"table",width:e.calc(n).div(14).mul(5).equal(),height:e.calc(n).div(14).mul(8).equal(),border:`${he(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`},[`${t}-input`]:{position:"absolute",inset:`calc(-1 * (${r}))`,zIndex:1,cursor:"pointer",opacity:0,margin:0},[`&:has(${t}-input:focus-visible)`]:ro(e),"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}}},{[` ${s}:not(${s}-disabled), ${t}:not(${t}-disabled) `]:{[`&:hover ${t}`]:{borderColor:e.colorPrimary}},[`${s}:not(${s}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled)`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[`${t}-checked`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`},[`&:not(${t}-disabled):hover`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{backgroundColor:e.colorBgContainer,borderColor:e.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'},"&:hover":{backgroundColor:e.colorBgContainer,borderColor:e.colorPrimary}}}},{[`${s}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate::after`]:{background:e.colorTextDisabled}}}]};function vG(e,t){const n=En(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return AJ(n)}const yG=Ln("Checkbox",(e,{prefixCls:t})=>[vG(t,e)]),bG=K.createContext(null),LJ=(e,t)=>{const{prefixCls:n,children:r,indeterminate:s=!1,onMouseEnter:i,onMouseLeave:o,skipGroup:a=!1,disabled:l,rootClassName:c,className:u,style:h,classNames:g,styles:m,name:C,value:v,checked:b,defaultChecked:w,onChange:S,...x}=e,{getPrefixCls:P,direction:F,className:M,style:E,classNames:I,styles:A}=Hn("checkbox"),L=p.useContext(bG),{isFormItemInput:D}=p.useContext(Di),N=p.useContext(so),k=((L==null?void 0:L.disabled)||l)??N,[G,$]=ir(w,b);let _=G;const U=Yt(ne=>{$(ne.target.checked),S==null||S(ne),!a&&(L!=null&&L.toggleOption)&&L.toggleOption({label:r,value:v})});L&&!a&&(_=L.value.includes(v));const V=p.useRef(null),W=va(t,V);p.useEffect(()=>{if(!(a||!L))return L.registerValue(v),()=>{L.cancelValue(v)}},[v,a]),p.useEffect(()=>{var ne;(ne=V.current)!=null&&ne.input&&(V.current.input.indeterminate=s)},[s]);const j=P("checkbox",n),H=Rs(j),[B,Y]=yG(j,H),J={...x},te={...e,indeterminate:s,disabled:k,checked:_},[Z,ae]=Kn([I,g],[A,m],{props:te}),de=ee(`${j}-wrapper`,{[`${j}-rtl`]:F==="rtl",[`${j}-wrapper-checked`]:_,[`${j}-wrapper-disabled`]:k,[`${j}-wrapper-in-form-item`]:D},M,u,Z.root,c,Y,H,B),ge=ee(Z.icon,{[`${j}-indeterminate`]:s},vv,B),[ve,Re]=iG(J.onClick);return p.createElement(VE,{component:"Checkbox",disabled:k},p.createElement("label",{className:de,style:{...ae.root,...E,...h},onMouseEnter:i,onMouseLeave:o,onClick:ve},p.createElement(sG,{...J,name:!a&&L?L.name:C,checked:_,onClick:Re,onChange:U,prefixCls:j,className:ge,style:ae.icon,disabled:k,ref:W,value:v}),qs(r)&&p.createElement("span",{className:ee(`${j}-label`,Z.label),style:ae.label},r)))},wG=p.forwardRef(LJ),OJ=p.forwardRef((e,t)=>{const{defaultValue:n,children:r,options:s=[],prefixCls:i,className:o,rootClassName:a,style:l,onChange:c,role:u="group",...h}=e,{getPrefixCls:g,direction:m}=p.useContext(Kt),[C,v]=p.useState(h.value||n||[]),[b,w]=p.useState([]);p.useEffect(()=>{"value"in h&&v(h.value||[])},[h.value]);const S=p.useMemo(()=>s.map($=>typeof $=="string"||typeof $=="number"?{label:$,value:$}:$),[s]),x=$=>{w(_=>_.filter(U=>U!==$))},P=$=>{w(_=>[].concat(nn(_),[$]))},F=$=>{const _=C.indexOf($.value),U=nn(C);_===-1?U.push($.value):U.splice(_,1),"value"in h||v(U),c==null||c(U.filter(V=>b.includes(V)).sort((V,W)=>{const j=S.findIndex(B=>B.value===V),H=S.findIndex(B=>B.value===W);return j-H}))},M=g("checkbox",i),E=`${M}-group`,I=Rs(M),[A,L]=yG(M,I),D=Vn(h,["value","disabled"]),N=s.length?S.map($=>p.createElement(wG,{prefixCls:M,key:$.value.toString(),disabled:"disabled"in $?$.disabled:h.disabled,value:$.value,checked:C.includes($.value),onChange:$.onChange,className:ee(`${E}-item`,$.className),style:$.style,title:$.title,id:$.id,required:$.required},$.label)):r,k=p.useMemo(()=>({toggleOption:F,value:C,disabled:h.disabled,name:h.name,registerValue:P,cancelValue:x}),[F,C,h.disabled,h.name,P,x]),G=ee(E,{[`${E}-rtl`]:m==="rtl"},o,a,L,I,A);return p.createElement("div",{className:G,style:l,role:u,...D,ref:t},p.createElement(bG.Provider,{value:k},N))}),ld=wG;ld.Group=OJ;ld.__ANT_CHECKBOX=!0;const SG=p.createContext({}),kJ=e=>typeof e=="number"&&!Number.isNaN(e);function M1(e){return e==="auto"?"1 1 auto":kJ(e)?`${e} ${e} auto`:/^\d+(\.\d+)?(px|em|rem|%)$/.test(e)?`0 0 ${e}`:e}const NJ=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r}=p.useContext(Kt),{gutter:s,wrap:i}=p.useContext(SG),{prefixCls:o,span:a,order:l,offset:c,push:u,pull:h,className:g,children:m,flex:C,style:v,...b}=e,w=n("col",o),S=n(),[x,P]=sX(w),[F]=br(S,"col"),M={};let E={};XY.forEach(L=>{let D={};const N=e[L];typeof N=="number"?D.span=N:typeof N=="object"&&(D=N||{}),delete b[L],E={...E,[`${w}-${L}-${D.span}`]:D.span!==void 0,[`${w}-${L}-order-${D.order}`]:D.order||D.order===0,[`${w}-${L}-offset-${D.offset}`]:D.offset||D.offset===0,[`${w}-${L}-push-${D.push}`]:D.push||D.push===0,[`${w}-${L}-pull-${D.pull}`]:D.pull||D.pull===0,[`${w}-rtl`]:r==="rtl"},D.flex&&(E[`${w}-${L}-flex`]=!0,M[F(`${L}-flex`)]=M1(D.flex))});const I=ee(w,{[`${w}-${a}`]:a!==void 0,[`${w}-order-${l}`]:l,[`${w}-offset-${c}`]:c,[`${w}-push-${u}`]:u,[`${w}-pull-${h}`]:h},g,E,x,P),A={};if(s!=null&&s[0]){const L=typeof s[0]=="number"?`${s[0]/2}px`:`calc(${s[0]} / 2)`;A.paddingInline=L}return C&&(A.flex=M1(C),i===!1&&!A.minWidth&&(A.minWidth=0)),p.createElement("div",{...b,style:{...A,...v,...M},className:I,ref:t},m)});function BJ(e,t){const n=[void 0,void 0],r=Array.isArray(e)?e:[e,void 0],s=t||{xs:!0,sm:!0,md:!0,lg:!0,xl:!0,xxl:!0,xxxl:!0};return r.forEach((i,o)=>{if(typeof i=="object"&&i!==null)for(let a=0;a{if(typeof e=="string"&&r(e),typeof e=="object")for(let i=0;i{s()},[JSON.stringify(e),t]),n}const $J=p.forwardRef((e,t)=>{const{prefixCls:n,justify:r,align:s,className:i,style:o,children:a,gutter:l=0,wrap:c,...u}=e,{getPrefixCls:h,direction:g}=p.useContext(Kt),m=Pv(!0,null),C=I1(s,m),v=I1(r,m),b=h("row",n),[w,S]=rX(b),x=BJ(l,m),P=ee(b,{[`${b}-no-wrap`]:c===!1,[`${b}-${v}`]:v,[`${b}-${C}`]:C,[`${b}-rtl`]:g==="rtl"},i,w,S),F={};if(x!=null&&x[0]){const A=typeof x[0]=="number"?`${x[0]/-2}px`:`calc(${x[0]} / -2)`;F.marginInline=A}const[M,E]=x;F.rowGap=E;const I=p.useMemo(()=>({gutter:[M,E],wrap:c}),[M,E,c]);return p.createElement(SG.Provider,{value:I},p.createElement("div",{...u,className:P,style:{...F,...o},ref:t},a))}),GJ=e=>{const{componentCls:t,borderRadius:n,paddingSM:r,colorBorder:s,paddingXS:i,fontSizeLG:o,fontSizeSM:a,borderRadiusLG:l,borderRadiusSM:c,colorBgContainerDisabled:u,lineWidth:h,antCls:g}=e,[m,C]=br(g,"space");return{[t]:[{display:"inline-flex",alignItems:"center",gap:0,paddingInline:r,margin:0,borderWidth:h,borderStyle:"solid",borderRadius:n,"&:hover":{zIndex:0},[`&${t}-disabled`]:{color:e.colorTextDisabled},"&-large":{fontSize:o,borderRadius:l},"&-small":{paddingInline:i,borderRadius:c,fontSize:a},"&-compact-last-item":{borderEndStartRadius:0,borderStartStartRadius:0},"&-compact-first-item":{borderEndEndRadius:0,borderStartEndRadius:0},"&-compact-item:not(:first-child):not(:last-child)":{borderRadius:0},"&-compact-item:not(:last-child)":{borderInlineEndWidth:0},"&-compact-item:not(:first-child)":{borderInlineStartWidth:0}},{[m("addon-border-color")]:s,[m("addon-background")]:u,[m("addon-border-color-outlined")]:s,[m("addon-background-filled")]:u,borderColor:C("addon-border-color"),background:C("addon-background"),"&-variant-outlined":{[m("addon-border-color")]:C("addon-border-color-outlined")},"&-variant-filled":{[m("addon-border-color")]:"transparent",[m("addon-background")]:C("addon-background-filled"),[`&${t}-disabled`]:{[m("addon-border-color")]:s,[m("addon-background")]:u}},"&-variant-borderless":{border:"none",background:"transparent"},"&-variant-underlined":{border:"none",background:"transparent"}},{"&-status-error":{[m("addon-border-color-outlined")]:e.colorError,[m("addon-background-filled")]:e.colorErrorBg,color:e.colorError},"&-status-warning":{[m("addon-border-color-outlined")]:e.colorWarning,[m("addon-background-filled")]:e.colorWarningBg,color:e.colorWarning}}]}},VJ=Ln(["Space","Addon"],e=>[GJ(e),Sv(e,{focus:!1})]),HJ=K.forwardRef((e,t)=>{const{className:n,children:r,style:s,prefixCls:i,variant:o="outlined",disabled:a,status:l,...c}=e,{getPrefixCls:u,direction:h}=K.useContext(Kt),g=u("space-addon",i),[m,C]=VJ(g),{compactItemClassnames:v,compactSize:b}=qc(g,h),w=Np(g,l),S=ee(g,m,v,C,`${g}-variant-${o}`,w,{[`${g}-${b}`]:b,[`${g}-disabled`]:a},n);return K.createElement("div",{ref:t,className:S,style:s,...c},r)});function zJ(e){return!!(e.addonBefore||e.addonAfter)}function WJ(e){return!!(e.prefix||e.suffix||e.allowClear)}function D1(e,t,n){const r=t.cloneNode(!0),s=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=(...i)=>{t.setSelectionRange(...i)},s}function yC(e,t,n,r){if(!n)return;let s=t;if(t.type==="click"){s=D1(t,e,""),n(s);return}if(e.type!=="file"&&r!==void 0){s=D1(t,e,r),n(s);return}n(s)}function G0(){return G0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var W,j,H;const{inputElement:n,children:r,prefixCls:s,prefix:i,suffix:o,addonBefore:a,addonAfter:l,className:c,style:u,disabled:h,readOnly:g,focused:m,triggerFocus:C,allowClear:v,value:b,handleReset:w,hidden:S,classes:x,classNames:P,dataAttrs:F,styles:M,components:E,onClear:I}=e,A=r??n,L=(E==null?void 0:E.affixWrapper)||"span",D=(E==null?void 0:E.groupWrapper)||"span",N=(E==null?void 0:E.wrapper)||"span",k=(E==null?void 0:E.groupAddon)||"span",G=p.useRef(null),$=B=>{var Y;(Y=G.current)!=null&&Y.contains(B.target)&&(C==null||C())},_=WJ(e);let U=p.cloneElement(A,{value:b,className:ee((W=A.props)==null?void 0:W.className,!_&&(P==null?void 0:P.variant))||null});const V=p.useRef(null);if(K.useImperativeHandle(t,()=>({nativeElement:V.current||G.current})),_){let B=null;if(v){const Z=!h&&!g&&b,ae=`${s}-clear-icon`,de=typeof v=="object"&&(v!=null&&v.clearIcon)?v.clearIcon:"✖";B=K.createElement("button",{type:"button",tabIndex:-1,onClick:ge=>{w==null||w(ge),I==null||I()},onMouseDown:ge=>ge.preventDefault(),className:ee(ae,{[`${ae}-hidden`]:!Z,[`${ae}-has-suffix`]:!!o})},de)}const Y=`${s}-affix-wrapper`,J=ee(Y,{[`${s}-disabled`]:h,[`${Y}-disabled`]:h,[`${Y}-focused`]:m,[`${Y}-readonly`]:g,[`${Y}-input-with-clear-btn`]:o&&v&&b},x==null?void 0:x.affixWrapper,P==null?void 0:P.affixWrapper,P==null?void 0:P.variant),te=(o||v)&&K.createElement("span",{className:ee(`${s}-suffix`,P==null?void 0:P.suffix),style:M==null?void 0:M.suffix},B,o);U=K.createElement(L,G0({className:J,style:M==null?void 0:M.affixWrapper,onClick:$},F==null?void 0:F.affixWrapper,{ref:G}),i&&K.createElement("span",{className:ee(`${s}-prefix`,P==null?void 0:P.prefix),style:M==null?void 0:M.prefix},i),U,te)}if(zJ(e)){const B=`${s}-group`,Y=`${B}-addon`,J=`${B}-wrapper`,te=ee(`${s}-wrapper`,B,x==null?void 0:x.wrapper,P==null?void 0:P.wrapper),Z=ee(J,{[`${J}-disabled`]:h},x==null?void 0:x.group,P==null?void 0:P.groupWrapper);U=K.createElement(D,{className:Z,ref:V},K.createElement(N,{className:te},a&&K.createElement(k,{className:Y},a),U,l&&K.createElement(k,{className:Y},l)))}return K.cloneElement(U,{className:ee((j=U.props)==null?void 0:j.className,c)||null,style:{...(H=U.props)==null?void 0:H.style,...u},hidden:S})});function RG(e,t){return p.useMemo(()=>{let n={};t&&(n.show=typeof t=="object"&&t.formatter?t.formatter:!!t),n={...n,...e};const{show:r,...s}=n;return{...s,show:!!r,showFormatter:typeof r=="function"?r:void 0,strategy:s.strategy||(i=>i.length)}},[e,t])}function bC(){return bC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{autoComplete:n,onChange:r,onFocus:s,onBlur:i,onPressEnter:o,onKeyDown:a,onKeyUp:l,prefixCls:c="rc-input",disabled:u,htmlSize:h,className:g,maxLength:m,suffix:C,showCount:v,count:b,type:w="text",classes:S,classNames:x,styles:P,onCompositionStart:F,onCompositionEnd:M,...E}=e,[I,A]=p.useState(!1),L=p.useRef(!1),D=p.useRef(!1),N=p.useRef(null),k=p.useRef(null),G=X=>{N.current&&NB(N.current,X)},[$,_]=ir(e.defaultValue,e.value),U=$==null?"":String($),[V,W]=p.useState(null),j=RG(b,v),H=j.max||m,B=j.strategy(U),Y=!!H&&B>H;p.useImperativeHandle(t,()=>{var X;return{focus:G,blur:()=>{var ue;(ue=N.current)==null||ue.blur()},setSelectionRange:(ue,fe,oe)=>{var we;(we=N.current)==null||we.setSelectionRange(ue,fe,oe)},select:()=>{var ue;(ue=N.current)==null||ue.select()},input:N.current,nativeElement:((X=k.current)==null?void 0:X.nativeElement)||N.current}}),p.useEffect(()=>{D.current&&(D.current=!1),A(X=>X&&u?!1:X)},[u]);const J=(X,ue,fe)=>{var we,Be;let oe=ue;if(!L.current&&j.exceedFormatter&&j.max&&j.strategy(ue)>j.max)oe=j.exceedFormatter(ue,{max:j.max}),ue!==oe&&W([((we=N.current)==null?void 0:we.selectionStart)||0,((Be=N.current)==null?void 0:Be.selectionEnd)||0]);else if(fe.source==="compositionEnd")return;_(oe),N.current&&yC(N.current,X,r,oe)};p.useEffect(()=>{var X;V&&((X=N.current)==null||X.setSelectionRange(...V))},[V]);const te=X=>{J(X,X.target.value,{source:"change"})},Z=X=>{L.current=!1,J(X,X.currentTarget.value,{source:"compositionEnd"}),M==null||M(X)},ae=X=>{o&&X.key==="Enter"&&!D.current&&!X.nativeEvent.isComposing&&(D.current=!0,o(X)),a==null||a(X)},de=X=>{X.key==="Enter"&&(D.current=!1),l==null||l(X)},ge=X=>{A(!0),s==null||s(X)},ve=X=>{D.current&&(D.current=!1),A(!1),i==null||i(X)},Re=X=>{_(""),G(),N.current&&yC(N.current,X,r)},ne=Y&&`${c}-out-of-range`,re=()=>{const X=Vn(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return K.createElement("input",bC({autoComplete:n},X,{onChange:te,onFocus:ge,onBlur:ve,onKeyDown:ae,onKeyUp:de,className:ee(c,{[`${c}-disabled`]:u},x==null?void 0:x.input),style:P==null?void 0:P.input,ref:N,size:h,type:w,onCompositionStart:ue=>{L.current=!0,F==null||F(ue)},onCompositionEnd:Z}))},ce=()=>{const X=Number(H)>0;if(C||j.show){const ue=j.showFormatter?j.showFormatter({value:U,count:B,maxLength:H}):`${B}${X?` / ${H}`:""}`;return K.createElement(K.Fragment,null,j.show&&K.createElement("span",{className:ee(`${c}-show-count-suffix`,{[`${c}-show-count-has-suffix`]:!!C},x==null?void 0:x.count),style:{...P==null?void 0:P.count}},ue),C)}return null};return K.createElement(xG,bC({},E,{prefixCls:c,className:ee(g,ne),handleReset:Re,value:U,focused:I,triggerFocus:G,suffix:ce(),disabled:u,classes:S,classNames:x,styles:P,ref:k}),re())}),EG=e=>{let t;return typeof e=="object"&&(e!=null&&e.clearIcon)?t=e:e&&(t={clearIcon:K.createElement(hv,null)}),t};function PG(e,t){const n=p.useRef([]),r=()=>{n.current.push(setTimeout(()=>{var s,i,o,a;(s=e.current)!=null&&s.input&&((i=e.current)==null?void 0:i.input.getAttribute("type"))==="password"&&((o=e.current)!=null&&o.input.hasAttribute("value"))&&((a=e.current)==null||a.input.removeAttribute("value"))}))};return p.useEffect(()=>(t&&r(),()=>n.current.forEach(s=>{s&&clearTimeout(s)})),[]),r}function UJ(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}const fg=p.forwardRef((e,t)=>{const{prefixCls:n,bordered:r=!0,status:s,size:i,disabled:o,onBlur:a,onFocus:l,suffix:c,allowClear:u,addonAfter:h,addonBefore:g,className:m,style:C,styles:v,rootClassName:b,onChange:w,classNames:S,variant:x,...P}=e,{getPrefixCls:F,direction:M,allowClear:E,autoComplete:I,className:A,style:L,classNames:D,styles:N}=Hn("input"),k=F("input",n),G=p.useRef(null),$=Rs(k),[_,U]=cG(k,b);uG(k,$);const{compactSize:V,compactItemClassnames:W}=qc(k,M),j=Oi(we=>i??V??we),H=K.useContext(so),B=o??H,Y={...e,size:j,disabled:B},[J,te]=Kn([D,S],[N,v],{props:Y}),{status:Z,hasFeedback:ae,feedbackIcon:de}=p.useContext(Di),ge=Ev(Z,s),ve=UJ(e)||!!ae;p.useRef(ve);const Re=PG(G,!0),ne=we=>{Re(),a==null||a(we)},re=we=>{Re(),l==null||l(we)},ce=we=>{Re(),w==null||w(we)},X=(ae||c)&&K.createElement(K.Fragment,null,c,ae&&de),ue=EG(u??E),[fe,oe]=rP("input",x,r);return K.createElement(_J,{ref:xs(t,G),prefixCls:k,autoComplete:I,...P,disabled:B,onBlur:ne,onFocus:re,style:{...te.root,...L,...C},styles:te,suffix:X,allowClear:ue,className:ee(m,b,U,$,W,A,J.root),onChange:ce,addonBefore:g&&K.createElement(od,{form:!0,space:!0},g),addonAfter:h&&K.createElement(od,{form:!0,space:!0},h),classNames:{...J,input:ee({[`${k}-sm`]:j==="small",[`${k}-lg`]:j==="large",[`${k}-rtl`]:M==="rtl"},J.input,_),variant:ee({[`${k}-${fe}`]:oe},Np(k,ge)),affixWrapper:ee({[`${k}-affix-wrapper-sm`]:j==="small",[`${k}-affix-wrapper-lg`]:j==="large",[`${k}-affix-wrapper-rtl`]:M==="rtl"},_),wrapper:ee({[`${k}-group-rtl`]:M==="rtl"},_),groupWrapper:ee({[`${k}-group-wrapper-sm`]:j==="small",[`${k}-group-wrapper-lg`]:j==="large",[`${k}-group-wrapper-rtl`]:M==="rtl",[`${k}-group-wrapper-${fe}`]:oe},Np(`${k}-group-wrapper`,ge,ae),_)}})});function A1(e){return["small","middle","large"].includes(e)}function L1(e){return e?typeof e=="number"&&!Number.isNaN(e):!1}const FG=K.createContext({latestIndex:0}),jJ=FG.Provider,KJ=e=>{const{className:t,prefix:n,index:r,children:s,separator:i,style:o,classNames:a,styles:l}=e,{latestIndex:c}=p.useContext(FG);return qs(s)?p.createElement(p.Fragment,null,p.createElement("div",{className:t,style:o},s),r{const{componentCls:t,antCls:n}=e;return{[t]:{display:"inline-flex","&-rtl":{direction:"rtl"},"&-vertical":{flexDirection:"column"},"&-align":{flexDirection:"column","&-center":{alignItems:"center"},"&-start":{alignItems:"flex-start"},"&-end":{alignItems:"flex-end"},"&-baseline":{alignItems:"baseline"}},[`${t}-item:empty`]:{display:"none"},[`${t}-item > ${n}-badge-not-a-wrapper:only-child`]:{display:"block"}}}},XJ=e=>{const{componentCls:t}=e;return{[t]:{"&-gap-row-small":{rowGap:e.spaceGapSmallSize},"&-gap-row-middle":{rowGap:e.spaceGapMiddleSize},"&-gap-row-large":{rowGap:e.spaceGapLargeSize},"&-gap-col-small":{columnGap:e.spaceGapSmallSize},"&-gap-col-middle":{columnGap:e.spaceGapMiddleSize},"&-gap-col-large":{columnGap:e.spaceGapLargeSize}}}},YJ=Ln("Space",e=>{const t=En(e,{spaceGapSmallSize:e.paddingXS,spaceGapMiddleSize:e.padding,spaceGapLargeSize:e.paddingLG});return[qJ(t),XJ(t)]},()=>({}),{resetStyle:!1}),QJ=p.forwardRef((e,t)=>{const{getPrefixCls:n,direction:r,size:s,className:i,style:o,classNames:a,styles:l}=Hn("space"),{size:c=s??"small",align:u,className:h,rootClassName:g,children:m,direction:C,orientation:v,prefixCls:b,split:w,separator:S,style:x,vertical:P,wrap:F=!1,classNames:M,styles:E,...I}=e,[A,L]=Array.isArray(c)?c:[c,c],D=A1(L),N=A1(A),k=L1(L),G=L1(A),$=Tr(m,{keepEmpty:!0}),[_,U]=GE(v,P,C),V=u===void 0&&!U?"center":u,W=S??w,j=n("space",b),[H,B]=YJ(j),Y={...e,size:c,orientation:_,align:V},[J,te]=Kn([a,M],[l,E],{props:Y}),Z=ee(j,i,H,`${j}-${_}`,{[`${j}-rtl`]:r==="rtl",[`${j}-align-${V}`]:V,[`${j}-gap-row-${L}`]:D,[`${j}-gap-col-${A}`]:N},h,g,B,J.root),ae=ee(`${j}-item`,J.item),de=$.map((Re,ne)=>{const re=(Re==null?void 0:Re.key)||`${ae}-${ne}`;return p.createElement(KJ,{prefix:j,classNames:J,styles:te,className:ae,key:re,index:ne,separator:W,style:te.item},Re)}),ge=p.useMemo(()=>({latestIndex:$.reduce((ne,re,ce)=>qs(re)?ce:ne,0)}),[$]);if($.length===0)return null;const ve={};return F&&(ve.flexWrap="wrap"),!N&&G&&(ve.columnGap=A),!D&&k&&(ve.rowGap=L),p.createElement("div",{ref:t,className:Z,style:{...ve,...te.root,...o,...x},...I},p.createElement(jJ,{value:ge},de))}),Dv=QJ;Dv.Compact=EB;Dv.Addon=HJ;const TG=e=>{const{getPopupContainer:t,getPrefixCls:n,direction:r}=p.useContext(Kt),{prefixCls:s,type:i="default",danger:o,disabled:a,loading:l,onClick:c,htmlType:u,children:h,className:g,menu:m,arrow:C,autoFocus:v,trigger:b,align:w,open:S,onOpenChange:x,placement:P,getPopupContainer:F,href:M,icon:E=p.createElement(gP,null),title:I,buttonsRender:A=ve=>ve,mouseEnterDelay:L,mouseLeaveDelay:D,overlayClassName:N,overlayStyle:k,destroyOnHidden:G,destroyPopupOnHide:$,dropdownRender:_,popupRender:U,...V}=e,W=n("dropdown",s),j=`${W}-button`,B={menu:m,arrow:C,autoFocus:v,align:w,disabled:a,trigger:a?[]:b,onOpenChange:x,getPopupContainer:F||t,mouseEnterDelay:L,mouseLeaveDelay:D,classNames:{root:N},styles:{root:k},destroyOnHidden:G,popupRender:U||_},{compactSize:Y,compactItemClassnames:J}=qc(W,r),te=ee(j,J,g);"destroyPopupOnHide"in e&&(B.destroyPopupOnHide=$),"open"in e&&(B.open=S),"placement"in e?B.placement=P:B.placement=r==="rtl"?"bottomLeft":"bottomRight";const Z=p.createElement(Mo,{type:i,danger:o,disabled:a,loading:l,onClick:c,htmlType:u,href:M,title:I},h),ae=p.createElement(Mo,{type:i,danger:o,icon:E}),[de,ge]=A([Z,ae]);return p.createElement(Dv.Compact,{className:te,size:Y,block:!0,...V},de,p.createElement(ug,{...B},ge))};TG.__ANT_BUTTON=!0;const SP=ug;SP.Button=TG;const ZJ=e=>{const{getPrefixCls:t,direction:n}=p.useContext(Kt),{prefixCls:r,className:s}=e,i=t("input-group",r),o=t("input"),[a,l]=uG(o),c=ee(i,l,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:n==="rtl"},a,s),u=p.useContext(Di),h=p.useMemo(()=>({...u,isFormItemInput:!1}),[u]);return p.createElement(Di.Provider,{value:h},p.createElement(Dv.Compact,{className:c,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},e.children))},JJ=e=>{const{componentCls:t,paddingXS:n}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:n,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:e.colorText},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},eee=Ln(["Input","OTP"],e=>{const t=En(e,hg(e));return JJ(t)},pg),tee=p.forwardRef((e,t)=>{const{className:n,value:r,onChange:s,onActiveChange:i,index:o,mask:a,onFocus:l,...c}=e,{getPrefixCls:u}=p.useContext(Kt),h=u("otp"),g=typeof a=="string"?a:r,m=p.useRef(null);p.useImperativeHandle(t,()=>m.current);const C=S=>{s(o,S.target.value)},v=()=>{dn(()=>{var x;const S=(x=m.current)==null?void 0:x.input;document.activeElement===S&&S&&S.select()})},b=S=>{l==null||l(S),v()},w=S=>{const{key:x,ctrlKey:P,metaKey:F}=S;x==="ArrowLeft"?i(o-1):x==="ArrowRight"?i(o+1):x==="z"&&(P||F)?S.preventDefault():x==="Backspace"&&!r&&i(o-1),v()};return p.createElement("span",{className:`${h}-input-wrapper`,role:"presentation"},a&&r!==""&&r!==void 0&&p.createElement("span",{className:`${h}-mask-icon`,"aria-hidden":"true"},g),p.createElement(fg,{"aria-label":`OTP Input ${o+1}`,type:a===!0?"password":"text",...c,ref:m,value:r,onInput:C,onFocus:b,onKeyDown:w,onMouseDown:v,onMouseUp:v,className:ee(n,{[`${h}-mask-input`]:a})}))});function Jf(e){return(e||"").split("")}const nee=e=>{const{index:t,prefixCls:n,separator:r,className:s,style:i}=e,o=typeof r=="function"?r(t):r;return o?p.createElement("span",{className:ee(`${n}-separator`,s),style:i},o):null},ree=p.forwardRef((e,t)=>{const{prefixCls:n,length:r=6,size:s,defaultValue:i,value:o,onChange:a,formatter:l,separator:c,variant:u,disabled:h,status:g,autoFocus:m,mask:C,type:v,autoComplete:b,onInput:w,onFocus:S,inputMode:x,classNames:P,styles:F,className:M,style:E,...I}=e,{classNames:A,styles:L,getPrefixCls:D,direction:N,style:k,className:G}=Hn("otp"),$=D("otp",n),_={...e,length:r},[U,V]=Kn([A,P],[L,F],{props:_}),W=Mr(I,{aria:!0,data:!0,attr:!0}),[j,H]=eee($),B=Oi(fe=>s??fe),Y=p.useContext(Di),J=Ev(Y.status,g),te=p.useMemo(()=>({...Y,status:J,hasFeedback:!1,feedbackIcon:null}),[Y,J]),Z=p.useRef(null),ae=p.useRef({});p.useImperativeHandle(t,()=>({focus:()=>{var fe;(fe=ae.current[0])==null||fe.focus()},blur:()=>{var fe;for(let oe=0;oel?l(fe):fe,[ge,ve]=p.useState(()=>Jf(de(i||"")));p.useEffect(()=>{o!==void 0&&ve(Jf(o))},[o]);const Re=Yt(fe=>{ve(fe),w&&w(fe),a&&fe.length===r&&fe.every(oe=>oe)&&fe.some((oe,we)=>ge[we]!==oe)&&a(fe.join(""))}),ne=Yt((fe,oe)=>{let we=nn(ge);for(let Ae=0;Ae=0&&!we[Ae];Ae-=1)we.pop();const Be=de(we.map(Ae=>Ae||" ").join(""));return we=Jf(Be).map((Ae,Pe)=>Ae===" "&&!we[Pe]?we[Pe]:Ae),we}),re=(fe,oe)=>{var Ae;const we=ne(fe,oe),Be=Math.min(fe+oe.length,r-1);Be!==fe&&we[fe]!==void 0&&((Ae=ae.current[Be])==null||Ae.focus()),Re(we)},ce=fe=>{var oe;(oe=ae.current[fe])==null||oe.focus()},X=(fe,oe)=>{var we,Be,Ae;for(let Pe=0;Pe{const we=`otp-${oe}`,Be=ge[oe]||"";return p.createElement(p.Fragment,{key:we},p.createElement(tee,{ref:Ae=>{ae.current[oe]=Ae},index:oe,size:B,htmlSize:1,className:ee(U.input,`${$}-input`),style:V.input,onChange:re,value:Be,onActiveChange:ce,autoFocus:oe===0&&m,onFocus:Ae=>X(Ae,oe),...ue}),oep.createElement(vn,V0({},e,{ref:t,icon:see})),oee=p.forwardRef(iee);var aee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"};function H0(){return H0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,H0({},e,{ref:t,icon:aee})),cee=p.forwardRef(lee),uee=e=>e?p.createElement(cee,null):p.createElement(oee,null),dee={click:"onClick",hover:"onMouseOver"},hee=p.forwardRef((e,t)=>{const{disabled:n,action:r="click",visibilityToggle:s=!0,iconRender:i=uee,suffix:o}=e,a=p.useContext(so),l=n??a,c=typeof s=="object"&&s.visible!==void 0,[u,h]=p.useState(()=>c?s.visible:!1),g=p.useRef(null);p.useEffect(()=>{c&&h(s.visible)},[c,s]);const m=PG(g),C=()=>{var N;if(l)return;u&&m();const D=!u;h(D),typeof s=="object"&&((N=s.onVisibleChange)==null||N.call(s,D))},v=D=>{const N=dee[r]||"",k=i(u),G={[N]:C,className:`${D}-icon`,key:"passwordIcon",onMouseDown:$=>{$.preventDefault()},onMouseUp:$=>{$.preventDefault()}};return p.cloneElement(p.isValidElement(k)?k:p.createElement("span",null,k),G)},{className:b,prefixCls:w,inputPrefixCls:S,size:x,...P}=e,{getPrefixCls:F}=p.useContext(Kt),M=F("input",S),E=F("input-password",w),I=s&&v(E),A=ee(E,b,{[`${E}-${x}`]:!!x}),L={...Vn(P,["suffix","iconRender","visibilityToggle"]),type:u?"text":"password",className:A,prefixCls:M,suffix:p.createElement(p.Fragment,null,I,o)};return x&&(L.size=x),p.createElement(fg,{ref:xs(t,g),...L})}),pee=e=>{const{componentCls:t}=e,n=`${t}-btn`;return{[t]:{width:"100%",[n]:{"&-filled":{background:e.colorFillTertiary,"&:not(:disabled)":{"&:hover":{background:e.colorFillSecondary},"&:active":{background:e.colorFill}}}}}}},gee=Ln(["Input","Search"],e=>[pee(e)]),fee=p.forwardRef((e,t)=>{const{prefixCls:n,inputPrefixCls:r,className:s,size:i,style:o,enterButton:a=!1,addonAfter:l,loading:c,disabled:u,onSearch:h,onChange:g,onCompositionStart:m,onCompositionEnd:C,variant:v,onPressEnter:b,classNames:w,styles:S,hidden:x,...P}=e,{direction:F,getPrefixCls:M,classNames:E,styles:I}=Hn("inputSearch"),A={...e,enterButton:a},[L,D]=Kn([E,w],[I,S],{props:A},{button:{_default:"root"}}),N=p.useRef(!1),k=M("input-search",n),G=M("input",r),[$,_]=gee(k),{compactSize:U}=qc(k,F),V=Oi(X=>i??U??X),W=p.useRef(null),j=X=>{X!=null&&X.target&&X.type==="click"&&h&&h(X.target.value,X,{source:"clear"}),g==null||g(X)},H=X=>{var ue;document.activeElement===((ue=W.current)==null?void 0:ue.input)&&X.preventDefault()},B=X=>{var ue,fe;h&&h((fe=(ue=W.current)==null?void 0:ue.input)==null?void 0:fe.value,X,{source:"input"})},Y=X=>{N.current||c||(b==null||b(X),B(X))},J=typeof a=="boolean"?p.createElement(iP,null):null,te=`${k}-btn`,Z=ee(te,{[`${te}-${v}`]:v});let ae;const de=a||{},ge=de.type&&de.type.__ANT_BUTTON===!0;ge||de.type==="button"?ae=Xr(de,{onMouseDown:H,onClick:X=>{var ue,fe;(fe=(ue=de==null?void 0:de.props)==null?void 0:ue.onClick)==null||fe.call(ue,X),B(X)},key:"enterButton",...ge?{className:Z,size:V}:{}}):ae=p.createElement(Mo,{classNames:L.button,styles:D.button,className:Z,color:a?"primary":"default",size:V,disabled:u,key:"enterButton",onMouseDown:H,onClick:B,loading:c,icon:J,variant:v==="borderless"||v==="filled"||v==="underlined"?"text":a?"solid":void 0},a),l&&(ae=[ae,Xr(l,{key:"addonAfter"})]);const ve=ee(k,_,{[`${k}-rtl`]:F==="rtl",[`${k}-${V}`]:!!V,[`${k}-with-button`]:!!a},s,$,L.root),Re=X=>{N.current=!0,m==null||m(X)},ne=X=>{N.current=!1,C==null||C(X)},re=Mr(P,{data:!0}),ce=Vn({...P,classNames:Vn(L,["button","root"]),styles:Vn(D,["button","root"]),prefixCls:G,type:"search",size:V,variant:v,onPressEnter:Y,onCompositionStart:Re,onCompositionEnd:ne,onChange:j,disabled:u},Object.keys(re));return p.createElement(EB,{className:ve,style:{...o,...D.root},...re,hidden:x},p.createElement(fg,{ref:xs(W,t),...ce}),ae)}),mee=` 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; `,Cee=["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"],zw={};let ri;function vee(e,t=!1){const n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&zw[n])return zw[n];const r=window.getComputedStyle(e),s=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),l={sizingStyle:Cee.map(c=>`${c}:${r.getPropertyValue(c)}`).join(";"),paddingSize:i,borderSize:o,boxSizing:s};return t&&n&&(zw[n]=l),l}function yee(e,t=!1,n=null,r=null){ri||(ri=document.createElement("textarea"),ri.setAttribute("tab-index","-1"),ri.setAttribute("aria-hidden","true"),ri.setAttribute("name","hiddenTextarea"),document.body.appendChild(ri)),e.getAttribute("wrap")?ri.setAttribute("wrap",e.getAttribute("wrap")):ri.removeAttribute("wrap");const{paddingSize:s,borderSize:i,boxSizing:o,sizingStyle:a}=vee(e,t);ri.setAttribute("style",`${a};${mee}`),ri.value=e.value||e.placeholder||"";let l,c,u,h=ri.scrollHeight;if(o==="border-box"?h+=i:o==="content-box"&&(h-=s),n!==null||r!==null){ri.value=" ";const m=ri.scrollHeight-s;n!==null&&(l=m*n,o==="border-box"&&(l=l+s+i),h=Math.max(l,h)),r!==null&&(c=m*r,o==="border-box"&&(c=c+s+i),u=h>c?"":"hidden",h=Math.min(c,h))}const g={height:h,overflowY:u,resize:"none"};return l&&(g.minHeight=l),c&&(g.maxHeight=c),g}function z0(){return z0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,defaultValue:r,value:s,autoSize:i,onResize:o,className:a,style:l,disabled:c,onChange:u,onInternalAutoSize:h,...g}=e,[m,C]=ir(r,s),v=m??"",b=$=>{C($.target.value),u==null||u($)},w=p.useRef();p.useImperativeHandle(t,()=>({textArea:w.current}));const[S,x]=p.useMemo(()=>i&&typeof i=="object"?[i.minRows,i.maxRows]:[],[i]),P=!!i,[F,M]=p.useState(Uw),[E,I]=p.useState(),A=()=>{M(Ww)};on(()=>{P&&A()},[s,S,x,P]),on(()=>{if(F===Ww)M(_w);else if(F===_w){const $=yee(w.current,!1,S,x);M(Uw),I($)}},[F]);const L=p.useRef(),D=()=>{dn.cancel(L.current)},N=$=>{F===Uw&&(o==null||o($),i&&(D(),L.current=dn(()=>{A()})))};p.useEffect(()=>D,[]);const G={...l,...P?E:null};return(F===Ww||F===_w)&&(G.overflowY="hidden",G.overflowX="hidden"),p.createElement(Vs,{onResize:N,disabled:!(i||o)},p.createElement("textarea",z0({},g,{ref:w,style:G,className:ee(n,a,{[`${n}-disabled`]:c}),disabled:c,value:v,onChange:b})))});function W0(){return W0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[D,N]=ir(e,t),k=D==null?"":String(D),[G,$]=K.useState(!1),_=K.useRef(!1),[U,V]=K.useState(null),W=p.useRef(null),j=p.useRef(null),H=()=>{var Pe;return(Pe=j.current)==null?void 0:Pe.textArea},B=()=>{H().focus()};p.useImperativeHandle(L,()=>{var Pe;return{resizableTextArea:j.current,focus:B,blur:()=>{H().blur()},nativeElement:((Pe=W.current)==null?void 0:Pe.nativeElement)||H()}}),p.useEffect(()=>{$(Pe=>!v&&Pe)},[v]);const[Y,J]=K.useState(null);K.useEffect(()=>{Y&&H().setSelectionRange(...Y)},[Y]);const te=RG(g,h),Z=te.max??o,ae=Number(Z)>0,de=te.strategy(k),ge=!!Z&&de>Z,ve=(Pe,_e)=>{let ze=_e;!_.current&&te.exceedFormatter&&te.max&&te.strategy(_e)>te.max&&(ze=te.exceedFormatter(_e,{max:te.max}),_e!==ze&&J([H().selectionStart||0,H().selectionEnd||0])),N(ze),yC(Pe.currentTarget,Pe,s,ze)},Re=Pe=>{_.current=!0,a==null||a(Pe)},ne=Pe=>{_.current=!1,ve(Pe,Pe.currentTarget.value),l==null||l(Pe)},re=Pe=>{ve(Pe,Pe.target.value)},ce=Pe=>{Pe.key==="Enter"&&F&&!Pe.nativeEvent.isComposing&&F(Pe),I==null||I(Pe)},X=Pe=>{$(!0),n==null||n(Pe)},ue=Pe=>{$(!1),r==null||r(Pe)},fe=Pe=>{N(""),B(),yC(H(),Pe,s)};let oe=c,we;te.show&&(te.showFormatter?we=te.showFormatter({value:k,count:de,maxLength:Z}):we=`${de}${ae?` / ${Z}`:""}`,oe=K.createElement(K.Fragment,null,oe,K.createElement("span",{className:ee(`${u}-data-count`,w==null?void 0:w.count),style:S==null?void 0:S.count},we)));const Be=Pe=>{var _e;x==null||x(Pe),(_e=H())!=null&&_e.style.height&&V(!0)},Ae=!E&&!h&&!i;return K.createElement(xG,{ref:W,value:k,allowClear:i,handleReset:fe,suffix:oe,prefixCls:u,classNames:{...w,affixWrapper:ee(w==null?void 0:w.affixWrapper,{[`${u}-show-count`]:h,[`${u}-textarea-allow-clear`]:i})},disabled:v,focused:G,className:ee(m,ge&&`${u}-out-of-range`),style:{...C,...U&&!Ae?{height:"auto"}:{}},dataAttrs:{affixWrapper:{"data-count":typeof we=="string"?we:void 0}},hidden:b,readOnly:M,onClear:P},K.createElement(bee,W0({},A,{autoSize:E,maxLength:o,onKeyDown:ce,onChange:re,onFocus:X,onBlur:ue,onCompositionStart:Re,onCompositionEnd:ne,className:ee(w==null?void 0:w.textarea),style:{resize:C==null?void 0:C.resize,...S==null?void 0:S.textarea},disabled:v,prefixCls:u,onResize:Be,ref:j,readOnly:M})))}),See=e=>{const{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}}}}}},xee=Ln(["Input","TextArea"],e=>{const t=En(e,hg(e));return See(t)},pg,{resetFont:!1}),MG=p.forwardRef((e,t)=>{var X;const{prefixCls:n,bordered:r=!0,size:s,disabled:i,status:o,allowClear:a,classNames:l,rootClassName:c,className:u,style:h,styles:g,variant:m,showCount:C,onMouseDown:v,onResize:b,...w}=e,{getPrefixCls:S,direction:x,allowClear:P,autoComplete:F,className:M,style:E,classNames:I,styles:A}=Hn("textArea"),L=p.useContext(so),D=i??L,{status:N,hasFeedback:k,feedbackIcon:G}=p.useContext(Di),$=Ev(N,o),[_,U]=Kn([I,l],[A,g],{props:e}),V=p.useRef(null);p.useImperativeHandle(t,()=>{var ue,fe;return{resizableTextArea:(ue=V.current)==null?void 0:ue.resizableTextArea,focus:oe=>{var we,Be;NB((Be=(we=V.current)==null?void 0:we.resizableTextArea)==null?void 0:Be.textArea,oe)},blur:()=>{var oe;return(oe=V.current)==null?void 0:oe.blur()},nativeElement:((fe=V.current)==null?void 0:fe.nativeElement)||null}});const W=S("input",n),j=Rs(W),[H,B]=cG(W,c);xee(W,j);const{compactSize:Y,compactItemClassnames:J}=qc(W,x),te=Oi(ue=>s??Y??ue),[Z,ae]=rP("textArea",m,r),de=EG(a??P),[ge,ve]=p.useState(!1),[Re,ne]=p.useState(!1),re=ue=>{ve(!0),v==null||v(ue);const fe=()=>{ve(!1),document.removeEventListener("mouseup",fe)};document.addEventListener("mouseup",fe)},ce=ue=>{var fe,oe;if(b==null||b(ue),ge&&typeof getComputedStyle=="function"){const we=(oe=(fe=V.current)==null?void 0:fe.nativeElement)==null?void 0:oe.querySelector("textarea");we&&getComputedStyle(we).resize==="both"&&ne(!0)}};return p.createElement(wee,{autoComplete:F,...w,style:{...U.root,...E,...h},styles:U,disabled:D,allowClear:de,className:ee(B,j,u,c,J,M,_.root,{[`${W}-textarea-affix-wrapper-resize-dirty`]:Re}),classNames:{..._,textarea:ee({[`${W}-sm`]:te==="small",[`${W}-lg`]:te==="large"},H,_.textarea,ge&&`${W}-mouse-active`),variant:ee({[`${W}-${Z}`]:ae},Np(W,$)),affixWrapper:ee(`${W}-textarea-affix-wrapper`,{[`${W}-affix-wrapper-rtl`]:x==="rtl",[`${W}-affix-wrapper-sm`]:te==="small",[`${W}-affix-wrapper-lg`]:te==="large",[`${W}-textarea-show-count`]:C||((X=e.count)==null?void 0:X.show)},H)},prefixCls:W,suffix:k&&p.createElement("span",{className:`${W}-textarea-suffix`},G),showCount:C,ref:V,onResize:ce,onMouseDown:re})}),mg=fg;mg.Group=ZJ;mg.Search=fee;mg.TextArea=MG;mg.Password=hee;mg.OTP=ree;var Ree={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M272.9 512l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L186.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H532c6.7 0 10.4-7.7 6.3-12.9L272.9 512zm304 0l265.4-339.1c4.1-5.2.4-12.9-6.3-12.9h-77.3c-4.9 0-9.6 2.3-12.6 6.1L490.8 492.3a31.99 31.99 0 000 39.5l255.3 326.1c3 3.9 7.7 6.1 12.6 6.1H836c6.7 0 10.4-7.7 6.3-12.9L576.9 512z"}}]},name:"double-left",theme:"outlined"};function _0(){return _0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,_0({},e,{ref:t,icon:Ree})),O1=p.forwardRef(Eee);var Pee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};function U0(){return U0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,U0({},e,{ref:t,icon:Pee})),k1=p.forwardRef(Fee),Tee={items_per_page:"条/页",jump_to:"跳至",jump_to_confirm:"确定",page:"页",prev_page:"上一页",next_page:"下一页",prev_5:"向前 5 页",next_5:"向后 5 页",prev_3:"向前 3 页",next_3:"向后 3 页",page_size:"页码"},Mee=[10,20,50,100],Iee=e=>{const{pageSizeOptions:t=Mee,locale:n,changeSize:r,pageSize:s,goButton:i,quickGo:o,rootPrefixCls:a,disabled:l,buildOptionText:c,showSizeChanger:u,sizeChangerRender:h}=e,[g,m]=K.useState(""),C=K.useMemo(()=>!g||Number.isNaN(g)?void 0:Number(g),[g]),v=typeof c=="function"?c:I=>`${I} ${n.items_per_page}`,b=I=>{const A=I.target.value;/^\d*$/.test(A)&&m(A)},w=I=>{i||g===""||(m(""),!(I.relatedTarget&&(I.relatedTarget.className.includes(`${a}-item-link`)||I.relatedTarget.className.includes(`${a}-item`)))&&(o==null||o(C)))},S=I=>{g!==""&&(I.keyCode===Et.ENTER||I.type==="click")&&(m(""),o==null||o(C))},x=()=>t.some(I=>I.toString()===s.toString())?t:t.concat([s]).sort((I,A)=>{const L=Number.isNaN(Number(I))?0:Number(I),D=Number.isNaN(Number(A))?0:Number(A);return L-D}),P=`${a}-options`;if(!u&&!o)return null;let F=null,M=null,E=null;return u&&h&&(F=h({disabled:l,size:s,onSizeChange:I=>{r==null||r(Number(I))},"aria-label":n.page_size,className:`${P}-size-changer`,options:x().map(I=>({label:v(I),value:I}))})),o&&(i&&(E=typeof i=="boolean"?K.createElement("button",{type:"button",onClick:S,onKeyUp:S,disabled:l,className:`${P}-quick-jumper-button`},n.jump_to_confirm):K.createElement("span",{onClick:S,onKeyUp:S},i)),M=K.createElement("div",{className:`${P}-quick-jumper`},n.jump_to,K.createElement("input",{disabled:l,type:"text",value:g,onChange:b,onKeyUp:S,onBlur:w,"aria-label":n.page}),n.page,E)),K.createElement("li",{className:P},F,M)},Ah=e=>{const{rootPrefixCls:t,page:n,active:r,className:s,style:i,showTitle:o,onClick:a,onKeyPress:l,itemRender:c}=e,u=`${t}-item`,h=ee(u,`${u}-${n}`,{[`${u}-active`]:r,[`${u}-disabled`]:!n},s),g=()=>{a(n)},m=v=>{l(v,a,n)},C=c(n,"page",K.createElement("a",{rel:"nofollow"},n));return C?K.createElement("li",{title:o?String(n):null,className:h,style:i,onClick:g,onKeyDown:m,tabIndex:0},C):null};function Qa(){return Qa=Object.assign?Object.assign.bind():function(e){for(var t=1;tn;function N1(){}function B1(e){const t=Number(e);return typeof t=="number"&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function Zl(e,t,n){const r=typeof e>"u"?t:e;return Math.floor((n-1)/r)+1}const Aee=e=>{const{prefixCls:t="rc-pagination",selectPrefixCls:n="rc-select",className:r,classNames:s,styles:i,current:o,defaultCurrent:a=1,total:l=0,pageSize:c,defaultPageSize:u=10,onChange:h=N1,hideOnSinglePage:g,align:m,showPrevNextJumpers:C=!0,showQuickJumper:v,showLessItems:b,showTitle:w=!0,onShowSizeChange:S=N1,locale:x=Tee,style:P,totalBoundaryShowSizeChanger:F=50,disabled:M,simple:E,showTotal:I,showSizeChanger:A=l>F,sizeChangerRender:L,pageSizeOptions:D,itemRender:N=Dee,jumpPrevIcon:k,jumpNextIcon:G,prevIcon:$,nextIcon:_}=e,U=K.useRef(null),[V,W]=ir(u,c),[j,H]=ir(a,o),B=Math.max(1,Math.min(j,Zl(void 0,V,l))),[Y,J]=K.useState(B);p.useEffect(()=>{J(B)},[B]);const te=Math.max(1,B-(b?3:5)),Z=Math.min(Zl(void 0,V,l),B+(b?3:5));function ae(Ve,st){let Ue=Ve||K.createElement("button",{type:"button","aria-label":st,className:`${t}-item-link`});return typeof Ve=="function"&&(Ue=K.createElement(Ve,e)),Ue}function de(Ve){const st=Ve.target.value,Ue=Zl(void 0,V,l);let ke;return st===""?ke=st:Number.isNaN(Number(st))?ke=Y:st>=Ue?ke=Ue:ke=Number(st),ke}function ge(Ve){return B1(Ve)&&Ve!==B&&B1(l)&&l>0}const ve=l>V?v:!1;function Re(Ve){(Ve.keyCode===Et.UP||Ve.keyCode===Et.DOWN)&&Ve.preventDefault()}function ne(Ve){const st=de(Ve);switch(st!==Y&&J(st),Ve.keyCode){case Et.ENTER:X(st);break;case Et.UP:X(st-1);break;case Et.DOWN:X(st+1);break}}function re(Ve){X(de(Ve))}function ce(Ve){const st=Zl(Ve,V,l),Ue=B>st&&st!==0?st:B;W(Ve),J(Ue),S==null||S(B,Ve),H(Ue),h==null||h(Ue,Ve)}function X(Ve){if(ge(Ve)&&!M){const st=Zl(void 0,V,l);let Ue=Ve;return Ve>st?Ue=st:Ve<1&&(Ue=1),Ue!==Y&&J(Ue),H(Ue),h==null||h(Ue,V),Ue}return B}const ue=B>1,fe=Bl?l:B*V]));let qe=null;const Ge=Zl(void 0,V,l);if(g&&l<=V)return null;const Ce=[],Oe={rootPrefixCls:t,onClick:X,onKeyPress:Pe,showTitle:w,itemRender:N,page:-1,className:s==null?void 0:s.item,style:i==null?void 0:i.item},ot=B-1>0?B-1:0,ut=B+1=jt*2&&B!==3&&(Ce[0]=K.cloneElement(Ce[0],{className:ee(`${t}-item-after-jump-prev`,Ce[0].props.className)}),Ce.unshift(Ke)),Ge-B>=jt*2&&B!==Ge-2){const ie=Ce[Ce.length-1];Ce[Ce.length-1]=K.cloneElement(ie,{className:ee(`${t}-item-before-jump-next`,ie.props.className)}),Ce.push(qe)}q!==1&&Ce.unshift(K.createElement(Ah,Qa({},Oe,{key:1,page:1}))),Q!==Ge&&Ce.push(K.createElement(Ah,Qa({},Oe,{key:Ge,page:Ge})))}let qt=gt(ot);if(qt){const Ve=!ue||!Ge;qt=K.createElement("li",{title:w?x.prev_page:null,onClick:oe,tabIndex:Ve?null:0,onKeyDown:_e,className:ee(`${t}-prev`,s==null?void 0:s.item,{[`${t}-disabled`]:Ve}),style:i==null?void 0:i.item,"aria-disabled":Ve},qt)}let Ot=Ye(ut);if(Ot){let Ve,st;E?(Ve=!fe,st=ue?0:null):(Ve=!fe||!Ge,st=Ve?null:0),Ot=K.createElement("li",{title:w?x.next_page:null,onClick:we,tabIndex:st,onKeyDown:ze,className:ee(`${t}-next`,s==null?void 0:s.item,{[`${t}-disabled`]:Ve}),style:i==null?void 0:i.item,"aria-disabled":Ve},Ot)}const Vt=ee(t,r,{[`${t}-start`]:m==="start",[`${t}-center`]:m==="center",[`${t}-end`]:m==="end",[`${t}-simple`]:E,[`${t}-disabled`]:M});return K.createElement("ul",Qa({className:Vt,style:P,ref:U},De),je,qt,E?Nt:Ce,Ot,K.createElement(Iee,{locale:x,rootPrefixCls:t,disabled:M,selectPrefixCls:n,changeSize:ce,pageSize:V,pageSizeOptions:D,quickGo:ve?X:null,goButton:Gt,showSizeChanger:A,sizeChangerRender:L}))},Lee=e=>{const{componentCls:t}=e;return{[`${t}-disabled`]:{"&, &:hover":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}},"&:focus-visible":{cursor:"not-allowed",[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed"}}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-item`]:{cursor:"not-allowed",backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"},a:{color:e.colorTextDisabled,backgroundColor:"transparent",border:"none",cursor:"not-allowed"},"&-active":{borderColor:e.colorBorder,backgroundColor:e.itemActiveBgDisabled,"&:hover, &:active":{backgroundColor:e.itemActiveBgDisabled},a:{color:e.itemActiveColorDisabled}}},[`${t}-item-link`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:hover, &:active":{backgroundColor:"transparent"},[`${t}-simple&`]:{backgroundColor:"transparent","&:hover, &:active":{backgroundColor:"transparent"}}},[`${t}-simple-pager`]:{color:e.colorTextDisabled},[`${t}-jump-prev, ${t}-jump-next`]:{[`${t}-item-link-icon`]:{opacity:0},[`${t}-item-ellipsis`]:{opacity:1}}}}},Oee=e=>{const{componentCls:t}=e;return{[`&${t}-small ${t}-options`]:{marginInlineStart:e.paginationMiniOptionsMarginInlineStart,"&-quick-jumper":{input:{...CP(e),width:e.paginationMiniQuickJumperInputWidth}}}}},kee=e=>{const{componentCls:t}=e;return{[`&${t}-large ${t}-options`]:{"&-quick-jumper":{input:{...mP(e)}}}}},Nee=e=>{const{componentCls:t,antCls:n}=e,[,r]=br(n,"pagination");return{[`&${t}-simple`]:{[`${t}-prev, ${t}-next`]:{height:r("item-size-actual"),lineHeight:r("item-size-actual"),verticalAlign:"top",[`${t}-item-link`]:{height:r("item-size-actual"),backgroundColor:"transparent",border:0,"&:hover":{backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive},"&::after":{height:r("item-size-actual"),lineHeight:r("item-size-actual")}}},[`${t}-simple-pager`]:{display:"inline-flex",alignItems:"center",height:r("item-size-actual"),marginInlineEnd:r("item-spacing-actual"),input:{boxSizing:"border-box",height:"100%",width:e.quickJumperInputWidth,padding:`0 ${he(e.paginationItemPaddingInline)}`,textAlign:"center",backgroundColor:e.itemInputBg,border:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadius,outline:"none",transition:`border-color ${e.motionDurationMid}`,color:"inherit","&:hover":{borderColor:e.colorPrimary},"&:focus":{borderColor:e.colorPrimaryHover,boxShadow:`${he(e.inputOutlineOffset)} 0 ${he(e.controlOutlineWidth)} ${e.controlOutline}`},"&[disabled]":{color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,cursor:"not-allowed"}}},[`&${t}-disabled`]:{[`${t}-prev, ${t}-next`]:{[`${t}-item-link`]:{"&:hover, &:active":{backgroundColor:"transparent"}}}},[`&${t}-small`]:{[`${t}-simple-pager`]:{input:{width:e.paginationMiniQuickJumperInputWidth}}}}}},Bee=e=>{const{componentCls:t,antCls:n}=e,[,r]=br(n,"pagination");return{[`${t}-jump-prev, ${t}-jump-next`]:{outline:0,[`${t}-item-container`]:{position:"relative",[`${t}-item-link-icon`]:{color:e.colorPrimary,fontSize:e.fontSizeSM,opacity:0,transition:`all ${e.motionDurationMid}`,"&-svg":{top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,margin:"auto"}},[`${t}-item-ellipsis`]:{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,display:"block",margin:"auto",color:e.colorTextDisabled,letterSpacing:e.paginationEllipsisLetterSpacing,textAlign:"center",textIndent:e.paginationEllipsisTextIndent,opacity:1,transition:`all ${e.motionDurationMid}`}},"&:hover":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0}}},[` ${t}-prev, ${t}-jump-prev, ${t}-jump-next `]:{marginInlineEnd:r("item-spacing-actual")},[` ${t}-prev, ${t}-next, ${t}-jump-prev, ${t}-jump-next `]:{display:"inline-block",minWidth:r("item-size-actual"),height:r("item-size-actual"),color:e.colorText,fontFamily:e.fontFamily,lineHeight:r("item-size-actual"),textAlign:"center",verticalAlign:"middle",listStyle:"none",borderRadius:e.borderRadius,cursor:"pointer",transition:`all ${e.motionDurationMid}`},[`${t}-prev, ${t}-next`]:{outline:0,button:{color:e.colorText,cursor:"pointer",userSelect:"none"},[`${t}-item-link`]:{display:"block",width:"100%",height:"100%",padding:0,fontSize:e.fontSizeSM,textAlign:"center",backgroundColor:"transparent",border:`${he(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:"none",transition:`all ${e.motionDurationMid}`},[`&:hover ${t}-item-link`]:{backgroundColor:e.colorBgTextHover},[`&:active ${t}-item-link`]:{backgroundColor:e.colorBgTextActive},[`&${t}-disabled:hover`]:{[`${t}-item-link`]:{backgroundColor:"transparent"}}},[`${t}-slash`]:{marginInlineEnd:e.paginationSlashMarginInlineEnd,marginInlineStart:e.paginationSlashMarginInlineStart},[`${t}-options`]:{display:"inline-block",marginInlineStart:e.margin,verticalAlign:"middle","&-size-changer":{width:"auto"},"&-quick-jumper":{display:"inline-block",height:r("item-size-actual"),marginInlineStart:e.marginXS,lineHeight:r("item-size-actual"),verticalAlign:"baseline",input:{...vP(e),...fP(e,{borderColor:e.colorBorder,hoverBorderColor:e.colorPrimaryHover,activeBorderColor:e.colorPrimary,activeShadow:e.activeShadow}),"&[disabled]":{...Iv(e)},width:e.quickJumperInputWidth,height:r("item-size-actual"),boxSizing:"border-box",margin:0,marginInlineStart:r("item-spacing-actual"),marginInlineEnd:r("item-spacing-actual")}}}}},$ee=e=>{const{componentCls:t,antCls:n}=e,[,r]=br(n,"pagination");return{[`${t}-item`]:{display:"inline-block",minWidth:r("item-size-actual"),height:r("item-size-actual"),marginInlineEnd:r("item-spacing-actual"),fontFamily:e.fontFamily,lineHeight:he(e.calc(r("item-size-actual")).sub(2).equal()),textAlign:"center",verticalAlign:"middle",listStyle:"none",backgroundColor:e.itemBg,border:`${he(e.lineWidth)} ${e.lineType} transparent`,borderRadius:e.borderRadius,outline:0,cursor:"pointer",userSelect:"none",a:{display:"block",padding:`0 ${he(e.paginationItemPaddingInline)}`,color:e.colorText,"&:hover":{textDecoration:"none"}},[`&:not(${t}-item-active)`]:{"&:hover":{transition:`all ${e.motionDurationMid}`,backgroundColor:e.colorBgTextHover},"&:active":{backgroundColor:e.colorBgTextActive}},"&-active":{fontWeight:e.fontWeightStrong,backgroundColor:e.itemActiveBg,borderColor:e.colorPrimary,a:{color:e.itemActiveColor},"&:hover":{borderColor:e.colorPrimaryHover},"&:hover a":{color:e.itemActiveColorHover}}}}},Gee=e=>{const{componentCls:t,antCls:n}=e,[r,s]=br(n,"pagination");return{[t]:{[r("item-size-actual")]:he(e.itemSize),[r("item-spacing-actual")]:he(e.marginXS),"&-small":{[r("item-size-actual")]:he(e.itemSizeSM),[r("item-spacing-actual")]:he(e.marginXXS)},"&-large":{[r("item-size-actual")]:he(e.itemSizeLG),[r("item-spacing-actual")]:he(e.marginSM)},...jn(e),display:"flex",alignItems:"center","&-start":{justifyContent:"start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"end"},"ul, ol":{margin:0,padding:0,listStyle:"none"},"&::after":{display:"block",clear:"both",height:0,overflow:"hidden",visibility:"hidden",content:'""'},[`${t}-total-text`]:{display:"inline-block",height:s("item-size-actual"),marginInlineEnd:s("item-spacing-actual"),lineHeight:he(e.calc(s("item-size-actual")).sub(2).equal()),verticalAlign:"middle"},...$ee(e),...Bee(e),...Nee(e),...Oee(e),...kee(e),...Lee(e),[`@media only screen and (max-width: ${e.screenLG}px)`]:{[`${t}-item`]:{"&-after-jump-prev, &-before-jump-next":{display:"none"}}},[`@media only screen and (max-width: ${e.screenSM}px)`]:{[`${t}-options`]:{display:"none"}}},[`&${e.componentCls}-rtl`]:{direction:"rtl"}}},Vee=e=>{const{componentCls:t}=e;return{[`${t}:not(${t}-disabled)`]:{[`${t}-item`]:{...Fo(e)},[`${t}-jump-prev, ${t}-jump-next`]:{"&:focus-visible":{[`${t}-item-link-icon`]:{opacity:1},[`${t}-item-ellipsis`]:{opacity:0},...ro(e)}},[`${t}-prev, ${t}-next`]:{[`&:focus-visible ${t}-item-link`]:ro(e)}}}},IG=e=>({itemBg:e.colorBgContainer,itemSize:e.controlHeight,itemSizeSM:e.controlHeightSM,itemSizeLG:e.controlHeightLG,itemActiveBg:e.colorBgContainer,itemActiveColor:e.colorPrimary,itemActiveColorHover:e.colorPrimaryHover,itemLinkBg:e.colorBgContainer,itemActiveColorDisabled:e.colorTextDisabled,itemActiveBgDisabled:e.controlItemBgActiveDisabled,itemInputBg:e.colorBgContainer,miniOptionsSizeChangerTop:0,...pg(e)}),DG=e=>En(e,{inputOutlineOffset:0,quickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.25).equal(),paginationMiniOptionsMarginInlineStart:e.calc(e.marginXXS).div(2).equal(),paginationMiniQuickJumperInputWidth:e.calc(e.controlHeightLG).mul(1.1).equal(),paginationItemPaddingInline:e.calc(e.marginXXS).mul(1.5).equal(),paginationEllipsisLetterSpacing:e.calc(e.marginXXS).div(2).equal(),paginationSlashMarginInlineStart:e.marginSM,paginationSlashMarginInlineEnd:e.marginSM,paginationEllipsisTextIndent:"0.13em"},hg(e)),Hee=Ln("Pagination",e=>{const t=DG(e);return[Gee(t),Vee(t)]},IG),zee=e=>{const{componentCls:t}=e;return{[`${t}${t}-bordered${t}-disabled`]:{"&, &:hover":{[`${t}-item-link`]:{borderColor:e.colorBorder}},"&:focus-visible":{[`${t}-item-link`]:{borderColor:e.colorBorder}},[`${t}-item, ${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,[`&:hover:not(${t}-item-active)`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,a:{color:e.colorTextDisabled}},[`&${t}-item-active`]:{backgroundColor:e.itemActiveBgDisabled}},[`${t}-prev, ${t}-next`]:{"&:hover button":{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,color:e.colorTextDisabled},[`${t}-item-link`]:{backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder}}},[`${t}${t}-bordered`]:{[`${t}-prev, ${t}-next`]:{"&:hover button":{borderColor:e.colorPrimaryHover,backgroundColor:e.itemBg},[`${t}-item-link`]:{backgroundColor:e.itemLinkBg,borderColor:e.colorBorder},[`&:hover ${t}-item-link`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,color:e.colorPrimary},[`&${t}-disabled`]:{[`${t}-item-link`]:{borderColor:e.colorBorder,color:e.colorTextDisabled}}},[`${t}-item`]:{backgroundColor:e.itemBg,border:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,[`&:hover:not(${t}-item-active)`]:{borderColor:e.colorPrimary,backgroundColor:e.itemBg,a:{color:e.colorPrimary}},"&-active":{borderColor:e.colorPrimary}}}}},Wee=kE(["Pagination","bordered"],e=>{const t=DG(e);return zee(t)},IG);function $1(e){return p.useMemo(()=>typeof e=="boolean"?[e,{}]:e&&typeof e=="object"?[!0,e]:[void 0,void 0],[e])}const AG=e=>{const{align:t,prefixCls:n,selectPrefixCls:r,className:s,rootClassName:i,style:o,size:a,locale:l,responsive:c,showSizeChanger:u,selectComponentClass:h,pageSizeOptions:g,styles:m,classNames:C,...v}=e,{xs:b}=Pv(c),[,w]=ds(),{getPrefixCls:S,direction:x,showSizeChanger:P,className:F,style:M,classNames:E,styles:I,totalBoundaryShowSizeChanger:A}=Hn("pagination"),L=S("pagination",n),[D,N]=Hee(L),k=Oi(a),G=k==="small"||!!(b&&!k&&c),$={...e,size:k},[_,U]=Kn([E,C],[I,m],{props:$}),[V]=Lo("Pagination",YN),W={...V,...l},[j,H]=$1(u),[B,Y]=$1(P),J=j??B,te=H??Y,Z=h||Io,ae=p.useMemo(()=>g?g.map(re=>Number(re)):void 0,[g]),de=re=>{var _e;const{disabled:ce,size:X,onSizeChange:ue,"aria-label":fe,className:oe,options:we}=re,{className:Be,onChange:Ae}=te||{},Pe=(_e=we.find(ze=>String(ze.value)===String(X)))==null?void 0:_e.value;return p.createElement(Z,{disabled:ce,showSearch:!0,popupMatchSelectWidth:!1,getPopupContainer:ze=>ze.parentNode,"aria-label":fe,options:we,...te,value:Pe,onChange:(ze,lt)=>{ue==null||ue(ze),Ae==null||Ae(ze,lt)},size:k,className:ee(oe,Be)})},ge=p.useMemo(()=>{const re=p.createElement("span",{className:`${L}-item-ellipsis`},"•••"),ce=p.createElement("button",{className:`${L}-item-link`,type:"button",tabIndex:-1},x==="rtl"?p.createElement(jx,null):p.createElement(R0,null)),X=p.createElement("button",{className:`${L}-item-link`,type:"button",tabIndex:-1},x==="rtl"?p.createElement(R0,null):p.createElement(jx,null)),ue=p.createElement("a",{className:`${L}-item-link`},p.createElement("div",{className:`${L}-item-container`},x==="rtl"?p.createElement(k1,{className:`${L}-item-link-icon`}):p.createElement(O1,{className:`${L}-item-link-icon`}),re)),fe=p.createElement("a",{className:`${L}-item-link`},p.createElement("div",{className:`${L}-item-container`},x==="rtl"?p.createElement(O1,{className:`${L}-item-link-icon`}):p.createElement(k1,{className:`${L}-item-link-icon`}),re));return{prevIcon:ce,nextIcon:X,jumpPrevIcon:ue,jumpNextIcon:fe}},[x,L]),ve=S("select",r),Re=ee({[`${L}-${t}`]:!!t,[`${L}-${k}`]:k,[`${L}-mini`]:G,[`${L}-rtl`]:x==="rtl",[`${L}-bordered`]:w.wireframe},F,s,i,_.root,D,N),ne={...U.root,...M,...o};return p.createElement(p.Fragment,null,w.wireframe&&p.createElement(Wee,{prefixCls:L}),p.createElement(Aee,{...ge,...v,styles:U,classNames:_,style:ne,prefixCls:L,selectPrefixCls:ve,className:Re,locale:W,pageSizeOptions:ae,showSizeChanger:J,totalBoundaryShowSizeChanger:v.totalBoundaryShowSizeChanger??A,sizeChangerRender:de}))},wC=100,LG=wC/5,OG=wC/2-LG/2,jw=OG*2*Math.PI,G1=50,V1=e=>{const{dotClassName:t,style:n,hasCircleCls:r}=e;return p.createElement("circle",{className:ee(`${t}-circle`,{[`${t}-circle-bg`]:r}),r:OG,cx:G1,cy:G1,strokeWidth:LG,style:n})},_ee=({percent:e,prefixCls:t})=>{const n=`${t}-dot`,r=`${n}-holder`,s=`${r}-hidden`,[i,o]=p.useState(!1);on(()=>{e!==0&&o(!0)},[e!==0]);const a=Math.max(Math.min(e,100),0);if(!i)return null;const l={strokeDashoffset:`${jw/4}`,strokeDasharray:`${jw*a/100} ${jw*(100-a)/100}`};return p.createElement("span",{className:ee(r,`${n}-progress`,a<=0&&s)},p.createElement("svg",{viewBox:`0 0 ${wC} ${wC}`,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a},p.createElement(V1,{dotClassName:n,hasCircleCls:!0}),p.createElement(V1,{dotClassName:n,style:l})))};function Uee(e){const{prefixCls:t,percent:n=0,className:r,style:s}=e,i=`${t}-dot`,o=`${i}-holder`,a=`${o}-hidden`;return p.createElement(p.Fragment,null,p.createElement("span",{className:ee(o,r,n>0&&a),style:s},p.createElement("span",{className:ee(i,`${t}-dot-spin`)},[1,2,3,4].map(l=>p.createElement("i",{className:`${t}-dot-item`,key:l})))),p.createElement(_ee,{prefixCls:t,percent:n}))}function jee(e){const{prefixCls:t,indicator:n,percent:r,className:s,style:i}=e,o=`${t}-dot`;return n&&p.isValidElement(n)?Xr(n,a=>({className:ee(a.className,o,s),style:{...a.style,...i},percent:r})):p.createElement(Uee,{prefixCls:t,percent:r,className:s,style:i})}const Kee=new yn("antSpinMove",{to:{opacity:1}}),qee=new yn("antRotate",{to:{transform:"rotate(405deg)"}}),Xee=e=>{const{componentCls:t}=e,n=`${t}-section`;return{[t]:{...jn(e),position:"relative","&-rtl":{direction:"rtl"},[`&${n}, ${n}`]:{display:"flex",alignItems:"center",flexDirection:"column",gap:e.paddingSM,color:e.colorPrimary},[`&${n}`]:{display:"inline-flex"},[n]:{position:"absolute",top:"50%",left:{_skip_check_:!0,value:"50%"},transform:"translate(-50%, -50%)",zIndex:1},[`${t}-description`]:{fontSize:e.fontSize,lineHeight:1},[`${t}-container`]:{position:"relative",transition:`opacity ${e.motionDurationSlow}`,"&::after":{position:"absolute",top:0,insetInlineEnd:0,bottom:0,insetInlineStart:0,zIndex:10,width:"100%",height:"100%",background:e.colorBgContainer,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'""',pointerEvents:"none"}},"&-spinning":{[`${t}-description`]:{textShadow:`0 0px 5px ${e.colorBgContainer}`},[`${t}-container`]:{clear:"both",opacity:.5,userSelect:"none",pointerEvents:"none","&::after":{opacity:.4,pointerEvents:"auto"}}},"&-fullscreen":{position:"fixed",inset:0,backgroundColor:e.colorBgMask,zIndex:e.zIndexPopupBase,opacity:0,pointerEvents:"none",transition:`all ${e.motionDurationMid}`,[`&${t}-spinning`]:{opacity:1,pointerEvents:"auto"},[n]:{color:e.colorWhite,[`${t}-description`]:{color:e.colorTextLightSolid}}}}}},Yee=e=>{const{componentCls:t,antCls:n,motionDurationSlow:r}=e,[s,i]=br(n,"spin");return{[t]:{[s("dot-holder-size")]:e.dotSize,[s("dot-item-size")]:`calc((${i("dot-holder-size")} - ${e.marginXXS} / 2) / 2)`,[`${t}-dot`]:{"&-holder":{width:"1em",height:"1em",fontSize:i("dot-holder-size"),display:"inline-block",transition:["transform","opacity"].map(o=>`${o} ${r} ease`).join(", "),transformOrigin:"50% 50%",lineHeight:1,"&-hidden":{transform:"scale(0.3)",opacity:0}},position:"relative",display:"inline-block",fontSize:i("dot-holder-size"),width:"1em",height:"1em","&-spin":{transform:"rotate(45deg)",animationName:qee,animationDuration:"1.2s",animationIterationCount:"infinite",animationTimingFunction:"linear"},"&-item":{position:"absolute",display:"block",width:i("dot-item-size"),height:i("dot-item-size"),background:"currentColor",borderRadius:"100%",transform:"scale(0.75)",transformOrigin:"50% 50%",opacity:.3,animationName:Kee,animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"linear",animationDirection:"alternate","&:nth-child(1)":{top:0,insetInlineStart:0,animationDelay:"0s"},"&:nth-child(2)":{top:0,insetInlineEnd:0,animationDelay:"0.4s"},"&:nth-child(3)":{insetInlineEnd:0,bottom:0,animationDelay:"0.8s"},"&:nth-child(4)":{bottom:0,insetInlineStart:0,animationDelay:"1.2s"}},"&-progress":{position:"absolute",left:"50%",top:0,transform:"translateX(-50%)"},"&-circle":{strokeLinecap:"round",transition:["stroke-dashoffset","stroke-dasharray","stroke","stroke-width","opacity"].map(o=>`${o} ${r} ease`).join(","),fillOpacity:0,stroke:"currentcolor"},"&-circle-bg":{stroke:e.colorFillSecondary}}}}},Qee=e=>{const{componentCls:t}=e,[n]=br(e.antCls,"spin");return{[t]:{"&-sm":{[n("dot-holder-size")]:e.dotSizeSM},"&-lg":{[n("dot-holder-size")]:e.dotSizeLG}}}},Zee=e=>{const{controlHeightLG:t,controlHeight:n}=e;return{contentHeight:400,dotSize:t/2,dotSizeSM:t*.35,dotSizeLG:n}},Jee=Ln("Spin",e=>{const t=En(e,{spinDotDefault:e.colorTextDescription});return[Xee(t),Yee(t),Qee(t)]},Zee),ete=200,H1=[[30,.05],[70,.03],[96,.01]];function tte(e,t){const[n,r]=p.useState(0),s=p.useRef(null),i=t==="auto";return p.useEffect(()=>(i&&e&&(r(0),s.current=setInterval(()=>{r(o=>{const a=100-o;for(let l=0;l{s.current&&(clearInterval(s.current),s.current=null)}),[i,e]),i?n:t}let kG;function nte(e,t){return!!e&&!!t&&!Number.isNaN(Number(t))}const xP=e=>{const{prefixCls:t,spinning:n=!0,delay:r=0,className:s,rootClassName:i,size:o="default",tip:a,description:l,wrapperClassName:c,style:u,children:h,fullscreen:g=!1,indicator:m,percent:C,classNames:v,styles:b,...w}=e,{getPrefixCls:S,direction:x,indicator:P,className:F,style:M,classNames:E,styles:I}=Hn("spin"),A=S("spin",t),[L,D]=Jee(A),[N,k]=p.useState(()=>n&&!nte(n,r)),G=tte(N,C);p.useEffect(()=>{if(n){const Y=PJ(r,()=>{k(!0)});return Y(),()=>{var J;(J=Y==null?void 0:Y.cancel)==null||J.call(Y)}}k(!1)},[r,n]);const $=l??a,_={...e,size:o,spinning:N,tip:$,description:$,fullscreen:g,children:h,percent:G},[U,V]=Kn([E,v],[I,b],{props:_}),W=m??P??kG,j=typeof h<"u",H=j||g,B=p.createElement(p.Fragment,null,p.createElement(jee,{className:ee(U.indicator),style:V.indicator,prefixCls:A,indicator:W,percent:G}),$&&p.createElement("div",{className:ee(`${A}-description`,U.tip,U.description),style:{...V.tip,...V.description}},$));return p.createElement("div",{className:ee(A,{[`${A}-sm`]:o==="small",[`${A}-lg`]:o==="large",[`${A}-spinning`]:N,[`${A}-rtl`]:x==="rtl",[`${A}-fullscreen`]:g},i,U.root,g&&U.mask,H?c:[`${A}-section`,U.section],F,s,L,D),style:{...V.root,...H?{}:V.section,...g?V.mask:{},...M,...u},"aria-live":"polite","aria-busy":N,...w},N&&(H?p.createElement("div",{className:ee(`${A}-section`,U.section),style:V.section},B):B),j&&p.createElement("div",{className:ee(`${A}-container`,U.container),style:V.container},h))};xP.setDefaultIndicator=e=>{kG=e};const RP=K.createContext({});RP.Consumer;const rte=({prefixCls:e,className:t,avatar:n,title:r,description:s,...i})=>{const{getPrefixCls:o}=p.useContext(Kt),a=o("list",e),l=ee(`${a}-item-meta`,t),c=K.createElement("div",{className:`${a}-item-meta-content`},r&&K.createElement("h4",{className:`${a}-item-meta-title`},r),s&&K.createElement("div",{className:`${a}-item-meta-description`},s));return K.createElement("div",{...i,className:l},n&&K.createElement("div",{className:`${a}-item-meta-avatar`},n),(r||s)&&c)},ste=K.forwardRef((e,t)=>{const{prefixCls:n,children:r,actions:s,extra:i,styles:o,className:a,classNames:l,colStyle:c,...u}=e,{grid:h,itemLayout:g}=p.useContext(RP),{getPrefixCls:m,list:C}=p.useContext(Kt),v=E=>{var I,A;return ee((A=(I=C==null?void 0:C.item)==null?void 0:I.classNames)==null?void 0:A[E],l==null?void 0:l[E])},b=E=>{var I,A;return{...(A=(I=C==null?void 0:C.item)==null?void 0:I.styles)==null?void 0:A[E],...o==null?void 0:o[E]}},w=()=>{const E=Tr(r);return E.some(A=>typeof A=="string")&&E.length>1},S=()=>g==="vertical"?!!i:!w(),x=m("list",n),P=s&&s.length>0&&K.createElement("ul",{className:ee(`${x}-item-action`,v("actions")),key:"actions",style:b("actions")},s.map((E,I)=>K.createElement("li",{key:`${x}-item-action-${I}`},E,I!==s.length-1&&K.createElement("em",{className:`${x}-item-action-split`})))),F=h?"div":"li",M=K.createElement(F,{...u,...h?{}:{ref:t},className:ee(`${x}-item`,{[`${x}-item-no-flex`]:!S()},a)},g==="vertical"&&i?[K.createElement("div",{className:`${x}-item-main`,key:"content"},r,P),K.createElement("div",{className:ee(`${x}-item-extra`,v("extra")),key:"extra",style:b("extra")},i)]:[r,P,Xr(i,{key:"extra"})]);return h?K.createElement(NJ,{ref:t,flex:1,style:c},M):M}),NG=ste;NG.Meta=rte;const ite=e=>{const{listBorderedCls:t,componentCls:n,paddingLG:r,margin:s,itemPaddingSM:i,itemPaddingLG:o,marginLG:a,borderRadiusLG:l}=e,c=he(e.calc(l).sub(e.lineWidth).equal());return{[t]:{border:`${he(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:l,[`${n}-header`]:{borderRadius:`${c} ${c} 0 0`},[`${n}-footer`]:{borderRadius:`0 0 ${c} ${c}`},[`${n}-header,${n}-footer,${n}-item`]:{paddingInline:r},[`${n}-pagination`]:{margin:`${he(s)} ${he(a)}`}},[`${t}${n}-sm`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:i}},[`${t}${n}-lg`]:{[`${n}-item,${n}-header,${n}-footer`]:{padding:o}}}},ote=e=>{const{componentCls:t,screenSM:n,screenMD:r,marginLG:s,marginSM:i,margin:o}=e;return{[`@media screen and (max-width:${r}px)`]:{[t]:{[`${t}-item`]:{[`${t}-item-action`]:{marginInlineStart:s}}},[`${t}-vertical`]:{[`${t}-item`]:{[`${t}-item-extra`]:{marginInlineStart:s}}}},[`@media screen and (max-width: ${n}px)`]:{[t]:{[`${t}-item`]:{flexWrap:"wrap",[`${t}-action`]:{marginInlineStart:i}}},[`${t}-vertical`]:{[`${t}-item`]:{flexWrap:"wrap-reverse",[`${t}-item-main`]:{minWidth:e.contentWidth},[`${t}-item-extra`]:{margin:`auto auto ${he(o)}`}}}}}},ate=e=>{const{componentCls:t,antCls:n,controlHeight:r,minHeight:s,paddingSM:i,marginLG:o,padding:a,itemPadding:l,colorPrimary:c,itemPaddingSM:u,itemPaddingLG:h,paddingXS:g,margin:m,colorText:C,colorTextDescription:v,motionDurationSlow:b,lineWidth:w,headerBg:S,footerBg:x,emptyTextPadding:P,metaMarginBottom:F,avatarMarginRight:M,titleMarginBottom:E,descriptionFontSize:I}=e;return{[t]:{...jn(e),position:"relative","--rc-virtual-list-scrollbar-bg":e.colorSplit,"*":{outline:"none"},[`${t}-header`]:{background:S},[`${t}-footer`]:{background:x},[`${t}-header, ${t}-footer`]:{paddingBlock:i},[`${t}-pagination`]:{marginBlockStart:o,[`${n}-pagination-options`]:{textAlign:"start"}},[`${t}-spin`]:{minHeight:s,textAlign:"center"},[`${t}-items`]:{margin:0,padding:0,listStyle:"none"},[`${t}-item`]:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:l,color:C,[`${t}-item-meta`]:{display:"flex",flex:1,alignItems:"flex-start",maxWidth:"100%",[`${t}-item-meta-avatar`]:{marginInlineEnd:M},[`${t}-item-meta-content`]:{flex:"1 0",width:0,color:C},[`${t}-item-meta-title`]:{margin:`0 0 ${he(e.marginXXS)} 0`,color:C,fontSize:e.fontSize,lineHeight:e.lineHeight,"> a":{color:C,transition:`all ${b}`,"&:hover":{color:c}}},[`${t}-item-meta-description`]:{color:v,fontSize:I,lineHeight:e.lineHeight}},[`${t}-item-action`]:{flex:"0 0 auto",marginInlineStart:e.marginXXL,padding:0,fontSize:0,listStyle:"none","& > li":{position:"relative",display:"inline-block",padding:`0 ${he(g)}`,color:v,fontSize:e.fontSize,lineHeight:e.lineHeight,textAlign:"center","&:first-child":{paddingInlineStart:0}},[`${t}-item-action-split`]:{position:"absolute",insetBlockStart:"50%",insetInlineEnd:0,width:w,height:e.calc(e.fontHeight).sub(e.calc(e.marginXXS).mul(2)).equal(),transform:"translateY(-50%)",backgroundColor:e.colorSplit}}},[`${t}-empty`]:{padding:`${he(a)} 0`,color:v,fontSize:e.fontSizeSM,textAlign:"center"},[`${t}-empty-text`]:{padding:P,color:e.colorTextDisabled,fontSize:e.fontSize,textAlign:"center"},[`${t}-item-no-flex`]:{display:"block"}},[`${t}-grid ${n}-col > ${t}-item`]:{display:"block",maxWidth:"100%",marginBlockEnd:m,paddingBlock:0,borderBlockEnd:"none"},[`${t}-vertical ${t}-item`]:{alignItems:"initial",[`${t}-item-main`]:{display:"block",flex:1},[`${t}-item-extra`]:{marginInlineStart:o},[`${t}-item-meta`]:{marginBlockEnd:F,[`${t}-item-meta-title`]:{marginBlockStart:0,marginBlockEnd:E,color:C,fontSize:e.fontSizeLG,lineHeight:e.lineHeightLG}},[`${t}-item-action`]:{marginBlockStart:a,marginInlineStart:"auto","> li":{padding:`0 ${he(a)}`,"&:first-child":{paddingInlineStart:0}}}},[`${t}-split ${t}-item`]:{borderBlockEnd:`${he(e.lineWidth)} ${e.lineType} ${e.colorSplit}`,"&:last-child":{borderBlockEnd:"none"}},[`${t}-split ${t}-header`]:{borderBlockEnd:`${he(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-split${t}-empty ${t}-footer`]:{borderTop:`${he(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-loading ${t}-spin-nested-loading`]:{minHeight:r},[`${t}-split${t}-something-after-last-item ${n}-spin-container > ${t}-items > ${t}-item:last-child`]:{borderBlockEnd:`${he(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},[`${t}-lg ${t}-item`]:{padding:h},[`${t}-sm ${t}-item`]:{padding:u},[`${t}:not(${t}-vertical)`]:{[`${t}-item-no-flex`]:{[`${t}-item-action`]:{float:"right"}}}}},lte=e=>({contentWidth:220,itemPadding:`${he(e.paddingContentVertical)} 0`,itemPaddingSM:`${he(e.paddingContentVerticalSM)} ${he(e.paddingContentHorizontal)}`,itemPaddingLG:`${he(e.paddingContentVerticalLG)} ${he(e.paddingContentHorizontalLG)}`,headerBg:"transparent",footerBg:"transparent",emptyTextPadding:e.padding,metaMarginBottom:e.padding,avatarMarginRight:e.padding,titleMarginBottom:e.paddingSM,descriptionFontSize:e.fontSize}),cte=Ln("List",e=>{const t=En(e,{listBorderedCls:`${e.componentCls}-bordered`,minHeight:e.controlHeightLG});return[ate(t),ite(t),ote(t)]},lte,{extraCssVarPrefixCls:({prefixCls:e})=>[`${e}-container`]}),ute=(e,t)=>{const{pagination:n=!1,prefixCls:r,bordered:s=!1,split:i=!0,className:o,rootClassName:a,style:l,children:c,itemLayout:u,loadMore:h,grid:g,dataSource:m=[],size:C,header:v,footer:b,loading:w=!1,rowKey:S,renderItem:x,locale:P,...F}=e,M=n&&typeof n=="object"?n:{},[E,I]=p.useState(M.defaultCurrent||1),[A,L]=p.useState(M.defaultPageSize||10),{getPrefixCls:D,direction:N,className:k,style:G}=Hn("list"),{renderEmpty:$}=p.useContext(Kt),_={current:1,total:0,position:"bottom"},U=Pe=>(_e,ze)=>{var lt;I(_e),L(ze),n&&((lt=n==null?void 0:n[Pe])==null||lt.call(n,_e,ze))},V=U("onChange"),W=U("onShowSizeChange"),j=(Pe,_e)=>{if(!x)return null;let ze;return typeof S=="function"?ze=S(Pe):S?ze=Pe[S]:ze=Pe.key,ze||(ze=`list-item-${_e}`),p.createElement(p.Fragment,{key:ze},x(Pe,_e))},H=!!(h||n||b),B=D("list",r),[Y,J]=cte(B);let te=w;typeof te=="boolean"&&(te={spinning:te});const Z=!!(te!=null&&te.spinning),ae=Oi(C);let de="";switch(ae){case"large":de="lg";break;case"small":de="sm";break}const ge=ee(B,{[`${B}-vertical`]:u==="vertical",[`${B}-${de}`]:de,[`${B}-split`]:i,[`${B}-bordered`]:s,[`${B}-loading`]:Z,[`${B}-grid`]:!!g,[`${B}-something-after-last-item`]:H,[`${B}-rtl`]:N==="rtl"},k,o,a,Y,J),ve=`${B}-container`,Re=Lp(_,{total:m.length,current:E,pageSize:A},n||{}),ne=Math.ceil(Re.total/Re.pageSize);Re.current=Math.min(Re.current,ne);const re=n&&p.createElement("div",{className:ee(`${B}-pagination`)},p.createElement(AG,{align:"end",...Re,onChange:V,onShowSizeChange:W}));let ce=nn(m);n&&m.length>(Re.current-1)*Re.pageSize&&(ce=nn(m).splice((Re.current-1)*Re.pageSize,Re.pageSize));const X=Object.keys(g||{}).some(Pe=>ia.includes(Pe)),ue=Pv(X),fe=p.useMemo(()=>{for(let Pe=0;Pe{if(!g)return;const Pe=fe&&g[fe]?g[fe]:g.column;if(Pe)return{width:`${100/Pe}%`,maxWidth:`${100/Pe}%`}},[JSON.stringify(g),fe]);let we=Z&&p.createElement("div",{style:{minHeight:53}});if(ce.length>0){const Pe=ce.map(j);we=g?p.createElement($J,{className:ee(ve,J),gutter:g.gutter},p.Children.map(Pe,_e=>p.createElement("div",{key:_e==null?void 0:_e.key,style:oe},_e))):p.createElement("ul",{className:ee(`${B}-items`,ve,J)},Pe)}else!c&&!Z&&(we=p.createElement("div",{className:`${B}-empty-text`},(P==null?void 0:P.emptyText)||($==null?void 0:$("List"))||p.createElement(nP,{componentName:"List"})));const Be=Re.position,Ae=p.useMemo(()=>({grid:g,itemLayout:u}),[JSON.stringify(g),u]);return p.createElement(RP.Provider,{value:Ae},p.createElement("div",{ref:t,style:{...G,...l},className:ge,...F},(Be==="top"||Be==="both")&&re,v&&p.createElement("div",{className:`${B}-header`},v),p.createElement(xP,{...te},we,c),b&&p.createElement("div",{className:`${B}-footer`},b),h||(Be==="bottom"||Be==="both")&&re))},dte=p.forwardRef(ute),hte=dte;hte.Item=NG;const pte=(e,t=!1)=>t&&!qs(e)?[]:Array.isArray(e)?e:[e],gte=e=>{const{prefixCls:t,className:n,closeIcon:r,closable:s,type:i,title:o,children:a,footer:l,classNames:c,styles:u,...h}=e,{getPrefixCls:g}=p.useContext(Kt),{className:m,style:C,classNames:v,styles:b}=Hn("modal"),w=g(),S=t||g("modal"),x=Rs(w),[P,F]=YB(S,x),[M,E]=Kn([v,c],[b,u],{props:e}),I=`${S}-confirm`;let A={};return i?A={closable:s??!1,title:"",footer:"",children:p.createElement(ZB,{...e,prefixCls:S,confirmPrefixCls:I,rootPrefixCls:w,content:a})}:A={closable:s??!0,title:o,footer:l!==null&&p.createElement(jB,{...e}),children:a},p.createElement(BB,{prefixCls:S,className:ee(P,`${S}-pure-panel`,i&&I,i&&`${I}-${i}`,n,m,F,x,M.root),style:{...C,...E.root},...h,closeIcon:UB(S,r),closable:s,classNames:M,styles:E,...A})},fte=a$(gte);function BG(e){return ag(n$(e))}const Oo=QB;Oo.useModal=vX;Oo.info=function(t){return ag(r$(t))};Oo.success=function(t){return ag(s$(t))};Oo.error=function(t){return ag(i$(t))};Oo.warning=BG;Oo.warn=BG;Oo.confirm=function(t){return ag(o$(t))};Oo.destroyAll=function(){for(;hc.length;){const t=hc.pop();t&&t()}};Oo.config=gX;Oo._InternalPanelDoNotUseOrYouWillBeFired=fte;var mte={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3z"}}]},name:"star",theme:"filled"};function j0(){return j0=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,j0({},e,{ref:t,icon:mte})),UDe=p.forwardRef(Cte),Za={},Cg="rc-table-internal-hook";function EP(e){const t=p.createContext(void 0);return{Context:t,Provider:({value:r,children:s})=>{const i=p.useRef(r);i.current=r;const[o]=p.useState(()=>({getValue:()=>i.current,listeners:new Set}));return on(()=>{to.unstable_batchedUpdates(()=>{o.listeners.forEach(a=>{a(r)})})},[r]),p.createElement(t.Provider,{value:o},s)},defaultValue:e}}function Dr(e,t){const n=Yt(typeof t=="function"?t:l=>{if(t===void 0)return l;if(!Array.isArray(t))return l[t];const c={};return t.forEach(u=>{c[u]=l[u]}),c}),r=p.useContext(e==null?void 0:e.Context),{listeners:s,getValue:i}=r||{},o=p.useRef();o.current=n(r?i():e==null?void 0:e.defaultValue);const[,a]=p.useState({});return on(()=>{if(!r)return;function l(c){const u=n(c);no(o.current,u,!0)||a({})}return s.add(l),()=>{s.delete(l)}},[r]),o.current}function op(){return op=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const u=o?{ref:c}:{},h=p.useRef(0),g=p.useRef(l);return t()!==null?p.createElement(s,op({},l,u)):((!i||i(g.current,l))&&(h.current+=1),g.current=l,p.createElement(e.Provider,{value:h.current},p.createElement(s,op({},l,u))))};return o?p.forwardRef(a):a}function r(s,i){const o=ca(s),a=(l,c)=>{const u=o?{ref:c}:{};return t(),p.createElement(s,op({},l,u))};return p.memo(o?p.forwardRef(a):a,i)}return{makeImmutable:n,responseImmutable:r,useImmutableMark:t}}const{makeImmutable:$G,responseImmutable:Md,useImmutableMark:yte}=vte(),Yr=EP(),GG=p.createContext({renderWithProps:!1}),bte="RC_TABLE_KEY";function wte(e){return e==null?[]:Array.isArray(e)?e:[e]}function Av(e){const t=[],n={};return e.forEach(r=>{const{key:s,dataIndex:i}=r||{};let o=s||wte(i).join("-")||bte;for(;n[o];)o=`${o}_next`;n[o]=!0,t.push(o)}),t}function K0(e){return e!=null}function Ste(e){return typeof e=="number"&&!Number.isNaN(e)}function xte(e){return e&&typeof e=="object"&&!Array.isArray(e)&&!p.isValidElement(e)}function Rte(e,t,n,r,s,i){const o=p.useContext(GG),a=yte();return _c(()=>{if(K0(r))return[r];const c=t==null||t===""?[]:Array.isArray(t)?t:[t],u=Gs(e,c);let h=u,g;if(s){const m=s(u,e,n);xte(m)?(h=m.children,g=m.props,o.renderWithProps=!0):h=m}return[h,g]},[a,e,r,t,s,n],(c,u)=>{if(i){const[,h]=c,[,g]=u;return i(g,h)}return o.renderWithProps?!0:!no(c,u,!0)})}function Ete(e,t,n,r){const s=e+t-1;return e<=r&&s>=n}function Pte(e,t){return Dr(Yr,n=>[Ete(e,t||1,n.hoverStartRow,n.hoverEndRow),n.onHover])}function q0(){return q0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var i,o;let r;const s=e===!0?{showTitle:!0}:e;return s&&(s.showTitle||t==="header")&&(typeof n=="string"||typeof n=="number"?r=n.toString():p.isValidElement(n)&&typeof((i=n.props)==null?void 0:i.children)=="string"&&(r=(o=n.props)==null?void 0:o.children)),r},Tte=e=>{const{component:t,children:n,ellipsis:r,scope:s,prefixCls:i,className:o,style:a,align:l,record:c,render:u,dataIndex:h,renderIndex:g,shouldCellUpdate:m,index:C,rowType:v,colSpan:b,rowSpan:w,fixStart:S,fixEnd:x,fixedStartShadow:P,fixedEndShadow:F,offsetFixedStartShadow:M,offsetFixedEndShadow:E,zIndex:I,zIndexReverse:A,appendNode:L,additionalProps:D={},isSticky:N}=e,k=`${i}-cell`,{allColumnsFixedLeft:G,rowHoverable:$}=Dr(Yr,["allColumnsFixedLeft","rowHoverable"]),[_,U]=Rte(c,h,g,n,u,m),V={},W=typeof S=="number"&&!G,j=typeof x=="number"&&!G,[H,B]=Dr(Yr,({scrollInfo:ce})=>{if(!W&&!j)return[!1,!1];const[X,ue]=ce,fe=(W&&P&&X)-M>=1,oe=(j&&F&&ue-X)-E>1;return[fe,oe]});W&&(V.insetInlineStart=S,V["--z-offset"]=I,V["--z-offset-reverse"]=A),j&&(V.insetInlineEnd=x,V["--z-offset"]=I,V["--z-offset-reverse"]=A);const Y=(U==null?void 0:U.colSpan)??D.colSpan??b??1,J=(U==null?void 0:U.rowSpan)??D.rowSpan??w??1,[te,Z]=Pte(C,J),ae=Yt(ce=>{var X;c&&Z(C,C+J-1),(X=D==null?void 0:D.onMouseEnter)==null||X.call(D,ce)}),de=Yt(ce=>{var X;c&&Z(-1,-1),(X=D==null?void 0:D.onMouseLeave)==null||X.call(D,ce)});if(Y===0||J===0)return null;const ge=D.title??Fte({rowType:v,ellipsis:r,children:_}),ve=ee(k,o,{[`${k}-fix`]:W||j,[`${k}-fix-start`]:W,[`${k}-fix-end`]:j,[`${k}-fix-start-shadow`]:P,[`${k}-fix-start-shadow-show`]:P&&H,[`${k}-fix-end-shadow`]:F,[`${k}-fix-end-shadow-show`]:F&&B,[`${k}-ellipsis`]:r,[`${k}-with-append`]:L,[`${k}-fix-sticky`]:(W||j)&&N,[`${k}-row-hover`]:!U&&te},D.className,U==null?void 0:U.className),Re={};l&&(Re.textAlign=l);const ne={...U==null?void 0:U.style,...V,...Re,...D.style,...a};let re=_;return typeof re=="object"&&!Array.isArray(re)&&!p.isValidElement(re)&&(re=null),r&&(P||F)&&(re=p.createElement("span",{className:`${k}-content`},re)),p.createElement(t,q0({},U,D,{className:ve,style:ne,title:ge,scope:s,onMouseEnter:$?ae:void 0,onMouseLeave:$?de:void 0,colSpan:Y!==1?Y:null,rowSpan:J!==1?J:null}),L,re)},Id=p.memo(Tte);function em(e){return e.fixed==="start"}function tm(e){return e.fixed==="end"}function PP(e,t,n,r){const s=n[e]||{},i=n[t]||{};let o=null,a=null;em(s)&&em(i)?o=r.start[e]:tm(i)&&tm(s)&&(a=r.end[t]);let l=!1,c=!1,u=0,h=0;o!==null&&(l=!n[t+1]||!em(n[t+1]),u=n.length*2-e,h=n.length+e),a!==null&&(c=!n[e-1]||!tm(n[e-1]),u=t,h=n.length-t);let g=0,m=0;if(l)for(let C=0;Ct;C-=1)tm(n[C])||(m+=r.widths[C]||0);return{fixStart:o,fixEnd:a,fixedStartShadow:l,fixedEndShadow:c,offsetFixedStartShadow:g,offsetFixedEndShadow:m,isSticky:r.isSticky,zIndex:u,zIndexReverse:h}}const VG=p.createContext({});function X0(){return X0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:t,index:n,children:r,colSpan:s=1,rowSpan:i,align:o}=e,{prefixCls:a}=Dr(Yr,["prefixCls"]),{scrollColumnIndex:l,stickyOffsets:c,flattenColumns:u}=p.useContext(VG),g=n+s-1+1===l?s+1:s,m=p.useMemo(()=>PP(n,n+g-1,u,c),[n,g,u,c]);return p.createElement(Id,X0({className:t,index:n,component:"td",prefixCls:a,record:null,dataIndex:null,align:o,colSpan:g,rowSpan:i,render:()=>r},m))},Ite=e=>{const{children:t,...n}=e;return p.createElement("tr",n,t)},Lv=e=>{const{children:t}=e;return t};Lv.Row=Ite;Lv.Cell=Mte;const Dte=e=>{const{children:t,stickyOffsets:n,flattenColumns:r}=e,s=Dr(Yr,"prefixCls"),i=r.length-1,o=r[i],a=p.useMemo(()=>({stickyOffsets:n,flattenColumns:r,scrollColumnIndex:o!=null&&o.scrollbar?i:null}),[o,r,i,n]);return p.createElement(VG.Provider,{value:a},p.createElement("tfoot",{className:`${s}-summary`},t))},nm=Md(Dte),HG=Lv;function Ate(e){return null}function Lte(e){return null}function zG(e,t,n,r,s,i,o){const a=i(t,o);e.push({record:t,indent:n,index:o,rowKey:a});const l=s==null?void 0:s.has(a);if(t&&Array.isArray(t[r])&&l)for(let c=0;c{if(n!=null&&n.size){const i=[];for(let o=0;o<(e==null?void 0:e.length);o+=1){const a=e[o];zG(i,a,0,t,n,r,o)}return i}return e==null?void 0:e.map((i,o)=>({record:i,indent:0,index:o,rowKey:r(i,o)}))},[e,t,n,r])}function _G(e,t,n,r){const s=Dr(Yr,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),{flattenColumns:i,expandableType:o,expandedKeys:a,childrenColumnName:l,onTriggerExpand:c,rowExpandable:u,onRow:h,expandRowByClick:g,rowClassName:m}=s,C=o==="nest",v=o==="row"&&(!u||u(e)),b=v||C,w=a&&a.has(t),S=l&&e&&e[l],x=Yt(c),P=h==null?void 0:h(e,n),F=P==null?void 0:P.onClick,M=(A,...L)=>{g&&b&&c(e,A),F==null||F(A,...L)};let E;typeof m=="string"?E=m:typeof m=="function"&&(E=m(e,n,r));const I=Av(i);return{...s,columnsKey:I,nestExpandable:C,expanded:w,hasNestChildren:S,record:e,onTriggerExpand:x,rowSupportExpand:v,expandable:b,rowProps:{...P,className:ee(E,P==null?void 0:P.className),onClick:M}}}const UG=e=>{const{prefixCls:t,children:n,component:r,cellComponent:s,className:i,expanded:o,colSpan:a,isEmpty:l,stickyOffset:c=0}=e,{scrollbarSize:u,fixHeader:h,fixColumn:g,componentWidth:m,horizonScroll:C}=Dr(Yr,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]);let v=n;return(l?C&&m:g)&&(v=p.createElement("div",{style:{width:m-c-(h&&!l?u:0),position:"sticky",left:c,overflow:"hidden"},className:`${t}-expanded-row-fixed`},v)),p.createElement(r,{className:i,style:{display:o?null:"none"}},p.createElement(Id,{component:s,prefixCls:t,colSpan:a},v))};function Ote({prefixCls:e,record:t,onExpand:n,expanded:r,expandable:s}){const i=`${e}-row-expand-icon`;if(!s)return p.createElement("span",{className:ee(i,`${e}-row-spaced`)});const o=a=>{n(t,a),a.stopPropagation()};return p.createElement("span",{className:ee(i,{[`${e}-row-expanded`]:r,[`${e}-row-collapsed`]:!r}),onClick:o})}function kte(e,t,n){const r=[];function s(i){(i||[]).forEach((o,a)=>{r.push(t(o,a)),s(o[n])})}return s(e),r}function jG(e,t,n,r){return typeof e=="string"?e:typeof e=="function"?e(t,n,r):""}function SC(){return SC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:t,style:n,classNames:r,styles:s,record:i,index:o,renderIndex:a,rowKey:l,rowKeys:c,indent:u=0,rowComponent:h,cellComponent:g,scopeCellComponent:m,expandedRowInfo:C}=e,v=_G(i,l,o,u),{prefixCls:b,flattenColumns:w,expandedRowClassName:S,expandedRowRender:x,rowProps:P,expanded:F,rowSupportExpand:M}=v,E=p.useRef(!1);E.current||(E.current=F);const I=jG(S,i,o,u),A=p.createElement(h,SC({},P,{"data-row-key":l,className:ee(t,`${b}-row`,`${b}-row-level-${u}`,P==null?void 0:P.className,r.row,{[I]:u>=1}),style:{...n,...P==null?void 0:P.style,...s.row}}),w.map((D,N)=>{const{render:k,dataIndex:G,className:$}=D,{key:_,fixedInfo:U,appendCellNode:V,additionalCellProps:W}=KG(v,D,N,u,o,c,C==null?void 0:C.offset);return p.createElement(Id,SC({className:ee($,r.cell),style:s.cell,ellipsis:D.ellipsis,align:D.align,scope:D.rowScope,component:D.rowScope?m:g,prefixCls:b,key:_,record:i,index:o,renderIndex:a,dataIndex:G,render:k,shouldCellUpdate:D.shouldCellUpdate},U,{appendNode:V,additionalProps:W}))}));let L;if(M&&(E.current||F)){const D=x(i,o,u+1,F);L=p.createElement(UG,{expanded:F,className:ee(`${b}-expanded-row`,`${b}-expanded-row-level-${u+1}`,I),prefixCls:b,component:h,cellComponent:g,colSpan:C?C.colSpan:w.length,isEmpty:!1,stickyOffset:C==null?void 0:C.sticky},D)}return p.createElement(p.Fragment,null,A,L)},Bte=Md(Nte),$te=e=>{const{columnKey:t,onColumnResize:n,title:r}=e,s=p.useRef(null);return on(()=>{s.current&&n(t,s.current.offsetWidth)},[]),p.createElement(Vs,{data:t},p.createElement("td",{ref:s,style:{paddingTop:0,paddingBottom:0,borderTop:0,borderBottom:0,height:0}},p.createElement("div",{style:{height:0,overflow:"hidden",fontWeight:"bold"}},r||" ")))},Gte=({prefixCls:e,columnsKey:t,onColumnResize:n,columns:r})=>{const s=p.useRef(null),{measureRowRender:i}=Dr(Yr,["measureRowRender"]),o=p.createElement("tr",{"aria-hidden":"true",className:`${e}-measure-row`,style:{height:0},ref:s},p.createElement(Vs.Collection,{onBatchResize:a=>{fv(s.current)&&a.forEach(({data:l,size:c})=>{n(l,c.offsetWidth)})}},t.map(a=>{const l=r.find(h=>h.key===a),c=l==null?void 0:l.title,u=p.isValidElement(c)?p.cloneElement(c,{ref:null}):c;return p.createElement($te,{key:a,columnKey:a,onColumnResize:n,title:u})})));return typeof i=="function"?i(o):o},Vte=e=>{const{data:t,measureColumnWidth:n}=e,{prefixCls:r,getComponent:s,onColumnResize:i,flattenColumns:o,getRowKey:a,expandedKeys:l,childrenColumnName:c,emptyNode:u,classNames:h,styles:g,expandedRowOffset:m=0,colWidths:C}=Dr(Yr,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode","classNames","styles","expandedRowOffset","fixedInfoList","colWidths"]),{body:v={}}=h||{},{body:b={}}=g||{},w=WG(t,c,l,a),S=p.useMemo(()=>w.map(D=>D.rowKey),[w]),x=p.useRef({renderWithProps:!1}),P=p.useMemo(()=>{const D=o.length-m;let N=0;for(let k=0;k{const{record:k,indent:G,index:$,rowKey:_}=D;return p.createElement(Bte,{classNames:v,styles:b,key:_,rowKey:_,rowKeys:S,record:k,index:N,renderIndex:$,rowComponent:M,cellComponent:E,scopeCellComponent:I,indent:G,expandedRowInfo:P})}):A=p.createElement(UG,{expanded:!0,className:`${r}-placeholder`,prefixCls:r,component:M,cellComponent:E,colSpan:o.length,isEmpty:!0},u);const L=Av(o);return p.createElement(GG.Provider,{value:x.current},p.createElement(F,{style:b.wrapper,className:ee(`${r}-tbody`,v.wrapper)},n&&p.createElement(Gte,{prefixCls:r,columnsKey:L,onColumnResize:i,columns:o}),A))},Hte=Md(Vte),ap="RC_TABLE_INTERNAL_COL_DEFINE";function zte(e){const{expandable:t,...n}=e;let r;return"expandable"in e?r={...n,...t}:r=n,r.showExpandColumn===!1&&(r.expandIconColumnIndex=-1),r}function Y0(){return Y0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{colWidths:t,columns:n,columCount:r}=e,{tableLayout:s}=Dr(Yr,["tableLayout"]),i=[],o=r||n.length;let a=!1;for(let l=o-1;l>=0;l-=1){const c=t[l],u=n&&n[l];let h,g;if(u&&(h=u[ap],s==="auto"&&(g=u.minWidth)),c||g||h||a){const{columnType:m,...C}=h||{};i.unshift(p.createElement("col",Y0({key:l,style:{width:c,minWidth:g}},C))),a=!0}}return i.length>0?p.createElement("colgroup",null,i):null};function Wte(e,t){return p.useMemo(()=>{const n=[];for(let r=0;r{const{className:n,style:r,noData:s,columns:i,flattenColumns:o,colWidths:a,colGroup:l,columCount:c,stickyOffsets:u,direction:h,fixHeader:g,stickyTopOffset:m,stickyBottomOffset:C,stickyClassName:v,scrollX:b,tableLayout:w="fixed",onScroll:S,maxContentScroll:x,children:P,...F}=e,{prefixCls:M,scrollbarSize:E,isSticky:I,getComponent:A}=Dr(Yr,["prefixCls","scrollbarSize","isSticky","getComponent"]),L=A(["header","table"],"table"),D=I&&!g?0:E,N=p.useRef(null),k=p.useCallback(H=>{JS(t,H),JS(N,H)},[]);p.useEffect(()=>{function H(Y){const{currentTarget:J,deltaX:te}=Y;if(te){const{scrollLeft:Z,scrollWidth:ae,clientWidth:de}=J,ge=ae-de;let ve=Z+te;h==="rtl"?(ve=Math.max(-ge,ve),ve=Math.min(0,ve)):(ve=Math.min(ge,ve),ve=Math.max(0,ve)),S({currentTarget:J,scrollLeft:ve}),Y.preventDefault()}}const B=N.current;return B==null||B.addEventListener("wheel",H,{passive:!1}),()=>{B==null||B.removeEventListener("wheel",H)}},[]);const G=o[o.length-1],$={fixed:G?G.fixed:null,scrollbar:!0,onHeaderCell:()=>({className:`${M}-cell-scrollbar`})},_=p.useMemo(()=>D?[...i,$]:i,[D,i]),U=p.useMemo(()=>D?[...o,$]:o,[D,o]),V=p.useMemo(()=>{const{start:H,end:B}=u;return{...u,start:H,end:[...B.map(Y=>Y+D),0],isSticky:I}},[D,u,I]),W=Wte(a,c),j=p.useMemo(()=>{const H=!W||!W.length||W.every(B=>!B);return s||H},[s,W]);return p.createElement("div",{style:{overflow:"hidden",...I?{top:m,bottom:C}:{},...r},ref:k,className:ee(n,{[v]:!!v})},p.createElement(L,{style:{tableLayout:w,minWidth:"100%",width:b}},j?l:p.createElement(qG,{colWidths:[...W,D],columCount:c+1,columns:U}),P({...F,stickyOffsets:V,columns:_,flattenColumns:U})))}),z1=p.memo(_te);function xC(){return xC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{cells:t,stickyOffsets:n,flattenColumns:r,rowComponent:s,cellComponent:i,onHeaderRow:o,index:a,classNames:l,styles:c}=e,{prefixCls:u}=Dr(Yr,["prefixCls"]);let h;o&&(h=o(t.map(m=>m.column),a));const g=Av(t.map(m=>m.column));return p.createElement(s,xC({},h,{className:l.row,style:c.row}),t.map((m,C)=>{var F;const{column:v,colStart:b,colEnd:w,colSpan:S}=m,x=PP(b,w,r,n),P=((F=v==null?void 0:v.onHeaderCell)==null?void 0:F.call(v,v))||{};return p.createElement(Id,xC({},m,{scope:v.title?S>1?"colgroup":"col":null,ellipsis:v.ellipsis,align:v.align,component:i,prefixCls:u,key:g[C]},x,{additionalProps:P,rowType:"header"}))}))};function jte(e,t,n){const r=[];function s(o,a,l=0){r[l]=r[l]||[];let c=a;return o.filter(Boolean).map(h=>{const g={key:h.key,className:ee(h.className,t.cell)||"",style:n.cell,children:h.title,column:h,colStart:c};let m=1;const C=h.children;return C&&C.length>0&&(m=s(C,c,l+1).reduce((v,b)=>v+b,0),g.hasSubColumns=!0),"colSpan"in h&&({colSpan:m}=h),"rowSpan"in h&&(g.rowSpan=h.rowSpan),g.colSpan=m,g.colEnd=g.colStart+m-1,r[l].push(g),c+=m,m})}s(e,0);const i=r.length;for(let o=0;o{!("rowSpan"in a)&&!a.hasSubColumns&&(a.rowSpan=i-o)});return r}const Kte=e=>{const{stickyOffsets:t,columns:n,flattenColumns:r,onHeaderRow:s}=e,{prefixCls:i,getComponent:o,classNames:a,styles:l}=Dr(Yr,["prefixCls","getComponent","classNames","styles"]),{header:c={}}=a||{},{header:u={}}=l||{},h=p.useMemo(()=>jte(n,c,u),[n,c,u]),g=o(["header","wrapper"],"thead"),m=o(["header","row"],"tr"),C=o(["header","cell"],"th");return p.createElement(g,{className:ee(`${i}-thead`,c.wrapper),style:u.wrapper},h.map((v,b)=>p.createElement(Ute,{classNames:c,styles:u,key:b,flattenColumns:r,cells:v,stickyOffsets:t,rowComponent:m,cellComponent:C,onHeaderRow:s,index:b})))},W1=Md(Kte);function _1(e,t=""){return typeof t=="number"?t:t.endsWith("%")?e*parseFloat(t)/100:null}function qte(e,t,n){return p.useMemo(()=>{if(t&&t>0){let r=0,s=0;e.forEach(h=>{const g=_1(t,h.width);g?r+=g:s+=1});const i=Math.max(t,n);let o=Math.max(i-r,s),a=s;const l=o/s;let c=0;const u=e.map(h=>{const g={...h},m=_1(t,g.width);if(m)g.width=m;else{const C=Math.floor(l);g.width=a===1?o:C,o-=C,a-=1}return c+=g.width,g});if(c{const C=Math.floor(g.width*h);g.width=m===u.length-1?o:C,o-=C})}return[u,Math.max(c,i)]}return[e,t]},[e,t,n])}function FP(e){return Tr(e).filter(t=>p.isValidElement(t)).map(t=>{const{key:n,props:r}=t,{children:s,...i}=r,o={key:n,...i};return s&&(o.children=FP(s)),o})}function XG(e){return e.filter(t=>t&&typeof t=="object"&&!t.hidden).map(t=>{const n=t.children;return n&&n.length>0?{...t,children:XG(n)}:t})}function YG(e,t="key"){return e.filter(n=>n&&typeof n=="object").reduce((n,r,s)=>{const{fixed:i}=r,o=i===!0||i==="left"?"start":i==="right"?"end":i,a=`${t}-${s}`,l=r.children;return l&&l.length>0?[...n,...YG(l,a).map(c=>({...c,fixed:c.fixed??o}))]:[...n,{key:a,...r,fixed:o}]},[])}function Xte({prefixCls:e,columns:t,children:n,expandable:r,expandedKeys:s,columnTitle:i,getRowKey:o,onTriggerExpand:a,expandIcon:l,rowExpandable:c,expandIconColumnIndex:u,expandedRowOffset:h=0,direction:g,expandRowByClick:m,columnWidth:C,fixed:v,scrollWidth:b,clientWidth:w},S){const x=p.useMemo(()=>{const A=t||FP(n)||[];return XG(A.slice())},[t,n]),P=p.useMemo(()=>{if(r){let A=x.slice();if(!A.includes(Za)){const G=u||0,$=G===0&&(v==="right"||v==="end")?x.length:G;$>=0&&A.splice($,0,Za)}const L=A.indexOf(Za);A=A.filter((G,$)=>G!==Za||$===L);const D=x[L];let N;v?N=v:N=D?D.fixed:null;const k={[ap]:{className:`${e}-expand-icon-col`,columnType:"EXPAND_COLUMN"},title:i,fixed:N,className:`${e}-row-expand-icon-cell`,width:C,render:(G,$,_)=>{const U=o($,_),V=s.has(U),W=c?c($):!0,j=l({prefixCls:e,expanded:V,expandable:W,record:$,onExpand:a});return m?p.createElement("span",{onClick:H=>H.stopPropagation()},j):j}};return A.map((G,$)=>{const _=G===Za?k:G;return $A!==Za)},[r,x,o,s,l,g,h]),F=p.useMemo(()=>{let A=P;return S&&(A=S(A)),A.length||(A=[{render:()=>null}]),A},[S,P,g]),M=p.useMemo(()=>YG(F),[F,g,b]),[E,I]=qte(M,b,w);return[F,E,I]}function Yte(e,t,n){const r=zte(e),{expandIcon:s,expandedRowKeys:i,defaultExpandedRowKeys:o,defaultExpandAllRows:a,expandedRowRender:l,onExpand:c,onExpandedRowsChange:u,childrenColumnName:h}=r,g=s||Ote,m=h||"children",C=p.useMemo(()=>l?"row":e.expandable&&e.internalHooks===Cg&&e.expandable.__PARENT_RENDER_ICON__||t.some(x=>x&&typeof x=="object"&&x[m])?"nest":!1,[!!l,t]),[v,b]=p.useState(()=>o||(a?kte(t,n,m):[])),w=p.useMemo(()=>new Set(i||v||[]),[i,v]),S=p.useCallback(x=>{const P=n(x,t.indexOf(x));let F;const M=w.has(P);M?(w.delete(P),F=[...w]):F=[...w,P],b(F),c&&c(!M,x),u&&u(F)},[n,w,t,c,u]);return[r,C,w,g,m,S]}function Qte(e,t){const n=p.useMemo(()=>e.map((r,s)=>PP(s,s,e,t)),[e,t]);return _c(()=>n,[n],(r,s)=>!no(r,s))}function Zte(e){const t=p.useRef(e),[,n]=p.useState({}),r=p.useRef(null),s=p.useRef([]);function i(o){s.current.push(o);const a=Promise.resolve();r.current=a,a.then(()=>{if(r.current===a){const l=s.current,c=t.current;s.current=[],l.forEach(u=>{t.current=u(t.current)}),r.current=null,c!==t.current&&n({})}})}return p.useEffect(()=>()=>{r.current=null},[]),[t.current,i]}function Jte(e){const t=p.useRef(null),n=p.useRef(null);function r(){clearTimeout(n.current)}function s(o){t.current=o,r(),n.current=setTimeout(()=>{t.current=null,n.current=void 0},100)}function i(){return t.current}return p.useEffect(()=>r,[]),[s,i]}function ene(){const[e,t]=p.useState(-1),[n,r]=p.useState(-1),s=p.useCallback((i,o)=>{t(i),r(o)},[]);return[e,n,s]}const U1=bs()?window:null;function tne(e,t){const{offsetHeader:n=0,offsetSummary:r=0,offsetScroll:s=0,getContainer:i=()=>U1}=typeof e=="object"?e:{},o=i()||U1,a=!!e;return p.useMemo(()=>({isSticky:a,stickyClassName:a?`${t}-sticky-holder`:"",offsetHeader:n,offsetSummary:r,offsetScroll:s,container:o}),[a,s,n,r,t,o])}function nne(e,t){return p.useMemo(()=>{const r=t.length,s=(a,l,c)=>{const u=[];let h=0;for(let g=a;g!==l;g+=c)u.push(h),t[g].fixed&&(h+=e[g]||0);return u},i=s(0,r,1),o=s(r-1,-1,-1).reverse();return{start:i,end:o,widths:e}},[e,t])}const j1=e=>{const{children:t,className:n,style:r}=e;return p.createElement("div",{className:n,style:r},t)};function K1(e){const n=ua(e).getBoundingClientRect(),r=document.documentElement;return{left:n.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:n.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}const q1="mouseup",X1="mousemove",ku="scroll",Y1="resize",rne=(e,t)=>{var E,I;const{scrollBodyRef:n,onScroll:r,offsetScroll:s,container:i,direction:o}=e,a=Dr(Yr,"prefixCls"),l=((E=n.current)==null?void 0:E.scrollWidth)||0,c=((I=n.current)==null?void 0:I.clientWidth)||0,u=l&&c*(c/l),h=p.useRef(null),[g,m]=Zte({scrollLeft:0,isHiddenScrollBar:!0}),C=p.useRef({delta:0,x:0}),[v,b]=p.useState(!1),w=p.useRef(null);p.useEffect(()=>()=>{dn.cancel(w.current)},[]);const S=()=>{b(!1)},x=A=>{A.persist(),C.current.delta=A.pageX-g.scrollLeft,C.current.x=0,b(!0),A.preventDefault()},P=A=>{const{buttons:L}=A||(window==null?void 0:window.event);if(!v||L===0){v&&b(!1);return}let D=C.current.x+A.pageX-C.current.x-C.current.delta;const N=o==="rtl";D=Math.max(N?u-c:0,Math.min(N?0:c-u,D)),(!N||Math.abs(D)+Math.abs(u){dn.cancel(w.current),w.current=dn(()=>{if(!n.current)return;const A=K1(n.current).top,L=A+n.current.offsetHeight,D=i===window?document.documentElement.scrollTop+window.innerHeight:K1(i).top+i.clientHeight;L-nA()<=D||A>=D-s?m(N=>({...N,isHiddenScrollBar:!0})):m(N=>({...N,isHiddenScrollBar:!1}))})},M=A=>{m(L=>({...L,scrollLeft:A/l*c||0}))};return p.useImperativeHandle(t,()=>({setScrollLeft:M,checkScrollBarVisible:F})),p.useEffect(()=>(document.body.addEventListener(q1,S,!1),document.body.addEventListener(X1,P,!1),F(),()=>{document.body.removeEventListener(q1,S),document.body.removeEventListener(X1,P)}),[u,v]),p.useEffect(()=>{if(n.current){const A=[];let L=ua(n.current);for(;L;)A.push(L),L=L.parentElement;return A.forEach(D=>{D.addEventListener(ku,F,!1)}),window.addEventListener(Y1,F,!1),window.addEventListener(ku,F,!1),i.addEventListener(ku,F,!1),()=>{A.forEach(D=>{D.removeEventListener(ku,F)}),window.removeEventListener(Y1,F),window.removeEventListener(ku,F),i.removeEventListener(ku,F)}}},[i]),p.useEffect(()=>{g.isHiddenScrollBar||m(A=>{const L=n.current;return L?{...A,scrollLeft:L.scrollLeft/L.scrollWidth*L.clientWidth}:A})},[g.isHiddenScrollBar]),l<=c||!u||g.isHiddenScrollBar?null:p.createElement("div",{style:{height:nA(),width:c,bottom:s},className:`${a}-sticky-scroll`},p.createElement("div",{onMouseDown:x,ref:h,className:ee(`${a}-sticky-scroll-bar`,{[`${a}-sticky-scroll-bar-active`]:v}),style:{width:`${u}px`,transform:`translate3d(${g.scrollLeft}px, 0, 0)`}}))},sne=p.forwardRef(rne);function Ja(){return Ja=Object.assign?Object.assign.bind():function(e){for(var t=1;t{var Xn,Ht;const n={rowKey:"key",prefixCls:QG,emptyText:ane,...e},{prefixCls:r,className:s,rowClassName:i,style:o,classNames:a,styles:l,data:c,rowKey:u,scroll:h,tableLayout:g,direction:m,title:C,footer:v,summary:b,caption:w,id:S,showHeader:x,components:P,emptyText:F,onRow:M,onHeaderRow:E,measureRowRender:I,onScroll:A,internalHooks:L,transformColumns:D,internalRefs:N,tailor:k,getContainerWidth:G,sticky:$,rowHoverable:_=!0}=n,U=c||ine,V=!!U.length,W=L===Cg,j=p.useCallback((rt,zt)=>Gs(P,rt)||zt,[P]),H=p.useMemo(()=>typeof u=="function"?u:rt=>rt&&rt[u],[u]),B=j(["body"]),[Y,J,te]=ene(),[Z,ae,de,ge,ve,Re]=Yte(n,U,H),ne=h==null?void 0:h.x,[re,ce]=p.useState(0),[X,ue,fe]=Xte({...n,...Z,expandable:!!Z.expandedRowRender,columnTitle:Z.columnTitle,expandedKeys:de,getRowKey:H,onTriggerExpand:Re,expandIcon:ge,expandIconColumnIndex:Z.expandIconColumnIndex,direction:m,scrollWidth:W&&k&&typeof ne=="number"?ne:null,clientWidth:re},W?D:null),oe=fe??ne,we=p.useMemo(()=>({columns:X,flattenColumns:ue}),[X,ue]),Be=p.useRef(null),Ae=p.useRef(null),Pe=p.useRef(null),_e=p.useRef(null);p.useImperativeHandle(t,()=>({nativeElement:Be.current,scrollTo:rt=>{var zt,Pn;if(Pe.current instanceof HTMLElement){const{index:Yn,top:pr,key:hi,offset:Qr}=rt;if(Ste(pr))(zt=Pe.current)==null||zt.scrollTo({top:pr});else{const Fs=hi??H(U[Yn]),Ys=Pe.current.querySelector(`[data-row-key="${Fs}"]`);if(Ys)if(!Qr)Ys.scrollIntoView();else{const yt=Ys.offsetTop;Pe.current.scrollTo({top:yt+Qr})}}}else(Pn=Pe.current)!=null&&Pn.scrollTo&&Pe.current.scrollTo(rt)}}));const ze=p.useRef(null),[lt,Ft]=p.useState(!1),[gt,Ye]=p.useState(!1),[Ie,Ke]=p.useState(new Map),je=Av(ue).map(rt=>Ie.get(rt)),qe=p.useMemo(()=>je,[je.join("_")]),Ge=nne(qe,ue),Ce=h&&K0(h.y),Oe=h&&K0(oe)||!!Z.fixed,ot=Oe&&ue.some(({fixed:rt})=>rt),ut=p.useRef(null),{isSticky:wt,offsetHeader:It,offsetSummary:Gt,offsetScroll:Nt,stickyClassName:jt,container:qt}=tne($,r),Ot=p.useMemo(()=>b==null?void 0:b(U),[b,U]),Vt=(Ce||wt)&&p.isValidElement(Ot)&&Ot.type===Lv&&Ot.props.fixed;let Ve,st,Ue;Ce&&(st={overflowY:V?"scroll":"auto",maxHeight:h.y}),Oe&&(Ve={overflowX:"auto"},Ce||(st={overflowY:"hidden"}),Ue={width:oe===!0?"auto":oe,minWidth:"100%"});const ke=p.useCallback((rt,zt)=>{Ke(Pn=>{if(Pn.get(rt)!==zt){const Yn=new Map(Pn);return Yn.set(rt,zt),Yn}return Pn})},[]),[q,Q]=Jte();function ie(rt,zt){zt&&(typeof zt=="function"?zt(rt):zt.scrollLeft!==rt&&(zt.scrollLeft=rt,zt.scrollLeft!==rt&&setTimeout(()=>{zt.scrollLeft=rt},0)))}const[Se,Te]=p.useState([0,0]),We=Yt(({currentTarget:rt,scrollLeft:zt})=>{var hi;const Pn=typeof zt=="number"?zt:rt.scrollLeft,Yn=rt||one;(!Q()||Q()===Yn)&&(q(Yn),ie(Pn,Ae.current),ie(Pn,Pe.current),ie(Pn,ze.current),ie(Pn,(hi=ut.current)==null?void 0:hi.setScrollLeft));const pr=rt||Ae.current;if(pr){const Qr=W&&k&&typeof oe=="number"?oe:pr.scrollWidth,Fs=pr.clientWidth,Ys=Math.abs(Pn);if(Te(yt=>{const tn=[Ys,Qr-Fs];return no(yt,tn)?yt:tn}),Qr===Fs){Ft(!1),Ye(!1);return}Ft(Ys>0),Ye(Ys{We(rt),A==null||A(rt)}),Qe=()=>{var rt;Oe&&Pe.current?We({currentTarget:ua(Pe.current),scrollLeft:(rt=Pe.current)==null?void 0:rt.scrollLeft}):(Ft(!1),Ye(!1))},Xe=rt=>{var Pn,Yn;(Pn=ut.current)==null||Pn.checkScrollBarVisible();let zt=rt??((Yn=Be.current)==null?void 0:Yn.offsetWidth)??0;W&&G&&Be.current&&(zt=G(Be.current,zt)||zt),zt!==re&&(Qe(),ce(zt))};on(()=>{Oe&&Xe()},[Oe]);const at=p.useRef(!1);p.useEffect(()=>{at.current&&Qe()},[Oe,c,X.length]),p.useEffect(()=>{at.current=!0},[]);const[ht,vt]=p.useState(0);on(()=>{(!k||!W)&&(Pe.current instanceof Element?vt(Bx(Pe.current).width):vt(Bx(_e.current).width))},[]),p.useEffect(()=>{W&&N&&(N.body.current=Pe.current)});const mt=p.useCallback(rt=>p.createElement(p.Fragment,null,p.createElement(W1,rt),Vt==="top"&&p.createElement(nm,rt,Ot)),[Vt,Ot]),Je=p.useCallback(rt=>p.createElement(nm,rt,Ot),[Ot]),nt=j(["table"],"table"),pt=p.useMemo(()=>g||(ot?oe==="max-content"?"auto":"fixed":Ce||wt||ue.some(({ellipsis:rt})=>rt)?"fixed":"auto"),[Ce,ot,ue,g,wt]);let xt;const Ct={colWidths:qe,columCount:ue.length,stickyOffsets:Ge,onHeaderRow:E,fixHeader:Ce,scroll:h},kt=p.useMemo(()=>V?null:typeof F=="function"?F():F,[V,F]),$t=p.createElement(Hte,{data:U,measureColumnWidth:Ce||Oe||wt}),Tt=p.createElement(qG,{colWidths:ue.map(({width:rt})=>rt),columns:ue}),wn=w!=null?p.createElement("caption",{className:`${r}-caption`},w):void 0,fn=Mr(n,{data:!0}),mn=Mr(n,{aria:!0});if(Ce||wt){let rt;typeof B=="function"?(rt=B(U,{scrollbarSize:ht,ref:Pe,onScroll:We}),Ct.colWidths=ue.map(({width:Pn},Yn)=>{const pr=Yn===ue.length-1?Pn-ht:Pn;return typeof pr=="number"&&!Number.isNaN(pr)?pr:0})):rt=p.createElement("div",{style:{...Ve,...st},onScroll:ft,ref:Pe,className:`${r}-body`},p.createElement(nt,Ja({style:{...Ue,tableLayout:pt}},mn),wn,Tt,$t,!Vt&&Ot&&p.createElement(nm,{stickyOffsets:Ge,flattenColumns:ue},Ot)));const zt={noData:!U.length,maxContentScroll:Oe&&oe==="max-content",...Ct,...we,direction:m,stickyClassName:jt,scrollX:oe,tableLayout:pt,onScroll:We};xt=p.createElement(p.Fragment,null,x!==!1&&p.createElement(z1,Ja({},zt,{stickyTopOffset:It,className:`${r}-header`,ref:Ae,colGroup:Tt}),mt),rt,Vt&&Vt!=="top"&&p.createElement(z1,Ja({},zt,{stickyBottomOffset:Gt,className:`${r}-summary`,ref:ze,colGroup:Tt}),Je),wt&&Pe.current&&Pe.current instanceof Element&&p.createElement(sne,{ref:ut,offsetScroll:Nt,scrollBodyRef:Pe,onScroll:We,container:qt,direction:m}))}else xt=p.createElement("div",{style:{...Ve,...st,...l==null?void 0:l.content},className:ee(`${r}-content`,a==null?void 0:a.content),onScroll:We,ref:Pe},p.createElement(nt,Ja({style:{...Ue,tableLayout:pt}},mn),wn,Tt,x!==!1&&p.createElement(W1,Ja({},Ct,we)),$t,Ot&&p.createElement(nm,{stickyOffsets:Ge,flattenColumns:ue},Ot)));const cn={...o};wt&&(cn["--columns-count"]=ue.length);let Lr=p.createElement("div",Ja({className:ee(r,s,{[`${r}-rtl`]:m==="rtl",[`${r}-fix-start-shadow`]:Oe,[`${r}-fix-end-shadow`]:Oe,[`${r}-fix-start-shadow-show`]:Oe&<,[`${r}-fix-end-shadow-show`]:Oe&>,[`${r}-layout-fixed`]:g==="fixed",[`${r}-fixed-header`]:Ce,[`${r}-fixed-column`]:ot,[`${r}-scroll-horizontal`]:Oe,[`${r}-has-fix-start`]:(Xn=ue[0])==null?void 0:Xn.fixed,[`${r}-has-fix-end`]:((Ht=ue[ue.length-1])==null?void 0:Ht.fixed)==="end"}),style:cn,id:S,ref:Be},fn),C&&p.createElement(j1,{className:ee(`${r}-title`,a==null?void 0:a.title),style:l==null?void 0:l.title},C(U)),p.createElement("div",{ref:_e,className:ee(`${r}-container`,a==null?void 0:a.section),style:l==null?void 0:l.section},xt),v&&p.createElement(j1,{className:ee(`${r}-footer`,a==null?void 0:a.footer),style:l==null?void 0:l.footer},v(U)));Oe&&(Lr=p.createElement(Vs,{onResize:({offsetWidth:rt})=>Xe(rt)},Lr));const Xt=Qte(ue,Ge),hn=p.useMemo(()=>({scrollX:oe,scrollInfo:Se,classNames:a,styles:l,prefixCls:r,getComponent:j,scrollbarSize:ht,direction:m,fixedInfoList:Xt,isSticky:wt,componentWidth:re,fixHeader:Ce,fixColumn:ot,horizonScroll:Oe,tableLayout:pt,rowClassName:i,expandedRowClassName:Z.expandedRowClassName,expandIcon:ge,expandableType:ae,expandRowByClick:Z.expandRowByClick,expandedRowRender:Z.expandedRowRender,expandedRowOffset:Z.expandedRowOffset,onTriggerExpand:Re,expandIconColumnIndex:Z.expandIconColumnIndex,indentSize:Z.indentSize,allColumnsFixedLeft:ue.every(rt=>rt.fixed==="start"),emptyNode:kt,columns:X,flattenColumns:ue,onColumnResize:ke,colWidths:qe,hoverStartRow:Y,hoverEndRow:J,onHover:te,rowExpandable:Z.rowExpandable,onRow:M,getRowKey:H,expandedKeys:de,childrenColumnName:ve,rowHoverable:_,measureRowRender:I}),[oe,Se,a,l,r,j,ht,m,Xt,wt,re,Ce,ot,Oe,pt,i,Z.expandedRowClassName,ge,ae,Z.expandRowByClick,Z.expandedRowRender,Z.expandedRowOffset,Re,Z.expandIconColumnIndex,Z.indentSize,kt,X,ue,ke,qe,Y,J,te,Z.rowExpandable,M,H,de,ve,_,I]);return p.createElement(Yr.Provider,{value:hn},Lr)},cne=p.forwardRef(lne),ZG=e=>$G(cne,e),Dd=ZG();Dd.EXPAND_COLUMN=Za;Dd.INTERNAL_HOOKS=Cg;Dd.Column=Ate;Dd.ColumnGroup=Lte;Dd.Summary=HG;const TP=EP(null),JG=EP(null);function Q0(){return Q0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{rowInfo:t,column:n,colIndex:r,indent:s,index:i,component:o,renderIndex:a,record:l,style:c,className:u,inverse:h,getHeight:g}=e,{render:m,dataIndex:C,className:v,width:b}=n,{columnsOffset:w}=Dr(JG,["columnsOffset"]),{key:S,fixedInfo:x,appendCellNode:P,additionalCellProps:F}=KG(t,n,r,s,i),{style:M,colSpan:E=1,rowSpan:I=1}=F,A=r-1,L=une(A,E,w),D=E>1?b-L:0,N={...M,...c,flex:`0 0 ${L}px`,width:`${L}px`,marginRight:D,pointerEvents:"auto"},k=p.useMemo(()=>h?I<=1:E===0||I===0||I>1,[I,E,h]);k?N.visibility="hidden":h&&(N.height=g==null?void 0:g(I));const G=k?()=>null:m,$={};return(I===0||E===0)&&($.rowSpan=1,$.colSpan=1),p.createElement(Id,Q0({className:ee(v,u),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:o,prefixCls:t.prefixCls,key:S,record:l,index:i,renderIndex:a,dataIndex:C,render:G,shouldCellUpdate:n.shouldCellUpdate},x,{appendNode:P,additionalProps:{...F,style:N,...$}}))};function Z0(){return Z0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{data:n,index:r,className:s,rowKey:i,style:o,extra:a,getHeight:l,...c}=e,{record:u,indent:h,index:g}=n,{scrollX:m,flattenColumns:C,prefixCls:v,fixColumn:b,componentWidth:w}=Dr(Yr,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),{getComponent:S}=Dr(TP,["getComponent"]),x=_G(u,i,r,h),P=S(["body","row"],"div"),F=S(["body","cell"],"div"),{rowSupportExpand:M,expanded:E,rowProps:I,expandedRowRender:A,expandedRowClassName:L}=x;let D;if(M&&E){const G=A(u,r,h+1,E),$=jG(L,u,r,h);let _={};b&&(_={style:{"--virtual-width":`${w}px`}});const U=`${v}-expanded-row-cell`;D=p.createElement(P,{className:ee(`${v}-expanded-row`,`${v}-expanded-row-level-${h+1}`,$)},p.createElement(Id,{component:F,prefixCls:v,className:ee(U,{[`${U}-fixed`]:b}),additionalProps:_},G))}const N={...o,width:m};a&&(N.position="absolute",N.pointerEvents="none");const k=p.createElement(P,Z0({},I,c,{"data-row-key":i,ref:M?null:t,className:ee(s,`${v}-row`,I==null?void 0:I.className,{[`${v}-row-extra`]:a}),style:{...N,...I==null?void 0:I.style}}),C.map((G,$)=>p.createElement(dne,{key:$,component:F,rowInfo:x,column:G,colIndex:$,indent:h,index:r,renderIndex:g,record:u,inverse:a,getHeight:l})));return M?p.createElement("div",{ref:t},k,D):k}),Q1=Md(hne),pne=p.forwardRef((e,t)=>{const{data:n,onScroll:r}=e,{flattenColumns:s,onColumnResize:i,getRowKey:o,expandedKeys:a,prefixCls:l,childrenColumnName:c,scrollX:u,direction:h}=Dr(Yr,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),{sticky:g,scrollY:m,listItemHeight:C,getComponent:v,onScroll:b}=Dr(TP),w=p.useRef(null),S=WG(n,c,a,o),x=p.useMemo(()=>{let D=0;return s.map(({width:N,minWidth:k,key:G})=>{const $=Math.max(N||0,k||0);return D+=$,[G,$,D]})},[s]),P=p.useMemo(()=>x.map(D=>D[2]),[x]);p.useEffect(()=>{x.forEach(([D,N])=>{i(D,N)})},[x]),p.useImperativeHandle(t,()=>{var N;const D={scrollTo:k=>{var _,U;const{offset:G,...$}=k;G?(_=w.current)==null||_.scrollTo({...$,offset:G,align:"top"}):(U=w.current)==null||U.scrollTo(k)},nativeElement:(N=w.current)==null?void 0:N.nativeElement};return Object.defineProperty(D,"scrollLeft",{get:()=>{var k;return((k=w.current)==null?void 0:k.getScrollInfo().x)||0},set:k=>{var G;(G=w.current)==null||G.scrollTo({left:k})}}),Object.defineProperty(D,"scrollTop",{get:()=>{var k;return((k=w.current)==null?void 0:k.getScrollInfo().y)||0},set:k=>{var G;(G=w.current)==null||G.scrollTo({top:k})}}),D});const F=(D,N)=>{var $;const k=($=S[N])==null?void 0:$.record,{onCell:G}=D;if(G){const _=G(k,N);return(_==null?void 0:_.rowSpan)??1}return 1},M=D=>{const{start:N,end:k,getSize:G,offsetY:$}=D;if(k<0)return null;let _=s.filter(B=>F(B,N)===0),U=N;for(let B=N;B>=0;B-=1)if(_=_.filter(Y=>F(Y,B)===0),!_.length){U=B;break}let V=s.filter(B=>F(B,k)!==1),W=k;for(let B=k;BF(Y,B)!==1),!V.length){W=Math.max(B-1,k);break}const j=[];for(let B=U;B<=W;B+=1)S[B]&&s.some(J=>F(J,B)>1)&&j.push(B);return j.map(B=>{const Y=S[B],J=o(Y.record,B),te=ae=>{const de=B+ae-1,ge=S[de];if(!ge||!ge.record){const ne=Math.min(de,S.length-1),re=S[ne],ce=o(re.record,ne),X=G(J,ce);return X.bottom-X.top}const ve=o(ge.record,de),Re=G(J,ve);return Re.bottom-Re.top},Z=G(J);return p.createElement(Q1,{key:B,data:Y,rowKey:J,index:B,style:{top:-$+Z.top},extra:!0,getHeight:te})})},E=p.useMemo(()=>({columnsOffset:P}),[P]),I=`${l}-tbody`,A=v(["body","wrapper"]),L={};return g&&(L.position="sticky",L.bottom=0,typeof g=="object"&&g.offsetScroll&&(L.bottom=g.offsetScroll)),p.createElement(JG.Provider,{value:E},p.createElement(Rv,{fullHeight:!1,ref:w,prefixCls:`${I}-virtual`,styles:{horizontalScrollBar:L},className:I,height:m,itemHeight:C||24,data:S,itemKey:D=>o(D.record),component:A,scrollWidth:u,direction:h,onVirtualScroll:({x:D})=>{var N;r({currentTarget:(N=w.current)==null?void 0:N.nativeElement,scrollLeft:D})},onScroll:b,extraRender:M},(D,N,k)=>{const G=o(D.record,N);return p.createElement(Q1,{data:D,rowKey:G,index:N,style:k.style})}))}),gne=Md(pne);function J0(){return J0=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{ref:n,onScroll:r}=t;return p.createElement(gne,{ref:n,data:e,onScroll:r})},mne=(e,t)=>{const{data:n,columns:r,scroll:s,sticky:i,prefixCls:o=QG,className:a,listItemHeight:l,components:c,onScroll:u}=e;let{x:h,y:g}=s||{};typeof h!="number"&&(h=1),typeof g!="number"&&(g=500);const m=Yt((b,w)=>Gs(c,b)||w),C=Yt(u),v=p.useMemo(()=>({sticky:i,scrollY:g,listItemHeight:l,getComponent:m,onScroll:C}),[i,g,l,m,C]);return p.createElement(TP.Provider,{value:v},p.createElement(Dd,J0({},e,{className:ee(a,`${o}-virtual`),scroll:{...s,x:h},components:{...c,body:n!=null&&n.length?fne:void 0},columns:r,internalHooks:Cg,tailor:!0,ref:t})))},Cne=p.forwardRef(mne),eV=e=>$G(Cne,e);eV();const vne=e=>null,yne=e=>null,MP=p.createContext(null),bne=p.createContext({}),wne=({prefixCls:e,level:t,isStart:n,isEnd:r})=>{const s=`${e}-indent-unit`,i=[];for(let o=0;o{var gt,Ye;const{eventKey:t,className:n,style:r,dragOver:s,dragOverGapTop:i,dragOverGapBottom:o,isLeaf:a,isStart:l,isEnd:c,expanded:u,selected:h,checked:g,halfChecked:m,loading:C,domRef:v,active:b,data:w,onMouseMove:S,selectable:x,treeId:P,...F}=e,M=oB(P,t),E=K.useContext(MP),{classNames:I,styles:A}=E||{},L=K.useContext(bne),D=K.useRef(null),[N,k]=K.useState(!1),G=!!(E.disabled||e.disabled||(gt=L.nodeDisabled)!=null&>.call(L,w)),$=K.useMemo(()=>!E.checkable||e.checkable===!1?!1:E.checkable,[E.checkable,e.checkable]),_=Ie=>{G||E.onNodeSelect(Ie,Cr(e))},U=Ie=>{G||!$||e.disableCheckbox||E.onNodeCheck(Ie,Cr(e),!g)},V=K.useMemo(()=>typeof x=="boolean"?x:E.selectable,[x,E.selectable]),W=Ie=>{E.onNodeClick(Ie,Cr(e)),V?_(Ie):U(Ie)},j=Ie=>{E.onNodeDoubleClick(Ie,Cr(e))},H=Ie=>{E.onNodeMouseEnter(Ie,Cr(e))},B=Ie=>{E.onNodeMouseLeave(Ie,Cr(e))},Y=Ie=>{E.onNodeContextMenu(Ie,Cr(e))},J=K.useMemo(()=>!!(E.draggable&&(!E.draggable.nodeDraggable||E.draggable.nodeDraggable(w))),[E.draggable,w]),te=Ie=>{Ie.stopPropagation(),k(!0),E.onNodeDragStart(Ie,e);try{Ie.dataTransfer.setData("text/plain","")}catch{}},Z=Ie=>{Ie.preventDefault(),Ie.stopPropagation(),E.onNodeDragEnter(Ie,e)},ae=Ie=>{Ie.preventDefault(),Ie.stopPropagation(),E.onNodeDragOver(Ie,e)},de=Ie=>{Ie.stopPropagation(),E.onNodeDragLeave(Ie,e)},ge=Ie=>{Ie.stopPropagation(),k(!1),E.onNodeDragEnd(Ie,e)},ve=Ie=>{Ie.preventDefault(),Ie.stopPropagation(),k(!1),E.onNodeDrop(Ie,e)},Re=Ie=>{C||E.onNodeExpand(Ie,Cr(e))},ne=K.useMemo(()=>{const{children:Ie}=ms(E.keyEntities,t)||{};return!!(Ie||[]).length},[E.keyEntities,t]),re=K.useMemo(()=>mG(a,E.loadData,ne,e.loaded),[a,E.loadData,ne,e.loaded]);K.useEffect(()=>{C||typeof E.loadData=="function"&&u&&!re&&!e.loaded&&E.onNodeLoad(Cr(e))},[C,E.loadData,E.onNodeLoad,u,re,e]);const ce=K.useMemo(()=>{var Ie;return(Ie=E.draggable)!=null&&Ie.icon?K.createElement("span",{className:`${E.prefixCls}-draggable-icon`},E.draggable.icon):null},[E.draggable]),X=Ie=>{const Ke=e.switcherIcon||E.switcherIcon;return typeof Ke=="function"?Ke({...e,isLeaf:Ie}):Ke},ue=()=>{if(re){const Ke=X(!0);return Ke!==!1?K.createElement("span",{className:ee(`${E.prefixCls}-switcher`,`${E.prefixCls}-switcher-noop`)},Ke):null}const Ie=X(!1);return Ie!==!1?K.createElement("span",{onClick:Re,className:ee(`${E.prefixCls}-switcher`,`${E.prefixCls}-switcher_${u?Z1:J1}`)},Ie):null},fe=K.useMemo(()=>{if(!$)return null;const Ie=typeof $!="boolean"?$:null;return K.createElement("span",{className:ee(`${E.prefixCls}-checkbox`,{[`${E.prefixCls}-checkbox-checked`]:g,[`${E.prefixCls}-checkbox-indeterminate`]:!g&&m,[`${E.prefixCls}-checkbox-disabled`]:G||e.disableCheckbox}),onClick:U,role:"checkbox","aria-checked":m?"mixed":g,"aria-disabled":G||e.disableCheckbox,"aria-labelledby":M},Ie)},[$,g,m,G,e.disableCheckbox,M]),oe=K.useMemo(()=>re?null:u?Z1:J1,[re,u]),we=K.useMemo(()=>K.createElement("span",{className:ee(I==null?void 0:I.itemIcon,`${E.prefixCls}-iconEle`,`${E.prefixCls}-icon__${oe||"docu"}`,{[`${E.prefixCls}-icon_loading`]:C}),style:A==null?void 0:A.itemIcon}),[E.prefixCls,oe,C]),Be=K.useMemo(()=>{const Ie=!!E.draggable;return!e.disabled&&Ie&&E.dragOverNodeKey===t?E.dropIndicatorRender({dropPosition:E.dropPosition,dropLevelOffset:E.dropLevelOffset,indent:E.indent,prefixCls:E.prefixCls,direction:E.direction}):null},[E.dropPosition,E.dropLevelOffset,E.indent,E.prefixCls,E.direction,E.draggable,E.dragOverNodeKey,E.dropIndicatorRender]),Ae=K.useMemo(()=>{const{title:Ie=xne}=e,Ke=`${E.prefixCls}-node-content-wrapper`;let De;if(E.showIcon){const qe=e.icon||E.icon;De=qe?K.createElement("span",{className:ee(I==null?void 0:I.itemIcon,`${E.prefixCls}-iconEle`,`${E.prefixCls}-icon__customize`),style:A==null?void 0:A.itemIcon},typeof qe=="function"?qe(e):qe):we}else E.loadData&&C&&(De=we);let je;return typeof Ie=="function"?je=Ie(w):E.titleRender?je=E.titleRender(w):je=Ie,K.createElement("span",{ref:D,title:typeof Ie=="string"?Ie:"",className:ee(Ke,`${Ke}-${oe||"normal"}`,{[`${E.prefixCls}-node-selected`]:!G&&(h||N)}),onMouseEnter:H,onMouseLeave:B,onContextMenu:Y,onClick:W,onDoubleClick:j},De,K.createElement("span",{className:ee(`${E.prefixCls}-title`,I==null?void 0:I.itemTitle),style:A==null?void 0:A.itemTitle},je),Be)},[E.prefixCls,E.showIcon,e,E.icon,we,E.titleRender,w,oe,H,B,Y,W,j]),Pe=Mr(F,{aria:!0,data:!0}),{level:_e}=ms(E.keyEntities,t)||{},ze=c[c.length-1],lt=!G&&J,Ft=E.draggingNodeKey===t;return K.createElement("div",eR({ref:v,role:"treeitem",id:M,"aria-expanded":re?void 0:u,"aria-selected":V&&!G?h:void 0,"aria-checked":$&&!G?m?"mixed":g:void 0,"aria-disabled":G,className:ee(n,`${E.prefixCls}-treenode`,I==null?void 0:I.item,{[`${E.prefixCls}-treenode-disabled`]:G,[`${E.prefixCls}-treenode-switcher-${u?"open":"close"}`]:!a,[`${E.prefixCls}-treenode-checkbox-checked`]:g,[`${E.prefixCls}-treenode-checkbox-indeterminate`]:m,[`${E.prefixCls}-treenode-selected`]:h,[`${E.prefixCls}-treenode-loading`]:C,[`${E.prefixCls}-treenode-active`]:b,[`${E.prefixCls}-treenode-leaf-last`]:ze,[`${E.prefixCls}-treenode-draggable`]:J,dragging:Ft,"drop-target":E.dropTargetKey===t,"drop-container":E.dropContainerKey===t,"drag-over":!G&&s,"drag-over-gap-top":!G&&i,"drag-over-gap-bottom":!G&&o,"filter-node":(Ye=E.filterTreeNode)==null?void 0:Ye.call(E,Cr(e)),[`${E.prefixCls}-treenode-leaf`]:re}),style:{...r,...A==null?void 0:A.item},draggable:lt,onDragStart:lt?te:void 0,onDragEnter:J?Z:void 0,onDragOver:J?ae:void 0,onDragLeave:J?de:void 0,onDrop:J?ve:void 0,onDragEnd:J?ge:void 0,onMouseMove:S},Pe),K.createElement(Sne,{prefixCls:E.prefixCls,level:_e,isStart:l,isEnd:c}),ce,ue(),fe,Ae)};Vp.isTreeNode=1;function bo(e,t){if(!e)return[];const n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Ko(e,t){const n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function IP(e){return e.split("-")}function Rne(e,t){const n=[],r=ms(t,e);function s(i=[]){i.forEach(({key:o,children:a})=>{n.push(o),s(a)})}return s(r.children),n}function Ene(e){if(e.parent){const t=IP(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function Pne(e){const t=IP(e.pos);return Number(t[t.length-1])===0}function eL(e,t,n,r,s,i,o,a,l,c){var L;const{clientX:u,clientY:h}=e,{top:g,height:m}=e.target.getBoundingClientRect(),v=((c==="rtl"?-1:1)*(((s==null?void 0:s.x)||0)-u)-12)/r,b=l.filter(D=>{var N,k;return(k=(N=a[D])==null?void 0:N.children)==null?void 0:k.length});let w=ms(a,n.eventKey);if(hG.key===w.key),N=D<=0?0:D-1,k=o[N].key;w=ms(a,k)}const S=w.key,x=w,P=w.key;let F=0,M=0;if(!b.includes(S))for(let D=0;D-1.5?i({dragNode:E,dropNode:I,dropPosition:1})?F=1:A=!1:i({dragNode:E,dropNode:I,dropPosition:0})?F=0:i({dragNode:E,dropNode:I,dropPosition:1})?F=1:A=!1:i({dragNode:E,dropNode:I,dropPosition:1})?F=1:A=!1,{dropPosition:F,dropLevelOffset:M,dropTargetKey:w.key,dropTargetPos:w.pos,dragOverNodeKey:P,dropContainerKey:F===0?null:((L=w.parent)==null?void 0:L.key)||null,dropAllowed:A}}function tL(e,t){if(!e)return;const{multiple:n}=t;return n?e.slice():e.length?[e[0]]:e}function Kw(e){if(!e)return null;let t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(typeof e=="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return Jn(!1,"`checkedKeys` is not an array or an object"),null;return t}function tR(e,t){const n=new Set;function r(s){if(n.has(s))return;const i=ms(t,s);if(!i)return;n.add(s);const{parent:o,node:a}=i;a.disabled||o&&r(o.key)}return(e||[]).forEach(s=>{r(s)}),[...n]}const Xa={},nR="SELECT_ALL",rR="SELECT_INVERT",sR="SELECT_NONE",nL=[],tV=(e,t,n=[])=>((t||[]).forEach(r=>{n.push(r),r&&typeof r=="object"&&e in r&&tV(e,r[e],n)}),n),Fne=(e,t)=>{const{preserveSelectedRowKeys:n,selectedRowKeys:r,defaultSelectedRowKeys:s,getCheckboxProps:i,getTitleCheckboxProps:o,onChange:a,onSelect:l,onSelectAll:c,onSelectInvert:u,onSelectNone:h,onSelectMultiple:g,columnWidth:m,type:C,selections:v,fixed:b,renderCell:w,hideSelectAll:S,checkStrictly:x=!0}=t||{},{prefixCls:P,data:F,pageData:M,getRecordByKey:E,getRowKey:I,expandType:A,childrenColumnName:L,locale:D,getPopupContainer:N}=e,k=Sd(),[G,$]=Z8(ne=>ne),[_,U]=ir(s||nL,r),V=p.useRef(new Map),W=p.useCallback(ne=>{if(n){const re=new Map;ne.forEach(ce=>{let X=E(ce);!X&&V.current.has(ce)&&(X=V.current.get(ce)),re.set(ce,X)}),V.current=re}},[E,n]);p.useEffect(()=>{W(_)},[_]);const j=p.useMemo(()=>tV(L,M),[L,M]),{keyEntities:H}=p.useMemo(()=>{if(x)return{keyEntities:null};let ne=F;if(n){const re=new Set(j.map(I)),ce=Array.from(V.current).reduce((X,[ue,fe])=>re.has(ue)?X:X.concat(fe),[]);ne=[].concat(nn(ne),nn(ce))}return wP(ne,{externalGetKey:I,childrenPropName:L})},[F,I,x,L,n,j]),B=p.useMemo(()=>{const ne=new Map;return j.forEach((re,ce)=>{const X=I(re,ce),ue=(i?i(re):null)||{};ne.set(X,ue)}),ne},[j,I,i]),Y=p.useCallback(ne=>{const re=I(ne);let ce;return B.has(re)?ce=B.get(I(ne)):ce=i?i(ne):void 0,!!(ce!=null&&ce.disabled)},[B,I]),[J,te]=p.useMemo(()=>{if(x)return[_||[],[]];const{checkedKeys:ne,halfCheckedKeys:re}=qu(_,!0,H,Y);return[ne||[],re]},[_,x,H,Y]),Z=p.useMemo(()=>{const ne=C==="radio"?J.slice(0,1):J;return new Set(ne)},[J,C]),ae=p.useMemo(()=>C==="radio"?new Set:new Set(te),[te,C]);p.useEffect(()=>{t||U(nL)},[!!t]);const de=p.useCallback((ne,re)=>{let ce,X;W(ne),n?(ce=ne,X=ne.map(ue=>V.current.get(ue))):(ce=[],X=[],ne.forEach(ue=>{const fe=E(ue);fe!==void 0&&(ce.push(ue),X.push(fe))})),U(ce),a==null||a(ce,X,{type:re})},[U,E,a,n]),ge=p.useCallback((ne,re,ce,X)=>{if(l){const ue=ce.map(fe=>E(fe));l(E(ne),re,ue,X)}de(ce,"single")},[l,E,de]),ve=p.useMemo(()=>!v||S?null:(v===!0?[nR,rR,sR]:v).map(re=>re===nR?{key:"all",text:D.selectionAll,onSelect(){de(F.map((ce,X)=>I(ce,X)).filter(ce=>{const X=B.get(ce);return!(X!=null&&X.disabled)||Z.has(ce)}),"all")}}:re===rR?{key:"invert",text:D.selectInvert,onSelect(){const ce=new Set(Z);M.forEach((ue,fe)=>{const oe=I(ue,fe),we=B.get(oe);we!=null&&we.disabled||(ce.has(oe)?ce.delete(oe):ce.add(oe))});const X=Array.from(ce);u&&(k.deprecated(!1,"onSelectInvert","onChange"),u(X)),de(X,"invert")}}:re===sR?{key:"none",text:D.selectNone,onSelect(){h==null||h(),de(Array.from(Z).filter(ce=>{const X=B.get(ce);return X==null?void 0:X.disabled}),"none")}}:re).map(re=>({...re,onSelect:(...ce)=>{var X;(X=re.onSelect)==null||X.call(re,...ce),$(null)}})),[v,S,D.selectionAll,D.selectInvert,D.selectNone,B,Z,F,M,I,u,de]);return[p.useCallback(ne=>{var Ke;if(!t)return ne.filter(De=>De!==Xa);let re=nn(ne);const ce=new Set(Z),X=j.map(I).filter(De=>!B.get(De).disabled),ue=X.every(De=>ce.has(De)),fe=X.some(De=>ce.has(De)),oe=()=>{const De=[];ue?X.forEach(qe=>{ce.delete(qe),De.push(qe)}):X.forEach(qe=>{ce.has(qe)||(ce.add(qe),De.push(qe))});const je=Array.from(ce);c==null||c(!ue,je.map(qe=>E(qe)),De.map(qe=>E(qe))),de(je,"all"),$(null)};let we,Be;if(C!=="radio"){let De;if(ve){const wt={getPopupContainer:N,items:ve.map((It,Gt)=>{const{key:Nt,text:jt,onSelect:qt}=It;return{key:Nt??Gt,onClick:()=>{qt==null||qt(X)},label:jt}})};De=p.createElement("div",{className:`${P}-selection-extra`},p.createElement(SP,{menu:wt,getPopupContainer:N},p.createElement("span",null,p.createElement(sP,null))))}const je=j.map((wt,It)=>{const Gt=I(wt,It),Nt=B.get(Gt)||{};return{checked:ce.has(Gt),...Nt}}).filter(({disabled:wt})=>wt),qe=!!je.length&&je.length===j.length,Ge=qe&&je.every(({checked:wt})=>wt),Ce=qe&&je.some(({checked:wt})=>wt),Oe=(o==null?void 0:o())||{},{onChange:ot,disabled:ut}=Oe;Be=p.createElement(ld,{"aria-label":De?"Custom selection":"Select all",...Oe,checked:qe?Ge:!!j.length&&ue,indeterminate:qe?!Ge&&Ce:!ue&&fe,onChange:wt=>{oe(),ot==null||ot(wt)},disabled:ut??(j.length===0||qe),skipGroup:!0}),we=!S&&p.createElement("div",{className:`${P}-selection`},Be,De)}let Ae;C==="radio"?Ae=(De,je,qe)=>{const Ge=I(je,qe),Ce=ce.has(Ge),Oe=B.get(Ge);return{node:p.createElement(dg,{...Oe,checked:Ce,onClick:ot=>{var ut;ot.stopPropagation(),(ut=Oe==null?void 0:Oe.onClick)==null||ut.call(Oe,ot)},onChange:ot=>{var ut;ce.has(Ge)||ge(Ge,!0,[Ge],ot.nativeEvent),(ut=Oe==null?void 0:Oe.onChange)==null||ut.call(Oe,ot)}}),checked:Ce}}:Ae=(De,je,qe)=>{const Ge=I(je,qe),Ce=ce.has(Ge),Oe=ae.has(Ge),ot=B.get(Ge);let ut;return A==="nest"?ut=Oe:ut=(ot==null?void 0:ot.indeterminate)??Oe,{node:p.createElement(ld,{...ot,indeterminate:ut,checked:Ce,skipGroup:!0,onClick:wt=>{var It;wt.stopPropagation(),(It=ot==null?void 0:ot.onClick)==null||It.call(ot,wt)},onChange:wt=>{var qt;const{nativeEvent:It}=wt,{shiftKey:Gt}=It,Nt=X.indexOf(Ge),jt=J.some(Ot=>X.includes(Ot));if(Gt&&x&&jt){const Ot=G(Nt,X,ce),Vt=Array.from(ce);g==null||g(!Ce,Vt.map(Ve=>E(Ve)),Ot.map(Ve=>E(Ve))),de(Vt,"multiple")}else{const Ot=J;if(x){const Vt=Ce?bo(Ot,Ge):Ko(Ot,Ge);ge(Ge,!Ce,Vt,It)}else{const Vt=qu([].concat(nn(Ot),[Ge]),!0,H,Y),{checkedKeys:Ve,halfCheckedKeys:st}=Vt;let Ue=Ve;if(Ce){const ke=new Set(Ve);ke.delete(Ge),Ue=qu(Array.from(ke),{halfCheckedKeys:st},H,Y).checkedKeys}ge(Ge,!Ce,Ue,It)}}$(Ce?null:Nt),(qt=ot==null?void 0:ot.onChange)==null||qt.call(ot,wt)}}),checked:Ce}};const Pe=(De,je,qe)=>{const{node:Ge,checked:Ce}=Ae(De,je,qe);return w?w(Ce,je,qe,Ge):Ge};if(!re.includes(Xa))if(re.findIndex(De=>{var je;return((je=De[ap])==null?void 0:je.columnType)==="EXPAND_COLUMN"})===0){const[De,...je]=re;re=[De,Xa].concat(nn(je))}else re=[Xa].concat(nn(re));const _e=re.indexOf(Xa);re=re.filter((De,je)=>De!==Xa||je===_e);const ze=re[_e-1],lt=re[_e+1];let Ft=b;Ft===void 0&&((lt==null?void 0:lt.fixed)!==void 0?Ft=lt.fixed:(ze==null?void 0:ze.fixed)!==void 0&&(Ft=ze.fixed)),Ft&&ze&&((Ke=ze[ap])==null?void 0:Ke.columnType)==="EXPAND_COLUMN"&&ze.fixed===void 0&&(ze.fixed=Ft);const gt=ee(`${P}-selection-col`,{[`${P}-selection-col-with-dropdown`]:v&&C==="checkbox"}),Ye=()=>t!=null&&t.columnTitle?typeof t.columnTitle=="function"?t.columnTitle(Be):t.columnTitle:we,Ie={fixed:Ft,width:m,className:`${P}-selection-column`,title:Ye(),render:Pe,onCell:t.onCell,align:t.align,[ap]:{className:gt}};return re.map(De=>De===Xa?Ie:De)},[I,j,t,J,Z,ae,m,ve,A,B,g,ge,Y]),Z]};function Tne(e){return t=>{const{prefixCls:n,onExpand:r,record:s,expanded:i,expandable:o}=t,a=`${n}-row-expand-icon`;return p.createElement("button",{type:"button",onClick:l=>{r(s,l),l.stopPropagation()},className:ee(a,{[`${a}-spaced`]:!o,[`${a}-expanded`]:o&&i,[`${a}-collapsed`]:o&&!i}),"aria-label":i?e.collapse:e.expand,"aria-expanded":i})}}function Mne(e){return(n,r)=>{const s=n.querySelector(`.${e}-container`);let i=r;if(s){const o=getComputedStyle(s),a=Number.parseInt(o.borderLeftWidth,10),l=Number.parseInt(o.borderRightWidth,10);i=r-a-l}return i}}const wl=(e,t)=>"key"in e&&e.key!==void 0&&e.key!==null?e.key:e.dataIndex?Array.isArray(e.dataIndex)?e.dataIndex.join("."):e.dataIndex:t;function Ad(e,t){return t?`${t}-${e}`:`${e}`}const Ov=(e,t)=>typeof e=="function"?e(t):e,Ine=(e,t)=>{const n=Ov(e,t);return Object.prototype.toString.call(n)==="[object Object]"?"":n};var Dne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M349 838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V642H349v196zm531.1-684H143.9c-24.5 0-39.8 26.7-27.5 48l221.3 376h348.8l221.3-376c12.1-21.3-3.2-48-27.7-48z"}}]},name:"filter",theme:"filled"};function iR(){return iR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,iR({},e,{ref:t,icon:Dne})),Lne=p.forwardRef(Ane),One=e=>{const{dropPosition:t,dropLevelOffset:n,indent:r}=e,s={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:s.top=0,s.left=-n*r;break;case 1:s.bottom=0,s.left=-n*r;break;case 0:s.bottom=0,s.left=r;break}return K.createElement("div",{style:s})};function kne(e,t){const[n,r]=p.useState(!1);on(()=>{if(n)return e(),()=>{t()}},[n]),on(()=>(r(!0),()=>{r(!1)}),[])}function lp(){return lp=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{className:n,style:r,motion:s,motionNodes:i,motionType:o,onMotionStart:a,onMotionEnd:l,active:c,treeNodeRequiredProps:u,...h}=e,[g,m]=p.useState(!0),{prefixCls:C}=p.useContext(MP),v=i&&o!=="hide";on(()=>{i&&v!==g&&m(v)},[i]);const b=()=>{i&&a()},w=p.useRef(!1),S=()=>{i&&!w.current&&(w.current=!0,l())};kne(b,S);const x=P=>{v===P&&S()};return i?p.createElement(Li,lp({ref:t,visible:g},s,{motionAppear:o==="show",onVisibleChanged:x}),({className:P,style:F},M)=>p.createElement("div",{ref:M,className:ee(`${C}-treenode-motion`,P),style:F},i.map(E=>{const{data:{...I},title:A,key:L,isStart:D,isEnd:N}=E;delete I.children;const k=ip(L,u);return p.createElement(Vp,lp({},I,k,{title:A,active:c,data:E.data,key:L,isStart:D,isEnd:N}))}))):p.createElement(Vp,lp({domRef:t,className:n,style:r},h,{active:c}))});function Bne(e=[],t=[]){const n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function s(i,o){const a=new Map;i.forEach(c=>{a.set(c,!0)});const l=o.filter(c=>!a.has(c));return l.length===1?l[0]:null}return no.key===n),s=e[r+1],i=t.findIndex(o=>o.key===n);if(s){const o=t.findIndex(a=>a.key===s.key);return t.slice(i+1,o)}return t.slice(i+1)}function RC(){return RC=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{prefixCls:n,data:r,selectable:s,checkable:i,expandedKeys:o,selectedKeys:a,checkedKeys:l,loadedKeys:c,loadingKeys:u,halfCheckedKeys:h,keyEntities:g,disabled:m,dragging:C,dragOverNodeKey:v,dropPosition:b,motion:w,height:S,itemHeight:x,virtual:P,scrollWidth:F,focusable:M,activeItem:E,tabIndex:I,onKeyDown:A,onFocus:L,onBlur:D,onActiveChange:N,onListChangeStart:k,onListChangeEnd:G,...$}=e,_=ya(),U=p.useRef(null),V=p.useRef(null);p.useImperativeHandle(t,()=>({scrollTo:re=>{U.current.scrollTo(re)},getIndentWidth:()=>V.current.offsetWidth}));const[W,j]=p.useState(o),[H,B]=p.useState(r),[Y,J]=p.useState(r),[te,Z]=p.useState([]),[ae,de]=p.useState(null),ge=p.useRef(r);ge.current=r;function ve(){const re=ge.current;B(re),J(re),Z([]),de(null),G()}on(()=>{j(o);const re=Bne(W,o);if(re.key!==null)if(re.add){const ce=H.findIndex(({key:fe})=>fe===re.key),X=iL(rL(H,r,re.key),P,S,x),ue=H.slice();ue.splice(ce+1,0,sL),J(ue),Z(X),de("show")}else{const ce=r.findIndex(({key:fe})=>fe===re.key),X=iL(rL(r,H,re.key),P,S,x),ue=r.slice();ue.splice(ce+1,0,sL),J(ue),Z(X),de("hide")}else H!==r&&(B(r),J(r))},[o,r]),p.useEffect(()=>{C||ve()},[C]);const Re=w?Y:r,ne={expandedKeys:o,selectedKeys:a,loadedKeys:c,loadingKeys:u,checkedKeys:l,halfCheckedKeys:h,dragOverNodeKey:v,dropPosition:b,keyEntities:g};return p.createElement(p.Fragment,null,p.createElement("div",{className:`${n}-treenode`,"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},p.createElement("div",{className:`${n}-indent`},p.createElement("div",{ref:V,className:`${n}-indent-unit`}))),p.createElement(Rv,RC({},$,{data:Re,itemKey:oL,height:S,fullHeight:!1,virtual:P,itemHeight:x,scrollWidth:F,prefixCls:`${n}-list`,ref:U,role:"tree",tabIndex:M!==!1&&!m?I:void 0,"aria-activedescendant":E?oB(_,E.key):void 0,onKeyDown:A,onFocus:L,onBlur:D,onVisibleChange:re=>{re.every(ce=>oL(ce)!==Dc)&&ve()}}),re=>{const{pos:ce,data:{...X},title:ue,key:fe,isStart:oe,isEnd:we}=re,Be=gg(fe,ce);delete X.key,delete X.children;const Ae=ip(Be,ne);return p.createElement(Nne,RC({},X,Ae,{title:ue,active:!!E&&fe===E.key,pos:ce,data:re.data,isStart:oe,isEnd:we,motion:w,motionNodes:fe===Dc?te:null,motionType:ae,onMotionStart:k,onMotionEnd:ve,treeNodeRequiredProps:ne,treeId:_,onMouseMove:()=>{N(null)}}))}))});function aR(){return aR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{expandedKeys:s,keyEntities:i}=this.state,{onDragStart:o}=this.props,{eventKey:a}=r;this.dragNodeProps=r,this.dragStartMousePosition={x:n.clientX,y:n.clientY};const l=bo(s,a);this.setState({draggingNodeKey:a,dragChildrenKeys:Rne(a,i),indent:this.listRef.current.getIndentWidth()}),this.setExpandedKeys(l),window.addEventListener("dragend",this.onWindowDragEnd),o==null||o({event:n,node:Cr(r)})});Fe(this,"onNodeDragEnter",(n,r)=>{const{expandedKeys:s,keyEntities:i,dragChildrenKeys:o,flattenNodes:a,indent:l}=this.state,{onDragEnter:c,onExpand:u,allowDrop:h,direction:g}=this.props,{pos:m,eventKey:C}=r;if(this.currentMouseOverDroppableNodeKey!==C&&(this.currentMouseOverDroppableNodeKey=C),!this.dragNodeProps){this.resetDragState();return}const{dropPosition:v,dropLevelOffset:b,dropTargetKey:w,dropContainerKey:S,dropTargetPos:x,dropAllowed:P,dragOverNodeKey:F}=eL(n,this.dragNodeProps,r,l,this.dragStartMousePosition,h,a,i,s,g);if(o.includes(w)||!P){this.resetDragState();return}if(this.delayedDragEnterLogic||(this.delayedDragEnterLogic={}),Object.keys(this.delayedDragEnterLogic).forEach(M=>{clearTimeout(this.delayedDragEnterLogic[M])}),this.dragNodeProps.eventKey!==r.eventKey&&(n.persist(),this.delayedDragEnterLogic[m]=window.setTimeout(()=>{if(this.state.draggingNodeKey===null)return;let M=[...s];const E=ms(i,r.eventKey);E&&(E.children||[]).length&&(M=Ko(s,r.eventKey)),this.props.hasOwnProperty("expandedKeys")||this.setExpandedKeys(M),u==null||u(M,{node:Cr(r),expanded:!0,nativeEvent:n.nativeEvent})},800)),this.dragNodeProps.eventKey===w&&b===0){this.resetDragState();return}this.setState({dragOverNodeKey:F,dropPosition:v,dropLevelOffset:b,dropTargetKey:w,dropContainerKey:S,dropTargetPos:x,dropAllowed:P}),c==null||c({event:n,node:Cr(r),expandedKeys:s})});Fe(this,"onNodeDragOver",(n,r)=>{const{dragChildrenKeys:s,flattenNodes:i,keyEntities:o,expandedKeys:a,indent:l}=this.state,{onDragOver:c,allowDrop:u,direction:h}=this.props;if(!this.dragNodeProps)return;const{dropPosition:g,dropLevelOffset:m,dropTargetKey:C,dropContainerKey:v,dropTargetPos:b,dropAllowed:w,dragOverNodeKey:S}=eL(n,this.dragNodeProps,r,l,this.dragStartMousePosition,u,i,o,a,h);s.includes(C)||!w||(this.dragNodeProps.eventKey===C&&m===0?this.state.dropPosition===null&&this.state.dropLevelOffset===null&&this.state.dropTargetKey===null&&this.state.dropContainerKey===null&&this.state.dropTargetPos===null&&this.state.dropAllowed===!1&&this.state.dragOverNodeKey===null||this.resetDragState():g===this.state.dropPosition&&m===this.state.dropLevelOffset&&C===this.state.dropTargetKey&&v===this.state.dropContainerKey&&b===this.state.dropTargetPos&&w===this.state.dropAllowed&&S===this.state.dragOverNodeKey||this.setState({dropPosition:g,dropLevelOffset:m,dropTargetKey:C,dropContainerKey:v,dropTargetPos:b,dropAllowed:w,dragOverNodeKey:S}),c==null||c({event:n,node:Cr(r)}))});Fe(this,"onNodeDragLeave",(n,r)=>{this.currentMouseOverDroppableNodeKey===r.eventKey&&!n.currentTarget.contains(n.relatedTarget)&&(this.resetDragState(),this.currentMouseOverDroppableNodeKey=null);const{onDragLeave:s}=this.props;s==null||s({event:n,node:Cr(r)})});Fe(this,"onWindowDragEnd",n=>{this.onNodeDragEnd(n,null,!0),window.removeEventListener("dragend",this.onWindowDragEnd)});Fe(this,"onNodeDragEnd",(n,r)=>{const{onDragEnd:s}=this.props;this.setState({dragOverNodeKey:null}),this.cleanDragState(),s==null||s({event:n,node:Cr(r)}),this.dragNodeProps=null,window.removeEventListener("dragend",this.onWindowDragEnd)});Fe(this,"onNodeDrop",(n,r,s=!1)=>{var v;const{dragChildrenKeys:i,dropPosition:o,dropTargetKey:a,dropTargetPos:l,dropAllowed:c}=this.state;if(!c)return;const{onDrop:u}=this.props;if(this.setState({dragOverNodeKey:null}),this.cleanDragState(),a===null)return;const h={...ip(a,this.getTreeNodeRequiredProps()),active:((v=this.getActiveItem())==null?void 0:v.key)===a,data:ms(this.state.keyEntities,a).node},g=i.includes(a);Jn(!g,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");const m=IP(l),C={event:n,node:Cr(h),dragNode:this.dragNodeProps?Cr(this.dragNodeProps):null,dragNodesKeys:[this.dragNodeProps.eventKey].concat(i),dropToGap:o!==0,dropPosition:o+Number(m[m.length-1])};s||u==null||u(C),this.dragNodeProps=null});Fe(this,"cleanDragState",()=>{const{draggingNodeKey:n}=this.state;n!==null&&this.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),this.dragStartMousePosition=null,this.currentMouseOverDroppableNodeKey=null});Fe(this,"triggerExpandActionExpand",(n,r)=>{const{expandedKeys:s,flattenNodes:i}=this.state,{expanded:o,key:a,isLeaf:l}=r;if(l||n.shiftKey||n.metaKey||n.ctrlKey)return;const c=i.filter(h=>h.key===a)[0],u=Cr({...ip(a,this.getTreeNodeRequiredProps()),data:c.data});this.setExpandedKeys(o?bo(s,a):Ko(s,a)),this.onNodeExpand(n,u)});Fe(this,"onNodeClick",(n,r)=>{const{onClick:s,expandAction:i}=this.props;i==="click"&&this.triggerExpandActionExpand(n,r),s==null||s(n,r)});Fe(this,"onNodeDoubleClick",(n,r)=>{const{onDoubleClick:s,expandAction:i}=this.props;i==="doubleClick"&&this.triggerExpandActionExpand(n,r),s==null||s(n,r)});Fe(this,"onNodeSelect",(n,r)=>{let{selectedKeys:s}=this.state;const{keyEntities:i,fieldNames:o}=this.state,{onSelect:a,multiple:l}=this.props,{selected:c}=r,u=r[o.key],h=!c;h?l?s=Ko(s,u):s=[u]:s=bo(s,u);const g=s.map(m=>{const C=ms(i,m);return C?C.node:null}).filter(Boolean);this.setUncontrolledState({selectedKeys:s}),a==null||a(s,{event:"select",selected:h,node:r,selectedNodes:g,nativeEvent:n.nativeEvent})});Fe(this,"onNodeCheck",(n,r,s)=>{const{keyEntities:i,checkedKeys:o,halfCheckedKeys:a}=this.state,{checkStrictly:l,onCheck:c}=this.props,{key:u}=r;let h;const g={event:"check",node:r,checked:s,nativeEvent:n.nativeEvent};if(l){const m=s?Ko(o,u):bo(o,u),C=bo(a,u);h={checked:m,halfChecked:C},g.checkedNodes=m.map(v=>ms(i,v)).filter(Boolean).map(v=>v.node),this.setUncontrolledState({checkedKeys:m})}else{let{checkedKeys:m,halfCheckedKeys:C}=qu([...o,u],!0,i);if(!s){const v=new Set(m);v.delete(u),{checkedKeys:m,halfCheckedKeys:C}=qu(Array.from(v),{halfCheckedKeys:C},i)}h=m,g.checkedNodes=[],g.checkedNodesPositions=[],g.halfCheckedKeys=C,m.forEach(v=>{const b=ms(i,v);if(!b)return;const{node:w,pos:S}=b;g.checkedNodes.push(w),g.checkedNodesPositions.push({node:w,pos:S})}),this.setUncontrolledState({checkedKeys:m},!1,{halfCheckedKeys:C})}c==null||c(h,g)});Fe(this,"onNodeLoad",n=>{var a;const{key:r}=n,{keyEntities:s}=this.state,i=ms(s,r);if((a=i==null?void 0:i.children)!=null&&a.length)return;const o=new Promise((l,c)=>{this.setState(({loadedKeys:u=[],loadingKeys:h=[]})=>{const{loadData:g,onLoad:m}=this.props;return!g||u.includes(r)||h.includes(r)?null:(g(n).then(()=>{const{loadedKeys:v}=this.state,b=Ko(v,r);m==null||m(b,{event:"load",node:n}),this.setUncontrolledState({loadedKeys:b}),this.setState(w=>({loadingKeys:bo(w.loadingKeys,r)})),l()}).catch(v=>{if(this.setState(b=>({loadingKeys:bo(b.loadingKeys,r)})),this.loadingRetryTimes[r]=(this.loadingRetryTimes[r]||0)+1,this.loadingRetryTimes[r]>=Gne){const{loadedKeys:b}=this.state;Jn(!1,"Retry for `loadData` many times but still failed. No more retry."),this.setUncontrolledState({loadedKeys:Ko(b,r)}),l()}c(v)}),{loadingKeys:Ko(h,r)})})});return o.catch(()=>{}),o});Fe(this,"onNodeMouseEnter",(n,r)=>{const{onMouseEnter:s}=this.props;s==null||s({event:n,node:r})});Fe(this,"onNodeMouseLeave",(n,r)=>{const{onMouseLeave:s}=this.props;s==null||s({event:n,node:r})});Fe(this,"onNodeContextMenu",(n,r)=>{const{onRightClick:s}=this.props;s&&(n.preventDefault(),s({event:n,node:r}))});Fe(this,"onFocus",(...n)=>{var l;const{onFocus:r,disabled:s}=this.props,{activeKey:i,selectedKeys:o,flattenNodes:a}=this.state;if(!s&&i===null){const c=o.find(u=>a.some(h=>h.key===u));c!==void 0?this.onActiveChange(c):this.onActiveChange(((l=a==null?void 0:a[0])==null?void 0:l.key)||null)}r==null||r(...n)});Fe(this,"onBlur",(...n)=>{const{onBlur:r}=this.props;this.onActiveChange(null),r==null||r(...n)});Fe(this,"getTreeNodeRequiredProps",()=>{const{expandedKeys:n,selectedKeys:r,loadedKeys:s,loadingKeys:i,checkedKeys:o,halfCheckedKeys:a,dragOverNodeKey:l,dropPosition:c,keyEntities:u}=this.state;return{expandedKeys:n||[],selectedKeys:r||[],loadedKeys:s||[],loadingKeys:i||[],checkedKeys:o||[],halfCheckedKeys:a||[],dragOverNodeKey:l,dropPosition:c,keyEntities:u}});Fe(this,"setExpandedKeys",n=>{const{treeData:r,fieldNames:s}=this.state,i=Hw(r,n,s);this.setUncontrolledState({expandedKeys:n,flattenNodes:i},!0)});Fe(this,"onNodeExpand",(n,r)=>{let{expandedKeys:s}=this.state;const{listChanging:i,fieldNames:o}=this.state,{onExpand:a,loadData:l}=this.props,{expanded:c}=r,u=r[o.key];if(i)return;const h=s.includes(u),g=!c;if(Jn(c&&h||!c&&!h,"Expand state not sync with index check"),s=g?Ko(s,u):bo(s,u),this.setExpandedKeys(s),a==null||a(s,{node:r,expanded:g,nativeEvent:n.nativeEvent}),g&&l){const m=this.onNodeLoad(r);m&&m.then(()=>{const C=Hw(this.state.treeData,s,o);this.setUncontrolledState({flattenNodes:C})}).catch(()=>{const{expandedKeys:C}=this.state,v=bo(C,u);this.setExpandedKeys(v)})}});Fe(this,"onListChangeStart",()=>{this.setUncontrolledState({listChanging:!0})});Fe(this,"onListChangeEnd",()=>{setTimeout(()=>{this.setUncontrolledState({listChanging:!1})})});Fe(this,"onActiveChange",n=>{const{activeKey:r}=this.state,{onActiveChange:s,itemScrollOffset:i=0}=this.props;r!==n&&(this.setState({activeKey:n}),n!==null&&this.scrollTo({key:n,offset:i}),s==null||s(n))});Fe(this,"getActiveItem",()=>{const{activeKey:n,flattenNodes:r}=this.state;return n===null?null:r.find(({key:s})=>s===n)||null});Fe(this,"offsetActiveKey",n=>{const{flattenNodes:r,activeKey:s}=this.state;let i=r.findIndex(({key:a})=>a===s);i===-1&&n<0&&(i=r.length),i=(i+n+r.length)%r.length;const o=r[i];if(o){const{key:a}=o;this.onActiveChange(a)}else this.onActiveChange(null)});Fe(this,"onKeyDown",n=>{var C,v,b;const{activeKey:r,expandedKeys:s,checkedKeys:i,flattenNodes:o,keyEntities:a}=this.state,{onKeyDown:l,checkable:c,selectable:u,disabled:h,loadData:g}=this.props;if(h)return;switch(n.key){case"ArrowUp":{this.offsetActiveKey(-1),n.preventDefault();break}case"ArrowDown":{this.offsetActiveKey(1),n.preventDefault();break}case"Home":{this.onActiveChange((C=o==null?void 0:o[0])==null?void 0:C.key),n.preventDefault();break}case"End":{this.onActiveChange((v=o==null?void 0:o[o.length-1])==null?void 0:v.key),n.preventDefault();break}}const m=this.getActiveItem();if(m&&m.data){const w=this.getTreeNodeRequiredProps(),S=Cr({...ip(r,w),data:m.data,active:!0}),x=ms(a,r),P=!!((b=x==null?void 0:x.children)!=null&&b.length),F=!mG(m.data.isLeaf,g,P,S.loaded),M=c&&!S.disabled&&S.checkable!==!1&&!S.disableCheckbox,E=!c&&u&&!S.disabled&&S.selectable!==!1;switch(n.key){case"ArrowLeft":{F&&s.includes(r)?this.onNodeExpand({},S):m.parent&&this.onActiveChange(m.parent.key),n.preventDefault();break}case"ArrowRight":{F&&!s.includes(r)?this.onNodeExpand({},S):m.children&&m.children.length&&this.onActiveChange(m.children[0].key),n.preventDefault();break}case"Enter":{F?(n.preventDefault(),this.onNodeExpand({},S)):M?i.includes(r)||(n.preventDefault(),this.onNodeCheck({},S,!0)):E&&!S.selected&&(n.preventDefault(),this.onNodeSelect({},S));break}case" ":{M?(n.preventDefault(),this.onNodeCheck({},S,!i.includes(r))):E&&(n.preventDefault(),this.onNodeSelect({},S));break}}}l==null||l(n)});Fe(this,"setUncontrolledState",(n,r=!1,s=null)=>{if(!this.destroyed){let i=!1,o=!0;const a={};Object.keys(n).forEach(l=>{if(this.props.hasOwnProperty(l)){o=!1;return}i=!0,a[l]=n[l]}),i&&(!r||o)&&this.setState({...a,...s})}});Fe(this,"scrollTo",n=>{this.listRef.current.scrollTo(n)})}componentDidMount(){this.destroyed=!1,this.onUpdated()}componentDidUpdate(){this.onUpdated()}onUpdated(){const{activeKey:n,itemScrollOffset:r=0}=this.props;n!==void 0&&n!==this.state.activeKey&&(this.setState({activeKey:n}),n!==null&&this.scrollTo({key:n,offset:r}))}componentWillUnmount(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}static getDerivedStateFromProps(n,r){const{prevProps:s}=r,i={prevProps:n};function o(u){return!s&&n.hasOwnProperty(u)||s&&s[u]!==n[u]}let a,{fieldNames:l}=r;if(o("fieldNames")&&(l=ad(n.fieldNames),i.fieldNames=l),o("treeData")?{treeData:a}=n:o("children")&&(Jn(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),a=fG(n.children)),a){i.treeData=a;const u=wP(a,{fieldNames:l});i.keyEntities={[Dc]:nV,...u.keyEntities}}const c=i.keyEntities||r.keyEntities;if(o("expandedKeys")||s&&o("autoExpandParent"))i.expandedKeys=n.autoExpandParent||!s&&n.defaultExpandParent?tR(n.expandedKeys,c):n.expandedKeys;else if(!s&&n.defaultExpandAll){const u={...c};delete u[Dc];const h=[];Object.keys(u).forEach(g=>{const m=u[g];m.children&&m.children.length&&h.push(m.key)}),i.expandedKeys=h}else!s&&n.defaultExpandedKeys&&(i.expandedKeys=n.autoExpandParent||n.defaultExpandParent?tR(n.defaultExpandedKeys,c):n.defaultExpandedKeys);if(i.expandedKeys||delete i.expandedKeys,a||i.expandedKeys){const u=Hw(a||r.treeData,i.expandedKeys||r.expandedKeys,l);i.flattenNodes=u}if(n.selectable&&(o("selectedKeys")?i.selectedKeys=tL(n.selectedKeys,n):!s&&n.defaultSelectedKeys&&(i.selectedKeys=tL(n.defaultSelectedKeys,n))),n.checkable){let u;if(o("checkedKeys")?u=Kw(n.checkedKeys)||{}:!s&&n.defaultCheckedKeys?u=Kw(n.defaultCheckedKeys)||{}:a&&(u=Kw(n.checkedKeys)||{checkedKeys:r.checkedKeys,halfCheckedKeys:r.halfCheckedKeys}),u){let{checkedKeys:h=[],halfCheckedKeys:g=[]}=u;n.checkStrictly||({checkedKeys:h,halfCheckedKeys:g}=qu(h,!0,c)),i.checkedKeys=h,i.halfCheckedKeys=g}}return o("loadedKeys")&&(i.loadedKeys=n.loadedKeys),i}resetDragState(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}render(){const{flattenNodes:n,keyEntities:r,draggingNodeKey:s,dropLevelOffset:i,dropContainerKey:o,dropTargetKey:a,dropPosition:l,dragOverNodeKey:c,indent:u}=this.state,{prefixCls:h,className:g,style:m,styles:C,classNames:v,showLine:b,focusable:w,tabIndex:S=0,selectable:x,showIcon:P,icon:F,switcherIcon:M,draggable:E,checkable:I,checkStrictly:A,disabled:L,motion:D,loadData:N,filterTreeNode:k,height:G,itemHeight:$,scrollWidth:_,virtual:U,titleRender:V,dropIndicatorRender:W,onContextMenu:j,onScroll:H,direction:B,rootClassName:Y,rootStyle:J}=this.props,te=Mr(this.props,{aria:!0,data:!0});let Z;E&&(typeof E=="object"?Z=E:typeof E=="function"?Z={nodeDraggable:E}:Z={});const ae={styles:C,classNames:v,prefixCls:h,selectable:x,showIcon:P,icon:F,switcherIcon:M,draggable:Z,draggingNodeKey:s,checkable:I,checkStrictly:A,disabled:L,keyEntities:r,dropLevelOffset:i,dropContainerKey:o,dropTargetKey:a,dropPosition:l,dragOverNodeKey:c,indent:u,direction:B,dropIndicatorRender:W,loadData:N,filterTreeNode:k,titleRender:V,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return p.createElement(MP.Provider,{value:ae},p.createElement("div",{className:ee(h,g,Y,{[`${h}-show-line`]:b}),style:J},p.createElement($ne,aR({ref:this.listRef,prefixCls:h,style:m,data:n,disabled:L,selectable:x,checkable:!!I,motion:D,dragging:s!==null,height:G,itemHeight:$,virtual:U,focusable:w,tabIndex:S,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:j,onScroll:H,scrollWidth:_},this.getTreeNodeRequiredProps(),te))))}},Fe(Sm,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:One,allowDrop:()=>!0,expandAction:!1}),Fe(Sm,"TreeNode",Vp),Sm);var Hne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"};function lR(){return lR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,lR({},e,{ref:t,icon:Hne})),rV=p.forwardRef(zne);var Wne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"};function cR(){return cR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,cR({},e,{ref:t,icon:Wne})),Une=p.forwardRef(_ne);var jne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"};function uR(){return uR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,uR({},e,{ref:t,icon:jne})),qne=p.forwardRef(Kne);var Xne={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"};function dR(){return dR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,dR({},e,{ref:t,icon:Xne})),Qne=p.forwardRef(Yne),Zne=({treeCls:e,treeNodeCls:t,directoryNodeSelectedBg:n,directoryNodeSelectedColor:r,motionDurationMid:s,borderRadius:i,controlItemBgHover:o})=>({[`${e}${e}-directory ${t}`]:{[`${e}-node-content-wrapper`]:{position:"static",[`&:has(${e}-drop-indicator)`]:{position:"relative"},[`> *:not(${e}-drop-indicator)`]:{position:"relative"},"&:hover":{background:"transparent"},"&:before":{position:"absolute",inset:0,transition:`background-color ${s}`,content:'""',borderRadius:i},"&:hover:before":{background:o}},[`${e}-switcher, ${e}-checkbox, ${e}-draggable-icon`]:{zIndex:1},"&-selected":{background:n,borderRadius:i,[`${e}-switcher, ${e}-draggable-icon`]:{color:r},[`${e}-node-content-wrapper`]:{color:r,background:"transparent","&, &:hover":{color:r},"&:before, &:hover:before":{background:n}}}}}),Jne=new yn("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),ere=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),tre=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${he(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),nre=(e,t)=>{const{treeCls:n,treeNodeCls:r,treeNodePadding:s,titleHeight:i,indentSize:o,motionDurationMid:a,nodeSelectedBg:l,nodeHoverBg:c,colorTextQuaternary:u,controlItemBgActiveDisabled:h}=t;return{[n]:{...jn(t),"--rc-virtual-list-scrollbar-bg":t.colorSplit,background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,"&-rtl":{direction:"rtl"},[`&${n}-rtl ${n}-switcher_close ${n}-switcher-icon svg`]:{transform:"rotate(90deg)"},[`${n}-list`]:{"&:focus-visible":{outline:"none",[`${r}-active ${n}-node-content-wrapper`]:{...ro(t)}}},[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${r}.dragging:after`]:{position:"absolute",inset:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:Jne,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none",borderRadius:t.borderRadius}}},[r]:{display:"flex",alignItems:"flex-start",marginBottom:s,lineHeight:he(i),position:"relative","&:before":{content:'""',position:"absolute",zIndex:1,insetInlineStart:0,width:"100%",top:"100%",height:s},[`&-disabled ${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}},[`${n}-checkbox-disabled + ${n}-node-selected,&${r}-disabled${r}-selected ${n}-node-content-wrapper`]:{backgroundColor:h},[`${n}-checkbox-disabled`]:{pointerEvents:"unset"},[`&:not(${r}-disabled)`]:{[`${n}-node-content-wrapper`]:{"&:hover":{color:t.nodeHoverColor}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:t.colorPrimary,fontWeight:t.fontWeightStrong},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:i,textAlign:"center",visibility:"visible",color:u},[`&${r}-disabled ${n}-draggable-icon`]:{visibility:"hidden"}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:o}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher, ${n}-checkbox`]:{marginInlineEnd:t.calc(t.calc(i).sub(t.controlInteractiveSize)).div(2).equal()},[`${n}-switcher`]:{...ere(e,t),position:"relative",flex:"none",alignSelf:"stretch",width:i,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,"&-noop":{cursor:"unset"},"&:before":{pointerEvents:"none",content:'""',width:i,height:i,position:"absolute",left:{_skip_check_:!0,value:0},top:0,borderRadius:t.borderRadius,transition:`all ${t.motionDurationSlow}`},[`&:not(${n}-switcher-noop):hover:before`]:{backgroundColor:t.colorBgTextHover},[`&_close ${n}-switcher-icon svg`]:{transform:"rotate(-90deg)"},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(s).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(i).div(2).equal()).mul(.8).equal(),height:t.calc(i).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}},[`${n}-node-content-wrapper`]:{position:"relative",minHeight:i,paddingBlock:0,paddingInline:t.paddingXS,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:[`all ${a}`,"border 0s","line-height 0s","box-shadow 0s"].join(", "),...tre(e,t),"&:hover":{backgroundColor:c},[`&${n}-node-selected`]:{color:t.nodeSelectedColor,backgroundColor:l},[`${n}-iconEle`]:{display:"inline-block",width:i,height:i,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${r}.drop-container > [draggable]`]:{boxShadow:`0 0 0 2px ${t.colorPrimary}`},"&-show-line":{[`${n}-indent-unit`]:{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(i).div(2).equal(),bottom:t.calc(s).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end:before":{display:"none"}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${r}-leaf-last ${n}-switcher-leaf-line:before`]:{top:"auto !important",bottom:"auto !important",height:`${he(t.calc(i).div(2).equal())} !important`}}}},rre=(e,t,n=!0)=>{const r=`.${e}`,s=`${r}-treenode`,i=t.calc(t.paddingXS).div(2).equal(),o=En(t,{treeCls:r,treeNodeCls:s,treeNodePadding:i});return[nre(e,o),n&&Zne(o)].filter(Boolean)},sre=e=>{const{controlHeightSM:t,controlItemBgHover:n,controlItemBgActive:r}=e,s=t;return{titleHeight:s,indentSize:s,nodeHoverBg:n,nodeHoverColor:e.colorText,nodeSelectedBg:r,nodeSelectedColor:e.colorText}},ire=e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return{...sre(e),directoryNodeSelectedColor:t,directoryNodeSelectedBg:n}},ore=Ln("Tree",(e,{prefixCls:t})=>[{[e.componentCls]:vG(`${t}-checkbox`,e)},rre(t,e),MB(e)],ire),aL=4;function are(e){const{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:s,direction:i="ltr"}=e,o=i==="ltr"?"left":"right",a=i==="ltr"?"right":"left",l={[o]:-n*s+aL,[a]:0};switch(t){case-1:l.top=-3;break;case 1:l.bottom=-3;break;default:l.bottom=-3,l[o]=s+aL;break}return K.createElement("div",{style:l,className:`${r}-drop-indicator`})}var lre={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"};function hR(){return hR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,hR({},e,{ref:t,icon:lre})),ure=p.forwardRef(cre);var dre={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"};function pR(){return pR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,pR({},e,{ref:t,icon:dre})),pre=p.forwardRef(hre);var gre={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"};function gR(){return gR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,gR({},e,{ref:t,icon:gre})),mre=p.forwardRef(fre),Cre=e=>{var g,m;const{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:s,switcherLoadingIcon:i}=e,{isLeaf:o,expanded:a,loading:l}=r;if(l)return p.isValidElement(i)?i:p.createElement(Cv,{className:`${t}-switcher-loading-icon`});let c;if(s&&typeof s=="object"&&(c=s.showLeafIcon),o){if(!s)return null;if(typeof c!="boolean"&&c){const C=typeof c=="function"?c(r):c,v=`${t}-switcher-line-custom-icon`;return p.isValidElement(C)?Xr(C,{className:ee((g=C.props)==null?void 0:g.className,v)}):C}return c?p.createElement(rV,{className:`${t}-switcher-line-icon`}):p.createElement("span",{className:`${t}-switcher-leaf-line`})}const u=`${t}-switcher-icon`,h=typeof n=="function"?n(r):n;return p.isValidElement(h)?Xr(h,{className:ee((m=h.props)==null?void 0:m.className,u)}):h!==void 0?h:s?a?p.createElement(pre,{className:`${t}-switcher-line-icon`}):p.createElement(mre,{className:`${t}-switcher-line-icon`}):p.createElement(ure,{className:u})},sV=K.forwardRef((e,t)=>{var te;const{getPrefixCls:n,direction:r,className:s,style:i,classNames:o,styles:a}=Hn("tree"),{virtual:l}=K.useContext(Kt),{prefixCls:c,className:u,showIcon:h=!1,showLine:g,switcherIcon:m,switcherLoadingIcon:C,blockNode:v=!1,children:b,checkable:w=!1,selectable:S=!0,draggable:x,disabled:P,motion:F,style:M,rootClassName:E,classNames:I,styles:A}=e,L=K.useContext(so),D=P??L,N=n("tree",c),k=n(),G=F??{...RB(k),motionAppear:!1},$={...e,showIcon:h,blockNode:v,checkable:w,selectable:S,disabled:D,motion:G},[_,U]=Kn([o,I],[a,A],{props:$}),V={...$,showLine:!!g,dropIndicatorRender:are},[W,j]=ore(N),[,H]=ds(),B=H.paddingXS/2+(((te=H.Tree)==null?void 0:te.titleHeight)||H.controlHeightSM),Y=K.useMemo(()=>{if(!x)return!1;let Z={};switch(typeof x){case"function":Z.nodeDraggable=x;break;case"object":Z={...x};break}return Z.icon!==!1&&(Z.icon=Z.icon||K.createElement(Qne,null)),Z},[x]),J=Z=>K.createElement(Cre,{prefixCls:N,switcherIcon:m,switcherLoadingIcon:C,treeNodeProps:Z,showLine:g});return K.createElement(Vne,{itemHeight:B,ref:t,virtual:l,...V,prefixCls:N,className:ee({[`${N}-icon-hide`]:!h,[`${N}-block-node`]:v,[`${N}-unselectable`]:!S,[`${N}-rtl`]:r==="rtl",[`${N}-disabled`]:D},s,u,W,j),style:{...i,...M},rootClassName:ee(_==null?void 0:_.root,E),rootStyle:U==null?void 0:U.root,classNames:_,styles:U,direction:r,checkable:w&&K.createElement("span",{className:`${N}-checkbox-inner`}),selectable:S,switcherIcon:J,draggable:Y},b)}),lL=0,qw=1,cL=2;function DP(e,t,n){const{key:r,children:s}=n;function i(o){const a=o[r],l=o[s];t(a,o)!==!1&&DP(l||[],t,n)}e.forEach(i)}function vre({treeData:e,expandedKeys:t,startKey:n,endKey:r,fieldNames:s}){const i=[];let o=lL;if(n&&n===r)return[n];if(!n||!r)return[];function a(l){return l===n||l===r}return DP(e,l=>{if(o===cL)return!1;if(a(l)){if(i.push(l),o===lL)o=qw;else if(o===qw)return o=cL,!1}else o===qw&&i.push(l);return t.includes(l)},ad(s)),i}function Xw(e,t,n){const r=nn(t),s=[];return DP(e,(i,o)=>{const a=r.indexOf(i);return a!==-1&&(s.push(o),r.splice(a,1)),!!r.length},ad(n)),s}function yre(e){const{isLeaf:t,expanded:n}=e;return t?p.createElement(rV,null):n?p.createElement(Une,null):p.createElement(qne,null)}function uL({treeData:e,children:t}){return e||fG(t)}const bre=({defaultExpandAll:e,defaultExpandParent:t,defaultExpandedKeys:n,...r},s)=>{const i=p.useRef(null),o=p.useRef(null),a=()=>{const{keyEntities:E}=wP(uL(r),{fieldNames:r.fieldNames});let I;const A=r.expandedKeys||n||[];return e?I=Object.keys(E):t?I=tR(A,E):I=A,I},[l,c]=p.useState(r.selectedKeys||r.defaultSelectedKeys||[]),[u,h]=p.useState(()=>a());p.useEffect(()=>{"selectedKeys"in r&&c(r.selectedKeys)},[r.selectedKeys]),p.useEffect(()=>{"expandedKeys"in r&&h(r.expandedKeys)},[r.expandedKeys]);const g=(E,I)=>{var A;return"expandedKeys"in r||h(E),(A=r.onExpand)==null?void 0:A.call(r,E,I)},m=(E,I)=>{var W;const{multiple:A,fieldNames:L}=r,{node:D,nativeEvent:N}=I,{key:k=""}=D,G=uL(r),$={...I,selected:!0},_=(N==null?void 0:N.ctrlKey)||(N==null?void 0:N.metaKey),U=N==null?void 0:N.shiftKey;let V;A&&_?(V=E,i.current=k,o.current=V,$.selectedNodes=Xw(G,V,L)):A&&U?(V=Array.from(new Set([].concat(nn(o.current||[]),nn(vre({treeData:G,expandedKeys:u,startKey:k,endKey:i.current,fieldNames:L}))))),$.selectedNodes=Xw(G,V,L)):(V=[k],i.current=k,o.current=V,$.selectedNodes=Xw(G,V,L)),(W=r.onSelect)==null||W.call(r,V,$),"selectedKeys"in r||c(V)},{getPrefixCls:C,direction:v}=p.useContext(Kt),{prefixCls:b,className:w,showIcon:S=!0,expandAction:x="click",...P}=r,F=C("tree",b),M=ee(`${F}-directory`,{[`${F}-directory-rtl`]:v==="rtl"},w);return p.createElement(sV,{icon:yre,ref:s,blockNode:!0,...P,showIcon:S,expandAction:x,prefixCls:F,className:M,expandedKeys:u,selectedKeys:l,onSelect:m,onExpand:g})},wre=p.forwardRef(bre),AP=sV;AP.DirectoryTree=wre;AP.TreeNode=Vp;const iV=K.createContext(!1),dL=e=>{const{value:t,filterSearch:n,tablePrefixCls:r,locale:s,onChange:i}=e;return n?p.createElement("div",{className:`${r}-filter-dropdown-search`},p.createElement(fg,{prefix:p.createElement(iP,null),placeholder:s.filterSearchPlaceholder,onChange:i,value:t,htmlSize:1,className:`${r}-filter-dropdown-search-input`})):null},Sre=e=>{const{keyCode:t}=e;t===Et.ENTER&&e.stopPropagation()},xre=p.forwardRef((e,t)=>p.createElement("div",{className:e.className,onClick:n=>n.stopPropagation(),onKeyDown:Sre,ref:t},e.children));function Xu(e){let t=[];return(e||[]).forEach(({value:n,children:r})=>{t.push(n),r&&(t=[].concat(nn(t),nn(Xu(r))))}),t}function Rre(e){return e.some(({children:t})=>t)}function oV(e,t){return typeof t=="string"||typeof t=="number"?t==null?void 0:t.toString().toLowerCase().includes(e.trim().toLowerCase()):!1}function aV({filters:e,prefixCls:t,filteredKeys:n,filterMultiple:r,searchValue:s,filterSearch:i}){return e.map((o,a)=>{const l=String(o.value);if(o.children)return{key:l||a,label:o.text,popupClassName:`${t}-dropdown-submenu`,children:aV({filters:o.children,prefixCls:t,filteredKeys:n,filterMultiple:r,searchValue:s,filterSearch:i})};const c=r?ld:dg,u={key:o.value!==void 0?l:a,label:p.createElement(p.Fragment,null,p.createElement(c,{checked:n.includes(l)}),p.createElement("span",null,o.text))};return s.trim()?typeof i=="function"?i(s,o)?u:null:oV(s,o.text)?u:null:u})}function Yw(e){return e||[]}const Ere=e=>{var fe;const{tablePrefixCls:t,prefixCls:n,column:r,dropdownPrefixCls:s,columnKey:i,filterOnClose:o,filterMultiple:a,filterMode:l="menu",filterSearch:c=!1,filterState:u,triggerFilter:h,locale:g,children:m,getPopupContainer:C,rootClassName:v}=e,{filterResetToDefaultFilteredValue:b,defaultFilteredValue:w,filterDropdownProps:S={},filterDropdownOpen:x,onFilterDropdownOpenChange:P}=r,[F,M]=p.useState(!1),E=p.useContext(iV),I=!!(u&&((fe=u.filteredKeys)!=null&&fe.length||u.forceFiltered)),A=oe=>{var we;M(oe),(we=S.onOpenChange)==null||we.call(S,oe),P==null||P(oe)},L=S.open??x??F,D=u==null?void 0:u.filteredKeys,[N,k]=nK(Yw(D)),G=({selectedKeys:oe})=>{k(oe)},$=(oe,{node:we,checked:Be})=>{G(a?{selectedKeys:oe}:{selectedKeys:Be&&we.key?[we.key]:[]})};p.useEffect(()=>{F&&G({selectedKeys:Yw(D)})},[D]);const[_,U]=p.useState([]),V=oe=>{U(oe)},[W,j]=p.useState(""),H=oe=>{const{value:we}=oe.target;j(we)};p.useEffect(()=>{F||j("")},[F]);const B=oe=>{const we=oe!=null&&oe.length?oe:null;if(we===null&&(!u||!u.filteredKeys)||no(we,u==null?void 0:u.filteredKeys,!0))return null;h({column:r,key:i,filteredKeys:we})},Y=()=>{A(!1),B(N())},J=({confirm:oe,closeDropdown:we}={confirm:!1,closeDropdown:!1})=>{oe&&B([]),we&&A(!1),j(""),k(b?(w||[]).map(Be=>String(Be)):[])},te=({closeDropdown:oe}={closeDropdown:!0})=>{oe&&A(!1),B(N())},Z=(oe,we)=>{we.source==="trigger"&&(oe&&D!==void 0&&k(Yw(D)),A(oe),!oe&&!r.filterDropdown&&o&&Y())},ae=ee({[`${s}-menu-without-submenu`]:!Rre(r.filters||[])}),de=oe=>{if(oe.target.checked){const we=Xu(r==null?void 0:r.filters).map(Be=>String(Be));k(we)}else k([])},ge=({filters:oe})=>(oe||[]).map((we,Be)=>{const Ae=String(we.value),Pe={title:we.text,key:we.value!==void 0?Ae:String(Be)};return we.children&&(Pe.children=ge({filters:we.children})),Pe}),ve=oe=>{var we;return{...oe,text:oe.title,value:oe.key,children:((we=oe.children)==null?void 0:we.map(Be=>ve(Be)))||[]}};let Re;const{direction:ne,renderEmpty:re}=p.useContext(Kt);if(typeof r.filterDropdown=="function")Re=r.filterDropdown({prefixCls:`${s}-custom`,setSelectedKeys:oe=>G({selectedKeys:oe}),selectedKeys:N(),confirm:te,clearFilters:J,filters:r.filters,visible:L,close:()=>{A(!1)}});else if(r.filterDropdown)Re=r.filterDropdown;else{const oe=N()||[],we=()=>{const Ae=(re==null?void 0:re("Table.filter"))??p.createElement(Zo,{image:Zo.PRESENTED_IMAGE_SIMPLE,description:g.filterEmptyText,styles:{image:{height:24}},style:{margin:0,padding:"16px 0"}});if((r.filters||[]).length===0)return Ae;if(l==="tree")return p.createElement(p.Fragment,null,p.createElement(dL,{filterSearch:c,value:W,onChange:H,tablePrefixCls:t,locale:g}),p.createElement("div",{className:`${t}-filter-dropdown-tree`},a?p.createElement(ld,{checked:oe.length===Xu(r.filters).length,indeterminate:oe.length>0&&oe.lengthtypeof c=="function"?c(W,ve(ze)):oV(W,ze.title):void 0})));const Pe=aV({filters:r.filters||[],filterSearch:c,prefixCls:n,filteredKeys:N(),filterMultiple:a,searchValue:W}),_e=Pe.every(ze=>ze===null);return p.createElement(p.Fragment,null,p.createElement(dL,{filterSearch:c,value:W,onChange:H,tablePrefixCls:t,locale:g}),_e?Ae:p.createElement(Td,{selectable:!0,multiple:a,prefixCls:`${s}-menu`,className:ae,onSelect:G,onDeselect:G,selectedKeys:oe,getPopupContainer:C,openKeys:_,onOpenChange:V,items:Pe}))},Be=()=>b?no((w||[]).map(Ae=>String(Ae)),oe,!0):oe.length===0;Re=p.createElement(p.Fragment,null,we(),p.createElement("div",{className:`${n}-dropdown-btns`},p.createElement(Mo,{type:"link",size:"small",disabled:Be(),onClick:()=>J()},g.filterReset),p.createElement(Mo,{type:"primary",size:"small",onClick:Y},g.filterConfirm)))}r.filterDropdown&&(Re=p.createElement(Y$,{selectable:void 0},Re)),Re=p.createElement(xre,{className:`${n}-dropdown`},Re);const X=(()=>{let oe;return typeof r.filterIcon=="function"?oe=r.filterIcon(I):r.filterIcon?oe=r.filterIcon:oe=p.createElement(Lne,null),p.createElement("span",{role:"button",tabIndex:-1,className:ee(`${n}-trigger`,{active:I}),onClick:we=>{we.stopPropagation()}},oe)})();if(E)return p.createElement("div",{className:`${n}-column`},p.createElement("span",{className:`${t}-column-title`},m),X);const ue=Lp({trigger:["click"],placement:ne==="rtl"?"bottomLeft":"bottomRight",children:X,getPopupContainer:C},{...S,rootClassName:ee(v,S.rootClassName),open:L,onOpenChange:Z,popupRender:()=>typeof(S==null?void 0:S.dropdownRender)=="function"?S.dropdownRender(Re):Re});return p.createElement("div",{className:`${n}-column`},p.createElement("span",{className:`${t}-column-title`},m),p.createElement(SP,{...ue}))},fR=(e,t,n)=>{let r=[];return(e||[]).forEach((s,i)=>{const o=Ad(i,n),a=s.filterDropdown!==void 0;if(s.filters||a||"onFilter"in s)if("filteredValue"in s){let l=s.filteredValue;a||(l=(l==null?void 0:l.map(String))??l),r.push({column:s,key:wl(s,o),filteredKeys:l,forceFiltered:s.filtered})}else r.push({column:s,key:wl(s,o),filteredKeys:t&&s.defaultFilteredValue?s.defaultFilteredValue:void 0,forceFiltered:s.filtered});"children"in s&&(r=[].concat(nn(r),nn(fR(s.children,t,o))))}),r};function lV(e,t,n,r,s,i,o,a,l){return n.map((c,u)=>{const h=Ad(u,a),{filterOnClose:g=!0,filterMultiple:m=!0,filterMode:C,filterSearch:v}=c;let b=c;if(b.filters||b.filterDropdown){const w=wl(b,h),S=r.find(({key:x})=>w===x);b={...b,title:x=>p.createElement(Ere,{tablePrefixCls:e,prefixCls:`${e}-filter`,dropdownPrefixCls:t,column:b,columnKey:w,filterState:S,filterOnClose:g,filterMultiple:m,filterMode:C,filterSearch:v,triggerFilter:i,locale:s,getPopupContainer:o,rootClassName:l},Ov(c.title,x))}}return"children"in b&&(b={...b,children:lV(e,t,b.children,r,s,i,o,h,l)}),b})}const hL=e=>{const t={};return e.forEach(({key:n,filteredKeys:r,column:s})=>{const i=n,{filters:o,filterDropdown:a}=s;if(a)t[i]=r||null;else if(Array.isArray(r)){const l=Xu(o);t[i]=l.filter(c=>r.includes(String(c)))}else t[i]=null}),t},mR=(e,t,n)=>t.reduce((s,i)=>{const{column:{onFilter:o,filters:a},filteredKeys:l}=i;return o&&l&&l.length?s.map(c=>({...c})).filter(c=>l.some(u=>{const h=Xu(a),g=h.findIndex(C=>String(C)===String(u)),m=g!==-1?h[g]:u;return c[n]&&(c[n]=mR(c[n],t,n)),o(m,c)})):s},e),cV=e=>e.flatMap(t=>"children"in t?[t].concat(nn(cV(t.children||[]))):[t]),Pre=e=>{const{prefixCls:t,dropdownPrefixCls:n,mergedColumns:r,onFilterChange:s,getPopupContainer:i,locale:o,rootClassName:a}=e;Sd();const l=p.useMemo(()=>cV(r||[]),[r]),[c,u]=p.useState(()=>fR(l,!0)),h=p.useMemo(()=>{const v=fR(l,!1);if(v.length===0)return v;let b=!0;if(v.forEach(({filteredKeys:w})=>{w!==void 0&&(b=!1)}),b){const w=(l||[]).map((S,x)=>wl(S,Ad(x)));return c.filter(({key:S})=>w.includes(S)).map(S=>{const x=l[w.indexOf(S.key)];return{...S,column:{...S.column,...x},forceFiltered:x.filtered}})}return v},[l,c]),g=p.useMemo(()=>hL(h),[h]),m=v=>{const b=h.filter(({key:w})=>w!==v.key);b.push(v),u(b),s(hL(b),b)};return[v=>lV(t,n,v,h,o,m,i,void 0,a),h,g]},Fre=(e,t,n)=>{const r=p.useRef({});function s(i){var o;if(!r.current||r.current.data!==e||r.current.childrenColumnName!==t||r.current.getRowKey!==n){let l=function(c){c.forEach((u,h)=>{const g=n(u,h);a.set(g,u),u&&typeof u=="object"&&t in u&&l(u[t]||[])})};const a=new Map;l(e),r.current={data:e,childrenColumnName:t,kvMap:a,getRowKey:n}}return(o=r.current.kvMap)==null?void 0:o.get(i)}return[s]},uV=10;function Tre(e,t){const n={current:e.current,pageSize:e.pageSize};return Object.keys(t&&typeof t=="object"?t:{}).forEach(s=>{const i=e[s];typeof i!="function"&&(n[s]=i)}),n}function Mre(e,t,n){const{total:r=0,...s}=n&&typeof n=="object"?n:{},[i,o]=p.useState(()=>({current:"defaultCurrent"in s?s.defaultCurrent:1,pageSize:"defaultPageSize"in s?s.defaultPageSize:uV})),a=Lp(i,s,{total:r>0?r:e}),l=Math.ceil((r||e)/a.pageSize);a.current>l&&(a.current=l||1);const c=(h,g)=>{o({current:h??1,pageSize:g||a.pageSize})},u=(h,g)=>{var m;n&&((m=n.onChange)==null||m.call(n,h,g)),c(h,g),t(h,g||(a==null?void 0:a.pageSize))};return n===!1?[{},()=>{}]:[{...a,onChange:u},c]}var Ire={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"outlined"};function CR(){return CR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,CR({},e,{ref:t,icon:Ire})),Are=p.forwardRef(Dre);var Lre={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.9 689L530.5 308.2c-9.4-10.9-27.5-10.9-37 0L165.1 689c-12.2 14.2-1.2 35 18.5 35h656.8c19.7 0 30.7-20.8 18.5-35z"}}]},name:"caret-up",theme:"outlined"};function vR(){return vR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,vR({},e,{ref:t,icon:Lre})),kre=p.forwardRef(Ore),Om="ascend",Qw="descend",EC=e=>typeof e.sorter=="object"&&typeof e.sorter.multiple=="number"?e.sorter.multiple:!1,pL=e=>typeof e=="function"?e:e&&typeof e=="object"&&e.compare?e.compare:!1,Nre=(e,t)=>t?e[e.indexOf(t)+1]:e[0],yR=(e,t,n)=>{let r=[];const s=(i,o)=>{r.push({column:i,key:wl(i,o),multiplePriority:EC(i),sortOrder:i.sortOrder})};return(e||[]).forEach((i,o)=>{const a=Ad(o,n);i.children?("sortOrder"in i&&s(i,a),r=[].concat(nn(r),nn(yR(i.children,t,a)))):i.sorter&&("sortOrder"in i?s(i,a):t&&i.defaultSortOrder&&r.push({column:i,key:wl(i,a),multiplePriority:EC(i),sortOrder:i.defaultSortOrder}))}),r},dV=(e,t,n,r,s,i,o,a,l)=>(t||[]).map((u,h)=>{const g=Ad(h,a);let m=u;if(m.sorter){const C=m.sortDirections||s,v=m.showSorterTooltip===void 0?o:m.showSorterTooltip,b=wl(m,g),w=n.find(({key:L})=>L===b),S=w?w.sortOrder:null,x=Nre(C,S);let P;if(u.sortIcon)P=u.sortIcon({sortOrder:S});else{const L=C.includes(Om)&&p.createElement(kre,{className:ee(`${e}-column-sorter-up`,{active:S===Om})}),D=C.includes(Qw)&&p.createElement(Are,{className:ee(`${e}-column-sorter-down`,{active:S===Qw})});P=p.createElement("span",{className:ee(`${e}-column-sorter`,{[`${e}-column-sorter-full`]:!!(L&&D)})},p.createElement("span",{className:`${e}-column-sorter-inner`,"aria-hidden":"true"},L,D))}const{cancelSort:F,triggerAsc:M,triggerDesc:E}=i||{};let I=F;x===Qw?I=E:x===Om&&(I=M);const A=typeof v=="object"?{title:I,...v}:{title:I};m={...m,className:ee(m.className,{[`${e}-column-sort`]:S}),title:L=>{const D=`${e}-column-sorters`,N=p.createElement("span",{className:`${e}-column-title`},Ov(u.title,L)),k=p.createElement("div",{className:D},N,P);return v?typeof v!="boolean"&&(v==null?void 0:v.target)==="sorter-icon"?p.createElement("div",{className:ee(D,`${D}-tooltip-target-sorter`)},N,p.createElement(bl,{...A},P)):p.createElement(bl,{...A},k):k},onHeaderCell:L=>{var _;const D=((_=u.onHeaderCell)==null?void 0:_.call(u,L))||{},N=D.onClick,k=D.onKeyDown;D.onClick=U=>{r({column:u,key:b,sortOrder:x,multiplePriority:EC(u)}),N==null||N(U)},D.onKeyDown=U=>{U.keyCode===Et.ENTER&&(r({column:u,key:b,sortOrder:x,multiplePriority:EC(u)}),k==null||k(U))};const G=Ine(u.title,{}),$=G==null?void 0:G.toString();return S&&(D["aria-sort"]=S==="ascend"?"ascending":"descending"),D["aria-description"]=l==null?void 0:l.sortable,D["aria-label"]=$||"",D.className=ee(D.className,`${e}-column-has-sorters`),D.tabIndex=0,u.ellipsis&&(D.title=(G??"").toString()),D}}}return"children"in m&&(m={...m,children:dV(e,m.children,n,r,s,i,o,g,l)}),m}),gL=e=>{const{column:t,sortOrder:n}=e;return{column:t,order:n,field:t.dataIndex,columnKey:t.key}},fL=e=>{const t=e.filter(({sortOrder:n})=>n).map(gL);if(t.length===0&&e.length){const n=e.length-1;return{...gL(e[n]),column:void 0,order:void 0,field:void 0,columnKey:void 0}}return t.length<=1?t[0]||{}:t},bR=(e,t,n)=>{const r=t.slice().sort((o,a)=>a.multiplePriority-o.multiplePriority),s=e.slice(),i=r.filter(({column:{sorter:o},sortOrder:a})=>pL(o)&&a);return i.length?s.sort((o,a)=>{for(let l=0;l{const a=o[n];return a?{...o,[n]:bR(a,t,n)}:o}):s},Bre=e=>{const{prefixCls:t,mergedColumns:n,sortDirections:r,tableLocale:s,showSorterTooltip:i,onSorterChange:o,globalLocale:a}=e,[l,c]=p.useState(()=>yR(n,!0)),u=(b,w)=>{const S=[];return b.forEach((x,P)=>{const F=Ad(P,w);if(S.push(wl(x,F)),Array.isArray(x.children)){const M=u(x.children,F);S.push.apply(S,nn(M))}}),S},h=p.useMemo(()=>{let b=!0;const w=yR(n,!1);if(!w.length){const F=u(n);return l.filter(({key:M})=>F.includes(M))}const S=[];function x(F){b?S.push(F):S.push({...F,sortOrder:null})}let P=null;return w.forEach(F=>{P===null?(x(F),F.sortOrder&&(F.multiplePriority===!1?b=!1:P=!0)):(P&&F.multiplePriority!==!1||(b=!1),x(F))}),S},[n,l]),g=p.useMemo(()=>{var w,S;const b=h.map(({column:x,sortOrder:P})=>({column:x,order:P}));return{sortColumns:b,sortColumn:(w=b[0])==null?void 0:w.column,sortOrder:(S=b[0])==null?void 0:S.order}},[h]),m=b=>{let w;b.multiplePriority===!1||!h.length||h[0].multiplePriority===!1?w=[b]:w=[].concat(nn(h.filter(({key:S})=>S!==b.key)),[b]),c(w),o(fL(w),w)};return[b=>dV(t,b,h,m,r,s,i,void 0,a),h,g,()=>fL(h)]},hV=(e,t)=>e.map(r=>{const s={...r};return s.title=Ov(r.title,t),"children"in s&&(s.children=hV(s.children,t)),s}),$re=e=>[p.useCallback(n=>hV(n,e),[e])],Gre=ZG((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),Vre=eV((e,t)=>{const{_renderTimes:n}=e,{_renderTimes:r}=t;return n!==r}),Hre=e=>{const{componentCls:t,lineWidth:n,lineType:r,tableBorderColor:s,tableHeaderBg:i,tablePaddingVertical:o,tablePaddingHorizontal:a,calc:l}=e,c=`${he(n)} ${r} ${s}`,u=(h,g,m)=>({[`&${t}-${h}`]:{[`> ${t}-container`]:{[`> ${t}-content, > ${t}-body`]:{"\n > table > tbody > tr > th,\n > table > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${he(l(g).mul(-1).equal())} ${he(l(l(m).add(n)).mul(-1).equal())}`}}}}}});return{[`${t}-wrapper`]:{[`${t}${t}-bordered`]:{[`> ${t}-title`]:{border:c,borderBottom:0},[`> ${t}-container`]:{borderInlineStart:c,borderTop:c,[` > ${t}-content, > ${t}-header, > ${t}-body, > ${t}-summary `]:{"> table":{"\n > thead > tr > th,\n > thead > tr > td,\n > tbody > tr > th,\n > tbody > tr > td,\n > tfoot > tr > th,\n > tfoot > tr > td\n ":{borderInlineEnd:c},"> thead":{"> tr:not(:last-child) > th":{borderBottom:c},"> tr > th::before":{backgroundColor:"transparent !important"}},"\n > thead > tr,\n > tbody > tr,\n > tfoot > tr\n ":{[`> ${t}-cell-fix-right-first::after`]:{borderInlineEnd:c}},"\n > tbody > tr > th,\n > tbody > tr > td\n ":{[`> ${t}-expanded-row-fixed`]:{margin:`${he(l(o).mul(-1).equal())} ${he(l(l(a).add(n)).mul(-1).equal())}`,"&::after":{position:"absolute",top:0,insetInlineEnd:n,bottom:0,borderInlineEnd:c,content:'""'}}}}}},[`&${t}-scroll-horizontal`]:{[`> ${t}-container > ${t}-body`]:{"> table > tbody":{[` > tr${t}-expanded-row, > tr${t}-placeholder `]:{"> th, > td":{borderInlineEnd:0}}}}},...u("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle),...u("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall),[`> ${t}-footer`]:{border:c,borderTop:0}},[`${t}-cell`]:{[`${t}-container:first-child`]:{borderTop:0},"&-scrollbar:not([rowspan])":{boxShadow:`0 ${he(n)} 0 ${he(n)} ${i}`}},[`${t}-bordered ${t}-cell-scrollbar`]:{borderInlineEnd:c}}}},zre=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-cell-ellipsis`]:{...Ro,wordBreak:"keep-all",[` &${t}-cell-fix-start-shadow, &${t}-cell-fix-end-shadow `]:{overflow:"visible",[`${t}-cell-content`]:{...Ro,display:"block"}},[`${t}-column-title`]:{...Ro,wordBreak:"keep-all"}}}}},Wre=e=>{const{componentCls:t}=e;return{[`${t}-wrapper`]:{[`${t}-tbody > tr${t}-placeholder`]:{textAlign:"center",color:e.colorTextDisabled,"\n &:hover > th,\n &:hover > td,\n ":{background:e.colorBgContainer}}}}},_re=e=>{const{componentCls:t,antCls:n,motionDurationSlow:r,lineWidth:s,paddingXS:i,lineType:o,tableBorderColor:a,tableExpandIconBg:l,tableExpandColumnWidth:c,borderRadius:u,tablePaddingVertical:h,tablePaddingHorizontal:g,tableExpandedRowBg:m,paddingXXS:C,expandIconMarginTop:v,expandIconSize:b,expandIconHalfInner:w,expandIconScale:S,calc:x}=e,P=`${he(s)} ${o} ${a}`,F=x(C).sub(s).equal();return{[`${t}-wrapper`]:{[`${t}-expand-icon-col`]:{width:c},[`${t}-row-expand-icon-cell`]:{textAlign:"center",[`${t}-row-expand-icon`]:{display:"inline-flex",float:"none",verticalAlign:"sub"}},[`${t}-row-indent`]:{height:1,float:"left"},[`${t}-row-expand-icon`]:{...OE(e),position:"relative",float:"left",width:b,height:b,color:"inherit",lineHeight:he(b),background:l,border:P,borderRadius:u,transform:`scale(${S})`,"&:focus, &:hover, &:active":{borderColor:"currentcolor"},"&::before, &::after":{position:"absolute",background:"currentcolor",transition:`transform ${r} ease-out`,content:'""'},"&::before":{top:w,insetInlineEnd:F,insetInlineStart:F,height:s},"&::after":{top:F,bottom:F,insetInlineStart:w,width:s,transform:"rotate(90deg)"},"&-collapsed::before":{transform:"rotate(-180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"},"&-spaced":{"&::before, &::after":{display:"none",content:"none"},background:"transparent",border:0,visibility:"hidden"}},[`${t}-row-indent + ${t}-row-expand-icon`]:{marginTop:v,marginInlineEnd:i},[`tr${t}-expanded-row`]:{"&, &:hover":{"> th, > td":{background:m}},[`${n}-descriptions-view`]:{display:"flex",table:{flex:"auto",width:"100%"}}},[`${t}-expanded-row-fixed`]:{position:"relative",margin:`${he(x(h).mul(-1).equal())} ${he(x(g).mul(-1).equal())}`,padding:`${he(h)} ${he(g)}`}}}},Ure=e=>{const{componentCls:t,antCls:n,iconCls:r,tableFilterDropdownWidth:s,tableFilterDropdownSearchWidth:i,paddingXXS:o,paddingXS:a,colorText:l,lineWidth:c,lineType:u,tableBorderColor:h,headerIconColor:g,fontSizeSM:m,tablePaddingHorizontal:C,borderRadius:v,motionDurationSlow:b,colorIcon:w,colorPrimary:S,tableHeaderFilterActiveBg:x,colorTextDisabled:P,tableFilterDropdownBg:F,tableFilterDropdownHeight:M,controlItemBgHover:E,controlItemBgActive:I,boxShadowSecondary:A,filterDropdownMenuBg:L,calc:D}=e,N=`${n}-dropdown`,k=`${t}-filter-dropdown`,G=`${n}-tree`,$=`${he(c)} ${u} ${h}`;return[{[`${t}-wrapper`]:{[`${t}-filter-column`]:{display:"flex",justifyContent:"space-between"},[`${t}-filter-trigger`]:{position:"relative",display:"flex",alignItems:"center",marginBlock:D(o).mul(-1).equal(),marginInline:`${he(o)} ${he(D(C).div(2).mul(-1).equal())}`,padding:`0 ${he(o)}`,color:g,fontSize:m,borderRadius:v,cursor:"pointer",transition:`all ${b}`,"&:hover":{color:w,background:x},"&.active":{color:S}}}},{[`${n}-dropdown`]:{[k]:{...jn(e),minWidth:s,backgroundColor:F,borderRadius:v,boxShadow:A,overflow:"hidden",[`${N}-menu`]:{maxHeight:M,overflowX:"hidden",border:0,boxShadow:"none",borderRadius:"unset",backgroundColor:L,"&:empty::after":{display:"block",padding:`${he(a)} 0`,color:P,fontSize:m,textAlign:"center",content:'"Not Found"'}},[`${k}-tree`]:{paddingBlock:`${he(a)} 0`,paddingInline:a,[G]:{padding:0},[`${G}-treenode ${G}-node-content-wrapper:hover`]:{backgroundColor:E},[`${G}-treenode-checkbox-checked ${G}-node-content-wrapper`]:{"&, &:hover":{backgroundColor:I}}},[`${k}-search`]:{padding:a,borderBottom:$,"&-input":{input:{minWidth:i},[r]:{color:P}}},[`${k}-checkall`]:{width:"100%",marginBottom:o,marginInlineStart:o},[`${k}-btns`]:{display:"flex",justifyContent:"space-between",padding:`${he(D(a).sub(c).equal())} ${he(a)}`,overflow:"hidden",borderTop:$}}}},{[`${n}-dropdown ${k}, ${k}-submenu`]:{[`${n}-checkbox-wrapper + span`]:{paddingInlineStart:a,color:l},"> ul":{maxHeight:"calc(100vh - 130px)",overflowX:"hidden",overflowY:"auto"}}}]};function pV({colorSplit:e}){const t={boxShadow:`inset 10px 0 8px -8px ${e}`},n={boxShadow:`inset -10px 0 8px -8px ${e}`};return[t,n]}const jre=e=>{const{componentCls:t,lineWidth:n,motionDurationSlow:r,zIndexTableFixed:s,tableBg:i,calc:o}=e,a=`${t}-cell`,l=`${a}-fix`,c={position:"absolute",top:0,bottom:o(n).mul(-1).equal(),width:30,transition:`box-shadow ${r}`,content:'""',pointerEvents:"none"},[u,h]=pV(e);return{[`${t}-wrapper`]:{[`${a}${l}`]:{position:"sticky"},[l]:{zIndex:`calc(var(--z-offset-reverse) + ${s})`,background:i,"&:after":c,"&-start:after":{insetInlineStart:"100%"},"&-end:after":{insetInlineEnd:"100%"},"&-start-shadow-show:after":u,"&-end-shadow-show:after":h},[`${t}-container`]:{position:"relative","&:before, &:after":{...c,zIndex:`calc(var(--columns-count) * 2 + ${s} + 1)`},"&:before":{insetInlineStart:0},"&:after":{insetInlineEnd:0}},[`${t}-has-fix-start ${t}-container:before`]:{display:"none"},[`${t}-has-fix-end ${t}-container:after`]:{display:"none"},[`${t}-fix-start-shadow-show ${t}-container:before`]:u,[`${t}-fix-end-shadow-show ${t}-container:after`]:h}}},Kre=e=>{const{componentCls:t,antCls:n,margin:r}=e;return{[`${t}-wrapper`]:{[`${t}-pagination${n}-pagination`]:{margin:`${he(r)} 0`},[`${t}-pagination`]:{display:"flex",flexWrap:"wrap",rowGap:e.paddingXS,"> *":{flex:"none"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"}}}}},qre=e=>{const{componentCls:t,tableRadius:n}=e;return{[`${t}-wrapper`]:{[t]:{[`${t}-title, ${t}-header`]:{borderRadius:`${he(n)} ${he(n)} 0 0`},[`${t}-title + ${t}-container`]:{borderStartStartRadius:0,borderStartEndRadius:0,[`${t}-header, table`]:{borderRadius:0},"table > thead > tr:first-child":{"th:first-child, th:last-child, td:first-child, td:last-child":{borderRadius:0}}},"&-container":{borderStartStartRadius:n,borderStartEndRadius:n,"&::before":{borderStartStartRadius:n},"&::after":{borderStartEndRadius:n},[`> ${t}-content`]:{borderStartStartRadius:n,borderStartEndRadius:n},"table > thead > tr:first-child":{"> *:first-child":{borderStartStartRadius:n},"> *:last-child":{borderStartEndRadius:n}}},"&-footer":{borderRadius:`0 0 ${he(n)} ${he(n)}`}}}}},Xre=e=>{const{componentCls:t}=e,[n,r]=pV(e);return{[`${t}-wrapper-rtl`]:{direction:"rtl",table:{direction:"rtl"},[`${t}-row-expand-icon`]:{float:"right","&::after":{transform:"rotate(-90deg)"},"&-collapsed::before":{transform:"rotate(180deg)"},"&-collapsed::after":{transform:"rotate(0deg)"}},[`${t}-cell-fix`]:{"&-start-shadow-show:after":r,"&-end-shadow-show:after":n},[`${t}-container`]:{[`${t}-row-indent`]:{float:"right"}},[`${t}-fix-start-shadow-show ${t}-container:before`]:r,[`${t}-fix-end-shadow-show ${t}-container:after`]:n}}},Yre=e=>{const{componentCls:t,antCls:n,iconCls:r,fontSizeIcon:s,padding:i,paddingXS:o,headerIconColor:a,headerIconHoverColor:l,tableSelectionColumnWidth:c,tableSelectedRowBg:u,tableSelectedRowHoverBg:h,tableRowHoverBg:g,tablePaddingHorizontal:m,calc:C}=e;return{[`${t}-wrapper`]:{[`${t}-selection-col`]:{width:c,[`&${t}-selection-col-with-dropdown`]:{width:C(c).add(s).add(C(i).div(4)).equal()}},[`${t}-bordered ${t}-selection-col`]:{width:C(c).add(C(o).mul(2)).equal(),[`&${t}-selection-col-with-dropdown`]:{width:C(c).add(s).add(C(i).div(4)).add(C(o).mul(2)).equal()}},[` table tr th${t}-selection-column, table tr td${t}-selection-column, ${t}-selection-column `]:{paddingInlineEnd:e.paddingXS,paddingInlineStart:e.paddingXS,textAlign:"center",[`${n}-radio-wrapper`]:{marginInlineEnd:0}},[`table tr th${t}-selection-column${t}-cell-fix-left`]:{zIndex:C(e.zIndexTableFixed).add(1).equal({unit:!1})},[`table tr th${t}-selection-column::after`]:{backgroundColor:"transparent !important"},[`${t}-selection`]:{position:"relative",display:"inline-flex",flexDirection:"column"},[`${t}-selection-extra`]:{position:"absolute",top:0,zIndex:1,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,marginInlineStart:"100%",paddingInlineStart:he(C(m).div(4).equal()),[r]:{color:a,fontSize:s,verticalAlign:"baseline","&:hover":{color:l}}},[`${t}-tbody`]:{[`${t}-row`]:{[`&${t}-row-selected`]:{[`> ${t}-cell`]:{background:u,"&-row-hover":{background:h}}},[`> ${t}-cell-row-hover`]:{background:g}}}}}},Qre=e=>{const{componentCls:t,tableExpandColumnWidth:n,calc:r}=e,s=(i,o,a,l)=>({[`${t}${t}-${i}`]:{fontSize:l,[` ${t}-title, ${t}-footer, ${t}-cell, ${t}-thead > tr > th, ${t}-tbody > tr > th, ${t}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td `]:{padding:`${he(o)} ${he(a)}`},[`${t}-filter-trigger`]:{marginInlineEnd:he(r(a).div(2).mul(-1).equal())},[`${t}-expanded-row-fixed`]:{margin:`${he(r(o).mul(-1).equal())} ${he(r(a).mul(-1).equal())}`},[`${t}-tbody`]:{[`${t}-wrapper:only-child ${t}`]:{marginBlock:he(r(o).mul(-1).equal()),marginInline:`${he(r(n).sub(a).equal())} ${he(r(a).mul(-1).equal())}`}},[`${t}-selection-extra`]:{paddingInlineStart:he(r(a).div(4).equal())}}});return{[`${t}-wrapper`]:{...s("middle",e.tablePaddingVerticalMiddle,e.tablePaddingHorizontalMiddle,e.tableFontSizeMiddle),...s("small",e.tablePaddingVerticalSmall,e.tablePaddingHorizontalSmall,e.tableFontSizeSmall)}}},Zre=e=>{const{componentCls:t,marginXXS:n,fontSizeIcon:r,headerIconColor:s,headerIconHoverColor:i}=e;return{[`${t}-wrapper`]:{[`${t}-thead th${t}-column-has-sorters`]:{outline:"none",cursor:"pointer",transition:`all ${e.motionDurationSlow}, left 0s`,"&:hover":{background:e.tableHeaderSortHoverBg,"&::before":{backgroundColor:"transparent !important"}},"&:focus-visible":{color:e.colorPrimary},[` &${t}-cell-fix-left:hover, &${t}-cell-fix-right:hover `]:{background:e.tableFixedHeaderSortActiveBg}},[`${t}-thead th${t}-column-sort`]:{background:e.tableHeaderSortBg,"&::before":{backgroundColor:"transparent !important"}},[`td${t}-column-sort`]:{background:e.tableBodySortBg},[`${t}-column-title`]:{position:"relative",zIndex:1,flex:1,minWidth:0},[`${t}-column-sorters`]:{display:"flex",flex:"auto",alignItems:"center",justifyContent:"space-between","&::after":{position:"absolute",inset:0,width:"100%",height:"100%",content:'""'}},[`${t}-column-sorters-tooltip-target-sorter`]:{"&::after":{content:"none"}},[`${t}-column-sorter`]:{marginInlineStart:n,color:s,fontSize:0,transition:`color ${e.motionDurationSlow}`,"&-inner":{display:"inline-flex",flexDirection:"column",alignItems:"center"},"&-up, &-down":{fontSize:r,"&.active":{color:e.colorPrimary}},[`${t}-column-sorter-up + ${t}-column-sorter-down`]:{marginTop:"-0.3em"}},[`${t}-column-sorters:hover ${t}-column-sorter`]:{color:i}}}},Jre=e=>{const{componentCls:t,opacityLoading:n,tableScrollThumbBg:r,tableScrollThumbBgHover:s,tableScrollThumbSize:i,tableScrollBg:o,stickyScrollBarBorderRadius:a,lineWidth:l,lineType:c,tableBorderColor:u,zIndexTableFixed:h}=e,g=`${he(l)} ${c} ${u}`;return{[`${t}-wrapper`]:{[`${t}-sticky`]:{"&-holder":{position:"sticky",zIndex:`calc(var(--columns-count) * 2 + ${h} + 1)`,background:e.colorBgContainer},"&-scroll":{position:"sticky",bottom:0,height:`${he(i)} !important`,zIndex:`calc(var(--columns-count) * 2 + ${h} + 1)`,display:"flex",alignItems:"center",background:o,borderTop:g,opacity:n,"&:hover":{transformOrigin:"center bottom"},"&-bar":{height:i,backgroundColor:r,borderRadius:a,transition:`all ${e.motionDurationSlow}, transform 0s`,position:"absolute",bottom:0,"&:hover, &-active":{backgroundColor:s}}}}}}},mL=e=>{const{componentCls:t,lineWidth:n,tableBorderColor:r,calc:s}=e,i=`${he(n)} ${e.lineType} ${r}`;return{[`${t}-wrapper`]:{[`${t}-summary`]:{position:"relative",zIndex:e.zIndexTableFixed,background:e.tableBg,"> tr":{"> th, > td":{borderBottom:i}}},[`div${t}-summary`]:{boxShadow:`0 ${he(s(n).mul(-1).equal())} 0 ${r}`}}}},ese=e=>{const{componentCls:t,motionDurationMid:n,lineWidth:r,lineType:s,tableBorderColor:i,calc:o}=e,a=`${he(r)} ${s} ${i}`,l=`${t}-expanded-row-cell`;return{[`${t}-wrapper`]:{[`${t}-tbody-virtual`]:{[`${t}-tbody-virtual-holder-inner`]:{[` & > ${t}-row, & > div:not(${t}-row) > ${t}-row `]:{display:"flex",boxSizing:"border-box",width:"100%"}},[`${t}-cell`]:{borderBottom:a,transition:`background-color ${n}`},[`${t}-expanded-row`]:{[`${l}${l}-fixed`]:{position:"sticky",insetInlineStart:0,overflow:"hidden",width:`calc(var(--virtual-width) - ${he(r)})`,borderInlineEnd:"none"}}},[`${t}-bordered`]:{[`${t}-tbody-virtual`]:{"&:after":{content:'""',insetInline:0,bottom:0,borderBottom:a,position:"absolute"},[`${t}-cell`]:{borderInlineEnd:a,[`&${t}-cell-fix-right-first:before`]:{content:'""',position:"absolute",insetBlock:0,insetInlineStart:o(r).mul(-1).equal(),borderInlineStart:a}}},[`&${t}-virtual`]:{[`${t}-placeholder ${t}-cell`]:{borderInlineEnd:a,borderBottom:a}}}}}},tse=e=>{const{componentCls:t,fontWeightStrong:n,tablePaddingVertical:r,tablePaddingHorizontal:s,tableExpandColumnWidth:i,lineWidth:o,lineType:a,tableBorderColor:l,tableFontSize:c,tableBg:u,tableRadius:h,tableHeaderTextColor:g,motionDurationMid:m,tableHeaderBg:C,tableHeaderCellSplitColor:v,tableFooterTextColor:b,tableFooterBg:w,calc:S}=e,x=`${he(o)} ${a} ${l}`;return{[`${t}-wrapper`]:{clear:"both",maxWidth:"100%","--rc-virtual-list-scrollbar-bg":e.tableScrollBg,...Dp(),[t]:{...jn(e),fontSize:c,background:u,borderRadius:`${he(h)} ${he(h)} 0 0`,scrollbarColor:`${e.tableScrollThumbBg} ${e.tableScrollBg}`},table:{width:"100%",textAlign:"start",borderRadius:`${he(h)} ${he(h)} 0 0`,borderCollapse:"separate",borderSpacing:0},[` ${t}-cell, ${t}-thead > tr > th, ${t}-tbody > tr > th, ${t}-tbody > tr > td, tfoot > tr > th, tfoot > tr > td `]:{position:"relative",padding:`${he(r)} ${he(s)}`,overflowWrap:"break-word"},[`${t}-title`]:{padding:`${he(r)} ${he(s)}`},[`${t}-thead`]:{"\n > tr > th,\n > tr > td\n ":{position:"relative",color:g,fontWeight:n,textAlign:"start",background:C,borderBottom:x,transition:`background-color ${m} ease`,"&[colspan]:not([colspan='1'])":{textAlign:"center"},[`&:not(:last-child):not(${t}-selection-column):not(${t}-row-expand-icon-cell):not([colspan])::before`]:{position:"absolute",top:"50%",insetInlineEnd:0,width:1,height:"1.6em",backgroundColor:v,transform:"translateY(-50%)",transition:`background-color ${m}`,content:'""'}},"> tr:not(:last-child) > th[colspan]":{borderBottom:0}},[`${t}-tbody`]:{"> tr":{"> th, > td":{borderBottom:x,transition:["background-color","border-color"].map(P=>`${P} ${m}`).join(", "),[` > ${t}-wrapper:only-child, > ${t}-expanded-row-fixed > ${t}-wrapper:only-child `]:{[t]:{marginBlock:he(S(r).mul(-1).equal()),marginInline:`${he(S(i).sub(s).equal())} ${he(S(s).mul(-1).equal())}`,[`${t}-tbody > tr:last-child > td`]:{borderBottomWidth:0,"&:first-child, &:last-child":{borderRadius:0}}}}},"> th":{position:"relative",color:g,fontWeight:n,textAlign:"start",background:C,borderBottom:x,transition:`background-color ${m} ease`},[`& > ${t}-measure-cell`]:{paddingBlock:"0 !important",borderBlock:"0 !important",[`${t}-measure-cell-content`]:{height:0,overflow:"hidden",pointerEvents:"none"}}}},[`${t}-footer`]:{padding:`${he(r)} ${he(s)}`,color:b,background:w}}}},nse=e=>{const{colorFillAlter:t,colorBgContainer:n,colorTextHeading:r,colorFillSecondary:s,colorFillContent:i,controlItemBgActive:o,controlItemBgActiveHover:a,padding:l,paddingSM:c,paddingXS:u,colorBorderSecondary:h,borderRadiusLG:g,controlHeight:m,colorTextPlaceholder:C,fontSize:v,fontSizeSM:b,lineHeight:w,lineWidth:S,colorIcon:x,colorIconHover:P,opacityLoading:F,controlInteractiveSize:M}=e,E=new Mn(s).onBackground(n).toHexString(),I=new Mn(i).onBackground(n).toHexString(),A=new Mn(t).onBackground(n).toHexString(),L=new Mn(x),D=new Mn(P),N=M/2-S,k=N*2+S*3;return{headerBg:A,headerColor:r,headerSortActiveBg:E,headerSortHoverBg:I,bodySortBg:A,rowHoverBg:A,rowSelectedBg:o,rowSelectedHoverBg:a,rowExpandedBg:t,cellPaddingBlock:l,cellPaddingInline:l,cellPaddingBlockMD:c,cellPaddingInlineMD:u,cellPaddingBlockSM:u,cellPaddingInlineSM:u,borderColor:h,headerBorderRadius:g,footerBg:A,footerColor:r,cellFontSize:v,cellFontSizeMD:v,cellFontSizeSM:v,headerSplitColor:h,fixedHeaderSortActiveBg:E,headerFilterHoverBg:i,filterDropdownMenuBg:n,filterDropdownBg:n,expandIconBg:n,selectionColumnWidth:m,stickyScrollBarBg:C,stickyScrollBarBorderRadius:100,expandIconMarginTop:(v*w-S*3)/2-Math.ceil((b*1.4-S*3)/2),headerIconColor:L.clone().setA(L.a*F).toRgbString(),headerIconHoverColor:D.clone().setA(D.a*F).toRgbString(),expandIconHalfInner:N,expandIconSize:k,expandIconScale:M/k}},rse=2,sse=Ln("Table",e=>{const{colorTextHeading:t,colorSplit:n,colorBgContainer:r,controlInteractiveSize:s,headerBg:i,headerColor:o,headerSortActiveBg:a,headerSortHoverBg:l,bodySortBg:c,rowHoverBg:u,rowSelectedBg:h,rowSelectedHoverBg:g,rowExpandedBg:m,cellPaddingBlock:C,cellPaddingInline:v,cellPaddingBlockMD:b,cellPaddingInlineMD:w,cellPaddingBlockSM:S,cellPaddingInlineSM:x,borderColor:P,footerBg:F,footerColor:M,headerBorderRadius:E,cellFontSize:I,cellFontSizeMD:A,cellFontSizeSM:L,headerSplitColor:D,fixedHeaderSortActiveBg:N,headerFilterHoverBg:k,filterDropdownBg:G,expandIconBg:$,selectionColumnWidth:_,stickyScrollBarBg:U,calc:V}=e,W=En(e,{tableFontSize:I,tableBg:r,tableRadius:E,tablePaddingVertical:C,tablePaddingHorizontal:v,tablePaddingVerticalMiddle:b,tablePaddingHorizontalMiddle:w,tablePaddingVerticalSmall:S,tablePaddingHorizontalSmall:x,tableBorderColor:P,tableHeaderTextColor:o,tableHeaderBg:i,tableFooterTextColor:M,tableFooterBg:F,tableHeaderCellSplitColor:D,tableHeaderSortBg:a,tableHeaderSortHoverBg:l,tableBodySortBg:c,tableFixedHeaderSortActiveBg:N,tableHeaderFilterActiveBg:k,tableFilterDropdownBg:G,tableRowHoverBg:u,tableSelectedRowBg:h,tableSelectedRowHoverBg:g,zIndexTableFixed:rse,tableFontSizeMiddle:A,tableFontSizeSmall:L,tableSelectionColumnWidth:_,tableExpandIconBg:$,tableExpandColumnWidth:V(s).add(V(e.padding).mul(2)).equal(),tableExpandedRowBg:m,tableFilterDropdownWidth:120,tableFilterDropdownHeight:264,tableFilterDropdownSearchWidth:140,tableScrollThumbSize:8,tableScrollThumbBg:U,tableScrollThumbBgHover:t,tableScrollBg:n});return[tse(W),Kre(W),mL(W),Zre(W),Ure(W),Hre(W),qre(W),_re(W),mL(W),Wre(W),Yre(W),jre(W),Jre(W),zre(W),Qre(W),Xre(W),ese(W)]},nse,{resetFont:!1,unitless:{expandIconScale:!0}}),CL=[],ise=(e,t)=>{var xt;const{prefixCls:n,className:r,rootClassName:s,style:i,classNames:o,styles:a,size:l,bordered:c,dropdownPrefixCls:u,dataSource:h,pagination:g,rowSelection:m,rowKey:C,rowClassName:v,columns:b,children:w,childrenColumnName:S,onChange:x,getPopupContainer:P,loading:F,expandIcon:M,expandable:E,expandedRowRender:I,expandIconColumnIndex:A,indentSize:L,scroll:D,sortDirections:N,locale:k,showSorterTooltip:G={target:"full-header"},virtual:$}=e;Sd();const _=p.useMemo(()=>b||FP(w),[b,w]),U=p.useMemo(()=>_.some(Ct=>Ct.responsive),[_]),V=Pv(U),W=p.useMemo(()=>{const Ct=new Set(Object.keys(V).filter(kt=>V[kt]));return _.filter(kt=>!kt.responsive||kt.responsive.some($t=>Ct.has($t)))},[_,V]),j=Vn(e,["className","style","columns"]),{locale:H=To,table:B}=p.useContext(Kt),{getPrefixCls:Y,direction:J,renderEmpty:te,getPopupContainer:Z,className:ae,style:de,classNames:ge,styles:ve}=Hn("table"),Re=Oi(l),ne={...e,size:Re,bordered:c},[re,ce]=Kn([ge,o],[ve,a],{props:ne},{pagination:{_default:"root"},header:{_default:"wrapper"},body:{_default:"wrapper"}}),X={...H.Table,...k},[ue]=Lo("global",To.global),fe=h||CL,oe=Y("table",n),we=Y("dropdown",u),[,Be]=ds(),Ae=Rs(oe),[Pe,_e]=sse(oe,Ae),ze={childrenColumnName:S,expandIconColumnIndex:A,...E,expandIcon:(E==null?void 0:E.expandIcon)??((xt=B==null?void 0:B.expandable)==null?void 0:xt.expandIcon)},{childrenColumnName:lt="children"}=ze,Ft=p.useMemo(()=>fe.some(Ct=>Ct==null?void 0:Ct[lt])?"nest":I||E!=null&&E.expandedRowRender?"row":null,[lt,fe]),gt={body:p.useRef(null)},Ye=Mne(oe),Ie=p.useRef(null),Ke=p.useRef(null);tK(t,()=>({...Ke.current,nativeElement:Ie.current}));const De=C||(B==null?void 0:B.rowKey)||"key",je=D??(B==null?void 0:B.scroll),qe=p.useMemo(()=>typeof De=="function"?De:Ct=>Ct==null?void 0:Ct[De],[De]),[Ge]=Fre(fe,lt,qe),Ce={},Oe=(Ct,kt,$t=!1)=>{var wn,fn,mn,cn;const Tt={...Ce,...Ct};$t&&((wn=Ce.resetPagination)==null||wn.call(Ce),(fn=Tt.pagination)!=null&&fn.current&&(Tt.pagination.current=1),g&&((cn=g.onChange)==null||cn.call(g,1,(mn=Tt.pagination)==null?void 0:mn.pageSize))),D&&D.scrollToFirstRowOnChange!==!1&>.body.current&&yK(0,{getContainer:()=>gt.body.current}),x==null||x(Tt.pagination,Tt.filters,Tt.sorter,{currentDataSource:mR(bR(fe,Tt.sorterStates,lt),Tt.filterStates,lt),action:kt})},ot=(Ct,kt)=>{Oe({sorter:Ct,sorterStates:kt},"sort",!1)},[ut,wt,It,Gt]=Bre({prefixCls:oe,mergedColumns:W,onSorterChange:ot,sortDirections:N||["ascend","descend"],tableLocale:X,showSorterTooltip:G,globalLocale:ue}),Nt=p.useMemo(()=>bR(fe,wt,lt),[lt,fe,wt]);Ce.sorter=Gt(),Ce.sorterStates=wt;const jt=(Ct,kt)=>{Oe({filters:Ct,filterStates:kt},"filter",!0)},[qt,Ot,Vt]=Pre({prefixCls:oe,locale:X,dropdownPrefixCls:we,mergedColumns:W,onFilterChange:jt,getPopupContainer:P||Z,rootClassName:ee(s,Ae)}),Ve=mR(Nt,Ot,lt);Ce.filters=Vt,Ce.filterStates=Ot;const st=p.useMemo(()=>{const Ct={};return Object.keys(Vt).forEach(kt=>{Vt[kt]!==null&&(Ct[kt]=Vt[kt])}),{...It,filters:Ct}},[It,Vt]),[Ue]=$re(st),ke=(Ct,kt)=>{Oe({pagination:{...Ce.pagination,current:Ct,pageSize:kt}},"paginate")},[q,Q]=Mre(Ve.length,ke,g);Ce.pagination=g===!1?{}:Tre(q,g),Ce.resetPagination=Q;const ie=p.useMemo(()=>{if(g===!1||!q.pageSize)return Ve;const{current:Ct=1,total:kt,pageSize:$t=uV}=q;return Ve.length$t?Ve.slice((Ct-1)*$t,Ct*$t):Ve:Ve.slice((Ct-1)*$t,Ct*$t)},[!!g,Ve,q==null?void 0:q.current,q==null?void 0:q.pageSize,q==null?void 0:q.total]),[Se,Te]=Fne({prefixCls:oe,data:Ve,pageData:ie,getRowKey:qe,getRecordByKey:Ge,expandType:Ft,childrenColumnName:lt,locale:X,getPopupContainer:P||Z},m),We=(Ct,kt,$t)=>{const Tt=typeof v=="function"?v(Ct,kt,$t):v;return ee({[`${oe}-row-selected`]:Te.has(qe(Ct,kt))},Tt)};ze.__PARENT_RENDER_ICON__=ze.expandIcon,ze.expandIcon=ze.expandIcon||M||Tne(X),Ft==="nest"&&ze.expandIconColumnIndex===void 0?ze.expandIconColumnIndex=m?1:0:ze.expandIconColumnIndex>0&&m&&(ze.expandIconColumnIndex-=1),typeof ze.indentSize!="number"&&(ze.indentSize=typeof L=="number"?L:15);const ft=p.useCallback(Ct=>Ue(Se(qt(ut(Ct)))),[ut,qt,Se]);let Qe,Xe;if(g!==!1&&(q!=null&&q.total)){let Ct;q.size?Ct=q.size:Ct=Re==="small"||Re==="middle"?"small":void 0;const kt=(mn="end")=>p.createElement(AG,{...q,classNames:re.pagination,styles:ce.pagination,className:ee(`${oe}-pagination ${oe}-pagination-${mn}`,q.className),size:Ct}),{placement:$t,position:Tt}=q,wn=$t??Tt,fn=mn=>{const cn=mn.toLowerCase();return cn.includes("center")?"center":cn.includes("left")||cn.includes("start")?"start":"end"};if(Array.isArray(wn)){const[mn,cn]=["top","bottom"].map(Xt=>wn.find(hn=>hn.includes(Xt))),Lr=wn.every(Xt=>`${Xt}`=="none");!mn&&!cn&&!Lr&&(Xe=kt()),mn&&(Qe=kt(fn(mn))),cn&&(Xe=kt(fn(cn)))}else Xe=kt()}const at=p.useMemo(()=>typeof F=="boolean"?{spinning:F}:typeof F=="object"&&F!==null?{spinning:!0,...F}:void 0,[F]),ht=ee(_e,Ae,`${oe}-wrapper`,ae,{[`${oe}-wrapper-rtl`]:J==="rtl"},r,s,re.root,Pe),vt={...ce.root,...de,...i},mt=p.useMemo(()=>at!=null&&at.spinning&&fe===CL?null:typeof(k==null?void 0:k.emptyText)<"u"?k.emptyText:(te==null?void 0:te("Table"))||p.createElement(nP,{componentName:"Table"}),[at==null?void 0:at.spinning,fe,k==null?void 0:k.emptyText,te]),Je=$?Vre:Gre,nt={},pt=p.useMemo(()=>{const{fontSize:Ct,lineHeight:kt,lineWidth:$t,padding:Tt,paddingXS:wn,paddingSM:fn}=Be,mn=Math.floor(Ct*kt);switch(Re){case"middle":return fn*2+mn+$t;case"small":return wn*2+mn+$t;default:return Tt*2+mn+$t}},[Be,Re]);return $&&(nt.listItemHeight=pt),p.createElement("div",{ref:Ie,className:ht,style:vt},p.createElement(xP,{spinning:!1,...at},Qe,p.createElement(Je,{...nt,...j,scroll:je,classNames:re,styles:ce,ref:Ke,columns:W,direction:J,expandable:ze,prefixCls:oe,className:ee({[`${oe}-middle`]:Re==="middle",[`${oe}-small`]:Re==="small",[`${oe}-bordered`]:c,[`${oe}-empty`]:fe.length===0},_e,Ae,Pe),data:ie,rowKey:qe,rowClassName:We,emptyText:mt,internalHooks:Cg,internalRefs:gt,transformColumns:ft,getContainerWidth:Ye,measureRowRender:Ct=>p.createElement(iV.Provider,{value:!0},p.createElement(ba,{getPopupContainer:kt=>kt},Ct))}),Xe))},ose=p.forwardRef(ise),ase=(e,t)=>{const n=p.useRef(0);return n.current+=1,p.createElement(ose,{...e,ref:t,_renderTimes:n.current})},Dl=p.forwardRef(ase);Dl.SELECTION_COLUMN=Xa;Dl.EXPAND_COLUMN=Za;Dl.SELECTION_ALL=nR;Dl.SELECTION_INVERT=rR;Dl.SELECTION_NONE=sR;Dl.Column=vne;Dl.ColumnGroup=yne;Dl.Summary=HG;var lse={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"};function wR(){return wR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,wR({},e,{ref:t,icon:lse})),use=p.forwardRef(cse);var dse={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"};function SR(){return SR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,SR({},e,{ref:t,icon:dse})),pse=p.forwardRef(hse),gse=(e,t,n,r)=>{const{titleMarginBottom:s,fontWeightStrong:i}=r;return{marginBottom:s,color:n,fontWeight:i,fontSize:e,lineHeight:t}},fse=e=>{const t=[1,2,3,4,5],n={};return t.forEach(r=>{n[` h${r}&, div&-h${r}, div&-h${r} > textarea, h${r} `]=gse(e[`fontSizeHeading${r}`],e[`lineHeightHeading${r}`],e.colorTextHeading,e)}),n},mse=e=>{const{componentCls:t}=e;return{[`&${`${t}-link`}`]:{...OE(e),userSelect:"text",[`&[disabled], &${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed","&:active, &:hover":{color:e.colorTextDisabled},"&:active":{pointerEvents:"none"}}}}},Cse=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:eC[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}}),vse=e=>{const{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"}}}},yse=e=>({[`${e.componentCls}-copy-success`]:{"\n &,\n &:hover,\n &:focus":{color:e.colorSuccess}},[`${e.componentCls}-copy-icon-only`]:{marginInlineStart:0}}),bse=()=>({"\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"}}),wse=e=>{const{componentCls:t,titleMarginTop:n}=e;return{[t]:{color:e.colorText,wordBreak:"break-word",lineHeight:e.lineHeight,[`&${t}-secondary, &${t}-link${t}-secondary`]:{color:e.colorTextDescription},[`&${t}-success, &${t}-link${t}-success`]:{color:e.colorSuccessText},[`&${t}-warning, &${t}-link${t}-warning`]:{color:e.colorWarningText},[`&${t}-danger, &${t}-link${t}-danger`]:{color:e.colorErrorText,[`&${t}-link:active, &${t}-link:focus`]:{color:e.colorErrorTextActive},[`&${t}-link:hover`]:{color:e.colorErrorTextHover}},[`&${t}-disabled`]:{color:e.colorTextDisabled,cursor:"not-allowed",userSelect:"none"},"\n div&,\n p\n ":{marginBottom:"1em"},...fse(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}},...Cse(e),...mse(e),[` ${t}-expand, ${t}-collapse, ${t}-edit, ${t}-copy `]:{...OE(e),marginInlineStart:e.marginXXS},...vse(e),...yse(e),...bse(),"&-rtl":{direction:"rtl"}}}},Sse=()=>({titleMarginTop:"1.2em",titleMarginBottom:"0.5em"}),gV=Ln("Typography",wse,Sse),xse=e=>{const{prefixCls:t,"aria-label":n,className:r,style:s,direction:i,maxLength:o,autoSize:a=!0,value:l,onSave:c,onCancel:u,onEnd:h,component:g,enterIcon:m=p.createElement(pse,null)}=e,C=p.useRef(null),v=p.useRef(!1),b=p.useRef(null),[w,S]=p.useState(l);p.useEffect(()=>{S(l)},[l]),p.useEffect(()=>{var k;if((k=C.current)!=null&&k.resizableTextArea){const{textArea:G}=C.current.resizableTextArea;G.focus();const{length:$}=G.value;G.setSelectionRange($,$)}},[]);const x=({target:k})=>{S(k.value.replace(/[\n\r]/g,""))},P=()=>{v.current=!0},F=()=>{v.current=!1},M=({keyCode:k})=>{v.current||(b.current=k)},E=()=>{c(w.trim())},I=({keyCode:k,ctrlKey:G,altKey:$,metaKey:_,shiftKey:U})=>{b.current!==k||v.current||G||$||_||U||(k===Et.ENTER?(E(),h==null||h()):k===Et.ESC&&u())},A=()=>{E()},[L,D]=gV(t),N=ee(t,`${t}-edit-content`,{[`${t}-rtl`]:i==="rtl",[`${t}-${g}`]:!!g},r,L,D);return p.createElement("div",{className:N,style:s},p.createElement(MG,{ref:C,maxLength:o,value:w,onChange:x,onKeyDown:M,onKeyUp:I,onCompositionStart:P,onCompositionEnd:F,onBlur:A,"aria-label":n,rows:1,autoSize:a}),m!==null?Xr(m,{className:`${t}-edit-content-confirm`}):null)},Rse=(e,t)=>{let n=!1;const r=s=>{var i,o,a;s.stopPropagation(),s.preventDefault(),(i=s.clipboardData)==null||i.clearData(),(o=s.clipboardData)==null||o.setData("text/plain",e),t&&((a=s.clipboardData)==null||a.setData("text/html",e)),n=!0};try{return document.addEventListener("copy",r,{capture:!0}),document.execCommand("copy"),n}catch{return!1}finally{document.removeEventListener("copy",r,{capture:!0})}},Ese=async(e,t)=>{try{return t?await navigator.clipboard.write([new ClipboardItem({"text/html":new Blob([e],{type:"text/html"}),"text/plain":new Blob([e],{type:"text/plain"})})]):await navigator.clipboard.writeText(e),!0}catch{return!1}};async function Pse(e,t){if(typeof e!="string")return!1;const n=(t==null?void 0:t.format)==="text/html";return!!(await Ese(e,n)||Rse(e,n))}const Fse=({copyConfig:e,children:t})=>{const[n,r]=p.useState(!1),[s,i]=p.useState(!1),o=p.useRef(null),a=()=>{o.current&&clearTimeout(o.current)},l={};e.format&&(l.format=e.format),p.useEffect(()=>a,[]);const c=Yt(async u=>{var h;u==null||u.preventDefault(),u==null||u.stopPropagation(),i(!0);try{const g=typeof e.text=="function"?await e.text():e.text;await Pse(g||pte(t,!0).join("")||"",l),i(!1),r(!0),a(),o.current=setTimeout(()=>{r(!1)},3e3),(h=e.onCopy)==null||h.call(e,u)}catch(g){throw i(!1),g}});return{copied:n,copyLoading:s,onClick:c}};function Zw(e,t){return p.useMemo(()=>{const n=!!e;return[n,{...t,...n&&typeof e=="object"?e:null}]},[e])}const Tse=e=>{const t=p.useRef(void 0);return p.useEffect(()=>{t.current=e}),t.current},Mse=(e,t,n)=>p.useMemo(()=>e===!0?{title:t??n}:p.isValidElement(e)?{title:e}:typeof e=="object"?{title:t??n,...e}:{title:e},[e,t,n]),fV=p.forwardRef((e,t)=>{const{prefixCls:n,component:r="article",className:s,rootClassName:i,children:o,direction:a,style:l,...c}=e,{getPrefixCls:u,direction:h,className:g,style:m}=Hn("typography"),C=a??h,v=u("typography",n),[b,w]=gV(v),S=ee(v,g,{[`${v}-rtl`]:C==="rtl"},s,i,b,w),x={...m,...l};return p.createElement(r,{className:S,style:x,ref:t,...c},o)});var Ise={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"};function xR(){return xR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,xR({},e,{ref:t,icon:Ise})),Ase=p.forwardRef(Dse);function vL(e){return e===!1?[!1,!1]:Array.isArray(e)?e:[e]}function Jw(e,t,n){return e===!0||e===void 0?t:e||n&&t}function Lse(e){const t=document.createElement("em");e.appendChild(t);const 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}const LP=e=>["string","number"].includes(typeof e),Ose=({prefixCls:e,copied:t,locale:n,iconOnly:r,tooltips:s,icon:i,tabIndex:o,onCopy:a,loading:l})=>{const c=vL(s),u=vL(i),{copied:h,copy:g}=n??{},m=t?h:g,C=Jw(c[t?1:0],m),v=typeof C=="string"?C:m;return p.createElement(bl,{title:C},p.createElement("button",{type:"button",className:ee(`${e}-copy`,{[`${e}-copy-success`]:t,[`${e}-copy-icon-only`]:r}),onClick:a,"aria-label":v,tabIndex:o},t?Jw(u[1],p.createElement(x$,null),!0):Jw(u[0],l?p.createElement(Cv,null):p.createElement(Ase,null),!0)))},rm=p.forwardRef(({style:e,children:t},n)=>{const r=p.useRef(null);return p.useImperativeHandle(n,()=>({isExceed:()=>{const s=r.current;return s.scrollHeight>s.clientHeight},getHeight:()=>r.current.clientHeight})),p.createElement("span",{"aria-hidden":!0,ref:r,style:{position:"fixed",display:"block",left:0,top:0,pointerEvents:"none",backgroundColor:"rgba(255, 0, 0, 0.65)",...e}},t)}),kse=e=>e.reduce((t,n)=>t+(LP(n)?String(n).length:1),0);function yL(e,t){let n=0;const r=[];for(let s=0;st){const c=t-n;return r.push(String(i).slice(0,c)),r}r.push(i),n=l}return e}const eS=0,tS=1,nS=2,rS=3,bL=4,sm={display:"-webkit-box",overflow:"hidden",WebkitBoxOrient:"vertical"};function Nse(e){const{enableMeasure:t,width:n,text:r,children:s,rows:i,expanded:o,miscDeps:a,onEllipsis:l}=e,c=p.useMemo(()=>Tr(r),[r]),u=p.useMemo(()=>kse(c),[r]),h=p.useMemo(()=>s(c,!1),[r]),[g,m]=p.useState(null),C=p.useRef(null),v=p.useRef(null),b=p.useRef(null),w=p.useRef(null),S=p.useRef(null),[x,P]=p.useState(!1),[F,M]=p.useState(eS),[E,I]=p.useState(0),[A,L]=p.useState(null);on(()=>{M(t&&n&&u?tS:eS)},[n,r,i,t,c]),on(()=>{var G,$,_,U;if(F===tS){M(nS);const V=v.current&&getComputedStyle(v.current).whiteSpace;L(V)}else if(F===nS){const V=!!((G=b.current)!=null&&G.isExceed());M(V?rS:bL),m(V?[0,u]:null),P(V);const W=(($=b.current)==null?void 0:$.getHeight())||0,j=i===1?0:((_=w.current)==null?void 0:_.getHeight())||0,H=((U=S.current)==null?void 0:U.getHeight())||0,B=Math.max(W,j+H);I(B+1),l(V)}},[F]);const D=g?Math.ceil((g[0]+g[1])/2):0;on(()=>{var _;const[G,$]=g||[0,0];if(G!==$){const V=(((_=C.current)==null?void 0:_.getHeight())||0)>E;let W=D;$-G===1&&(W=V?G:$),m(V?[G,W]:[W,$])}},[g,D]);const N=p.useMemo(()=>{if(!t)return s(c,!1);if(F!==rS||!g||g[0]!==g[1]){const G=s(c,!1);return[bL,eS].includes(F)?G:p.createElement("span",{style:{...sm,WebkitLineClamp:i}},G)}return s(o?c:yL(c,g[0]),x)},[o,F,g,c].concat(nn(a))),k={width:n,margin:0,padding:0,whiteSpace:A==="nowrap"?"normal":"inherit"};return p.createElement(p.Fragment,null,N,F===nS&&p.createElement(p.Fragment,null,p.createElement(rm,{style:{...k,...sm,WebkitLineClamp:i},ref:b},h),p.createElement(rm,{style:{...k,...sm,WebkitLineClamp:i-1},ref:w},h),p.createElement(rm,{style:{...k,...sm,WebkitLineClamp:1},ref:S},s([],!0))),F===rS&&g&&g[0]!==g[1]&&p.createElement(rm,{style:{...k,top:400},ref:C},s(yL(c,D),!0)),F===tS&&p.createElement("span",{style:{whiteSpace:"inherit"},ref:v}))}const Bse=({enableEllipsis:e,isEllipsis:t,children:n,tooltipProps:r})=>!(r!=null&&r.title)||!e?n:p.createElement(bl,{open:t?void 0:!1,...r},n);function $se({mark:e,code:t,underline:n,delete:r,strong:s,keyboard:i,italic:o},a){let l=a;function c(u,h){h&&(l=p.createElement(u,{},l))}return c("strong",s),c("u",n),c("del",r),c("code",t),c("mark",e),c("kbd",i),c("i",o),l}const Gse="...",wL=["delete","mark","code","underline","strong","keyboard","italic"],kv=p.forwardRef((e,t)=>{const{prefixCls:n,className:r,style:s,type:i,disabled:o,children:a,ellipsis:l,editable:c,copyable:u,component:h,title:g,...m}=e,{getPrefixCls:C,direction:v}=p.useContext(Kt),[b]=Lo("Text"),w=p.useRef(null),S=p.useRef(null),x=C("typography",n),P=Vn(m,wL),[F,M]=Zw(c),[E,I]=ir(!1,M.editing),{triggerType:A=["icon"]}=M,L=Ce=>{var Oe;Ce&&((Oe=M.onStart)==null||Oe.call(M)),I(Ce)},D=Tse(E);on(()=>{var Ce;!E&&D&&((Ce=S.current)==null||Ce.focus())},[E]);const N=Ce=>{Ce==null||Ce.preventDefault(),L(!0)},k=Ce=>{var Oe;(Oe=M.onChange)==null||Oe.call(M,Ce),L(!1)},G=()=>{var Ce;(Ce=M.onCancel)==null||Ce.call(M),L(!1)},[$,_]=Zw(u),{copied:U,copyLoading:V,onClick:W}=Fse({copyConfig:_,children:a}),[j,H]=p.useState(!1),[B,Y]=p.useState(!1),[J,te]=p.useState(!1),[Z,ae]=p.useState(!1),[de,ge]=p.useState(!0),[ve,Re]=Zw(l,{expandable:!1,symbol:Ce=>Ce?b==null?void 0:b.collapse:b==null?void 0:b.expand}),[ne,re]=ir(Re.defaultExpanded||!1,Re.expanded),ce=ve&&(!ne||Re.expandable==="collapsible"),{rows:X=1}=Re,ue=p.useMemo(()=>ce&&(Re.suffix!==void 0||Re.onEllipsis||Re.expandable||F||$),[ce,Re,F,$]);on(()=>{ve&&!ue&&(H(NA("webkitLineClamp")),Y(NA("textOverflow")))},[ue,ve]);const[fe,oe]=p.useState(ce),we=p.useMemo(()=>ue?!1:X===1?B:j,[ue,B,j]);on(()=>{oe(we&&ce)},[we,ce]);const Be=ce&&(fe?Z:J),Ae=ce&&X===1&&fe,Pe=ce&&X>1&&fe,_e=(Ce,Oe)=>{var ot;re(Oe.expanded),(ot=Re.onExpand)==null||ot.call(Re,Ce,Oe)},[ze,lt]=p.useState(0),Ft=({offsetWidth:Ce})=>{lt(Ce)},gt=Ce=>{var Oe;te(Ce),J!==Ce&&((Oe=Re.onEllipsis)==null||Oe.call(Re,Ce))};p.useEffect(()=>{const Ce=w.current;if(ve&&fe&&Ce){const Oe=Lse(Ce);Z!==Oe&&ae(Oe)}},[ve,fe,a,Pe,de,ze]),p.useEffect(()=>{const Ce=w.current;if(typeof IntersectionObserver>"u"||!Ce||!fe||!ce)return;const Oe=new IntersectionObserver(()=>{ge(!!Ce.offsetParent)});return Oe.observe(Ce),()=>{Oe.disconnect()}},[fe,ce]);const Ye=Mse(Re.tooltip,M.text,a),Ie=p.useMemo(()=>{if(!(!ve||fe))return[M.text,a,g,Ye.title].find(LP)},[ve,fe,g,Ye.title,Be]);if(E)return p.createElement(xse,{value:M.text??(typeof a=="string"?a:""),onSave:k,onCancel:G,onEnd:M.onEnd,prefixCls:x,className:r,style:s,direction:v,component:h,maxLength:M.maxLength,autoSize:M.autoSize,enterIcon:M.enterIcon});const Ke=()=>{const{expandable:Ce,symbol:Oe}=Re;return Ce?p.createElement("button",{type:"button",key:"expand",className:`${x}-${ne?"collapse":"expand"}`,onClick:ot=>_e(ot,{expanded:!ne}),"aria-label":ne?b.collapse:b==null?void 0:b.expand},typeof Oe=="function"?Oe(ne):Oe):null},De=()=>{if(!F)return;const{icon:Ce,tooltip:Oe,tabIndex:ot}=M,ut=Tr(Oe)[0]||(b==null?void 0:b.edit),wt=typeof ut=="string"?ut:"";return A.includes("icon")?p.createElement(bl,{key:"edit",title:Oe===!1?"":ut},p.createElement("button",{type:"button",ref:S,className:`${x}-edit`,onClick:N,"aria-label":wt,tabIndex:ot},Ce||p.createElement(use,{role:"button"}))):null},je=()=>$?p.createElement(Ose,{key:"copy",..._,prefixCls:x,copied:U,locale:b,onCopy:W,loading:V,iconOnly:!qs(a)}):null,qe=Ce=>[Ce&&Ke(),De(),je()],Ge=Ce=>[Ce&&!ne&&p.createElement("span",{"aria-hidden":!0,key:"ellipsis"},Gse),Re.suffix,qe(Ce)];return p.createElement(Vs,{onResize:Ft,disabled:!ce},Ce=>p.createElement(Bse,{tooltipProps:Ye,enableEllipsis:ce,isEllipsis:Be},p.createElement(fV,{className:ee({[`${x}-${i}`]:i,[`${x}-disabled`]:o,[`${x}-ellipsis`]:ve,[`${x}-ellipsis-single-line`]:Ae,[`${x}-ellipsis-multiple-line`]:Pe,[`${x}-link`]:h==="a"},r),prefixCls:n,style:{...s,WebkitLineClamp:Pe?X:void 0},component:h,ref:xs(Ce,w,t),direction:v,onClick:A.includes("text")?N:void 0,"aria-label":Ie==null?void 0:Ie.toString(),title:g,...P},p.createElement(Nse,{enableMeasure:ce&&!fe,text:a,rows:X,width:ze,onEllipsis:gt,expanded:ne,miscDeps:[U,ne,V,F,$,b].concat(nn(wL.map(Oe=>e[Oe])))},(Oe,ot)=>$se(e,p.createElement(p.Fragment,null,Oe.length>0&&ot&&!ne&&Ie?p.createElement("span",{key:"show-content","aria-hidden":!0},Oe):Oe,Ge(ot)))))))}),Vse=p.forwardRef((e,t)=>{const{ellipsis:n,rel:r,children:s,navigate:i,...o}=e,a={...o,rel:r===void 0&&o.target==="_blank"?"noopener noreferrer":r};return p.createElement(kv,{...a,ref:t,ellipsis:!!n,component:"a"},s)}),Hse=p.forwardRef((e,t)=>{const{children:n,...r}=e;return p.createElement(kv,{ref:t,...r,component:"div"},n)}),zse=(e,t)=>{const{ellipsis:n,children:r,...s}=e,i=p.useMemo(()=>n&&typeof n=="object"?Vn(n,["expandable","rows"]):n,[n]);return p.createElement(kv,{ref:t,...s,ellipsis:i,component:"span"},r)},Wse=p.forwardRef(zse),_se=[1,2,3,4,5],Use=p.forwardRef((e,t)=>{const{level:n=1,children:r,...s}=e,i=_se.includes(n)?`h${n}`:"h1";return p.createElement(kv,{ref:t,...s,component:i},r)}),Nv=fV;Nv.Text=Wse;Nv.Link=Vse;Nv.Title=Use;Nv.Paragraph=Hse;var jse={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"};function RR(){return RR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,RR({},e,{ref:t,icon:jse})),KDe=p.forwardRef(Kse);function mV(e,t){return function(){return e.apply(t,arguments)}}const{toString:qse}=Object.prototype,{getPrototypeOf:OP}=Object,{iterator:Bv,toStringTag:CV}=Symbol,$v=(e=>t=>{const n=qse.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),lo=e=>(e=e.toLowerCase(),t=>$v(t)===e),Gv=e=>t=>typeof t===e,{isArray:Ld}=Array,Hp=Gv("undefined");function Xse(e){return e!==null&&!Hp(e)&&e.constructor!==null&&!Hp(e.constructor)&&Hs(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const vV=lo("ArrayBuffer");function Yse(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&vV(e.buffer),t}const Qse=Gv("string"),Hs=Gv("function"),yV=Gv("number"),Vv=e=>e!==null&&typeof e=="object",Zse=e=>e===!0||e===!1,km=e=>{if($v(e)!=="object")return!1;const t=OP(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(CV in e)&&!(Bv in e)},Jse=lo("Date"),eie=lo("File"),tie=lo("Blob"),nie=lo("FileList"),rie=e=>Vv(e)&&Hs(e.pipe),sie=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Hs(e.append)&&((t=$v(e))==="formdata"||t==="object"&&Hs(e.toString)&&e.toString()==="[object FormData]"))},iie=lo("URLSearchParams"),[oie,aie,lie,cie]=["ReadableStream","Request","Response","Headers"].map(lo),uie=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function vg(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Ld(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const pc=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,wV=e=>!Hp(e)&&e!==pc;function ER(){const{caseless:e}=wV(this)&&this||{},t={},n=(r,s)=>{const i=e&&bV(t,s)||s;km(t[i])&&km(r)?t[i]=ER(t[i],r):km(r)?t[i]=ER({},r):Ld(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r(vg(t,(s,i)=>{n&&Hs(s)?e[i]=mV(s,n):e[i]=s},{allOwnKeys:r}),e),hie=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pie=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},gie=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&OP(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},fie=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},mie=e=>{if(!e)return null;if(Ld(e))return e;let t=e.length;if(!yV(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Cie=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&OP(Uint8Array)),vie=(e,t)=>{const r=(e&&e[Bv]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},yie=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},bie=lo("HTMLFormElement"),wie=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),SL=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Sie=lo("RegExp"),SV=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};vg(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},xie=e=>{SV(e,(t,n)=>{if(Hs(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Hs(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},Rie=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Ld(e)?r(e):r(String(e).split(t)),n},Eie=()=>{},Pie=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function Fie(e){return!!(e&&Hs(e.append)&&e[CV]==="FormData"&&e[Bv])}const Tie=e=>{const t=new Array(10),n=(r,s)=>{if(Vv(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Ld(r)?[]:{};return vg(r,(o,a)=>{const l=n(o,s+1);!Hp(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},Mie=lo("AsyncFunction"),Iie=e=>e&&(Vv(e)||Hs(e))&&Hs(e.then)&&Hs(e.catch),xV=((e,t)=>e?setImmediate:t?((n,r)=>(pc.addEventListener("message",({source:s,data:i})=>{s===pc&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),pc.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Hs(pc.postMessage)),Die=typeof queueMicrotask<"u"?queueMicrotask.bind(pc):typeof process<"u"&&process.nextTick||xV,Aie=e=>e!=null&&Hs(e[Bv]),Ne={isArray:Ld,isArrayBuffer:vV,isBuffer:Xse,isFormData:sie,isArrayBufferView:Yse,isString:Qse,isNumber:yV,isBoolean:Zse,isObject:Vv,isPlainObject:km,isReadableStream:oie,isRequest:aie,isResponse:lie,isHeaders:cie,isUndefined:Hp,isDate:Jse,isFile:eie,isBlob:tie,isRegExp:Sie,isFunction:Hs,isStream:rie,isURLSearchParams:iie,isTypedArray:Cie,isFileList:nie,forEach:vg,merge:ER,extend:die,trim:uie,stripBOM:hie,inherits:pie,toFlatObject:gie,kindOf:$v,kindOfTest:lo,endsWith:fie,toArray:mie,forEachEntry:vie,matchAll:yie,isHTMLForm:bie,hasOwnProperty:SL,hasOwnProp:SL,reduceDescriptors:SV,freezeMethods:xie,toObjectSet:Rie,toCamelCase:wie,noop:Eie,toFiniteNumber:Pie,findKey:bV,global:pc,isContextDefined:wV,isSpecCompliantForm:Fie,toJSONObject:Tie,isAsyncFn:Mie,isThenable:Iie,setImmediate:xV,asap:Die,isIterable:Aie};function sn(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s,this.status=s.status?s.status:null)}Ne.inherits(sn,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Ne.toJSONObject(this.config),code:this.code,status:this.status}}});const RV=sn.prototype,EV={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{EV[e]={value:e}});Object.defineProperties(sn,EV);Object.defineProperty(RV,"isAxiosError",{value:!0});sn.from=(e,t,n,r,s,i)=>{const o=Object.create(RV);return Ne.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),sn.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const Lie=null;function PR(e){return Ne.isPlainObject(e)||Ne.isArray(e)}function PV(e){return Ne.endsWith(e,"[]")?e.slice(0,-2):e}function xL(e,t,n){return e?e.concat(t).map(function(s,i){return s=PV(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function Oie(e){return Ne.isArray(e)&&!e.some(PR)}const kie=Ne.toFlatObject(Ne,{},null,function(t){return/^is[A-Z]/.test(t)});function Hv(e,t,n){if(!Ne.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Ne.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(v,b){return!Ne.isUndefined(b[v])});const r=n.metaTokens,s=n.visitor||u,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&Ne.isSpecCompliantForm(t);if(!Ne.isFunction(s))throw new TypeError("visitor must be a function");function c(C){if(C===null)return"";if(Ne.isDate(C))return C.toISOString();if(!l&&Ne.isBlob(C))throw new sn("Blob is not supported. Use a Buffer instead.");return Ne.isArrayBuffer(C)||Ne.isTypedArray(C)?l&&typeof Blob=="function"?new Blob([C]):Buffer.from(C):C}function u(C,v,b){let w=C;if(C&&!b&&typeof C=="object"){if(Ne.endsWith(v,"{}"))v=r?v:v.slice(0,-2),C=JSON.stringify(C);else if(Ne.isArray(C)&&Oie(C)||(Ne.isFileList(C)||Ne.endsWith(v,"[]"))&&(w=Ne.toArray(C)))return v=PV(v),w.forEach(function(x,P){!(Ne.isUndefined(x)||x===null)&&t.append(o===!0?xL([v],P,i):o===null?v:v+"[]",c(x))}),!1}return PR(C)?!0:(t.append(xL(b,v,i),c(C)),!1)}const h=[],g=Object.assign(kie,{defaultVisitor:u,convertValue:c,isVisitable:PR});function m(C,v){if(!Ne.isUndefined(C)){if(h.indexOf(C)!==-1)throw Error("Circular reference detected in "+v.join("."));h.push(C),Ne.forEach(C,function(w,S){(!(Ne.isUndefined(w)||w===null)&&s.call(t,w,Ne.isString(S)?S.trim():S,v,g))===!0&&m(w,v?v.concat(S):[S])}),h.pop()}}if(!Ne.isObject(e))throw new TypeError("data must be an object");return m(e),t}function RL(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function kP(e,t){this._pairs=[],e&&Hv(e,this,t)}const FV=kP.prototype;FV.append=function(t,n){this._pairs.push([t,n])};FV.toString=function(t){const n=t?function(r){return t.call(this,r,RL)}:RL;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function Nie(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function TV(e,t,n){if(!t)return e;const r=n&&n.encode||Nie;Ne.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let i;if(s?i=s(t,n):i=Ne.isURLSearchParams(t)?t.toString():new kP(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class EL{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Ne.forEach(this.handlers,function(r){r!==null&&t(r)})}}const MV={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Bie=typeof URLSearchParams<"u"?URLSearchParams:kP,$ie=typeof FormData<"u"?FormData:null,Gie=typeof Blob<"u"?Blob:null,Vie={isBrowser:!0,classes:{URLSearchParams:Bie,FormData:$ie,Blob:Gie},protocols:["http","https","file","blob","url","data"]},NP=typeof window<"u"&&typeof document<"u",FR=typeof navigator=="object"&&navigator||void 0,Hie=NP&&(!FR||["ReactNative","NativeScript","NS"].indexOf(FR.product)<0),zie=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Wie=NP&&window.location.href||"http://localhost",_ie=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:NP,hasStandardBrowserEnv:Hie,hasStandardBrowserWebWorkerEnv:zie,navigator:FR,origin:Wie},Symbol.toStringTag,{value:"Module"})),as={..._ie,...Vie};function Uie(e,t){return Hv(e,new as.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return as.isNode&&Ne.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function jie(e){return Ne.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Kie(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&Ne.isArray(s)?s.length:o,l?(Ne.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!Ne.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&Ne.isArray(s[o])&&(s[o]=Kie(s[o])),!a)}if(Ne.isFormData(e)&&Ne.isFunction(e.entries)){const n={};return Ne.forEachEntry(e,(r,s)=>{t(jie(r),s,n,0)}),n}return null}function qie(e,t,n){if(Ne.isString(e))try{return(t||JSON.parse)(e),Ne.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const yg={transitional:MV,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=Ne.isObject(t);if(i&&Ne.isHTMLForm(t)&&(t=new FormData(t)),Ne.isFormData(t))return s?JSON.stringify(IV(t)):t;if(Ne.isArrayBuffer(t)||Ne.isBuffer(t)||Ne.isStream(t)||Ne.isFile(t)||Ne.isBlob(t)||Ne.isReadableStream(t))return t;if(Ne.isArrayBufferView(t))return t.buffer;if(Ne.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return Uie(t,this.formSerializer).toString();if((a=Ne.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Hv(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),qie(t)):t}],transformResponse:[function(t){const n=this.transitional||yg.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(Ne.isResponse(t)||Ne.isReadableStream(t))return t;if(t&&Ne.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?sn.from(a,sn.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:as.classes.FormData,Blob:as.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Ne.forEach(["delete","get","head","post","put","patch"],e=>{yg.headers[e]={}});const Xie=Ne.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yie=e=>{const t={};let n,r,s;return e&&e.split(` `).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&Xie[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},PL=Symbol("internals");function Lh(e){return e&&String(e).trim().toLowerCase()}function Nm(e){return e===!1||e==null?e:Ne.isArray(e)?e.map(Nm):String(e)}function Qie(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const Zie=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function sS(e,t,n,r,s){if(Ne.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!Ne.isString(t)){if(Ne.isString(r))return t.indexOf(r)!==-1;if(Ne.isRegExp(r))return r.test(t)}}function Jie(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function eoe(e,t){const n=Ne.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}let zs=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,c){const u=Lh(l);if(!u)throw new Error("header name must be a non-empty string");const h=Ne.findKey(s,u);(!h||s[h]===void 0||c===!0||c===void 0&&s[h]!==!1)&&(s[h||l]=Nm(a))}const o=(a,l)=>Ne.forEach(a,(c,u)=>i(c,u,l));if(Ne.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(Ne.isString(t)&&(t=t.trim())&&!Zie(t))o(Yie(t),n);else if(Ne.isObject(t)&&Ne.isIterable(t)){let a={},l,c;for(const u of t){if(!Ne.isArray(u))throw TypeError("Object iterator must return a key-value pair");a[c=u[0]]=(l=a[c])?Ne.isArray(l)?[...l,u[1]]:[l,u[1]]:u[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Lh(t),t){const r=Ne.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return Qie(s);if(Ne.isFunction(n))return n.call(this,s,r);if(Ne.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Lh(t),t){const r=Ne.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||sS(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Lh(o),o){const a=Ne.findKey(r,o);a&&(!n||sS(r,r[a],a,n))&&(delete r[a],s=!0)}}return Ne.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||sS(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return Ne.forEach(this,(s,i)=>{const o=Ne.findKey(r,i);if(o){n[o]=Nm(s),delete n[i];return}const a=t?Jie(i):String(i).trim();a!==i&&delete n[i],n[a]=Nm(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Ne.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&Ne.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[PL]=this[PL]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Lh(o);r[a]||(eoe(s,o),r[a]=!0)}return Ne.isArray(t)?t.forEach(i):i(t),this}};zs.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Ne.reduceDescriptors(zs.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});Ne.freezeMethods(zs);function iS(e,t){const n=this||yg,r=t||n,s=zs.from(r.headers);let i=r.data;return Ne.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function DV(e){return!!(e&&e.__CANCEL__)}function Od(e,t,n){sn.call(this,e??"canceled",sn.ERR_CANCELED,t,n),this.name="CanceledError"}Ne.inherits(Od,sn,{__CANCEL__:!0});function AV(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new sn("Request failed with status code "+n.status,[sn.ERR_BAD_REQUEST,sn.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function toe(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function noe(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),u=r[i];o||(o=c),n[s]=l,r[s]=c;let h=i,g=0;for(;h!==s;)g+=n[h++],h=h%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o{n=u,s=null,i&&(clearTimeout(i),i=null),e.apply(null,c)};return[(...c)=>{const u=Date.now(),h=u-n;h>=r?o(c,u):(s=c,i||(i=setTimeout(()=>{i=null,o(s)},r-h)))},()=>s&&o(s)]}const PC=(e,t,n=3)=>{let r=0;const s=noe(50,250);return roe(i=>{const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=o-r,c=s(l),u=o<=a;r=o;const h={loaded:o,total:a,progress:a?o/a:void 0,bytes:l,rate:c||void 0,estimated:c&&a&&u?(a-o)/c:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(h)},n)},FL=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},TL=e=>(...t)=>Ne.asap(()=>e(...t)),soe=as.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,as.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(as.origin),as.navigator&&/(msie|trident)/i.test(as.navigator.userAgent)):()=>!0,ioe=as.hasStandardBrowserEnv?{write(e,t,n,r,s,i){const o=[e+"="+encodeURIComponent(t)];Ne.isNumber(n)&&o.push("expires="+new Date(n).toGMTString()),Ne.isString(r)&&o.push("path="+r),Ne.isString(s)&&o.push("domain="+s),i===!0&&o.push("secure"),document.cookie=o.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function ooe(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function aoe(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function LV(e,t,n){let r=!ooe(t);return e&&(r||n==!1)?aoe(e,t):t}const ML=e=>e instanceof zs?{...e}:e;function Ac(e,t){t=t||{};const n={};function r(c,u,h,g){return Ne.isPlainObject(c)&&Ne.isPlainObject(u)?Ne.merge.call({caseless:g},c,u):Ne.isPlainObject(u)?Ne.merge({},u):Ne.isArray(u)?u.slice():u}function s(c,u,h,g){if(Ne.isUndefined(u)){if(!Ne.isUndefined(c))return r(void 0,c,h,g)}else return r(c,u,h,g)}function i(c,u){if(!Ne.isUndefined(u))return r(void 0,u)}function o(c,u){if(Ne.isUndefined(u)){if(!Ne.isUndefined(c))return r(void 0,c)}else return r(void 0,u)}function a(c,u,h){if(h in t)return r(c,u);if(h in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,u,h)=>s(ML(c),ML(u),h,!0)};return Ne.forEach(Object.keys(Object.assign({},e,t)),function(u){const h=l[u]||s,g=h(e[u],t[u],u);Ne.isUndefined(g)&&h!==a||(n[u]=g)}),n}const OV=e=>{const t=Ac({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:s,xsrfCookieName:i,headers:o,auth:a}=t;t.headers=o=zs.from(o),t.url=TV(LV(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&o.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):"")));let l;if(Ne.isFormData(n)){if(as.hasStandardBrowserEnv||as.hasStandardBrowserWebWorkerEnv)o.setContentType(void 0);else if((l=o.getContentType())!==!1){const[c,...u]=l?l.split(";").map(h=>h.trim()).filter(Boolean):[];o.setContentType([c||"multipart/form-data",...u].join("; "))}}if(as.hasStandardBrowserEnv&&(r&&Ne.isFunction(r)&&(r=r(t)),r||r!==!1&&soe(t.url))){const c=s&&i&&ioe.read(i);c&&o.set(s,c)}return t},loe=typeof XMLHttpRequest<"u",coe=loe&&function(e){return new Promise(function(n,r){const s=OV(e);let i=s.data;const o=zs.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=s,u,h,g,m,C;function v(){m&&m(),C&&C(),s.cancelToken&&s.cancelToken.unsubscribe(u),s.signal&&s.signal.removeEventListener("abort",u)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function w(){if(!b)return;const x=zs.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),F={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:x,config:e,request:b};AV(function(E){n(E),v()},function(E){r(E),v()},F),b=null}"onloadend"in b?b.onloadend=w:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(w)},b.onabort=function(){b&&(r(new sn("Request aborted",sn.ECONNABORTED,e,b)),b=null)},b.onerror=function(){r(new sn("Network Error",sn.ERR_NETWORK,e,b)),b=null},b.ontimeout=function(){let P=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const F=s.transitional||MV;s.timeoutErrorMessage&&(P=s.timeoutErrorMessage),r(new sn(P,F.clarifyTimeoutError?sn.ETIMEDOUT:sn.ECONNABORTED,e,b)),b=null},i===void 0&&o.setContentType(null),"setRequestHeader"in b&&Ne.forEach(o.toJSON(),function(P,F){b.setRequestHeader(F,P)}),Ne.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),a&&a!=="json"&&(b.responseType=s.responseType),c&&([g,C]=PC(c,!0),b.addEventListener("progress",g)),l&&b.upload&&([h,m]=PC(l),b.upload.addEventListener("progress",h),b.upload.addEventListener("loadend",m)),(s.cancelToken||s.signal)&&(u=x=>{b&&(r(!x||x.type?new Od(null,e,b):x),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(u),s.signal&&(s.signal.aborted?u():s.signal.addEventListener("abort",u)));const S=toe(s.url);if(S&&as.protocols.indexOf(S)===-1){r(new sn("Unsupported protocol "+S+":",sn.ERR_BAD_REQUEST,e));return}b.send(i||null)})},uoe=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,s;const i=function(c){if(!s){s=!0,a();const u=c instanceof Error?c:this.reason;r.abort(u instanceof sn?u:new Od(u instanceof Error?u.message:u))}};let o=t&&setTimeout(()=>{o=null,i(new sn(`timeout ${t} of ms exceeded`,sn.ETIMEDOUT))},t);const a=()=>{e&&(o&&clearTimeout(o),o=null,e.forEach(c=>{c.unsubscribe?c.unsubscribe(i):c.removeEventListener("abort",i)}),e=null)};e.forEach(c=>c.addEventListener("abort",i));const{signal:l}=r;return l.unsubscribe=()=>Ne.asap(a),l}},doe=function*(e,t){let n=e.byteLength;if(n{const s=hoe(e,t);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:u}=await s.next();if(c){a(),l.close();return}let h=u.byteLength;if(n){let g=i+=h;n(g)}l.enqueue(new Uint8Array(u))}catch(c){throw a(c),c}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},zv=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",kV=zv&&typeof ReadableStream=="function",goe=zv&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),NV=(e,...t)=>{try{return!!e(...t)}catch{return!1}},foe=kV&&NV(()=>{let e=!1;const t=new Request(as.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),DL=64*1024,TR=kV&&NV(()=>Ne.isReadableStream(new Response("").body)),FC={stream:TR&&(e=>e.body)};zv&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!FC[t]&&(FC[t]=Ne.isFunction(e[t])?n=>n[t]():(n,r)=>{throw new sn(`Response type '${t}' is not supported`,sn.ERR_NOT_SUPPORT,r)})})})(new Response);const moe=async e=>{if(e==null)return 0;if(Ne.isBlob(e))return e.size;if(Ne.isSpecCompliantForm(e))return(await new Request(as.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(Ne.isArrayBufferView(e)||Ne.isArrayBuffer(e))return e.byteLength;if(Ne.isURLSearchParams(e)&&(e=e+""),Ne.isString(e))return(await goe(e)).byteLength},Coe=async(e,t)=>{const n=Ne.toFiniteNumber(e.getContentLength());return n??moe(t)},voe=zv&&(async e=>{let{url:t,method:n,data:r,signal:s,cancelToken:i,timeout:o,onDownloadProgress:a,onUploadProgress:l,responseType:c,headers:u,withCredentials:h="same-origin",fetchOptions:g}=OV(e);c=c?(c+"").toLowerCase():"text";let m=uoe([s,i&&i.toAbortSignal()],o),C;const v=m&&m.unsubscribe&&(()=>{m.unsubscribe()});let b;try{if(l&&foe&&n!=="get"&&n!=="head"&&(b=await Coe(u,r))!==0){let F=new Request(t,{method:"POST",body:r,duplex:"half"}),M;if(Ne.isFormData(r)&&(M=F.headers.get("content-type"))&&u.setContentType(M),F.body){const[E,I]=FL(b,PC(TL(l)));r=IL(F.body,DL,E,I)}}Ne.isString(h)||(h=h?"include":"omit");const w="credentials"in Request.prototype;C=new Request(t,{...g,signal:m,method:n.toUpperCase(),headers:u.normalize().toJSON(),body:r,duplex:"half",credentials:w?h:void 0});let S=await fetch(C);const x=TR&&(c==="stream"||c==="response");if(TR&&(a||x&&v)){const F={};["status","statusText","headers"].forEach(A=>{F[A]=S[A]});const M=Ne.toFiniteNumber(S.headers.get("content-length")),[E,I]=a&&FL(M,PC(TL(a),!0))||[];S=new Response(IL(S.body,DL,E,()=>{I&&I(),v&&v()}),F)}c=c||"text";let P=await FC[Ne.findKey(FC,c)||"text"](S,e);return!x&&v&&v(),await new Promise((F,M)=>{AV(F,M,{data:P,headers:zs.from(S.headers),status:S.status,statusText:S.statusText,config:e,request:C})})}catch(w){throw v&&v(),w&&w.name==="TypeError"&&/Load failed|fetch/i.test(w.message)?Object.assign(new sn("Network Error",sn.ERR_NETWORK,e,C),{cause:w.cause||w}):sn.from(w,w&&w.code,e,C)}}),MR={http:Lie,xhr:coe,fetch:voe};Ne.forEach(MR,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const AL=e=>`- ${e}`,yoe=e=>Ne.isFunction(e)||e===null||e===!1,BV={getAdapter:e=>{e=Ne.isArray(e)?e:[e];const{length:t}=e;let n,r;const s={};for(let i=0;i`adapter ${a} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=t?i.length>1?`since : `+i.map(AL).join(` `):" "+AL(i[0]):"as no adapter specified";throw new sn("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return r},adapters:MR};function oS(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Od(null,e)}function LL(e){return oS(e),e.headers=zs.from(e.headers),e.data=iS.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),BV.getAdapter(e.adapter||yg.adapter)(e).then(function(r){return oS(e),r.data=iS.call(e,e.transformResponse,r),r.headers=zs.from(r.headers),r},function(r){return DV(r)||(oS(e),r&&r.response&&(r.response.data=iS.call(e,e.transformResponse,r.response),r.response.headers=zs.from(r.response.headers))),Promise.reject(r)})}const $V="1.9.0",Wv={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Wv[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const OL={};Wv.transitional=function(t,n,r){function s(i,o){return"[Axios v"+$V+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new sn(s(o," has been removed"+(n?" in "+n:"")),sn.ERR_DEPRECATED);return n&&!OL[o]&&(OL[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};Wv.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function boe(e,t,n){if(typeof e!="object")throw new sn("options must be an object",sn.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new sn("option "+i+" must be "+l,sn.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new sn("Unknown option "+i,sn.ERR_BAD_OPTION)}}const Bm={assertOptions:boe,validators:Wv},vo=Bm.validators;let yc=class{constructor(t){this.defaults=t||{},this.interceptors={request:new EL,response:new EL}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=s.stack?s.stack.replace(/^.+\n/,""):"";try{r.stack?i&&!String(r.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(r.stack+=` `+i):r.stack=i}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=Ac(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&Bm.assertOptions(r,{silentJSONParsing:vo.transitional(vo.boolean),forcedJSONParsing:vo.transitional(vo.boolean),clarifyTimeoutError:vo.transitional(vo.boolean)},!1),s!=null&&(Ne.isFunction(s)?n.paramsSerializer={serialize:s}:Bm.assertOptions(s,{encode:vo.function,serialize:vo.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Bm.assertOptions(n,{baseUrl:vo.spelling("baseURL"),withXsrfToken:vo.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&Ne.merge(i.common,i[n.method]);i&&Ne.forEach(["delete","get","head","post","put","patch","common"],C=>{delete i[C]}),n.headers=zs.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(v){typeof v.runWhen=="function"&&v.runWhen(n)===!1||(l=l&&v.synchronous,a.unshift(v.fulfilled,v.rejected))});const c=[];this.interceptors.response.forEach(function(v){c.push(v.fulfilled,v.rejected)});let u,h=0,g;if(!l){const C=[LL.bind(this),void 0];for(C.unshift.apply(C,a),C.push.apply(C,c),g=C.length,u=Promise.resolve(n);h{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new Od(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new GV(function(s){t=s}),cancel:t}}};function Soe(e){return function(n){return e.apply(null,n)}}function xoe(e){return Ne.isObject(e)&&e.isAxiosError===!0}const IR={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(IR).forEach(([e,t])=>{IR[t]=e});function VV(e){const t=new yc(e),n=mV(yc.prototype.request,t);return Ne.extend(n,yc.prototype,t,{allOwnKeys:!0}),Ne.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return VV(Ac(e,s))},n}const wr=VV(yg);wr.Axios=yc;wr.CanceledError=Od;wr.CancelToken=woe;wr.isCancel=DV;wr.VERSION=$V;wr.toFormData=Hv;wr.AxiosError=sn;wr.Cancel=wr.CanceledError;wr.all=function(t){return Promise.all(t)};wr.spread=Soe;wr.isAxiosError=xoe;wr.mergeConfig=Ac;wr.AxiosHeaders=zs;wr.formToJSON=e=>IV(Ne.isHTMLForm(e)?new FormData(e):e);wr.getAdapter=BV.getAdapter;wr.HttpStatusCode=IR;wr.default=wr;const{Axios:YDe,AxiosError:QDe,CanceledError:ZDe,isCancel:JDe,CancelToken:eAe,VERSION:tAe,all:nAe,Cancel:rAe,isAxiosError:sAe,spread:iAe,toFormData:oAe,AxiosHeaders:aAe,HttpStatusCode:lAe,formToJSON:cAe,getAdapter:uAe,mergeConfig:dAe}=wr;var Roe={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};function DR(){return DR=Object.assign?Object.assign.bind():function(e){for(var t=1;tp.createElement(vn,DR({},e,{ref:t,icon:Roe})),hAe=p.forwardRef(Eoe),Poe=e=>{const t=p.useRef(e);return p.useEffect(()=>{t.current=e}),t},Foe=(e,t=100,n=!1)=>{const r=Poe(e),s=p.useRef(),i=[t,n,r];function o(){s.current&&clearTimeout(s.current),s.current=void 0}p.useEffect(()=>o,i);function a(){s.current=void 0}return p.useCallback(function(){const l=arguments,{current:c}=s;if(c===void 0&&n)return s.current=setTimeout(a,t),r.current.apply(null,l);c&&clearTimeout(c),s.current=setTimeout(()=>{s.current=void 0,r.current.apply(null,l)},t)},i)},pAe=(e,t,n)=>{const r=p.useState(e);return[r[0],Foe(r[1],t,n),r[1]]};var Al=class{constructor(){this.allSyncListeners=new Map,this.allAsyncListeners=new Map,this.globalSyncListeners=new Set,this.globalAsyncListeners=new Set,this.asyncFunctionsQueue=[],this.scheduled=!1,this.firedEvents={}}setFrameworkOverrides(e){this.frameworkOverrides=e}getListeners(e,t,n){const r=t?this.allAsyncListeners:this.allSyncListeners;let s=r.get(e);return!s&&n&&(s=new Set,r.set(e,s)),s}noRegisteredListenersExist(){return this.allSyncListeners.size===0&&this.allAsyncListeners.size===0&&this.globalSyncListeners.size===0&&this.globalAsyncListeners.size===0}addEventListener(e,t,n=!1){this.getListeners(e,n,!0).add(t)}removeEventListener(e,t,n=!1){const r=this.getListeners(e,n,!1);r&&(r.delete(t),r.size===0&&(n?this.allAsyncListeners:this.allSyncListeners).delete(e))}addGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).add(e)}removeGlobalListener(e,t=!1){(t?this.globalAsyncListeners:this.globalSyncListeners).delete(e)}dispatchEvent(e){const t=e;this.dispatchToListeners(t,!0),this.dispatchToListeners(t,!1),this.firedEvents[t.type]=!0}dispatchEventOnce(e){this.firedEvents[e.type]||this.dispatchEvent(e)}dispatchToListeners(e,t){const n=e.type;if(t&&"event"in e){const a=e.event;a instanceof Event&&(e.eventPath=a.composedPath())}const r=(a,l)=>a.forEach(c=>{if(!l.has(c))return;const u=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>c(e)):()=>c(e);t?this.dispatchAsync(u):u()}),s=this.getListeners(n,t,!1)??new Set,i=new Set(s);i.size>0&&r(i,s),new Set(t?this.globalAsyncListeners:this.globalSyncListeners).forEach(a=>{const l=this.frameworkOverrides?()=>this.frameworkOverrides.wrapIncoming(()=>a(n,e)):()=>a(n,e);t?this.dispatchAsync(l):l()})}dispatchAsync(e){if(this.asyncFunctionsQueue.push(e),!this.scheduled){const t=()=>{window.setTimeout(this.flushAsyncQueue.bind(this),0)};this.frameworkOverrides?this.frameworkOverrides.wrapIncoming(t):t(),this.scheduled=!0}}flushAsyncQueue(){this.scheduled=!1;const e=this.asyncFunctionsQueue.slice();this.asyncFunctionsQueue=[],e.forEach(t=>t())}};function Toe(e,t){return t}function BP(e){return(e==null?void 0:e.getLocaleTextFunc())??Toe}function ki(e,t,n){n==null||typeof n=="string"&&n==""?$P(e,t):Ni(e,t,n)}function Ni(e,t,n){e.setAttribute(HV(t),n.toString())}function $P(e,t){e.removeAttribute(HV(t))}function HV(e){return`aria-${e}`}function Bn(e,t){t?e.setAttribute("role",t):e.removeAttribute("role")}function Moe(e){let t;return e==="asc"?t="ascending":e==="desc"?t="descending":e==="mixed"?t="other":t="none",t}function Ioe(e){return parseInt(e.getAttribute("aria-posinset"),10)}function Doe(e){return e.getAttribute("aria-label")}function $n(e,t){ki(e,"label",t)}function Sl(e,t){ki(e,"labelledby",t)}function _v(e,t){ki(e,"describedby",t)}function zV(e,t){ki(e,"live",t)}function Aoe(e,t){ki(e,"atomic",t)}function Loe(e,t){ki(e,"relevant",t)}function bg(e,t){ki(e,"level",t)}function TC(e,t){ki(e,"disabled",t)}function GP(e,t){ki(e,"hidden",t)}function WV(e,t){ki(e,"activedescendant",t)}function ws(e,t){Ni(e,"expanded",t)}function _V(e){$P(e,"expanded")}function Uv(e,t){Ni(e,"setsize",t)}function jv(e,t){Ni(e,"posinset",t)}function Ooe(e,t){Ni(e,"multiselectable",t)}function UV(e,t){Ni(e,"rowcount",t)}function VP(e,t){Ni(e,"rowindex",t)}function jV(e,t){Ni(e,"colcount",t)}function HP(e,t){Ni(e,"colindex",t)}function KV(e,t){Ni(e,"colspan",t)}function qV(e,t){Ni(e,"sort",t)}function XV(e){$P(e,"sort")}function zp(e,t){ki(e,"selected",t)}function YV(e,t){Ni(e,"checked",t===void 0?"mixed":t)}function zP(e,t){ki(e,"controls",t.id),Sl(t,e.id)}function WP(e,t){return t===void 0?e("ariaIndeterminate","indeterminate"):t===!0?e("ariaChecked","checked"):e("ariaUnchecked","unchecked")}var aS,lS,cS,uS,dS,AR,LR,hS;function Yc(){return aS===void 0&&(aS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),aS}function QV(){if(lS===void 0){const e=window;lS=!!e.chrome&&(!!e.chrome.webstore||!!e.chrome.runtime)||/Chrome/.test(navigator.userAgent)&&/Google Inc/.test(navigator.vendor)}return lS}function ZV(){return cS===void 0&&(cS=/(firefox)/i.test(navigator.userAgent)),cS}function JV(){return uS===void 0&&(uS=/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)),uS}function fl(){return dS===void 0&&(dS=/iPad|iPhone|iPod/.test(navigator.platform)||navigator.platform==="MacIntel"&&navigator.maxTouchPoints>1),dS}function OR(e){if(!e)return null;const t=e.tabIndex,n=e.getAttribute("tabIndex");return t===-1&&(n===null||n===""&&!ZV())?null:t.toString()}function koe(){if(hS!==void 0)return hS;if(!document.body)return-1;let e=1e6;const t=ZV()?6e6:1e9,n=document.createElement("div");for(document.body.appendChild(n);;){const r=e*2;if(n.style.height=r+"px",r>t||n.clientHeight!==r)break;e=r}return document.body.removeChild(n),hS=e,e}function Noe(){return LR==null&&eH(),LR}function eH(){const e=document.body,t=document.createElement("div");t.style.width=t.style.height="100px",t.style.opacity="0",t.style.overflow="scroll",t.style.msOverflowStyle="scrollbar",t.style.position="absolute",e.appendChild(t);let n=t.offsetWidth-t.clientWidth;n===0&&t.clientWidth===0&&(n=null),t.parentNode&&t.parentNode.removeChild(t),n!=null&&(LR=n,AR=n===0)}function tH(){return AR==null&&eH(),AR}var im;function MC(e,t,n){const r=e.parentElement;let s=r&&r.firstChild;for(;s;)t&&s.classList.toggle(t,s===e),n&&s.classList.toggle(n,s!==e),s=s.nextSibling}var Boe="[tabindex], input, select, button, textarea, [href]",nH="[disabled], .ag-disabled:not(.ag-button), .ag-disabled *";function _P(e){const t=Element.prototype.matches||Element.prototype.msMatchesSelector,r=t.call(e,"input, select, button, textarea"),s=t.call(e,nH),i=us(e);return r&&!s&&i}function dt(e,t,n={}){const{skipAriaHidden:r}=n;e.classList.toggle("ag-hidden",!t),r||GP(e,!t)}function rH(e,t,n={}){const{skipAriaHidden:r}=n;e.classList.toggle("ag-invisible",!t),r||GP(e,!t)}function xi(e,t){const n="disabled",r=t?s=>s.setAttribute(n,""):s=>s.removeAttribute(n);r(e),cH(e.querySelectorAll("input"),s=>r(s))}function bc(e,t,n){let r=0;for(;e;){if(e.classList.contains(t))return!0;if(e=e.parentElement,typeof n=="number"){if(++r>n)break}else if(e===n)break}return!1}function Qc(e){const{height:t,width:n,borderTopWidth:r,borderRightWidth:s,borderBottomWidth:i,borderLeftWidth:o,paddingTop:a,paddingRight:l,paddingBottom:c,paddingLeft:u,marginTop:h,marginRight:g,marginBottom:m,marginLeft:C,boxSizing:v}=window.getComputedStyle(e);return{height:parseFloat(t||"0"),width:parseFloat(n||"0"),borderTopWidth:parseFloat(r||"0"),borderRightWidth:parseFloat(s||"0"),borderBottomWidth:parseFloat(i||"0"),borderLeftWidth:parseFloat(o||"0"),paddingTop:parseFloat(a||"0"),paddingRight:parseFloat(l||"0"),paddingBottom:parseFloat(c||"0"),paddingLeft:parseFloat(u||"0"),marginTop:parseFloat(h||"0"),marginRight:parseFloat(g||"0"),marginBottom:parseFloat(m||"0"),marginLeft:parseFloat(C||"0"),boxSizing:v}}function Kv(e){const t=Qc(e);return t.boxSizing==="border-box"?t.height-t.paddingTop-t.paddingBottom:t.height}function cd(e){const t=Qc(e);return t.boxSizing==="border-box"?t.width-t.paddingLeft-t.paddingRight:t.width}function qv(e){const{height:t,marginBottom:n,marginTop:r}=Qc(e);return Math.floor(t+n+r)}function Lc(e){const{width:t,marginLeft:n,marginRight:r}=Qc(e);return Math.floor(t+n+r)}function sH(e){const t=e.getBoundingClientRect(),{borderTopWidth:n,borderLeftWidth:r,borderRightWidth:s,borderBottomWidth:i}=Qc(e);return{top:t.top+(n||0),left:t.left+(r||0),right:t.right+(s||0),bottom:t.bottom+(i||0)}}function IC(){if(typeof im=="boolean")return im;const e=document.createElement("div");return e.style.direction="rtl",e.style.width="1px",e.style.height="1px",e.style.position="fixed",e.style.top="0px",e.style.overflow="hidden",e.dir="rtl",e.innerHTML=`
`,document.body.appendChild(e),e.scrollLeft=1,im=Math.floor(e.scrollLeft)===0,document.body.removeChild(e),im}function DC(e,t){let n=e.scrollLeft;return t&&(n=Math.abs(n),QV()&&!IC()&&(n=e.scrollWidth-e.getBoundingClientRect().width-n)),n}function AC(e,t,n){n&&(IC()?t*=-1:(Yc()||QV())&&(t=e.scrollWidth-e.getBoundingClientRect().width-t)),e.scrollLeft=t}function ln(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}function er(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function iH(e){return!!e.offsetParent}function us(e){const t=e;return t.checkVisibility?t.checkVisibility({checkVisibilityCSS:!0}):!(!iH(e)||window.getComputedStyle(e).visibility!=="visible")}function Cs(e){const t=document.createElement("div");return t.innerHTML=(e||"").trim(),t.firstChild}function oH(e,t,n){n&&n.nextSibling===t||(n?n.nextSibling?e.insertBefore(t,n.nextSibling):e.appendChild(t):e.firstChild&&e.firstChild!==t&&e.insertAdjacentElement("afterbegin",t))}function aH(e,t){for(let n=0;n`-${t.toLocaleLowerCase()}`)}function lH(e,t){if(t)for(const[n,r]of Object.entries(t)){if(!n||!n.length||r==null)continue;const s=Goe(n),i=r.toString(),o=i.replace(/\s*!important/g,""),a=o.length!=i.length?"important":void 0;e.style.setProperty(s,o,a)}}function Voe(e){return e.clientWidtht.push(n)),t}function Woe(e,t){if(e)for(let n=0;n{const r=n.getGui();r!=null&&(typeof r=="object"?t.appendChild(r):t.innerHTML=r)})}function di(e,t,n){const s=yH(e).ResizeObserver,i=s?new s(n):null;return i==null||i.observe(t),()=>i==null?void 0:i.disconnect()}function hr(e){return e==null||e===""?null:e}function $e(e){return e!=null&&e!==""}function rn(e){return!$e(e)}function Ws(e){return e!=null&&typeof e.toString=="function"?e.toString():null}function ud(e,t){const n=e?JSON.stringify(e):null,r=t?JSON.stringify(t):null;return n===r}function $m(e,t,n=!1){const r=e==null,s=t==null;if(e&&e.toNumber&&(e=e.toNumber()),t&&t.toNumber&&(t=t.toNumber()),r&&s)return 0;if(r)return-1;if(s)return 1;function i(o,a){return o>a?1:oconsole.warn("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}function Yu(e,...t){jP(()=>console.error("AG Grid: "+e,...t),e+(t==null?void 0:t.join("")))}var pS=[],gS=!1;function NL(e){pS.push(e),!gS&&(gS=!0,window.setTimeout(()=>{const t=pS.slice();pS.length=0,gS=!1,t.forEach(n=>n())},0))}function Fr(e,t,n){let r;return function(...s){const i=this;window.clearTimeout(r),r=window.setTimeout(function(){e.isAlive()&&t.apply(i,s)},n)}}function BL(e,t){let n=0;return function(...r){const s=this,i=new Date().getTime();i-n{const l=new Date().getTime()-s>n;(e()||l)&&(t(),o=!0,i!=null&&(window.clearInterval(i),i=null))};a(),o||(i=window.setInterval(a,10))}var bt="33.0.4",$L=2e3,GL=100,pH="_version_",Gm=null,dd=`${dH}/javascript-data-grid`;function _oe(e){Gm=e}function Uoe(e){dd=e}function gH(e,t,n){return(Gm==null?void 0:Gm.getConsoleMessage(e,t))??[Xoe(e,t,n)]}function KP(e,t,n,r){e(`error #${t}`,...gH(t,n,r))}function joe(e){if(!e)return String(e);const t={};for(const n of Object.keys(e))typeof e[n]!="object"&&typeof e[n]!="function"&&(t[n]=e[n]);return JSON.stringify(t)}function Koe(e){let t=e;return e instanceof Error?t=e.toString():typeof e=="object"&&(t=joe(e)),t}function OC(e){return e===void 0?"undefined":e===null?"null":e}function kR(e,t){return`${e}?${t.toString()}`}function qoe(e,t,n){const r=Array.from(t.entries()).sort((i,o)=>o[1].length-i[1].length);let s=kR(e,t);for(const[i,o]of r){if(i===pH)continue;const a=s.length-n;if(a<=0)break;const l="...",c=a+l.length,u=o.length-c>GL?o.slice(0,o.length-c)+l:o.slice(0,GL)+l;t.set(i,u),s=kR(e,t)}return s}function fH(e,t){const n=new URLSearchParams;n.append(pH,bt),t&&Object.entries(t).forEach(([i,o])=>{n.append(i,Koe(o))});const r=`${dd}/errors/${e}`,s=kR(r,n);return s.length<=$L?s:qoe(r,n,$L)}var Xoe=(e,t,n)=>{const r=fH(e,t);return`${n?n+` `:""}Visit ${r}${n?"":` Alternatively register the ValidationModule to see the full message in the console.`}`};function ye(...e){KP(Eo,e[0],e[1])}function Wt(...e){KP(Yu,e[0],e[1])}function NR(e,t,n){KP(Yu,e,t,n)}function mH(e,t){const n=t[0];return`error #${n} `+gH(n,t[1],e).join(" ")}function Mi(...e){return mH(void 0,e)}function CH(...e){return mH(` `,e)}function vH(e,t){return e.get("rowModelType")===t}function Tn(e,t){return vH(e,"clientSide")}function Hr(e,t){return vH(e,"serverSide")}function Vr(e,t){return e.get("domLayout")===t}function ci(e){return gd(e)!==void 0}function qP(e){return typeof e.get("getRowHeight")=="function"}function Yoe(e,t){return t?!e.get("enableStrictPivotColumnOrder"):e.get("maintainColumnOrder")}function ls(e,t,n=!1,r){const{gos:s,environment:i}=e;if(r==null&&(r=i.getDefaultRowHeight()),qP(s)){if(n)return{height:r,estimated:!0};const l={node:t,data:t.data},c=s.getCallback("getRowHeight")(l);if(BR(c))return c===0&&ye(23),{height:Math.max(1,c),estimated:!1}}if(t.detail&&s.get("masterDetail"))return Qoe(s);const o=s.get("rowHeight");return{height:o&&BR(o)?o:r,estimated:!1}}function Qoe(e){if(e.get("detailRowAutoHeight"))return{height:1,estimated:!1};const t=e.get("detailRowHeight");return BR(t)?{height:t,estimated:!1}:{height:300,estimated:!1}}function _s(e){const{environment:t,gos:n}=e,r=n.get("rowHeight");if(!r||rn(r))return t.getDefaultRowHeight();const s=t.refreshRowHeightVariable();return s!==-1?s:(ye(24),t.getDefaultRowHeight())}function BR(e){return!isNaN(e)&&typeof e=="number"&&isFinite(e)}function kC(e,t,n){const r=t[e.getDomDataKey()];return r?r[n]:void 0}function Oc(e,t,n,r){const s=e.getDomDataKey();let i=t[s];rn(i)&&(i={},t[s]=i),i[n]=r}function Cn(e){const{gos:t,eGridDiv:n}=e;let r=null;const s=t.get("getDocument");return s&&$e(s)?r=s():n&&(r=n.ownerDocument),r&&$e(r)?r:document}function yH(e){return Cn(e).defaultView||window}function hd(e){return e.eGridDiv.getRootNode()}function en(e){return hd(e).activeElement}function Yv(e){let t=null,n=null;try{t=Cn(e).fullscreenElement}catch{}finally{t||(t=hd(e));const r=t.querySelector("body");r?n=r:t instanceof ShadowRoot?n=t:t instanceof Document?n=t==null?void 0:t.documentElement:n=t}return n}function Zoe(e){const t=Yv(e);return(t==null?void 0:t.clientWidth)??(window.innerHeight||-1)}function Joe(e){const t=Yv(e);return(t==null?void 0:t.clientHeight)??(window.innerHeight||-1)}function $R(e,t,n){const s=e.getBoundingClientRect().height,i=Zoe(n)-2,o=Joe(n)-2;if(!e.offsetParent)return;const l=sH(e.offsetParent),{clientY:c,clientX:u}=t;let h=c-l.top-s/2,g=u-l.left-10;const m=Cn(n),C=m.defaultView||window,v=C.pageYOffset||m.documentElement.scrollTop,b=C.pageXOffset||m.documentElement.scrollLeft;i>0&&g+e.clientWidth>i+b&&(g=i+b-e.clientWidth),g<0&&(g=0),o>0&&h+e.clientHeight>o+v&&(h=o+v-e.clientHeight),h<0&&(h=0),e.style.left=`${g}px`,e.style.top=`${h}px`}function Rl(e){const t=Cn(e),n=en(e);return n===null||n===t.body}function Qu(e){return e.get("ensureDomOrder")?!1:e.get("animateRows")}function Qv(e){return!(e.get("paginateChildRows")||e.get("groupHideOpenParents")||Vr(e,"print"))}function Yi(e){const t=e.get("autoGroupColumnDef");return!(t!=null&&t.comparator)&&!e.get("treeData")}function Wp(e){const t=e.get("groupAggFiltering");if(typeof t=="function")return e.getCallback("groupAggFiltering");if(t===!0)return()=>!0}function Zv(e){return e.get("grandTotalRow")}function pd(e){const t=e.get("groupTotalRow");return typeof t=="function"?e.getCallback("groupTotalRow"):()=>t??void 0}function XP(e){return e.exists("groupDisplayType")?e.get("groupDisplayType")==="multipleColumns":e.get("groupHideOpenParents")}function Jv(e,t){return t?!1:e.get("groupDisplayType")==="groupRows"}function da(e){const t=e.getCallback("getRowId");return t===void 0?t:n=>{let r=t(n);return typeof r!="string"&&(ye(25,{id:r}),r=String(r)),r}}function eae(e,t){const n=e.get("groupHideParentOfSingleChild");return!!(n===!0||n==="leafGroupsOnly"&&t.leafGroup||e.get("groupRemoveSingleChildren")||e.get("groupRemoveLowestSingleChildren")&&t.leafGroup)}function bH(e){const t=e.get("maxConcurrentDatasourceRequests");return t>0?t:void 0}function wH(e,t){const n=e.get("suppressGroupChangesColumnVisibility");if(n===!0||t&&n==="suppressHideOnGroup"||!t&&n==="suppressShowOnUngroup")return!1;const r=e.get("suppressRowGroupHidesColumns");if(t&&r===!0)return!1;const s=e.get("suppressMakeColumnVisibleAfterUnGroup");return!(!t&&s===!0)}function wc(e){return(e==null?void 0:e.checkboxes)??!0}function Vm(e){return(e==null?void 0:e.mode)==="multiRow"&&(e.headerCheckbox??!0)}function NC(e){if(typeof e=="object")return e.checkboxLocation??"selectionColumn"}function fS(e){return(e==null?void 0:e.hideDisabledCheckboxes)??!1}function YP(e){return typeof e.get("rowSelection")!="string"}function tae(e){return e.get("cellSelection")!==void 0}function om(e){const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"?(t==null?void 0:t.suppressMultiRanges)??!1:!1:e.get("suppressMultiRangeSelection")}function vs(e){const t=e.get("cellSelection");return t!==void 0?!!t:e.get("enableRangeSelection")}function mS(e){var r;const t=e.get("cellSelection");return t!==void 0?typeof t!="boolean"&&((r=t.handle)==null?void 0:r.mode)==="fill"?t.handle:void 0:{mode:"fill",setFillValue:e.get("fillOperation"),direction:e.get("fillHandleDirection"),suppressClearOnFillReduction:e.get("suppressClearOnFillReduction")}}function SH(e){const t=e.get("rowSelection")??"single";if(typeof t=="string"){const n=e.get("suppressRowClickSelection"),r=e.get("suppressRowDeselection");return n&&r?!1:n?"enableDeselection":r?"enableSelection":!0}return t.mode==="singleRow"||t.mode==="multiRow"?t.enableClickSelection??!1:!1}function nae(e){const t=SH(e);return t===!0||t==="enableSelection"}function VL(e){const t=SH(e);return t===!0||t==="enableDeselection"}function GR(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("isRowSelectable"):t==null?void 0:t.isRowSelectable}function gd(e){const t=e.get("rowSelection");if(typeof t=="string")switch(t){case"multiple":return"multiRow";case"single":return"singleRow";default:return}switch(t==null?void 0:t.mode){case"multiRow":case"singleRow":return t.mode;default:return}}function El(e){return gd(e)==="multiRow"}function rae(e){const t=e.get("rowSelection");return typeof t=="string"?e.get("rowMultiSelectWithClick"):(t==null?void 0:t.enableSelectionWithoutKeys)??!1}function BC(e){const t=e.get("rowSelection");if(typeof t=="string"){const n=e.get("groupSelectsChildren"),r=e.get("groupSelectsFiltered");return n&&r?"filteredDescendants":n?"descendants":"self"}return(t==null?void 0:t.mode)==="multiRow"?t.groupSelects:void 0}function xH(e,t=!0){const n=e.get("rowSelection");return typeof n!="object"?t?"all":void 0:n.mode==="multiRow"?n.selectAll:"all"}function kc(e){const t=BC(e);return t==="descendants"||t==="filteredDescendants"}function CS(e){return e.isModuleRegistered("SetFilter")&&!e.get("suppressSetFilterByDefault")}function Gr(e){return e.get("columnMenu")==="legacy"}function RH(e){return!Gr(e)}function EH(e){return!e||e.length<2?e:"on"+e[0].toUpperCase()+e.substring(1)}function sae(e,t,n){typeof e!="object"&&(e={});const r={...e};return n.forEach(s=>{const i=t[s];typeof i<"u"&&(r[s]=i)}),r}function iae(e,t){if(!e)return;const n={};let r=!1;if(Object.keys(e).forEach(o=>{n[o]=e[o],r=!0}),!r)return;const s={type:"gridOptionsChanged",options:n};t.dispatchEvent(s);const i={type:"componentStateChanged",...n};t.dispatchEvent(i)}var PH="__ag_Grid_Stop_Propagation",oae=["touchstart","touchend","touchmove","touchcancel","scroll"],aae=["wheel"],vS={};function sr(e){e[PH]=!0}function ui(e){return e[PH]===!0}var FH=(()=>{const e={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return n=>{if(typeof vS[n]=="boolean")return vS[n];const r=document.createElement(e[n]||"div");return n="on"+n,vS[n]=n in r}})();function TH(e,t,n){let r=t;for(;r;){const s=kC(e,r,n);if(s)return s;r=r.parentElement}return null}function VR(e,t){return!t||!e?!1:cae(t).indexOf(e)>=0}function lae(e){const t=[];let n=e.target;for(;n;)t.push(n),n=n.parentElement;return t}function cae(e){const t=e;return t.path?t.path:t.composedPath?t.composedPath():lae(t)}function uae(e,t,n,r){const s=MH(n);let i;s!=null&&(i={passive:s}),e&&e.addEventListener&&e.addEventListener(t,n,r,i)}var MH=e=>{const t=oae.includes(e),n=aae.includes(e);if(t)return!0;if(n)return!1},be=class{constructor(){this.destroyFunctions=[],this.destroyed=!1,this.__v_skip=!0,this.propertyListenerId=0,this.lastChangeSetIdLookup={},this.isAlive=()=>!this.destroyed}preWireBeans(e){this.beans=e,this.stubContext=e.context,this.eventSvc=e.eventSvc,this.gos=e.gos}destroy(){const{destroyFunctions:e}=this;for(let t=0;tnull;e instanceof HTMLElement?uae(this.beans.frameworkOverrides,e,t,n):e.addEventListener(t,n);const r=()=>(e.removeEventListener(t,n),null);return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==r),null)}setupGridOptionListener(e,t){const{gos:n}=this;n.addPropertyEventListener(e,t);const r=()=>(n.removePropertyEventListener(e,t),null);return this.destroyFunctions.push(r),()=>(r(),this.destroyFunctions=this.destroyFunctions.filter(s=>s!==r),null)}addManagedPropertyListener(e,t){return this.destroyed?()=>null:this.setupGridOptionListener(e,t)}addManagedPropertyListeners(e,t){if(this.destroyed)return;const n=e.join("-")+this.propertyListenerId++,r=s=>{if(s.changeSet){if(s.changeSet&&s.changeSet.id===this.lastChangeSetIdLookup[n])return;this.lastChangeSetIdLookup[n]=s.changeSet.id}const i={type:"gridPropertyChanged",changeSet:s.changeSet,source:s.source};t(i)};e.forEach(s=>this.setupGridOptionListener(s,r))}getLocaleTextFunc(){return BP(this.beans.localeSvc)}addDestroyFunc(e){this.isAlive()?this.destroyFunctions.push(e):e()}createOptionalManagedBean(e,t){return e?this.createManagedBean(e,t):void 0}createManagedBean(e,t){const n=this.createBean(e,t);return this.addDestroyFunc(this.destroyBean.bind(this,e,t)),n}createBean(e,t,n){return(t||this.stubContext).createBean(e,n)}destroyBean(e,t){return(t||this.stubContext).destroyBean(e)}destroyBeans(e,t){return(t||this.stubContext).destroyBeans(e)}},IH=new Set(["__proto__","constructor","prototype"]);function dae(e,t){if(e!=null){if(Array.isArray(e)){for(let n=0;n{if(IH.has(s))return;let o=e[s];o!==i&&(r&&o==null&&i!=null&&typeof i=="object"&&i.constructor===Object&&(o={},e[s]=o),HL(i)&&HL(o)&&!Array.isArray(o)?dr(o,i,n,r):(n||i!==void 0)&&(e[s]=i))})}function up(e,t,n){if(!t||!e)return;if(!n)return e[t];const r=t.split(".");let s=e;for(let i=0;i=0&&!r,this.tooltipFieldContainsDots=$e(n)&&n.indexOf(".")>=0&&!r}initMinAndMaxWidths(){const e=this.colDef;this.minWidth=e.minWidth??this.beans.environment.getDefaultColumnMinWidth(),this.maxWidth=e.maxWidth??Number.MAX_SAFE_INTEGER}initTooltip(){var e;(e=this.beans.tooltipSvc)==null||e.initCol(this)}resetActualWidth(e){const t=this.calculateColInitialWidth(this.colDef);this.setActualWidth(t,e,!0)}calculateColInitialWidth(e){let t;const n=e.width,r=e.initialWidth;return n!=null?t=n:r!=null?t=r:t=200,Math.max(Math.min(t,this.maxWidth),this.minWidth)}isEmptyGroup(){return!1}isRowGroupDisplayed(e){var t;return((t=this.beans.showRowGroupCols)==null?void 0:t.isRowGroupDisplayed(this,e))??!1}isPrimary(){return this.primary}isFilterAllowed(){return!!this.colDef.filter}isFieldContainsDots(){return this.fieldContainsDots}isTooltipEnabled(){return this.tooltipEnabled}isTooltipFieldContainsDots(){return this.tooltipFieldContainsDots}getHighlighted(){return this.highlighted}addEventListener(e,t){var r,s,i;this.frameworkEventListenerService=(s=(r=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:s.call(r,this.frameworkEventListenerService,this.colEventSvc);const n=((i=this.frameworkEventListenerService)==null?void 0:i.wrap(t))??t;this.colEventSvc.addEventListener(e,n)}removeEventListener(e,t){var r;const n=((r=this.frameworkEventListenerService)==null?void 0:r.unwrap(t))??t;this.colEventSvc.removeEventListener(e,n)}createColumnFunctionCallbackParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,column:this,colDef:this.colDef})}isSuppressNavigable(e){var t;return((t=this.beans.cellNavigation)==null?void 0:t.isSuppressNavigable(this,e))??!1}isCellEditable(e){var t;return((t=this.beans.editSvc)==null?void 0:t.isCellEditable(this,e))??!1}isSuppressFillHandle(){return!!this.colDef.suppressFillHandle}isAutoHeight(){return!!this.colDef.autoHeight}isAutoHeaderHeight(){return!!this.colDef.autoHeaderHeight}isRowDrag(e){return this.isColumnFunc(e,this.colDef.rowDrag)}isDndSource(e){return this.isColumnFunc(e,this.colDef.dndSource)}isCellCheckboxSelection(e){var t;return((t=this.beans.selectionSvc)==null?void 0:t.isCellCheckboxSelection(this,e))??!1}isSuppressPaste(e){var t;return this.isColumnFunc(e,((t=this.colDef)==null?void 0:t.suppressPaste)??null)}isResizable(){return!!this.getColDefValue("resizable")}getColDefValue(e){return this.colDef[e]??hae[e]}isColumnFunc(e,t){if(typeof t=="boolean")return t;if(typeof t=="function"){const n=this.createColumnFunctionCallbackParams(e);return t(n)}return!1}createColumnEvent(e,t){return this.gos.addGridCommonParams({type:e,column:this,columns:[this],source:t})}isMoving(){return this.moving}getSort(){return this.sort}isSortable(){return!!this.getColDefValue("sortable")}isSortAscending(){return this.sort==="asc"}isSortDescending(){return this.sort==="desc"}isSortNone(){return rn(this.sort)}isSorting(){return $e(this.sort)}getSortIndex(){return this.sortIndex}isMenuVisible(){return this.menuVisible}getAggFunc(){return this.aggFunc}getLeft(){return this.left}getOldLeft(){return this.oldLeft}getRight(){return this.left+this.actualWidth}setLeft(e,t){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchColEvent("leftChanged",t))}isFilterActive(){return this.filterActive}isHovered(){var e;return ye(261),!!((e=this.beans.colHover)!=null&&e.isHovered(this))}setFirstRightPinned(e,t){this.firstRightPinned!==e&&(this.firstRightPinned=e,this.dispatchColEvent("firstRightPinnedChanged",t))}setLastLeftPinned(e,t){this.lastLeftPinned!==e&&(this.lastLeftPinned=e,this.dispatchColEvent("lastLeftPinnedChanged",t))}isFirstRightPinned(){return this.firstRightPinned}isLastLeftPinned(){return this.lastLeftPinned}isPinned(){return this.pinned==="left"||this.pinned==="right"}isPinnedLeft(){return this.pinned==="left"}isPinnedRight(){return this.pinned==="right"}getPinned(){return this.pinned}setVisible(e,t){const n=e===!0;this.visible!==n&&(this.visible=n,this.dispatchColEvent("visibleChanged",t)),this.dispatchStateUpdatedEvent("hide")}isVisible(){return this.visible}isSpanHeaderHeight(){return!this.getColDef().suppressSpanHeaderHeight}getColumnGroupPaddingInfo(){let e=this.getParent();if(!e||!e.isPadding())return{numberOfParents:0,isSpanningTotal:!1};const t=e.getPaddingLevel()+1;let n=!0;for(;e;){if(!e.isPadding()){n=!1;break}e=e.getParent()}return{numberOfParents:t,isSpanningTotal:n}}getColDef(){return this.colDef}getDefinition(){return this.colDef}getColumnGroupShow(){return this.colDef.columnGroupShow}getColId(){return this.colId}getId(){return this.colId}getUniqueId(){return this.colId}getActualWidth(){return this.actualWidth}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}createBaseColDefParams(e){return this.gos.addGridCommonParams({node:e,data:e.data,colDef:this.colDef,column:this})}getColSpan(e){if(rn(this.colDef.colSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.colSpan(t);return Math.max(n,1)}getRowSpan(e){if(rn(this.colDef.rowSpan))return 1;const t=this.createBaseColDefParams(e),n=this.colDef.rowSpan(t);return Math.max(n,1)}setActualWidth(e,t,n=!1){e=Math.max(e,this.minWidth),e=Math.min(e,this.maxWidth),this.actualWidth!==e&&(this.actualWidth=e,this.flex&&t!=="flex"&&t!=="gridInitializing"&&(this.flex=null),n||this.fireColumnWidthChangedEvent(t)),this.dispatchStateUpdatedEvent("width")}fireColumnWidthChangedEvent(e){this.dispatchColEvent("widthChanged",e)}isGreaterThanMax(e){return e>this.maxWidth}getMinWidth(){return this.minWidth}getMaxWidth(){return this.maxWidth}getFlex(){return this.flex}isRowGroupActive(){return this.rowGroupActive}isPivotActive(){return this.pivotActive}isAnyFunctionActive(){return this.isPivotActive()||this.isRowGroupActive()||this.isValueActive()}isAnyFunctionAllowed(){return this.isAllowPivot()||this.isAllowRowGroup()||this.isAllowValue()}isValueActive(){return this.aggregationActive}isAllowPivot(){return this.colDef.enablePivot===!0}isAllowValue(){return this.colDef.enableValue===!0}isAllowRowGroup(){return this.colDef.enableRowGroup===!0}dispatchColEvent(e,t,n){const r=this.createColumnEvent(e,t);n&&dr(r,n),this.colEventSvc.dispatchEvent(r)}dispatchStateUpdatedEvent(e){this.colEventSvc.dispatchEvent({type:"columnStateUpdated",key:e})}};function Un(e){return e instanceof dp}var dp=class extends be{constructor(e,t,n,r){super(),this.colGroupDef=e,this.groupId=t,this.padding=n,this.level=r,this.isColumn=!1,this.expandable=!1,this.instanceId=DH(),this.expandableListenerRemoveCallback=null,this.expanded=!!(e!=null&&e.openByDefault)}destroy(){this.expandableListenerRemoveCallback&&this.reset(null,void 0),super.destroy()}reset(e,t){this.colGroupDef=e,this.level=t,this.originalParent=null,this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback(),this.children=void 0,this.expandable=void 0}getInstanceId(){return this.instanceId}getOriginalParent(){return this.originalParent}getLevel(){return this.level}isVisible(){return this.children?this.children.some(e=>e.isVisible()):!1}isPadding(){return this.padding}setExpanded(e){this.expanded=e===void 0?!1:e,this.dispatchLocalEvent({type:"expandedChanged"})}isExpandable(){return this.expandable}isExpanded(){return this.expanded}getGroupId(){return this.groupId}getId(){return this.getGroupId()}setChildren(e){this.children=e}getChildren(){return this.children}getColGroupDef(){return this.colGroupDef}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}addLeafColumns(e){this.children&&this.children.forEach(t=>{Do(t)?e.push(t):Un(t)&&t.addLeafColumns(e)})}getColumnGroupShow(){const e=this.colGroupDef;if(e)return e.columnGroupShow}setupExpandable(){this.setExpandable(),this.expandableListenerRemoveCallback&&this.expandableListenerRemoveCallback();const e=this.onColumnVisibilityChanged.bind(this);this.getLeafColumns().forEach(t=>t.addEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=()=>{this.getLeafColumns().forEach(t=>t.removeEventListener("visibleChanged",e)),this.expandableListenerRemoveCallback=null}}setExpandable(){if(this.isPadding())return;let e=!1,t=!1,n=!1;const r=this.findChildrenRemovingPadding();for(let i=0,o=r.length;i{n.forEach(r=>{Un(r)&&r.isPadding()?t(r.children):e.push(r)})};return t(this.children),e}onColumnVisibilityChanged(){this.setExpandable()}},gae={numericColumn:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"},rightAligned:{headerClass:"ag-right-aligned-header",cellClass:"ag-right-aligned-cell"}},fae=class{constructor(){this.existingKeys={}}addExistingKeys(e){for(let t=0;tn?n(r,t[s]):t[s]===r)}function mae(e){return e.sort((t,n)=>t-n)}function zr(e,t){const n=e.indexOf(t);n>=0&&e.splice(n,1)}function zL(e,t,n){for(let r=0;r=0;r--)e.splice(n,0,t[r])}function AH(e,t){const n=[],r=[],s=[];return e.forEach(o=>{const a=o.getColDef().lockPosition;a==="right"?s.push(o):a==="left"||a===!0?n.push(o):r.push(o)}),t.get("enableRtl")?[...s,...r,...n]:[...n,...r,...s]}function LH(e,t){let n=!0;return oa(null,t,r=>{if(!Un(r))return;const s=r,i=s.getColGroupDef();if(!(i&&i.marryChildren))return;const a=[];s.getLeafColumns().forEach(g=>{const m=e.indexOf(g);a.push(m)});const l=Math.max.apply(Math,a),c=Math.min.apply(Math,a),u=l-c,h=s.getLeafColumns().length-1;u>h&&(n=!1)}),n}function OH(e,t){if(!e||e.length==0)return;const n=t(e[0]);for(let r=1;ri.getPinned());e.dispatchEvent({type:"columnPinned",pinned:s??null,columns:t,column:r,source:n})}function Cae(e,t,n){if(!t.length)return;const r=t.length===1?t[0]:null,s=OH(t,i=>i.isVisible());e.dispatchEvent({type:"columnVisible",visible:s,columns:t,column:r,source:n})}function NH(e,t,n,r){e.dispatchEvent({type:t,columns:n,column:n&&n.length==1?n[0]:null,source:r})}function fd(e,t,n,r,s=null){t!=null&&t.length&&e.dispatchEvent({type:"columnResized",columns:t,column:t.length===1?t[0]:null,flexColumns:s,finished:n,source:r})}function Us(e,t,n){var P;const{colModel:r,rowGroupColsSvc:s,pivotColsSvc:i,autoColSvc:o,selectionColSvc:a,colAnimation:l,visibleCols:c,pivotResultCols:u,environment:h,valueColsSvc:g,eventSvc:m,gos:C}=e,v=r.getColDefCols()||[];if(!(v!=null&&v.length))return!1;if(t!=null&&t.state&&!t.state.forEach)return ye(32),!1;const b=(F,M,E,I,A)=>{if(!F)return;const L=Sae(M,t.defaultState),D=L("flex").value1;if(KH(e,F,L("hide").value1,L("sort").value1,L("sortIndex").value1,L("pinned").value1,D,n),D==null){const N=L("width").value1;if(N!=null){const k=F.getColDef().minWidth??h.getDefaultColumnMinWidth();k!=null&&N>=k&&F.setActualWidth(N,n)}}A||!F.isPrimary()||(g==null||g.syncColumnWithState(F,n,L),s==null||s.syncColumnWithState(F,n,L,E),i==null||i.syncColumnWithState(F,n,L,I))},w=(F,M,E)=>{var j,H;const I=$H(e,n),A=M.slice(),L={},D={},N=[],k=[],G=[];let $=0;const _=(s==null?void 0:s.columns.slice())??[],U=(i==null?void 0:i.columns.slice())??[];F.forEach(B=>{const Y=B.colId;if(Y.startsWith(Pl)){N.push(B),G.push(B);return}if(Po(Y)){k.push(B),G.push(B);return}const te=E(Y);te?(b(te,B,L,D,!1),zr(A,te)):(G.push(B),$+=1)});const V=B=>b(B,null,L,D,!1);A.forEach(V),s==null||s.sortColumns(WL.bind(s,L,_)),i==null||i.sortColumns(WL.bind(i,D,U)),r.refreshCols(!1);const W=(B,Y,J=[])=>{Y.forEach(te=>{const Z=B(te.colId);zr(J,Z),b(Z,te,null,null,!0)}),J.forEach(V)};return W(B=>(o==null?void 0:o.getAutoCol(B))??null,N,(j=o==null?void 0:o.getAutoCols())==null?void 0:j.slice()),W(B=>(a==null?void 0:a.getSelectionCol(B))??null,k,(H=a==null?void 0:a.getSelectionCols())==null?void 0:H.slice()),vae(t,r,C),c.refresh(n),m.dispatchEvent({type:"columnEverythingChanged",source:n}),I(),{unmatchedAndAutoStates:G,unmatchedCount:$}};l==null||l.start();let{unmatchedAndAutoStates:S,unmatchedCount:x}=w(t.state||[],v,F=>r.getColDefCol(F));if(S.length>0||$e(t.defaultState)){const F=((P=u==null?void 0:u.getPivotResultCols())==null?void 0:P.list)??[];x=w(S,F,M=>(u==null?void 0:u.getPivotResultCol(M))??null).unmatchedCount}return l==null||l.finish(),x===0}function BH(e,t){const{colModel:n,autoColSvc:r}=e,s=n.getColDefCols();if(!(s!=null&&s.length))return;const i=n.getColDefColTree(),o=QP(i),a=[];let l=1e3,c=1e3,u=[];const h=r==null?void 0:r.getAutoCols();h&&(u=u.concat(h)),o&&(u=u.concat(o)),u.forEach(g=>{const m=GH(g);rn(m.rowGroupIndex)&&m.rowGroup&&(m.rowGroupIndex=l++),rn(m.pivotIndex)&&m.pivot&&(m.pivotIndex=c++),a.push(m)}),Us(e,{state:a,applyOrder:!0},t)}function $H(e,t){const{rowGroupColsSvc:n,pivotColsSvc:r,valueColsSvc:s,colModel:i,sortSvc:o,eventSvc:a}=e,l={rowGroupColumns:(n==null?void 0:n.columns.slice())??[],pivotColumns:(r==null?void 0:r.columns.slice())??[],valueColumns:(s==null?void 0:s.columns.slice())??[]},c=_p(e),u={};return c.forEach(h=>{u[h.colId]=h}),()=>{const h=i.getAllCols(),g=(E,I,A,L)=>{const D=I.map(L),N=A.map(L);if(Kr(D,N))return;const G=new Set(I);A.forEach(_=>{G.delete(_)||G.add(_)});const $=[...G];a.dispatchEvent({type:E,columns:$,column:$.length===1?$[0]:null,source:t})},m=E=>{const I=[];return h.forEach(A=>{const L=u[A.getColId()];L&&E(L,A)&&I.push(A)}),I},C=E=>E.getColId();g("columnRowGroupChanged",l.rowGroupColumns,(n==null?void 0:n.columns)??[],C),g("columnPivotChanged",l.pivotColumns,(r==null?void 0:r.columns)??[],C);const b=m((E,I)=>{const A=E.aggFunc!=null,L=A!=I.isValueActive(),D=A&&E.aggFunc!=I.getAggFunc();return L||D});b.length>0&&NH(a,"columnValueChanged",b,t),fd(a,m((E,I)=>E.width!=I.getActualWidth()),!0,t),kH(a,m((E,I)=>E.pinned!=I.getPinned()),t),Cae(a,m((E,I)=>E.hide==I.isVisible()),t);const F=m((E,I)=>E.sort!=I.getSort()||E.sortIndex!=I.getSortIndex());F.length>0&&(o==null||o.dispatchSortChangedEvents(t,F));const M=_p(e);bae(c,M,t,i,a)}}function _p(e){const{colModel:t,rowGroupColsSvc:n,pivotColsSvc:r}=e,s=t.getColDefCols();if(rn(s)||!t.isAlive())return[];const i=t.getAllCols(),o=n==null?void 0:n.columns,a=r==null?void 0:r.columns,l=h=>{const g=h.isRowGroupActive()&&o?o.indexOf(h):null,m=h.isPivotActive()&&a?a.indexOf(h):null,C=h.isValueActive()?h.getAggFunc():null,v=h.getSort()!=null?h.getSort():null,b=h.getSortIndex()!=null?h.getSortIndex():null;return{colId:h.getColId(),width:h.getActualWidth(),hide:!h.isVisible(),pinned:h.getPinned(),sort:v,sortIndex:b,aggFunc:C,rowGroup:h.isRowGroupActive(),rowGroupIndex:g,pivot:h.isPivotActive(),pivotIndex:m,flex:h.getFlex()??null}},c=i.map(h=>l(h)),u=new Map(t.getCols().map((h,g)=>[h.getColId(),g]));return c.sort((h,g)=>{const m=u.has(h.colId)?u.get(h.colId):-1,C=u.has(g.colId)?u.get(g.colId):-1;return m-C}),c}function GH(e){const t=(C,v)=>C??v??null,n=e.getColDef(),r=t(n.sort,n.initialSort),s=t(n.sortIndex,n.initialSortIndex),i=t(n.hide,n.initialHide),o=t(n.pinned,n.initialPinned),a=t(n.width,n.initialWidth),l=t(n.flex,n.initialFlex);let c=t(n.rowGroupIndex,n.initialRowGroupIndex),u=t(n.rowGroup,n.initialRowGroup);c==null&&(u==null||u==!1)&&(c=null,u=null);let h=t(n.pivotIndex,n.initialPivotIndex),g=t(n.pivot,n.initialPivot);h==null&&(g==null||g==!1)&&(h=null,g=null);const m=t(n.aggFunc,n.initialAggFunc);return{colId:e.getColId(),sort:r,sortIndex:s,hide:i,pinned:o,width:a,flex:l,rowGroup:u,rowGroupIndex:c,pivot:g,pivotIndex:h,aggFunc:m}}function vae(e,t,n){if(!e.applyOrder||!e.state)return;const r=[];e.state.forEach(s=>{s.colId!=null&&r.push(s.colId)}),yae(t.cols,r,t,n)}function yae(e,t,n,r){if(e==null)return;let s=[];const i={};t.forEach(a=>{if(i[a])return;const l=e.map[a];l&&(s.push(l),i[a]=!0)});let o=0;if(e.list.forEach(a=>{const l=a.getColId();if(i[l]!=null)return;l.startsWith(Pl)?s.splice(o++,0,a):s.push(a)}),s=AH(s,r),!LH(s,n.getColTree())){ye(39);return}e.list=s}function bae(e,t,n,r,s){const i={};t.forEach(u=>i[u.colId]=u);const o={};e.forEach(u=>{i[u.colId]&&(o[u.colId]=!0)});const a=e.filter(u=>o[u.colId]),l=t.filter(u=>o[u.colId]),c=[];l.forEach((u,h)=>{const g=a&&a[h];if(g&&g.colId!==u.colId){const m=r.getCol(g.colId);m&&c.push(m)}}),c.length&&s.dispatchEvent({type:"columnMoved",columns:c,column:c.length===1?c[0]:null,finished:!0,source:n})}var WL=(e,t,n,r)=>{const s=e[n.getId()],i=e[r.getId()],o=s!=null,a=i!=null;if(o&&a)return s-i;if(o)return-1;if(a)return 1;const l=t.indexOf(n),c=t.indexOf(r),u=l>=0,h=c>=0;return u&&h?l-c:u?-1:1},VH="ag-Grid-SelectionColumn",wae=class extends be{constructor(){super(...arguments),this.beanName="selectionColSvc"}postConstruct(){this.addManagedPropertyListener("rowSelection",e=>{this.onSelectionOptionsChanged(e.currentValue,e.previousValue,Sc(e.source))})}addSelectionCols(e){const t=this.selectionCols;t!=null&&(e.list=t.list.concat(e.list),e.tree=t.tree.concat(e.tree),_H(e))}createSelectionCols(e,t){var g,m;const n=()=>{var C;Fl(this.beans,(C=this.selectionCols)==null?void 0:C.tree),this.selectionCols=null},r=e.treeDepth,i=(((g=this.selectionCols)==null?void 0:g.treeDepth)??-1)==r,o=this.generateSelectionCols();if(WH(o,((m=this.selectionCols)==null?void 0:m.list)??[])&&i)return;n();const{colGroupSvc:l}=this.beans,c=(l==null?void 0:l.findDepth(e.tree))??0,u=(l==null?void 0:l.balanceTreeForAutoCols(o,c))??[];this.selectionCols={list:o,tree:u,treeDepth:c,map:{}},t(C=>{if(!C)return null;const v=C.filter(b=>!Po(b));return[...o,...v]})}isSelectionColumnEnabled(){var o,a;const{gos:e,beans:t}=this,n=e.get("rowSelection");if(typeof n!="object"||!ci(e))return!1;const r=(((a=(o=t.autoColSvc)==null?void 0:o.getAutoCols())==null?void 0:a.length)??0)>0;if(n.checkboxLocation==="autoGroupColumn"&&r)return!1;const s=!!wc(n),i=Vm(n);return s||i}generateSelectionCols(){if(!this.isSelectionColumnEnabled())return[];const{gos:e,validation:t}=this.beans,n=e.get("selectionColumnDef"),s={width:50,resizable:!1,suppressHeaderMenuButton:!0,sortable:!1,suppressMovable:!0,lockPosition:e.get("enableRtl")?"right":"left",comparator(a,l,c,u){const h=c.isSelected(),g=u.isSelected();return h===g?0:h?1:-1},editable:!1,suppressFillHandle:!0,...n,colId:VH},i=s.colId;t==null||t.validateColDef(s,i,!0);const o=new ey(s,null,i,!1);return this.createBean(o),[o]}putSelectionColsFirstInList(e,t){if(!t)return null;const n=t.filter(r=>!Po(r));return[...e,...n]}getSelectionCol(e){var t;return((t=this.selectionCols)==null?void 0:t.list.find(n=>ZP(n,e)))??null}getSelectionCols(){var e;return((e=this.selectionCols)==null?void 0:e.list)??null}onSelectionOptionsChanged(e,t,n){const r=t&&typeof t!="string"?wc(t):void 0,s=e&&typeof e!="string"?wc(e):void 0,i=r!==s,o=t&&typeof t!="string"?Vm(t):void 0,a=e&&typeof e!="string"?Vm(e):void 0,l=o!==a,c=NC(e),u=NC(t);(i||l||c!==u)&&this.beans.colModel.refreshAll(n)}destroy(){var e;Fl(this.beans,(e=this.selectionCols)==null?void 0:e.tree),super.destroy()}refreshVisibility(e){if(!this.isSelectionColumnEnabled())return;const t=this.beans,n=t.visibleCols.getAllTrees()??[];if(n.length!==0){if(!n.some(HH)){const r=_p(t).find(s=>Po(s.colId));r&&Us(t,{state:[{colId:r.colId,hide:!r.hide}]},e)}if(n.length===1){const r=n[0],s=zH(r);if(!s)return;Us(t,{state:[{colId:s.getColId(),hide:!0}]},e)}}}},HH=e=>{var t;return e.isColumn?Po(e):((t=e.getChildren())==null?void 0:t.some(HH))??!1};function zH(e){if(e.isColumn)return Po(e)?e:null;const t=e.getChildren()??[];for(const n of t){const r=zH(n);if(r)return r}return null}var Pl="ag-Grid-AutoColumn";function QP(e){const t=[],n=r=>{for(let s=0;st+n.getActualWidth(),0)}function Fl(e,t,n){const r={};if(!t)return;oa(null,t,i=>{r[i.getInstanceId()]=i}),n&&oa(null,n,i=>{r[i.getInstanceId()]=null});const s=Object.values(r).filter(i=>i!=null);e.context.destroyBeans(s)}function ty(e){return e.getId().startsWith(Pl)}function Po(e){const t=typeof e=="string"?e:"getColId"in e?e.getColId():e.colId;return(t==null?void 0:t.startsWith(VH))??!1}function $C(e){let t=[];return e instanceof Array?t=e:typeof e=="string"&&(t=e.split(",")),t}function WH(e,t){return Kr(e,t,(n,r)=>n.getColId()===r.getColId())}function _H(e){e.map={},e.list.forEach(t=>e.map[t.getId()]=t)}function Sc(e){return e==="gridOptionsUpdated"?"gridOptionsChanged":e}function ZP(e,t){const n=e===t,r=e.getColDef()===t,s=e.getColId()==t;return n||r||s}var Sae=(e,t)=>(n,r)=>{const s={value1:void 0,value2:void 0};let i=!1;return e&&(e[n]!==void 0&&(s.value1=e[n],i=!0),$e(r)&&e[r]!==void 0&&(s.value2=e[r],i=!0)),!i&&t&&(t[n]!==void 0&&(s.value1=t[n]),$e(r)&&t[r]!==void 0&&(s.value2=t[r])),s};function UH(e,t=null,n,r,s){const i=new fae,{existingCols:o,existingGroups:a,existingColKeys:l}=xae(r);i.addExistingKeys(l);const c=jH(e,t,0,n,o,i,a,s),{colGroupSvc:u}=e,h=(u==null?void 0:u.findMaxDepth(c,0))??0,g=u?u.balanceColumnTree(c,0,h,i):c;return oa(null,g,(C,v)=>{Un(C)&&C.setupExpandable(),C.originalParent=v}),{columnTree:g,treeDept:h}}function xae(e){const t=[],n=[],r=[];return e&&oa(null,e,s=>{if(Un(s)){const i=s;n.push(i)}else{const i=s;r.push(i.getId()),t.push(i)}}),{existingCols:t,existingGroups:n,existingColKeys:r}}function jH(e,t,n,r,s,i,o,a){if(!t)return[];const{colGroupSvc:l}=e,c=new Array(t.length);for(let u=0;u0))if(n.width!=null)t.setActualWidth(n.width,r);else{const i=t.getActualWidth();t.setActualWidth(i,r)}}function Eae(e,t){if(t)for(let n=0;n{const o=r[i.trim()];o?dr(n,o,!1,!0):ye(36,{t:i})})}function Tae(e){return e.children!==void 0}function oa(e,t,n){if(t)for(let r=0;rthis.refreshAll(Sc(e.source))),this.addManagedPropertyListeners(["defaultColDef","defaultColGroupDef","columnTypes","suppressFieldDotNotation"],e=>this.recreateColumnDefs(Sc(e.source))),this.addManagedPropertyListener("pivotMode",e=>this.setPivotMode(this.gos.get("pivotMode"),Sc(e.source)))}createColsFromColDefs(e){var S,x,P;const{beans:t}=this,{valueCache:n,colAutosize:r,rowGroupColsSvc:s,pivotColsSvc:i,valueColsSvc:o,visibleCols:a,colViewport:l,eventSvc:c}=t,u=this.colDefs?$H(t,e):void 0;n==null||n.expire();const h=(S=this.colDefCols)==null?void 0:S.list,g=(x=this.colDefCols)==null?void 0:x.tree,m=UH(t,this.colDefs,!0,g,e);Fl(t,(P=this.colDefCols)==null?void 0:P.tree,m.columnTree);const C=m.columnTree,v=m.treeDept,b=QP(C),w={};b.forEach(F=>w[F.getId()]=F),this.colDefCols={tree:C,treeDepth:v,list:b,map:w},s==null||s.extractCols(e,h),i==null||i.extractCols(e,h),o==null||o.extractCols(e,h),this.ready=!0,this.refreshCols(!0),a.refresh(e),l.checkViewportColumns(),c.dispatchEvent({type:"columnEverythingChanged",source:e}),u&&(this.changeEventsDispatching=!0,u(),this.changeEventsDispatching=!1),c.dispatchEvent({type:"newColumnsLoaded",source:e}),e==="gridInitializing"&&(r==null||r.applyAutosizeStrategy())}refreshCols(e){var C;if(!this.colDefCols)return;const t=(C=this.cols)==null?void 0:C.tree;this.saveColOrder();const{autoColSvc:n,selectionColSvc:r,quickFilter:s,pivotResultCols:i,showRowGroupCols:o,rowAutoHeight:a,visibleCols:l,colViewport:c,eventSvc:u}=this.beans,h=this.selectCols(i,this.colDefCols);n==null||n.createAutoCols(h,v=>{this.lastOrder=v(this.lastOrder),this.lastPivotOrder=v(this.lastPivotOrder)}),n==null||n.addAutoCols(h),r==null||r.createSelectionCols(h,v=>{this.lastOrder=v(this.lastOrder)??null,this.lastPivotOrder=v(this.lastPivotOrder)??null}),r==null||r.addSelectionCols(h);const g=Yoe(this.gos,this.showingPivotResult);(!e||g)&&this.restoreColOrder(h),this.positionLockedCols(h),o==null||o.refresh(),s==null||s.refreshCols(),this.setColSpanActive(),a==null||a.setAutoHeightActive(h),l.clear(),c.clear(),!Kr(t,this.cols.tree)&&u.dispatchEvent({type:"gridColumnsChanged"})}selectCols(e,t){const n=(e==null?void 0:e.getPivotResultCols())??null;this.showingPivotResult=n!=null;const{map:r,list:s,tree:i,treeDepth:o}=n??t;return this.cols={list:s.slice(),map:{...r},tree:i.slice(),treeDepth:o},n&&(n.list.some(l=>{var c;return((c=this.cols)==null?void 0:c.map[l.getColId()])!==void 0})||(this.lastPivotOrder=null)),this.cols}getColsToShow(){var r;if(!this.cols)return[];const e=this.isPivotMode()&&!this.showingPivotResult,t=(r=this.beans.valueColsSvc)==null?void 0:r.columns;return this.cols.list.filter(s=>{const i=ty(s);if(e){const o=t==null?void 0:t.includes(s);return i||o}else return i||s.isVisible()})}refreshAll(e){this.ready&&(this.refreshCols(!1),this.beans.visibleCols.refresh(e))}setColsVisible(e,t=!1,n){Us(this.beans,{state:e.map(r=>({colId:typeof r=="string"?r:r.getColId(),hide:!t}))},n)}restoreColOrder(e){const t=this.showingPivotResult?this.lastPivotOrder:this.lastOrder;if(!t)return;const n=new Map(t.map((c,u)=>[c,u]));if(!e.list.some(c=>n.has(c)))return;const s=new Map(e.list.map(c=>[c,!0])),i=t.filter(c=>s.has(c)),o=new Map(i.map(c=>[c,!0])),a=e.list.filter(c=>!o.has(c)),l=i.slice();a.forEach(c=>{let u=c.getOriginalParent();if(!u){l.push(c);return}const h=[];for(;!h.length&&u;)u.getLeafColumns().forEach(v=>{const b=l.indexOf(v)>=0,w=h.indexOf(v)<0;b&&w&&h.push(v)}),u=u.getOriginalParent();if(!h.length){l.push(c);return}const g=h.map(C=>l.indexOf(C)),m=Math.max(...g);l.splice(m+1,0,c)}),e.list=l}positionLockedCols(e){e.list=AH(e.list,this.gos)}saveColOrder(){var e,t;this.showingPivotResult?this.lastPivotOrder=((e=this.cols)==null?void 0:e.list)??null:this.lastOrder=((t=this.cols)==null?void 0:t.list)??null}getColumnDefs(){var e,t;return this.colDefCols?(t=this.beans.colDefFactory)==null?void 0:t.getColumnDefs(this.colDefCols.list,this.showingPivotResult,this.lastOrder,((e=this.cols)==null?void 0:e.list)??[]):void 0}setColSpanActive(){var e;this.colSpanActive=!!((e=this.cols)!=null&&e.list.some(t=>t.getColDef().colSpan!=null))}isPivotMode(){return this.pivotMode}setPivotMode(e,t){if(e===this.pivotMode||(this.pivotMode=e,!this.ready))return;this.refreshCols(!1);const{visibleCols:n,eventSvc:r}=this.beans;n.refresh(t),r.dispatchEvent({type:"columnPivotModeChanged"})}isPivotActive(){var t;const e=(t=this.beans.pivotColsSvc)==null?void 0:t.columns;return this.pivotMode&&!!(e!=null&&e.length)}recreateColumnDefs(e){var t;this.cols&&((t=this.beans.autoColSvc)==null||t.updateAutoCols(e),this.createColsFromColDefs(e))}setColumnDefs(e,t){this.colDefs=e,this.createColsFromColDefs(t)}destroy(){var e;Fl(this.beans,(e=this.colDefCols)==null?void 0:e.tree),super.destroy()}getColTree(){var e;return((e=this.cols)==null?void 0:e.tree)??[]}getColDefColTree(){var e;return((e=this.colDefCols)==null?void 0:e.tree)??[]}getColDefCols(){var e;return((e=this.colDefCols)==null?void 0:e.list)??null}getCols(){var e;return((e=this.cols)==null?void 0:e.list)??[]}getAllCols(){var s,i,o,a;const{pivotResultCols:e,autoColSvc:t,selectionColSvc:n}=this.beans,r=(s=e==null?void 0:e.getPivotResultCols())==null?void 0:s.list;return[((i=this.colDefCols)==null?void 0:i.list)??[],((o=t==null?void 0:t.autoCols)==null?void 0:o.list)??[],((a=n==null?void 0:n.selectionCols)==null?void 0:a.list)??[],r??[]].flat()}getColsForKeys(e){return e?e.map(t=>this.getCol(t)).filter(t=>t!=null):[]}getColDefCol(e){var t;return(t=this.colDefCols)!=null&&t.list?this.getColFromCollection(e,this.colDefCols):null}getCol(e){return e==null?null:this.getColFromCollection(e,this.cols)}getColFromCollection(e,t){var s;if(t==null)return null;const{map:n,list:r}=t;if(typeof e=="string"&&n[e])return n[e];for(let i=0;il.set(u,h)),t.length=0,$e(e)&&e.forEach(u=>{const h=this.colModel.getColDefCol(u);h&&t.push(h)}),t.forEach((u,h)=>{const g=l.get(u);if(g===void 0){l.set(u,0);return}r&&g!==h||l.delete(u)}),(this.colModel.getColDefCols()||[]).forEach(u=>{const h=t.indexOf(u)>=0;i(u,h,o)}),s&&this.colModel.refreshCols(!1),this.visibleCols.refresh(o),this.dispatchColumnChangedEvent(this.eventSvc,n,[...l.keys()],o)}updateColList(e=[],t,n,r,s,i,o){if(!e||e.length===0)return;let a=!1;const l=new Set;if(e.forEach(u=>{if(!u)return;const h=this.colModel.getColDefCol(u);if(h){if(l.add(h),n){if(t.indexOf(h)>=0)return;t.push(h)}else{const g=t.indexOf(h);if(g<0)return;for(let m=g+1;m{const C=t.indexOf(m)<0,v=m.getColDef(),b=l(v),w=c(v),S=o(v),x=a(v);let P;b!==void 0?P=b:S!==void 0?S===null?P=!1:P=S>=0:C?w!==void 0?P=w:x!==void 0?P=x!=null&&x>=0:P=!1:P=n.indexOf(m)>=0,P&&((C?S!=null||x!=null:S!=null)?r.push(m):s.push(m))});const h=m=>{const C=o(m.getColDef()),v=a(m.getColDef());return C??v};r.sort((m,C)=>{const v=h(m),b=h(C);return v===b?0:v{s.indexOf(m)>=0&&g.push(m)}),s.forEach(m=>{g.indexOf(m)<0&&g.push(m)}),n.forEach(m=>{g.indexOf(m)<0&&i(m,!1,e)}),g.forEach(m=>{n.indexOf(m)<0&&i(m,!0,e)}),this.columns=g}restoreColumnOrder(e,t){const n=this.columns,r=this.colModel.getColDefCols();if(!n.length||!r)return e;const s=Object.keys(t),i=new Set(s),o=new Set(s),a=new Set(n.map(x=>{const P=x.getColId();return o.delete(P),P}).concat(s)),l=[],c={};let u=0;for(let x=0;x{const P=c[x];for(let F=m;F{const P=x.getColId();if(i.has(P))S(P),t[P][b]=h++;else{const F=x.getColDef();(F[b]===null||F[b]===void 0&&F[w]==null)&&(g||(F[C]||F[C]===void 0&&F[v]?S(P):(o.forEach(I=>{t[I][b]=h+c[I]}),h+=l.length,g=!0)),e[P]||(e[P]={colId:P}),e[P][b]=h++)}}),e}},XH=class{constructor(){this.existingIds={}}getInstanceIdForKey(e){const t=this.existingIds[e];let n;return typeof t!="number"?n=0:n=t+1,this.existingIds[e]=n,n}},kd=class extends be{};function wg(e,t,n){return n&&e.addDestroyFunc(()=>t.destroyBean(n)),n??e}var Sg=class{constructor(e){this.cssClassStates={},this.getGui=e}addCssClass(e){this.addOrRemoveCssClass(e,!0)}removeCssClass(e){this.addOrRemoveCssClass(e,!1)}containsCssClass(e){const t=this.getGui();return t?t.classList.contains(e):!1}addOrRemoveCssClass(e,t){if(!e)return;if(e.indexOf(" ")>=0){const r=(e||"").split(" ");if(r.length>1){r.forEach(s=>this.addOrRemoveCssClass(s,t));return}}if(this.cssClassStates[e]!==t&&e.length){const r=this.getGui();r&&r.classList.toggle(e,t),this.cssClassStates[e]=t}}},Iae=0,pe=null,He=class extends be{constructor(e,t){super(),this.suppressDataRefValidation=!1,this.displayed=!0,this.visible=!0,this.compId=Iae++,this.cssClassManager=new Sg(()=>this.eGui),this.componentSelectors=new Map((t??[]).map(n=>[n.selector,n])),e&&this.setTemplate(e)}preConstruct(){var t,n,r;this.wireTemplate(this.getGui());const e="component-"+((n=(t=Object.getPrototypeOf(this))==null?void 0:t.constructor)==null?void 0:n.name);(r=this.css)==null||r.forEach(s=>this.beans.environment.addGlobalCSS(s,e))}wireTemplate(e,t){e&&this.gos&&(this.applyElementsToComponent(e),this.createChildComponentsFromTags(e,t))}getCompId(){return this.compId}getDataRefAttribute(e){return e.getAttribute?e.getAttribute("data-ref"):null}applyElementsToComponent(e,t,n,r=null){if(t===void 0&&(t=this.getDataRefAttribute(e)),t){const s=this[t];if(s===pe)this[t]=r??e;else{const i=n&&n[t];if(!this.suppressDataRefValidation&&!i)throw new Error(`data-ref: ${t} on ${this.constructor.name} with ${s}`)}}}createChildComponentsFromTags(e,t){zoe(e.childNodes).forEach(r=>{if(!(r instanceof HTMLElement))return;const s=this.createComponentFromElement(r,i=>{i.getGui()&&this.copyAttributesFromNode(r,i.getGui())},t);if(s){if(s.addItems&&r.children.length){this.createChildComponentsFromTags(r,t);const i=Array.prototype.slice.call(r.children);s.addItems(i)}this.swapComponentForNode(s,e,r)}else r.childNodes&&this.createChildComponentsFromTags(r,t)})}createComponentFromElement(e,t,n){const r=e.nodeName,s=this.getDataRefAttribute(e),i=r.indexOf("AG-")===0,o=i?this.componentSelectors.get(r):null;let a=null;if(o){const l=n&&s?n[s]:void 0;a=new o.component(l),a.setParentComponent(this),this.createBean(a,null,t)}else if(i)throw new Error(`selector: ${r}`);return this.applyElementsToComponent(e,s,n,a),a}copyAttributesFromNode(e,t){Woe(e.attributes,(n,r)=>t.setAttribute(n,r))}swapComponentForNode(e,t,n){const r=e.getGui();t.replaceChild(r,n),t.insertBefore(document.createComment(n.nodeName),r),this.addDestroyFunc(this.destroyBean.bind(this,e))}activateTabIndex(e){const t=this.gos.get("tabIndex");e||(e=[]),e.length||e.push(this.getGui()),e.forEach(n=>n.setAttribute("tabindex",t.toString()))}setTemplate(e,t,n){const r=Cs(e);this.setTemplateFromElement(r,t,n)}setTemplateFromElement(e,t,n,r=!1){if(this.eGui=e,this.suppressDataRefValidation=r,t)for(let s=0;sthis.eGui.removeEventListener(e,t))}addCssClass(e){this.cssClassManager.addCssClass(e)}removeCssClass(e){this.cssClassManager.removeCssClass(e)}containsCssClass(e){return this.cssClassManager.containsCssClass(e)}addOrRemoveCssClass(e,t){this.cssClassManager.addOrRemoveCssClass(e,t)}registerCSS(e){this.css||(this.css=[]),this.css.push(e)}};function Dae(e){return typeof e.then=="function"}var Lt=class qh{constructor(t){this.status=0,this.resolution=null,this.waiters=[],t(n=>this.onDone(n),n=>this.onReject(n))}static all(t){return t.length?new qh(n=>{let r=t.length;const s=new Array(r);t.forEach((i,o)=>{i.then(a=>{s[o]=a,r--,r===0&&n(s)})})}):qh.resolve()}static resolve(t=null){return new qh(n=>n(t))}then(t){return new qh(n=>{this.status===1?n(t(this.resolution)):this.waiters.push(r=>n(t(r)))})}onDone(t){this.status=1,this.resolution=t,this.waiters.forEach(n=>n(t))}onReject(t){}};function Aae(e){return e?e.prototype&&"getGui"in e.prototype:!1}function YH(e,t,n,r){const{name:s}=n;let i,o,a,l,c,u;if(t){const h=t,g=h[s+"Selector"],m=g?g(r):null,C=v=>{typeof v=="string"?i=v:v!=null&&v!==!0&&(e.isFrameworkComponent(v)?a=v:o=v)};m?(C(m.component),l=m.params,c=m.popup,u=m.popupPosition):C(h[s])}return{compName:i,jsComp:o,fwComp:a,paramsFromSelector:l,popupFromSelector:c,popupPositionFromSelector:u}}var Lae=class extends be{constructor(){super(...arguments),this.beanName="userCompFactory"}wireBeans(e){this.agCompUtils=e.agCompUtils,this.registry=e.registry,this.frameworkCompWrapper=e.frameworkCompWrapper,this.gridOptions=e.gridOptions}getCompDetailsFromGridOptions(e,t,n,r=!1){return this.getCompDetails(this.gridOptions,e,t,n,r)}getCompDetails(e,t,n,r,s=!1){var S;const{name:i,cellRenderer:o}=t;let{compName:a,jsComp:l,fwComp:c,paramsFromSelector:u,popupFromSelector:h,popupPositionFromSelector:g}=YH(this.beans.frameworkOverrides,e,t,r),m;const C=x=>{const P=this.registry.getUserComponent(i,x);P&&(l=P.componentFromFramework?void 0:P.component,c=P.componentFromFramework?P.component:void 0,m=P.params)};if(a!=null&&C(a),l==null&&c==null&&n!=null&&C(n),l&&o&&!Aae(l)&&(l=(S=this.agCompUtils)==null?void 0:S.adaptFunction(t,l)),!l&&!c){const{validation:x}=this.beans;s&&(a!==n||!n)?a?x!=null&&x.isProvidedUserComp(a)||Wt(50,{compName:a}):n?x||Wt(260,{...this.gos.getModuleErrorParams(),propName:i,compName:n}):Wt(216,{name:i}):n&&!x&&Wt(146,{comp:n});return}const v=this.mergeParams(e,t,r,u,m),b=l==null,w=l??c;return{componentFromFramework:b,componentClass:w,params:v,type:t,popupFromSelector:h,popupPositionFromSelector:g,newAgStackInstance:()=>this.newAgStackInstance(w,b,v,t)}}newAgStackInstance(e,t,n,r){var a;const s=!t;let i;s?i=new e:i=this.frameworkCompWrapper.wrap(e,r.mandatoryMethods,r.optionalMethods,r),this.createBean(i);const o=(a=i.init)==null?void 0:a.call(i,n);return o==null?Lt.resolve(i):o.then(()=>i)}mergeParams(e,t,n,r=null,s){const i=this.gos.getGridCommonParams();dr(i,n),s&&dr(i,s);const o=e,a=o&&o[t.name+"Params"];if(typeof a=="function"){const l=a(n);dr(i,l)}else typeof a=="object"&&dr(i,a);return dr(i,r),i}},Oae={name:"dateComponent",mandatoryMethods:["getDate","setDate"],optionalMethods:["afterGuiAttached","setInputPlaceholder","setInputAriaLabel","setDisabled","refresh"]},kae={name:"dragAndDropImageComponent",mandatoryMethods:["setIcon","setLabel"]},Nae={name:"headerComponent",optionalMethods:["refresh"]},Bae={name:"innerHeaderComponent"},$ae={name:"innerHeaderGroupComponent"},Gae={name:"headerGroupComponent"},Vae={name:"innerRenderer",cellRenderer:!0,optionalMethods:["afterGuiAttached"]},Hae={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},zae={name:"cellRenderer",optionalMethods:["refresh","afterGuiAttached"]},Wae={name:"loadingCellRenderer",cellRenderer:!0},_ae={name:"cellEditor",mandatoryMethods:["getValue"],optionalMethods:["isPopup","isCancelBeforeStart","isCancelAfterEnd","getPopupPosition","focusIn","focusOut","afterGuiAttached","refresh"]},Uae={name:"loadingOverlayComponent",optionalMethods:["refresh"]},jae={name:"noRowsOverlayComponent",optionalMethods:["refresh"]},Kae={name:"tooltipComponent"},eF={name:"filter",mandatoryMethods:["isFilterActive","doesFilterPass","getModel","setModel"],optionalMethods:["afterGuiAttached","afterGuiDetached","onNewRowsLoaded","getModelAsString","onFloatingFilterChanged","onAnyFilterChanged","refresh"]},qae={name:"floatingFilterComponent",mandatoryMethods:["onParentModelChanged"],optionalMethods:["afterGuiAttached","refresh"]},Xae={name:"fullWidthCellRenderer",optionalMethods:["refresh","afterGuiAttached"],cellRenderer:!0},Yae={name:"loadingCellRenderer",cellRenderer:!0},Qae={name:"groupRowRenderer",optionalMethods:["afterGuiAttached"],cellRenderer:!0},Zae={name:"detailCellRenderer",optionalMethods:["refresh"],cellRenderer:!0};function Jae(e,t){return e.getCompDetailsFromGridOptions(kae,"agDragAndDropImage",t,!0)}function yS(e,t,n){return e.getCompDetails(t,Vae,void 0,n)}function ele(e,t,n){return e.getCompDetails(t,Nae,"agColumnHeader",n)}function tle(e,t,n){return e.getCompDetails(t,Bae,void 0,n)}function nle(e,t){const n=t.columnGroup.getColGroupDef();return e.getCompDetails(n,Gae,"agColumnGroupHeader",t)}function rle(e,t,n){return e.getCompDetails(t,$ae,void 0,n)}function sle(e,t){return e.getCompDetailsFromGridOptions(Xae,void 0,t,!0)}function ile(e,t){return e.getCompDetailsFromGridOptions(Yae,"agLoadingCellRenderer",t,!0)}function ole(e,t){return e.getCompDetailsFromGridOptions(Qae,"agGroupRowRenderer",t,!0)}function ale(e,t){return e.getCompDetailsFromGridOptions(Zae,"agDetailCellRenderer",t,!0)}function VC(e,t,n){return e.getCompDetails(t,Hae,void 0,n)}function QH(e,t,n){return e.getCompDetails(t,zae,void 0,n)}function lle(e,t,n){return e.getCompDetails(t,Wae,"agSkeletonCellRenderer",n,!0)}function _L(e,t,n){return e.getCompDetails(t,_ae,"agCellEditor",n,!0)}function ZH(e,t,n,r){return e.getCompDetails(t,eF,r,n,!0)}function cle(e,t){return e.getCompDetailsFromGridOptions(Oae,"agDateInput",t,!0)}function ule(e,t){return e.getCompDetailsFromGridOptions(Uae,"agLoadingOverlay",t,!0)}function dle(e,t){return e.getCompDetailsFromGridOptions(jae,"agNoRowsOverlay",t,!0)}function hle(e,t){return e.getCompDetails(t.colDef,Kae,"agTooltipComponent",t,!0)}function JH(e,t,n,r){return e.getCompDetails(t,qae,r,n)}function ple(e,t){return YH(e,t,eF)}function gle(e,t,n){return e.mergeParams(t,eF,n)}function Nc(e){const t=e;return t!=null&&t.getFrameworkComponentInstance!=null?t.getFrameworkComponentInstance():e}var e2=new Set,HC={},xc={},Hm,t2=!1;function fle(e){const[t,n]=e.version.split(".")||[],[r,s]=Hm.split(".")||[];return t===r&&n===s}function mle(e){Hm||(Hm=e.version);const t=n=>`You are using incompatible versions of AG Grid modules. Major and minor versions should always match across modules. ${n} Please update all modules to the same version.`;if(e.version?fle(e)||Yu(t(`'${e.moduleName}' is version ${e.version} but the other modules are version ${Hm}.`)):Yu(t(`'${e.moduleName}' is incompatible.`)),e.validate){const n=e.validate();n.isValid||Yu(`${n.message}`)}}function Up(e,t){mle(e);const n=e.rowModels??["all"];e2.add(e);let r;t!==void 0?(t2=!0,xc[t]===void 0&&(xc[t]={}),r=xc[t]):r=HC,n.forEach(s=>{r[s]===void 0&&(r[s]={}),r[s][e.moduleName]=e}),e.dependsOn&&e.dependsOn.forEach(s=>Up(s,t))}function Cle(e){delete xc[e]}function n2(e,t,n){const r=s=>{var i,o,a;return!!((i=HC[s])!=null&&i[e])||!!((a=(o=xc[t])==null?void 0:o[s])!=null&&a[e])};return r(n)||r("all")}function tF(){return t2}function vle(e,t){const n=xc[e]??{};return[...Object.values(HC.all??{}),...Object.values(n.all??{}),...Object.values(HC[t]??{}),...Object.values(n[t]??{})]}function yle(){return new Set(e2)}function r2(e,t){const n=xc[e]??{};return[...Object.values(n.all??{}),...Object.values(n[t]??{})]}var gAe=class{static register(e){Up(e,void 0)}static registerModules(e){e.forEach(t=>Up(t,void 0))}},ble=class{constructor(e){this.beans={},this.createdBeans=[],this.destroyed=!1,!(!e||!e.beanClasses)&&(this.beanDestroyComparator=e.beanDestroyComparator,this.init(e))}init(e){var t;Object.entries(e.providedBeanInstances).forEach(([n,r])=>{this.beans[n]=r}),e.beanClasses.forEach(n=>{const r=new n;r.beanName?this.beans[r.beanName]=r:console.error(`Bean ${n.name} is missing beanName`),this.createdBeans.push(r)}),(t=e.derivedBeans)==null||t.forEach(n=>{const{beanName:r,bean:s}=n(this);this.beans[r]=s,this.createdBeans.push(s)}),e.beanInitComparator&&this.createdBeans.sort(e.beanInitComparator),this.initBeans(this.createdBeans)}getBeanInstances(){return Object.values(this.beans)}createBean(e,t){if(!e)throw Error("null bean");return this.initBeans([e],t),e}initBeans(e,t){e.forEach(n=>{var r,s;(r=n.preWireBeans)==null||r.call(n,this.beans),(s=n.wireBeans)==null||s.call(n,this.beans)}),e.forEach(n=>{var r;return(r=n.preConstruct)==null?void 0:r.call(n)}),t&&e.forEach(t),e.forEach(n=>{var r;return(r=n.postConstruct)==null?void 0:r.call(n)})}getBeans(){return this.beans}getBean(e){return this.beans[e]}destroy(){if(this.destroyed)return;this.destroyed=!0;const e=this.getBeanInstances();this.beanDestroyComparator&&e.sort(this.beanDestroyComparator),this.destroyBeans(e),this.beans={},this.createdBeans=[]}destroyBean(e){var t;(t=e==null?void 0:e.destroy)==null||t.call(e)}destroyBeans(e){if(e)for(let t=0;t=this.lastScrollTop,r&&e===0){const s=(n==null?void 0:n.getCurrentPage())??0;s!==this.lastPage&&(this.lastPage=s,this.scrollGoingDown=!0)}this.lastScrollTop=e}postConstruct(){this.active=!this.gos.get("suppressAnimationFrame")}verifyAnimationFrameOn(e){this.active===!1&&ye(92,{methodName:e})}createTask(e,t,n){this.verifyAnimationFrameOn(n);const r={task:e,index:t,createOrder:++this.taskCount};this.addTaskToList(this[n],r),this.schedule()}cancelTask(e){this.cancelledTasks.add(e)}addTaskToList(e,t){e.list.push(t),e.sorted=!1}sortTaskList(e){if(e.sorted)return;const t=this.scrollGoingDown?1:-1;e.list.sort((n,r)=>n.index!==r.index?t*(r.index-n.index):r.createOrder-n.createOrder),e.sorted=!0}addDestroyTask(e){this.verifyAnimationFrameOn("createTasksP3"),this.destroyTasks.push(e),this.schedule()}executeFrame(e){this.verifyAnimationFrameOn("executeFrame");const t=this.createTasksP1,n=t.list,r=this.createTasksP2,s=r.list,i=this.destroyTasks,o=new Date().getTime();let a=new Date().getTime()-o;const l=e<=0,c=this.beans.ctrlsSvc.getScrollFeature();for(;l||a0||(e.addEventListener("keydown",WC),e.addEventListener("mousedown",WC))}function Fle(e){zC>0||(e.removeEventListener("keydown",WC),e.removeEventListener("mousedown",WC))}function WC(e){const t=HR,n=e.type==="keydown";n&&(e.ctrlKey||e.metaKey||e.altKey)||t!==n&&(HR=n)}function Tle(e){const t=Cn(e);return Ple(t),zC++,()=>{zC--,Fle(t)}}function ny(){return HR}function a2(e,t,n){t.addManagedElementListeners(n,{keydown:r=>{if(!r.defaultPrevented&&r.key===se.TAB){const s=r.shiftKey;qr(e,n,!1,s)||ha(e,s)&&r.preventDefault()}}})}function Ji(e,t,n=!1){const r=Boe;let s=nH;t&&(s+=", "+t),n&&(s+=', [tabindex="-1"]');const i=Array.prototype.slice.apply(e.querySelectorAll(r)).filter(l=>us(l)),o=Array.prototype.slice.apply(e.querySelectorAll(s));return o.length?((l,c)=>l.filter(u=>c.indexOf(u)===-1))(i,o):i}function Ar(e,t=!1,n=!1){const r=Ji(e,null,n),s=t?Pt(r):r[0];return s?(s.focus({preventScroll:!0}),!0):!1}function qr(e,t,n,r){const s=Ji(t,n?':not([tabindex="-1"])':null),i=en(e);let o;n?o=s.findIndex(l=>l.contains(i)):o=s.indexOf(i);const a=o+(r?-1:1);return a<0||a>=s.length?null:s[a]}function rF(e,t=5){let n=0;for(;e&&OR(e)===null&&++n<=t;)e=e.parentElement;return OR(e)===null?null:e}function l2(e,t){return e.ctrlsSvc.get("gridCtrl").focusInnerElement(t)}function Zu(e){var t;return e.gos.get("suppressHeaderFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function c2(e){var t;return e.gos.get("suppressCellFocus")||!!((t=e.overlays)!=null&&t.isExclusive())}function ha(e,t,n=!1){const r=e.ctrlsSvc.get("gridCtrl");return!n&&r.focusNextInnerContainer(t)?!0:((n||!t&&!r.isDetailGrid())&&r.forceFocusOutOfContainer(t),!1)}var Mle=/[&<>"']/g,Ile={"&":"&","<":"<",">":">",'"':""","'":"'"};function Rn(e,t){if(e==null)return null;const n=e.toString().toString();return t?n:n.replace(Mle,r=>Ile[r])}function Dle(e,t=!1){return e===se.DELETE?!0:!t&&e===se.BACKSPACE?JV():!1}var Ale=class extends be{constructor(e,t,n,r){super(),this.cellCtrl=e,this.rowNode=n,this.rowCtrl=r,this.beans=t}setComp(e){this.eGui=e}onKeyDown(e){const t=e.key;switch(t){case se.ENTER:this.onEnterKeyDown(e);break;case se.F2:this.onF2KeyDown(e);break;case se.ESCAPE:this.onEscapeKeyDown(e);break;case se.TAB:this.onTabKeyDown(e);break;case se.BACKSPACE:case se.DELETE:this.onBackspaceOrDeleteKeyDown(t,e);break;case se.DOWN:case se.UP:case se.RIGHT:case se.LEFT:this.onNavigationKeyDown(e,t);break}}onNavigationKeyDown(e,t){var n;this.cellCtrl.editing||(e.shiftKey&&this.cellCtrl.isRangeSelectionEnabled()?this.onShiftRangeSelect(e):(n=this.beans.navigation)==null||n.navigateToNextCell(e,t,this.cellCtrl.cellPosition,!0),e.preventDefault())}onShiftRangeSelect(e){const{rangeSvc:t,navigation:n}=this.beans;if(!t)return;const r=t.extendLatestRangeInDirection(e);r&&(n==null||n.ensureCellVisible(r))}onTabKeyDown(e){var t;(t=this.beans.navigation)==null||t.onTabKeyDown(this.cellCtrl,e)}onBackspaceOrDeleteKeyDown(e,t){var l;const{cellCtrl:n,beans:r,rowNode:s}=this,{gos:i,rangeSvc:o,eventSvc:a}=r;if(!n.editing){if(a.dispatchEvent({type:"keyShortcutChangedCellStart"}),Dle(e,i.get("enableCellEditingOnBackspace"))){if(o&&vs(i))o.clearCellRangeCellValues({dispatchWrapperEvents:!0,wrapperEventSource:"deleteKey"});else if(n.isCellEditable()){const{column:c}=n,u=this.beans.valueSvc.getDeleteValue(c,s);s.setDataValue(c,u,"cellClear")}}else(l=r.editSvc)==null||l.startRowOrCellEdit(n,e,t);a.dispatchEvent({type:"keyShortcutChangedCellEnd"})}}onEnterKeyDown(e){var r,s;const{cellCtrl:t,beans:n}=this;if(t.editing||this.rowCtrl.editing)t.stopEditingAndFocus(!1,e.shiftKey);else if(n.gos.get("enterNavigatesVertically")){const i=e.shiftKey?se.UP:se.DOWN;(r=n.navigation)==null||r.navigateToNextCell(null,i,t.cellPosition,!1)}else(s=n.editSvc)==null||s.startRowOrCellEdit(t,se.ENTER,e),t.editing&&e.preventDefault()}onF2KeyDown(e){var r;const{cellCtrl:t,beans:n}=this;t.editing||(r=n.editSvc)==null||r.startRowOrCellEdit(t,se.F2,e)}onEscapeKeyDown(e){var r;const{cellCtrl:t,beans:n}=this;t.editing&&((r=n.editSvc)==null||r.stopRowOrCellEdit(t,!0),t.focusCell(!0))}processCharacter(e){var s;if(e.target!==this.eGui||this.cellCtrl.editing)return;const r=e.key;r===se.SPACE?this.onSpaceKeyDown(e):(s=this.beans.editSvc)!=null&&s.startRowOrCellEdit(this.cellCtrl,r,e)&&e.preventDefault()}onSpaceKeyDown(e){var n;const{gos:t}=this.beans;!this.cellCtrl.editing&&ci(t)&&((n=this.beans.selectionSvc)==null||n.handleSelectionEvent(e,this.rowNode,"spaceKey")),e.preventDefault()}destroy(){super.destroy()}},Lle=class extends be{constructor(e,t,n){super(),this.cellCtrl=e,this.column=n,this.beans=t}onMouseEvent(e,t){if(!ui(t))switch(e){case"click":this.onCellClicked(t);break;case"mousedown":case"touchstart":this.onMouseDown(t);break;case"dblclick":this.onCellDoubleClicked(t);break;case"mouseout":this.onMouseOut(t);break;case"mouseover":this.onMouseOver(t);break}}onCellClicked(e){var c;if((c=this.beans.touchSvc)!=null&&c.handleCellDoubleClick(this,e))return;const{eventSvc:t,rangeSvc:n,gos:r,editSvc:s}=this.beans,i=e.ctrlKey||e.metaKey;n&&i&&n.getCellRangeCount(this.cellCtrl.cellPosition)>1&&n.intersectLastRange(!0);const o=this.cellCtrl.createEvent(e,"cellClicked");t.dispatchEvent(o);const a=this.column.getColDef();a.onCellClicked&&window.setTimeout(()=>{this.beans.frameworkOverrides.wrapOutgoing(()=>{a.onCellClicked(o)})},0),(r.get("singleClickEdit")||a.singleClickEdit)&&!r.get("suppressClickEdit")&&!(e.shiftKey&&(n==null?void 0:n.getCellRanges().length)!=0)&&(s==null||s.startRowOrCellEdit(this.cellCtrl))}onCellDoubleClicked(e){const{column:t,beans:n,cellCtrl:r}=this,{eventSvc:s,frameworkOverrides:i,gos:o,editSvc:a}=n,l=t.getColDef(),c=r.createEvent(e,"cellDoubleClicked");s.dispatchEvent(c),typeof l.onCellDoubleClicked=="function"&&window.setTimeout(()=>{i.wrapOutgoing(()=>{l.onCellDoubleClicked(c)})},0),!o.get("singleClickEdit")&&!o.get("suppressClickEdit")&&(a==null||a.startRowOrCellEdit(r,null,e))}onMouseDown(e){const{ctrlKey:t,metaKey:n,shiftKey:r}=e,s=e.target,{cellCtrl:i,beans:o}=this,{eventSvc:a,rangeSvc:l,focusSvc:c,gos:u}=o;if(this.isRightClickInExistingRange(e))return;const h=l&&!l.isEmpty(),g=this.containsWidget(s),{cellPosition:m}=i;if(!r||!h){const v=u.get("enableCellTextSelection")&&e.defaultPrevented,b=(Yc()||v)&&!i.editing&&!_P(s)&&!g;i.focusCell(b)}if(r&&h&&!c.isCellFocused(m)){e.preventDefault();const C=c.getFocusedCell();if(C){const{column:v,rowIndex:b,rowPinned:w}=C,S=o.rowRenderer.getRowByPosition({rowIndex:b,rowPinned:w}),x=S==null?void 0:S.getCellCtrl(v);x!=null&&x.editing&&x.stopEditing(),c.setFocusedCell({column:v,rowIndex:b,rowPinned:w,forceBrowserFocus:!0,preventScrollOnBrowserFocus:!0})}}if(!g){if(l)if(r)l.extendLatestRangeToCell(m);else{const C=t||n;l.setRangeToCell(m,C)}a.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseDown"))}}isRightClickInExistingRange(e){const{rangeSvc:t}=this.beans;if(t){const n=t.isCellInAnyRange(this.cellCtrl.cellPosition),r=e.button===2||e.ctrlKey&&this.beans.gos.get("allowContextMenuWithControlKey");if(n&&r)return!0}return!1}containsWidget(e){return bc(e,"ag-selection-checkbox",3)||bc(e,"ag-drag-handle",3)}onMouseOut(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOut")),n==null||n.clearMouseOver()}onMouseOver(e){if(this.mouseStayingInsideCell(e))return;const{eventSvc:t,colHover:n}=this.beans;t.dispatchEvent(this.cellCtrl.createEvent(e,"cellMouseOver")),n==null||n.setMouseOver([this.column])}mouseStayingInsideCell(e){if(!e.target||!e.relatedTarget)return!1;const{eGui:t}=this.cellCtrl,n=t.contains(e.target),r=t.contains(e.relatedTarget);return n&&r}destroy(){super.destroy()}},Ole=class extends be{constructor(e,t){super(),this.cellCtrl=e,this.beans=t,this.column=e.column,this.rowNode=e.rowNode}setupRowSpan(){this.rowSpan=this.column.getRowSpan(this.rowNode),this.addManagedListeners(this.beans.eventSvc,{newColumnsLoaded:()=>this.onNewColumnsLoaded()})}setComp(e){this.eGui=e,this.setupColSpan(),this.setupRowSpan(),this.onLeftChanged(),this.onWidthChanged(),this.applyRowSpan()}onNewColumnsLoaded(){const e=this.column.getRowSpan(this.rowNode);this.rowSpan!==e&&(this.rowSpan=e,this.applyRowSpan(!0))}onDisplayColumnsChanged(){const e=this.getColSpanningList();Kr(this.colsSpanning,e)||(this.colsSpanning=e,this.onWidthChanged(),this.onLeftChanged())}setupColSpan(){this.column.getColDef().colSpan!=null&&(this.colsSpanning=this.getColSpanningList(),this.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onWidthChanged.bind(this)}))}onWidthChanged(){if(!this.eGui)return;const e=this.getCellWidth();this.eGui.style.width=`${e}px`}getCellWidth(){return this.colsSpanning?this.colsSpanning.reduce((e,t)=>e+t.getActualWidth(),0):this.column.getActualWidth()}getColSpanningList(){const{column:e,rowNode:t}=this,n=e.getColSpan(t),r=[];if(n===1)r.push(e);else{let s=e;const i=e.getPinned();for(let o=0;s&&othis.removeFeatures()),this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.onCellFocused(this.focusEventToRestore),this.applyStaticCssClasses(),this.setWrapText(),this.onFirstRightPinnedChanged(),this.onLastLeftPinnedChanged(),this.onColumnHover(),this.setupControlComps(),this.setupAutoHeight(n,i),this.refreshFirstAndLastStyles(),this.refreshAriaColIndex(),(o=this.positionFeature)==null||o.setComp(t),(a=this.customStyleFeature)==null||a.setComp(e),(l=this.tooltipFeature)==null||l.refreshTooltip(),(c=this.keyboardListener)==null||c.setComp(this.eGui),this.rangeFeature&&this.rangeFeature.setComp(e,t),s&&this.isCellEditable()?(u=this.beans.editSvc)==null||u.startEditing(this):this.showValue(),this.onCompAttachedFuncs.length&&(this.onCompAttachedFuncs.forEach(h=>h()),this.onCompAttachedFuncs=[])}setupAutoHeight(e,t){var n;this.isAutoHeight=this.column.isAutoHeight(),!(!this.isAutoHeight||!e)&&((n=this.beans.rowAutoHeight)==null||n.setupCellAutoHeight(this,e,t))}getCellAriaRole(){return this.column.getColDef().cellAriaRole??"gridcell"}isCellRenderer(){const e=this.column.getColDef();return e.cellRenderer!=null||e.cellRendererSelector!=null}getValueToDisplay(){return this.valueFormatted??this.value}showValue(e=!1){var c;const{beans:t,column:n,rowNode:r,rangeFeature:s}=this,{userCompFactory:i}=t,o=this.getValueToDisplay();let a;if(r.stub&&((c=r.groupData)==null?void 0:c[n.getId()])==null){const u=this.createCellRendererParams();a=lle(i,n.getColDef(),u)}else if(this.isCellRenderer()){const u=this.createCellRendererParams();a=VC(i,n.getColDef(),u)}this.comp.setRenderDetails(a,o,e),s&&Ai(t,()=>s==null?void 0:s.refreshHandle())}setupControlComps(){const e=this.column.getColDef();this.includeSelection=this.isIncludeControl(this.isCheckboxSelection(e)),this.includeRowDrag=this.isIncludeControl(e.rowDrag),this.includeDndSource=this.isIncludeControl(e.dndSource),this.comp.setIncludeSelection(this.includeSelection),this.comp.setIncludeDndSource(this.includeDndSource),this.comp.setIncludeRowDrag(this.includeRowDrag)}isForceWrapper(){return this.beans.gos.get("enableCellTextSelection")||this.column.isAutoHeight()}isIncludeControl(e){return this.rowNode.rowPinned!=null?!1:typeof e=="function"||e===!0}isCheckboxSelection(e){const{rowSelection:t}=this.beans.gridOptions;return e.checkboxSelection||Po(this.column)&&t&&typeof t!="string"&&wc(t)}refreshShouldDestroy(){const e=this.column.getColDef(),t=this.includeSelection!=this.isIncludeControl(this.isCheckboxSelection(e)),n=this.includeRowDrag!=this.isIncludeControl(e.rowDrag),r=this.includeDndSource!=this.isIncludeControl(e.dndSource),s=this.isAutoHeight!=this.column.isAutoHeight();return t||n||r||s}onPopupEditorClosed(){this.editing&&this.stopEditingAndFocus()}stopEditing(e=!1){var t;return((t=this.beans.editSvc)==null?void 0:t.stopEditing(this,e))??!1}createCellRendererParams(){const{value:e,valueFormatted:t,column:n,rowNode:r,comp:s,eGui:i,beans:{valueSvc:o,gos:a}}=this;return a.addGridCommonParams({value:e,valueFormatted:t,getValue:()=>o.getValueForDisplay(n,r),setValue:c=>o.setValue(r,n,c),formatValue:this.formatValue.bind(this),data:r.data,node:r,pinned:n.getPinned(),colDef:n.getColDef(),column:n,refreshCell:this.refreshCell.bind(this),eGridCell:i,eParentOfValue:s.getParentOfValue(),registerRowDragger:(c,u,h,g)=>this.registerRowDragger(c,u,g),setTooltip:(c,u)=>{var h;a.assertModuleRegistered("Tooltip",3),this.tooltipFeature&&this.disableTooltipFeature(),this.enableTooltipFeature(c,u),(h=this.tooltipFeature)==null||h.refreshTooltip()}})}onCellChanged(e){e.column===this.column&&this.refreshCell({})}refreshOrDestroyCell(e){var t;this.refreshShouldDestroy()?(t=this.rowCtrl)==null||t.recreateCell(this):this.refreshCell(e)}refreshCell(e){var c,u,h,g,m,C;if(this.suppressRefreshCell||this.editing)return;const t=this.column.getColDef(),n=e!=null&&!!e.newData,r=e!=null&&!!e.suppressFlash,s=t.field==null&&t.valueGetter==null&&t.showRowGroup==null,i=e&&e.forceRefresh||s||n,o=!!this.comp,a=this.updateAndFormatValue(o),l=i||a;if(o){if(l){this.showValue(n);const v=(c=this.beans.filterManager)==null?void 0:c.isSuppressFlashingCellsBecauseFiltering();!r&&!v&&t.enableCellChangeFlash&&((u=this.beans.cellFlashSvc)==null||u.flashCell(this)),(h=this.customStyleFeature)==null||h.applyUserStyles(),(g=this.customStyleFeature)==null||g.applyClassesFromColDef()}(m=this.tooltipFeature)==null||m.refreshTooltip(),(C=this.customStyleFeature)==null||C.applyCellClassRules()}}stopEditingAndFocus(e=!1,t=!1){var n;(n=this.beans.editSvc)==null||n.stopEditingAndFocus(this,e,t)}isCellEditable(){return this.column.isCellEditable(this.rowNode)}formatValue(e){return this.callValueFormatter(e)??e}callValueFormatter(e){return this.beans.valueSvc.formatValue(this.column,this.rowNode,e)}updateAndFormatValue(e){const t=this.value,n=this.valueFormatted;return this.value=this.beans.valueSvc.getValueForDisplay(this.column,this.rowNode),this.valueFormatted=this.callValueFormatter(this.value),e?!this.valuesAreEqual(t,this.value)||this.valueFormatted!=n:!0}valuesAreEqual(e,t){const n=this.column.getColDef();return n.equals?n.equals(e,t):e===t}addDomData(e){const t=this.eGui;Oc(this.beans.gos,t,_C,this),e.addDestroyFunc(()=>Oc(this.beans.gos,t,_C,null))}createEvent(e,t){const{rowNode:n,column:r,value:s}=this;return this.beans.gos.addGridCommonParams({type:t,node:n,data:n.data,value:s,column:r,colDef:r.getColDef(),rowPinned:n.rowPinned,event:e,rowIndex:n.rowIndex})}processCharacter(e){var t;(t=this.keyboardListener)==null||t.processCharacter(e)}onKeyDown(e){var t;(t=this.keyboardListener)==null||t.onKeyDown(e)}onMouseEvent(e,t){var n;(n=this.mouseListener)==null||n.onMouseEvent(e,t)}getColSpanningList(){return this.positionFeature.getColSpanningList()}onLeftChanged(){var e;this.comp&&((e=this.positionFeature)==null||e.onLeftChanged())}onDisplayedColumnsChanged(){this.eGui&&(this.refreshAriaColIndex(),this.refreshFirstAndLastStyles())}refreshFirstAndLastStyles(){const{comp:e,column:t,beans:n}=this;i2(e,t,n.visibleCols)}refreshAriaColIndex(){const e=this.beans.visibleCols.getAriaColIndex(this.column);HP(this.eGui,e)}onWidthChanged(){var e;return(e=this.positionFeature)==null?void 0:e.onWidthChanged()}getRowPosition(){const{rowIndex:e,rowPinned:t}=this.cellPosition;return{rowIndex:e,rowPinned:t}}updateRangeBordersIfRangeCount(){var e;this.comp&&((e=this.rangeFeature)==null||e.updateRangeBordersIfRangeCount())}onCellSelectionChanged(){var e;this.comp&&((e=this.rangeFeature)==null||e.onCellSelectionChanged())}isRangeSelectionEnabled(){return this.rangeFeature!=null}focusCell(e=!1){this.beans.focusSvc.setFocusedCell({rowIndex:this.cellPosition.rowIndex,column:this.column,rowPinned:this.rowNode.rowPinned,forceBrowserFocus:e})}onRowIndexChanged(){var e;this.createCellPosition(),this.onCellFocused(),(e=this.rangeFeature)==null||e.onCellSelectionChanged()}onSuppressCellFocusChanged(e){this.eGui&&Ti(this.eGui,"tabindex",e?void 0:-1)}onFirstRightPinnedChanged(){if(!this.comp)return;const e=this.column.isFirstRightPinned();this.comp.addOrRemoveCssClass(Gle,e)}onLastLeftPinnedChanged(){if(!this.comp)return;const e=this.column.isLastLeftPinned();this.comp.addOrRemoveCssClass(Vle,e)}onCellFocused(e){var s;const{beans:t}=this;if(c2(t))return;const n=t.focusSvc.isCellFocused(this.cellPosition);if(!this.comp){n&&(e!=null&&e.forceBrowserFocus)&&(this.focusEventToRestore=e);return}if(this.focusEventToRestore=void 0,this.comp.addOrRemoveCssClass($le,n),n&&e&&e.forceBrowserFocus){let i=this.comp.getFocusableElement();if(this.editing){const o=Ji(i,null,!0);o.length&&(i=o[0])}i.focus({preventScroll:!!e.preventScrollOnBrowserFocus})}const r=t.gos.get("editType")==="fullRow";!n&&!r&&this.editing&&((s=t.editSvc)==null||s.stopRowOrCellEdit(this)),n&&this.rowCtrl.announceDescription()}createCellPosition(){const{rowIndex:e,rowPinned:t}=this.rowNode;this.cellPosition={rowIndex:e,rowPinned:hr(t),column:this.column}}setInlineEditingCss(){var e;(e=this.beans.editSvc)==null||e.setInlineEditingCss(this.rowCtrl)}applyStaticCssClasses(){const{comp:e}=this;e.addOrRemoveCssClass(kle,!0),e.addOrRemoveCssClass(Hle,!0);const t=this.column.isAutoHeight()==!0;e.addOrRemoveCssClass(Nle,t),e.addOrRemoveCssClass(Ble,!t)}onColumnHover(){var e;(e=this.beans.colHover)==null||e.onCellColumnHover(this.column,this.comp)}onColDefChanged(){var e;this.comp&&(this.column.isTooltipEnabled()?(this.disableTooltipFeature(),this.enableTooltipFeature()):this.disableTooltipFeature(),this.setWrapText(),this.editing?(e=this.beans.editSvc)==null||e.handleColDefChanged(this):this.refreshOrDestroyCell({forceRefresh:!0,suppressFlash:!0}))}setWrapText(){const e=this.column.getColDef().wrapText==!0;this.comp.addOrRemoveCssClass(zle,e)}dispatchCellContextMenuEvent(e){const t=this.column.getColDef(),n=this.createEvent(e,"cellContextMenu"),{beans:r}=this;r.eventSvc.dispatchEvent(n),t.onCellContextMenu&&window.setTimeout(()=>{r.frameworkOverrides.wrapOutgoing(()=>{t.onCellContextMenu(n)})},0)}getCellRenderer(){var e;return((e=this.comp)==null?void 0:e.getCellRenderer())??null}destroy(){this.onCompAttachedFuncs=[],this.onEditorAttachedFuncs=[],super.destroy()}createSelectionCheckbox(){var t;const e=(t=this.beans.selectionSvc)==null?void 0:t.createCheckboxSelectionComponent();if(e)return this.beans.context.createBean(e),e.init({rowNode:this.rowNode,column:this.column}),e}createDndSource(){const e=this.beans.registry.createDynamicBean("dndSourceComp",!1,this.rowNode,this.column,this.eGui);return e&&this.beans.context.createBean(e),e}registerRowDragger(e,t,n){if(this.customRowDragComp){this.customRowDragComp.setDragElement(e,t);return}const r=this.createRowDragComp(e,t,n);r&&(this.customRowDragComp=r,this.addDestroyFunc(()=>{this.beans.context.destroyBean(r),this.customRowDragComp=null}))}createRowDragComp(e,t,n){var s;const r=(s=this.beans.rowDragSvc)==null?void 0:s.createRowDragCompForCell(this.rowNode,this.column,()=>this.value,e,t,n);if(r)return this.beans.context.createBean(r),r}cellEditorAttached(){this.onEditorAttachedFuncs.forEach(e=>e()),this.onEditorAttachedFuncs=[]}},u2="__ag_grid_instance";function d2(e,t){t[u2]=e.gridInstanceId}function UC(e,t){return h2(e,t.target)}function h2(e,t){let n=t;for(;n;){const r=n[u2];if($e(r))return r===e.gridInstanceId;n=n.parentElement}return!1}function p2(e,t){var n;return((n=sF(e,t.target))==null?void 0:n.cellPosition)??null}function hp(e,t){const n=Vr(e.gos,"normal"),r=t;let s,i;if(r.clientX!=null||r.clientY!=null?(s=r.clientX,i=r.clientY):(s=r.x,i=r.y),n){const o=e.ctrlsSvc.getScrollFeature(),a=o.getVScrollPosition(),l=o.getHScrollPosition();s+=l.left,i+=a.top}return{x:s,y:i}}var oo=(e=>(e[e.ToolPanel=0]="ToolPanel",e[e.HeaderCell=1]="HeaderCell",e[e.RowDrag=2]="RowDrag",e[e.ChartPanel=3]="ChartPanel",e[e.AdvancedFilterBuilder=4]="AdvancedFilterBuilder",e))(oo||{}),_le=class extends be{constructor(){super(...arguments),this.beanName="dragAndDrop",this.dragSourceAndParamsList=[],this.dropTargets=[]}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.dragSvc=e.dragSvc,this.environment=e.environment,this.userCompFactory=e.userCompFactory}addDragSource(e,t=!1){const n={eElement:e.eElement,dragStartPixels:e.dragStartPixels,onDragStart:this.onDragStart.bind(this,e),onDragStop:this.onDragStop.bind(this),onDragging:this.onDragging.bind(this),onDragCancel:this.onDragCancel.bind(this),includeTouch:t};this.dragSourceAndParamsList.push({params:n,dragSource:e}),this.dragSvc.addDragSource(n)}getDragAndDropImageComponent(){const{dragAndDropImageComp:e}=this;return!e||!e.comp?null:e.comp}removeDragSource(e){const{dragSourceAndParamsList:t,dragSvc:n}=this,r=t.find(s=>s.dragSource===e);r&&(n.removeDragSource(r.params),zr(t,r))}destroy(){const{dragSourceAndParamsList:e,dragSvc:t,dropTargets:n}=this;e.forEach(r=>t.removeDragSource(r.params)),e.length=0,n.length=0,this.clearDragAndDropProperties(),super.destroy()}nudge(){this.dragging&&this.onDragging(this.eventLastTime,!0)}onDragStart(e,t){var n;this.dragging=!0,this.dragSource=e,this.eventLastTime=t,this.dragItem=e.getDragItem(),(n=e.onDragStarted)==null||n.call(e),this.createDragAndDropImageComponent()}onDragStop(e){var n,r;(r=(n=this.dragSource)==null?void 0:n.onDragStopped)==null||r.call(n);const{lastDropTarget:t}=this;if(t!=null&&t.onDragStop){const s=this.createDropTargetEvent(t,e,null,null,!1);t.onDragStop(s)}this.clearDragAndDropProperties()}onDragCancel(){var n;const{dragSource:e,lastDropTarget:t}=this;(n=e==null?void 0:e.onDragCancelled)==null||n.call(e),t!=null&&t.onDragCancel&&t.onDragCancel(this.createDropTargetEvent(t,this.eventLastTime,null,null,!1)),this.clearDragAndDropProperties()}clearDragAndDropProperties(){this.eventLastTime=null,this.dragging=!1,this.lastDropTarget=void 0,this.dragItem=null,this.dragSource=null,this.removeDragAndDropImageComponent()}onDragging(e,t=!1){var u,h;const n=this.getHorizontalDirection(e),r=this.getVerticalDirection(e);this.eventLastTime=e,this.positionDragAndDropImageComp(e);const s=this.dropTargets.filter(g=>this.isMouseOnDropTarget(e,g)),i=this.findCurrentDropTarget(e,s),{lastDropTarget:o,dragSource:a,dragAndDropImageComp:l,dragItem:c}=this;if(i!==o){if(this.leaveLastTargetIfExists(e,n,r,t),o!==null&&i===null&&((u=a==null?void 0:a.onGridExit)==null||u.call(a,c)),o===null&&i!==null&&((h=a==null?void 0:a.onGridEnter)==null||h.call(a,c)),this.enterDragTargetIfExists(i,e,n,r,t),i&&l){const{comp:g,promise:m}=l;g?g.setIcon(i.getIconName?i.getIconName():null,!1):m.then(C=>{C&&C.setIcon(i.getIconName?i.getIconName():null,!1)})}this.lastDropTarget=i}else if(i&&i.onDragging){const g=this.createDropTargetEvent(i,e,n,r,t);i.onDragging(g)}}getAllContainersFromDropTarget(e){const t=e.getSecondaryContainers?e.getSecondaryContainers():null,n=[[e.getContainer()]];return t?n.concat(t):n}isMouseOnDropTarget(e,t){const n=this.getAllContainersFromDropTarget(t);let r=!1;const s=(a,l)=>{for(const c of l){const{width:u,height:h,left:g,right:m,top:C,bottom:v}=c.getBoundingClientRect();if(u===0||h===0)return!1;const b=a.clientX>=g&&a.clientX=C&&a.clientYl).indexOf(i)!==-1)return o;return null}enterDragTargetIfExists(e,t,n,r,s){if(e&&e.onDragEnter){const i=this.createDropTargetEvent(e,t,n,r,s);e.onDragEnter(i)}}leaveLastTargetIfExists(e,t,n,r){const{lastDropTarget:s}=this;if(!s)return;if(s.onDragLeave){const o=this.createDropTargetEvent(s,e,t,n,r);s.onDragLeave(o)}const i=this.getDragAndDropImageComponent();i&&i.setIcon(null,!1)}addDropTarget(e){this.dropTargets.push(e)}removeDropTarget(e){this.dropTargets=this.dropTargets.filter(t=>t.getContainer()!==e.getContainer())}hasExternalDropZones(){return this.dropTargets.some(e=>e.external)}findExternalZone(e){return this.dropTargets.filter(n=>n.external).find(n=>n.getContainer()===e.getContainer())||null}isDropZoneWithinThisGrid(e){const n=this.ctrlsSvc.getGridBodyCtrl().eGridBody,{dropZoneTarget:r}=e;return n.contains(r)}getHorizontalDirection(e){var r;const t=(r=this.eventLastTime)==null?void 0:r.clientX,n=e.clientX;return t===n?null:t>n?"left":"right"}getVerticalDirection(e){var r;const t=(r=this.eventLastTime)==null?void 0:r.clientY,n=e.clientY;return t===n?null:t>n?"up":"down"}createDropTargetEvent(e,t,n,r,s){const i=e.getContainer(),o=i.getBoundingClientRect(),{dragItem:a,dragSource:l,gos:c}=this,u=t.clientX-o.left,h=t.clientY-o.top;return c.addGridCommonParams({event:t,x:u,y:h,vDirection:r,hDirection:n,dragSource:l,fromNudge:s,dragItem:a,dropZoneTarget:i})}positionDragAndDropImageComp(e){const t=this.getDragAndDropImageComponent();t&&$R(t.getGui(),e,this.beans)}removeDragAndDropImageComponent(){var t;const{dragAndDropImageComp:e}=this;if(e){const{comp:n}=e;if(n){const r=n.getGui();(t=this.dragAndDropImageParent)==null||t.removeChild(r),this.destroyBean(n)}}this.dragAndDropImageComp=null}createDragAndDropImageComponent(){const{dragSource:e}=this;if(!e)return;const t=Jae(this.userCompFactory,{dragSource:e});if(!t)return;const n=t.newAgStackInstance();this.dragAndDropImageComp={promise:n},n.then(r=>{!r||!this.isAlive()||(this.processDragAndDropImageComponent(r),this.dragAndDropImageComp.comp=r)})}processDragAndDropImageComponent(e){const{dragSource:t,environment:n}=this;if(!t)return;const r=e.getGui();r.style.setProperty("position","absolute"),r.style.setProperty("z-index","9999"),d2(this.gos,r),n.applyThemeClasses(r),e.setIcon(null,!1);let{dragItemName:s}=t;typeof s=="function"&&(s=s()),e.setLabel(s||""),r.style.top="20px",r.style.left="20px";const i=Yv(this.beans);this.dragAndDropImageParent=i,i?i.appendChild(r):ye(54)}registerGridDropTarget(e,t){const n={getContainer:e,isInterestedIn:r=>r===1||r===0,getIconName:()=>"notAllowed"};this.addDropTarget(n),t.addDestroyFunc(()=>this.removeDropTarget(n))}},iF=class{constructor(e){this.tickingInterval=null,this.onScrollCallback=null,this.scrollContainer=e.scrollContainer,this.scrollHorizontally=e.scrollAxis.indexOf("x")!==-1,this.scrollVertically=e.scrollAxis.indexOf("y")!==-1,this.scrollByTick=e.scrollByTick!=null?e.scrollByTick:20,e.onScrollCallback&&(this.onScrollCallback=e.onScrollCallback),this.scrollVertically&&(this.getVerticalPosition=e.getVerticalPosition,this.setVerticalPosition=e.setVerticalPosition),this.scrollHorizontally&&(this.getHorizontalPosition=e.getHorizontalPosition,this.setHorizontalPosition=e.setHorizontalPosition),this.shouldSkipVerticalScroll=e.shouldSkipVerticalScroll||(()=>!1),this.shouldSkipHorizontalScroll=e.shouldSkipHorizontalScroll||(()=>!1)}check(e,t=!1){const n=t||this.shouldSkipVerticalScroll();if(n&&this.shouldSkipHorizontalScroll())return;const r=this.scrollContainer.getBoundingClientRect(),s=this.scrollByTick;this.tickLeft=e.clientXr.right-s,this.tickUp=e.clientYr.bottom-s&&!n,this.tickLeft||this.tickRight||this.tickUp||this.tickDown?this.ensureTickingStarted():this.ensureCleared()}ensureTickingStarted(){this.tickingInterval===null&&(this.tickingInterval=window.setInterval(this.doTick.bind(this),100),this.tickCount=0)}doTick(){this.tickCount++;const e=this.tickCount>20?200:this.tickCount>10?80:40;if(this.scrollVertically){const t=this.getVerticalPosition();this.tickUp&&this.setVerticalPosition(t-e),this.tickDown&&this.setVerticalPosition(t+e)}if(this.scrollHorizontally){const t=this.getHorizontalPosition();this.tickLeft&&this.setHorizontalPosition(t-e),this.tickRight&&this.setHorizontalPosition(t+e)}this.onScrollCallback&&this.onScrollCallback()}ensureCleared(){this.tickingInterval&&(window.clearInterval(this.tickingInterval),this.tickingInterval=null)}};function el(e){const{rowIndex:t,rowPinned:n,column:r}=e;return`${t}.${n??"null"}.${r.getId()}`}function md(e,t){const n=e.column===t.column,r=e.rowPinned===t.rowPinned,s=e.rowIndex===t.rowIndex;return n&&r&&s}function ss(e,t){switch(e.rowPinned){case"top":if(t.rowPinned!=="top")return!0;break;case"bottom":if(t.rowPinned!=="bottom")return!1;break;default:if($e(t.rowPinned))return t.rowPinned!=="top";break}return e.rowIndex{const s=r.gridBodyCtrl;this.autoScrollService=new iF({scrollContainer:s.eBodyViewport,scrollAxis:"y",getVerticalPosition:()=>s.scrollFeature.getVScrollPosition().top,setVerticalPosition:i=>s.scrollFeature.setVerticalScrollPosition(i),onScrollCallback:()=>{this.onDragging(this.lastDraggingEvent)}})})}getContainer(){return this.eContainer}isInterestedIn(e){return e===2}getIconName(){return this.gos.get("rowDragManaged")&&this.shouldPreventRowMove()?"notAllowed":"move"}shouldPreventRowMove(){const{rowGroupColsSvc:e,filterManager:t,sortSvc:n}=this.beans;return!!(((e==null?void 0:e.columns)??[]).length||(t==null?void 0:t.isAnyFilterPresent())||(n==null?void 0:n.isSortActive()))}getRowNodes(e){var r;if(!this.isFromThisGrid(e))return e.dragItem.rowNodes||[];const t=e.dragItem.rowNode;if(this.gos.get("rowDragMultiRow")){const s=[...((r=this.beans.selectionSvc)==null?void 0:r.getSelectedNodes())??[]].sort((i,o)=>i.rowIndex==null||o.rowIndex==null?0:this.getRowIndexNumber(i)-this.getRowIndexNumber(o));if(s.indexOf(t)!==-1)return s}return[t]}onDragEnter(e){e.dragItem.rowNodes=this.getRowNodes(e),this.dispatchGridEvent("rowDragEnter",e),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!0)}),this.onEnterOrDragging(e)}onDragging(e){this.onEnterOrDragging(e)}isFromThisGrid(e){const{dragSourceDomDataKey:t}=e.dragSource;return t===this.gos.getDomDataKey()}onEnterOrDragging(e){this.dispatchGridEvent("rowDragMove",e),this.lastDraggingEvent=e;const t=hp(this.beans,e).y;this.gos.get("rowDragManaged")&&this.doManagedDrag(e,t),this.autoScrollService.check(e.event)}doManagedDrag(e,t){const{dragAndDrop:n,gos:r}=this.beans,s=this.isFromThisGrid(e),i=r.get("rowDragManaged"),o=e.dragItem.rowNodes;i&&this.shouldPreventRowMove()||(r.get("suppressMoveWhenRowDragging")||!s?n.isDropZoneWithinThisGrid(e)&&this.clientSideRowModel.highlightRowAtPixel(o[0],t):this.moveRows(o,t))}getRowIndexNumber(e){const t=e.getRowIndexString();return parseInt(Pt(t.split("-")),10)}moveRowAndClearHighlight(e){const t=this.clientSideRowModel,n=t.getLastHighlightedRowNode(),r=n&&n.highlighted==="Below",s=hp(this.beans,e).y,i=e.dragItem.rowNodes;let o=r?1:0;if(this.isFromThisGrid(e))i.forEach(a=>{a.rowTop!t.getRowNode((a==null?void 0:a({data:c.data,level:0,rowPinned:c.rowPinned}))??c.data.id)).map(c=>c.data),addIndex:l})}this.clearRowHighlight()}clearRowHighlight(){this.clientSideRowModel.highlightRowAtPixel(null)}moveRows(e,t,n=0){const r=this.beans.focusSvc,s=r.getFocusedCell(),i=s&&So(this.beans,s);this.clientSideRowModel.ensureRowsAtPixel(e,t,n)&&(i?i.focusCell():r.clearFocusedCell())}addRowDropZone(e){if(!e.getContainer()){ye(55);return}const t=this.beans.dragAndDrop;if(t.findExternalZone(e)){ye(56);return}let n={getContainer:e.getContainer};e.fromGrid?n=e:(e.onDragEnter&&(n.onDragEnter=s=>{e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",s))}),e.onDragLeave&&(n.onDragLeave=s=>{e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",s))}),e.onDragging&&(n.onDragging=s=>{e.onDragging(this.draggingToRowDragEvent("rowDragMove",s))}),e.onDragStop&&(n.onDragStop=s=>{e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",s))}),e.onDragCancel&&(n.onDragCancel=s=>{e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",s))}));const r={isInterestedIn:s=>s===2,getIconName:()=>"move",external:!0,...n};t.addDropTarget(r),this.addDestroyFunc(()=>t.removeDropTarget(r))}getRowDropZone(e){const t=this.getContainer.bind(this),n=this.onDragEnter.bind(this),r=this.onDragLeave.bind(this),s=this.onDragging.bind(this),i=this.onDragStop.bind(this),o=this.onDragCancel.bind(this);let a;return e?a={getContainer:t,onDragEnter:e.onDragEnter?l=>{n(l),e.onDragEnter(this.draggingToRowDragEvent("rowDragEnter",l))}:n,onDragLeave:e.onDragLeave?l=>{r(l),e.onDragLeave(this.draggingToRowDragEvent("rowDragLeave",l))}:r,onDragging:e.onDragging?l=>{s(l),e.onDragging(this.draggingToRowDragEvent("rowDragMove",l))}:s,onDragStop:e.onDragStop?l=>{i(l),e.onDragStop(this.draggingToRowDragEvent("rowDragEnd",l))}:i,onDragCancel:e.onDragCancel?l=>{o(l),e.onDragCancel(this.draggingToRowDragEvent("rowDragCancel",l))}:o,fromGrid:!0}:a={getContainer:t,onDragEnter:n,onDragLeave:r,onDragging:s,onDragStop:i,onDragCancel:o,fromGrid:!0},a}draggingToRowDragEvent(e,t){const n=this.beans,{pageBounds:r,rowModel:s,gos:i}=n,o=hp(n,t).y,a=o>r.getCurrentPageHeight();let l=-1,c;return a||(l=s.getRowIndexAtPixel(o),c=s.getRow(l)),i.addGridCommonParams({type:e,event:t.event,node:t.dragItem.rowNode,nodes:t.dragItem.rowNodes,overIndex:l,overNode:c,y:o,vDirection:t.vDirection})}dispatchGridEvent(e,t){const n=this.draggingToRowDragEvent(e,t);this.eventSvc.dispatchEvent(n)}onDragLeave(e){this.dispatchGridEvent("rowDragLeave",e),this.stopDragging(e),this.gos.get("rowDragManaged")&&this.clearRowHighlight()}onDragStop(e){this.dispatchGridEvent("rowDragEnd",e),this.stopDragging(e);const{dragAndDrop:t,gos:n}=this.beans;n.get("rowDragManaged")&&(n.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.moveRowAndClearHighlight(e)}onDragCancel(e){this.dispatchGridEvent("rowDragCancel",e),this.stopDragging(e);const{dragAndDrop:t,gos:n}=this.beans;n.get("rowDragManaged")&&(n.get("suppressMoveWhenRowDragging")||!this.isFromThisGrid(e))&&t.isDropZoneWithinThisGrid(e)&&this.clearRowHighlight()}stopDragging(e){this.autoScrollService.ensureCleared(),this.getRowNodes(e).forEach(t=>{this.setRowNodeDragging(t,!1)})}setRowNodeDragging(e,t){e.dragging!==t&&(e.dragging=t,e.dispatchRowEvent("draggingChanged"))}};function g2(e,t,n){if(n===0)return!1;const r=Math.abs(e.clientX-t.clientX),s=Math.abs(e.clientY-t.clientY);return Math.max(r,s)<=n}var qle=class extends be{constructor(){super(...arguments),this.beanName="dragSvc",this.dragEndFunctions=[],this.dragSources=[]}destroy(){const{dragSources:e}=this;e.forEach(this.removeListener.bind(this)),e.length=0,super.destroy()}removeListener(e){const t=e.dragSource.eElement,n=e.mouseDownListener;if(t.removeEventListener("mousedown",n),e.touchEnabled){const r=e.touchStartListener;t.removeEventListener("touchstart",r,{passive:!0})}}removeDragSource(e){const{dragSources:t}=this,n=t.find(r=>r.dragSource===e);n&&(this.removeListener(n),zr(t,n))}addDragSource(e){const t=this.onMouseDown.bind(this,e),{eElement:n,includeTouch:r,stopPropagationForTouch:s}=e;n.addEventListener("mousedown",t);let i=null;const o=this.gos.get("suppressTouch");r&&!o&&(i=a=>{_P(a.target)||(s&&a.stopPropagation(),this.onTouchStart(e,a))},n.addEventListener("touchstart",i,{passive:!1})),this.dragSources.push({dragSource:e,mouseDownListener:t,touchStartListener:i,touchEnabled:!!r})}onTouchStart(e,t){this.currentDragParams=e,this.dragging=!1;const n=t.touches[0];this.touchLastTime=n,this.touchStart=n;const r=l=>this.onTouchMove(l,e.eElement),s=l=>this.onTouchUp(l,e.eElement),i=l=>{l.cancelable&&l.preventDefault()},o=t.target,a=[{target:hd(this.beans),type:"touchmove",listener:i,options:{passive:!1}},{target:o,type:"touchmove",listener:r,options:{passive:!0}},{target:o,type:"touchend",listener:s,options:{passive:!0}},{target:o,type:"touchcancel",listener:s,options:{passive:!0}}];this.addTemporaryEvents(a),e.dragStartPixels===0&&this.onCommonMove(n,this.touchStart,e.eElement)}onMouseDown(e,t){const n=t;if(e.skipMouseEvent&&e.skipMouseEvent(t)||n._alreadyProcessedByDragService||(n._alreadyProcessedByDragService=!0,t.button!==0))return;this.shouldPreventMouseEvent(t)&&t.preventDefault(),this.currentDragParams=e,this.dragging=!1,this.mouseStartEvent=t,this.startTarget=t.target;const r=c=>this.onMouseMove(c,e.eElement),s=c=>this.onMouseUp(c,e.eElement),i=c=>c.preventDefault(),o=c=>{c.key===se.ESCAPE&&this.cancelDrag(e.eElement)},a=hd(this.beans),l=[{target:a,type:"mousemove",listener:r},{target:a,type:"mouseup",listener:s},{target:a,type:"contextmenu",listener:i},{target:a,type:"keydown",listener:o}];this.addTemporaryEvents(l),e.dragStartPixels===0&&this.onMouseMove(t,e.eElement)}addTemporaryEvents(e){e.forEach(t=>{const{target:n,type:r,listener:s,options:i}=t;n.addEventListener(r,s,i)}),this.dragEndFunctions.push(()=>{e.forEach(t=>{const{target:n,type:r,listener:s,options:i}=t;n.removeEventListener(r,s,i)})})}isEventNearStartEvent(e,t){const{dragStartPixels:n}=this.currentDragParams,r=$e(n)?n:4;return g2(e,t,r)}getFirstActiveTouch(e){for(let t=0;t{const o=i.target,a=o==null?void 0:o.tagName.toLocaleLowerCase();return!!(a!=null&&a.match("^a$|textarea|input|select|button"))};return n&&r&&e.cancelable&&UC(t,e)&&!s(e)}onTouchUp(e,t){let n=this.getFirstActiveTouch(e.changedTouches);n||(n=this.touchLastTime),this.onUpCommon(n,t)}onMouseUp(e,t){this.onUpCommon(e,t)}onUpCommon(e,t){this.dragging&&(this.dragging=!1,this.currentDragParams.onDragStop(e),this.eventSvc.dispatchEvent({type:"dragStopped",target:t})),this.resetDragProperties()}cancelDrag(e){var t,n;this.eventSvc.dispatchEvent({type:"dragCancelled",target:e}),(n=(t=this.currentDragParams)==null?void 0:t.onDragCancel)==null||n.call(t),this.resetDragProperties()}resetDragProperties(){this.mouseStartEvent=null,this.startTarget=null,this.touchStart=null,this.touchLastTime=null,this.currentDragParams=null;const{dragEndFunctions:e}=this;e.forEach(t=>t()),e.length=0}};function f2(e,t){return e+"_"+t}function rr(e){return e instanceof m2}var m2=class extends be{constructor(e,t,n,r){super(),this.providedColumnGroup=e,this.groupId=t,this.partId=n,this.pinned=r,this.isColumn=!1,this.displayedChildren=[],this.autoHeaderHeight=null,this.parent=null}reset(){this.parent=null,this.children=null,this.displayedChildren=null}getParent(){return this.parent}getUniqueId(){return f2(this.groupId,this.partId)}isEmptyGroup(){return this.displayedChildren.length===0}isMoving(){const e=this.getProvidedColumnGroup().getLeafColumns();return!e||e.length===0?!1:e.every(t=>t.isMoving())}checkLeft(){if(this.displayedChildren.forEach(e=>{rr(e)&&e.checkLeft()}),this.displayedChildren.length>0)if(this.gos.get("enableRtl")){const t=Pt(this.displayedChildren).getLeft();this.setLeft(t)}else{const e=this.displayedChildren[0].getLeft();this.setLeft(e)}else this.setLeft(null)}getLeft(){return this.left}getOldLeft(){return this.oldLeft}setLeft(e){this.oldLeft=this.left,this.left!==e&&(this.left=e,this.dispatchLocalEvent({type:"leftChanged"}))}getPinned(){return this.pinned}getGroupId(){return this.groupId}getPartId(){return this.partId}getActualWidth(){var t;let e=0;return(t=this.displayedChildren)==null||t.forEach(n=>{e+=n.getActualWidth()}),e}isResizable(){if(!this.displayedChildren)return!1;let e=!1;return this.displayedChildren.forEach(t=>{t.isResizable()&&(e=!0)}),e}getMinWidth(){let e=0;return this.displayedChildren.forEach(t=>{e+=t.getMinWidth()}),e}addChild(e){this.children||(this.children=[]),this.children.push(e)}getDisplayedChildren(){return this.displayedChildren}getLeafColumns(){const e=[];return this.addLeafColumns(e),e}getDisplayedLeafColumns(){const e=[];return this.addDisplayedLeafColumns(e),e}getDefinition(){return this.providedColumnGroup.getColGroupDef()}getColGroupDef(){return this.providedColumnGroup.getColGroupDef()}isPadding(){return this.providedColumnGroup.isPadding()}isExpandable(){return this.providedColumnGroup.isExpandable()}isExpanded(){return this.providedColumnGroup.isExpanded()}setExpanded(e){this.providedColumnGroup.setExpanded(e)}isAutoHeaderHeight(){var e;return!!((e=this.getColGroupDef())!=null&&e.autoHeaderHeight)}getAutoHeaderHeight(){return this.autoHeaderHeight}setAutoHeaderHeight(e){const t=e!==this.autoHeaderHeight;return this.autoHeaderHeight=e,t}addDisplayedLeafColumns(e){this.displayedChildren.forEach(t=>{Do(t)?e.push(t):rr(t)&&t.addDisplayedLeafColumns(e)})}addLeafColumns(e){this.children.forEach(t=>{Do(t)?e.push(t):rr(t)&&t.addLeafColumns(e)})}getChildren(){return this.children}getColumnGroupShow(){return this.providedColumnGroup.getColumnGroupShow()}getProvidedColumnGroup(){return this.providedColumnGroup}getPaddingLevel(){const e=this.getParent();return!this.isPadding()||!e||!e.isPadding()?0:1+e.getPaddingLevel()}calculateDisplayedColumns(){this.displayedChildren=[];let e=this;for(;e!=null&&e.isPadding();)e=e.getParent();if(!(e?e.getProvidedColumnGroup().isExpandable():!1)){this.displayedChildren=this.children,this.dispatchLocalEvent({type:"displayedChildrenChanged"});return}this.children.forEach(n=>{if(rr(n)&&(!n.displayedChildren||!n.displayedChildren.length))return;switch(n.getColumnGroupShow()){case"open":e.getProvidedColumnGroup().isExpanded()&&this.displayedChildren.push(n);break;case"closed":e.getProvidedColumnGroup().isExpanded()||this.displayedChildren.push(n);break;default:this.displayedChildren.push(n);break}}),this.dispatchLocalEvent({type:"displayedChildrenChanged"})}},jp="row-group-",C2="t-",v2="b-",Xle=0,Ks=class{constructor(e){this.master=!1,this.detail=void 0,this.rowIndex=null,this.key=null,this.sourceRowIndex=-1,this.childrenMapped={},this.treeNode=null,this.treeNodeFlags=0,this.displayed=!1,this.rowTop=null,this.oldRowTop=null,this.selectable=!0,this.__objectId=Xle++,this.alreadyRendered=!1,this.highlighted=null,this.hovered=!1,this.__selected=!1,this.beans=e}setData(e){this.setDataCommon(e,!1)}updateData(e){this.setDataCommon(e,!0)}setDataCommon(e,t){var s,i,o;const n=this.data;this.data=e,(s=this.beans.valueCache)==null||s.onDataChanged(),this.updateDataOnDetailNode(),(i=this.beans.selectionSvc)==null||i.updateRowSelectable(this),this.resetQuickFilterAggregateText();const r=this.createDataChangedEvent(e,n,t);(o=this.__localEventService)==null||o.dispatchEvent(r)}updateDataOnDetailNode(){this.detailNode&&(this.detailNode.data=this.data)}createDataChangedEvent(e,t,n){return{type:"dataChanged",node:this,oldData:t,newData:e,update:n}}getRowIndexString(){return this.rowIndex==null?(Wt(13),null):this.rowPinned==="top"?C2+this.rowIndex:this.rowPinned==="bottom"?v2+this.rowIndex:this.rowIndex.toString()}setDataAndId(e,t){var o,a;const{selectionSvc:n}=this.beans,r=(o=n==null?void 0:n.createDaemonNode)==null?void 0:o.call(n,this),s=this.data;this.data=e,this.updateDataOnDetailNode(),this.setId(t),n&&(n.updateRowSelectable(this),n.syncInRowNode(this,r));const i=this.createDataChangedEvent(e,s,!1);(a=this.__localEventService)==null||a.dispatchEvent(i)}setId(e){var n;const t=da(this.beans.gos);if(t)if(this.data){const r=((n=this.parent)==null?void 0:n.getRoute())??[];this.id=t({data:this.data,parentKeys:r.length>0?r:void 0,level:this.level,rowPinned:this.rowPinned}),this.id.startsWith(jp)&&Wt(14,{groupPrefix:jp})}else this.id=void 0;else this.id=e}setRowTop(e){this.oldRowTop=this.rowTop,this.rowTop!==e&&(this.rowTop=e,this.dispatchRowEvent("topChanged"),this.setDisplayed(e!==null))}clearRowTopAndRowIndex(){this.oldRowTop=null,this.setRowTop(null),this.setRowIndex(null)}setHovered(e){this.hovered=e}isHovered(){return this.hovered}setRowHeight(e,t=!1){this.rowHeight=e,this.rowHeightEstimated=t,this.dispatchRowEvent("heightChanged")}setExpanded(e,t,n){var r;(r=this.beans.expansionSvc)==null||r.setExpanded(this,e,t,n)}setDataValue(e,t,n){const{colModel:r,valueSvc:s,gos:i,selectionSvc:o}=this.beans,a=typeof e!="string"?e:r.getCol(e)??r.getColDefCol(e);if(!a)return!1;const l=s.getValueForDisplay(a,this);if(i.get("readOnlyEdit")){const{beans:{eventSvc:u},data:h,rowIndex:g,rowPinned:m}=this;return u.dispatchEvent({type:"cellEditRequest",event:null,rowIndex:g,rowPinned:m,column:a,colDef:a.colDef,data:h,node:this,oldValue:l,newValue:t,value:t,source:n}),!1}const c=s.setValue(this,a,t,n);return this.dispatchCellChangedEvent(a,t,l),o==null||o.updateRowSelectable(this),c}updateHasChildren(){let e=this.group&&!this.footer||this.childrenAfterGroup&&this.childrenAfterGroup.length>0;const{rowChildrenSvc:t}=this.beans;t&&(e=t.getHasChildrenValue(this)),e!==this.__hasChildren&&(this.__hasChildren=!!e,this.dispatchRowEvent("hasChildrenChanged"))}hasChildren(){return this.__hasChildren==null&&this.updateHasChildren(),this.__hasChildren}dispatchCellChangedEvent(e,t,n){var s;const r={type:"cellChanged",node:this,column:e,newValue:t,oldValue:n};(s=this.__localEventService)==null||s.dispatchEvent(r)}resetQuickFilterAggregateText(){this.quickFilterAggregateText=null}isExpandable(){var e;return((e=this.beans.expansionSvc)==null?void 0:e.isExpandable(this))??!1}isSelected(){return this.footer?this.sibling.isSelected():this.__selected}depthFirstSearch(e){var t;(t=this.childrenAfterGroup)==null||t.forEach(n=>n.depthFirstSearch(e)),e(this)}dispatchRowEvent(e){var t;(t=this.__localEventService)==null||t.dispatchEvent({type:e,node:this})}setSelected(e,t=!1,n="api"){var r;(r=this.beans.selectionSvc)==null||r.setNodesSelected({nodes:[this],newValue:e,clearSelection:t,source:n})}isRowPinned(){return!!this.rowPinned}addEventListener(e,t){var r,s,i,o;(r=this.beans.validation)==null||r.checkRowEvents(e),this.__localEventService||(this.__localEventService=new Al),this.frameworkEventListenerService=(i=(s=this.beans.frameworkOverrides).createLocalEventListenerWrapper)==null?void 0:i.call(s,this.frameworkEventListenerService,this.__localEventService);const n=((o=this.frameworkEventListenerService)==null?void 0:o.wrap(t))??t;this.__localEventService.addEventListener(e,n)}removeEventListener(e,t){var r;if(!this.__localEventService)return;const n=((r=this.frameworkEventListenerService)==null?void 0:r.unwrap(t))??t;this.__localEventService.removeEventListener(e,n),this.__localEventService.noRegisteredListenersExist()&&(this.__localEventService=null)}isFullWidthCell(){if(ye(61),this.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this}):!1}getRoute(){if(this.level===-1)return[];if(this.key==null)return;const e=[];let t=this;for(;t&&t.key!=null;)e.push(t.key),t=t.parent;return e.reverse()}setFirstChild(e){this.firstChild!==e&&(this.firstChild=e,this.dispatchRowEvent("firstChildChanged"))}setDisplayed(e){this.displayed!==e&&(this.displayed=e,this.dispatchRowEvent("displayedChanged"))}setRowIndex(e){this.rowIndex!==e&&(this.rowIndex=e,this.dispatchRowEvent("rowIndexChanged"))}setAllChildrenCount(e){this.allChildrenCount!==e&&(this.allChildrenCount=e,this.dispatchRowEvent("allChildrenCountChanged"))}setUiLevel(e){this.uiLevel!==e&&(this.uiLevel=e,this.dispatchRowEvent("uiLevelChanged"))}};function y2(e,t,n){return t.addGridCommonParams({type:n,node:e,data:e.data,rowIndex:e.rowIndex,rowPinned:e.rowPinned})}var ry=class extends He{constructor(e,t){super('
'),this.column=e,this.source=t,this.filterWrapper=null}postConstruct(){this.createFilter(!0),this.addManagedEventListeners({filterDestroyed:this.onFilterDestroyed.bind(this)})}hasFilter(){return!!this.filterWrapper}getFilter(){var e;return((e=this.filterWrapper)==null?void 0:e.filterPromise)??null}afterInit(){var e,t;return((t=(e=this.filterWrapper)==null?void 0:e.filterPromise)==null?void 0:t.then(()=>{}))??Lt.resolve()}afterGuiAttached(e){var t,n;(n=(t=this.filterWrapper)==null?void 0:t.filterPromise)==null||n.then(r=>{var s;(s=r==null?void 0:r.afterGuiAttached)==null||s.call(r,e)})}afterGuiDetached(){var e,t;(t=(e=this.filterWrapper)==null?void 0:e.filterPromise)==null||t.then(n=>{var r;(r=n==null?void 0:n.afterGuiDetached)==null||r.call(n)})}createFilter(e){var r,s;const{column:t,source:n}=this;this.filterWrapper=((r=this.beans.filterManager)==null?void 0:r.getOrCreateFilterWrapper(t))??null,(s=this.filterWrapper)!=null&&s.filterPromise&&this.filterWrapper.filterPromise.then(i=>{const o=i.getGui();$e(o)||ye(69,{guiFromFilter:o}),this.appendChild(o),e&&this.eventSvc.dispatchEvent({type:"filterOpened",column:t,source:n,eGui:this.getGui()})})}onFilterDestroyed(e){(e.source==="api"||e.source==="paramsUpdated")&&e.column.getId()===this.column.getId()&&this.beans.colModel.getColDefCol(this.column)&&(ln(this.getGui()),this.createFilter())}destroy(){this.filterWrapper=null,super.destroy()}},b2="ag-resizer-wrapper",Wa=(e,t)=>`
`,Yle=`
${Wa("eTopLeft","topLeft")} ${Wa("eTop","top")} ${Wa("eTopRight","topRight")} ${Wa("eRight","right")} ${Wa("eBottomRight","bottomRight")} ${Wa("eBottom","bottom")} ${Wa("eBottomLeft","bottomLeft")} ${Wa("eLeft","left")}
`,sy=class extends be{constructor(e,t){super(),this.element=e,this.dragStartPosition={x:0,y:0},this.position={x:0,y:0},this.lastSize={width:-1,height:-1},this.positioned=!1,this.resizersAdded=!1,this.resizeListeners=[],this.boundaryEl=null,this.isResizing=!1,this.isMoving=!1,this.resizable={},this.movable=!1,this.currentResizer=null,this.config=Object.assign({},{popup:!1},t)}wireBeans(e){this.popupSvc=e.popupSvc,this.dragSvc=e.dragSvc}center(){const{clientHeight:e,clientWidth:t}=this.offsetParent,n=t/2-this.getWidth()/2,r=e/2-this.getHeight()/2;this.offsetElement(n,r)}initialisePosition(){if(this.positioned)return;const{centered:e,forcePopupParentAsOffsetParent:t,minWidth:n,width:r,minHeight:s,height:i,x:o,y:a}=this.config;this.offsetParent||this.setOffsetParent();let l=0,c=0;const u=us(this.element);if(u){const h=this.findBoundaryElement(),g=window.getComputedStyle(h);if(g.minWidth!=null){const m=h.offsetWidth-this.element.offsetWidth;c=parseInt(g.minWidth,10)-m}if(g.minHeight!=null){const m=h.offsetHeight-this.element.offsetHeight;l=parseInt(g.minHeight,10)-m}}if(this.minHeight=s||l,this.minWidth=n||c,r&&this.setWidth(r),i&&this.setHeight(i),(!r||!i)&&this.refreshSize(),e)this.center();else if(o||a)this.offsetElement(o,a);else if(u&&t){let h=this.boundaryEl,g=!0;if(h||(h=this.findBoundaryElement(),g=!1),h){const m=parseFloat(h.style.top),C=parseFloat(h.style.left);g?this.offsetElement(isNaN(C)?0:C,isNaN(m)?0:m):this.setPosition(C,m)}}this.positioned=!!this.offsetParent}isPositioned(){return this.positioned}getPosition(){return this.position}setMovable(e,t){var r,s;if(!this.config.popup||e===this.movable)return;this.movable=e;const n=this.moveElementDragListener||{eElement:t,onDragStart:this.onMoveStart.bind(this),onDragging:this.onMove.bind(this),onDragStop:this.onMoveEnd.bind(this)};e?((r=this.dragSvc)==null||r.addDragSource(n),this.moveElementDragListener=n):((s=this.dragSvc)==null||s.removeDragSource(n),this.moveElementDragListener=void 0)}setResizable(e){if(this.clearResizeListeners(),e?this.addResizers():this.removeResizers(),typeof e=="boolean"){if(e===!1)return;e={topLeft:e,top:e,topRight:e,right:e,bottomRight:e,bottom:e,bottomLeft:e,left:e}}Object.keys(e).forEach(t=>{var o;const r=!!e[t],s=this.getResizerElement(t),i={dragStartPixels:0,eElement:s,onDragStart:a=>this.onResizeStart(a,t),onDragging:this.onResize.bind(this),onDragStop:a=>this.onResizeEnd(a,t)};(r||!this.isAlive()&&!r)&&(r?((o=this.dragSvc)==null||o.addDragSource(i),this.resizeListeners.push(i),s.style.pointerEvents="all"):s.style.pointerEvents="none",this.resizable[t]=r)})}removeSizeFromEl(){this.element.style.removeProperty("height"),this.element.style.removeProperty("width"),this.element.style.removeProperty("flex")}restoreLastSize(){this.element.style.flex="0 0 auto";const{height:e,width:t}=this.lastSize;t!==-1&&(this.element.style.width=`${t}px`),e!==-1&&(this.element.style.height=`${e}px`)}getHeight(){return this.element.offsetHeight}setHeight(e){const{popup:t}=this.config,n=this.element;let r=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)cp(n,e),e=qv(n),r=!0;else if(e=Math.max(this.minHeight,e),this.positioned){const s=this.getAvailableHeight();s&&e>s&&(e=s)}this.getHeight()!==e&&(r?(n.style.maxHeight="unset",n.style.minHeight="unset"):t?cp(n,e):(n.style.height=`${e}px`,n.style.flex="0 0 auto",this.lastSize.height=typeof e=="number"?e:parseFloat(e)))}getAvailableHeight(){const{popup:e,forcePopupParentAsOffsetParent:t}=this.config;this.positioned||this.initialisePosition();const{clientHeight:n}=this.offsetParent;if(!n)return null;const r=this.element.getBoundingClientRect(),s=this.offsetParent.getBoundingClientRect(),i=e?this.position.y:r.top,o=e?0:s.top;let a=0;if(t){const c=this.element.parentElement;if(c){const{bottom:u}=c.getBoundingClientRect();a=u-r.bottom}}return n+o-i-a}getWidth(){return this.element.offsetWidth}setWidth(e){const t=this.element,{popup:n}=this.config;let r=!1;if(typeof e=="string"&&e.indexOf("%")!==-1)Zi(t,e),e=Lc(t),r=!0;else if(this.positioned){e=Math.max(this.minWidth,e);const{clientWidth:s}=this.offsetParent,i=n?this.position.x:this.element.getBoundingClientRect().left;s&&e+i>s&&(e=s-i)}this.getWidth()!==e&&(r?(t.style.maxWidth="unset",t.style.minWidth="unset"):this.config.popup?Zi(t,e):(t.style.width=`${e}px`,t.style.flex=" unset",this.lastSize.width=typeof e=="number"?e:parseFloat(e)))}offsetElement(e=0,t=0){var s;const{forcePopupParentAsOffsetParent:n}=this.config,r=n?this.boundaryEl:this.element;r&&((s=this.popupSvc)==null||s.positionPopup({ePopup:r,keepWithinBounds:!0,skipObserver:this.movable||this.isResizable(),updatePosition:()=>({x:e,y:t})}),this.setPosition(parseFloat(r.style.left),parseFloat(r.style.top)))}constrainSizeToAvailableHeight(e){var n;if(!this.config.forcePopupParentAsOffsetParent)return;const t=()=>{const r=this.getAvailableHeight();this.element.style.setProperty("max-height",`${r}px`)};e&&this.popupSvc?this.resizeObserverSubscriber=di(this.beans,(n=this.popupSvc)==null?void 0:n.getPopupParent(),t):(this.element.style.removeProperty("max-height"),this.resizeObserverSubscriber&&(this.resizeObserverSubscriber(),this.resizeObserverSubscriber=void 0))}setPosition(e,t){this.position.x=e,this.position.y=t}updateDragStartPosition(e,t){this.dragStartPosition={x:e,y:t}}calculateMouseMovement(e){const{e:t,isLeft:n,isTop:r,anywhereWithin:s,topBuffer:i}=e,o=t.clientX-this.dragStartPosition.x,a=t.clientY-this.dragStartPosition.y,l=this.shouldSkipX(t,!!n,!!s,o)?0:o,c=this.shouldSkipY(t,!!r,i,a)?0:a;return{movementX:l,movementY:c}}shouldSkipX(e,t,n,r){const s=this.element.getBoundingClientRect(),i=this.offsetParent.getBoundingClientRect(),o=this.boundaryEl.getBoundingClientRect(),a=this.config.popup?this.position.x:s.left;let l=a<=0&&i.left>=e.clientX||i.right<=e.clientX&&i.right<=o.right;return l?!0:(t?l=r<0&&e.clientX>a+i.left||r>0&&e.clientXo.right||r>0&&e.clientXo.right||r>0&&e.clientX=e.clientY||i.bottom<=e.clientY&&i.bottom<=o.bottom;return l?!0:(t?l=r<0&&e.clientY>a+i.top+n||r>0&&e.clientYo.bottom||r>0&&e.clientY!n.classList.contains("ag-hidden")):null}getMinSizeOfSiblings(){const e=this.getSiblings()||[];let t=0,n=0;for(let r=0;re)}onResize(e){if(!this.isResizing||!this.currentResizer)return;const{popup:t,forcePopupParentAsOffsetParent:n}=this.config,{isTop:r,isRight:s,isBottom:i,isLeft:o}=this.currentResizer,a=s||o,l=i||r,{movementX:c,movementY:u}=this.calculateMouseMovement({e,isLeft:o,isTop:r}),h=this.position.x,g=this.position.y;let m=0,C=0;if(a&&c){const v=o?-1:1,b=this.getWidth(),w=b+c*v;let S=!1;o&&(m=b-w,(h+m<=0||w<=this.minWidth)&&(S=!0,m=0)),S||this.setWidth(w)}if(l&&u){const v=r?-1:1,b=this.getHeight(),w=b+u*v;let S=!1;r?(C=b-w,(g+C<=0||w<=this.minHeight)&&(S=!0,C=0)):!this.config.popup&&!this.config.forcePopupParentAsOffsetParent&&bthis.element.parentElement.offsetHeight&&(S=!0),S||this.setHeight(w)}this.updateDragStartPosition(e.clientX,e.clientY),((t||n)&&m||C)&&this.offsetElement(h+m,g+C)}onResizeEnd(e,t){this.isResizing=!1,this.currentResizer=null,this.boundaryEl=null,this.element.classList.remove("ag-resizing"),this.resizerMap[t].element.classList.remove("ag-active"),this.dispatchLocalEvent({type:"resize"})}refreshSize(){const e=this.element;this.config.popup&&(this.config.width||this.setWidth(e.offsetWidth),this.config.height||this.setHeight(e.offsetHeight))}onMoveStart(e){this.boundaryEl=this.findBoundaryElement(),this.positioned||this.initialisePosition(),this.isMoving=!0,this.element.classList.add("ag-moving"),this.updateDragStartPosition(e.clientX,e.clientY)}onMove(e){if(!this.isMoving)return;const{x:t,y:n}=this.position;let r;this.config.calculateTopBuffer&&(r=this.config.calculateTopBuffer());const{movementX:s,movementY:i}=this.calculateMouseMovement({e,isTop:!0,anywhereWithin:!0,topBuffer:r});this.offsetElement(t+s,n+i),this.updateDragStartPosition(e.clientX,e.clientY)}onMoveEnd(){this.isMoving=!1,this.boundaryEl=null,this.element.classList.remove("ag-moving")}setOffsetParent(){this.config.forcePopupParentAsOffsetParent&&this.popupSvc?this.offsetParent=this.popupSvc.getPopupParent():this.offsetParent=this.element.offsetParent}findBoundaryElement(){let e=this.element;for(;e;){if(window.getComputedStyle(e).position!=="static")return e;e=e.parentElement}return this.element}clearResizeListeners(){var e;for(;this.resizeListeners.length;){const t=this.resizeListeners.pop();(e=this.dragSvc)==null||e.removeDragSource(t)}}destroy(){var e;super.destroy(),this.moveElementDragListener&&((e=this.dragSvc)==null||e.removeDragSource(this.moveElementDragListener)),this.constrainSizeToAvailableHeight(!1),this.clearResizeListeners(),this.removeResizers()}},w2="ag-focus-managed",Ll=class extends be{constructor(e,t={}){super(),this.eFocusable=e,this.callbacks=t,this.callbacks={shouldStopEventPropagation:()=>!1,onTabKeyDown:n=>{if(n.defaultPrevented)return;const r=qr(this.beans,this.eFocusable,!1,n.shiftKey);r&&(r.focus(),n.preventDefault())},...t}}postConstruct(){const{eFocusable:e,callbacks:{onFocusIn:t,onFocusOut:n}}=this;e.classList.add(w2),this.addKeyDownListeners(e),t&&this.addManagedElementListeners(e,{focusin:t}),n&&this.addManagedElementListeners(e,{focusout:n})}addKeyDownListeners(e){this.addManagedElementListeners(e,{keydown:t=>{if(t.defaultPrevented||ui(t))return;const{callbacks:n}=this;if(n.shouldStopEventPropagation(t)){sr(t);return}t.key===se.TAB?n.onTabKeyDown(t):n.handleKeyDown&&n.handleKeyDown(t)}})}},S2={applyFilter:"Apply",clearFilter:"Clear",resetFilter:"Reset",cancelFilter:"Cancel",textFilter:"Text Filter",numberFilter:"Number Filter",dateFilter:"Date Filter",setFilter:"Set Filter",filterOoo:"Filter...",empty:"Choose one",equals:"Equals",notEqual:"Does not equal",lessThan:"Less than",greaterThan:"Greater than",inRange:"Between",inRangeStart:"From",inRangeEnd:"To",lessThanOrEqual:"Less than or equal to",greaterThanOrEqual:"Greater than or equal to",contains:"Contains",notContains:"Does not contain",startsWith:"Begins with",endsWith:"Ends with",blank:"Blank",notBlank:"Not blank",before:"Before",after:"After",andCondition:"AND",orCondition:"OR",dateFormatOoo:"yyyy-mm-dd"};function oF(e,t){const{debounceMs:n}=e;return jC(e)?(n!=null&&ye(71),0):n??t}function jC(e){var t;return(((t=e.buttons)==null?void 0:t.indexOf("apply"))??-1)>=0}var iy=class extends He{constructor(e){super(),this.filterNameKey=e,this.applyActive=!1,this.hidePopup=null,this.debouncePending=!1,this.appliedModel=null,this.eFilterBody=pe,this.buttonListeners=[],this.defaultDebounceMs=0}postConstruct(){this.resetTemplate(),this.createManagedBean(new Ll(this.getFocusableElement(),{handleKeyDown:this.handleKeyDown.bind(this)})),this.positionableFeature=new sy(this.getPositionableElement(),{forcePopupParentAsOffsetParent:!0}),this.createBean(this.positionableFeature)}handleKeyDown(e){}getFilterTitle(){return this.translate(this.filterNameKey)}isFilterActive(){return!!this.appliedModel}resetTemplate(e){let t=this.getGui();t&&t.removeEventListener("submit",this.onFormSubmit);const n=`
${this.createBodyTemplate()}
`;this.setTemplate(n,this.getAgComponents(),e),t=this.getGui(),t==null||t.addEventListener("submit",this.onFormSubmit)}isReadOnly(){return!!this.params.readOnly}init(e){this.setParams(e),this.resetUiToDefaults(!0).then(()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}setParams(e){this.params=e,this.applyActive=jC(e),this.resetButtonsPanel(e)}updateParams(e){this.params=e,this.applyActive=jC(e),this.resetUiToActiveModel(this.getModel(),()=>{this.updateUiVisibility(),this.setupOnBtApplyDebounce()})}resetButtonsPanel(e,t){const{buttons:n,readOnly:r}=t??{},{buttons:s,readOnly:i}=e;if(r===i&&ud(n,s))return;const o=s&&s.length>0&&!this.isReadOnly();if(this.eButtonsPanel?(ln(this.eButtonsPanel),this.buttonListeners.forEach(c=>c()),this.buttonListeners=[]):o&&(this.eButtonsPanel=document.createElement("div"),this.eButtonsPanel.classList.add("ag-filter-apply-panel")),!o){this.eButtonsPanel&&er(this.eButtonsPanel);return}const a=document.createDocumentFragment(),l=c=>{let u;const h=c?this.translate(`${c}Filter`):void 0;switch(c){case"apply":u=C=>this.onBtApply(!1,!1,C);break;case"clear":u=()=>this.onBtClear();break;case"reset":u=()=>this.onBtReset();break;case"cancel":u=C=>{this.onBtCancel(C)};break;default:ye(75);return}const m=Cs(``);this.buttonListeners.push(...this.addManagedElementListeners(m,{click:u})),a.append(m)};s.forEach(c=>l(c)),this.eButtonsPanel.append(a),this.getGui().appendChild(this.eButtonsPanel)}setupOnBtApplyDebounce(){const e=oF(this.params,this.defaultDebounceMs),t=Fr(this,this.checkApplyDebounce.bind(this),e);this.onBtApplyDebounce=()=>{this.debouncePending=!0,t()}}checkApplyDebounce(){this.debouncePending&&(this.debouncePending=!1,this.onBtApply())}getModel(){return this.appliedModel??null}setModel(e){return(e!=null?this.setModelIntoUi(e):this.resetUiToDefaults()).then(()=>{this.updateUiVisibility(),this.applyModel("api")})}onBtCancel(e){this.resetUiToActiveModel(this.getModel(),()=>{this.handleCancelEnd(e)})}handleCancelEnd(e){this.params.closeOnApply&&this.close(e)}resetUiToActiveModel(e,t){const n=()=>{this.onUiChanged(!1,"prevent"),t==null||t()};e!=null?this.setModelIntoUi(e).then(n):this.resetUiToDefaults().then(n)}onBtClear(){this.resetUiToDefaults().then(()=>this.onUiChanged())}onBtReset(){this.onBtClear(),this.onBtApply()}applyModel(e="api"){const t=this.getModelFromUi();if(!this.isModelValid(t))return!1;const n=this.appliedModel;return this.appliedModel=t,!this.areModelsEqual(n,t)}isModelValid(e){return!0}onFormSubmit(e){e.preventDefault()}onBtApply(e=!1,t=!1,n){n&&n.preventDefault(),this.applyModel(t?"rowDataUpdated":"ui")&&this.params.filterChangedCallback({afterFloatingFilter:e,afterDataChange:t,source:"columnFilter"});const{closeOnApply:r}=this.params;r&&this.applyActive&&!e&&!t&&this.close(n)}onNewRowsLoaded(){}close(e){if(!this.hidePopup)return;const t=e,n=t&&t.key;let r;(n==="Enter"||n==="Space")&&(r={keyboardEvent:t}),this.hidePopup(r),this.hidePopup=null}onUiChanged(e=!1,t){if(this.updateUiVisibility(),this.params.filterModifiedCallback(),this.applyActive&&!this.isReadOnly()){const n=this.isModelValid(this.getModelFromUi()),r=this.queryForHtmlElement('[data-ref="applyFilterButton"]');r&&xi(r,!n)}e&&!t||t==="immediately"?this.onBtApply(e):(!this.applyActive&&!t||t==="debounce")&&this.onBtApplyDebounce()}afterGuiAttached(e){e&&(this.hidePopup=e.hidePopup),this.refreshFilterResizer(e==null?void 0:e.container)}refreshFilterResizer(e){const{positionableFeature:t,gos:n}=this;if(!t||e==="toolPanel")return;e==="floatingFilter"||e==="columnFilter"?(t.restoreLastSize(),t.setResizable(n.get("enableRtl")?{bottom:!0,bottomLeft:!0,left:!0}:{bottom:!0,bottomRight:!0,right:!0})):(t.removeSizeFromEl(),t.setResizable(!1)),t.constrainSizeToAvailableHeight(!0)}afterGuiDetached(){var e;this.checkApplyDebounce(),(e=this.positionableFeature)==null||e.constrainSizeToAvailableHeight(!1)}refresh(e){const t=this.params;return this.params=e,this.resetButtonsPanel(e,t),!0}destroy(){const e=this.getGui();e&&e.removeEventListener("submit",this.onFormSubmit),this.hidePopup=null,this.positionableFeature&&(this.positionableFeature=this.destroyBean(this.positionableFeature)),this.appliedModel=null,super.destroy()}translate(e){return this.getLocaleTextFunc()(e,S2[e])}getCellValue(e){return this.params.getValue(e)}getPositionableElement(){return this.eFilterBody}};function x2(e,t,n){if(t==null)return null;let r=null;const{compName:s,jsComp:i,fwComp:o}=ple(e,t);return s?r={agSetColumnFilter:"agSetColumnFloatingFilter",agMultiColumnFilter:"agMultiColumnFloatingFilter",agGroupColumnFilter:"agGroupColumnFloatingFilter",agNumberColumnFilter:"agNumberColumnFloatingFilter",agDateColumnFilter:"agDateColumnFloatingFilter",agTextColumnFilter:"agTextColumnFloatingFilter"}[s]:i==null&&o==null&&t.filter===!0&&(r=n()),r}var Xi={AUTO_HEIGHT:"ag-layout-auto-height",NORMAL:"ag-layout-normal",PRINT:"ag-layout-print"},aF=class extends be{constructor(e){super(),this.view=e}postConstruct(){this.addManagedPropertyListener("domLayout",this.updateLayoutClasses.bind(this)),this.updateLayoutClasses()}updateLayoutClasses(){const e=this.gos.get("domLayout"),t={autoHeight:e==="autoHeight",normal:e==="normal",print:e==="print"},n=t.autoHeight?Xi.AUTO_HEIGHT:t.print?Xi.PRINT:Xi.NORMAL;this.view.updateLayoutClasses(n,t)}},_a="Viewport",UL="fakeVScrollComp",jL=["fakeHScrollComp","centerHeader","topCenter","bottomCenter","stickyTopCenter","stickyBottomCenter"],Qle=class extends be{constructor(e){super(),this.lastScrollSource=[null,null],this.scrollLeft=-1,this.nextScrollTop=-1,this.scrollTop=-1,this.lastOffsetHeight=-1,this.lastScrollTop=-1,this.scrollTimer=0,this.needsRefreshedScrollPosition=!0,this.eBodyViewport=e,this.resetLastHScrollDebounced=Fr(this,()=>this.lastScrollSource[1]=null,500),this.resetLastVScrollDebounced=Fr(this,()=>this.lastScrollSource[0]=null,500)}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.animationFrameSvc=e.animationFrameSvc,this.visibleCols=e.visibleCols}destroy(){super.destroy(),window.clearTimeout(this.scrollTimer)}postConstruct(){this.enableRtl=this.gos.get("enableRtl");const e=this.requireUpdatedScrollPosition.bind(this);this.addManagedEventListeners({displayedColumnsWidthChanged:this.onDisplayedColumnsWidthChanged.bind(this),gridSizeChanged:e}),this.addManagedElementListeners(this.eBodyViewport,{scroll:e}),this.ctrlsSvc.whenReady(this,t=>{this.centerRowsCtrl=t.center,this.onDisplayedColumnsWidthChanged(),this.addScrollListener()})}requireUpdatedScrollPosition(){this.needsRefreshedScrollPosition=!0}addScrollListener(){this.addHorizontalScrollListeners(),this.addVerticalScrollListeners()}addHorizontalScrollListeners(){this.addManagedElementListeners(this.centerRowsCtrl.eViewport,{scroll:this.onHScroll.bind(this,_a)});for(const e of jL){const t=this.ctrlsSvc.get(e);this.registerScrollPartner(t,this.onHScroll.bind(this,e))}}addVerticalScrollListeners(){const e=this.ctrlsSvc.get("fakeVScrollComp"),t=this.gos.get("debounceVerticalScrollbar"),n=t?Fr(this,this.onVScroll.bind(this,_a),100):this.onVScroll.bind(this,_a),r=t?Fr(this,this.onVScroll.bind(this,UL),100):this.onVScroll.bind(this,UL);this.addManagedElementListeners(this.eBodyViewport,{scroll:n}),this.registerScrollPartner(e,r)}registerScrollPartner(e,t){e.onScrollCallback(t)}onDisplayedColumnsWidthChanged(){this.enableRtl&&this.horizontallyScrollHeaderCenterAndFloatingCenter()}horizontallyScrollHeaderCenterAndFloatingCenter(e){this.centerRowsCtrl!=null&&(e===void 0&&(e=this.centerRowsCtrl.getCenterViewportScrollLeft()),this.setScrollLeftForAllContainersExceptCurrent(Math.abs(e)))}setScrollLeftForAllContainersExceptCurrent(e){for(const t of[...jL,_a]){if(this.lastScrollSource[1]===t)continue;const n=this.getViewportForSource(t);AC(n,e,this.enableRtl)}}getViewportForSource(e){return e===_a?this.centerRowsCtrl.eViewport:this.ctrlsSvc.get(e).eViewport}isControllingScroll(e,t){return this.lastScrollSource[t]==null?(t===0?this.lastScrollSource[0]=e:this.lastScrollSource[1]=e,!0):this.lastScrollSource[t]===e}onHScroll(e){if(!this.isControllingScroll(e,1))return;const t=this.centerRowsCtrl.eViewport,{scrollLeft:n}=t;if(this.shouldBlockScrollUpdate(1,n,!0))return;const r=DC(this.getViewportForSource(e),this.enableRtl);this.doHorizontalScroll(r),this.resetLastHScrollDebounced()}onVScroll(e){if(!this.isControllingScroll(e,0))return;let t;if(e===_a?t=this.eBodyViewport.scrollTop:t=this.ctrlsSvc.get("fakeVScrollComp").getScrollPosition(),this.shouldBlockScrollUpdate(0,t,!0))return;const{animationFrameSvc:n}=this;n==null||n.setScrollTop(t),this.nextScrollTop=t,e===_a?this.ctrlsSvc.get("fakeVScrollComp").setScrollPosition(t):this.eBodyViewport.scrollTop=t,!n||this.gos.get("suppressAnimationFrame")?this.scrollGridIfNeeded():n.schedule(),this.resetLastVScrollDebounced()}doHorizontalScroll(e){const t=this.ctrlsSvc.get("fakeHScrollComp").getScrollPosition();this.scrollLeft===e&&e===t||(this.scrollLeft=e,this.fireScrollEvent(1),this.horizontallyScrollHeaderCenterAndFloatingCenter(e),this.centerRowsCtrl.onHorizontalViewportChanged(!0))}fireScrollEvent(e){const t={type:"bodyScroll",direction:e===1?"horizontal":"vertical",left:this.scrollLeft,top:this.scrollTop};this.eventSvc.dispatchEvent(t),window.clearTimeout(this.scrollTimer),this.scrollTimer=window.setTimeout(()=>{this.scrollTimer=0,this.eventSvc.dispatchEvent({...t,type:"bodyScrollEnd"})},100)}shouldBlockScrollUpdate(e,t,n=!1){return n&&!fl()?!1:e===0?this.shouldBlockVerticalScroll(t):this.shouldBlockHorizontalScroll(t)}shouldBlockVerticalScroll(e){const t=Kv(this.eBodyViewport),{scrollHeight:n}=this.eBodyViewport;return e<0||e+t>n}shouldBlockHorizontalScroll(e){const t=this.centerRowsCtrl.getCenterWidth(),{scrollWidth:n}=this.centerRowsCtrl.eViewport;if(this.enableRtl&&IC()){if(e>0)return!0}else if(e<0)return!0;return Math.abs(e)+t>n}redrawRowsAfterScroll(){this.fireScrollEvent(0)}checkScrollLeft(){this.scrollLeft!==this.centerRowsCtrl.getCenterViewportScrollLeft()&&this.onHScroll(_a)}scrollGridIfNeeded(){const e=this.scrollTop!=this.nextScrollTop;return e&&(this.scrollTop=this.nextScrollTop,this.redrawRowsAfterScroll()),e}setHorizontalScrollPosition(e,t=!1){const r=this.centerRowsCtrl.eViewport.scrollWidth-this.centerRowsCtrl.getCenterWidth();!t&&this.shouldBlockScrollUpdate(1,e)&&(this.enableRtl&&IC()?e=e>0?0:r:e=Math.min(Math.max(e,0),r)),AC(this.centerRowsCtrl.eViewport,Math.abs(e),this.enableRtl),this.doHorizontalScroll(e)}setVerticalScrollPosition(e){this.eBodyViewport.scrollTop=e}getVScrollPosition(){if(!this.needsRefreshedScrollPosition){const{lastOffsetHeight:n,lastScrollTop:r}=this;return{top:r,bottom:r+n}}this.needsRefreshedScrollPosition=!1;const{scrollTop:e,offsetHeight:t}=this.eBodyViewport;return this.lastScrollTop=e,this.lastOffsetHeight=t,{top:e,bottom:e+t}}getApproximateVScollPosition(){return this.lastScrollTop>=0&&this.lastOffsetHeight>=0?{top:this.scrollTop,bottom:this.scrollTop+this.lastOffsetHeight}:this.getVScrollPosition()}getHScrollPosition(){return this.centerRowsCtrl.getHScrollPosition()}isHorizontalScrollShowing(){return this.centerRowsCtrl.isHorizontalScrollShowing()}scrollHorizontally(e){const t=this.centerRowsCtrl.eViewport.scrollLeft;return this.setHorizontalScrollPosition(t+e),this.centerRowsCtrl.eViewport.scrollLeft-t}scrollToTop(){this.eBodyViewport.scrollTop=0}ensureNodeVisible(e,t=null){const{rowModel:n}=this.beans,r=n.getRowCount();let s=-1;for(let i=0;i=0&&this.ensureIndexVisible(s,t)}ensureIndexVisible(e,t){if(Vr(this.gos,"print"))return;const{rowModel:n}=this.beans,r=n.getRowCount();if(typeof e!="number"||e<0||e>=r){ye(88,{index:e});return}const i=this.gos.get("pagination")&&!this.gos.get("suppressPaginationPanel"),{frameworkOverrides:o,pagination:a,pageBounds:l,rowContainerHeight:c,rowRenderer:u}=this.beans;o.wrapIncoming(()=>{var b;i||a==null||a.goToPageWithIndex(e);const h=this.ctrlsSvc.getGridBodyCtrl(),g=h.stickyTopHeight,m=h.stickyBottomHeight,C=n.getRow(e);let v;do{const w=C.rowTop,S=C.rowHeight,x=l.getPixelOffset(),P=C.rowTop-x,F=P+C.rowHeight,M=this.getVScrollPosition(),E=c.divStretchOffset,I=M.top+E,A=M.bottom+E,L=A-I,D=c.getScrollPositionForPixel(P),N=c.getScrollPositionForPixel(F-L),k=Math.min((D+N)/2,P),G=I+g>P,$=A-m{var o;i!==null&&this.centerRowsCtrl.setCenterViewportScrollLeft(i),this.centerRowsCtrl.onHorizontalViewportChanged(),(o=this.animationFrameSvc)==null||o.flushAllFrames()})}getPositionedHorizontalScroll(e,t){const{columnBeforeStart:n,columnAfterEnd:r}=this.isColumnOutsideViewport(e),s=this.centerRowsCtrl.getCenterWidth()s:nr;return{columnBeforeStart:o,columnAfterEnd:a}}getColumnBounds(e){const t=this.enableRtl,n=this.visibleCols.bodyWidth,r=e.getActualWidth(),s=e.getLeft(),i=t?-1:1,o=t?n-s:s,a=o+r*i,l=o+r/2*i;return{colLeft:o,colMiddle:l,colRight:a}}getViewportBounds(){const e=this.centerRowsCtrl.getCenterWidth(),t=this.centerRowsCtrl.getCenterViewportScrollLeft(),n=t,r=e+t;return{start:n,end:r,width:e}}},lF=class extends be{constructor(e,t=!1){super(),this.callback=e,this.addSpacer=t}postConstruct(){const e=this.setWidth.bind(this);this.addManagedPropertyListener("domLayout",e),this.addManagedEventListeners({columnContainerWidthChanged:e,displayedColumnsChanged:e,leftPinnedWidthChanged:e}),this.addSpacer&&this.addManagedEventListeners({rightPinnedWidthChanged:e,scrollVisibilityChanged:e,scrollbarWidthChanged:e}),this.setWidth()}setWidth(){const e=Vr(this.gos,"print"),{visibleCols:t,scrollVisibleSvc:n}=this.beans,r=t.bodyWidth,s=t.getColsLeftWidth(),i=t.getDisplayedColumnsRightWidth();let o;e?o=r+s+i:(o=r,this.addSpacer&&(this.gos.get("enableRtl")?s:i)===0&&n.verticalScrollShowing&&(o+=n.getScrollbarWidth())),this.callback(o)}},Zle=class extends be{constructor(e){super(),this.centerContainerCtrl=e}wireBeans(e){this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){this.beans.ctrlsSvc.whenReady(this,e=>{this.gridBodyCtrl=e.gridBodyCtrl,this.listenForResize()}),this.addManagedEventListeners({scrollbarWidthChanged:this.onScrollbarWidthChanged.bind(this)}),this.addManagedPropertyListeners(["alwaysShowHorizontalScroll","alwaysShowVerticalScroll"],()=>{this.checkViewportAndScrolls()})}listenForResize(){const{beans:e,centerContainerCtrl:t,gridBodyCtrl:n}=this,r=()=>{Ai(e,()=>{this.onCenterViewportResized()})};t.registerViewportResizeListener(r),n.registerBodyViewportResizeListener(r)}onScrollbarWidthChanged(){this.checkViewportAndScrolls()}onCenterViewportResized(){if(this.scrollVisibleSvc.updateScrollGap(),this.centerContainerCtrl.isViewportInTheDOMTree()){const{pinnedCols:e,colFlex:t}=this.beans;e==null||e.keepPinnedColumnsNarrowerThanViewport(),this.checkViewportAndScrolls();const n=this.centerContainerCtrl.getCenterWidth();n!==this.centerWidth&&(this.centerWidth=n,t==null||t.refreshFlexedColumns({viewportWidth:this.centerWidth,updateBodyWidths:!0,fireResizedEvent:!0}))}else this.bodyHeight=0}checkViewportAndScrolls(){this.updateScrollVisibleService(),this.checkBodyHeight(),this.onHorizontalViewportChanged(),this.gridBodyCtrl.scrollFeature.checkScrollLeft()}getBodyHeight(){return this.bodyHeight}checkBodyHeight(){const e=this.gridBodyCtrl.eBodyViewport,t=Kv(e);this.bodyHeight!==t&&(this.bodyHeight=t,this.eventSvc.dispatchEvent({type:"bodyHeightChanged"}))}updateScrollVisibleService(){this.updateScrollVisibleServiceImpl(),setTimeout(this.updateScrollVisibleServiceImpl.bind(this),500)}updateScrollVisibleServiceImpl(){const e={horizontalScrollShowing:this.centerContainerCtrl.isHorizontalScrollShowing(),verticalScrollShowing:this.gridBodyCtrl.isVerticalScrollShowing()};this.scrollVisibleSvc.setScrollsVisible(e)}onHorizontalViewportChanged(){const e=this.centerContainerCtrl.getCenterWidth(),t=this.centerContainerCtrl.getViewportScrollLeft();this.beans.colViewport.setScrollPosition(e,t)}};function cF(e,t,n,r,s,i){if(n==null&&t==null)return;const o={},a={},l=(c,u)=>{c.split(" ").forEach(h=>{h.trim()!=""&&u(h)})};if(n){const c=Object.keys(n);for(let u=0;u{m?o[C]=!0:a[C]=!0})}}t&&i&&Object.keys(t).forEach(c=>l(c,u=>{o[u]||(a[u]=!0)})),i&&Object.keys(a).forEach(i),Object.keys(o).forEach(s)}function KL(e){if(e.group)return e.level;const t=e.parent;return t?t.level+1:0}var Jle=class extends be{constructor(){super(...arguments),this.beanName="rowStyleSvc"}processClassesFromGridOptions(e,t){const n=this.gos,r=o=>{typeof o=="string"?e.push(o):Array.isArray(o)&&o.forEach(a=>e.push(a))},s=n.get("rowClass");s&&r(s);const i=n.getCallback("getRowClass");if(i){const o={data:t.data,node:t,rowIndex:t.rowIndex},a=i(o);r(a)}}preProcessRowClassRules(e,t){this.processRowClassRules(t,n=>{e.push(n)},()=>{})}processRowClassRules(e,t,n){const{gos:r,expressionSvc:s}=this.beans,i=r.addGridCommonParams({data:e.data,node:e,rowIndex:e.rowIndex});cF(s,void 0,r.get("rowClassRules"),i,t,n)}processStylesFromGridOptions(e){const t=this.gos,n=t.get("rowStyle"),r=t.getCallback("getRowStyle");let s;if(r){const i={data:e.data,node:e,rowIndex:e.rowIndex};s=r(i)}if(s||n)return Object.assign({},n,s)}},ece=0,Kp="renderedRow",zR=class extends be{constructor(e,t,n,r,s){var i;super(),this.rowNode=e,this.useAnimationFrameForCreate=r,this.printLayout=s,this.allRowGuis=[],this.active=!0,this.centerCellCtrls={list:[],map:{}},this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}},this.slideInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.fadeInAnimation={left:!1,center:!1,right:!1,fullWidth:!1},this.rowDragComps=[],this.lastMouseDownOnDragger=!1,this.emptyStyle={},this.updateColumnListsPending=!1,this.rowId=null,this.businessKey=null,this.beans=t,this.gos=t.gos,this.paginationPage=((i=t.pagination)==null?void 0:i.getCurrentPage())??0,this.suppressRowTransform=this.gos.get("suppressRowTransform"),this.instanceId=e.id+"-"+ece++,this.rowId=Rn(e.id),this.initRowBusinessKey(),this.rowFocused=t.focusSvc.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned),this.rowLevel=KL(this.rowNode),this.setRowType(),this.setAnimateFlags(n),this.rowStyles=this.processStylesFromGridOptions(),this.addListeners()}initRowBusinessKey(){this.businessKeyForNodeFunc=this.gos.get("getBusinessKeyForNode"),this.updateRowBusinessKey()}updateRowBusinessKey(){if(typeof this.businessKeyForNodeFunc!="function")return;const e=this.businessKeyForNodeFunc(this.rowNode);this.businessKey=Rn(e)}updateGui(e,t){e==="left"?this.leftGui=t:e==="right"?this.rightGui=t:e==="fullWidth"?this.fullWidthGui=t:this.centerGui=t}setComp(e,t,n,r){r=wg(this,this.beans.context,r);const s={rowComp:e,element:t,containerType:n,compBean:r};this.allRowGuis.push(s),this.updateGui(n,s),this.initialiseRowComp(s),this.rowType!=="FullWidthLoading"&&!this.rowNode.rowPinned&&this.beans.rowRenderer.dispatchFirstDataRenderedEvent()}unsetComp(e){this.allRowGuis=this.allRowGuis.filter(t=>t.containerType!==e),this.updateGui(e,void 0)}isCacheable(){return this.rowType==="FullWidthDetail"&&this.gos.get("keepDetailRows")}setCached(e){const t=e?"none":"";this.allRowGuis.forEach(n=>n.element.style.display=t)}initialiseRowComp(e){var s;const t=this.gos;this.onSuppressCellFocusChanged(this.beans.gos.get("suppressCellFocus")),this.listenOnDomOrder(e),(s=this.beans.rowAutoHeight)==null||s.checkAutoHeights(this.rowNode),this.onRowHeightChanged(e),this.updateRowIndexes(e),this.setFocusedClasses(e),this.setStylesFromGridOptions(!1,e),ci(t)&&this.rowNode.selectable&&this.onRowSelected(e),this.updateColumnLists(!this.useAnimationFrameForCreate);const n=e.rowComp;this.getInitialRowClasses(e.containerType).forEach(i=>n.addOrRemoveCssClass(i,!0)),this.executeSlideAndFadeAnimations(e),this.rowNode.group&&ws(e.element,this.rowNode.expanded==!0),this.setRowCompRowId(n),this.setRowCompRowBusinessKey(n),Oc(t,e.element,Kp,this),e.compBean.addDestroyFunc(()=>Oc(t,e.element,Kp,null)),this.useAnimationFrameForCreate?this.beans.animationFrameSvc.createTask(this.addHoverFunctionality.bind(this,e),this.rowNode.rowIndex,"createTasksP2"):this.addHoverFunctionality(e),this.isFullWidth()&&this.setupFullWidth(e),t.get("rowDragEntireRow")&&this.addRowDraggerToRow(e),this.useAnimationFrameForCreate&&this.beans.animationFrameSvc.addDestroyTask(()=>{this.isAlive()&&e.rowComp.addOrRemoveCssClass("ag-after-created",!0)}),this.executeProcessRowPostCreateFunc()}setRowCompRowBusinessKey(e){this.businessKey!=null&&e.setRowBusinessKey(this.businessKey)}setRowCompRowId(e){const t=Rn(this.rowNode.id);this.rowId=t,t!=null&&e.setRowId(t)}executeSlideAndFadeAnimations(e){const{containerType:t}=e;this.slideInAnimation[t]&&(NL(()=>{this.onTopChanged()}),this.slideInAnimation[t]=!1),this.fadeInAnimation[t]&&(NL(()=>{e.rowComp.addOrRemoveCssClass("ag-opacity-zero",!1)}),this.fadeInAnimation[t]=!1)}addRowDraggerToRow(e){var r;const t=(r=this.beans.rowDragSvc)==null?void 0:r.createRowDragCompForRow(this.rowNode,e.element);if(!t)return;const n=this.createBean(t,this.beans.context);this.rowDragComps.push(n),e.compBean.addDestroyFunc(()=>{this.rowDragComps=this.rowDragComps.filter(s=>s!==n),this.destroyBean(n,this.beans.context)})}setupFullWidth(e){const t=this.getPinnedForContainer(e.containerType),n=this.createFullWidthCompDetails(e.element,t);e.rowComp.showFullWidth(n)}getFullWidthCellRenderers(){var e,t;return this.gos.get("embedFullWidthRows")?this.allRowGuis.map(n=>{var r;return(r=n==null?void 0:n.rowComp)==null?void 0:r.getFullWidthCellRenderer()}):[(t=(e=this.fullWidthGui)==null?void 0:e.rowComp)==null?void 0:t.getFullWidthCellRenderer()]}executeProcessRowPostCreateFunc(){const e=this.gos.getCallback("processRowPostCreate");if(!e||!this.areAllContainersReady())return;const t={eRow:this.centerGui.element,ePinnedLeftRow:this.leftGui?this.leftGui.element:void 0,ePinnedRightRow:this.rightGui?this.rightGui.element:void 0,node:this.rowNode,rowIndex:this.rowNode.rowIndex,addRenderedRowListener:this.addEventListener.bind(this)};e(t)}areAllContainersReady(){const{leftGui:e,centerGui:t,rightGui:n,beans:{visibleCols:r}}=this,s=!!e||!r.isPinningLeft(),i=!!t,o=!!n||!r.isPinningRight();return s&&i&&o}isNodeFullWidthCell(){if(this.rowNode.detail)return!0;const e=this.beans.gos.getCallback("isFullWidthRow");return e?e({rowNode:this.rowNode}):!1}setRowType(){const e=this.rowNode.stub&&!this.gos.get("suppressServerSideFullWidthLoadingRow")&&!this.gos.get("groupHideOpenParents"),t=this.isNodeFullWidthCell(),n=this.gos.get("masterDetail")&&this.rowNode.detail,r=this.beans.colModel.isPivotMode(),i=!!this.rowNode.group&&!this.rowNode.footer&&Jv(this.gos,r);e?this.rowType="FullWidthLoading":n?this.rowType="FullWidthDetail":t?this.rowType="FullWidth":i?this.rowType="FullWidthGroup":this.rowType="Normal"}updateColumnLists(e=!1,t=!1){if(this.isFullWidth())return;const{animationFrameSvc:n}=this.beans;if(!n||e||this.gos.get("suppressAnimationFrame")||this.printLayout){this.updateColumnListsImpl(t);return}this.updateColumnListsPending||(n.createTask(()=>{this.active&&this.updateColumnListsImpl(!0)},this.rowNode.rowIndex,"createTasksP1"),this.updateColumnListsPending=!0)}createCellCtrls(e,t,n=null){const r={list:[],map:{}},s=(i,o)=>{r.list.push(o),r.map[i]=o};return t.forEach(i=>{const o=i.getInstanceId();let a=e.map[o];a||(a=new zm(i,this.rowNode,this.beans,this)),s(o,a)}),e.list.forEach(i=>{const o=i.column.getInstanceId();if(r.map[o]!=null)return;if(!this.isCellEligibleToBeRemoved(i,n)){s(o,i);return}i.destroy()}),r}updateColumnListsImpl(e){this.updateColumnListsPending=!1,this.createAllCellCtrls(),this.setCellCtrls(e)}setCellCtrls(e){this.allRowGuis.forEach(t=>{const n=this.getCellCtrlsForContainer(t.containerType);t.rowComp.setCellCtrls(n,e)})}getCellCtrlsForContainer(e){switch(e){case"left":return this.leftCellCtrls.list;case"right":return this.rightCellCtrls.list;case"fullWidth":return[];case"center":return this.centerCellCtrls.list}}createAllCellCtrls(){const e=this.beans.colViewport,t=this.beans.visibleCols;if(this.printLayout)this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,t.allCols),this.leftCellCtrls={list:[],map:{}},this.rightCellCtrls={list:[],map:{}};else{const n=e.getColsWithinViewport(this.rowNode);this.centerCellCtrls=this.createCellCtrls(this.centerCellCtrls,n);const r=t.getLeftColsForRow(this.rowNode);this.leftCellCtrls=this.createCellCtrls(this.leftCellCtrls,r,"left");const s=t.getRightColsForRow(this.rowNode);this.rightCellCtrls=this.createCellCtrls(this.rightCellCtrls,s,"right")}}isCellEligibleToBeRemoved(e,t){const{column:s}=e;if(s.getPinned()!=t)return!0;const{editing:i,cellPosition:o}=e,{focusSvc:a,visibleCols:l}=this.beans,c=a.isCellFocused(o);return i||c?!(l.allCols.indexOf(s)>=0):!0}getDomOrder(){return this.gos.get("ensureDomOrder")||Vr(this.gos,"print")}listenOnDomOrder(e){const t=()=>{e.rowComp.setDomOrder(this.getDomOrder())};e.compBean.addManagedPropertyListeners(["domLayout","ensureDomOrder"],t)}setAnimateFlags(e){if(this.rowNode.sticky||!e)return;const t=$e(this.rowNode.oldRowTop),{visibleCols:n}=this.beans,r=n.isPinningLeft(),s=n.isPinningRight();if(t){const{slideInAnimation:i}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){i.fullWidth=!0;return}i.center=!0,i.left=r,i.right=s}else{const{fadeInAnimation:i}=this;if(this.isFullWidth()&&!this.gos.get("embedFullWidthRows")){i.fullWidth=!0;return}i.center=!0,i.left=r,i.right=s}}isFullWidth(){return this.rowType!=="Normal"}refreshFullWidth(){const e=(o,a)=>o?o.rowComp.refreshFullWidth(()=>this.createFullWidthCompDetails(o.element,a).params):!0,t=e(this.fullWidthGui,null),n=e(this.centerGui,null),r=e(this.leftGui,"left"),s=e(this.rightGui,"right");return t&&n&&r&&s}addListeners(){var e;this.addManagedListeners(this.rowNode,{heightChanged:()=>this.onRowHeightChanged(),rowSelected:()=>this.onRowSelected(),rowIndexChanged:this.onRowIndexChanged.bind(this),topChanged:this.onTopChanged.bind(this),...((e=this.beans.expansionSvc)==null?void 0:e.getRowExpandedListeners(this))??{}}),this.rowNode.detail&&this.addManagedListeners(this.rowNode.parent,{dataChanged:this.onRowNodeDataChanged.bind(this)}),this.addManagedListeners(this.rowNode,{dataChanged:this.onRowNodeDataChanged.bind(this),cellChanged:this.postProcessCss.bind(this),rowHighlightChanged:this.onRowNodeHighlightChanged.bind(this),draggingChanged:this.postProcessRowDragging.bind(this),uiLevelChanged:this.onUiLevelChanged.bind(this)}),this.addManagedListeners(this.beans.eventSvc,{paginationPixelOffsetChanged:this.onPaginationPixelOffsetChanged.bind(this),heightScaleChanged:this.onTopChanged.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:this.onVirtualColumnsChanged.bind(this),cellFocused:this.onCellFocusChanged.bind(this),cellFocusCleared:this.onCellFocusChanged.bind(this),paginationChanged:this.onPaginationChanged.bind(this),modelUpdated:this.refreshFirstAndLastRowStyles.bind(this),columnMoved:()=>this.updateColumnLists()}),this.addDestroyFunc(()=>{this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context),this.tooltipFeature=this.destroyBean(this.tooltipFeature,this.beans.context)}),this.addManagedPropertyListeners(["rowStyle","getRowStyle","rowClass","getRowClass","rowClassRules"],this.postProcessCss.bind(this)),this.addManagedPropertyListener("rowDragEntireRow",()=>{if(this.gos.get("rowDragEntireRow")){this.allRowGuis.forEach(n=>{this.addRowDraggerToRow(n)});return}this.rowDragComps=this.destroyBeans(this.rowDragComps,this.beans.context)}),this.addListenersForCellComps()}addListenersForCellComps(){this.addManagedListeners(this.rowNode,{rowIndexChanged:()=>{this.getAllCellCtrls().forEach(e=>e.onRowIndexChanged())},cellChanged:e=>{this.getAllCellCtrls().forEach(t=>t.onCellChanged(e))}})}onRowNodeDataChanged(e){if(this.isFullWidth()!==!!this.isNodeFullWidthCell()){this.beans.rowRenderer.redrawRow(this.rowNode);return}if(this.isFullWidth()){this.refreshFullWidth()||this.beans.rowRenderer.redrawRow(this.rowNode);return}this.getAllCellCtrls().forEach(n=>n.refreshCell({suppressFlash:!e.update,newData:!e.update})),this.allRowGuis.forEach(n=>{this.setRowCompRowId(n.rowComp),this.updateRowBusinessKey(),this.setRowCompRowBusinessKey(n.rowComp)}),this.onRowSelected(),this.postProcessCss()}postProcessCss(){this.setStylesFromGridOptions(!0),this.postProcessClassesFromGridOptions(),this.postProcessRowClassRules(),this.postProcessRowDragging()}onRowNodeHighlightChanged(){const e=this.rowNode.highlighted;this.allRowGuis.forEach(t=>{const n=e==="Above",r=e==="Below";t.rowComp.addOrRemoveCssClass("ag-row-highlight-above",n),t.rowComp.addOrRemoveCssClass("ag-row-highlight-below",r)})}postProcessRowDragging(){const e=this.rowNode.dragging;this.allRowGuis.forEach(t=>t.rowComp.addOrRemoveCssClass("ag-row-dragging",e))}onDisplayedColumnsChanged(){var e;this.updateColumnLists(!0),(e=this.beans.rowAutoHeight)==null||e.checkAutoHeights(this.rowNode)}onVirtualColumnsChanged(){this.updateColumnLists(!1,!0)}getRowPosition(){return{rowPinned:hr(this.rowNode.rowPinned),rowIndex:this.rowNode.rowIndex}}findFullWidthRowGui(e){return this.allRowGuis.find(t=>t.element.contains(e))}onKeyboardNavigate(e){const t=this.findFullWidthRowGui(e.target);if(!((t?t.element:null)===e.target))return;const s=this.rowNode,{focusSvc:i,navigation:o}=this.beans,a=i.getFocusedCell(),l={rowIndex:s.rowIndex,rowPinned:s.rowPinned,column:(a==null?void 0:a.column)??this.getColumnForFullWidth(t)};o==null||o.navigateToNextCell(e,e.key,l,!0),e.preventDefault()}onTabKeyDown(e){var a;if(e.defaultPrevented||ui(e))return;const t=this.allRowGuis.find(l=>l.element.contains(e.target)),n=t?t.element:null,r=n===e.target,s=en(this.beans);let i=!1;n&&s&&(i=n.contains(s)&&s.classList.contains("ag-cell"));let o=null;!r&&!i&&(o=qr(this.beans,n,!1,e.shiftKey)),(this.isFullWidth()&&r||!o)&&((a=this.beans.navigation)==null||a.onTabKeyDown(this,e))}getFullWidthElement(){return this.fullWidthGui?this.fullWidthGui.element:null}getRowYPosition(){var t;const e=(t=this.allRowGuis.find(n=>us(n.element)))==null?void 0:t.element;return e?e.getBoundingClientRect().top:0}onSuppressCellFocusChanged(e){const t=this.isFullWidth()&&e?void 0:-1;this.allRowGuis.forEach(n=>{Ti(n.element,"tabindex",t)})}onFullWidthRowFocused(e){var s;const t=this.rowNode,n=e?this.isFullWidth()&&e.rowIndex===t.rowIndex&&e.rowPinned==t.rowPinned:!1,r=this.fullWidthGui?this.fullWidthGui.element:(s=this.centerGui)==null?void 0:s.element;r&&(r.classList.toggle("ag-full-width-focus",n),n&&(e!=null&&e.forceBrowserFocus)&&r.focus({preventScroll:!0}))}recreateCell(e){this.centerCellCtrls=this.removeCellCtrl(this.centerCellCtrls,e),this.leftCellCtrls=this.removeCellCtrl(this.leftCellCtrls,e),this.rightCellCtrls=this.removeCellCtrl(this.rightCellCtrls,e),e.destroy(),this.updateColumnLists()}removeCellCtrl(e,t){const n={list:[],map:{}};return e.list.forEach(r=>{r!==t&&(n.list.push(r),n.map[r.column.getInstanceId()]=r)}),n}onMouseEvent(e,t){switch(e){case"dblclick":this.onRowDblClick(t);break;case"click":this.onRowClick(t);break;case"touchstart":case"mousedown":this.onRowMouseDown(t);break}}createRowEvent(e,t){const{rowNode:n}=this;return this.gos.addGridCommonParams({type:e,node:n,data:n.data,rowIndex:n.rowIndex,rowPinned:n.rowPinned,event:t})}createRowEventWithSource(e,t){const n=this.createRowEvent(e,t);return n.source=this,n}onRowDblClick(e){ui(e)||this.beans.eventSvc.dispatchEvent(this.createRowEventWithSource("rowDoubleClicked",e))}getColumnForFullWidth(e){const{visibleCols:t}=this.beans;switch(e==null?void 0:e.containerType){case"center":return t.centerCols[0];case"left":return t.leftCols[0];case"right":return t.rightCols[0];default:return t.allCols[0]}}onRowMouseDown(e){if(this.lastMouseDownOnDragger=bc(e.target,"ag-row-drag",3),!this.isFullWidth())return;const t=this.rowNode,{rangeSvc:n,focusSvc:r}=this.beans;n==null||n.removeAllCellRanges();const s=this.findFullWidthRowGui(e.target),i=s==null?void 0:s.element,o=e.target;let a=!0;i&&i.contains(o)&&_P(o)&&(a=!1),r.setFocusedCell({rowIndex:t.rowIndex,column:this.getColumnForFullWidth(s),rowPinned:t.rowPinned,forceBrowserFocus:a})}onRowClick(e){if(ui(e)||this.lastMouseDownOnDragger)return;const{eventSvc:n,selectionSvc:r}=this.beans;n.dispatchEvent(this.createRowEventWithSource("rowClicked",e)),r==null||r.handleSelectionEvent(e,this.rowNode,"rowClicked")}setupDetailRowAutoHeight(e){var t;this.rowType==="FullWidthDetail"&&((t=this.beans.masterDetailSvc)==null||t.setupDetailRowAutoHeight(this,e))}createFullWidthCompDetails(e,t){const{gos:n,rowNode:r}=this,s=n.addGridCommonParams({fullWidth:!0,data:r.data,node:r,value:r.key,valueFormatted:r.key,eGridCell:e,eParentOfValue:e,pinned:t,addRenderedRowListener:this.addEventListener.bind(this),registerRowDragger:(o,a,l,c)=>this.addFullWidthRowDragging(o,a,l,c),setTooltip:(o,a)=>{n.assertModuleRegistered("Tooltip",3),this.refreshRowTooltip(o,a)}}),i=this.beans.userCompFactory;switch(this.rowType){case"FullWidthDetail":return ale(i,s);case"FullWidthGroup":return ole(i,s);case"FullWidthLoading":return ile(i,s);default:return sle(i,s)}}refreshRowTooltip(e,t){var n;this.fullWidthGui&&(this.tooltipFeature=(n=this.beans.tooltipSvc)==null?void 0:n.refreshRowTooltip(this.tooltipFeature,this,e,t))}addFullWidthRowDragging(e,t,n="",r){const{rowDragSvc:s,context:i}=this.beans;if(!s||!this.isFullWidth())return;const o=s.createRowDragComp(()=>n,this.rowNode,void 0,e,t,r);this.createBean(o,i),this.addDestroyFunc(()=>{this.destroyBean(o,i)})}onUiLevelChanged(){const e=KL(this.rowNode);if(this.rowLevel!=e){const t="ag-row-level-"+e,n="ag-row-level-"+this.rowLevel;this.allRowGuis.forEach(r=>{r.rowComp.addOrRemoveCssClass(t,!0),r.rowComp.addOrRemoveCssClass(n,!1)})}this.rowLevel=e}isFirstRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getFirstRow()}isLastRowOnPage(){return this.rowNode.rowIndex===this.beans.pageBounds.getLastRow()}refreshFirstAndLastRowStyles(){const e=this.isFirstRowOnPage(),t=this.isLastRowOnPage();this.firstRowOnPage!==e&&(this.firstRowOnPage=e,this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass("ag-row-first",e))),this.lastRowOnPage!==t&&(this.lastRowOnPage=t,this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass("ag-row-last",t)))}getAllCellCtrls(){return this.leftCellCtrls.list.length===0&&this.rightCellCtrls.list.length===0?this.centerCellCtrls.list:[...this.centerCellCtrls.list,...this.leftCellCtrls.list,...this.rightCellCtrls.list]}postProcessClassesFromGridOptions(){var t;const e=[];(t=this.beans.rowStyleSvc)==null||t.processClassesFromGridOptions(e,this.rowNode),e.length&&e.forEach(n=>{this.allRowGuis.forEach(r=>r.rowComp.addOrRemoveCssClass(n,!0))})}postProcessRowClassRules(){var e;(e=this.beans.rowStyleSvc)==null||e.processRowClassRules(this.rowNode,t=>{this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass(t,!0))},t=>{this.allRowGuis.forEach(n=>n.rowComp.addOrRemoveCssClass(t,!1))})}setStylesFromGridOptions(e,t){e&&(this.rowStyles=this.processStylesFromGridOptions()),this.forEachGui(t,n=>n.rowComp.setUserStyles(this.rowStyles))}getPinnedForContainer(e){return e==="left"||e==="right"?e:null}getInitialRowClasses(e){var a;const t=this.getPinnedForContainer(e),n=this.isFullWidth(),{rowNode:r,beans:s}=this,i=[];i.push("ag-row"),i.push(this.rowFocused?"ag-row-focus":"ag-row-no-focus"),this.fadeInAnimation[e]&&i.push("ag-opacity-zero"),i.push(r.rowIndex%2===0?"ag-row-even":"ag-row-odd"),r.isRowPinned()&&i.push("ag-row-pinned"),r.isSelected()&&i.push("ag-row-selected"),r.footer&&i.push("ag-row-footer"),i.push("ag-row-level-"+this.rowLevel),r.stub&&i.push("ag-row-loading"),n&&i.push("ag-full-width-row"),(a=s.expansionSvc)==null||a.addExpandedCss(i,r),r.dragging&&i.push("ag-row-dragging");const{rowStyleSvc:o}=s;return o&&(o.processClassesFromGridOptions(i,r),o.preProcessRowClassRules(i,r)),i.push(this.printLayout?"ag-row-position-relative":"ag-row-position-absolute"),this.isFirstRowOnPage()&&i.push("ag-row-first"),this.isLastRowOnPage()&&i.push("ag-row-last"),n&&(t==="left"&&i.push("ag-cell-last-left-pinned"),t==="right"&&i.push("ag-cell-first-right-pinned")),i}processStylesFromGridOptions(){var e;return((e=this.beans.rowStyleSvc)==null?void 0:e.processStylesFromGridOptions(this.rowNode))??this.emptyStyle}onRowSelected(e){var t;(t=this.beans.selectionSvc)==null||t.onRowCtrlSelected(this,n=>{(n===this.centerGui||n===this.fullWidthGui)&&this.announceDescription()},e)}announceDescription(){var e;(e=this.beans.selectionSvc)==null||e.announceAriaRowSelection(this.rowNode)}addHoverFunctionality(e){if(!this.active)return;const{element:t,compBean:n}=e,{rowNode:r,beans:s,gos:i}=this;n.addManagedListeners(t,{mouseenter:()=>r.dispatchRowEvent("mouseEnter"),mouseleave:()=>r.dispatchRowEvent("mouseLeave")}),n.addManagedListeners(r,{mouseEnter:()=>{var o;!((o=s.dragSvc)!=null&&o.dragging)&&!i.get("suppressRowHoverHighlight")&&(t.classList.add("ag-row-hover"),r.setHovered(!0))},mouseLeave:()=>{t.classList.remove("ag-row-hover"),r.setHovered(!1)}})}roundRowTopToBounds(e){const t=this.beans.ctrlsSvc.getScrollFeature().getApproximateVScollPosition(),n=this.applyPaginationOffset(t.top,!0)-100,r=this.applyPaginationOffset(t.bottom,!0)+100;return Math.min(Math.max(n,e),r)}forEachGui(e,t){e?t(e):this.allRowGuis.forEach(t)}onRowHeightChanged(e){if(this.rowNode.rowHeight==null)return;const t=this.rowNode.rowHeight,n=this.beans.environment.getDefaultRowHeight(),s=qP(this.gos)?ls(this.beans,this.rowNode).height:void 0,i=s?`${Math.min(n,s)-2}px`:void 0;this.forEachGui(e,o=>{o.element.style.height=`${t}px`,i&&o.element.style.setProperty("--ag-line-height",i)})}destroyFirstPass(e=!1){this.active=!1;const{rowNode:t}=this;if(!e&&Qu(this.gos)&&!t.sticky)if(t.rowTop!=null){const s=this.roundRowTopToBounds(t.rowTop);this.setRowTop(s)}else this.allRowGuis.forEach(s=>s.rowComp.addOrRemoveCssClass("ag-opacity-zero",!0));t.setHovered(!1);const n=this.createRowEvent("virtualRowRemoved");this.dispatchLocalEvent(n),this.beans.eventSvc.dispatchEvent(n),super.destroy()}destroySecondPass(){var t;this.allRowGuis.length=0,(t=this.beans.editSvc)==null||t.stopRowEditing(this);const e=n=>(n.list.forEach(r=>r.destroy()),{list:[],map:{}});this.centerCellCtrls=e(this.centerCellCtrls),this.leftCellCtrls=e(this.leftCellCtrls),this.rightCellCtrls=e(this.rightCellCtrls)}setFocusedClasses(e){this.forEachGui(e,t=>{t.rowComp.addOrRemoveCssClass("ag-row-focus",this.rowFocused),t.rowComp.addOrRemoveCssClass("ag-row-no-focus",!this.rowFocused)})}onCellFocusChanged(){const{focusSvc:e,editSvc:t}=this.beans,n=e.isRowFocused(this.rowNode.rowIndex,this.rowNode.rowPinned);n!==this.rowFocused&&(this.rowFocused=n,this.setFocusedClasses()),!n&&this.editing&&(t==null||t.stopRowEditing(this,!1))}onPaginationChanged(){var t;const e=((t=this.beans.pagination)==null?void 0:t.getCurrentPage())??0;this.paginationPage!==e&&(this.paginationPage=e,this.onTopChanged()),this.refreshFirstAndLastRowStyles()}onTopChanged(){this.setRowTop(this.rowNode.rowTop)}onPaginationPixelOffsetChanged(){this.onTopChanged()}applyPaginationOffset(e,t=!1){if(this.rowNode.isRowPinned()||this.rowNode.sticky)return e;const n=this.beans.pageBounds.getPixelOffset();return e+n*(t?1:-1)}setRowTop(e){if(!this.printLayout&&$e(e)){const t=this.applyPaginationOffset(e),s=`${this.rowNode.isRowPinned()||this.rowNode.sticky?t:this.beans.rowContainerHeight.getRealPixelPosition(t)}px`;this.setRowTopStyle(s)}}getInitialRowTop(e){return this.suppressRowTransform?this.getInitialRowTopShared(e):void 0}getInitialTransform(e){return this.suppressRowTransform?void 0:`translateY(${this.getInitialRowTopShared(e)})`}getInitialRowTopShared(e){if(this.printLayout)return"";const t=this.rowNode;let n;if(t.sticky)n=t.stickyRowTop;else{const r=this.slideInAnimation[e]?this.roundRowTopToBounds(t.oldRowTop):t.rowTop,s=this.applyPaginationOffset(r);n=t.isRowPinned()?s:this.beans.rowContainerHeight.getRealPixelPosition(s)}return n+"px"}setRowTopStyle(e){this.allRowGuis.forEach(t=>this.suppressRowTransform?t.rowComp.setTop(e):t.rowComp.setTransform(`translateY(${e})`))}getCellCtrl(e,t=!1){let n=null;return this.getAllCellCtrls().forEach(r=>{r.column==e&&(n=r)}),n!=null||t||this.getAllCellCtrls().forEach(r=>{r.getColSpanningList().indexOf(e)>=0&&(n=r)}),n}onRowIndexChanged(){this.rowNode.rowIndex!=null&&(this.onCellFocusChanged(),this.updateRowIndexes(),this.postProcessCss())}updateRowIndexes(e){var i,o;const t=this.rowNode.getRowIndexString();if(t===null)return;const n=(((i=this.beans.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:i.getRowCount())??0)+(((o=this.beans.filterManager)==null?void 0:o.getHeaderRowCount())??0),r=this.rowNode.rowIndex%2===0,s=n+this.rowNode.rowIndex+1;this.forEachGui(e,a=>{a.rowComp.setRowIndex(t),a.rowComp.addOrRemoveCssClass("ag-row-even",r),a.rowComp.addOrRemoveCssClass("ag-row-odd",!r),VP(a.element,s)})}};function uF(e){var n;return e.altKey||e.ctrlKey||e.metaKey?!1:((n=e.key)==null?void 0:n.length)===1}function WR(e,t,n,r,s){const i=r?r.getColDef().suppressKeyboardEvent:void 0;if(!i)return!1;const o=e.addGridCommonParams({event:t,editing:s,column:r,node:n,data:n.data,colDef:r.getColDef()});return!!(i&&i(o))}var tce=65,nce=67,rce=86,sce=68,ice=90,oce=89;function ace(e){const{keyCode:t}=e;let n;switch(t){case tce:n=se.A;break;case nce:n=se.C;break;case rce:n=se.V;break;case sce:n=se.D;break;case ice:n=se.Z;break;case oce:n=se.Y;break;default:n=e.code}return n}var lce=class extends be{constructor(e){super(),this.element=e}postConstruct(){var e;this.addKeyboardListeners(),this.addMouseListeners(),(e=this.beans.touchSvc)==null||e.mockRowContextMenu(this)}addKeyboardListeners(){const e="keydown",t=this.processKeyboardEvent.bind(this,e);this.addManagedElementListeners(this.element,{[e]:t})}addMouseListeners(){["dblclick","contextmenu","mouseover","mouseout","click",FH("touchstart")?"touchstart":"mousedown"].forEach(n=>{const r=this.processMouseEvent.bind(this,n);this.addManagedElementListeners(this.element,{[n]:r})})}processMouseEvent(e,t){var s;if(!UC(this.gos,t)||ui(t))return;const{cellCtrl:n,rowCtrl:r}=this.getControlsForEventTarget(t.target);e==="contextmenu"?(n!=null&&n.column&&n.dispatchCellContextMenuEvent(t),(s=this.beans.contextMenuSvc)==null||s.handleContextMenuMouseEvent(t,void 0,r,n)):(n&&n.onMouseEvent(e,t),r&&r.onMouseEvent(e,t))}getControlsForEventTarget(e){const{gos:t}=this;return{cellCtrl:sF(t,e),rowCtrl:TH(t,e,Kp)}}processKeyboardEvent(e,t){const{cellCtrl:n,rowCtrl:r}=this.getControlsForEventTarget(t.target);t.defaultPrevented||(n?this.processCellKeyboardEvent(n,e,t):r&&r.isFullWidth()&&this.processFullWidthRowKeyboardEvent(r,e,t))}processCellKeyboardEvent(e,t,n){var a;const{rowNode:r,column:s,editing:i}=e;!WR(this.gos,n,r,s,i)&&t==="keydown"&&(!i&&((a=this.beans.navigation)!=null&&a.handlePageScrollingKey(n))||e.onKeyDown(n),this.doGridOperations(n,e.editing),uF(n)&&e.processCharacter(n)),t==="keydown"&&this.eventSvc.dispatchEvent(e.createEvent(n,"cellKeyDown"))}processFullWidthRowKeyboardEvent(e,t,n){const{rowNode:r}=e,{focusSvc:s,navigation:i}=this.beans,o=s.getFocusedCell(),a=o&&o.column;if(!WR(this.gos,n,r,a,!1)){const c=n.key;if(t==="keydown")switch(c){case se.PAGE_HOME:case se.PAGE_END:case se.PAGE_UP:case se.PAGE_DOWN:i==null||i.handlePageScrollingKey(n,!0);break;case se.UP:case se.DOWN:e.onKeyboardNavigate(n);break;case se.TAB:e.onTabKeyDown(n);break}}t==="keydown"&&this.eventSvc.dispatchEvent(e.createRowEvent("cellKeyDown",n))}doGridOperations(e,t){if(!e.ctrlKey&&!e.metaKey||t||!UC(this.gos,e))return;const n=ace(e),{clipboardSvc:r,undoRedo:s}=this.beans;if(n===se.A)return this.onCtrlAndA(e);if(n===se.C)return this.onCtrlAndC(r,e);if(n===se.D)return this.onCtrlAndD(r,e);if(n===se.V)return this.onCtrlAndV(r,e);if(n===se.X)return this.onCtrlAndX(r,e);if(n===se.Y)return this.onCtrlAndY(s);if(n===se.Z)return this.onCtrlAndZ(s,e)}onCtrlAndA(e){const{beans:{pinnedRowModel:t,rowModel:n,visibleCols:r,rangeSvc:s,selectionSvc:i},gos:o}=this;if(s&&vs(o)&&n.isRowsToRender()){const[a,l]=[(t==null?void 0:t.isEmpty("top"))??!0,(t==null?void 0:t.isEmpty("bottom"))??!0],c=a?null:"top";let u,h;l?(u=null,h=n.getRowCount()-1):(u="bottom",h=(t==null?void 0:t.getPinnedBottomRowCount())??-1);const g=r.allCols;if(!(g!=null&&g.length))return;s.setCellRange({rowStartIndex:0,rowStartPinned:c,rowEndIndex:h,rowEndPinned:u,columnStart:g[0],columnEnd:Pt(g)})}else i&&(i==null||i.selectAllRowNodes({source:"keyboardSelectAll",selectAll:xH(o)}));e.preventDefault()}onCtrlAndC(e,t){if(!e||this.gos.get("enableCellTextSelection"))return;const{cellCtrl:n,rowCtrl:r}=this.getControlsForEventTarget(t.target);n!=null&&n.editing||r!=null&&r.editing||(t.preventDefault(),e.copyToClipboard())}onCtrlAndX(e,t){if(!e||this.gos.get("enableCellTextSelection")||this.gos.get("suppressCutToClipboard"))return;const{cellCtrl:n,rowCtrl:r}=this.getControlsForEventTarget(t.target);n!=null&&n.editing||r!=null&&r.editing||(t.preventDefault(),e.cutToClipboard(void 0,"ui"))}onCtrlAndV(e,t){const{cellCtrl:n,rowCtrl:r}=this.getControlsForEventTarget(t.target);n!=null&&n.editing||r!=null&&r.editing||e&&!this.gos.get("suppressClipboardPaste")&&e.pasteFromClipboard()}onCtrlAndD(e,t){e&&!this.gos.get("suppressClipboardPaste")&&e.copyRangeDown(),t.preventDefault()}onCtrlAndZ(e,t){!this.gos.get("undoRedoCellEditing")||!e||(t.preventDefault(),t.shiftKey?e.redo("ui"):e.undo("ui"))}onCtrlAndY(e){e==null||e.redo("ui")}},R2=class extends be{constructor(e,t){super(),this.eContainer=e,this.eViewport=t}postConstruct(){this.addManagedEventListeners({rowContainerHeightChanged:this.onHeightChanged.bind(this,this.beans.rowContainerHeight)})}onHeightChanged(e){const t=e.uiContainerHeight,n=t!=null?`${t}px`:"";this.eContainer.style.height=n,this.eViewport&&(this.eViewport.style.height=n)}},am=e=>e.topRowCtrls,lm=e=>e.getStickyTopRowCtrls(),cm=e=>e.getStickyBottomRowCtrls(),um=e=>e.bottomRowCtrls,dm=e=>e.allRowCtrls,cce={center:{type:"center",container:"ag-center-cols-container",viewport:"ag-center-cols-viewport",getRowCtrls:dm},left:{type:"left",container:"ag-pinned-left-cols-container",pinnedType:"left",getRowCtrls:dm},right:{type:"right",container:"ag-pinned-right-cols-container",pinnedType:"right",getRowCtrls:dm},fullWidth:{type:"fullWidth",container:"ag-full-width-container",fullWidth:!0,getRowCtrls:dm},topCenter:{type:"center",container:"ag-floating-top-container",viewport:"ag-floating-top-viewport",getRowCtrls:am},topLeft:{type:"left",container:"ag-pinned-left-floating-top",pinnedType:"left",getRowCtrls:am},topRight:{type:"right",container:"ag-pinned-right-floating-top",pinnedType:"right",getRowCtrls:am},topFullWidth:{type:"fullWidth",container:"ag-floating-top-full-width-container",fullWidth:!0,getRowCtrls:am},stickyTopCenter:{type:"center",container:"ag-sticky-top-container",viewport:"ag-sticky-top-viewport",getRowCtrls:lm},stickyTopLeft:{type:"left",container:"ag-pinned-left-sticky-top",pinnedType:"left",getRowCtrls:lm},stickyTopRight:{type:"right",container:"ag-pinned-right-sticky-top",pinnedType:"right",getRowCtrls:lm},stickyTopFullWidth:{type:"fullWidth",container:"ag-sticky-top-full-width-container",fullWidth:!0,getRowCtrls:lm},stickyBottomCenter:{type:"center",container:"ag-sticky-bottom-container",viewport:"ag-sticky-bottom-viewport",getRowCtrls:cm},stickyBottomLeft:{type:"left",container:"ag-pinned-left-sticky-bottom",pinnedType:"left",getRowCtrls:cm},stickyBottomRight:{type:"right",container:"ag-pinned-right-sticky-bottom",pinnedType:"right",getRowCtrls:cm},stickyBottomFullWidth:{type:"fullWidth",container:"ag-sticky-bottom-full-width-container",fullWidth:!0,getRowCtrls:cm},bottomCenter:{type:"center",container:"ag-floating-bottom-container",viewport:"ag-floating-bottom-viewport",getRowCtrls:um},bottomLeft:{type:"left",container:"ag-pinned-left-floating-bottom",pinnedType:"left",getRowCtrls:um},bottomRight:{type:"right",container:"ag-pinned-right-floating-bottom",pinnedType:"right",getRowCtrls:um},bottomFullWidth:{type:"fullWidth",container:"ag-floating-bottom-full-width-container",fullWidth:!0,getRowCtrls:um}};function gc(e){return cce[e]}var uce=["topCenter","topLeft","topRight"],dce=["bottomCenter","bottomLeft","bottomRight"],hce=["center","left","right"],pce=["center","left","right","fullWidth"],gce=["stickyTopCenter","stickyBottomCenter","center","topCenter","bottomCenter"],fce=["left","bottomLeft","topLeft","stickyTopLeft","stickyBottomLeft"],mce=["right","bottomRight","topRight","stickyTopRight","stickyBottomRight"],E2=["stickyTopCenter","stickyTopLeft","stickyTopRight"],P2=["stickyBottomCenter","stickyBottomLeft","stickyBottomRight"],Cce=[...E2,"stickyTopFullWidth",...P2,"stickyBottomFullWidth"],vce=[...uce,...dce,...hce,...E2,...P2],F2=class extends be{constructor(e){super(),this.name=e,this.visible=!0,this.EMPTY_CTRLS=[],this.options=gc(e)}postConstruct(){this.enableRtl=this.gos.get("enableRtl"),this.forContainers(["center"],()=>{this.viewportSizeFeature=this.createManagedBean(new Zle(this)),this.addManagedEventListeners({stickyTopOffsetChanged:this.onStickyTopOffsetChanged.bind(this)})})}onStickyTopOffsetChanged(e){this.comp.setOffsetTop(`${e.offset}px`)}registerWithCtrlsService(){this.options.fullWidth||this.beans.ctrlsSvc.register(this.name,this)}forContainers(e,t){e.indexOf(this.name)>=0&&t()}setComp(e,t,n){this.comp=e,this.eContainer=t,this.eViewport=n,this.createManagedBean(new lce(this.eContainer)),this.addPreventScrollWhileDragging(),this.listenOnDomOrder();const{pinnedCols:r,rangeSvc:s}=this.beans,i=()=>this.onPinnedWidthChanged();this.forContainers(fce,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r==null?void 0:r.createPinnedWidthFeature(this.eContainer,!0)),this.addManagedEventListeners({leftPinnedWidthChanged:i})}),this.forContainers(mce,()=>{this.pinnedWidthFeature=this.createOptionalManagedBean(r==null?void 0:r.createPinnedWidthFeature(this.eContainer,!1)),this.addManagedEventListeners({rightPinnedWidthChanged:i})}),this.forContainers(pce,()=>this.createManagedBean(new R2(this.eContainer,this.name==="center"?n:void 0))),s&&this.forContainers(vce,()=>this.createManagedBean(s.createDragListenerFeature(this.eContainer))),this.forContainers(gce,()=>this.createManagedBean(new lF(o=>this.comp.setContainerWidth(`${o}px`)))),this.visible=this.isContainerVisible(),this.addListeners(),this.registerWithCtrlsService()}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}addListeners(){this.addManagedEventListeners({displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),displayedColumnsWidthChanged:this.onDisplayedColumnsChanged.bind(this),displayedRowsChanged:e=>this.onDisplayedRowsChanged(e.afterScroll)}),this.onDisplayedColumnsChanged(),this.onDisplayedRowsChanged()}listenOnDomOrder(){if(Cce.indexOf(this.name)>=0){this.comp.setDomOrder(!0);return}const t=()=>{const n=this.gos.get("ensureDomOrder"),r=Vr(this.gos,"print");this.comp.setDomOrder(n||r)};this.addManagedPropertyListener("domLayout",t),t()}onDisplayedColumnsChanged(){this.forContainers(["center"],()=>this.onHorizontalViewportChanged())}addPreventScrollWhileDragging(){const{dragSvc:e}=this.beans;if(!e)return;const t=n=>{e.dragging&&n.cancelable&&n.preventDefault()};this.eContainer.addEventListener("touchmove",t,{passive:!1}),this.addDestroyFunc(()=>this.eContainer.removeEventListener("touchmove",t))}onHorizontalViewportChanged(e=!1){const t=this.getCenterWidth(),n=this.getCenterViewportScrollLeft();this.beans.colViewport.setScrollPosition(t,n,e)}hasHorizontalScrollGap(){return this.eContainer.clientWidth-this.eViewport.clientWidth<0}hasVerticalScrollGap(){return this.eContainer.clientHeight-this.eViewport.clientHeight<0}getCenterWidth(){return cd(this.eViewport)}getCenterViewportScrollLeft(){return DC(this.eViewport,this.enableRtl)}registerViewportResizeListener(e){const t=di(this.beans,this.eViewport,e);this.addDestroyFunc(()=>t())}isViewportInTheDOMTree(){return iH(this.eViewport)}getViewportScrollLeft(){return DC(this.eViewport,this.enableRtl)}isHorizontalScrollShowing(){return this.gos.get("alwaysShowHorizontalScroll")||Voe(this.eViewport)}setHorizontalScroll(e){this.comp.setHorizontalScroll(e)}getHScrollPosition(){return{left:this.eViewport.scrollLeft,right:this.eViewport.scrollLeft+this.eViewport.offsetWidth}}setCenterViewportScrollLeft(e){AC(this.eViewport,e,this.enableRtl)}isContainerVisible(){return!(this.options.pinnedType!=null)||!!this.pinnedWidthFeature&&this.pinnedWidthFeature.getWidth()>0}onPinnedWidthChanged(){const e=this.isContainerVisible();this.visible!=e&&(this.visible=e,this.onDisplayedRowsChanged())}onDisplayedRowsChanged(e=!1){const t=this.options.getRowCtrls(this.beans.rowRenderer);if(!this.visible||t.length===0){this.comp.setRowCtrls({rowCtrls:this.EMPTY_CTRLS});return}const n=Vr(this.gos,"print"),s=this.gos.get("embedFullWidthRows")||n,i=t.filter(o=>{const a=o.isFullWidth();return this.options.fullWidth?!s&&a:s||!a});this.comp.setRowCtrls({rowCtrls:i,useFlushSync:e})}},T2="ag-force-vertical-scroll",yce="ag-selectable",bce="ag-column-moving",M2=class extends be{constructor(){super(...arguments),this.stickyTopHeight=0,this.stickyBottomHeight=0}wireBeans(e){this.ctrlsSvc=e.ctrlsSvc,this.colModel=e.colModel,this.scrollVisibleSvc=e.scrollVisibleSvc,this.pinnedRowModel=e.pinnedRowModel,this.filterManager=e.filterManager,this.rowGroupColsSvc=e.rowGroupColsSvc}setComp(e,t,n,r,s,i,o){var a,l;this.comp=e,this.eGridBody=t,this.eBodyViewport=n,this.eTop=r,this.eBottom=s,this.eStickyTop=i,this.eStickyBottom=o,this.eCenterColsViewport=n.querySelector(`.${gc("center").viewport}`),this.eFullWidthContainer=n.querySelector(`.${gc("fullWidth").container}`),this.eStickyTopFullWidthContainer=i.querySelector(`.${gc("stickyTopFullWidth").container}`),this.eStickyBottomFullWidthContainer=o.querySelector(`.${gc("stickyBottomFullWidth").container}`),this.setCellTextSelection(this.gos.get("enableCellTextSelection")),this.addManagedPropertyListener("enableCellTextSelection",c=>this.setCellTextSelection(c.currentValue)),this.createManagedBean(new aF(this.comp)),this.scrollFeature=this.createManagedBean(new Qle(this.eBodyViewport)),(a=this.beans.rowDragSvc)==null||a.setupRowDrag(this.eBodyViewport,this),this.setupRowAnimationCssClass(),this.addEventListeners(),this.addFocusListeners([r,n,s,i,o]),this.setGridRootRole(),this.onGridColumnsChanged(),this.addBodyViewportListener(),this.setFloatingHeights(),this.disableBrowserDragging(),this.addStopEditingWhenGridLosesFocus(),this.updateScrollingClasses(),(l=this.filterManager)==null||l.setupAdvFilterHeaderComp(r),this.ctrlsSvc.register("gridBodyCtrl",this)}addEventListeners(){const e=this.setFloatingHeights.bind(this),t=this.setGridRootRole.bind(this);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this),scrollGapChanged:this.updateScrollingClasses.bind(this),pinnedRowDataChanged:e,pinnedHeightChanged:e,headerHeightChanged:this.setStickyTopOffsetTop.bind(this),columnRowGroupChanged:t,columnPivotChanged:t}),this.addManagedPropertyListener("treeData",t)}onGridColumnsChanged(){const e=this.beans.colModel.getCols();this.comp.setColumnCount(e.length)}onScrollVisibilityChanged(){const{scrollVisibleSvc:e}=this,t=e.verticalScrollShowing;this.setVerticalScrollPaddingVisible(t),this.setStickyWidth(t),this.setStickyBottomOffsetBottom();const n=t&&e.getScrollbarWidth()||0,r=tH()?16:0,s=`calc(100% + ${n+r}px)`;Ai(this.beans,()=>this.comp.setBodyViewportWidth(s)),this.updateScrollingClasses()}setGridRootRole(){const{rowGroupColsSvc:e,colModel:t}=this;let n=this.gos.get("treeData");if(!n){const r=t.isPivotMode();n=(e?e.columns.length:0)>=(r?2:1)}this.comp.setGridRootRole(n?"treegrid":"grid")}addFocusListeners(e){e.forEach(t=>{this.addManagedElementListeners(t,{focusin:n=>{const{target:r}=n,s=bc(r,"ag-root",t);t.classList.toggle("ag-has-focus",!s)},focusout:n=>{const{target:r,relatedTarget:s}=n,i=t.contains(s),o=bc(s,"ag-root",t);bc(r,"ag-root",t)||(!i||o)&&t.classList.remove("ag-has-focus")}})})}setColumnMovingCss(e){this.comp.setColumnMovingCss(bce,e)}setCellTextSelection(e=!1){this.comp.setCellSelectableCss(yce,e)}updateScrollingClasses(){const{eGridBody:{classList:e},scrollVisibleSvc:t}=this;e.toggle("ag-body-vertical-content-no-gap",!t.verticalScrollGap),e.toggle("ag-body-horizontal-content-no-gap",!t.horizontalScrollGap)}disableBrowserDragging(){this.addManagedElementListeners(this.eGridBody,{dragstart:e=>{if(e.target instanceof HTMLImageElement)return e.preventDefault(),!1}})}addStopEditingWhenGridLosesFocus(){var e;(e=this.beans.editSvc)==null||e.addStopEditingWhenGridLosesFocus([this.eBodyViewport,this.eBottom,this.eTop,this.eStickyTop,this.eStickyBottom])}updateRowCount(){var s,i;const e=(((s=this.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:s.getRowCount())??0)+(((i=this.filterManager)==null?void 0:i.getHeaderRowCount())??0),{rowModel:t}=this.beans,n=t.isLastRowIndexKnown()?t.getRowCount():-1,r=n===-1?-1:e+n;this.comp.setRowCount(r)}registerBodyViewportResizeListener(e){this.comp.registerBodyViewportResizeListener(e)}setVerticalScrollPaddingVisible(e){const t=e?"scroll":"hidden";this.comp.setPinnedTopBottomOverflowY(t)}isVerticalScrollShowing(){const e=this.gos.get("alwaysShowVerticalScroll"),t=e?T2:null,n=Vr(this.gos,"normal");return this.comp.setAlwaysVerticalScrollClass(t,e),e||n&&Hoe(this.eBodyViewport)}setupRowAnimationCssClass(){const{rowContainerHeight:e,environment:t}=this.beans;let n=t.sizesMeasured;const r=()=>{const s=n&&Qu(this.gos)&&!e.stretching,i=s?"ag-row-animation":"ag-row-no-animation";this.comp.setRowAnimationCssOnBodyViewport(i,s)};r(),this.addManagedEventListeners({heightScaleChanged:r}),this.addManagedPropertyListener("animateRows",r),this.addManagedEventListeners({gridStylesChanged:()=>{!n&&t.sizesMeasured&&(n=!0,r())}})}addBodyViewportListener(){const{popupSvc:e,touchSvc:t}=this.beans,n=this.onBodyViewportContextMenu.bind(this);this.addManagedElementListeners(this.eBodyViewport,{contextmenu:n}),t==null||t.mockBodyContextMenu(this,n),this.addManagedElementListeners(this.eBodyViewport,{wheel:this.onBodyViewportWheel.bind(this,e)}),this.addManagedElementListeners(this.eStickyTop,{wheel:this.onStickyWheel.bind(this)}),this.addManagedElementListeners(this.eStickyBottom,{wheel:this.onStickyWheel.bind(this)}),this.addFullWidthContainerWheelListener()}addFullWidthContainerWheelListener(){this.addManagedElementListeners(this.eFullWidthContainer,{wheel:e=>this.onFullWidthContainerWheel(e)})}onFullWidthContainerWheel(e){const{deltaX:t,deltaY:n,shiftKey:r}=e;(r||Math.abs(t)>Math.abs(n))&&UC(this.gos,e)&&this.scrollGridBodyToMatchEvent(e)}onStickyWheel(e){const{deltaX:t,deltaY:n,shiftKey:r}=e,s=r||Math.abs(t)>Math.abs(n),i=e.target;s?(this.eStickyTopFullWidthContainer.contains(i)||this.eStickyBottomFullWidthContainer.contains(i))&&this.scrollGridBodyToMatchEvent(e):(e.preventDefault(),this.scrollVertically(n))}scrollGridBodyToMatchEvent(e){const{deltaX:t,deltaY:n}=e;e.preventDefault(),this.eCenterColsViewport.scrollBy({left:t||n})}onBodyViewportContextMenu(e,t,n){var s;if(!e&&!n)return;this.gos.get("preventDefaultOnContextMenu")&&(e||n).preventDefault();const{target:r}=e||t;(r===this.eBodyViewport||r===this.ctrlsSvc.get("center").eViewport)&&((s=this.beans.contextMenuSvc)==null||s.showContextMenu({mouseEvent:e,touchEvent:n,value:null,anchorToElement:this.eGridBody}))}onBodyViewportWheel(e,t){this.gos.get("suppressScrollWhenPopupsAreOpen")&&e!=null&&e.hasAnchoredPopup()&&t.preventDefault()}scrollVertically(e){const t=this.eBodyViewport.scrollTop;return this.scrollFeature.setVerticalScrollPosition(t+e),this.eBodyViewport.scrollTop-t}setFloatingHeights(){const{pinnedRowModel:e}=this,t=(e==null?void 0:e.getPinnedTopTotalHeight())??0,n=(e==null?void 0:e.getPinnedBottomTotalHeight())??0;this.comp.setTopHeight(t),this.comp.setBottomHeight(n),this.comp.setTopDisplay(t?"inherit":"none"),this.comp.setBottomDisplay(n?"inherit":"none"),this.setStickyTopOffsetTop(),this.setStickyBottomOffsetBottom()}setStickyTopHeight(e=0){this.comp.setStickyTopHeight(`${e}px`),this.stickyTopHeight=e}setStickyBottomHeight(e=0){this.comp.setStickyBottomHeight(`${e}px`),this.stickyBottomHeight=e}setStickyWidth(e){if(!e)this.comp.setStickyTopWidth("100%"),this.comp.setStickyBottomWidth("100%");else{const t=this.scrollVisibleSvc.getScrollbarWidth();this.comp.setStickyTopWidth(`calc(100% - ${t}px)`),this.comp.setStickyBottomWidth(`calc(100% - ${t}px)`)}}setStickyTopOffsetTop(){var s,i;const t=this.ctrlsSvc.get("gridHeaderCtrl").headerHeight+(((s=this.filterManager)==null?void 0:s.getHeaderHeight())??0),n=((i=this.pinnedRowModel)==null?void 0:i.getPinnedTopTotalHeight())??0;let r=0;t>0&&(r+=t),n>0&&(r+=n),r>0&&(r+=1),this.comp.setStickyTopTop(`${r}px`)}setStickyBottomOffsetBottom(){const{pinnedRowModel:e,scrollVisibleSvc:t,comp:n}=this,r=(e==null?void 0:e.getPinnedBottomTotalHeight())??0,i=t.horizontalScrollShowing&&t.getScrollbarWidth()||0,o=r+i;n.setStickyBottomBottom(`${o}px`)}},I2=class extends He{constructor(e,t){super(),this.direction=t,this.eViewport=pe,this.eContainer=pe,this.hideTimeout=0,this.setTemplate(e)}postConstruct(){this.addManagedEventListeners({scrollVisibilityChanged:this.onScrollVisibilityChanged.bind(this)}),this.onScrollVisibilityChanged(),this.addOrRemoveCssClass("ag-apple-scrollbar",JV()||fl())}destroy(){super.destroy(),window.clearTimeout(this.hideTimeout)}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.invisibleScrollbar=tH(),this.invisibleScrollbar&&(this.hideAndShowInvisibleScrollAsNeeded(),this.addActiveListenerToggles()))}addActiveListenerToggles(){const e=this.getGui(),t=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!0),n=()=>this.addOrRemoveCssClass("ag-scrollbar-active",!1);this.addManagedListeners(e,{mouseenter:t,mousedown:t,touchstart:t,mouseleave:n,touchend:n})}onScrollVisibilityChanged(){this.invisibleScrollbar===void 0&&this.initialiseInvisibleScrollbar(),Ai(this.beans,()=>this.setScrollVisible())}hideAndShowInvisibleScrollAsNeeded(){this.addManagedEventListeners({bodyScroll:e=>{e.direction===this.direction&&(this.hideTimeout&&(window.clearTimeout(this.hideTimeout),this.hideTimeout=0),this.addOrRemoveCssClass("ag-scrollbar-scrolling",!0))},bodyScrollEnd:()=>{this.hideTimeout=window.setTimeout(()=>{this.addOrRemoveCssClass("ag-scrollbar-scrolling",!1),this.hideTimeout=0},400)}})}attemptSettingScrollPosition(e){const t=this.eViewport;hH(()=>us(t),()=>this.setScrollPosition(e),100)}onScrollCallback(e){this.addManagedElementListeners(this.eViewport,{scroll:e})}},D2=class extends I2{constructor(){super(``,"horizontal"),this.eLeftSpacer=pe,this.eRightSpacer=pe,this.setScrollVisibleDebounce=0}wireBeans(e){this.visibleCols=e.visibleCols,this.scrollVisibleSvc=e.scrollVisibleSvc}postConstruct(){super.postConstruct();const e=this.setFakeHScrollSpacerWidths.bind(this);this.addManagedEventListeners({displayedColumnsChanged:e,displayedColumnsWidthChanged:e,pinnedRowDataChanged:this.refreshCompBottom.bind(this)}),this.addManagedPropertyListener("domLayout",e),this.beans.ctrlsSvc.register("fakeHScrollComp",this),this.createManagedBean(new lF(t=>this.eContainer.style.width=`${t}px`)),this.addManagedPropertyListeners(["suppressHorizontalScroll"],this.onScrollVisibilityChanged.bind(this))}destroy(){window.clearTimeout(this.setScrollVisibleDebounce),super.destroy()}initialiseInvisibleScrollbar(){this.invisibleScrollbar===void 0&&(this.enableRtl=this.gos.get("enableRtl"),super.initialiseInvisibleScrollbar(),this.invisibleScrollbar&&this.refreshCompBottom())}refreshCompBottom(){var t;if(!this.invisibleScrollbar)return;const e=((t=this.beans.pinnedRowModel)==null?void 0:t.getPinnedBottomTotalHeight())??0;this.getGui().style.bottom=`${e}px`}onScrollVisibilityChanged(){super.onScrollVisibilityChanged(),this.setFakeHScrollSpacerWidths()}setFakeHScrollSpacerWidths(){const e=this.scrollVisibleSvc.verticalScrollShowing;let t=this.visibleCols.getDisplayedColumnsRightWidth();const n=!this.enableRtl&&e,r=this.scrollVisibleSvc.getScrollbarWidth();n&&(t+=r),Zi(this.eRightSpacer,t),this.eRightSpacer.classList.toggle("ag-scroller-corner",t<=r);let s=this.visibleCols.getColsLeftWidth();this.enableRtl&&e&&(s+=r),Zi(this.eLeftSpacer,s),this.eLeftSpacer.classList.toggle("ag-scroller-corner",s<=r)}setScrollVisible(){const e=this.scrollVisibleSvc.horizontalScrollShowing,t=this.invisibleScrollbar,n=this.gos.get("suppressHorizontalScroll"),r=e&&this.scrollVisibleSvc.getScrollbarWidth()||0,i=n?0:r===0&&t?16:r,o=()=>{this.setScrollVisibleDebounce=0,this.addOrRemoveCssClass("ag-scrollbar-invisible",t),cp(this.getGui(),i),cp(this.eViewport,i),cp(this.eContainer,i),this.setDisplayed(e,{skipAriaHidden:!0})};window.clearTimeout(this.setScrollVisibleDebounce),e?this.setScrollVisibleDebounce=window.setTimeout(o,100):o()}getScrollPosition(){return DC(this.eViewport,this.enableRtl)}setScrollPosition(e){us(this.eViewport)||this.attemptSettingScrollPosition(e),AC(this.eViewport,e,this.enableRtl)}},wce={selector:"AG-FAKE-HORIZONTAL-SCROLL",component:D2},A2=class extends I2{constructor(){super(``,"vertical")}postConstruct(){super.postConstruct(),this.createManagedBean(new R2(this.eContainer));const{ctrlsSvc:e}=this.beans;e.register("fakeVScrollComp",this),this.addManagedEventListeners({rowContainerHeightChanged:this.onRowContainerHeightChanged.bind(this,e)})}setScrollVisible(){const{scrollVisibleSvc:e}=this.beans,t=e.verticalScrollShowing,n=this.invisibleScrollbar,r=t&&e.getScrollbarWidth()||0,s=r===0&&n?16:r;this.addOrRemoveCssClass("ag-scrollbar-invisible",n),Zi(this.getGui(),s),Zi(this.eViewport,s),Zi(this.eContainer,s),this.setDisplayed(t,{skipAriaHidden:!0})}onRowContainerHeightChanged(e){const n=e.getGridBodyCtrl().eBodyViewport,r=this.getScrollPosition(),s=n.scrollTop;r!=s&&this.setScrollPosition(s,!0)}getScrollPosition(){return this.eViewport.scrollTop}setScrollPosition(e,t){!t&&!us(this.eViewport)&&this.attemptSettingScrollPosition(e),this.eViewport.scrollTop=e}},Sce={selector:"AG-FAKE-VERTICAL-SCROLL",component:A2};function L2(e){return e.cols?e.cols.treeDepth+1:-1}function ea(e){var t;return((t=e.ctrlsSvc.getHeaderRowContainerCtrl())==null?void 0:t.getRowCount())??0}function dF(e){const t=[],n=e.ctrlsSvc.getHeaderRowContainerCtrls();for(const r of n){if(!r)continue;const s=r.getGroupRowCount()||0;for(let i=0;ia)&&(t[i]=l)}}}return t}function xce(e,t){const n=e.colModel.isPivotMode()?Ece(e):O2(e);let r=0;const s=t.getHeaderCtrls();for(const i of s){const{column:o}=i;if(o.isAutoHeaderHeight()){const a=o.getAutoHeaderHeight();a!=null&&a>r&&(r=a)}}return Math.max(n,r)}function hF(e){const t=e.colModel.isPivotMode()?Rce(e):xg(e),r=e.visibleCols.allCols.filter(s=>s.isAutoHeaderHeight()).map(s=>s.getAutoHeaderHeight()||0);return Math.max(t,...r)}function xg(e){return e.gos.get("headerHeight")??e.environment.getDefaultHeaderHeight()}function pF(e){return e.gos.get("floatingFiltersHeight")??xg(e)}function O2(e){return e.gos.get("groupHeaderHeight")??xg(e)}function Rce(e){return e.gos.get("pivotHeaderHeight")??xg(e)}function Ece(e){return e.gos.get("pivotGroupHeaderHeight")??O2(e)}var k2=class extends be{setComp(e,t,n){this.comp=e,this.eGui=t;const{beans:r}=this,{headerNavigation:s,touchSvc:i,ctrlsSvc:o}=r;s&&this.createManagedBean(new Ll(n,{onTabKeyDown:this.onTabKeyDown.bind(this),handleKeyDown:this.handleKeyDown.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addManagedEventListeners({columnPivotModeChanged:this.onPivotModeChanged.bind(this,r),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this,r)}),this.onPivotModeChanged(r),this.setupHeaderHeight();const a=this.onHeaderContextMenu.bind(this);this.addManagedElementListeners(this.eGui,{contextmenu:a}),i==null||i.mockHeaderContextMenu(this,a),o.register("gridHeaderCtrl",this)}setupHeaderHeight(){const e=this.setHeaderHeight.bind(this);e(),this.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],e),this.addManagedEventListeners({displayedColumnsChanged:e,columnHeaderHeightChanged:e,columnGroupHeaderHeightChanged:()=>Ai(this.beans,()=>e()),gridStylesChanged:e,advancedFilterEnabledChanged:e})}setHeaderHeight(){var i;const{beans:e}=this;let t=0;const n=dF(e).reduce((o,a)=>o+a,0),r=hF(e);if((i=e.filterManager)!=null&&i.hasFloatingFilters()&&(t+=pF(e)),t+=n,t+=r,this.headerHeight===t)return;this.headerHeight=t;const s=`${t+1}px`;this.comp.setHeightAndMinHeight(s),this.eventSvc.dispatchEvent({type:"headerHeightChanged"})}onPivotModeChanged(e){const t=e.colModel.isPivotMode();this.comp.addOrRemoveCssClass("ag-pivot-on",t),this.comp.addOrRemoveCssClass("ag-pivot-off",!t)}onDisplayedColumnsChanged(e){const n=e.visibleCols.allCols.some(r=>r.isSpanHeaderHeight());this.comp.addOrRemoveCssClass("ag-header-allow-overflow",n)}onTabKeyDown(e){const t=this.gos.get("enableRtl"),n=e.shiftKey,r=n!==t?"LEFT":"RIGHT",{beans:s}=this,{headerNavigation:i,focusSvc:o}=s;(i.navigateHorizontally(r,!0,e)||!n&&o.focusOverlay(!1)||ha(s,n,!0))&&e.preventDefault()}handleKeyDown(e){let t=null;const{headerNavigation:n}=this.beans;switch(e.key){case se.LEFT:t="LEFT";case se.RIGHT:{$e(t)||(t="RIGHT"),n.navigateHorizontally(t,!1,e)&&e.preventDefault();break}case se.UP:t="UP";case se.DOWN:{$e(t)||(t="DOWN"),n.navigateVertically(t,null,e)&&e.preventDefault();break}default:return}}onFocusOut(e){const{relatedTarget:t}=e,{eGui:n,beans:r}=this;!t&&n.contains(en(r))||n.contains(t)||(r.focusSvc.focusedHeader=null)}onHeaderContextMenu(e,t,n){var o;const{menuSvc:r,ctrlsSvc:s}=this.beans;if(!e&&!n||!(r!=null&&r.isHeaderContextMenuEnabled()))return;const{target:i}=e??t;(i===this.eGui||i===((o=s.getHeaderRowContainerCtrl())==null?void 0:o.eViewport))&&r.showHeaderContextMenu(void 0,e,n)}},gF=class extends He{constructor(e,t){super(e),this.ctrl=t}getCtrl(){return this.ctrl}},Pce=class extends gF{constructor(t){super(`
`,t),this.eResize=pe,this.eHeaderCompWrapper=pe,this.headerCompVersion=0}postConstruct(){const t=this.getGui();((i,o)=>{o!=null&&o!=""?t.setAttribute(i,o):t.removeAttribute(i)})("col-id",this.ctrl.column.getColId());const r={setWidth:i=>t.style.width=i,addOrRemoveCssClass:(i,o)=>this.addOrRemoveCssClass(i,o),setAriaSort:i=>i?qV(t,i):XV(t),setUserCompDetails:i=>this.setUserCompDetails(i),getUserCompInstance:()=>this.headerComp};this.ctrl.setComp(r,this.getGui(),this.eResize,this.eHeaderCompWrapper,void 0);const s=this.ctrl.getSelectAllGui();s&&this.eResize.insertAdjacentElement("afterend",s)}destroy(){this.destroyHeaderComp(),super.destroy()}destroyHeaderComp(){this.headerComp&&(this.eHeaderCompWrapper.removeChild(this.headerCompGui),this.headerComp=this.destroyBean(this.headerComp),this.headerCompGui=void 0)}setUserCompDetails(t){this.headerCompVersion++;const n=this.headerCompVersion;t.newAgStackInstance().then(r=>this.afterCompCreated(n,r))}afterCompCreated(t,n){if(t!=this.headerCompVersion||!this.isAlive()){this.destroyBean(n);return}this.destroyHeaderComp(),this.headerComp=n,this.headerCompGui=n.getGui(),this.eHeaderCompWrapper.appendChild(this.headerCompGui),this.ctrl.setDragSource(this.getGui())}},Fce=class extends gF{constructor(t){super(`
`,t),this.eResize=pe,this.eHeaderCompWrapper=pe}postConstruct(){const t=this.getGui(),n=(s,i)=>i!=null?t.setAttribute(s,i):t.removeAttribute(s);t.setAttribute("col-id",this.ctrl.column.getUniqueId());const r={addOrRemoveCssClass:(s,i)=>this.addOrRemoveCssClass(s,i),setHeaderWrapperHidden:s=>{s?this.eHeaderCompWrapper.style.setProperty("display","none"):this.eHeaderCompWrapper.style.removeProperty("display")},setHeaderWrapperMaxHeight:s=>{s!=null?this.eHeaderCompWrapper.style.setProperty("max-height",`${s}px`):this.eHeaderCompWrapper.style.removeProperty("max-height"),this.eHeaderCompWrapper.classList.toggle("ag-header-cell-comp-wrapper-limited-height",s!=null)},setResizableDisplayed:s=>dt(this.eResize,s),setWidth:s=>t.style.width=s,setAriaExpanded:s=>n("aria-expanded",s),setUserCompDetails:s=>this.setUserCompDetails(s),getUserCompInstance:()=>this.headerGroupComp};this.ctrl.setComp(r,t,this.eResize,this.eHeaderCompWrapper,void 0)}setUserCompDetails(t){t.newAgStackInstance().then(n=>this.afterHeaderCompCreated(n))}afterHeaderCompCreated(t){const n=()=>this.destroyBean(t);if(!this.isAlive()){n();return}const r=this.getGui(),s=t.getGui();this.eHeaderCompWrapper.appendChild(s),this.addDestroyFunc(n),this.headerGroupComp=t,this.ctrl.setDragSource(r)}addOrRemoveHeaderWrapperStyle(t,n){const{eHeaderCompWrapper:r}=this;n?r.style.setProperty(t,n):r.style.removeProperty(t)}},Tce=class extends gF{constructor(t){super(`
`,t),this.eFloatingFilterBody=pe,this.eButtonWrapper=pe,this.eButtonShowMainFilter=pe}postConstruct(){const t=this.getGui(),n={addOrRemoveCssClass:(r,s)=>this.addOrRemoveCssClass(r,s),addOrRemoveBodyCssClass:(r,s)=>this.eFloatingFilterBody.classList.toggle(r,s),setButtonWrapperDisplayed:r=>dt(this.eButtonWrapper,r),setCompDetails:r=>this.setCompDetails(r),getFloatingFilterComp:()=>this.compPromise,setWidth:r=>t.style.width=r,setMenuIcon:r=>this.eButtonShowMainFilter.appendChild(r)};this.ctrl.setComp(n,t,this.eButtonShowMainFilter,this.eFloatingFilterBody,void 0)}setCompDetails(t){if(!t){this.destroyFloatingFilterComp(),this.compPromise=null;return}this.compPromise=t.newAgStackInstance(),this.compPromise.then(n=>this.afterCompCreated(n))}destroy(){this.destroyFloatingFilterComp(),super.destroy()}destroyFloatingFilterComp(){this.floatingFilterComp&&(this.eFloatingFilterBody.removeChild(this.floatingFilterComp.getGui()),this.floatingFilterComp=this.destroyBean(this.floatingFilterComp))}afterCompCreated(t){if(t){if(!this.isAlive()){this.destroyBean(t);return}this.destroyFloatingFilterComp(),this.floatingFilterComp=t,this.eFloatingFilterBody.appendChild(t.getGui()),t.afterGuiAttached&&t.afterGuiAttached()}}},Mce=class extends He{constructor(t){super(),this.headerComps={},this.ctrl=t,this.setTemplate(`
`)}postConstruct(){VP(this.getGui(),this.ctrl.getAriaRowIndex());const t={setHeight:n=>this.getGui().style.height=n,setTop:n=>this.getGui().style.top=n,setHeaderCtrls:(n,r)=>this.setHeaderCtrls(n,r),setWidth:n=>this.getGui().style.width=n};this.ctrl.setComp(t,void 0)}destroy(){this.setHeaderCtrls([],!1),super.destroy()}setHeaderCtrls(t,n){if(!this.isAlive())return;const r=this.headerComps;if(this.headerComps={},t.forEach(s=>{const i=s.instanceId;let o=r[i];delete r[i],o==null&&(o=this.createHeaderComp(s),this.getGui().appendChild(o.getGui())),this.headerComps[i]=o}),Object.values(r).forEach(s=>{this.getGui().removeChild(s.getGui()),this.destroyBean(s)}),n){const s=Object.values(this.headerComps);s.sort((o,a)=>{const l=o.getCtrl().column.getLeft(),c=a.getCtrl().column.getLeft();return l-c});const i=s.map(o=>o.getGui());aH(this.getGui(),i)}}createHeaderComp(t){let n;switch(this.ctrl.type){case"group":n=new Fce(t);break;case"filter":n=new Tce(t);break;default:n=new Pce(t);break}return this.createBean(n),n.setParentComponent(this),n}},fF=class extends be{constructor(e,t,n,r){super(),this.columnOrGroup=e,this.eCell=t,this.colsSpanning=r,this.columnOrGroup=e,this.ariaEl=t.querySelector("[role=columnheader]")||t,this.beans=n}setColsSpanning(e){this.colsSpanning=e,this.onLeftChanged()}getColumnOrGroup(){const{beans:e,colsSpanning:t}=this;return e.gos.get("enableRtl")&&t?Pt(t):this.columnOrGroup}postConstruct(){const e=this.onLeftChanged.bind(this);this.addManagedListeners(this.columnOrGroup,{leftChanged:e}),this.setLeftFirstTime(),this.addManagedEventListeners({displayedColumnsWidthChanged:e}),this.addManagedPropertyListener("domLayout",e)}setLeftFirstTime(){const{gos:e,colAnimation:t}=this.beans,n=e.get("suppressColumnMoveAnimation"),r=$e(this.columnOrGroup.getOldLeft());(t==null?void 0:t.isActive())&&r&&!n?this.animateInLeft():this.onLeftChanged()}animateInLeft(){const e=this.getColumnOrGroup(),t=this.modifyLeftForPrintLayout(e,e.getOldLeft()),n=this.modifyLeftForPrintLayout(e,e.getLeft());this.setLeft(t),this.actualLeft=n,this.beans.colAnimation.executeNextVMTurn(()=>{this.actualLeft===n&&this.setLeft(n)})}onLeftChanged(){const e=this.getColumnOrGroup(),t=e.getLeft();this.actualLeft=this.modifyLeftForPrintLayout(e,t),this.setLeft(this.actualLeft)}modifyLeftForPrintLayout(e,t){const{gos:n,visibleCols:r}=this.beans;if(!Vr(n,"print")||e.getPinned()==="left")return t;const i=r.getColsLeftWidth();if(e.getPinned()==="right"){const o=r.bodyWidth;return i+o+t}return i+t}setLeft(e){if($e(e)&&(this.eCell.style.left=`${e}px`),rr(this.columnOrGroup)){const t=this.columnOrGroup.getLeafColumns();if(!t.length)return;t.length>1&&KV(this.ariaEl,t.length)}}},Ice=0,N2="headerCtrl",mF=class extends be{constructor(e,t){super(),this.column=e,this.rowCtrl=t,this.resizeToggleTimeout=0,this.resizeMultiplier=1,this.resizeFeature=null,this.lastFocusEvent=null,this.dragSource=null,this.instanceId=e.getUniqueId()+"-"+Ice++}postConstruct(){const e=this.refreshTabIndex.bind(this);this.addManagedPropertyListeners(["suppressHeaderFocus"],e),this.addManagedEventListeners({overlayExclusiveChanged:e})}shouldStopEventPropagation(e){const{headerRowIndex:t,column:n}=this.beans.focusSvc.focusedHeader,r=n.getDefinition(),s=r&&r.suppressHeaderKeyboardEvent;if(!$e(s))return!1;const i=this.gos.addGridCommonParams({colDef:r,column:n,headerRowIndex:t,event:e});return!!s(i)}getWrapperHasFocus(){return en(this.beans)===this.eGui}setGui(e,t){this.eGui=e,this.addDomData(t),t.addManagedListeners(this.beans.eventSvc,{displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this)}),t.addManagedElementListeners(this.eGui,{focus:this.onGuiFocus.bind(this)}),this.onDisplayedColumnsChanged(),this.refreshTabIndex()}onGuiFocus(){this.eventSvc.dispatchEvent({type:"headerFocused",column:this.column})}setupAutoHeight(e){const{wrapperElement:t,checkMeasuringCallback:n,compBean:r}=e,{beans:s}=this,i=h=>{if(!this.isAlive()||!r.isAlive())return;const{paddingTop:g,paddingBottom:m,borderBottomWidth:C,borderTopWidth:v}=Qc(this.eGui),b=g+m+C+v,S=t.offsetHeight+b;if(h<5){const x=Cn(s),P=!x||!x.contains(t),F=S==0;if(P||F){Ai(s,()=>i(h+1));return}}this.setColHeaderHeight(this.column,S)};let o=!1,a;const l=()=>{const h=this.column.isAutoHeaderHeight();h&&!o&&c(),!h&&o&&u()},c=()=>{o=!0,i(0),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!0),a=di(this.beans,t,()=>i(0))},u=()=>{o=!1,a&&a(),this.comp.addOrRemoveCssClass("ag-header-cell-auto-height",!1),a=void 0};l(),r.addDestroyFunc(()=>u()),r.addManagedListeners(this.column,{widthChanged:()=>o&&i(0)}),r.addManagedEventListeners({sortChanged:()=>{o&&window.setTimeout(()=>i(0))}}),n&&n(l)}onDisplayedColumnsChanged(){const{comp:e,column:t,beans:n,eGui:r}=this;!e||!t||!r||(i2(e,t,n.visibleCols),HP(r,n.visibleCols.getAriaColIndex(t)))}addResizeAndMoveKeyboardListeners(e){e.addManagedListeners(this.eGui,{keydown:this.onGuiKeyDown.bind(this),keyup:this.onGuiKeyUp.bind(this)})}refreshTabIndex(){const e=Zu(this.beans);this.eGui&&Ti(this.eGui,"tabindex",e?null:"-1")}onGuiKeyDown(e){var i;const t=en(this.beans),n=e.key===se.LEFT||e.key===se.RIGHT;if(this.isResizing&&(e.preventDefault(),e.stopImmediatePropagation()),t!==this.eGui||!e.shiftKey&&!e.altKey||((this.isResizing||n)&&(e.preventDefault(),e.stopImmediatePropagation()),!n))return;const s=e.key===se.LEFT!==this.gos.get("enableRtl")?"left":"right";if(e.altKey){this.isResizing=!0,this.resizeMultiplier+=1;const o=this.getViewportAdjustedResizeDiff(e);this.resizeHeader(o,e.shiftKey),(i=this.resizeFeature)==null||i.toggleColumnResizing(!0)}else this.moveHeader(s)}moveHeader(e){var t;(t=this.beans.colMoves)==null||t.moveHeader(e,this.eGui,this.column,this.rowCtrl.pinned,this)}getViewportAdjustedResizeDiff(e){const t=this.getResizeDiff(e),{pinnedCols:n}=this.beans;return n?n.getHeaderResizeDiff(t,this.column):t}getResizeDiff(e){const{gos:t,column:n}=this;let r=e.key===se.LEFT!==t.get("enableRtl");const s=n.getPinned(),i=t.get("enableRtl");return s&&i!==(s==="right")&&(r=!r),(r?-1:1)*this.resizeMultiplier}onGuiKeyUp(){this.isResizing&&(this.resizeToggleTimeout&&(window.clearTimeout(this.resizeToggleTimeout),this.resizeToggleTimeout=0),this.isResizing=!1,this.resizeMultiplier=1,this.resizeToggleTimeout=window.setTimeout(()=>{var e;(e=this.resizeFeature)==null||e.toggleColumnResizing(!1)},150))}handleKeyDown(e){const t=this.getWrapperHasFocus();switch(e.key){case se.PAGE_DOWN:case se.PAGE_UP:case se.PAGE_HOME:case se.PAGE_END:t&&e.preventDefault()}}addDomData(e){const t=N2,{eGui:n,gos:r}=this;Oc(r,n,t,this),e.addDestroyFunc(()=>Oc(r,n,t,null))}focus(e){const{eGui:t}=this;return t?(this.lastFocusEvent=e||null,t.focus(),!0):!1}focusThis(){this.beans.focusSvc.focusedHeader={headerRowIndex:this.rowCtrl.rowIndex,column:this.column}}removeDragSource(){var e;this.dragSource&&((e=this.beans.dragAndDrop)==null||e.removeDragSource(this.dragSource),this.dragSource=null)}handleContextMenuMouseEvent(e,t,n){const r=e??t,{menuSvc:s,gos:i}=this.beans;i.get("preventDefaultOnContextMenu")&&r.preventDefault(),s!=null&&s.isHeaderContextMenuEnabled(n)&&s.showHeaderContextMenu(n,e,t),this.dispatchColumnMouseEvent("columnHeaderContextMenu",n)}dispatchColumnMouseEvent(e,t){this.eventSvc.dispatchEvent({type:e,column:t})}setColHeaderHeight(e,t){if(!e.setAutoHeaderHeight(t))return;const{eventSvc:n}=this;e.isColumn?n.dispatchEvent({type:"columnHeaderHeightChanged",column:e,columns:[e],source:"autosizeColumnHeaderHeight"}):n.dispatchEvent({type:"columnGroupHeaderHeightChanged",columnGroup:e,source:"autosizeColumnGroupHeaderHeight"})}clearComponent(){this.removeDragSource(),this.resizeFeature=null,this.comp=null,this.eGui=null}destroy(){super.destroy(),this.column=null,this.lastFocusEvent=null,this.rowCtrl=null}},Dce=class extends mF{constructor(){super(...arguments),this.refreshFunctions={},this.userHeaderClasses=new Set,this.ariaDescriptionProperties=new Map}setComp(e,t,n,r,s){this.comp=e;const{colResize:i,context:o,colHover:a}=this.beans,l=wg(this,o,s);this.setGui(t,l),this.updateState(),this.setupWidth(l),this.setupMovingCss(l),this.setupMenuClass(l),this.setupSortableClass(l),this.setupWrapTextClass(),this.refreshSpanHeaderHeight(),this.setupAutoHeight({wrapperElement:r,checkMeasuringCallback:u=>this.setRefreshFunction("measuring",u),compBean:l}),this.addColumnHoverListener(l),this.setupFilterClass(l),this.setupClassesFromColDef(),this.setupTooltip(),this.addActiveHeaderMouseListeners(l),this.setupSelectAll(l),this.setupUserComp(),this.refreshAria(),i?this.resizeFeature=l.createManagedBean(i.createResizeFeature(this.rowCtrl.pinned,this.column,n,e,this)):dt(n,!1),a==null||a.createHoverFeature(l,[this.column],t),l.createManagedBean(new fF(this.column,t,this.beans)),l.createManagedBean(new Ll(t,{shouldStopEventPropagation:u=>this.shouldStopEventPropagation(u),onTabKeyDown:()=>null,handleKeyDown:this.handleKeyDown.bind(this),onFocusIn:this.onFocusIn.bind(this),onFocusOut:this.onFocusOut.bind(this)})),this.addResizeAndMoveKeyboardListeners(l),l.addManagedPropertyListeners(["suppressMovableColumns","suppressMenuHide","suppressAggFuncInHeader"],()=>this.refresh()),l.addManagedListeners(this.column,{colDefChanged:()=>this.refresh()}),l.addManagedListeners(this.column,{headerHighlightChanged:this.onHeaderHighlightChanged.bind(this)});const c=()=>this.checkDisplayName();l.addManagedEventListeners({columnValueChanged:c,columnRowGroupChanged:c,columnPivotChanged:c,headerHeightChanged:this.onHeaderHeightChanged.bind(this)}),l.addDestroyFunc(()=>{this.refreshFunctions={},this.selectAllFeature=null,this.dragSourceElement=void 0,this.userCompDetails=null,this.userHeaderClasses.clear(),this.ariaDescriptionProperties.clear(),this.clearComponent()})}resizeHeader(e,t){var n;(n=this.beans.colResize)==null||n.resizeHeader(this.column,e,t)}setupUserComp(){const e=this.lookupUserCompDetails();e&&this.setCompDetails(e)}setCompDetails(e){this.userCompDetails=e,this.comp.setUserCompDetails(e)}lookupUserCompDetails(){const e=this.createParams(),t=this.column.getColDef();return ele(this.beans.userCompFactory,t,e)}createParams(){const{menuSvc:e,sortSvc:t,colFilter:n,gos:r}=this.beans;return r.addGridCommonParams({column:this.column,displayName:this.displayName,enableSorting:this.column.isSortable(),enableMenu:this.menuEnabled,enableFilterButton:this.openFilterEnabled&&!!(e!=null&&e.isHeaderFilterButtonEnabled(this.column)),enableFilterIcon:!!n&&(!this.openFilterEnabled||Gr(this.gos)),showColumnMenu:i=>{e==null||e.showColumnMenu({column:this.column,buttonElement:i,positionBy:"button"})},showColumnMenuAfterMouseClick:i=>{e==null||e.showColumnMenu({column:this.column,mouseEvent:i,positionBy:"mouse"})},showFilter:i=>{e==null||e.showFilterMenu({column:this.column,buttonElement:i,containerType:"columnFilter",positionBy:"button"})},progressSort:i=>{t==null||t.progressSort(this.column,!!i,"uiColumnSorted")},setSort:(i,o)=>{t==null||t.setSortForColumn(this.column,i,!!o,"uiColumnSorted")},eGridHeader:this.eGui,setTooltip:(i,o)=>{r.assertModuleRegistered("Tooltip",3),this.setupTooltip(i,o)}})}setupSelectAll(e){const{selectionSvc:t}=this.beans;t&&(this.selectAllFeature=e.createManagedBean(t.createSelectAllFeature(this.column)),this.selectAllFeature.setComp(this))}getSelectAllGui(){var e;return(e=this.selectAllFeature)==null?void 0:e.getCheckboxGui()}handleKeyDown(e){var t;super.handleKeyDown(e),e.key===se.SPACE&&((t=this.selectAllFeature)==null||t.onSpaceKeyDown(e)),e.key===se.ENTER&&this.onEnterKeyDown(e),e.key===se.DOWN&&e.altKey&&this.showMenuOnKeyPress(e,!1)}onEnterKeyDown(e){var t;e.ctrlKey||e.metaKey?this.showMenuOnKeyPress(e,!0):this.sortable&&((t=this.beans.sortSvc)==null||t.progressSort(this.column,e.shiftKey,"uiColumnSorted"))}showMenuOnKeyPress(e,t){const n=this.comp.getUserCompInstance();qL(n)&&n.onMenuKeyboardShortcut(t)&&e.preventDefault()}onFocusIn(e){this.eGui.contains(e.relatedTarget)||(this.focusThis(),this.announceAriaDescription()),ny()&&this.setActiveHeader(!0)}onFocusOut(e){this.eGui.contains(e.relatedTarget)||this.setActiveHeader(!1)}setupTooltip(e,t){var n;this.tooltipFeature=(n=this.beans.tooltipSvc)==null?void 0:n.setupHeaderTooltip(this.tooltipFeature,this,e,t)}setupClassesFromColDef(){const e=()=>{const t=this.column.getColDef(),n=nF(t,this.gos,this.column,null),r=this.userHeaderClasses;this.userHeaderClasses=new Set(n),n.forEach(s=>{r.has(s)?r.delete(s):this.comp.addOrRemoveCssClass(s,!0)}),r.forEach(s=>this.comp.addOrRemoveCssClass(s,!1))};this.setRefreshFunction("headerClasses",e),e()}setDragSource(e){var t;this.dragSourceElement=e,this.removeDragSource(),!(!e||!this.draggable)&&(this.dragSource=((t=this.beans.colMoves)==null?void 0:t.setDragSourceForHeader(e,this.column,this.displayName))??null)}updateState(){const{menuSvc:e}=this.beans;this.menuEnabled=!!(e!=null&&e.isColumnMenuInHeaderEnabled(this.column)),this.openFilterEnabled=!!(e!=null&&e.isFilterMenuInHeaderEnabled(this.column)),this.sortable=this.column.isSortable(),this.displayName=this.calculateDisplayName(),this.draggable=this.workOutDraggable()}setRefreshFunction(e,t){this.refreshFunctions[e]=t}refresh(){this.updateState(),this.refreshHeaderComp(),this.refreshAria(),Object.values(this.refreshFunctions).forEach(e=>e())}refreshHeaderComp(){const e=this.lookupUserCompDetails();if(!e)return;(this.comp.getUserCompInstance()!=null&&this.userCompDetails.componentClass==e.componentClass?this.attemptHeaderCompRefresh(e.params):!1)?this.setDragSource(this.dragSourceElement):this.setCompDetails(e)}attemptHeaderCompRefresh(e){const t=this.comp.getUserCompInstance();return!t||!t.refresh?!1:t.refresh(e)}calculateDisplayName(){return this.beans.colNames.getDisplayNameForColumn(this.column,"header",!0)}checkDisplayName(){this.displayName!==this.calculateDisplayName()&&this.refresh()}workOutDraggable(){const e=this.column.getColDef();return!!(!this.gos.get("suppressMovableColumns")&&!e.suppressMovable&&!e.lockPosition)||!!e.enableRowGroup||!!e.enablePivot}setupWidth(e){const t=()=>{const n=this.column.getActualWidth();this.comp.setWidth(`${n}px`)};e.addManagedListeners(this.column,{widthChanged:t}),t()}setupMovingCss(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-moving",this.column.isMoving())};e.addManagedListeners(this.column,{movingChanged:t}),t()}setupMenuClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-column-menu-visible",this.column.isMenuVisible())};e.addManagedListeners(this.column,{menuVisibleChanged:t}),t()}setupSortableClass(e){const t=()=>{this.comp.addOrRemoveCssClass("ag-header-cell-sortable",!!this.sortable)};t(),this.setRefreshFunction("updateSortable",t),e.addManagedEventListeners({sortChanged:this.refreshAriaSort.bind(this)})}setupFilterClass(e){const t=()=>{const n=this.column.isFilterActive();this.comp.addOrRemoveCssClass("ag-header-cell-filtered",n),this.refreshAria()};e.addManagedListeners(this.column,{filterActiveChanged:t}),t()}setupWrapTextClass(){const e=()=>{const t=!!this.column.getColDef().wrapHeaderText;this.comp.addOrRemoveCssClass("ag-header-cell-wrap-text",t)};e(),this.setRefreshFunction("wrapText",e)}onHeaderHighlightChanged(){const e=this.column.getHighlighted(),t=e===0,n=e===1;this.comp.addOrRemoveCssClass("ag-header-highlight-before",t),this.comp.addOrRemoveCssClass("ag-header-highlight-after",n)}onDisplayedColumnsChanged(){super.onDisplayedColumnsChanged(),this.isAlive()&&this.onHeaderHeightChanged()}onHeaderHeightChanged(){this.refreshSpanHeaderHeight()}refreshSpanHeaderHeight(){const{eGui:e,column:t,comp:n,beans:r}=this,s=dF(this.beans),i=s.reduce((u,h)=>u+=h,0)===0;if(n.addOrRemoveCssClass("ag-header-parent-hidden",i),!t.isSpanHeaderHeight()){e.style.removeProperty("top"),e.style.removeProperty("height"),n.addOrRemoveCssClass("ag-header-span-height",!1),n.addOrRemoveCssClass("ag-header-span-total",!1);return}const{numberOfParents:o,isSpanningTotal:a}=this.column.getColumnGroupPaddingInfo();n.addOrRemoveCssClass("ag-header-span-height",o>0);const l=hF(r);if(o===0){n.addOrRemoveCssClass("ag-header-span-total",!1),e.style.setProperty("top","0px"),e.style.setProperty("height",`${l}px`);return}n.addOrRemoveCssClass("ag-header-span-total",a);let c=0;for(let u=0;un==="filter"?-1:r.charCodeAt(0)-n.charCodeAt(0)).map(n=>this.ariaDescriptionProperties.get(n)).join(". ");(t=this.beans.ariaAnnounce)==null||t.announceValue(e,"columnHeader")}refreshAria(){this.refreshAriaSort(),this.refreshAriaMenu(),this.refreshAriaFilterButton(),this.refreshAriaFiltered()}addColumnHoverListener(e){var t;(t=this.beans.colHover)==null||t.addHeaderColumnHoverListener(e,this.comp,this.column)}addActiveHeaderMouseListeners(e){const t=s=>this.handleMouseOverChange(s.type==="mouseenter"),n=()=>this.dispatchColumnMouseEvent("columnHeaderClicked",this.column),r=s=>this.handleContextMenuMouseEvent(s,void 0,this.column);e.addManagedListeners(this.eGui,{mouseenter:t,mouseleave:t,click:n,contextmenu:r})}handleMouseOverChange(e){this.setActiveHeader(e),this.eventSvc.dispatchEvent({type:e?"columnHeaderMouseOver":"columnHeaderMouseLeave",column:this.column})}setActiveHeader(e){this.comp.addOrRemoveCssClass("ag-header-active",e)}getAnchorElementForMenu(e){const t=this.comp.getUserCompInstance();return qL(t)?t.getAnchorElementForMenu(e):this.eGui}destroy(){this.tooltipFeature=this.destroyBean(this.tooltipFeature),super.destroy()}};function qL(e){return typeof e.getAnchorElementForMenu=="function"&&typeof e.onMenuKeyboardShortcut=="function"}var Ace=0,bS=class extends be{constructor(e,t,n){super(),this.rowIndex=e,this.pinned=t,this.type=n,this.instanceId=Ace++;const r=n=="group"?"ag-header-row-column-group":n=="filter"?"ag-header-row-column-filter":"ag-header-row-column";this.headerRowClass=`ag-header-row ${r}`}postConstruct(){this.isPrintLayout=Vr(this.gos,"print"),this.isEnsureDomOrder=this.gos.get("ensureDomOrder")}areCellsRendered(){return this.comp?this.getHeaderCellCtrls().every(e=>e.eGui!=null):!1}setComp(e,t,n=!0){this.comp=e,t=wg(this,this.beans.context,t),n&&(this.onRowHeightChanged(),this.onVirtualColumnsChanged()),this.setWidth(),this.addEventListeners(t)}getAriaRowIndex(){return this.rowIndex+1}addEventListeners(e){const t=this.onRowHeightChanged.bind(this);e.addManagedEventListeners({columnResized:this.setWidth.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),virtualColumnsChanged:n=>this.onVirtualColumnsChanged(n.afterScroll),columnGroupHeaderHeightChanged:t,columnHeaderHeightChanged:t,gridStylesChanged:t,advancedFilterEnabledChanged:t}),e.addManagedPropertyListener("domLayout",this.onDisplayedColumnsChanged.bind(this)),e.addManagedPropertyListener("ensureDomOrder",n=>this.isEnsureDomOrder=n.currentValue),e.addManagedPropertyListeners(["headerHeight","pivotHeaderHeight","groupHeaderHeight","pivotGroupHeaderHeight","floatingFiltersHeight"],t)}getHeaderCellCtrl(e){if(this.headerCellCtrls){for(const t of this.headerCellCtrls.values())if(t.column===e)return t}}onDisplayedColumnsChanged(){this.isPrintLayout=Vr(this.gos,"print"),this.onVirtualColumnsChanged(),this.setWidth(),this.onRowHeightChanged()}setWidth(){const e=this.getWidthForRow();this.comp.setWidth(`${e}px`)}getWidthForRow(){const{visibleCols:e}=this.beans;return this.isPrintLayout?this.pinned!=null?0:e.getContainerWidth("right")+e.getContainerWidth("left")+e.getContainerWidth(null):e.getContainerWidth(this.pinned)}onRowHeightChanged(){const{topOffset:e,rowHeight:t}=this.getTopAndHeight();this.comp.setTop(e+"px"),this.comp.setHeight(t+"px")}getTopAndHeight(){const{filterManager:e}=this.beans,t=[],n=dF(this.beans),r=hF(this.beans);t.push(...n),t.push(r),e!=null&&e.hasFloatingFilters()&&t.push(pF(this.beans));let s=0;for(let o=0;o{const{focusSvc:s,visibleCols:i}=this.beans;return s.isHeaderWrapperFocused(r)?i.isVisible(r.column):!1};if(e)for(const[r,s]of e)n(s)?this.headerCellCtrls.set(r,s):this.destroyBean(s);return this.getHeaderCellCtrls()}getHeaderCellCtrls(){var e;return Array.from(((e=this.headerCellCtrls)==null?void 0:e.values())??[])}recycleAndCreateHeaderCtrls(e,t){if(!this.headerCellCtrls||e.isEmptyGroup())return;const n=e.getUniqueId();let r;if(t&&(r=t.get(n),t.delete(n)),r&&r.column!=e&&(this.destroyBean(r),r=void 0),r==null)switch(this.type){case"filter":{r=this.createBean(this.beans.registry.createDynamicBean("headerFilterCellCtrl",!0,e,this));break}case"group":r=this.createBean(this.beans.registry.createDynamicBean("headerGroupCellCtrl",!0,e,this));break;default:r=this.createBean(new Dce(e,this));break}this.headerCellCtrls.set(n,r)}getColumnsInViewport(){return this.isPrintLayout?this.getColumnsInViewportPrintLayout():this.getColumnsInViewportNormalLayout()}getColumnsInViewportPrintLayout(){if(this.pinned!=null)return[];let e=[];const t=this.getActualDepth(),{colViewport:n}=this.beans;return["left",null,"right"].forEach(r=>{const s=n.getHeadersToRender(r,t);e=e.concat(s)}),e}getActualDepth(){return this.type=="filter"?this.rowIndex-1:this.rowIndex}getColumnsInViewportNormalLayout(){return this.beans.colViewport.getHeadersToRender(this.pinned,this.getActualDepth())}findHeaderCellCtrl(e){if(!this.headerCellCtrls)return;const t=this.getHeaderCellCtrls();let n;return typeof e=="function"?n=t.find(e):n=t.find(r=>r.column==e),n}focusHeader(e,t){const n=this.findHeaderCellCtrl(e);return n?n.focus(t):!1}destroy(){var e;(e=this.headerCellCtrls)==null||e.forEach(t=>{this.destroyBean(t)}),this.headerCellCtrls=void 0,super.destroy()}},B2=class extends be{constructor(e){super(),this.pinned=e,this.hidden=!1,this.includeFloatingFilter=!1,this.groupsRowCtrls=[]}setComp(e,t){this.comp=e,this.eViewport=t;const{pinnedCols:n,ctrlsSvc:r,colModel:s,colMoves:i,filterManager:o}=this.beans;this.setupCenterWidth(),n==null||n.setupHeaderPinnedWidth(this),this.setupDragAndDrop(i,this.eViewport);const a=this.onDisplayedColumnsChanged.bind(this,o);this.addManagedEventListeners({gridColumnsChanged:this.onGridColumnsChanged.bind(this),displayedColumnsChanged:a,advancedFilterEnabledChanged:a});const l=`${typeof this.pinned=="string"?this.pinned:"center"}Header`;r.register(l,this),s.ready&&this.refresh()}getAllCtrls(){const e=[...this.groupsRowCtrls];return this.columnsRowCtrl&&e.push(this.columnsRowCtrl),this.filtersRowCtrl&&e.push(this.filtersRowCtrl),e}refresh(e=!1){const{focusSvc:t,colModel:n,filterManager:r}=this.beans;let s=0;const i=t.getFocusHeaderToUseAfterRefresh(),o=()=>{const u=L2(n)-1;this.groupsRowCtrls=this.destroyBeans(this.groupsRowCtrls);for(let h=0;h{const u=s++,h=!this.hidden&&(this.columnsRowCtrl==null||!e||this.columnsRowCtrl.rowIndex!==u);(h||this.hidden)&&(this.columnsRowCtrl=this.destroyBean(this.columnsRowCtrl)),h&&(this.columnsRowCtrl=this.createBean(new bS(u,this.pinned,"column")))},l=()=>{this.includeFloatingFilter=!!(r!=null&&r.hasFloatingFilters())&&!this.hidden;const u=()=>{this.filtersRowCtrl=this.destroyBean(this.filtersRowCtrl)};if(!this.includeFloatingFilter){u();return}const h=s++;if(this.filtersRowCtrl){const g=this.filtersRowCtrl.rowIndex!==h;(!e||g)&&u()}this.filtersRowCtrl||(this.filtersRowCtrl=this.createBean(new bS(h,this.pinned,"filter")))};o(),a(),l();const c=this.getAllCtrls();this.comp.setCtrls(c),this.restoreFocusOnHeader(t,i)}getHeaderCtrlForColumn(e){var t;if(Do(e))return(t=this.columnsRowCtrl)==null?void 0:t.getHeaderCellCtrl(e);if(this.groupsRowCtrls.length!==0)for(let n=0;nthis.comp.setCenterWidth(`${e}px`),!0))}},Lce=class extends be{constructor(){super(...arguments),this.beanName="menuSvc"}postConstruct(){const{enterpriseMenuFactory:e,filterMenuFactory:t}=this.beans;this.activeMenuFactory=e??t}showColumnMenu(e){this.showColumnMenuCommon(this.activeMenuFactory,e,"columnMenu")}showFilterMenu(e){const{enterpriseMenuFactory:t,filterMenuFactory:n}=this.beans,r=t&&Gr(this.gos)?t:n;this.showColumnMenuCommon(r,e,e.containerType,!0)}showHeaderContextMenu(e,t,n){var r;(r=this.activeMenuFactory)==null||r.showMenuAfterContextMenuEvent(e,t,n)}hidePopupMenu(){var e,t;(e=this.beans.contextMenuSvc)==null||e.hideActiveMenu(),(t=this.activeMenuFactory)==null||t.hideActiveMenu()}isColumnMenuInHeaderEnabled(e){var n;const{suppressHeaderMenuButton:t}=e.getColDef();return!t&&!!((n=this.activeMenuFactory)!=null&&n.isMenuEnabled(e))&&(Gr(this.gos)||!!this.beans.enterpriseMenuFactory)}isFilterMenuInHeaderEnabled(e){var t;return!e.getColDef().suppressHeaderFilterButton&&!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))}isHeaderContextMenuEnabled(e){const t=e&&Do(e)?e.getColDef():e==null?void 0:e.getColGroupDef();return!(t!=null&&t.suppressHeaderContextMenu)&&this.gos.get("columnMenu")==="new"}isHeaderMenuButtonAlwaysShowEnabled(){return this.isSuppressMenuHide()}isHeaderMenuButtonEnabled(){const e=!this.isSuppressMenuHide();return!(fl()&&e)}isHeaderFilterButtonEnabled(e){return this.isFilterMenuInHeaderEnabled(e)&&!Gr(this.gos)&&!this.isFloatingFilterButtonDisplayed(e)}isFilterMenuItemEnabled(e){var t;return!!((t=this.beans.filterManager)!=null&&t.isFilterAllowed(e))&&!Gr(this.gos)&&!this.isFilterMenuInHeaderEnabled(e)&&!this.isFloatingFilterButtonDisplayed(e)}isFloatingFilterButtonEnabled(e){return!e.getColDef().suppressFloatingFilterButton}isFloatingFilterButtonDisplayed(e){return!!e.getColDef().floatingFilter&&this.isFloatingFilterButtonEnabled(e)}isSuppressMenuHide(){const e=this.gos,t=e.get("suppressMenuHide");return Gr(e)?e.exists("suppressMenuHide")?t:!1:t}showColumnMenuCommon(e,t,n,r){const{positionBy:s}=t,i=t.column;if(s==="button"){const{buttonElement:o}=t;e==null||e.showMenuAfterButtonClick(i,o,n,r)}else if(s==="mouse"){const{mouseEvent:o}=t;e==null||e.showMenuAfterMouseEvent(i,o,n,r)}else if(i){const o=this.beans,a=o.ctrlsSvc;a.getScrollFeature().ensureColumnVisible(i,"auto"),Ai(o,()=>{var c;const l=(c=a.getHeaderRowContainerCtrl(i.getPinned()))==null?void 0:c.getHeaderCtrlForColumn(i);l&&(e==null||e.showMenuAfterButtonClick(i,l.getAnchorElementForMenu(r),n,!0))})}}};function KC(e,t,n){e.menuVisible!==t&&(e.menuVisible=t,e.dispatchColEvent("menuVisibleChanged",n))}var $2=class extends He{constructor(){super()}},Oce=class extends $2{init(){var t;const e=hr((t=this.gos.get("overlayLoadingTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??''),!e){const n=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=n("loadingOoo","Loading...")})}}},kce=class extends $2{init(){var t;const e=hr((t=this.gos.get("overlayNoRowsTemplate"))==null?void 0:t.trim());if(this.setTemplate(e??''),!e){const n=this.getLocaleTextFunc();setTimeout(()=>{this.getGui().textContent=n("noRowsToShow","No Rows To Show")})}}};function ml(e,t,n){const r=St(e,t,n);if(r){const{className:i}=r;if(typeof i=="string"&&i.indexOf("ag-icon")>-1||typeof i=="object"&&i["ag-icon"])return r}const s=document.createElement("span");return s.appendChild(r),s}function St(e,t,n){var i;let r=null;e==="smallDown"?ye(262):e==="smallLeft"?ye(263):e==="smallRight"&&ye(264);const s=n&&n.getColDef().icons;if(s&&(r=s[e]),t.gos&&!r){const o=t.gos.get("icons");o&&(r=o[e])}if(r){let o;if(typeof r=="function")o=r();else if(typeof r=="string")o=r;else{ye(38,{iconName:e});return}if(typeof o=="string")return Cs(o);if(Xv(o))return o;ye(133,{iconName:e});return}else{const o=document.createElement("span"),a=t.registry.getIcon(e);a||(i=t.validation)==null||i.validateIcon(e);const l=a??e;return o.setAttribute("class",`ag-icon ag-icon-${l}`),o.setAttribute("unselectable","on"),Bn(o,"presentation"),o}}var Nce=".ag-dnd-ghost{align-items:center;background-color:var(--ag-drag-and-drop-image-background-color);border:var(--ag-drag-and-drop-image-border);border-radius:var(--ag-border-radius);box-shadow:var(--ag-drag-and-drop-image-shadow);color:var(--ag-text-color);cursor:move;display:flex;font-weight:500;gap:var(--ag-cell-widget-spacing);height:var(--ag-header-height);overflow:hidden;padding-left:var(--ag-cell-horizontal-padding);padding-right:var(--ag-cell-horizontal-padding);text-overflow:ellipsis;transform:translateY(calc(var(--ag-spacing)*2));white-space:nowrap}",Bce=class extends He{constructor(){super(),this.dragSource=null,this.eIcon=pe,this.eLabel=pe,this.registerCSS(Nce)}postConstruct(){const e=t=>ml(t,this.beans,null);this.dropIconMap={pinned:e("columnMovePin"),hide:e("columnMoveHide"),move:e("columnMoveMove"),left:e("columnMoveLeft"),right:e("columnMoveRight"),group:e("columnMoveGroup"),aggregate:e("columnMoveValue"),pivot:e("columnMovePivot"),notAllowed:e("dropNotAllowed")}}init(e){this.dragSource=e.dragSource,this.setTemplate(`
`)}destroy(){this.dragSource=null,super.destroy()}setIcon(e,t){const{eIcon:n,dragSource:r,dropIconMap:s,gos:i}=this;ln(n);let o=null;e||(e=r!=null&&r.getDefaultIconName?r.getDefaultIconName():"notAllowed"),o=s[e],n.classList.toggle("ag-shake-left-to-right",t),!(o===s.hide&&i.get("suppressDragLeaveHidesColumns"))&&o&&n.appendChild(o)}setLabel(e){this.eLabel.textContent=Rn(e)}},$ce=".ag-label{white-space:nowrap}:where(.ag-ltr) .ag-label{margin-right:var(--ag-spacing)}:where(.ag-rtl) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-label-align-right) .ag-label{order:1}:where(.ag-ltr) :where(.ag-label-align-right) .ag-label{margin-left:var(--ag-spacing)}:where(.ag-rtl) :where(.ag-label-align-right) .ag-label{margin-right:var(--ag-spacing)}.ag-label-align-right>*{flex:none}.ag-label-align-top{align-items:flex-start;flex-direction:column;>*{align-self:stretch}}.ag-label-ellipsis{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:where(.ag-label-align-top) .ag-label{margin-bottom:calc(var(--ag-spacing)*.5)}",CF=class extends He{constructor(e,t,n){super(t,n),this.labelSeparator="",this.labelAlignment="left",this.disabled=!1,this.label="",this.config=e||{},this.registerCSS($ce)}postConstruct(){this.addCssClass("ag-labeled"),this.eLabel.classList.add("ag-label");const{labelSeparator:e,label:t,labelWidth:n,labelAlignment:r,disabled:s}=this.config;s!=null&&this.setDisabled(s),e!=null&&this.setLabelSeparator(e),t!=null&&this.setLabel(t),n!=null&&this.setLabelWidth(n),this.setLabelAlignment(r||this.labelAlignment),this.refreshLabel()}refreshLabel(){const{label:e,eLabel:t}=this;ln(t),typeof e=="string"?t.innerText=e+this.labelSeparator:e&&t.appendChild(e),e===""?(dt(t,!1),Bn(t,"presentation")):(dt(t,!0),Bn(t,null))}setLabelSeparator(e){return this.labelSeparator===e?this:(this.labelSeparator=e,this.label!=null&&this.refreshLabel(),this)}getLabelId(){const e=this.eLabel;return e.id=e.id||`ag-${this.getCompId()}-label`,e.id}getLabel(){return this.label}setLabel(e){return this.label===e?this:(this.label=e,this.refreshLabel(),this)}setLabelAlignment(e){const n=this.getGui().classList;return n.toggle("ag-label-align-left",e==="left"),n.toggle("ag-label-align-right",e==="right"),n.toggle("ag-label-align-top",e==="top"),this}setLabelEllipsis(e){return this.eLabel.classList.toggle("ag-label-ellipsis",e),this}setLabelWidth(e){return this.label==null?this:(LC(this.eLabel,e),this)}setDisabled(e){e=!!e;const t=this.getGui();return xi(t,e),t.classList.toggle("ag-disabled",e),this.disabled=e,this}isDisabled(){return!!this.disabled}},G2=class extends CF{constructor(e,t,n,r){super(e,t,n),this.className=r}postConstruct(){super.postConstruct();const{width:e,value:t,onValueChange:n}=this.config;e!=null&&this.setWidth(e),t!=null&&this.setValue(t),n!=null&&this.onValueChange(n),this.className&&this.addCssClass(this.className),this.refreshAriaLabelledBy()}setLabel(e){return super.setLabel(e),this.refreshAriaLabelledBy(),this}refreshAriaLabelledBy(){const e=this.getAriaElement(),t=this.getLabelId(),n=this.getLabel();n==null||n==""||Doe(e)!==null?Sl(e,""):Sl(e,t??"")}setAriaLabel(e){return $n(this.getAriaElement(),e),this.refreshAriaLabelledBy(),this}onValueChange(e){return this.addManagedListeners(this,{fieldValueChanged:()=>e(this.getValue())}),this}getWidth(){return this.getGui().clientWidth}setWidth(e){return Zi(this.getGui(),e),this}getPreviousValue(){return this.previousValue}getValue(){return this.value}setValue(e,t){return this.value===e?this:(this.previousValue=this.value,this.value=e,t||this.dispatchLocalEvent({type:"fieldValueChanged"}),this)}},ul=class extends G2{constructor(e,t,n="text",r="input"){super(e,(e==null?void 0:e.template)??`
`,[],t),this.inputType=n,this.displayFieldTag=r,this.eLabel=pe,this.eWrapper=pe,this.eInput=pe}postConstruct(){super.postConstruct(),this.setInputType();const{eLabel:e,eWrapper:t,eInput:n,className:r}=this;e.classList.add(`${r}-label`),t.classList.add(`${r}-input-wrapper`),n.classList.add(`${r}-input`),this.addCssClass("ag-input-field"),n.id=n.id||`ag-${this.getCompId()}-input`;const{inputName:s,inputWidth:i}=this.config;s!=null&&this.setInputName(s),i!=null&&this.setInputWidth(i),this.addInputListeners(),this.activateTabIndex([n])}addInputListeners(){this.addManagedElementListeners(this.eInput,{input:e=>this.setValue(e.target.value)})}setInputType(){this.displayFieldTag==="input"&&this.eInput.setAttribute("type",this.inputType)}getInputElement(){return this.eInput}setInputWidth(e){return LC(this.eWrapper,e),this}setInputName(e){return this.getInputElement().setAttribute("name",e),this}getFocusableElement(){return this.eInput}setMaxLength(e){const t=this.eInput;return t.maxLength=e,this}setInputPlaceholder(e){return Ti(this.eInput,"placeholder",e),this}setInputAriaLabel(e){return $n(this.eInput,e),this.refreshAriaLabelledBy(),this}setDisabled(e){return xi(this.eInput,e),super.setDisabled(e)}setAutoComplete(e){if(e===!0)Ti(this.eInput,"autocomplete",null);else{const t=typeof e=="string"?e:"off";Ti(this.eInput,"autocomplete",t)}return this}},Zc=class extends ul{constructor(e,t="ag-checkbox",n="checkbox"){super(e,t,n),this.labelAlignment="right",this.selected=!1,this.readOnly=!1,this.passive=!1}postConstruct(){super.postConstruct();const{readOnly:e,passive:t}=this.config;typeof e=="boolean"&&this.setReadOnly(e),typeof t=="boolean"&&this.setPassive(t)}addInputListeners(){this.addManagedElementListeners(this.eInput,{click:this.onCheckboxClick.bind(this)}),this.addManagedElementListeners(this.eLabel,{click:this.toggle.bind(this)})}getNextValue(){return this.selected===void 0?!0:!this.selected}setPassive(e){this.passive=e}isReadOnly(){return this.readOnly}setReadOnly(e){this.eWrapper.classList.toggle("ag-disabled",e),this.eInput.disabled=e,this.readOnly=e}setDisabled(e){return this.eWrapper.classList.toggle("ag-disabled",e),super.setDisabled(e)}toggle(){if(this.eInput.disabled)return;const e=this.isSelected(),t=this.getNextValue();this.passive?this.dispatchChange(t,e):this.setValue(t)}getValue(){return this.isSelected()}setValue(e,t){return this.refreshSelectedClass(e),this.setSelected(e,t),this}setName(e){const t=this.getInputElement();return t.name=e,this}isSelected(){return this.selected}setSelected(e,t){if(this.isSelected()===e)return;this.previousValue=this.isSelected(),e=this.selected=typeof e=="boolean"?e:void 0;const n=this.eInput;n.checked=e,n.indeterminate=e===void 0,t||this.dispatchChange(this.selected,this.previousValue)}dispatchChange(e,t,n){this.dispatchLocalEvent({type:"fieldValueChanged",selected:e,previousValue:t,event:n});const r=this.getInputElement();this.eventSvc.dispatchEvent({type:"checkboxChanged",id:r.id,name:r.name,selected:e,previousValue:t})}onCheckboxClick(e){if(this.passive||this.eInput.disabled)return;const t=this.isSelected(),n=this.selected=e.target.checked;this.refreshSelectedClass(n),this.dispatchChange(n,t,e)}refreshSelectedClass(e){const t=this.eWrapper.classList;t.toggle("ag-checked",e===!0),t.toggle("ag-indeterminate",e==null)}},co={selector:"AG-CHECKBOX",component:Zc},Gce=".ag-checkbox-cell{height:100%}",Vce=class extends He{constructor(){super(` `,[co]),this.eCheckbox=pe,this.registerCSS(Gce)}init(e){this.refresh(e);const{eCheckbox:t,beans:n}=this,r=t.getInputElement();r.setAttribute("tabindex","-1"),zV(r,"polite"),this.addManagedListeners(r,{click:s=>{if(sr(s),t.isDisabled())return;const i=t.getValue();this.onCheckboxChanged(i)},dblclick:s=>{sr(s)}}),this.addManagedElementListeners(e.eGridCell,{keydown:s=>{if(s.key===se.SPACE&&!t.isDisabled()){e.eGridCell===en(n)&&t.toggle();const i=t.getValue();this.onCheckboxChanged(i),s.preventDefault()}}})}refresh(e){return this.params=e,this.updateCheckbox(e),!0}updateCheckbox(e){let t,n=!0;const{value:r,column:s,node:i}=e;if(i.group&&s)if(typeof r=="boolean")t=r;else{const h=s.getColId();h.startsWith(Pl)?t=r==null||r===""?void 0:r==="true":i.aggData&&i.aggData[h]!==void 0?t=r??void 0:n=!1}else t=r??void 0;const{eCheckbox:o}=this;if(!n){o.setDisplayed(!1);return}o.setValue(t);const a=e.disabled??!(s!=null&&s.isCellEditable(i));o.setDisabled(a);const l=this.getLocaleTextFunc(),c=WP(l,t),u=a?c:`${l("ariaToggleCellValue","Press SPACE to toggle cell value")} (${c})`;o.setInputAriaLabel(u)}onCheckboxChanged(e){const{eventSvc:t,params:n}=this,{column:r,node:s,value:i}=n,o={column:r,colDef:r.getColDef(),data:s.data,node:s,rowIndex:s.rowIndex,rowPinned:s.rowPinned,value:i};t.dispatchEvent({type:"cellEditingStarted",...o});const a=s.setDataValue(r,e,"edit");t.dispatchEvent({type:"cellEditingStopped",...o,oldValue:i,newValue:e,valueChanged:a}),a||this.updateCheckbox(n)}},Hce="ROOT_NODE_ID",V2=class extends be{constructor(){super(...arguments),this.nextId=0,this.allNodesMap={},this.rootNode=null}get treeData(){return!1}getRowNode(e){return this.allNodesMap[e]}extractRowData(){var e,t;return(t=(e=this.rootNode)==null?void 0:e.allLeafChildren)==null?void 0:t.map(n=>n.data)}activate(e){this.rootNode=e,e.group=!0,e.level=-1,e.id=Hce,e.allLeafChildren=[],e.childrenAfterGroup=[],e.childrenAfterSort=[],e.childrenAfterAggFilter=[],e.childrenAfterFilter=[],this.updateRootSiblingArrays(e)}deactivate(){this.rootNode&&(this.allNodesMap={},this.rootNode=null)}destroy(){super.destroy(),this.allNodesMap={},this.rootNode=null}setNewRowData(e){const t=this.rootNode;t&&(this.dispatchRowDataUpdateStartedEvent(e),t.childrenAfterFilter=null,t.childrenAfterGroup=null,t.childrenAfterAggFilter=null,t.childrenAfterSort=null,t.childrenMapped=null,t.updateHasChildren(),this.allNodesMap={},this.nextId=0,this.loadNewRowData(e),this.updateRootSiblingArrays(t))}updateRootSiblingArrays(e){const t=e.sibling;t&&(t.childrenAfterFilter=e.childrenAfterFilter,t.childrenAfterGroup=e.childrenAfterGroup,t.childrenAfterAggFilter=e.childrenAfterAggFilter,t.childrenAfterSort=e.childrenAfterSort,t.childrenMapped=e.childrenMapped,t.allLeafChildren=e.allLeafChildren)}loadNewRowData(e){this.rootNode.allLeafChildren=(e==null?void 0:e.map((t,n)=>this.createRowNode(t,n)))??[]}setImmutableRowData(e,t){const n=this.createTransactionForRowData(t),r=this.updateRowData(n,e.changedRowNodes);let s=!1;this.gos.get("suppressMaintainUnsortedOrder")||(s=this.updateRowOrderFromRowData(t));const{rowNodeTransaction:i,rowsInserted:o}=r,{add:a,remove:l,update:c}=i;(o||s||a.length||l.length||c.length)&&(e.step="group",e.rowDataUpdated=!0,e.rowNodeTransactions=[i],e.rowNodesOrderChanged=o||s)}updateRowData(e,t){this.dispatchRowDataUpdateStartedEvent(e.add);const n={changedRowNodes:t,rowNodeTransaction:{remove:[],update:[],add:[]},rowsInserted:!1},r=[],s=da(this.gos);return this.executeRemove(s,e,n,r),this.executeUpdate(s,e,n,r),this.executeAdd(e,n),this.deselectNodes(r),n}createTransactionForRowData(e){const t=da(this.gos),n={...this.allNodesMap},r=[],s=[],i=[];$e(e)&&e.forEach(o=>{const a=t({data:o,level:0}),l=n[a];l?(l.data!==o&&s.push(o),n[a]=void 0):i.push(o)});for(const o of Object.values(n))o&&r.push(o.data);return{remove:r,update:s,add:i}}updateRowOrderFromRowData(e){var o;const t=(o=this.rootNode)==null?void 0:o.allLeafChildren,n=(t==null?void 0:t.length)??0,r=new Map;let s=-1,i=-1;for(let a=0;a0&&this.gos.get("treeData")&&this.gos.get("getDataPath")))for(let h=0;h{const g=this.lookupRowNode(e,h);g&&(g.isSelected()&&s.push(g),g.clearRowTopAndRowIndex(),o[g.id]=!0,delete this.allNodesMap[g.id],r.remove.push(g),n.remove(g))});const a=this.rootNode;a.allLeafChildren=((c=a.allLeafChildren)==null?void 0:c.filter(h=>!o[h.id]))??null,(u=a.allLeafChildren)==null||u.forEach((h,g)=>{h.sourceRowIndex=g});const l=a.sibling;l&&(l.allLeafChildren=a.allLeafChildren)}executeUpdate(e,t,{changedRowNodes:n,rowNodeTransaction:r},s){const{update:i}=t;i!=null&&i.length&&i.forEach(o=>{const a=this.lookupRowNode(e,o);a&&(a.updateData(o),!a.selectable&&a.isSelected()&&s.push(a),r.update.push(a),n.update(a))})}dispatchRowDataUpdateStartedEvent(e){this.eventSvc.dispatchEvent({type:"rowDataUpdateStarted",firstRowData:e!=null&&e.length?e[0]:null})}deselectNodes(e){var s;const t="rowDataChanged",n=this.beans.selectionSvc,r=e.length>0;r&&(n==null||n.setNodesSelected({newValue:!1,nodes:e,suppressFinishActions:!0,source:t})),(s=n==null?void 0:n.updateGroupsFromChildrenSelections)==null||s.call(n,t),r&&this.eventSvc.dispatchEvent({type:"selectionChanged",source:t})}sanitizeAddIndex(e){var n;const t=((n=this.rootNode.allLeafChildren)==null?void 0:n.length)??0;return e<0||e>=t||Number.isNaN(e)?t:Math.ceil(e)}createRowNode(e,t){const n=new Ks(this.beans);return n.parent=this.rootNode,n.level=0,n.group=!1,n.expanded=!1,n.sourceRowIndex=t,n.setDataAndId(e,String(this.nextId)),this.allNodesMap[n.id]&&ye(2,{nodeId:n.id}),this.allNodesMap[n.id]=n,this.nextId++,n}lookupRowNode(e,t){var r,s;let n;if(e){const i=e({data:t,level:0});if(n=this.allNodesMap[i],!n)return Wt(4,{id:i}),null}else if(n=(s=(r=this.rootNode)==null?void 0:r.allLeafChildren)==null?void 0:s.find(i=>i.data===t),!n)return Wt(5,{data:t}),null;return n||null}},wo=(e=>(e.Applied="Applied",e.StoreNotFound="StoreNotFound",e.StoreLoading="StoreLoading",e.StoreWaitingToLoad="StoreWaitingToLoad",e.StoreLoadingFailed="StoreLoadingFailed",e.StoreWrongType="StoreWrongType",e.Cancelled="Cancelled",e.StoreNotStarted="StoreNotStarted",e))(wo||{}),zce=class extends He{constructor(){super(` `,[co]),this.eCheckbox=pe}postConstruct(){this.eCheckbox.setPassive(!0)}getCheckboxId(){return this.eCheckbox.getInputElement().id}onDataChanged(){this.onSelectionChanged()}onSelectableChanged(){this.showOrHideSelect()}onSelectionChanged(){const e=this.getLocaleTextFunc(),{rowNode:t,eCheckbox:n}=this,r=t.isSelected(),s=WP(e,r),[i,o]=t.selectable?["ariaRowToggleSelection","Press Space to toggle row selection"]:["ariaRowSelectionDisabled","Row Selection is disabled for this row"],a=e(i,o);n.setValue(r,!0),n.setInputAriaLabel(`${a} (${s})`)}init(e){if(this.rowNode=e.rowNode,this.column=e.column,this.overrides=e.overrides,this.onSelectionChanged(),this.addManagedListeners(this.eCheckbox.getInputElement(),{dblclick:sr,click:r=>{var s;sr(r),(s=this.beans.selectionSvc)==null||s.handleSelectionEvent(r,this.rowNode,"checkboxSelected")}}),this.addManagedListeners(this.rowNode,{rowSelected:this.onSelectionChanged.bind(this),dataChanged:this.onDataChanged.bind(this),selectableChanged:this.onSelectableChanged.bind(this)}),this.addManagedPropertyListener("rowSelection",({currentValue:r,previousValue:s})=>{const i=typeof r=="object"?fS(r):void 0,o=typeof s=="object"?fS(s):void 0;i!==o&&this.onSelectableChanged()}),GR(this.gos)||typeof this.getIsVisible()=="function"){const r=this.showOrHideSelect.bind(this);this.addManagedEventListeners({displayedColumnsChanged:r}),this.addManagedListeners(this.rowNode,{dataChanged:r,cellChanged:r}),this.showOrHideSelect()}this.eCheckbox.getInputElement().setAttribute("tabindex","-1")}showOrHideSelect(){const{column:e,rowNode:t,overrides:n,gos:r}=this;let s=t.selectable;const i=this.getIsVisible();if(s)if(typeof i=="function"){const l=n==null?void 0:n.callbackParams;if(!e)s=i({...l,node:t,data:t.data});else{const c=e.createColumnFunctionCallbackParams(t);s=i({...l,...c})}}else s=i??!1;const o=r.get("rowSelection");if(o&&typeof o!="string"?!fS(o):e==null?void 0:e.getColDef().showDisabledCheckboxes){this.eCheckbox.setDisabled(!s),this.setVisible(!0),this.setDisplayed(!0);return}if(n!=null&&n.removeHidden){this.setDisplayed(s);return}this.setVisible(s)}getIsVisible(){var n,r;const e=this.overrides;if(e)return e.isVisible;const t=this.gos.get("rowSelection");return t&&typeof t!="string"?wc(t):(r=(n=this.column)==null?void 0:n.getColDef())==null?void 0:r.checkboxSelection}},Wce=class{constructor(e){this.rootId=null,this.endId=null,this.cachedRange=[],this.rowModel=e}reset(){this.rootId=null,this.endId=null,this.cachedRange.length=0}setRoot(e){this.rootId=e.id,this.endId=null,this.cachedRange.length=0}setEndRange(e){this.endId=e.id,this.cachedRange.length=0}getRange(){if(this.cachedRange.length===0){const e=this.getRoot(),t=this.getEnd();if(e==null||t==null)return this.cachedRange;this.cachedRange=this.rowModel.getNodesInRangeForSelection(e,t)??[]}return this.cachedRange}isInRange(e){return this.rootId===null?!1:this.getRange().some(t=>t.id===e.id)}getRoot(){return this.rootId?this.rowModel.getRowNode(this.rootId)??null:null}getEnd(){return this.endId?this.rowModel.getRowNode(this.endId)??null:null}truncate(e){const t=this.getRange();if(t.length===0)return{keep:[],discard:[]};const n=t[0].id===this.rootId,r=t.findIndex(s=>s.id===e.id);if(r>-1){const s=t.slice(0,r),i=t.slice(r+1);return this.setEndRange(e),n?{keep:s,discard:i}:{keep:i,discard:s}}else return{keep:t,discard:[]}}extend(e,t=!1){const n=this.getRoot();if(n==null){const s=this.getRange().slice();return t&&e.depthFirstSearch(i=>!i.group&&s.push(i)),s.push(e),this.setRoot(e),{keep:s,discard:[]}}const r=this.rowModel.getNodesInRangeForSelection(n,e);if(!r)return this.setRoot(e),{keep:[e],discard:[]};if(r.find(s=>s.id===this.endId))return this.setEndRange(e),{keep:this.getRange(),discard:[]};{const s=this.getRange().slice();return this.setEndRange(e),{keep:this.getRange(),discard:s}}}},_ce=class extends be{constructor(e){super(),this.column=e,this.cbSelectAllVisible=!1,this.processingEventFromCheckbox=!1}onSpaceKeyDown(e){const t=this.cbSelectAll;t.isDisplayed()&&!t.getGui().contains(en(this.beans))&&(e.preventDefault(),t.setValue(!t.getValue()))}getCheckboxGui(){return this.cbSelectAll.getGui()}setComp(e){this.headerCellCtrl=e;const t=this.createManagedBean(new Zc);this.cbSelectAll=t,t.addCssClass("ag-header-select-all"),Bn(t.getGui(),"presentation"),this.showOrHideSelectAll(),this.addManagedEventListeners({newColumnsLoaded:this.showOrHideSelectAll.bind(this),displayedColumnsChanged:this.onDisplayedColumnsChanged.bind(this),selectionChanged:this.onSelectionChanged.bind(this),paginationChanged:this.onSelectionChanged.bind(this),modelUpdated:this.onModelChanged.bind(this)}),this.addManagedListeners(t,{fieldValueChanged:this.onCbSelectAll.bind(this)}),t.getInputElement().setAttribute("tabindex","-1"),this.refreshSelectAllLabel()}onDisplayedColumnsChanged(){this.isAlive()&&this.showOrHideSelectAll()}showOrHideSelectAll(){const e=this.isCheckboxSelection();this.cbSelectAllVisible=e,this.cbSelectAll.setDisplayed(e),e&&(this.checkRightRowModelType("selectAllCheckbox"),this.checkSelectionType("selectAllCheckbox"),this.updateStateOfCheckbox()),this.refreshSelectAllLabel()}onModelChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}onSelectionChanged(){this.cbSelectAllVisible&&this.updateStateOfCheckbox()}updateStateOfCheckbox(){if(this.processingEventFromCheckbox)return;this.processingEventFromCheckbox=!0;const e=this.getSelectAllMode(),t=this.beans.selectionSvc,n=this.cbSelectAll,r=t.getSelectAllState(e);n.setValue(r);const s=t.hasNodesToSelect(e);n.setDisabled(!s),this.refreshSelectAllLabel(),this.processingEventFromCheckbox=!1}refreshSelectAllLabel(){const e=this.getLocaleTextFunc(),{headerCellCtrl:t,cbSelectAll:n,cbSelectAllVisible:r}=this,i=n.getValue()?e("ariaChecked","checked"):e("ariaUnchecked","unchecked"),o=e("ariaRowSelectAll","Press Space to toggle all rows selection");t.setAriaDescriptionProperty("selectAll",r?`${o} (${i})`:null),n.setInputAriaLabel(e("ariaHeaderSelection","Column with Header Selection")),t.announceAriaDescription()}checkSelectionType(e){return El(this.gos)?!0:(ye(128,{feature:e}),!1)}checkRightRowModelType(e){const{gos:t,rowModel:n}=this.beans;return Tn(t)||Hr(t)?!0:(ye(129,{feature:e,rowModel:n.getType()}),!1)}onCbSelectAll(){if(this.processingEventFromCheckbox||!this.cbSelectAllVisible)return;const e=this.cbSelectAll.getValue(),t=this.getSelectAllMode();let n="uiSelectAll";t==="currentPage"?n="uiSelectAllCurrentPage":t==="filtered"&&(n="uiSelectAllFiltered");const r={source:n,selectAll:t},s=this.beans.selectionSvc;e?s.selectAllRowNodes(r):s.deselectAllRowNodes(r)}isCheckboxSelection(){var c;const{column:e,gos:t,beans:n}=this,r=t.get("rowSelection"),s=e.getColDef(),{headerCheckboxSelection:i}=s;let o=!1;const a=typeof r=="object";if(a){const u=Po(e),h=ty(e);(NC(r)==="autoGroupColumn"&&h||u&&((c=n.selectionColSvc)!=null&&c.isSelectionColumnEnabled()))&&(o=Vm(r))}else typeof i=="function"?o=i(t.addGridCommonParams({column:e,colDef:s})):o=!!i;const l=a?"headerCheckbox":"headerCheckboxSelection";return o&&this.checkRightRowModelType(l)&&this.checkSelectionType(l)}getSelectAllMode(){const e=xH(this.gos,!1);if(e)return e;const{headerCheckboxSelectionCurrentPageOnly:t,headerCheckboxSelectionFilteredOnly:n}=this.column.getColDef();return t?"currentPage":n?"filtered":"all"}},H2=class extends be{postConstruct(){const{gos:e,beans:t}=this;this.selectionCtx=new Wce(t.rowModel),this.addManagedPropertyListeners(["isRowSelectable","rowSelection"],()=>{const n=GR(e);n!==this.isRowSelectable&&(this.isRowSelectable=n,this.updateSelectable())}),this.isRowSelectable=GR(e)}destroy(){super.destroy(),this.selectionCtx.reset()}createCheckboxSelectionComponent(){return new zce}createSelectAllFeature(e){return new _ce(e)}isMultiSelect(){return El(this.gos)}onRowCtrlSelected(e,t,n){const r=!!e.rowNode.isSelected();e.forEachGui(n,s=>{s.rowComp.addOrRemoveCssClass("ag-row-selected",r);const i=s.element;zp(i,r),i.contains(en(this.beans))&&t(s)})}announceAriaRowSelection(e){var s;if(this.isRowSelectionBlocked(e))return;const t=e.isSelected();if(t&&!VL(this.gos))return;const r=this.getLocaleTextFunc()(t?"ariaRowDeselect":"ariaRowSelect",`Press SPACE to ${t?"deselect":"select"} this row`);(s=this.beans.ariaAnnounce)==null||s.announceValue(r,"rowSelection")}dispatchSelectionChanged(e){this.eventSvc.dispatchEvent({type:"selectionChanged",source:e})}isRowSelectionBlocked(e){return!e.selectable||!!e.rowPinned||!ci(this.gos)}updateRowSelectable(e,t){var r;const n=((r=this.isRowSelectable)==null?void 0:r.call(this,e))??!0;return this.setRowSelectable(e,n,t),n}setRowSelectable(e,t,n){if(e.selectable!==t){if(e.selectable=t,e.dispatchRowEvent("selectableChanged"),n)return;if(kc(this.gos)){const s=this.calculateSelectedFromChildren(e);this.setNodesSelected({nodes:[e],newValue:s??!1,source:"selectableChanged"});return}e.isSelected()&&!e.selectable&&this.setNodesSelected({nodes:[e],newValue:!1,source:"selectableChanged"})}}calculateSelectedFromChildren(e){var r;let t=!1,n=!1;if(!((r=e.childrenAfterGroup)!=null&&r.length))return e.selectable?e.__selected:null;for(let s=0;s{uF(n)&&n.key&&!e.test(n.key)&&n.preventDefault()};this.addManagedListeners(this.eInput,{keydown:t,paste:n=>{var s;const r=(s=n.clipboardData)==null?void 0:s.getData("text");r&&r.split("").some(i=>!e.test(i))&&n.preventDefault()}})}},Bi={selector:"AG-INPUT-TEXT-FIELD",component:uo},qce=class extends ul{constructor(e){super(e,"ag-text-area",null,"textarea")}setValue(e,t){const n=super.setValue(e,t);return this.eInput.value=e,n}setCols(e){return this.eInput.cols=e,this}setRows(e){return this.eInput.rows=e,this}},Xce={selector:"AG-INPUT-TEXT-AREA",component:qce},oy=class extends uo{constructor(e){super(e,"ag-number-field","number")}postConstruct(){super.postConstruct();const e=this.eInput;this.addManagedListeners(e,{blur:()=>{const i=parseFloat(e.value),o=isNaN(i)?"":this.normalizeValue(i.toString());this.value!==o&&this.setValue(o)},wheel:this.onWheel.bind(this)}),e.step="any";const{precision:t,min:n,max:r,step:s}=this.config;typeof t=="number"&&this.setPrecision(t),typeof n=="number"&&this.setMin(n),typeof r=="number"&&this.setMax(r),typeof s=="number"&&this.setStep(s)}onWheel(e){en(this.beans)===this.eInput&&e.preventDefault()}normalizeValue(e){if(e==="")return"";this.precision!=null&&(e=this.adjustPrecision(e));const t=parseFloat(e),{min:n,max:r}=this;return n!=null&&tr&&(e=r.toString()),e}adjustPrecision(e,t){const n=this.precision;if(n==null)return e;if(t){const s=parseFloat(e).toFixed(n);return parseFloat(s).toString()}const r=String(e).split(".");if(r.length>1){if(r[1].length<=n)return e;if(n>0)return`${r[0]}.${r[1].slice(0,n)}`}return r[0]}setMin(e){return this.min===e?this:(this.min=e,Ti(this.eInput,"min",e),this)}setMax(e){return this.max===e?this:(this.max=e,Ti(this.eInput,"max",e),this)}setPrecision(e){return this.precision=e,this}setStep(e){return this.step===e?this:(this.step=e,Ti(this.eInput,"step",e),this)}setValue(e,t){return this.setValueOrInputValue(n=>super.setValue(n,t),()=>this,e)}setStartValue(e){return this.setValueOrInputValue(t=>super.setValue(t,!0),t=>{this.eInput.value=t},e)}setValueOrInputValue(e,t,n){if($e(n)){let r=this.isScientificNotation(n);if(r&&this.eInput.validity.valid)return e(n);if(!r){n=this.adjustPrecision(n);const s=this.normalizeValue(n);r=n!=s}if(r)return t(n)}return e(n)}getValue(){const e=this.eInput;if(!e.validity.valid)return;const t=e.value;return this.isScientificNotation(t)?this.adjustPrecision(t,!0):super.getValue()}isScientificNotation(e){return typeof e=="string"&&e.includes("e")}},ay={selector:"AG-INPUT-NUMBER-FIELD",component:oy};function pp(e,t){return e.toString().padStart(t,"0")}function js(e,t=!0,n="-"){if(!e)return null;let r=[e.getFullYear(),e.getMonth()+1,e.getDate()].map(s=>pp(s,2)).join(n);return t&&(r+=" "+[e.getHours(),e.getMinutes(),e.getSeconds()].map(s=>pp(s,2)).join(":")),r}var wS=e=>{if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd"}return"th"};function gp(e,t="YYYY-MM-DD"){const n=pp(e.getFullYear(),4),r=["January","February","March","April","May","June","July","August","September","October","November","December"],s=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i={YYYY:()=>n.slice(n.length-4,n.length),YY:()=>n.slice(n.length-2,n.length),Y:()=>`${e.getFullYear()}`,MMMM:()=>r[e.getMonth()],MMM:()=>r[e.getMonth()].slice(0,3),MM:()=>pp(e.getMonth()+1,2),Mo:()=>`${e.getMonth()+1}${wS(e.getMonth()+1)}`,M:()=>`${e.getMonth()+1}`,Do:()=>`${e.getDate()}${wS(e.getDate())}`,DD:()=>pp(e.getDate(),2),D:()=>`${e.getDate()}`,dddd:()=>s[e.getDay()],ddd:()=>s[e.getDay()].slice(0,3),dd:()=>s[e.getDay()].slice(0,2),do:()=>`${e.getDay()}${wS(e.getDay())}`,d:()=>`${e.getDay()}`},o=new RegExp(Object.keys(i).join("|"),"g");return t.replace(o,a=>a in i?i[a]():a)}function cs(e){if(!e)return null;const[t,n]=e.split(" ");if(!t)return null;const r=t.split("-").map(h=>parseInt(h,10));if(r.filter(h=>!isNaN(h)).length!==3)return null;const[s,i,o]=r,a=new Date(s,i-1,o);if(a.getFullYear()!==s||a.getMonth()!==i-1||a.getDate()!==o)return null;if(!n||n==="00:00:00")return a;const[l,c,u]=n.split(":").map(h=>parseInt(h,10));return l>=0&&l<24&&a.setHours(l),c>=0&&c<60&&a.setMinutes(c),u>=0&&u<60&&a.setSeconds(u),a}var z2=class extends uo{constructor(e){super(e,"ag-date-field","date")}postConstruct(){super.postConstruct();const e=Yc();this.addManagedListeners(this.eInput,{wheel:this.onWheel.bind(this),mousedown:()=>{this.isDisabled()||e||this.eInput.focus()}}),this.eInput.step="any"}onWheel(e){en(this.beans)===this.eInput&&e.preventDefault()}setMin(e){const t=e instanceof Date?js(e??null,!1)??void 0:e;return this.min===t?this:(this.min=t,Ti(this.eInput,"min",t),this)}setMax(e){const t=e instanceof Date?js(e??null,!1)??void 0:e;return this.max===t?this:(this.max=t,Ti(this.eInput,"max",t),this)}setStep(e){return this.step===e?this:(this.step=e,Ti(this.eInput,"step",e),this)}getDate(){if(this.eInput.validity.valid)return cs(this.getValue())??void 0}setDate(e,t){this.setValue(js(e??null,!1),t)}},W2={selector:"AG-INPUT-DATE-FIELD",component:z2},Yce=1e3,Qce=1e3,XL=100,YL,hm=!1,Zce=class extends be{constructor(e,t){super(),this.tooltipCtrl=e,this.getTooltipValue=t,this.interactionEnabled=!1,this.isInteractingWithTooltip=!1,this.state=0,this.tooltipInstanceCount=0,this.tooltipMouseTrack=!1}wireBeans(e){this.popupSvc=e.popupSvc,this.userCompFactory=e.userCompFactory}postConstruct(){this.gos.get("tooltipInteraction")&&(this.interactionEnabled=!0),this.tooltipTrigger=this.getTooltipTrigger(),this.tooltipMouseTrack=this.gos.get("tooltipMouseTrack");const e=this.tooltipCtrl.getGui();this.tooltipTrigger===0&&this.addManagedListeners(e,{mouseenter:this.onMouseEnter.bind(this),mouseleave:this.onMouseLeave.bind(this)}),this.tooltipTrigger===1&&this.addManagedListeners(e,{focusin:this.onFocusIn.bind(this),focusout:this.onFocusOut.bind(this)}),this.addManagedListeners(e,{mousemove:this.onMouseMove.bind(this)}),this.interactionEnabled||this.addManagedListeners(e,{mousedown:this.onMouseDown.bind(this),keydown:this.onKeyDown.bind(this)})}getGridOptionsTooltipDelay(e){const t=this.gos.get(e);return Math.max(200,t)}getTooltipDelay(e){var t,n,r,s;return e==="show"?((n=(t=this.tooltipCtrl).getTooltipShowDelayOverride)==null?void 0:n.call(t))??this.getGridOptionsTooltipDelay("tooltipShowDelay"):((s=(r=this.tooltipCtrl).getTooltipHideDelayOverride)==null?void 0:s.call(r))??this.getGridOptionsTooltipDelay("tooltipHideDelay")}destroy(){this.setToDoNothing(),super.destroy()}getTooltipTrigger(){const e=this.gos.get("tooltipTrigger");return!e||e==="hover"?0:1}onMouseEnter(e){this.interactionEnabled&&this.interactiveTooltipTimeoutId&&(this.unlockService(),this.startHideTimeout()),!fl()&&(hm?this.showTooltipTimeoutId=window.setTimeout(()=>{this.prepareToShowTooltip(e)},XL):this.prepareToShowTooltip(e))}onMouseMove(e){this.lastMouseEvent&&(this.lastMouseEvent=e),this.tooltipMouseTrack&&this.state===2&&this.tooltipComp&&this.positionTooltip()}onMouseDown(){this.setToDoNothing()}onMouseLeave(){this.interactionEnabled?this.lockService():this.setToDoNothing()}onFocusIn(){this.prepareToShowTooltip()}onFocusOut(e){var s;const t=e.relatedTarget,n=this.tooltipCtrl.getGui(),r=(s=this.tooltipComp)==null?void 0:s.getGui();this.isInteractingWithTooltip||n.contains(t)||this.interactionEnabled&&(r!=null&&r.contains(t))||this.setToDoNothing()}onKeyDown(){this.isInteractingWithTooltip&&(this.isInteractingWithTooltip=!1),this.setToDoNothing()}prepareToShowTooltip(e){if(this.state!=0||hm)return;let t=0;e&&(t=this.isLastTooltipHiddenRecently()?200:this.getTooltipDelay("show")),this.lastMouseEvent=e||null,this.showTooltipTimeoutId=window.setTimeout(this.showTooltip.bind(this),t),this.state=1}isLastTooltipHiddenRecently(){return new Date().getTime()-YLthis.hideTooltip(!0),...((g=t.getAdditionalParams)==null?void 0:g.call(t))??{}};this.state=2,this.tooltipInstanceCount++;const s=this.newTooltipComponentCallback.bind(this,this.tooltipInstanceCount),i=hle(this.userCompFactory,r);i==null||i.newAgStackInstance().then(s)}hideTooltip(e){!e&&this.isInteractingWithTooltip||(this.tooltipComp&&(this.destroyTooltipComp(),YL=new Date().getTime()),this.eventSvc.dispatchEvent({type:"tooltipHide",parentGui:this.tooltipCtrl.getGui()}),e&&(this.isInteractingWithTooltip=!1),this.setToDoNothing(!0))}newTooltipComponentCallback(e,t){var o;if(this.state!==2||this.tooltipInstanceCount!==e){this.destroyBean(t);return}const r=t.getGui();this.tooltipComp=t,r.classList.contains("ag-tooltip")||r.classList.add("ag-tooltip-custom"),this.tooltipTrigger===0&&r.classList.add("ag-tooltip-animate"),this.interactionEnabled&&r.classList.add("ag-tooltip-interactive");const s=this.getLocaleTextFunc(),i=(o=this.popupSvc)==null?void 0:o.addPopup({eChild:r,ariaLabel:s("ariaLabelTooltip","Tooltip")});if(i&&(this.tooltipPopupDestroyFunc=i.hideFunc),this.positionTooltip(),this.tooltipTrigger===1){const a=()=>this.setToDoNothing();[this.onBodyScrollEventCallback,this.onColumnMovedEventCallback]=this.addManagedEventListeners({bodyScroll:a,columnMoved:a})}this.interactionEnabled&&([this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener]=this.addManagedElementListeners(r,{mouseenter:this.onTooltipMouseEnter.bind(this),mouseleave:this.onTooltipMouseLeave.bind(this)}),[this.onDocumentKeyDownCallback]=this.addManagedElementListeners(Cn(this.beans),{keydown:a=>{r.contains(a==null?void 0:a.target)||this.onKeyDown()}}),this.tooltipTrigger===1&&([this.tooltipFocusInListener,this.tooltipFocusOutListener]=this.addManagedElementListeners(r,{focusin:this.onTooltipFocusIn.bind(this),focusout:this.onTooltipFocusOut.bind(this)}))),this.eventSvc.dispatchEvent({type:"tooltipShow",tooltipGui:r,parentGui:this.tooltipCtrl.getGui()}),this.startHideTimeout()}onTooltipMouseEnter(){this.isInteractingWithTooltip=!0,this.unlockService()}onTooltipMouseLeave(){this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,this.lockService())}onTooltipFocusIn(){this.isInteractingWithTooltip=!0}isTooltipFocused(){var n;const e=(n=this.tooltipComp)==null?void 0:n.getGui(),t=en(this.beans);return!!e&&e.contains(t)}onTooltipFocusOut(e){const t=this.tooltipCtrl.getGui();this.isTooltipFocused()||(this.isInteractingWithTooltip=!1,t.contains(e.relatedTarget)?this.startHideTimeout():this.hideTooltip())}positionTooltip(){var t,n;const e={type:"tooltip",ePopup:this.tooltipComp.getGui(),nudgeY:18,skipObserver:this.tooltipMouseTrack};this.lastMouseEvent?(t=this.popupSvc)==null||t.positionPopupUnderMouseEvent({...e,mouseEvent:this.lastMouseEvent}):(n=this.popupSvc)==null||n.positionPopupByComponent({...e,eventSource:this.tooltipCtrl.getGui(),position:"under",keepWithinBounds:!0,nudgeY:5})}destroyTooltipComp(){this.tooltipComp.getGui().classList.add("ag-tooltip-hiding");const e=this.tooltipPopupDestroyFunc,t=this.tooltipComp,n=this.tooltipTrigger===0?Qce:0;window.setTimeout(()=>{e(),this.destroyBean(t)},n),this.clearTooltipListeners(),this.tooltipPopupDestroyFunc=void 0,this.tooltipComp=void 0}clearTooltipListeners(){[this.tooltipMouseEnterListener,this.tooltipMouseLeaveListener,this.tooltipFocusInListener,this.tooltipFocusOutListener].forEach(e=>{e&&e()}),this.tooltipMouseEnterListener=this.tooltipMouseLeaveListener=this.tooltipFocusInListener=this.tooltipFocusOutListener=null}lockService(){hm=!0,this.interactiveTooltipTimeoutId=window.setTimeout(()=>{this.unlockService(),this.setToDoNothing()},XL)}unlockService(){hm=!1,this.clearInteractiveTimeout()}startHideTimeout(){this.clearHideTimeout(),this.hideTooltipTimeoutId=window.setTimeout(this.hideTooltip.bind(this),this.getTooltipDelay("hide"))}clearShowTimeout(){this.showTooltipTimeoutId&&(window.clearTimeout(this.showTooltipTimeoutId),this.showTooltipTimeoutId=void 0)}clearHideTimeout(){this.hideTooltipTimeoutId&&(window.clearTimeout(this.hideTooltipTimeoutId),this.hideTooltipTimeoutId=void 0)}clearInteractiveTimeout(){this.interactiveTooltipTimeoutId&&(window.clearTimeout(this.interactiveTooltipTimeoutId),this.interactiveTooltipTimeoutId=void 0)}clearTimeouts(){this.clearShowTimeout(),this.clearHideTimeout(),this.clearInteractiveTimeout()}};function fp(e){return e.get("tooltipShowMode")==="whenTruncated"}function ly(e,t){return fp(e)?Rc(t):void 0}function Rc(e){return()=>{const t=e();return t?t.scrollWidth>t.clientWidth:!0}}var Jce=class extends be{constructor(e,t){super(),this.ctrl=e,t&&(this.beans=t)}postConstruct(){this.refreshTooltip()}setBrowserTooltip(e){const t="title",n=this.ctrl.getGui();n&&(e!=null&&e!=""?n.setAttribute(t,e):n.removeAttribute(t))}updateTooltipText(){const{getTooltipValue:e}=this.ctrl;e&&(this.tooltip=e())}createTooltipFeatureIfNeeded(){this.tooltipManager==null&&(this.tooltipManager=this.createBean(new Zce(this.ctrl,()=>this.tooltip),this.beans.context))}setTooltipAndRefresh(e){this.tooltip=e,this.refreshTooltip()}refreshTooltip(){this.browserTooltips=this.beans.gos.get("enableBrowserTooltips"),this.updateTooltipText(),this.browserTooltips?(this.setBrowserTooltip(this.tooltip),this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context)):(this.setBrowserTooltip(null),this.createTooltipFeatureIfNeeded())}destroy(){this.tooltipManager=this.destroyBean(this.tooltipManager,this.beans.context),super.destroy()}},eue=class extends He{constructor(e="default",t=!1){super(`
`),this.cssIdentifier=e,this.unFocusable=t,this.activeClass="ag-active-item",this.options=[],this.itemEls=[]}postConstruct(){const e=this.getGui();this.addManagedElementListeners(e,{mouseleave:()=>this.clearHighlighted()}),!this.unFocusable&&this.addManagedElementListeners(e,{keydown:this.handleKeyDown.bind(this)})}handleKeyDown(e){const t=e.key;switch(t){case se.ENTER:if(!this.highlightedEl)this.setValue(this.getValue());else{const n=this.itemEls.indexOf(this.highlightedEl);this.setValueByIndex(n)}break;case se.DOWN:case se.UP:e.preventDefault(),this.navigate(t);break;case se.PAGE_DOWN:case se.PAGE_UP:case se.PAGE_HOME:case se.PAGE_END:e.preventDefault(),this.navigateToPage(t);break}}navigate(e){const t=e===se.DOWN;let n;const{itemEls:r,highlightedEl:s}=this;if(!s)n=r[t?0:r.length-1];else{let o=r.indexOf(s)+(t?1:-1);o=Math.min(Math.max(o,0),r.length-1),n=r[o]}this.highlightItem(n)}navigateToPage(e){const{itemEls:t,highlightedEl:n}=this;if(!n||t.length===0)return;const r=t.indexOf(n),s=this.options.length-1,i=t[0].clientHeight,o=Math.floor(this.getGui().clientHeight/i);let a=-1;e===se.PAGE_HOME?a=0:e===se.PAGE_END?a=s:e===se.PAGE_DOWN?a=Math.min(r+o,s):e===se.PAGE_UP&&(a=Math.max(r-o,0)),a!==-1&&this.highlightItem(t[a])}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){const{value:t,text:n}=e,r=n||t;return this.options.push({value:t,text:r}),this.renderOption(t,r),this.updateIndices(),this}clearOptions(){this.options=[],this.reset(!0),this.itemEls.forEach(e=>{er(e)}),this.itemEls=[]}updateIndices(){const e=this.getGui().querySelectorAll(".ag-list-item");e.forEach((t,n)=>{jv(t,n+1),Uv(t,e.length)})}renderOption(e,t){const n=Cn(this.beans),r=n.createElement("div");Bn(r,"option"),r.classList.add("ag-list-item",`ag-${this.cssIdentifier}-list-item`);const s=n.createElement("span");r.appendChild(s),s.textContent=t,this.unFocusable||(r.tabIndex=-1),this.itemEls.push(r),this.addManagedListeners(r,{mouseover:()=>this.highlightItem(r),mousedown:i=>{i.preventDefault(),i.stopPropagation(),this.setValue(e)}}),this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{getTooltipValue:()=>t,getGui:()=>r,getLocation:()=>"UNKNOWN",shouldDisplayTooltip:()=>s.scrollWidth>s.clientWidth})),this.getGui().appendChild(r)}setValue(e,t){if(this.value===e)return this.fireItemSelected(),this;if(e==null)return this.reset(t),this;const n=this.options.findIndex(r=>r.value===e);if(n!==-1){const r=this.options[n];this.value=r.value,this.displayValue=r.text,this.highlightItem(this.itemEls[n]),t||this.fireChangeEvent()}return this}setValueByIndex(e){return this.setValue(this.options[e].value)}getValue(){return this.value}getDisplayValue(){return this.displayValue}refreshHighlighted(){this.clearHighlighted();const e=this.options.findIndex(t=>t.value===this.value);e!==-1&&this.highlightItem(this.itemEls[e])}reset(e){this.value=null,this.displayValue=null,this.clearHighlighted(),e||this.fireChangeEvent()}highlightItem(e){if(!us(e))return;this.clearHighlighted(),this.highlightedEl=e,e.classList.add(this.activeClass),zp(e,!0);const t=this.getGui(),{scrollTop:n,clientHeight:r}=t,{offsetTop:s,offsetHeight:i}=e;(s+i>n+r||s
`,(e==null?void 0:e.agComponents)||[],e==null?void 0:e.className),this.isPickerDisplayed=!1,this.skipClick=!1,this.pickerGap=4,this.hideCurrentPicker=null,this.eLabel=pe,this.eWrapper=pe,this.eDisplayField=pe,this.eIcon=pe,this.registerCSS(tue),this.ariaRole=e==null?void 0:e.ariaRole,this.onPickerFocusIn=this.onPickerFocusIn.bind(this),this.onPickerFocusOut=this.onPickerFocusOut.bind(this),!e)return;const{pickerGap:t,maxPickerHeight:n,variableWidth:r,minPickerWidth:s,maxPickerWidth:i}=e;t!=null&&(this.pickerGap=t),this.variableWidth=!!r,n!=null&&this.setPickerMaxHeight(n),s!=null&&this.setPickerMinWidth(s),i!=null&&this.setPickerMaxWidth(i)}postConstruct(){super.postConstruct(),this.setupAria();const e=`ag-${this.getCompId()}-display`;this.eDisplayField.setAttribute("id",e);const t=this.getAriaElement();this.addManagedElementListeners(t,{keydown:this.onKeyDown.bind(this)}),this.addManagedElementListeners(this.eLabel,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)}),this.addManagedElementListeners(this.eWrapper,{mousedown:this.onLabelOrWrapperMouseDown.bind(this)});const{pickerIcon:n,inputWidth:r}=this.config;if(n){const s=St(n,this.beans);s&&this.eIcon.appendChild(s)}r!=null&&this.setInputWidth(r)}setupAria(){const e=this.getAriaElement();e.setAttribute("tabindex",this.gos.get("tabIndex").toString()),ws(e,!1),this.ariaRole&&Bn(e,this.ariaRole)}onLabelOrWrapperMouseDown(e){if(e){const t=this.getFocusableElement();if(t!==this.eWrapper&&(e==null?void 0:e.target)===t)return;e.preventDefault(),this.getFocusableElement().focus()}if(this.skipClick){this.skipClick=!1;return}this.isDisabled()||(this.isPickerDisplayed?this.hidePicker():this.showPicker())}onKeyDown(e){switch(e.key){case se.UP:case se.DOWN:case se.ENTER:case se.SPACE:e.preventDefault(),this.onLabelOrWrapperMouseDown();break;case se.ESCAPE:this.isPickerDisplayed&&(e.preventDefault(),e.stopPropagation(),this.hideCurrentPicker&&this.hideCurrentPicker());break}}showPicker(){this.isPickerDisplayed=!0,this.pickerComponent||(this.pickerComponent=this.createPickerComponent());const e=this.pickerComponent.getGui();e.addEventListener("focusin",this.onPickerFocusIn),e.addEventListener("focusout",this.onPickerFocusOut),this.hideCurrentPicker=this.renderAndPositionPicker(),this.toggleExpandedStyles(!0)}renderAndPositionPicker(){const e=this.pickerComponent.getGui();this.gos.get("suppressScrollWhenPopupsAreOpen")||([this.destroyMouseWheelFunc]=this.addManagedEventListeners({bodyScroll:()=>{this.hidePicker()}}));const t=this.getLocaleTextFunc(),{config:{pickerAriaLabelKey:n,pickerAriaLabelValue:r,modalPicker:s=!0},maxPickerHeight:i,minPickerWidth:o,maxPickerWidth:a,variableWidth:l,beans:c,eWrapper:u}=this,h={modal:s,eChild:e,closeOnEsc:!0,closedCallback:()=>{const v=Rl(c);this.beforeHidePicker(),v&&this.isAlive()&&this.getFocusableElement().focus()},ariaLabel:t(n,r),anchorToElement:u};e.style.position="absolute";const g=c.popupSvc,m=g.addPopup(h);l?(o&&(e.style.minWidth=o),e.style.width=UP(Lc(u)),a&&(e.style.maxWidth=a)):LC(e,a??Lc(u));const C=i??`${Kv(g.getPopupParent())}px`;return e.style.setProperty("max-height",C),this.alignPickerToComponent(),m.hideFunc}alignPickerToComponent(){if(!this.pickerComponent)return;const{pickerGap:e,config:{pickerType:t},beans:{popupSvc:n,gos:r},eWrapper:s,pickerComponent:i}=this,o=r.get("enableRtl")?"right":"left";n.positionPopupByComponent({type:t,eventSource:s,ePopup:i.getGui(),position:"under",alignSide:o,keepWithinBounds:!0,nudgeY:e})}beforeHidePicker(){this.destroyMouseWheelFunc&&(this.destroyMouseWheelFunc(),this.destroyMouseWheelFunc=void 0),this.toggleExpandedStyles(!1);const e=this.pickerComponent.getGui();e.removeEventListener("focusin",this.onPickerFocusIn),e.removeEventListener("focusout",this.onPickerFocusOut),this.isPickerDisplayed=!1,this.pickerComponent=void 0,this.hideCurrentPicker=null}toggleExpandedStyles(e){if(!this.isAlive())return;const t=this.getAriaElement();ws(t,e);const n=this.eWrapper.classList;n.toggle("ag-picker-expanded",e),n.toggle("ag-picker-collapsed",!e)}onPickerFocusIn(){this.togglePickerHasFocus(!0)}onPickerFocusOut(e){var t;(t=this.pickerComponent)!=null&&t.getGui().contains(e.relatedTarget)||this.togglePickerHasFocus(!1)}togglePickerHasFocus(e){this.pickerComponent&&this.eWrapper.classList.toggle("ag-picker-has-focus",e)}hidePicker(){var e;(e=this.hideCurrentPicker)==null||e.call(this)}setInputWidth(e){return LC(this.eWrapper,e),this}getFocusableElement(){return this.eWrapper}setPickerGap(e){return this.pickerGap=e,this}setPickerMinWidth(e){return typeof e=="number"&&(e=`${e}px`),this.minPickerWidth=e??void 0,this}setPickerMaxWidth(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerWidth=e??void 0,this}setPickerMaxHeight(e){return typeof e=="number"&&(e=`${e}px`),this.maxPickerHeight=e??void 0,this}destroy(){this.hidePicker(),super.destroy()}},nue=".ag-select{align-items:center;display:flex;&.ag-disabled{opacity:.5}}:where(.ag-select){.ag-picker-field-wrapper{cursor:default}&.ag-disabled .ag-picker-field-wrapper:focus{box-shadow:none}&:not(.ag-cell-editor,.ag-label-align-top){min-height:var(--ag-list-item-height)}.ag-picker-field-display{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ag-picker-field-icon{align-items:center;display:flex}}:where(.ag-ltr) :where(.ag-select){.ag-picker-field-wrapper{padding-left:calc(var(--ag-cell-horizontal-padding)/2);padding-right:var(--ag-spacing)}}:where(.ag-rtl) :where(.ag-select){.ag-picker-field-wrapper{padding-left:var(--ag-spacing);padding-right:calc(var(--ag-cell-horizontal-padding)/2)}}",ys=class extends vF{constructor(e){super({pickerAriaLabelKey:"ariaLabelSelectField",pickerAriaLabelValue:"Select Field",pickerType:"ag-list",className:"ag-select",pickerIcon:"selectOpen",ariaRole:"combobox",...e}),this.registerCSS(nue)}postConstruct(){this.tooltipFeature=this.createOptionalManagedBean(this.beans.registry.createDynamicBean("tooltipFeature",!1,{shouldDisplayTooltip:Rc(()=>this.eDisplayField),getGui:()=>this.getGui()})),super.postConstruct(),this.createListComponent(),this.eWrapper.tabIndex=this.gos.get("tabIndex");const{options:e,value:t,placeholder:n}=this.config;e!=null&&this.addOptions(e),t!=null&&this.setValue(t,!0),n&&t==null&&(this.eDisplayField.textContent=n),this.addManagedElementListeners(this.eWrapper,{focusout:this.onWrapperFocusOut.bind(this)})}onWrapperFocusOut(e){this.eWrapper.contains(e.relatedTarget)||this.hidePicker()}createListComponent(){const e=this.createBean(new eue("select",!0));this.listComponent=e,e.setParentComponent(this);const t=e.getAriaElement(),n=`ag-select-list-${e.getCompId()}`;t.setAttribute("id",n),zP(this.getAriaElement(),t),e.addManagedListeners(e,{selectedItem:()=>{this.hidePicker(),this.dispatchLocalEvent({type:"selectedItem"})}}),e.addManagedListeners(e,{fieldValueChanged:()=>{this.listComponent&&(this.setValue(this.listComponent.getValue(),!1,!0),this.hidePicker())}})}createPickerComponent(){return this.listComponent}onKeyDown(e){var n;const{key:t}=e;switch(t===se.TAB&&this.hidePicker(),t){case se.ENTER:case se.UP:case se.DOWN:case se.PAGE_UP:case se.PAGE_DOWN:case se.PAGE_HOME:case se.PAGE_END:e.preventDefault(),this.isPickerDisplayed?(n=this.listComponent)==null||n.handleKeyDown(e):super.onKeyDown(e);break;case se.ESCAPE:super.onKeyDown(e);break;case se.SPACE:this.isPickerDisplayed?e.preventDefault():super.onKeyDown(e);break}}showPicker(){const e=this.listComponent;e&&(super.showPicker(),e.refreshHighlighted())}addOptions(e){return e.forEach(t=>this.addOption(t)),this}addOption(e){return this.listComponent.addOption(e),this}clearOptions(){var e;return(e=this.listComponent)==null||e.clearOptions(),this}setValue(e,t,n){const{listComponent:r,config:{placeholder:s},eDisplayField:i,tooltipFeature:o}=this;if(this.value===e||!r)return this;if(n||r.setValue(e,!0),r.getValue()===this.getValue())return this;let l=r.getDisplayValue();return l==null&&s&&(l=s),i.textContent=l,o==null||o.setTooltipAndRefresh(l??null),super.setValue(e,t)}destroy(){this.listComponent=this.destroyBean(this.listComponent),super.destroy()}},Rg={selector:"AG-SELECT",component:ys},Ec={TAB_GUARD:"ag-tab-guard",TAB_GUARD_TOP:"ag-tab-guard-top",TAB_GUARD_BOTTOM:"ag-tab-guard-bottom"},_2=class extends be{constructor(e){super(),this.skipTabGuardFocus=!1,this.forcingFocusOut=!1,this.allowFocus=!1;const{comp:t,eTopGuard:n,eBottomGuard:r,focusTrapActive:s,forceFocusOutWhenTabGuardsAreEmpty:i,isFocusableContainer:o,focusInnerElement:a,onFocusIn:l,onFocusOut:c,shouldStopEventPropagation:u,onTabKeyDown:h,handleKeyDown:g,eFocusableElement:m}=e;this.comp=t,this.eTopGuard=n,this.eBottomGuard=r,this.providedFocusInnerElement=a,this.eFocusableElement=m,this.focusTrapActive=!!s,this.forceFocusOutWhenTabGuardsAreEmpty=!!i,this.isFocusableContainer=!!o,this.providedFocusIn=l,this.providedFocusOut=c,this.providedShouldStopEventPropagation=u,this.providedOnTabKeyDown=h,this.providedHandleKeyDown=g}postConstruct(){this.createManagedBean(new Ll(this.eFocusableElement,{shouldStopEventPropagation:()=>this.shouldStopEventPropagation(),onTabKeyDown:e=>this.onTabKeyDown(e),handleKeyDown:e=>this.handleKeyDown(e),onFocusIn:e=>this.onFocusIn(e),onFocusOut:e=>this.onFocusOut(e)})),this.activateTabGuards(),[this.eTopGuard,this.eBottomGuard].forEach(e=>this.addManagedElementListeners(e,{focus:this.onFocus.bind(this)}))}handleKeyDown(e){this.providedHandleKeyDown&&this.providedHandleKeyDown(e)}tabGuardsAreActive(){return!!this.eTopGuard&&this.eTopGuard.hasAttribute("tabIndex")}shouldStopEventPropagation(){return this.providedShouldStopEventPropagation?this.providedShouldStopEventPropagation():!1}activateTabGuards(){if(this.forcingFocusOut)return;const e=this.gos.get("tabIndex");this.comp.setTabIndex(e.toString())}deactivateTabGuards(){this.comp.setTabIndex()}onFocus(e){if(this.isFocusableContainer&&!this.eFocusableElement.contains(e.relatedTarget)&&!this.allowFocus){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.skipTabGuardFocus){this.skipTabGuardFocus=!1;return}if(this.forceFocusOutWhenTabGuardsAreEmpty&&Ji(this.eFocusableElement,".ag-tab-guard").length===0){this.findNextElementOutsideAndFocus(e.target===this.eBottomGuard);return}if(this.isFocusableContainer&&this.eFocusableElement.contains(e.relatedTarget))return;const t=e.target===this.eBottomGuard;this.providedFocusInnerElement?this.providedFocusInnerElement(t):this.focusInnerElement(t)}findNextElementOutsideAndFocus(e){var l;const t=Cn(this.beans),n=Ji(t.body,null,!0),r=n.indexOf(e?this.eTopGuard:this.eBottomGuard);if(r===-1)return;let s,i;e?(s=0,i=r):(s=r+1,i=n.length);const o=n.slice(s,i),a=this.gos.get("tabIndex");o.sort((c,u)=>{const h=parseInt(c.getAttribute("tabindex")||"0"),g=parseInt(u.getAttribute("tabindex")||"0");return g===a?1:h===a?-1:h===0?1:g===0?-1:h-g}),(l=o[e?o.length-1:0])==null||l.focus()}onFocusIn(e){this.focusTrapActive||this.forcingFocusOut||(this.providedFocusIn&&this.providedFocusIn(e),this.isFocusableContainer||this.deactivateTabGuards())}onFocusOut(e){this.focusTrapActive||(this.providedFocusOut&&this.providedFocusOut(e),this.eFocusableElement.contains(e.relatedTarget)||this.activateTabGuards())}onTabKeyDown(e){if(this.providedOnTabKeyDown){this.providedOnTabKeyDown(e);return}if(this.focusTrapActive||e.defaultPrevented)return;const t=this.tabGuardsAreActive();t&&this.deactivateTabGuards();const n=this.getNextFocusableElement(e.shiftKey);t&&setTimeout(()=>this.activateTabGuards(),0),n&&(n.focus(),e.preventDefault())}focusInnerElement(e=!1){const t=Ji(this.eFocusableElement);this.tabGuardsAreActive()&&(t.splice(0,1),t.splice(t.length-1,1)),t.length&&t[e?t.length-1:0].focus({preventScroll:!0})}getNextFocusableElement(e){return qr(this.beans,this.eFocusableElement,!1,e)}forceFocusOutOfContainer(e=!1){if(this.forcingFocusOut)return;const t=e?this.eTopGuard:this.eBottomGuard;this.activateTabGuards(),this.skipTabGuardFocus=!0,this.forcingFocusOut=!0,t.focus(),window.setTimeout(()=>{this.forcingFocusOut=!1,this.activateTabGuards()})}isTabGuard(e,t){return e===this.eTopGuard&&!t||e===this.eBottomGuard&&(t??!0)}setAllowFocus(e){this.allowFocus=e}},U2=class extends be{constructor(e){super(),this.comp=e}initialiseTabGuard(e){this.eTopGuard=this.createTabGuard("top"),this.eBottomGuard=this.createTabGuard("bottom"),this.eFocusableElement=this.comp.getFocusableElement();const{eTopGuard:t,eBottomGuard:n,eFocusableElement:r}=this,s=[t,n],i={setTabIndex:v=>{s.forEach(b=>v!=null?b.setAttribute("tabindex",v):b.removeAttribute("tabindex"))}};this.addTabGuards(t,n);const{focusTrapActive:o=!1,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:C}=e;this.tabGuardCtrl=this.createManagedBean(new _2({comp:i,focusTrapActive:o,eTopGuard:t,eBottomGuard:n,eFocusableElement:r,onFocusIn:a,onFocusOut:l,focusInnerElement:c,handleKeyDown:u,onTabKeyDown:h,shouldStopEventPropagation:g,forceFocusOutWhenTabGuardsAreEmpty:m,isFocusableContainer:C}))}getTabGuardCtrl(){return this.tabGuardCtrl}createTabGuard(e){const t=Cn(this.beans).createElement("div"),n=e==="top"?Ec.TAB_GUARD_TOP:Ec.TAB_GUARD_BOTTOM;return t.classList.add(Ec.TAB_GUARD,n),Bn(t,"presentation"),t}addTabGuards(e,t){const n=this.eFocusableElement;n.insertAdjacentElement("afterbegin",e),n.insertAdjacentElement("beforeend",t)}removeAllChildrenExceptTabGuards(){const e=[this.eTopGuard,this.eBottomGuard];ln(this.comp.getFocusableElement()),this.addTabGuards(...e)}forceFocusOutOfContainer(e=!1){this.tabGuardCtrl.forceFocusOutOfContainer(e)}appendChild(e,t,n){Xv(t)||(t=t.getGui());const{eBottomGuard:r}=this;r?r.insertAdjacentElement("beforebegin",t):e(t,n)}},ko=class extends He{initialiseTabGuard(t){this.tabGuardFeature=this.createManagedBean(new U2(this)),this.tabGuardFeature.initialiseTabGuard(t)}forceFocusOutOfContainer(t=!1){this.tabGuardFeature.forceFocusOutOfContainer(t)}appendChild(t,n){this.tabGuardFeature.appendChild(super.appendChild.bind(this),t,n)}},Ol=class extends He{isPopup(){return!0}setParentComponent(e){e.addCssClass("ag-has-popup"),super.setParentComponent(e)}destroy(){const e=this.parentComponent;e&&e.isAlive()&&e.getGui().classList.remove("ag-has-popup"),super.destroy()}},ol=class{constructor(e,t=!1){this.DOUBLE_TAP_MILLIS=500,this.destroyFuncs=[],this.touching=!1,this.localEventService=new Al,this.preventMouseClick=t;const n=this.onTouchStart.bind(this),r=this.onTouchMove.bind(this),s=this.onTouchEnd.bind(this);e.addEventListener("touchstart",n,{passive:!0}),e.addEventListener("touchmove",r,{passive:!0}),e.addEventListener("touchend",s,{passive:!1}),this.destroyFuncs.push(()=>{e.removeEventListener("touchstart",n,{passive:!0}),e.removeEventListener("touchmove",r,{passive:!0}),e.removeEventListener("touchend",s,{passive:!1})})}getActiveTouch(e){for(let t=0;t{const n=this.touchStart===t;if(this.touching&&n&&!this.moved){this.moved=!0;const r={type:"longTap",touchStart:this.touchStart,touchEvent:e};this.localEventService.dispatchEvent(r)}},500)}onTouchMove(e){if(!this.touching)return;const t=this.getActiveTouch(e.touches);if(!t)return;!g2(t,this.touchStart,4)&&(this.moved=!0)}onTouchEnd(e){if(this.touching){if(!this.moved){const t={type:"tap",touchStart:this.touchStart};this.localEventService.dispatchEvent(t),this.checkForDoubleTap()}this.preventMouseClick&&e.cancelable&&e.preventDefault(),this.touching=!1}}checkForDoubleTap(){const e=new Date().getTime();if(this.lastTapTime&&this.lastTapTime>0)if(e-this.lastTapTime>this.DOUBLE_TAP_MILLIS){const n={type:"doubleTap",touchStart:this.touchStart};this.localEventService.dispatchEvent(n),this.lastTapTime=null}else this.lastTapTime=e;else this.lastTapTime=e}destroy(){this.destroyFuncs.forEach(e=>e())}},Ei=(e=>(e[e.VALUE=0]="VALUE",e[e.DIMENSION=1]="DIMENSION",e))(Ei||{}),j2=class{constructor(e="javascript"){this.frameworkName=e,this.renderingEngine="vanilla",this.wrapIncoming=t=>t(),this.wrapOutgoing=t=>t(),this.baseDocLink=`${dH}/${this.frameworkName}-data-grid`,Uoe(this.baseDocLink)}setInterval(e,t){return new Lt(n=>{n(window.setInterval(e,t))})}addEventListener(e,t,n,r){let s={};if(typeof r=="object"?s=r:typeof r=="boolean"&&(s={capture:r}),s.passive==null){const i=MH(t);i!=null&&(s.passive=i)}e.addEventListener(t,n,s)}frameworkComponent(e){return null}isFrameworkComponent(e){return!1}getDocLink(e){return`${this.baseDocLink}${e?`/${e}`:""}`}};function rue(e){return{beanName:"gridApi",bean:e.getBean("apiFunctionSvc").api}}var sue=["licenseManager","environment","eventSvc","gos","paginationAutoPageSizeSvc","apiFunctionSvc","gridApi","registry","agCompUtils","userCompFactory","rowContainerHeight","horizontalResizeSvc","localeSvc","pinnedRowModel","dragSvc","colGroupSvc","visibleCols","popupSvc","selectionSvc","colFilter","quickFilter","filterManager","colModel","headerNavigation","pageBounds","pagination","pageBoundsListener","stickyRowSvc","rowRenderer","expressionSvc","alignedGridsSvc","navigation","valueCache","valueSvc","autoWidthCalc","filterMenuFactory","dragAndDrop","focusSvc","cellNavigation","cellStyles","scrollVisibleSvc","sortSvc","colHover","colAnimation","autoColSvc","selectionColSvc","changeDetectionSvc","animationFrameSvc","undoRedo","colDefFactory","rowStyleSvc","rowNodeBlockLoader","rowNodeSorter","ctrlsSvc","pinnedCols","dataTypeSvc","syncSvc","overlays","stateSvc","expansionSvc","apiEventSvc","ariaAnnounce","menuSvc","colMoves","colAutosize","colFlex","colResize","pivotColsSvc","valueColsSvc","rowGroupColsSvc","funcColsSvc","colNames","colViewport","pivotResultCols","showRowGroupCols","validation"],QL=Object.fromEntries(sue.map((e,t)=>[e,t]));function iue(e,t){const n=(e.beanName?QL[e.beanName]:void 0)??Number.MAX_SAFE_INTEGER,r=(t.beanName?QL[t.beanName]:void 0)??Number.MAX_SAFE_INTEGER;return n-r}function oue(e,t){return(e==null?void 0:e.beanName)==="gridDestroySvc"?-1:0}var aue='
',lue='
',cue=``,SS=class extends He{constructor(t){super(),this.eCenterContainer=pe,this.headerRowComps={},this.rowCompsList=[],this.pinned=t}postConstruct(){this.selectAndSetTemplate();const t={setDisplayed:r=>this.setDisplayed(r),setCtrls:r=>this.setCtrls(r),setCenterWidth:r=>this.eCenterContainer.style.width=r,setViewportScrollLeft:r=>this.getGui().scrollLeft=r,setPinnedContainerWidth:r=>{const s=this.getGui();s.style.width=r,s.style.maxWidth=r,s.style.minWidth=r}};this.createManagedBean(new B2(this.pinned)).setComp(t,this.getGui())}selectAndSetTemplate(){const t=this.pinned=="left",n=this.pinned=="right",r=t?aue:n?lue:cue;this.setTemplate(r),this.eRowContainer=this.eCenterContainer!==pe?this.eCenterContainer:this.getGui()}destroy(){this.setCtrls([]),super.destroy()}destroyRowComp(t){this.destroyBean(t),this.eRowContainer.removeChild(t.getGui())}setCtrls(t){const n=this.headerRowComps;this.headerRowComps={},this.rowCompsList=[];let r;const s=i=>{const o=i.getGui();o.parentElement!=this.eRowContainer&&this.eRowContainer.appendChild(o),r&&oH(this.eRowContainer,o,r),r=o};t.forEach(i=>{const o=i.instanceId,a=n[o];delete n[o];const l=a||this.createBean(new Mce(i));this.headerRowComps[o]=l,this.rowCompsList.push(l),s(l)}),Object.values(n).forEach(i=>this.destroyRowComp(i))}},uue=class extends He{constructor(){super('