FishEye: Tag ee3613a26e17cdd6b85d1a74840a598abcf86bfc refers to a dead (removed) revision in file `reference/drawdb/assets/index-Q1c0BsHQ.js'. FishEye: No comparison available. Pass `N' to diff? Index: reference/drawdb/assets/index-jc5-B8m5.js =================================================================== diff -u --- reference/drawdb/assets/index-jc5-B8m5.js (revision 0) +++ reference/drawdb/assets/index-jc5-B8m5.js (revision ee3613a26e17cdd6b85d1a74840a598abcf86bfc) @@ -0,0 +1,697 @@ +function xEe(r,t){for(var s=0;so[i]})}}}return Object.freeze(Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))o(i);new MutationObserver(i=>{for(const a of i)if(a.type==="childList")for(const n of a.addedNodes)n.tagName==="LINK"&&n.rel==="modulepreload"&&o(n)}).observe(document,{childList:!0,subtree:!0});function s(i){const a={};return i.integrity&&(a.integrity=i.integrity),i.referrerPolicy&&(a.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?a.credentials="include":i.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function o(i){if(i.ep)return;i.ep=!0;const a=s(i);fetch(i.href,a)}})();var om=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ic(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}function zae(r){if(r.__esModule)return r;var t=r.default;if(typeof t=="function"){var s=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};s.prototype=t.prototype}else s={};return Object.defineProperty(s,"__esModule",{value:!0}),Object.keys(r).forEach(function(o){var i=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(s,o,i.get?i:{enumerable:!0,get:function(){return r[o]}})}),s}var Vae={exports:{}},s6={},Gae={exports:{}},UA={};/** + * @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 f4=Symbol.for("react.element"),_Ee=Symbol.for("react.portal"),TEe=Symbol.for("react.fragment"),NEe=Symbol.for("react.strict_mode"),IEe=Symbol.for("react.profiler"),OEe=Symbol.for("react.provider"),REe=Symbol.for("react.context"),BEe=Symbol.for("react.forward_ref"),kEe=Symbol.for("react.suspense"),PEe=Symbol.for("react.memo"),DEe=Symbol.for("react.lazy"),IY=Symbol.iterator;function FEe(r){return r===null||typeof r!="object"?null:(r=IY&&r[IY]||r["@@iterator"],typeof r=="function"?r:null)}var Wae={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qae=Object.assign,Yae={};function RT(r,t,s){this.props=r,this.context=t,this.refs=Yae,this.updater=s||Wae}RT.prototype.isReactComponent={};RT.prototype.setState=function(r,t){if(typeof r!="object"&&typeof r!="function"&&r!=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,r,t,"setState")};RT.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function Xae(){}Xae.prototype=RT.prototype;function _K(r,t,s){this.props=r,this.context=t,this.refs=Yae,this.updater=s||Wae}var TK=_K.prototype=new Xae;TK.constructor=_K;qae(TK,RT.prototype);TK.isPureReactComponent=!0;var OY=Array.isArray,Zae=Object.prototype.hasOwnProperty,NK={current:null},Jae={key:!0,ref:!0,__self:!0,__source:!0};function ele(r,t,s){var o,i={},a=null,n=null;if(t!=null)for(o in t.ref!==void 0&&(n=t.ref),t.key!==void 0&&(a=""+t.key),t)Zae.call(t,o)&&!Jae.hasOwnProperty(o)&&(i[o]=t[o]);var u=arguments.length-2;if(u===1)i.children=s;else if(1>>1,In=fr[ss];if(0>>1;ssi(Ir,br))Pri(Kr,Ir)?(fr[ss]=Kr,fr[Pr]=br,ss=Pr):(fr[ss]=Ir,fr[lr]=br,ss=lr);else if(Pri(Kr,br))fr[ss]=Kr,fr[Pr]=br,ss=Pr;else break e}}return _r}function i(fr,_r){var br=fr.sortIndex-_r.sortIndex;return br!==0?br:fr.id-_r.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;r.unstable_now=function(){return a.now()}}else{var n=Date,u=n.now();r.unstable_now=function(){return n.now()-u}}var f=[],e=[],y=1,_=null,T=3,D=!1,ce=!1,ge=!1,Ee=typeof setTimeout=="function"?setTimeout:null,_e=typeof clearTimeout=="function"?clearTimeout:null,Be=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function He(fr){for(var _r=s(e);_r!==null;){if(_r.callback===null)o(e);else if(_r.startTime<=fr)o(e),_r.sortIndex=_r.expirationTime,t(f,_r);else break;_r=s(e)}}function at(fr){if(ge=!1,He(fr),!ce)if(s(f)!==null)ce=!0,Cr(st);else{var _r=s(e);_r!==null&&Dr(at,_r.startTime-fr)}}function st(fr,_r){ce=!1,ge&&(ge=!1,_e(Kt),Kt=-1),D=!0;var br=T;try{for(He(_r),_=s(f);_!==null&&(!(_.expirationTime>_r)||fr&&!fn());){var ss=_.callback;if(typeof ss=="function"){_.callback=null,T=_.priorityLevel;var In=ss(_.expirationTime<=_r);_r=r.unstable_now(),typeof In=="function"?_.callback=In:_===s(f)&&o(f),He(_r)}else o(f);_=s(f)}if(_!==null)var dr=!0;else{var lr=s(e);lr!==null&&Dr(at,lr.startTime-_r),dr=!1}return dr}finally{_=null,T=br,D=!1}}var vt=!1,Ot=null,Kt=-1,sn=5,Bn=-1;function fn(){return!(r.unstable_now()-Bnfr||125ss?(fr.sortIndex=br,t(e,fr),s(f)===null&&fr===s(e)&&(ge?(_e(Kt),Kt=-1):ge=!0,Dr(at,br-ss))):(fr.sortIndex=In,t(f,fr),ce||D||(ce=!0,Cr(st))),fr},r.unstable_shouldYield=fn,r.unstable_wrapCallback=function(fr){var _r=T;return function(){var br=T;T=_r;try{return fr.apply(this,arguments)}finally{T=br}}}})(sle);rle.exports=sle;var qEe=rle.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 ole=Vt,cy=qEe;function qi(r){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+r,s=1;s"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),T$=Object.prototype.hasOwnProperty,YEe=/^[: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]*$/,BY={},kY={};function XEe(r){return T$.call(kY,r)?!0:T$.call(BY,r)?!1:YEe.test(r)?kY[r]=!0:(BY[r]=!0,!1)}function ZEe(r,t,s,o){if(s!==null&&s.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:s!==null?!s.acceptsBooleans:(r=r.toLowerCase().slice(0,5),r!=="data-"&&r!=="aria-");default:return!1}}function JEe(r,t,s,o){if(t===null||typeof t>"u"||ZEe(r,t,s,o))return!0;if(o)return!1;if(s!==null)switch(s.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function wv(r,t,s,o,i,a,n){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=i,this.mustUseProperty=s,this.propertyName=r,this.type=t,this.sanitizeURL=a,this.removeEmptyString=n}var pb={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(r){pb[r]=new wv(r,0,!1,r,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(r){var t=r[0];pb[t]=new wv(t,1,!1,r[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(r){pb[r]=new wv(r,2,!1,r.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(r){pb[r]=new wv(r,2,!1,r,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(r){pb[r]=new wv(r,3,!1,r.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(r){pb[r]=new wv(r,3,!0,r,null,!1,!1)});["capture","download"].forEach(function(r){pb[r]=new wv(r,4,!1,r,null,!1,!1)});["cols","rows","size","span"].forEach(function(r){pb[r]=new wv(r,6,!1,r,null,!1,!1)});["rowSpan","start"].forEach(function(r){pb[r]=new wv(r,5,!1,r.toLowerCase(),null,!1,!1)});var OK=/[\-:]([a-z])/g;function RK(r){return r[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(r){var t=r.replace(OK,RK);pb[t]=new wv(t,1,!1,r,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(r){var t=r.replace(OK,RK);pb[t]=new wv(t,1,!1,r,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(r){var t=r.replace(OK,RK);pb[t]=new wv(t,1,!1,r,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(r){pb[r]=new wv(r,1,!1,r.toLowerCase(),null,!1,!1)});pb.xlinkHref=new wv("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(r){pb[r]=new wv(r,1,!1,r.toLowerCase(),null,!0,!0)});function BK(r,t,s,o){var i=pb.hasOwnProperty(t)?pb[t]:null;(i!==null?i.type!==0:o||!(2u||i[n]!==a[u]){var f=` +`+i[n].replace(" at new "," at ");return r.displayName&&f.includes("")&&(f=f.replace("",r.displayName)),f}while(1<=n&&0<=u);break}}}finally{tM=!1,Error.prepareStackTrace=s}return(r=r?r.displayName||r.name:"")?wI(r):""}function eLe(r){switch(r.tag){case 5:return wI(r.type);case 16:return wI("Lazy");case 13:return wI("Suspense");case 19:return wI("SuspenseList");case 0:case 2:case 15:return r=nM(r.type,!1),r;case 11:return r=nM(r.type.render,!1),r;case 1:return r=nM(r.type,!0),r;default:return""}}function R$(r){if(r==null)return null;if(typeof r=="function")return r.displayName||r.name||null;if(typeof r=="string")return r;switch(r){case Ux:return"Fragment";case Mx:return"Portal";case N$:return"Profiler";case kK:return"StrictMode";case I$:return"Suspense";case O$:return"SuspenseList"}if(typeof r=="object")switch(r.$$typeof){case lle:return(r.displayName||"Context")+".Consumer";case ale:return(r._context.displayName||"Context")+".Provider";case PK:var t=r.render;return r=r.displayName,r||(r=t.displayName||t.name||"",r=r!==""?"ForwardRef("+r+")":"ForwardRef"),r;case DK:return t=r.displayName||null,t!==null?t:R$(r.type)||"Memo";case gE:t=r._payload,r=r._init;try{return R$(r(t))}catch{}}return null}function tLe(r){var t=r.type;switch(r.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return r=t.render,r=r.displayName||r.name||"",t.displayName||(r!==""?"ForwardRef("+r+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return R$(t);case 8:return t===kK?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function xL(r){switch(typeof r){case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function cle(r){var t=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nLe(r){var t=cle(r)?"checked":"value",s=Object.getOwnPropertyDescriptor(r.constructor.prototype,t),o=""+r[t];if(!r.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var i=s.get,a=s.set;return Object.defineProperty(r,t,{configurable:!0,get:function(){return i.call(this)},set:function(n){o=""+n,a.call(this,n)}}),Object.defineProperty(r,t,{enumerable:s.enumerable}),{getValue:function(){return o},setValue:function(n){o=""+n},stopTracking:function(){r._valueTracker=null,delete r[t]}}}}function ER(r){r._valueTracker||(r._valueTracker=nLe(r))}function fle(r){if(!r)return!1;var t=r._valueTracker;if(!t)return!0;var s=t.getValue(),o="";return r&&(o=cle(r)?r.checked?"true":"false":r.value),r=o,r!==s?(t.setValue(r),!0):!1}function Nk(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}function B$(r,t){var s=t.checked;return Pm({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??r._wrapperState.initialChecked})}function DY(r,t){var s=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;s=xL(t.value!=null?t.value:s),r._wrapperState={initialChecked:o,initialValue:s,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function dle(r,t){t=t.checked,t!=null&&BK(r,"checked",t,!1)}function k$(r,t){dle(r,t);var s=xL(t.value),o=t.type;if(s!=null)o==="number"?(s===0&&r.value===""||r.value!=s)&&(r.value=""+s):r.value!==""+s&&(r.value=""+s);else if(o==="submit"||o==="reset"){r.removeAttribute("value");return}t.hasOwnProperty("value")?P$(r,t.type,s):t.hasOwnProperty("defaultValue")&&P$(r,t.type,xL(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(r.defaultChecked=!!t.defaultChecked)}function FY(r,t,s){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+r._wrapperState.initialValue,s||t===r.value||(r.value=t),r.defaultValue=t}s=r.name,s!==""&&(r.name=""),r.defaultChecked=!!r._wrapperState.initialChecked,s!==""&&(r.name=s)}function P$(r,t,s){(t!=="number"||Nk(r.ownerDocument)!==r)&&(s==null?r.defaultValue=""+r._wrapperState.initialValue:r.defaultValue!==""+s&&(r.defaultValue=""+s))}var CI=Array.isArray;function A_(r,t,s,o){if(r=r.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=LR.firstChild;r.firstChild;)r.removeChild(r.firstChild);for(;t.firstChild;)r.appendChild(t.firstChild)}});function K5(r,t){if(t){var s=r.firstChild;if(s&&s===r.lastChild&&s.nodeType===3){s.nodeValue=t;return}}r.textContent=t}var VI={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},rLe=["Webkit","ms","Moz","O"];Object.keys(VI).forEach(function(r){rLe.forEach(function(t){t=t+r.charAt(0).toUpperCase()+r.substring(1),VI[t]=VI[r]})});function mle(r,t,s){return t==null||typeof t=="boolean"||t===""?"":s||typeof t!="number"||t===0||VI.hasOwnProperty(r)&&VI[r]?(""+t).trim():t+"px"}function gle(r,t){r=r.style;for(var s in t)if(t.hasOwnProperty(s)){var o=s.indexOf("--")===0,i=mle(s,t[s],o);s==="float"&&(s="cssFloat"),o?r.setProperty(s,i):r[s]=i}}var sLe=Pm({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 M$(r,t){if(t){if(sLe[r]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(qi(137,r));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(qi(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(qi(61))}if(t.style!=null&&typeof t.style!="object")throw Error(qi(62))}}function U$(r,t){if(r.indexOf("-")===-1)return typeof t.is=="string";switch(r){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 $$=null;function FK(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var j$=null,p_=null,m_=null;function $Y(r){if(r=A4(r)){if(typeof j$!="function")throw Error(qi(280));var t=r.stateNode;t&&(t=u6(t),j$(r.stateNode,r.type,t))}}function ble(r){p_?m_?m_.push(r):m_=[r]:p_=r}function vle(){if(p_){var r=p_,t=m_;if(m_=p_=null,$Y(r),t)for(r=0;r>>=0,r===0?32:31-(pLe(r)/mLe|0)|0}var SR=64,xR=4194304;function EI(r){switch(r&-r){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 r&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return r&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return r}}function Bk(r,t){var s=r.pendingLanes;if(s===0)return 0;var o=0,i=r.suspendedLanes,a=r.pingedLanes,n=s&268435455;if(n!==0){var u=n&~i;u!==0?o=EI(u):(a&=n,a!==0&&(o=EI(a)))}else n=s&~i,n!==0?o=EI(n):a!==0&&(o=EI(a));if(o===0)return 0;if(t!==0&&t!==o&&!(t&i)&&(i=o&-o,a=t&-t,i>=a||i===16&&(a&4194240)!==0))return t;if(o&4&&(o|=s&16),t=r.entangledLanes,t!==0)for(r=r.entanglements,t&=o;0s;s++)t.push(r);return t}function d4(r,t,s){r.pendingLanes|=t,t!==536870912&&(r.suspendedLanes=0,r.pingedLanes=0),r=r.eventTimes,t=31-L1(t),r[t]=s}function yLe(r,t){var s=r.pendingLanes&~t;r.pendingLanes=t,r.suspendedLanes=0,r.pingedLanes=0,r.expiredLanes&=t,r.mutableReadLanes&=t,r.entangledLanes&=t,t=r.entanglements;var o=r.eventTimes;for(r=r.expirationTimes;0=WI),qY=" ",YY=!1;function Ule(r,t){switch(r){case"keyup":return WLe.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $le(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var $x=!1;function YLe(r,t){switch(r){case"compositionend":return $le(t);case"keypress":return t.which!==32?null:(YY=!0,qY);case"textInput":return r=t.data,r===qY&&YY?null:r;default:return null}}function XLe(r,t){if($x)return r==="compositionend"||!zK&&Ule(r,t)?(r=Fle(),wB=HK=DE=null,$x=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:s,offset:t-r};r=o}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=eX(s)}}function Kle(r,t){return r&&t?r===t?!0:r&&r.nodeType===3?!1:t&&t.nodeType===3?Kle(r,t.parentNode):"contains"in r?r.contains(t):r.compareDocumentPosition?!!(r.compareDocumentPosition(t)&16):!1:!1}function zle(){for(var r=window,t=Nk();t instanceof r.HTMLIFrameElement;){try{var s=typeof t.contentWindow.location.href=="string"}catch{s=!1}if(s)r=t.contentWindow;else break;t=Nk(r.document)}return t}function VK(r){var t=r&&r.nodeName&&r.nodeName.toLowerCase();return t&&(t==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||t==="textarea"||r.contentEditable==="true")}function i2e(r){var t=zle(),s=r.focusedElem,o=r.selectionRange;if(t!==s&&s&&s.ownerDocument&&Kle(s.ownerDocument.documentElement,s)){if(o!==null&&VK(s)){if(t=o.start,r=o.end,r===void 0&&(r=t),"selectionStart"in s)s.selectionStart=t,s.selectionEnd=Math.min(r,s.value.length);else if(r=(t=s.ownerDocument||document)&&t.defaultView||window,r.getSelection){r=r.getSelection();var i=s.textContent.length,a=Math.min(o.start,i);o=o.end===void 0?a:Math.min(o.end,i),!r.extend&&a>o&&(i=o,o=a,a=i),i=tX(s,a);var n=tX(s,o);i&&n&&(r.rangeCount!==1||r.anchorNode!==i.node||r.anchorOffset!==i.offset||r.focusNode!==n.node||r.focusOffset!==n.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),r.removeAllRanges(),a>o?(r.addRange(t),r.extend(n.node,n.offset)):(t.setEnd(n.node,n.offset),r.addRange(t)))}}for(t=[],r=s;r=r.parentNode;)r.nodeType===1&&t.push({element:r,left:r.scrollLeft,top:r.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s=document.documentMode,jx=null,G$=null,YI=null,W$=!1;function nX(r,t,s){var o=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;W$||jx==null||jx!==Nk(o)||(o=jx,"selectionStart"in o&&VK(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),YI&&Y5(YI,o)||(YI=o,o=Dk(G$,"onSelect"),0Kx||(r.current=e9[Kx],e9[Kx]=null,Kx--)}function J0(r,t){Kx++,e9[Kx]=r.current,r.current=t}var _L={},Hb=ZL(_L),kv=ZL(!1),lS=_L;function J_(r,t){var s=r.type.contextTypes;if(!s)return _L;var o=r.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var i={},a;for(a in s)i[a]=t[a];return o&&(r=r.stateNode,r.__reactInternalMemoizedUnmaskedChildContext=t,r.__reactInternalMemoizedMaskedChildContext=i),i}function Pv(r){return r=r.childContextTypes,r!=null}function Mk(){lm(kv),lm(Hb)}function uX(r,t,s){if(Hb.current!==_L)throw Error(qi(168));J0(Hb,t),J0(kv,s)}function eue(r,t,s){var o=r.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return s;o=o.getChildContext();for(var i in o)if(!(i in t))throw Error(qi(108,tLe(r)||"Unknown",i));return Pm({},s,o)}function Uk(r){return r=(r=r.stateNode)&&r.__reactInternalMemoizedMergedChildContext||_L,lS=Hb.current,J0(Hb,r),J0(kv,kv.current),!0}function cX(r,t,s){var o=r.stateNode;if(!o)throw Error(qi(169));s?(r=eue(r,t,lS),o.__reactInternalMemoizedMergedChildContext=r,lm(kv),lm(Hb),J0(Hb,r)):lm(kv),J0(kv,s)}var uC=null,c6=!1,mM=!1;function tue(r){uC===null?uC=[r]:uC.push(r)}function b2e(r){c6=!0,tue(r)}function JL(){if(!mM&&uC!==null){mM=!0;var r=0,t=x0;try{var s=uC;for(x0=1;r>=n,i-=n,gC=1<<32-L1(t)+i|s<Kt?(sn=Ot,Ot=null):sn=Ot.sibling;var Bn=T(_e,Ot,He[Kt],at);if(Bn===null){Ot===null&&(Ot=sn);break}r&&Ot&&Bn.alternate===null&&t(_e,Ot),Be=a(Bn,Be,Kt),vt===null?st=Bn:vt.sibling=Bn,vt=Bn,Ot=sn}if(Kt===He.length)return s(_e,Ot),vm&&v2(_e,Kt),st;if(Ot===null){for(;KtKt?(sn=Ot,Ot=null):sn=Ot.sibling;var fn=T(_e,Ot,Bn.value,at);if(fn===null){Ot===null&&(Ot=sn);break}r&&Ot&&fn.alternate===null&&t(_e,Ot),Be=a(fn,Be,Kt),vt===null?st=fn:vt.sibling=fn,vt=fn,Ot=sn}if(Bn.done)return s(_e,Ot),vm&&v2(_e,Kt),st;if(Ot===null){for(;!Bn.done;Kt++,Bn=He.next())Bn=_(_e,Bn.value,at),Bn!==null&&(Be=a(Bn,Be,Kt),vt===null?st=Bn:vt.sibling=Bn,vt=Bn);return vm&&v2(_e,Kt),st}for(Ot=o(_e,Ot);!Bn.done;Kt++,Bn=He.next())Bn=D(Ot,_e,Kt,Bn.value,at),Bn!==null&&(r&&Bn.alternate!==null&&Ot.delete(Bn.key===null?Kt:Bn.key),Be=a(Bn,Be,Kt),vt===null?st=Bn:vt.sibling=Bn,vt=Bn);return r&&Ot.forEach(function(bn){return t(_e,bn)}),vm&&v2(_e,Kt),st}function Ee(_e,Be,He,at){if(typeof He=="object"&&He!==null&&He.type===Ux&&He.key===null&&(He=He.props.children),typeof He=="object"&&He!==null){switch(He.$$typeof){case CR:e:{for(var st=He.key,vt=Be;vt!==null;){if(vt.key===st){if(st=He.type,st===Ux){if(vt.tag===7){s(_e,vt.sibling),Be=i(vt,He.props.children),Be.return=_e,_e=Be;break e}}else if(vt.elementType===st||typeof st=="object"&&st!==null&&st.$$typeof===gE&&gX(st)===vt.type){s(_e,vt.sibling),Be=i(vt,He.props),Be.ref=DN(_e,vt,He),Be.return=_e,_e=Be;break e}s(_e,vt);break}else t(_e,vt);vt=vt.sibling}He.type===Ux?(Be=V2(He.props.children,_e.mode,at,He.key),Be.return=_e,_e=Be):(at=NB(He.type,He.key,He.props,null,_e.mode,at),at.ref=DN(_e,Be,He),at.return=_e,_e=at)}return n(_e);case Mx:e:{for(vt=He.key;Be!==null;){if(Be.key===vt)if(Be.tag===4&&Be.stateNode.containerInfo===He.containerInfo&&Be.stateNode.implementation===He.implementation){s(_e,Be.sibling),Be=i(Be,He.children||[]),Be.return=_e,_e=Be;break e}else{s(_e,Be);break}else t(_e,Be);Be=Be.sibling}Be=LM(He,_e.mode,at),Be.return=_e,_e=Be}return n(_e);case gE:return vt=He._init,Ee(_e,Be,vt(He._payload),at)}if(CI(He))return ce(_e,Be,He,at);if(ON(He))return ge(_e,Be,He,at);BR(_e,He)}return typeof He=="string"&&He!==""||typeof He=="number"?(He=""+He,Be!==null&&Be.tag===6?(s(_e,Be.sibling),Be=i(Be,He),Be.return=_e,_e=Be):(s(_e,Be),Be=EM(He,_e.mode,at),Be.return=_e,_e=Be),n(_e)):s(_e,Be)}return Ee}var tT=uue(!0),cue=uue(!1),p4={},vw=ZL(p4),eO=ZL(p4),tO=ZL(p4);function D2(r){if(r===p4)throw Error(qi(174));return r}function tz(r,t){switch(J0(tO,t),J0(eO,r),J0(vw,p4),r=t.nodeType,r){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:F$(null,"");break;default:r=r===8?t.parentNode:t,t=r.namespaceURI||null,r=r.tagName,t=F$(t,r)}lm(vw),J0(vw,t)}function nT(){lm(vw),lm(eO),lm(tO)}function fue(r){D2(tO.current);var t=D2(vw.current),s=F$(t,r.type);t!==s&&(J0(eO,r),J0(vw,s))}function nz(r){eO.current===r&&(lm(vw),lm(eO))}var _m=ZL(0);function zk(r){for(var t=r;t!==null;){if(t.tag===13){var s=t.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===r)break;for(;t.sibling===null;){if(t.return===null||t.return===r)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var gM=[];function rz(){for(var r=0;rs?s:4,r(!0);var o=bM.transition;bM.transition={};try{r(!1),t()}finally{x0=s,bM.transition=o}}function _ue(){return Jy().memoizedState}function C2e(r,t,s){var o=cL(r);if(s={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null},Tue(r))Nue(t,s);else if(s=oue(r,t,s,o),s!==null){var i=mv();S1(s,r,o,i),Iue(s,t,o)}}function E2e(r,t,s){var o=cL(r),i={lane:o,action:s,hasEagerState:!1,eagerState:null,next:null};if(Tue(r))Nue(t,i);else{var a=r.alternate;if(r.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var n=t.lastRenderedState,u=a(n,s);if(i.hasEagerState=!0,i.eagerState=u,_1(u,n)){var f=t.interleaved;f===null?(i.next=i,JK(t)):(i.next=f.next,f.next=i),t.interleaved=i;return}}catch{}finally{}s=oue(r,t,i,o),s!==null&&(i=mv(),S1(s,r,o,i),Iue(s,t,o))}}function Tue(r){var t=r.alternate;return r===Rm||t!==null&&t===Rm}function Nue(r,t){XI=Vk=!0;var s=r.pending;s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t}function Iue(r,t,s){if(s&4194240){var o=t.lanes;o&=r.pendingLanes,s|=o,t.lanes=s,UK(r,s)}}var Gk={readContext:Zy,useCallback:yb,useContext:yb,useEffect:yb,useImperativeHandle:yb,useInsertionEffect:yb,useLayoutEffect:yb,useMemo:yb,useReducer:yb,useRef:yb,useState:yb,useDebugValue:yb,useDeferredValue:yb,useTransition:yb,useMutableSource:yb,useSyncExternalStore:yb,useId:yb,unstable_isNewReconciler:!1},L2e={readContext:Zy,useCallback:function(r,t){return Z1().memoizedState=[r,t===void 0?null:t],r},useContext:Zy,useEffect:vX,useImperativeHandle:function(r,t,s){return s=s!=null?s.concat([r]):null,SB(4194308,4,Cue.bind(null,t,r),s)},useLayoutEffect:function(r,t){return SB(4194308,4,r,t)},useInsertionEffect:function(r,t){return SB(4,2,r,t)},useMemo:function(r,t){var s=Z1();return t=t===void 0?null:t,r=r(),s.memoizedState=[r,t],r},useReducer:function(r,t,s){var o=Z1();return t=s!==void 0?s(t):t,o.memoizedState=o.baseState=t,r={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:t},o.queue=r,r=r.dispatch=C2e.bind(null,Rm,r),[o.memoizedState,r]},useRef:function(r){var t=Z1();return r={current:r},t.memoizedState=r},useState:bX,useDebugValue:lz,useDeferredValue:function(r){return Z1().memoizedState=r},useTransition:function(){var r=bX(!1),t=r[0];return r=w2e.bind(null,r[1]),Z1().memoizedState=r,[t,r]},useMutableSource:function(){},useSyncExternalStore:function(r,t,s){var o=Rm,i=Z1();if(vm){if(s===void 0)throw Error(qi(407));s=s()}else{if(s=t(),Gg===null)throw Error(qi(349));cS&30||Aue(o,t,s)}i.memoizedState=s;var a={value:s,getSnapshot:t};return i.queue=a,vX(mue.bind(null,o,a,r),[r]),o.flags|=2048,sO(9,pue.bind(null,o,a,s,t),void 0,null),s},useId:function(){var r=Z1(),t=Gg.identifierPrefix;if(vm){var s=bC,o=gC;s=(o&~(1<<32-L1(o)-1)).toString(32)+s,t=":"+t+"R"+s,s=nO++,0<\/script>",r=r.removeChild(r.firstChild)):typeof o.is=="string"?r=n.createElement(s,{is:o.is}):(r=n.createElement(s),s==="select"&&(n=r,o.multiple?n.multiple=!0:o.size&&(n.size=o.size))):r=n.createElementNS(r,s),r[rw]=t,r[J5]=o,Uue(r,t,!1,!1),t.stateNode=r;e:{switch(n=U$(s,o),s){case"dialog":nm("cancel",r),nm("close",r),i=o;break;case"iframe":case"object":case"embed":nm("load",r),i=o;break;case"video":case"audio":for(i=0;isT&&(t.flags|=128,o=!0,FN(a,!1),t.lanes=4194304)}else{if(!o)if(r=zk(n),r!==null){if(t.flags|=128,o=!0,s=r.updateQueue,s!==null&&(t.updateQueue=s,t.flags|=4),FN(a,!0),a.tail===null&&a.tailMode==="hidden"&&!n.alternate&&!vm)return wb(t),null}else 2*eg()-a.renderingStartTime>sT&&s!==1073741824&&(t.flags|=128,o=!0,FN(a,!1),t.lanes=4194304);a.isBackwards?(n.sibling=t.child,t.child=n):(s=a.last,s!==null?s.sibling=n:t.child=n,a.last=n)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=eg(),t.sibling=null,s=_m.current,J0(_m,o?s&1|2:s&1),t):(wb(t),null);case 22:case 23:return Az(),o=t.memoizedState!==null,r!==null&&r.memoizedState!==null!==o&&(t.flags|=8192),o&&t.mode&1?Jv&1073741824&&(wb(t),t.subtreeFlags&6&&(t.flags|=8192)):wb(t),null;case 24:return null;case 25:return null}throw Error(qi(156,t.tag))}function R2e(r,t){switch(WK(t),t.tag){case 1:return Pv(t.type)&&Mk(),r=t.flags,r&65536?(t.flags=r&-65537|128,t):null;case 3:return nT(),lm(kv),lm(Hb),rz(),r=t.flags,r&65536&&!(r&128)?(t.flags=r&-65537|128,t):null;case 5:return nz(t),null;case 13:if(lm(_m),r=t.memoizedState,r!==null&&r.dehydrated!==null){if(t.alternate===null)throw Error(qi(340));eT()}return r=t.flags,r&65536?(t.flags=r&-65537|128,t):null;case 19:return lm(_m),null;case 4:return nT(),null;case 10:return ZK(t.type._context),null;case 22:case 23:return Az(),null;case 24:return null;default:return null}}var PR=!1,Pb=!1,B2e=typeof WeakSet=="function"?WeakSet:Set,Sl=null;function Wx(r,t){var s=r.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(o){Um(r,t,o)}else s.current=null}function d9(r,t,s){try{s()}catch(o){Um(r,t,o)}}var TX=!1;function k2e(r,t){if(q$=kk,r=zle(),VK(r)){if("selectionStart"in r)var s={start:r.selectionStart,end:r.selectionEnd};else e:{s=(s=r.ownerDocument)&&s.defaultView||window;var o=s.getSelection&&s.getSelection();if(o&&o.rangeCount!==0){s=o.anchorNode;var i=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{s.nodeType,a.nodeType}catch{s=null;break e}var n=0,u=-1,f=-1,e=0,y=0,_=r,T=null;t:for(;;){for(var D;_!==s||i!==0&&_.nodeType!==3||(u=n+i),_!==a||o!==0&&_.nodeType!==3||(f=n+o),_.nodeType===3&&(n+=_.nodeValue.length),(D=_.firstChild)!==null;)T=_,_=D;for(;;){if(_===r)break t;if(T===s&&++e===i&&(u=n),T===a&&++y===o&&(f=n),(D=_.nextSibling)!==null)break;_=T,T=_.parentNode}_=D}s=u===-1||f===-1?null:{start:u,end:f}}else s=null}s=s||{start:0,end:0}}else s=null;for(Y$={focusedElem:r,selectionRange:s},kk=!1,Sl=t;Sl!==null;)if(t=Sl,r=t.child,(t.subtreeFlags&1028)!==0&&r!==null)r.return=t,Sl=r;else for(;Sl!==null;){t=Sl;try{var ce=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(ce!==null){var ge=ce.memoizedProps,Ee=ce.memoizedState,_e=t.stateNode,Be=_e.getSnapshotBeforeUpdate(t.elementType===t.type?ge:v1(t.type,ge),Ee);_e.__reactInternalSnapshotBeforeUpdate=Be}break;case 3:var He=t.stateNode.containerInfo;He.nodeType===1?He.textContent="":He.nodeType===9&&He.documentElement&&He.removeChild(He.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(qi(163))}}catch(at){Um(t,t.return,at)}if(r=t.sibling,r!==null){r.return=t.return,Sl=r;break}Sl=t.return}return ce=TX,TX=!1,ce}function ZI(r,t,s){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var i=o=o.next;do{if((i.tag&r)===r){var a=i.destroy;i.destroy=void 0,a!==void 0&&d9(t,s,a)}i=i.next}while(i!==o)}}function h6(r,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var s=t=t.next;do{if((s.tag&r)===r){var o=s.create;s.destroy=o()}s=s.next}while(s!==t)}}function h9(r){var t=r.ref;if(t!==null){var s=r.stateNode;switch(r.tag){case 5:r=s;break;default:r=s}typeof t=="function"?t(r):t.current=r}}function Hue(r){var t=r.alternate;t!==null&&(r.alternate=null,Hue(t)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(t=r.stateNode,t!==null&&(delete t[rw],delete t[J5],delete t[J$],delete t[m2e],delete t[g2e])),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}function Que(r){return r.tag===5||r.tag===3||r.tag===4}function NX(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Que(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function A9(r,t,s){var o=r.tag;if(o===5||o===6)r=r.stateNode,t?s.nodeType===8?s.parentNode.insertBefore(r,t):s.insertBefore(r,t):(s.nodeType===8?(t=s.parentNode,t.insertBefore(r,s)):(t=s,t.appendChild(r)),s=s._reactRootContainer,s!=null||t.onclick!==null||(t.onclick=Fk));else if(o!==4&&(r=r.child,r!==null))for(A9(r,t,s),r=r.sibling;r!==null;)A9(r,t,s),r=r.sibling}function p9(r,t,s){var o=r.tag;if(o===5||o===6)r=r.stateNode,t?s.insertBefore(r,t):s.appendChild(r);else if(o!==4&&(r=r.child,r!==null))for(p9(r,t,s),r=r.sibling;r!==null;)p9(r,t,s),r=r.sibling}var tb=null,y1=!1;function eE(r,t,s){for(s=s.child;s!==null;)Kue(r,t,s),s=s.sibling}function Kue(r,t,s){if(bw&&typeof bw.onCommitFiberUnmount=="function")try{bw.onCommitFiberUnmount(o6,s)}catch{}switch(s.tag){case 5:Pb||Wx(s,t);case 6:var o=tb,i=y1;tb=null,eE(r,t,s),tb=o,y1=i,tb!==null&&(y1?(r=tb,s=s.stateNode,r.nodeType===8?r.parentNode.removeChild(s):r.removeChild(s)):tb.removeChild(s.stateNode));break;case 18:tb!==null&&(y1?(r=tb,s=s.stateNode,r.nodeType===8?pM(r.parentNode,s):r.nodeType===1&&pM(r,s),W5(r)):pM(tb,s.stateNode));break;case 4:o=tb,i=y1,tb=s.stateNode.containerInfo,y1=!0,eE(r,t,s),tb=o,y1=i;break;case 0:case 11:case 14:case 15:if(!Pb&&(o=s.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){i=o=o.next;do{var a=i,n=a.destroy;a=a.tag,n!==void 0&&(a&2||a&4)&&d9(s,t,n),i=i.next}while(i!==o)}eE(r,t,s);break;case 1:if(!Pb&&(Wx(s,t),o=s.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=s.memoizedProps,o.state=s.memoizedState,o.componentWillUnmount()}catch(u){Um(s,t,u)}eE(r,t,s);break;case 21:eE(r,t,s);break;case 22:s.mode&1?(Pb=(o=Pb)||s.memoizedState!==null,eE(r,t,s),Pb=o):eE(r,t,s);break;default:eE(r,t,s)}}function IX(r){var t=r.updateQueue;if(t!==null){r.updateQueue=null;var s=r.stateNode;s===null&&(s=r.stateNode=new B2e),t.forEach(function(o){var i=Q2e.bind(null,r,o);s.has(o)||(s.add(o),o.then(i,i))})}}function l1(r,t){var s=t.deletions;if(s!==null)for(var o=0;oi&&(i=n),o&=~a}if(o=i,o=eg()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*D2e(o/1960))-o,10r?16:r,FE===null)var o=!1;else{if(r=FE,FE=null,Yk=0,$p&6)throw Error(qi(331));var i=$p;for($p|=4,Sl=r.current;Sl!==null;){var a=Sl,n=a.child;if(Sl.flags&16){var u=a.deletions;if(u!==null){for(var f=0;feg()-dz?z2(r,0):fz|=s),Dv(r,t)}function Zue(r,t){t===0&&(r.mode&1?(t=xR,xR<<=1,!(xR&130023424)&&(xR=4194304)):t=1);var s=mv();r=DC(r,t),r!==null&&(d4(r,t,s),Dv(r,s))}function H2e(r){var t=r.memoizedState,s=0;t!==null&&(s=t.retryLane),Zue(r,s)}function Q2e(r,t){var s=0;switch(r.tag){case 13:var o=r.stateNode,i=r.memoizedState;i!==null&&(s=i.retryLane);break;case 19:o=r.stateNode;break;default:throw Error(qi(314))}o!==null&&o.delete(t),Zue(r,s)}var Jue;Jue=function(r,t,s){if(r!==null)if(r.memoizedProps!==t.pendingProps||kv.current)Ov=!0;else{if(!(r.lanes&s)&&!(t.flags&128))return Ov=!1,I2e(r,t,s);Ov=!!(r.flags&131072)}else Ov=!1,vm&&t.flags&1048576&&nue(t,jk,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;xB(r,t),r=t.pendingProps;var i=J_(t,Hb.current);b_(t,s),i=oz(null,t,o,r,i,s);var a=iz();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Pv(o)?(a=!0,Uk(t)):a=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,ez(t),i.updater=f6,t.stateNode=i,i._reactInternals=t,o9(t,o,r,s),t=l9(null,t,o,!0,a,s)):(t.tag=0,vm&&a&&GK(t),Zb(null,t,i,s),t=t.child),t;case 16:o=t.elementType;e:{switch(xB(r,t),r=t.pendingProps,i=o._init,o=i(o._payload),t.type=o,i=t.tag=z2e(o),r=v1(o,r),i){case 0:t=a9(null,t,o,r,s);break e;case 1:t=SX(null,t,o,r,s);break e;case 11:t=EX(null,t,o,r,s);break e;case 14:t=LX(null,t,o,v1(o.type,r),s);break e}throw Error(qi(306,o,""))}return t;case 0:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:v1(o,i),a9(r,t,o,i,s);case 1:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:v1(o,i),SX(r,t,o,i,s);case 3:e:{if(Due(t),r===null)throw Error(qi(387));o=t.pendingProps,a=t.memoizedState,i=a.element,iue(r,t),Kk(t,o,null,s);var n=t.memoizedState;if(o=n.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:n.cache,pendingSuspenseBoundaries:n.pendingSuspenseBoundaries,transitions:n.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){i=rT(Error(qi(423)),t),t=xX(r,t,o,s,i);break e}else if(o!==i){i=rT(Error(qi(424)),t),t=xX(r,t,o,s,i);break e}else for(ny=aL(t.stateNode.containerInfo.firstChild),oy=t,vm=!0,w1=null,s=cue(t,null,o,s),t.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(eT(),o===i){t=FC(r,t,s);break e}Zb(r,t,o,s)}t=t.child}return t;case 5:return fue(t),r===null&&n9(t),o=t.type,i=t.pendingProps,a=r!==null?r.memoizedProps:null,n=i.children,X$(o,i)?n=null:a!==null&&X$(o,a)&&(t.flags|=32),Pue(r,t),Zb(r,t,n,s),t.child;case 6:return r===null&&n9(t),null;case 13:return Fue(r,t,s);case 4:return tz(t,t.stateNode.containerInfo),o=t.pendingProps,r===null?t.child=tT(t,null,o,s):Zb(r,t,o,s),t.child;case 11:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:v1(o,i),EX(r,t,o,i,s);case 7:return Zb(r,t,t.pendingProps,s),t.child;case 8:return Zb(r,t,t.pendingProps.children,s),t.child;case 12:return Zb(r,t,t.pendingProps.children,s),t.child;case 10:e:{if(o=t.type._context,i=t.pendingProps,a=t.memoizedProps,n=i.value,J0(Hk,o._currentValue),o._currentValue=n,a!==null)if(_1(a.value,n)){if(a.children===i.children&&!kv.current){t=FC(r,t,s);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var u=a.dependencies;if(u!==null){n=a.child;for(var f=u.firstContext;f!==null;){if(f.context===o){if(a.tag===1){f=CC(-1,s&-s),f.tag=2;var e=a.updateQueue;if(e!==null){e=e.shared;var y=e.pending;y===null?f.next=f:(f.next=y.next,y.next=f),e.pending=f}}a.lanes|=s,f=a.alternate,f!==null&&(f.lanes|=s),r9(a.return,s,t),u.lanes|=s;break}f=f.next}}else if(a.tag===10)n=a.type===t.type?null:a.child;else if(a.tag===18){if(n=a.return,n===null)throw Error(qi(341));n.lanes|=s,u=n.alternate,u!==null&&(u.lanes|=s),r9(n,s,t),n=a.sibling}else n=a.child;if(n!==null)n.return=a;else for(n=a;n!==null;){if(n===t){n=null;break}if(a=n.sibling,a!==null){a.return=n.return,n=a;break}n=n.return}a=n}Zb(r,t,i.children,s),t=t.child}return t;case 9:return i=t.type,o=t.pendingProps.children,b_(t,s),i=Zy(i),o=o(i),t.flags|=1,Zb(r,t,o,s),t.child;case 14:return o=t.type,i=v1(o,t.pendingProps),i=v1(o.type,i),LX(r,t,o,i,s);case 15:return Bue(r,t,t.type,t.pendingProps,s);case 17:return o=t.type,i=t.pendingProps,i=t.elementType===o?i:v1(o,i),xB(r,t),t.tag=1,Pv(o)?(r=!0,Uk(t)):r=!1,b_(t,s),lue(t,o,i),o9(t,o,i,s),l9(null,t,o,!0,r,s);case 19:return Mue(r,t,s);case 22:return kue(r,t,s)}throw Error(qi(156,t.tag))};function ece(r,t){return xle(r,t)}function K2e(r,t,s,o){this.tag=r,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function My(r,t,s,o){return new K2e(r,t,s,o)}function mz(r){return r=r.prototype,!(!r||!r.isReactComponent)}function z2e(r){if(typeof r=="function")return mz(r)?1:0;if(r!=null){if(r=r.$$typeof,r===PK)return 11;if(r===DK)return 14}return 2}function fL(r,t){var s=r.alternate;return s===null?(s=My(r.tag,t,r.key,r.mode),s.elementType=r.elementType,s.type=r.type,s.stateNode=r.stateNode,s.alternate=r,r.alternate=s):(s.pendingProps=t,s.type=r.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=r.flags&14680064,s.childLanes=r.childLanes,s.lanes=r.lanes,s.child=r.child,s.memoizedProps=r.memoizedProps,s.memoizedState=r.memoizedState,s.updateQueue=r.updateQueue,t=r.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},s.sibling=r.sibling,s.index=r.index,s.ref=r.ref,s}function NB(r,t,s,o,i,a){var n=2;if(o=r,typeof r=="function")mz(r)&&(n=1);else if(typeof r=="string")n=5;else e:switch(r){case Ux:return V2(s.children,i,a,t);case kK:n=8,i|=8;break;case N$:return r=My(12,s,t,i|2),r.elementType=N$,r.lanes=a,r;case I$:return r=My(13,s,t,i),r.elementType=I$,r.lanes=a,r;case O$:return r=My(19,s,t,i),r.elementType=O$,r.lanes=a,r;case ule:return p6(s,i,a,t);default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case ale:n=10;break e;case lle:n=9;break e;case PK:n=11;break e;case DK:n=14;break e;case gE:n=16,o=null;break e}throw Error(qi(130,r==null?r:typeof r,""))}return t=My(n,s,t,i),t.elementType=r,t.type=o,t.lanes=a,t}function V2(r,t,s,o){return r=My(7,r,o,t),r.lanes=s,r}function p6(r,t,s,o){return r=My(22,r,o,t),r.elementType=ule,r.lanes=s,r.stateNode={isHidden:!1},r}function EM(r,t,s){return r=My(6,r,null,t),r.lanes=s,r}function LM(r,t,s){return t=My(4,r.children!==null?r.children:[],r.key,t),t.lanes=s,t.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},t}function V2e(r,t,s,o,i){this.tag=t,this.containerInfo=r,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=sM(0),this.expirationTimes=sM(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sM(0),this.identifierPrefix=o,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gz(r,t,s,o,i,a,n,u,f){return r=new V2e(r,t,s,u,f),t===1?(t=1,a===!0&&(t|=8)):t=0,a=My(3,null,null,t),r.current=a,a.stateNode=r,a.memoizedState={element:o,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},ez(a),r}function G2e(r,t,s){var o=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(sce)}catch(r){console.error(r)}}sce(),nle.exports=py;var av=nle.exports;const zy=ic(av);var MX=av;_$.createRoot=MX.createRoot,_$.hydrateRoot=MX.hydrateRoot;function Z2e(){}var oce=Z2e;const so=ic(oce);var J2e=Array.isArray,Xg=J2e;const wz=ic(Xg);var eSe=typeof om=="object"&&om&&om.Object===Object&&om,ice=eSe,tSe=ice,nSe=typeof self=="object"&&self&&self.Object===Object&&self,rSe=tSe||nSe||Function("return this")(),k1=rSe,sSe=k1,oSe=sSe.Symbol,PT=oSe,UX=PT,ace=Object.prototype,iSe=ace.hasOwnProperty,aSe=ace.toString,UN=UX?UX.toStringTag:void 0;function lSe(r){var t=iSe.call(r,UN),s=r[UN];try{r[UN]=void 0;var o=!0}catch{}var i=aSe.call(r);return o&&(t?r[UN]=s:delete r[UN]),i}var uSe=lSe,cSe=Object.prototype,fSe=cSe.toString;function dSe(r){return fSe.call(r)}var hSe=dSe,$X=PT,ASe=uSe,pSe=hSe,mSe="[object Null]",gSe="[object Undefined]",jX=$X?$X.toStringTag:void 0;function bSe(r){return r==null?r===void 0?gSe:mSe:jX&&jX in Object(r)?ASe(r):pSe(r)}var Tw=bSe;function vSe(r){return r!=null&&typeof r=="object"}var gy=vSe,ySe=Tw,wSe=gy,CSe="[object Symbol]";function ESe(r){return typeof r=="symbol"||wSe(r)&&ySe(r)==CSe}var m4=ESe,LSe=Xg,SSe=m4,xSe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,_Se=/^\w*$/;function TSe(r,t){if(LSe(r))return!1;var s=typeof r;return s=="number"||s=="symbol"||s=="boolean"||r==null||SSe(r)?!0:_Se.test(r)||!xSe.test(r)||t!=null&&r in Object(t)}var Cz=TSe;function NSe(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var jv=NSe;const ev=ic(jv);var ISe=Tw,OSe=jv,RSe="[object AsyncFunction]",BSe="[object Function]",kSe="[object GeneratorFunction]",PSe="[object Proxy]";function DSe(r){if(!OSe(r))return!1;var t=ISe(r);return t==BSe||t==kSe||t==RSe||t==PSe}var y6=DSe;const Mc=ic(y6);var FSe=k1,MSe=FSe["__core-js_shared__"],USe=MSe,SM=USe,HX=function(){var r=/[^.]+$/.exec(SM&&SM.keys&&SM.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function $Se(r){return!!HX&&HX in r}var jSe=$Se,HSe=Function.prototype,QSe=HSe.toString;function KSe(r){if(r!=null){try{return QSe.call(r)}catch{}try{return r+""}catch{}}return""}var lce=KSe,zSe=y6,VSe=jSe,GSe=jv,WSe=lce,qSe=/[\\^$.*+?()[\]{}|]/g,YSe=/^\[object .+?Constructor\]$/,XSe=Function.prototype,ZSe=Object.prototype,JSe=XSe.toString,exe=ZSe.hasOwnProperty,txe=RegExp("^"+JSe.call(exe).replace(qSe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nxe(r){if(!GSe(r)||VSe(r))return!1;var t=zSe(r)?txe:YSe;return t.test(WSe(r))}var rxe=nxe;function sxe(r,t){return r==null?void 0:r[t]}var oxe=sxe,ixe=rxe,axe=oxe;function lxe(r,t){var s=axe(r,t);return ixe(s)?s:void 0}var BS=lxe,uxe=BS,cxe=uxe(Object,"create"),w6=cxe,QX=w6;function fxe(){this.__data__=QX?QX(null):{},this.size=0}var dxe=fxe;function hxe(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Axe=hxe,pxe=w6,mxe="__lodash_hash_undefined__",gxe=Object.prototype,bxe=gxe.hasOwnProperty;function vxe(r){var t=this.__data__;if(pxe){var s=t[r];return s===mxe?void 0:s}return bxe.call(t,r)?t[r]:void 0}var yxe=vxe,wxe=w6,Cxe=Object.prototype,Exe=Cxe.hasOwnProperty;function Lxe(r){var t=this.__data__;return wxe?t[r]!==void 0:Exe.call(t,r)}var Sxe=Lxe,xxe=w6,_xe="__lodash_hash_undefined__";function Txe(r,t){var s=this.__data__;return this.size+=this.has(r)?0:1,s[r]=xxe&&t===void 0?_xe:t,this}var Nxe=Txe,Ixe=dxe,Oxe=Axe,Rxe=yxe,Bxe=Sxe,kxe=Nxe;function DT(r){var t=-1,s=r==null?0:r.length;for(this.clear();++t-1}var Xxe=Yxe,Zxe=C6;function Jxe(r,t){var s=this.__data__,o=Zxe(s,r);return o<0?(++this.size,s.push([r,t])):s[o][1]=t,this}var e_e=Jxe,t_e=Fxe,n_e=zxe,r_e=Wxe,s_e=Xxe,o_e=e_e;function FT(r){var t=-1,s=r==null?0:r.length;for(this.clear();++t1?t-1:0),o=1;o0&&arguments[0]!==void 0?arguments[0]:"value";const s=this.getProps();return t in s}_isInProps(t){const s=this.getProps();return t in s}init(t){}destroy(){}log(t){for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;i(s.substr(0,5)==="data-"&&(t[s]=r[s]),t),{})}const{hasOwnProperty:dTe}=Object.prototype;class Uc extends Vt.Component{constructor(t){super(t),this.isControlled=s=>!!(s&&this.props&&typeof this.props=="object"&&dTe.call(this.props,s)),this.cache={},this.foundation=null}componentDidMount(){this.foundation&&typeof this.foundation.init=="function"&&this.foundation.init()}componentWillUnmount(){this.foundation&&typeof this.foundation.destroy=="function"&&this.foundation.destroy(),this.cache={}}get adapter(){return{getContext:t=>{if(this.context&&t)return this.context[t]},getContexts:()=>this.context,getProp:t=>this.props[t],getProps:()=>this.props,getState:t=>this.state[t],getStates:()=>this.state,setState:(t,s)=>this.setState(Object.assign({},t),s),getCache:t=>t&&this.cache[t],getCaches:()=>this.cache,setCache:(t,s)=>t&&(this.cache[t]=s),stopPropagation:t=>{try{t.stopPropagation(),t.nativeEvent&&t.nativeEvent.stopImmediatePropagation()}catch{}},persistEvent:t=>{t&&t.persist&&typeof t.persist=="function"&&t.persist()}}}log(t){for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;i=t||Ot<0||_&&Kt>=a}function _e(){var vt=xM();if(Ee(vt))return Be(vt);u=setTimeout(_e,ge(vt))}function Be(vt){return u=void 0,T&&o?D(vt):(o=i=void 0,n)}function He(){u!==void 0&&clearTimeout(u),e=0,o=f=i=u=void 0}function at(){return u===void 0?n:Be(xM())}function st(){var vt=xM(),Ot=Ee(vt);if(o=arguments,i=this,f=vt,Ot){if(u===void 0)return ce(f);if(_)return clearTimeout(u),u=setTimeout(_e,t),D(f)}return u===void 0&&(u=setTimeout(_e,t)),n}return st.cancel=He,st.flush=at,st}var Ace=kTe;const pce=ic(Ace);var PTe=Ace,DTe=jv,FTe="Expected a function";function MTe(r,t,s){var o=!0,i=!0;if(typeof r!="function")throw new TypeError(FTe);return DTe(s)&&(o="leading"in s?!!s.leading:o,i="trailing"in s?!!s.trailing:i),PTe(r,t,{leading:o,maxWait:t,trailing:i})}var UTe=MTe;const iO=ic(UTe);var mce={exports:{}};/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/(function(r){(function(){var t={}.hasOwnProperty;function s(){for(var a="",n=0;n-1&&r%1==0&&r<=sIe}var Pz=oIe,iIe=y6,aIe=Pz;function lIe(r){return r!=null&&aIe(r.length)&&!iIe(r)}var Nw=lIe,uIe=Nw,cIe=gy;function fIe(r){return cIe(r)&&uIe(r)}var Dz=fIe,eP={exports:{}};function dIe(){return!1}var hIe=dIe;eP.exports;(function(r,t){var s=k1,o=hIe,i=t&&!t.nodeType&&t,a=i&&!0&&r&&!r.nodeType&&r,n=a&&a.exports===i,u=n?s.Buffer:void 0,f=u?u.isBuffer:void 0,e=f||o;r.exports=e})(eP,eP.exports);var y4=eP.exports,AIe=Tw,pIe=kz,mIe=gy,gIe="[object Object]",bIe=Function.prototype,vIe=Object.prototype,Ice=bIe.toString,yIe=vIe.hasOwnProperty,wIe=Ice.call(Object);function CIe(r){if(!mIe(r)||AIe(r)!=gIe)return!1;var t=pIe(r);if(t===null)return!0;var s=yIe.call(t,"constructor")&&t.constructor;return typeof s=="function"&&s instanceof s&&Ice.call(s)==wIe}var Fz=CIe;const Oce=ic(Fz);var EIe=Tw,LIe=Pz,SIe=gy,xIe="[object Arguments]",_Ie="[object Array]",TIe="[object Boolean]",NIe="[object Date]",IIe="[object Error]",OIe="[object Function]",RIe="[object Map]",BIe="[object Number]",kIe="[object Object]",PIe="[object RegExp]",DIe="[object Set]",FIe="[object String]",MIe="[object WeakMap]",UIe="[object ArrayBuffer]",$Ie="[object DataView]",jIe="[object Float32Array]",HIe="[object Float64Array]",QIe="[object Int8Array]",KIe="[object Int16Array]",zIe="[object Int32Array]",VIe="[object Uint8Array]",GIe="[object Uint8ClampedArray]",WIe="[object Uint16Array]",qIe="[object Uint32Array]",rm={};rm[jIe]=rm[HIe]=rm[QIe]=rm[KIe]=rm[zIe]=rm[VIe]=rm[GIe]=rm[WIe]=rm[qIe]=!0;rm[xIe]=rm[_Ie]=rm[UIe]=rm[TIe]=rm[$Ie]=rm[NIe]=rm[IIe]=rm[OIe]=rm[RIe]=rm[BIe]=rm[kIe]=rm[PIe]=rm[DIe]=rm[FIe]=rm[MIe]=!1;function YIe(r){return SIe(r)&&LIe(r.length)&&!!rm[EIe(r)]}var XIe=YIe;function ZIe(r){return function(t){return r(t)}}var QT=ZIe,tP={exports:{}};tP.exports;(function(r,t){var s=ice,o=t&&!t.nodeType&&t,i=o&&!0&&r&&!r.nodeType&&r,a=i&&i.exports===o,n=a&&s.process,u=function(){try{var f=i&&i.require&&i.require("util").types;return f||n&&n.binding&&n.binding("util")}catch{}}();r.exports=u})(tP,tP.exports);var I6=tP.exports,JIe=XIe,e5e=QT,tZ=I6,nZ=tZ&&tZ.isTypedArray,t5e=nZ?e5e(nZ):JIe,O6=t5e;function n5e(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var Rce=n5e,r5e=Oz,s5e=g4,o5e=Object.prototype,i5e=o5e.hasOwnProperty;function a5e(r,t,s){var o=r[t];(!(i5e.call(r,t)&&s5e(o,s))||s===void 0&&!(t in r))&&r5e(r,t,s)}var Mz=a5e,l5e=Mz,u5e=Oz;function c5e(r,t,s,o){var i=!s;s||(s={});for(var a=-1,n=t.length;++a-1&&r%1==0&&r0){if(++t>=yOe)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var LOe=EOe,SOe=vOe,xOe=LOe,_Oe=xOe(SOe),Dce=_Oe,TOe=C4,NOe=Pce,IOe=Dce;function OOe(r,t){return IOe(NOe(r,t,TOe),r+"")}var B6=OOe,ROe=g4,BOe=Nw,kOe=R6,POe=jv;function DOe(r,t,s){if(!POe(s))return!1;var o=typeof t;return(o=="number"?BOe(s)&&kOe(t,s.length):o=="string"&&t in s)?ROe(s[t],r):!1}var k6=DOe,FOe=B6,MOe=k6;function UOe(r){return FOe(function(t,s){var o=-1,i=s.length,a=i>1?s[i-1]:void 0,n=i>2?s[2]:void 0;for(a=r.length>3&&typeof a=="function"?(i--,a):void 0,n&&MOe(s[0],s[1],n)&&(a=i<3?void 0:a,i=1),t=Object(t);++oi?0:i+t),s=s>i?i:s,s<0&&(s+=i),i=t>s?0:s-t>>>0,t>>>=0;for(var a=Array(i);++o0&&s(u)?t>1?Xce(u,t-1,s,o,i):xBe(i,u):o||(i[i.length]=u)}return i}var Qz=Xce,TBe=Qz;function NBe(r){var t=r==null?0:r.length;return t?TBe(r,1):[]}var IBe=NBe,OBe=IBe,RBe=Pce,BBe=Dce;function kBe(r){return BBe(RBe(r,void 0,OBe),r+"")}var Zce=kBe,PBe=UT,DBe=P6,FBe=bBe,MBe=$T,UBe=KT,$Be=wBe,jBe=Zce,HBe=Qce,QBe=1,KBe=2,zBe=4,VBe=jBe(function(r,t){var s={};if(r==null)return s;var o=!1;t=PBe(t,function(a){return a=MBe(a,r),o||(o=a.length>1),a}),UBe(r,HBe(r),s),o&&(s=DBe(s,QBe|KBe|zBe,$Be));for(var i=t.length;i--;)FBe(s,t[i]);return s}),GBe=VBe;const ig=ic(GBe);function WBe(r){return r===void 0}var qBe=WBe;const wm=ic(qBe);var YBe="__lodash_hash_undefined__";function XBe(r){return this.__data__.set(r,YBe),this}var ZBe=XBe;function JBe(r){return this.__data__.has(r)}var eke=JBe,tke=Lz,nke=ZBe,rke=eke;function nP(r){var t=-1,s=r==null?0:r.length;for(this.__data__=new tke;++tu))return!1;var e=a.get(r),y=a.get(t);if(e&&y)return e==t&&y==r;var _=-1,T=!0,D=s&cke?new ike:void 0;for(a.set(r,t),a.set(t,r);++_a===s))>-1;)o.splice(i,1)}}else yw(s)&&this._eventMap.delete(t);return this}emit(t){for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;ia(...o)),!0):!1}};function F2(r){try{return r instanceof HTMLElement}catch{return typeof r=="object"&&r.nodeType===1&&typeof r.style=="object"&&typeof r.ownerDocument=="object"}}function OPe(r){if(r&&typeof r=="object")return typeof r.toJSON=="function"?r.toJSON():["left","top","right","bottom","width","height"].reduce((s,o)=>(s[o]=r[o],s),{})}function fb(r){r.stopPropagation(),r.preventDefault()}function RPe(r){return r.length===1&&r.match(/\S/)}function L4(r,t){for(let s=0;s0&&L4(r,r[0])}function kPe(r){r.length>0&&L4(r,r[r.length-1])}function PPe(r,t){let s,o;r.length>0&&(t===r[0]?s=r[r.length-1]:(o=r.indexOf(t),s=r[o-1]),L4(r,s))}function DPe(r,t){let s,o;r.length>0&&(t===r[r.length-1]?s=r[0]:(o=r.indexOf(t),s=r[o+1]),L4(r,s))}function FPe(r,t,s,o){let i,a;return!r||!s||!o||o.length>1?-1:(o=o.toLowerCase(),i=r.indexOf(t)+1,i>=r.length&&(i=0),a=s.indexOf(o,i),a===-1&&(a=s.indexOf(o,0)),a>=0?a:-1)}function MPe(r,t){if(!r)return null;for(;r.parentElement&&ro(r.parentElement,"attributes.role.value","")!==t;)r=r.parentElement;return r.parentElement}function UPe(r,t){for(let s=0;s{this._adapter.removePortal()},this.setDisplayNone=(o,i)=>{this._adapter.setDisplayNone(o,i)},this.onResize=()=>{this.calcPosition()},this.delayShow=()=>{const o=this.getProp("mouseEnterDelay");this.clearDelayTimer(),o>0?this._timer=setTimeout(()=>{this.show(),this.clearDelayTimer()},o):this.show()},this.show=()=>{const o=this.getProp("content"),i=this.getProp("trigger"),a=this.getProp("clickTriggerToHide"),{visible:n,displayNone:u}=this.getStates();u&&this.setDisplayNone(!1),!n&&(this.clearDelayTimer(),this._adapter.on("portalInserted",()=>{this.calcPosition()}),this._adapter.on("positionUpdated",()=>{this._togglePortalVisible(!0)}),this._adapter.insertPortal(o,{left:-9999,top:-9999}),i==="custom"&&this._adapter.registerClickOutsideHandler(()=>{}),(i==="click"||a||i==="contextMenu")&&this._adapter.registerClickOutsideHandler(this.hide),this._bindScrollEvent(),this._bindResizeEvent())},this.calcPosition=function(o,i,a){let n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;o=($m(o)?s._adapter.getTriggerBounding():o)||Object.assign({},JS),a=($m(a)?s._adapter.getPopupContainerRect():a)||Object.assign({},JS),i=($m(i)?s._adapter.getWrapperBounding():i)||Object.assign({},JS);let u=s.calcPosStyle({triggerRect:o,wrapperRect:i,containerRect:a}),f=s.getProp("position");if(s.getProp("autoAdjustOverflow")){const{position:e,isHeightOverFlow:y,isWidthOverFlow:_}=s.adjustPosIfNeed(f,u,o,i,a);(f!==e||y||_)&&(f=e,u=s.calcPosStyle({triggerRect:o,wrapperRect:i,containerRect:a,position:f,spacing:null,isOverFlow:[y,_]}))}return n&&s._mounted&&s._adapter.setPosition(Object.assign(Object.assign({},u),{position:f})),u},this.delayHide=()=>{const o=this.getProp("mouseLeaveDelay");this.clearDelayTimer(),o>0?this._timer=setTimeout(()=>{this.hide(),this.clearDelayTimer()},o):this.hide()},this.hide=()=>{this.clearDelayTimer(),this._togglePortalVisible(!1),this._adapter.off("portalInserted"),this._adapter.off("positionUpdated")},this.handleContainerKeydown=o=>{const{guardFocus:i,closeOnEsc:a}=this.getProps();switch(o&&o.key){case"Escape":a&&this._handleEscKeyDown(o);break;case"Tab":if(i){const n=this._adapter.getContainer(),u=this._adapter.getFocusableElements(n);u.length&&(o.shiftKey?this._handleContainerShiftTabKeyDown(u,o):this._handleContainerTabKeyDown(u,o))}break}},this._timer=null}init(){const{wrapperId:t}=this.getProps();this._mounted=!0,this._bindEvent(),this._shouldShow(),this._initContainerPosition(),t||this._adapter.setId()}destroy(){this._mounted=!1,this.unBindEvent()}_bindEvent(){const t=this.getProp("trigger"),{triggerEventSet:s,portalEventSet:o}=this._generateEvent(t);this._bindTriggerEvent(s),this._bindPortalEvent(o),this._bindResizeEvent()}unBindEvent(){this._adapter.unregisterClickOutsideHandler(),this.unBindResizeEvent(),this.unBindScrollEvent(),clearTimeout(this._timer)}_bindTriggerEvent(t){this._adapter.registerTriggerEvent(t)}_bindPortalEvent(t){this._adapter.registerPortalEvent(t)}_bindResizeEvent(){this._adapter.registerResizeHandler(this.onResize)}unBindResizeEvent(){this._adapter.unregisterResizeHandler(this.onResize)}_adjustPos(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"reverse",i=arguments.length>3?arguments[3]:void 0;switch(o){case"reverse":return this._reversePos(t,s);case"expand":return this._expandPos(t,i);case"reduce":return this._reducePos(t);default:return this._reversePos(t,s)}}_reversePos(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";if(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1){if(UR.TOP.test(t))return t.replace("top","bottom").replace("Top","Bottom");if(UR.BOTTOM.test(t))return t.replace("bottom","top").replace("Bottom","Top")}else{if(UR.LEFT.test(t))return t.replace("left","right").replace("Left","Right");if(UR.RIGHT.test(t))return t.replace("right","left").replace("Right","Left")}return t}_expandPos(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",s=arguments.length>1?arguments[1]:void 0;return t.concat(s)}_reducePos(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";const s=["Top","Bottom","Left","Right"].find(o=>t.endsWith(o));return s?t.replace(s,""):t}clearDelayTimer(){this._timer&&(clearTimeout(this._timer),this._timer=null)}_generateEvent(t){const s=this._adapter.getEventName(),o={[s.keydown]:a=>{this._handleTriggerKeydown(a)}};let i={};switch(t){case"focus":o[s.focus]=()=>{this.delayShow()},o[s.blur]=()=>{this.delayHide()},i=o;break;case"click":o[s.click]=()=>{this.show()},i={};break;case"hover":o[s.mouseEnter]=()=>{this.setCache("isClickToHide",!1),this.delayShow()},o[s.mouseLeave]=()=>{this.delayHide()},o[s.focus]=()=>{const{disableFocusListener:a}=this.getProps();!a&&this.delayShow()},o[s.blur]=()=>{const{disableFocusListener:a}=this.getProps();!a&&this.delayHide()},i=Object.assign({},o),this.getProp("clickToHide")&&(i[s.click]=()=>{this.setCache("isClickToHide",!0),this.hide()},i[s.mouseEnter]=()=>{this.getCache("isClickToHide")||this.delayShow()});break;case"custom":break;case"contextMenu":o[s.contextMenu]=a=>{a.preventDefault(),this.show()};break}return{triggerEventSet:o,portalEventSet:i}}_shouldShow(){this.getProp("visible")&&this.show()}_togglePortalVisible(t){this.getState("visible")!==t&&this._adapter.togglePortalVisible(t,()=>{t&&this._adapter.setInitialFocus(),this._adapter.notifyVisibleChange(t)})}_roundPixel(t){return typeof t=="number"?Math.round(t):t}calcTransformOrigin(t,s,o,i){if(t&&s&&o!=null&&i!=null){if(this.getProp("transformFromCenter")){if(["topLeft","bottomLeft"].includes(t))return`${this._roundPixel(s.width/2)}px ${-i*100}%`;if(["topRight","bottomRight"].includes(t))return`calc(100% - ${this._roundPixel(s.width/2)}px) ${-i*100}%`;if(["leftTop","rightTop"].includes(t))return`${-o*100}% ${this._roundPixel(s.height/2)}px`;if(["leftBottom","rightBottom"].includes(t))return`${-o*100}% calc(100% - ${this._roundPixel(s.height/2)}px)`}return`${-o*100}% ${-i*100}%`}return null}calcPosStyle(t){const{spacing:s,isOverFlow:o}=t,{innerWidth:i}=window,a=($m(t.triggerRect)?t.triggerRect:this._adapter.getTriggerBounding())||Object.assign({},JS),n=($m(t.containerRect)?t.containerRect:this._adapter.getPopupContainerRect())||Object.assign({},JS),u=($m(t.wrapperRect)?t.wrapperRect:this._adapter.getWrapperBounding())||Object.assign({},JS),f=t.position!=null?t.position:this.getProp("position"),e=s??this.getProp("spacing"),{arrowPointAtCenter:y,showArrow:_,arrowBounding:T}=this.getProps(),D=_&&y;let ce=e,ge=0;if(typeof e!="number"){const Kr=f.includes("top")||f.includes("bottom");ce=Kr?e.y:e.x,ge=Kr?e.x:e.y}const Ee=ro(T,"width",24),_e=ro(T,"width",24),Be=ro(T,"offsetY",0),He=6,at=6;let st,vt,Ot=0,Kt=0;const sn=a.left+a.width/2,Bn=a.top+a.height/2,fn=He+Ee/2,bn=at+_e/2,$n=u.height-n.height,_n=u.width-n.width,Nr=$n>0?$n:0,Cr=_n>0?_n:0,Dr=o&&o[0],fr=o&&o[1],_r=sn-n.lefti;switch(f){case"top":st=fr?_r?n.left+u.width/2:n.right-u.width/2+Cr:sn+ge,vt=Dr?n.bottom+Nr:a.top-ce,Ot=-.5,Kt=-1;break;case"topLeft":st=fr?ss?n.left:n.right-u.width:D?sn-fn+ge:a.left+ge,vt=Dr?n.bottom+Nr:a.top-ce,Kt=-1;break;case"topRight":st=fr?n.right+Cr:D?sn+fn+ge:a.right+ge,vt=Dr?n.bottom+Nr:a.top-ce,Kt=-1,Ot=-1;break;case"left":st=fr?n.right+Cr-ce+fn:a.left-ce,vt=Dr?br?n.top+u.height/2:n.bottom-u.height/2+Nr:Bn+ge,Ot=-1,Kt=-.5;break;case"leftTop":st=fr?n.right+Cr-ce+fn:a.left-ce,vt=Dr?n.top:D?Bn-bn+ge:a.top+ge,Ot=-1;break;case"leftBottom":st=fr?n.right+Cr-ce+fn:a.left-ce,vt=Dr?n.bottom+Nr:D?Bn+bn+ge:a.bottom+ge,Ot=-1,Kt=-1;break;case"bottom":st=fr?_r?n.left+u.width/2:n.right-u.width/2+Cr:sn+ge,vt=Dr?n.top+bn-ce:a.top+a.height+ce,Ot=-.5;break;case"bottomLeft":st=fr?ss?n.left:n.right-u.width:D?sn-fn+ge:a.left+ge,vt=Dr?n.top+bn-ce:a.top+a.height+ce;break;case"bottomRight":st=fr?n.right+Cr:D?sn+fn+ge:a.right+ge,vt=Dr?n.top+bn-ce:a.top+a.height+ce,Ot=-1;break;case"right":st=fr?n.left-ce+fn:a.right+ce,vt=Dr?br?n.top+u.height/2:n.bottom-u.height/2+Nr:Bn+ge,Kt=-.5;break;case"rightTop":st=fr?n.left-ce+fn:a.right+ce,vt=Dr?n.top:D?Bn-bn+ge:a.top+ge;break;case"rightBottom":st=fr?n.left-ce+fn:a.right+ce,vt=Dr?n.bottom+Nr:D?Bn+bn+ge:a.bottom+ge,Kt=-1;break;case"leftTopOver":st=a.left-ce,vt=a.top-ce;break;case"rightTopOver":st=a.right+ce,vt=a.top-ce,Ot=-1;break;case"leftBottomOver":st=a.left-ce,vt=a.bottom+ce,Kt=-1;break;case"rightBottomOver":st=a.right+ce,vt=a.bottom+ce,Ot=-1,Kt=-1;break}const In=this.calcTransformOrigin(f,a,Ot,Kt),dr=this._adapter.containerIsBody();if(st=st-n.left,vt=vt-n.top,dr&&!this._adapter.containerIsRelativeOrAbsolute()){const Kr=this._adapter.getDocumentElementBounding();st+=n.left-Kr.left,vt+=n.top-Kr.top}st=dr?st:st+n.scrollLeft,vt=dr?vt:vt+n.scrollTop;const lr=a.height;if(this.getProp("showArrow")&&!y&&lr<=(_e/2+Be)*2){const Kr=lr/2-(Be+_e/2);(f.includes("Top")||f.includes("Bottom"))&&!f.includes("Over")&&(vt=f.includes("Top")?vt+Kr:vt-Kr)}const Ir={left:this._roundPixel(st),top:this._roundPixel(vt)};let Pr="";return Ot!=null&&(Pr+=`translateX(${Ot*100}%) `,Object.defineProperty(Ir,"translateX",{enumerable:!1,value:Ot})),Kt!=null&&(Pr+=`translateY(${Kt*100}%) `,Object.defineProperty(Ir,"translateY",{enumerable:!1,value:Kt})),In!=null&&(Ir.transformOrigin=In),Pr&&(Ir.transform=Pr),Ir}isLR(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t.includes("left")||t.includes("right")}isTB(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return t.includes("top")||t.includes("bottom")}isReverse(t,s,o){return to}isOverFlow(t,s,o){return t=o||s>=o}getReverse(t,s,o,i){return t&&i||o}adjustPosIfNeed(t,s,o,i,a){const{innerWidth:n,innerHeight:u}=window,{margin:f}=this.getProps(),e=typeof f=="number"?f:f.marginLeft,y=typeof f=="number"?f:f.marginTop,_=typeof f=="number"?f:f.marginRight,T=typeof f=="number"?f:f.marginBottom;let D=!1,ce=!1;const ge=this.getProp("spacing");let Ee=ge,_e=0;if(typeof ge!="number"){const Be=t.includes("top")||t.includes("bottom");Ee=Be?ge.y:ge.x,_e=Be?ge.x:ge.y}if(i.width>0&&i.height>0){const Be=o.left,He=o.right,at=o.top,st=o.bottom,vt=n-Be,Ot=u-at,Kt=n-He,sn=u-st,Bn=i.width>o.width,fn=i.height>o.height,bn=at-yi.height+Ee,$n=Be-ei.width+Ee,_n=sn-Ti.height+Ee,Nr=Kt-_i.width+Ee;Ot-Ti.height+Ee,st-yi.height+Ee;const Cr=Oti.height+_e,Dr=sti.height+_e,fr=vti.width+_e,_r=Hei.width+_e,br=Oti.height+Ee,ss=sti.height+Ee,In=vti.width,dr=Hei.width,lr=at-a.top,Ir=Be-a.left,Pr=lr+o.height,Kr=Ir+o.width,ls=a.bottom-st,as=a.right-He,Ps=ls+o.height,Ws=as+o.width,qs=this.isReverse(lr-y,ls-T,i.height+Ee),xs=this.isReverse(Ir-e,as-_,i.width+Ee),Do=this.isReverse(ls-T,lr-y,i.height+Ee),Is=this.isReverse(as-_,Ir-e,i.width+Ee);this.isReverse(Ps-T,Pr-y,i.height+Ee),this.isReverse(Pr-y,Ps-T,i.height+Ee);const Qr=this.isReverse(Ps,Pr,i.height+_e),Xo=this.isReverse(Pr,Ps,i.height+_e),Go=this.isReverse(Ws,Kr,i.width+_e),ao=this.isReverse(Kr,Ws,i.width+_e),fo=o.height/2,uo=o.width/2,Xs=this.isOverFlow(at-y,sn-T,i.height+Ee),jo=this.isOverFlow(Be-e,Kt-_,i.width+Ee),gs=this.isOverFlow(st-y,Ot-T,i.height+Ee),Zo=this.isOverFlow(He-e,vt-_,i.width+Ee),Mn=this.isHalfOverFlow(st-fo,Ot-fo,(i.height+_e)/2),er=this.isHalfOverFlow(He-uo,vt-uo,(i.width+_e)/2),Hr=this.isHalfAllEnough(st-fo,Ot-fo,(i.height+_e)/2),Mr=this.isHalfAllEnough(He-uo,vt-uo,(i.width+_e)/2),ys=this.isOverFlow(lr-y,ls-T,i.height+Ee),Xr=this.isOverFlow(Ir-e,as-_,i.width+Ee),to=this.isOverFlow(Pr-y,Ps-T,i.height+Ee),Yr=this.isOverFlow(Kr-e,Ws-_,i.width+Ee),mo=this.isHalfOverFlow(Pr-fo,Ps-fo,(i.height+_e)/2),Rr=this.isHalfOverFlow(Kr-uo,Ws-uo,(i.width+_e)/2),fs=this.isHalfAllEnough(Pr-fo,Ps-fo,(i.height+_e)/2),No=this.isHalfAllEnough(Kr-uo,Ws-uo,(i.width+_e)/2),Ii=this.getReverse(Xs,ys,bn,qs),tl=this.getReverse(jo,Xr,$n,xs),ga=this.getReverse(Xs,ys,_n,Do),ca=this.getReverse(jo,Xr,Nr,Is),la=this.getReverse(gs,to,Cr,Qr),na=this.getReverse(gs,to,Dr,Xo),Oi=this.getReverse(Zo,Yr,fr,Go),Ri=this.getReverse(Zo,Yr,_r,ao),eu=Mn&&mo,Oa=er&&Rr;switch(t){case"top":Ii&&(t=this._adjustPos(t,!0)),Oa&&(Oi||Ri)&&(t=this._adjustPos(t,!0,"expand",Oi?"Right":"Left"));break;case"topLeft":Ii&&(t=this._adjustPos(t,!0)),Oi&&Bn&&(t=this._adjustPos(t)),ce&&(Mr||No)&&(t=this._adjustPos(t,!0,"reduce"));break;case"topRight":Ii&&(t=this._adjustPos(t,!0)),Ri&&Bn&&(t=this._adjustPos(t)),ce&&(Mr||No)&&(t=this._adjustPos(t,!0,"reduce"));break;case"left":tl&&(t=this._adjustPos(t)),eu&&(la||na)&&(t=this._adjustPos(t,!1,"expand",la?"Bottom":"Top"));break;case"leftTop":tl&&(t=this._adjustPos(t)),la&&fn&&(t=this._adjustPos(t,!0)),D&&(Hr||fs)&&(t=this._adjustPos(t,!1,"reduce"));break;case"leftBottom":tl&&(t=this._adjustPos(t)),na&&fn&&(t=this._adjustPos(t,!0)),D&&(Hr||fs)&&(t=this._adjustPos(t,!1,"reduce"));break;case"bottom":ga&&(t=this._adjustPos(t,!0)),Oa&&(Oi||Ri)&&(t=this._adjustPos(t,!0,"expand",Oi?"Right":"Left"));break;case"bottomLeft":ga&&(t=this._adjustPos(t,!0)),Oi&&Bn&&(t=this._adjustPos(t)),ce&&(Mr||No)&&(t=this._adjustPos(t,!0,"reduce"));break;case"bottomRight":ga&&(t=this._adjustPos(t,!0)),Ri&&Bn&&(t=this._adjustPos(t)),ce&&(Mr||No)&&(t=this._adjustPos(t,!0,"reduce"));break;case"right":ca&&(t=this._adjustPos(t)),eu&&(la||na)&&(t=this._adjustPos(t,!1,"expand",la?"Bottom":"Top"));break;case"rightTop":ca&&(t=this._adjustPos(t)),la&&fn&&(t=this._adjustPos(t,!0)),D&&(Hr||fs)&&(t=this._adjustPos(t,!1,"reduce"));break;case"rightBottom":ca&&(t=this._adjustPos(t)),na&&fn&&(t=this._adjustPos(t,!0)),D&&(Hr||fs)&&(t=this._adjustPos(t,!1,"reduce"));break;case"leftTopOver":br&&(t=this._adjustPos(t,!0)),In&&(t=this._adjustPos(t));break;case"leftBottomOver":ss&&(t=this._adjustPos(t,!0)),In&&(t=this._adjustPos(t));break;case"rightTopOver":br&&(t=this._adjustPos(t,!0)),dr&&(t=this._adjustPos(t));break;case"rightBottomOver":ss&&(t=this._adjustPos(t,!0)),dr&&(t=this._adjustPos(t));break}this.isTB(t)&&(D=Xs&&ys,t==="top"||t==="bottom"?ce=er&&Rr||He<0||Kt<0:ce=Zo&&Yr||He<0||Kt<0),this.isLR(t)&&(ce=jo&&Xr,t==="left"||t==="right"?D=Mn&&mo||at<0||Ot<0:D=gs&&to||at<0||Ot<0)}return{position:t,isHeightOverFlow:D,isWidthOverFlow:ce}}_bindScrollEvent(){this._adapter.registerScrollHandler(()=>this.calcPosition())}unBindScrollEvent(){this._adapter.unregisterScrollHandler()}_initContainerPosition(){this._adapter.updateContainerPosition()}_handleTriggerKeydown(t){const{closeOnEsc:s,disableArrowKeyDown:o}=this.getProps(),i=this._adapter.getContainer(),a=this._adapter.getFocusableElements(i),n=a.length;switch(t&&t.key){case"Escape":fb(t),s&&this._handleEscKeyDown(t);break;case"ArrowUp":!o&&n&&this._handleTriggerArrowUpKeydown(a,t);break;case"ArrowDown":!o&&n&&this._handleTriggerArrowDownKeydown(a,t);break}}focusTrigger(){const{trigger:t,returnFocusOnClose:s,preventScroll:o}=this.getProps();if(s&&t!=="custom"){const i=this._adapter.getTriggerNode();i&&"focus"in i&&i.focus({preventScroll:o})}}_handleEscKeyDown(t){const{trigger:s}=this.getProps();s!=="custom"&&(this.focusTrigger(),this.hide()),this._adapter.notifyEscKeydown(t)}_handleContainerTabKeyDown(t,s){const{preventScroll:o}=this.getProps(),i=this._adapter.getActiveElement();t[t.length-1]===i&&(t[0].focus({preventScroll:o}),s.preventDefault())}_handleContainerShiftTabKeyDown(t,s){const{preventScroll:o}=this.getProps(),i=this._adapter.getActiveElement();t[0]===i&&(t[t.length-1].focus({preventScroll:o}),s.preventDefault())}_handleTriggerArrowDownKeydown(t,s){const{preventScroll:o}=this.getProps();t[0].focus({preventScroll:o}),s.preventDefault()}_handleTriggerArrowUpKeydown(t,s){const{preventScroll:o}=this.getProps();t[t.length-1].focus({preventScroll:o}),s.preventDefault()}};const jPe={PREFIX:`${fi}-tooltip`},dL={POSITION_SET:["top","topLeft","topRight","left","leftTop","leftBottom","right","rightTop","rightBottom","bottom","bottomLeft","bottomRight","leftTopOver","rightTopOver","leftBottomOver","rightBottomOver"],TRIGGER_SET:["hover","focus","click","custom","contextMenu"],STATUS_DISABLED:"disabled",STATUS_LOADING:"loading"},yE={ARROW_BOUNDING:{offsetX:0,offsetY:2,width:24,height:7},DEFAULT_Z_INDEX:1060,MOUSE_ENTER_DELAY:50,MOUSE_LEAVE_DELAY:50,SPACING:8,MARGIN:0};function rP(r){return`${r}-${new Date().getTime()}-${Math.random()}`}function OB(){var r,t;try{return(t=(r=crypto==null?void 0:crypto.randomUUID)===null||r===void 0?void 0:r.call(crypto))!==null&&t!==void 0?t:String(9987e3+-1e11).replace(/[018]/g,s=>(Number(s)^crypto.getRandomValues(new Uint8Array(1))[0]&15>>Number(s)/4).toString(16))}catch{return rP("semi")}}function NL(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{prefix:t="",length:s=7}=r,o="0123456789abcdefghijklmnopqrstuvwxyz",i=o.length;let a="";for(let n=0;nr.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),rDe=r=>{let{autoEscape:t,caseSensitive:s,searchWords:o,sourceString:i}=r;return o.filter(a=>a).reduce((a,n)=>{t&&(n=nDe(n));const u=new RegExp(n,s?"g":"gi");let f;for(;f=u.exec(i);){const e=f.index,y=u.lastIndex;y>e&&a.push({highlight:!1,start:e,end:y}),f.index===u.lastIndex&&u.lastIndex++}return a},[])},sDe=r=>{let{chunks:t}=r;return t=t.sort((s,o)=>s.start-o.start).reduce((s,o)=>{if(s.length===0)return[o];{const i=s.pop();if(o.start<=i.end){const a=Math.max(i.end,o.end);s.push({highlight:!1,start:i.start,end:a})}else s.push(i,o);return s}},[]),t},oDe=r=>{let{chunksToHighlight:t,totalLength:s}=r;const o=[],i=(a,n,u)=>{n-a>0&&o.push({start:a,end:n,highlight:u})};if(t.length===0)i(0,s,!1);else{let a=0;t.forEach(n=>{i(a,n.start,!1),i(n.start,n.end,!0),a=n.end}),i(a,s,!1)}return o},iDe=r=>{let{autoEscape:t=!0,caseSensitive:s=!1,searchWords:o,sourceString:i}=r;rA(o)&&(o=[o]);const a=rDe({autoEscape:t,caseSensitive:s,searchWords:o,sourceString:i}),n=sDe({chunks:a});return oDe({chunksToHighlight:n,totalLength:i?i.length:0})};function $R(r,t){r&&typeof r.stopPropagation=="function"&&r.stopPropagation(),!t&&r.nativeEvent&&typeof r.nativeEvent.stopImmediatePropagation=="function"&&r.nativeEvent.stopImmediatePropagation()}function Py(r,t){return sfe(r,s=>{if(typeof t=="function")return t(s);if(typeof s=="function"||ct.isValidElement(s)||Object.prototype.toString.call(s)==="[object Error]")return s;if(Array.isArray(s)&&s.length===0){const o=Object.keys(s);if(o.length){const i=[];o.forEach(a=>{lw(i,a,s[a])});try{Wg(ro(process,"env.NODE_ENV")!=="production",`[Semi] You may use an out-of-bounds array. In some cases, your program may not behave as expected. + The maximum length of an array is 4294967295. + Please check whether the array subscript in your data exceeds the maximum value of the JS array subscript`)}catch{}return i}else return}})}const Gz=r=>{let{sourceString:t="",searchWords:s=[],option:o={autoEscape:!0,caseSensitive:!1}}=r;const i=iDe(Object.assign({sourceString:t,searchWords:s},o)),a=o.highlightTag||"mark",n=o.highlightClassName||"",u=o.highlightStyle||{};return i.map((f,e)=>{const{end:y,start:_,highlight:T}=f,D=t.substr(_,y-_);return T?ct.createElement(a,{style:u,className:n,key:D+e},D):D})},aDe=(r,t)=>{let{match:s,unmatch:o,callInInit:i=!0}=t;if(typeof window<"u"){let n=function(u){u.matches?s&&s(u):o&&o(u)};const a=window.matchMedia(r);return i&&n(a),Object.prototype.hasOwnProperty.call(a,"addEventListener")?(a.addEventListener("change",n),()=>a.removeEventListener("change",n)):(a.addListener(n),()=>a.removeListener(n))}return()=>{}},Iv=r=>ct.isValidElement(r)&&ro(r.type,"elementType")==="Icon";function ofe(){return document?document.activeElement:null}function ife(r){if(!F2(r))return[];const s=["input:not([disabled]):not([tabindex='-1'])","textarea:not([disabled]):not([tabindex='-1'])","button:not([disabled]):not([tabindex='-1'])","a[href]:not([tabindex='-1'])","select:not([disabled]):not([tabindex='-1'])","area[href]:not([tabindex='-1'])","iframe:not([tabindex='-1'])","object:not([tabindex='-1'])","*[tabindex]:not([tabindex='-1'])","*[contenteditable]:not([tabindex='-1'])"].join(",");return Array.from(r.querySelectorAll(s))}function Wz(){return globalThis&&Object.prototype.toString.call(globalThis)==="[object Window]"?window.innerWidth-document.documentElement.clientWidth:0}const lDe=ct.createContext({}),by=lDe,uDe=()=>document.body;class M6 extends Vt.PureComponent{constructor(t,s){var o;super(t),o=this,this.initContainer=function(i){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;var n,u;try{let f;if(!o.el||!(!((n=o.state)===null||n===void 0)&&n.container)||!Array.from(o.state.container.childNodes).includes(o.el)){o.el=document.createElement("div");const y=(o.props.getPopupContainer||i.getPopupContainer||uDe)();return y.appendChild(o.el),o.addStyle(o.props.style),o.addClass(o.props.prefixCls,i,o.props.className),f=y,f}}catch(f){if(!a)throw f}return(u=o.state)===null||u===void 0?void 0:u.container},this.addStyle=function(){let i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(o.el)for(const a of Object.keys(i))o.el.style[a]=i[a]},this.addClass=function(i){let a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:o.context;const{direction:n}=a;for(var u=arguments.length,f=new Array(u>2?u-2:0),e=2;e{const{className:t,style:s}=r,o=cDe(r,["className","style"]);return ct.createElement("svg",Object.assign({"aria-hidden":!0,className:t,style:s},o,{width:"24",height:"7",viewBox:"0 0 24 7",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg"}),ct.createElement("path",{d:"M24 0V1C20 1 18.5 2 16.5 4C14.5 6 14 7 12 7C10 7 9.5 6 7.5 4C5.5 2 4 1 0 1V0H24Z"}))},dDe=fDe;var hDe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{className:t,style:s}=r,o=hDe(r,["className","style"]);return ct.createElement("svg",Object.assign({"aria-hidden":!0,className:t,style:s},o,{width:"7",height:"24",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor"}),ct.createElement("path",{d:"M0 0L1 0C1 4, 2 5.5, 4 7.5S7,10 7,12S6 14.5, 4 16.5S1,20 1,24L0 24L0 0z"}))},pDe=ADe,mDe=be.shape({offsetX:be.number,offsetY:be.number,width:be.number,height:be.number});class afe extends ct.Component{constructor(t){super(t),this.handleAnimationStart=()=>{var s,o;(o=(s=this.props).onAnimationStart)===null||o===void 0||o.call(s)},this.handleAnimationEnd=()=>{this.setState({currentClassName:this.props.endClassName,extraStyle:{animationFillMode:this.props.fillMode},isAnimating:!1},()=>{var s,o;(o=(s=this.props).onAnimationEnd)===null||o===void 0||o.call(s,!1)})},this.state={currentClassName:this.props.startClassName,extraStyle:{animationFillMode:this.props.fillMode},isAnimating:!0}}componentDidMount(){var t,s,o,i;(s=(t=this.props).onAnimationStart)===null||s===void 0||s.call(t),this.props.motion||((i=(o=this.props).onAnimationEnd)===null||i===void 0||i.call(o,!1),this.setState({isAnimating:!1}))}componentDidUpdate(t,s,o){const i=Object.keys(this.props).filter(a=>!_0(this.props[a],t[a]));i.includes("animationState"),(i.includes("startClassName")||i.includes("replayKey")||i.includes("motion"))&&this.setState({currentClassName:this.props.startClassName,extraStyle:{animationFillMode:this.props.fillMode},isAnimating:!0},()=>{var a,n,u,f;(n=(a=this.props).onAnimationStart)===null||n===void 0||n.call(a),this.props.motion||((f=(u=this.props).onAnimationEnd)===null||f===void 0||f.call(u,this.state.isAnimating),this.setState({isAnimating:!1}))})}render(){var t;return this.props.motion?this.props.children({animationClassName:(t=this.state.currentClassName)!==null&&t!==void 0?t:"",animationStyle:this.state.extraStyle,animationEventsNeedBind:{onAnimationStart:this.handleAnimationStart,onAnimationEnd:this.handleAnimationEnd},isAnimating:this.state.isAnimating}):this.props.children({animationClassName:"",animationStyle:{},animationEventsNeedBind:{},isAnimating:this.state.isAnimating})}}afe.defaultProps={motion:!0,replayKey:""};const IL=afe;var DZ=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);idocument.body;class Y0 extends Uc{constructor(t){super(t),this.setContainerEl=s=>this.containerEl={current:s},this.isSpecial=s=>{if(F2(s))return!!s.disabled;if(Vt.isValidElement(s)){if(ro(s,"props.disabled"))return dL.STATUS_DISABLED;const i=ro(s,"props.loading"),a=!$m(s)&&!$m(s.type)&&(ro(s,"type.elementType")==="Button"||ro(s,"type.elementType")==="IconButton");if(i&&a)return dL.STATUS_LOADING}return!1},this.didLeave=()=>{this.props.keepDOM?this.foundation.setDisplayNone(!0):this.foundation.removePortal(),this.foundation.unBindEvent()},this.renderIcon=()=>{const{placement:s}=this.state,{showArrow:o,prefixCls:i,style:a}=this.props;let n=null;const u=ds([`${i}-icon-arrow`]),f=ro(a,"backgroundColor"),e=s.includes("left")||s.includes("right")?ct.createElement(pDe,null):ct.createElement(dDe,null);return o&&(Vt.isValidElement(o)?n=o:n=ct.cloneElement(e,{className:u,style:{color:f,fill:"currentColor"}})),n},this.handlePortalInnerClick=s=>{this.props.clickToHide&&this.foundation.hide(),this.props.stopPropagation&&$R(s)},this.handlePortalMouseDown=s=>{this.props.stopPropagation&&$R(s)},this.handlePortalFocus=s=>{this.props.stopPropagation&&$R(s)},this.handlePortalBlur=s=>{this.props.stopPropagation&&$R(s)},this.handlePortalInnerKeyDown=s=>{this.foundation.handleContainerKeydown(s)},this.renderContentNode=s=>{const o={initialFocusRef:this.initialFocusRef};return Mc(s)?s(o):s},this.renderPortal=()=>{const{containerStyle:s={},visible:o,portalEventSet:i,placement:a,displayNone:n,transitionState:u,id:f,isPositionUpdated:e}=this.state,{prefixCls:y,content:_,showArrow:T,style:D,motion:ce,role:ge,zIndex:Ee}=this.props,_e=this.renderContentNode(_),{className:Be}=this.props,He=this.context.direction,at=ds(Be,{[`${y}-wrapper`]:!0,[`${y}-wrapper-show`]:o,[`${y}-with-arrow`]:!!T,[`${y}-rtl`]:He==="rtl"}),st=this.renderIcon(),vt=ig(s,ce?["transformOrigin"]:void 0),Ot=ro(s,"transformOrigin"),Kt=ro(D,"opacity",null),sn=Kt||1,Bn=ct.createElement(IL,{fillMode:"forwards",animationState:u,motion:ce&&e,startClassName:u==="enter"?`${RB}-animation-show`:`${RB}-animation-hide`,onAnimationEnd:()=>{var fn,bn;u==="leave"&&(this.didLeave(),(bn=(fn=this.props).afterClose)===null||bn===void 0||bn.call(fn))}},fn=>{let{animationStyle:bn,animationClassName:$n,animationEventsNeedBind:_n}=fn;return ct.createElement("div",Object.assign({className:ds(at,$n),style:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},bn),n?{display:"none"}:{}),{transformOrigin:Ot}),D),Kt?{opacity:e?sn:"0"}:{})},i,_n,{role:ge,"x-placement":a,id:f}),ct.createElement("div",{className:`${RB}-content`},_e),st)});return ct.createElement(U6,{getPopupContainer:this.props.getPopupContainer,style:{zIndex:Ee}},ct.createElement("div",{tabIndex:-1,className:`${fi}-portal-inner`,style:vt,ref:this.setContainerEl,onClick:this.handlePortalInnerClick,onFocus:this.handlePortalFocus,onBlur:this.handlePortalBlur,onMouseDown:this.handlePortalMouseDown,onKeyDown:this.handlePortalInnerKeyDown},Bn))},this.wrapSpan=s=>{const{wrapperClassName:o}=this.props,i=ro(s,"props.style.display"),a=ro(s,"props.block"),n=typeof s=="string",u={};return n||(u.display="inline-block"),(a||vDe.includes(i))&&(u.width="100%"),ct.createElement("span",{className:o,style:u},s)},this.mergeEvents=(s,o)=>{const i={};return rb(o,(a,n)=>{typeof a=="function"&&(i[n]=function(){a(...arguments),s&&typeof s[n]=="function"&&s[n](...arguments)})}),i},this.getPopupId=()=>this.state.id,this.state={visible:!1,transitionState:"",triggerEventSet:{},portalEventSet:{},containerStyle:{},isInsert:!1,placement:t.position||"top",transitionStyle:{},isPositionUpdated:!1,id:t.wrapperId,displayNone:!1},this.foundation=new $Pe(this.adapter),this.eventManager=new nfe,this.triggerEl=ct.createRef(),this.containerEl=ct.createRef(),this.initialFocusRef=ct.createRef(),this.clickOutsideHandler=null,this.resizeHandler=null,this.isWrapped=!1,this.containerPosition=void 0}get adapter(){var t=this;return Object.assign(Object.assign({},super.adapter),{on:function(){return t.eventManager.on(...arguments)},off:function(){return t.eventManager.off(...arguments)},insertPortal:(s,o)=>{var i=DZ(o,["position"]);this.setState({isInsert:!0,transitionState:"enter",containerStyle:Object.assign(Object.assign({},this.state.containerStyle),i)},()=>{setTimeout(()=>{this.eventManager.emit("portalInserted")},0)})},removePortal:()=>{this.setState({isInsert:!1,isPositionUpdated:!1})},getEventName:()=>({mouseEnter:"onMouseEnter",mouseLeave:"onMouseLeave",mouseOut:"onMouseOut",mouseOver:"onMouseOver",click:"onClick",focus:"onFocus",blur:"onBlur",keydown:"onKeyDown",contextMenu:"onContextMenu"}),registerTriggerEvent:s=>{this.setState({triggerEventSet:s})},registerPortalEvent:s=>{this.setState({portalEventSet:s})},getTriggerBounding:()=>{const s=this.adapter.getTriggerNode();return this.triggerEl.current=s,s&&s.getBoundingClientRect()},getPopupContainerRect:()=>{const s=this.getPopupContainer();let o=null;if(s&&F2(s)){const i=OPe(s.getBoundingClientRect());o=Object.assign(Object.assign({},i),{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop})}return o},containerIsBody:()=>this.getPopupContainer()===document.body,containerIsRelative:()=>{const s=this.getPopupContainer();return window.getComputedStyle(s).getPropertyValue("position")==="relative"},containerIsRelativeOrAbsolute:()=>["relative","absolute"].includes(this.containerPosition),getWrapperBounding:()=>{const s=this.containerEl&&this.containerEl.current;return s&&s.getBoundingClientRect()},getDocumentElementBounding:()=>document.documentElement.getBoundingClientRect(),setPosition:s=>{var{position:o}=s,i=DZ(s,["position"]);this.setState({containerStyle:Object.assign(Object.assign({},this.state.containerStyle),i),placement:o,isPositionUpdated:!0},()=>{this.eventManager.emit("positionUpdated")})},setDisplayNone:(s,o)=>{this.setState({displayNone:s},o)},updatePlacementAttr:s=>{this.setState({placement:s})},togglePortalVisible:(s,o)=>{const i={};i.transitionState=s?"enter":"leave",i.visible=s,this.mounted&&this.setState(i,()=>{o()})},registerClickOutsideHandler:s=>{this.clickOutsideHandler&&this.adapter.unregisterClickOutsideHandler(),this.clickOutsideHandler=o=>{if(!this.mounted)return!1;let i=this.triggerEl&&this.triggerEl.current,a=this.containerEl&&this.containerEl.current;i=zy.findDOMNode(i),a=zy.findDOMNode(a),(i&&!i.contains(o.target)&&a&&!a.contains(o.target)||this.props.clickTriggerToHide&&i&&i.contains(o.target))&&(this.props.onClickOutSide(o),s())},window.addEventListener("mousedown",this.clickOutsideHandler)},unregisterClickOutsideHandler:()=>{this.clickOutsideHandler&&(window.removeEventListener("mousedown",this.clickOutsideHandler),this.clickOutsideHandler=null)},registerResizeHandler:s=>{this.resizeHandler&&this.adapter.unregisterResizeHandler(),this.resizeHandler=iO(o=>{if(!this.mounted)return!1;s(o)},10),window.addEventListener("resize",this.resizeHandler,!1)},unregisterResizeHandler:()=>{this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler,!1),this.resizeHandler=null)},notifyVisibleChange:s=>{this.props.onVisibleChange(s)},registerScrollHandler:s=>{this.scrollHandler&&this.adapter.unregisterScrollHandler(),this.scrollHandler=iO(o=>{if(!this.mounted)return!1;const i=this.adapter.getTriggerNode();if(o.target.contains(i)){const n={x:o.target.scrollLeft,y:o.target.scrollTop};s(n)}},10),window.addEventListener("scroll",this.scrollHandler,!0)},unregisterScrollHandler:()=>{this.scrollHandler&&(window.removeEventListener("scroll",this.scrollHandler,!0),this.scrollHandler=null)},canMotion:()=>!!this.props.motion,updateContainerPosition:()=>{const s=this.getPopupContainer();if(s&&F2(s)){const i=window.getComputedStyle(s).getPropertyValue("position");this.containerPosition=i}},getContainerPosition:()=>this.containerPosition,getContainer:()=>this.containerEl&&this.containerEl.current,getTriggerNode:()=>{let s=this.triggerEl.current;return F2(this.triggerEl.current)||(s=zy.findDOMNode(this.triggerEl.current)),s},getFocusableElements:s=>ife(s),getActiveElement:()=>ofe(),setInitialFocus:()=>{const{preventScroll:s}=this.props,o=ro(this,"initialFocusRef.current");o&&"focus"in o&&o.focus({preventScroll:s})},notifyEscKeydown:s=>{this.props.onEscKeyDown(s)},setId:()=>{this.setState({id:NL()})}})}componentDidMount(){this.mounted=!0,this.getPopupContainer=this.props.getPopupContainer||this.context.getPopupContainer||yDe,this.foundation.init()}componentWillUnmount(){this.mounted=!1,this.foundation.destroy()}focusTrigger(){this.foundation.focusTrigger()}rePosition(){return this.foundation.calcPosition()}componentDidUpdate(t,s){Wg(this.props.mouseLeaveDelay{this.triggerEl.current=D;const{ref:ce}=f;typeof ce=="function"?ce(D):ce&&typeof ce=="object"&&(ce.current=D)},tabIndex:f.props.tabIndex||0,"data-popupid":i}));return ct.createElement(ct.Fragment,null,t?this.renderPortal():null,T)}}Y0.contextType=by;Y0.propTypes={children:be.node,motion:be.bool,autoAdjustOverflow:be.bool,position:be.oneOf(gDe),getPopupContainer:be.func,mouseEnterDelay:be.number,mouseLeaveDelay:be.number,trigger:be.oneOf(bDe).isRequired,className:be.string,wrapperClassName:be.string,clickToHide:be.bool,clickTriggerToHide:be.bool,visible:be.bool,style:be.object,content:be.oneOfType([be.node,be.func]),prefixCls:be.string,onVisibleChange:be.func,onClickOutSide:be.func,spacing:be.oneOfType([be.number,be.object]),margin:be.oneOfType([be.number,be.object]),showArrow:be.oneOfType([be.bool,be.node]),zIndex:be.number,rePosKey:be.oneOfType([be.string,be.number]),arrowBounding:mDe,transformFromCenter:be.bool,arrowPointAtCenter:be.bool,stopPropagation:be.bool,role:be.string,wrapWhenSpecial:be.bool,guardFocus:be.bool,returnFocusOnClose:be.bool,preventScroll:be.bool,keepDOM:be.bool};Y0.defaultProps={arrowBounding:yE.ARROW_BOUNDING,autoAdjustOverflow:!0,arrowPointAtCenter:!0,trigger:"hover",transformFromCenter:!0,position:"top",prefixCls:RB,role:"tooltip",mouseEnterDelay:yE.MOUSE_ENTER_DELAY,mouseLeaveDelay:yE.MOUSE_LEAVE_DELAY,motion:!0,onVisibleChange:so,onClickOutSide:so,spacing:yE.SPACING,margin:yE.MARGIN,showArrow:!0,wrapWhenSpecial:!0,zIndex:yE.DEFAULT_Z_INDEX,closeOnEsc:!1,guardFocus:!1,returnFocusOnClose:!1,onEscKeyDown:so,disableFocusListener:!1,disableArrowKeyDown:!1,keepDOM:!1};var qz={exports:{}};const lfe=(r,{target:t=document.body}={})=>{const s=document.createElement("textarea"),o=document.activeElement;s.value=r,s.setAttribute("readonly",""),s.style.contain="strict",s.style.position="absolute",s.style.left="-9999px",s.style.fontSize="12pt";const i=document.getSelection();let a=!1;i.rangeCount>0&&(a=i.getRangeAt(0)),t.append(s),s.select(),s.selectionStart=0,s.selectionEnd=r.length;let n=!1;try{n=document.execCommand("copy")}catch{}return s.remove(),a&&(i.removeAllRanges(),i.addRange(a)),o&&o.focus(),n};qz.exports=lfe;qz.exports.default=lfe;var wDe=qz.exports;const CDe=ic(wDe);function uw(){}const EDe=ct.createContext(null),ufe=EDe;function y_(r){return function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=t.width?String(t.width):r.defaultWidth,o=r.formats[s]||r.formats[r.defaultWidth];return o}}function sw(r){return function(t,s){var o=s!=null&&s.context?String(s.context):"standalone",i;if(o==="formatting"&&r.formattingValues){var a=r.defaultFormattingWidth||r.defaultWidth,n=s!=null&&s.width?String(s.width):a;i=r.formattingValues[n]||r.formattingValues[a]}else{var u=r.defaultWidth,f=s!=null&&s.width?String(s.width):r.defaultWidth;i=r.values[f]||r.values[u]}var e=r.argumentCallback?r.argumentCallback(t):t;return i[e]}}function ow(r){return function(t){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=s.width,i=o&&r.matchPatterns[o]||r.matchPatterns[r.defaultMatchWidth],a=t.match(i);if(!a)return null;var n=a[0],u=o&&r.parsePatterns[o]||r.parsePatterns[r.defaultParseWidth],f=Array.isArray(u)?SDe(u,function(_){return _.test(n)}):LDe(u,function(_){return _.test(n)}),e;e=r.valueCallback?r.valueCallback(f):f,e=s.valueCallback?s.valueCallback(e):e;var y=t.slice(n.length);return{value:e,rest:y}}}function LDe(r,t){for(var s in r)if(r.hasOwnProperty(s)&&t(r[s]))return s}function SDe(r,t){for(var s=0;s1&&arguments[1]!==void 0?arguments[1]:{},o=t.match(r.matchPattern);if(!o)return null;var i=o[0],a=t.match(r.parsePattern);if(!a)return null;var n=r.valueCallback?r.valueCallback(a[0]):a[0];n=s.valueCallback?s.valueCallback(n):n;var u=t.slice(i.length);return{value:n,rest:u}}}function m0(r){"@babel/helpers - typeof";return m0=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},m0(r)}function xDe(r){if(r===null||r===!0||r===!1)return NaN;var t=Number(r);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function Yz(r,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function _De(r){Yz(1,arguments);var t=Object.prototype.toString.call(r);return r instanceof Date||m0(r)==="object"&&t==="[object Date]"?new Date(r.getTime()):typeof r=="number"||t==="[object Number]"?new Date(r):((typeof r=="string"||t==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}var TDe={};function NDe(){return TDe}function FZ(r,t){var s,o,i,a,n,u,f,e;Yz(1,arguments);var y=NDe(),_=xDe((s=(o=(i=(a=t==null?void 0:t.weekStartsOn)!==null&&a!==void 0?a:t==null||(n=t.locale)===null||n===void 0||(u=n.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&i!==void 0?i:y.weekStartsOn)!==null&&o!==void 0?o:(f=y.locale)===null||f===void 0||(e=f.options)===null||e===void 0?void 0:e.weekStartsOn)!==null&&s!==void 0?s:0);if(!(_>=0&&_<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var T=_De(r),D=T.getUTCDay(),ce=(D<_?7:0)+D-_;return T.setUTCDate(T.getUTCDate()-ce),T.setUTCHours(0,0,0,0),T}var IDe={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ODe=function(t,s,o){var i,a=IDe[t];return typeof a=="string"?i=a:s===1?i=a.one:i=a.other.replace("{{count}}",s.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+i:i+" ago":i};const RDe=ODe;var BDe={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},kDe={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},PDe={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},DDe={date:y_({formats:BDe,defaultWidth:"full"}),time:y_({formats:kDe,defaultWidth:"full"}),dateTime:y_({formats:PDe,defaultWidth:"full"})};const FDe=DDe;var MDe={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},UDe=function(t,s,o,i){return MDe[t]};const $De=UDe;var jDe={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},HDe={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},QDe={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},KDe={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},zDe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},VDe={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},GDe=function(t,s){var o=Number(t),i=o%100;if(i>20||i<10)switch(i%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},WDe={ordinalNumber:GDe,era:sw({values:jDe,defaultWidth:"wide"}),quarter:sw({values:HDe,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:sw({values:QDe,defaultWidth:"wide"}),day:sw({values:KDe,defaultWidth:"wide"}),dayPeriod:sw({values:zDe,defaultWidth:"wide",formattingValues:VDe,defaultFormattingWidth:"wide"})};const qDe=WDe;var YDe=/^(\d+)(th|st|nd|rd)?/i,XDe=/\d+/i,ZDe={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},JDe={any:[/^b/i,/^(a|c)/i]},e6e={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},t6e={any:[/1/i,/2/i,/3/i,/4/i]},n6e={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},r6e={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},s6e={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},o6e={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},i6e={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},a6e={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},l6e={ordinalNumber:cfe({matchPattern:YDe,parsePattern:XDe,valueCallback:function(t){return parseInt(t,10)}}),era:ow({matchPatterns:ZDe,defaultMatchWidth:"wide",parsePatterns:JDe,defaultParseWidth:"any"}),quarter:ow({matchPatterns:e6e,defaultMatchWidth:"wide",parsePatterns:t6e,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ow({matchPatterns:n6e,defaultMatchWidth:"wide",parsePatterns:r6e,defaultParseWidth:"any"}),day:ow({matchPatterns:s6e,defaultMatchWidth:"wide",parsePatterns:o6e,defaultParseWidth:"any"}),dayPeriod:ow({matchPatterns:i6e,defaultMatchWidth:"any",parsePatterns:a6e,defaultParseWidth:"any"})};const u6e=l6e;var c6e={code:"en-US",formatDistance:RDe,formatLong:FDe,formatRelative:$De,localize:qDe,match:u6e,options:{weekStartsOn:0,firstWeekContainsDate:1}};const f6e=c6e;function MZ(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function S9(r,t){return S9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},S9(r,t)}function d6e(r,t,s){Yz(2,arguments);var o=FZ(r,s),i=FZ(t,s);return o.getTime()===i.getTime()}var h6e={lessThanXSeconds:{one:"不到 1 秒",other:"不到 {{count}} 秒"},xSeconds:{one:"1 秒",other:"{{count}} 秒"},halfAMinute:"半分钟",lessThanXMinutes:{one:"不到 1 分钟",other:"不到 {{count}} 分钟"},xMinutes:{one:"1 分钟",other:"{{count}} 分钟"},xHours:{one:"1 小时",other:"{{count}} 小时"},aboutXHours:{one:"大约 1 小时",other:"大约 {{count}} 小时"},xDays:{one:"1 天",other:"{{count}} 天"},aboutXWeeks:{one:"大约 1 个星期",other:"大约 {{count}} 个星期"},xWeeks:{one:"1 个星期",other:"{{count}} 个星期"},aboutXMonths:{one:"大约 1 个月",other:"大约 {{count}} 个月"},xMonths:{one:"1 个月",other:"{{count}} 个月"},aboutXYears:{one:"大约 1 年",other:"大约 {{count}} 年"},xYears:{one:"1 年",other:"{{count}} 年"},overXYears:{one:"超过 1 年",other:"超过 {{count}} 年"},almostXYears:{one:"将近 1 年",other:"将近 {{count}} 年"}},A6e=function(t,s,o){var i,a=h6e[t];return typeof a=="string"?i=a:s===1?i=a.one:i=a.other.replace("{{count}}",String(s)),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?i+"内":i+"前":i};const p6e=A6e;var m6e={full:"y'年'M'月'd'日' EEEE",long:"y'年'M'月'd'日'",medium:"yyyy-MM-dd",short:"yy-MM-dd"},g6e={full:"zzzz a h:mm:ss",long:"z a h:mm:ss",medium:"a h:mm:ss",short:"a h:mm"},b6e={full:"{{date}} {{time}}",long:"{{date}} {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},v6e={date:y_({formats:m6e,defaultWidth:"full"}),time:y_({formats:g6e,defaultWidth:"full"}),dateTime:y_({formats:b6e,defaultWidth:"full"})};const y6e=v6e;function UZ(r,t,s){var o="eeee p";return d6e(r,t,s)?o:r.getTime()>t.getTime()?"'下个'"+o:"'上个'"+o}var w6e={lastWeek:UZ,yesterday:"'昨天' p",today:"'今天' p",tomorrow:"'明天' p",nextWeek:UZ,other:"PP p"},C6e=function(t,s,o,i){var a=w6e[t];return typeof a=="function"?a(s,o,i):a};const E6e=C6e;var L6e={narrow:["前","公元"],abbreviated:["前","公元"],wide:["公元前","公元"]},S6e={narrow:["1","2","3","4"],abbreviated:["第一季","第二季","第三季","第四季"],wide:["第一季度","第二季度","第三季度","第四季度"]},x6e={narrow:["一","二","三","四","五","六","七","八","九","十","十一","十二"],abbreviated:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],wide:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"]},_6e={narrow:["日","一","二","三","四","五","六"],short:["日","一","二","三","四","五","六"],abbreviated:["周日","周一","周二","周三","周四","周五","周六"],wide:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},T6e={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},N6e={narrow:{am:"上",pm:"下",midnight:"凌晨",noon:"午",morning:"早",afternoon:"下午",evening:"晚",night:"夜"},abbreviated:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"},wide:{am:"上午",pm:"下午",midnight:"凌晨",noon:"中午",morning:"早晨",afternoon:"中午",evening:"晚上",night:"夜间"}},I6e=function(t,s){var o=Number(t);switch(s==null?void 0:s.unit){case"date":return o.toString()+"日";case"hour":return o.toString()+"时";case"minute":return o.toString()+"分";case"second":return o.toString()+"秒";default:return"第 "+o.toString()}},O6e={ordinalNumber:I6e,era:sw({values:L6e,defaultWidth:"wide"}),quarter:sw({values:S6e,defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:sw({values:x6e,defaultWidth:"wide"}),day:sw({values:_6e,defaultWidth:"wide"}),dayPeriod:sw({values:T6e,defaultWidth:"wide",formattingValues:N6e,defaultFormattingWidth:"wide"})};const R6e=O6e;var B6e=/^(第\s*)?\d+(日|时|分|秒)?/i,k6e=/\d+/i,P6e={narrow:/^(前)/i,abbreviated:/^(前)/i,wide:/^(公元前|公元)/i},D6e={any:[/^(前)/i,/^(公元)/i]},F6e={narrow:/^[1234]/i,abbreviated:/^第[一二三四]刻/i,wide:/^第[一二三四]刻钟/i},M6e={any:[/(1|一)/i,/(2|二)/i,/(3|三)/i,/(4|四)/i]},U6e={narrow:/^(一|二|三|四|五|六|七|八|九|十[二一])/i,abbreviated:/^(一|二|三|四|五|六|七|八|九|十[二一]|\d|1[12])月/i,wide:/^(一|二|三|四|五|六|七|八|九|十[二一])月/i},$6e={narrow:[/^一/i,/^二/i,/^三/i,/^四/i,/^五/i,/^六/i,/^七/i,/^八/i,/^九/i,/^十(?!(一|二))/i,/^十一/i,/^十二/i],any:[/^一|1/i,/^二|2/i,/^三|3/i,/^四|4/i,/^五|5/i,/^六|6/i,/^七|7/i,/^八|8/i,/^九|9/i,/^十(?!(一|二))|10/i,/^十一|11/i,/^十二|12/i]},j6e={narrow:/^[一二三四五六日]/i,short:/^[一二三四五六日]/i,abbreviated:/^周[一二三四五六日]/i,wide:/^星期[一二三四五六日]/i},H6e={any:[/日/i,/一/i,/二/i,/三/i,/四/i,/五/i,/六/i]},Q6e={any:/^(上午?|下午?|午夜|[中正]午|早上?|下午|晚上?|凌晨|)/i},K6e={any:{am:/^上午?/i,pm:/^下午?/i,midnight:/^午夜/i,noon:/^[中正]午/i,morning:/^早上/i,afternoon:/^下午/i,evening:/^晚上?/i,night:/^凌晨/i}},z6e={ordinalNumber:cfe({matchPattern:B6e,parsePattern:k6e,valueCallback:function(t){return parseInt(t,10)}}),era:ow({matchPatterns:P6e,defaultMatchWidth:"wide",parsePatterns:D6e,defaultParseWidth:"any"}),quarter:ow({matchPatterns:F6e,defaultMatchWidth:"wide",parsePatterns:M6e,defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:ow({matchPatterns:U6e,defaultMatchWidth:"wide",parsePatterns:$6e,defaultParseWidth:"any"}),day:ow({matchPatterns:j6e,defaultMatchWidth:"wide",parsePatterns:H6e,defaultParseWidth:"any"}),dayPeriod:ow({matchPatterns:Q6e,defaultMatchWidth:"any",parsePatterns:K6e,defaultParseWidth:"any"})};const V6e=z6e;var G6e={code:"zh-CN",formatDistance:p6e,formatLong:y6e,formatRelative:E6e,localize:R6e,match:V6e,options:{weekStartsOn:1,firstWeekContainsDate:4}};const W6e=G6e,q6e={code:"zh-CN",dateFnsLocale:W6e,Pagination:{pageSize:"每页条数:${pageSize}",total:"总页数:${total}",jumpTo:"跳至",page:"页"},Modal:{confirm:"确定",cancel:"取消"},TimePicker:{placeholder:{time:"请选择时间",timeRange:"请选择时间范围"},begin:"开始时间",end:"结束时间",hour:"时",minute:"分",second:"秒",AM:"上午",PM:"下午"},DatePicker:{placeholder:{date:"请选择日期",dateTime:"请选择日期及时间",dateRange:["开始日期","结束日期"],dateTimeRange:["开始日期","结束日期"],monthRange:["开始月份","结束月份"]},presets:"快捷选择",footer:{confirm:"确定",cancel:"取消"},selectDate:"返回选择日期",selectTime:"选择时间",year:"年",month:"月",day:"日",monthText:"${year}年 ${month}",months:{1:"1月",2:"2月",3:"3月",4:"4月",5:"5月",6:"6月",7:"7月",8:"8月",9:"9月",10:"10月",11:"11月",12:"12月"},fullMonths:{1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9",10:"10",11:"11",12:"12"},weeks:{Mon:"一",Tue:"二",Wed:"三",Thu:"四",Fri:"五",Sat:"六",Sun:"日"},localeFormatToken:{FORMAT_SWITCH_DATE:"yyyy-MM-dd"}},Navigation:{collapseText:"收起侧边栏",expandText:"展开侧边栏"},Popconfirm:{confirm:"确定",cancel:"取消"},Table:{emptyText:"暂无数据",pageText:"显示第 ${currentStart} 条-第 ${currentEnd} 条,共 ${total} 条"},Select:{emptyText:"暂无数据",createText:"创建"},Cascader:{emptyText:"暂无数据"},Tree:{emptyText:"暂无数据",searchPlaceholder:"搜索"},List:{emptyText:"暂无数据"},Calendar:{allDay:"全天",AM:"上午${time}时",PM:"下午${time}时",datestring:"日",remaining:"还有${remained}项"},Upload:{mainText:"点击上传文件或拖拽文件到这里",illegalTips:"不支持此类型文件",legalTips:"松手开始上传",retry:"重试",replace:"替换文件",clear:"清空",selectedFiles:"已选择文件",illegalSize:"文件尺寸不合法",fail:"上传失败"},TreeSelect:{searchPlaceholder:"搜索"},Typography:{copy:"复制",copied:"复制成功",expand:"展开",collapse:"收起"},Transfer:{emptyLeft:"暂无数据",emptySearch:"无搜索结果",emptyRight:"暂无内容,可从左侧勾选",placeholder:"搜索",clear:"清空",selectAll:"全选",clearSelectAll:"取消全选",total:"总个数:${total}",selected:"已选个数:${total}"},Form:{optional:"(可选)"},Image:{preview:"预览",loading:"加载中",loadError:"加载失败",prevTip:"上一张",nextTip:"下一张",zoomInTip:"放大",zoomOutTip:"缩小",rotateTip:"旋转",downloadTip:"下载",adaptiveTip:"适应页面",originTip:"原始尺寸"}},x9=q6e;class Bm extends Vt.Component{renderChildren(t,s){const{componentName:o}=this.props;let i=t;t!=null&&t.code||(i=x9);const a=ro(x9,"dateFnsLocale"),n=ro(i,"dateFnsLocale",a);return s(i[o],i.code,n)}render(){const{children:t}=this.props;return ct.createElement(by.Consumer,null,s=>{let{locale:o}=s;return ct.createElement(ufe.Consumer,null,i=>this.renderChildren(o||i,t))})}}Bm.propTypes={componentName:be.string.isRequired,children:be.any};Bm.defaultProps={componentName:""};const Y6e="semi";var X6e=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{svg:s,spin:o=!1,rotate:i,style:a,className:n,prefixCls:u=Y6e,type:f,size:e="default"}=r,y=X6e(r,["svg","spin","rotate","style","className","prefixCls","type","size"]),_=ds(`${u}-icon`,{[`${u}-icon-extra-small`]:e==="extra-small",[`${u}-icon-small`]:e==="small",[`${u}-icon-default`]:e==="default",[`${u}-icon-large`]:e==="large",[`${u}-icon-extra-large`]:e==="extra-large",[`${u}-icon-spinning`]:o===!0,[`${u}-icon-${f}`]:!!f},n),T={};return Number.isSafeInteger(i)&&(T.transform=`rotate(${i}deg)`),Object.assign(T,a),ct.createElement("span",Object.assign({role:"img",ref:t,"aria-label":f,className:_,style:T},y),s)});ffe.elementType="Icon";const qu=(r,t)=>{const s=ct.forwardRef((o,i)=>ct.createElement(ffe,Object.assign({svg:ct.createElement(r),type:t,ref:i},o)));return s.elementType="Icon",s};function Z6e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23 12C23 18.0751 18.0751 23 12 23C5.92487 23 1 18.0751 1 12C1 5.92487 5.92487 1 12 1C18.0751 1 23 5.92487 23 12ZM13.5 17.5C13.5 16.6716 12.8284 16 12 16C11.1716 16 10.5 16.6716 10.5 17.5C10.5 18.3284 11.1716 19 12 19C12.8284 19 13.5 18.3284 13.5 17.5ZM12 5C10.9138 5 10.0507 5.91244 10.1109 6.99692L10.4168 12.5023C10.4635 13.3426 11.1584 14 12 14C12.8416 14 13.5365 13.3426 13.5832 12.5023L13.8891 6.99692C13.9493 5.91244 13.0862 5 12 5Z",fill:"currentColor"}))}const J6e=qu(Z6e,"alert_circle"),GT=J6e;function eFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.2268 2.3986L1.52616 19.0749C0.831449 20.4064 1.79747 22 3.29933 22H20.7007C22.2025 22 23.1686 20.4064 22.4739 19.0749L13.7732 2.3986C13.0254 0.965441 10.9746 0.965442 10.2268 2.3986ZM13.1415 14.0101C13.0603 14.5781 12.5739 15 12.0001 15C11.4263 15 10.9398 14.5781 10.8586 14.0101L10.2829 9.97992C10.1336 8.93495 10.9445 8.00002 12.0001 8.00002C13.0556 8.00002 13.8665 8.93495 13.7172 9.97992L13.1415 14.0101ZM13.5001 18.5C13.5001 19.3284 12.8285 20 12.0001 20C11.1716 20 10.5001 19.3284 10.5001 18.5C10.5001 17.6716 11.1716 17 12.0001 17C12.8285 17 13.5001 17.6716 13.5001 18.5Z",fill:"currentColor"}))}const tFe=qu(eFe,"alert_triangle"),WT=tFe;function nFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23 12C23 12.8284 22.3284 13.5 21.5 13.5L6.12132 13.5L12.5607 19.9393C13.1464 20.5251 13.1464 21.4749 12.5607 22.0607C11.9749 22.6464 11.0251 22.6464 10.4393 22.0607L1.43934 13.0607C0.853554 12.4749 0.853554 11.5251 1.43934 10.9393L10.4393 1.93934C11.0251 1.35355 11.9749 1.35355 12.5607 1.93934C13.1464 2.52513 13.1464 3.47487 12.5607 4.06066L6.12132 10.5L21.5 10.5C22.3284 10.5 23 11.1716 23 12Z",fill:"currentColor"}))}const rFe=qu(nFe,"arrow_left"),sFe=rFe;function oFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 12C1 11.1716 1.67157 10.5 2.5 10.5L17.8787 10.5L11.4393 4.06066C10.8536 3.47487 10.8536 2.52513 11.4393 1.93934C12.0251 1.35355 12.9749 1.35355 13.5607 1.93934L22.5607 10.9393C23.1464 11.5251 23.1464 12.4749 22.5607 13.0607L13.5607 22.0607C12.9749 22.6464 12.0251 22.6464 11.4393 22.0607C10.8536 21.4749 10.8536 20.5251 11.4393 19.9393L17.8787 13.5L2.5 13.5C1.67157 13.5 1 12.8284 1 12Z",fill:"currentColor"}))}const iFe=qu(oFe,"arrow_right"),aFe=iFe;function lFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M17.549 15.659L12.753 21.139C12.6591 21.2464 12.5434 21.3325 12.4135 21.3915C12.2836 21.4505 12.1427 21.481 12 21.481C11.8574 21.481 11.7164 21.4505 11.5865 21.3915C11.4566 21.3325 11.3409 21.2464 11.247 21.139L6.45101 15.659C5.88501 15.011 6.34501 14 7.20401 14H16.796C17.656 14 18.115 15.012 17.549 15.659Z",fill:"currentColor"}))}const uFe=qu(lFe,"caretdown"),$6=uFe;function cFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M6.45096 8.34102L11.247 2.86102C11.3408 2.75361 11.4566 2.66753 11.5865 2.60854C11.7163 2.54956 11.8573 2.51904 12 2.51904C12.1426 2.51904 12.2836 2.54956 12.4135 2.60854C12.5433 2.66753 12.6591 2.75361 12.753 2.86102L17.549 8.34102C18.115 8.98802 17.655 10 16.796 10H7.20396C6.34396 10 5.88496 8.98802 6.45096 8.34102Z",fill:"currentColor"}))}const fFe=qu(cFe,"caretup"),dFe=fFe;function hFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M5 12.5C5 11.6716 5.67157 11 6.5 11H17.5C18.3284 11 19 11.6716 19 12.5C19 13.3284 18.3284 14 17.5 14H6.5C5.67157 14 5 13.3284 5 12.5Z",fill:"currentColor"}))}const AFe=qu(hFe,"checkbox_indeterminate"),pFe=AFe;function mFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.4111 7.30848C18.0692 7.81171 18.1947 8.75312 17.6915 9.41119L11.1915 17.9112C10.909 18.2806 10.4711 18.4981 10.0061 18.5C9.54105 18.5019 9.10143 18.288 8.81592 17.9209L5.31592 13.4209C4.80731 12.767 4.92512 11.8246 5.57904 11.316C6.23296 10.8074 7.17537 10.9252 7.68398 11.5791L9.98988 14.5438L15.3084 7.58884C15.8116 6.93077 16.7531 6.80525 17.4111 7.30848Z",fill:"currentColor"}))}const gFe=qu(mFe,"checkbox_tick"),cw=gFe;function bFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.08045 7.59809C4.66624 7.01231 5.61599 7.01231 6.20177 7.59809L11.8586 13.2549L17.5155 7.59809C18.1013 7.01231 19.051 7.01231 19.6368 7.59809C20.2226 8.18388 20.2226 9.13363 19.6368 9.71941L12.9193 16.4369C12.3335 17.0227 11.3838 17.0227 10.798 16.4369L4.08045 9.71941C3.49467 9.13363 3.49467 8.18388 4.08045 7.59809Z",fill:"currentColor"}))}const vFe=qu(bFe,"chevron_down"),qT=vFe;function yFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M16.2782 4.23933C16.864 4.82511 16.864 5.77486 16.2782 6.36065L10.6213 12.0175L16.2782 17.6744C16.864 18.2601 16.864 19.2099 16.2782 19.7957C15.6924 20.3815 14.7426 20.3815 14.1569 19.7957L7.43934 13.0782C6.85355 12.4924 6.85355 11.5426 7.43934 10.9568L14.1569 4.23933C14.7426 3.65354 15.6924 3.65354 16.2782 4.23933Z",fill:"currentColor"}))}const wFe=qu(yFe,"chevron_left"),Xz=wFe;function CFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.43934 19.7957C6.85355 19.2099 6.85355 18.2601 7.43934 17.6744L13.0962 12.0175L7.43934 6.36065C6.85355 5.77486 6.85355 4.82511 7.43934 4.23933C8.02513 3.65354 8.97487 3.65354 9.56066 4.23933L16.2782 10.9568C16.864 11.5426 16.864 12.4924 16.2782 13.0782L9.56066 19.7957C8.97487 20.3815 8.02513 20.3815 7.43934 19.7957Z",fill:"currentColor"}))}const EFe=qu(CFe,"chevron_right"),YT=EFe;function LFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.637 16.4369C19.0513 17.0227 18.1015 17.0227 17.5157 16.4369L11.8589 10.7801L6.20202 16.4369C5.61623 17.0227 4.66648 17.0227 4.0807 16.4369C3.49491 15.8511 3.49491 14.9014 4.0807 14.3156L10.7982 7.59809C11.384 7.01231 12.3337 7.01231 12.9195 7.59809L19.637 14.3156C20.2228 14.9014 20.2228 15.8511 19.637 16.4369Z",fill:"currentColor"}))}const SFe=qu(LFe,"chevron_up"),Zz=SFe;function xFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.0352 16.8626C16.4597 17.4585 15.5101 17.4751 14.9142 16.8996L12.0368 14.121L9.25822 16.9984C8.68274 17.5943 7.73314 17.6109 7.13722 17.0354C6.5413 16.4599 6.52472 15.5103 7.1002 14.9144L9.87883 12.037L7.00147 9.2584C6.40555 8.68293 6.38897 7.73332 6.96445 7.1374C7.53992 6.54148 8.48953 6.52491 9.08545 7.10038L11.9628 9.87901L14.7414 7.00165C15.3169 6.40573 16.2665 6.38916 16.8624 6.96463C17.4584 7.54011 17.4749 8.48971 16.8995 9.08563L14.1208 11.963L16.9982 14.7416C17.5941 15.3171 17.6107 16.2667 17.0352 16.8626Z",fill:"currentColor"}))}const _Fe=qu(xFe,"clear"),XT=_Fe;function TFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M17.6568 19.7782C18.2426 20.3639 19.1924 20.3639 19.7782 19.7782C20.3639 19.1924 20.3639 18.2426 19.7782 17.6568L14.1213 12L19.7782 6.34313C20.3639 5.75734 20.3639 4.8076 19.7782 4.22181C19.1924 3.63602 18.2426 3.63602 17.6568 4.22181L12 9.87866L6.34313 4.22181C5.75734 3.63602 4.8076 3.63602 4.22181 4.22181C3.63602 4.8076 3.63602 5.75734 4.22181 6.34313L9.87866 12L4.22181 17.6568C3.63602 18.2426 3.63602 19.1924 4.22181 19.7782C4.8076 20.3639 5.75734 20.3639 6.34313 19.7782L12 14.1213L17.6568 19.7782Z",fill:"currentColor"}))}const NFe=qu(TFe,"close"),GC=NFe;function IFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M7 4C7 2.89543 7.89543 2 9 2H20C21.1046 2 22 2.89543 22 4V15C22 16.1046 21.1046 17 20 17H19V8C19 6 18 5 16 5H7V4Z",fill:"currentColor"}),Vt.createElement("path",{d:"M5 7C3.89543 7 3 7.89543 3 9V19C3 20.1046 3.89543 21 5 21H15C16.1046 21 17 20.1046 17 19V9C17 7.89543 16.1046 7 15 7H5Z",fill:"currentColor"}))}const OFe=qu(IFe,"copy"),RFe=OFe;function BFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.61612 19.1161C3.12796 19.6043 3.12796 20.3957 3.61612 20.8839C4.10427 21.372 4.89573 21.372 5.38388 20.8839L12.5 13.7678L19.6161 20.8839C20.1043 21.372 20.8957 21.372 21.3839 20.8839C21.872 20.3957 21.872 19.6043 21.3839 19.1161L14.2678 12L21.3839 4.88389C21.872 4.39573 21.872 3.60427 21.3839 3.11612C20.8957 2.62796 20.1043 2.62796 19.6161 3.11612L12.5 10.2322L5.38388 3.11612C4.89573 2.62796 4.10427 2.62796 3.61612 3.11612C3.12796 3.60427 3.12796 4.39573 3.61612 4.88388L10.7322 12L3.61612 19.1161Z",fill:"currentColor"}))}const kFe=qu(BFe,"cross_stroked"),PFe=kFe;function DFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10 5V4H14V5H10ZM8 5V3C8 2.44772 8.44772 2 9 2H15C15.5523 2 16 2.44772 16 3V5H19H20C20.5523 5 21 5.44772 21 6C21 6.55228 20.5523 7 20 7H19V21C19 21.5523 18.5523 22 18 22H6C5.44772 22 5 21.5523 5 21V7H4C3.44772 7 3 6.55228 3 6C3 5.44772 3.44772 5 4 5H5H8ZM15 7H9H7V20H17V7H15ZM9 9.5C9 9.22386 9.22386 9 9.5 9H10.5C10.7761 9 11 9.22386 11 9.5V16.5C11 16.7761 10.7761 17 10.5 17H9.5C9.22386 17 9 16.7761 9 16.5V9.5ZM13 9.5C13 9.22386 13.2239 9 13.5 9H14.5C14.7761 9 15 9.22386 15 9.5V16.5C15 16.7761 14.7761 17 14.5 17H13.5C13.2239 17 13 16.7761 13 16.5V9.5Z",fill:"currentColor"}))}const FFe=qu(DFe,"delete_stroked"),Hv=FFe;function MFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.8395 8.05827C17.1837 5.16226 14.5944 3 11.5 3C7.91015 3 5 5.91015 5 9.5C5 10.0204 5.06115 10.5264 5.17665 11.0114C2.84229 11.1772 1 13.1234 1 15.5C1 17.9853 3.01469 20 5.49995 20H17C20.3137 20 23 17.3137 23 14C23 10.9712 20.7558 8.46659 17.8395 8.05827ZM11.6799 17.7333C11.8653 17.8878 12.1347 17.8878 12.3201 17.7333L17.4695 13.4421C17.6492 13.2924 17.5433 13 17.3095 13H14V9.5C14 9.22386 13.7761 9 13.5 9H10.5C10.2239 9 10 9.22386 10 9.5V13H6.69051C6.45669 13 6.35084 13.2924 6.53047 13.4421L11.6799 17.7333Z",fill:"currentColor"}))}const UFe=qu(MFe,"download"),$Fe=UFe;function jFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M14.4999 4.49994L19.4999 9.49994L21.5857 7.41416C22.3667 6.63311 22.3667 5.36678 21.5857 4.58573L19.4141 2.41415C18.6331 1.63311 17.3667 1.63311 16.5857 2.41416L14.4999 4.49994Z",fill:"currentColor"}),Vt.createElement("path",{d:"M2.24715 21.1346L3.92871 15.2491C3.9754 15.0857 4.06296 14.9369 4.18313 14.8167L12.9999 5.99994L17.9999 10.9999L9.18313 19.8167C9.06296 19.9369 8.91415 20.0244 8.75074 20.0711L2.86527 21.7527C2.48809 21.8605 2.13938 21.5117 2.24715 21.1346Z",fill:"currentColor"}))}const HFe=qu(jFe,"edit"),j6=HFe;function QFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.7071 3.70711C22.0976 3.31658 22.0976 2.68342 21.7071 2.29289C21.3166 1.90237 20.6834 1.90237 20.2929 2.29289L17.3135 5.27233C15.8114 4.50566 14.0321 4 12 4C5 4 1 10 1 12C1 13.1757 2.38219 15.7335 4.94345 17.6423L2.29289 20.2929C1.90237 20.6834 1.90237 21.3166 2.29289 21.7071C2.68342 22.0976 3.31658 22.0976 3.70711 21.7071L21.7071 3.70711ZM7.8284 14.7574L9.29237 13.2934C9.10495 12.9018 9 12.4631 9 12C9 10.3431 10.3431 9 12 9C12.4631 9 12.9018 9.10495 13.2934 9.29237L14.7574 7.8284C13.967 7.30488 13.0191 7 12 7C9.23858 7 7 9.23858 7 12C7 13.0191 7.30488 13.967 7.8284 14.7574Z",fill:"currentColor"}),Vt.createElement("path",{d:"M12 20C10.7789 20 9.64914 19.8174 8.61594 19.5054L11.1871 16.9342C11.4516 16.9775 11.7232 17 12 17C14.7614 17 17 14.7614 17 12C17 11.7232 16.9775 11.4516 16.9342 11.1871L20.5032 7.61808C22.1342 9.27317 23 11.0695 23 12C23 14 19 20 12 20Z",fill:"currentColor"}))}const KFe=qu(QFe,"eye_closed_solid"),zFe=KFe;function VFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 4C5 4 1 10 1 12C1 14 5 20 12 20C19 20 23 14 23 12C23 10 19 4 12 4ZM17 12C17 14.7614 14.7614 17 12 17C9.23858 17 7 14.7614 7 12C7 9.23858 9.23858 7 12 7C14.7614 7 17 9.23858 17 12ZM12 15C13.6569 15 15 13.6569 15 12C15 10.3431 13.6569 9 12 9C10.3431 9 9 10.3431 9 12C9 13.6569 10.3431 15 12 15Z",fill:"currentColor"}))}const GFe=qu(VFe,"eye_opened"),dfe=GFe;function WFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C12 1.44772 11.5523 1 11 1H6C4.89543 1 4 1.89543 4 3V21C4 22.1046 4.89543 23 6 23H18C19.1046 23 20 22.1046 20 21V10C20 9.44772 19.5523 9 19 9H14C12.8954 9 12 8.10457 12 7V2ZM7 8C7 7.44772 7.44772 7 8 7H9C9.55228 7 10 7.44772 10 8C10 8.55228 9.55228 9 9 9H8C7.44772 9 7 8.55228 7 8ZM7 13C7 12.4477 7.44772 12 8 12H16C16.5523 12 17 12.4477 17 13C17 13.5523 16.5523 14 16 14H8C7.44772 14 7 13.5523 7 13ZM8 17C7.44772 17 7 17.4477 7 18C7 18.5523 7.44772 19 8 19H16C16.5523 19 17 18.5523 17 18C17 17.4477 16.5523 17 16 17H8ZM19.0686 7.49999H14.5C13.9477 7.49999 13.5 7.05228 13.5 6.49999V1.93136C13.5 1.21864 14.3617 0.861707 14.8657 1.36568L19.6343 6.13431C20.1383 6.63828 19.7814 7.49999 19.0686 7.49999Z",fill:"currentColor"}))}const qFe=qu(WFe,"file"),_9=qFe;function YFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1.0929 2.57912C1.25675 2.22596 1.61069 2 2.00001 2H22C22.3893 2 22.7433 2.22596 22.9071 2.57912C23.071 2.93229 23.015 3.34845 22.7636 3.64573L14.5654 12.8261V21C14.5654 21.3466 14.386 21.6684 14.0911 21.8507C13.7963 22.0329 13.4282 22.0494 13.1182 21.8944L10.0528 19.8944C9.71401 19.725 9.5 19.3788 9.5 19V12.8261L1.23644 3.64573C0.985045 3.34845 0.929036 2.93229 1.0929 2.57912Z",fill:"currentColor"}))}const XFe=qu(YFe,"filter"),ZFe=XFe;function JFe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M5 2C3.34315 2 2 3.34315 2 5V8H22C22 6 21 4 19 4H12.5523C11.8711 4 11.2102 3.76816 10.6783 3.34261L9.54783 2.43826C9.1932 2.15456 8.75258 2 8.29844 2H5Z",fill:"currentColor"}),Vt.createElement("path",{d:"M22 10H2V19C2 20.6569 3.34315 22 5 22H19C20.6569 22 22 20.6569 22 19V10Z",fill:"currentColor"}))}const e7e=qu(JFe,"folder"),t7e=e7e;function n7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 5C2 3.34315 3.34315 2 5 2H8.29844C8.75258 2 9.1932 2.15456 9.54783 2.43826L10.6783 3.34261C11.2102 3.76816 11.8711 4 12.5523 4H18C20 4 21 6 21 8H7.53361C6.62889 8 5.83683 8.60735 5.6021 9.48109L2.57151 20.7617C2.21202 20.2671 2 19.6583 2 19V5ZM22.1667 10H9.5C8.61111 10 7.82889 10.5867 7.58 11.44L4.87333 20.72C4.68667 21.36 5.16667 22 5.83333 22H18.5C19.3889 22 20.1711 21.4133 20.42 20.56L23.1267 11.28C23.3133 10.64 22.8333 10 22.1667 10Z",fill:"currentColor"}))}const r7e=qu(n7e,"folder_open"),s7e=r7e;function o7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M12.0101 1C5.92171 1 1 5.92171 1 12.0101C1 16.8771 4.15354 20.9967 8.5284 22.455C9.07526 22.5644 9.27577 22.218 9.27577 21.9264C9.27577 21.6712 9.25754 20.7962 9.25754 19.8848C6.19514 20.541 5.55714 18.5723 5.55714 18.5723C5.06497 17.2963 4.33583 16.9682 4.33583 16.9682C3.33326 16.2938 4.40874 16.2938 4.40874 16.2938C5.52069 16.3667 6.104 17.4239 6.104 17.4239C7.08834 19.101 8.67423 18.627 9.31223 18.3354C9.40337 17.6245 9.69503 17.1323 10.0049 16.8589C7.56229 16.6037 4.99206 15.6558 4.99206 11.4267C4.99206 10.2237 5.42954 9.23931 6.12223 8.47371C6.01286 8.20028 5.63006 7.07011 6.2316 5.55714C6.2316 5.55714 7.16126 5.26548 9.25754 6.68731C10.1325 6.45034 11.0804 6.32274 12.0101 6.32274C12.9397 6.32274 13.8876 6.45034 14.7626 6.68731C16.8589 5.26548 17.7885 5.55714 17.7885 5.55714C18.3901 7.07011 18.0073 8.20028 17.8979 8.47371C18.6088 9.23931 19.0281 10.2237 19.0281 11.4267C19.0281 15.6558 16.4578 16.5854 13.997 16.8589C14.398 17.2052 14.7443 17.8614 14.7443 18.9004C14.7443 20.377 14.7261 21.5618 14.7261 21.9264C14.7261 22.218 14.9266 22.5644 15.4735 22.455C19.8483 20.9967 23.0019 16.8771 23.0019 12.0101C23.0201 5.92171 18.0802 1 12.0101 1Z",fill:"currentColor"}),Vt.createElement("path",{d:"M5.17419 16.8042C5.15596 16.8589 5.06482 16.8771 4.99191 16.8406C4.91899 16.8042 4.86431 16.7313 4.90076 16.6766C4.91899 16.6219 5.01014 16.6037 5.08305 16.6401C5.15596 16.6766 5.19242 16.7495 5.17419 16.8042ZM5.61168 17.2964C5.55699 17.351 5.44762 17.3146 5.39294 17.2417C5.32002 17.1688 5.30179 17.0594 5.35648 17.0047C5.41116 16.95 5.50231 16.9865 5.57522 17.0594C5.64814 17.1505 5.66636 17.2599 5.61168 17.2964ZM6.04916 17.9344C5.97625 17.989 5.86688 17.9344 5.81219 17.8432C5.73928 17.7521 5.73928 17.6245 5.81219 17.588C5.88511 17.5333 5.99448 17.588 6.04916 17.6792C6.12208 17.7703 6.12208 17.8797 6.04916 17.9344ZM6.65071 18.5541C6.59602 18.627 6.46842 18.6088 6.35905 18.5177C6.26791 18.4265 6.23145 18.2989 6.30436 18.2442C6.35905 18.1713 6.48665 18.1896 6.59602 18.2807C6.68716 18.3536 6.70539 18.4812 6.65071 18.5541ZM7.47099 18.9005C7.45276 18.9916 7.32516 19.0281 7.19756 18.9916C7.06996 18.9552 6.99705 18.8458 7.01528 18.7729C7.03351 18.6817 7.16111 18.6453 7.28871 18.6817C7.41631 18.7182 7.48922 18.8093 7.47099 18.9005ZM8.36419 18.9734C8.36419 19.0645 8.25482 19.1374 8.12722 19.1374C7.99962 19.1374 7.89025 19.0645 7.89025 18.9734C7.89025 18.8822 7.99962 18.8093 8.12722 18.8093C8.25482 18.8093 8.36419 18.8822 8.36419 18.9734ZM9.20271 18.8276C9.22093 18.9187 9.12979 19.0098 9.00219 19.0281C8.87459 19.0463 8.76522 18.9916 8.74699 18.9005C8.72876 18.8093 8.81991 18.7182 8.94751 18.7C9.07511 18.6817 9.18448 18.7364 9.20271 18.8276Z",fill:"currentColor"}))}const i7e=qu(o7e,"github_logo"),a7e=i7e;function l7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M9 7C10.1046 7 11 6.10457 11 5C11 3.89543 10.1046 3 9 3C7.89543 3 7 3.89543 7 5C7 6.10457 7.89543 7 9 7Z",fill:"currentColor"}),Vt.createElement("path",{d:"M9 14C10.1046 14 11 13.1046 11 12C11 10.8954 10.1046 10 9 10C7.89543 10 7 10.8954 7 12C7 13.1046 7.89543 14 9 14Z",fill:"currentColor"}),Vt.createElement("path",{d:"M11 19C11 20.1046 10.1046 21 9 21C7.89543 21 7 20.1046 7 19C7 17.8954 7.89543 17 9 17C10.1046 17 11 17.8954 11 19Z",fill:"currentColor"}),Vt.createElement("path",{d:"M15 7C16.1046 7 17 6.10457 17 5C17 3.89543 16.1046 3 15 3C13.8954 3 13 3.89543 13 5C13 6.10457 13.8954 7 15 7Z",fill:"currentColor"}),Vt.createElement("path",{d:"M17 12C17 13.1046 16.1046 14 15 14C13.8954 14 13 13.1046 13 12C13 10.8954 13.8954 10 15 10C16.1046 10 17 10.8954 17 12Z",fill:"currentColor"}),Vt.createElement("path",{d:"M15 21C16.1046 21 17 20.1046 17 19C17 17.8954 16.1046 17 15 17C13.8954 17 13 17.8954 13 19C13 20.1046 13.8954 21 15 21Z",fill:"currentColor"}))}const u7e=qu(l7e,"handle"),c7e=u7e;function f7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM11.8281 14.6094C10.9688 14.6094 10.5391 14.0723 10.5391 13.3691C10.5391 12.3242 11.0566 11.6504 12.2676 10.7324C12.2894 10.7158 12.3111 10.6993 12.3326 10.6829C13.1573 10.0555 13.7324 9.61807 13.7324 8.82812C13.7324 7.93945 12.9023 7.42188 11.9746 7.42188C11.2129 7.42188 10.627 7.70508 10.168 8.30078C9.83594 8.64258 9.57227 8.82812 9.12305 8.82812C8.38086 8.82812 8 8.31055 8 7.71484C8 7.10938 8.3418 6.49414 8.87891 6.02539C9.60156 5.40039 10.7539 5 12.2773 5C14.9922 5 16.8965 6.33789 16.8965 8.64258C16.8965 10.3223 15.8906 11.1328 14.709 11.9531C13.9082 12.5391 13.5273 12.8809 13.2246 13.5742L13.2238 13.5756C12.8922 14.1609 12.638 14.6094 11.8281 14.6094ZM11.8086 18.7695C10.8711 18.7695 10.0996 18.1641 10.0996 17.2266C10.0996 16.2891 10.8711 15.6836 11.8086 15.6836C12.7461 15.6836 13.5078 16.2891 13.5078 17.2266C13.5078 18.1641 12.7461 18.7695 11.8086 18.7695Z",fill:"currentColor"}))}const d7e=qu(f7e,"help_circle"),h7e=d7e;function A7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM14 7C14 8.10457 13.1046 9 12 9C10.8954 9 10 8.10457 10 7C10 5.89543 10.8954 5 12 5C13.1046 5 14 5.89543 14 7ZM9 10.75C9 10.3358 9.33579 10 9.75 10H12.5C13.0523 10 13.5 10.4477 13.5 11V16.5H14.25C14.6642 16.5 15 16.8358 15 17.25C15 17.6642 14.6642 18 14.25 18H9.75C9.33579 18 9 17.6642 9 17.25C9 16.8358 9.33579 16.5 9.75 16.5H10.5V11.5H9.75C9.33579 11.5 9 11.1642 9 10.75Z",fill:"currentColor"}))}const p7e=qu(A7e,"info_circle"),H6=p7e;function m7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.3333 4C12.7277 4 10.6667 6.04265 10.6667 8.5C10.6667 9.11949 10.7959 9.70779 11.0295 10.2431L11.2965 10.855L5 17.4028V20H7.12121V17.5H9.69697V15H12.2727V12.6251H13.2727C13.3732 12.6251 13.4595 12.6407 13.4805 12.6445L13.4829 12.6449C13.519 12.6514 13.5545 12.6591 13.5832 12.6655C13.6412 12.6786 13.7115 12.6958 13.781 12.7131L13.8406 12.7279C13.9737 12.761 14.1275 12.7993 14.2956 12.8377C14.7073 12.9318 15.0949 13 15.3333 13C17.939 13 20 10.9574 20 8.5C20 6.04265 17.939 4 15.3333 4ZM8.66667 8.5C8.66667 4.88222 11.6798 2 15.3333 2C18.9869 2 22 4.88222 22 8.5C22 12.1178 18.9869 15 15.3333 15C14.9962 15 14.6124 14.9432 14.2727 14.8773V17H11.697V19.5H9.12121V22H3V16.5972L8.957 10.4024C8.76819 9.80013 8.66667 9.16107 8.66667 8.5ZM17 8.5C17 9.32843 16.3284 10 15.5 10C14.6716 10 14 9.32843 14 8.5C14 7.67157 14.6716 7 15.5 7C16.3284 7 17 7.67157 17 8.5Z",fill:"currentColor"}))}const g7e=qu(m7e,"key_stroked"),hfe=g7e;function b7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19.6402 2.23177C19.2159 1.87821 18.5853 1.93553 18.2318 2.35981C17.8782 2.78409 17.9355 3.41465 18.3598 3.76822L19.238 4.5H8C4.14834 4.5 1 7.62032 1 11.5C1 12.0523 1.44772 12.5 2 12.5C2.55228 12.5 3 12.0523 3 11.5C3 8.72988 5.2479 6.5 8 6.5H19.2379L18.3598 7.23177C17.9355 7.58534 17.8782 8.2159 18.2318 8.64018C18.5853 9.06446 19.2159 9.12178 19.6402 8.76822L22.6335 6.27377C22.8572 6.09037 23 5.81186 23 5.49999C23 5.25886 22.913 5.02785 22.758 4.84779C22.7266 4.81121 22.6923 4.77674 22.6554 4.74471C22.6485 4.7387 22.6415 4.73278 22.6344 4.72696L19.6402 2.23177ZM22 11C22.5523 11 23 11.4477 23 12C23 15.8797 19.8517 19 16 19H4.76206L5.64018 19.7318C6.06446 20.0853 6.12179 20.7159 5.76822 21.1402C5.41466 21.5645 4.78409 21.6218 4.35982 21.2682L1.36616 18.7735C1.35303 18.7627 1.34018 18.7516 1.32762 18.7402C1.30033 18.7154 1.27441 18.6891 1.25 18.6615C1.09441 18.4852 1 18.2536 1 18C1 17.7456 1.09496 17.5135 1.25136 17.337C1.27461 17.3108 1.29933 17.2856 1.32545 17.2618C1.33839 17.2499 1.35165 17.2384 1.3652 17.2273L4.35982 14.7318C4.78409 14.3782 5.41466 14.4355 5.76822 14.8598C6.12179 15.2841 6.06446 15.9147 5.64018 16.2682L4.76204 17H16C18.7521 17 21 14.7701 21 12C21 11.4477 21.4477 11 22 11ZM7 9.5C7 9.22386 7.22386 9 7.5 9H13.5C13.7761 9 14 9.22386 14 9.5V10.5C14 10.7761 13.7761 11 13.5 11H7.5C7.22386 11 7 10.7761 7 10.5V9.5ZM15.5 9C15.2239 9 15 9.22386 15 9.5V10.5C15 10.7761 15.2239 11 15.5 11H17.5C17.7761 11 18 10.7761 18 10.5V9.5C18 9.22386 17.7761 9 17.5 9H15.5ZM7 13.5C7 13.2239 7.22386 13 7.5 13H10.5C10.7761 13 11 13.2239 11 13.5V14.5C11 14.7761 10.7761 15 10.5 15H7.5C7.22386 15 7 14.7761 7 14.5V13.5ZM12.5 13C12.2239 13 12 13.2239 12 13.5V14.5C12 14.7761 12.2239 15 12.5 15H17.5C17.7761 15 18 14.7761 18 14.5V13.5C18 13.2239 17.7761 13 17.5 13H12.5Z",fill:"currentColor"}))}const v7e=qu(b7e,"loop_text_stroked"),y7e=v7e;function w7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("g",{opacity:.99},Vt.createElement("path",{d:"M2 19.5C2 18.6716 2.67157 18 3.5 18H20.5C21.3284 18 22 18.6716 22 19.5C22 20.3284 21.3284 21 20.5 21H3.5C2.67157 21 2 20.3284 2 19.5Z",fill:"currentColor"}),Vt.createElement("path",{d:"M2 12C2 11.1716 2.67157 10.5 3.5 10.5H20.5C21.3284 10.5 22 11.1716 22 12C22 12.8284 21.3284 13.5 20.5 13.5H3.5C2.67157 13.5 2 12.8284 2 12Z",fill:"currentColor"}),Vt.createElement("path",{d:"M2 4.5C2 3.67157 2.67157 3 3.5 3H20.5C21.3284 3 22 3.67157 22 4.5C22 5.32843 21.3284 6 20.5 6H3.5C2.67157 6 2 5.32843 2 4.5Z",fill:"currentColor"})))}const C7e=qu(w7e,"menu"),E7e=C7e;function L7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M2 12C2 11.1716 2.67157 10.5 3.5 10.5H20.5C21.3284 10.5 22 11.1716 22 12C22 12.8284 21.3284 13.5 20.5 13.5H3.5C2.67157 13.5 2 12.8284 2 12Z",fill:"currentColor"}))}const S7e=qu(L7e,"minus"),Afe=S7e;function x7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17 15C17.476 15 17.9408 14.9525 18.3901 14.862C17.296 17.3011 14.8464 19 12 19C8.13401 19 5 15.866 5 12C5 8.60996 7.40983 5.78277 10.6099 5.13803C10.218 6.01173 10 6.98041 10 8C10 11.866 13.134 15 17 15Z",fill:"currentColor"}))}const _7e=qu(x7e,"moon"),Jz=_7e;function T7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M7 12C7 13.3807 5.88071 14.5 4.5 14.5C3.11929 14.5 2 13.3807 2 12C2 10.6193 3.11929 9.5 4.5 9.5C5.88071 9.5 7 10.6193 7 12Z",fill:"currentColor"}),Vt.createElement("path",{d:"M14.5 12C14.5 13.3807 13.3807 14.5 12 14.5C10.6193 14.5 9.5 13.3807 9.5 12C9.5 10.6193 10.6193 9.5 12 9.5C13.3807 9.5 14.5 10.6193 14.5 12Z",fill:"currentColor"}),Vt.createElement("path",{d:"M19.5 14.5C20.8807 14.5 22 13.3807 22 12C22 10.6193 20.8807 9.5 19.5 9.5C18.1193 9.5 17 10.6193 17 12C17 13.3807 18.1193 14.5 19.5 14.5Z",fill:"currentColor"}))}const N7e=qu(T7e,"more"),ZT=N7e;function I7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18.273 4.27297C17.2423 3.24234 15.5714 3.24234 14.5407 4.27297L6.79074 12.023C5.06975 13.744 5.06975 16.5342 6.79074 18.2552C8.51172 19.9762 11.302 19.9762 13.023 18.2552L18.523 12.7552C19.0111 12.267 19.8026 12.267 20.2907 12.7552C20.7789 13.2434 20.7789 14.0348 20.2907 14.523L14.7907 20.023C12.0934 22.7203 7.72027 22.7203 5.02297 20.023C2.32568 17.3257 2.32568 12.9525 5.02297 10.2552L12.773 2.5052C14.7799 0.498263 18.0338 0.498268 20.0407 2.5052C22.0477 4.51214 22.0477 7.76603 20.0407 9.77297L12.7907 17.023C11.4742 18.3396 9.33955 18.3396 8.02297 17.023C6.70639 15.7064 6.70639 13.5718 8.02297 12.2552L13.523 6.7552C14.0111 6.26705 14.8026 6.26705 15.2907 6.7552C15.7789 7.24336 15.7789 8.03482 15.2907 8.52297L9.79074 14.023C9.45047 14.3632 9.45047 14.9149 9.79074 15.2552C10.131 15.5955 10.6827 15.5955 11.023 15.2552L18.273 8.0052C19.3036 6.97458 19.3036 5.3036 18.273 4.27297Z",fill:"currentColor"}))}const O7e=qu(I7e,"paperclip"),jN=O7e;function R7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M20.5 13.5C21.3284 13.5 22 12.8284 22 12C22 11.1716 21.3284 10.5 20.5 10.5L13.5 10.5L13.5 3.5C13.5 2.67157 12.8284 2 12 2C11.1716 2 10.5 2.67157 10.5 3.5L10.5 10.5L3.5 10.5C2.67157 10.5 2 11.1716 2 12C2 12.8284 2.67157 13.5 3.5 13.5L10.5 13.5V20.5C10.5 21.3284 11.1716 22 12 22C12.8284 22 13.5 21.3284 13.5 20.5V13.5L20.5 13.5Z",fill:"currentColor"}))}const B7e=qu(R7e,"plus"),e2=B7e;function k7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("circle",{cx:12,cy:12,r:5,fill:"currentColor"}))}const P7e=qu(k7e,"radio"),D7e=P7e;function F7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M1 6C1 4.89543 1.89543 4 3 4H21C22.1046 4 23 4.89543 23 6V18C23 19.1046 22.1046 20 21 20H3C1.89543 20 1 19.1046 1 18V6ZM21 6L3 6V18H21V6ZM5 9C5 8.44772 5.44772 8 6 8H7.5C8.05228 8 8.5 8.44772 8.5 9V15C8.5 15.5523 8.05228 16 7.5 16C6.94772 16 6.5 15.5523 6.5 15V10H6C5.44772 10 5 9.55228 5 9ZM16 8C15.4477 8 15 8.44772 15 9C15 9.55228 15.4477 10 16 10H16.5V15C16.5 15.5523 16.9477 16 17.5 16C18.0523 16 18.5 15.5523 18.5 15V9C18.5 8.44772 18.0523 8 17.5 8H16ZM13 10C13 10.5523 12.5523 11 12 11C11.4477 11 11 10.5523 11 10C11 9.44772 11.4477 9 12 9C12.5523 9 13 9.44772 13 10ZM12 15C12.5523 15 13 14.5523 13 14C13 13.4477 12.5523 13 12 13C11.4477 13 11 13.4477 11 14C11 14.5523 11.4477 15 12 15Z",fill:"currentColor"}))}const M7e=qu(F7e,"real_size_stroked"),U7e=M7e;function $7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14.4393 2.43934C13.8536 3.02513 13.8536 3.97487 14.4393 4.56066L16.8787 7H9.25C5.1647 7 2 10.5796 2 14.5C2 18.4204 5.1647 22 9.25 22H12.5C13.3284 22 14 21.3284 14 20.5C14 19.6716 13.3284 19 12.5 19H9.25C6.98402 19 5 16.9308 5 14.5C5 12.0692 6.98402 10 9.25 10H16.8787L14.4393 12.4393C13.8536 13.0251 13.8536 13.9749 14.4393 14.5607C15.0251 15.1464 15.9749 15.1464 16.5607 14.5607L21.5607 9.56066C22.1464 8.97487 22.1464 8.02513 21.5607 7.43934L16.5607 2.43934C15.9749 1.85355 15.0251 1.85355 14.4393 2.43934Z",fill:"currentColor"}))}const j7e=qu($7e,"redo"),H7e=j7e;function Q7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.49993 11.9998C4.49993 7.85775 7.85775 4.49993 11.9998 4.49993C14.6403 4.49993 16.9645 5.86506 18.3012 7.9305L16.2939 7.52902C15.4815 7.36656 14.6913 7.89337 14.5288 8.7057C14.3664 9.51803 14.8932 10.3083 15.7055 10.4707L20.7055 11.4707C21.4643 11.6225 22.214 11.1721 22.4363 10.4309L23.9363 5.43095C24.1744 4.63747 23.7241 3.80126 22.9307 3.56321C22.1372 3.32517 21.301 3.77543 21.0629 4.56891L20.6287 6.01635C18.7332 3.28781 15.5765 1.49998 11.9998 1.49998C6.20092 1.49998 1.49998 6.20092 1.49998 11.9998C1.49998 17.7987 6.20092 22.4997 11.9998 22.4997C16.5739 22.4997 20.4611 19.5757 21.9018 15.4996C22.1779 14.7186 21.7685 13.8616 20.9874 13.5855C20.2064 13.3095 19.3494 13.7189 19.0733 14.4999C18.0431 17.4149 15.263 19.4997 11.9998 19.4997C7.85775 19.4997 4.49993 16.1419 4.49993 11.9998Z",fill:"currentColor"}))}const K7e=qu(Q7e,"refresh"),z7e=K7e;function V7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M14.2071 2.20711C14.5976 1.81658 14.5976 1.18342 14.2071 0.792893C13.8166 0.402369 13.1834 0.402369 12.7929 0.792893L10.2929 3.29289C9.90237 3.68342 9.90237 4.31658 10.2929 4.70711L12.7929 7.20711C13.1834 7.59763 13.8166 7.59763 14.2071 7.20711C14.5976 6.81658 14.5976 6.18342 14.2071 5.79289L13.4142 5H16C18.7614 5 21 7.23858 21 10V12C21 12.5523 21.4477 13 22 13C22.5523 13 23 12.5523 23 12V10C23 6.13401 19.866 3 16 3H13.4142L14.2071 2.20711Z",fill:"currentColor"}),Vt.createElement("path",{d:"M3 10C3 8.89543 3.89543 8 5 8H17C18.1046 8 19 8.89543 19 10V20C19 21.1046 18.1046 22 17 22H5C3.89543 22 3 21.1046 3 20V10Z",fill:"currentColor"}))}const G7e=qu(V7e,"rotate"),W7e=G7e;function q7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 4C20.1046 4 21 4.89543 21 6L21 9C21 10.1046 20.1046 11 19 11L5 11C3.89543 11 3 10.1046 3 9L3 6C3 4.89543 3.89543 4 5 4L19 4ZM19 9L19 6L5 6L5 9L19 9Z",fill:"currentColor"}),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M19 13C20.1046 13 21 13.8954 21 15L21 18C21 19.1046 20.1046 20 19 20L5 20C3.89543 20 3 19.1046 3 18L3 15C3 13.8954 3.89543 13 5 13L19 13ZM19 18L19 15L5 15L5 18L19 18Z",fill:"currentColor"}))}const Y7e=qu(q7e,"rows_stroked"),X7e=Y7e;function Z7e(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2 4C2 2.89543 2.89543 2 4 2H7H12H14.9608C15.4912 2 15.9999 2.21071 16.375 2.58579L21.4142 7.625C21.7893 8.00007 22 8.50878 22 9.03921V20C22 21.1046 21.1046 22 20 22H17H7H4C2.89543 22 2 21.1046 2 20V4ZM11 4H8V7H11V4ZM6 4V8C6 8.55228 6.44772 9 7 9H12C12.5523 9 13 8.55228 13 8V4H14.9608L20 9.03921V20H18V15C18 14.4477 17.5523 14 17 14H7C6.44772 14 6 14.4477 6 15V20H4V4H6ZM16 16V20H8V16H16Z",fill:"currentColor"}))}const J7e=qu(Z7e,"save_stroked"),eMe=J7e;function tMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.5 2C5.80558 2 2 5.80558 2 10.5C2 15.1944 5.80558 19 10.5 19C12.3054 19 13.9794 18.4371 15.356 17.4773L19.4393 21.5606C20.0251 22.1464 20.9749 22.1464 21.5606 21.5606C22.1464 20.9749 22.1464 20.0251 21.5606 19.4393L17.4773 15.356C18.4371 13.9794 19 12.3054 19 10.5C19 5.80558 15.1944 2 10.5 2ZM5 10.5C5 7.46243 7.46243 5 10.5 5C13.5376 5 16 7.46243 16 10.5C16 13.5376 13.5376 16 10.5 16C7.46243 16 5 13.5376 5 10.5Z",fill:"currentColor"}))}const nMe=qu(tMe,"search"),MC=nMe;function rMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M10.5 1.5C10.5 0.671573 11.1716 0 12 0C12.8284 0 13.5 0.671573 13.5 1.5V2.5C13.5 3.32843 12.8284 4 12 4C11.1716 4 10.5 3.32843 10.5 2.5V1.5Z",fill:"currentColor"}),Vt.createElement("path",{d:"M10.5 21.5C10.5 20.6716 11.1716 20 12 20C12.8284 20 13.5 20.6716 13.5 21.5V22.5C13.5 23.3284 12.8284 24 12 24C11.1716 24 10.5 23.3284 10.5 22.5V21.5Z",fill:"currentColor"}),Vt.createElement("path",{d:"M24 12C24 11.1716 23.3284 10.5 22.5 10.5H21.5C20.6716 10.5 20 11.1716 20 12C20 12.8284 20.6716 13.5 21.5 13.5H22.5C23.3284 13.5 24 12.8284 24 12Z",fill:"currentColor"}),Vt.createElement("path",{d:"M2.5 10.5C3.32843 10.5 4 11.1716 4 12C4 12.8284 3.32843 13.5 2.5 13.5H1.5C0.671573 13.5 0 12.8284 0 12C0 11.1716 0.671573 10.5 1.5 10.5H2.5Z",fill:"currentColor"}),Vt.createElement("path",{d:"M20.4853 3.51472C19.8995 2.92893 18.9497 2.92893 18.364 3.51472L17.6569 4.22182C17.0711 4.80761 17.0711 5.75736 17.6569 6.34314C18.2426 6.92893 19.1924 6.92893 19.7782 6.34314L20.4853 5.63604C21.0711 5.05025 21.0711 4.1005 20.4853 3.51472Z",fill:"currentColor"}),Vt.createElement("path",{d:"M4.22181 17.6569C4.8076 17.0711 5.75734 17.0711 6.34313 17.6569C6.92892 18.2426 6.92892 19.1924 6.34313 19.7782L5.63602 20.4853C5.05024 21.0711 4.10049 21.0711 3.5147 20.4853C2.92892 19.8995 2.92892 18.9497 3.5147 18.364L4.22181 17.6569Z",fill:"currentColor"}),Vt.createElement("path",{d:"M3.5147 3.51472C2.92891 4.1005 2.92891 5.05025 3.5147 5.63604L4.22181 6.34315C4.80759 6.92893 5.75734 6.92893 6.34313 6.34315C6.92891 5.75736 6.92891 4.80761 6.34313 4.22183L5.63602 3.51472C5.05023 2.92893 4.10049 2.92893 3.5147 3.51472Z",fill:"currentColor"}),Vt.createElement("path",{d:"M17.6569 19.7782C17.0711 19.1924 17.0711 18.2426 17.6569 17.6569C18.2426 17.0711 19.1924 17.0711 19.7782 17.6569L20.4853 18.364C21.0711 18.9497 21.0711 19.8995 20.4853 20.4853C19.8995 21.0711 18.9497 21.0711 18.364 20.4853L17.6569 19.7782Z",fill:"currentColor"}),Vt.createElement("path",{d:"M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19Z",fill:"currentColor"}))}const sMe=qu(rMe,"sun"),eV=sMe;function oMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.3516 4.2652C22.0336 4.73552 22.2052 5.66964 21.7348 6.35162L11.7348 20.8516C11.4765 21.2262 11.0622 21.4632 10.6084 21.4961C10.1546 21.529 9.71041 21.3541 9.40082 21.0207L2.90082 14.0207C2.33711 13.4136 2.37226 12.4645 2.97933 11.9008C3.5864 11.3371 4.53549 11.3723 5.0992 11.9793L10.3268 17.6091L19.2652 4.64842C19.7355 3.96644 20.6696 3.79487 21.3516 4.2652Z",fill:"currentColor"}))}const iMe=qu(oMe,"tick"),lO=iMe;function aMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 23C18.0751 23 23 18.0751 23 12C23 5.92487 18.0751 1 12 1C5.92487 1 1 5.92487 1 12C1 18.0751 5.92487 23 12 23ZM17.8831 9.82235L11.6854 17.4112C11.4029 17.7806 10.965 17.9981 10.5 18C10.035 18.0019 9.59533 17.788 9.30982 17.421L5.81604 13.4209C5.30744 12.767 5.42524 11.8246 6.07916 11.316C6.73308 10.8074 7.67549 10.9252 8.1841 11.5791L10.4838 14.0439L15.5 8C16.0032 7.34193 16.9446 7.21641 17.6027 7.71964C18.2608 8.22287 18.3863 9.16428 17.8831 9.82235Z",fill:"currentColor"}))}const lMe=qu(aMe,"tick_circle"),S4=lMe;function uMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M20.5598 9.65618L12.7546 18.6322C12.3559 19.0906 11.644 19.0906 11.2453 18.6322L3.4401 9.65618C2.8773 9.00895 3.33701 8 4.19471 8L19.8052 8C20.6629 8 21.1226 9.00895 20.5598 9.65618Z",fill:"currentColor"}))}const cMe=qu(uMe,"tree_triangle_down"),pfe=cMe;function fMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{d:"M9.65618 3.44015L18.6322 11.2454C19.0906 11.644 19.0906 12.356 18.6322 12.7546L9.65618 20.5598C9.00895 21.1226 8 20.6629 8 19.8052V4.19475C8 3.33705 9.00895 2.87734 9.65618 3.44015Z",fill:"currentColor"}))}const dMe=qu(fMe,"tree_triangle_right"),hMe=dMe;function AMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M9.56066 2.43934C10.1464 3.02513 10.1464 3.97487 9.56066 4.56066L7.12132 7H14.75C18.8353 7 22 10.5796 22 14.5C22 18.4204 18.8353 22 14.75 22H11.5C10.6716 22 10 21.3284 10 20.5C10 19.6716 10.6716 19 11.5 19H14.75C17.016 19 19 16.9308 19 14.5C19 12.0692 17.016 10 14.75 10H7.12132L9.56066 12.4393C10.1464 13.0251 10.1464 13.9749 9.56066 14.5607C8.97487 15.1464 8.02513 15.1464 7.43934 14.5607L2.43934 9.56066C1.85355 8.97487 1.85355 8.02513 2.43934 7.43934L7.43934 2.43934C8.02513 1.85355 8.97487 1.85355 9.56066 2.43934Z",fill:"currentColor"}))}const pMe=qu(AMe,"undo"),mMe=pMe;function gMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.8395 8.05827C17.1837 5.16226 14.5944 3 11.5 3C7.91015 3 5 5.91015 5 9.5C5 10.0204 5.06115 10.5264 5.17665 11.0114C2.84229 11.1772 1 13.1234 1 15.5C1 17.9853 3.01469 20 5.49995 20H17C20.3137 20 23 17.3137 23 14C23 10.9712 20.7558 8.46659 17.8395 8.05827ZM12.3201 8.26674C12.1347 8.11222 11.8653 8.11222 11.6799 8.26674L6.53047 12.5579C6.35084 12.7076 6.45669 13 6.69051 13H10V17.5C10 17.7761 10.2239 18 10.5 18H13.5C13.7761 18 14 17.7761 14 17.5V13H17.3095C17.5433 13 17.6492 12.7076 17.4695 12.5579L12.3201 8.26674Z",fill:"currentColor"}))}const bMe=qu(gMe,"upload"),vMe=bMe;function yMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.9998 12.0001C22.9998 18.0753 18.0749 23.0001 11.9998 23.0001C5.92463 23.0001 0.999756 18.0753 0.999756 12.0001C0.999756 5.92499 5.92463 1.00012 11.9998 1.00012C18.0749 1.00012 22.9998 5.92499 22.9998 12.0001ZM13.4998 17.5C13.4998 16.6718 12.8282 16.0001 11.9998 16.0001C11.1713 16.0001 10.4998 16.6718 10.4998 17.5C10.4998 18.3285 11.1713 19 11.9998 19C12.8282 19 13.4998 18.3285 13.4998 17.5ZM11.9998 5.00011C10.9136 5.00011 10.0505 5.91257 10.1107 6.99704L10.4166 12.5024C10.4632 13.3427 11.1582 14.0001 11.9998 14.0001C12.8413 14.0001 13.5363 13.3427 13.583 12.5024L13.8888 6.99704C13.9491 5.91257 13.0859 5.00011 11.9998 5.00011Z",fill:"currentColor"}))}const wMe=qu(yMe,"upload_error"),CMe=wMe;function EMe(r){return Vt.createElement("svg",Object.assign({viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",focusable:!1,"aria-hidden":!0},r),Vt.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M14 3C14 2.44772 14.4477 2 15 2H21C21.5523 2 22 2.44772 22 3V9C22 9.55229 21.5523 10 21 10C20.4477 10 20 9.55229 20 9V4H15C14.4477 4 14 3.55229 14 3ZM10 21C10 21.5523 9.55229 22 9 22H3C2.44772 22 2 21.5523 2 21V15C2 14.4477 2.44772 14 3 14C3.55228 14 4 14.4477 4 15L4 20H9C9.55229 20 10 20.4477 10 21ZM2 9C2 9.55228 2.44772 10 3 10C3.55229 10 4 9.55228 4 9L4 4L9 4C9.55229 4 10 3.55228 10 3C10 2.44771 9.55229 2 9 2H3C2.44772 2 2 2.44772 2 3V9ZM21 14C21.5523 14 22 14.4477 22 15V21C22 21.5523 21.5523 22 21 22H15C14.4477 22 14 21.5523 14 21C14 20.4477 14.4477 20 15 20H20V15C20 14.4477 20.4477 14 21 14ZM8.5 7.5C7.94772 7.5 7.5 7.94772 7.5 8.5V15.5C7.5 16.0523 7.94772 16.5 8.5 16.5H15.5C16.0523 16.5 16.5 16.0523 16.5 15.5V8.5C16.5 7.94772 16.0523 7.5 15.5 7.5H8.5ZM9.5 14.5V9.5H14.5V14.5H9.5Z",fill:"currentColor"}))}const LMe=qu(EMe,"window_adaption_stroked"),SMe=LMe,xMe={MAC_ENTER:3,BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,SHIFT:16,CTRL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,WIN_KEY_RIGHT:92,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,NUMLOCK:144,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,PERIOD:190,SLASH:191,APOSTROPHE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,WIN_KEY:224,MAC_FF_META:224,WIN_IME:229},tV="Enter",hg=xMe;function N1(r){return ro(r,"key")===tV}const NM=_6.PREFIX;class nV extends ct.PureComponent{constructor(t){super(t),this.copy=s=>{const{content:o,duration:i,onCopy:a}=this.props,n=CDe(o);a&&a(s,o,n),this.setCopied(o,i)},this.setCopied=(s,o)=>{this.setState({copied:!0,item:s}),this._timeId=setTimeout(()=>{this.resetCopied()},o*1e3)},this.resetCopied=()=>{this._timeId&&(clearTimeout(this._timeId),this._timeId=null,this.setState({copied:!1,item:""}))},this.renderSuccessTip=()=>{const{successTip:s}=this.props;return typeof s<"u"?s:ct.createElement(Bm,{componentName:"Typography"},o=>ct.createElement("span",null,ct.createElement(lO,null),o.copied))},this.renderCopyIcon=()=>{const{icon:s}=this.props,o={role:"button",tabIndex:0,onClick:this.copy,onKeyPress:a=>N1(a)&&this.copy(a)},i=ct.createElement("a",{className:`${NM}-action-copy-icon`},ct.createElement(RFe,Object.assign({onClick:this.copy},o)));return ct.isValidElement(s)?ct.cloneElement(s,o):i},this.state={copied:!1,item:""}}componentWillUnmount(){this._timeId&&(clearTimeout(this._timeId),this._timeId=null)}render(){const{style:t,className:s,forwardRef:o,copyTip:i}=this.props,{copied:a}=this.state,n=ds(s,{[`${NM}-action-copy`]:!a,[`${NM}-action-copied`]:a});return ct.createElement(Bm,{componentName:"Typography"},u=>ct.createElement("span",{style:Object.assign({marginLeft:"4px"},t),className:n,ref:o},a?this.renderSuccessTip():ct.createElement(Y0,{content:typeof i<"u"?i:u.copy},this.renderCopyIcon())))}}nV.propTypes={content:be.string,onCopy:be.func,successTip:be.node,copyTip:be.node,duration:be.number,style:be.object,className:be.string,icon:be.node};nV.defaultProps={content:"",onCopy:uw,duration:3,style:{},className:""};const _Me=nV,mfe={PREFIX:`${fi}-popover`,ARROW:`${fi}-popover-icon-arrow`},t5={POSITION_SET:["top","topLeft","topRight","left","leftTop","leftBottom","right","rightTop","rightBottom","bottom","bottomLeft","bottomRight","leftTopOver","rightTopOver"],TRIGGER_SET:["hover","focus","click","custom","contextMenu"],DEFAULT_ARROW_STYLE:{borderOpacity:"1",backgroundColor:"var(--semi-color-bg-3)",borderColor:"var(--semi-color-border)"}},Sw={ARROW_BOUNDING:Object.assign(Object.assign({},yE.ARROW_BOUNDING),{offsetY:6,offsetX:0,height:8}),SPACING:4,SPACING_WITH_ARROW:10,DEFAULT_Z_INDEX:1030};var TMe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i0&&arguments[0]!==void 0?arguments[0]:{};const{position:t="",className:s,arrowStyle:o,popStyle:i}=r,a=TMe(r,["position","className","arrowStyle","popStyle"]),n=t.indexOf("top")===0||t.indexOf("bottom")===0,u=ds(s,mfe.ARROW),f=ro(o,"borderOpacity",t5.DEFAULT_ARROW_STYLE.borderOpacity),e=ro(o,"backgroundColor",ro(i,"backgroundColor",t5.DEFAULT_ARROW_STYLE.backgroundColor)),y=ro(o,"borderColor",ro(i,"borderColor",t5.DEFAULT_ARROW_STYLE.borderColor)),_=Object.assign(Object.assign({},a),{width:Sw.ARROW_BOUNDING.width,height:Sw.ARROW_BOUNDING.height,xmlns:"http://www.w3.org/2000/svg",className:u});return n?ct.createElement("svg",Object.assign({},_),ct.createElement("path",{d:"M0 0.5L0 1.5C4 1.5, 5.5 3, 7.5 5S10,8 12,8S14.5 7, 16.5 5S20,1.5 24,1.5L24 0.5L0 0.5z",fill:y,opacity:f}),ct.createElement("path",{d:"M0 0L0 1C4 1, 5.5 2, 7.5 4S10,7 12,7S14.5 6, 16.5 4S20,1 24,1L24 0L0 0z",fill:e})):ct.createElement("svg",Object.assign({},_),ct.createElement("path",{d:"M0.5 0L1.5 0C1.5 4, 3 5.5, 5 7.5S8,10 8,12S7 14.5, 5 16.5S1.5,20 1.5,24L0.5 24L0.5 0z",fill:y,opacity:f}),ct.createElement("path",{d:"M0 0L1 0C1 4, 2 5.5, 4 7.5S7,10 7,12S6 14.5, 4 16.5S1,20 1,24L0 24L0 0z",fill:e}))};gfe.propTypes={position:be.string,className:be.string,arrowStyle:be.object,popStyle:be.object};const NMe=gfe;var IMe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{var s;(s=this.tooltipRef.current)===null||s===void 0||s.focusTrigger()},this.renderPopCard=s=>{let{initialFocusRef:o}=s;const{content:i,contentClassName:a,prefixCls:n}=this.props,{direction:u}=this.context,f=ds(n,a,{[`${n}-rtl`]:u==="rtl"}),e=this.renderContentNode({initialFocusRef:o,content:i});return ct.createElement("div",{className:f},ct.createElement("div",{className:`${n}-content`},e))},this.renderContentNode=s=>{const{initialFocusRef:o,content:i}=s,a={initialFocusRef:o};return Mc(i)?i(a):i},this.tooltipRef=ct.createRef()}render(){const t=this.props,{children:s,prefixCls:o,showArrow:i,arrowStyle:a={},arrowBounding:n,position:u,style:f,trigger:e}=t,y=IMe(t,["children","prefixCls","showArrow","arrowStyle","arrowBounding","position","style","trigger"]);let{spacing:_}=this.props;const T={position:u,className:"",popStyle:f,arrowStyle:a},D=i?ct.createElement(NMe,Object.assign({},T)):!1;yw(_)&&(_=i?Sw.SPACING_WITH_ARROW:Sw.SPACING);const ce=e==="click"||e==="custom"?"dialog":"tooltip";return ct.createElement(Y0,Object.assign({guardFocus:!0,ref:this.tooltipRef},y,{trigger:e,position:u,style:f,content:this.renderPopCard,prefixCls:o,spacing:_,showArrow:D,arrowBounding:n,role:ce}),s)}}Q6.contextType=by;Q6.propTypes={children:be.node,content:be.oneOfType([be.node,be.func]),visible:be.bool,autoAdjustOverflow:be.bool,motion:be.bool,position:be.oneOf(OMe),margin:be.oneOfType([be.number,be.object]),mouseEnterDelay:be.number,mouseLeaveDelay:be.number,trigger:be.oneOf(RMe).isRequired,contentClassName:be.oneOfType([be.string,be.array]),onVisibleChange:be.func,onClickOutSide:be.func,style:be.object,spacing:be.oneOfType([be.number,be.object]),zIndex:be.number,showArrow:be.bool,arrowStyle:be.shape({borderColor:be.string,backgroundColor:be.string,borderOpacity:be.oneOfType([be.string,be.number])}),arrowPointAtCenter:be.bool,arrowBounding:be.object,prefixCls:be.string,guardFocus:be.bool,disableArrowKeyDown:be.bool};Q6.defaultProps={arrowBounding:Sw.ARROW_BOUNDING,showArrow:!1,autoAdjustOverflow:!0,zIndex:Sw.DEFAULT_Z_INDEX,motion:!0,trigger:"hover",cancelText:"No",okText:"Yes",position:"bottom",prefixCls:mfe.PREFIX,onClickOutSide:so,onEscKeyDown:so,closeOnEsc:!0,returnFocusOnClose:!0,guardFocus:!0,disableFocusListener:!0};const fm=Q6;let Dm;function IM(r){if(!r)return 0;const t=r.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0}function BMe(r){return Array.prototype.slice.apply(r).map(s=>`${s}: ${r.getPropertyValue(s)};`).join("")}const kMe=function(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"",o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,a=arguments.length>5?arguments[5]:void 0,n=arguments.length>6?arguments[6]:void 0;if(s.length===0)return"";Dm||(Dm=document.createElement("div"),Dm.setAttribute("aria-hidden","true"),document.body.appendChild(Dm));const u=window.getComputedStyle(r),f=BMe(u),e=IM(u.lineHeight),y=Math.round(e*(t+1)+IM(u.paddingTop)+IM(u.paddingBottom));Dm.setAttribute("style",f),Dm.style.position="fixed",Dm.style.left="0",Dm.style.height="auto",Dm.style.top="-999999px",Dm.style.zIndex="-1000",Dm.style.textOverflow="clip",Dm.style.webkitLineClamp="none",zy.render(ct.createElement(ct.Fragment,null),Dm);function _(){const Be=Dm.scrollWidth<=Dm.offsetWidth,He=Dm.scrollHeight0){const Be=document.createTextNode(a);T.appendChild(Be)}Dm.appendChild(T),Object.values(ig(o,"expand")).map(Be=>Be&&Dm.appendChild(Be.cloneNode(!0)));function ce(){Dm.innerHTML="",Dm.appendChild(T),Object.values(o).map(Be=>Be&&Dm.appendChild(Be.cloneNode(!0)))}function ge(Be,He){const at=Be.length;return He?n==="end"?Be.slice(0,He)+i:Be.slice(0,He)+i+Be.slice(at-He,at):i}function Ee(Be,He){let at=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,st=arguments.length>3&&arguments[3]!==void 0?arguments[3]:He.length,vt=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;const Ot=Math.floor((at+st)/2),Kt=ge(He,Ot);if(Be.textContent=Kt,at>=st-1&&st>0)for(let sn=st;sn>=at;sn-=1){const Bn=ge(He,sn);if(Be.textContent=Bn,_())return Bn}else if(st===0)return i;return _()?Ee(Be,He,Ot,st,Ot):Ee(Be,He,at,Ot,vt)}let _e=s;return _()||(ce(),_e=Ee(D,s,0,n==="middle"?Math.floor(s.length/2):s.length)),Dm.innerHTML="",_e},PMe=kMe;var bfe=function(){if(typeof Map<"u")return Map;function r(t,s){var o=-1;return t.some(function(i,a){return i[0]===s?(o=a,!0):!1}),o}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(s){var o=r(this.__entries__,s),i=this.__entries__[o];return i&&i[1]},t.prototype.set=function(s,o){var i=r(this.__entries__,s);~i?this.__entries__[i][1]=o:this.__entries__.push([s,o])},t.prototype.delete=function(s){var o=this.__entries__,i=r(o,s);~i&&o.splice(i,1)},t.prototype.has=function(s){return!!~r(this.__entries__,s)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(s,o){o===void 0&&(o=null);for(var i=0,a=this.__entries__;i0},r.prototype.connect_=function(){!T9||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),jMe?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},r.prototype.disconnect_=function(){!T9||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},r.prototype.onTransitionEnd_=function(t){var s=t.propertyName,o=s===void 0?"":s,i=$Me.some(function(a){return!!~o.indexOf(a)});i&&this.refresh()},r.getInstance=function(){return this.instance_||(this.instance_=new r),this.instance_},r.instance_=null,r}(),vfe=function(r,t){for(var s=0,o=Object.keys(t);s"u"||!(Element instanceof Object))){if(!(t instanceof oT(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var s=this.observations_;s.has(t)||(s.set(t,new YMe(t)),this.controller_.addObserver(this),this.controller_.refresh())}},r.prototype.unobserve=function(t){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element>"u"||!(Element instanceof Object))){if(!(t instanceof oT(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var s=this.observations_;s.has(t)&&(s.delete(t),s.size||this.controller_.removeObserver(this))}},r.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},r.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(s){s.isActive()&&t.activeObservations_.push(s)})},r.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,s=this.activeObservations_.map(function(o){return new XMe(o.target,o.broadcastRect())});this.callback_.call(t,s,t),this.clearActive()}},r.prototype.clearActive=function(){this.activeObservations_.splice(0)},r.prototype.hasActive=function(){return this.activeObservations_.length>0},r}(),wfe=typeof WeakMap<"u"?new WeakMap:new bfe,Cfe=function(){function r(t){if(!(this instanceof r))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var s=HMe.getInstance(),o=new ZMe(t,s,this);wfe.set(this,o)}return r}();["observe","unobserve","disconnect"].forEach(function(r){Cfe.prototype[r]=function(){var t;return(t=wfe.get(this))[r].apply(t,arguments)}});var JMe=function(){return typeof sP.ResizeObserver<"u"?sP.ResizeObserver:Cfe}();const jZ=JMe;class hL extends Uc{constructor(t){super(t),this.getElement=()=>{try{return av.findDOMNode(this.childNode||this)}catch{return null}},this.mergeRef=(s,o)=>{this.childNode=o,typeof s=="function"?s(o):typeof s=="object"&&s&&"current"in s&&(s.current=o)},this.observer=new jZ(t.onResize)}componentDidMount(){this.observeElement()}componentDidUpdate(t){this.observeElement(this.props.observeParent!==t.observeParent)}componentWillUnmount(){this.observer&&(this.observer.disconnect(),this.observer=null,this.element=null)}observeElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const s=this.getElement();if(this.observer||(this.observer=new jZ(this.props.onResize)),!(s&&s instanceof Element)){this.observer.disconnect();return}s===this.element&&!t||(this.observer.disconnect(),this.element=s,this.observer.observe(s),this.props.observeParent&&s.parentNode&&s.parentNode.ownerDocument&&s.parentNode.ownerDocument.defaultView&&s.parentNode instanceof s.parentNode.ownerDocument.defaultView.HTMLElement&&(this._parentNode=s.parentNode,this.observer.observe(this._parentNode)))}render(){const t=ct.Children.only(this.props.children),{ref:s}=t;return ct.cloneElement(t,{ref:o=>this.mergeRef(s,o)})}}hL.propTypes={onResize:be.func,observeParent:be.bool};hL.defaultProps={onResize:()=>{},observeParent:!1};var eUe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{mark:s,code:o,underline:i,strong:a,link:n,disabled:u}=r;let f=t;const e=(y,_)=>{let T={};y&&(typeof y=="object"&&(T=Object.assign({},y)),f=ct.createElement(_,T,f))};return e(s,"mark"),e(o,"code"),e(i&&!n,"u"),e(a,"strong"),e(r.delete,"del"),e(n,u?"span":"a"),f};class JT extends Vt.Component{constructor(t){super(t),this.onResize=()=>{this.rafId&&window.cancelAnimationFrame(this.rafId),this.rafId=window.requestAnimationFrame(this.getEllipsisState.bind(this))},this.canUseCSSEllipsis=()=>{const{copyable:s}=this.props,{expandable:o,expandText:i,pos:a,suffix:n}=this.getEllipsisOpt();return!o&&wm(i)&&!s&&a==="end"&&!n.length},this.shouldTruncated=s=>!s||s<1?!1:s<=1?this.wrapperRef.current.scrollWidth>this.wrapperRef.current.offsetWidth:this.wrapperRef.current.scrollHeight>this.wrapperRef.current.offsetHeight,this.showTooltip=()=>{var s,o;const{isOverflowed:i,isTruncated:a,expanded:n}=this.state,{showTooltip:u,expandable:f,expandText:e}=this.getEllipsisOpt(),y=!n&&(i||a),T=!f&&wm(e)&&y&&u;if(!T)return T;const D={type:"tooltip"};return typeof u=="object"?u.type&&u.type.toLowerCase()==="popover"?E4({opts:{showArrow:!0}},u,{opts:{className:ds({[`${Bg}-ellipsis-popover`]:!0,[(s=u==null?void 0:u.opts)===null||s===void 0?void 0:s.className]:!!(!((o=u==null?void 0:u.opts)===null||o===void 0)&&o.className)})}}):Object.assign(Object.assign({},D),u):D},this.toggleOverflow=s=>{const{onExpand:o,expandable:i,collapsible:a}=this.getEllipsisOpt(),{expanded:n}=this.state;o&&o(!n,s),(i&&!n||a&&n)&&this.setState({expanded:!n})},this.getEllipsisOpt=()=>{const{ellipsis:s}=this.props;return s?Object.assign({rows:1,expandable:!1,pos:"end",suffix:"",showTooltip:!1,collapsible:!1,expandText:s.expandable?this.expandStr:void 0,collapseText:s.collapsible?this.collapseStr:void 0},typeof s=="object"?s:null):{}},this.renderExpandable=()=>{const{expanded:s,isTruncated:o}=this.state;if(!o)return null;const{expandText:i,expandable:a,collapseText:n,collapsible:u}=this.getEllipsisOpt(),f=!a&&wm(i),e=!u&&wm(n);let y;return!s&&!f?y=i:s&&!e&&(y=n),!f||!e?ct.createElement("a",{role:"button",tabIndex:0,className:`${Bg}-ellipsis-expand`,key:"expand",ref:this.expandRef,"aria-label":y,onClick:this.toggleOverflow,onKeyPress:_=>N1(_)&&this.toggleOverflow(_)},y):null},this.getEllipsisStyle=()=>{const{ellipsis:s,component:o}=this.props;if(!s)return{ellipsisCls:"",ellipsisStyle:{}};const{rows:i}=this.getEllipsisOpt(),{expanded:a}=this.state,n=!a&&this.canUseCSSEllipsis(),u=ds({[`${Bg}-ellipsis`]:!0,[`${Bg}-ellipsis-single-line`]:i===1,[`${Bg}-ellipsis-multiple-line`]:i>1,[`${Bg}-ellipsis-multiple-line-text`]:i>1&&o==="span",[`${Bg}-ellipsis-overflow-ellipsis`]:i===1&&n,[`${Bg}-ellipsis-overflow-ellipsis-text`]:i===1&&n&&o==="span"}),f=n&&i>1?{WebkitLineClamp:i}:{};return{ellipsisCls:u,ellipsisStyle:f}},this.renderEllipsisText=s=>{const{suffix:o}=s,{children:i}=this.props,{isTruncated:a,expanded:n,ellipsisContent:u}=this.state;return n||!a?ct.createElement(ct.Fragment,null,i,o&&o.length?o:null):ct.createElement("span",null,u,o)},this.state={editable:!1,copied:!1,isOverflowed:!0,ellipsisContent:t.children,expanded:!1,isTruncated:!0,prevChildren:null},this.wrapperRef=ct.createRef(),this.expandRef=ct.createRef(),this.copyRef=ct.createRef()}componentDidMount(){this.props.ellipsis&&this.onResize()}static getDerivedStateFromProps(t,s){const{prevChildren:o}=s,i={};return i.prevChildren=t.children,t.ellipsis&&o!==t.children&&(i.isOverflowed=!0,i.ellipsisContent=t.children,i.expanded=!1,i.isTruncated=!0),i}componentDidUpdate(t){this.props.children!==t.children&&(this.forceUpdate(),this.props.ellipsis&&this.onResize())}componentWillUnmount(){this.rafId&&window.cancelAnimationFrame(this.rafId)}getEllipsisState(){const{rows:t,suffix:s,pos:o}=this.getEllipsisOpt(),{children:i}=this.props;if(!this.wrapperRef||!this.wrapperRef.current)return this.onResize(),!1;const{expanded:a}=this.state,n=this.canUseCSSEllipsis();if(TL(i)){this.setState({isTruncated:!1,isOverflowed:!1});return}if(Wg("children"in this.props&&typeof i!="string","[Semi Typography] Only children with pure text could be used with ellipsis at this moment."),!t||t<0||a)return;if(n){const e=this.shouldTruncated(t);this.setState({isOverflowed:e,isTruncated:!1});return}const u={expand:this.expandRef.current,copy:this.copyRef&&this.copyRef.current},f=PMe(this.wrapperRef.current,t,String(i),u,tUe,s,o);this.setState({isOverflowed:!1,ellipsisContent:f,isTruncated:i!==f})}renderOperations(){return ct.createElement(ct.Fragment,null,this.renderExpandable(),this.renderCopy())}renderCopy(){var t;const{copyable:s,children:o}=this.props;if(!s)return null;const i=(t=s==null?void 0:s.content)!==null&&t!==void 0?t:o;let a,n=!1;Array.isArray(i)?(a="",i.forEach(f=>{typeof f=="object"&&(n=!0),a+=String(f)})):(typeof i!="object"||(n=!0),a=String(i)),Wg(n,"Content to be copied in Typography is a object, it will case a [object Object] mistake when copy to clipboard.");const u=Object.assign({content:a,duration:3},typeof s=="object"?s:null);return ct.createElement(_Me,Object.assign({},u,{forwardRef:this.copyRef}))}renderIcon(){const{icon:t,size:s}=this.props;if(!t)return null;const o=s==="small"?"small":"default";return ct.createElement("span",{className:`${Bg}-icon`,"x-semi-prop":"icon"},Iv(t)?ct.cloneElement(t,{size:o}):t)}renderContent(){const t=this.props,{component:s,children:o,className:i,type:a,spacing:n,disabled:u,style:f,ellipsis:e,icon:y,size:_,link:T,heading:D,weight:ce}=t,ge=eUe(t,["component","children","className","type","spacing","disabled","style","ellipsis","icon","size","link","heading","weight"]),Ee=ig(ge,["strong","editable","mark","copyable","underline","code","delete"]),_e=this.renderIcon(),Be=this.getEllipsisOpt(),{ellipsisCls:He,ellipsisStyle:at}=this.getEllipsisStyle();let st=e?this.renderEllipsisText(Be):o;const vt=ds({[`${Bg}-link-text`]:T,[`${Bg}-link-underline`]:this.props.underline&&T});st=nUe(this.props,ct.createElement(ct.Fragment,null,_e,this.props.link?ct.createElement("span",{className:vt},st):st));const Ot=/^h[1-6]$/,Kt=rA(D)&&Ot.test(D),sn=ds(i,He,{[`${Bg}-${a}`]:a&&!T,[`${Bg}-${_}`]:_,[`${Bg}-link`]:T,[`${Bg}-disabled`]:u,[`${Bg}-${n}`]:n,[`${Bg}-${D}`]:Kt,[`${Bg}-${D}-weight-${ce}`]:Kt&&ce&&isNaN(Number(ce))}),Bn=Object.assign(Object.assign({},isNaN(Number(ce))?{}:{fontWeight:ce}),f);return ct.createElement(yce,Object.assign({className:sn,style:Object.assign(Object.assign({},Bn),at),component:s,forwardRef:this.wrapperRef},Ee),st,this.renderOperations())}renderTipWrapper(){const{children:t}=this.props,s=this.showTooltip(),o=this.renderContent();if(s){const{type:i,opts:a,renderTooltip:n}=s;return Mc(n)?n(t,o):i.toLowerCase()==="popover"?ct.createElement(fm,Object.assign({content:t,position:"top"},a),o):ct.createElement(Y0,Object.assign({content:t,position:"top"},a),o)}else return o}render(){const t=ct.createElement(Bm,{componentName:"Typography"},s=>(this.expandStr=s.expand,this.collapseStr=s.collapse,this.renderTipWrapper()));return this.props.ellipsis?ct.createElement(hL,{onResize:this.onResize,observeParent:!0},t):t}}JT.propTypes={children:be.node,copyable:be.oneOfType([be.shape({text:be.string,onCopy:be.func,successTip:be.node,copyTip:be.node}),be.bool]),delete:be.bool,disabled:be.bool,ellipsis:be.oneOfType([be.shape({rows:be.number,expandable:be.bool,expandText:be.string,onExpand:be.func,suffix:be.string,showTooltip:be.oneOfType([be.shape({type:be.string,opts:be.object}),be.bool]),collapsible:be.bool,collapseText:be.string,pos:be.oneOf(["end","middle"])}),be.bool]),mark:be.bool,underline:be.bool,link:be.oneOfType([be.object,be.bool]),spacing:be.oneOf(Mb.SPACING),strong:be.bool,size:be.oneOf(Mb.SIZE),type:be.oneOf(Mb.TYPE),style:be.object,className:be.string,icon:be.oneOfType([be.node,be.string]),heading:be.string,component:be.string};JT.defaultProps={children:null,copyable:!1,delete:!1,disabled:!1,ellipsis:!1,icon:"",mark:!1,underline:!1,strong:!1,link:!1,type:"primary",spacing:"normal",size:"normal",style:{},className:""};let z6=class extends Vt.PureComponent{render(){return ct.createElement(JT,Object.assign({component:"span"},this.props))}};z6.propTypes={copyable:be.oneOfType([be.object,be.bool]),delete:be.bool,disabled:be.bool,icon:be.oneOfType([be.node,be.string]),ellipsis:be.oneOfType([be.object,be.bool]),mark:be.bool,underline:be.bool,link:be.oneOfType([be.object,be.bool]),strong:be.bool,type:be.oneOf(Mb.TYPE),size:be.oneOf(Mb.SIZE),style:be.object,className:be.string,code:be.bool,component:be.string};z6.defaultProps={copyable:!1,delete:!1,disabled:!1,icon:"",ellipsis:!1,mark:!1,underline:!1,strong:!1,link:!1,type:"primary",style:{},size:"normal",className:""};var rUe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const u=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];let f=0;for(;n>=1e3;)n/=1e3,f++;return`${this.truncatePrecision(n)} ${u[f]}`},"bytes-binary":n=>{const u=["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"];let f=0;for(;n>=1024;)n/=1024,f++;return`${this.truncatePrecision(n)} ${u[f]}`},percentages:n=>`${this.truncatePrecision(n*100)}%`,exponential:n=>{const f=n.toExponential(this.precision+2).split("e");return`${this.truncatePrecision(Number(f[0]))}e${f[1]}`}},this.truncateMethods={ceil:Math.ceil,floor:Math.floor,round:Math.round},this.isDiyParser=typeof a<"u",this.content=t,this.rule=s,this.precision=o,this.truncate=i,this.parser=a}format(){return this.isDiyParser?this.parser(this.content):this.rule==="text"?OM(this.content).map(t=>RM(t)?this.truncatePrecision(t):t).join(""):this.rule==="numbers"?OM(this.content).filter(t=>RM(t)).map(t=>this.truncatePrecision(t)).join(","):OM(this.content).map(t=>RM(t)?this.ruleMethods[this.rule](Number(t)):t).join("")}truncatePrecision(t){const s=this.truncateMethods[this.truncate](Number(t)*Math.pow(10,this.precision))/Math.pow(10,this.precision),o=s.toString().split(".");if(o.length===1)return s.toFixed(this.precision);const i=o[1].length;return itypeof s=="string"||typeof s=="number"?new oUe(String(s),this.props.rule,this.props.precision,this.props.truncate,this.props.parser).format():typeof s=="function"?this.formatNodeDFS(s()):typeof s=="object"&&"children"in s.props?Object.assign(Object.assign({},s),{props:Object.assign(Object.assign({},s.props),{children:this.formatNodeDFS(s.props.children)})}):s),t.length===1?t[0]:t}render(){const t=Object.assign({},this.props);return delete t.rule,delete t.parser,t.children=this.formatNodeDFS(this.props.children),ct.createElement(JT,Object.assign({component:"span"},t))}}sV.propTypes={rule:be.oneOf(Mb.RULE),precision:be.number,truncate:be.oneOf(Mb.TRUNCATE),parser:be.func,copyable:be.oneOfType([be.object,be.bool]),delete:be.bool,disabled:be.bool,icon:be.oneOfType([be.node,be.string]),mark:be.bool,underline:be.bool,link:be.oneOfType([be.object,be.bool]),strong:be.bool,type:be.oneOf(Mb.TYPE),size:be.oneOf(Mb.SIZE),style:be.object,className:be.string,code:be.bool,component:be.string};sV.defaultProps={rule:"text",precision:0,truncate:"round",parser:void 0,copyable:!1,delete:!1,icon:"",mark:!1,underline:!1,strong:!1,link:!1,type:"primary",style:{},size:"normal",className:""};const x4=yce;x4.Text=z6;x4.Title=rV;x4.Paragraph=V6;x4.Numeral=sV;const uO=x4,Efe={PREFIX:`${fi}-autocomplete`,PREFIX_OPTION:`${fi}-autoComplete-option`,PREFIX_GROUP:`${fi}-autoComplete-group`},oV={SIZE:["small","large","default"],POSITION:dL.POSITION_SET,OPTIONS:["children","value"],STATUS:x6};var iUe=Tw,aUe=gy,lUe="[object Number]";function uUe(r){return typeof r=="number"||aUe(r)&&iUe(r)==lUe}var Lfe=uUe;const mg=ic(Lfe);class cUe extends lh{constructor(t){super(Object.assign({},t)),this.isPanelOpen=!1}init(){this._setDropdownWidth();const{defaultOpen:t,data:s,defaultValue:o,value:i}=this.getProps();if(s&&s.length){const n=this._generateList(s);this._adapter.updateOptionList(n)}t&&this.openDropdown();let a;typeof o<"u"&&(a=o),typeof i<"u"&&(a=i),typeof a<"u"&&this.handleValueChange(a)}destroy(){this._adapter.unregisterClickOutsideHandler()}_setDropdownWidth(){const{style:t,dropdownMatchSelectWidth:s}=this.getProps();let o;s&&(t&&mg(t.width)||t&&rA(t.width)&&!t.width.includes("%")?o=t.width:o=this._adapter.getTriggerWidth(),this._adapter.setOptionWrapperWidth(o))}handleInputClick(t){this.getStates();const{disabled:s}=this.getProps();s||(this.isPanelOpen?this.closeDropdown():this.openDropdown())}openDropdown(){this.isPanelOpen=!0,this._adapter.toggleListVisible(!0),this._setDropdownWidth(),this._adapter.registerClickOutsideHandler(t=>this.closeDropdown(t)),this._adapter.notifyDropdownVisibleChange(!0),this._modifyFocusIndexOnPanelOpen()}closeDropdown(t){this.isPanelOpen=!1,this._adapter.toggleListVisible(!1),this._adapter.unregisterClickOutsideHandler(),this._adapter.notifyDropdownVisibleChange(!1)}_generateList(t){const{renderItem:s}=this.getProps(),o=[];return t&&t.length&&t.forEach((i,a)=>{const n=String(new Date().getTime())+a;let u={};rA(i)||mg(i)?u={value:i,key:n,label:i,show:!0}:ev(i)&&!wm(i.value)&&(u=Object.assign({show:!0},i)),s&&typeof s=="function"&&(u.label=s(i)),o.push(u)}),o}handleSearch(t){this._adapter.updateInputValue(t),this._adapter.notifySearch(t),this._adapter.notifyChange(t),this._modifyFocusIndex(t),this.isPanelOpen||this.openDropdown()}handleSelect(t,s){const{renderSelectedItem:o}=this.getProps();let i="";o&&typeof o=="function"?(i=o(t),Wg(typeof i!="string","Warning: [Semi AutoComplete] renderSelectedItem must return string, please check your function return")):i=t.value,this._isControlledComponent()?(this.closeDropdown(),this.notifySelect(t)):(this._adapter.updateInputValue(i),this.updateSelection(t),this.notifySelect(t),this.closeDropdown()),this._adapter.notifyChange(i),this._adapter.updateFocusIndex(s)}updateSelection(t){const s=new Map;t&&s.set(t.label,t),this._adapter.updateSelection(s)}notifySelect(t){this._backwardLabelInValue()?this._adapter.notifySelect(t):this._adapter.notifySelect(t.value)}_backwardLabelInValue(){const t=this.getProps();let{onSelectWithObject:s}=t;return s}handleDataChange(t){const s=this._generateList(t);this._adapter.updateOptionList(s),this._adapter.rePositionDropdown()}handleValueChange(t){let{data:s,defaultActiveFirstOption:o}=this.getProps(),i="";this._backwardLabelInValue()&&Object.prototype.toString.call(t)==="[object Object]"?i=t.value:i=t;let a=this._getRenderSelectedItem();const n=this._generateList(s);let u=n.length?n.filter(_=>a(_)===i):[];const f=u.length,e=n.findIndex(_=>a(_)===i);let y="";if(f)u=u[0],y=a(u);else{const _=this._backwardLabelInValue()?t:{label:i,value:i};y=a(_)}this._adapter.updateInputValue(y),this.updateSelection(f?u:null),e===-1&&o?this._adapter.updateFocusIndex(0):this._adapter.updateFocusIndex(e)}_modifyFocusIndex(t){let{focusIndex:s}=this.getStates(),{data:o,defaultActiveFirstOption:i}=this.getProps(),a=-1;if(t){let n=this._getRenderSelectedItem();a=this._generateList(o).findIndex(f=>n(f)===t)}a===-1&&i?s!==0&&this._adapter.updateFocusIndex(0):a!==s&&this._adapter.updateFocusIndex(a)}_modifyFocusIndexOnPanelOpen(){let{inputValue:t}=this.getStates();this._modifyFocusIndex(t)}_getRenderSelectedItem(){let{renderSelectedItem:t}=this.getProps();return typeof t>"u"&&(t=s=>s==null?void 0:s.value),t}handleClear(){this._adapter.notifyClear()}bindKeyBoardEvent(){this._keydownHandler=t=>{this._handleKeyDown(t)},this._adapter.registerKeyDown(this._keydownHandler)}_handleKeyDown(t){const s=t.keyCode;switch(this.getStates(),s){case hg.UP:t.preventDefault(),this._handleArrowKeyDown(-1);break;case hg.DOWN:t.preventDefault(),this._handleArrowKeyDown(1);break;case hg.ENTER:t.preventDefault(),this._handleEnterKeyDown();break;case hg.ESC:this.closeDropdown();break;case hg.TAB:this.closeDropdown();break}this._adapter.notifyKeyDown(t)}_getEnableFocusIndex(t){const{focusIndex:s,options:o}=this.getStates(),i=o.filter(u=>u.show),a=i.length;let n=s+t;if(n<0&&(n=a-1),n>=a&&(n=0),t>0){let u=-1;for(let f=0;f=n));f++);n=u}else{let u=i.length;for(let f=a-1;f>=0&&(!i[f].disabled&&(u=f),!(u<=n));f--);n=u}this._adapter.updateFocusIndex(n)}_handleArrowKeyDown(t){const{visible:s}=this.getStates();s?this._getEnableFocusIndex(t):this.openDropdown()}_handleEnterKeyDown(){const{visible:t,options:s,focusIndex:o}=this.getStates();if(!t)this.openDropdown();else if(o!==void 0&&o!==-1&&s.length!==0){const a=s.filter(n=>n.show)[o];this.handleSelect(a,o)}else this.closeDropdown()}handleOptionMouseEnter(t){this._adapter.updateFocusIndex(t)}handleFocus(t){this.bindKeyBoardEvent(),this._adapter.notifyFocus(t)}handleBlur(t){this._persistEvent(t),this._adapter.notifyBlur(t)}}const fUe=cUe,dUe=`${fi}-spin`,hUe={PREFIX:dUe},AUe={SIZE:["small","middle","large"]};class iV extends lh{static get spinDefaultAdapter(){return{getProp:()=>{},setLoading:t=>{}}}constructor(t){super(Object.assign(Object.assign({},iV.spinDefaultAdapter),t))}updateLoadingIfNeedDelay(){const{spinning:t,delay:s}=this._adapter.getProps(),{delay:o}=this._adapter.getStates();if(o){const i=this;this._timer=setTimeout(()=>{i._adapter.setState({loading:t,delay:0})},s)}}destroy(){this._timer&&(clearTimeout(this._timer),this._timer=null)}}const pUe=iV;var mUe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i0&&arguments[0]!==void 0?arguments[0]:{};const{id:t,className:s}=r,o=mUe(r,["id","className"]);let i=t;yw(i)&&(HZ++,i=HZ);const a=`linearGradient-${i}`;return ct.createElement("svg",Object.assign({},o,{className:s,width:"48",height:"48",viewBox:"0 0 36 36",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":!0,"data-icon":"spin"}),ct.createElement("defs",null,ct.createElement("linearGradient",{x1:"0%",y1:"100%",x2:"100%",y2:"100%",id:a},ct.createElement("stop",{stopColor:"currentColor",stopOpacity:"0",offset:"0%"}),ct.createElement("stop",{stopColor:"currentColor",stopOpacity:"0.50",offset:"39.9430698%"}),ct.createElement("stop",{stopColor:"currentColor",offset:"100%"}))),ct.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},ct.createElement("rect",{fillOpacity:"0.01",fill:"none",x:"0",y:"0",width:"36",height:"36"}),ct.createElement("path",{d:"M34,18 C34,9.163444 26.836556,2 18,2 C11.6597233,2 6.18078805,5.68784135 3.59122325,11.0354951",stroke:`url(#${a})`,strokeWidth:"4",strokeLinecap:"round"})))}var gUe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.setState({loading:t})}})}componentWillUnmount(){this.foundation.destroy()}renderSpin(){const{indicator:t,tip:s}=this.props,{loading:o}=this.state;return o?ct.createElement("div",{className:`${l2}-wrapper`},t?ct.createElement("div",{className:`${l2}-animate`,"x-semi-prop":"indicator"},t):ct.createElement(Sfe,null),s?ct.createElement("div",{"x-semi-prop":"tip"},s):null):null}render(){this.foundation.updateLoadingIfNeedDelay();const t=this.props,{children:s,style:o,wrapperClassName:i,childStyle:a,size:n}=t,u=gUe(t,["children","style","wrapperClassName","childStyle","size"]),{loading:f}=this.state,e=ds(l2,i,{[`${l2}-${n}`]:n,[`${l2}-block`]:s,[`${l2}-hidden`]:!f});return ct.createElement("div",Object.assign({className:e,style:o},this.getDataAttr(u)),this.renderSpin(),ct.createElement("div",{className:`${l2}-children`,style:a,"x-semi-prop":"children"},s))}}aV.propTypes={size:be.oneOf(AUe.SIZE),spinning:be.bool,children:be.node,indicator:be.node,delay:be.number,tip:be.node,wrapperClassName:be.string,childStyle:be.object,style:be.object};aV.defaultProps={size:"middle",spinning:!0,children:null,indicator:null,delay:0};const e1=aV,lV={PREFIX:`${fi}-input`},_4={SIZE:["small","large","default"],DEFAULT_SIZE:"default",STATUS:["default","error","warning","success"],CLEARBTN_CLICKED_EVENT_FLAG:"__fromClearBtn",MODE:["password"]},bUe={};class uV extends lh{static get inputDefaultAdapter(){return{notifyChange:so,setValue:so}}constructor(t){super(Object.assign(Object.assign({},uV.inputDefaultAdapter),t))}init(){this._setInitValue()}destroy(){this._timer&&(clearTimeout(this._timer),this._timer=null)}setDisable(){}_setInitValue(){const{defaultValue:t,value:s}=this.getProps();let o=t;this._isControlledComponent()&&(o=s),this._adapter.setValue(o)}setValue(t){this._adapter.setValue(t)}handleChange(t,s){const{maxLength:o,minLength:i,getValueLength:a}=this._adapter.getProps();let n=t;o&&Mc(a)&&(n=this.handleVisibleMaxLength(t)),i&&Mc(a)&&this.handleVisibleMinLength(n),this._isControlledComponent()?this._adapter.notifyChange(n,s):(this._adapter.setValue(n),this._adapter.notifyChange(n,s))}handleVisibleMinLength(t){const{minLength:s,getValueLength:o}=this._adapter.getProps(),{minLength:i}=this._adapter.getStates();if(mg(s)&&s>=0&&Mc(o)&&rA(t)){const a=o(t);if(a=0&&Mc(o)&&rA(t))return o(t)>s?(console.warn("[Semi Input] The input character is truncated because the input length exceeds the maximum length limit"),this.handleTruncateValue(t,s)):t}handleTruncateValue(t,s){const{getValueLength:o}=this._adapter.getProps();if(Mc(o)){let i="";for(let a=1,n=t.length;a<=n;a++){const u=t.slice(0,a);if(o(u)>s)return i;i=u}return i}else return t.slice(0,s)}handleClear(t){let s=t;const o="";this._isControlledComponent("value")?this._adapter.setState({isFocus:!1}):this._adapter.setState({value:"",isFocus:!1}),(!s||typeof s!="object")&&(s={}),lw(s,_4.CLEARBTN_CLICKED_EVENT_FLAG,!0),this._adapter.notifyChange(o,s),this._adapter.notifyClear(s),s&&this.stopPropagation(s)}handleClick(t){const{disabled:s}=this._adapter.getProps(),{isFocus:o}=this._adapter.getStates();s||o||this._adapter.isEventTarget(t)&&(this._adapter.focusInput(),this._adapter.toggleFocusing(!0))}handleModeChange(t){t==="password"?this._adapter.setEyeClosed(!0):this._adapter.setEyeClosed(!1)}handleClickEye(t){const s=this._adapter.getState("eyeClosed");this._adapter.focusInput(),this._adapter.toggleFocusing(!0),this._adapter.setEyeClosed(!s)}handleInputType(t){const s=this._adapter.getProp("mode"),o=this._adapter.getState("eyeClosed");return s==="password"?o?"password":"text":t}handleMouseDown(t){t.preventDefault()}handleMouseUp(t){t.preventDefault()}handleBlur(t){const{value:s}=this.getStates();this._adapter.toggleFocusing(!1),this._adapter.notifyBlur(s,t)}handleFocus(t){const{value:s}=this.getStates();this._adapter.toggleFocusing(!0),this._adapter.notifyFocus(s,t)}handleInput(t){this._adapter.notifyInput(t)}handleKeyDown(t){this._adapter.notifyKeyDown(t)}handleKeyUp(t){this._adapter.notifyKeyUp(t)}handleKeyPress(t){this._adapter.notifyKeyPress(t),t.key===tV&&this._adapter.notifyEnterPress(t)}isAllowClear(){const{value:t,isFocus:s,isHovering:o}=this._adapter.getStates(),{showClear:i,disabled:a,showClearIgnoreDisabled:n}=this._adapter.getProps();return t&&i&&(!a||n)&&(s||o)}handleClickPrefixOrSuffix(t){const{disabled:s}=this._adapter.getProps(),{isFocus:o}=this._adapter.getStates();!s&&!o&&(this._adapter.focusInput(),this._adapter.toggleFocusing(!0))}handlePreventMouseDown(t){t&&Mc(t.preventDefault)&&t.preventDefault()}handleModeEnterPress(t){["Enter"," "].includes(t==null?void 0:t.key)&&(this.handlePreventMouseDown(t),this.handleClickEye(t))}}const vUe=uV;var yUe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.foundation.handleClear(s)},this.handleClick=s=>{this.foundation.handleClick(s)},this.handleMouseOver=s=>{this.setState({isHovering:!0})},this.handleMouseLeave=s=>{this.setState({isHovering:!1})},this.handleModeChange=s=>{this.foundation.handleModeChange(s)},this.handleClickEye=s=>{this.foundation.handleClickEye(s)},this.handleMouseDown=s=>{this.foundation.handleMouseDown(s)},this.handleMouseUp=s=>{this.foundation.handleMouseUp(s)},this.handleModeEnterPress=s=>{this.foundation.handleModeEnterPress(s)},this.handleClickPrefixOrSuffix=s=>{this.foundation.handleClickPrefixOrSuffix(s)},this.handlePreventMouseDown=s=>{this.foundation.handlePreventMouseDown(s)},this.state={value:"",cachedValue:null,disabled:!1,props:{},isFocus:!1,isHovering:!1,eyeClosed:t.mode==="password",minLength:t.minLength},this.inputRef=ct.createRef(),this.prefixRef=ct.createRef(),this.suffixRef=ct.createRef(),this.foundation=new vUe(this.adapter)}get adapter(){return Object.assign(Object.assign({},super.adapter),{setValue:t=>this.setState({value:t}),setEyeClosed:t=>this.setState({eyeClosed:t}),toggleFocusing:t=>{this.setState({isFocus:t})},focusInput:()=>{const{preventScroll:t}=this.props,s=this.inputRef&&this.inputRef.current;s&&s.focus({preventScroll:t})},toggleHovering:t=>this.setState({isHovering:t}),getIfFocusing:()=>this.state.isFocus,notifyChange:(t,s)=>this.props.onChange(t,s),notifyBlur:(t,s)=>this.props.onBlur(s),notifyFocus:(t,s)=>this.props.onFocus(s),notifyInput:t=>this.props.onInput(t),notifyKeyPress:t=>this.props.onKeyPress(t),notifyKeyDown:t=>this.props.onKeyDown(t),notifyKeyUp:t=>this.props.onKeyUp(t),notifyEnterPress:t=>this.props.onEnterPress(t),notifyClear:t=>this.props.onClear(t),setMinLength:t=>this.setState({minLength:t}),isEventTarget:t=>t&&t.target===t.currentTarget})}static getDerivedStateFromProps(t,s){const o={};return t.value!==s.cachedValue&&(o.value=t.value,o.cachedValue=t.value),o}componentDidUpdate(t){const{mode:s}=this.props;t.mode!==s&&this.handleModeChange(s)}componentDidMount(){this.foundation.init();const{disabled:t,autoFocus:s,preventScroll:o}=this.props;!t&&(s||this.props.autofocus)&&this.inputRef.current.focus({preventScroll:o})}renderPrepend(){const{addonBefore:t}=this.props;if(t){const s=ds({[`${i0}-prepend`]:!0,[`${i0}-prepend-text`]:t&&rA(t),[`${i0}-prepend-icon`]:Iv(t)});return ct.createElement("div",{className:s,"x-semi-prop":"addonBefore"},t)}return null}renderAppend(){const{addonAfter:t}=this.props;if(t){const s=ds({[`${i0}-append`]:!0,[`${i0}-append-text`]:t&&rA(t),[`${i0}-append-icon`]:Iv(t)});return ct.createElement("div",{className:s,"x-semi-prop":"addonAfter"},t)}return null}renderClearBtn(){const t=ds(`${i0}-clearbtn`),{clearIcon:s}=this.props;return this.foundation.isAllowClear()?ct.createElement("div",{className:t,onMouseDown:this.handleClear},s||ct.createElement(XT,null)):null}renderModeBtn(){const{eyeClosed:t}=this.state,{mode:s,disabled:o}=this.props,i=ds(`${i0}-modebtn`),a=t?ct.createElement(zFe,null):ct.createElement(dfe,null),n=s==="password"&&!o,u=t?"Show password":"Hidden password";return n?ct.createElement("div",{role:"button",tabIndex:0,"aria-label":u,className:i,onClick:this.handleClickEye,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,onKeyPress:this.handleModeEnterPress},a):null}renderPrefix(){const{prefix:t,insetLabel:s,insetLabelId:o}=this.props,i=t||s;if(!i)return null;const a=ds({[`${i0}-prefix`]:!0,[`${i0}-inset-label`]:s,[`${i0}-prefix-text`]:i&&rA(i),[`${i0}-prefix-icon`]:Iv(i)});return ct.createElement("div",{className:a,onMouseDown:this.handlePreventMouseDown,onClick:this.handleClickPrefixOrSuffix,id:o,"x-semi-prop":"prefix,insetLabel"},i)}renderSuffix(t){const{suffix:s,hideSuffix:o}=this.props;if(!s)return null;const i=ds({[`${i0}-suffix`]:!0,[`${i0}-suffix-text`]:s&&rA(s),[`${i0}-suffix-icon`]:Iv(s),[`${i0}-suffix-hidden`]:t&&!!o});return ct.createElement("div",{className:i,onMouseDown:this.handlePreventMouseDown,onClick:this.handleClickPrefixOrSuffix,"x-semi-prop":"suffix"},s)}getInputRef(){const{forwardRef:t}=this.props;if(!wm(t)){if(typeof t=="function")return s=>{t(s),this.inputRef={current:s}};if(Object.prototype.toString.call(t)==="[object Object]")return this.inputRef=t,t}return this.inputRef}render(){const t=this.props,{addonAfter:s,addonBefore:o,autoFocus:i,clearIcon:a,className:n,disabled:u,defaultValue:f,placeholder:e,prefix:y,mode:_,insetLabel:T,insetLabelId:D,validateStatus:ce,type:ge,readonly:Ee,size:_e,suffix:Be,style:He,showClear:at,onEnterPress:st,onClear:vt,hideSuffix:Ot,inputStyle:Kt,forwardRef:sn,maxLength:Bn,getValueLength:fn,preventScroll:bn,borderless:$n,showClearIgnoreDisabled:_n}=t,Nr=yUe(t,["addonAfter","addonBefore","autoFocus","clearIcon","className","disabled","defaultValue","placeholder","prefix","mode","insetLabel","insetLabelId","validateStatus","type","readonly","size","suffix","style","showClear","onEnterPress","onClear","hideSuffix","inputStyle","forwardRef","maxLength","getValueLength","preventScroll","borderless","showClearIgnoreDisabled"]),{value:Cr,isFocus:Dr,minLength:fr}=this.state,_r=this.foundation.isAllowClear(),br=Iv(Be),ss=this.getInputRef(),In=`${i0}-wrapper`,dr=ds(In,n,{[`${i0}-wrapper__with-prefix`]:y||T,[`${i0}-wrapper__with-suffix`]:Be,[`${i0}-wrapper__with-suffix-hidden`]:_r&&!!Ot,[`${i0}-wrapper__with-suffix-icon`]:br,[`${i0}-wrapper__with-append`]:o,[`${i0}-wrapper__with-prepend`]:s,[`${i0}-wrapper__with-append-only`]:o&&!s,[`${i0}-wrapper__with-prepend-only`]:!o&&s,[`${In}-readonly`]:Ee,[`${In}-disabled`]:u,[`${In}-warning`]:ce==="warning",[`${In}-error`]:ce==="error",[`${In}-focus`]:Dr,[`${In}-clearable`]:at,[`${In}-modebtn`]:_==="password",[`${In}-hidden`]:ge==="hidden",[`${In}-${_e}`]:_e,[`${i0}-borderless`]:$n}),lr=ds(i0,{[`${i0}-${_e}`]:_e,[`${i0}-disabled`]:u,[`${i0}-sibling-clearbtn`]:this.foundation.isAllowClear(),[`${i0}-sibling-modebtn`]:_==="password"}),Ir=Cr??"",Pr=Object.assign(Object.assign({},Nr),{style:Kt,className:lr,disabled:u,readOnly:Ee,type:this.foundation.handleInputType(ge),placeholder:e,onInput:Kr=>this.foundation.handleInput(Kr),onChange:Kr=>this.foundation.handleChange(Kr.target.value,Kr),onFocus:Kr=>this.foundation.handleFocus(Kr),onBlur:Kr=>this.foundation.handleBlur(Kr),onKeyUp:Kr=>this.foundation.handleKeyUp(Kr),onKeyDown:Kr=>this.foundation.handleKeyDown(Kr),onKeyPress:Kr=>this.foundation.handleKeyPress(Kr),value:Ir});return Mc(fn)||(Pr.maxLength=Bn),fr&&(Pr.minLength=fr),ce==="error"&&(Pr["aria-invalid"]="true"),ct.createElement("div",{className:dr,style:He,onMouseEnter:Kr=>this.handleMouseOver(Kr),onMouseLeave:Kr=>this.handleMouseLeave(Kr),onClick:Kr=>this.handleClick(Kr)},this.renderPrepend(),this.renderPrefix(),ct.createElement("input",Object.assign({},Pr,{ref:ss})),this.renderClearBtn(),this.renderSuffix(_r),this.renderModeBtn(),this.renderAppend())}}cV.propTypes={"aria-label":be.string,"aria-labelledby":be.string,"aria-invalid":be.bool,"aria-errormessage":be.string,"aria-describedby":be.string,"aria-required":be.bool,addonBefore:be.node,addonAfter:be.node,clearIcon:be.node,prefix:be.node,suffix:be.node,mode:be.oneOf(EUe),value:be.any,defaultValue:be.any,disabled:be.bool,readonly:be.bool,autoFocus:be.bool,type:be.string,showClear:be.bool,hideSuffix:be.bool,placeholder:be.any,size:be.oneOf(wUe),className:be.string,style:be.object,validateStatus:be.oneOf(CUe),onClear:be.func,onChange:be.func,onBlur:be.func,onFocus:be.func,onInput:be.func,onKeyDown:be.func,onKeyUp:be.func,onKeyPress:be.func,onEnterPress:be.func,insetLabel:be.node,insetLabelId:be.string,inputStyle:be.object,getValueLength:be.func,preventScroll:be.bool,borderless:be.bool};cV.defaultProps={addonBefore:"",addonAfter:"",prefix:"",suffix:"",readonly:!1,type:"text",showClear:!1,hideSuffix:!1,placeholder:"",size:"default",className:"",onClear:so,onChange:so,onBlur:so,onFocus:so,onInput:so,onKeyDown:so,onKeyUp:so,onKeyPress:so,onEnterPress:so,validateStatus:"default",borderless:!1};const LUe=ct.forwardRef((r,t)=>ct.createElement(cV,Object.assign({},r,{forwardRef:t}))),Em=LUe;var SUe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ict.createElement("div",{className:He,"x-semi-prop":"emptyContent"},f||vt.emptyText));if(typeof Ee=="function")return Ee(Object.assign({disabled:o,focused:y,selected:a,style:D,label:n,value:i,inputValue:_e,onMouseEnter:vt=>ce(vt),onClick:vt=>this.onClick(Object.assign({value:i,label:n,children:s},Be),vt)},Be));const st={searchWords:_e,sourceString:s,option:{highlightClassName:`${ge}-keyword`}};return ct.createElement("div",{className:He,onClick:vt=>{this.onClick(Object.assign({value:i,label:n,children:s},Be),vt)},onMouseEnter:vt=>ce&&ce(vt),role:"option","aria-selected":a?"true":"false","aria-disabled":o?"true":"false",style:D},_?ct.createElement("div",{className:at},ct.createElement(lO,null)):null,rA(s)?ct.createElement("div",{className:`${ge}-text`},this.renderOptionContent({children:s,config:st,inputValue:_e,prefixCls:ge})):s)}};G6.isSelectOption=!0;G6.propTypes={children:be.node,disabled:be.bool,value:be.oneOfType([be.string,be.number]),selected:be.bool,label:be.node,empty:be.bool,emptyContent:be.node,onSelect:be.func,focused:be.bool,showTick:be.bool,className:be.string,style:be.object,onMouseEnter:be.func,prefixCls:be.string,renderOptionItem:be.func,inputValue:be.string};G6.defaultProps={prefixCls:Efe.PREFIX_OPTION};const _fe=G6,jR=Efe.PREFIX,xUe=oV.SIZE,_Ue=oV.POSITION,TUe=oV.STATUS;class W6 extends Uc{constructor(t){super(t),this.onSelect=(o,i,a)=>{this.foundation.handleSelect(o,i)},this.onSearch=o=>{this.foundation.handleSearch(o)},this.onBlur=o=>this.foundation.handleBlur(o),this.onFocus=o=>this.foundation.handleFocus(o),this.onInputClear=()=>this.foundation.handleClear(),this.handleInputClick=o=>this.foundation.handleInputClick(o),this.foundation=new fUe(this.adapter);const s=1;this.state={dropdownMinWidth:null,inputValue:"",options:[],visible:!1,focusIndex:t.defaultActiveFirstOption?0:-1,selection:new Map,rePosKey:s},this.triggerRef=ct.createRef(),this.optionsRef=ct.createRef(),this.clickOutsideHandler=null,Wg("triggerRender"in this.props&&typeof this.props.triggerRender=="function",`[Semi AutoComplete] + - If you are using the following props: 'suffix', 'prefix', 'showClear', 'validateStatus', and 'size', + please notice that they will be removed in the next major version. + Please use 'componentProps' to retrieve these props instead. + - If you are using 'onBlur', 'onFocus', please try to avoid using them and look for changes in the future.`)}get adapter(){const t={registerKeyDown:s=>{const o={onKeyDown:s};this.setState({keyboardEventSet:o})},unregisterKeyDown:s=>{this.setState({keyboardEventSet:{}})},updateFocusIndex:s=>{this.setState({focusIndex:s})}};return Object.assign(Object.assign(Object.assign({},super.adapter),t),{getTriggerWidth:()=>{const s=this.triggerRef.current;return s&&s.getBoundingClientRect().width},setOptionWrapperWidth:s=>{this.setState({dropdownMinWidth:s})},updateInputValue:s=>{this.setState({inputValue:s})},toggleListVisible:s=>{this.setState({visible:s})},updateOptionList:s=>{this.setState({options:s})},updateSelection:s=>{this.setState({selection:s})},notifySearch:s=>{this.props.onSearch(s)},notifyChange:s=>{this.props.onChange(s)},notifySelect:s=>{this.props.onSelect(s)},notifyDropdownVisibleChange:s=>{this.props.onDropdownVisibleChange(s)},notifyClear:()=>{this.props.onClear()},notifyFocus:s=>{this.props.onFocus(s)},notifyBlur:s=>{this.props.onBlur(s)},notifyKeyDown:s=>{this.props.onKeyDown(s)},rePositionDropdown:()=>{let{rePosKey:s}=this.state;s=s+1,this.setState({rePosKey:s})},registerClickOutsideHandler:s=>{const o=i=>{const a=this.optionsRef&&this.optionsRef.current,n=this.triggerRef&&this.triggerRef.current,u=zy.findDOMNode(a),f=i.target;u&&(!u.contains(f)||!u.contains(f.parentNode))&&n&&!n.contains(f)&&s(i)};this.clickOutsideHandler=o,document.addEventListener("mousedown",o,!1)},unregisterClickOutsideHandler:()=>{this.clickOutsideHandler&&document.removeEventListener("mousedown",this.clickOutsideHandler,!1)}})}componentDidMount(){this.foundation.init()}componentWillUnmount(){this.foundation.destroy()}componentDidUpdate(t,s){_0(this.props.data,t.data)||this.foundation.handleDataChange(this.props.data),this.props.value!==t.value&&this.foundation.handleValueChange(this.props.value)}renderInput(){const{size:t,prefix:s,insetLabel:o,insetLabelId:i,suffix:a,placeholder:n,style:u,className:f,showClear:e,disabled:y,triggerRender:_,validateStatus:T,autoFocus:D,value:ce,id:ge,clearIcon:Ee}=this.props,{inputValue:_e,keyboardEventSet:Be,selection:He}=this.state,st=Object.assign(Object.assign(Object.assign({style:u,className:typeof _=="function"?ds(f):ds({[jR]:!0,[`${jR}-disabled`]:y},f),onClick:this.handleInputClick,ref:this.triggerRef,id:ge},Be),{tabIndex:-1}),this.getDataAttr(this.props)),vt={disabled:y,placeholder:n,autofocus:D,onChange:this.onSearch,onClear:this.onInputClear,"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-describedby":this.props["aria-describedby"],"aria-required":this.props["aria-required"],suffix:a,prefix:s||o,insetLabelId:i,showClear:e,validateStatus:T,size:t,onBlur:this.onBlur,onFocus:this.onFocus,clearIcon:Ee};return ct.createElement("div",Object.assign({},st),typeof _=="function"?ct.createElement(fV,Object.assign({},vt,{inputValue:typeof ce<"u"?ce:_e,value:Array.from(He.values()),triggerRender:_,componentName:"AutoComplete",componentProps:Object.assign({},this.props)})):ct.createElement(Em,Object.assign({},vt,{value:typeof ce<"u"?ce:_e})))}renderLoading(){const t=`${jR}-loading-wrapper`;return ct.createElement("div",{className:t},ct.createElement(e1,null))}renderOption(t,s){const{focusIndex:o}=this.state,i=s===o;return ct.createElement(_fe,Object.assign({showTick:!1,onSelect:(a,n)=>this.onSelect(a,s,n),focused:i,onMouseEnter:()=>this.foundation.handleOptionMouseEnter(s),key:t.key||t.label+t.value+s},t),t.label)}renderOptionList(){const{maxHeight:t,dropdownStyle:s,dropdownClassName:o,loading:i,emptyContent:a}=this.props,{options:n,dropdownMinWidth:u}=this.state,f=ds({[`${jR}-option-list`]:!0},o);let e;n.length===0?e=a:e=n.filter(_=>_.show).map((_,T)=>this.renderOption(_,T));const y=Object.assign({maxHeight:t,minWidth:u},s);return ct.createElement("div",{className:f,role:"listbox",style:y},i?this.renderLoading():e)}render(){const{position:t,motion:s,zIndex:o,mouseEnterDelay:i,mouseLeaveDelay:a,autoAdjustOverflow:n,stopPropagation:u,getPopupContainer:f}=this.props,{visible:e,rePosKey:y}=this.state,_=this.renderInput(),T=this.renderOptionList();return ct.createElement(fm,{mouseEnterDelay:i,mouseLeaveDelay:a,autoAdjustOverflow:n,trigger:"custom",motion:s,visible:e,content:T,position:t,ref:this.optionsRef,zIndex:o,stopPropagation:u,getPopupContainer:f,rePosKey:y},_)}}W6.propTypes={"aria-label":be.string,"aria-labelledby":be.string,"aria-invalid":be.bool,"aria-errormessage":be.string,"aria-describedby":be.string,"aria-required":be.bool,autoFocus:be.bool,autoAdjustOverflow:be.bool,className:be.string,clearIcon:be.node,children:be.node,data:be.array,defaultOpen:be.bool,defaultValue:be.oneOfType([be.string,be.number]),defaultActiveFirstOption:be.bool,disabled:be.bool,dropdownMatchSelectWidth:be.bool,dropdownClassName:be.string,dropdownStyle:be.object,emptyContent:be.node,id:be.string,insetLabel:be.node,insetLabelId:be.string,onSearch:be.func,onSelect:be.func,onClear:be.func,onBlur:be.func,onFocus:be.func,onChange:be.func,onKeyDown:be.func,position:be.oneOf(_Ue),placeholder:be.string,prefix:be.node,onChangeWithObject:be.bool,onSelectWithObject:be.bool,renderItem:be.func,renderSelectedItem:be.func,suffix:be.node,showClear:be.bool,size:be.oneOf(xUe),style:be.object,stopPropagation:be.oneOfType([be.bool,be.string]),maxHeight:be.oneOfType([be.string,be.number]),mouseEnterDelay:be.number,mouseLeaveDelay:be.number,motion:be.oneOfType([be.bool,be.func,be.object]),getPopupContainer:be.func,triggerRender:be.func,value:be.oneOfType([be.string,be.number]),validateStatus:be.oneOf(TUe),zIndex:be.number};W6.Option=_fe;W6.defaultProps={stopPropagation:!0,motion:!0,zIndex:Sw.DEFAULT_Z_INDEX,position:"bottomLeft",data:[],showClear:!1,size:"default",onFocus:so,onSearch:so,onClear:so,onBlur:so,onSelect:so,onChange:so,onSelectWithObject:!1,onDropdownVisibleChange:so,defaultActiveFirstOption:!1,dropdownMatchSelectWidth:!0,loading:!1,maxHeight:300,validateStatus:"default",autoFocus:!1,emptyContent:null,onKeyDown:so};const hS=W6,NUe={PREFIX:`${fi}-avatar`},T4={SHAPE:["circle","square"],SIZE:["extra-extra-small","extra-small","small","default","medium","large","extra-large"],COLOR:["grey","red","pink","purple","violet","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","white"],OVERLAP_FROM:["start","end"]};class IUe extends lh{constructor(t){super(Object.assign({},t)),this.handleFocusVisible=s=>{const{target:o}=s;try{o.matches(":focus-visible")&&this._adapter.setFocusVisible(!0)}catch{Wg(!0,"Warning: [Semi Avatar] The current browser does not support the focus-visible")}},this.handleBlur=()=>{this._adapter.setFocusVisible(!1)},this.changeScale=()=>{const{gap:s}=this.getProps(),o=this._adapter.getAvatarNode(),i=o==null?void 0:o.firstChild,[a,n]=[(o==null?void 0:o.offsetWidth)||0,(i==null?void 0:i.offsetWidth)||0];if(a!==0&&n!==0&&s*2n?1:(a-s*2)/n;this._adapter.setScale(u)}}}init(){const{children:t}=this.getProps();typeof t=="string"&&this.changeScale()}destroy(){}handleImgLoadError(){const{onError:t}=this.getProps();(t?t():void 0)!==!1&&this._adapter.notifyImgState(!1)}handleEnter(t){this._adapter.notifyEnter(t)}handleLeave(t){this._adapter.notifyLeave(t)}}var OUe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.foundation.handleFocusVisible(s)},this.handleBlur=s=>{this.foundation.handleBlur()},this.getContent=()=>{const{children:s,onClick:o,imgAttr:i,src:a,srcSet:n,alt:u}=this.props,{isImgExist:f}=this.state;let e=s;const y=o!==uw,_=a&&f,T={tabIndex:0,onKeyDown:this.handleKeyDown,onFocus:this.handleFocusVisible,onBlur:this.handleBlur};if(_){const D=y?`clickable Avatar: ${u}`:u,ce=Object.assign(Object.assign({src:a,srcSet:n,onError:this.handleError},i),{className:ds({[`${u1}-no-focus-visible`]:y})}),ge=y?Object.assign(Object.assign({},ce),T):ce;e=ct.createElement("img",Object.assign({alt:D},ge))}else if(typeof s=="string"){const D=u??s,ge={role:"img","aria-label":y?`clickable Avatar: ${D}`:D,className:ds(`${u1}-label`,{[`${u1}-no-focus-visible`]:y})},Ee=y?Object.assign(Object.assign({},ge),T):ge,_e={transform:`scale(${this.state.scale})`};e=ct.createElement("span",{className:`${u1}-content`,style:_e},ct.createElement("span",Object.assign({},Ee,{"x-semi-prop":"children"}),s))}return e},this.state={isImgExist:!0,hoverContent:"",focusVisible:!1,scale:1},this.onEnter=this.onEnter.bind(this),this.onLeave=this.onLeave.bind(this),this.handleError=this.handleError.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.getContent=this.getContent.bind(this),this.avatarRef=ct.createRef()}get adapter(){return Object.assign(Object.assign({},super.adapter),{notifyImgState:t=>{this.setState({isImgExist:t})},notifyEnter:t=>{const{hoverMask:s}=this.props,o=s;this.setState({hoverContent:o},()=>{const{onMouseEnter:i}=this.props;i&&i(t)})},notifyLeave:t=>{this.setState({hoverContent:""},()=>{const{onMouseLeave:s}=this.props;s&&s(t)})},setFocusVisible:t=>{this.setState({focusVisible:t})},setScale:t=>{this.setState({scale:t})},getAvatarNode:()=>{var t;return(t=this.avatarRef)===null||t===void 0?void 0:t.current}})}componentDidMount(){this.foundation=new IUe(this.adapter),this.foundation.init()}componentDidUpdate(t){if(this.props.src&&this.props.src!==t.src){const s=new Image(0,0);s.src=this.props.src,s.onload=()=>{this.setState({isImgExist:!0})},s.onerror=()=>{this.setState({isImgExist:!1})},s.onabort=()=>{this.setState({isImgExist:!1})}}typeof this.props.children=="string"&&this.props.children!==t.children&&this.foundation.changeScale()}componentWillUnmount(){this.foundation.destroy()}onEnter(t){this.foundation.handleEnter(t)}onLeave(t){this.foundation.handleLeave(t)}handleError(){this.foundation.handleImgLoadError()}handleKeyDown(t){const{onClick:s}=this.props;switch(t.key){case"Enter":s(t),fb(t);break;case"Escape":t.target.blur();break}}render(){const t=this.props,{shape:s,children:o,size:i,color:a,className:n,hoverMask:u,onClick:f,imgAttr:e,src:y,srcSet:_,style:T,alt:D,gap:ce}=t,ge=OUe(t,["shape","children","size","color","className","hoverMask","onClick","imgAttr","src","srcSet","style","alt","gap"]),{isImgExist:Ee,hoverContent:_e,focusVisible:Be}=this.state,He=y&&Ee,at=ds(u1,{[`${u1}-${s}`]:s,[`${u1}-${i}`]:i,[`${u1}-${a}`]:a&&!He,[`${u1}-img`]:He,[`${u1}-focus`]:Be},n),st=_e?ct.createElement("div",{className:`${u1}-hover`,"x-semi-prop":"hoverContent"},_e):null;return ct.createElement("span",Object.assign({},ge,{style:T,className:at,onClick:f,onMouseEnter:this.onEnter,onMouseLeave:this.onLeave,role:"listitem",ref:this.avatarRef}),this.getContent(),st)}};q6.defaultProps={size:"medium",color:"grey",shape:"circle",gap:3,onClick:uw,onMouseEnter:uw,onMouseLeave:uw};q6.propTypes={children:be.node,color:be.oneOf(kUe),shape:be.oneOf(BUe),size:be.oneOf(RUe),hoverMask:be.node,className:be.string,style:be.object,gap:be.number,imgAttr:be.object,src:be.string,srcSet:be.string,alt:be.string,onError:be.func,onClick:be.func,onMouseEnter:be.func,onMouseLeave:be.func};q6.elementType="Avatar";var PUe=4,DUe=.001,FUe=1e-7,MUe=10,SI=11,HR=1/(SI-1),UUe=typeof Float32Array=="function";function Tfe(r,t){return 1-3*t+3*r}function Nfe(r,t){return 3*t-6*r}function Ife(r){return 3*r}function iP(r,t,s){return((Tfe(t,s)*r+Nfe(t,s))*r+Ife(t))*r}function Ofe(r,t,s){return 3*Tfe(t,s)*r*r+2*Nfe(t,s)*r+Ife(t)}function $Ue(r,t,s,o,i){var a,n,u=0;do n=t+(s-t)/2,a=iP(n,o,i)-r,a>0?s=n:t=n;while(Math.abs(a)>FUe&&++u=DUe?jUe(f,D,t,o):ce===0?D:$Ue(f,e,e+HR,t,o)}return function(e){return e===0?0:e===1?1:iP(u(e),s,i)}};const BM=ic(QUe);function KZ(r,t,s){return Math.min(Math.max(r,t),s)}function KUe(r){const t=/\(([^)]+)\)/.exec(r);return t?t[1].split(",").map(s=>parseFloat(s)):[]}function QR(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:.5;const s=KZ(r,1,10),o=KZ(t,.1,2);return i=>i===0||i===1?i:-s*Math.pow(2,10*(i-1))*Math.sin((i-1-o/(Math.PI*2)*Math.asin(1/s))*(Math.PI*2)/o)}const kM=(()=>{const r=["Quad","Cubic","Quart","Quint","Sine","Expo","Circ","Back","Elastic"],t={In:[[.55,.085,.68,.53],[.55,.055,.675,.19],[.895,.03,.685,.22],[.755,.05,.855,.06],[.47,0,.745,.715],[.95,.05,.795,.035],[.6,.04,.98,.335],[.6,-.28,.735,.045],QR],Out:[[.25,.46,.45,.94],[.215,.61,.355,1],[.165,.84,.44,1],[.23,1,.32,1],[.39,.575,.565,1],[.19,1,.22,1],[.075,.82,.165,1],[.175,.885,.32,1.275],(o,i)=>a=>1-QR(o,i)(1-a)],InOut:[[.455,.03,.515,.955],[.645,.045,.355,1],[.77,0,.175,1],[.86,0,.07,1],[.445,.05,.55,.95],[1,0,0,1],[.785,.135,.15,.86],[.68,-.55,.265,1.55],(o,i)=>a=>a<.5?QR(o,i)(a*2)/2:1-QR(o,i)(a*-2+2)/2]},s={linear:[.25,.25,.75,.75]};for(const o of Object.keys(t))t[o].forEach((i,a)=>{s["ease"+o+r[a]]=i});return s})();function zZ(r){if(typeof r=="function")return r;!r||typeof r!="string"?r="linear":r=r.trim();let t=r.split("(")[0];const s=KUe(r);let o;return t==="cubic-bezier"||t==="cubicBezier"?BM(...s.length?s:kM.linear):((!t||typeof t!="string"||typeof t=="string"&&kM[t]==null)&&(t="linear"),o=kM[t],typeof o=="function"?o(...s):s.length?BM(...s):BM(...o))}let zUe=class{constructor(){this._eventMap=new Map}on(t,s){return t&&typeof s=="function"&&(this._eventMap.has(t)||this._eventMap.set(t,[]),this._eventMap.get(t).push(s)),this}once(t,s){var o=this;if(t&&typeof s=="function"){const i=function(){s(...arguments),o.off(t,i)};this.on(t,i)}}off(t,s){if(t)if(typeof s=="function"){const o=this._eventMap.get(t);if(Array.isArray(o)&&o.length){let i=-1;for(;(i=o.findIndex(a=>a===s))>-1;)o.splice(i,1)}}else s==null&&this._eventMap.delete(t);return this}emit(t){for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;ia(...o)),!0):!1}};function cO(r){return!!(r&&typeof r=="object"&&(r.duration>0||typeof r.easing=="string"||typeof r.easing=="function"))}function VUe(r,t,s,o,i){for(const a of Object.keys(t)){const n=t[a],u=typeof n=="number"?n:n.val;if(!(typeof n=="object"&&n.done)){if(cO(n)&&o&&i&&n.duration){if(n.duration+o<=i||u!==r[a])return!1}else if(typeof s[a]=="number"&&s[a]!==0)return!1;if(r[a]!==u)return!1}}return!0}function KR(r){const t={};for(const s in r)Object.prototype.hasOwnProperty.call(r,s)&&(t[s]=typeof r[s]=="number"?r[s]:r[s].val);return t}const ex=[0,0];function VZ(r,t,s,o,i,a,n){const u=-i*(t-o),f=-a*s,e=u+f,y=s+e*r,_=t+y*r;return Math.abs(y)1&&arguments[1]!==void 0?arguments[1]:{};if(cO(t)){const o=zZ(t.easing),i=typeof t.duration=="number"&&t.duration>0?t.duration:1e3;t=Object.assign(Object.assign({},t),{easing:o,duration:i})}let s=Object.assign(Object.assign(Object.assign({},qUe),t),{done:!1});if(r&&typeof r=="object"&&"val"in r){if(cO(r)){const o=zZ(r.easing),i=typeof r.duration=="number"&&r.duration>0?r.duration:parseInt(t.duration)||1e3;r=Object.assign(Object.assign({},r),{easing:o,duration:i})}s=Object.assign(Object.assign({},s),r)}else s=Object.assign(Object.assign({},s),{val:r});return s}const HN=()=>Date.now(),tE=1e3/60;class XUe extends zUe{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),this._props=Object.assign({},t),this._config=Object.assign({},s),this.initStates()}_wrapConfig(t,s){s=s&&typeof s=="object"?s:this._config;const o={};for(const i of Object.keys(t))o[i]=YUe(t[i],s);return o}initStates(t,s){t=t&&typeof t=="object"?t:this._props,s=s&&typeof s=="object"?s:this._config;const{from:o,to:i}=t;if(this._from={},o)for(const u of Object.keys(o))this._from[u]=typeof o[u]=="object"&&o[u].val?o[u].val:o[u];this._to=this._wrapConfig(i,s),this._delay=parseInt(s.delay)||0;const a=this._from&&KR(this._from)||KR(this._to),n=GUe(a);this._currentStyle=Object.assign({},a),this._currentVelocity=Object.assign({},n),this._lastIdealStyle=Object.assign({},a),this._lastIdealVelocity=Object.assign({},n),this.resetPlayStates(),this._frameCount=0,this._prevTime=0}animate(){this._timer==null&&(this._timer=requestAnimationFrame(t=>{const s=HN();if(VUe(this._currentStyle,this._to,this._currentVelocity,this._startedTime||s,s)||this._ended||this._stopped){this._wasAnimating&&!this._ended&&!this._stopped&&(this._timer=setTimeout(()=>{clearTimeout(this._timer),this._timer=null,this._ended=!0,this.emit("rest",this.getCurrentStates())},tE)),this.resetPlayStates();return}this._started||(this._started=!0,this.emit("start",this.getCurrentStates())),this._stopped=!1,this._paused=!1,this._wasAnimating=!0,this._startedTime===0&&(this._startedTime=s);const o=s,i=o-this._prevTime;this._prevTime=o,o-this._startedTime=this._startedTime+_e&&(ce=D,_.done=!0),a[y]=ce,u[y]=ce}else if(D!=null&&D===this._currentStyle[y])u[y]=D,f[y]=0,a[y]=D,n[y]=0;else{const Ee=(this._accumulatedTime[y]-Math.floor(this._accumulatedTime[y]/tE)*tE)/tE,_e=Math.floor(this._accumulatedTime[y]/tE);for(let at=0;at<_e;at++)[ce,ge]=VZ(tE/1e3,ce,ge,_.val,_.tension,_.friction,_.precision);const[Be,He]=VZ(tE/1e3,ce,ge,_.val,_.tension,_.friction,_.precision);u[y]=ce+(Be-ce)*Ee,f[y]=ge+(He-ge)*Ee,a[y]=ce,n[y]=ge,this._accumulatedTime[y]-=_e*tE}}}this._timer=null,this._currentStyle=Object.assign({},u),this._currentVelocity=Object.assign({},f),this._lastIdealStyle=Object.assign({},a),this._lastIdealVelocity=Object.assign({},n),this._destroyed||(this.emit("frame",this.getCurrentStates()),this.animate())}))}start(){this._prevTime=HN(),this._startedTime=HN(),this.animate()}end(){this._ended||(this._ended=!0,this._currentStyle=this.getFinalStates(),this.emit("frame",this.getFinalStates()),this.emit("rest",this.getFinalStates())),this.destroy()}pause(){this._paused||(this._pausedTime=HN(),this._paused=!0,this.emit("pause",this.getCurrentStates()),this.destroy(),this._destroyed=!1)}resume(){if(this._started&&this._paused){const s=HN()-this._pausedTime;this._paused=!1,this._startedTime+=s,this._prevTime+=s,this._pausedTime=0,this.emit("resume",this.getCurrentStates()),this.animate()}}stop(){this.destroy(),this._stopped||(this._stopped=!0,this.emit("stop",this.getInitialStates()),this.initStates())}destroy(){cancelAnimationFrame(this._timer),clearTimeout(this._timer),this._timer=null,this._destroyed=!0}resetPlayStates(){this._started=!1,this._stopped=!1,this._ended=!1,this._paused=!1,this._destroyed=!1,this._timer=null,this._wasAnimating=!1,this._accumulatedTime={},this._startedTime=0,this._pausedTime=0}reset(){this.destroy(),this.initStates()}reverse(){this.destroy();const t=Object.assign({},this._props),[s,o]=[t.to,t.from];t.from=s,t.to=o,this._props=Object.assign({},t),this.initStates()}getCurrentStates(){return Object.assign({},this._currentStyle)}getInitialStates(){return Object.assign({},KR(this._props.from))}getFinalStates(){return Object.assign({},KR(this._props.to))}}const Rfe={PREFIX:`${fi}-button`},N4={sizes:["default","small","large"],iconPositions:["left","right"],htmlTypes:["button","reset","submit"],btnTypes:["primary","secondary","tertiary","warning","danger"],themes:["solid","borderless","light"],DEFAULT_ICON_SIZE:"default",DEFAULT_ICON_POSITION:"left"},ZUe={SIZE:["extra-small","small","default","large","extra-large","custom"],ICON_PREFIX:"semi-icon-"};var JUe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ie&&Be.stopPropagation()},_e),s))}};I4.defaultProps={disabled:!1,size:"default",type:"primary",theme:"light",block:!1,htmlType:"button",onMouseDown:uw,onClick:uw,onMouseEnter:uw,onMouseLeave:uw,prefixCls:Rfe.PREFIX};I4.propTypes={children:be.node,disabled:be.bool,prefixCls:be.string,style:be.object,size:be.oneOf(e8e),type:be.oneOf(n8e),block:be.bool,onClick:be.func,onMouseDown:be.func,circle:be.bool,loading:be.bool,htmlType:be.oneOf(t8e),theme:be.oneOf(N4.themes),className:be.string,onMouseEnter:be.func,onMouseLeave:be.func,"aria-label":be.string};var r8e=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);iso,onMouseEnter:()=>so,onMouseLeave:()=>so};const a8e={PREFIX:`${fi}-banner`},l8e={TYPE:["info","success","danger","warning"]};class dV extends lh{constructor(t){super(Object.assign(Object.assign({},dV.defaultAdapter),t))}removeBanner(t){this._adapter.notifyClose(t),this._adapter.setVisible()}}const Kv=a8e.PREFIX,u8e=l8e.TYPE;class Vy extends Uc{constructor(t){super(t),this.remove=s=>{s&&s.stopPropagation(),this.foundation.removeBanner(s)},this.state={visible:!0},Wg("target"in this.props,"[Semi Banner] 'target' has been deprecated, please write JSX directly instead.")}get adapter(){return Object.assign(Object.assign({},super.adapter),{setVisible:()=>{this.setState({visible:!1})},notifyClose:t=>{const{onClose:s}=this.props;s(t)}})}componentDidMount(){this.foundation=new dV(this.adapter),this.foundation.init()}componentWillUnmount(){this.foundation.destroy()}renderCloser(){const{closeIcon:t}=this.props;return t===null?t:ct.createElement(eN,{className:`${Kv}-close`,onClick:this.remove,icon:t||ct.createElement(GC,{"x-semi-prop":"closeIcon","aria-hidden":!0}),theme:"borderless",size:"small",type:"tertiary","aria-label":"Close"})}renderIcon(){const{type:t,icon:s}=this.props;let i={warning:ct.createElement(WT,{size:"large","aria-label":"warning"}),success:ct.createElement(S4,{size:"large","aria-label":"success"}),info:ct.createElement(H6,{size:"large","aria-label":"info"}),danger:ct.createElement(GT,{size:"large","aria-label":"danger"})}[t];const a=ds({[`${Kv}-icon`]:!0});return typeof s<"u"&&(i=s),i?ct.createElement("div",{className:a,"x-semi-prop":"icon"},i):null}render(){const{children:t,type:s,className:o,style:i,bordered:a,title:n,description:u,fullMode:f}=this.props,{visible:e}=this.state,y=ds(Kv,o,{[`${Kv}-${s}`]:s,[`${Kv}-full`]:f,[`${Kv}-in-container`]:!f,[`${Kv}-bordered`]:!f&&a});return e?ct.createElement("div",Object.assign({className:y,style:i,role:"alert"},this.getDataAttr(this.props)),ct.createElement("div",{className:`${Kv}-content-wrapper`},ct.createElement("div",{className:`${Kv}-content`},this.renderIcon(),ct.createElement("div",{className:`${Kv}-content-body`},n?ct.createElement(uO.Title,{heading:5,className:`${Kv}-title`,component:"div","x-semi-prop":"title"},n):null,u?ct.createElement(uO.Paragraph,{className:`${Kv}-description`,component:"div","x-semi-prop":"description"},u):null)),this.renderCloser()),t?ct.createElement("div",{className:`${Kv}-extra`,"x-semi-prop":"children"},t):null):null}}Vy.propTypes={fullMode:be.bool,type:be.oneOf(u8e),title:be.node,description:be.node,icon:be.node,closeIcon:be.node,children:be.node,style:be.object,className:be.string,onClose:be.func,bordered:be.bool};Vy.defaultProps={onClose:()=>{},type:"info",fullMode:!0};let hV=class extends ct.PureComponent{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t)}render(){const t=Object.assign({},this.props),s=!!t.icon,o=!!t.loading,i=!!t.disabled;return s||o&&!i?ct.createElement(eN,Object.assign({},t)):ct.createElement(I4,Object.assign({},t))}};hV.propTypes=Object.assign(Object.assign({},I4.propTypes),eN.propTypes);hV.elementType="Button";const Wu=hV,Bfe={PREFIX:`${fi}-card`},c8e={SHADOWS:["hover","always"],TYPE:["grid"]};var f8e=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);it=>s=>ct.createElement(t,Object.assign({type:r},s));class tN extends Vt.PureComponent{render(){const t=this.props,{prefixCls:s,className:o,type:i,size:a,shape:n}=t,u=h8e(t,["prefixCls","className","type","size","shape"]),f=ds(o,`${s}-${i}`,{[`${s}-${i}-${a}`]:i.toUpperCase()==="AVATAR"},{[`${s}-${i}-${n}`]:i.toUpperCase()==="AVATAR"});return ct.createElement("div",Object.assign({className:f},u))}}tN.propTypes={type:be.string,prefixCls:be.string,style:be.object,className:be.string,size:be.oneOf(A8e),shape:be.oneOf(p8e)};tN.defaultProps={prefixCls:AV.PREFIX,size:"medium",shape:"circle"};const m8e=Z6("avatar")(tN),g8e=Z6("image")(tN),b8e=Z6("title")(tN),v8e=Z6("button")(tN);class pV extends Vt.PureComponent{render(){const{prefixCls:t,className:s,style:o,rows:i}=this.props,a=ds(s,`${t}-paragraph`);return ct.createElement("ul",{className:a,style:o},[...Array(i)].map((n,u)=>ct.createElement("li",{key:u})))}}pV.propTypes={rows:be.number,prefixCls:be.string,style:be.object,className:be.string};pV.defaultProps={prefixCls:AV.PREFIX,rows:4};var y8e=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{let t=[];return ct.Children.forEach(r,s=>{s!=null&&(Array.isArray(s)?t=t.concat(N9(s)):Vt.isValidElement(s)&&s.type&&s.type.toString()===C8e&&s.props?t=t.concat(N9(s.props.children)):t.push(s))}),t},c1=w8e.PREFIX;let mV=class extends Vt.PureComponent{render(){const{children:t=null,style:s,className:o,spacing:i,wrap:a,align:n,vertical:u}=this.props,f=a&&u?!1:a,e=Object.assign({},s);let y="",_="";rA(i)?(y=i,_=i):mg(i)?(e.rowGap=i,e.columnGap=i):wz(i)&&(rA(i[0])?y=i[0]:mg(i[0])&&(e.columnGap=`${i[0]}px`),rA(i[1])?_=i[1]:mg(i[1])&&(e.rowGap=`${i[1]}px`));const T=ds(c1,o,{[`${c1}-align-${n}`]:n,[`${c1}-vertical`]:u,[`${c1}-horizontal`]:!u,[`${c1}-wrap`]:f,[`${c1}-tight-horizontal`]:y===C2.SPACING_TIGHT,[`${c1}-tight-vertical`]:_===C2.SPACING_TIGHT,[`${c1}-medium-horizontal`]:y===C2.SPACING_MEDIUM,[`${c1}-medium-vertical`]:_===C2.SPACING_MEDIUM,[`${c1}-loose-horizontal`]:y===C2.SPACING_LOOSE,[`${c1}-loose-vertical`]:_===C2.SPACING_LOOSE}),D=N9(t),ce=T1(this.props);return ct.createElement("div",Object.assign({},ce,{className:T,style:e,"x-semi-prop":"children"}),D)}};mV.propTypes={wrap:be.bool,align:be.oneOf(C2.ALIGN_SET),vertical:be.bool,spacing:be.oneOfType([be.string,be.number,be.array]),children:be.node,style:be.object,className:be.string};mV.defaultProps={vertical:!1,wrap:!1,spacing:"tight",align:"center"};const Pfe=mV;var E8e=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{title:t,headerExtraContent:s,header:o,headerLine:i,headerStyle:a}=this.props,n=ds(`${Cb}-header`,{[`${Cb}-header-bordered`]:!!i}),u=ds(`${Cb}-header-wrapper`),f=ds(`${Cb}-header-wrapper-title`,{[`${Cb}-header-wrapper-spacing`]:!!s});return o||s||t?ct.createElement("div",{style:a,className:n},o||ct.createElement("div",{className:u},s&&ct.createElement("div",{className:`${Cb}-header-wrapper-extra`,"x-semi-prop":"headerExtraContent"},s),t&&ct.createElement("div",{className:f},rA(t)?ct.createElement(uO.Title,{heading:6,ellipsis:{showTooltip:!0,rows:1},"x-semi-prop":"title"},t):t))):null},this.renderCover=()=>{const{cover:t}=this.props,s=ds(`${Cb}-cover`);return t&&ct.createElement("div",{className:s,"x-semi-prop":"cover"},t)},this.renderBody=()=>{const{bodyStyle:t,children:s,actions:o,loading:i}=this.props,a=ds(`${Cb}-body`),n=ds(`${Cb}-body-actions`),u=ds(`${Cb}-body-actions-item`),f=ct.createElement("div",null,ct.createElement(BB.Title,null),ct.createElement("br",null),ct.createElement(BB.Paragraph,{rows:3}));return ct.createElement("div",{style:t,className:a},s&&ct.createElement(BB,{placeholder:f,loading:i,active:!0},s),Array.isArray(o)&&ct.createElement("div",{className:n},ct.createElement(Pfe,{spacing:12},o.map((e,y)=>ct.createElement("div",{key:y,className:u,"x-semi-prop":`actions.${y}`},e)))))},this.renderFooter=()=>{const{footer:t,footerLine:s,footerStyle:o}=this.props,i=ds(`${Cb}-footer`,{[`${Cb}-footer-bordered`]:s});return t&&ct.createElement("div",{style:o,className:i,"x-semi-prop":"footer"},t)}}render(){const t=this.props,{bordered:s,shadows:o,style:i,className:a}=t,n=E8e(t,["bordered","shadows","style","className"]),u=ig(n,["actions","bodyStyle","cover","headerExtraContent","footer","footerLine","footerStyle","header","headerLine","headerStyle","loading","title"]),f=ds(Cb,a,{[`${Cb}-bordered`]:s,[`${Cb}-shadows`]:o,[`${Cb}-shadows-${o}`]:o});return ct.createElement("div",Object.assign({},u,{"aria-busy":this.props.loading,className:f,style:i}),this.renderHeader(),this.renderCover(),this.renderBody(),this.renderFooter())}}J6.Meta=d8e;J6.propTypes={actions:be.array,bodyStyle:be.object,bordered:be.bool,children:be.node,className:be.string,cover:be.node,footer:be.node,footerLine:be.bool,footerStyle:be.object,header:be.node,headerExtraContent:be.node,headerLine:be.bool,headerStyle:be.object,loading:be.bool,shadows:be.oneOf(c8e.SHADOWS),style:be.object,title:be.node,"aria-label":be.string};J6.defaultProps={bordered:!0,footerLine:!1,headerLine:!0,loading:!1};const I9=J6;function L8e(r,t,s,o){for(var i=r.length,a=s+(o?1:-1);o?a--:++a-1:!!i&&V8e(r,t,s)>-1}var J8e=Z8e;const aP=ic(J8e);var e$e=P6,t$e=1,n$e=4;function r$e(r){return e$e(r,t$e|n$e)}var s$e=r$e;const O9=ic(s$e);var o$e=bV;function i$e(r,t){var s=r==null?0:r.length;return!!s&&o$e(r,t,0)>-1}var Dfe=i$e;function a$e(r,t,s){for(var o=-1,i=r==null?0:r.length;++o=A$e&&(a=h$e,n=!1,t=new l$e(t));e:for(;++it}var X$e=Y$e,Z$e=q$e,J$e=X$e,e9e=C4;function t9e(r){return r&&r.length?Z$e(r,e9e,J$e):void 0}var n9e=t9e;const r9e=ic(n9e);var DM=Kce,s9e=oce,o9e=Vz,i9e=1/0,a9e=DM&&1/o9e(new DM([,-0]))[1]==i9e?function(r){return new DM(r)}:s9e,l9e=a9e,u9e=Kz,c9e=Dfe,f9e=Ffe,d9e=zz,h9e=l9e,A9e=Vz,p9e=200;function m9e(r,t,s){var o=-1,i=c9e,a=r.length,n=!0,u=[],f=u;if(s)n=!1,i=f9e;else if(a>=p9e){var e=t?null:h9e(r);if(e)return A9e(e);n=!1,i=d9e,f=new u9e}else f=t?[]:u;e:for(;++o3&&arguments[3]!==void 0?arguments[3]:!1;const i=[],a=!!o,n=ro(s,"key","key"),u=ro(s,"children","children");function f(e){let y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return e.map((_,T)=>{const D=$fe(y?y.pos:"0",T),ce=_[n],ge={};s&&Object.entries(ig(s,"children")).forEach(Be=>{let[He,at]=Be;const st=_[at];!wm(st)&&(ge[He]=st)});const Ee=Object.assign(Object.assign(Object.assign({},I1(_,["key","label","value","icon","disabled","isLeaf"])),ge),{parent:y,pos:D,children:null,data:_,_innerDataTag:!0,isEnd:[...y?y.isEnd:[],T===e.length-1]}),_e=typeof o=="boolean";return(!a||!_e&&o.has(ce))&&i.push(Ee),t.has(ce)&&(!a||!_e&&o.has(ce))?Ee.children=f(_[u]||[],Ee):Ee.children=[],Ee})}return f(r),i}function C9e(r,t,s){const o=ro(s,"key","key"),i=ro(s,"children","children"),a=(n,u,f)=>{const e=n?n[i]:r,y=n?$fe(f.pos,u):"0";if(n){const _=ro(n,o,null),T={data:Object.assign({},n),ind:u,pos:y,key:_!==null?_:y,parentPos:f.node?f.pos:null,level:Number(f.level)+1};t(T)}e&&e.forEach((_,T)=>{a(_,T,{node:n,pos:y,level:f?Number(f.level)+1:-1})})};a(null)}function E9e(r,t){const s={},o={},i={},a={posEntities:s,keyEntities:o,valueEntities:i},n=ro(t,"value","value");return C9e(r,u=>{const{pos:f,key:e,parentPos:y}=u,_=Object.assign({},u),T=ro(_,`data.${n}`,null);T!==null&&(i[T]=e),s[f]=_,o[e]=_,_.parent=s[y],_.parent&&(_.parent.children=_.parent.children||[],_.parent.children.push(_))},t),a}function E2(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(!tF(r))return[];if(!s&&Array.isArray(r)?r=r.length?[r[0]]:[]:Array.isArray(r)||(r=[r]),$m(t))return r;const o=[];return r.forEach(i=>{i in t?o.push(t[i]):i&&o.push(i)}),o}function AL(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const o=[],i=a=>{if(!a)return;const{children:n}=a;tF(n)&&n.forEach(f=>{o.push(f.key),i(t[f.key])})};return r.forEach(a=>{s&&o.push(a),i(t[a])}),o}function L9e(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];const o=[];return r&&r.forEach(i=>{const a=t[i];a&&a.children&&a.children.forEach(n=>{(!s.length||!s.includes(n.key))&&o.push(n.key)})}),o}function vV(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const o=[];return r.forEach(a=>{t[a]&&t[a].parent&&o.push(t[a].parent.key)}),L9e(w9e(o),t,s?[]:r)}function EC(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;const o=[],i=a=>{a.parent&&(o.push(a.parent.key),i(a.parent))};return r.forEach(a=>{t[a]&&i(t[a]),s&&o.push(a)}),o}function S9e(r,t){const s={};return r.forEach(o=>{if(!t[o])return;const{level:i}=t[o];s[i]?s[i].push(o):s[i]=[o]}),s}function yV(r,t){const s=Array.isArray(r)?r:[r],o=AL(s,t,!0),i=new Set([...o]);let a=new Set([]),n=[];const u=S9e(s,t),f=e=>{const{key:y,parent:_,level:T}=e;if(!_||n.includes(y))return;const D=vV([y],t);if(n=[...n,...D],D.every(ge=>i.has(ge)))i.add(_.key),T-1 in u&&T?u[T-1].push(_.key):u[T-1]=[_.key];else{const ge=EC([y],t,!1);a=new Set([...a,...ge])}};for(;!$m(u);){const e=r9e(Object.keys(u).map(y=>Number(y)));u[e].forEach(y=>f(t[y])),delete u[e]}return{checkedKeys:i,halfCheckedKeys:a}}function FM(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;if(Array.isArray(r)||(r=[r]),s){const o=EC(r,t,!0);return new Set(o)}return new Set(r)}function MM(r,t,s,o){const i=E2(r,o,s);return new Set(EC(i,t,!1))}function YZ(r,t,s){let o="show";const i=[...r],a=[...t];if(Math.abs(i.length-a.length)!==1)return{motionType:o,motionKeys:[]};let n=[];return i.length>a.length?(o="hide",n=fO(i,a)):n=fO(a,i),{motionType:n.length===1?o:"show",motionKeys:n.length===1?AL(n,s,!1):[]}}function jfe(r,t,s,o,i){if(!s)return!0;let a=s,n=i??t;return typeof s=="boolean"&&(a=(u,f)=>{const e=u.toLowerCase();return f.toString().toLowerCase().includes(e)}),o&&(n=t[o]),a(r,n,t)}function x9e(r){return Array.isArray(r)?r:[r]}function ME(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,o=arguments.length>3?arguments[3]:void 0;const i=[],a=new Set(r);return s?r.forEach(n=>{t[n]&&!tF(t[n].children)&&i.push(n),!t[n]&&o&&i.push(n)}):r.forEach(n=>{if(!t[n]){o&&i.push(n);return}const{parent:u}=t[n];u&&a.has(u.key)||i.push(n)}),i}function XZ(r,t,s){const o=[],i=a=>{s[a].children&&s[a].children.forEach(n=>{const{key:u}=n;o.push(u),t.has(u)&&i(u)})};return i(r),o}function _9e(r,t,s,o){const i=AL([r],t,!0),a=t[r];s=new Set([...s,r]);const n=u=>{if(!u.parent)return;const{key:f}=u;if(vV([f],t).every(_=>s.has(_))){const _=u.parent;s.add(_.key),n(_)}else{const _=EC([f],t,!1);o=new Set([...o,..._])}};return n(a),{checkedKeys:new Set([...s,...i]),halfCheckedKeys:o}}function T9e(r,t,s,o){const i=AL([r],t,!0),a=t[r];i.forEach(u=>{s.has(u)&&s.delete(u),o.has(u)&&o.delete(u)});const n=u=>{const f=u.parent;if(!f||!s.has(f.key)&&!o.has(f.key))return;const{key:e}=u,_=vV([e],t).some(D=>s.has(D)||o.has(D)),T=EC([e],t,!1);_?T.forEach(D=>{s.has(D)&&(s.delete(D),o.add(D))}):(s.has(f.key)&&s.delete(f.key),o.has(f.key)&&o.delete(f.key),n(f))};return a&&n(a),{checkedKeys:s,halfCheckedKeys:o}}function N9e(r){const{showFilteredOnly:t,keyEntities:s,inputValue:o,treeData:i,filterTreeNode:a,filterProps:n,prevExpandedKeys:u,keyMaps:f}=r;let e=[];e=Object.values(s).filter(ce=>jfe(o,ce.data,a,n)).map(ce=>ce.key);let y=EC(e,s,!1);if(u.length){const ce=u.filter(ge=>!!s[ge]);y=y.concat(ce)}const _=AL(e,s,!0),T=new Set([..._,...y]);return{flattenNodes:BE(i,new Set(y),f,t&&T),filteredKeys:new Set(e),filteredExpandedKeys:new Set(y),filteredShownKeys:T}}function lP(r,t){const s=ro(t,"value","value"),o=ro(t,"key","key");return Array.isArray(r)?r.map(i=>ro(i,s,i[o])):ro(r,s,r[o])}function rE(r,t,s){return t&&tF(r)?lP(r,s):r}function ZZ(r,t){return[...r].filter(o=>o in t)}function I9e(r,t){const s=ro(t,"disabled","disabled"),o=Object.keys(r).filter(a=>r[a].data[s]),{checkedKeys:i}=yV(o,r);return i}var O9e=Tw,R9e=gy,B9e="[object Boolean]";function k9e(r){return r===!0||r===!1||R9e(r)&&O9e(r)==B9e}var P9e=k9e;const wV=ic(P9e),kB={PREFIX:`${fi}-checkbox`,INNER:`${fi}-checkbox-inner`,TEXT:`${fi}-checkbox-text`,INPUT:`${fi}-checkbox-input`,CHECKED:`${fi}-checkbox-checked`,DISABLED:`${fi}-checkbox-disabled`,BUTTON:`${fi}-checkbox-button`,WRAPPER:""},D9e={PREFIX:`${fi}-checkboxGroup`,INNER:`${fi}-checkboxGroup-inner`,TEXT:`${fi}-checkboxGroup-text`,INPUT:`${fi}-checkboxGroup-input`,CHECKED:`${fi}-checkboxGroup-checked`,DISABLED:`${fi}-checkboxGroup-disabled`},fw={DIRECTION_SET:["horizontal","vertical"],TYPE_DEFAULT:"default",TYPE_CARD:"card",TYPE_PURECARD:"pureCard",DEFAULT_DIRECTION:"vertical"};class F9e extends lh{constructor(t){super(Object.assign({},t)),this.clickState=!1,this.handleFocusVisible=s=>{const{target:o}=s;try{if(this.clickState){this.clickState=!1;return}o.matches(":focus-visible")&&this._adapter.setFocusVisible(!0)}catch{Wg(!0,"Warning: [Semi Checkbox] The current browser does not support the focus-visible")}},this.handleBlur=()=>{this.clickState=!1,this._adapter.setFocusVisible(!1)}}init(){const{children:t,extra:s,extraId:o,addonId:i}=this.getProps();t&&!i&&this._adapter.setAddonId(),s&&!o&&this._adapter.setExtraId()}notifyChange(t,s){const o=this._adapter.generateEvent(t,s);this._adapter.notifyChange(o)}handleChange(t){if(this.getProp("disabled"))return;if((t==null?void 0:t.type)==="click"&&(this.clickState=!0),this._adapter.focusCheckboxEntity(),this._adapter.getIsInGroup()){this._adapter.getGroupDisabled()||this.handleChangeInGroup(t);return}const a=!this.getState("checked");this._isControlledComponent("checked")?this.notifyChange(a,t):(this.setChecked(a),this.notifyChange(a,t))}handleChangeInGroup(t){const{value:s}=this.getProps(),a=!this._adapter.getGroupValue().includes(s),n=this._adapter.generateEvent(a,t);this._adapter.notifyChange(n),this._adapter.notifyGroupChange(n)}handleEnterPress(t){N1(t)&&this.handleChange(t)}setChecked(t){this._adapter.setNativeControlChecked(t)}destroy(){}}const M9e=F9e,CV=ct.createContext({});class nF extends Vt.PureComponent{blur(){this.inputEntity.blur()}focus(){const{preventScroll:t}=this.props;this.inputEntity.focus({preventScroll:t})}render(){const{indeterminate:t,checked:s,disabled:o,prefixCls:i,name:a,isPureCardType:n,addonId:u,extraId:f,focusInner:e,onInputFocus:y,onInputBlur:_}=this.props,T=i||kB.PREFIX,D=ds({[`${T}-inner`]:!0,[`${T}-inner-checked`]:!!s,[`${T}-inner-pureCardType`]:n},kB.WRAPPER),ce=ds({[`${T}-inner-display`]:!0,[`${T}-focus`]:e,[`${T}-focus-border`]:e&&!s}),ge=s?ct.createElement(cw,null):t?ct.createElement(pFe,null):null,Ee={type:"checkbox","aria-label":this.props["aria-label"],"aria-disabled":o,"aria-checked":s,"aria-labelledby":u,"aria-describedby":f||this.props["aria-describedby"],"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-required":this.props["aria-required"],className:kB.INPUT,onChange:so,checked:s,disabled:o,onFocus:y,onBlur:_};return a&&(Ee.name=a),ct.createElement("span",{className:D},ct.createElement("input",Object.assign({},Ee,{ref:_e=>{this.inputEntity=_e}})),ct.createElement("span",{className:ce},ge))}}nF.contextType=CV;nF.propTypes={"aria-describedby":be.string,"aria-errormessage":be.string,"aria-invalid":be.bool,"aria-labelledby":be.string,"aria-required":be.bool,checked:be.bool,disabled:be.bool,onChange:be.func,children:be.node,grouped:be.bool,value:be.any,isPureCardType:be.bool,addonId:be.string,extraId:be.string,focusInner:be.bool,onInputFocus:be.func,onInputBlur:be.func,preventScroll:be.bool};nF.defaultProps={onChange:so};const U9e=nF;let O4=class extends Uc{get adapter(){return Object.assign(Object.assign({},super.adapter),{setNativeControlChecked:t=>{this.setState({checked:t})},notifyChange:t=>{const{onChange:s}=this.props;s&&s(t)},generateEvent:(t,s)=>{const{props:o}=this;return{target:Object.assign(Object.assign({},o),{checked:t}),stopPropagation:()=>{s.stopPropagation()},preventDefault:()=>{s.preventDefault()},nativeEvent:{stopImmediatePropagation:()=>{s.nativeEvent&&typeof s.nativeEvent.stopImmediatePropagation=="function"&&s.nativeEvent.stopImmediatePropagation()}}}},getIsInGroup:()=>this.isInGroup(),getGroupValue:()=>this.context&&this.context.checkboxGroup.value||[],notifyGroupChange:t=>{this.context.checkboxGroup.onChange(t)},getGroupDisabled:()=>this.context&&this.context.checkboxGroup.disabled,setAddonId:()=>{this.setState({addonId:NL({prefix:"addon"})})},setExtraId:()=>{this.setState({extraId:NL({prefix:"extra"})})},setFocusVisible:t=>{this.setState({focusVisible:t})},focusCheckboxEntity:()=>{this.focus()}})}constructor(t){super(t),this.handleChange=o=>this.foundation.handleChange(o),this.handleEnterPress=o=>this.foundation.handleEnterPress(o),this.handleFocusVisible=o=>{this.foundation.handleFocusVisible(o)},this.handleBlur=o=>{this.foundation.handleBlur()};const s=!1;this.state={checked:t.checked||t.defaultChecked||s,addonId:t.addonId,extraId:t.extraId,focusVisible:!1},this.checkboxEntity=null,this.foundation=new M9e(this.adapter)}componentDidUpdate(t){this.props.checked!==t.checked&&(wm(this.props.checked)?this.foundation.setChecked(!1):wV(this.props.checked)&&this.foundation.setChecked(this.props.checked))}isInGroup(){return!!(this.context&&this.context.checkboxGroup&&"value"in this.props)}focus(){this.checkboxEntity&&this.checkboxEntity.focus()}blur(){this.checkboxEntity&&this.checkboxEntity.blur()}render(){const{disabled:t,style:s,prefixCls:o,className:i,indeterminate:a,children:n,onMouseEnter:u,onMouseLeave:f,extra:e,value:y,role:_,tabIndex:T,id:D,type:ce}=this.props,{checked:ge,addonId:Ee,extraId:_e,focusVisible:Be}=this.state,He={checked:ge,disabled:t},at=this.isInGroup();if(at){if(this.context.checkboxGroup.value){const $n=(this.context.checkboxGroup.value||[]).includes(y);He.checked=$n}this.context.checkboxGroup.disabled&&(He.disabled=this.context.checkboxGroup.disabled||this.props.disabled);const{isCardType:fn,isPureCardType:bn}=this.context.checkboxGroup;He.isCardType=fn,He.isPureCardType=bn,He.name=this.context.checkboxGroup.name}else He.isPureCardType=ce===fw.TYPE_PURECARD,He.isCardType=ce===fw.TYPE_CARD||He.isPureCardType;const st=o||kB.PREFIX,vt=He.isCardType||He.isPureCardType,Ot=ds(st,{[`${st}-disabled`]:He.disabled,[`${st}-indeterminate`]:a,[`${st}-checked`]:He.checked,[`${st}-unChecked`]:!He.checked,[`${st}-cardType`]:He.isCardType,[`${st}-cardType_disabled`]:He.disabled&&He.isCardType,[`${st}-cardType_unDisabled`]:!(He.disabled&&He.isCardType),[`${st}-cardType_checked`]:He.isCardType&&He.checked&&!He.disabled,[`${st}-cardType_checked_disabled`]:He.isCardType&&He.checked&&He.disabled,[i]:!!i,[`${st}-focus`]:Be&&vt}),Kt=ds(`${st}-extra`,{[`${st}-cardType_extra_noChildren`]:He.isCardType&&!n});at&&this.context.checkboxGroup.name;const sn=this.props["x-semi-children-alias"]||"children",Bn=()=>!n&&!e?null:ct.createElement("div",{className:`${st}-content`},n?ct.createElement("span",{id:Ee,className:`${st}-addon`,"x-semi-prop":sn},n):null,e?ct.createElement("div",{id:_e,className:Kt,"x-semi-prop":"extra"},e):null);return ct.createElement("span",Object.assign({role:_,tabIndex:T,style:s,className:Ot,id:D,onMouseEnter:u,onMouseLeave:f,onClick:this.handleChange,onKeyPress:this.handleEnterPress,"aria-labelledby":this.props["aria-labelledby"]},this.getDataAttr(this.props)),ct.createElement(U9e,Object.assign({},this.props,He,{addonId:n&&Ee,extraId:e&&_e,isPureCardType:He.isPureCardType,ref:fn=>{this.checkboxEntity=fn},focusInner:Be&&!vt,onInputFocus:this.handleFocusVisible,onInputBlur:this.handleBlur})),Bn())}};O4.contextType=CV;O4.propTypes={"aria-describedby":be.string,"aria-errormessage":be.string,"aria-invalid":be.bool,"aria-labelledby":be.string,"aria-required":be.bool,checked:be.bool,defaultChecked:be.bool,disabled:be.bool,indeterminate:be.bool,onChange:be.func,value:be.any,style:be.object,className:be.string,prefixCls:be.string,onMouseEnter:be.func,onMouseLeave:be.func,extra:be.node,index:be.number,"aria-label":be.string,tabIndex:be.number,preventScroll:be.bool,type:be.string};O4.defaultProps={defaultChecked:!1,indeterminate:!1,onChange:so,onMouseEnter:so,onMouseLeave:so,type:"default"};O4.elementType="Checkbox";const iT=O4;class EV extends lh{static get checkboxGroupDefaultAdapter(){return{}}constructor(t){super(Object.assign(Object.assign({},EV.checkboxGroupDefaultAdapter),t))}init(){const{defaultValue:t,value:s}=this.getProps();typeof t<"u"&&!Array.isArray(t)&&Wg(!0,"Warning: [Semi CheckboxGroup] defaultValue should be an Array"),typeof s<"u"&&!Array.isArray(s)&&Wg(!0,"Warning: [Semi CheckboxGroup] value should be an Array")}notifyChange(t){this._adapter.notifyChange(t)}handleChange(t){const s=this.getState("value");let o=[];Array.isArray(s)||(o=[s]),t.target.checked?o=[...s,t.target.value]:o=s.filter((a,n)=>a!==t.target.value),"value"in this.getProps()?this.notifyChange(o):(this._adapter.updateGroupValue(o),this.notifyChange(o))}getFormatName(){return this.getProp("name")||"default"}handlePropValueChange(t){Array.isArray(t)?this._adapter.updateGroupValue(t):(typeof t>"u"&&this._adapter.updateGroupValue([]),Wg(!0,"Warning: [Semi CheckboxGroup] value should be an Array"))}destroy(){}}const $9e=EV;class LV extends Uc{get adapter(){return Object.assign(Object.assign({},super.adapter),{updateGroupValue:t=>{this.setState({value:t})},notifyChange:t=>{this.props.onChange&&this.props.onChange(t)}})}constructor(t){super(t),this.state={value:t.value||t.defaultValue},this.foundation=new $9e(this.adapter),this.onChange=this.onChange.bind(this)}componentDidMount(){this.foundation.init()}componentDidUpdate(t){_0(t.value,this.props.value)||this.foundation.handlePropValueChange(this.props.value)}componentWillUnmount(){this.foundation.destroy()}onChange(t){this.foundation.handleChange(t)}render(){const{children:t,options:s,prefixCls:o,direction:i,className:a,id:n,style:u,type:f,disabled:e}=this.props,y=f===fw.TYPE_PURECARD,_=f===fw.TYPE_CARD||y,T=o||D9e.PREFIX,D=ds({[T]:!0,[`${T}-wrapper`]:!0,[`${T}-${i}`]:i,[`${T}-${i}-cardType`]:i&&_,[`${T}-${i}-pureCardType`]:i&&y},a),ce=this.state.value.slice();let ge;return s?ge=(s||[]).map((Ee,_e)=>typeof Ee=="string"?ct.createElement(iT,{role:"listitem",key:_e,disabled:this.props.disabled,value:Ee,prefixCls:o},Ee):ct.createElement(iT,{role:"listitem",key:_e,disabled:Ee.disabled||this.props.disabled,value:Ee.value,prefixCls:o,extra:Ee.extra,className:Ee.className,style:Ee.style,onChange:Ee.onChange},Ee.label)):t&&(ge=ct.Children.toArray(t).map((Ee,_e)=>ct.cloneElement(Ee,{key:_e,role:"listitem"}))),ct.createElement("div",Object.assign({id:n,role:"list","aria-label":this.props["aria-label"],className:D,style:u,"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"]},this.getDataAttr(this.props)),ct.createElement(CV.Provider,{value:{checkboxGroup:{onChange:this.onChange,value:ce,disabled:this.props.disabled,name:this.foundation.getFormatName(),isCardType:_,isPureCardType:y}}},ge))}}LV.propTypes={"aria-describedby":be.string,"aria-errormessage":be.string,"aria-invalid":be.bool,"aria-labelledby":be.string,"aria-required":be.bool,defaultValue:be.array,disabled:be.bool,name:be.string,options:be.array,value:be.array,onChange:be.func,children:be.node,prefixCls:be.string,direction:be.oneOf(fw.DIRECTION_SET),className:be.string,type:be.oneOf([fw.TYPE_DEFAULT,fw.TYPE_CARD,fw.TYPE_PURECARD]),style:be.object};LV.defaultProps={disabled:!1,onChange:()=>{},type:fw.TYPE_DEFAULT,defaultValue:[],direction:fw.DEFAULT_DIRECTION};const Hfe=LV;class Qfe extends iT{}Qfe.Group=Hfe;const w_=Qfe;function AS(){return AS=Object.assign?Object.assign.bind():function(r){for(var t=1;t=0)continue;s[o]=r[o]}return s}var z9e=typeof performance=="object"&&typeof performance.now=="function",eJ=z9e?function(){return performance.now()}:function(){return Date.now()};function tJ(r){cancelAnimationFrame(r.id)}function V9e(r,t){var s=eJ();function o(){eJ()-s>=t?r.call(null):i.id=requestAnimationFrame(o)}var i={id:requestAnimationFrame(o)};return i}var UM=-1;function nJ(r){if(r===void 0&&(r=!1),UM===-1||r){var t=document.createElement("div"),s=t.style;s.width="50px",s.height="50px",s.overflow="scroll",document.body.appendChild(t),UM=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return UM}var tx=null;function rJ(r){if(r===void 0&&(r=!1),tx===null||r){var t=document.createElement("div"),s=t.style;s.width="50px",s.height="50px",s.overflow="scroll",s.direction="rtl";var o=document.createElement("div"),i=o.style;return i.width="100px",i.height="100px",t.appendChild(o),document.body.appendChild(t),t.scrollLeft>0?tx="positive-descending":(t.scrollLeft=1,t.scrollLeft===0?tx="negative":tx="positive-ascending"),document.body.removeChild(t),tx}return tx}var G9e=150,W9e=function(t,s){return t};function Kfe(r){var t,s=r.getItemOffset,o=r.getEstimatedTotalSize,i=r.getItemSize,a=r.getOffsetForIndexAndAlignment,n=r.getStartIndexForOffset,u=r.getStopIndexForStartIndex,f=r.initInstanceProps,e=r.shouldResetStyleCacheOnItemSizeChange,y=r.validateProps;return t=function(_){j9e(T,_);function T(ce){var ge;return ge=_.call(this,ce)||this,ge._instanceProps=f(ge.props,MZ(ge)),ge._outerRef=void 0,ge._resetIsScrollingTimeoutId=null,ge.state={instance:MZ(ge),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof ge.props.initialScrollOffset=="number"?ge.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},ge._callOnItemsRendered=void 0,ge._callOnItemsRendered=M2(function(Ee,_e,Be,He){return ge.props.onItemsRendered({overscanStartIndex:Ee,overscanStopIndex:_e,visibleStartIndex:Be,visibleStopIndex:He})}),ge._callOnScroll=void 0,ge._callOnScroll=M2(function(Ee,_e,Be){return ge.props.onScroll({scrollDirection:Ee,scrollOffset:_e,scrollUpdateWasRequested:Be})}),ge._getItemStyle=void 0,ge._getItemStyle=function(Ee){var _e=ge.props,Be=_e.direction,He=_e.itemSize,at=_e.layout,st=ge._getItemStyleCache(e&&He,e&&at,e&&Be),vt;if(st.hasOwnProperty(Ee))vt=st[Ee];else{var Ot=s(ge.props,Ee,ge._instanceProps),Kt=i(ge.props,Ee,ge._instanceProps),sn=Be==="horizontal"||at==="horizontal",Bn=Be==="rtl",fn=sn?Ot:0;st[Ee]=vt={position:"absolute",left:Bn?void 0:fn,right:Bn?fn:void 0,top:sn?0:Ot,height:sn?"100%":Kt,width:sn?Kt:"100%"}}return vt},ge._getItemStyleCache=void 0,ge._getItemStyleCache=M2(function(Ee,_e,Be){return{}}),ge._onScrollHorizontal=function(Ee){var _e=Ee.currentTarget,Be=_e.clientWidth,He=_e.scrollLeft,at=_e.scrollWidth;ge.setState(function(st){if(st.scrollOffset===He)return null;var vt=ge.props.direction,Ot=He;if(vt==="rtl")switch(rJ()){case"negative":Ot=-He;break;case"positive-descending":Ot=at-Be-He;break}return Ot=Math.max(0,Math.min(Ot,at-Be)),{isScrolling:!0,scrollDirection:st.scrollOffsetvt.clientWidth?nJ():0:st=vt.scrollHeight>vt.clientHeight?nJ():0}this.scrollTo(a(this.props,ge,Ee,at,this._instanceProps,st))},D.componentDidMount=function(){var ge=this.props,Ee=ge.direction,_e=ge.initialScrollOffset,Be=ge.layout;if(typeof _e=="number"&&this._outerRef!=null){var He=this._outerRef;Ee==="horizontal"||Be==="horizontal"?He.scrollLeft=_e:He.scrollTop=_e}this._callPropsCallbacks()},D.componentDidUpdate=function(){var ge=this.props,Ee=ge.direction,_e=ge.layout,Be=this.state,He=Be.scrollOffset,at=Be.scrollUpdateWasRequested;if(at&&this._outerRef!=null){var st=this._outerRef;if(Ee==="horizontal"||_e==="horizontal")if(Ee==="rtl")switch(rJ()){case"negative":st.scrollLeft=-He;break;case"positive-ascending":st.scrollLeft=He;break;default:var vt=st.clientWidth,Ot=st.scrollWidth;st.scrollLeft=Ot-vt-He;break}else st.scrollLeft=He;else st.scrollTop=He}this._callPropsCallbacks()},D.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&tJ(this._resetIsScrollingTimeoutId)},D.render=function(){var ge=this.props,Ee=ge.children,_e=ge.className,Be=ge.direction,He=ge.height,at=ge.innerRef,st=ge.innerElementType,vt=ge.innerTagName,Ot=ge.itemCount,Kt=ge.itemData,sn=ge.itemKey,Bn=sn===void 0?W9e:sn,fn=ge.layout,bn=ge.outerElementType,$n=ge.outerTagName,_n=ge.style,Nr=ge.useIsScrolling,Cr=ge.width,Dr=this.state.isScrolling,fr=Be==="horizontal"||fn==="horizontal",_r=fr?this._onScrollHorizontal:this._onScrollVertical,br=this._getRangeToRender(),ss=br[0],In=br[1],dr=[];if(Ot>0)for(var lr=ss;lr<=In;lr++)dr.push(Vt.createElement(Ee,{data:Kt,key:Bn(lr,Kt),index:lr,isScrolling:Nr?Dr:void 0,style:this._getItemStyle(lr)}));var Ir=o(this.props,this._instanceProps);return Vt.createElement(bn||$n||"div",{className:_e,onScroll:_r,ref:this._outerRefSetter,style:AS({position:"relative",height:He,width:Cr,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:Be},_n)},Vt.createElement(st||vt||"div",{children:dr,ref:at,style:{height:fr?"100%":Ir,pointerEvents:Dr?"none":void 0,width:fr?Ir:"100%"}}))},D._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var ge=this.props.itemCount;if(ge>0){var Ee=this._getRangeToRender(),_e=Ee[0],Be=Ee[1],He=Ee[2],at=Ee[3];this._callOnItemsRendered(_e,Be,He,at)}}if(typeof this.props.onScroll=="function"){var st=this.state,vt=st.scrollDirection,Ot=st.scrollOffset,Kt=st.scrollUpdateWasRequested;this._callOnScroll(vt,Ot,Kt)}},D._getRangeToRender=function(){var ge=this.props,Ee=ge.itemCount,_e=ge.overscanCount,Be=this.state,He=Be.isScrolling,at=Be.scrollDirection,st=Be.scrollOffset;if(Ee===0)return[0,0,0,0];var vt=n(this.props,st,this._instanceProps),Ot=u(this.props,vt,st,this._instanceProps),Kt=!He||at==="backward"?Math.max(1,_e):1,sn=!He||at==="forward"?Math.max(1,_e):1;return[Math.max(0,vt-Kt),Math.max(0,Math.min(Ee-1,Ot+sn)),vt,Ot]},T}(Vt.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var q9e=function(t,s){t.children,t.direction,t.height,t.layout,t.innerTagName,t.outerTagName,t.width,s.instance},Y9e=50,Yx=function(t,s,o){var i=t,a=i.itemSize,n=o.itemMetadataMap,u=o.lastMeasuredIndex;if(s>u){var f=0;if(u>=0){var e=n[u];f=e.offset+e.size}for(var y=u+1;y<=s;y++){var _=a(y);n[y]={offset:f,size:_},f+=_}o.lastMeasuredIndex=s}return n[s]},X9e=function(t,s,o){var i=s.itemMetadataMap,a=s.lastMeasuredIndex,n=a>0?i[a].offset:0;return n>=o?zfe(t,s,a,0,o):Z9e(t,s,Math.max(0,a),o)},zfe=function(t,s,o,i,a){for(;i<=o;){var n=i+Math.floor((o-i)/2),u=Yx(t,n,s).offset;if(u===a)return n;ua&&(o=n-1)}return i>0?i-1:0},Z9e=function(t,s,o,i){for(var a=t.itemCount,n=1;o=o&&(n=o-1),n>=0){var f=i[n];u=f.offset+f.size}var e=o-n-1,y=e*a;return u+y},J9e=Kfe({getItemOffset:function(t,s,o){return Yx(t,s,o).offset},getItemSize:function(t,s,o){return o.itemMetadataMap[s].size},getEstimatedTotalSize:sJ,getOffsetForIndexAndAlignment:function(t,s,o,i,a,n){var u=t.direction,f=t.height,e=t.layout,y=t.width,_=u==="horizontal"||e==="horizontal",T=_?y:f,D=Yx(t,s,a),ce=sJ(t,a),ge=Math.max(0,Math.min(ce-T,D.offset)),Ee=Math.max(0,D.offset-T+D.size+n);switch(o==="smart"&&(i>=Ee-T&&i<=ge+T?o="auto":o="center"),o){case"start":return ge;case"end":return Ee;case"center":return Math.round(Ee+(ge-Ee)/2);case"auto":default:return i>=Ee&&i<=ge?i:i=_e-ce&&i<=Ee+ce?o="auto":o="center"),o){case"start":return Ee;case"end":return _e;case"center":{var Be=Math.round(_e+(Ee-_e)/2);return Bege+Math.floor(ce/2)?ge:Be}case"auto":default:return i>=_e&&i<=Ee?i:i<_e?_e:Ee}},getStartIndexForOffset:function(t,s){var o=t.itemCount,i=t.itemSize;return Math.max(0,Math.min(o-1,Math.floor(s/i)))},getStopIndexForStartIndex:function(t,s,o){var i=t.direction,a=t.height,n=t.itemCount,u=t.itemSize,f=t.layout,e=t.width,y=i==="horizontal"||f==="horizontal",_=s*u,T=y?e:a,D=Math.ceil((T+o-_)/u);return Math.max(0,Math.min(n-1,s+D-1))},initInstanceProps:function(t){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(t){t.itemSize}});const Vfe={PREFIX:`${fi}-tag`},nN={TAG_SIZE:["default","small","large"],TAG_COLOR:["grey","red","pink","purple","violet","indigo","blue","light-blue","cyan","teal","green","light-green","lime","yellow","amber","orange","white"],TAG_TYPE:["light","solid","ghost"],AVATAR_SHAPE:["square","circle"]};var eje=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ithis.close(fn,o,s)},ct.createElement(GC,{size:"small"})):null,sn=rA(o),Bn=ds(`${Eb}-content`,`${Eb}-content-${sn?"ellipsis":"center"}`);return ct.createElement("div",Object.assign({"aria-label":this.props["aria-label"]||sn?`${n?"Closable ":""}Tag: ${o}`:""},Ot),Ee?ct.createElement("div",{className:`${Eb}-prefix-icon`},Ee):null,D?this.renderAvatar():null,ct.createElement("div",{className:Bn},o),_e?ct.createElement("div",{className:`${Eb}-suffix-icon`},_e):null,Kt)}};og.defaultProps={size:Wfe[0],color:Gfe[0],closable:!1,type:qfe[0],onClose:()=>{},onClick:()=>{},onMouseEnter:()=>{},style:{},className:"",shape:"square",avatarShape:"square",prefixIcon:null,suffixIcon:null};og.propTypes={children:be.node,tagKey:be.oneOfType([be.string,be.number]),size:be.oneOf(Wfe),color:be.oneOf(Gfe),type:be.oneOf(qfe),closable:be.bool,visible:be.bool,onClose:be.func,onClick:be.func,prefixIcon:be.node,suffixIcon:be.node,style:be.object,className:be.string,avatarSrc:be.string,avatarShape:be.oneOf(tje),"aria-label":be.string};const nje={PREFIX:`${fi}-tagInput`},oJ={SIZE_SET:["large","default","small"],STATUS:["success","default","error","warning"]},rje=(r,t)=>{let s=[];if(rA(t)||mg(t))s=r.split(t);else if(wz(t)){const o=t[0];s=r;for(let i=1;i{const{value:o}=s.target,{entering:i}=this.getStates();i?this._onInputChange(o,s):this._checkInputChangeValid(o)&&this._onInputChange(o,s)},this.handleInputCompositionStart=s=>{const{maxLength:o}=this.getProps();mg(o)&&this._adapter.setEntering(!0)},this.handleInputCompositionEnd=s=>{const{value:o}=s.target,{maxLength:i,onInputExceed:a,separator:n}=this.getProps();if(!mg(i))return;this._adapter.setEntering(!1);let u=!0;const f=zR(o,n);let e=0;for(;ei){u=!1,Mc(a)&&a(o);break}if(u)this._adapter.setInputValue(o);else{const y=f.slice(0,e);e{const{maxLength:o,onInputExceed:i,separator:a}=this._adapter.getProps(),{inputValue:n}=this._adapter.getStates();let u=!0;if(mg(o)){const f=zR(s,a),e=zR(n,a),y=Math.max(f.length,e.length);for(let _=0;_e[_].length)&&f[_].length>o){u=!1,Mc(i)&&i(s);break}}return u},this.handleKeyDown=s=>{const{inputValue:o,tagsArray:i}=this._adapter.getStates(),a=s.keyCode;a===hg.ENTER&&(s.preventDefault(),o!==""&&this._handleAddTags(s));const{length:n}=i;if(a===hg.BACKSPACE&&o===""&&n>0){const u=i.slice(0,n-1),f=i[n-1];this._onRemove(u,f,n-1)}this._adapter.notifyKeyDown(s)}}_handleAddTags(t){const{separator:s,max:o,onExceed:i,allowDuplicates:a}=this._adapter.getProps(),{inputValue:n,tagsArray:u}=this._adapter.getStates();let f=zR(n,s);f=f.filter((y,_)=>!a&&(u.includes(y)||f.indexOf(y)!==_)?!1:rA(y)&&y.trim()!=="");let e=u.concat(f);mg(o)&&e.length>o&&(Mc(i)&&i(e),e=e.slice(0,o),f=f.slice(0,o-u.length)),f.length>0&&this._onAdd(e,f),this._onInputChange("",t)}handleInputBlur(t){const{addOnBlur:s}=this._adapter.getProps();s===!0&&this._handleAddTags(t),this._adapter.setFocusing(!1),this._adapter.notifyBlur(t)}handleInputFocus(t){this._adapter.setFocusing(!0),this._adapter.notifyFocus(t)}handleClearEnterPress(t){N1(t)&&this.handleClearBtn(t)}handleClearBtn(t){const{inputValue:s,tagsArray:o}=this._adapter.getStates();o.length>0&&(this._adapter.setTagsArray([]),this._adapter.notifyTagChange([])),s.length>0&&this._onInputChange("",t),t.stopPropagation()}handleTagClose(t){const{tagsArray:s}=this._adapter.getStates(),o=[...s];o.splice(t,1);const i=s[t];this._onRemove(o,i,t)}handleInputMouseEnter(){this._adapter.setHovering(!0)}handleInputMouseLeave(){this._adapter.setHovering(!1)}handleClick(t){const{disabled:s}=this.getProps();if(s)return;this._adapter.getClickOutsideHandler()||(this._adapter.setActive(!0),this._adapter.registerClickOutsideHandler(i=>this.clickOutsideCallBack()))}clickOutsideCallBack(){this._adapter.unregisterClickOutsideHandler(),this._adapter.setActive(!1)}handleClickPrefixOrSuffix(t){const{disabled:s}=this._adapter.getProps(),{isFocus:o}=this._adapter.getStates();!s&&!o&&this._adapter.toggleFocusing(!0)}handlePreventMouseDown(t){t&&Mc(t.preventDefault)&&t.preventDefault()}_onRemove(t,s,o){this._isControlledComponent()||this._adapter.setTagsArray(t),this._adapter.notifyTagChange(t),this._adapter.notifyTagRemove(s,o)}_onAdd(t,s){this._isControlledComponent()||this._adapter.setTagsArray(t),this._adapter.notifyTagChange(t),this._adapter.notifyTagAdd(s)}_onInputChange(t,s){this._adapter.setInputValue(t),this._adapter.notifyInputChange(t,s)}handleSortEnd(t){const{oldIndex:s,newIndex:o}=t,{tagsArray:i}=this.getStates(),a=sje(i,s,o);this._isControlledComponent()||this._adapter.setTagsArray(a),this._adapter.notifyTagChange(a)}}const ije=oje;function aje(){for(var r=arguments.length,t=new Array(r),s=0;so=>{t.forEach(i=>i(o))},t)}const rF=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function rN(r){const t=Object.prototype.toString.call(r);return t==="[object Window]"||t==="[object global]"}function xV(r){return"nodeType"in r}function Cv(r){var t,s;return r?rN(r)?r:xV(r)&&(t=(s=r.ownerDocument)==null?void 0:s.defaultView)!=null?t:window:window}function _V(r){const{Document:t}=Cv(r);return r instanceof t}function R4(r){return rN(r)?!1:r instanceof Cv(r).HTMLElement}function Xfe(r){return r instanceof Cv(r).SVGElement}function sN(r){return r?rN(r)?r.document:xV(r)?_V(r)?r:R4(r)||Xfe(r)?r.ownerDocument:document:document:document}const t1=rF?Vt.useLayoutEffect:Vt.useEffect;function sF(r){const t=Vt.useRef(r);return t1(()=>{t.current=r}),Vt.useCallback(function(){for(var s=arguments.length,o=new Array(s),i=0;i{r.current=setInterval(o,i)},[]),s=Vt.useCallback(()=>{r.current!==null&&(clearInterval(r.current),r.current=null)},[]);return[t,s]}function dO(r,t){t===void 0&&(t=[r]);const s=Vt.useRef(r);return t1(()=>{s.current!==r&&(s.current=r)},t),s}function B4(r,t){const s=Vt.useRef();return Vt.useMemo(()=>{const o=r(s.current);return s.current=o,o},[...t])}function uP(r){const t=sF(r),s=Vt.useRef(null),o=Vt.useCallback(i=>{i!==s.current&&(t==null||t(i,s.current)),s.current=i},[]);return[s,o]}function cP(r){const t=Vt.useRef();return Vt.useEffect(()=>{t.current=r},[r]),t.current}let $M={};function k4(r,t){return Vt.useMemo(()=>{if(t)return t;const s=$M[r]==null?0:$M[r]+1;return $M[r]=s,r+"-"+s},[r,t])}function Zfe(r){return function(t){for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;i{const u=Object.entries(n);for(const[f,e]of u){const y=a[f];y!=null&&(a[f]=y+r*e)}return a},{...t})}}const C_=Zfe(1),hO=Zfe(-1);function uje(r){return"clientX"in r&&"clientY"in r}function oF(r){if(!r)return!1;const{KeyboardEvent:t}=Cv(r.target);return t&&r instanceof t}function cje(r){if(!r)return!1;const{TouchEvent:t}=Cv(r.target);return t&&r instanceof t}function fP(r){if(cje(r)){if(r.touches&&r.touches.length){const{clientX:t,clientY:s}=r.touches[0];return{x:t,y:s}}else if(r.changedTouches&&r.changedTouches.length){const{clientX:t,clientY:s}=r.changedTouches[0];return{x:t,y:s}}}return uje(r)?{x:r.clientX,y:r.clientY}:null}const OL=Object.freeze({Translate:{toString(r){if(!r)return;const{x:t,y:s}=r;return"translate3d("+(t?Math.round(t):0)+"px, "+(s?Math.round(s):0)+"px, 0)"}},Scale:{toString(r){if(!r)return;const{scaleX:t,scaleY:s}=r;return"scaleX("+t+") scaleY("+s+")"}},Transform:{toString(r){if(r)return[OL.Translate.toString(r),OL.Scale.toString(r)].join(" ")}},Transition:{toString(r){let{property:t,duration:s,easing:o}=r;return t+" "+s+"ms "+o}}}),iJ="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function fje(r){return r.matches(iJ)?r:r.querySelector(iJ)}const dje={display:"none"};function hje(r){let{id:t,value:s}=r;return ct.createElement("div",{id:t,style:dje},s)}function Aje(r){let{id:t,announcement:s,ariaLiveType:o="assertive"}=r;const i={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return ct.createElement("div",{id:t,style:i,role:"status","aria-live":o,"aria-atomic":!0},s)}function pje(){const[r,t]=Vt.useState("");return{announce:Vt.useCallback(o=>{o!=null&&t(o)},[]),announcement:r}}const Jfe=Vt.createContext(null);function mje(r){const t=Vt.useContext(Jfe);Vt.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of ");return t(r)},[r,t])}function gje(){const[r]=Vt.useState(()=>new Set),t=Vt.useCallback(o=>(r.add(o),()=>r.delete(o)),[r]);return[Vt.useCallback(o=>{let{type:i,event:a}=o;r.forEach(n=>{var u;return(u=n[i])==null?void 0:u.call(n,a)})},[r]),t]}const bje={draggable:` + To pick up a draggable item, press the space bar. + While dragging, use the arrow keys to move the item. + Press space again to drop the item in its new position, or press escape to cancel. + `},vje={onDragStart(r){let{active:t}=r;return"Picked up draggable item "+t.id+"."},onDragOver(r){let{active:t,over:s}=r;return s?"Draggable item "+t.id+" was moved over droppable area "+s.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(r){let{active:t,over:s}=r;return s?"Draggable item "+t.id+" was dropped over droppable area "+s.id:"Draggable item "+t.id+" was dropped."},onDragCancel(r){let{active:t}=r;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function yje(r){let{announcements:t=vje,container:s,hiddenTextDescribedById:o,screenReaderInstructions:i=bje}=r;const{announce:a,announcement:n}=pje(),u=k4("DndLiveRegion"),[f,e]=Vt.useState(!1);if(Vt.useEffect(()=>{e(!0)},[]),mje(Vt.useMemo(()=>({onDragStart(_){let{active:T}=_;a(t.onDragStart({active:T}))},onDragMove(_){let{active:T,over:D}=_;t.onDragMove&&a(t.onDragMove({active:T,over:D}))},onDragOver(_){let{active:T,over:D}=_;a(t.onDragOver({active:T,over:D}))},onDragEnd(_){let{active:T,over:D}=_;a(t.onDragEnd({active:T,over:D}))},onDragCancel(_){let{active:T,over:D}=_;a(t.onDragCancel({active:T,over:D}))}}),[a,t])),!f)return null;const y=ct.createElement(ct.Fragment,null,ct.createElement(hje,{id:o,value:i.draggable}),ct.createElement(Aje,{id:u,announcement:n}));return s?av.createPortal(y,s):y}var Sg;(function(r){r.DragStart="dragStart",r.DragMove="dragMove",r.DragEnd="dragEnd",r.DragCancel="dragCancel",r.DragOver="dragOver",r.RegisterDroppable="registerDroppable",r.SetDroppableDisabled="setDroppableDisabled",r.UnregisterDroppable="unregisterDroppable"})(Sg||(Sg={}));function dP(){}function jM(r,t){return Vt.useMemo(()=>({sensor:r,options:t??{}}),[r,t])}function wje(){for(var r=arguments.length,t=new Array(r),s=0;s[...t].filter(o=>o!=null),[...t])}const O1=Object.freeze({x:0,y:0});function ede(r,t){return Math.sqrt(Math.pow(r.x-t.x,2)+Math.pow(r.y-t.y,2))}function Cje(r,t){const s=fP(r);if(!s)return"0 0";const o={x:(s.x-t.left)/t.width*100,y:(s.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function tde(r,t){let{data:{value:s}}=r,{data:{value:o}}=t;return s-o}function Eje(r,t){let{data:{value:s}}=r,{data:{value:o}}=t;return o-s}function aJ(r){let{left:t,top:s,height:o,width:i}=r;return[{x:t,y:s},{x:t+i,y:s},{x:t,y:s+o},{x:t+i,y:s+o}]}function nde(r,t){if(!r||r.length===0)return null;const[s]=r;return t?s[t]:s}function lJ(r,t,s){return t===void 0&&(t=r.left),s===void 0&&(s=r.top),{x:t+r.width*.5,y:s+r.height*.5}}const Lje=r=>{let{collisionRect:t,droppableRects:s,droppableContainers:o}=r;const i=lJ(t,t.left,t.top),a=[];for(const n of o){const{id:u}=n,f=s.get(u);if(f){const e=ede(lJ(f),i);a.push({id:u,data:{droppableContainer:n,value:e}})}}return a.sort(tde)},Sje=r=>{let{collisionRect:t,droppableRects:s,droppableContainers:o}=r;const i=aJ(t),a=[];for(const n of o){const{id:u}=n,f=s.get(u);if(f){const e=aJ(f),y=i.reduce((T,D,ce)=>T+ede(e[ce],D),0),_=Number((y/4).toFixed(4));a.push({id:u,data:{droppableContainer:n,value:_}})}}return a.sort(tde)};function xje(r,t){const s=Math.max(t.top,r.top),o=Math.max(t.left,r.left),i=Math.min(t.left+t.width,r.left+r.width),a=Math.min(t.top+t.height,r.top+r.height),n=i-o,u=a-s;if(o{let{collisionRect:t,droppableRects:s,droppableContainers:o}=r;const i=[];for(const a of o){const{id:n}=a,u=s.get(n);if(u){const f=xje(u,t);f>0&&i.push({id:n,data:{droppableContainer:a,value:f}})}}return i.sort(Eje)};function Tje(r,t,s){return{...r,scaleX:t&&s?t.width/s.width:1,scaleY:t&&s?t.height/s.height:1}}function rde(r,t){return r&&t?{x:r.left-t.left,y:r.top-t.top}:O1}function Nje(r){return function(s){for(var o=arguments.length,i=new Array(o>1?o-1:0),a=1;a({...n,top:n.top+r*u.y,bottom:n.bottom+r*u.y,left:n.left+r*u.x,right:n.right+r*u.x}),{...s})}}const Ije=Nje(1);function sde(r){if(r.startsWith("matrix3d(")){const t=r.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(r.startsWith("matrix(")){const t=r.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function Oje(r,t,s){const o=sde(t);if(!o)return r;const{scaleX:i,scaleY:a,x:n,y:u}=o,f=r.left-n-(1-i)*parseFloat(s),e=r.top-u-(1-a)*parseFloat(s.slice(s.indexOf(" ")+1)),y=i?r.width/i:r.width,_=a?r.height/a:r.height;return{width:y,height:_,top:e,right:f+y,bottom:e+_,left:f}}const Rje={ignoreTransform:!1};function oN(r,t){t===void 0&&(t=Rje);let s=r.getBoundingClientRect();if(t.ignoreTransform){const{transform:e,transformOrigin:y}=Cv(r).getComputedStyle(r);e&&(s=Oje(s,e,y))}const{top:o,left:i,width:a,height:n,bottom:u,right:f}=s;return{top:o,left:i,width:a,height:n,bottom:u,right:f}}function uJ(r){return oN(r,{ignoreTransform:!0})}function Bje(r){const t=r.innerWidth,s=r.innerHeight;return{top:0,left:0,right:t,bottom:s,width:t,height:s}}function kje(r,t){return t===void 0&&(t=Cv(r).getComputedStyle(r)),t.position==="fixed"}function Pje(r,t){t===void 0&&(t=Cv(r).getComputedStyle(r));const s=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(i=>{const a=t[i];return typeof a=="string"?s.test(a):!1})}function iF(r,t){const s=[];function o(i){if(t!=null&&s.length>=t||!i)return s;if(_V(i)&&i.scrollingElement!=null&&!s.includes(i.scrollingElement))return s.push(i.scrollingElement),s;if(!R4(i)||Xfe(i)||s.includes(i))return s;const a=Cv(r).getComputedStyle(i);return i!==r&&Pje(i,a)&&s.push(i),kje(i,a)?s:o(i.parentNode)}return r?o(r):s}function ode(r){const[t]=iF(r,1);return t??null}function HM(r){return!rF||!r?null:rN(r)?r:xV(r)?_V(r)||r===sN(r).scrollingElement?window:R4(r)?r:null:null}function ide(r){return rN(r)?r.scrollX:r.scrollLeft}function ade(r){return rN(r)?r.scrollY:r.scrollTop}function R9(r){return{x:ide(r),y:ade(r)}}var Mg;(function(r){r[r.Forward=1]="Forward",r[r.Backward=-1]="Backward"})(Mg||(Mg={}));function lde(r){return!rF||!r?!1:r===document.scrollingElement}function ude(r){const t={x:0,y:0},s=lde(r)?{height:window.innerHeight,width:window.innerWidth}:{height:r.clientHeight,width:r.clientWidth},o={x:r.scrollWidth-s.width,y:r.scrollHeight-s.height},i=r.scrollTop<=t.y,a=r.scrollLeft<=t.x,n=r.scrollTop>=o.y,u=r.scrollLeft>=o.x;return{isTop:i,isLeft:a,isBottom:n,isRight:u,maxScroll:o,minScroll:t}}const Dje={x:.2,y:.2};function Fje(r,t,s,o,i){let{top:a,left:n,right:u,bottom:f}=s;o===void 0&&(o=10),i===void 0&&(i=Dje);const{isTop:e,isBottom:y,isLeft:_,isRight:T}=ude(r),D={x:0,y:0},ce={x:0,y:0},ge={height:t.height*i.y,width:t.width*i.x};return!e&&a<=t.top+ge.height?(D.y=Mg.Backward,ce.y=o*Math.abs((t.top+ge.height-a)/ge.height)):!y&&f>=t.bottom-ge.height&&(D.y=Mg.Forward,ce.y=o*Math.abs((t.bottom-ge.height-f)/ge.height)),!T&&u>=t.right-ge.width?(D.x=Mg.Forward,ce.x=o*Math.abs((t.right-ge.width-u)/ge.width)):!_&&n<=t.left+ge.width&&(D.x=Mg.Backward,ce.x=o*Math.abs((t.left+ge.width-n)/ge.width)),{direction:D,speed:ce}}function Mje(r){if(r===document.scrollingElement){const{innerWidth:a,innerHeight:n}=window;return{top:0,left:0,right:a,bottom:n,width:a,height:n}}const{top:t,left:s,right:o,bottom:i}=r.getBoundingClientRect();return{top:t,left:s,right:o,bottom:i,width:r.clientWidth,height:r.clientHeight}}function cde(r){return r.reduce((t,s)=>C_(t,R9(s)),O1)}function Uje(r){return r.reduce((t,s)=>t+ide(s),0)}function $je(r){return r.reduce((t,s)=>t+ade(s),0)}function fde(r,t){if(t===void 0&&(t=oN),!r)return;const{top:s,left:o,bottom:i,right:a}=t(r);ode(r)&&(i<=0||a<=0||s>=window.innerHeight||o>=window.innerWidth)&&r.scrollIntoView({block:"center",inline:"center"})}const jje=[["x",["left","right"],Uje],["y",["top","bottom"],$je]];class TV{constructor(t,s){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const o=iF(s),i=cde(o);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,n,u]of jje)for(const f of n)Object.defineProperty(this,f,{get:()=>{const e=u(o),y=i[a]-e;return this.rect[f]+y},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class n5{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(s=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...s)})},this.target=t}add(t,s,o){var i;(i=this.target)==null||i.addEventListener(t,s,o),this.listeners.push([t,s,o])}}function Hje(r){const{EventTarget:t}=Cv(r);return r instanceof t?r:sN(r)}function QM(r,t){const s=Math.abs(r.x),o=Math.abs(r.y);return typeof t=="number"?Math.sqrt(s**2+o**2)>t:"x"in t&&"y"in t?s>t.x&&o>t.y:"x"in t?s>t.x:"y"in t?o>t.y:!1}var Ny;(function(r){r.Click="click",r.DragStart="dragstart",r.Keydown="keydown",r.ContextMenu="contextmenu",r.Resize="resize",r.SelectionChange="selectionchange",r.VisibilityChange="visibilitychange"})(Ny||(Ny={}));function cJ(r){r.preventDefault()}function Qje(r){r.stopPropagation()}var Cp;(function(r){r.Space="Space",r.Down="ArrowDown",r.Right="ArrowRight",r.Left="ArrowLeft",r.Up="ArrowUp",r.Esc="Escape",r.Enter="Enter"})(Cp||(Cp={}));const dde={start:[Cp.Space,Cp.Enter],cancel:[Cp.Esc],end:[Cp.Space,Cp.Enter]},Kje=(r,t)=>{let{currentCoordinates:s}=t;switch(r.code){case Cp.Right:return{...s,x:s.x+25};case Cp.Left:return{...s,x:s.x-25};case Cp.Down:return{...s,y:s.y+25};case Cp.Up:return{...s,y:s.y-25}}};class NV{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:s}}=t;this.props=t,this.listeners=new n5(sN(s)),this.windowListeners=new n5(Cv(s)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ny.Resize,this.handleCancel),this.windowListeners.add(Ny.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Ny.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:s}=this.props,o=t.node.current;o&&fde(o),s(O1)}handleKeyDown(t){if(oF(t)){const{active:s,context:o,options:i}=this.props,{keyboardCodes:a=dde,coordinateGetter:n=Kje,scrollBehavior:u="smooth"}=i,{code:f}=t;if(a.end.includes(f)){this.handleEnd(t);return}if(a.cancel.includes(f)){this.handleCancel(t);return}const{collisionRect:e}=o.current,y=e?{x:e.left,y:e.top}:O1;this.referenceCoordinates||(this.referenceCoordinates=y);const _=n(t,{active:s,context:o.current,currentCoordinates:y});if(_){const T=hO(_,y),D={x:0,y:0},{scrollableAncestors:ce}=o.current;for(const ge of ce){const Ee=t.code,{isTop:_e,isRight:Be,isLeft:He,isBottom:at,maxScroll:st,minScroll:vt}=ude(ge),Ot=Mje(ge),Kt={x:Math.min(Ee===Cp.Right?Ot.right-Ot.width/2:Ot.right,Math.max(Ee===Cp.Right?Ot.left:Ot.left+Ot.width/2,_.x)),y:Math.min(Ee===Cp.Down?Ot.bottom-Ot.height/2:Ot.bottom,Math.max(Ee===Cp.Down?Ot.top:Ot.top+Ot.height/2,_.y))},sn=Ee===Cp.Right&&!Be||Ee===Cp.Left&&!He,Bn=Ee===Cp.Down&&!at||Ee===Cp.Up&&!_e;if(sn&&Kt.x!==_.x){const fn=ge.scrollLeft+T.x,bn=Ee===Cp.Right&&fn<=st.x||Ee===Cp.Left&&fn>=vt.x;if(bn&&!T.y){ge.scrollTo({left:fn,behavior:u});return}bn?D.x=ge.scrollLeft-fn:D.x=Ee===Cp.Right?ge.scrollLeft-st.x:ge.scrollLeft-vt.x,D.x&&ge.scrollBy({left:-D.x,behavior:u});break}else if(Bn&&Kt.y!==_.y){const fn=ge.scrollTop+T.y,bn=Ee===Cp.Down&&fn<=st.y||Ee===Cp.Up&&fn>=vt.y;if(bn&&!T.x){ge.scrollTo({top:fn,behavior:u});return}bn?D.y=ge.scrollTop-fn:D.y=Ee===Cp.Down?ge.scrollTop-st.y:ge.scrollTop-vt.y,D.y&&ge.scrollBy({top:-D.y,behavior:u});break}}this.handleMove(t,C_(hO(_,this.referenceCoordinates),D))}}}handleMove(t,s){const{onMove:o}=this.props;t.preventDefault(),o(s)}handleEnd(t){const{onEnd:s}=this.props;t.preventDefault(),this.detach(),s()}handleCancel(t){const{onCancel:s}=this.props;t.preventDefault(),this.detach(),s()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}NV.activators=[{eventName:"onKeyDown",handler:(r,t,s)=>{let{keyboardCodes:o=dde,onActivation:i}=t,{active:a}=s;const{code:n}=r.nativeEvent;if(o.start.includes(n)){const u=a.activatorNode.current;return u&&r.target!==u?!1:(r.preventDefault(),i==null||i({event:r.nativeEvent}),!0)}return!1}}];function fJ(r){return!!(r&&"distance"in r)}function dJ(r){return!!(r&&"delay"in r)}class IV{constructor(t,s,o){var i;o===void 0&&(o=Hje(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=s;const{event:a}=t,{target:n}=a;this.props=t,this.events=s,this.document=sN(n),this.documentListeners=new n5(this.document),this.listeners=new n5(o),this.windowListeners=new n5(Cv(n)),this.initialCoordinates=(i=fP(a))!=null?i:O1,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:s,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Ny.Resize,this.handleCancel),this.windowListeners.add(Ny.DragStart,cJ),this.windowListeners.add(Ny.VisibilityChange,this.handleCancel),this.windowListeners.add(Ny.ContextMenu,cJ),this.documentListeners.add(Ny.Keydown,this.handleKeydown),s){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(dJ(s)){this.timeoutId=setTimeout(this.handleStart,s.delay);return}if(fJ(s))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:s}=this.props;t&&(this.activated=!0,this.documentListeners.add(Ny.Click,Qje,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ny.SelectionChange,this.removeTextSelection),s(t))}handleMove(t){var s;const{activated:o,initialCoordinates:i,props:a}=this,{onMove:n,options:{activationConstraint:u}}=a;if(!i)return;const f=(s=fP(t))!=null?s:O1,e=hO(i,f);if(!o&&u){if(fJ(u)){if(u.tolerance!=null&&QM(e,u.tolerance))return this.handleCancel();if(QM(e,u.distance))return this.handleStart()}return dJ(u)&&QM(e,u.tolerance)?this.handleCancel():void 0}t.cancelable&&t.preventDefault(),n(f)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===Cp.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const zje={move:{name:"pointermove"},end:{name:"pointerup"}};class hde extends IV{constructor(t){const{event:s}=t,o=sN(s.target);super(t,zje,o)}}hde.activators=[{eventName:"onPointerDown",handler:(r,t)=>{let{nativeEvent:s}=r,{onActivation:o}=t;return!s.isPrimary||s.button!==0?!1:(o==null||o({event:s}),!0)}}];const Vje={move:{name:"mousemove"},end:{name:"mouseup"}};var B9;(function(r){r[r.RightClick=2]="RightClick"})(B9||(B9={}));class Ade extends IV{constructor(t){super(t,Vje,sN(t.event.target))}}Ade.activators=[{eventName:"onMouseDown",handler:(r,t)=>{let{nativeEvent:s}=r,{onActivation:o}=t;return s.button===B9.RightClick?!1:(o==null||o({event:s}),!0)}}];const KM={move:{name:"touchmove"},end:{name:"touchend"}};class pde extends IV{constructor(t){super(t,KM)}static setup(){return window.addEventListener(KM.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(KM.move.name,t)};function t(){}}}pde.activators=[{eventName:"onTouchStart",handler:(r,t)=>{let{nativeEvent:s}=r,{onActivation:o}=t;const{touches:i}=s;return i.length>1?!1:(o==null||o({event:s}),!0)}}];var r5;(function(r){r[r.Pointer=0]="Pointer",r[r.DraggableRect=1]="DraggableRect"})(r5||(r5={}));var AO;(function(r){r[r.TreeOrder=0]="TreeOrder",r[r.ReversedTreeOrder=1]="ReversedTreeOrder"})(AO||(AO={}));function Gje(r){let{acceleration:t,activator:s=r5.Pointer,canScroll:o,draggingRect:i,enabled:a,interval:n=5,order:u=AO.TreeOrder,pointerCoordinates:f,scrollableAncestors:e,scrollableAncestorRects:y,delta:_,threshold:T}=r;const D=qje({delta:_,disabled:!a}),[ce,ge]=lje(),Ee=Vt.useRef({x:0,y:0}),_e=Vt.useRef({x:0,y:0}),Be=Vt.useMemo(()=>{switch(s){case r5.Pointer:return f?{top:f.y,bottom:f.y,left:f.x,right:f.x}:null;case r5.DraggableRect:return i}},[s,i,f]),He=Vt.useRef(null),at=Vt.useCallback(()=>{const vt=He.current;if(!vt)return;const Ot=Ee.current.x*_e.current.x,Kt=Ee.current.y*_e.current.y;vt.scrollBy(Ot,Kt)},[]),st=Vt.useMemo(()=>u===AO.TreeOrder?[...e].reverse():e,[u,e]);Vt.useEffect(()=>{if(!a||!e.length||!Be){ge();return}for(const vt of st){if((o==null?void 0:o(vt))===!1)continue;const Ot=e.indexOf(vt),Kt=y[Ot];if(!Kt)continue;const{direction:sn,speed:Bn}=Fje(vt,Kt,Be,t,T);for(const fn of["x","y"])D[fn][sn[fn]]||(Bn[fn]=0,sn[fn]=0);if(Bn.x>0||Bn.y>0){ge(),He.current=vt,ce(at,n),Ee.current=Bn,_e.current=sn;return}}Ee.current={x:0,y:0},_e.current={x:0,y:0},ge()},[t,at,o,ge,a,n,JSON.stringify(Be),JSON.stringify(D),ce,e,st,y,JSON.stringify(T)])}const Wje={x:{[Mg.Backward]:!1,[Mg.Forward]:!1},y:{[Mg.Backward]:!1,[Mg.Forward]:!1}};function qje(r){let{delta:t,disabled:s}=r;const o=cP(t);return B4(i=>{if(s||!o||!i)return Wje;const a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Mg.Backward]:i.x[Mg.Backward]||a.x===-1,[Mg.Forward]:i.x[Mg.Forward]||a.x===1},y:{[Mg.Backward]:i.y[Mg.Backward]||a.y===-1,[Mg.Forward]:i.y[Mg.Forward]||a.y===1}}},[s,t,o])}function Yje(r,t){const s=t!==null?r.get(t):void 0,o=s?s.node.current:null;return B4(i=>{var a;return t===null?null:(a=o??i)!=null?a:null},[o,t])}function Xje(r,t){return Vt.useMemo(()=>r.reduce((s,o)=>{const{sensor:i}=o,a=i.activators.map(n=>({eventName:n.eventName,handler:t(n.handler,o)}));return[...s,...a]},[]),[r,t])}var pO;(function(r){r[r.Always=0]="Always",r[r.BeforeDragging=1]="BeforeDragging",r[r.WhileDragging=2]="WhileDragging"})(pO||(pO={}));var k9;(function(r){r.Optimized="optimized"})(k9||(k9={}));const hJ=new Map;function Zje(r,t){let{dragging:s,dependencies:o,config:i}=t;const[a,n]=Vt.useState(null),{frequency:u,measure:f,strategy:e}=i,y=Vt.useRef(r),_=Ee(),T=dO(_),D=Vt.useCallback(function(_e){_e===void 0&&(_e=[]),!T.current&&n(Be=>Be===null?_e:Be.concat(_e.filter(He=>!Be.includes(He))))},[T]),ce=Vt.useRef(null),ge=B4(_e=>{if(_&&!s)return hJ;if(!_e||_e===hJ||y.current!==r||a!=null){const Be=new Map;for(let He of r){if(!He)continue;if(a&&a.length>0&&!a.includes(He.id)&&He.rect.current){Be.set(He.id,He.rect.current);continue}const at=He.node.current,st=at?new TV(f(at),at):null;He.rect.current=st,st&&Be.set(He.id,st)}return Be}return _e},[r,a,s,_,f]);return Vt.useEffect(()=>{y.current=r},[r]),Vt.useEffect(()=>{_||D()},[s,_]),Vt.useEffect(()=>{a&&a.length>0&&n(null)},[JSON.stringify(a)]),Vt.useEffect(()=>{_||typeof u!="number"||ce.current!==null||(ce.current=setTimeout(()=>{D(),ce.current=null},u))},[u,_,D,...o]),{droppableRects:ge,measureDroppableContainers:D,measuringScheduled:a!=null};function Ee(){switch(e){case pO.Always:return!1;case pO.BeforeDragging:return s;default:return!s}}}function OV(r,t){return B4(s=>r?s||(typeof t=="function"?t(r):r):null,[t,r])}function Jje(r,t){return OV(r,t)}function eHe(r){let{callback:t,disabled:s}=r;const o=sF(t),i=Vt.useMemo(()=>{if(s||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(o)},[o,s]);return Vt.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function aF(r){let{callback:t,disabled:s}=r;const o=sF(t),i=Vt.useMemo(()=>{if(s||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(o)},[s]);return Vt.useEffect(()=>()=>i==null?void 0:i.disconnect(),[i]),i}function tHe(r){return new TV(oN(r),r)}function AJ(r,t,s){t===void 0&&(t=tHe);const[o,i]=Vt.useReducer(u,null),a=eHe({callback(f){if(r)for(const e of f){const{type:y,target:_}=e;if(y==="childList"&&_ instanceof HTMLElement&&_.contains(r)){i();break}}}}),n=aF({callback:i});return t1(()=>{i(),r?(n==null||n.observe(r),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(n==null||n.disconnect(),a==null||a.disconnect())},[r]),o;function u(f){if(!r)return null;if(r.isConnected===!1){var e;return(e=f??s)!=null?e:null}const y=t(r);return JSON.stringify(f)===JSON.stringify(y)?f:y}}function nHe(r){const t=OV(r);return rde(r,t)}const pJ=[];function rHe(r){const t=Vt.useRef(r),s=B4(o=>r?o&&o!==pJ&&r&&t.current&&r.parentNode===t.current.parentNode?o:iF(r):pJ,[r]);return Vt.useEffect(()=>{t.current=r},[r]),s}function sHe(r){const[t,s]=Vt.useState(null),o=Vt.useRef(r),i=Vt.useCallback(a=>{const n=HM(a.target);n&&s(u=>u?(u.set(n,R9(n)),new Map(u)):null)},[]);return Vt.useEffect(()=>{const a=o.current;if(r!==a){n(a);const u=r.map(f=>{const e=HM(f);return e?(e.addEventListener("scroll",i,{passive:!0}),[e,R9(e)]):null}).filter(f=>f!=null);s(u.length?new Map(u):null),o.current=r}return()=>{n(r),n(a)};function n(u){u.forEach(f=>{const e=HM(f);e==null||e.removeEventListener("scroll",i)})}},[i,r]),Vt.useMemo(()=>r.length?t?Array.from(t.values()).reduce((a,n)=>C_(a,n),O1):cde(r):O1,[r,t])}function mJ(r,t){t===void 0&&(t=[]);const s=Vt.useRef(null);return Vt.useEffect(()=>{s.current=null},t),Vt.useEffect(()=>{const o=r!==O1;o&&!s.current&&(s.current=r),!o&&s.current&&(s.current=null)},[r]),s.current?hO(r,s.current):O1}function oHe(r){Vt.useEffect(()=>{if(!rF)return;const t=r.map(s=>{let{sensor:o}=s;return o.setup==null?void 0:o.setup()});return()=>{for(const s of t)s==null||s()}},r.map(t=>{let{sensor:s}=t;return s}))}function iHe(r,t){return Vt.useMemo(()=>r.reduce((s,o)=>{let{eventName:i,handler:a}=o;return s[i]=n=>{a(n,t)},s},{}),[r,t])}function mde(r){return Vt.useMemo(()=>r?Bje(r):null,[r])}const zM=[];function aHe(r,t){t===void 0&&(t=oN);const[s]=r,o=mde(s?Cv(s):null),[i,a]=Vt.useReducer(u,zM),n=aF({callback:a});return r.length>0&&i===zM&&a(),t1(()=>{r.length?r.forEach(f=>n==null?void 0:n.observe(f)):(n==null||n.disconnect(),a())},[r]),i;function u(){return r.length?r.map(f=>lde(f)?o:new TV(t(f),f)):zM}}function gde(r){if(!r)return null;if(r.children.length>1)return r;const t=r.children[0];return R4(t)?t:r}function lHe(r){let{measure:t}=r;const[s,o]=Vt.useState(null),i=Vt.useCallback(e=>{for(const{target:y}of e)if(R4(y)){o(_=>{const T=t(y);return _?{..._,width:T.width,height:T.height}:T});break}},[t]),a=aF({callback:i}),n=Vt.useCallback(e=>{const y=gde(e);a==null||a.disconnect(),y&&(a==null||a.observe(y)),o(y?t(y):null)},[t,a]),[u,f]=uP(n);return Vt.useMemo(()=>({nodeRef:u,rect:s,setRef:f}),[s,u,f])}const uHe=[{sensor:hde,options:{}},{sensor:NV,options:{}}],cHe={current:{}},PB={draggable:{measure:uJ},droppable:{measure:uJ,strategy:pO.WhileDragging,frequency:k9.Optimized},dragOverlay:{measure:oN}};class s5 extends Map{get(t){var s;return t!=null&&(s=super.get(t))!=null?s:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:s}=t;return!s})}getNodeFor(t){var s,o;return(s=(o=this.get(t))==null?void 0:o.node.current)!=null?s:void 0}}const fHe={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new s5,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:dP},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:PB,measureDroppableContainers:dP,windowRect:null,measuringScheduled:!1},bde={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:dP,draggableNodes:new Map,over:null,measureDroppableContainers:dP},P4=Vt.createContext(bde),vde=Vt.createContext(fHe);function dHe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new s5}}}function hHe(r,t){switch(t.type){case Sg.DragStart:return{...r,draggable:{...r.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Sg.DragMove:return r.draggable.active?{...r,draggable:{...r.draggable,translate:{x:t.coordinates.x-r.draggable.initialCoordinates.x,y:t.coordinates.y-r.draggable.initialCoordinates.y}}}:r;case Sg.DragEnd:case Sg.DragCancel:return{...r,draggable:{...r.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Sg.RegisterDroppable:{const{element:s}=t,{id:o}=s,i=new s5(r.droppable.containers);return i.set(o,s),{...r,droppable:{...r.droppable,containers:i}}}case Sg.SetDroppableDisabled:{const{id:s,key:o,disabled:i}=t,a=r.droppable.containers.get(s);if(!a||o!==a.key)return r;const n=new s5(r.droppable.containers);return n.set(s,{...a,disabled:i}),{...r,droppable:{...r.droppable,containers:n}}}case Sg.UnregisterDroppable:{const{id:s,key:o}=t,i=r.droppable.containers.get(s);if(!i||o!==i.key)return r;const a=new s5(r.droppable.containers);return a.delete(s),{...r,droppable:{...r.droppable,containers:a}}}default:return r}}function AHe(r){let{disabled:t}=r;const{active:s,activatorEvent:o,draggableNodes:i}=Vt.useContext(P4),a=cP(o),n=cP(s==null?void 0:s.id);return Vt.useEffect(()=>{if(!t&&!o&&a&&n!=null){if(!oF(a)||document.activeElement===a.target)return;const u=i.get(n);if(!u)return;const{activatorNode:f,node:e}=u;if(!f.current&&!e.current)return;requestAnimationFrame(()=>{for(const y of[f.current,e.current]){if(!y)continue;const _=fje(y);if(_){_.focus();break}}})}},[o,t,i,n,a]),null}function yde(r,t){let{transform:s,...o}=t;return r!=null&&r.length?r.reduce((i,a)=>a({transform:i,...o}),s):s}function pHe(r){return Vt.useMemo(()=>({draggable:{...PB.draggable,...r==null?void 0:r.draggable},droppable:{...PB.droppable,...r==null?void 0:r.droppable},dragOverlay:{...PB.dragOverlay,...r==null?void 0:r.dragOverlay}}),[r==null?void 0:r.draggable,r==null?void 0:r.droppable,r==null?void 0:r.dragOverlay])}function mHe(r){let{activeNode:t,measure:s,initialRect:o,config:i=!0}=r;const a=Vt.useRef(!1),{x:n,y:u}=typeof i=="boolean"?{x:i,y:i}:i;t1(()=>{if(!n&&!u||!t){a.current=!1;return}if(a.current||!o)return;const e=t==null?void 0:t.node.current;if(!e||e.isConnected===!1)return;const y=s(e),_=rde(y,o);if(n||(_.x=0),u||(_.y=0),a.current=!0,Math.abs(_.x)>0||Math.abs(_.y)>0){const T=ode(e);T&&T.scrollBy({top:_.y,left:_.x})}},[t,n,u,o,s])}const lF=Vt.createContext({...O1,scaleX:1,scaleY:1});var wE;(function(r){r[r.Uninitialized=0]="Uninitialized",r[r.Initializing=1]="Initializing",r[r.Initialized=2]="Initialized"})(wE||(wE={}));const gHe=Vt.memo(function(t){var s,o,i,a;let{id:n,accessibility:u,autoScroll:f=!0,children:e,sensors:y=uHe,collisionDetection:_=_je,measuring:T,modifiers:D,...ce}=t;const ge=Vt.useReducer(hHe,void 0,dHe),[Ee,_e]=ge,[Be,He]=gje(),[at,st]=Vt.useState(wE.Uninitialized),vt=at===wE.Initialized,{draggable:{active:Ot,nodes:Kt,translate:sn},droppable:{containers:Bn}}=Ee,fn=Ot?Kt.get(Ot):null,bn=Vt.useRef({initial:null,translated:null}),$n=Vt.useMemo(()=>{var ca;return Ot!=null?{id:Ot,data:(ca=fn==null?void 0:fn.data)!=null?ca:cHe,rect:bn}:null},[Ot,fn]),_n=Vt.useRef(null),[Nr,Cr]=Vt.useState(null),[Dr,fr]=Vt.useState(null),_r=dO(ce,Object.values(ce)),br=k4("DndDescribedBy",n),ss=Vt.useMemo(()=>Bn.getEnabled(),[Bn]),In=pHe(T),{droppableRects:dr,measureDroppableContainers:lr,measuringScheduled:Ir}=Zje(ss,{dragging:vt,dependencies:[sn.x,sn.y],config:In.droppable}),Pr=Yje(Kt,Ot),Kr=Vt.useMemo(()=>Dr?fP(Dr):null,[Dr]),ls=ga(),as=Jje(Pr,In.draggable.measure);mHe({activeNode:Ot?Kt.get(Ot):null,config:ls.layoutShiftCompensation,initialRect:as,measure:In.draggable.measure});const Ps=AJ(Pr,In.draggable.measure,as),Ws=AJ(Pr?Pr.parentElement:null),qs=Vt.useRef({activatorEvent:null,active:null,activeNode:Pr,collisionRect:null,collisions:null,droppableRects:dr,draggableNodes:Kt,draggingNode:null,draggingNodeRect:null,droppableContainers:Bn,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),xs=Bn.getNodeFor((s=qs.current.over)==null?void 0:s.id),Do=lHe({measure:In.dragOverlay.measure}),Is=(o=Do.nodeRef.current)!=null?o:Pr,Qr=vt?(i=Do.rect)!=null?i:Ps:null,Xo=!!(Do.nodeRef.current&&Do.rect),Go=nHe(Xo?null:Ps),ao=mde(Is?Cv(Is):null),fo=rHe(vt?xs??Pr:null),uo=aHe(fo),Xs=yde(D,{transform:{x:sn.x-Go.x,y:sn.y-Go.y,scaleX:1,scaleY:1},activatorEvent:Dr,active:$n,activeNodeRect:Ps,containerNodeRect:Ws,draggingNodeRect:Qr,over:qs.current.over,overlayNodeRect:Do.rect,scrollableAncestors:fo,scrollableAncestorRects:uo,windowRect:ao}),jo=Kr?C_(Kr,sn):null,gs=sHe(fo),Zo=mJ(gs),Mn=mJ(gs,[Ps]),er=C_(Xs,Zo),Hr=Qr?Ije(Qr,Xs):null,Mr=$n&&Hr?_({active:$n,collisionRect:Hr,droppableRects:dr,droppableContainers:ss,pointerCoordinates:jo}):null,ys=nde(Mr,"id"),[Xr,to]=Vt.useState(null),Yr=Xo?Xs:C_(Xs,Mn),mo=Tje(Yr,(a=Xr==null?void 0:Xr.rect)!=null?a:null,Ps),Rr=Vt.useCallback((ca,la)=>{let{sensor:na,options:Oi}=la;if(_n.current==null)return;const Ri=Kt.get(_n.current);if(!Ri)return;const eu=ca.nativeEvent,Oa=new na({active:_n.current,activeNode:Ri,event:eu,options:Oi,context:qs,onStart(Fl){const Yi=_n.current;if(Yi==null)return;const lc=Kt.get(Yi);if(!lc)return;const{onDragStart:bl}=_r.current,tu={active:{id:Yi,data:lc.data,rect:bn}};av.unstable_batchedUpdates(()=>{bl==null||bl(tu),st(wE.Initializing),_e({type:Sg.DragStart,initialCoordinates:Fl,active:Yi}),Be({type:"onDragStart",event:tu})})},onMove(Fl){_e({type:Sg.DragMove,coordinates:Fl})},onEnd:ac(Sg.DragEnd),onCancel:ac(Sg.DragCancel)});av.unstable_batchedUpdates(()=>{Cr(Oa),fr(ca.nativeEvent)});function ac(Fl){return async function(){const{active:lc,collisions:bl,over:tu,scrollAdjustedTranslate:Wl}=qs.current;let ya=null;if(lc&&Wl){const{cancelDrop:pl}=_r.current;ya={activatorEvent:eu,active:lc,collisions:bl,delta:Wl,over:tu},Fl===Sg.DragEnd&&typeof pl=="function"&&await Promise.resolve(pl(ya))&&(Fl=Sg.DragCancel)}_n.current=null,av.unstable_batchedUpdates(()=>{_e({type:Fl}),st(wE.Uninitialized),to(null),Cr(null),fr(null);const pl=Fl===Sg.DragEnd?"onDragEnd":"onDragCancel";if(ya){const bc=_r.current[pl];bc==null||bc(ya),Be({type:pl,event:ya})}})}}},[Kt]),fs=Vt.useCallback((ca,la)=>(na,Oi)=>{const Ri=na.nativeEvent,eu=Kt.get(Oi);if(_n.current!==null||!eu||Ri.dndKit||Ri.defaultPrevented)return;const Oa={active:eu};ca(na,la.options,Oa)===!0&&(Ri.dndKit={capturedBy:la.sensor},_n.current=Oi,Rr(na,la))},[Kt,Rr]),No=Xje(y,fs);oHe(y),t1(()=>{Ps&&at===wE.Initializing&&st(wE.Initialized)},[Ps,at]),Vt.useEffect(()=>{const{onDragMove:ca}=_r.current,{active:la,activatorEvent:na,collisions:Oi,over:Ri}=qs.current;if(!la||!na)return;const eu={active:la,activatorEvent:na,collisions:Oi,delta:{x:er.x,y:er.y},over:Ri};av.unstable_batchedUpdates(()=>{ca==null||ca(eu),Be({type:"onDragMove",event:eu})})},[er.x,er.y]),Vt.useEffect(()=>{const{active:ca,activatorEvent:la,collisions:na,droppableContainers:Oi,scrollAdjustedTranslate:Ri}=qs.current;if(!ca||_n.current==null||!la||!Ri)return;const{onDragOver:eu}=_r.current,Oa=Oi.get(ys),ac=Oa&&Oa.rect.current?{id:Oa.id,rect:Oa.rect.current,data:Oa.data,disabled:Oa.disabled}:null,Fl={active:ca,activatorEvent:la,collisions:na,delta:{x:Ri.x,y:Ri.y},over:ac};av.unstable_batchedUpdates(()=>{to(ac),eu==null||eu(Fl),Be({type:"onDragOver",event:Fl})})},[ys]),t1(()=>{qs.current={activatorEvent:Dr,active:$n,activeNode:Pr,collisionRect:Hr,collisions:Mr,droppableRects:dr,draggableNodes:Kt,draggingNode:Is,draggingNodeRect:Qr,droppableContainers:Bn,over:Xr,scrollableAncestors:fo,scrollAdjustedTranslate:er},bn.current={initial:Qr,translated:Hr}},[$n,Pr,Mr,Hr,Kt,Is,Qr,dr,Bn,Xr,fo,er]),Gje({...ls,delta:sn,draggingRect:Hr,pointerCoordinates:jo,scrollableAncestors:fo,scrollableAncestorRects:uo});const Ii=Vt.useMemo(()=>({active:$n,activeNode:Pr,activeNodeRect:Ps,activatorEvent:Dr,collisions:Mr,containerNodeRect:Ws,dragOverlay:Do,draggableNodes:Kt,droppableContainers:Bn,droppableRects:dr,over:Xr,measureDroppableContainers:lr,scrollableAncestors:fo,scrollableAncestorRects:uo,measuringConfiguration:In,measuringScheduled:Ir,windowRect:ao}),[$n,Pr,Ps,Dr,Mr,Ws,Do,Kt,Bn,dr,Xr,lr,fo,uo,In,Ir,ao]),tl=Vt.useMemo(()=>({activatorEvent:Dr,activators:No,active:$n,activeNodeRect:Ps,ariaDescribedById:{draggable:br},dispatch:_e,draggableNodes:Kt,over:Xr,measureDroppableContainers:lr}),[Dr,No,$n,Ps,_e,br,Kt,Xr,lr]);return ct.createElement(Jfe.Provider,{value:He},ct.createElement(P4.Provider,{value:tl},ct.createElement(vde.Provider,{value:Ii},ct.createElement(lF.Provider,{value:mo},e)),ct.createElement(AHe,{disabled:(u==null?void 0:u.restoreFocus)===!1})),ct.createElement(yje,{...u,hiddenTextDescribedById:br}));function ga(){const ca=(Nr==null?void 0:Nr.autoScrollEnabled)===!1,la=typeof f=="object"?f.enabled===!1:f===!1,na=vt&&!ca&&!la;return typeof f=="object"?{...f,enabled:na}:{enabled:na}}}),bHe=Vt.createContext(null),gJ="button",vHe="Droppable";function yHe(r){let{id:t,data:s,disabled:o=!1,attributes:i}=r;const a=k4(vHe),{activators:n,activatorEvent:u,active:f,activeNodeRect:e,ariaDescribedById:y,draggableNodes:_,over:T}=Vt.useContext(P4),{role:D=gJ,roleDescription:ce="draggable",tabIndex:ge=0}=i??{},Ee=(f==null?void 0:f.id)===t,_e=Vt.useContext(Ee?lF:bHe),[Be,He]=uP(),[at,st]=uP(),vt=iHe(n,t),Ot=dO(s);t1(()=>(_.set(t,{id:t,key:a,node:Be,activatorNode:at,data:Ot}),()=>{const sn=_.get(t);sn&&sn.key===a&&_.delete(t)}),[_,t]);const Kt=Vt.useMemo(()=>({role:D,tabIndex:ge,"aria-disabled":o,"aria-pressed":Ee&&D===gJ?!0:void 0,"aria-roledescription":ce,"aria-describedby":y.draggable}),[o,D,ge,Ee,ce,y.draggable]);return{active:f,activatorEvent:u,activeNodeRect:e,attributes:Kt,isDragging:Ee,listeners:o?void 0:vt,node:Be,over:T,setNodeRef:He,setActivatorNodeRef:st,transform:_e}}function wde(){return Vt.useContext(vde)}const wHe="Droppable",CHe={timeout:25};function EHe(r){let{data:t,disabled:s=!1,id:o,resizeObserverConfig:i}=r;const a=k4(wHe),{active:n,dispatch:u,over:f,measureDroppableContainers:e}=Vt.useContext(P4),y=Vt.useRef({disabled:s}),_=Vt.useRef(!1),T=Vt.useRef(null),D=Vt.useRef(null),{disabled:ce,updateMeasurementsFor:ge,timeout:Ee}={...CHe,...i},_e=dO(ge??o),Be=Vt.useCallback(()=>{if(!_.current){_.current=!0;return}D.current!=null&&clearTimeout(D.current),D.current=setTimeout(()=>{e(Array.isArray(_e.current)?_e.current:[_e.current]),D.current=null},Ee)},[Ee]),He=aF({callback:Be,disabled:ce||!n}),at=Vt.useCallback((Kt,sn)=>{He&&(sn&&(He.unobserve(sn),_.current=!1),Kt&&He.observe(Kt))},[He]),[st,vt]=uP(at),Ot=dO(t);return Vt.useEffect(()=>{!He||!st.current||(He.disconnect(),_.current=!1,He.observe(st.current))},[st,He]),t1(()=>(u({type:Sg.RegisterDroppable,element:{id:o,key:a,disabled:s,node:st,rect:T,data:Ot}}),()=>u({type:Sg.UnregisterDroppable,key:a,id:o})),[o]),Vt.useEffect(()=>{s!==y.current.disabled&&(u({type:Sg.SetDroppableDisabled,id:o,key:a,disabled:s}),y.current.disabled=s)},[o,a,s,u]),{active:n,rect:T,isOver:(f==null?void 0:f.id)===o,node:st,over:f,setNodeRef:vt}}function LHe(r){let{animation:t,children:s}=r;const[o,i]=Vt.useState(null),[a,n]=Vt.useState(null),u=cP(s);return!s&&!o&&u&&i(u),t1(()=>{if(!a)return;const f=o==null?void 0:o.key,e=o==null?void 0:o.props.id;if(f==null||e==null){i(null);return}Promise.resolve(t(e,a)).then(()=>{i(null)})},[t,o,a]),ct.createElement(ct.Fragment,null,s,o?Vt.cloneElement(o,{ref:n}):null)}const SHe={x:0,y:0,scaleX:1,scaleY:1};function xHe(r){let{children:t}=r;return ct.createElement(P4.Provider,{value:bde},ct.createElement(lF.Provider,{value:SHe},t))}const _He={position:"fixed",touchAction:"none"},THe=r=>oF(r)?"transform 250ms ease":void 0,NHe=Vt.forwardRef((r,t)=>{let{as:s,activatorEvent:o,adjustScale:i,children:a,className:n,rect:u,style:f,transform:e,transition:y=THe}=r;if(!u)return null;const _=i?e:{...e,scaleX:1,scaleY:1},T={..._He,width:u.width,height:u.height,top:u.top,left:u.left,transform:OL.Transform.toString(_),transformOrigin:i&&o?Cje(o,u):void 0,transition:typeof y=="function"?y(o):y,...f};return ct.createElement(s,{className:n,style:T,ref:t},a)}),IHe=r=>t=>{let{active:s,dragOverlay:o}=t;const i={},{styles:a,className:n}=r;if(a!=null&&a.active)for(const[u,f]of Object.entries(a.active))f!==void 0&&(i[u]=s.node.style.getPropertyValue(u),s.node.style.setProperty(u,f));if(a!=null&&a.dragOverlay)for(const[u,f]of Object.entries(a.dragOverlay))f!==void 0&&o.node.style.setProperty(u,f);return n!=null&&n.active&&s.node.classList.add(n.active),n!=null&&n.dragOverlay&&o.node.classList.add(n.dragOverlay),function(){for(const[f,e]of Object.entries(i))s.node.style.setProperty(f,e);n!=null&&n.active&&s.node.classList.remove(n.active)}},OHe=r=>{let{transform:{initial:t,final:s}}=r;return[{transform:OL.Transform.toString(t)},{transform:OL.Transform.toString(s)}]},RHe={duration:250,easing:"ease",keyframes:OHe,sideEffects:IHe({styles:{active:{opacity:"0"}}})};function BHe(r){let{config:t,draggableNodes:s,droppableContainers:o,measuringConfiguration:i}=r;return sF((a,n)=>{if(t===null)return;const u=s.get(a);if(!u)return;const f=u.node.current;if(!f)return;const e=gde(n);if(!e)return;const{transform:y}=Cv(n).getComputedStyle(n),_=sde(y);if(!_)return;const T=typeof t=="function"?t:kHe(t);return fde(f,i.draggable.measure),T({active:{id:a,data:u.data,node:f,rect:i.draggable.measure(f)},draggableNodes:s,dragOverlay:{node:n,rect:i.dragOverlay.measure(e)},droppableContainers:o,measuringConfiguration:i,transform:_})})}function kHe(r){const{duration:t,easing:s,sideEffects:o,keyframes:i}={...RHe,...r};return a=>{let{active:n,dragOverlay:u,transform:f,...e}=a;if(!t)return;const y={x:u.rect.left-n.rect.left,y:u.rect.top-n.rect.top},_={scaleX:f.scaleX!==1?n.rect.width*f.scaleX/u.rect.width:1,scaleY:f.scaleY!==1?n.rect.height*f.scaleY/u.rect.height:1},T={x:f.x-y.x,y:f.y-y.y,..._},D=i({...e,active:n,dragOverlay:u,transform:{initial:f,final:T}}),[ce]=D,ge=D[D.length-1];if(JSON.stringify(ce)===JSON.stringify(ge))return;const Ee=o==null?void 0:o({active:n,dragOverlay:u,...e}),_e=u.node.animate(D,{duration:t,easing:s,fill:"forwards"});return new Promise(Be=>{_e.onfinish=()=>{Ee==null||Ee(),Be()}})}}let bJ=0;function PHe(r){return Vt.useMemo(()=>{if(r!=null)return bJ++,bJ},[r])}const DHe=ct.memo(r=>{let{adjustScale:t=!1,children:s,dropAnimation:o,style:i,transition:a,modifiers:n,wrapperElement:u="div",className:f,zIndex:e=999}=r;const{activatorEvent:y,active:_,activeNodeRect:T,containerNodeRect:D,draggableNodes:ce,droppableContainers:ge,dragOverlay:Ee,over:_e,measuringConfiguration:Be,scrollableAncestors:He,scrollableAncestorRects:at,windowRect:st}=wde(),vt=Vt.useContext(lF),Ot=PHe(_==null?void 0:_.id),Kt=yde(n,{activatorEvent:y,active:_,activeNodeRect:T,containerNodeRect:D,draggingNodeRect:Ee.rect,over:_e,overlayNodeRect:Ee.rect,scrollableAncestors:He,scrollableAncestorRects:at,transform:vt,windowRect:st}),sn=OV(T),Bn=BHe({config:o,draggableNodes:ce,droppableContainers:ge,measuringConfiguration:Be}),fn=sn?Ee.setRef:void 0;return ct.createElement(xHe,null,ct.createElement(LHe,{animation:Bn},_&&Ot?ct.createElement(NHe,{key:Ot,id:_.id,ref:fn,as:u,activatorEvent:y,adjustScale:t,className:f,transition:a,rect:sn,style:{zIndex:e,...i},transform:Kt},s):null))});function Cde(r,t,s){const o=r.slice();return o.splice(s<0?o.length+s:s,0,o.splice(t,1)[0]),o}function FHe(r,t){return r.reduce((s,o,i)=>{const a=t.get(o);return a&&(s[i]=a),s},Array(r.length))}function VR(r){return r!==null&&r>=0}function MHe(r,t){if(r===t)return!0;if(r.length!==t.length)return!1;for(let s=0;s{let{rects:t,activeIndex:s,overIndex:o,index:i}=r;const a=Cde(t,o,s),n=t[i],u=a[i];return!u||!n?null:{x:u.left-n.left,y:u.top-n.top,scaleX:u.width/n.width,scaleY:u.height/n.height}},Ede="Sortable",Lde=ct.createContext({activeIndex:-1,containerId:Ede,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:RV,disabled:{draggable:!1,droppable:!1}});function $He(r){let{children:t,id:s,items:o,strategy:i=RV,disabled:a=!1}=r;const{active:n,dragOverlay:u,droppableRects:f,over:e,measureDroppableContainers:y}=wde(),_=k4(Ede,s),T=u.rect!==null,D=Vt.useMemo(()=>o.map(vt=>typeof vt=="object"&&"id"in vt?vt.id:vt),[o]),ce=n!=null,ge=n?D.indexOf(n.id):-1,Ee=e?D.indexOf(e.id):-1,_e=Vt.useRef(D),Be=!MHe(D,_e.current),He=Ee!==-1&&ge===-1||Be,at=UHe(a);t1(()=>{Be&&ce&&y(D)},[Be,D,ce,y]),Vt.useEffect(()=>{_e.current=D},[D]);const st=Vt.useMemo(()=>({activeIndex:ge,containerId:_,disabled:at,disableTransforms:He,items:D,overIndex:Ee,useDragOverlay:T,sortedRects:FHe(D,f),strategy:i}),[ge,_,at.draggable,at.droppable,He,D,Ee,f,T,i]);return ct.createElement(Lde.Provider,{value:st},t)}const jHe=r=>{let{id:t,items:s,activeIndex:o,overIndex:i}=r;return Cde(s,o,i).indexOf(t)},HHe=r=>{let{containerId:t,isSorting:s,wasDragging:o,index:i,items:a,newIndex:n,previousItems:u,previousContainerId:f,transition:e}=r;return!e||!o||u!==a&&i===n?!1:s?!0:n!==i&&t===f},QHe={duration:200,easing:"ease"},Sde="transform",KHe=OL.Transition.toString({property:Sde,duration:0,easing:"linear"}),zHe={roleDescription:"sortable"};function VHe(r){let{disabled:t,index:s,node:o,rect:i}=r;const[a,n]=Vt.useState(null),u=Vt.useRef(s);return t1(()=>{if(!t&&s!==u.current&&o.current){const f=i.current;if(f){const e=oN(o.current,{ignoreTransform:!0}),y={x:f.left-e.left,y:f.top-e.top,scaleX:f.width/e.width,scaleY:f.height/e.height};(y.x||y.y)&&n(y)}}s!==u.current&&(u.current=s)},[t,s,o,i]),Vt.useEffect(()=>{a&&n(null)},[a]),a}function GHe(r){let{animateLayoutChanges:t=HHe,attributes:s,disabled:o,data:i,getNewIndex:a=jHe,id:n,strategy:u,resizeObserverConfig:f,transition:e=QHe}=r;const{items:y,containerId:_,activeIndex:T,disabled:D,disableTransforms:ce,sortedRects:ge,overIndex:Ee,useDragOverlay:_e,strategy:Be}=Vt.useContext(Lde),He=WHe(o,D),at=y.indexOf(n),st=Vt.useMemo(()=>({sortable:{containerId:_,index:at,items:y},...i}),[_,i,at,y]),vt=Vt.useMemo(()=>y.slice(y.indexOf(n)),[y,n]),{rect:Ot,node:Kt,isOver:sn,setNodeRef:Bn}=EHe({id:n,data:st,disabled:He.droppable,resizeObserverConfig:{updateMeasurementsFor:vt,...f}}),{active:fn,activatorEvent:bn,activeNodeRect:$n,attributes:_n,setNodeRef:Nr,listeners:Cr,isDragging:Dr,over:fr,setActivatorNodeRef:_r,transform:br}=yHe({id:n,data:st,attributes:{...zHe,...s},disabled:He.draggable}),ss=aje(Bn,Nr),In=!!fn,dr=In&&!ce&&VR(T)&&VR(Ee),lr=!_e&&Dr,Ir=lr&&dr?br:null,Kr=dr?Ir??(u??Be)({rects:ge,activeNodeRect:$n,activeIndex:T,overIndex:Ee,index:at}):null,ls=VR(T)&&VR(Ee)?a({id:n,items:y,activeIndex:T,overIndex:Ee}):at,as=fn==null?void 0:fn.id,Ps=Vt.useRef({activeId:as,items:y,newIndex:ls,containerId:_}),Ws=y!==Ps.current.items,qs=t({active:fn,containerId:_,isDragging:Dr,isSorting:In,id:n,index:at,items:y,newIndex:Ps.current.newIndex,previousItems:Ps.current.items,previousContainerId:Ps.current.containerId,transition:e,wasDragging:Ps.current.activeId!=null}),xs=VHe({disabled:!qs,index:at,node:Kt,rect:Ot});return Vt.useEffect(()=>{In&&Ps.current.newIndex!==ls&&(Ps.current.newIndex=ls),_!==Ps.current.containerId&&(Ps.current.containerId=_),y!==Ps.current.items&&(Ps.current.items=y)},[In,ls,_,y]),Vt.useEffect(()=>{if(as===Ps.current.activeId)return;if(as&&!Ps.current.activeId){Ps.current.activeId=as;return}const Is=setTimeout(()=>{Ps.current.activeId=as},50);return()=>clearTimeout(Is)},[as]),{active:fn,activeIndex:T,attributes:_n,data:st,rect:Ot,index:at,newIndex:ls,items:y,isOver:sn,isSorting:In,isDragging:Dr,listeners:Cr,node:Kt,overIndex:Ee,over:fr,setNodeRef:ss,setActivatorNodeRef:_r,setDroppableNodeRef:Bn,setDraggableNodeRef:Nr,transform:xs??Kr,transition:Do()};function Do(){if(xs||Ws&&Ps.current.newIndex===at)return KHe;if(!(lr&&!oF(bn)||!e)&&(In||qs))return OL.Transition.toString({...e,property:Sde})}}function WHe(r,t){var s,o;return typeof r=="boolean"?{draggable:r,droppable:!1}:{draggable:(s=r==null?void 0:r.draggable)!=null?s:t.draggable,droppable:(o=r==null?void 0:r.droppable)!=null?o:t.droppable}}function hP(r){if(!r)return!1;const t=r.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const qHe=[Cp.Down,Cp.Right,Cp.Up,Cp.Left],YHe=(r,t)=>{let{context:{active:s,collisionRect:o,droppableRects:i,droppableContainers:a,over:n,scrollableAncestors:u}}=t;if(qHe.includes(r.code)){if(r.preventDefault(),!s||!o)return;const f=[];a.getEnabled().forEach(_=>{if(!_||_!=null&&_.disabled)return;const T=i.get(_.id);if(T)switch(r.code){case Cp.Down:o.topT.top&&f.push(_);break;case Cp.Left:o.left>T.left&&f.push(_);break;case Cp.Right:o.left1&&(y=e[1].id),y!=null){const _=a.get(s.id),T=a.get(y),D=T?i.get(T.id):null,ce=T==null?void 0:T.node.current;if(ce&&D&&_&&T){const Ee=iF(ce).some((vt,Ot)=>u[Ot]!==vt),_e=xde(_,T),Be=XHe(_,T),He=Ee||!_e?{x:0,y:0}:{x:Be?o.width-D.width:0,y:Be?o.height-D.height:0},at={x:D.left,y:D.top};return He.x&&He.y?at:hO(at,He)}}}};function xde(r,t){return!hP(r)||!hP(t)?!1:r.data.current.sortable.containerId===t.data.current.sortable.containerId}function XHe(r,t){return!hP(r)||!hP(t)||!xde(r,t)?!1:r.data.current.sortable.indext.indexOf(st),[t]),_e=Vt.useMemo(()=>D?Ee(D):-1,[Ee,D]),Be=Vt.useCallback(st=>{let{active:vt}=st;vt&&ce(vt.id)},[]),He=Vt.useCallback(st=>{let{over:vt}=st;if(ce(null),vt){const Ot=Ee(vt.id);_e!==Ot&&s({oldIndex:_e,newIndex:Ot})}},[_e,Ee,s]),at=Vt.useCallback(()=>{ce(null)},[]);return ct.createElement(gHe,{sensors:ge,collisionDetection:u,onDragStart:Be,onDragEnd:He,onDragCancel:at,autoScroll:{order:AO.ReversedTreeOrder}},ct.createElement($He,{items:t,strategy:f},ct.createElement(_,null,t.map((st,vt)=>ct.createElement(nQe,{key:st,id:st,index:vt,renderItem:i,useDragOverlay:e,prefix:T,transition:a})))),e?av.createPortal(ct.createElement(DHe,{adjustScale:o,style:{zIndex:void 0},className:y},D?i({id:D,sortableHandle:st=>st}):null),document.body):null)}function nQe(r){let{animateLayoutChanges:t,id:s,renderItem:o,prefix:i,transition:a}=r;const{listeners:n,setNodeRef:u,transform:f,transition:e,active:y,isOver:_,attributes:T}=GHe({id:s,animateLayoutChanges:t,transition:a}),D=Vt.useCallback(Ee=>()=>ct.createElement("span",Object.assign({},n,{style:{lineHeight:0},onMouseDown:_e=>{n.onMouseDown(_e),_e.preventDefault(),_e.stopPropagation()}}),ct.createElement(Ee,null)),[n]),ce=ds(`${i}-sortable-item`,{[`${i}-sortable-item-over`]:_,[`${i}-sortable-item-active`]:(y==null?void 0:y.id)===s}),ge=TL(a)?void 0:{transform:OL.Transform.toString(Object.assign(Object.assign({},f),{scaleX:1,scaleY:1})),transition:e};return ct.createElement("div",Object.assign({ref:u,style:ge,className:ce},T),o({id:s,sortableHandle:D}))}var rQe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.foundation.handleInputChange(s)},this.handleKeyDown=s=>{this.foundation.handleKeyDown(s)},this.handleInputFocus=s=>{this.foundation.handleInputFocus(s)},this.handleInputBlur=s=>{this.foundation.handleInputBlur(s)},this.handleClearBtn=s=>{this.foundation.handleClearBtn(s)},this.handleClearEnterPress=s=>{this.foundation.handleClearEnterPress(s)},this.handleTagClose=s=>{this.foundation.handleTagClose(s)},this.handleInputMouseLeave=s=>{this.foundation.handleInputMouseLeave()},this.handleClick=s=>{this.foundation.handleClick(s)},this.handleInputMouseEnter=s=>{this.foundation.handleInputMouseEnter()},this.handleClickPrefixOrSuffix=s=>{this.foundation.handleClickPrefixOrSuffix(s)},this.handlePreventMouseDown=s=>{this.foundation.handlePreventMouseDown(s)},this.getAllTags=()=>{const{tagsArray:s}=this.state;return s.map((o,i)=>this.renderTag(o,i))},this.renderTag=(s,o,i)=>{const{size:a,disabled:n,renderTagItem:u,showContentTooltip:f,draggable:e}=this.props,{active:y}=this.state,_=y&&e,T=ds(`${Fp}-wrapper-tag`,{[`${Fp}-wrapper-tag-size-${a}`]:a,[`${Fp}-wrapper-tag-icon`]:_}),D=ds(`${Fp}-wrapper-typo`,{[`${Fp}-wrapper-typo-disabled`]:n}),ce=ds({[`${Fp}-drag-item`]:_,[`${Fp}-wrapper-tag-icon`]:_}),ge=i&&i(()=>ct.createElement(c7e,{className:`${Fp}-drag-handler`})),Ee=_?s:`${o}${s}`,_e=()=>{!n&&this.handleTagClose(o)};return Mc(u)?ct.createElement("div",{className:ce,key:Ee},_&&i?ct.createElement(ge,null):null,u(s,o,_e)):ct.createElement(og,{className:T,color:"white",size:a==="small"?"small":"large",type:"light",onClose:_e,closable:!n,key:Ee,visible:!0,"aria-label":`${n?"":"Closable "}Tag: ${s}`},_&&i?ct.createElement(ge,null):null,ct.createElement(V6,{className:D,ellipsis:{showTooltip:f,rows:1}},s))},this.renderSortTag=s=>{const{id:o,sortableHandle:i}=s,{tagsArray:a}=this.state,n=a.indexOf(o);return this.renderTag(o,n,i)},this.onSortEnd=s=>{this.foundation.handleSortEnd(s)},this.handleInputCompositionStart=s=>{this.foundation.handleInputCompositionStart(s)},this.handleInputCompositionEnd=s=>{this.foundation.handleInputCompositionEnd(s)},this.foundation=new ije(this.adapter),this.state={tagsArray:t.defaultValue||[],inputValue:"",focusing:!1,hovering:!1,active:!1,entering:!1},this.inputRef=ct.createRef(),this.tagInputRef=ct.createRef(),this.clickOutsideHandler=null}static getDerivedStateFromProps(t,s){const{value:o,inputValue:i}=t,{tagsArray:a}=s;let n;return wz(o)?n=o:"value"in t&&!o?n=[]:n=a,{tagsArray:n,inputValue:rA(i)?i:s.inputValue}}get adapter(){return Object.assign(Object.assign({},super.adapter),{setInputValue:t=>{this.setState({inputValue:t})},setTagsArray:t=>{this.setState({tagsArray:t})},setFocusing:t=>{this.setState({focusing:t})},toggleFocusing:t=>{const{preventScroll:s}=this.props,o=this.inputRef&&this.inputRef.current;t?o&&o.focus({preventScroll:s}):o&&o.blur(),this.setState({focusing:t})},setHovering:t=>{this.setState({hovering:t})},setActive:t=>{this.setState({active:t})},setEntering:t=>{this.setState({entering:t})},getClickOutsideHandler:()=>this.clickOutsideHandler,notifyBlur:t=>{this.props.onBlur(t)},notifyFocus:t=>{this.props.onFocus(t)},notifyInputChange:(t,s)=>{this.props.onInputChange(t,s)},notifyTagChange:t=>{this.props.onChange(t)},notifyTagAdd:t=>{this.props.onAdd(t)},notifyTagRemove:(t,s)=>{this.props.onRemove(t,s)},notifyKeyDown:t=>{this.props.onKeyDown(t)},registerClickOutsideHandler:t=>{const s=o=>{const i=this.tagInputRef&&this.tagInputRef.current,a=o.target;i&&!i.contains(a)&&t(o)};this.clickOutsideHandler=s,document.addEventListener("click",s,!1)},unregisterClickOutsideHandler:()=>{document.removeEventListener("click",this.clickOutsideHandler,!1),this.clickOutsideHandler=null}})}componentDidMount(){const{disabled:t,autoFocus:s,preventScroll:o}=this.props;!t&&s&&(this.inputRef.current.focus({preventScroll:o}),this.foundation.handleClick()),this.foundation.init()}renderClearBtn(){const{hovering:t,tagsArray:s,inputValue:o}=this.state,{showClear:i,disabled:a,clearIcon:n}=this.props,u=ds(`${Fp}-clearBtn`,{[`${Fp}-clearBtn-invisible`]:!t||o===""&&s.length===0||a});return i?ct.createElement("div",{role:"button",tabIndex:0,"aria-label":"Clear TagInput value",className:u,onClick:f=>this.handleClearBtn(f),onKeyPress:f=>this.handleClearEnterPress(f)},n||ct.createElement(XT,null)):null}renderPrefix(){const{prefix:t,insetLabel:s,insetLabelId:o}=this.props,i=t||s;if(TL(i)||wm(i))return null;const a=ds(`${Fp}-prefix`,{[`${Fp}-inset-label`]:s,[`${Fp}-prefix-text`]:i&&rA(i),[`${Fp}-prefix-icon`]:Iv(i)});return ct.createElement("div",{className:a,onMouseDown:this.handlePreventMouseDown,onClick:this.handleClickPrefixOrSuffix,id:o,"x-semi-prop":"prefix"},i)}renderSuffix(){const{suffix:t}=this.props;if(TL(t)||wm(t))return null;const s=ds(`${Fp}-suffix`,{[`${Fp}-suffix-text`]:t&&rA(t),[`${Fp}-suffix-icon`]:Iv(t)});return ct.createElement("div",{className:s,onMouseDown:this.handlePreventMouseDown,onClick:this.handleClickPrefixOrSuffix,"x-semi-prop":"suffix"},t)}renderTags(){const{disabled:t,maxTagCount:s,showRestTagsPopover:o,restTagsPopoverProps:i={},draggable:a,expandRestTagsOnClick:n}=this.props,{tagsArray:u,active:f}=this.state,e=ds(`${Fp}-wrapper-n`,{[`${Fp}-wrapper-n-disabled`]:t}),y=this.getAllTags();let _=[],T=[...y];(!f||!n)&&s&&s({item:ge,key:u[Ee]}));return f&&a&&ce.length>0?ct.createElement(tQe,{items:u,onSortEnd:this.onSortEnd,renderItem:this.renderSortTag,container:sQe,prefix:Fp,transition:null,dragOverlayCls:`${Fp}-right-item-drag-item-move`}):ct.createElement(ct.Fragment,null,T,_.length>0&&(o?ct.createElement(fm,Object.assign({content:_,showArrow:!0,trigger:"hover",position:"top",autoAdjustOverflow:!0},i),D):D))}blur(){this.inputRef.current.blur(),this.foundation.clickOutsideCallBack()}focus(){const{preventScroll:t,disabled:s}=this.props;this.inputRef.current.focus({preventScroll:t}),s||this.foundation.handleClick()}render(){const t=this.props,{size:s,style:o,className:i,disabled:a,placeholder:n,validateStatus:u}=t,f=rQe(t,["size","style","className","disabled","placeholder","validateStatus"]),{focusing:e,hovering:y,tagsArray:_,inputValue:T,active:D}=this.state,ce=ds(Fp,i,{[`${Fp}-focus`]:e||D,[`${Fp}-disabled`]:a,[`${Fp}-hover`]:y&&!a,[`${Fp}-error`]:u==="error",[`${Fp}-warning`]:u==="warning",[`${Fp}-small`]:s==="small",[`${Fp}-large`]:s==="large"}),ge=ds(`${Fp}-wrapper-input`,`${Fp}-wrapper-input-${s}`),Ee=ds(`${Fp}-wrapper`);return ct.createElement("div",Object.assign({ref:this.tagInputRef,style:o,className:ce,"aria-disabled":a,"aria-label":this.props["aria-label"],"aria-invalid":u==="error",onMouseEnter:_e=>{this.handleInputMouseEnter(_e)},onMouseLeave:_e=>{this.handleInputMouseLeave(_e)},onClick:_e=>{this.handleClick(_e)}},this.getDataAttr(f)),this.renderPrefix(),ct.createElement("div",{className:Ee},this.renderTags(),ct.createElement(Em,{"aria-label":"input value",ref:this.inputRef,className:ge,disabled:a,value:T,size:s,placeholder:_.length===0?n:"",onKeyDown:_e=>{this.handleKeyDown(_e)},onChange:(_e,Be)=>{this.handleInputChange(Be)},onBlur:_e=>{this.handleInputBlur(_e)},onFocus:_e=>{this.handleInputFocus(_e)},onCompositionStart:this.handleInputCompositionStart,onCompositionEnd:this.handleInputCompositionEnd})),this.renderClearBtn(),this.renderSuffix())}}BV.propTypes={children:be.node,clearIcon:be.node,style:be.object,className:be.string,disabled:be.bool,allowDuplicates:be.bool,max:be.number,maxTagCount:be.number,maxLength:be.number,showRestTagsPopover:be.bool,restTagsPopoverProps:be.object,showContentTooltip:be.oneOfType([be.shape({type:be.string,opts:be.object}),be.bool]),defaultValue:be.array,value:be.array,inputValue:be.string,placeholder:be.string,separator:be.oneOfType([be.string,be.array]),showClear:be.bool,addOnBlur:be.bool,draggable:be.bool,expandRestTagsOnClick:be.bool,autoFocus:be.bool,renderTagItem:be.func,onBlur:be.func,onFocus:be.func,onChange:be.func,onInputChange:be.func,onExceed:be.func,onInputExceed:be.func,onAdd:be.func,onRemove:be.func,onKeyDown:be.func,size:be.oneOf(oJ.SIZE_SET),validateStatus:be.oneOf(oJ.STATUS),prefix:be.oneOfType([be.string,be.node]),suffix:be.oneOfType([be.string,be.node]),"aria-label":be.string,preventScroll:be.bool};BV.defaultProps={showClear:!1,addOnBlur:!1,allowDuplicates:!0,showRestTagsPopover:!0,autoFocus:!1,draggable:!1,expandRestTagsOnClick:!0,showContentTooltip:!0,separator:",",size:"default",validateStatus:"default",onBlur:so,onFocus:so,onChange:so,onInputChange:so,onExceed:so,onInputExceed:so,onAdd:so,onRemove:so,onKeyDown:so};const uF=BV,q1={PREFIX:`${fi}-collapse`},oQe={iconPosition:["left","right"]};class iQe extends lh{constructor(t){super(Object.assign({},t))}initActiveKey(){const{defaultActiveKey:t,activeKey:s,accordion:o}=this.getProps();let i=s||t;return o&&(i=Array.isArray(i)?i[0]:i),i&&i.length?(i=Array.isArray(i)?i:[i],i):[]}handleChange(t,s){const{activeKey:o,accordion:i}=this.getProps(),{activeSet:a}=this.getStates();let n=new Set(a);n.has(t)?n.delete(t):i?n=new Set([t]):n.add(t),this._adapter.handleChange([...n.values()],s),typeof o>"u"&&this._adapter.addActiveKey(n)}}class aQe extends lh{constructor(t){super(Object.assign({},t)),this.updateDOMInRenderTree=s=>{this._adapter.setDOMInRenderTree(s)},this.updateDOMHeight=s=>{this._adapter.setDOMHeight(s)},this.updateVisible=s=>{this._adapter.setVisible(s)},this.updateIsTransitioning=s=>{this._adapter.setIsTransitioning(s)}}}const lQe=aQe,vJ={PREFIX:`${fi}-collapsible`};class iN extends Uc{constructor(t){super(t),this.domRef=ct.createRef(),this.handleResize=s=>{const o=s[0];if(o){const i=iN.getEntryInfo(o);this.foundation.updateDOMHeight(i.height),this.foundation.updateDOMInRenderTree(i.isShown)}},this.isChildrenInRenderTree=()=>this.domRef.current?this.domRef.current.offsetHeight>0:!1,this.state={domInRenderTree:!1,domHeight:0,visible:this.props.isOpen,isTransitioning:!1},this.foundation=new lQe(this.adapter)}get adapter(){return Object.assign(Object.assign({},super.adapter),{setDOMInRenderTree:t=>{this.state.domInRenderTree!==t&&this.setState({domInRenderTree:t})},setDOMHeight:t=>{this.state.domHeight!==t&&this.setState({domHeight:t})},setVisible:t=>{this.state.visible!==t&&this.setState({visible:t})},setIsTransitioning:t=>{this.state.isTransitioning!==t&&this.setState({isTransitioning:t})}})}componentDidMount(){super.componentDidMount(),this.resizeObserver=new ResizeObserver(this.handleResize),this.resizeObserver.observe(this.domRef.current);const t=this.isChildrenInRenderTree();this.foundation.updateDOMInRenderTree(t),t&&this.foundation.updateDOMHeight(this.domRef.current.scrollHeight)}componentDidUpdate(t,s,o){const i=Object.keys(this.props).filter(n=>!_0(this.props[n],t[n])),a=Object.keys(this.state).filter(n=>!_0(this.state[n],s[n]));i.includes("reCalcKey")&&this.foundation.updateDOMHeight(this.domRef.current.scrollHeight),a.includes("domInRenderTree")&&this.state.domInRenderTree&&this.foundation.updateDOMHeight(this.domRef.current.scrollHeight),i.includes("isOpen")&&(this.props.isOpen||!this.props.motion)&&this.foundation.updateVisible(this.props.isOpen),this.props.motion&&t.isOpen!==this.props.isOpen&&this.foundation.updateIsTransitioning(!0)}componentWillUnmount(){super.componentWillUnmount(),this.resizeObserver.disconnect()}render(){const t=Object.assign({overflow:"hidden",height:this.props.isOpen?this.state.domHeight:this.props.collapseHeight,opacity:this.props.isOpen||!this.props.fade||this.props.collapseHeight!==0?1:0,transitionDuration:`${this.props.motion&&this.state.isTransitioning?this.props.duration:0}ms`},this.props.style),s=ds(`${vJ.PREFIX}-wrapper`,{[`${vJ.PREFIX}-transition`]:this.props.motion&&this.state.isTransitioning},this.props.className);return ct.createElement("div",Object.assign({className:s,style:t,onTransitionEnd:()=>{var o,i;this.props.isOpen||this.foundation.updateVisible(!1),this.foundation.updateIsTransitioning(!1),(i=(o=this.props).onMotionEnd)===null||i===void 0||i.call(o)}},this.getDataAttr(this.props)),ct.createElement("div",{"x-semi-prop":"children",ref:this.domRef,style:{overflow:"hidden"},id:this.props.id},(this.props.keepDOM||this.props.collapseHeight!==0||this.state.visible||this.props.isOpen)&&this.props.children))}}iN.defaultProps={isOpen:!1,duration:250,motion:!0,keepDOM:!1,collapseHeight:0,fade:!1};iN.getEntryInfo=r=>{let t;r.borderBoxSize?t=!(r.borderBoxSize[0].blockSize===0&&r.borderBoxSize[0].inlineSize===0):t=!(r.contentRect.height===0&&r.contentRect.width===0);let s=0;return r.borderBoxSize?s=Math.ceil(r.borderBoxSize[0].blockSize):s=r.target.clientHeight,{isShown:t,height:s}};iN.propTypes={motion:be.bool,children:be.node,isOpen:be.bool,duration:be.number,keepDOM:be.bool,collapseHeight:be.number,style:be.object,className:be.string,reCalcKey:be.oneOfType([be.string,be.number])};const _de=iN,uQe=ct.createContext({}),Tde=uQe;var cQe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{var o;(this.context.clickHeaderToExpand||!((o=this.headerExpandIconTriggerRef.current)===null||o===void 0)&&o.contains(s.target))&&this.context.onClick(t,s)}}componentDidMount(){this.ariaID=NL({})}renderHeader(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const{showArrow:o,header:i,extra:a}=this.props;let{expandIcon:n,collapseIcon:u}=this.context;const{expandIconPosition:f}=this.context;typeof n>"u"&&(n=ct.createElement(qT,null)),typeof u>"u"&&(u=ct.createElement(Zz,null));const e=ct.createElement("span",{ref:this.headerExpandIconTriggerRef,"aria-hidden":"true",className:ds([`${q1.PREFIX}-header-icon`,{[`${q1.PREFIX}-header-iconDisabled`]:!s}])},s&&t?u:n),y=f==="left";return typeof i=="string"?ct.createElement(ct.Fragment,null,o&&(y?e:null),ct.createElement("span",null,i),ct.createElement("span",{className:`${q1.PREFIX}-header-right`},ct.createElement("span",null,a),o&&(y?null:e))):ct.createElement(ct.Fragment,null,o&&(y?e:null),i,o&&(y?null:e))}render(){const t=this.props,{className:s,children:o,itemKey:i,reCalcKey:a,header:n,extra:u,showArrow:f,disabled:e}=t,y=cQe(t,["className","children","itemKey","reCalcKey","header","extra","showArrow","disabled"]),{keepDOM:_,expandIconPosition:T,activeSet:D,motion:ce}=this.context,ge=D.has(i),Ee=ds(s,{[`${q1.PREFIX}-item`]:!0}),_e=ds({[`${q1.PREFIX}-header`]:!0,[`${q1.PREFIX}-header-disabled`]:e,[`${q1.PREFIX}-header-iconLeft`]:T==="left"}),Be=ds({[`${q1.PREFIX}-content`]:!0});return ct.createElement("div",Object.assign({className:Ee},y),ct.createElement("div",{role:"button",tabIndex:0,className:_e,"aria-disabled":e,"aria-expanded":ge?"true":"false","aria-owns":this.ariaID,onClick:He=>!e&&this.handleClick(i,He)},this.renderHeader(ge,o!==void 0&&!e)),o&&ct.createElement(_de,{isOpen:ge,keepDOM:_,motion:ce,onMotionEnd:this.props.onMotionEnd,reCalcKey:a},ct.createElement("div",{className:Be,"aria-hidden":!ge,id:this.ariaID},ct.createElement("div",{className:`${q1.PREFIX}-content-wrapper`},o))))}}cF.contextType=Tde;cF.propTypes={itemKey:be.string,extra:be.node,header:be.oneOfType([be.string,be.node]),className:be.string,reCalcKey:be.oneOfType([be.string,be.number]),showArrow:be.bool,disabled:be.bool};cF.defaultProps={showArrow:!0,disabled:!1};var fQe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.foundation.handleChange(o,i)},this.foundation=new iQe(this.adapter);const s=this.foundation.initActiveKey();this.state={activeSet:new Set(s)},this.onChange=this.onChange.bind(this)}get adapter(){return Object.assign(Object.assign({},super.adapter),{handleChange:(t,s)=>this.props.onChange(t,s),addActiveKey:t=>this.setState({activeSet:t})})}static getDerivedStateFromProps(t,s){if(t.activeKey){const o=Array.isArray(t.activeKey)?t.activeKey:[t.activeKey],i=new Set(o);return _0(i,s.activeSet)?s:Object.assign(Object.assign({},s),{activeSet:i})}return s}componentWillUnmount(){this.foundation.destroy()}render(){const t=this.props,{defaultActiveKey:s,accordion:o,style:i,motion:a,className:n,keepDOM:u,expandIconPosition:f,expandIcon:e,collapseIcon:y,children:_,clickHeaderToExpand:T}=t;fQe(t,["defaultActiveKey","accordion","style","motion","className","keepDOM","expandIconPosition","expandIcon","collapseIcon","children","clickHeaderToExpand"]);const D=ds(q1.PREFIX,n),{activeSet:ce}=this.state;return ct.createElement("div",Object.assign({className:D,style:i},this.getDataAttr(this.props)),ct.createElement(Tde.Provider,{value:{activeSet:ce,expandIcon:e,collapseIcon:y,clickHeaderToExpand:T,keepDOM:u,expandIconPosition:f,onClick:this.onChange,motion:a}},_))}}fF.Panel=cF;fF.propTypes={activeKey:be.oneOfType([be.string,be.array]),defaultActiveKey:be.oneOfType([be.string,be.array]),accordion:be.bool,clickHeaderToExpand:be.bool,onChange:be.func,expandIcon:be.node,collapseIcon:be.node,style:be.object,className:be.string,keepDOM:be.bool,motion:be.oneOfType([be.bool,be.func,be.object]),expandIconPosition:be.oneOf(oQe.iconPosition)};fF.defaultProps={defaultActiveKey:"",clickHeaderToExpand:!0,onChange:uw,expandIconPosition:"right"};const zg=fF;function dQe(r,t){return r&&(typeof r=="function"||typeof r=="object")&&t&&(typeof t=="function"||typeof t=="object")&&Object.entries(t).forEach(s=>{let[o,i]=s;r[o]=i}),r}var hQe=T6,AQe=D6,pQe=1,mQe=2;function gQe(r,t,s,o){var i=s.length,a=i,n=!o;if(r==null)return!a;for(r=Object(r);i--;){var u=s[i];if(n&&u[2]?u[1]!==r[u[0]]:!(u[0]in r))return!1}for(;++i-1?i[a?t[n]:n]:void 0}}var EKe=CKe,LKe=EKe,SKe=Rde,xKe=LKe(SKe),_Ke=xKe;const pS=ic(_Ke);var TKe=Hz,NKe=k6,yJ=eF;function IKe(r,t,s){var o=r==null?0:r.length;return o?(s&&typeof s!="number"&&NKe(r,t,s)?(t=0,s=o):(t=t==null?0:yJ(t),s=s===void 0?o:yJ(s)),TKe(r,t,s)):[]}var OKe=IKe;const RKe=ic(OKe),BKe={PREFIX:`${fi}`};var kKe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{layout:t="horizontal",dashed:s,align:o="center",className:i,margin:a,style:n,children:u}=r,f=kKe(r,["layout","dashed","align","className","margin","style","children"]),e=ds(`${u2}-divider`,i,{[`${u2}-divider-horizontal`]:t==="horizontal",[`${u2}-divider-vertical`]:t==="vertical",[`${u2}-divider-dashed`]:!!s,[`${u2}-divider-with-text`]:u&&t==="horizontal",[`${u2}-divider-with-text-${o}`]:u&&t==="horizontal"});let y={};return a!==void 0&&(t==="vertical"?y={marginLeft:a,marginRight:a}:t==="horizontal"&&(y={marginTop:a,marginBottom:a})),ct.createElement("div",Object.assign({},f,{className:e,style:Object.assign(Object.assign({},y),n)}),u&&t==="horizontal"?typeof u=="string"?ct.createElement("span",{className:`${u2}-divider_inner-text`,"x-semi-prop":"children"},u):u:null)},AC=PKe,DKe={PREFIX:`${fi}-empty`};var FKe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{for(const o of s)o.type==="attributes"&&o.attributeName==="theme-mode"&&this.updateMode()},this.updateMode=()=>{const s=this.body.getAttribute("theme-mode");s!==this.state.mode&&this.setState({mode:s})},this.state={mode:null}}componentDidMount(){if(this.props.darkModeImage){this.body=window.document.body,this.updateMode();const t={attributes:!0,childList:!1,subtree:!1};this.observer=new MutationObserver(this.observe),this.observer.observe(this.body,t)}}componentWillUnmount(){this.observer&&this.observer.disconnect()}render(){const t=this.props,{className:s,image:o,description:i,style:a,title:n,imageStyle:u,children:f,layout:e,darkModeImage:y}=t,_=FKe(t,["className","image","description","style","title","imageStyle","children","layout","darkModeImage"]),T=typeof i=="string"?i:"empty",D=this.state.mode==="dark"&&y?y:o;let ce=null;typeof D=="string"?ce=ct.createElement("img",{alt:T,src:D}):D&&"id"in D?ce=ct.createElement("svg",{"aria-hidden":"true"},ct.createElement("use",{xlinkHref:`#${D.id}`})):ce=D;const ge=ds(s,c2,{[`${c2}-${e}`]:e}),Ee=ce?{heading:4}:{heading:6,style:{fontWeight:400}};return ct.createElement("div",Object.assign({className:ge,style:a},this.getDataAttr(_)),ct.createElement("div",{className:`${c2}-image`,style:u,"x-semi-prop":"image,darkModeImage"},ce),ct.createElement("div",{className:`${c2}-content`},n?ct.createElement(uO.Title,Object.assign({},Ee,{className:`${c2}-title`,"x-semi-prop":"title"}),n):null,i?ct.createElement("div",{className:`${c2}-description`,"x-semi-prop":"description"},i):null,f?ct.createElement("div",{className:`${c2}-footer`,"x-semi-prop":"children"},f):null))}};Bde.defaultProps={layout:"vertical"};const A0={DIALOG:`${fi}-modal`},wJ={cancelKey:"cancel",confirmKey:"confirm",SIZE:["small","medium","large","full-width"],directions:["ltr","rtl"]};function MKe(r){return r!==null&&typeof r=="object"}function mO(r){return MKe(r)&&typeof r.then=="function"}class UKe extends lh{constructor(t){super(Object.assign({},t)),this.toggleDisplayNone=(s,o)=>{this._adapter.toggleDisplayNone(s,o)}}destroy(){this.afterHide()}handleCancel(t){var s;const o=this._adapter.notifyCancel(t);mO(o)&&(this._adapter.setState({onCancelReturnPromiseStatus:"pending"}),(s=o==null?void 0:o.then(()=>{this._adapter.setState({onCancelReturnPromiseStatus:"fulfilled"})}))===null||s===void 0||s.catch(i=>{throw this._adapter.setState({onCancelReturnPromiseStatus:"rejected"}),i}))}handleOk(t){var s;const o=this._adapter.notifyOk(t);mO(o)&&(this._adapter.setState({onOKReturnPromiseStatus:"pending"}),(s=o==null?void 0:o.then(()=>{this._adapter.setState({onOKReturnPromiseStatus:"fulfilled"})}))===null||s===void 0||s.catch(i=>{throw this._adapter.setState({onOKReturnPromiseStatus:"rejected"}),i}))}beforeShow(){this._adapter.disabledBodyScroll()}afterHide(){this._adapter.enabledBodyScroll(),this._adapter.notifyClose()}enabledBodyScroll(){this._adapter.enabledBodyScroll()}}class kV extends lh{constructor(t){super(Object.assign(Object.assign({},kV.defaultAdapter),t)),this.handleKeyDown=s=>{const{closeOnEsc:o}=this.getProps();if(o&&s.keyCode===hg.ESC){s.stopPropagation(),this.close(s);return}}}destroy(){this.handleKeyDownEventListenerUnmount(),this.modalDialogBlur(),this.prevFocusElementReFocus()}handleDialogMouseDown(){this._adapter.notifyDialogMouseDown()}handleMaskMouseUp(){this._adapter.notifyDialogMouseUp()}handleKeyDownEventListenerMount(){this._adapter.addKeyDownEventListener()}handleKeyDownEventListenerUnmount(){this._adapter.removeKeyDownEventListener()}getMouseState(){this._adapter.getMouseState()}handleMaskClick(t){const{dialogMouseDown:s}=this.getStates();t.target===t.currentTarget&&!s&&this.close(t)}close(t){this._adapter.notifyClose(t)}modalDialogFocus(){this._adapter.modalDialogFocus()}modalDialogBlur(){this._adapter.modalDialogBlur()}prevFocusElementReFocus(){this._adapter.prevFocusElementReFocus()}}var $Ke=Mfe,jKe=B6,HKe=Dz,QKe=jKe(function(r,t){return HKe(r)?$Ke(r,t):[]}),KKe=QKe;const zKe=ic(KKe);class o5{constructor(t,s){var o;this.addFocusRedirectListener=i=>(this.focusRedirectListenerList.push(i),()=>this.removeFocusRedirectListener(i)),this.removeFocusRedirectListener=i=>{this.focusRedirectListenerList=zKe(this.focusRedirectListenerList,i)},this.destroy=()=>{var i;(i=this.container)===null||i===void 0||i.removeEventListener("keydown",this.onKeyPress)},this.shouldFocusRedirect=i=>{if(!this.enable)return!1;for(const a of this.focusRedirectListenerList)if(!a(i))return!1;return!0},this.focusElement=(i,a)=>{const{preventScroll:n}=this.options;i==null||i.focus({preventScroll:n}),a.preventDefault()},this.onKeyPress=i=>{if(i&&i.key==="Tab"){const a=o5.getFocusableElements(this.container);a.length&&(i.shiftKey?this.handleContainerShiftTabKeyDown(a,i):this.handleContainerTabKeyDown(a,i))}},this.handleContainerTabKeyDown=(i,a)=>{const n=o5.getActiveElement(),u=i[i.length-1]===n,f=i[0];u&&this.shouldFocusRedirect(f)&&this.focusElement(f,a)},this.handleContainerShiftTabKeyDown=(i,a)=>{const n=o5.getActiveElement(),u=i[0]===n,f=i[i.length-1];u&&this.shouldFocusRedirect(f)&&this.focusElement(f,a)},Object.freeze(s),this.container=t,this.options=s,this.enable=(o=s==null?void 0:s.enable)!==null&&o!==void 0?o:!0,this.focusRedirectListenerList=s!=null&&s.onFocusRedirectListener?Array.isArray(s.onFocusRedirectListener)?[...s.onFocusRedirectListener]:[s.onFocusRedirectListener]:[],this.container.addEventListener("keydown",this.onKeyPress)}get enable(){return this._enable}set enable(t){this._enable=t}static getFocusableElements(t){if(!F2(t))return[];const o=["input:not([disabled]):not([tabindex='-1'])","textarea:not([disabled]):not([tabindex='-1'])","button:not([disabled]):not([tabindex='-1'])","a[href]:not([tabindex='-1'])","select:not([disabled]):not([tabindex='-1'])","area[href]:not([tabindex='-1'])","iframe:not([tabindex='-1'])","object:not([tabindex='-1'])","*[tabindex]:not([tabindex='-1'])","*[contenteditable]:not([tabindex='-1'])"].join(",");return Array.from(t.querySelectorAll(o))}static getActiveElement(){return document?document.activeElement:null}}const GR=o5;var VM=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.foundation.handleKeyDown(s)},this.onDialogMouseDown=()=>{this.foundation.handleDialogMouseDown()},this.onMaskMouseUp=()=>{this.foundation.handleMaskMouseUp()},this.onMaskClick=s=>{this.foundation.handleMaskClick(s)},this.close=s=>{this.foundation.close(s)},this.getMaskElement=()=>{const s=VM(this.props,[]),{mask:o,maskClassName:i}=s;if(o){const a=ds(`${A0.DIALOG}-mask`,{});return ct.createElement("div",Object.assign({key:"mask"},this.props.maskExtraProps,{className:ds(a,i),style:s.maskStyle}))}return null},this.renderCloseBtn=()=>{const{closable:s,closeIcon:o}=this.props;let i;if(s){const a=o||ct.createElement(GC,{"x-semi-prop":"closeIcon"});i=ct.createElement(eN,{"aria-label":"close",className:`${A0.DIALOG}-close`,key:"close-btn",onClick:this.close,type:"tertiary",icon:a,theme:"borderless",size:"small"})}return i},this.renderIcon=()=>{const{icon:s}=this.props;return s?ct.createElement("span",{className:`${A0.DIALOG}-icon-wrapper`,"x-semi-prop":"icon"},s):null},this.renderHeader=()=>{if("header"in this.props)return this.props.header;const{title:s}=this.props,o=this.renderCloseBtn(),i=this.renderIcon();return s==null?null:ct.createElement("div",{className:`${A0.DIALOG}-header`},i,ct.createElement(uO.Title,{heading:5,className:`${A0.DIALOG}-title`,id:`${A0.DIALOG}-title`,"x-semi-prop":"title"},s),o)},this.renderBody=()=>{const{bodyStyle:s,children:o,title:i}=this.props,a=ds(`${A0.DIALOG}-body`,{[`${A0.DIALOG}-withIcon`]:this.props.icon}),n=this.renderCloseBtn(),u=this.renderIcon();return i!=null||"header"in this.props?ct.createElement("div",{className:a,id:`${A0.DIALOG}-body`,style:s,"x-semi-prop":"children"},o):ct.createElement("div",{className:`${A0.DIALOG}-body-wrapper`},u,ct.createElement("div",{className:a,style:s,"x-semi-prop":"children"},o),n)},this.getDialogElement=()=>{const s=VM(this.props,[]),o={},i=ds(`${A0.DIALOG}`,{[`${A0.DIALOG}-centered`]:s.centered,[`${A0.DIALOG}-${s.size}`]:s.size});s.width&&(o.width=s.width),s.height&&(o.height=s.height),s.isFullScreen&&(o.width="100%",o.height="100%",o.margin="unset");const a=this.renderBody(),n=this.renderHeader(),u=s.footer?ct.createElement("div",{className:`${A0.DIALOG}-footer`,"x-semi-prop":"footer"},s.footer):null;return ct.createElement("div",{key:"dialog-element",className:i,onMouseDown:this.onDialogMouseDown,style:Object.assign(Object.assign({},s.style),o),id:this.dialogId},ct.createElement("div",{role:"dialog",ref:this.modalDialogRef,"aria-modal":"true","aria-labelledby":`${A0.DIALOG}-title`,"aria-describedby":`${A0.DIALOG}-body`,onAnimationEnd:s.onAnimationEnd,className:ds([`${A0.DIALOG}-content`,s.contentClassName,{[`${A0.DIALOG}-content-fullScreen`]:s.isFullScreen}])},n,a,u))},this.state={dialogMouseDown:!1,prevFocusElement:GR.getActiveElement()},this.foundation=new kV(this.adapter),this.dialogId=`dialog-${VKe++}`,this.modalDialogRef=ct.createRef()}get adapter(){return Object.assign(Object.assign({},super.adapter),{notifyClose:t=>{this.props.onClose(t)},notifyDialogMouseDown:()=>{this.setState({dialogMouseDown:!0})},notifyDialogMouseUp:()=>{this.state.dialogMouseDown&&(this.timeoutId=setTimeout(()=>{this.setState({dialogMouseDown:!1})},0))},addKeyDownEventListener:()=>{this.props.closeOnEsc&&document.addEventListener("keydown",this.foundation.handleKeyDown)},removeKeyDownEventListener:()=>{this.props.closeOnEsc&&document.removeEventListener("keydown",this.foundation.handleKeyDown)},getMouseState:()=>this.state.dialogMouseDown,modalDialogFocus:()=>{var t,s,o;const{preventScroll:i}=this.props;let a;if(this.modalDialogRef){const n=GR.getActiveElement();a=this.modalDialogRef.current.contains(n),(t=this.focusTrapHandle)===null||t===void 0||t.destroy(),this.focusTrapHandle=new GR(this.modalDialogRef.current,{preventScroll:i})}a||(o=(s=this.modalDialogRef)===null||s===void 0?void 0:s.current)===null||o===void 0||o.focus({preventScroll:i})},modalDialogBlur:()=>{var t,s;(t=this.modalDialogRef)===null||t===void 0||t.current.blur(),(s=this.focusTrapHandle)===null||s===void 0||s.destroy()},prevFocusElementReFocus:()=>{const{prevFocusElement:t}=this.state,{preventScroll:s}=this.props,o=ro(t,"focus");Mc(o)&&t.focus({preventScroll:s})}})}componentDidMount(){var t;this.foundation.handleKeyDownEventListenerMount(),this.foundation.modalDialogFocus();const s=GR.getFocusableElements(this.modalDialogRef.current);this.modalDialogRef.current.contains(document.activeElement)||(t=s[0])===null||t===void 0||t.focus()}componentWillUnmount(){clearTimeout(this.timeoutId),this.foundation.destroy()}render(){const t=this.props,{maskClosable:s,className:o,getPopupContainer:i,maskFixed:a,getContainerContext:n}=t,u=VM(t,["maskClosable","className","getPopupContainer","maskFixed","getContainerContext"]),{direction:f}=this.context,e=ds(o,{[`${A0.DIALOG}-popup`]:i&&!a,[`${A0.DIALOG}-fixed`]:a,[`${A0.DIALOG}-rtl`]:f==="rtl"}),y=n(),_=this.getDataAttr(u),T=ct.createElement("div",Object.assign({className:e},_),this.getMaskElement(),ct.createElement("div",Object.assign({role:"none",className:ds({[`${A0.DIALOG}-wrap`]:!0,[`${A0.DIALOG}-wrap-center`]:this.props.centered}),onClick:s?this.onMaskClick:null,onMouseUp:s?this.onMaskMouseUp:null},this.props.contentExtraProps),this.getDialogElement()));return y&&y.Provider?ct.createElement(y.Provider,{value:y.value},T):T}}dF.contextType=by;dF.propTypes={close:be.func,getContainerContext:be.func,contentClassName:be.string,maskClassName:be.string,onAnimationEnd:be.func,preventScroll:be.bool};dF.defaultProps={close:so,getContainerContext:so,contentClassName:"",maskClassName:""};var GKe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const[t,s]=Vt.useState(!0),[o,i]=Vt.useState(),[a,n]=Vt.useState(),{direction:u}=r,{title:f,content:e,icon:y,type:_,onCancel:T,onOk:D,className:ce}=r,ge=GKe(r,["title","content","icon","type","onCancel","onOk","className"]),Ee=Vt.useCallback(Kt=>{const sn=D&&D(Kt);sn&&sn.then?(i(!0),sn.then(function(){s(!1),i(!1)},Bn=>{i(!1)})):s(!1)},[D]),_e=Vt.useCallback(Kt=>{const sn=T&&T(Kt);sn&&sn.then?(n(!0),sn.then(function(){s(!1),n(!1)},Bn=>{n(!1)})):s(!1)},[T]),Be=`${A0.DIALOG}-confirm`,He=ds(ce,Be,{[`${Be}-rtl`]:u==="rtl"}),at=ds(`${A0.DIALOG}-${_}`),st=Iv(y)?ct.cloneElement(y,{className:`${Be}-icon ${at}-icon`,size:"extra-large"}):y,vt=f==null?null:ct.createElement("span",{className:`${Be}-title-text`},f),Ot=ds(`${Be}-content`,{[`${Be}-content-withIcon`]:r.icon});return ct.createElement(PV,Object.assign({className:He,title:vt,confirmLoading:o,cancelLoading:a,onOk:Ee,onCancel:_e,icon:st,visible:t},ge),ct.createElement("div",{className:Ot,"x-semi-prop":"content"},e))},kde=WKe;function D4(r){const t=document.createElement("div");document.body.appendChild(t);let s=Object.assign({},r);const o=()=>{zy.unmountComponentAtNode(t)&&t.parentNode&&t.parentNode.removeChild(t);for(let f=0;f{var{afterClose:s,config:o}=r;qKe(r,["afterClose","config"]);const[i,a]=ct.useState(o);ct.useImperativeHandle(t,()=>({destroy:()=>{a(u=>Object.assign(Object.assign({},u),{visible:!1}))},update:u=>{a(f=>Object.assign(Object.assign({},f),u))}}));const n=()=>{var u;(u=o==null?void 0:o.afterClose)===null||u===void 0||u.call(o),s()};return ct.createElement(kde,Object.assign({},i,{afterClose:n}))},XKe=ct.forwardRef(YKe);let CJ=0;function ZKe(){const[r,t]=ct.useState([]);function s(o){return t(i=>[...i,o]),()=>{t(i=>i.filter(a=>a!==o))}}return[r,s]}function JKe(){const[r,t]=ZKe();function s(o){return function(a){CJ+=1;const n=ct.createRef();let u;const f=ct.createElement(XKe,{key:`semi-modal-${CJ}`,config:o(a),ref:n,afterClose:()=>{u()}});return u=t(f),{destroy:()=>{n.current&&n.current.destroy()},update:e=>{n.current&&n.current.update(e)}}}}return[{info:s(Pde),success:s(Dde),error:s(Mde),warning:s(Fde),confirm:s(Ude)},ct.createElement(ct.Fragment,null,r)]}var eze=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.foundation.handleCancel(s)},this.handleOk=s=>{this.foundation.handleOk(s)},this.updateState=()=>{const{visible:s}=this.props;this.foundation.toggleDisplayNone(!s)},this.renderFooter=()=>{const{okText:s,okType:o,cancelText:i,confirmLoading:a,cancelLoading:n,hasCancel:u}=this.props,f=e=>u?ct.createElement(Wu,Object.assign({"aria-label":"cancel",onClick:this.handleCancel,loading:n===void 0?this.state.onCancelReturnPromiseStatus==="pending":n,type:"tertiary",autoFocus:!0},this.props.cancelButtonProps,{"x-semi-children-alias":"cancelText"}),i||e.cancel):null;return ct.createElement(Bm,{componentName:"Modal"},(e,y)=>ct.createElement("div",null,f(e),ct.createElement(Wu,Object.assign({"aria-label":"confirm",type:o,theme:"solid",loading:a===void 0?this.state.onOKReturnPromiseStatus==="pending":a,onClick:this.handleOk},this.props.okButtonProps,{"x-semi-children-alias":"okText"}),s||e.confirm)))},this.renderDialog=()=>{let s=this.props,{footer:o,className:i,motion:a,maskStyle:n,keepDOM:u,style:f,zIndex:e,getPopupContainer:y,visible:_}=s,T=eze(s,["footer","className","motion","maskStyle","keepDOM","style","zIndex","getPopupContainer","visible"]),D=f;const ce=n,ge="footer"in this.props?o:this.renderFooter();let Ee={zIndex:e};y&&(Ee={zIndex:e,position:"static"});const _e=ds(i,{[`${A0.DIALOG}-displayNone`]:u&&this.state.displayNone}),Be=this.props.visible||this.props.keepDOM&&(!this.props.lazyRender||this._haveRendered)||this.props.motion&&!this.state.displayNone;return Be&&(this._haveRendered=!0),ct.createElement(IL,{motion:this.props.motion,animationState:_?"enter":"leave",startClassName:_?`${A0.DIALOG}-content-animate-show`:`${A0.DIALOG}-content-animate-hide`,onAnimationEnd:()=>{this.updateState()}},He=>{let{animationClassName:at,animationEventsNeedBind:st}=He;return ct.createElement(IL,{motion:this.props.motion,animationState:_?"enter":"leave",startClassName:_?`${A0.DIALOG}-mask-animate-show`:`${A0.DIALOG}-mask-animate-hide`,onAnimationEnd:()=>{this.updateState()}},vt=>{let{animationClassName:Ot,animationEventsNeedBind:Kt}=vt;return Be?ct.createElement(U6,{style:Ee,getPopupContainer:y}," ",ct.createElement(dF,Object.assign({},T,{contentExtraProps:st,maskExtraProps:Kt,isFullScreen:this.state.isFullScreen,contentClassName:at,maskClassName:Ot,className:_e,getPopupContainer:y,maskStyle:ce,style:D,ref:this.modalRef,footer:ge,onClose:this.handleCancel}))):ct.createElement(ct.Fragment,null)})})},this.state={displayNone:!t.visible,isFullScreen:t.fullScreen},this.foundation=new UKe(this.adapter),this.modalRef=ct.createRef(),this.bodyOverflow="",this.scrollBarWidth=0,this.originBodyWidth="100%"}get adapter(){return Object.assign(Object.assign({},super.adapter),{getProps:()=>this.props,disabledBodyScroll:()=>{const{getPopupContainer:t}=this.props;this.bodyOverflow=document.body.style.overflow||"",!t&&this.bodyOverflow!=="hidden"&&(document.body.style.overflow="hidden",document.body.style.width=`calc(${this.originBodyWidth||"100%"} - ${this.scrollBarWidth}px)`)},enabledBodyScroll:()=>{const{getPopupContainer:t}=this.props;!t&&this.bodyOverflow!=="hidden"&&(document.body.style.overflow=this.bodyOverflow,document.body.style.width=this.originBodyWidth)},notifyCancel:t=>this.props.onCancel(t),notifyOk:t=>this.props.onOk(t),notifyClose:()=>{this.props.afterClose()},toggleDisplayNone:(t,s)=>{t!==this.state.displayNone&&this.setState({displayNone:t},s||so)},notifyFullScreen:t=>{t!==this.state.isFullScreen&&this.setState({isFullScreen:t})}})}static getDerivedStateFromProps(t,s){const o={};return t.fullScreen!==s.isFullScreen&&(o.isFullScreen=t.fullScreen),t.visible&&s.displayNone&&(o.displayNone=!1),o}componentDidMount(){this.scrollBarWidth=Wz(),this.originBodyWidth=document.body.style.width,this.props.visible&&this.foundation.beforeShow()}componentDidUpdate(t,s,o){!t.visible&&this.props.visible&&this.foundation.beforeShow(),!s.displayNone&&this.state.displayNone&&this.foundation.afterHide()}componentWillUnmount(){this.props.visible?this.foundation.destroy():this.foundation.enabledBodyScroll()}render(){return this.props,this.renderDialog()}};Iw.propTypes={mask:be.bool,closable:be.bool,centered:be.bool,visible:be.bool,width:be.oneOfType([be.string,be.number]),height:be.oneOfType([be.string,be.number]),confirmLoading:be.bool,cancelLoading:be.bool,okText:be.string,okType:be.string,cancelText:be.string,maskClosable:be.bool,onCancel:be.func,onOk:be.func,afterClose:be.func,okButtonProps:be.object,cancelButtonProps:be.object,style:be.object,className:be.string,maskStyle:be.object,bodyStyle:be.object,zIndex:be.number,title:be.node,icon:be.node,header:be.node,footer:be.node,hasCancel:be.bool,motion:be.bool,children:be.node,getPopupContainer:be.func,getContainerContext:be.func,maskFixed:be.bool,closeIcon:be.node,closeOnEsc:be.bool,size:be.oneOf(wJ.SIZE),keepDOM:be.bool,lazyRender:be.bool,direction:be.oneOf(wJ.directions),fullScreen:be.bool};Iw.defaultProps={zIndex:1e3,motion:!0,mask:!0,centered:!1,closable:!0,visible:!1,okType:"primary",maskClosable:!0,hasCancel:!0,onCancel:so,onOk:so,afterClose:so,maskFixed:!1,closeOnEsc:!0,size:"small",keepDOM:!1,lazyRender:!0,fullScreen:!1};Iw.useModal=JKe;Iw.info=function(r){return D4(Pde(r))};Iw.success=function(r){return D4(Dde(r))};Iw.error=function(r){return D4(Mde(r))};Iw.warning=function(r){return D4(Fde(r))};Iw.confirm=function(r){return D4(Ude(r))};Iw.destroyAll=function(){for(;Xx.length;){const t=Xx.pop();t&&t()}};const PV=Iw,F4={PREFIX:`${fi}-dropdown`,SELECTED:`${fi}-dropdown-item-selected`,DISABLED:`${fi}-dropdown-item-disabled`},hF={POSITION_SET:dL.POSITION_SET,TRIGGER_SET:["hover","focus","click","custom","contextMenu"],DEFAULT_LEAVE_DELAY:100,ITEM_TYPE:["primary","secondary","tertiary","warning","danger"]},EJ={SPACING:4,NESTED_SPACING:2};class tze extends lh{handleVisibleChange(t){this._adapter.setPopVisible(t),this._adapter.notifyVisibleChange(t);const{trigger:s}=this.getProps();if(t&&s==="click"){const o=this._adapter.getPopupId();this.setFocusToFirstMenuItem(o)}}getMenuItemNodes(t){const s=document.getElementById(t);return s?Array.from(s.getElementsByTagName("li")).filter(o=>o.ariaDisabled==="false"):null}setFocusToFirstMenuItem(t){const s=this.getMenuItemNodes(t);s&&BPe(s)}setFocusToLastMenuItem(t){const s=this.getMenuItemNodes(t);s&&kPe(s)}handleKeyDown(t){var s,o;const i=(o=(s=t.target)===null||s===void 0?void 0:s.attributes["data-popupid"])===null||o===void 0?void 0:o.value,{visible:a}=this._adapter.getStates();switch(t.key){case" ":case"Enter":t.target.click();break;case"ArrowDown":this.setFocusToFirstMenuItem(i),a&&fb(t);break;case"ArrowUp":this.setFocusToLastMenuItem(i),a&&fb(t);break}}}class nze extends lh{constructor(){super(...arguments),this.menuItemNodes=null,this.firstChars=[]}handleEscape(t){this._adapter.getContext("trigger")==="custom"&&(t&&UPe(document.querySelectorAll("[data-popupid]"),t.id)).focus()}setFocusByFirstCharacter(t,s){const o=FPe(this.menuItemNodes,t,this.firstChars,s);o>=0&&L4(this.menuItemNodes,this.menuItemNodes[o])}onMenuKeydown(t){const s=MPe(t.target,"tooltip");this.menuItemNodes||(this.menuItemNodes=[...t.target.parentNode.getElementsByTagName("li")].filter(i=>i.ariaDisabled!=="true")),this.firstChars.length===0&&this.menuItemNodes.forEach(i=>{var a;this.firstChars.push((a=i.textContent.trim()[0])===null||a===void 0?void 0:a.toLowerCase())});const o=this.menuItemNodes.find(i=>i.tabIndex===0);switch(t.key){case" ":case"Enter":t.target.click();break;case"Escape":this.handleEscape(s);break;case"ArrowUp":PPe(this.menuItemNodes,o),fb(t);break;case"ArrowDown":DPe(this.menuItemNodes,o),fb(t);break;default:RPe(t.key)&&this.setFocusByFirstCharacter(o,t.key);break}}}const rze=ct.createContext({level:0}),lT=rze;var sze=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ithis.foundation.onMenuKeydown(n)}),s)}}DV.propTypes={children:be.node,className:be.string,style:be.object};DV.contextType=lT;const ize=DV,f2=F4.PREFIX;class M4 extends Uc{render(){const{children:t,disabled:s,className:o,forwardRef:i,style:a,type:n,active:u,icon:f,onKeyDown:e,showTick:y,hover:_}=this.props,{showTick:T}=this.context,D=T??y,ce=ds(o,{[`${f2}-item`]:!0,[`${f2}-item-disabled`]:s,[`${f2}-item-hover`]:_,[`${f2}-item-withTick`]:D,[`${f2}-item-${n}`]:n,[`${f2}-item-active`]:u}),ge={};s||["onClick","onMouseEnter","onMouseLeave","onContextMenu"].forEach(Be=>{Be==="onClick"?ge.onMouseDown=He=>{var at,st;He.button===0&&((st=(at=this.props)[Be])===null||st===void 0||st.call(at,He))}:ge[Be]=this.props[Be]});let Ee=null;switch(!0){case(D&&u):Ee=ct.createElement(lO,null);break;case(D&&!u):Ee=ct.createElement(lO,{style:{color:"transparent"}});break;default:Ee=null;break}let _e=null;return f&&(_e=ct.createElement("div",{className:`${f2}-item-icon`},f)),ct.createElement("li",Object.assign({role:"menuitem",tabIndex:-1,"aria-disabled":s},ge,{onKeyDown:e,ref:Be=>i(Be),className:ce,style:a},this.getDataAttr(this.props)),Ee,_e,t)}}M4.propTypes={children:be.oneOfType([be.string,be.node]),name:be.string,disabled:be.bool,selected:be.bool,onClick:be.func,onMouseEnter:be.func,onMouseLeave:be.func,onContextMenu:be.func,className:be.string,style:be.object,forwardRef:be.func,type:be.oneOf(hF.ITEM_TYPE),active:be.bool,icon:be.node};M4.contextType=lT;M4.defaultProps={disabled:!1,divided:!1,selected:!1,onMouseEnter:so,onMouseLeave:so,forwardRef:so};M4.elementType="Dropdown.Item";const aze=M4,lze=F4.PREFIX,$de=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{style:t,className:s}=r;return ct.createElement("div",{className:ds(`${lze}-divider`,s),style:t})};$de.propTypes={style:be.object,className:be.string};const uze=$de,LJ=F4.PREFIX;class FV extends Vt.PureComponent{render(){const{className:t,style:s,children:o}=this.props,{showTick:i}=this.context,a=ds({[`${LJ}-title`]:!0,[`${LJ}-title-withTick`]:i},t);return ct.createElement("div",{className:a,style:s},o)}}FV.propTypes={children:be.node,className:be.string,style:be.object};FV.contextType=lT;const cze=FV;var GM=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ithis.foundation.handleVisibleChange(s),this.state={popVisible:t.visible},this.foundation=new tze(this.adapter),this.tooltipRef=ct.createRef()}get adapter(){return Object.assign(Object.assign({},super.adapter),{setPopVisible:t=>this.setState({popVisible:t}),notifyVisibleChange:t=>this.props.onVisibleChange(t),getPopupId:()=>this.tooltipRef.current.getPopupId()})}renderContent(){const{render:t,menu:s,contentClassName:o,style:i,showTick:a,prefixCls:n,trigger:u}=this.props,f=ds(n,o),{level:e=0}=this.context,y={showTick:a,level:e+1,trigger:u};let _=null;return ct.isValidElement(t)?_=t:Array.isArray(s)&&(_=this.renderMenu()),ct.createElement(lT.Provider,{value:y},ct.createElement("div",{className:f,style:i},ct.createElement("div",{className:`${n}-content`,"x-semi-prop":"render"},_)))}renderMenu(){const{menu:t}=this.props,s=t.map((o,i)=>{switch(o.node){case"title":{const{name:a,node:n}=o,u=GM(o,["name","node"]);return ct.createElement(ry.Title,Object.assign({},u,{key:n+a+i}),a)}case"item":{const{node:a,name:n}=o,u=GM(o,["node","name"]);return ct.createElement(ry.Item,Object.assign({},u,{key:a+n+i}),n)}case"divider":return ct.createElement(ry.Divider,{key:o.node+i});default:return null}});return ct.createElement(ry.Menu,null,s)}renderPopCard(){const{render:t,contentClassName:s,style:o,showTick:i,prefixCls:a}=this.props,n=ds(a,s),{level:u=0}=this.context,f={showTick:i,level:u+1};return ct.createElement(lT.Provider,{value:f},ct.createElement("div",{className:n,style:o},ct.createElement("div",{className:`${a}-content`},t)))}render(){const t=this.props,{children:s,position:o,trigger:i,onVisibleChange:a,zIndex:n,className:u,motion:f,margin:e,style:y,prefixCls:_}=t,T=GM(t,["children","position","trigger","onVisibleChange","zIndex","className","motion","margin","style","prefixCls"]);let{spacing:D}=this.props;const{level:ce}=this.context,{popVisible:ge}=this.state,Ee=this.renderContent();return ce>0?D=typeof D=="number"?D:EJ.NESTED_SPACING:(D===null||typeof D>"u")&&(D=EJ.SPACING),ct.createElement(Y0,Object.assign({zIndex:n,motion:f,margin:e,content:Ee,className:u,prefixCls:_,spacing:D,position:o,trigger:i,onVisibleChange:this.handleVisibleChange,showArrow:!1,returnFocusOnClose:!0,ref:this.tooltipRef},T),ct.isValidElement(s)?ct.cloneElement(s,{className:ds(ro(s,"props.className"),{[`${_}-showing`]:ge}),"aria-haspopup":!0,"aria-expanded":ge,onKeyDown:_e=>{this.foundation.handleKeyDown(_e);const Be=ro(s,"props.onKeyDown");Be&&Be(_e)}}):s)}}ry.Menu=ize;ry.Item=aze;ry.Divider=uze;ry.Title=cze;ry.contextType=lT;ry.propTypes={children:be.node,contentClassName:be.oneOfType([be.string,be.array]),className:be.string,getPopupContainer:be.func,margin:be.oneOfType([be.number,be.object]),mouseEnterDelay:be.number,mouseLeaveDelay:be.number,menu:be.array,motion:be.oneOfType([be.bool,be.func,be.object]),onVisibleChange:be.func,prefixCls:be.string,position:be.oneOf(fze),rePosKey:be.oneOfType([be.string,be.number]),render:be.node,spacing:be.oneOfType([be.number,be.object]),showTick:be.bool,style:be.object,trigger:be.oneOf(dze),visible:be.bool,zIndex:be.number};ry.defaultProps={onVisibleChange:so,prefixCls:F4.PREFIX,zIndex:yE.DEFAULT_Z_INDEX,motion:!0,trigger:"hover",position:"bottom",mouseLeaveDelay:hF.DEFAULT_LEAVE_DELAY,showTick:!1,closeOnEsc:!0,onEscKeyDown:so};const Lh=ry,jde={PREFIX:`${fi}`};var hze=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);iaDe(xJ[t],{match:()=>{typeof this.props.gutter=="object"&&this.setState(s=>({screens:Object.assign(Object.assign({},s.screens),{[t]:!0})}))},unmatch:()=>{typeof this.props.gutter=="object"&&this.setState(s=>({screens:Object.assign(Object.assign({},s.screens),{[t]:!1})}))}}))}componentWillUnmount(){this.unRegisters.forEach(t=>t())}getGutter(){const{gutter:t=0}=this.props,s=[0,0];return(Array.isArray(t)?t.slice(0,2):[t,0]).forEach((i,a)=>{if(typeof i=="object")for(let n=0;n0?{marginLeft:y[0]/-2,marginRight:y[0]/-2}:{}),y[1]>0?{marginTop:y[1]/-2,marginBottom:y[1]/-2}:{}),u),ce=Object.assign({},e);return delete ce.gutter,ct.createElement(Hde.Provider,{value:{gutters:y}},ct.createElement("div",Object.assign({},ce,{className:T,style:D,"x-semi-prop":"children"}),f))}}AF.propTypes={type:be.oneOf(["flex"]),align:be.oneOf(["top","middle","bottom"]),justify:be.oneOf(["start","end","center","space-around","space-between"]),className:be.string,style:be.object,children:be.node,gutter:be.oneOfType([be.object,be.number,be.array]),prefixCls:be.string};AF.defaultProps={prefixCls:jde.PREFIX};AF.RowContext={gutters:be.any};const ww=AF;var Aze=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{let _e={};typeof t[Ee]=="number"?_e.span=t[Ee]:typeof t[Ee]=="object"&&(_e=t[Ee]||{}),delete y[Ee],_=Object.assign(Object.assign({},_),{[`${T}-${Ee}-${_e.span}`]:_e.span!==void 0,[`${T}-${Ee}-order-${_e.order}`]:_e.order||_e.order===0,[`${T}-${Ee}-offset-${_e.offset}`]:_e.offset||_e.offset===0,[`${T}-${Ee}-push-${_e.push}`]:_e.push||_e.push===0,[`${T}-${Ee}-pull-${_e.pull}`]:_e.pull||_e.pull===0})});const D=ds(T,{[`${T}-${o}`]:o!==void 0,[`${T}-order-${i}`]:i,[`${T}-offset-${a}`]:a,[`${T}-push-${n}`]:n,[`${T}-pull-${u}`]:u},f,_);let{style:ce}=y,ge;try{ge=this.context.gutters}catch{throw new Error("please make sure inside ")}return ce=Object.assign(Object.assign(Object.assign({},ge[0]>0?{paddingLeft:ge[0]/2,paddingRight:ge[0]/2}:{}),ge[1]>0?{paddingTop:ge[1]/2,paddingBottom:ge[1]/2}:{}),ce),ct.createElement("div",Object.assign({},y,{style:ce,className:D,"x-semi-prop":"children"}),e)}}pF.contextType=Hde;pF.propTypes={span:be.number,order:be.number,offset:be.number,push:be.number,pull:be.number,className:be.string,children:be.node,xs:nx,sm:nx,md:nx,lg:nx,xl:nx,xxl:nx,prefixCls:be.string};pF.defaultProps={prefixCls:jde.PREFIX};const bm=pF,Zx={PREFIX:`${fi}-list`},P9={SIZE:["large","small","default"],LAYOUT:["vertical","horizontal"],ALIGN:["flex-start","flex-end","center","baseline","stretch"]},pze=ct.createContext(null),Qde=pze;var _J=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{emptyContent:t}=this.props;return t?ct.createElement("div",{className:`${Zx.PREFIX}-empty`,"x-semi-prop":"emptyContent"},t):ct.createElement(Bm,{componentName:"List"},s=>ct.createElement("div",{className:`${Zx.PREFIX}-empty`},s.emptyText))}}wrapChildren(t,s){const{grid:o}=this.props;if(o){const i={};return["align","gutter","justify","type"].forEach(a=>{a in o&&(i[a]=o[a])}),ct.createElement(ww,Object.assign({type:"flex"},i),t||null,s)}return ct.createElement("ul",{className:`${d2}-items`},t||null,s)}render(){const t=this.props,{style:s,className:o,header:i,loading:a,onRightClick:n,onClick:u,footer:f,layout:e,grid:y,size:_,split:T,loadMore:D,bordered:ce,dataSource:ge,renderItem:Ee,children:_e}=t,Be=mze(t,["style","className","header","loading","onRightClick","onClick","footer","layout","grid","size","split","loadMore","bordered","dataSource","renderItem","children"]),He=ds(d2,o,{[`${d2}-flex`]:e==="horizontal",[`${d2}-${_}`]:_,[`${d2}-grid`]:y,[`${d2}-split`]:T,[`${d2}-bordered`]:ce});let at;if(ge&&ge.length){at=[];const st=Ee?ge.map((vt,Ot)=>Ee(vt,Ot)):[];ct.Children.forEach(st,(vt,Ot)=>{const Kt=vt.key||`list-item-${Ot}`;at.push(ct.cloneElement(vt,{key:Kt}))})}else!_e&&!a&&(at=this.renderEmpty());return ct.createElement("div",Object.assign({className:He,style:s},this.getDataAttr(Be)),i?ct.createElement("div",{className:`${Zx.PREFIX}-header`,"x-semi-prop":"header"},i):null,ct.createElement(Qde.Provider,{value:{grid:y,onRightClick:n,onClick:u}},ct.createElement(e1,{spinning:a,size:"large"},this.wrapChildren(at,_e))),f?ct.createElement("div",{className:`${Zx.PREFIX}-footer`,"x-semi-prop":"footer"},f):null,D||null)}}gF.Item=mF;gF.propTypes={style:be.object,className:be.string,bordered:be.bool,footer:be.node,header:be.node,layout:be.oneOf(P9.LAYOUT),size:be.oneOf(P9.SIZE),split:be.bool,emptyContent:be.node,dataSource:be.array,renderItem:be.func,grid:be.object,loading:be.bool,loadMore:be.node,onRightClick:be.func,onClick:be.func};gF.defaultProps={bordered:!1,split:!0,loading:!1,layout:"vertical",size:"default",onRightClick:so,onClick:so};const pP=gF;let zv=null;const TJ={"min-height":"0","max-height":"none",height:"0",visibility:"hidden",overflow:"hidden",position:"absolute","z-index":"-1000",top:"0",right:"0"},NJ=r=>{Object.keys(TJ).forEach(t=>{r.style.setProperty(t,TJ[t],"important")})},IJ=(r,t)=>{const s=r.scrollHeight;return t.sizingStyle.boxSizing==="border-box"?s+t.borderSize:s-t.paddingSize};function gze(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1/0;zv||(zv=document.createElement("textarea"),zv.setAttribute("tab-index","-1"),zv.setAttribute("aria-hidden","true"),NJ(zv)),zv.parentNode===null&&document.body.appendChild(zv);const{paddingSize:i,borderSize:a,sizingStyle:n}=r,{boxSizing:u}=n;Object.keys(n).forEach(T=>{zv.style[T]=n[T]}),NJ(zv),zv.value=t;let f=IJ(zv,r);zv.value="x";const e=IJ(zv,r)-i-a;let y=e*s;u==="border-box"&&(y=y+i+a),f=Math.max(y,f);let _=e*o;return u==="border-box"&&(_=_+i+a),f=Math.min(_,f),f}const bze=["borderBottomWidth","borderLeftWidth","borderRightWidth","borderTopWidth","boxSizing","fontFamily","fontSize","fontStyle","fontWeight","letterSpacing","lineHeight","paddingBottom","paddingLeft","paddingRight","paddingTop","tabSize","textIndent","textRendering","textTransform","width"],vze=r=>{const t=window.getComputedStyle(r);if(t===null)return null;const s=I1(t,bze),{boxSizing:o}=s;if(o==="")return null;const i=parseFloat(s.paddingBottom)+parseFloat(s.paddingTop),a=parseFloat(s.borderBottomWidth)+parseFloat(s.borderTopWidth);return{sizingStyle:s,paddingSize:i,borderSize:a}},yze=vze;class MV extends lh{static get textAreaDefaultAdapter(){return{notifyChange:so,setValue:so,toggleFocusing:so,toggleHovering:so,notifyFocus:so,notifyBlur:so,notifyKeyDown:so,notifyEnterPress:so}}constructor(t){super(Object.assign(Object.assign({},MV.textAreaDefaultAdapter),t)),this.resizeTextarea=()=>{var s;const{height:o}=this.getStates(),{rows:i,autosize:a}=this.getProps(),n=this._adapter.getRef(),u=yze(n);if(!u)return;const[f,e]=a!==null&&typeof a=="object"?[(s=a==null?void 0:a.minRows)!==null&&s!==void 0?s:i,a==null?void 0:a.maxRows]:[i],y=gze(u,n.value||n.placeholder||"x",f,e);if(o!==y){this._adapter.notifyHeightUpdate(y),n.style.height=`${y}px`;return}}}init(){this.setInitValue()}destroy(){}setInitValue(){const{defaultValue:t,value:s}=this.getProps();let o=t;this._isControlledComponent()&&(o=s),this._adapter.setValue(o)}handleValueChange(t){this._adapter.setValue(t)}handleChange(t,s){const{maxLength:o,minLength:i,getValueLength:a}=this._adapter.getProps();let n=t;o&&Mc(a)&&(n=this.handleVisibleMaxLength(t)),i&&Mc(a)&&this.handleVisibleMinLength(n),this._isControlledComponent()?this._adapter.notifyChange(n,s):(this._adapter.setValue(n),this._adapter.notifyChange(n,s))}handleVisibleMinLength(t){const{minLength:s,getValueLength:o}=this._adapter.getProps(),{minLength:i}=this._adapter.getStates();if(mg(s)&&s>=0&&Mc(o)&&rA(t)){const a=o(t);if(a=0&&rA(t)){if(Mc(o)){if(o(t)>s)return console.warn("[Semi TextArea] The input character is truncated because the input length exceeds the maximum length limit"),this.handleTruncateValue(t,s)}else if(t.length>s)return console.warn("[Semi TextArea] The input character is truncated because the input length exceeds the maximum length limit"),t.slice(0,s);return t}}handleTruncateValue(t,s){const{getValueLength:o}=this._adapter.getProps();if(Mc(o)){let i="";for(let a=1,n=t.length;a<=n;a++){const u=t.slice(0,a);if(o(u)>s)return i;i=u}return i}else return t.slice(0,s)}handleFocus(t){const{value:s}=this.getStates();this._adapter.toggleFocusing(!0),this._adapter.notifyFocus(s,t)}handleBlur(t){const{value:s}=this.getStates(),{maxLength:o}=this.getProps();let i=s;o&&(i=this.handleVisibleMaxLength(s),i!==s&&(this._isControlledComponent()||this._adapter.setValue(i),this._adapter.notifyChange(i,t))),this._adapter.toggleFocusing(!1),this._adapter.notifyBlur(i,t)}handleKeyDown(t){this._adapter.notifyKeyDown(t),t.keyCode===13&&this._adapter.notifyPressEnter(t)}handleMouseEnter(t){this._adapter.toggleHovering(!0)}handleMouseLeave(t){this._adapter.toggleHovering(!1)}isAllowClear(){const{value:t,isFocus:s,isHover:o}=this._adapter.getStates(),{showClear:i,disabled:a,readonly:n}=this._adapter.getProps();return t&&i&&!a&&(s||o)&&!n}handleClear(t){const{isFocus:s}=this.getStates();this._isControlledComponent("value")?this._adapter.setState({isFocus:!1}):this._adapter.setState({value:"",isFocus:!1}),s&&this._adapter.notifyBlur("",t),this._adapter.notifyChange("",t),this._adapter.notifyClear(t),this.stopPropagation(t)}}var wze=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.foundation.handleClear(s)},this.setRef=s=>{this.libRef.current=s;const{forwardRef:o}=this.props;typeof o=="function"?o(s):o&&typeof o=="object"&&(o.current=s)},this.state={value:"",isFocus:!1,isHover:!1,height:0,minLength:t.minLength},this.focusing=!1,this.foundation=new MV(this.adapter),this.libRef=ct.createRef(),this.throttledResizeTextarea=iO(this.foundation.resizeTextarea,10)}get adapter(){return Object.assign(Object.assign({},super.adapter),{setValue:t=>this.setState({value:t},()=>{this.props.autosize&&this.foundation.resizeTextarea()}),getRef:()=>this.libRef.current,toggleFocusing:t=>this.setState({isFocus:t}),toggleHovering:t=>this.setState({isHover:t}),notifyChange:(t,s)=>{this.props.onChange(t,s)},notifyClear:t=>this.props.onClear(t),notifyBlur:(t,s)=>this.props.onBlur(s),notifyFocus:(t,s)=>this.props.onFocus(s),notifyKeyDown:t=>{this.props.onKeyDown(t)},notifyHeightUpdate:t=>{this.setState({height:t}),this.props.onResize({height:t})},notifyPressEnter:t=>{this.props.onEnterPress&&this.props.onEnterPress(t)},setMinLength:t=>this.setState({minLength:t})})}static getDerivedStateFromProps(t,s){const o={};return t.value!==s.cachedValue&&(o.value=t.value,o.cachedValue=t.value),o}componentWillUnmount(){var t,s;this.throttledResizeTextarea&&((s=(t=this.throttledResizeTextarea)===null||t===void 0?void 0:t.cancel)===null||s===void 0||s.call(t),this.throttledResizeTextarea=null)}componentDidUpdate(t,s){(this.props.value!==t.value||this.props.placeholder!==t.placeholder)&&this.props.autosize&&this.foundation.resizeTextarea()}renderClearBtn(){const{showClear:t}=this.props,s=this.foundation.isAllowClear(),o=ds(`${Wb}-clearbtn`,{[`${Wb}-clearbtn-hidden`]:!s});return t?ct.createElement("div",{className:o,onClick:this.handleClear},ct.createElement(XT,null)):null}renderCounter(){let t,s,o,i;const{showCounter:a,maxCount:n,getValueLength:u}=this.props;if(a||n){const{value:f}=this.state;s=f?Mc(u)?u(f):f.length:0,o=n||null,i=ds(`${Wb}-textarea-counter`,{[`${Wb}-textarea-counter-exceed`]:s>o}),t=ct.createElement("div",{className:i},s,o?"/":null,o)}else t=null;return t}render(){const t=this.props,{autosize:s,placeholder:o,onEnterPress:i,onResize:a,disabled:n,readonly:u,className:f,showCounter:e,validateStatus:y,maxCount:_,defaultValue:T,style:D,forwardRef:ce,getValueLength:ge,maxLength:Ee,minLength:_e,showClear:Be,borderless:He,autoFocus:at}=t,st=wze(t,["autosize","placeholder","onEnterPress","onResize","disabled","readonly","className","showCounter","validateStatus","maxCount","defaultValue","style","forwardRef","getValueLength","maxLength","minLength","showClear","borderless","autoFocus"]),{isFocus:vt,value:Ot,minLength:Kt}=this.state,sn=ds(f,`${Wb}-textarea-wrapper`,{[`${Wb}-textarea-borderless`]:He,[`${Wb}-textarea-wrapper-disabled`]:n,[`${Wb}-textarea-wrapper-readonly`]:u,[`${Wb}-textarea-wrapper-${y}`]:!!y,[`${Wb}-textarea-wrapper-focus`]:vt}),Bn=ds(`${Wb}-textarea`,{[`${Wb}-textarea-disabled`]:n,[`${Wb}-textarea-readonly`]:u,[`${Wb}-textarea-autosize`]:ev(s)?wm(s==null?void 0:s.maxRows):s,[`${Wb}-textarea-showClear`]:Be}),fn=Object.assign(Object.assign({},ig(st,"insetLabel","insetLabelId","getValueLength","onClear","showClear")),{autoFocus:at||this.props.autofocus,className:Bn,disabled:n,readOnly:u,placeholder:o||null,onChange:bn=>this.foundation.handleChange(bn.target.value,bn),onFocus:bn=>this.foundation.handleFocus(bn),onBlur:bn=>this.foundation.handleBlur(bn.nativeEvent),onKeyDown:bn=>this.foundation.handleKeyDown(bn),value:Ot??""});return Mc(ge)||(fn.maxLength=Ee),Kt&&(fn.minLength=Kt),ct.createElement("div",{className:sn,style:D,onMouseEnter:bn=>this.foundation.handleMouseEnter(bn),onMouseLeave:bn=>this.foundation.handleMouseLeave(bn)},s?ct.createElement(hL,{onResize:this.throttledResizeTextarea},ct.createElement("textarea",Object.assign({},fn,{ref:this.setRef}))):ct.createElement("textarea",Object.assign({},fn,{ref:this.setRef})),this.renderClearBtn(),this.renderCounter())}}UV.propTypes={autosize:be.oneOfType([be.bool,be.object]),borderless:be.bool,placeholder:be.string,value:be.string,rows:be.number,cols:be.number,maxCount:be.number,onEnterPress:be.func,validateStatus:be.string,className:be.string,style:be.object,showClear:be.bool,onClear:be.func,onResize:be.func,getValueLength:be.func};UV.defaultProps={autosize:!1,borderless:!1,rows:4,cols:20,showCounter:!1,showClear:!1,onEnterPress:so,onChange:so,onBlur:so,onFocus:so,onKeyDown:so,onResize:so,onClear:so};const Cze=ct.forwardRef((r,t)=>ct.createElement(UV,Object.assign({},r,{forwardRef:t}))),mS=Cze;var Eze=Lfe;function Lze(r){return Eze(r)&&r!=+r}var Sze=Lze;const xze=ic(Sze),_ze=(r,t)=>{const{isNaN:s}=Number;return s(r)&&s(t)},Tze=_ze,Nze=Object.assign({},lV),U2=Object.assign(Object.assign({},bUe),{DEFAULT_STEP:1,DEFAULT_SHIFT_STEP:10,DEFAULT_PRESS_TIMEOUT:250,DEFAULT_PRESS_INTERVAL:0,MOUSE_BUTTON_LEFT:0}),Ize=Object.assign({},_4);function Oze(r,t){const s=(r.toString().split(".")[1]||"").length,o=(t.toString().split(".")[1]||"").length,i=Math.pow(10,Math.max(s,o));return(r*i+t*i)/i}function OJ(r,t){return Oze(r,-t)}class Rze extends lh{init(){this._setInitValue()}destroy(){this._unregisterInterval(),this._unregisterTimer(),this._adapter.unregisterGlobalEvent("mouseup")}isControlled(){return this._isControlledComponent("value")}_doInput(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,i=t,a=t,n=!0;const u=this.isControlled();typeof t!="number"&&(a=this.doParse(t,!1),n=!isNaN(a)),n&&(i=a,u||this._adapter.setNumber(a)),u||this._adapter.setValue(t,o),this.getProp("keepFocus")&&this._adapter.setFocusing(!0,()=>{this._adapter.setClickUpOrDown(!0)}),this.notifyChange(i,s)}_registerInterval(t){const s=this.getProp("pressInterval")||U2.DEFAULT_PRESS_INTERVAL;this._intervalHasRegistered=!0,this._interval=setInterval(()=>{typeof t=="function"&&this._intervalHasRegistered&&t()},s)}_unregisterInterval(){this._interval&&(this._intervalHasRegistered=!1,clearInterval(this._interval),this._interval=null)}_registerTimer(t){const s=this.getProp("pressTimeout")||U2.DEFAULT_PRESS_TIMEOUT;this._timerHasRegistered=!0,this._timer=setTimeout(()=>{this._timerHasRegistered&&typeof t=="function"&&t()},s)}_unregisterTimer(){this._timer&&(this._timerHasRegistered=!1,clearTimeout(this._timer),this._timer=null)}handleInputFocus(t){this.getState("value"),this._adapter.recordCursorPosition(),this._adapter.setFocusing(!0,null),this._adapter.setClickUpOrDown(!1),this._adapter.notifyFocus(t)}handleInputChange(t,s){const o=this.doParse(t,!0,!0,!0),i=this.doParse(t,!1,!1,!1),a=this.afterParser(t);this._adapter.recordCursorPosition();let n,u=i,f=t;if(t==="")this.isControlled()||(u=null);else if(this.isValidNumber(i)&&this.isValidNumber(o))n=i,f=this.doFormat(i,!1);else{if(typeof i=="number"&&!isNaN(i)){f=this.doFormat(i,!1);const e=a.lastIndexOf("."),y=a.length-1-e,_=this._getPrecLen(i);if(_){if(_-1?a.slice(e):"";f+=T}u=i}else f=this.doFormat(a,!1);n=a}!this.isControlled()&&(u===null||typeof u=="number"&&!isNaN(u))&&this._adapter.setNumber(u),this._adapter.setValue(this.isControlled()?f:this.doFormat(a,!1),()=>{this._adapter.restoreCursor()}),this.notifyChange(n,s)}handleInputKeyDown(t){const s=t.keyCode;if(s===hg.UP||s===hg.DOWN){this._adapter.setClickUpOrDown(!0),this._adapter.recordCursorPosition();const o=s===hg.UP?this.add(null,t):this.minus(null,t);this._doInput(o,t,()=>{this._adapter.restoreCursor()}),t.preventDefault()}this._adapter.notifyKeyDown(t)}handleInputBlur(t){const s=vE(this.getState("value"));let o=this.getState("number");if(o!=null||s!=null&&s!==""){const i=this.doParse(s,!1,!0,!0);let a=!1,n=!1,u,f;this.isValidNumber(i)&&o!==i&&(u=i,this.isControlled()||(o=u),a=!0);const e=this.doFormat(o,!0);if(e!==s&&(f=e,n=!0),n||a){const y=f??u;f!=null&&this._adapter.setValue(f),u!=null&&(this._isControlledComponent("value")||this._adapter.setNumber(u)),this.notifyChange(y,t)}}this._adapter.setFocusing(!1),this._adapter.notifyBlur(t)}handleInputMouseEnter(t){this._adapter.setHovering(!0)}handleInputMouseLeave(t){this._adapter.setHovering(!1)}handleInputMouseMove(t){this._adapter.setHovering(!0)}handleMouseUp(t){this._unregisterInterval(),this._unregisterTimer(),this._adapter.unregisterGlobalEvent("mouseup")}handleUpClick(t){const{readonly:s}=this.getProps();!this._isMouseButtonLeft(t)||s||(this._adapter.setClickUpOrDown(!0),t&&(this._persistEvent(t),t.stopPropagation(),this._preventDefault(t)),this.upClick(t),this._registerTimer(()=>{this._registerInterval(()=>{this.upClick(t)})}))}handleDownClick(t){const{readonly:s}=this.getProps();!this._isMouseButtonLeft(t)||s||(this._adapter.setClickUpOrDown(!0),t&&(this._persistEvent(t),t.stopPropagation(),this._preventDefault(t)),this.downClick(t),this._registerTimer(()=>{this._registerInterval(()=>{this.downClick(t)})}))}_isMouseButtonLeft(t){return ro(t,"button")===U2.MOUSE_BUTTON_LEFT}_preventDefault(t){const s=this._adapter.getProp("keepFocus"),o=this._adapter.getProp("innerButtons");(s||o)&&t.preventDefault()}handleMouseLeave(t){this._adapter.registerGlobalEvent("mouseup",()=>{this.handleMouseUp(t)})}upClick(t){const s=this.add(null,t);this._doInput(s,t),this._adapter.notifyUpClick(s,t)}downClick(t){const s=this.minus(null,t);this._doInput(s,t),this._adapter.notifyDownClick(s,t)}_setInitValue(){const{defaultValue:t,value:s}=this.getProps(),o=this._isControlledComponent("value")?s:t,i=this.doParse(vE(o),!1,!0,!0);let a=null;typeof i=="number"&&!isNaN(i)&&(a=i);const n=typeof a=="number"?this.doFormat(a,!0):"";this._adapter.setNumber(a),this._adapter.setValue(n),rA(n)&&n!==String(o??"")&&this.notifyChange(n,null)}add(t,s){const i=s&&s.shiftKey?this.getProp("shiftStep"):this.getProp("step");t=t==null?i:Number(t);const a=Math.abs($N(t)),n=this.getState("number");let u=this.toNumber(n)||0;const f=this.getProp("min"),e=this.getProp("max"),y=this._getPrecLen(f),_=this._getPrecLen(e),T=this._getPrecLen(u),D=this._getPrecLen(t),ce=Math.pow(10,Math.max(y,_,T,D));return t<0?Math.abs(OJ(f,u))>=a&&(u=(u*ce+t*ce)/ce):t>0&&Math.abs(OJ(e,u))>=a&&(u=(u*ce+t*ce)/ce),typeof f=="number"&&f>u&&(u=f),typeof e=="number"&&e0&&arguments[0]!==void 0?arguments[0]:0,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,o;const i=this.getProp("formatter");return s?o=this._adjustPrec(t):o=vE(t),typeof i=="function"&&(o=i(o)),o}fetchMinOrMax(t){const{min:s,max:o}=this.getProps();return to?o:t}doParse(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(typeof t=="number")return i&&(t=this.fetchMinOrMax(t)),o&&(t=this._adjustPrec(t)),$N(t);const a=this.getProp("parser");if(typeof a=="function"&&(t=a(t)),s&&typeof t=="string"){const n=t.indexOf(".")===-1||t.indexOf(".")>-1&&(t==="0"||t.lastIndexOf("0")f===".").length<2;if(!n||!u)return NaN}return o&&(t=this._adjustPrec(t)),typeof t=="string"&&t.length?i?this.fetchMinOrMax($N(t)):$N(t):NaN}afterParser(t){const s=this.getProp("parser");return vE(typeof t=="string"&&typeof s=="function"?s(t):t)}toNumber(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(typeof t=="number")return t;if(typeof t=="string"){const o=this.getProp("parser");typeof o=="function"&&(t=o(t)),s&&(t=this._adjustPrec(t))}return $N(t)}isValidNumber(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(typeof t=="number"&&!isNaN(t)){const{min:o,max:i,precision:a}=this.getProps(),n=this._getPrecLen(t),u=s?typeof a=="number"&&n<=a||typeof a!="number":!0;if(t>=o&&t<=i&&u)return!0}return!1}isValidString(t){if(typeof t=="string"&&t.length){const s=this.doParse(t);return this.isValidNumber(s)}return!1}notifyChange(t,s){if(t==null||t==="")this._adapter.notifyChange("",s);else{const o=this.toNumber(t,!0);typeof o=="number"&&!isNaN(o)?(this._adapter.notifyChange(o,s),this.notifyNumberChange(o,s)):this._adapter.notifyChange(this.afterParser(t),s)}}notifyNumberChange(t,s){const{number:o}=this.getStates();this.isValidNumber(t)&&t!==o&&this._adapter.notifyNumberChange(t,s)}updateStates(t,s){this._adapter.updateStates(t,s)}}const Bze=Rze;var kze=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ithis.setState({value:s},o),setNumber:(s,o)=>this.setState({number:s},o),setFocusing:(s,o)=>this.setState({focusing:s},o),setHovering:s=>this.setState({hovering:s}),notifyChange:function(){return t.props.onChange(...arguments)},notifyNumberChange:function(){return t.props.onNumberChange(...arguments)},notifyBlur:s=>this.props.onBlur(s),notifyFocus:s=>this.props.onFocus(s),notifyUpClick:(s,o)=>this.props.onUpClick(s,o),notifyDownClick:(s,o)=>this.props.onDownClick(s,o),notifyKeyDown:s=>this.props.onKeyDown(s),registerGlobalEvent:(s,o)=>{s&&typeof o=="function"&&(this.adapter.unregisterGlobalEvent(s),this.adapter.setCache(s,o),document.addEventListener(s,o))},unregisterGlobalEvent:s=>{if(s){const o=this.adapter.getCache(s);document.removeEventListener(s,o),this.adapter.setCache(s,null)}},recordCursorPosition:()=>{try{this.inputNode&&(this.cursorStart=this.inputNode.selectionStart,this.cursorEnd=this.inputNode.selectionEnd,this.currentValue=this.inputNode.value,this.cursorBefore=this.inputNode.value.substring(0,this.cursorStart),this.cursorAfter=this.inputNode.value.substring(this.cursorEnd))}catch(s){console.warn(s)}},restoreByAfter:s=>{if(yw(s))return!1;const o=this.inputNode.value,i=o.lastIndexOf(s);return i===-1?!1:i+s.length===o.length?(this.adapter.fixCaret(i,i),!0):!1},restoreCursor:function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.cursorAfter;return yw(s)?!1:Array.prototype.some.call(s,(o,i)=>{const a=s.substring(i);return t.adapter.restoreByAfter(a)})},fixCaret:(s,o)=>{if(!(s===void 0||o===void 0||!this.inputNode||!this.inputNode.value))try{const i=this.inputNode.selectionStart,a=this.inputNode.selectionEnd;(s!==i||o!==a)&&this.inputNode.setSelectionRange(s,o)}catch{}},setClickUpOrDown:s=>{this.clickUpOrDown=s},updateStates:(s,o)=>{this.setState(s,o)}})}constructor(t){super(t),this.setInputRef=s=>{const{forwardedRef:o}=this.props;this.inputNode=s,o&&typeof o=="object"?o.current=s:typeof o=="function"&&o(s)},this.handleInputFocus=s=>this.foundation.handleInputFocus(s),this.handleInputChange=(s,o)=>this.foundation.handleInputChange(s,o),this.handleInputBlur=s=>this.foundation.handleInputBlur(s),this.handleInputKeyDown=s=>this.foundation.handleInputKeyDown(s),this.handleInputMouseEnter=s=>this.foundation.handleInputMouseEnter(s),this.handleInputMouseLeave=s=>this.foundation.handleInputMouseLeave(s),this.handleInputMouseMove=s=>this.foundation.handleInputMouseMove(s),this.handleUpClick=s=>this.foundation.handleUpClick(s),this.handleDownClick=s=>this.foundation.handleDownClick(s),this.handleMouseUp=s=>this.foundation.handleMouseUp(s),this.handleMouseLeave=s=>this.foundation.handleMouseLeave(s),this.renderButtons=()=>{const{prefixCls:s,disabled:o,innerButtons:i,max:a,min:n}=this.props,{hovering:u,focusing:f,number:e}=this.state,y=o||e===a,_=o||e===n,T=ds(`${s}-number-suffix-btns`,{[`${s}-number-suffix-btns-inner`]:i,[`${s}-number-suffix-btns-inner-hover`]:i&&u&&!f}),D=ds(`${s}-number-button`,`${s}-number-button-up`,{[`${s}-number-button-up-disabled`]:o,[`${s}-number-button-up-not-allowed`]:y}),ce=ds(`${s}-number-button`,`${s}-number-button-down`,{[`${s}-number-button-down-disabled`]:o,[`${s}-number-button-down-not-allowed`]:_});return ct.createElement("div",{className:T},ct.createElement("span",{className:D,onMouseDown:y?so:this.handleUpClick,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave},ct.createElement(Zz,{size:"extra-small"})),ct.createElement("span",{className:ce,onMouseDown:_?so:this.handleDownClick,onMouseUp:this.handleMouseUp,onMouseLeave:this.handleMouseLeave},ct.createElement(qT,{size:"extra-small"})))},this.renderSuffix=()=>{const{innerButtons:s,suffix:o}=this.props,{hovering:i,focusing:a}=this.state;return s&&(i||a)?this.renderButtons():o},this.state={value:"",number:null,focusing:!!t.autofocus||!1,hovering:!1},this.inputNode=null,this.foundation=new Bze(this.adapter),this.clickUpOrDown=!1}componentDidUpdate(t){const{value:s,preventScroll:o}=this.props,{focusing:i}=this.state;let a;if(s!==t.value&&!Tze(s,t.value)){if(yw(s)||s==="")a="",this.foundation.updateStates({value:a,number:null});else{let n=s;typeof s=="number"&&(n=this.foundation.doFormat(s));const u=this.foundation.doParse(n,!1,!0,!0),f=typeof s=="number"?s:this.foundation.doParse(n,!1,!1,!1);if(i)if(this.foundation.isValidNumber(u)&&u!==this.state.number){const e={number:u};this.clickUpOrDown&&(e.value=this.foundation.doFormat(e.number,!0),a=e.value),this.foundation.updateStates(e,()=>this.adapter.restoreCursor())}else xze(f)?this.foundation.updateStates({value:n}):(a=this.foundation.doFormat(f,!1),this.foundation.updateStates({value:a}));else this.foundation.isValidNumber(u)?(a=this.foundation.doFormat(u),this.foundation.updateStates({number:u,value:a})):(a="",this.foundation.updateStates({number:null,value:a}))}a&&rA(a)&&a!==String(this.props.value)&&this.foundation.notifyChange(a,null)}this.clickUpOrDown&&this.props.keepFocus&&this.state.focusing&&document.activeElement!==this.inputNode&&this.inputNode.focus({preventScroll:o})}render(){const t=this.props,{disabled:s,className:o,prefixCls:i,min:a,max:n,step:u,shiftStep:f,precision:e,formatter:y,parser:_,forwardedRef:T,onUpClick:D,onDownClick:ce,pressInterval:ge,pressTimeout:Ee,suffix:_e,size:Be,hideButtons:He,innerButtons:at,style:st,onNumberChange:vt,keepFocus:Ot,defaultValue:Kt}=t,sn=kze(t,["disabled","className","prefixCls","min","max","step","shiftStep","precision","formatter","parser","forwardedRef","onUpClick","onDownClick","pressInterval","pressTimeout","suffix","size","hideButtons","innerButtons","style","onNumberChange","keepFocus","defaultValue"]),{value:Bn,number:fn}=this.state,bn=ds(o,`${i}-number`,{[`${i}-number-size-${Be}`]:Be}),$n=this.renderButtons(),_n={"aria-disabled":s,step:u};return fn&&(_n["aria-valuenow"]=fn),n!==1/0&&(_n["aria-valuemax"]=n),a!==-1/0&&(_n["aria-valuemin"]=a),ct.createElement("div",{className:bn,style:st,onMouseMove:Cr=>this.handleInputMouseMove(Cr),onMouseEnter:Cr=>this.handleInputMouseEnter(Cr),onMouseLeave:Cr=>this.handleInputMouseLeave(Cr)},ct.createElement(Em,Object.assign({role:"spinbutton"},_n,sn,{size:Be,disabled:s,ref:this.setInputRef,value:Bn,onFocus:this.handleInputFocus,onChange:this.handleInputChange,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,suffix:this.renderSuffix()})),He||at?null:$n)}}mP.propTypes={"aria-label":be.string,"aria-labelledby":be.string,"aria-invalid":be.bool,"aria-errormessage":be.string,"aria-describedby":be.string,"aria-required":be.bool,autofocus:be.bool,clearIcon:be.node,className:be.string,defaultValue:be.oneOfType([be.number,be.string]),disabled:be.bool,formatter:be.func,forwardedRef:be.any,hideButtons:be.bool,innerButtons:be.bool,insetLabel:be.node,insetLabelId:be.string,keepFocus:be.bool,max:be.number,min:be.number,parser:be.func,precision:be.number,prefixCls:be.string,pressInterval:be.number,pressTimeout:be.number,preventScroll:be.bool,shiftStep:be.number,step:be.number,style:be.object,suffix:be.any,value:be.oneOfType([be.number,be.string]),onBlur:be.func,onChange:be.func,onDownClick:be.func,onKeyDown:be.func,onNumberChange:be.func,onUpClick:be.func};mP.defaultProps={forwardedRef:so,innerButtons:!1,keepFocus:!1,max:1/0,min:-1/0,prefixCls:Nze.PREFIX,pressInterval:U2.DEFAULT_PRESS_TIMEOUT,pressTimeout:U2.DEFAULT_PRESS_TIMEOUT,shiftStep:U2.DEFAULT_SHIFT_STEP,size:Ize.DEFAULT_SIZE,step:U2.DEFAULT_STEP,onBlur:so,onChange:so,onDownClick:so,onFocus:so,onKeyDown:so,onNumberChange:so,onUpClick:so};const U4=dQe(ct.forwardRef(function(t,s){return ct.createElement(mP,Object.assign({},t,{forwardedRef:s}))}),mP),Pze={PREFIX:fi+"-overflow-list"},RJ={COLLAPSE:"collapse",SCROLL:"scroll"},BJ={START:"start",END:"end"},Dze={NONE:0,GROW:1,SHRINK:2},G2={BOUNDARY_SET:Object.values(BJ),POSITION_SET:["vertical","horizontal"],MODE_SET:Object.values(RJ),MODE_MAP:RJ,BOUNDARY_MAP:BJ,OVERFLOW_DIR:Dze},kJ={MINIMUM_HTML_ELEMENT_WIDTH:4};class $V extends ct.PureComponent{componentDidMount(){const{items:t}=this.props;this.cachedKeys=Object.keys(t);const{root:s,threshold:o,rootMargin:i,option:a,onIntersect:n}=this.props;this.observer=new IntersectionObserver(n,Object.assign({root:s,threshold:o,rootMargin:i},a)),this.observeElement()}componentDidUpdate(){const{items:t}=this.props,s=Object.keys(t);_0(this.cachedKeys,s)||(this.observeElement(!0),this.cachedKeys=s)}componentWillUnmount(){this.observer&&(this.observer.disconnect(),this.observer=null)}observeElement(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const{items:s}=this.props;if($m(s)){this.observer.disconnect();return}t&&this.observer.disconnect(),Object.keys(s).forEach(o=>{const i=s[o];i&&F2(i)&&this.observer.observe(i)})}render(){const{children:t}=this.props;return t}}$V.propTypes={onIntersect:be.func,option:be.object,root:be.any,threshold:be.number,rootMargin:be.string,items:be.object};$V.defaultProps={onIntersect:()=>{},threshold:.75,rootMargin:"0px",option:{},items:{}};const Fze=G2.BOUNDARY_MAP;class Mze extends lh{constructor(t){super(Object.assign({},t)),this.previousY=void 0,this.isScrollMode=()=>{const{renderMode:s}=this.getProps();return s==="scroll"},this.getReversedItems=()=>{const{items:s}=this.getProps();return O9(s).reverse()}}getOverflowItem(){const{items:t}=this.getProps(),{visibleState:s,overflow:o}=this.getStates();if(!this.isScrollMode())return o;const i=t.map(f=>{let{key:e}=f;return!!s.get(e)}),a=i.indexOf(!0),n=i.lastIndexOf(!0),u=[];return u[0]=a>=0?t.slice(0,a):[],u[1]=n>=0?t.slice(n+1,t.length):t,u}handleIntersect(t){const s=O9(this.getState("visibleState")),o={};t.forEach(f=>{const e=ro(f,"target.dataset.scrollkey"),y=f.isIntersecting;o[e]=f,s.set(e,y)});let i=!1;for(const f of s.values())if(f){i=!0;break}const a=i,[n]=t,u=n.boundingClientRect.y;if(!a&&this.previousY!==void 0&&u!==this.previousY){this.previousY=u;return}this.previousY=u,this._adapter.updateVisibleState(s),this._adapter.notifyIntersect(o)}handleCollapseOverflow(){const{minVisibleItems:t,collapseFrom:s}=this.getProps(),{overflowWidth:o,containerWidth:i,pivot:a,overflowStatus:n}=this.getStates(),{items:u,onOverflow:f}=this.getProps();let e=o,y=0,_=!1;for(const T of this._adapter.getItemSizeMap().values()){if(e+=T,e>i){_=!0;break}if(y===u.length-1){this._adapter.updateStates({overflowStatus:"normal",pivot:u.length-1,visible:u,overflow:[]});break}y++}if(_){const T=Math.max(t,y),D=s===Fze.START,ce=D?this.getReversedItems().slice(0,T).reverse():u.slice(0,T),ge=D?this.getReversedItems().slice(T).reverse():u.slice(T);this._adapter.updateStates({overflowStatus:"overflowed",pivot:T,visible:ce,overflow:ge}),a!==T&&f(ge);return}}}const Uze=Mze,KN=Pze.PREFIX,WM=G2.BOUNDARY_MAP,PJ=G2.OVERFLOW_DIR,zN=G2.MODE_MAP;class jV extends Uc{constructor(t){var s;super(t),s=this,this.scroller=null,this.spacer=null,this.isScrollMode=()=>{const{renderMode:o}=this.props;return o===zN.SCROLL},this.resize=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];var i;const a=(i=o[0])===null||i===void 0?void 0:i.target.clientWidth;s.setState({containerWidth:a,overflowStatus:"calculating"})},this.reintersect=o=>{this.foundation.handleIntersect(o)},this.mergeRef=(o,i,a)=>{this.itemRefs[a]=i,typeof o=="function"?o(i):typeof o=="object"&&o&&"current"in o&&(o.current=i)},this.renderOverflow=()=>{const o=this.foundation.getOverflowItem();return this.props.overflowRenderer(o)},this.getItemKey=(o,i)=>{const{itemKey:a}=this.props;return Mc(a)?a(o):ro(o,a||"key",i)},this.renderItemList=()=>{const{className:o,wrapperClassName:i,wrapperStyle:a,style:n,visibleItemRenderer:u,renderMode:f,collapseFrom:e}=this.props,{visible:y,overflowStatus:_}=this.state;let T=this.renderOverflow();if(!this.isScrollMode()&&(Array.isArray(T)&&(T=ct.createElement(ct.Fragment,null,T)),ct.isValidElement(T))){const ge=ct.cloneElement(T);T=ct.createElement(hL,{onResize:Ee=>{let[_e]=Ee;this.setState({overflowWidth:_e.target.clientWidth,overflowStatus:"calculating"})}},ct.createElement("div",{className:`${KN}-overflow`},ge))}const D=f===zN.SCROLL?[T[0],ct.createElement("div",{className:ds(i,`${KN}-scroll-wrapper`),ref:ge=>{this.scroller=ge},style:Object.assign({},a),key:`${KN}-scroll-wrapper`},y.map(u).map(ge=>{const{forwardRef:Ee,key:_e}=ge;return ct.cloneElement(ge,{ref:Be=>this.mergeRef(Ee,Be,_e),"data-scrollkey":`${_e}`,key:_e})})),T[1]]:[e===WM.START?T:null,y.map((ge,Ee)=>{const{key:_e}=ge,Be=u(ge,Ee),He=ct.cloneElement(Be);return ct.createElement(hL,{key:_e??Ee,onResize:at=>{let[st]=at;return this.onItemResize(st,ge,Ee)}},ct.createElement("div",{key:_e??Ee,className:`${KN}-item`},He))}),e===WM.END?T:null];return ct.createElement("div",{className:ds(`${KN}`,o),style:Object.assign(Object.assign({},n),f===zN.COLLAPSE?{maxWidth:"100%",visibility:_==="calculating"?"hidden":"visible"}:null)},...D)},this.onItemResize=(o,i,a)=>{const n=this.getItemKey(i,a),u=this.itemSizeMap.get(n);u?u!==o.target.clientWidth&&(this.itemSizeMap.set(n,o.target.clientWidth),this.setState({overflowStatus:"calculating"})):this.itemSizeMap.set(n,o.target.clientWidth);const{maxCount:f}=this.state;this.itemSizeMap.size===f&&this.setState({overflowStatus:"calculating"})},this.state={direction:PJ.GROW,lastOverflowCount:0,overflow:[],visible:[],containerWidth:0,visibleState:new Map,itemSizeMap:new Map,overflowStatus:"calculating",pivot:-1,overflowWidth:0,maxCount:0},this.foundation=new Uze(this.adapter),this.previousWidths=new Map,this.itemRefs={},this.itemSizeMap=new Map}static getDerivedStateFromProps(t,s){const{prevProps:o}=s,i={};i.prevProps=t;const a=n=>!o&&n in t||o&&!_0(o[n],t[n]);if(a("items")||a("style")){if(i.direction=PJ.GROW,i.lastOverflowCount=0,i.maxCount=0,t.renderMode===zN.SCROLL)i.visible=t.items,i.overflow=[];else{let n=t.items.length;Math.floor(s.containerWidth/kJ.MINIMUM_HTML_ELEMENT_WIDTH)!==0&&(n=Math.min(n,Math.floor(s.containerWidth/kJ.MINIMUM_HTML_ELEMENT_WIDTH)));const u=t.collapseFrom===WM.START,f=u?Py(t.items).reverse().slice(0,n):t.items.slice(0,n),e=u?Py(t.items).reverse().slice(n):t.items.slice(n);i.visible=f,i.overflow=e,i.maxCount=n}i.pivot=-1,i.overflowStatus="calculating"}return i}get adapter(){return Object.assign(Object.assign({},super.adapter),{updateVisibleState:t=>{this.setState({visibleState:t})},updateStates:t=>{this.setState(Object.assign({},t))},notifyIntersect:t=>{this.props.onIntersect&&this.props.onIntersect(t)},getItemSizeMap:()=>this.itemSizeMap})}componentDidUpdate(t,s){const o=t.items.map(e=>e.key),i=this.props.items.map(e=>e.key);_0(o,i)||(this.itemRefs={},this.setState({visibleState:new Map}));const{overflow:a,containerWidth:n,visible:u,overflowStatus:f}=this.state;this.isScrollMode()||f!=="calculating"||this.foundation.handleCollapseOverflow()}render(){const t=this.renderItemList(),{renderMode:s}=this.props;return s===zN.SCROLL?ct.createElement($V,{onIntersect:this.reintersect,root:this.scroller,threshold:this.props.threshold,items:this.itemRefs},t):ct.createElement(hL,{onResize:this.resize},t)}}jV.defaultProps={collapseFrom:"end",minVisibleItems:0,overflowRenderer:()=>null,renderMode:"collapse",threshold:.75,visibleItemRenderer:()=>null,onOverflow:()=>null};jV.propTypes={className:be.string,collapseFrom:be.oneOf(G2.BOUNDARY_SET),direction:be.oneOf(G2.POSITION_SET),items:be.array,minVisibleItems:be.number,onIntersect:be.func,onOverflow:be.func,overflowRenderer:be.func,renderMode:be.oneOf(G2.MODE_SET),style:be.object,threshold:be.number,visibleItemRenderer:be.func,wrapperClassName:be.string,wrapperStyle:be.object};const Kde=jV,$ze={PREFIX:`${fi}-page`},HV={PAGE_SHOW_MAX:7,REST_PAGE_SHOW_MAX:5,DEFAULT_PAGE_SIZE:10,PAGE_SIZE_OPTION:[10,20,40,100],REST_PAGE_MAX_SIZE:1e6};class jze extends lh{constructor(t){super(Object.assign({},t))}init(){const{currentPage:t,total:s,pageSize:o}=this.getStates();this._updateDisabled({currentPage:t,total:s,pageSize:o}),this._updatePageList({currentPage:t,total:s,pageSize:o}),this._registerEventHandler()}destroy(){this._unregisterEventHandler()}_registerEventHandler(){this._adapter.registerKeyDownHandler(this.handleKeyDown)}_unregisterEventHandler(){this._adapter.unregisterKeyDownHandler(this.handleKeyDown)}_updateDisabled(t){const{currentPage:s,total:o,pageSize:i}=t,a=this._getTotalPageNumber(o,i);let n=!1,u=!1;s===1?(n=!0,u=a<2):s===a&&(n=!1,u=!0),this._adapter.setDisabled(n,u)}goPage(t){if(t==="...")return;const{pageSize:s,currentPage:o}=this.getStates(),i=this._isInProps("currentPage");t!==o&&(i?(this._adapter.notifyPageChange(t),this._adapter.notifyChange(t,s)):(this.updatePage(t),this._adapter.notifyPageChange(t),this._adapter.notifyChange(t,s)))}updatePage(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1,s=arguments.length>1?arguments[1]:void 0,o=arguments.length>2?arguments[2]:void 0;(s===null||typeof s>"u")&&(s=this.getState("total")),(o===null||typeof o>"u")&&(o=this.getState("pageSize")),this._updateDisabled({currentPage:t,total:s,pageSize:o}),this._updatePageList({currentPage:t,total:s,pageSize:o}),this._adapter.updateTotal(s),this._adapter.setCurrentPage(t),this._adapter.updatePageSize(o)}updateAllPageNumbers(t,s){const{size:o,hoverShowPageSelect:i,disabled:a}=this.getProps();if(!(o!=="small"||!i||a)){const n=Array.from({length:Math.ceil(t/s)},(u,f)=>f+1);this._adapter.updateAllPageNumbers(n)}}goPrev(){const{currentPage:t}=this.getStates();t>1&&this.goPage(t-1)}goNext(){const{currentPage:t,total:s,pageSize:o}=this.getStates(),i=this._getTotalPageNumber(s,o);t<=i-1&&this.goPage(t+1)}_updatePageList(t){const{currentPage:s,total:o,pageSize:i}=t;let a=[],n=[],u=[];const f=this._getTotalPageNumber(o,i),{PAGE_SHOW_MAX:e,REST_PAGE_MAX_SIZE:y}=HV;if(f<=e)a=Array.from({length:f},(_,T)=>T+1),n=[],u=[];else switch(!0){case s<4:a=[1,2,3,4,"...",f-1,f],u=Array.from({length:Math.min(f-6,y)},(D,ce)=>ce+5),n=[];break;case s===4:a=[1,2,3,4,5,"...",f],u=Array.from({length:Math.min(f-6,y)},(D,ce)=>ce+6),n=[];break;case(4s+(ce-1));a=[1].concat("...",_,"...",f),u=Array.from({length:Math.min(f-s-2,y)},(D,ce)=>s+ce+2),n=Array.from({length:Math.min(s-3,y)},(D,ce)=>ce+2);break;case(s-3<=s&&s<=f):const T=Array.from({length:5},(D,ce)=>f-(4-ce));a=[1,"..."].concat(T),u=[],n=Array.from({length:Math.min(T[0]-2,y)},(D,ce)=>ce+2);break}this._adapter.setPageList({pageList:a,restLeftPageList:n,restRightPageList:u})}changePageSize(t){const{pageSize:s}=this.getStates();this._adapter.updatePageSize(t),this._adapter.notifyPageSizeChange(t);const{total:o,currentPage:i}=this.getStates(),a=(i-1)*s+1,n=Math.ceil(a/t);this.updatePage(n,o,t),i!==n&&this._adapter.notifyPageChange(n),this._adapter.notifyChange(n,t)}handleKeyDown(){}pageSizeInOpts(){const{pageSizeOpts:t}=this.getProps(),{pageSize:s}=this.getStates(),o=[...t];if(o.indexOf(s)===-1){const i=o.findIndex(a=>a>s);o.splice(i,0,s)}return o}handleQuickJumpNumberChange(t){this._adapter.updateQuickJumpPage(t)}_handleQuickJump(t){let s=Number(t);const{pageSize:o,total:i}=this.getStates(),a=this._getTotalPageNumber(i,o);Number.isNaN(s)||(s>a&&(s=a),s<=0&&(s=1),this._adapter.updateQuickJumpPage(""),this.goPage(s))}handleQuickJumpBlur(){const{quickJumpPage:t}=this.getStates();(typeof t=="string"&&t||typeof t=="number")&&this._handleQuickJump(t)}handleQuickJumpEnterPress(t){this._handleQuickJump(t)}_getTotalPageNumber(t,s){return Math.ceil(t/s)}}const Hze=jze;var DJ=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);io?n[1]:n[1].value)}catch{s=[]}break;case(i&&!t.size):s=[];break;case(!i&&!!t.size):try{s=o?[...t][0][1]:[...t][0][1].value}catch{}break;case(!i&&!t.size):break}const a=this._adapter.getOptionsFromChildren();this._update(s,a)}handleValueChange(t){const{allowCreate:s,autoClearSearchValue:o,remote:i}=this.getProps(),{inputValue:a}=this.getStates();let n;s&&this._isControlledComponent()?(n=this.getState("options"),n.forEach(u=>u._show=!0)):n=this._adapter.getOptionsFromChildren(),this._adapter.rePositionDropdown(),this._isFilterable()&&!o&&a&&!i&&(n=this._filterOption(n,a)),this._update(t,n)}_update(t,s){let o;this._isMultiple()?(o=this._updateMultiple(t,s),this.updateOverflowItemCount(o.size)):o=this._updateSingle(t,s),this._adapter.updateSelection(o),this.updateOptionsActiveStatus(o,s)}_updateSingle(t,s){const o=new Map,{onChangeWithObject:i}=this.getProps(),a=i&&typeof t<"u"?t.value:t,n=s.filter(f=>f.value===a),u=!n.length&&typeof a<"u"&&a!==null;if(n.length){const f=n[0],e=Object.assign({},f);o.set(e.label,e)}else if(u){let f={value:t,label:t,_notExist:!0,_scrollIndex:-1};i&&(f=Object.assign(Object.assign({},t),{_notExist:!0,_scrollIndex:-1})),o.set(f.label,f)}return o}_updateMultiple(t,s){const o=this.getState("selections");let i=[];const a=Array.isArray(t);this.checkMultipleProps(),o.size&&(i=[...o].map(e=>e[1]));const n=new Map;let u=t;const{onChangeWithObject:f}=this.getProps();return f&&a&&(u=t.map(e=>e.value)),a&&u.length&&u.forEach((e,y)=>{const _=s.findIndex(T=>T.value===e);if(_!==-1)n.set(s[_].label,s[_]);else{const T=i.findIndex(D=>D.value===e);if(T!==-1){const D=i[T];n.set(D.label,D)}else{let D={value:e,label:e,_notExist:!0};f&&(D=Object.assign(Object.assign({},t[y]),{_notExist:!0})),n.set(D.label,Object.assign(Object.assign({},D),{_scrollIndex:-1}))}}}),n}_isMultiple(){return this.getProp("multiple")}_isDisabled(){return this.getProp("disabled")}_isFilterable(){return!!this.getProp("filter")}handleClick(t){const{clickToHide:s}=this.getProps(),{isOpen:o}=this.getStates();this._isDisabled()||(o?o&&s?this.close(t):o&&!s&&this.focusInput():(this.open(),this._notifyFocus(t)))}open(t,s){const o=this._isFilterable(),i=s||this.getState("options");if(o){const a="",n=this._filterOption(i,a).filter(u=>!u._inputCreateOnly);this._adapter.updateOptions(n),this.toggle2SearchInput(!0)}else this._adapter.updateFocusState(!0);this._adapter.openMenu(),this._setDropdownWidth(),this._adapter.notifyDropdownVisibleChange(!0),this.bindKeyBoardEvent(),this._adapter.registerClickOutsideHandler(a=>{this.close(a),this._notifyBlur(a),this._adapter.updateFocusState(!1)})}toggle2SearchInput(t){t?this._adapter.toggleInputShow(t,()=>this.focusInput()):this._adapter.toggleInputShow(t,()=>{})}close(t,s){this._adapter.closeMenu(),this._adapter.notifyDropdownVisibleChange(!1),this._adapter.setIsFocusInContainer(!1),this._adapter.unregisterClickOutsideHandler();const o=this._isFilterable();o&&this.toggle2SearchInput(!1),this._adapter.once("popoverClose",()=>{o&&this.clearInput(t),s&&s()})}onSelect(t,s,o){if(this._isDisabled())return;t._inputCreateOnly&&this._adapter.notifyCreate(t),this._isMultiple()?this._handleMultipleSelect(t,o):(this._handleSingleSelect(t,o),this._focusTrigger()),this._adapter.updateFocusIndex(s)}_handleSingleSelect(t,s){var{value:o,label:i}=t,a=DJ(t,["value","label"]);const n=new Map().set(i,Object.assign({value:o,label:i},a));this._notifySelect(o,Object.assign({value:o,label:i},a)),this._isControlledComponent()?this.close(s,()=>{this._notifyChange(n)}):(this._adapter.updateSelection(n),this._notifyChange(n),this.close(s,()=>{this.updateOptionsActiveStatus(n)}))}_handleMultipleSelect(t,s){var{value:o,label:i}=t,a=DJ(t,["value","label"]);const n=this._adapter.getMaxLimit(),u=this._adapter.getSelections(),{autoClearSearchValue:f}=this.getProps();if(u.has(i))this._notifyDeselect(o,Object.assign({value:o,label:i},a)),u.delete(i);else if(n&&u.size===n){this._adapter.notifyMaxLimit(Object.assign({value:o,label:i},ig(a,"_scrollIndex")));return}else this._notifySelect(o,Object.assign({value:o,label:i},a)),u.set(i,Object.assign({value:o,label:i},a));if(this._isControlledComponent())this._notifyChange(u),this._isFilterable()&&(f&&this.clearInput(s),this.focusInput());else{this._adapter.updateSelection(u),this.updateOverflowItemCount(u.size),this._adapter.rePositionDropdown();let{options:e}=this.getStates();if(this._isFilterable()){if(f){this.clearInput(s);const y="";e=this._filterOption(e,y)}this.focusInput()}this.updateOptionsActiveStatus(u,e),this._notifyChange(u)}}clearSelected(){const t=new Map;this._isControlledComponent()?(this._notifyChange(t),this._adapter.notifyClear()):(this._adapter.updateSelection(t),this.updateOptionsActiveStatus(t),this._notifyChange(t),this._adapter.notifyClear());const{isOpen:s}=this.getStates();s&&this._adapter.rePositionDropdown()}updateOptionsActiveStatus(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getState("options");const{allowCreate:o}=this.getProps(),i=s.map(a=>(t.has(a.label)?(a._selected=!0,o&&delete a._inputCreateOnly):(a._inputCreateOnly&&(a._show=!1),a._selected=!1),a));this._adapter.updateOptions(i)}removeTag(t){const s=this._adapter.getSelections();s.delete(t.label),this._isControlledComponent()?(this._notifyDeselect(t.value,t),this._notifyChange(s)):(this._notifyDeselect(t.value,t),this._adapter.updateSelection(s),this.updateOverflowItemCount(s.size),this.updateOptionsActiveStatus(s),this._adapter.rePositionDropdown(),this._notifyChange(s))}clearInput(t){const{inputValue:s}=this.getStates();if(s!==""){this._adapter.updateInputValue(""),this._adapter.notifySearch("",t);const{options:o}=this.getStates(),{remote:i}=this.getProps();let a=o;i||(a=this._filterOption(o,"")),this._adapter.updateOptions(a)}}focusInput(){this._adapter.focusInput(),this._adapter.updateFocusState(!0),this._adapter.setIsFocusInContainer(!1)}handleInputChange(t,s){this._adapter.updateInputValue(t);const{options:o,isOpen:i}=this.getStates(),{allowCreate:a,remote:n}=this.getProps();let u=o;n||(u=this._filterOption(o,t)),u=this._createOptionByInput(a,u,t),this._adapter.updateOptions(u),this._adapter.notifySearch(t,s),this._isMultiple()&&this._adapter.rePositionDropdown()}_filterOption(t,s){const o=this.getProp("filter");if(o){if(typeof o=="boolean"&&o){const i=s.toLowerCase();return t.map(a=>{const n=a.label.toString().toLowerCase(),u=a._parentGroup&&a._parentGroup.label,f=n.includes(i),e=rA(u)&&u.toLowerCase().includes(i);return f||e?a._show=!0:a._show=!1,a})}else if(typeof o=="function")return t.map(i=>(o(s,i)?i._show=!0:i._show=!1,i))}else return t}_createOptionByInput(t,s,o){if(t)if(o){const i={_show:!0,_selected:!1,value:o,label:o,_inputCreateOnly:!0};let a=-1,n=-1;s.forEach((u,f)=>{!u._show&&!u._inputCreateOnly||(u.label===o&&(n=f),u._inputCreateOnly&&(a=f,u.value=o,u.label=o,u._show=!0))}),a===-1&&n===-1&&s.push(i),n!==-1&&(s=s.filter(u=>!u._inputCreateOnly))}else s=s.filter(i=>!i._inputCreateOnly);return s}bindKeyBoardEvent(){this._keydownHandler=t=>{this._handleKeyDown(t)},this._adapter.registerKeyDown(this._keydownHandler)}unBindKeyBoardEvent(){this._keydownHandler&&this._adapter.unregisterKeyDown()}_handleKeyDown(t){const s=t.keyCode,{loading:o,filter:i,multiple:a,disabled:n}=this.getProps(),{isOpen:u}=this.getStates();if(!(o||n))switch(s){case hg.UP:t.preventDefault(),this._handleArrowKeyDown(-1);break;case hg.DOWN:t.preventDefault(),this._handleArrowKeyDown(1);break;case hg.BACKSPACE:this._handleBackspaceKeyDown();break;case hg.ENTER:fb(t),this._handleEnterKeyDown(t);break;case hg.ESC:u&&this.close(t),i&&!a&&this._focusTrigger();break;case hg.TAB:this._handleTabKeyDown(t);break}}handleContainerKeyDown(t){const s=t.keyCode,{isOpen:o}=this.getStates();switch(s){case hg.TAB:o&&this._handleTabKeyDown(t);break}}_getEnableFocusIndex(t){const{focusIndex:s,options:o}=this.getStates(),i=o.filter(u=>u._show),a=i.length;let n=s+t;if(n<0&&(n=a-1),n>=a&&(n=0),t>0){let u=-1;for(let f=0;f=n));f++);n=u}else{let u=i.length;for(let f=a-1;f>=0&&(!i[f].disabled&&(u=f),!(u<=n));f--);n=u}this._adapter.updateFocusIndex(n),this._adapter.updateScrollTop(n)}_handleArrowKeyDown(t){const{isOpen:s}=this.getStates();s?this._getEnableFocusIndex(t):this.open()}_handleTabKeyDown(t){const{isOpen:s}=this.getStates();if(this._adapter.updateFocusState(!1),s){const o=this._adapter.getContainer(),i=this._adapter.getFocusableElements(o);i.length>0?t.shiftKey?this._handlePanelOpenShiftTabKeyDown(i,t):this._handlePanelOpenTabKeyDown(i,t):(this.close(t),this._notifyBlur(t))}else this._notifyBlur(t)}_handlePanelOpenTabKeyDown(t,s){const o=this._adapter.getActiveElement();this._adapter.getIsFocusInContainer()?o===t[t.length-1]&&(this._focusTrigger(),this.close(s),fb(s)):(t[0].focus(),this._adapter.setIsFocusInContainer(!0),fb(s))}_handlePanelOpenShiftTabKeyDown(t,s){const o=this._adapter.getActiveElement();this._adapter.getIsFocusInContainer()?o===t[0]&&(this._focusTrigger(),this._adapter.setIsFocusInContainer(!1),fb(s)):(this.close(s),this._notifyBlur(s))}_handleEnterKeyDown(t){const{isOpen:s,options:o,focusIndex:i}=this.getStates();if(!s)this.open();else if(i!==-1){const a=o.filter(u=>u._show),{length:n}=a;if(n<=i)return;if(a&&n){const u=a[i];if(u.disabled)return;this.onSelect(u,i,t)}}else this.close(t)}_handleBackspaceKeyDown(){if(this._isMultiple()){const t=this._adapter.getSelections(),{inputValue:s}=this.getStates(),o=t.size;if(o&&!s){const i=[...t.keys()];let a=o-1,n=i[a],u=t.get(n),f=!1;if(u.disabled&&a===0)return;for(;u.disabled&&a!==0;)a=a-1,n=i[a],u=t.get(n),a==0&&u.disabled&&(f=!0);f||this.removeTag(u)}}}_notifyChange(t){const{onChangeWithObject:s}=this.getProps(),o=this.getState("selections");let i;const a=[...t.values()],n=this._isMultiple();if(this._diffSelections(t,o,n))switch(!0){case s:this._notifyChangeWithObject(t);break;case(!s&&!n):i=a.length?a[0].value:void 0,this._adapter.notifyChange(i);break;case(!s&&n):i=a.length?a.map(f=>f.value):[],this._adapter.notifyChange(i);break}}_removeInternalKey(t){let s=Object.assign({},t);return delete s._parentGroup,delete s._show,delete s._selected,delete s._scrollIndex,delete s._keyInJsx,"_keyInOptionList"in s&&(s.key=s._keyInOptionList,delete s._keyInOptionList),s}_notifySelect(t,s){const o=this._removeInternalKey(s);this._adapter.notifySelect(t,o)}_notifyDeselect(t,s){const o=this._removeInternalKey(s);this._adapter.notifyDeselect(t,o)}_diffSelections(t,s,o){let i=!0;if(!o){const a=[...t.values()],n=[...s.values()],u=a[0]?a[0].label:a[0],f=n[0]?n[0].label:n[0];i=!_0(u,f)}return i}_notifyChangeWithObject(t){this.getState("selections");const s=[];for(const o of t.entries()){let i=Object.assign({label:o[0]},o[1]);i=this._removeInternalKey(i),s.push(i)}this._isMultiple()?this._adapter.notifyChange(s):this._adapter.notifyChange(s[0])}_notifyBlur(t){this._adapter.notifyBlur(t)}_notifyFocus(t){this._adapter.notifyFocus(t)}handleMouseEnter(t){this._adapter.updateHovering(!0),this._adapter.notifyMouseEnter(t)}handleMouseLeave(t){this._adapter.updateHovering(!1),this._adapter.notifyMouseLeave(t)}handleClearClick(t){const{filter:s}=this.getProps();s&&this.clearInput(t),this.clearSelected(),t.stopPropagation()}handleKeyPress(t){t&&t.key===tV&&this.handleClick(t)}handleClearBtnEnterPress(t){N1(t)&&this.handleClearClick(t)}handleOptionMouseEnter(t){this._adapter.updateFocusIndex(t)}handleListScroll(t){this._adapter.notifyListScroll(t)}handleTriggerFocus(t){this.bindKeyBoardEvent(),this._adapter.setIsFocusInContainer(!1)}handleTriggerBlur(t){this.getProps();const{isOpen:s,isFocus:o}=this.getStates();o&&!s&&(this._notifyBlur(t),this._adapter.updateFocusState(!1))}handleInputBlur(t){const{filter:s,autoFocus:o}=this.getProps(),i=this._isMultiple();o&&s&&!i&&this.toggle2SearchInput(!1)}selectAll(){const{options:t}=this.getStates(),{onChangeWithObject:s}=this.getProps();let o=[];if(!this._isMultiple()){console.warn(`[Semi Select]: It seems that you have called the selectAll method in the single-selection Select. + Please note that this is not a legal way to use it`);return}s?o=t:o=t.map(a=>a.value),this.handleValueChange(o),this._adapter.notifyChange(o)}checkMultipleProps(t){if(this._isMultiple()){const s=t||this.getProps(),{defaultValue:o,value:i}=s,a=i||o;!yw(a)&&!Array.isArray(a)&&Wg(!0,"[Semi Select] defaultValue/value should be array type in multiple mode")}}updateScrollTop(){this._adapter.updateScrollTop()}updateOverflowItemCount(t,s){const{maxTagCount:o,ellipsisTrigger:i}=this.getProps();i&&(s?this._adapter.updateOverflowItemCount(s):typeof o=="number"&&(t-o>0?this._adapter.updateOverflowItemCount(t-o):this._adapter.updateOverflowItemCount(0)))}updateIsFullTags(){const{isFullTags:t}=this.getStates();t||this._adapter.setState({isFullTags:!0})}handlePopoverClose(){this._adapter.emit("popoverClose")}handleSlotMouseEnter(){this._adapter.updateFocusIndex(-1)}}const QV={PREFIX:`${fi}-select`,PREFIX_OPTION:`${fi}-select-option`,PREFIX_GROUP:`${fi}-select-group`},qM={SIZE_SET:["small","large","default"],POSITION_SET:dL.POSITION_SET,MODE_SELECT:"select",MODE_AUTOCOMPLETE:"autoComplete",STATUS:x6},zde={LIST_HEIGHT:270},VN=Vfe.PREFIX,Vde=nN.TAG_SIZE,Kze=nN.AVATAR_SHAPE;class gO extends Vt.PureComponent{renderNTag(t,s){const{size:o,showPopover:i,popoverProps:a,onPlusNMouseEnter:n}=this.props;let u=ct.createElement(og,{closable:!1,size:o,color:"grey",style:{backgroundColor:"transparent"},key:"_+n",onMouseEnter:n},"+",t);return i&&(u=ct.createElement(fm,Object.assign({showArrow:!0,content:s,trigger:"hover",position:"top",autoAdjustOverflow:!0,className:`${VN}-rest-group-popover`},a,{key:"_+n_Popover"}),u)),u}renderMergeTags(t){const{maxTagCount:s,tagList:o,restCount:i}=this.props,a=i||o.length-s;let n=t;const u=t.slice(0,s),f=t.slice(s);let e=null;return a>0&&(e=this.renderNTag(a,f),u.push(e),n=u),n}renderAllTags(){const{tagList:t,size:s,mode:o,avatarShape:i,onTagClose:a}=this.props;return t.map(u=>{if(o==="custom")return u;const f=Object.assign({},u);return f.size||(f.size=s),f.avatarShape||(f.avatarShape=i),f.tagKey||(typeof f.children=="string"||typeof f.children=="number"?f.tagKey=f.children:f.tagKey=Math.random()),ct.createElement(og,Object.assign({},f,{key:f.tagKey,onClose:(e,y,_)=>{f.onClose&&f.onClose(e,y,_),a&&a(e,y,_)}}))})}render(){const{style:t,className:s,maxTagCount:o,size:i}=this.props,a=ds({[`${VN}-group`]:!0,[`${VN}-group-max`]:o,[`${VN}-group-small`]:i==="small",[`${VN}-group-large`]:i==="large"},s),n=this.renderAllTags(),u=typeof o>"u"?n:this.renderMergeTags(n);return ct.createElement("div",{style:t,className:a},u)}}gO.defaultProps={style:{},className:"",size:Vde[0],avatarShape:"square",onTagClose:()=>{},onPlusNMouseEnter:()=>{}};gO.propTypes={children:be.node,style:be.object,className:be.string,maxTagCount:be.number,restCount:be.number,tagList:be.array,size:be.oneOf(Vde),mode:be.string,onTagClose:be.func,showPopover:be.bool,popoverProps:be.object,avatarShape:be.oneOf(Kze)};var zze=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const i=r.props;if(!r||!i)return null;const a=Object.assign(Object.assign({value:i.value,label:i.label||i.children||i.value,_show:!0,_selected:!1,_scrollIndex:s},i),{_parentGroup:t});return a._keyInJsx=o||r.key,a},Vze=r=>{let t=[],s=[];const o={label:"",children:[],_show:!1};let i=ct.Children.toArray(r);i=i.filter(u=>u&&u.props);let a="",n=-1;return i.forEach(u=>{if(u.type.isSelectOption){a="option",n++;const f=FJ(u,void 0,n);o.children.push(f),s.push(f)}else if(u.type.isSelectOptionGroup){a="group";let f=u.props,{children:e}=f,y=zze(f,["children"]),_=[];Array.isArray(e)?_=e.map(ce=>ce.key):_.push(e.key),e=ct.Children.toArray(e);const T=e.map((ce,ge)=>{let Ee=ce.key;return _[ge]===null&&(Ee=u.key+""+ce.key),n++,FJ(ce,y,n,Ee)}),D=Object.assign(Object.assign({},u.props),{children:T,key:u.key});t.push(D),s=s.concat(T)}else Wg(!0,"[Semi Select] The children of `Select` should be `Select.Option` or `Select.OptionGroup`")}),a==="option"&&(t=[o]),{optionGroups:t,options:s}},Gze=r=>{let{index:t,data:s,style:o}=r;const{visibleOptions:i,renderOption:a}=s,n=i[t];return a(n,t,o)},Gde=Gze;var MJ=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ict.createElement("div",{className:at,"x-semi-prop":"emptyContent"},f||Ot.emptyText));if(typeof Ee=="function")return Ee(Object.assign({disabled:o,focused:y,selected:a,style:D,label:n,value:i,inputValue:_e,onMouseEnter:Ot=>ce(Ot),onClick:Ot=>this.onClick(Object.assign({value:i,label:n,children:s},He),Ot)},He));const vt={searchWords:_e,sourceString:s,option:{highlightClassName:`${ge}-keyword`}};return ct.createElement("div",{className:at,onClick:Ot=>{this.onClick(Object.assign({value:i,label:n,children:s},He),Ot)},onMouseEnter:Ot=>ce&&ce(Ot),role:"option",id:Be,"aria-selected":a?"true":"false","aria-disabled":o?"true":"false",style:D},_?ct.createElement("div",{className:st},ct.createElement(lO,null)):null,rA(s)?ct.createElement("div",{className:`${ge}-text`},this.renderOptionContent({children:s,config:vt,inputValue:_e,prefixCls:ge})):s)}};bF.isSelectOption=!0;bF.propTypes={children:be.node,disabled:be.bool,value:be.oneOfType([be.string,be.number]),selected:be.bool,label:be.node,empty:be.bool,emptyContent:be.node,onSelect:be.func,focused:be.bool,showTick:be.bool,className:be.string,style:be.object,onMouseEnter:be.func,prefixCls:be.string,renderOptionItem:be.func,inputValue:be.string};bF.defaultProps={prefixCls:QV.PREFIX_OPTION};const DB=bF,Wze=QV.PREFIX_GROUP;class KV extends Uc{render(){const{label:t,className:s,style:o}=this.props,i=ds(s,{[Wze]:!0});return!t&&typeof t!="number"?null:ct.createElement("div",{className:i,style:o},t)}}KV.isSelectOptionGroup=!0;KV.propTypes={children:be.oneOfType([be.array,be.node]),label:be.node,className:be.string,style:be.object};const Wde=KV;var qze=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ithis.optionContainerEl={current:s},this.handleInputChange=(s,o)=>this.foundation.handleInputChange(s,o),this.getTagItem=(s,o,i)=>{const{size:a,disabled:n}=this.props,u=s[0],{value:f}=s[1],e=s[1].disabled||n,y=(ce,ge)=>{ge&&typeof ge.preventDefault=="function"&&ge.preventDefault(),this.foundation.removeTag({label:u,value:f})},{content:_,isRenderInTag:T}=i(s[1],{index:o,disabled:e,onClose:y}),D={disabled:e,closable:!e,onClose:y};return T?ct.createElement(og,Object.assign({},D,{color:"white",size:a||"large",key:f,tabIndex:-1}),_):ct.createElement(Vt.Fragment,{key:f},_)},this.state={isOpen:!1,isFocus:!1,options:[],selections:new Map,dropdownMinWidth:null,optionKey:Yze,inputValue:"",showInput:!1,focusIndex:t.defaultActiveFirstOption?0:-1,keyboardEventSet:{},optionGroups:[],isHovering:!1,isFocusInContainer:!1,isFullTags:!1,overflowItemCount:0},this.selectOptionListID="",this.selectID="",this.virtualizeListRef=ct.createRef(),this.inputRef=ct.createRef(),this.triggerRef=ct.createRef(),this.optionsRef=ct.createRef(),this.optionContainerEl=ct.createRef(),this.clickOutsideHandler=null,this.onSelect=this.onSelect.bind(this),this.onClear=this.onClear.bind(this),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.renderOption=this.renderOption.bind(this),this.onKeyPress=this.onKeyPress.bind(this),this.eventManager=new nfe,this.foundation=new Qze(this.adapter)}get adapter(){var t=this;const s={registerKeyDown:a=>{const n={onKeyDown:a};this.setState({keyboardEventSet:n})},unregisterKeyDown:()=>{this.setState({keyboardEventSet:{}})},updateFocusIndex:a=>{this.setState({focusIndex:a})},scrollToFocusOption:()=>{}},o={updateInputValue:a=>{this.setState({inputValue:a})},toggleInputShow:(a,n)=>{this.setState({showInput:a},()=>{n()})},focusInput:()=>{const{preventScroll:a}=this.props;this.inputRef&&this.inputRef.current&&this.inputRef.current.focus({preventScroll:a})}},i={notifyMaxLimit:a=>this.props.onExceed(a),getMaxLimit:()=>this.props.max,registerClickOutsideHandler:a=>{const n=u=>{const f=this.optionsRef&&this.optionsRef.current,e=this.triggerRef&&this.triggerRef.current,y=zy.findDOMNode(f);y&&!y.contains(u.target)&&e&&!e.contains(u.target)&&a(u)};this.clickOutsideHandler=n,document.addEventListener("mousedown",n,!1)},unregisterClickOutsideHandler:()=>{this.clickOutsideHandler&&(document.removeEventListener("mousedown",this.clickOutsideHandler,!1),this.clickOutsideHandler=null)},rePositionDropdown:()=>{let{optionKey:a}=this.state;a=a+1,this.setState({optionKey:a})},notifyDeselect:(a,n)=>{delete n._parentGroup,this.props.onDeselect(a,n)}};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},super.adapter),s),o),i),{on:(a,n)=>this.eventManager.on(a,n),off:a=>this.eventManager.off(a),once:(a,n)=>this.eventManager.once(a,n),emit:a=>this.eventManager.emit(a),getOptionsFromChildren:function(){let a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.props.children,n=[],u=[];const{optionList:f}=t.props;if(f&&f.length)u=f.map((e,y)=>Object.assign({_show:!0,_selected:!1,_scrollIndex:y},e)),n[0]={children:u,label:""};else{const e=Vze(a);n=e.optionGroups,u=e.options}return t.setState({optionGroups:n}),u},updateOptions:a=>{this.setState({options:a})},openMenu:()=>{this.setState({isOpen:!0})},closeMenu:()=>{this.setState({isOpen:!1})},getTriggerWidth:()=>{const a=this.triggerRef.current;return a&&a.getBoundingClientRect().width},setOptionWrapperWidth:a=>{this.setState({dropdownMinWidth:a})},updateSelection:a=>{this.setState({selections:a})},getSelections:()=>new Map(this.state.selections),notifyChange:a=>{this.props.onChange(a)},notifySelect:(a,n)=>{delete n._parentGroup,this.props.onSelect(a,n)},notifyDropdownVisibleChange:a=>{this.props.onDropdownVisibleChange(a)},notifySearch:(a,n)=>{this.props.onSearch(a,n)},notifyCreate:a=>{this.props.onCreate(a)},notifyMouseEnter:a=>{this.props.onMouseEnter(a)},notifyMouseLeave:a=>{this.props.onMouseLeave(a)},notifyFocus:a=>{this.props.onFocus(a)},notifyBlur:a=>{this.props.onBlur(a)},notifyClear:()=>{this.props.onClear()},notifyListScroll:a=>{this.props.onListScroll(a)},updateHovering:a=>{this.setState({isHovering:a})},updateFocusState:a=>{this.setState({isFocus:a})},updateOverflowItemCount:a=>{this.setState({overflowItemCount:a})},focusTrigger:()=>{try{const{preventScroll:a}=this.props;this.triggerRef.current.focus({preventScroll:a})}catch{}},getContainer:()=>this.optionContainerEl&&this.optionContainerEl.current,getFocusableElements:a=>ife(a),getActiveElement:()=>ofe(),setIsFocusInContainer:a=>{this.setState({isFocusInContainer:a})},getIsFocusInContainer:()=>this.state.isFocusInContainer,updateScrollTop:a=>{let n=`.${Iu}-option-selected`;a!==void 0&&(n=`.${Iu}-option:nth-child(${a})`);let u=document.querySelector(`#${Iu}-${this.selectOptionListID} ${n}`);if(Array.isArray(u)&&(u=u[0]),u){const f=u.parentNode;f.scrollTop=u.offsetTop-f.offsetTop-f.clientHeight/2+u.clientHeight/2}}})}componentDidMount(){this.foundation.init(),this.selectOptionListID=NL(),this.selectID=this.props.id||NL()}componentWillUnmount(){this.foundation.destroy()}componentDidUpdate(t,s){const o=ct.Children.toArray(t.children).map(n=>n.key),i=ct.Children.toArray(this.props.children).map(n=>n.key);let a=!1;(!_0(o,i)||!_0(t.optionList,this.props.optionList))&&(a=!0,this.foundation.handleOptionListChange()),(!_0(this.props.value,t.value)||a)&&("value"in this.props?this.foundation.handleValueChange(this.props.value):this.foundation.handleOptionListChangeHadDefaultValue())}renderInput(){const{size:t,multiple:s,disabled:o,inputProps:i,filter:a}=this.props,n=ro(i,"className"),u=ds(`${Iu}-input`,{[`${Iu}-input-single`]:!s,[`${Iu}-input-multiple`]:s},n),{inputValue:f,focusIndex:e}=this.state,y=Object.assign({value:f,disabled:o,className:u,onChange:this.handleInputChange},i);let _={};return s&&(_={width:f?`${f.length*16}px`:"2px"},y.style=_),ct.createElement(Em,Object.assign({ref:this.inputRef,size:t,"aria-activedescendant":e!==-1?`${this.selectID}-option-${e}`:"",onFocus:T=>{s&&a&&this.setState({isFocus:!0}),T.stopPropagation()},onBlur:T=>this.foundation.handleInputBlur(T)},y))}close(){this.foundation.close()}open(){this.foundation.open()}clearInput(){this.foundation.clearInput()}selectAll(){this.foundation.selectAll()}deselectAll(){this.foundation.clearSelected()}focus(){this.foundation.focus()}onSelect(t,s,o){this.foundation.onSelect(t,s,o)}onClear(t){t.nativeEvent.stopImmediatePropagation(),this.foundation.handleClearClick(t)}search(t,s){this.handleInputChange(t,s)}renderEmpty(){return ct.createElement(DB,{empty:!0,emptyContent:this.props.emptyContent})}renderLoading(){const t=`${Iu}-loading-wrapper`;return ct.createElement("div",{className:t},ct.createElement(e1,null))}renderOption(t,s,o){const{focusIndex:i,inputValue:a}=this.state,{renderOptionItem:n}=this.props;let u;const f=s===i;let e=o||{};return t.style&&(e=Object.assign(Object.assign({},e),t.style)),t._inputCreateOnly?u=this.renderCreateOption(t,f,s,o):("key"in t&&(t._keyInOptionList=t.key),u=ct.createElement(DB,Object.assign({showTick:!0},t,{selected:t._selected,onSelect:(y,_)=>this.onSelect(y,s,_),focused:f,onMouseEnter:()=>this.onOptionHover(s),style:e,key:t._keyInOptionList||t._keyInJsx||t.label+t.value+s,renderOptionItem:n,inputValue:a,semiOptionId:`${this.selectID}-option-${s}`}),t.label)),u}renderCreateOption(t,s,o,i){const{renderCreateItem:a}=this.props;if(typeof a>"u")return ct.createElement(DB,Object.assign({key:t.key||t.label+t.value,onSelect:(f,e)=>this.onSelect(f,o,e),onMouseEnter:()=>this.onOptionHover(o),showTick:!0},t,{focused:s,style:i}),ct.createElement(Bm,{componentName:"Select"},f=>ct.createElement(ct.Fragment,null,ct.createElement("span",{className:`${Iu}-create-tips`},f.createText),t.value)));const n=a(t.value,s,i);return ct.createElement("div",{role:"button","aria-label":"Use the input box to create an optional item",onClick:u=>this.onSelect(t,o,u),key:t.key||t.label},n)}onOptionHover(t){this.foundation.handleOptionMouseEnter(t)}renderWithGroup(t){const s=[],o=new Map;return t.forEach((i,a)=>{const n=i._parentGroup,u=this.renderOption(i,a);if(n&&!o.has(n.label)){const f=ct.createElement(Wde,Object.assign({},n,{key:n.label}));o.set(n.label,!0),s.push(f)}s.push(u)}),s}renderVirtualizeList(t){const{virtualize:s}=this.props,{direction:o}=this.context,{height:i,width:a,itemSize:n}=s;return ct.createElement(SV,{ref:this.virtualizeListRef,height:i||zde.LIST_HEIGHT,itemCount:t.length,itemSize:n,itemData:{visibleOptions:t,renderOption:this.renderOption},width:a||"100%",style:{direction:o}},Gde)}renderOptions(t){const{dropdownMinWidth:s,options:o,selections:i}=this.state,{maxHeight:a,dropdownClassName:n,dropdownStyle:u,outerTopSlot:f,innerTopSlot:e,outerBottomSlot:y,innerBottomSlot:_,loading:T,virtualize:D,multiple:ce,emptyContent:ge}=this.props,Ee=o.filter(st=>st._show);let _e=this.renderWithGroup(Ee);D&&(_e=this.renderVirtualizeList(Ee));const Be=Object.assign({minWidth:s},u),He=ds({[`${Iu}-option-list`]:!0,[`${Iu}-option-list-chosen`]:i.size}),at=!o.length||!o.some(st=>st._show);return ct.createElement("div",{id:`${Iu}-${this.selectOptionListID}`,className:ds({[`${Iu}-option-list-wrapper`]:!(at&&ge===null)},n),style:Be,ref:this.setOptionContainerEl,onKeyDown:st=>this.foundation.handleContainerKeyDown(st)},f?ct.createElement("div",{className:`${Iu}-option-list-outer-top-slot`,onMouseEnter:()=>this.foundation.handleSlotMouseEnter()},f):null,ct.createElement("div",{style:{maxHeight:`${a}px`},className:He,role:"listbox","aria-multiselectable":ce,onScroll:st=>this.foundation.handleListScroll(st)},e?ct.createElement("div",{className:`${Iu}-option-list-inner-top-slot`,onMouseEnter:()=>this.foundation.handleSlotMouseEnter()},e):null,T?this.renderLoading():at?this.renderEmpty():_e,_?ct.createElement("div",{className:`${Iu}-option-list-inner-bottom-slot`,onMouseEnter:()=>this.foundation.handleSlotMouseEnter()},_):null),y?ct.createElement("div",{className:`${Iu}-option-list-outer-bottom-slot`,onMouseEnter:()=>this.foundation.handleSlotMouseEnter()},y):null)}renderSingleSelection(t,s){let{renderSelectedItem:o}=this.props;const{placeholder:i}=this.props,{showInput:a,inputValue:n}=this.state;let u="";const f=[...t];if(typeof o>"u"&&(o=_=>_.label),f.length){const _=f[0][1];u=o(_)}const e=ds({[`${Iu}-selection-text`]:!0,[`${Iu}-selection-placeholder`]:!u&&u!==0,[`${Iu}-selection-text-hide`]:n&&a,[`${Iu}-selection-text-inactive`]:!n&&a}),y=`${Iu}-content-wrapper`;return ct.createElement(ct.Fragment,null,ct.createElement("div",{className:y},ct.createElement("span",{className:e,"x-semi-prop":"placeholder"},u||u===0?u:i),s&&a?this.renderInput():null))}renderTag(t,s,o){const{size:i,disabled:a}=this.props;let{renderSelectedItem:n}=this.props;const u=t[0],{value:f}=t[1],e=t[1].disabled||a,y=(ge,Ee)=>{Ee&&typeof Ee.preventDefault=="function"&&Ee.preventDefault(),this.foundation.removeTag({label:u,value:f})};typeof n>"u"&&(n=ge=>({isRenderInTag:!0,content:ge.label}));const{content:_,isRenderInTag:T}=n(t[1],{index:s,disabled:e,onClose:y}),D={disabled:e,closable:!e,onClose:y},ce=o&&!Mc(this.props.renderSelectedItem)?ct.createElement(z6,{size:"small",ellipsis:{rows:1,showTooltip:{type:"popover",opts:{style:{width:"auto",fontSize:12}}}}},_):_;return T?ct.createElement(og,Object.assign({},D,{color:"white",size:i||"large",key:f,style:{maxWidth:"100%"}}),ce):ct.createElement(Vt.Fragment,{key:f},ce)}renderNTag(t,s){const{size:o,showRestTagsPopover:i,restTagsPopoverProps:a}=this.props;let n=ct.createElement(og,{closable:!1,size:o||"large",color:"grey",className:`${Iu}-content-wrapper-collapse-tag`,key:`_+${t}`,style:{marginRight:0,flexShrink:0}},"+",t);return i&&(n=ct.createElement(fm,Object.assign({showArrow:!0,content:ct.createElement(Pfe,{spacing:2,wrap:!0,style:{maxWidth:"400px"}},s.map((u,f)=>this.renderTag(u,f))),trigger:"hover",position:"top",autoAdjustOverflow:!0},a,{key:`_+${t}_Popover`}),n)),n}renderOverflow(t,s){return t.length&&t[0]?this.renderTag(t[0],s,!0):null}handleOverflow(t){const{overflowItemCount:s,selections:o}=this.state,{maxTagCount:i}=this.props,a=o.size-i>0?o.size-i+t.length-1:t.length-1;s!==a&&this.foundation.updateOverflowItemCount(o.size,a)}renderCollapsedTags(t,s){const{overflowItemCount:o}=this.state,i=typeof s=="number"?t.slice(0,s):t;return ct.createElement("div",{className:`${Iu}-content-wrapper-collapse`},ct.createElement(Kde,{items:i,key:String(t.length),overflowRenderer:a=>this.renderOverflow(a,s-1),onOverflow:a=>this.handleOverflow(a),visibleItemRenderer:(a,n)=>this.renderTag(a,n)}),o>0&&this.renderNTag(o,t.slice(t.length-o)))}renderOneLineTags(t,s){let{renderSelectedItem:o}=this.props;const{showRestTagsPopover:i,restTagsPopoverProps:a,maxTagCount:n}=this.props,{isFullTags:u}=this.state;let f;if(typeof o>"u"&&(o=e=>({isRenderInTag:!0,content:e.label})),i){const y=(u?t:t.slice(0,n)).map((_,T)=>this.getTagItem(_,T,o));f=ct.createElement(gO,{tagList:y,maxTagCount:s,restCount:u?void 0:t.length-n,size:"large",mode:"custom",showPopover:i,popoverProps:a,onPlusNMouseEnter:()=>{this.foundation.updateIsFullTags()}})}else{const y=t.slice(0,n).map((_,T)=>this.getTagItem(_,T,o));f=ct.createElement(gO,{tagList:y,maxTagCount:s,restCount:t.length-n,size:"large",mode:"custom"})}return f}renderMultipleSelection(t,s){this.props;const{placeholder:o,maxTagCount:i,expandRestTagsOnClick:a,ellipsisTrigger:n}=this.props,{inputValue:u,isOpen:f}=this.state,e=[...t],y=ds({[`${Iu}-content-wrapper`]:!0,[`${Iu}-content-wrapper-one-line`]:i&&!f,[`${Iu}-content-wrapper-empty`]:!e.length}),_=ds({[`${Iu}-selection-text`]:!0,[`${Iu}-selection-placeholder`]:!e.length,[`${Iu}-selection-text-hide`]:e&&e.length}),T=o&&!u?ct.createElement("span",{className:_},o):null,D=e.length>i?i:void 0,ce=!i,ge=n?this.renderCollapsedTags(e,D):this.renderOneLineTags(e,D),Ee=ce||a&&f?e.map((_e,Be)=>this.renderTag(_e,Be)):ge;return ct.createElement(ct.Fragment,null,ct.createElement("div",{className:y},e&&e.length?Ee:T,s?this.renderInput():null))}onMouseEnter(t){this.foundation.handleMouseEnter(t)}onMouseLeave(t){this.foundation.handleMouseLeave(t)}onKeyPress(t){this.foundation.handleKeyPress(t)}handlePopoverVisibleChange(t){const{virtualize:s}=this.props,{selections:o}=this.state;if(t)if(s){let i=-1;if(o.forEach(a=>{const n=ro(a,"_scrollIndex");mg(n)&&n>=0&&(i=i!==-1&&ithis.foundation.removeTag(br),onClear:this.onClear,disabled:s,triggerRender:ge,placeholder:ce,componentName:"Select",componentProps:Object.assign({},this.props)}):[ct.createElement(Vt.Fragment,{key:"prefix"},T||D?this.renderPrefix():null),ct.createElement(Vt.Fragment,{key:"selection"},ct.createElement("div",{className:ds(`${Iu}-selection`)},o?this.renderMultipleSelection(at,$n):this.renderSingleSelection(at,$n))),ct.createElement(Vt.Fragment,{key:"clearicon"},Nr?ct.createElement("div",{className:ds(`${Iu}-clear`),onClick:this.onClear},Dr):Cr),ct.createElement(Vt.Fragment,{key:"suffix"},_?this.renderSuffix():null)],_r=s||$n&&Bn||$n&&o?-1:0;return ct.createElement("div",Object.assign({role:"combobox","aria-disabled":s,"aria-expanded":st,"aria-controls":`${Iu}-${this.selectOptionListID}`,"aria-haspopup":"listbox","aria-label":at.size?"selected":"","aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"],"aria-required":this.props["aria-required"],className:_n,ref:br=>this.triggerRef.current=br,onClick:br=>this.foundation.handleClick(br),style:a,id:this.selectID,tabIndex:_r,"aria-activedescendant":fn!==-1?`${this.selectID}-option-${fn}`:"",onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave,onFocus:br=>this.foundation.handleTriggerFocus(br),onBlur:br=>this.foundation.handleTriggerBlur(br),onKeyPress:this.onKeyPress},vt,this.getDataAttr(He)),fr)}render(){const{direction:t}=this.context,s=t==="rtl"?"bottomRight":"bottomLeft",{children:o,position:i=s,zIndex:a,getPopupContainer:n,motion:u,autoAdjustOverflow:f,mouseLeaveDelay:e,mouseEnterDelay:y,spacing:_,stopPropagation:T,dropdownMargin:D}=this.props,{isOpen:ce,optionKey:ge}=this.state,Ee=this.renderOptions(o),_e=this.renderSelection();return ct.createElement(fm,{getPopupContainer:n,motion:u,margin:D,autoAdjustOverflow:f,mouseLeaveDelay:e,mouseEnterDelay:y,zIndex:a,ref:this.optionsRef,content:Ee,visible:ce,trigger:"custom",rePosKey:ge,position:i,spacing:_,stopPropagation:T,disableArrowKeyDown:!0,onVisibleChange:Be=>this.handlePopoverVisibleChange(Be),afterClose:()=>this.foundation.handlePopoverClose()},_e)}};lN.contextType=by;lN.Option=DB;lN.OptGroup=Wde;lN.propTypes={"aria-describedby":be.string,"aria-errormessage":be.string,"aria-invalid":be.bool,"aria-labelledby":be.string,"aria-required":be.bool,autoFocus:be.bool,autoClearSearchValue:be.bool,borderless:be.bool,children:be.node,clearIcon:be.node,defaultValue:be.oneOfType([be.string,be.number,be.array,be.object]),ellipsisTrigger:be.bool,value:be.oneOfType([be.string,be.number,be.array,be.object]),placeholder:be.node,onChange:be.func,multiple:be.bool,filter:be.oneOfType([be.func,be.bool]),max:be.number,maxTagCount:be.number,maxHeight:be.oneOfType([be.string,be.number]),style:be.object,className:be.string,size:be.oneOf(qM.SIZE_SET),disabled:be.bool,emptyContent:be.node,expandRestTagsOnClick:be.bool,onDropdownVisibleChange:be.func,zIndex:be.number,position:be.oneOf(qM.POSITION_SET),onSearch:be.func,getPopupContainer:be.func,dropdownClassName:be.string,dropdownStyle:be.object,dropdownMargin:be.oneOfType([be.number,be.object]),outerTopSlot:be.node,innerTopSlot:be.node,inputProps:be.object,outerBottomSlot:be.node,innerBottomSlot:be.node,optionList:be.array,dropdownMatchSelectWidth:be.bool,loading:be.bool,defaultOpen:be.bool,validateStatus:be.oneOf(qM.STATUS),defaultActiveFirstOption:be.bool,triggerRender:be.func,stopPropagation:be.bool,motion:be.bool,onChangeWithObject:be.bool,suffix:be.node,prefix:be.node,insetLabel:be.node,insetLabelId:be.string,showClear:be.bool,showArrow:be.bool,renderSelectedItem:be.func,allowCreate:be.bool,renderCreateItem:be.func,onMouseEnter:be.func,onMouseLeave:be.func,clickToHide:be.bool,onExceed:be.func,onCreate:be.func,remote:be.bool,onDeselect:be.func,onSelect:be.func,autoAdjustOverflow:be.bool,mouseEnterDelay:be.number,mouseLeaveDelay:be.number,spacing:be.oneOfType([be.number,be.object]),onBlur:be.func,onFocus:be.func,onClear:be.func,virtualize:be.object,renderOptionItem:be.func,onListScroll:be.func,arrowIcon:be.node,preventScroll:be.bool};lN.defaultProps={stopPropagation:!0,motion:!0,borderless:!1,zIndex:Sw.DEFAULT_Z_INDEX,filter:!1,multiple:!1,disabled:!1,defaultOpen:!1,allowCreate:!1,placeholder:"",onDropdownVisibleChange:so,onChangeWithObject:!1,onChange:so,onSearch:so,onMouseEnter:so,onMouseLeave:so,onDeselect:so,onSelect:so,onCreate:so,onExceed:so,onFocus:so,onBlur:so,onClear:so,onListScroll:so,maxHeight:zde.LIST_HEIGHT,dropdownMatchSelectWidth:!0,defaultActiveFirstOption:!0,showArrow:!0,showClear:!1,remote:!1,autoAdjustOverflow:!0,autoClearSearchValue:!0,arrowIcon:ct.createElement(qT,{"aria-label":""}),showRestTagsPopover:!1,restTagsPopoverProps:{},expandRestTagsOnClick:!1,ellipsisTrigger:!1};const LC=lN;var UJ=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);in+1):[]},this.foundation=new Hze(this.adapter),this.renderDefaultPage=this.renderDefaultPage.bind(this),this.renderSmallPage=this.renderSmallPage.bind(this),Wg(!!(t.showSizeChanger&&t.hideOnSinglePage),"[Semi Pagination] You should not use showSizeChanger and hideOnSinglePage in ths same time. At this time, hideOnSinglePage no longer takes effect, otherwise there may be a problem that the switch entry disappears")}get adapter(){return Object.assign(Object.assign({},super.adapter),{setPageList:t=>{const{pageList:s,restLeftPageList:o,restRightPageList:i}=t;this.setState({pageList:s,restLeftPageList:o,restRightPageList:i})},setDisabled:(t,s)=>{this.setState({prevDisabled:t,nextDisabled:s})},updateTotal:t=>this.setState({total:t}),updatePageSize:t=>this.setState({pageSize:t}),updateQuickJumpPage:t=>this.setState({quickJumpPage:t}),updateAllPageNumbers:t=>this.setState({allPageNumbers:t}),setCurrentPage:t=>{this.setState({currentPage:t})},registerKeyDownHandler:t=>{document.addEventListener("keydown",t)},unregisterKeyDownHandler:t=>{document.removeEventListener("keydown",t)},notifyPageChange:t=>{this.props.onPageChange(t)},notifyPageSizeChange:t=>{this.props.onPageSizeChange(t)},notifyChange:(t,s)=>{this.props.onChange(t,s)}})}componentDidMount(){this.foundation.init()}componentWillUnmount(){this.foundation.destroy()}componentDidUpdate(t){const s={currentPage:this.props.currentPage,total:this.props.total,pageSize:this.props.pageSize};let o=!1,i=!1;t.currentPage!==this.props.currentPage&&(o=!0),t.total!==this.props.total&&(o=!0,i=!0),t.pageSize!==this.props.pageSize&&(o=!0,i=!0),o&&this.foundation.updatePage(s.currentPage,s.total,s.pageSize),i&&this.foundation.updateAllPageNumbers(s.total,s.pageSize)}renderPrevBtn(){const{prevText:t,disabled:s}=this.props,{prevDisabled:o}=this.state,i=o||s,a=ds({[`${z0}-item`]:!0,[`${z0}-prev`]:!0,[`${z0}-item-disabled`]:i});return ct.createElement("li",{role:"button","aria-disabled":!!i,"aria-label":"Previous",onClick:n=>!i&&this.foundation.goPrev(n),className:a,"x-semi-prop":"prevText"},t||ct.createElement(Xz,{size:"large"}))}renderNextBtn(){const{nextText:t,disabled:s}=this.props,{nextDisabled:o}=this.state,i=o||s,a=ds({[`${z0}-item`]:!0,[`${z0}-item-disabled`]:i,[`${z0}-next`]:!0});return ct.createElement("li",{role:"button","aria-disabled":!!i,"aria-label":"Next",onClick:n=>!i&&this.foundation.goNext(n),className:a,"x-semi-prop":"nextText"},t||ct.createElement(YT,{size:"large"}))}renderPageSizeSwitch(t){const{direction:s}=this.context,o=s==="rtl"?"bottomRight":"bottomLeft",{showSizeChanger:i,popoverPosition:a=o,disabled:n,popoverZIndex:u}=this.props,{pageSize:f}=this.state,e=ds(`${z0}-switch`);if(!i)return null;const y=this.foundation.pageSizeInOpts(),_=t.pageSize,T=y.map(D=>ct.createElement(Xze,{value:D,key:D},ct.createElement("span",null,_.replace("${pageSize}",D.toString()))));return ct.createElement("div",{className:e},ct.createElement(LC,{"aria-label":"Page size selector",disabled:n,onChange:D=>this.foundation.changePageSize(D),value:f,key:f,position:a||"bottomRight",clickToHide:!0,zIndex:u,dropdownClassName:`${z0}-select-dropdown`},T))}renderQuickJump(t){const{showQuickJumper:s,disabled:o}=this.props,{quickJumpPage:i,total:a,pageSize:n}=this.state;if(!s)return null;const f=this.foundation._getTotalPageNumber(a,n)===1||o,e=ds({[`${z0}-quickjump`]:!0,[`${z0}-quickjump-disabled`]:f});return ct.createElement("div",{className:e},ct.createElement("span",null,t.jumpTo),ct.createElement(U4,{value:i,className:`${z0}-quickjump-input-number`,hideButtons:!0,disabled:f,onBlur:y=>this.foundation.handleQuickJumpBlur(),onEnterPress:y=>this.foundation.handleQuickJumpEnterPress(y.target.value),onChange:y=>this.foundation.handleQuickJumpNumberChange(y)}),ct.createElement("span",null,t.page))}renderPageList(){const{pageList:t,currentPage:s,restLeftPageList:o,restRightPageList:i}=this.state,{popoverPosition:a,popoverZIndex:n,disabled:u}=this.props;return t.map((f,e)=>{const y=ds(`${z0}-item`,{[`${z0}-item-active`]:s===f,[`${z0}-item-all-disabled`]:u,[`${z0}-item-all-disabled-active`]:s===f&&u}),_=ct.createElement("li",{key:`${f}${e}`,onClick:()=>!u&&this.foundation.goPage(f,e),className:y,"aria-label":f==="..."?"More":`Page ${f}`,"aria-current":s===f?"page":!1},f);if(f==="..."&&!u){let T;return e<3?T=o:T=i,ct.createElement(fm,{trigger:"hover",content:this.renderRestPageList(T),key:`${f}${e}`,position:a,zIndex:n},_)}return _})}renderRestPageList(t){const{direction:s}=this.context,o=ds(`${z0}-rest-item`),i=t.length,a=f=>{const{index:e,style:y}=f,_=t[e];return ct.createElement("div",{role:"listitem",key:`${_}${e}`,className:o,onClick:()=>this.foundation.goPage(_,e),style:y,"aria-label":`${_}`},_)},n=32,u=i>=5?n*5:n*i;return ct.createElement(SV,{className:`${z0}-rest-list`,itemData:t,itemSize:n,width:78,itemCount:i,height:u,style:{direction:s}},a)}renderSmallPageSelect(t){const s=this.state.allPageNumbers,o=this.renderRestPageList(s);return ct.createElement(fm,{content:o},t)}renderSmallPage(t){const s=this.props,{className:o,style:i,hideOnSinglePage:a,hoverShowPageSelect:n,showSizeChanger:u,disabled:f}=s,e=UJ(s,["className","style","hideOnSinglePage","hoverShowPageSelect","showSizeChanger","disabled"]),y=ds(`${z0}-small`,z0,o,{[`${z0}-disabled`]:f}),{currentPage:_,total:T,pageSize:D}=this.state,ce=Math.ceil(T/D);if(ce<2&&a&&!u)return null;const ge=ds({[`${z0}-item`]:!0,[`${z0}-item-small`]:!0,[`${z0}-item-all-disabled`]:f}),Ee=ct.createElement("div",{className:ge},_,"/",ce," ");return ct.createElement("div",Object.assign({className:y,style:i},this.getDataAttr(e)),this.renderPrevBtn(),n&&!f?this.renderSmallPageSelect(Ee):Ee,this.renderNextBtn(),this.renderQuickJump(t))}renderDefaultPage(t){const{total:s,pageSize:o}=this.state,i=this.props,{showTotal:a,className:n,style:u,hideOnSinglePage:f,showSizeChanger:e,disabled:y}=i,_=UJ(i,["showTotal","className","style","hideOnSinglePage","showSizeChanger","disabled"]),T=ds(n,`${z0}`,{[`${z0}-disabled`]:y}),D=`${z0}-total`;if(Math.ceil(s/o)<2&&f&&!e)return null;const ge=Math.ceil(s/o),Ee=t.total.replace("${total}",ge.toString());return ct.createElement("ul",Object.assign({className:T,style:u},this.getDataAttr(_)),a?ct.createElement("span",{className:D},Ee):null,this.renderPrevBtn(),this.renderPageList(),this.renderNextBtn(),this.renderPageSizeSwitch(t),this.renderQuickJump(t))}render(){const{size:t}=this.props;return ct.createElement(Bm,{componentName:"Pagination"},s=>t==="small"?this.renderSmallPage(s):this.renderDefaultPage(s))}}vF.contextType=by;vF.propTypes={total:be.number,showTotal:be.bool,pageSize:be.number,pageSizeOpts:be.array,size:be.string,currentPage:be.number,defaultCurrentPage:be.number,onPageChange:be.func,onPageSizeChange:be.func,onChange:be.func,prevText:be.node,nextText:be.node,showSizeChanger:be.bool,popoverZIndex:be.number,popoverPosition:be.string,style:be.object,className:be.string,hideOnSinglePage:be.bool,hoverShowPageSelect:be.bool,showQuickJumper:be.bool,disabled:be.bool};vF.defaultProps={total:1,popoverZIndex:Sw.DEFAULT_Z_INDEX,showTotal:!1,pageSize:null,pageSizeOpts:HV.PAGE_SIZE_OPTION,defaultCurrentPage:1,size:"default",onPageChange:so,onPageSizeChange:so,onChange:so,showSizeChanger:!1,className:"",hideOnSinglePage:!1,showQuickJumper:!1,disabled:!1};const qde={PREFIX:`${fi}-popconfirm`,POPOVER:`${fi}-popconfirm-popover`},Zze={SPACING:4,DEFAULT_Z_INDEX:1030};class Jze extends lh{init(){}destroy(){}handleCancel(t){const s=this._adapter.notifyCancel(t);mO(s)?(this._adapter.updateCancelLoading(!0),s.then(o=>{this.handleVisibleChange(!1),this._adapter.updateCancelLoading(!1)},o=>{this._adapter.updateCancelLoading(!1)})):this.handleVisibleChange(!1)}handleConfirm(t){const s=this._adapter.notifyConfirm(t);mO(s)?(this._adapter.updateConfirmLoading(!0),s.then(o=>{this._adapter.updateConfirmLoading(!1),this.handleVisibleChange(!1)},o=>{this._adapter.updateConfirmLoading(!1)})):this.handleVisibleChange(!1)}handleClickOutSide(t){this._adapter.notifyClickOutSide(t)}handleVisibleChange(t){this._isControlledComponent("visible")||this._adapter.setVisible(t),t?this.handleFocusOperateButton():this._adapter.focusPrevFocusElement(),this._adapter.notifyVisibleChange(t)}handleFocusOperateButton(){const{cancelButtonProps:t,okButtonProps:s}=this._adapter.getProps();ro(t,"autoFocus")&&!ro(t,"disabled")?this._adapter.focusCancelButton():ro(s,"autoFocus")&&!ro(s,"disabled")&&this._adapter.focusOkButton()}}var eVe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ithis.foundation.handleCancel(s&&s.nativeEvent),this.handleConfirm=s=>this.foundation.handleConfirm(s&&s.nativeEvent),this.handleVisibleChange=s=>this.foundation.handleVisibleChange(s),this.handleClickOutSide=s=>this.foundation.handleClickOutSide(s),this.stopImmediatePropagation=s=>s&&s.nativeEvent&&s.nativeEvent.stopImmediatePropagation(),this.renderConfirmPopCard=s=>{let{initialFocusRef:o}=s;const{content:i,title:a,className:n,style:u,cancelType:f,icon:e,prefixCls:y,showCloseIcon:_}=this.props,{direction:T}=this.context,D=ds(y,n,{[`${y}-rtl`]:T==="rtl"}),ce=a!==null&&typeof a<"u",ge=!(i===null||typeof i>"u"),Ee=ct.isValidElement(e),_e=ds({[`${y}-body`]:!0,[`${y}-body-withIcon`]:Ee});return ct.createElement("div",{className:D,onClick:this.stopImmediatePropagation,style:u},ct.createElement("div",{className:`${y}-inner`},ct.createElement("div",{className:`${y}-header`},Ee?ct.createElement("i",{className:`${y}-header-icon`,"x-semi-prop":"icon"},e):null,ct.createElement("div",{className:`${y}-header-body`},ce?ct.createElement("div",{className:`${y}-header-title`,"x-semi-prop":"title"},a):null),_?ct.createElement(Wu,{className:`${y}-btn-close`,icon:ct.createElement(GC,null),size:"small",theme:"borderless",type:f,onClick:this.handleCancel}):null),ge?ct.createElement("div",{className:_e,"x-semi-prop":"content"},Mc(i)?i({initialFocusRef:o}):i):null,ct.createElement("div",{className:`${y}-footer`,ref:this.footerRef},this.renderControls())))},this.state={cancelLoading:!1,confirmLoading:!1,visible:t.defaultVisible||!1},this.foundation=new Jze(this.adapter),this.footerRef=ct.createRef(),this.popoverRef=ct.createRef()}static getDerivedStateFromProps(t,s){const o={},{hasOwnProperty:i}=Object.prototype;return i.call(t,"visible")&&(o.visible=t.visible),o}get adapter(){return Object.assign(Object.assign({},super.adapter),{setVisible:t=>this.setState({visible:t}),updateConfirmLoading:t=>this.setState({confirmLoading:t}),updateCancelLoading:t=>this.setState({cancelLoading:t}),notifyConfirm:t=>this.props.onConfirm(t),notifyCancel:t=>this.props.onCancel(t),notifyVisibleChange:t=>this.props.onVisibleChange(t),notifyClickOutSide:t=>this.props.onClickOutSide(t),focusCancelButton:()=>{var t,s;const o=(s=(t=this.footerRef)===null||t===void 0?void 0:t.current)===null||s===void 0?void 0:s.querySelector("[data-type=cancel]");o==null||o.focus({preventScroll:!0})},focusOkButton:()=>{var t,s;const o=(s=(t=this.footerRef)===null||t===void 0?void 0:t.current)===null||s===void 0?void 0:s.querySelector("[data-type=ok]");o==null||o.focus({preventScroll:!0})},focusPrevFocusElement:()=>{var t;(t=this.popoverRef.current)===null||t===void 0||t.focusTrigger()}})}renderControls(){const{okText:t,cancelText:s,okType:o,cancelType:i,cancelButtonProps:a,okButtonProps:n}=this.props,{cancelLoading:u,confirmLoading:f}=this.state;return ct.createElement(Bm,{componentName:"Popconfirm"},(e,y)=>ct.createElement(ct.Fragment,null,ct.createElement(Wu,Object.assign({"data-type":"cancel",type:i,onClick:this.handleCancel,loading:u},ig(a,"autoFocus")),s||ro(e,"cancel")),ct.createElement(Wu,Object.assign({"data-type":"ok",type:o,theme:"solid",onClick:this.handleConfirm,loading:f},ig(n,"autoFocus")),t||ro(e,"confirm"))))}render(){const{direction:t}=this.context,s=t==="rtl"?"bottomRight":"bottomLeft",o=this.props,{className:i,prefixCls:a,disabled:n,children:u,style:f,position:e=s}=o,y=eVe(o,["className","prefixCls","disabled","children","style","position"]);if(n)return u;const{visible:_}=this.state,T={onVisibleChange:this.handleVisibleChange,className:qde.POPOVER,onClickOutSide:this.handleClickOutSide};return this.isControlled("visible")&&(T.trigger="custom"),ct.createElement(fm,Object.assign({ref:this.popoverRef},y,{content:D=>{let{initialFocusRef:ce}=D;return this.renderConfirmPopCard({initialFocusRef:ce})},visible:_,position:e},T),u)}}yF.contextType=by;yF.propTypes={motion:be.oneOfType([be.bool,be.func,be.object]),disabled:be.bool,content:be.oneOfType([be.node,be.func]),title:be.any,prefixCls:be.string,className:be.string,style:be.object,icon:be.node,okText:be.string,okType:be.string,cancelText:be.string,cancelType:be.string,onCancel:be.func,onConfirm:be.func,onClickOutSide:be.func,onVisibleChange:be.func,visible:be.bool,defaultVisible:be.bool,okButtonProps:be.object,cancelButtonProps:be.object,stopPropagation:be.oneOfType([be.bool,be.string]),showCloseIcon:be.bool,zIndex:be.number,trigger:be.string,position:be.string};yF.defaultProps={stopPropagation:!0,trigger:"click",onVisibleChange:so,disabled:!1,icon:ct.createElement(WT,{size:"extra-large"}),okType:"primary",cancelType:"tertiary",prefixCls:qde.PREFIX,zIndex:Zze.DEFAULT_Z_INDEX,showCloseIcon:!0,onCancel:so,onConfirm:so,onClickOutSide:so};const tVe={PREFIX:`${fi}-progress`},lv={types:["line","circle"],DEFAULT_TYPE:"line",STROKE_DEFAULT:"var(--semi-color-success)",strokeLineCap:["square","round"],DEFAULT_LINECAP:"round",sizes:["default","small","large"],DEFAULT_SIZE:"default",directions:["vertical","horizontal"],DEFAULT_DIRECTION:"horizontal"};function nVe(r,t,s){try{const o=rVe(r,t,s);if(o.length!==0)return o}catch{return}}function rVe(r,t,s){if(r.sort((i,a)=>i.percent-a.percent),r[0].percent>t)return lv.STROKE_DEFAULT;const o=r[r.length-1];if(o.percenta.percent)continue;const n=r[i-1];return s?sVe({startColor:GN(n.color),endColor:GN(a.color),size:a.percent-n.percent-1},t-n.percent-1):GN(n.color)}}function sVe(r,t){const{startColor:s,endColor:o,size:i}=r,a=s.split(""),n=o.split(""),u=[parseInt(`${a[1]}${a[2]}`,16),parseInt(`${n[1]}${n[2]}`,16)],f=[parseInt(`${a[3]}${a[4]}`,16),parseInt(`${n[3]}${n[4]}`,16)],e=[parseInt(`${a[5]}${a[6]}`,16),parseInt(`${n[5]}${n[6]}`,16)],y=[parseInt(`${a[7]}${a[8]}`,16),parseInt(`${n[7]}${n[8]}`,16)],_=(u[0]-u[1])/(i+1),T=(f[0]-f[1])/(i+1),D=(e[0]-e[1])/(i+1),ce=(y[0]-y[1])/(i+1);function ge(_e){const Be=Math.round(u[0]-_*(_e+1)).toString(16),He=Math.round(f[0]-T*(_e+1)).toString(16),at=Math.round(e[0]-D*(_e+1)).toString(16),st=`${Ee(Be)}${Ee(He)}${Ee(at)}`,vt=Math.floor(ce*(_e+1)+y[1]).toString(16);return Ty.Hex(`#${st}`,vt)}function Ee(_e){return _e.length===1?`0${_e}`:_e.length===0?"00":_e}if(typeof t>"u"){const _e=[s];for(let Be=0;Bes+s).join("")),`#${r}${t||"ff"}`)},SemiDesignToken(r){if(typeof window>"u")return;const t=getComputedStyle(document.body).getPropertyValue(`--semi-${r}`);if(t==="")return;const s=`rgba(${t}, 1)`;return Ty.RgbA(s)},HslA(r){const t=Jx.hslA.exec(r),s=parseInt(t[2]),o=parseInt(t[3])/100,i=parseInt(t[4])/100,a=t[5],n=(1-Math.abs(2*i-1))*o,u=n*(1-Math.abs(s/60%2-1)),f=i-n/2;let e=0,y=0,_=0;return 0<=s&&s<60?(e=n,y=u,_=0):60<=s&&s<120?(e=u,y=n,_=0):120<=s&&s<180?(e=0,y=n,_=u):180<=s&&s<240?(e=0,y=u,_=n):240<=s&&s<300?(e=u,y=0,_=n):300<=s&&s<360&&(e=n,y=0,_=u),e=Math.round((e+f)*255).toString(16),y=Math.round((y+f)*255).toString(16),_=Math.round((_+f)*255).toString(16),Ty.utils.pAL(e,y,_,a)},RgbA(r){const t=Jx.rgbA.exec(r),s=parseInt(t[2],10).toString(16),o=parseInt(t[3],10).toString(16),i=parseInt(t[4],10).toString(16),a=t[5];return Ty.utils.pAL(s,o,i,a)},utils:{pAL(r,t,s,o){return r.length==1&&(r="0"+r),t.length==1&&(t="0"+t),s.length==1&&(s="0"+s),typeof o<"u"?(o=Math.round(parseInt(o)*255).toString(16),o.length==1&&(o="0"+o),"#"+r+t+s+o):"#"+r+t+s}}},Jx={hex:/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/,hslA:/(hsl)a?\(\s*?(\d+),?\s*?(\d+)%,?\s*?(\d+)%,?\s*?\/?(\s*?[\d.]+)?\s*?\)/,rgbA:/(rgb)a?\(\s*?(\d+),?\s*?(\d+),?\s*?(\d+),?\s*?\/?(\s*?[\d.]+)?\s*?\)/,semiDesignTokens:/(\w+)?-?(\w+)-?(\d)?/},$J={ALONG:["black","white"],SEQUENCE:["amber","blue","cyan","green","grey","indigo","light-blue","light-green","lime","orange","pink","purple","red","teal","violet","yellow"]};var jJ=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{if(this._mounted===!1)return;const o=parseInt(s.value);this.setState({percentNumber:o})}),this.animation.on("rest",()=>{this._mounted!==!1&&this.setState({percentNumber:this.props.percent})}),this.animation.start()}}componentWillUnmount(){this.animation&&this.animation.destroy(),this._mounted=!1}renderCircleProgress(){const t=this.props,{strokeLinecap:s,style:o,className:i,strokeWidth:a,format:n,size:u,stroke:f,strokeGradient:e,showInfo:y,percent:_,orbitStroke:T,id:D}=t,ce=jJ(t,["strokeLinecap","style","className","strokeWidth","format","size","stroke","strokeGradient","showInfo","percent","orbitStroke","id"]),ge=this.props["aria-label"],Ee=this.props["aria-labelledby"],_e=this.props["aria-valuetext"],{percentNumber:Be}=this.state,He={wrapper:ds(`${f1}-circle`,i),svg:ds(`${f1}-circle-ring`),circle:ds(`${f1}-circle-ring-inner`)},at=this.calcPercent(_),st=this.calcPercent(Be);let vt;this.props.width?vt=this.props.width:u===lv.DEFAULT_SIZE?vt=72:vt=24;const Ot=this.selectStroke(f,_,e),Kt=vt/2,sn=vt/2,Bn=(vt-a)/2,fn=Bn*2*Math.PI,bn=(1-at/100)*fn,$n=`${fn} ${fn}`,_n=n(st);return ct.createElement("div",Object.assign({id:D,className:He.wrapper,style:o,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":st,"aria-labelledby":Ee,"aria-label":ge,"aria-valuetext":_e},T1(ce)),ct.createElement("svg",{key:u,className:He.svg,height:vt,width:vt,"aria-hidden":!0},ct.createElement("circle",{strokeDashoffset:0,strokeWidth:a,strokeDasharray:$n,strokeLinecap:s,fill:"transparent",stroke:T,r:Bn,cx:sn,cy:Kt,"aria-hidden":!0}),ct.createElement("circle",{className:He.circle,strokeDashoffset:bn,strokeWidth:a,strokeDasharray:$n,strokeLinecap:s,fill:"transparent",stroke:Ot,r:Bn,cx:sn,cy:Kt,"aria-hidden":!0})),y&&u!=="small"?ct.createElement("span",{className:`${f1}-circle-text`},_n):null)}calcPercent(t){let s;return t>100?s=100:t<0?s=0:s=t,s}selectStroke(t,s,o){if(typeof t=="string")return t;const i=nVe(t,s,o);return typeof i<"u"?i:lv.STROKE_DEFAULT}renderLineProgress(){const t=this.props,{className:s,style:o,stroke:i,strokeGradient:a,direction:n,format:u,showInfo:f,size:e,percent:y,orbitStroke:_,id:T}=t,D=jJ(t,["className","style","stroke","strokeGradient","direction","format","showInfo","size","percent","orbitStroke","id"]),ce=this.props["aria-label"],ge=this.props["aria-labelledby"],Ee=this.props["aria-valuetext"],{percentNumber:_e}=this.state,Be=ds(f1,s,{[`${f1}-horizontal`]:n===lv.DEFAULT_DIRECTION,[`${f1}-vertical`]:n!==lv.DEFAULT_DIRECTION,[`${f1}-large`]:e==="large"}),He=ds({[`${f1}-track`]:!0}),at=ds(`${f1}-track-inner`),st=this.calcPercent(y),vt=this.calcPercent(_e),Kt={background:this.selectStroke(i,y,a)};n===lv.DEFAULT_DIRECTION?Kt.width=`${st}%`:Kt.height=`${st}%`;const sn=u(vt);return ct.createElement("div",Object.assign({id:T,className:Be,style:o,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":st,"aria-labelledby":ge,"aria-label":ce,"aria-valuetext":Ee},T1(D)),ct.createElement("div",{className:He,style:_?{backgroundColor:_}:{},"aria-hidden":!0},ct.createElement("div",{className:at,style:Kt,"aria-hidden":!0})),f?ct.createElement("div",{className:`${f1}-line-text`},sn):null)}render(){const{type:t}=this.props;return t==="line"?this.renderLineProgress():this.renderCircleProgress()}}zV.propTypes={"aria-label":be.string,"aria-labelledby":be.string,"aria-valuetext":be.string,className:be.string,direction:be.oneOf(lv.directions),format:be.oneOfType([be.func,be.node]),id:be.string,motion:be.oneOfType([be.bool,be.func,be.object]),orbitStroke:be.string,percent:be.number,scale:be.number,showInfo:be.bool,size:be.oneOf(lv.sizes),stroke:be.oneOfType([be.string,be.arrayOf(be.shape({percent:be.number,color:be.string}))]),strokeGradient:be.bool,strokeLinecap:be.oneOf(lv.strokeLineCap),strokeWidth:be.number,style:be.object,type:be.oneOf(lv.types),width:be.number};zV.defaultProps={className:"",direction:lv.DEFAULT_DIRECTION,format:r=>`${r}%`,motion:!0,orbitStroke:"var(--semi-color-fill-0)",percent:0,showInfo:!1,size:lv.DEFAULT_SIZE,stroke:lv.STROKE_DEFAULT,strokeGradient:!1,strokeLinecap:lv.DEFAULT_LINECAP,strokeWidth:4,style:{},type:lv.DEFAULT_TYPE};const HJ=zV,Yde={PREFIX:`${fi}-radio`,INNER:`${fi}-radio-inner`,TEXT:`${fi}-radio-text`,INPUT:`${fi}-radio-input`,CHECKED:`${fi}-radio-checked`,DISABLED:`${fi}-radio-disabled`,BUTTON:`${fi}-radio-button`},oVe={PREFIX:`${fi}-radioGroup`,INNER:`${fi}-radioGroup-inner`,TEXT:`${fi}-radioGroup-text`,INPUT:`${fi}-radioGroup-input`,CHECKED:`${fi}-radioGroup-checked`,DISABLED:`${fi}-radioGroup-disabled`},Jm={DIRECTION_SET:["horizontal","vertical"],DEFAULT_DIRECTION:"horizontal",MODE:["advanced",""],TYPE_DEFAULT:"default",TYPE_BUTTON:"button",TYPE_CARD:"card",TYPE_PURECARD:"pureCard",BUTTON_SIZE:["middle","small","large"]};class iVe extends lh{constructor(t){super(Object.assign({},t))}init(){const t=this._getDisplayValue();this._setValue(t)}_getDisplayValue(){const{value:t,defaultValue:s}=this.getProps();let o;return"value"in this.getProps()?o=t:"defaultValue"in this.getProps()&&(o=s),o}handleChange(t){const s=this.getProp("mode"),o=this.getState("value"),{checked:i,value:a}=t.target,n=this._adapter.isInProps("value"),u=Object.assign(Object.assign({},t),{target:Object.assign(Object.assign({},t.target),{value:a})});s==="advanced"&&!i&&(u.target.value=void 0),n||(s==="advanced"&&!i?this._setValue(void 0):this._setValue(a)),(s==="advanced"||o!==a)&&this._adapter.notifyChange(u)}handlePropValueChange(t){this._setValue(t)}_setValue(t){this._adapter.setValue(t)}destroy(){}}class aVe extends lh{constructor(){super(...arguments),this.handleFocusVisible=t=>{const{target:s}=t;try{s.matches(":focus-visible")&&this._adapter.setFocusVisible(!0)}catch{Wg(!0,"Warning: [Semi Radio] The current browser does not support the focus-visible")}},this.handleBlur=()=>{this._adapter.setFocusVisible(!1)}}init(){const{children:t,extra:s,extraId:o,addonId:i}=this._adapter.getProps();t&&!i&&this._adapter.setAddonId(),s&&!o&&this._adapter.setExtraId()}setHover(t){this._adapter.setHover(t)}setChecked(t){this._adapter.setChecked(t)}}class lVe extends lh{constructor(t){super(Object.assign({},t))}init(){const t=this._adapter.getProp("checked"),s=this._adapter.getProp("defaultChecked");this.setChecked(t||s)}setChecked(t){this._adapter.setNativeControlChecked(t)}getChecked(){return this._adapter.getProp("checked")}handleChange(t){const s="checked"in this.getProps(),{checked:o}=t.target,i=()=>{t.stopPropagation()},a=()=>{t.preventDefault()},n={target:Object.assign(Object.assign({},this.getProps()),{checked:o}),stopPropagation:i,preventDefault:a};s?this._adapter.notifyChange(n):(this.setChecked(o),this._adapter.notifyChange(n))}destroy(){}}const uVe=ct.createContext(null),VV=uVe;class wF extends Uc{constructor(t){super(t),this.state={checked:!1},this.foundation=new lVe(this.adapter),this.onChange=this.onChange.bind(this)}get adapter(){return Object.assign(Object.assign({},super.adapter),{setNativeControlChecked:t=>{this.setState({checked:t})},notifyChange:t=>{this.props.onChange(t)}})}componentDidMount(){this.foundation.init()}componentDidUpdate(t){t.checked!==this.props.checked&&this.foundation.setChecked(this.props.checked)}componentWillUnmount(){this.foundation.destroy()}blur(){this.inputEntity.blur()}focus(){const{preventScroll:t}=this.props;this.inputEntity.focus({preventScroll:t})}onChange(t){this.foundation.handleChange(t)}render(){const{disabled:t,mode:s,autoFocus:o,name:i,isButtonRadio:a,isPureCardRadioGroup:n,addonId:u,extraId:f,"aria-label":e,focusInner:y,onInputFocus:_,onInputBlur:T}=this.props,{checked:D}=this.state,ce=this.props.prefixCls||Yde.PREFIX,ge=ds({[`${ce}-inner`]:!0,[`${ce}-inner-checked`]:!!D,[`${ce}-inner-buttonRadio`]:a,[`${ce}-inner-pureCardRadio`]:n}),Ee=ds({[`${ce}-focus`]:y,[`${ce}-focus-border`]:y&&!D,[`${ce}-inner-display`]:!a});return ct.createElement("span",{className:ge},ct.createElement("input",{ref:_e=>{this.inputEntity=_e},autoFocus:o,type:s==="advanced"?"checkbox":"radio",checked:!!D,disabled:t,onChange:this.onChange,name:i,"aria-label":e,"aria-labelledby":u,"aria-describedby":f,onFocus:_,onBlur:T}),ct.createElement("span",{className:Ee},D?ct.createElement(D7e,null):null))}}wF.contextType=VV;wF.propTypes={checked:be.bool,disabled:be.bool,isButtonRadio:be.bool,onChange:be.func,mode:be.oneOf(["advanced",""]),"aria-label":be.string,focusInner:be.bool,onInputFocus:be.func,onInputBlur:be.func,preventScroll:be.bool};wF.defaultProps={onChange:so,isButtonRadio:!1};const cVe=wF;var fVe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{onChange:o}=this.props;if(this.isInGroup()){const{radioGroup:i}=this.context;i.onChange&&i.onChange(s)}!("checked"in this.props)&&this.foundation.setChecked(s.target.checked),o&&o(s)},this.handleMouseEnter=s=>{this.props.onMouseEnter(s),this.foundation.setHover(!0)},this.handleMouseLeave=s=>{this.props.onMouseLeave(s),this.foundation.setHover(!1)},this.handleFocusVisible=s=>{this.foundation.handleFocusVisible(s)},this.handleBlur=s=>{this.foundation.handleBlur()},this.state={hover:!1,addonId:t.addonId,extraId:t.extraId,checked:t.checked||t.defaultChecked||!1},this.foundation=new aVe(this.adapter),this.radioEntity=null}componentDidUpdate(t){this.props.checked!==t.checked&&(wm(this.props.checked)?this.foundation.setChecked(!1):wV(this.props.checked)&&this.foundation.setChecked(this.props.checked))}get adapter(){return Object.assign(Object.assign({},super.adapter),{setHover:t=>{this.setState({hover:t})},setAddonId:()=>{this.setState({addonId:NL({prefix:"addon"})})},setChecked:t=>{this.setState({checked:t})},setExtraId:()=>{this.setState({extraId:NL({prefix:"extra"})})},setFocusVisible:t=>{this.setState({focusVisible:t})}})}isInGroup(){return this.context&&this.context.radioGroup}focus(){this.radioEntity.focus()}blur(){this.radioEntity.blur()}render(){const t=this.props,{addonClassName:s,addonStyle:o,disabled:i,style:a,className:n,prefixCls:u,displayMode:f,children:e,extra:y,mode:_,type:T,value:D,name:ce}=t,ge=fVe(t,["addonClassName","addonStyle","disabled","style","className","prefixCls","displayMode","children","extra","mode","type","value","name"]);let Ee,_e,Be,He,at,st,vt,Ot,Kt;const{hover:sn,addonId:Bn,extraId:fn,focusVisible:bn,checked:$n}=this.state,_n={checked:$n,disabled:i};this.isInGroup()?(Ee=this.context.radioGroup.value===D,_e=i||this.context.radioGroup.disabled,Be=this.context.mode,He=this.context.radioGroup.isButtonRadio,at=this.context.radioGroup.isCardRadio,st=this.context.radioGroup.isPureCardRadio,Ot=this.context.radioGroup.buttonSize,Kt=u||this.context.radioGroup.prefixCls,_n.checked=Ee,_n.disabled=_e):(Ee=$n,_e=i,Be=_,vt=T==="button",Kt=u,He=T===Jm.TYPE_BUTTON,st=T===Jm.TYPE_PURECARD,at=T===Jm.TYPE_CARD||st);const Nr=typeof He>"u"?vt:He,Cr=Kt||Yde.PREFIX,Dr=at||st||Nr,fr=ds(Cr,{[`${Cr}-disabled`]:_e,[`${Cr}-checked`]:Ee,[`${Cr}-${f}`]:!!f,[`${Cr}-buttonRadioComponent`]:vt,[`${Cr}-buttonRadioGroup`]:He,[`${Cr}-buttonRadioGroup-${Ot}`]:He&&Ot,[`${Cr}-cardRadioGroup`]:at,[`${Cr}-cardRadioGroup_disabled`]:_e&&at,[`${Cr}-cardRadioGroup_checked`]:at&&Ee&&!_e,[`${Cr}-cardRadioGroup_checked_disabled`]:at&&Ee&&_e,[`${Cr}-cardRadioGroup_hover`]:at&&!Ee&&sn&&!_e,[n]:!!n,[`${Cr}-focus`]:bn&&(at||st)}),_r=this.isInGroup()&&this.context.radioGroup.name,br=ds({[`${Cr}-addon`]:!Nr,[`${Cr}-addon-buttonRadio`]:Nr,[`${Cr}-addon-buttonRadio-checked`]:Nr&&Ee,[`${Cr}-addon-buttonRadio-disabled`]:Nr&&_e,[`${Cr}-addon-buttonRadio-hover`]:Nr&&!Ee&&!_e&&sn,[`${Cr}-addon-buttonRadio-${Ot}`]:Nr&&Ot,[`${Cr}-focus`]:bn&&Nr},s),ss=()=>!e&&!y?null:ct.createElement("div",{className:ds([`${Cr}-content`,{[`${Cr}-isCardRadioGroup_content`]:at}])},e?ct.createElement("span",{className:br,style:o,id:Bn,"x-semi-prop":"children"},e):null,y&&!Nr?ct.createElement("div",{className:`${Cr}-extra`,id:fn,"x-semi-prop":"extra"},y):null);return ct.createElement("label",Object.assign({style:a,className:fr,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},this.getDataAttr(ge)),ct.createElement(cVe,Object.assign({},this.props,_n,{mode:Be,name:ce??_r,isButtonRadio:Nr,isPureCardRadioGroup:st,onChange:this.onChange,ref:In=>{this.radioEntity=In},addonId:e&&Bn,extraId:y&&fn,focusInner:bn&&!Dr,onInputFocus:this.handleFocusVisible,onInputBlur:this.handleBlur})),ss())}};$4.contextType=VV;$4.propTypes={autoFocus:be.bool,checked:be.bool,defaultChecked:be.bool,value:be.any,style:be.object,className:be.string,disabled:be.bool,prefixCls:be.string,displayMode:be.oneOf(["vertical",""]),onChange:be.func,onMouseEnter:be.func,onMouseLeave:be.func,mode:be.oneOf(Jm.MODE),extra:be.node,addonStyle:be.object,addonClassName:be.string,type:be.oneOf([Jm.TYPE_DEFAULT,Jm.TYPE_BUTTON,Jm.TYPE_CARD,Jm.TYPE_PURECARD]),"aria-label":be.string,preventScroll:be.bool};$4.defaultProps={autoFocus:!1,defaultChecked:!1,value:void 0,style:void 0,onMouseEnter:so,onMouseLeave:so,mode:"",type:"default"};$4.elementType="Radio";const gP=$4;var dVe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.foundation.handleChange(s)},this.getFormatName=()=>this.props.name||"default",this.state={value:t.value||t.defaultValue},this.foundation=new iVe(this.adapter)}componentDidMount(){this.foundation.init()}componentDidUpdate(t){typeof t.value=="number"&&isNaN(t.value)&&typeof this.props.value=="number"&&isNaN(this.props.value)||t.value!==this.props.value&&this.foundation.handlePropValueChange(this.props.value)}componentWillUnmount(){this.foundation.destroy()}get adapter(){return Object.assign(Object.assign({},super.adapter),{setValue:t=>{this.setState({value:t})},getProps:()=>this.props,isInProps:t=>t in this.props,notifyChange:t=>{this.props.onChange&&this.props.onChange(t)}})}render(){const t=this.props,{children:s,options:o,mode:i,prefixCls:a,className:n,style:u,direction:f,type:e,buttonSize:y,id:_}=t,T=dVe(t,["children","options","mode","prefixCls","className","style","direction","type","buttonSize","id"]),D=e===Jm.TYPE_BUTTON,ce=e===Jm.TYPE_PURECARD,ge=e===Jm.TYPE_CARD||ce,Ee=e===Jm.TYPE_DEFAULT,_e=a||oVe.PREFIX,Be=ds(n,{[_e]:!0,[`${_e}-wrapper`]:!0,[`${_e}-${f}`]:f&&!D,[`${_e}-${f}-default`]:f&&Ee,[`${_e}-${f}-card`]:f&&ge,[`${_e}-buttonRadio`]:D}),He=this.state.value;let at;return o?at=(o||[]).map((st,vt)=>typeof st=="string"?ct.createElement(gP,{key:vt,disabled:this.props.disabled,value:st},st):ct.createElement(gP,{key:vt,disabled:st.disabled||this.props.disabled,value:st.value,extra:st.extra,className:st.className,style:st.style},st.label)):s&&(at=ct.Children.map(s,(st,vt)=>ct.isValidElement(st)?ct.cloneElement(st,{key:vt}):null)),ct.createElement("div",Object.assign({className:Be,style:u,id:_,"aria-label":this.props["aria-label"],"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"],"aria-required":this.props["aria-required"]},this.getDataAttr(T)),ct.createElement(VV.Provider,{value:{radioGroup:{onChange:this.onChange,value:He,disabled:this.props.disabled,name:this.getFormatName(),isButtonRadio:D,isCardRadio:ge,isPureCardRadio:ce,buttonSize:y,prefixCls:a},mode:i}},at))}}GV.propTypes={defaultValue:be.any,disabled:be.bool,name:be.string,options:be.array,buttonSize:be.oneOf(Jm.BUTTON_SIZE),type:be.oneOf([Jm.TYPE_DEFAULT,Jm.TYPE_BUTTON,Jm.TYPE_CARD,Jm.TYPE_PURECARD]),value:be.any,onChange:be.func,children:be.node,prefixCls:be.string,className:be.string,style:be.object,direction:be.oneOf(Jm.DIRECTION_SET),mode:be.oneOf(Jm.MODE),"aria-label":be.string,"aria-describedby":be.string,"aria-errormessage":be.string,"aria-invalid":be.bool,"aria-labelledby":be.string,"aria-required":be.bool,id:be.string};GV.defaultProps={disabled:!1,onChange:so,direction:Jm.DEFAULT_DIRECTION,mode:"",type:Jm.TYPE_DEFAULT,buttonSize:"middle"};const bP=GV;class Xde extends gP{}Xde.Group=bP;const UE=Xde,Zde={PREFIX:`${fi}-sidesheet`,DIALOG:`${fi}-modal`},D9={PLACEMENT:["top","right","bottom","left"],SIZE:["small","medium","large"],WIDTH:{small:448,medium:684,large:920},HEIGHT:448};var QJ=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{t.target===t.currentTarget&&this.close(t)},this.close=t=>{const{onClose:s}=this.props;s&&s(t)}}componentDidMount(){this.sideSheetId=`sidesheet-${hVe++}`}componentWillUnmount(){clearTimeout(this.timeoutId)}getMaskElement(){var t;const{mask:s,maskStyle:o,maskClosable:i}=this.props;return s?ct.createElement("div",Object.assign({"aria-hidden":!0,key:"mask",className:ds(`${Cy}-mask`,(t=this.props.maskClassName)!==null&&t!==void 0?t:""),style:o,onClick:i?this.onMaskClick:null},this.props.maskExtraProps)):null}renderHeader(){const{title:t,closable:s,headerStyle:o,closeIcon:i}=this.props;let a,n;if(t&&(a=ct.createElement("div",{className:`${Cy}-title`,"x-semi-prop":"title"},this.props.title)),s){const u=i||ct.createElement(GC,null);n=ct.createElement(eN,{className:`${Cy}-close`,key:"close-btn",onClick:this.close,type:"tertiary",icon:u,theme:"borderless",size:"small"})}return ct.createElement("div",{className:`${Cy}-header`,role:"heading","aria-level":1,style:Object.assign({},o)},a,n)}getDialogElement(){var t;const s=QJ(this.props,[]),o={};s.width&&(o.width=s.width,s.mask||(o.width="100%")),s.height&&(o.height=s.height);const i=this.renderHeader();return ct.createElement("div",Object.assign({key:"dialog-element",role:"dialog",tabIndex:-1,className:ds(`${Cy}-inner`,`${Cy}-inner-wrap`,(t=this.props.dialogClassName)!==null&&t!==void 0?t:"",`${Cy}-size-${s.size}`),style:Object.assign(Object.assign({},s.style),o)},this.props.wrapperExtraProps),ct.createElement("div",{className:`${Cy}-content`},i,ct.createElement("div",{className:`${Cy}-body`,style:s.bodyStyle,"x-semi-prop":"children"},s.children),s.footer?ct.createElement("div",{className:`${Cy}-footer`,"x-semi-prop":"footer"},s.footer):null))}render(){const t=this.props,{mask:s,className:o,width:i,onClose:a,maskStyle:n,maskClosable:u,maskClassName:f,title:e,closable:y,headerStyle:_,height:T,style:D,size:ce,bodyStyle:ge,dialogClassName:Ee,children:_e,footer:Be,maskExtraProps:He,wrapperExtraProps:at}=t,st=QJ(t,["mask","className","width","onClose","maskStyle","maskClosable","maskClassName","title","closable","headerStyle","height","style","size","bodyStyle","dialogClassName","children","footer","maskExtraProps","wrapperExtraProps"]),vt=ds(o,{[`${Cy}-fixed`]:!s,[`${Cy}-size-${this.props.size}`]:!s}),Ot={};!s&&i&&(Ot.width=i);const Kt=T1(st);return ct.createElement("div",Object.assign({className:vt,style:Ot},Kt),this.getMaskElement(),this.getDialogElement())}}WV.propTypes={onClose:be.func,closeIcon:be.node};WV.defaultProps={onClose:so};class qV extends lh{constructor(t){super(Object.assign(Object.assign({},qV.defaultAdapter),t)),this.toggleDisplayNone=s=>{this._adapter.toggleDisplayNone(s)}}get defaultAdapter(){return{handleCancel:so,beforeShow:so,afterHide:so}}destroy(){this.afterHide()}handleCancel(t){this._adapter.notifyCancel(t)}beforeShow(){this.getProp("disableScroll")&&this._adapter.disabledBodyScroll(),this._adapter.setOnKeyDownListener()}afterHide(){this.getProp("disableScroll")&&this._adapter.enabledBodyScroll(),this._adapter.removeKeyDownListener()}handleKeyDown(t){const{closeOnEsc:s}=this.getProps();if(s&&t.keyCode===hg.ESC){t.stopPropagation(),this.handleCancel(t);return}}onVisibleChange(t){this._adapter.notifyVisibleChange(t)}}var AVe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.foundation.handleCancel(s)},this.handleKeyDown=s=>{this.foundation.handleKeyDown(s)},this.updateState=()=>{this.foundation.toggleDisplayNone(!this.props.visible)},this.state={displayNone:!this.props.visible},this.foundation=new qV(this.adapter),this.bodyOverflow="",this.scrollBarWidth=0,this.originBodyWidth="100%"}get adapter(){return Object.assign(Object.assign({},super.adapter),{disabledBodyScroll:()=>{const{getPopupContainer:t}=this.props;this.bodyOverflow=document.body.style.overflow||"",!t&&this.bodyOverflow!=="hidden"&&(document.body.style.overflow="hidden",document.body.style.width=`calc(${this.originBodyWidth||"100%"} - ${this.scrollBarWidth}px)`)},enabledBodyScroll:()=>{const{getPopupContainer:t}=this.props;!t&&this.bodyOverflow!=="hidden"&&(document.body.style.overflow=this.bodyOverflow,document.body.style.width=this.originBodyWidth)},notifyCancel:t=>{this.props.onCancel&&this.props.onCancel(t)},notifyVisibleChange:t=>{this.props.afterVisibleChange(t)},setOnKeyDownListener:()=>{window&&window.addEventListener("keydown",this.handleKeyDown)},removeKeyDownListener:()=>{window&&window.removeEventListener("keydown",this.handleKeyDown)},toggleDisplayNone:t=>{t!==this.state.displayNone&&this.setState({displayNone:t})}})}static getDerivedStateFromProps(t,s){const o={};return t.visible&&s.displayNone&&(o.displayNone=!1),!t.visible&&!t.motion&&!s.displayNone&&(o.displayNone=!0),o}componentDidMount(){this.scrollBarWidth=Wz(),this.originBodyWidth=document.body.style.width,this.props.visible&&this.foundation.beforeShow()}componentDidUpdate(t,s,o){!t.visible&&this.props.visible&&this.foundation.beforeShow(),t.visible&&!this.props.visible&&this.foundation.afterHide(),s.displayNone!==this.state.displayNone&&this.foundation.onVisibleChange(!this.state.displayNone)}componentWillUnmount(){this.props.visible&&this.foundation.destroy()}renderContent(){const t=this.props,{placement:s,className:o,children:i,width:a,height:n,motion:u,visible:f,style:e,maskStyle:y,size:_,zIndex:T,getPopupContainer:D,keepDOM:ce}=t,ge=AVe(t,["placement","className","children","width","height","motion","visible","style","maskStyle","size","zIndex","getPopupContainer","keepDOM"]),{direction:Ee}=this.context,_e=s==="left"||s==="right",Be=s==="top"||s==="bottom",He=Be?n||pVe:"100%",at=ds(Q1,o,{[`${Q1}-${s}`]:s,[`${Q1}-popup`]:D,[`${Q1}-horizontal`]:Be,[`${Q1}-rtl`]:Ee==="rtl",[`${Q1}-hidden`]:ce&&this.state.displayNone}),st=Object.assign(Object.assign(Object.assign({},_e?a?{width:a}:{}:{width:"100%"}),ge),{visible:f,motion:!1,size:_,className:at,height:He,onClose:this.handleCancel}),vt=this.props.visible||this.props.keepDOM||this.props.motion&&!this.state.displayNone;return ct.createElement(IL,{motion:this.props.motion,animationState:f?"enter":"leave",startClassName:f?`${Q1}-animation-mask_show`:`${Q1}-animation-mask_hide`,onAnimationEnd:this.updateState},Ot=>{let{animationClassName:Kt,animationEventsNeedBind:sn}=Ot;return ct.createElement(IL,{motion:this.props.motion,animationState:f?"enter":"leave",startClassName:f?`${Q1}-animation-content_show_${this.props.placement}`:`${Q1}-animation-content_hide_${this.props.placement}`,onAnimationEnd:this.updateState},Bn=>{let{animationClassName:fn,animationStyle:bn,animationEventsNeedBind:$n}=Bn;return vt?ct.createElement(WV,Object.assign({},st,{maskExtraProps:sn,wrapperExtraProps:$n,dialogClassName:fn,maskClassName:Kt,maskStyle:Object.assign({},y),style:Object.assign(Object.assign({},bn),e)}),i):ct.createElement(ct.Fragment,null)})})}render(){const{zIndex:t,getPopupContainer:s}=this.props;let o={zIndex:t};return s&&(o={zIndex:t,position:"static"}),ct.createElement(U6,{getPopupContainer:s,style:o},this.renderContent())}}uN.contextType=by;uN.propTypes={bodyStyle:be.object,headerStyle:be.object,children:be.node,className:be.string,closable:be.bool,disableScroll:be.bool,getPopupContainer:be.func,height:be.oneOfType([be.number,be.string]),mask:be.bool,maskClosable:be.bool,maskStyle:be.object,motion:be.oneOfType([be.bool,be.object,be.func]),onCancel:be.func,placement:be.oneOf(D9.PLACEMENT),size:be.oneOf(D9.SIZE),style:be.object,title:be.node,visible:be.bool,width:be.oneOfType([be.number,be.string]),zIndex:be.number,afterVisibleChange:be.func,closeOnEsc:be.bool,footer:be.node,keepDOM:be.bool,"aria-label":be.string};uN.defaultProps={visible:!1,motion:!0,mask:!0,placement:"right",closable:!0,footer:null,zIndex:1e3,maskClosable:!0,size:"small",disableScroll:!0,closeOnEsc:!1,afterVisibleChange:so,keepDOM:!1};const qv={PREFIX:`${fi}-slider`,DISABLED:`${fi}-slider-disabled`,VERTICAL:`${fi}-slider-vertical`,TRACK:`${fi}-slider-track`,DOTS:`${fi}-slider-dots`,MARKS:`${fi}-slider-marks`,HANDLE:`${fi}-slider-handle`},mVe=(r,t)=>(!globalThis.Touch||!(r instanceof Touch)||["stopPropagation","preventDefault"].forEach(o=>{let i=t[o];i&&(typeof i=="function"&&(i=function(){return t[o](...arguments)}),r[o]?Wg(!0,`"The key ${o}" exist in Touch.`):r[o]=i)}),r),KJ=mVe;class YV extends lh{constructor(t){var s;super(Object.assign(Object.assign({},YV.defaultAdapter),t)),s=this,this.getMinAndMaxPercent=o=>{const{range:i,min:a,max:n}=this._adapter.getProps(),u=i?(o[0]-a)/(n-a):(o-a)/(n-a),f=i?(o[1]-a)/(n-a):1;return{min:this._checkValidity(u),max:this._checkValidity(f)}},this._checkValidity=function(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return o>a?a:o{const{focusPos:n,currentValue:u}=this._adapter.getStates(),f={min:!1,max:!1};let e;return i?e={min:i(a?this.outPutValue(u[0]):this.outPutValue(u)),max:a?i(this.outPutValue(u[1])):null}:e={min:a?this.outPutValue(u[0]):this.outPutValue(u),max:a?this.outPutValue(u[1]):null},o?(f.min=!0,f.max=!0):typeof o>"u"&&i&&(n==="min"?f.min=!0:n==="max"&&(f.max=!0)),{tipVisible:f,tipChildren:e}},this.valueFormatIsCorrect=o=>Array.isArray(o)?typeof o[0]=="number"&&typeof o[0]=="number":typeof o=="number",this.handleMousePos=(o,i)=>{const a=this._adapter.getParentRect(),n=this._adapter.getScrollParentVal(),u=a?a.left:0,f=a?a.top:0;return{x:o-u+n.scrollLeft,y:i-f+n.scrollTop}},this.getScrollParent=o=>{const i=o,a=/(auto|scroll)/,n=(e,y)=>window.getComputedStyle(e,null).getPropertyValue(y),u=e=>a.test(n(e,"overflow")+n(e,"overflow-y")+n(e,"overflow-x")),f=e=>!e||e===document.body||!(e instanceof Element)?document.body:u(e)?e:f(e.parentNode);return f(i)},this.checkMeetMinMax=o=>{const{vertical:i,verticalReverse:a,range:n}=this._adapter.getProps(),u=this._adapter.getState("currentValue");this.transValueToPos(u);const{sliderX:f,sliderY:e,sliderWidth:y,sliderHeight:_}=this._adapter.getSliderLengths();this._adapter.getStates();const T=i?_:y;let D;i&&a?D=e+T:D=i?e:f;let ce;return i&&a?ce=e:ce=i?e+_:f+y,i&&a?o>=D?o=D:o<=ce&&(o=ce):o<=D?o=D:o>=ce&&(o=ce),o},this.transPosToValue=(o,i)=>{const a=this.checkMeetMinMax(o),{min:n,max:u,currentValue:f}=this._adapter.getStates(),{range:e,vertical:y,step:_,verticalReverse:T}=this._adapter.getProps(),{sliderX:D,sliderY:ce,sliderWidth:ge,sliderHeight:Ee}=this._adapter.getSliderLengths(),_e=y?ce:D,Be=y?Ee:ge;let He;y&&T?He=(_e+Be-a)/Be*(u-n)+n:He=(a-_e)/Be*(u-n)+n;let at;return e?at=i?f[0]:f[1]:at=f,_!==1&&(He=Math.round(He/_)*_),e&&He!==at?i?[He,f[1]]:[f[0],He]:!e&&He!==at?He:!1},this.transValueToPos=o=>{const{min:i,max:a}=this._adapter.getStates(),{vertical:n,range:u,verticalReverse:f}=this._adapter.getProps(),{sliderX:e,sliderY:y,sliderWidth:_,sliderHeight:T}=this._adapter.getSliderLengths(),D=n?y:e,ce=n?T:_;return u?[(o[0]-i)*ce/(a-i)+D,(o[1]-i)*ce/(a-i)+D]:(o-i)*ce/(a-i)+D},this.isMarkActive=o=>{const{min:i,max:a,range:n,included:u}=this._adapter.getProps(),f=this._adapter.getState("currentValue");return typeof(o/1)=="number"&&o>=i&&o<=a?n?(o>f[1]||o{const i=u=>{var f,e;return/^\d+(\.\d+)?$/.test(String(u))&&(e=(f=u.toString().split(".")[1])===null||f===void 0?void 0:f.length)!==null&&e!==void 0?e:0},a=this._adapter.getProp("step"),n=(()=>{const u=i(a),f=Math.pow(10,u);return e=>Math.round(e*f)/f})();return Array.isArray(o)?[n(o[0]),n(o[1])]:n(o)},this.handleDisabledChange=o=>{this._adapter.updateDisabled(o)},this.checkAndUpdateIsInRenderTreeState=()=>this._adapter.checkAndUpdateIsInRenderTreeState(),this.calculateOutputValue=(o,i)=>{const a=this.transPosToValue(o,i);if(a!==!1)return this.outPutValue(a)},this.handleValueChange=(o,i)=>{const{min:a,max:n}=this._adapter.getStates();let u=null;const f={};this.valueFormatIsCorrect(i)?(Array.isArray(o)&&Array.isArray(i)&&(i=[i[0]n?n:i[1]],u=Object.assign(f,{currentValue:i})),typeof o=="number"&&typeof i=="number"&&(i>n?i=n:i=i{this._adapter.onHandleDown(o);const a=this._adapter.getState("disabled"),{vertical:n}=this._adapter.getProps(),{dragging:u}=this._adapter.getOverallVars();if(a)return!1;this._adapter.setStateVal("isDrag",!0),this._adapter.setStateVal("chooseMovePos",i),i==="min"?this._adapter.setDragging([!0,u[1]]):this._adapter.setDragging([u[0],!0]);const f=this.handleMousePos(o.clientX,o.clientY);let e=n?f.y:f.x;if(!this._adapter.isEventFromHandle(o))this._dragOffset=0;else{const y=this._getHandleCenterPosition(n,o.target);this._dragOffset=e-y,e=y}return!0},this.onHandleMove=o=>{this._adapter.setEventDefault(o);const{disabled:i,chooseMovePos:a}=this._adapter.getStates(),{vertical:n}=this._adapter.getProps(),{dragging:u}=this._adapter.getOverallVars();if(i)return!1;this.onHandleEnter(a);const f=this.handleMousePos(o.clientX,o.clientY);let e=n?f.y:f.x;if(e=e-this._dragOffset,a==="min"&&u[0]||a==="max"&&u[1]){const y=this.calculateOutputValue(e,a==="min");if(y===void 0)return!1;this._adapter.notifyChange(y),this._adapter.onHandleMove(e,a==="min",void 0,!1,y)}return!0},this.onHandleTouchStart=(o,i)=>{const a=this._adapter.getMinHandleEl(),n=this._adapter.getMaxHandleEl();if(o.target===a||o.target===n){fb(o);const u=KJ(o.touches[0],o);this.onHandleDown(u,i)}},this.onHandleTouchMove=o=>{const i=this._adapter.getMinHandleEl(),a=this._adapter.getMaxHandleEl();if(o.target===i||o.target===a){const n=KJ(o.touches[0],o);this.onHandleMove(n)}},this.onHandleEnter=o=>{const{disabled:i,focusPos:a}=this._adapter.getStates();i||!a&&o!==a&&this._adapter.onHandleEnter(o)},this.onHandleLeave=()=>{!this._adapter.getState("disabled")&&this.getStates().focusPos===""&&this._adapter.onHandleLeave()},this.onHandleUp=o=>{this._adapter.onHandleUpBefore(o);const{disabled:i,chooseMovePos:a}=this._adapter.getStates(),{dragging:n}=this._adapter.getOverallVars();return i?!1:(a==="min"?this._adapter.setDragging([!1,n[1]]):this._adapter.setDragging([n[0],!1]),this._adapter.setStateVal("isDrag",!1),this._adapter.onHandleLeave(),this._adapter.onHandleUpAfter(),!0)},this._handleValueDecreaseWithKeyBoard=(o,i)=>{const{min:a,currentValue:n}=this.getStates(),{range:u}=this.getProps();if(i==="min")if(u){let f=n[0]-o;return f=f{const{max:a,currentValue:n}=this.getStates(),{range:u}=this.getProps();if(i==="min")if(u){let f=n[0]+o;return f=f>n[1]?n[1]:f,[f,n[1]]}else{let f=n+o;return f=f>a?a:f,f}else{let f=n[1]+o;return f=f>a?a:f,[n[0],f]}},this._handleHomeKey=o=>{const{min:i,currentValue:a}=this.getStates(),{range:n}=this.getProps();return o==="min"?n?[i,a[1]]:i:[a[0],a[0]]},this._handleEndKey=o=>{const{max:i,currentValue:a}=this.getStates(),{range:n}=this.getProps();return o==="min"?n?[a[1],a[1]]:i:[a[0],i]},this.handleKeyDown=(o,i)=>{const{min:a,max:n,currentValue:u}=this.getStates(),{step:f,range:e}=this.getProps();let y;switch(o.key){case"ArrowLeft":case"ArrowDown":y=this._handleValueDecreaseWithKeyBoard(f,i);break;case"ArrowRight":case"ArrowUp":y=this._handleValueIncreaseWithKeyBoard(f,i);break;case"PageUp":y=this._handleValueIncreaseWithKeyBoard(10*f,i);break;case"PageDown":y=this._handleValueDecreaseWithKeyBoard(10*f,i);break;case"Home":y=this._handleHomeKey(i);break;case"End":y=this._handleEndKey(i);break}if(["ArrowLeft","ArrowDown","ArrowRight","ArrowUp","PageUp","PageDown","Home","End"].includes(o.key)){let _=!0;Array.isArray(u)?_=!(u[0]===y[0]&&u[1]===y[1]):_=u!==y,_&&(this._adapter.updateCurrentValue(y),this._adapter.notifyChange(y)),fb(o)}},this.onFocus=(o,i)=>{fb(o);const{target:a}=o;try{a.matches(":focus-visible")&&(i==="min"?this._adapter.setStateVal("firstDotFocusVisible",!0):this._adapter.setStateVal("secondDotFocusVisible",!0))}catch{Wg(!0,"Warning: [Semi Slider] The current browser does not support the focus-visible")}},this.onBlur=(o,i)=>{const{firstDotFocusVisible:a,secondDotFocusVisible:n}=this.getStates();i==="min"?a&&this._adapter.setStateVal("firstDotFocusVisible",!1):n&&this._adapter.setStateVal("secondDotFocusVisible",!1)},this.handleWrapClick=o=>{const{disabled:i,isDrag:a}=this._adapter.getStates();if(a||i||this._adapter.isEventFromHandle(o))return;const{vertical:n}=this.getProps(),u=this.handleMousePos(o.clientX,o.clientY),f=n?u.y:u.x,e=this.checkWhichHandle(f),y=this.calculateOutputValue(f,e);y!==void 0&&(this._adapter.notifyChange(y),!this._isControlledComponent()&&this.setHandlePos(f,e,!0,y))},this.setHandlePos=function(o,i){let a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,n=arguments.length>3?arguments[3]:void 0;s._adapter.onHandleMove(o,i,()=>s._adapter.onHandleUpAfter(),a,n)},this.checkWhichHandle=o=>{const{vertical:i,verticalReverse:a}=this.getProps(),{currentValue:n}=this._adapter.getStates(),u=this.transValueToPos(n);let f=!0;return Array.isArray(u)&&(o>u[1]||Math.abs(o-u[0])>Math.abs(o-u[1]))&&(f=!1),i&&a&&(f=!f),f},this.handleWrapperEnter=()=>{this._adapter.setStateVal("showBoundary",!0)},this.handleWrapperLeave=()=>{this._adapter.setStateVal("showBoundary",!1)}}init(){this._checkCurrentValue(),this._dragOffset=0}_checkCurrentValue(){const{currentValue:t,min:s,max:o}=this.getStates();let i;Array.isArray(t)?(i=[],i[0]=this._checkValidity(t[0],s,o),i[1]=this._checkValidity(t[1],s,o)):i=this._checkValidity(t,s,o),this._adapter.updateCurrentValue(i)}destroy(){this._adapter.unSubscribeEventListener()}_getHandleCenterPosition(t,s){const o=s.getBoundingClientRect(),{x:i,y:a}=this.handleMousePos(o.left+o.width*.5,o.top+o.height*.5);return t?a:i}}var gVe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{vertical:o,range:i,tooltipVisible:a,tipFormatter:n,"aria-label":u,"aria-labelledby":f,"aria-valuetext":e,getAriaValueText:y,disabled:_}=this.props,{chooseMovePos:T,isDrag:D,isInRenderTree:ce,firstDotFocusVisible:ge,secondDotFocusVisible:Ee}=this.state,_e=o?"top":"left",Be=this.foundation.getMinAndMaxPercent(this.state.currentValue),He=Be.min,at=Be.max,{tipVisible:st,tipChildren:vt}=this.foundation.computeHandleVisibleVal(a&&ce,n,i),Ot=ds(qv.HANDLE,{[`${qv.HANDLE}-clicked`]:T==="min"&&D}),Kt=ds(qv.HANDLE,{[`${qv.HANDLE}-clicked`]:T==="max"&&D}),{min:sn,max:Bn,currentValue:fn}=this.state,bn={"aria-label":u??(_?"Disabled Slider":void 0),"aria-labelledby":f,"aria-disabled":_};return o&&Object.assign(bn,{"aria-orientation":"vertical"}),i?ct.createElement(ct.Fragment,null,ct.createElement(Y0,{content:vt.min,position:"top",trigger:"custom",rePosKey:He,visible:ce&&(st.min||ge),className:`${qv.HANDLE}-tooltip`},ct.createElement("span",Object.assign({ref:this.minHanleEl,className:Ot,style:{[_e]:`${He*100}%`,zIndex:T==="min"?2:1},onMouseDown:_n=>{this.foundation.onHandleDown(_n,"min")},onMouseEnter:()=>{this.foundation.onHandleEnter("min")},onTouchStart:_n=>{this.foundation.onHandleTouchStart(_n,"min")},onMouseLeave:()=>{this.foundation.onHandleLeave()},onMouseUp:_n=>{this.foundation.onHandleUp(_n)},onKeyUp:_n=>{this.foundation.onHandleUp(_n)},onTouchEnd:_n=>{this.foundation.onHandleUp(_n)},onKeyDown:_n=>{this.foundation.handleKeyDown(_n,"min")},onFocus:_n=>{this.foundation.onFocus(_n,"min")},onBlur:_n=>{this.foundation.onBlur(_n,"min")},role:"slider",tabIndex:_?-1:0},bn,{"aria-valuetext":y?y(fn[0],0):e,"aria-valuenow":fn[0],"aria-valuemax":fn[1],"aria-valuemin":sn}))),ct.createElement(Y0,{content:vt.max,position:"top",trigger:"custom",rePosKey:at,visible:ce&&(st.max||Ee),className:`${qv.HANDLE}-tooltip`},ct.createElement("span",Object.assign({ref:this.maxHanleEl,className:Kt,style:{[_e]:`${at*100}%`,zIndex:T==="max"?2:1},onMouseDown:_n=>{this.foundation.onHandleDown(_n,"max")},onMouseEnter:()=>{this.foundation.onHandleEnter("max")},onMouseLeave:()=>{this.foundation.onHandleLeave()},onMouseUp:_n=>{this.foundation.onHandleUp(_n)},onKeyUp:_n=>{this.foundation.onHandleUp(_n)},onTouchStart:_n=>{this.foundation.onHandleTouchStart(_n,"max")},onTouchEnd:_n=>{this.foundation.onHandleUp(_n)},onKeyDown:_n=>{this.foundation.handleKeyDown(_n,"max")},onFocus:_n=>{this.foundation.onFocus(_n,"max")},onBlur:_n=>{this.foundation.onBlur(_n,"max")},role:"slider",tabIndex:_?-1:0},bn,{"aria-valuetext":y?y(fn[1],1):e,"aria-valuenow":fn[1],"aria-valuemax":Bn,"aria-valuemin":fn[0]})))):ct.createElement(Y0,{content:vt.min,showArrow:this.props.showArrow,position:"top",trigger:"custom",rePosKey:He,visible:ce&&(st.min||ge),className:`${qv.HANDLE}-tooltip`},ct.createElement("span",Object.assign({onMouseOver:this.foundation.checkAndUpdateIsInRenderTreeState,ref:this.minHanleEl,className:Ot,style:{[_e]:`${He*100}%`,zIndex:T==="min"&&D?2:1},onMouseDown:_n=>{this.foundation.onHandleDown(_n,"min")},onMouseEnter:()=>{this.foundation.onHandleEnter("min")},onTouchStart:_n=>{this.foundation.onHandleTouchStart(_n,"min")},onMouseLeave:()=>{this.foundation.onHandleLeave()},onMouseUp:_n=>{this.foundation.onHandleUp(_n)},onKeyUp:_n=>{this.foundation.onHandleUp(_n)},onTouchEnd:_n=>{this.foundation.onHandleUp(_n)},onKeyDown:_n=>{this.foundation.handleKeyDown(_n,"min")},onFocus:_n=>{this.foundation.onFocus(_n,"min")},onBlur:_n=>{this.foundation.onBlur(_n,"min")},role:"slider","aria-valuetext":y?y(fn,0):e,tabIndex:_?-1:0},bn,{"aria-valuenow":fn,"aria-valuemax":Bn,"aria-valuemin":sn})))},this.renderTrack=()=>{const{range:o,included:i,vertical:a}=this.props,n=this.foundation.getMinAndMaxPercent(this.state.currentValue),u=n.min,f=n.max;let e=a?{height:o?`${(f-u)*100}%`:`${u*100}%`,top:o?`${u*100}%`:0}:{width:o?`${(f-u)*100}%`:`${u*100}%`,left:o?`${u*100}%`:0};return e=i?e:{},ct.createElement("div",{className:qv.TRACK,style:e,onClick:this.foundation.handleWrapClick})},this.renderStepDot=()=>{const{min:o,max:i,vertical:a,marks:n}=this.props,u=a?"top":"left";return n&&Object.keys(n).length>0?ct.createElement("div",{className:qv.DOTS},Object.keys(n).map(e=>{const y=this.foundation.isMarkActive(Number(e)),_=ds(`${Ey}-dot`,{[`${Ey}-dot-active`]:this.foundation.isMarkActive(Number(e))==="active"}),T=(Number(e)-o)/(i-o),D=ct.createElement("span",{key:e,onClick:this.foundation.handleWrapClick,className:_,style:{[u]:`calc(${T*100}% - 2px)`}});return y?this.props.tooltipOnMark?ct.createElement(Y0,{content:n[e]},D):D:null})):null},this.renderLabel=()=>{if(!this.props.showMarkLabel)return null;const{min:o,max:i,vertical:a,marks:n,verticalReverse:u}=this.props,f=a?"top":"left";return n&&Object.keys(n).length>0?ct.createElement("div",{className:qv.MARKS+(a&&u?"-reverse":"")},Object.keys(n).map(y=>{const _=this.foundation.isMarkActive(Number(y)),T=(Number(y)-o)/(i-o);return _?ct.createElement("span",{key:y,className:ds(`${Ey}-mark${a&&u?"-reverse":""}`),style:{[f]:`${T*100}%`},onClick:this.foundation.handleWrapClick},n[y]):null})):null},this._getAriaValueText=(o,i)=>{const{getAriaValueText:a}=this.props;return a?a(o,i):o};let{value:s}=this.props;s||(s=this.props.defaultValue),this.state={currentValue:s||(this.props.range?[0,0]:0),min:this.props.min||0,max:this.props.max||0,focusPos:"",onChange:this.props.onChange,disabled:this.props.disabled||!1,chooseMovePos:"",isDrag:!1,clickValue:0,showBoundary:!1,isInRenderTree:!0,firstDotFocusVisible:!1,secondDotFocusVisible:!1},this.sliderEl=ct.createRef(),this.minHanleEl=ct.createRef(),this.maxHanleEl=ct.createRef(),this.dragging=[!1,!1],this.foundation=new YV(this.adapter),this.eventListenerSet=new Set}get adapter(){var t=this;return Object.assign(Object.assign({},super.adapter),{getSliderLengths:()=>{if(this.sliderEl&&this.sliderEl.current){const s=this.sliderEl.current.getBoundingClientRect(),o={x:this.sliderEl.current.offsetLeft,y:this.sliderEl.current.offsetTop};return{sliderX:o.x,sliderY:o.y,sliderWidth:s.width,sliderHeight:s.height}}return{sliderX:0,sliderY:0,sliderWidth:0,sliderHeight:0}},getParentRect:()=>{const s=this.sliderEl&&this.sliderEl.current&&this.sliderEl.current.offsetParent;if(s)return s.getBoundingClientRect()},getScrollParentVal:()=>{const s=this.foundation.getScrollParent(this.sliderEl.current);return{scrollTop:s.scrollTop,scrollLeft:s.scrollLeft}},isEventFromHandle:s=>{const o=[this.minHanleEl,this.maxHanleEl];let i=!1;return o.forEach(a=>{if(!a)return;const n=a&&a.current,u=zy.findDOMNode(n);u&&u.contains(s.target)&&(i=!0)}),i},getOverallVars:()=>({dragging:this.dragging}),updateDisabled:s=>{this.setState({disabled:s})},transNewPropsToState(s){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:so;this.setState(s,o)},notifyChange:s=>this.props.onChange(s),setDragging:s=>{this.dragging=s},updateCurrentValue:s=>{const{currentValue:o}=this.state;s!==o&&this.setState({currentValue:s})},setOverallVars:(s,o)=>{this[s]=o},getMinHandleEl:()=>this.minHanleEl.current,getMaxHandleEl:()=>this.maxHanleEl.current,onHandleDown:s=>{this._addEventListener(document.body,"mousemove",this.foundation.onHandleMove,!1),this._addEventListener(window,"mouseup",this.foundation.onHandleUp,!1),this._addEventListener(document.body,"touchmove",this.foundation.onHandleTouchMove,!1)},onHandleMove:function(s,o){let i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:so,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,n=arguments.length>4?arguments[4]:void 0;if(!t.foundation.checkAndUpdateIsInRenderTreeState())return;const{value:f}=t.props;let e=n;if(e===void 0){const _=t.foundation.transPosToValue(s,o);if(_===!1)return;e=t.foundation.outPutValue(_)}const{currentValue:y}=t.state;if(!_0(t.foundation.outPutValue(y),e)){if(!a&&t.foundation.valueFormatIsCorrect(f))return!1;t.setState({currentValue:e},i)}},setEventDefault:s=>{s.stopPropagation(),s.preventDefault()},setStateVal:(s,o)=>{this.setState({[s]:o})},checkAndUpdateIsInRenderTreeState:()=>{const s=bVe(this.sliderEl.current);return s!==this.state.isInRenderTree&&this.setState({isInRenderTree:s}),s},onHandleEnter:s=>{this.setState({focusPos:s})},onHandleLeave:()=>{this.setState({focusPos:""})},onHandleUpBefore:s=>{var o,i;(i=(o=this.props).onMouseUp)===null||i===void 0||i.call(o,s),s.stopPropagation(),s.preventDefault(),document.body.removeEventListener("mousemove",this.foundation.onHandleMove,!1),document.body.removeEventListener("mouseup",this.foundation.onHandleUp,!1)},onHandleUpAfter:()=>{const{currentValue:s}=this.state,o=this.foundation.outPutValue(s);this.props.onAfterChange(o)},unSubscribeEventListener:()=>{Array.from(this.eventListenerSet).forEach(s=>s())}})}componentDidMount(){this.foundation.init()}componentDidUpdate(t,s){const o=!_0(this.props.value,t.value);if(this.props.disabled!==t.disabled&&this.foundation.handleDisabledChange(this.props.disabled),o){const a=this.props.value,n=this.state.currentValue;this.foundation.handleValueChange(n,a),this.props.onAfterChange(this.props.value)}}componentWillUnmount(){this.foundation.destroy()}render(){const{disabled:t,currentValue:s,min:o,max:i}=this.state,a=this.props,{vertical:n,verticalReverse:u,style:f,railStyle:e,range:y,className:_}=a,T=gVe(a,["vertical","verticalReverse","style","railStyle","range","className"]),D=ds(`${Ey}-wrapper`,{[`${Ey}-disabled`]:t,[`${qv.VERTICAL}-wrapper`]:n,[`${Ey}-reverse`]:n&&u},_),ce=ds(`${Ey}-boundary`,{[`${Ey}-boundary-show`]:this.props.showBoundary&&this.state.showBoundary}),ge=ds({[`${Ey}`]:!n,[qv.VERTICAL]:n}),Ee=y?`Range: ${this._getAriaValueText(s[0],0)} to ${this._getAriaValueText(s[1],1)}`:void 0,_e=ct.createElement("div",Object.assign({className:D,style:f,ref:this.sliderEl,"aria-label":Ee,onMouseEnter:()=>this.foundation.handleWrapperEnter(),onMouseLeave:()=>this.foundation.handleWrapperLeave()},this.getDataAttr(T)),ct.createElement("div",{className:`${Ey}-rail`,onClick:this.foundation.handleWrapClick,style:e}),this.renderTrack(),this.renderStepDot(),ct.createElement("div",null,this.renderHandle()),this.renderLabel(),ct.createElement("div",{className:ce},ct.createElement("span",{className:`${Ey}-boundary-min`},o),ct.createElement("span",{className:`${Ey}-boundary-max`},i)));return n?_e:ct.createElement("div",{className:ge},_e)}_addEventListener(t,s,o){if(t.addEventListener){for(var i=arguments.length,a=new Array(i>3?i-3:0),n=3;n{t==null||t.removeEventListener(s,o),Promise.resolve().then(()=>{this.eventListenerSet.delete(u)})};return this.eventListenerSet.add(u),u}else return so}}E_.propTypes={defaultValue:be.oneOfType([be.number,be.array]),disabled:be.bool,showMarkLabel:be.bool,included:be.bool,marks:be.object,max:be.number,min:be.number,range:be.bool,step:be.number,tipFormatter:be.func,value:be.oneOfType([be.number,be.array]),vertical:be.bool,onAfterChange:be.func,onChange:be.func,onMouseUp:be.func,tooltipOnMark:be.bool,tooltipVisible:be.bool,showArrow:be.bool,style:be.object,className:be.string,showBoundary:be.bool,railStyle:be.object,verticalReverse:be.bool,getAriaValueText:be.func};E_.defaultProps={disabled:!1,showMarkLabel:!0,tooltipOnMark:!1,included:!0,max:100,min:0,range:!1,showArrow:!0,step:1,tipFormatter:r=>r,vertical:!1,showBoundary:!1,onAfterChange:r=>{},onChange:r=>{},verticalReverse:!1};const cN={PREFIX:`${fi}-steps`,ITEM:`${fi}-steps-item`};var i5;(function(r){r.small="large",r.default="extra-large"})(i5||(i5={}));const XV=r=>{const{prefixCls:t,className:s,size:o,title:i,description:a,status:n,style:u,active:f,done:e,icon:y,stepNumber:_,onClick:T,onChange:D,onKeyDown:ce}=r,ge=()=>{let He,at;if("icon"in r)ct.isValidElement(y)&&(He=y);else if("status"in r)switch(n){case"error":He=ct.createElement(GT,{size:i5[o]});break;case"wait":He=ct.createElement("span",{className:`${t}-number-icon`},_);break;case"process":He=ct.createElement("span",{className:`${t}-number-icon`},_),at=!0;break;case"finish":He=ct.createElement(S4,{size:i5[o]});break;case"warning":He=ct.createElement(WT,{size:i5[o]});break;default:He=null;break}const st=ds({[`${t}-icon`]:!0,[`${t}-custom-icon`]:"icon"in r,[`${t}-icon-process`]:at});return He?ct.createElement("span",{className:st},He):null},Ee=ds(t,`${t}-${n}`,{[`${t}-active`]:f,[`${t}-done`]:e,[`${t}-hover`]:D||r.onClick,[`${t}-clickable`]:D||T,[`${t}-${n}-hover`]:D||r.onClick},s),_e=He=>{T==null||T(He),D==null||D()},Be=He=>{He.key==="Enter"&&(ce==null||ce(He),D==null||D())};return ct.createElement("div",{role:r.role,"aria-label":r["aria-label"],tabIndex:0,"aria-current":"step",className:Ee,style:u,onClick:He=>_e(He),onKeyDown:Be},ct.createElement("div",{className:`${t}-container`},ct.createElement("div",{className:`${t}-left`},ge()),ct.createElement("div",{className:`${t}-content`},ct.createElement("div",{className:`${t}-title`},ct.createElement("div",{className:`${t}-title-text`},i)),a&&ct.createElement("div",{className:`${t}-description`},a))))};XV.propTypes={prefixCls:be.string,description:be.node,icon:be.node,status:be.oneOf(["wait","process","finish","error","warning"]),title:be.node,className:be.string,style:be.object,onClick:be.func,active:be.bool,done:be.bool};XV.defaultProps={prefixCls:cN.ITEM,active:!1,done:!1,status:"wait",className:""};const vVe=XV,ZV=r=>{const{prefixCls:t,className:s,title:o,description:i,status:a,style:n,onClick:u,icon:f,onChange:e,stepNumber:y,onKeyDown:_}=r,T=()=>{let ge,Ee;if("icon"in r)ge=f;else if("status"in r)switch(a){case"error":ge=ct.createElement(GT,{size:"extra-large"});break;case"wait":ge=y;break;case"process":ge=y,Ee=!0;break;case"finish":ge=ct.createElement(S4,{size:"extra-large"});break;case"warning":ge=ct.createElement(WT,{size:"extra-large"});break;default:ge=null;break}const _e=ds({[`${t}-left`]:!0,[`${t}-icon`]:"icon"in r,[`${t}-plain`]:!("icon"in r),[`${t}-icon-process`]:Ee,[`${t}-hover`]:e||u});return ge?ct.createElement("div",{className:_e},ge):null},D=ge=>{u==null||u(ge),e==null||e()},ce=ge=>{ge.key==="Enter"&&(_==null||_(ge),e==null||e())};return ct.createElement("div",{role:r.role,"aria-label":r["aria-label"],"aria-current":"step",tabIndex:0,className:ds({[t]:!0,[`${t}-${a}`]:!!a,[`${t}-${a}-hover`]:!!a&&(e||u),[`${t}-${a}-active`]:!!a&&(e||u),[`${t}-clickable`]:e||u},s),style:n,onClick:ge=>{D(ge)},onKeyDown:ce},T(),ct.createElement("div",{className:`${t}-content`},ct.createElement("div",{className:`${t}-title`,title:typeof o=="string"?o:null},ct.createElement("span",{className:`${t}-title-text`},o)),ct.createElement("div",{className:`${t}-description`,title:typeof i=="string"?i:null},i)))};ZV.propTypes={prefixCls:be.string,description:be.node,icon:be.node,status:be.oneOf(["wait","process","finish","error","warning"]),title:be.node,className:be.string,style:be.object,onClick:be.func};ZV.defaultProps={prefixCls:cN.ITEM,status:"wait",className:""};const yVe=ZV,JV=r=>{const{prefixCls:t,className:s,title:o,style:i,active:a,index:n,total:u,onClick:f,onKeyDown:e,onChange:y}=r,_=ds(t,{[`${t}-active`]:a},s),T=ce=>{f==null||f(ce),y==null||y()},D=ce=>{ce.key==="Enter"&&(e==null||e(ce),y==null||y())};return ct.createElement("div",{role:r.role,"aria-label":r["aria-label"],"aria-current":"step",tabIndex:0,className:_,style:i,onClick:ce=>T(ce),onKeyDown:D},ct.createElement("div",{className:`${t}-container`},ct.createElement("div",{className:`${t}-content`},ct.createElement("div",{className:`${t}-title`},o)),n!==u-1&&ct.createElement("div",{className:`${t}-icon`},ct.createElement(YT,{size:"small"}))))};JV.propTypes={prefixCls:be.string,title:be.node,className:be.string,style:be.object,onClick:be.func,active:be.bool};JV.defaultProps={prefixCls:cN.ITEM,active:!1,className:""};const wVe=JV,Jde=ct.createContext(null),CVe=r=>{const{type:t}=Vt.useContext(Jde);return(()=>{switch(t){case"fill":return ct.createElement(yVe,Object.assign({},r));case"basic":return ct.createElement(vVe,Object.assign({},r));case"nav":return ct.createElement(wVe,Object.assign({},r));default:return null}})()},EVe=CVe;var LVe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{current:t,status:s,children:o,prefixCls:i,initial:a,direction:n,className:u,style:f,onChange:e}=r,y=LVe(r,["current","status","children","prefixCls","initial","direction","className","style","onChange"]),_=Vt.useMemo(()=>{const D=Vt.Children.toArray(o).filter(Ee=>Vt.isValidElement(Ee)),ce=n==="vertical"?null:{width:`${100/D.length}%`};return Vt.Children.map(D,(Ee,_e)=>{if(!Ee)return null;const Be=a+_e,He=Object.assign({stepNumber:`${Be+1}`,direction:n},Ee.props);return s==="error"&&_e===t-1&&(He.className=`${i}-next-error`),Ee.props.status||(Be===t?He.status=s:Be{_e!==t&&e(_e+a)}:void 0,ct.createElement(bm,{style:ce},Vt.cloneElement(Ee,Object.assign({},He)))})},[o,a,i,n,s,t,e]),T=ds(u,{[i]:!0,[`${i}-${n}`]:!0});return ct.createElement("div",Object.assign({className:T,style:f,"aria-label":r["aria-label"]},T1(y)),ct.createElement(ww,{type:"flex",justify:"start"},_))};eG.propTypes={prefixCls:be.string,className:be.string,style:be.object,current:be.number,initial:be.number,direction:be.oneOf(["horizontal","vertical"]),status:be.oneOf(["wait","process","finish","error","warning"])};eG.defaultProps={prefixCls:cN.PREFIX,current:0,direction:"horizontal",initial:0,status:"process"};const SVe=eG;var xVe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{size:t,current:s,status:o,children:i,prefixCls:a,initial:n,direction:u,className:f,style:e,hasLine:y,onChange:_}=r,T=xVe(r,["size","current","status","children","prefixCls","initial","direction","className","style","hasLine","onChange"]),D=Vt.useMemo(()=>{const ge=Vt.Children.toArray(i).filter(_e=>Vt.isValidElement(_e));return Vt.Children.map(ge,(_e,Be)=>{if(!_e)return null;const He=n+Be,at=Object.assign({stepNumber:`${He+1}`,size:t},_e.props);return o==="error"&&Be===s-1&&(at.className=`${a}-next-error`),_e.props.status||(He===s?at.status=o:He{Be!==s&&_(Be+n)}:void 0,Vt.cloneElement(_e,Object.assign({},at))})},[i,n,a,u,o,s,t,_]),ce=ds(f,{[`${a}-basic`]:!0,[`${a}-${u}`]:!0,[`${a}-${t}`]:t!=="default",[`${a}-hasline`]:y});return ct.createElement("div",Object.assign({"aria-label":r["aria-label"],className:ce,style:e},T1(T)),D)};tG.propTypes={prefixCls:be.string,className:be.string,style:be.object,current:be.number,initial:be.number,direction:be.oneOf(["horizontal","vertical"]),status:be.oneOf(["wait","process","finish","error","warning"]),hasLine:be.bool};tG.defaultProps={prefixCls:cN.PREFIX,current:0,direction:"horizontal",size:"",initial:0,hasLine:!0,status:"process"};const _Ve=tG;var TVe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{size:t,current:s,initial:o,children:i,prefixCls:a,className:n,style:u,onChange:f}=r,e=TVe(r,["size","current","initial","children","prefixCls","className","style","onChange"]),y=Vt.useMemo(()=>{const T=Vt.Children.toArray(i).filter(ge=>Vt.isValidElement(ge)),D=T.length;return Vt.Children.map(T,(ge,Ee)=>{if(!ge)return null;const _e=Object.assign({index:Ee,total:D},ge.props);return _e.active=Ee===s,_e.onChange=f?()=>{Ee!==s&&f(Ee+o)}:void 0,Vt.cloneElement(ge,Object.assign({},_e))})},[i,a,s,t,o,f]),_=ds(n,{[`${a}-nav`]:!0,[`${a}-${t}`]:t!=="default"});return ct.createElement("div",Object.assign({"aria-label":r["aria-label"],className:_,style:u},T1(e)),y)};nG.propTypes={prefixCls:be.string,className:be.string,style:be.object,current:be.number,initial:be.number,size:be.oneOf(["small","default"])};nG.defaultProps={prefixCls:cN.PREFIX,current:0,direction:"horizontal",size:"default",initial:0,status:"process"};const NVe=nG;var IVe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i0&&arguments[0]!==void 0?arguments[0]:"log";if(typeof console[t]=="function"){for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;i2?a-2:0),u=2;u{if(s=ro(r,o),s!=null)return!1}),s}function cT(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2?arguments[2]:void 0;t=t<0||typeof t!="number"?0:t,s=s>r.length||typeof s!="number"?r.length:s;let o=0;return rb(r,(i,a)=>{a>=t&&a2&&arguments[2]!==void 0?arguments[2]:["key"];const o=uT(r,a=>a.fixed===!0||a.fixed==="left"),i=aT(o,a=>s.every(n=>a[n]!=null&&a[n]===t[n]));return o.length>0&&i===o.length-1}function M9(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:["key"];const o=uT(r,a=>a.fixed==="right"),i=aT(o,a=>s.every(n=>a[n]!=null&&a[n]===t[n]));return o.length>0&&i===0}function MB(r){return["left",!0].includes(ro(r,"fixed"))}function UB(r){return["right"].includes(ro(r,"fixed"))}function cGe(r){return[Sc.DEFAULT_KEY_COLUMN_EXPAND,Sc.DEFAULT_KEY_COLUMN_SCROLLBAR,Sc.DEFAULT_KEY_COLUMN_SELECTION].includes(r)}function the(r){return ro(r,"key")===Sc.DEFAULT_KEY_COLUMN_EXPAND}function fGe(r){return ro(r,"key")===Sc.DEFAULT_KEY_COLUMN_SCROLLBAR}function dGe(r){return ro(r,"key")===Sc.DEFAULT_KEY_COLUMN_SELECTION}function cG(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[Sc.DEFAULT_KEY_COLUMN_SCROLLBAR];return uT(r,s=>!t.includes(s.key))}function jE(r,t){return t===void 0&&(t="key"),typeof t=="function"?t(r):ro(r,t)}function YM(r,t){return t!=null&&aP(r,t)}function hGe(r,t){return t!==null&&r.has(t)}function AGe(r,t){return t!==null&&r.has(t)}function qJ(r,t,s){return s===void 0&&(s="key"),pS(r,o=>t!=null&&t!==""&&jE(o,s)===t)}function pGe(r,t){return t===void 0&&(t="children"),ro(r,t)}function nhe(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;return t===void 0&&(t="__expanded_row"),r+t}function mGe(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const s={};return r==="small"?(s.height=t?dg.DEFAULT_VIRTUALIZED_SECTION_ROW_SMALL_HEIGHT:dg.DEFAULT_VIRTUALIZED_ROW_SMALL_HEIGHT,s.minHeight=dg.DEFAULT_VIRTUALIZED_ROW_SMALL_MIN_HEIGHT):r==="middle"?(s.height=t?dg.DEFAULT_VIRTUALIZED_SECTION_ROW_MIDDLE_HEIGHT:dg.DEFAULT_VIRTUALIZED_ROW_MIDDLE_HEIGHT,s.minHeight=dg.DEFAULT_VIRTUALIZED_ROW_MIDDLE_MIN_HEIGHT):(s.height=t?dg.DEFAULT_VIRTUALIZED_SECTION_ROW_HEIGHT:dg.DEFAULT_VIRTUALIZED_ROW_HEIGHT,s.minHeight=dg.DEFAULT_VIRTUALIZED_ROW_MIN_HEIGHT),s}function L_(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"children";const s=[];if(Array.isArray(r)&&r.length)for(const o of r)Array.isArray(o[t])&&o[t].length?s.push(...L_(o[t],t)):(vGe(o),s.push(o));return s}function vP(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"children",s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;const o=[];return rb(r,(i,a)=>{if(i.key==null){const n=i.dataIndex||a;i.key=`${s}-${n}`}Array.isArray(i[t])&&i[t].length&&o.push(...i[t])}),o.length&&vP(o,t,s+1),r}function rhe(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"children",o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;const i=[];return Array.isArray(r)&&r.length&&o<=t&&r.forEach(a=>{const n=a[s];Array.isArray(n)&&n.length&&o2&&arguments[2]!==void 0?arguments[2]:"children",o;return rb(r,i=>{if(i&&i.key!=null&&!o&&i.key===t.key&&(o=i),i&&Array.isArray(i[s])&&!o&&(o=$B(i[s],t,s)),o)return!1}),o}function gGe(r){const{expandedRowRender:t,dataSource:s,hideExpandedColumn:o,childrenRecordName:i,rowExpandable:a}=r,n=typeof t=="function";return o&&n||!n&&s.some(u=>{const f=ro(u,i);return!!(Array.isArray(f)&&f.length||a(u))})}function she(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s;const o=t.findIndex(i=>r.dataIndex===i.dataIndex?(s=Object.assign(Object.assign({},i),r),!0):!1);return o>-1?t.splice(o,1,s):t.push(s),[...t]}function bGe(r,t){const s=[...t];for(const o of r)if(!yw(o.width)){const i=o.key,a=aT(s,n=>n.key===i);a!==-1&&(s[a].width=ro(o,"width"))}return s}function ohe(r){let{dataSource:t,getCheckboxProps:s,childrenRecordName:o,rowKey:i}=r;const a=[];if(Array.isArray(t)&&t.length&&typeof s=="function")for(const n of t){const u=s(n),f=typeof i=="function"?i(n):ro(n,i);u&&u.disabled&&a.push(f);const e=ro(n,o);if(Array.isArray(e)&&e.length){const y=ohe({dataSource:e,getCheckboxProps:s});a.push(...y)}}return a}function vGe(r){if(typeof r=="object"&&r!==null){const{filters:t,sorter:s,dataIndex:o,onFilter:i}=r,a=new ehe("[@douyinfe/semi-ui Table]");(Array.isArray(t)||Mc(i)||Mc(s))&&yw(o)&&a.warn("The column with sorter or filter must pass the 'dataIndex' prop")}}function yGe(r){let{dataSource:t,childrenRecordName:s="children"}=r,o=!1;if(Array.isArray(t))for(const i of t){const a=ro(i,s);if(Array.isArray(a)&&a.length){o=!0;break}}return o}function ihe(r,t){if(t==="rtl")switch(r){case"left":return"right";case"right":return"left";default:return r}return r}function fG(r){return r===!0||ro(r,"showTitle",!0)}class wGe{constructor(t){this._state=Object.assign({},t),this._listeners=[]}subscribe(t){return this._listeners.push(t),()=>{const o=this._listeners.indexOf(t);o>-1&&this._listeners.splice(o,1)}}setState(t){Object.assign(this._state,Object.assign({},t));for(const s of this._listeners)typeof s=="function"&&s(this._state)}getState(){return this._state}}const CGe=wGe;function EGe(r,t,s,o){for(var i=s-1,a=r.length;++i-1;)u!==r&&YJ.call(u,f,1),YJ.call(r,f,1);return r}var RGe=OGe,BGe=RGe;function kGe(r,t){return r&&r.length&&t&&t.length?BGe(r,t):r}var PGe=kGe,DGe=B6,FGe=PGe,MGe=DGe(FGe),UGe=MGe;const $Ge=ic(UGe);function jGe(r){return new Set(r)}function HGe(r,t){if(r===t&&(t=jGe(t)),RE(r)&&r.size&&RE(t)&&t.size){for(const s of t)r.has(s)&&r.delete(s);return r}return r}function XJ(r,t){if(r!==null&&r.length&&t!==null&&t.length){const s=new Set(r),o=new Set(t),i=HGe(s,o);return Array.from(i)}return r}function QGe(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"ascend";switch(t){case"descend":return(s,o)=>{const i=Number(r(s,o,t));return i!==0?-i:i};case"ascend":default:return(s,o)=>r(s,o,t)}}class yP extends lh{static initColumnsFilteredValueAndSorterOrder(t){return t.forEach(s=>{yP.initFilteredValue(s),yP.initSorterOrder(s)}),t}static initFilteredValue(t){const{defaultFilteredValue:s,filteredValue:o}=t;wm(o)&&(Array.isArray(s)&&s.length?t.filteredValue=s:t.filteredValue=[])}static initSorterOrder(t){const{defaultSortOrder:s,sortOrder:o,sorter:i}=t;i&&wm(o)&&(wm(s)?t.sortOrder=!1:t.sortOrder=s)}constructor(t){super(Object.assign({},t)),this.setPage=(i,a)=>{i=i||this._adapter.getCurrentPage();const n=this.getState("pagination"),{dataSource:u,pagination:f,disabledRowKeys:e,allRowKeys:y}=this.getCurrentPageData(null,Object.assign(Object.assign({},n),{currentPage:i,pageSize:a}));!this._pagerIsControlled()&&i>0&&(this._adapter.setDisabledRowKeys(e),this._adapter.setAllRowKeys(y),this._adapter.setPagination(f),this._adapter.setDataSource(u)),this._notifyChange(f)},this.setCachedFilteredSortedDataSource=i=>{this._adapter.setCachedFilteredSortedDataSource(i);const a=this.getAllRowKeys(i);this._adapter.setCachedFilteredSortedRowKeys(a)},this.isSortOrderValid=i=>Sc.SORT_DIRECTIONS.includes(i)||i===!1;const s=this._adapter.getHandleColumns(),o=this._adapter.getMergePagination();this.memoizedWithFnsColumns=M2(s,_0),this.memoizedFilterColumns=M2(cG),this.memoizedFlattenFnsColumns=M2(L_),this.memoizedPagination=M2(o,_0)}init(){const t=[...this.getProp("dataSource")],{queries:s}=this._adapter.getStates(),o=this.getFilteredSortedDataSource(t,s),i=this.getAllDisabledRowKeys(o),a=this.getCurrentPageData(o);this.setAdapterPageData(a),this.initExpandedRowKeys(a),this.initSelectedRowKeys(a),this.setCachedFilteredSortedDataSource(o),this.setAllDisabledRowKeys(i)}initExpandedRowKeys(){let{groups:t}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{defaultExpandAllRows:s,defaultExpandedRowKeys:o=[],expandedRowKeys:i=[],dataSource:a=[],expandAllRows:n,defaultExpandAllGroupRows:u,expandAllGroupRows:f}=this.getProps(),e=[];s||n?this._addNoDuplicatedItemsToArr(e,this.getAllRowKeys(a),t&&aO(t)&&t.size?Array.from(t.keys()):[]):u||f?this._addNoDuplicatedItemsToArr(e,t&&aO(t)&&t.size?Array.from(t.keys()):[]):Array.isArray(o)&&o.length?this._addNoDuplicatedItemsToArr(e,o):Array.isArray(i)&&i.length&&this._addNoDuplicatedItemsToArr(e,i),this._adapter.setExpandedRowKeys(e)}initSelectedRowKeys(t){let{disabledRowKeys:s}=t;const o=this.getProp("rowSelection"),i=[];if(o){const a=ro(o,"selectedRowKeys"),n=ro(o,"defaultSelectedRowKeys");Array.isArray(a)?this._addNoDuplicatedItemsToArr(i,a):Array.isArray(n)&&this._addNoDuplicatedItemsToArr(i,n),Array.isArray(s)&&s.length&&$Ge(i,...s),this._adapter.setSelectedRowKeys(i)}}getFilteredSortedDataSource(t,s){const o=this.filterDataSource(t,s.filter(a=>{const n=a.filteredValue?a.filteredValue:a.defaultFilteredValue;return Mc(a.onFilter)&&Array.isArray(n)&&n.length}));return this.sortDataSource(o,s.filter(a=>a&&Mc(a.sorter)))}getCurrentPageData(t,s,o){const i=this._adapter.getCachedFilteredSortedDataSource();t=t??[...i],s=s??(this.getState("pagination")&&Object.assign({},this.getState("pagination"))),o=o??[...this.getState("queries")];let a;if(this.getProp("groupBy")!=null){const{groups:e,dataSource:y}=this.groupDataSource(t);t=y,a=e}s=this.normalizePagination(s,t),t=this.limitPageDataSource(t,s);const n=this.getAllDisabledRowKeys(t),u=this.getAllRowKeys(t);return{dataSource:t,groups:a,pagination:s,disabledRowKeys:n,allRowKeys:u,queries:o}}groupDataSource(t,s){s=s??this.getProp("groupBy");const o=new Map,i=[];return s!=null&&rb(t,(a,n)=>{const u=typeof s=="function"?s(a):ro(a,s);if(u!=null&&u!==""){const f=this.getRecordKey(a);let e=o.get(u);RE(e)?e.add(f):(e=new Set([f]),o.set(u,e))}}),o&&o.size?o.forEach((a,n)=>{RE(a)&&a.forEach(u=>{i.push(this._getRecord(u))})}):i.push(...t),{groups:o,dataSource:i}}sortDataSource(t,s){return rb(s,o=>{const{sorter:i,sortOrder:a,defaultSortOrder:n,sortChildrenRecord:u}=o,f=this.isSortOrderValid(a)?a:n;if(Mc(i)&&f&&Sc.SORT_DIRECTIONS.includes(f)){if(u){const e=this.getProp("childrenRecordName");t=t&&t.map(y=>{const _=this._getRecordChildren(y);return Array.isArray(_)&&_.length?Object.assign(Object.assign({},y),{[e]:this.sortDataSource(_,[o])}):y})}return t.sort(QGe(i,f)),!1}}),t}filterDataSource(t,s){let o=null,i=!1;const a=this.getProp("childrenRecordName");return rb(s,n=>{const{onFilter:u,filteredValue:f,filterChildrenRecord:e,defaultFilteredValue:y}=n,_=Array.isArray(f)?f:y;typeof u=="function"&&Array.isArray(_)&&_.length&&(i=!0,o===null?o=new Map:(t=Array.from(o&&o.values()),o=new Map),rb(t,T=>{rb(_,D=>{const ce=ro(T,a),ge=this.getRecordKey(T);let Ee;if(Array.isArray(ce)&&ce.length&&e&&(Ee=this.filterDataSource(ce,[n])),Array.isArray(Ee)&&Ee.length){if(ge!=null){const _e=ro(o.get(ge),a,[]);o.set(ge,Object.assign(Object.assign({},T),{[a]:Ee.reduce((Be,He)=>(Be.find(at=>this.getRecordKey(at)===this.getRecordKey(He))==null&&Be.push(He),Be),[..._e])}))}}else u(D,T)&&o.set(ge,T)})}))}),i&&(t=Array.from(o&&o.values())),t}limitPageDataSource(t,s){t=t??this.getProp("dataSource"),s=s??this.getState("pagination");let o=t;const i=ro(s,"currentPage");if(this.getProp("pagination")!==!1&&i&&t&&s&&!this._pagerIsControlled()){const{pageSize:a=dg.DEFAULT_PAGE_SIZE}=s,n=(i-1)*a,u=i*a;o=RKe(t,n,u)}return o}normalizePagination(t,s){t=t??this._getPagination(),s=s??this._getDataSource();const o=this.getProp("pagination");if(t&&(t=typeof t=="object"?Object.assign({},t):{},t=E4({total:s&&s.length||0,pageSize:dg.DEFAULT_PAGE_SIZE,currentPage:ro(o,"defaultCurrentPage",1),position:Sc.PAGINATION_POSITIONS[0]},t),!this._pagerIsControlled())){const i=ro(o,"total",s.length),{currentPage:a,pageSize:n}=t,u=Math.ceil(i/n);t.total=i,a>u&&(t.currentPage=1)}return t}setAdapterPageData(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{pagination:s,dataSource:o,disabledRowKeys:i,allRowKeys:a,groups:n}=t;this._adapter.setDisabledRowKeys(i),this._adapter.setAllRowKeys(a),this._adapter.setPagination(s),this._adapter.setGroups(n),this._adapter.setDataSource(o)}destroy(){}setAllDisabledRowKeys(t){this._adapter.setAllDisabledRowKeys(t)}handleClick(t){}handleMouseEnter(t){}handleMouseLeave(t){}stopPropagation(t){this._adapter.stopPropagation(t)}_addNoDuplicatedItemsToArr(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;it!=null&&t!==""&&this.getRecordKey(s)===t)}_getRecordChildren(t){return ro(t,this.getProp("childrenRecordName"))}_getPagination(){return this.getState("pagination")||{}}_getAllFilters(t){t=t||this.getState("queries");const s=[];return rb(t,o=>{Array.isArray(o.filteredValue)&&(o.filteredValue.length||this._filterIsControlled(o.dataIndex))&&s.push(o)}),s}_getAllSorters(t){return t=t||this.getState("queries"),uT(t,s=>s.sorter&&s.sortOrder)}_filterQueries(t,s){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:["dataIndex"];s=s??this.getState("queries");const i=[],a=[];return rb(s,(n,u)=>{FB(o,e=>e&&t[e]!=null&&t[e]===n[e])&&(i.push(n),a.push(u))}),{filteredQueries:i,filteredIndexes:a}}_mergeToQueries(t,s){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:["dataIndex"];s=s??this.getState("queries"),s=[...s],t=Object.assign({},t);const{filteredQueries:i,filteredIndexes:a}=this._filterQueries(t,s,o);return rb(i,(n,u)=>{s[a[u]]=Object.assign({},t)}),s}getRecordKey(t){if(!t)return;const s=this.getProp("rowKey");return typeof s=="function"?s(t):ro(t,s)}isEmpty(t){return t=t??this.getProp("dataSource"),!(Array.isArray(t)&&t.length>0)}handleSelectRow(t,s,o){if(this.stopPropagation(o),typeof s=="boolean"&&t!=null){const i=this._getSelectedRowKeys();let a=-1;const n=this.getSelectedRows(null,[t])[0];let u;(a=i.indexOf(t))>-1&&s===!1?(i.splice(a,1),u=this.getSelectedRows(null,i),this._selectionIsControlled()||this._adapter.setSelectedRowKeys(i),this._adapter.notifySelect(n,s,u,o),this._adapter.notifySelectionChange(i,u)):i.indexOf(t)===-1&&s===!0&&(i.push(t),u=this.getSelectedRows(null,i),this._selectionIsControlled()||this._adapter.setSelectedRowKeys(i),this._adapter.notifySelect(n,s,u,o),this._adapter.notifySelectionChange(i,u))}}handleSelectAllRow(t,s){if(this.stopPropagation(s),typeof t=="boolean"){const o=this._getSelectedRowKeys();let i=[...o];const a=this._getSelectedRowKeysSet();let n=[...this._adapter.getCachedFilteredSortedRowKeys()];const u=this._adapter.getAllDisabledRowKeys(),f=this._adapter.getAllDisabledRowKeysSet();let e;if(t){for(const T of n)!f.has(T)&&!a.has(T)&&i.push(T);n=XJ(n,[...u,...o]),e=[...n]}else i=XJ(i,n),e=[...o];const y=this.getSelectedRows(null,e||[]),_=this.getSelectedRows(null,i||[]);this._selectionIsControlled()||this._adapter.setSelectedRowKeys(i),this._adapter.notifySelectAll(t,_,y,s),this._adapter.notifySelectionChange(i,_)}}getSelectedRows(t,s,o){t=t??this._getDataSource(),s=s??this._getSelectedRowKeys(),RE(o)||(o=new Set(s));const i=this.getProp("childrenRecordName"),a=[];if(RE(o)&&o.size&&Array.isArray(t)&&t.length&&(a.push(...t.filter(n=>o.has(this.getRecordKey(n)))),a.lengths.has(o)).length)}handleRowExpanded(t,s,o){this.stopPropagation(o);const i=[...this.getState("expandedRowKeys")],a=i.indexOf(s),n=typeof s=="string"||typeof s=="number";n&&t&&a===-1?i.push(s):n&&!t&&a>-1&&i.splice(a,1),this._rowExpansionIsControlled()||this._adapter.setExpandedRowKeys(i);const u=this.getSelectedRows(null,i);let f=this.getSelectedRows(null,[s])[0];const e=this._getGroups();if(e){e.has(s)&&(f={groupKey:s});for(let y=0,_=i.length;y<_;y++)e.has(s)&&u.push({groupKey:i[y]})}this._adapter.notifyExpand(t,f,o),this._adapter.notifyExpandedRowsChange(u)}_getGroups(){return this._adapter.getProp("groupBy")!==null?this._adapter.getState("groups"):null}allIsSelected(t,s,o){const i=uT(o,a=>a!=null&&!s.has(a));if(i&&i.length){for(const a of i)if(a!=null&&!t.has(a))return!1;return!0}else return o.every(n=>t.has(n))||!1}allIsNotSelected(t,s){for(const o of s)if(o!=null&&Array.isArray(t)&&t.includes(o))return!0;return!1}formatPaginationInfo(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",o="";const i=ro(this.getProp("pagination"),"formatPageText"),{total:a,pageSize:n,currentPage:u}=t,f=Math.min((u-1)*n+1,a),e=Math.min(u*n,a);return(i||i!==!1&&s&&a>0)&&(o=typeof i=="function"?i({currentStart:f,currentEnd:e,total:a}):s.replace("${currentStart}",f).replace("${currentEnd}",e).replace("${total}",a)),o}toggleShowFilter(t,s){let o=this.getQuery(t);const i=s;o=Object.assign(Object.assign({},o),{filterDropdownVisible:i}),this._filterShowIsControlled(),this._adapter.notifyFilterDropdownVisibleChange(i,t)}handleFilterSelect(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getQuery(t),i=[...this._adapter.getState("queries")];const{filteredValue:a}=s;o=Object.assign(Object.assign({},o),{filteredValue:a}),i=she(o,i);const n=this._mergeToQueries(o,null),u=this._getAllFilters(n);this._filterIsControlled(t)||(this._adapter.setQueries(i),this.handleClickFilterOrSorter(i)),this._notifyChange(null,u)}handleSort(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;this.stopPropagation(s);const{dataIndex:o}=t;let i=this.getState("queries"),a=null;i=[...i],rb(i,(n,u,f)=>{if(n.sorter){const e=Object.assign({},n),y=ro(e,"sortOrder"),_=ro(e,"defaultSortOrder",!1);let T=this.isSortOrderValid(y)?y:_;o&&o===e.dataIndex?T===Sc.SORT_DIRECTIONS[0]?T=Sc.SORT_DIRECTIONS[1]:T===Sc.SORT_DIRECTIONS[1]?T=!1:T=Sc.SORT_DIRECTIONS[0]:T=!1,f[u]=Object.assign(Object.assign({},e),{sortOrder:T}),o===e.dataIndex&&(a=f[u])}}),this._sorterIsControlled(o)||(this._adapter.setQueries(i),this.handleClickFilterOrSorter(i)),this._notifyChange(null,null,a,null)}handleClickFilterOrSorter(t){const s=[...this.getProp("dataSource")],o=this.getFilteredSortedDataSource(s,t),i=this.getAllDisabledRowKeys(o);this.setCachedFilteredSortedDataSource(o),this.setAllDisabledRowKeys(i);const a=this.getCurrentPageData(o);this.setAdapterPageData(a)}getQuery(t,s){if(s=s||this.getState("queries"),t!=null)return pS(s,o=>o.dataIndex===t)}getCellWidths(t,s,o){return this._adapter.getCellWidths(t,s,o)}setHeadWidths(t,s){return this._adapter.setHeadWidths(t,s)}getHeadWidths(t){return this._adapter.getHeadWidths(t)}mergedRowExpandable(t){return this._adapter.mergedRowExpandable(t)}setBodyHasScrollbar(t){this._adapter.setBodyHasScrollbar(t)}}const ZJ=yP,ahe={align:be.oneOf(Sc.ALIGNS),className:be.string,colSpan:be.number,dataIndex:be.string,defaultSortOrder:be.oneOf(Sc.SORT_DIRECTIONS),filterChildrenRecord:be.bool,filterDropdownProps:be.object,filterDropdown:be.node,filterDropdownVisible:be.bool,filterIcon:be.func,filterMultiple:be.bool,filteredValue:be.arrayOf(be.any),filters:be.array,fixed:be.oneOf(Sc.FIXED_SET),onCell:be.func,onFilter:be.func,onFilterDropdownVisibleChange:be.func,onHeaderCell:be.func,onSorterChange:be.func,render:be.func,renderFilterDropdownItem:be.func,sortChildrenRecord:be.bool,sortDirections:be.arrayOf(be.string),sortOrder:be.oneOfType([be.bool,be.string]),sorter:be.oneOfType([be.bool,be.func]),title:be.oneOfType([be.func,be.node]),useFullRender:be.bool,width:be.oneOfType([be.number,be.string])};class LF extends ct.PureComponent{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};super(t)}render(){return null}}LF.propTypes=Object.assign({},ahe);LF.elementType="Column";function wP(r){if(r){const t=[];return ct.Children.forEach(r,s=>{if(ct.isValidElement(s)&&(s.type===LF||ro(s,"type.elementType")==="Column")){const o=ig(s.props,["children"]);Array.isArray(s.props.children)&&s.props.children.length&&(o.children=wP(s.props.children)),t.push(Object.assign({key:s.key},o))}}),t}return[]}const KGe=ct.createContext({headWidths:[],setHeadWidths:so,handleRowExpanded:so}),DS=KGe,zGe=r=>{let{children:t,anyColumnFixed:s,flattenedColumns:o,tableWidth:i,headWidths:a,setHeadWidths:n,getHeadWidths:u,getCellWidths:f,handleRowExpanded:e,renderExpandIcon:y,renderSelection:_,getVirtualizedListRef:T,setBodyHasScrollbar:D,direction:ce}=r;const ge=Vt.useMemo(()=>({anyColumnFixed:s,flattenedColumns:o,renderExpandIcon:y,renderSelection:_,setHeadWidths:n,getHeadWidths:u,getCellWidths:f,headWidths:a,tableWidth:i,handleRowExpanded:e,getVirtualizedListRef:T,setBodyHasScrollbar:D,direction:ce}),[s,o,y,_,n,u,f,a,i,e,T,D,ce]);return ct.createElement(DS.Provider,{value:ge},t)},VGe=zGe;class GGe extends lh{handleChange(t){const s=t.target.checked;this._adapter.notifyChange(s,t)}}class CP extends Uc{get adapter(){var t=this;return Object.assign(Object.assign({},super.adapter),{notifyChange:function(){return t.props.onChange(...arguments)}})}constructor(t){super(t),this.handleChange=s=>this.foundation.handleChange(s),this.foundation=new GGe(this.adapter)}render(){const{selected:t,getCheckboxProps:s,indeterminate:o,disabled:i,prefixCls:a,className:n}=this.props,u=this.props["aria-label"];let f={onChange:this.handleChange,disabled:i,indeterminate:o,checked:t};typeof s=="function"&&(f=Object.assign(Object.assign({},f),s()));const e=ds(`${a}-selection-wrap`,{[`${a}-selection-disabled`]:i},n);return ct.createElement("span",{className:e},ct.createElement(iT,Object.assign({"aria-label":u},f)))}}CP.propTypes={columnTitle:be.string,getCheckboxProps:be.func,type:be.string,onChange:be.func,selected:be.bool,disabled:be.bool,indeterminate:be.bool,prefixCls:be.string,className:be.string,"aria-label":be.string};CP.defaultProps={disabled:!1,onChange:so,prefixCls:Qb.PREFIX};class dG extends Vt.PureComponent{render(){const{pagination:t,prefixCls:s,info:o,renderPagination:i}=this.props,a=ro(t,"total"),n=i&&Mc(i)?i(t):null;return ct.createElement("div",{className:`${s}-pagination-outer`},Vt.isValidElement(n)?n:ct.createElement(ct.Fragment,null,ct.createElement("span",{className:`${s}-pagination-info`},o),ct.createElement("span",{className:`${s}-pagination-wrapper`},a>0?ct.createElement(vF,Object.assign({},t,{key:ro(t,"pageSize","pagination")})):null)))}}dG.propTypes={style:be.object,prefixCls:be.string,pagination:be.object,info:be.oneOfType([be.string,be.node]),renderPagination:be.func};dG.defaultProps={prefixCls:Qb.PREFIX};function lhe(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;const{filterMultiple:o=!0,filters:i=[],filteredValue:a=[],filterDropdownVisible:n,onSelect:u=so,onFilterDropdownVisibleChange:f=so,trigger:e="click",position:y="bottom",renderFilterDropdownItem:_}=r,T=Object.assign(Object.assign({},r),{onVisibleChange:D=>f(D),trigger:e,position:y,render:ct.createElement(Lh.Menu,null,Array.isArray(i)&&i.map((D,ce)=>{const ge=vt=>{const Ot=vt&&vt.nativeEvent;Ot&&(Ot.stopImmediatePropagation(),Ot.stopPropagation(),Ot.preventDefault());let Kt=[...a];const sn=Kt.includes(D.value),Bn=Kt.indexOf(D.value);return Bn>-1?Kt.splice(Bn,1):o?Kt.push(D.value):Kt=[D.value],u({value:D.value,filteredValue:Kt,included:!sn,domEvent:Ot})},Ee=a.includes(D.value),{text:_e}=D,{value:Be}=D,He=`${s}_${ce}`,at=typeof _=="function"?_({onChange:ge,filterMultiple:o,value:Be,text:_e,checked:Ee,filteredValue:a,level:s}):null;let st=at&&ct.isValidElement(at)?ct.cloneElement(at,{key:He}):ct.createElement(Lh.Item,{key:He,onClick:ge},o?ct.createElement(iT,{checked:Ee},_e):ct.createElement(gP,{checked:Ee},_e));if(Array.isArray(D.children)&&D.children.length){const vt=Object.assign(Object.assign({},r),{filters:D.children,trigger:"hover",position:"right"});delete vt.filterDropdownVisible,st=lhe(vt,st,s+1)}return st}))});return n!=null&&(T.visible=n),ct.createElement(Lh,Object.assign({},T,{key:`Dropdown_level_${s}`,className:`${Qb.PREFIX}-column-filter-dropdown`}),t)}function WGe(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{prefixCls:t=Qb.PREFIX,filteredValue:s,filterIcon:o="filter",renderFilterDropdown:i,filterDropdownProps:a}=r;let{filterDropdown:n=null}=r;const u=ds(`${t}-column-filter`,{on:Array.isArray(s)&&s.length});let f;typeof o=="function"?f=o(Array.isArray(s)&&s.length>0):Vt.isValidElement(o)?f=o:f=ct.createElement("div",{className:u},"​",ct.createElement(ZFe,{role:"button","aria-label":"Filter data with this column","aria-haspopup":"listbox",tabIndex:-1,size:"default"}));const e=Object.assign(Object.assign({},r),a);return n=ct.isValidElement(n)?n:typeof i=="function"?i(e,{iconElem:f}):lhe(e,f),n}class hG extends Vt.PureComponent{render(){const{prefixCls:t,onClick:s,sortOrder:o,style:i,title:a,sortIcon:n}=this.props,u="default",f=ds(`${t}-column-sorter-up`,{on:o===Sc.SORT_DIRECTIONS[0]}),e=ds(`${t}-column-sorter-down`,{on:o===Sc.SORT_DIRECTIONS[1]}),y={"aria-label":`Current sort order is ${o?`${o}ing`:"none"}`,"aria-roledescription":"Sort data with this column"},_=()=>typeof n=="function"?n({sortOrder:o}):ct.createElement("div",{style:i,className:`${t}-column-sorter`},ct.createElement("span",{className:`${f}`},ct.createElement(dFe,{size:u})),ct.createElement("span",{className:`${e}`},ct.createElement($6,{size:u})));return ct.createElement("div",Object.assign({role:"button"},y,{tabIndex:-1,className:`${t}-column-sorter-wrapper`,onClick:s,onKeyPress:T=>N1(T)&&s(T)}),a,_())}}hG.propTypes={className:be.string,style:be.object,onClick:be.func,prefixCls:be.string,sortOrder:be.oneOfType([be.string,be.bool]),sortIcon:be.func};hG.defaultProps={prefixCls:Qb.PREFIX,onClick:so,sortOrder:!1};function AG(r){const{expanded:t,componentType:s,onClick:o=so,onMouseEnter:i=so,onMouseLeave:a=so,expandIcon:n,prefixCls:u=Qb.PREFIX,motion:f=!0}=r;let e;ct.isValidElement(n)?e=n:typeof n=="function"?e=n(t):s==="tree"?e=t&&!f?ct.createElement(pfe,{size:"small"}):ct.createElement(hMe,{size:"small"}):e=t&&!f?ct.createElement(qT,null):ct.createElement(YT,null);const y=Vt.useCallback(_=>{typeof o=="function"&&o(!t,_)},[t]);if(f){const _=e;e=ct.createElement(IL,{animationState:t?"enter":"leave",startClassName:`${Qb.PREFIX}-expandedIcon-${t?"show":"hide"}`},T=>{let{animationClassName:D}=T;return ct.cloneElement(_,{className:(_.props.className||"")+" "+D})})}return ct.createElement("span",{role:"button","aria-label":"Expand this row",tabIndex:-1,onClick:y,onMouseEnter:i,onMouseLeave:a,className:`${u}-expand-icon`,onKeyPress:_=>N1(_)&&y(_)},e)}AG.propTypes={expanded:be.bool,componentType:be.oneOf(["tree","expand"]),onClick:be.func,onMouseEnter:be.func,onMouseLeave:be.func,expandIcon:be.oneOfType([be.node,be.func]),prefixCls:be.string,motion:be.bool};AG.defaultProps={componentType:"expand",onClick:so,onMouseEnter:so,onMouseLeave:so,prefixCls:Qb.PREFIX};class SF extends ct.PureComponent{render(){const{columns:t,className:s,style:o,prefixCls:i,components:a}=this.props,n=ro(a,"colgroup.wrapper","colgroup"),u=ro(a,"colgroup.col","col"),f=L_(t).map((y,_)=>{const T={};return y.width&&(T.width=y.width,T.minWidth=T.width),ct.createElement(u,{className:ds(`${i}-col`,y.className),key:y.key||y.dataIndex||_,style:T})}),e=ds(`${i}-colgroup`,s);return ct.createElement(n,{className:e,style:o},f)}}SF.propTypes={columns:be.array,prefixCls:be.string,className:be.string,style:be.object,components:be.object};SF.defaultProps={columns:[],prefixCls:Qb.PREFIX};var qGe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{if(this.headerNode=s,s&&this.context.setHeadWidths){const{prefixCls:o,row:i,index:a}=this.props,n=`.${o}-row-head`,u=s&&s.querySelectorAll&&s.querySelectorAll(n);this.context.setHeadWidths(AP(u,(f,e)=>{let y=ro(i,[e,"column","width"]);const _=ro(i,[e,"column","key"]);return typeof y!="number"&&(y=f&&f.getBoundingClientRect().width||0),{width:y,key:_}}),a)}},this.headerNode=null}componentDidUpdate(t){t.columns!==this.props.columns&&this.headerNode&&this.cacheRef(this.headerNode)}render(){const{components:t,row:s,prefixCls:o,onHeaderRow:i,index:a,style:n,columns:u}=this.props,{getCellWidths:f,direction:e}=this.context,y=e==="rtl",_=rhe(u,a),T=f(_),D=ro(t,"header.row","tr"),ce=ro(t,"header.cell","th"),ge=i(u,a)||{};lw(ge,"className",ds(ro(ge,"className"),`${o}-row`));const Ee=AP(s,(_e,Be)=>{const{column:He}=_e,at=qGe(_e,["column"]),st=typeof He.onHeaderCell=="function"?He.onHeaderCell(He,Be,a):{};let vt=Object.assign({},st.style);if(He.align){const _n=ihe(He.align,e);vt=Object.assign(Object.assign({},vt),{textAlign:_n}),st.className=ds(st.className,He.className,{[`${o}-align-${_n}`]:!!_n})}let Ot,Kt,sn,Bn;if(y?(Ot=UB(He),Kt=MB(He),sn=M9(_,He),Bn=F9(_,He)):(Ot=MB(He),Kt=UB(He),sn=F9(_,He),Bn=M9(_,He)),st.className=ds(`${o}-row-head`,He.className,st.className,{[`${o}-cell-fixed-left`]:Ot,[`${o}-cell-fixed-left-last`]:sn,[`${o}-cell-fixed-right`]:Kt,[`${o}-cell-fixed-right-first`]:Bn,[`${o}-row-head-ellipsis`]:He.ellipsis}),T.length&&_.length){const _n=aT(_,Nr=>Nr&&Nr.key!=null&&Nr.key===He.key);if(_n>-1){if(MB(He)){const Nr=y?"right":"left";vt=Object.assign(Object.assign({},vt),{position:"sticky",[Nr]:cT(T,0,_n)})}else if(UB(He)){const Nr=y?"left":"right";vt=Object.assign(Object.assign({},vt),{position:"sticky",[Nr]:cT(T,_n+1)})}}}Object.assign(at,{resize:He.resize});const fn=ig(Object.assign(Object.assign({},at),st),["colStart","colEnd","hasSubColumns","parents","level"]),{rowSpan:bn,colSpan:$n}=fn;return bn===0||$n===0?null:ct.createElement(ce,Object.assign({role:"columnheader","aria-colindex":Be+1},fn,{style:vt,key:He.key||He.dataIndex||Be}))});return ct.createElement(D,Object.assign({role:"row","aria-rowindex":a+1},ge,{style:n,ref:this.cacheRef}),Ee)}}xF.contextType=DS;xF.propTypes={components:be.object,row:be.array,prefixCls:be.string,onHeaderRow:be.func,index:be.oneOfType([be.string,be.number]),style:be.object,columns:be.array,fixed:be.oneOfType([be.bool,be.string]),selectedRowKeysSet:be.instanceOf(Set).isRequired};xF.defaultProps={onHeaderRow:so,prefixCls:Qb.PREFIX,columns:[],components:{header:{wrapper:"thead",row:"tr",cell:"th"}}};function YGe(r){const t=[];function s(i,a){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],u=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,f=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0;t[u]=t[u]||[];let e=a;return i.map(_=>{const T={key:_.key,className:_.className||"",children:Mc(_.title)?_.title():_.title,column:_,colStart:e,level:f,parents:n};let D=1;const ce=_.children;ce&&ce.length>0&&(D=s(ce,e,[...n,T],u+1,f+1).reduce((_e,Be)=>_e+Be,0),T.hasSubColumns=!0),"colSpan"in _&&({colSpan:D}=_),"rowSpan"in _&&(T.rowSpan=_.rowSpan),_.key===Sc.DEFAULT_KEY_COLUMN_SCROLLBAR&&(T["x-type"]=Sc.DEFAULT_KEY_COLUMN_SCROLLBAR),T.colSpan=D,T.colEnd=T.colStart+D-1,t[u].push(T),e+=D;const ge=_==null?void 0:_.ellipsis;return fG(ge)&&typeof T.children=="string"&&(T.title=T.children),D})}s(r,0);const o=t.length;for(let i=0;i{!("rowSpan"in a)&&!a.hasSubColumns&&(a.rowSpan=o-i)});return t}class pG extends Uc{get adapter(){return Object.assign({},super.adapter)}render(){const{components:t,columns:s,prefixCls:o,fixed:i,onHeaderRow:a,forwardedRef:n,selectedRowKeysSet:u}=this.props,f=YGe(s),e=t.header.wrapper;return ct.createElement(e,{className:`${o}-thead`,ref:n},f.map((y,_)=>ct.createElement(xF,{prefixCls:o,key:_,index:_,fixed:i,columns:s,row:y,components:t,onHeaderRow:a,selectedRowKeysSet:u})))}}pG.propTypes={components:be.any,columns:be.array,columnManager:be.object,prefixCls:be.string,onHeaderRow:be.func,onDidUpdate:be.func,fixed:be.oneOfType([be.bool,be.string]),selectedRowKeysSet:be.instanceOf(Set).isRequired};pG.defaultProps={columns:[],prefixCls:Qb.PREFIX,onHeaderRow:so,onDidUpdate:so,components:{header:{wrapper:"thead",row:"tr",cell:"th"}}};const uhe=ct.forwardRef((r,t)=>ct.createElement(pG,Object.assign({},r,{forwardedRef:t})));class mG extends ct.PureComponent{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{selectedRowKeysSet:new Set};super(t)}render(){const{scroll:t,prefixCls:s,fixed:o,forwardedRef:i,handleBodyScroll:a,columns:n,components:u,onDidUpdate:f,showHeader:e,tableLayout:y,bodyHasScrollBar:_,sticky:T}=this.props,D=ro(u,"header.outer","table"),ce=ro(t,"x"),ge={},Ee={};ce&&!o&&(Ee.width=ce),_&&(ge.overflowY="scroll");const _e=ct.createElement(SF,{columns:n,prefixCls:s}),Be=ct.createElement(uhe,Object.assign({},this.props,{columns:n,components:u,onDidUpdate:f})),He=ds(`${s}-header`,{[`${s}-header-sticky`]:T,[`${s}-header-hidden`]:!e}),at=ro(T,"top",0);return typeof at=="number"&&(ge.top=at),ct.createElement("div",{key:"headTable",style:ge,className:He,ref:i,onScroll:a},ct.createElement(D,{style:Ee,className:ds(s,{[`${s}-fixed`]:y==="fixed"})},_e,Be))}}mG.propTypes={tableLayout:be.string,bodyHasScrollBar:be.bool,columns:be.array,components:be.object,dataSource:be.array,fixed:be.oneOfType([be.bool,be.string]),handleBodyScroll:be.func,prefixCls:be.string,forwardedRef:be.oneOfType([be.object,be.func]),scroll:be.shape({x:be.oneOfType([be.number,be.string,be.bool]),y:be.oneOfType([be.number,be.string])}),selectedRowKeysSet:be.instanceOf(Set).isRequired,showHeader:be.bool,onDidUpdate:be.func,onHeaderRow:be.func};mG.defaultProps={handleBodyScroll:so};const XGe=ct.forwardRef((r,t)=>ct.createElement(mG,Object.assign({},r,{forwardedRef:t})));var ZGe=Ode,JGe=ZGe("length"),eWe=JGe,tWe="\\ud800-\\udfff",nWe="\\u0300-\\u036f",rWe="\\ufe20-\\ufe2f",sWe="\\u20d0-\\u20ff",oWe=nWe+rWe+sWe,iWe="\\ufe0e\\ufe0f",aWe="\\u200d",lWe=RegExp("["+aWe+tWe+oWe+iWe+"]");function uWe(r){return lWe.test(r)}var gG=uWe,che="\\ud800-\\udfff",cWe="\\u0300-\\u036f",fWe="\\ufe20-\\ufe2f",dWe="\\u20d0-\\u20ff",hWe=cWe+fWe+dWe,AWe="\\ufe0e\\ufe0f",pWe="["+che+"]",U9="["+hWe+"]",$9="\\ud83c[\\udffb-\\udfff]",mWe="(?:"+U9+"|"+$9+")",fhe="[^"+che+"]",dhe="(?:\\ud83c[\\udde6-\\uddff]){2}",hhe="[\\ud800-\\udbff][\\udc00-\\udfff]",gWe="\\u200d",Ahe=mWe+"?",phe="["+AWe+"]?",bWe="(?:"+gWe+"(?:"+[fhe,dhe,hhe].join("|")+")"+phe+Ahe+")*",vWe=phe+Ahe+bWe,yWe="(?:"+[fhe+U9+"?",U9,dhe,hhe,pWe].join("|")+")",JJ=RegExp($9+"(?="+$9+")|"+yWe+vWe,"g");function wWe(r){for(var t=JJ.lastIndex=0;JJ.test(r);)++t;return t}var CWe=wWe,EWe=eWe,LWe=gG,SWe=CWe;function xWe(r){return LWe(r)?SWe(r):EWe(r)}var _We=xWe,TWe=Uz,NWe=VT,IWe=Nw,OWe=Iz,RWe=_We,BWe="[object Map]",kWe="[object Set]";function PWe(r){if(r==null)return 0;if(IWe(r))return OWe(r)?RWe(r):r.length;var t=NWe(r);return t==BWe||t==kWe?r.size:TWe(r).length}var DWe=PWe;const WR=ic(DWe);var FWe=gV,MWe=aN,UWe=eF,$We=Math.max,jWe=Math.min;function HWe(r,t,s){var o=r==null?0:r.length;if(!o)return-1;var i=o-1;return s!==void 0&&(i=UWe(s),i=s<0?$We(o+i,0):jWe(i,o-1)),FWe(r,MWe(t),i,!0)}var QWe=HWe;const KWe=ic(QWe);class zWe extends lh{init(){this.initVirtualizedData(),this.initExpandBtnShouldInRow()}destroy(){this.unobserveBodyResize()}initVirtualizedData(t){this._adapter.setVirtualizedData(this.flattenData(this.getProp("dataSource")),t)}initExpandBtnShouldInRow(t){const s=this.getProps(),o=gGe(s);this._adapter.setCachedExpandBtnShouldInRow(o),!ev(t)&&!t&&(t=Sc.EXPAND_RELATED_PROPS.map(a=>ro(s,a,void 0))),this._adapter.setCachedExpandRelatedProps(t)}flattenData(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[];const a=[],{rowKey:n,childrenRecordName:u,expandedRowRender:f,expandedRowKeys:e,groups:y}=this.getProps();return s===0&&aO(y)?y.forEach((_,T)=>{const D=t.findIndex(ce=>_.has(jE(ce,n)));if(D>-1){const ce=KWe(t,Ee=>_.has(jE(Ee,n))),ge=aP(e,T);a.push({key:T,level:s,sectionRow:!0,group:_,groupKey:T,expanded:ge}),ge&&a.push(...this.flattenData(t.slice(D,ce+1),s+1,[...o],[...i]))}}):t.forEach((_,T)=>{const D=jE(_,n),ce=pGe(_,u);s&&i.push(D);const ge={key:D,record:_,level:s,parentKeys:[...o],childrenKeys:[...i]};a.push(ge);const Ee=[];aP(e,D)&&(Array.isArray(ce)&&ce.length?Ee.push(...this.flattenData(ce,s+1,[...ge.parentKeys],[...ge.childrenKeys])):f&&Ee.push({key:nhe(D),level:s,expandedRow:!0,record:_}),a.push(...Ee))}),a}observeBodyResize(t){const{scroll:s}=this.getProps();if(ro(s,"y"))return this._adapter.observeBodyResize(t)}unobserveBodyResize(){return this._adapter.unobserveBodyResize()}}var VWe=P6,GWe=4;function WWe(r){return VWe(r,GWe)}var qWe=WWe;const YWe=ic(qWe);let XM,ZM;const eee={position:"absolute",top:"-9999px",width:"50px",height:"50px"};function XWe(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"vertical";if(typeof document>"u"||typeof window>"u")return 0;const t=r==="vertical";if(t&&XM)return XM;if(!t&&ZM)return ZM;const s=document.createElement("div");Object.keys(eee).forEach(i=>{s.style[i]=eee[i]}),t?s.style.overflowY="scroll":s.style.overflowX="scroll",document.body.appendChild(s);let o=0;return t?(o=s.offsetWidth-s.clientWidth,XM=o):(o=s.offsetHeight-s.clientHeight,ZM=o),document.body.removeChild(s),o}function mhe(r){return typeof r=="number"?r-dg.DEFAULT_CELL_PADDING_LEFT-dg.DEFAULT_CELL_PADDING_RIGHT-dg.DEFAULT_CELL_BORDER_WIDTH_LEFT-dg.DEFAULT_CELL_BORDER_WIDTH_RIGHT-XWe("vertical"):void 0}function tee(r,t){return E4({},{table:"table",header:{outer:"table",wrapper:"thead",row:"tr",cell:"th"},body:t?{outer:"div",wrapper:"div",row:"div",cell:"div",colgroup:{wrapper:"div",col:"div"}}:{outer:"table",wrapper:"tbody",row:"tr",cell:"td",colgroup:{wrapper:"colgroup",col:"col"}},footer:{wrapper:"tfoot",row:"tr",cell:"td"}},r)}const a5=new ehe("[@douyinfe/semi-ui Table]");function j9(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!0;const i=[],a=o?Py:YWe;return AP(t,n=>{n=Object.assign({},n);const u=WJ(n,s),f=u!=null&&pS(r,e=>WJ(e,s)===u);f?i.push(a(Object.assign(Object.assign({},f),n))):i.push(a(n))}),i}function ZWe(){return!0}var JWe=ZWe;const eqe=ic(JWe);function tqe(r,t){if(r===t)return!0;if(!r||!t)return!1;const s=Object.keys(r),o=Object.keys(t),i=s.length;if(o.length!==i)return!1;for(let a=0;athis.ref=s,this.handleClick=s=>{this.foundation.handleClick(s);const o=this.adapter.getCache("customCellProps");o&&typeof o.onClick=="function"&&o.onClick(s)},this.ref=Vt.createRef(),this.foundation=new rqe(this.adapter)}shouldComponentUpdate(t){const s=this.props,{column:o,expandIcon:i}=s,a=dGe(o),n=the(o)||i;if((a||n)&&!_0(t,this.props))return!0;{const u=["selected","expanded","expandIcon","disabled"],f=ig(s,u),e=ig(t,u);if(!_0(e,f))return!0}return!1}componentDidUpdate(){this.props.onDidUpdate(this.ref)}getTdProps(){const{record:t,index:s,column:o={},fixedLeft:i,fixedRight:a,width:n,height:u}=this.props;let f={},e={};const{direction:y}=this.context,_=y==="rtl";if(i||typeof i=="number"?lw(f,_?"style.right":"style.left",typeof i=="number"?i:0):(a||typeof a=="number")&&lw(f,_?"style.left":"style.right",typeof a=="number"?a:0),n!=null&&lw(f,"style.width",n),u!=null&&lw(f,"style.height",u),o.onCell){e=o.onCell(t,s),this.adapter.setCache("customCellProps",Object.assign({},e)),f=Object.assign(Object.assign({},f),ig(e,["style","className","onClick"]));const ce=ro(e,"style")||{};f.style=Object.assign(Object.assign({},f.style),ce)}if(o.align){const ce=ihe(o.align,y);f.style=Object.assign(Object.assign({},f.style),{textAlign:ce})}return{tdProps:f,customCellProps:e}}renderText(t){const{record:s,indentSize:o,prefixCls:i,indent:a,index:n,expandIcon:u,renderExpandIcon:f,column:e={}}=this.props,{dataIndex:y,render:_,useFullRender:T}=e;let D,ce,ge;typeof y=="number"?D=ro(s,y):!y||y.length===0?D=s:D=ro(s,y);const Ee=a&&o?ct.createElement("span",{style:{paddingLeft:`${o*a}px`},className:`${i}-row-indent indent-level-${a}`}):null,_e=typeof f=="function"?f(s):u;if(_){const Be={expandIcon:_e};if(T){const{renderSelection:He}=this.context,at=typeof He=="function"?He(s):null;Object.assign(Be,{selection:at,indentText:Ee})}D=_(D,s,n,Be),nee(D)&&(t=D.props?E4(t,D.props):t,ce=t.colSpan,ge=t.rowSpan,D=D.children)}return{text:D,indentText:Ee,rowSpan:ge,colSpan:ce,realExpandIcon:_e,tdProps:t}}renderInner(t,s,o){const{prefixCls:i,isSection:a,expandIcon:n,column:u={}}=this.props,{tableWidth:f,anyColumnFixed:e}=this.context,{useFullRender:y}=u;let _=null;return y?_=t:_=[ct.createElement(Vt.Fragment,{key:"indentText"},s),ct.createElement(Vt.Fragment,{key:"expandIcon"},n?o:null),ct.createElement(Vt.Fragment,{key:"text"},t)],a&&(_=ct.createElement("div",{className:ds(`${i}-section-inner`),style:{width:e?mhe(f):void 0}},_)),_}render(){const{prefixCls:t,column:s={},component:o,fixedLeft:i,fixedRight:a,lastFixedLeft:n,firstFixedRight:u,colIndex:f}=this.props,{direction:e}=this.context,y=e==="rtl",{className:_,ellipsis:T}=s,D=i||typeof i=="number",ce=a||typeof a=="number",{tdProps:ge,customCellProps:Ee}=this.getTdProps(),_e=this.renderText(ge);let{text:Be}=_e;const{indentText:He,rowSpan:at,colSpan:st,realExpandIcon:vt,tdProps:Ot}=_e;let Kt;if(fG(T)&&typeof Be=="string"&&(Kt=Be),at===0||st===0)return null;nee(Be)&&(Be=null);const Bn=this.renderInner(Be,He,vt);let fn,bn,$n,_n;y?(fn=ce,bn=u,$n=D,_n=n):(fn=D,bn=n,$n=ce,_n=u);const Nr=ds(_,`${t}-row-cell`,ro(Ee,"className"),{[`${t}-cell-fixed-left`]:fn,[`${t}-cell-fixed-left-last`]:bn,[`${t}-cell-fixed-right`]:$n,[`${t}-cell-fixed-right-first`]:_n,[`${t}-row-cell-ellipsis`]:T});return ct.createElement(o,Object.assign({role:"gridcell","aria-colindex":f+1,className:Nr,onClick:this.handleClick,title:Kt},Ot,{ref:this.setRef}),Bn)}}bO.contextType=DS;bO.defaultProps={indent:0,indentSize:dg.DEFAULT_INDENT_WIDTH,onClick:so,prefixCls:Qb.PREFIX,component:"td",onDidUpdate:so,column:{}};bO.propTypes={record:be.object,prefixCls:be.string,index:be.number,fixedLeft:be.oneOfType([be.bool,be.number]),lastFixedLeft:be.bool,fixedRight:be.oneOfType([be.bool,be.number]),firstFixedRight:be.bool,indent:be.number,indentSize:be.number,column:be.object,expandIcon:be.any,renderExpandIcon:be.func,hideExpandedColumn:be.bool,component:be.any,onClick:be.func,onDidUpdate:be.func,isSection:be.bool,width:be.oneOfType([be.string,be.number]),height:be.oneOfType([be.string,be.number]),selected:be.bool,expanded:be.bool,colIndex:be.number};var ree=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.ref.current=s},this.renderExpandIcon=s=>{const{renderExpandIcon:o}=this.props;return o(s,!0)},this.handleMouseEnter=s=>{this.foundation.handleMouseEnter(s);const o=this.adapter.getCache("customRowProps");typeof(o==null?void 0:o.onMouseEnter)=="function"&&o.onMouseEnter(s)},this.handleMouseLeave=s=>{this.foundation.handleMouseLeave(s);const o=this.adapter.getCache("customRowProps");typeof(o==null?void 0:o.onMouseLeave)=="function"&&o.onMouseLeave(s)},this.handleClick=s=>{this.foundation.handleClick(s);const o=this.adapter.getCache("customRowProps");o&&typeof o.onClick=="function"&&o.onClick(s)},this.ref=Vt.createRef(),this.foundation=new nqe(this.adapter)}componentDidMount(){const{onRow:t,index:s,record:o}=this.props;if(typeof this.adapter.getCache("customRowProps")>"u"){const a=t(o,s)||{},n=ree(a,["className","style"]);this.adapter.setCache("customRowProps",Object.assign({},n))}}shouldComponentUpdate(t){const s=["cellWidths"];return!tqe(ig(t,s),ig(this.props,s))||!_0(I1(t,s),I1(this.props,s))}renderCells(){const{columns:t,record:s,index:o,prefixCls:i,fixed:a,components:n,expandableRow:u,level:f,expandIcon:e,rowExpandable:y,isSection:_,expandedRow:T,virtualized:D,indentSize:ce,hideExpandedColumn:ge,cellWidths:Ee,selected:_e,expanded:Be,disabled:He,onDidUpdate:at}=this.props,st=ro(n,"body.cell",Sc.DEFAULT_COMPONENTS.body.cell),vt=[],Ot=y(s);let Kt=0;return rb(t,(sn,Bn)=>{const fn=ro(sn,"key"),bn={};if(a!=="right"&&(cGe(fn)&&Kt++,u&&Bn===Kt&&(bn.renderExpandIcon=this.renderExpandIcon,(ge||_)&&(bn.expandIcon=e??!0)),f!=null&&Bn===Kt&&(bn.indent=f,!u&&ge&&(bn.indent=f+1))),the(sn)&&!Ot)vt.push(ct.createElement(bO,{key:Bn,colIndex:Bn,isSection:_}));else if(!fGe(sn)){const $n={};st!==Sc.DEFAULT_COMPONENTS.body.cell&&D&&!T&&($n.width=ro(Ee,Bn)),vt.push(ct.createElement(bO,Object.assign({colIndex:Bn},bn,$n,{hideExpandedColumn:ge,indentSize:ce,isSection:_,prefixCls:`${i}`,column:sn,key:Bn,index:o,record:s,component:st,fixedLeft:MB(sn)&&cT(Ee,0,Bn),lastFixedLeft:F9(t,sn),fixedRight:UB(sn)&&cT(Ee,Bn+1),firstFixedRight:M9(t,sn),selected:_e,expanded:Be,disabled:He,onDidUpdate:at})))}}),vt}render(){const{style:t}=this.props,{components:s,prefixCls:o,selected:i,onRow:a,index:n,className:u,replaceClassName:f,record:e,hovered:y,expanded:_,displayNone:T,expandableRow:D,level:ce,expandedRow:ge,isSection:Ee}=this.props,_e=s.body.row,Be=a(e,n)||{},{className:He,style:at}=Be,st=ree(Be,["className","style"]);this.adapter.setCache("customRowProps",Object.assign({},st));const vt=Object.assign(Object.assign({},t),at),Ot=typeof f=="string"&&f.length?f:ds(u,`${o}-row`,{[`${o}-row-selected`]:i,[`${o}-row-expanded`]:_,[`${o}-row-hovered`]:y,[`${o}-row-hidden`]:T},He),Kt={};return typeof n=="number"&&(Kt["aria-rowindex"]=n+1),D&&(Kt["aria-expanded"]=_),(_||ge)&&(Kt["aria-level"]=2),typeof ce=="number"&&(Kt["aria-level"]=ce+1),Ee&&(Kt["aria-level"]=1),ct.createElement(_e,Object.assign({role:"row"},Kt,st,{style:vt,className:Ot,ref:this._cacheNode,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onClick:this.handleClick}),this.renderCells())}}j4.propTypes=ghe;j4.defaultProps={columns:[],rowExpandable:eqe,components:{body:{row:"tr",cell:"td"}},prefixCls:Qb.PREFIX,onRow:so,onRowClick:so,onRowDoubleClick:so,onRowMouseEnter:so,onRowMouseLeave:so,onHover:so,onDidUpdate:so,visible:!0,hovered:!1,selected:!1,disabled:!1};var sqe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i({props:st,children:ct.createElement("div",{className:ds(`${o}-expand-inner`),style:{width:_e?mhe(Ee):void 0}},at)})},vt)],Kt=ds(i,`${o}-row-expand`),sn=Be(Ot);return ct.createElement(j4,{style:_,components:y,className:Kt,expandedRow:!0,renderExpandIcon:u,rowKey:`${t.key}-expanded-row`,columns:Ot,store:e,virtualized:T,indentSize:D,cellWidths:sn,displayNone:ge})}}_F.contextType=DS;_F.propTypes={cellWidths:be.array.isRequired,className:be.string,columns:be.array,components:be.object,defaultExpandAllRows:be.bool,defaultExpandedRowKeys:be.array,expandIcon:be.oneOfType([be.object,be.node,be.func]),expandRowByClick:be.bool,expanded:be.bool,expandedRowKeys:be.array,expandedRowRender:be.func,indentSize:be.number,index:be.oneOfType([be.string,be.number]),onExpand:be.func,onExpandedRowsChange:be.func,prefixCls:be.string,record:be.object,renderExpandIcon:be.func,store:be.object,style:be.object,virtualized:be.oneOfType([be.bool,be.object])};_F.defaultProps={record:{},prefixCls:Qb.PREFIX};var oqe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{typeof i=="function"&&o&&i(!n,a,f),typeof u.onClick=="function"&&u.onClick(f)}})},this.collectGroupedData=()=>{const{data:s,group:o,rowKey:i}=this.props;return Array.isArray(s)&&s.length&&RE(o)?s.filter(a=>{const n=typeof i=="function"?i(a):ro(a,i);return n!=null&&n!==""&&o.has(n)}):[]},this.renderExpandIcon=s=>{const{renderExpandIcon:o,groupKey:i}=this.props;return typeof o=="function"?o(s,!1,i):null}}isInnerColumnKey(t){return t!=null?[Sc.DEFAULT_KEY_COLUMN_EXPAND,Sc.DEFAULT_KEY_COLUMN_SELECTION].includes(t):!1}render(){const{record:t,columns:s=[],prefixCls:o,className:i,expanded:a,renderGroupSection:n,components:u,index:f,store:e,group:y,groupKey:_,virtualized:T,style:D}=this.props,ce={};let ge={},Ee=null;const _e=typeof n=="function"?n(_,[...y]):null;if(Vt.isValidElement(_e))Ee=_e;else if(_e&&Object.prototype.toString.call(_e)==="[object Object]"){const vt=_e,{children:Ot}=vt,Kt=oqe(vt,["children"]);Ee=Ot,ge=Object.assign({},Kt)}ce.colSpan=cG(s).length;const Be=[Object.assign({render:()=>({props:ce,children:Ee})},ge)],He=ds(i,`${o}-row-section`,{on:a}),{getCellWidths:at}=this.context,st=at(Be,null,!0);return ct.createElement(j4,{components:u,virtualized:T,index:f,onRow:this.onRow,expanded:a,expandIcon:!0,isSection:!0,record:t,replaceClassName:He,expandableRow:!0,renderExpandIcon:this.renderExpandIcon,rowKey:_,columns:Be,store:e,style:D,cellWidths:st})}}TF.contextType=DS;TF.propTypes=bhe;TF.defaultProps={prefixCls:Qb.PREFIX,components:{body:{row:"tr",cell:"td"}}};const iqe=TF;var see=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{forwardedRef:f}=this.props;this.ref.current=u,this.foundation.observeBodyResize(u),typeof f=="function"?f(u):f&&typeof f=="object"&&(f.current=u)},this.itemSize=u=>{const{virtualized:f,size:e}=this.props,{virtualizedData:y}=this.state,_=ro(y,u),T=mGe(e,_.sectionRow),D=ro(f,"itemSize",T.height);let ce=D;return typeof D=="function"&&(ce=D(u,{expandedRow:ro(_,"expandedRow",!1),sectionRow:ro(_,"sectionRow",!1)})),cero(f,[u,"key"],u),this.handleRowClick=(u,f,e)=>{const{handleRowExpanded:y}=this.context;y(!e,u,f)},this.handleVirtualizedScroll=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const f=ro(o.props.virtualized,"onScroll");typeof f=="function"&&f(u)},this.handleVirtualizedBodyScroll=u=>{const{handleBodyScroll:f}=this.props,e=ro(u,"nativeEvent.target.scrollLeft"),y=ro(u,"nativeEvent.target.scrollTop");y===this.state.cache.virtualizedScrollTop&&this.handleVirtualizedScroll({horizontalScrolling:!0}),this.state.cache.virtualizedScrollLeft=e,this.state.cache.virtualizedScrollTop=y,typeof f=="function"&&f(u)},this.getVirtualizedRowWidth=()=>{const{getCellWidths:u}=this.context,{columns:f}=this.props,e=u(f);return cT(e,0,WR(f))},this.renderVirtualizedRow=u=>{const{index:f,style:e}=u,{virtualizedData:y,cachedExpandBtnShouldInRow:_}=this.state,{flattenedColumns:T}=this.context,D=ro(y,[f],{}),{key:ce,parentKeys:ge,expandedRow:Ee,sectionRow:_e}=D,Be=see(D,["key","parentKeys","expandedRow","sectionRow"]),He=this.getVirtualizedRowWidth(),at=_,st=Object.assign(Object.assign(Object.assign(Object.assign({},this.props),{style:Object.assign(Object.assign({},e),{width:He})}),Be),{columns:T,index:f,expandBtnShouldInRow:at});return _e?this.renderSectionRow(st):Ee?this.renderExpandedRow(st):this.renderBaseRow(st)},this.renderTbody=ct.forwardRef(function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},f=arguments.length>1?arguments[1]:void 0;return ct.createElement("div",Object.assign({},u,{onScroll:function(){u.onScroll&&u.onScroll(...arguments)},className:ds(u.className,`${o.props.prefixCls}-tbody`),style:Object.assign({},u.style),ref:f}))}),this.renderOuter=ct.forwardRef((u,f)=>{const{children:e}=u,y=see(u,["children"]),{handleWheel:_,prefixCls:T,emptySlot:D,dataSource:ce}=this.props,ge=this.getVirtualizedRowWidth(),Ee=ds(`${T}`,`${T}-fixed`);return ct.createElement("div",Object.assign({},y,{ref:f,onWheel:function(){_&&_(...arguments),y.onWheel&&y.onWheel(...arguments)},onScroll:function(){o.handleVirtualizedBodyScroll(...arguments),y.onScroll&&y.onScroll(...arguments)}}),ct.createElement("div",{style:{width:ge},className:Ee},e),WR(ce)===0&&D)}),this.onItemsRendered=u=>{this.state.cache.virtualizedScrollLeft&&this.ref.current&&(this.ref.current.scrollLeft=this.state.cache.virtualizedScrollLeft)},this.renderVirtualizedBody=u=>{const{scroll:f,prefixCls:e,virtualized:y,columns:_}=this.props,{virtualizedData:T}=this.state,{getCellWidths:D}=this.context,ce=D(_);if(!WR(ce))return null;const ge=ro(f,"y"),Ee=typeof ge=="number",_e=Ee?ge:600;Ee||a5.warn('You have to specific "scroll.y" which must be a number for table virtualization!');const Be={width:"100%",height:T!=null&&T.length?_e:null,overflowX:"auto",overflowY:"auto"},He=ds(`${e}-body`);return ct.createElement(J9e,Object.assign({},typeof y=="object"?y:{},{initialScrollOffset:this.state.cache.virtualizedScrollTop,onScroll:this.handleVirtualizedScroll,onItemsRendered:this.onItemsRendered,ref:this.listRef,className:He,outerRef:this.forwardRef,height:T!=null&&T.length?_e:0,width:Be.width,itemData:T,itemSize:this.itemSize,itemCount:T.length,itemKey:this.itemKey,innerElementType:this.renderTbody,outerElementType:this.renderOuter,style:Object.assign(Object.assign({},Be),{direction:u}),direction:u}),this.renderVirtualizedRow)},this.renderSectionRow=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{groupKey:void 0};const{dataSource:f,rowKey:e,group:y,groupKey:_,index:T}=u,D=Object.keys(bhe),ce=I1(u,D),{handleRowExpanded:ge}=o.context;return ct.createElement(iqe,Object.assign({},ce,{record:{groupKey:_,records:[...y].map(Ee=>qJ(f,Ee,e))},index:T,onExpand:ge,data:f,key:_||T}))},this.renderExpandedRow=function(){let u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{renderExpandIcon:()=>null};const{style:f,components:e,renderExpandIcon:y,expandedRowRender:_,record:T,columns:D,expanded:ce,index:ge,rowKey:Ee,virtualized:_e,displayNone:Be}=u;let He=jE(T,Ee);He==null&&(He=ge);const{flattenedColumns:at,getCellWidths:st}=o.context;return at!==o.flattenedColumns&&(o.flattenedColumns=at,o.cellWidths=st(at)),ct.createElement(_F,{style:f,components:e,renderExpandIcon:y,expandedRowRender:_,record:T,columns:D,expanded:ce,index:ge,virtualized:_e,key:nhe(He),cellWidths:o.cellWidths,displayNone:Be})},this.renderGroupedRows=()=>{const{groups:u,dataSource:f,rowKey:e,expandedRowKeys:y,keepDOM:_}=this.props,{flattenedColumns:T}=this.context,D=new Map,ce=[];u!=null&&Array.isArray(f)&&f.length&&f.forEach(Ee=>{const _e=jE(Ee,e);u.forEach((Be,He)=>{if(Be.has(_e))return D.has(He)||D.set(He,new Set([])),D.get(He).add(_e),!1})});let ge=-1;return D.forEach((Ee,_e)=>{const Be=YM(y,_e);if(ce.push(this.renderSectionRow(Object.assign(Object.assign({},this.props),{columns:T,index:++ge,group:Ee,groupKey:_e,expanded:Be}))),Be||_){const He=[];Ee.forEach(at=>{const st=qJ(f,at,e);st!=null&&He.push(st)}),ce.push(this.renderBodyRows(He,void 0,[],!Be))}}),ce},this.renderBody=u=>{const{scroll:f,prefixCls:e,columns:y,components:_,fixed:T,handleWheel:D,headerRef:ce,handleBodyScroll:ge,anyColumnFixed:Ee,showHeader:_e,emptySlot:Be,includeHeader:He,dataSource:at,onScroll:st,groups:vt,expandedRowRender:Ot,tableLayout:Kt}=this.props,sn=ro(f,"x"),Bn=ro(f,"y"),fn={},bn={},$n=ro(_,"body.outer","table"),_n=ro(_,"body.wrapper")||"tbody";Bn&&(fn.maxHeight=Bn),sn&&(bn.width=sn),Ee&&WR(at)&&(fn.overflow="auto",fn.WebkitTransform="translate3d (0, 0, 0)");const Nr=ct.createElement(SF,{components:ro(_,"body"),columns:y,prefixCls:e}),Cr=`${e}-body`,Dr=ct.createElement("div",{key:"bodyTable",className:Cr,style:fn,ref:this.forwardRef,onWheel:D,onScroll:ge},ct.createElement($n,{role:aO(vt)||Mc(Ot)||yGe({dataSource:at})?"treegrid":"grid","aria-rowcount":at&&at.length,"aria-colcount":y&&y.length,style:bn,className:ds(e,{[`${e}-fixed`]:Kt==="fixed"})},Nr,He&&_e?ct.createElement(uhe,Object.assign({},this.props,{ref:ce,components:_,columns:y})):null,ct.createElement(_n,{className:`${e}-tbody`,onScroll:st},aO(vt)?this.renderGroupedRows():this.renderBodyRows(at))),Be);return T&&y.length?ct.createElement("div",{key:"bodyTable",className:`${e}-body-outer`},Dr):Dr},this.ref=ct.createRef(),this.state={virtualizedData:[],cache:{virtualizedScrollTop:null,virtualizedScrollLeft:null},cachedExpandBtnShouldInRow:null,cachedExpandRelatedProps:[]},this.listRef=ct.createRef();const{getVirtualizedListRef:i,flattenedColumns:a,getCellWidths:n}=s;i&&(t.virtualized?i(this.listRef):console.warn("getVirtualizedListRef only works with virtualized. See https://semi.design/en-US/show/table for more information.")),this.foundation=new zWe(this.adapter),this.flattenedColumns=a,this.cellWidths=n(a),this.observer=null}get adapter(){return Object.assign(Object.assign({},super.adapter),{setVirtualizedData:(t,s)=>this.setState({virtualizedData:t},s),setCachedExpandBtnShouldInRow:t=>this.setState({cachedExpandBtnShouldInRow:t}),setCachedExpandRelatedProps:t=>this.setState({cachedExpandRelatedProps:t}),observeBodyResize:t=>{const{setBodyHasScrollbar:s}=this.context,o=()=>{const i=()=>{const{offsetWidth:n,clientWidth:u}=t,f=u{const t=this.ref.current;this.observer&&(this.observer.unobserve(t),this.observer=null)}})}componentDidUpdate(t,s){const{virtualized:o,dataSource:i,expandedRowKeys:a,columns:n,scroll:u}=this.props;o&&(t.dataSource!==i||t.expandedRowKeys!==a||t.columns!==n)&&this.foundation.initVirtualizedData();const e=Sc.EXPAND_RELATED_PROPS.map(T=>ro(this.props,T,void 0));_0(e,s.cachedExpandRelatedProps)||this.foundation.initExpandBtnShouldInRow(e);const y=ro(u,"y"),_=this.ref.current;y&&y!==ro(t,"scroll.y")&&this.foundation.observeBodyResize(_)}renderBaseRow(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{rowKey:s,columns:o,expandedRowKeys:i,rowExpandable:a,record:n,index:u,level:f,expandBtnShouldInRow:e,selectedRowKeysSet:y,disabledRowKeysSet:_,expandRowByClick:T}=t,D=Object.keys(ghe),ce=I1(t,D);let ge=jE(n,s);ge==null&&(ge=u);const Ee=YM(i,ge),_e=a&&a(n),Be={level:void 0,expanded:Ee};(_e||e)&&(Be.level=f,Be.expandableRow=_e,T&&(Be.onRowClick=this.handleRowClick));const He={selected:hGe(y,ge),disabled:AGe(_,ge)},{getCellWidths:at}=this.context,st=at(o,null,!0);return ct.createElement(j4,Object.assign({},ce,Be,He,{key:ge,rowKey:ge,cellWidths:st}))}renderBodyRows(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;const{rowKey:a,expandedRowRender:n,expandedRowKeys:u,childrenRecordName:f,rowExpandable:e,keepDOM:y}=this.props,_=typeof n=="function",T=this.state.cachedExpandBtnShouldInRow,{flattenedColumns:D}=this.context;return rb(t,(ce,ge)=>{let Ee=jE(ce,a);Ee==null&&(Ee=ge);const _e=ro(ce,f),Be=!!(Array.isArray(_e)&&_e.length);o.push(this.renderBaseRow(Object.assign(Object.assign({},this.props),{columns:D,expandBtnShouldInRow:T,displayNone:i,record:ce,key:Ee,level:s,index:ge})));const He=YM(u,Ee),at=He||y;if(_&&e&&e(ce)&&at){const st=this.renderExpandedRow(Object.assign(Object.assign({},this.props),{columns:D,level:s,index:ge,record:ce,expanded:He,displayNone:i||!He}));TL(st)||o.push(st)}if(Be&&at){const st=this.renderBodyRows(_e,s+1,[],i||!He);o.push(...st)}}),o}render(){const{virtualized:t}=this.props,{direction:s}=this.context;return t?this.renderVirtualizedBody(s):this.renderBody(s)}}bG.contextType=DS;bG.propTypes={anyColumnFixed:be.bool,childrenRecordName:be.string,columns:be.array,components:be.object,dataSource:be.array,disabledRowKeysSet:be.instanceOf(Set).isRequired,emptySlot:be.node,expandRowByClick:be.bool,expandedRowKeys:be.array,expandedRowRender:be.func,fixed:be.oneOfType([be.string,be.bool]),forwardedRef:be.oneOfType([be.object,be.func]),groups:be.instanceOf(Map),handleBodyScroll:be.func,handleWheel:be.func,headerRef:be.oneOfType([be.object,be.func]),includeHeader:be.bool,onScroll:be.func,prefixCls:be.string,renderExpandIcon:be.func,rowExpandable:be.func,rowKey:be.oneOfType([be.string,be.bool,be.func]),scroll:be.object,selectedRowKeysSet:be.instanceOf(Set).isRequired,showHeader:be.bool,size:be.string,store:be.object,virtualized:be.oneOfType([be.bool,be.object])};const aqe=ct.forwardRef(function(t,s){return ct.createElement(bG,Object.assign({},t,{forwardedRef:s}))});var lqe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.bodyWrapRef.current&&(this.bodyWrapRef.current.scrollTop=0)},setSelectedRowKeys:s=>{this.setState({rowSelection:Object.assign(Object.assign({},this.state.rowSelection),{selectedRowKeys:[...s],selectedRowKeysSet:new Set(s)})})},setDisabledRowKeys:s=>{this.setState({disabledRowKeys:s,disabledRowKeysSet:new Set(s)})},setCurrentPage:s=>{const{pagination:o}=this.state;typeof o=="object"?this.setState({pagination:Object.assign(Object.assign({},o),{currentPage:s})}):this.setState({pagination:{currentPage:s}})},setPagination:s=>this.setState({pagination:s}),setGroups:s=>this.setState({groups:s}),setDataSource:s=>this.setState({dataSource:s}),setExpandedRowKeys:s=>this.setState({expandedRowKeys:[...s]}),setQuery:function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=[...t.state.queries];o=she(s,o),t.setState({queries:o})},setQueries:s=>this.setState({queries:s}),setFlattenData:s=>this.setState({flattenData:s}),setAllRowKeys:s=>this.setState({allRowKeys:s}),setHoveredRowKey:s=>{this.store.setState({hoveredRowKey:s})},setCachedFilteredSortedDataSource:s=>{this.cachedFilteredSortedDataSource=s},setCachedFilteredSortedRowKeys:s=>{this.cachedFilteredSortedRowKeys=s,this.cachedFilteredSortedRowKeysSet=new Set(s)},setAllDisabledRowKeys:s=>{const o=new Set(s);this.setState({allDisabledRowKeys:s,allDisabledRowKeysSet:o})},getCurrentPage:()=>ro(this.state,"pagination.currentPage",1),getCurrentPageSize:()=>ro(this.state,"pagination.pageSize",dg.DEFAULT_PAGE_SIZE),getCachedFilteredSortedDataSource:()=>this.cachedFilteredSortedDataSource,getCachedFilteredSortedRowKeys:()=>this.cachedFilteredSortedRowKeys,getCachedFilteredSortedRowKeysSet:()=>this.cachedFilteredSortedRowKeysSet,getAllDisabledRowKeys:()=>this.state.allDisabledRowKeys,getAllDisabledRowKeysSet:()=>this.state.allDisabledRowKeysSet,notifyFilterDropdownVisibleChange:(s,o)=>this._invokeColumnFn(o,"onFilterDropdownVisibleChange",s),notifyChange:function(){return t.props.onChange(...arguments)},notifyExpand:function(){return t.props.onExpand(...arguments)},notifyExpandedRowsChange:function(){return t.props.onExpandedRowsChange(...arguments)},notifySelect:function(){for(var s=arguments.length,o=new Array(s),i=0;iFB(this.getColumns(s||this.props.columns,this.props.children),o=>!!o.fixed),useFixedHeader:()=>{const{scroll:s,sticky:o}=this.props;return!!(ro(s,"y")||o)},getTableLayout:()=>{let s=!1;const{flattenColumns:o}=this.state;return Array.isArray(o)&&(s=o.some(i=>!!i.ellipsis||!!i.fixed)),this.adapter.useFixedHeader()&&(s=!0),s?"fixed":"auto"},setHeadWidths:function(s){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;uGe(t.state.headWidths[o],s)||t.setState(i=>{const a=[...i.headWidths];return a[o]=[...s],{headWidths:a}})},getHeadWidths:function(){let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0;return t.state.headWidths.length&&typeof s=="number"?(t.state.headWidths[s]||[]).map(i=>i.width):[]},getCellWidths:function(s){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return Array.isArray(s)&&s.length&&(o=o==null&&t.state.headWidths.length?PVe(t.state.headWidths):[],Array.isArray(o)&&o.length)?s.reduce((a,n)=>{const u=n.key===Sc.DEFAULT_KEY_COLUMN_SCROLLBAR&&i?null:pS(o,f=>f&&f.key!=null&&f.key===n.key);return u&&a.push(u.width),a},[]):[]},mergedRowExpandable:s=>{const{expandedRowRender:o,childrenRecordName:i,rowExpandable:a}=this.props,n=ro(s,i),u=typeof o=="function",f=typeof a=="function",e=Array.isArray(n)&&n.length,y=f&&a(s);return(u||e)&&(!f||y)||!(u||e)&&y},isAnyColumnUseFullRender:s=>FB(s,o=>!!o.useFullRender),getNormalizeColumns:()=>this.normalizeColumns,getHandleColumns:()=>this.handleColumns,getMergePagination:()=>this.mergePagination,setBodyHasScrollbar:s=>{s!==this.state.bodyHasScrollBar&&this.setState({bodyHasScrollBar:s})},stopPropagation(s){s&&typeof s=="object"&&(typeof s.stopPropagation=="function"&&s.stopPropagation(),s.nativeEvent&&typeof s.nativeEvent.stopPropagation=="function"?s.nativeEvent.stopPropagation():typeof s.stopImmediatePropagation=="function"&&s.stopImmediatePropagation())}})}constructor(t,s){var o;super(t),o=this,this._warnIfNoKey=()=>{(this.props.rowSelection||this.props.expandedRowRender)&&FB(this.props.dataSource,y=>this.foundation.getRecordKey(y)==null)&&a5.error('You must specify a key for each element in the dataSource or use "rowKey" to specify an attribute name as the primary key!')},this._invokeRowSelection=function(y){const _=ro(o.state,["rowSelection",y]);if(typeof _=="function"){for(var T=arguments.length,D=new Array(T>1?T-1:0),ce=1;ce2?T-2:0),ce=2;ce{this.headerWrapRef.current=y},this.getCurrentPageData=()=>{const y=this.foundation.getCurrentPageData(),_=["dataSource","groups"].reduce((T,D)=>(y[D]&&(T[D]=y[D]),T),{});return Py(_)},this.getColumns=(y,_)=>!Array.isArray(y)||!y||!y.length?wP(_):y,this.getCellWidths=function(){return o.foundation.getCellWidths(...arguments)},this.setHeadWidths=function(){return o.foundation.setHeadWidths(...arguments)},this.getHeadWidths=function(){return o.foundation.getHeadWidths(...arguments)},this.mergedRowExpandable=function(){return o.foundation.mergedRowExpandable(...arguments)},this.setBodyHasScrollbar=function(){return o.foundation.setBodyHasScrollbar(...arguments)},this.handleWheel=y=>{const{scroll:_={}}=this.props;if(window.navigator.userAgent.match(/Trident\/7\./)&&_.y){y.preventDefault();const T=y.deltaY,{target:D}=y,ce=this.bodyWrapRef.current;let ge=0;this.lastScrollTop?ge=this.lastScrollTop+T:ge=T,ce&&D!==ce&&(ce.scrollTop=ge)}},this.handleBodyScrollLeft=y=>{if(y.currentTarget!==y.target)return;const{target:_}=y,T=this.headerWrapRef.current,D=this.bodyWrapRef.current;_.scrollLeft!==this.lastScrollLeft&&(_===D&&T?T.scrollLeft=_.scrollLeft:_===T&&D&&(D.scrollLeft=_.scrollLeft),this.setScrollPositionClassName()),this.lastScrollLeft=_.scrollLeft},this.handleWindowResize=()=>{this.syncTableWidth(),this.setScrollPositionClassName()},this.handleBodyScrollTop=y=>{const{target:_}=y;if(y.currentTarget!==_)return;const{scroll:T={}}=this.props,D=this.headerWrapRef.current,ce=this.bodyWrapRef.current;if(_.scrollTop!==this.lastScrollTop&&T.y&&_!==D){const{scrollTop:ge}=_;ce&&_!==ce&&(ce.scrollTop=ge)}this.lastScrollTop=_.scrollTop},this.handleBodyScroll=y=>{this.handleBodyScrollLeft(y),this.handleBodyScrollTop(y)},this.setScrollPosition=y=>{const{prefixCls:_}=this.props,T=[`${_}-scroll-position-both`,`${_}-scroll-position-middle`,`${_}-scroll-position-left`,`${_}-scroll-position-right`];this.scrollPosition=y;const D=this.wrapRef.current;if(D&&D.nodeType)if(y==="both"){const ce=[`${_}-scroll-position-left`,`${_}-scroll-position-right`];D.classList.remove(...fO(T,ce)),D.classList.add(...ce)}else{const ce=[`${_}-scroll-position-${y}`];D.classList.remove(...fO(T,ce)),D.classList.add(...ce)}},this.setScrollPositionClassName=()=>{const y=this.bodyWrapRef.current;if(y&&y.children&&y.children.length){const _=y.scrollLeft===0,T=Math.abs(y.scrollLeft)+1>=y.children[0].getBoundingClientRect().width-y.getBoundingClientRect().width;_&&T?this.setScrollPosition("both"):_?this.setScrollPosition("left"):T?this.setScrollPosition("right"):this.scrollPosition!=="middle"&&this.setScrollPosition("middle")}},this.syncTableWidth=()=>{this.rootWrapRef&&this.rootWrapRef.current&&this.setState({tableWidth:this.rootWrapRef.current.getBoundingClientRect().width})},this.renderSelection=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;const{rowSelection:T,allDisabledRowKeysSet:D}=o.state;if(T&&typeof T=="object"){const{selectedRowKeys:ce=[],selectedRowKeysSet:ge=new Set,getCheckboxProps:Ee,disabled:_e}=T;if(_){const Be=ro(T,"key",Sc.DEFAULT_KEY_COLUMN_SELECTION),He=o.cachedFilteredSortedRowKeys,at=o.cachedFilteredSortedRowKeysSet,st=o.foundation.allIsSelected(ge,D,He),vt=o.foundation.hasRowSelected(ce,at);return ct.createElement(CP,{"aria-label":`${st?"Deselect":"Select"} all rows`,disabled:_e,key:Be,selected:st,indeterminate:vt&&!st,onChange:(Ot,Kt)=>{o.toggleSelectAllRow(Ot,Kt)}})}else{const Be=o.foundation.getRecordKey(y),He=ge.has(Be),at=()=>typeof Ee=="function"?Ee(y):{};return ct.createElement(CP,{"aria-label":`${He?"Deselect":"Select"} this row`,getCheckboxProps:at,selected:He,onChange:(st,vt)=>o.toggleSelectRow(st,Be,vt)})}}return null},this.renderRowSelectionCallback=function(y){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return o.renderSelection(_)},this.renderTitleSelectionCallback=()=>this.renderSelection(null,!0),this.normalizeSelectionColumn=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{rowSelection:_,prefixCls:T}=y;let D={};if(_){const ce=["selectedRowKeys","selectedRowKeysSet"];D={key:Sc.DEFAULT_KEY_COLUMN_SELECTION},ev(_)&&(D=Object.assign(Object.assign({},D),ig(_,ce))),D.className=ds(D.className,`${T}-column-selection`),D.title=o.renderTitleSelectionCallback,D.render=o.renderRowSelectionCallback}return D},this.normalizeScrollbarColumn=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{scrollbarWidth:_=0}=y;return{key:Sc.DEFAULT_KEY_COLUMN_SCROLLBAR,width:_,fixed:"right"}},this.renderExpandIcon=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;const{expandedRowKeys:D}=o.state,{expandIcon:ce}=o.props,ge=typeof T=="string"||typeof T=="number"?T:o.foundation.getRecordKey(y);return ct.createElement(AG,{key:ge,componentType:_?"tree":"expand",expanded:aP(D,ge),expandIcon:ce,onClick:(Ee,_e)=>o.handleRowExpanded(Ee,ge,_e)})},this.handleRowExpanded=function(){return o.foundation.handleRowExpanded(...arguments)},this.normalizeExpandColumn=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},_=null;const{prefixCls:T,expandCellFixed:D,expandIcon:ce}=y;return _={fixed:D,key:Sc.DEFAULT_KEY_COLUMN_EXPAND},_.className=ds(_.className,`${T}-column-expand`),_.render=ce!==!1?function(){let ge=arguments.length>1?arguments[1]:void 0;return o.adapter.mergedRowExpandable(ge)?o.renderExpandIcon(ge):null}:()=>null,_},this.addFnsInColumn=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{prefixCls:_}=o.props;if(y&&(y.sorter||y.filters||y.useFullRender)){let T=!1;const{dataIndex:D,title:ce,useFullRender:ge}=y,Ee=o.foundation.getQuery(D),_e={},Be=[];ge&&(_e.selection=o.renderSelection(null,!0));const He=ro(Ee,"sortOrder"),at=ro(Ee,"defaultSortOrder",!1),st=o.foundation.isSortOrderValid(He)?He:at,vt=fG(y.ellipsis),Ot=typeof ce!="function"&&ct.createElement("span",{className:`${_}-row-head-title`,key:Sc.DEFAULT_KEY_COLUMN_TITLE,title:vt&&typeof ce=="string"?ce:void 0},ce);if(typeof y.sorter=="function"||y.sorter===!0){const bn=ct.createElement(hG,{key:Sc.DEFAULT_KEY_COLUMN_SORTER,sortOrder:st,sortIcon:y.sortIcon,onClick:$n=>o.foundation.handleSort(y,$n),title:Ot});ge&&(_e.sorter=bn),T=!0,Be.push(bn)}else Be.push(Ot);const Kt=ro(Ee,"filteredValue"),sn=ro(Ee,"defaultFilteredValue"),Bn=Kt||sn;if(Array.isArray(y.filters)&&y.filters.length||Vt.isValidElement(y.filterDropdown)){const bn=ct.createElement(WGe,Object.assign({key:Sc.DEFAULT_KEY_COLUMN_FILTER},Ee,{filteredValue:Bn,onFilterDropdownVisibleChange:$n=>o.foundation.toggleShowFilter(D,$n),onSelect:$n=>o.foundation.handleFilterSelect(D,$n)}));ge&&(_e.filter=bn),T=!0,Be.push(bn)}const fn=typeof ce=="function"?()=>ce(_e):T?ct.createElement("div",{className:`${_}-operate-wrapper`},Be):Be;y=Object.assign(Object.assign({},y),{title:fn})}return y},this.toggleSelectRow=(y,_,T)=>{this.foundation.handleSelectRow(_,y,T)},this.toggleSelectAllRow=(y,_)=>{this.foundation.handleSelectAllRow(y,_)},this.renderPagination=(y,_)=>{if(!y)return null;const T=this.foundation.memoizedPagination(y);return ct.createElement(Bm,{componentName:"Table"},D=>{const ce=this.foundation.formatPaginationInfo(T,D.pageText);return ct.createElement(dG,{info:ce,pagination:T,renderPagination:_})})},this.renderTitle=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{title:_}=y;const{prefixCls:T,dataSource:D}=y;return typeof _=="function"&&(_=_(D)),Vt.isValidElement(_)||typeof _=="string"?ct.createElement("div",{className:`${T}-title`,"x-semi-prop":"title"},_):null},this.renderEmpty=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const{prefixCls:_,empty:T,dataSource:D}=y,ce=`${_}-placeholder`;return o.foundation.isEmpty(D)?ct.createElement(Bm,{componentName:"Table",key:"emptyText"},(Ee,_e)=>ct.createElement("div",{className:ce},ct.createElement("div",{className:`${_}-empty`,"x-semi-prop":"empty"},T||Ee.emptyText))):null},this.renderFooter=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{footer:_}=y;const{prefixCls:T,dataSource:D}=y;return typeof _=="function"&&(_=_(D)),Vt.isValidElement(_)||typeof _=="string"?ct.createElement("div",{className:`${T}-footer`,key:"footer","x-semi-prop":"footer"},_):null},this.renderMainTable=y=>{const _=this.adapter.useFixedHeader(),T=this.renderEmpty(y);return[this.renderTable(Object.assign(Object.assign({},y),{fixed:!1,useFixedHeader:_,headerRef:this._cacheHeaderRef,bodyRef:this.bodyWrapRef,includeHeader:!_,emptySlot:T})),this.renderFooter(y)]},this.renderTable=y=>{const{columns:_,filteredColumns:T,fixed:D,useFixedHeader:ce,scroll:ge,prefixCls:Ee,anyColumnFixed:_e,includeHeader:Be,showHeader:He,components:at,headerRef:st,bodyRef:vt,onHeaderRow:Ot,rowSelection:Kt,dataSource:sn,bodyHasScrollBar:Bn,disabledRowKeysSet:fn,sticky:bn}=y,$n=ro(Kt,"selectedRowKeysSet",new Set),_n=this.adapter.getTableLayout(),Nr=D||ce?ct.createElement(XGe,{key:"head",tableLayout:_n,ref:st,columns:T,prefixCls:Ee,fixed:D,handleBodyScroll:this.handleBodyScrollLeft,components:at,scroll:ge,showHeader:He,selectedRowKeysSet:$n,onHeaderRow:Ot,dataSource:sn,bodyHasScrollBar:Bn,sticky:bn}):null,Cr=ct.createElement(aqe,Object.assign({},ig(y,["rowSelection","headWidths"]),{key:"body",ref:vt,columns:T,fixed:D,prefixCls:Ee,handleWheel:this.handleWheel,handleBodyScroll:this.handleBodyScroll,anyColumnFixed:_e,tableLayout:_n,includeHeader:Be,showHeader:He,scroll:ge,components:at,store:this.store,selectedRowKeysSet:$n,disabledRowKeysSet:fn}));return[Nr,Cr]},this.handleColumns=(y,_)=>{const{hideExpandedColumn:T,scroll:D,prefixCls:ce,expandCellFixed:ge,expandIcon:Ee,rowSelection:_e}=this.props,Be="children";let He=Py(_);const at=function(){let st=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Array.isArray(st)&&st.length&&rb(st,(vt,Ot,Kt)=>{const sn=o.addFnsInColumn(vt),Bn=vt[Be];if(Array.isArray(Bn)&&Bn.length){const fn=[...Bn];at(fn),sn[Be]=fn}Kt[Ot]=sn})};if(at(He),!T){const st=this.normalizeExpandColumn({prefixCls:ce,expandCellFixed:ge,expandIcon:Ee}),vt=aT(He,Ot=>Ot.key===Sc.DEFAULT_KEY_COLUMN_EXPAND);st&&(vt>-1?He[vt]=Object.assign(Object.assign({},st),He[vt]):st.fixed==="right"?He=[...He,st]:He=[st,...He])}if(_e&&!ro(_e,"hidden")){const st=aT(He,Ot=>Ot.key===Sc.DEFAULT_KEY_COLUMN_SELECTION),vt=this.normalizeSelectionColumn({rowSelection:_e,prefixCls:ce});st>-1?He[st]=Object.assign(Object.assign({},vt),He[st]):vt.fixed==="right"?He=[...He,vt]:He=[vt,...He]}return vP(He),He},this.normalizeColumns=(y,_)=>Py(this.getColumns(y,_)),this.mergePagination=y=>Object.assign({onChange:this.foundation.setPage},y),this.foundation=new ZJ(this.adapter);const i=this.getColumns(t.columns,t.children),a=L_(i),n=ZJ.initColumnsFilteredValueAndSorterOrder(Py(a)),u=this.foundation.getFilteredSortedDataSource(this.props.dataSource,n),f=Oce(this.props.pagination)?this.props.pagination:{},e=this.foundation.getCurrentPageData(u,f,n);this.state={cachedColumns:i,cachedChildren:t.children,flattenColumns:a,components:tee(t.components,t.virtualized),queries:n,dataSource:e.dataSource,flattenData:[],expandedRowKeys:[...t.expandedRowKeys||[],...t.defaultExpandedRowKeys||[]],rowSelection:t.rowSelection?ev(t.rowSelection)?Object.assign({},t.rowSelection):{}:null,pagination:e.pagination,groups:null,allRowKeys:[],disabledRowKeys:[],disabledRowKeysSet:new Set,allDisabledRowKeys:[],allDisabledRowKeysSet:new Set,headWidths:[],bodyHasScrollBar:!1,prePropRowSelection:void 0,prePagination:void 0},this.rootWrapRef=Vt.createRef(),this.wrapRef=Vt.createRef(),this.bodyWrapRef=Vt.createRef(),this.headerWrapRef=Vt.createRef(),this.store=new CGe({hoveredRowKey:null}),this.debouncedWindowResize=pce(this.handleWindowResize,150),this.cachedFilteredSortedDataSource=[],this.cachedFilteredSortedRowKeys=[],this.cachedFilteredSortedRowKeysSet=new Set}static getDerivedStateFromProps(t,s){const o={},{rowSelection:i,dataSource:a,childrenRecordName:n,rowKey:u,pagination:f}=t;if(t.columns&&t.children&&a5.warn("columns should not given by object and children at the same time"),t.columns&&t.columns!==s.cachedColumns){const e=L_(t.columns);o.flattenColumns=e,o.queries=j9(s.queries,e,null,!1),o.cachedColumns=t.columns,o.cachedChildren=null}else if(t.children&&t.children!==s.cachedChildren){const e=wP(t.children),y=L_(e),_=j9(s.queries,y,null,!1);o.flattenColumns=y,o.queries=[..._],o.cachedColumns=[...e],o.cachedChildren=t.children}if(i!==s.prePropRowSelection){let e={};ev(s.rowSelection)&&(e=Object.assign(Object.assign({},e),s.rowSelection)),ev(i)&&(e=Object.assign(Object.assign({},e),i));const y=ro(i,"selectedRowKeys"),_=ro(i,"getCheckboxProps");if(y&&Array.isArray(y)&&(e.selectedRowKeysSet=new Set(y)),Mc(_)){const T=ohe({dataSource:a,getCheckboxProps:_,childrenRecordName:n,rowKey:u}),D=new Set(T);o.disabledRowKeys=T,o.disabledRowKeysSet=D,o.allDisabledRowKeys=T,o.allDisabledRowKeysSet=D}o.rowSelection=e,o.prePropRowSelection=i}if(f!==s.prePagination){let e={};ev(s.pagination)&&(e=Object.assign(Object.assign({},e),s.pagination)),ev(f)&&(e=Object.assign(Object.assign({},e),f)),o.pagination=e,o.prePagination=f}return o}componentDidMount(){super.componentDidMount(),this.setScrollPosition("left"),(this.adapter.isAnyColumnFixed()||this.props.showHeader&&this.adapter.useFixedHeader())&&(this.handleWindowResize(),window.addEventListener("resize",this.debouncedWindowResize))}componentDidUpdate(t,s){const{dataSource:o,expandedRowKeys:i,expandAllRows:a,expandAllGroupRows:n,virtualized:u,components:f,pagination:e}=this.props,{pagination:y,queries:_,cachedColumns:T,cachedChildren:D,groups:ce}=this.state,ge={};if(this._warnIfNoKey(),Array.isArray(i)&&i!==t.expandedRowKeys&&this.setState({expandedRowKeys:i}),(f!==t.components||u!==t.virtualized)&&this.setState({components:tee(f,u)}),(a!==t.expandAllRows||n!==t.expandAllGroupRows)&&this.foundation.initExpandedRowKeys({groups:ce}),o!==t.dataSource||T!==s.cachedColumns||D!==s.cachedChildren){const Ee=[...o],_e=this.foundation.getFilteredSortedDataSource(Ee,_),Be=this.foundation.getAllDisabledRowKeys(_e);this.foundation.setCachedFilteredSortedDataSource(_e),this.foundation.setAllDisabledRowKeys(Be),ge.dataSource=_e,this.props.groupBy&&(ge.groups=null)}if(o!==t.dataSource&&(ge.pagination=ev(y)?Object.assign(Object.assign({},y),{currentPage:ev(e)&&e.currentPage?e.currentPage:1}):y),Object.keys(ge).length){const{pagination:Ee=null,queries:_e=null,dataSource:Be=null}=ge,He=this.foundation.getCurrentPageData(Be,Ee,_e);this.adapter.setAllRowKeys(He.allRowKeys),this.adapter.setDisabledRowKeys(He.disabledRowKeys),"dataSource"in ge&&((this.props.defaultExpandAllRows&&He.groups&&He.groups.size||this.props.expandAllRows||this.props.expandAllGroupRows)&&this.foundation.initExpandedRowKeys(He),ge.pagination=He.pagination);const at=Object.keys(ge);for(const st of at)this.setState({[st]:He[st]})}(this.adapter.isAnyColumnFixed()||this.props.showHeader&&this.adapter.useFixedHeader())&&(this.debouncedWindowResize||window.addEventListener("resize",this.debouncedWindowResize))}componentWillUnmount(){super.componentWillUnmount(),this.debouncedWindowResize&&(window.removeEventListener("resize",this.debouncedWindowResize),this.debouncedWindowResize.cancel(),this.debouncedWindowResize=null)}render(){let t=this.props,{scroll:s,prefixCls:o,className:i,style:a={},bordered:n,id:u,pagination:f,virtualized:e,size:y,renderPagination:_,getVirtualizedListRef:T,loading:D,hideExpandedColumn:ce,rowSelection:ge}=t,Ee=lqe(t,["scroll","prefixCls","className","style","bordered","id","pagination","virtualized","size","renderPagination","getVirtualizedListRef","loading","hideExpandedColumn","rowSelection"]),{rowSelection:_e,expandedRowKeys:Be,headWidths:He,tableWidth:at,pagination:st,dataSource:vt,queries:Ot,cachedColumns:Kt,bodyHasScrollBar:sn}=this.state;a=Object.assign({},a);let Bn;if(this.adapter.isAnyColumnUseFullRender(Ot))Bn=this.handleColumns(Ot,Kt);else{const In=ge&&!ro(ge,"hidden");Bn=this.foundation.memoizedWithFnsColumns(Ot,Kt,In,ce,sn)}const fn=this.foundation.memoizedFilterColumns(Bn),bn=this.foundation.memoizedFlattenFnsColumns(Bn),$n=this.adapter.isAnyColumnFixed(Bn),_n=Object.assign(Object.assign(Object.assign({},Ee),this.state),{virtualized:e,scroll:s,prefixCls:o,size:y,hideExpandedColumn:ce,columns:Bn,anyColumnFixed:$n,rowExpandable:this.mergedRowExpandable,pagination:st,dataSource:vt,rowSelection:_e,expandedRowKeys:Be,renderExpandIcon:this.renderExpandIcon,filteredColumns:fn}),Nr=ro(s,"x"),Cr=ro(s,"y");e&&typeof a.width!="number"&&(a.width=Nr);const Dr=ds({[`${o}-${Sc.SIZE_SMALL}`]:y===Sc.SIZE_SMALL,[`${o}-${Sc.SIZE_MIDDLE}`]:y===Sc.SIZE_MIDDLE,[`${o}-virtualized`]:!!e,[`${o}-bordered`]:n,[`${o}-fixed-header`]:!!Cr,[`${o}-scroll-position-left`]:["both","left"].includes(this.position),[`${o}-scroll-position-right`]:["both","right"].includes(this.position)}),fr=st&&f?this.renderPagination(st,_):null,_r=ro(f,"position","bottom"),br=Object.assign(Object.assign({},this.context),{headWidths:He,tableWidth:at,anyColumnFixed:$n,flattenedColumns:bn,renderExpandIcon:this.renderExpandIcon,renderSelection:this.renderSelection,setHeadWidths:this.setHeadWidths,getHeadWidths:this.getHeadWidths,getCellWidths:this.getCellWidths,handleRowExpanded:this.handleRowExpanded,getVirtualizedListRef:T,setBodyHasScrollbar:this.setBodyHasScrollbar}),ss=this.getDataAttr(Ee);return ct.createElement("div",Object.assign({ref:this.rootWrapRef,className:ds(i,`${o}-wrapper`,`${o}-wrapper-${_n.direction}`),"data-column-fixed":$n,style:a,id:u},ss),ct.createElement(VGe,Object.assign({},br,{direction:_n.direction}),ct.createElement(e1,{spinning:D,size:"large"},ct.createElement("div",{ref:this.wrapRef,className:Dr},ct.createElement(ct.Fragment,{key:"pagination-top"},["top","both"].includes(_r)?fr:null),this.renderTitle({title:_n.title,dataSource:_n.dataSource,prefixCls:_n.prefixCls}),ct.createElement("div",{className:`${o}-container`},this.renderMainTable(Object.assign({},_n))),ct.createElement(ct.Fragment,{key:"pagination-bottom"},["bottom","both"].includes(_r)?fr:null)))))}};NF.contextType=DS;NF.propTypes={className:be.string,style:be.object,prefixCls:be.string,components:be.any,bordered:be.bool,loading:be.bool,size:be.oneOf(Sc.SIZES),tableLayout:be.oneOf(Sc.LAYOUTS),columns:be.arrayOf(be.shape(ahe)),hideExpandedColumn:be.bool,id:be.string,expandIcon:be.oneOfType([be.bool,be.func,be.node]),expandCellFixed:be.oneOf(Sc.FIXED_SET),title:be.oneOfType([be.string,be.node,be.func]),onHeaderRow:be.func,showHeader:be.bool,indentSize:be.number,rowKey:be.oneOfType([be.func,be.string,be.number]),onRow:be.func,onExpandedRowsChange:be.func,onExpand:be.func,rowExpandable:be.func,expandedRowRender:be.func,expandedRowKeys:be.array,defaultExpandAllRows:be.bool,expandAllRows:be.bool,defaultExpandAllGroupRows:be.bool,expandAllGroupRows:be.bool,defaultExpandedRowKeys:be.array,pagination:be.oneOfType([be.object,be.bool]),renderPagination:be.func,footer:be.oneOfType([be.func,be.string,be.node]),empty:be.node,dataSource:be.array,childrenRecordName:be.string,rowSelection:be.oneOfType([be.object,be.bool]),onChange:be.func,scroll:be.shape({x:be.oneOfType([be.number,be.string,be.bool]),y:be.oneOfType([be.number,be.string])}),groupBy:be.oneOfType([be.string,be.number,be.func]),renderGroupSection:be.oneOfType([be.func]),onGroupedRow:be.func,clickGroupedRowToExpand:be.bool,virtualized:be.oneOfType([be.object,be.bool]),dropdownPrefixCls:be.string,expandRowByClick:be.bool,getVirtualizedListRef:be.func};NF.defaultProps={tableLayout:"",dataSource:[],prefixCls:Qb.PREFIX,rowSelection:null,className:"",childrenRecordName:"children",size:"default",loading:!1,bordered:!1,expandCellFixed:!1,hideExpandedColumn:!0,showHeader:!0,indentSize:dg.DEFAULT_INDENT_WIDTH,onChange:so,pagination:!0,rowKey:"key",defaultExpandedRowKeys:[],defaultExpandAllRows:!1,defaultExpandAllGroupRows:!1,expandAllRows:!1,expandAllGroupRows:!1,onFilterDropdownVisibleChange:so,onExpand:so,onExpandedRowsChange:so,expandRowByClick:!1};const vG=NF;var uqe=Hz;function cqe(r,t,s){var o=r.length;return s=s===void 0?o:s,!t&&s>=o?r:uqe(r,t,s)}var fqe=cqe,dqe=Tw,hqe=gy,Aqe="[object RegExp]";function pqe(r){return hqe(r)&&dqe(r)==Aqe}var mqe=pqe,gqe=mqe,bqe=QT,oee=I6,iee=oee&&oee.isRegExp,vqe=iee?bqe(iee):gqe,yqe=vqe;function wqe(r){return r.split("")}var Cqe=wqe,vhe="\\ud800-\\udfff",Eqe="\\u0300-\\u036f",Lqe="\\ufe20-\\ufe2f",Sqe="\\u20d0-\\u20ff",xqe=Eqe+Lqe+Sqe,_qe="\\ufe0e\\ufe0f",Tqe="["+vhe+"]",H9="["+xqe+"]",Q9="\\ud83c[\\udffb-\\udfff]",Nqe="(?:"+H9+"|"+Q9+")",yhe="[^"+vhe+"]",whe="(?:\\ud83c[\\udde6-\\uddff]){2}",Che="[\\ud800-\\udbff][\\udc00-\\udfff]",Iqe="\\u200d",Ehe=Nqe+"?",Lhe="["+_qe+"]?",Oqe="(?:"+Iqe+"(?:"+[yhe,whe,Che].join("|")+")"+Lhe+Ehe+")*",Rqe=Lhe+Ehe+Oqe,Bqe="(?:"+[yhe+H9+"?",H9,whe,Che,Tqe].join("|")+")",kqe=RegExp(Q9+"(?="+Q9+")|"+Bqe+Rqe,"g");function Pqe(r){return r.match(kqe)||[]}var Dqe=Pqe,Fqe=Cqe,Mqe=gG,Uqe=Dqe;function $qe(r){return Mqe(r)?Uqe(r):Fqe(r)}var jqe=$qe,Hqe=fce,Qqe=fqe,Kqe=gG,zqe=k6,Vqe=yqe,Gqe=jqe,Wqe=xz,qqe=4294967295;function Yqe(r,t,s){return s&&typeof s!="number"&&zqe(r,t,s)&&(t=s=void 0),s=s===void 0?qqe:s>>>0,s?(r=Wqe(r),r&&(typeof t=="string"||t!=null&&!Vqe(t))&&(t=Hqe(t),!t&&Kqe(r))?Qqe(Gqe(r),0,s):r.split(t,s)):[]}var Xqe=Yqe;const She=ic(Xqe);function Zqe(r){const t=She(r,/\s+/);for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;i!t.includes(n));return ds(r,...a)}function Jqe(r){const t=She(r,/\s+/);for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;i{const n=t.indexOf(a);n>-1&&t.splice(n,1)}),ds(...t)}var yG={exports:{}},H4={},IF={exports:{}},xhe={};function _he(r){var t,s,o="";if(typeof r=="string"||typeof r=="number")o+=r;else if(typeof r=="object")if(Array.isArray(r))for(t=0;t0&&arguments[0]!==void 0?arguments[0]:"transform";if(typeof window>"u")return"";const s=(r=window.document)===null||r===void 0||(r=r.documentElement)===null||r===void 0?void 0:r.style;if(!s||t in s)return"";for(let o=0;ot===s.identifier)||r.changedTouches&&(0,iy.findInArray)(r.changedTouches,s=>t===s.identifier)}function wYe(r){if(r.targetTouches&&r.targetTouches[0])return r.targetTouches[0].identifier;if(r.changedTouches&&r.changedTouches[0])return r.changedTouches[0].identifier}function CYe(r){if(!r)return;let t=r.getElementById("react-draggable-style-el");t||(t=r.createElement("style"),t.type="text/css",t.id="react-draggable-style-el",t.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} +`,t.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} +`,r.getElementsByTagName("head")[0].appendChild(t)),r.body&&Rhe(r.body,"react-draggable-transparent-selection")}function EYe(r){if(r)try{if(r.body&&Bhe(r.body,"react-draggable-transparent-selection"),r.selection)r.selection.empty();else{const t=(r.defaultView||window).getSelection();t&&t.type!=="Caret"&&t.removeAllRanges()}}catch{}}function Rhe(r,t){r.classList?r.classList.add(t):r.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(r.className+=" ".concat(t))}function Bhe(r,t){r.classList?r.classList.remove(t):r.className=r.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var Rw={};Object.defineProperty(Rw,"__esModule",{value:!0});Rw.canDragX=xYe;Rw.canDragY=_Ye;Rw.createCoreData=NYe;Rw.createDraggableData=IYe;Rw.getBoundPosition=LYe;Rw.getControlPosition=TYe;Rw.snapToGrid=SYe;var Yv=Ow,e_=Km;function LYe(r,t,s){if(!r.props.bounds)return[t,s];let{bounds:o}=r.props;o=typeof o=="string"?o:OYe(o);const i=CG(r);if(typeof o=="string"){const{ownerDocument:a}=i,n=a.defaultView;let u;if(o==="parent"?u=i.parentNode:u=a.querySelector(o),!(u instanceof n.HTMLElement))throw new Error('Bounds selector "'+o+'" could not find an element.');const f=u,e=n.getComputedStyle(i),y=n.getComputedStyle(f);o={left:-i.offsetLeft+(0,Yv.int)(y.paddingLeft)+(0,Yv.int)(e.marginLeft),top:-i.offsetTop+(0,Yv.int)(y.paddingTop)+(0,Yv.int)(e.marginTop),right:(0,e_.innerWidth)(f)-(0,e_.outerWidth)(i)-i.offsetLeft+(0,Yv.int)(y.paddingRight)-(0,Yv.int)(e.marginRight),bottom:(0,e_.innerHeight)(f)-(0,e_.outerHeight)(i)-i.offsetTop+(0,Yv.int)(y.paddingBottom)-(0,Yv.int)(e.marginBottom)}}return(0,Yv.isNum)(o.right)&&(t=Math.min(t,o.right)),(0,Yv.isNum)(o.bottom)&&(s=Math.min(s,o.bottom)),(0,Yv.isNum)(o.left)&&(t=Math.max(t,o.left)),(0,Yv.isNum)(o.top)&&(s=Math.max(s,o.top)),[t,s]}function SYe(r,t,s){const o=Math.round(t/r[0])*r[0],i=Math.round(s/r[1])*r[1];return[o,i]}function xYe(r){return r.props.axis==="both"||r.props.axis==="x"}function _Ye(r){return r.props.axis==="both"||r.props.axis==="y"}function TYe(r,t,s){const o=typeof t=="number"?(0,e_.getTouch)(r,t):null;if(typeof t=="number"&&!o)return null;const i=CG(s),a=s.props.offsetParent||i.offsetParent||i.ownerDocument.body;return(0,e_.offsetXYFromParent)(o||r,a,s.props.scale)}function NYe(r,t,s){const o=!(0,Yv.isNum)(r.lastX),i=CG(r);return o?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:s,x:t,y:s}:{node:i,deltaX:t-r.lastX,deltaY:s-r.lastY,lastX:r.lastX,lastY:r.lastY,x:t,y:s}}function IYe(r,t){const s=r.props.scale;return{node:t.node,x:r.state.x+t.deltaX/s,y:r.state.y+t.deltaY/s,deltaX:t.deltaX/s,deltaY:t.deltaY/s,lastX:r.state.x,lastY:r.state.y}}function OYe(r){return{left:r.left,top:r.top,right:r.right,bottom:r.bottom}}function CG(r){const t=r.findDOMNode();if(!t)throw new Error(": Unmounted during event!");return t}var OF={},RF={};Object.defineProperty(RF,"__esModule",{value:!0});RF.default=RYe;function RYe(){}Object.defineProperty(OF,"__esModule",{value:!0});OF.default=void 0;var eU=kYe(Vt),xv=EG(b4),BYe=EG(av),Lb=Km,sE=Rw,tU=Ow,WN=EG(RF);function EG(r){return r&&r.__esModule?r:{default:r}}function khe(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,s=new WeakMap;return(khe=function(o){return o?s:t})(r)}function kYe(r,t){if(!t&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var s=khe(t);if(s&&s.has(r))return s.get(r);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a)){var n=i?Object.getOwnPropertyDescriptor(r,a):null;n&&(n.get||n.set)?Object.defineProperty(o,a,n):o[a]=r[a]}return o.default=r,s&&s.set(r,o),o}function qb(r,t,s){return t=PYe(t),t in r?Object.defineProperty(r,t,{value:s,enumerable:!0,configurable:!0,writable:!0}):r[t]=s,r}function PYe(r){var t=DYe(r,"string");return typeof t=="symbol"?t:String(t)}function DYe(r,t){if(typeof r!="object"||r===null)return r;var s=r[Symbol.toPrimitive];if(s!==void 0){var o=s.call(r,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(r)}const g1={touch:{start:"touchstart",move:"touchmove",stop:"touchend"},mouse:{start:"mousedown",move:"mousemove",stop:"mouseup"}};let oE=g1.mouse,BF=class extends eU.Component{constructor(){super(...arguments),qb(this,"dragging",!1),qb(this,"lastX",NaN),qb(this,"lastY",NaN),qb(this,"touchIdentifier",null),qb(this,"mounted",!1),qb(this,"handleDragStart",t=>{if(this.props.onMouseDown(t),!this.props.allowAnyClick&&typeof t.button=="number"&&t.button!==0)return!1;const s=this.findDOMNode();if(!s||!s.ownerDocument||!s.ownerDocument.body)throw new Error(" not mounted on DragStart!");const{ownerDocument:o}=s;if(this.props.disabled||!(t.target instanceof o.defaultView.Node)||this.props.handle&&!(0,Lb.matchesSelectorAndParentsTo)(t.target,this.props.handle,s)||this.props.cancel&&(0,Lb.matchesSelectorAndParentsTo)(t.target,this.props.cancel,s))return;t.type==="touchstart"&&t.preventDefault();const i=(0,Lb.getTouchIdentifier)(t);this.touchIdentifier=i;const a=(0,sE.getControlPosition)(t,i,this);if(a==null)return;const{x:n,y:u}=a,f=(0,sE.createCoreData)(this,n,u);(0,WN.default)("DraggableCore: handleDragStart: %j",f),(0,WN.default)("calling",this.props.onStart),!(this.props.onStart(t,f)===!1||this.mounted===!1)&&(this.props.enableUserSelectHack&&(0,Lb.addUserSelectStyles)(o),this.dragging=!0,this.lastX=n,this.lastY=u,(0,Lb.addEvent)(o,oE.move,this.handleDrag),(0,Lb.addEvent)(o,oE.stop,this.handleDragStop))}),qb(this,"handleDrag",t=>{const s=(0,sE.getControlPosition)(t,this.touchIdentifier,this);if(s==null)return;let{x:o,y:i}=s;if(Array.isArray(this.props.grid)){let u=o-this.lastX,f=i-this.lastY;if([u,f]=(0,sE.snapToGrid)(this.props.grid,u,f),!u&&!f)return;o=this.lastX+u,i=this.lastY+f}const a=(0,sE.createCoreData)(this,o,i);if((0,WN.default)("DraggableCore: handleDrag: %j",a),this.props.onDrag(t,a)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent("mouseup"))}catch{const f=document.createEvent("MouseEvents");f.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(f)}return}this.lastX=o,this.lastY=i}),qb(this,"handleDragStop",t=>{if(!this.dragging)return;const s=(0,sE.getControlPosition)(t,this.touchIdentifier,this);if(s==null)return;let{x:o,y:i}=s;if(Array.isArray(this.props.grid)){let f=o-this.lastX||0,e=i-this.lastY||0;[f,e]=(0,sE.snapToGrid)(this.props.grid,f,e),o=this.lastX+f,i=this.lastY+e}const a=(0,sE.createCoreData)(this,o,i);if(this.props.onStop(t,a)===!1||this.mounted===!1)return!1;const u=this.findDOMNode();u&&this.props.enableUserSelectHack&&(0,Lb.removeUserSelectStyles)(u.ownerDocument),(0,WN.default)("DraggableCore: handleDragStop: %j",a),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,u&&((0,WN.default)("DraggableCore: Removing handlers"),(0,Lb.removeEvent)(u.ownerDocument,oE.move,this.handleDrag),(0,Lb.removeEvent)(u.ownerDocument,oE.stop,this.handleDragStop))}),qb(this,"onMouseDown",t=>(oE=g1.mouse,this.handleDragStart(t))),qb(this,"onMouseUp",t=>(oE=g1.mouse,this.handleDragStop(t))),qb(this,"onTouchStart",t=>(oE=g1.touch,this.handleDragStart(t))),qb(this,"onTouchEnd",t=>(oE=g1.touch,this.handleDragStop(t)))}componentDidMount(){this.mounted=!0;const t=this.findDOMNode();t&&(0,Lb.addEvent)(t,g1.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;const t=this.findDOMNode();if(t){const{ownerDocument:s}=t;(0,Lb.removeEvent)(s,g1.mouse.move,this.handleDrag),(0,Lb.removeEvent)(s,g1.touch.move,this.handleDrag),(0,Lb.removeEvent)(s,g1.mouse.stop,this.handleDragStop),(0,Lb.removeEvent)(s,g1.touch.stop,this.handleDragStop),(0,Lb.removeEvent)(t,g1.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,Lb.removeUserSelectStyles)(s)}}findDOMNode(){var t,s;return(t=this.props)!==null&&t!==void 0&&t.nodeRef?(s=this.props)===null||s===void 0||(s=s.nodeRef)===null||s===void 0?void 0:s.current:BYe.default.findDOMNode(this)}render(){return eU.cloneElement(eU.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};OF.default=BF;qb(BF,"displayName","DraggableCore");qb(BF,"propTypes",{allowAnyClick:xv.default.bool,children:xv.default.node.isRequired,disabled:xv.default.bool,enableUserSelectHack:xv.default.bool,offsetParent:function(r,t){if(r[t]&&r[t].nodeType!==1)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:xv.default.arrayOf(xv.default.number),handle:xv.default.string,cancel:xv.default.string,nodeRef:xv.default.object,onStart:xv.default.func,onDrag:xv.default.func,onStop:xv.default.func,onMouseDown:xv.default.func,scale:xv.default.number,className:tU.dontSetMe,style:tU.dontSetMe,transform:tU.dontSetMe});qb(BF,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1});(function(r){Object.defineProperty(r,"__esModule",{value:!0}),Object.defineProperty(r,"DraggableCore",{enumerable:!0,get:function(){return f.default}}),r.default=void 0;var t=T(Vt),s=y(b4),o=y(av),i=y(tYe),a=Km,n=Rw,u=Ow,f=y(OF),e=y(RF);function y(Be){return Be&&Be.__esModule?Be:{default:Be}}function _(Be){if(typeof WeakMap!="function")return null;var He=new WeakMap,at=new WeakMap;return(_=function(st){return st?at:He})(Be)}function T(Be,He){if(!He&&Be&&Be.__esModule)return Be;if(Be===null||typeof Be!="object"&&typeof Be!="function")return{default:Be};var at=_(He);if(at&&at.has(Be))return at.get(Be);var st={},vt=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var Ot in Be)if(Ot!=="default"&&Object.prototype.hasOwnProperty.call(Be,Ot)){var Kt=vt?Object.getOwnPropertyDescriptor(Be,Ot):null;Kt&&(Kt.get||Kt.set)?Object.defineProperty(st,Ot,Kt):st[Ot]=Be[Ot]}return st.default=Be,at&&at.set(Be,st),st}function D(){return D=Object.assign?Object.assign.bind():function(Be){for(var He=1;He{if((0,e.default)("Draggable: onDragStart: %j",st),this.props.onStart(at,(0,n.createDraggableData)(this,st))===!1)return!1;this.setState({dragging:!0,dragged:!0})}),ce(this,"onDrag",(at,st)=>{if(!this.state.dragging)return!1;(0,e.default)("Draggable: onDrag: %j",st);const vt=(0,n.createDraggableData)(this,st),Ot={x:vt.x,y:vt.y,slackX:0,slackY:0};if(this.props.bounds){const{x:sn,y:Bn}=Ot;Ot.x+=this.state.slackX,Ot.y+=this.state.slackY;const[fn,bn]=(0,n.getBoundPosition)(this,Ot.x,Ot.y);Ot.x=fn,Ot.y=bn,Ot.slackX=this.state.slackX+(sn-Ot.x),Ot.slackY=this.state.slackY+(Bn-Ot.y),vt.x=Ot.x,vt.y=Ot.y,vt.deltaX=Ot.x-this.state.x,vt.deltaY=Ot.y-this.state.y}if(this.props.onDrag(at,vt)===!1)return!1;this.setState(Ot)}),ce(this,"onDragStop",(at,st)=>{if(!this.state.dragging||this.props.onStop(at,(0,n.createDraggableData)(this,st))===!1)return!1;(0,e.default)("Draggable: onDragStop: %j",st);const Ot={dragging:!1,slackX:0,slackY:0};if(!!this.props.position){const{x:sn,y:Bn}=this.props.position;Ot.x=sn,Ot.y=Bn}this.setState(Ot)}),this.state={dragging:!1,dragged:!1,x:He.position?He.position.x:He.defaultPosition.x,y:He.position?He.position.y:He.defaultPosition.y,prevPropsPosition:{...He.position},slackX:0,slackY:0,isElementSVG:!1},He.position&&!(He.onDrag||He.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}componentDidMount(){typeof window.SVGElement<"u"&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.setState({dragging:!1})}findDOMNode(){var He,at;return(He=(at=this.props)===null||at===void 0||(at=at.nodeRef)===null||at===void 0?void 0:at.current)!==null&&He!==void 0?He:o.default.findDOMNode(this)}render(){const{axis:He,bounds:at,children:st,defaultPosition:vt,defaultClassName:Ot,defaultClassNameDragging:Kt,defaultClassNameDragged:sn,position:Bn,positionOffset:fn,scale:bn,...$n}=this.props;let _n={},Nr=null;const Dr=!!!Bn||this.state.dragging,fr=Bn||vt,_r={x:(0,n.canDragX)(this)&&Dr?this.state.x:fr.x,y:(0,n.canDragY)(this)&&Dr?this.state.y:fr.y};this.state.isElementSVG?Nr=(0,a.createSVGTransform)(_r,fn):_n=(0,a.createCSSTransform)(_r,fn);const br=(0,i.default)(st.props.className||"",Ot,{[Kt]:this.state.dragging,[sn]:this.state.dragged});return t.createElement(f.default,D({},$n,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),t.cloneElement(t.Children.only(st),{className:br,style:{...st.props.style,..._n},transform:Nr}))}}r.default=_e,ce(_e,"displayName","Draggable"),ce(_e,"propTypes",{...f.default.propTypes,axis:s.default.oneOf(["both","x","y","none"]),bounds:s.default.oneOfType([s.default.shape({left:s.default.number,right:s.default.number,top:s.default.number,bottom:s.default.number}),s.default.string,s.default.oneOf([!1])]),defaultClassName:s.default.string,defaultClassNameDragging:s.default.string,defaultClassNameDragged:s.default.string,defaultPosition:s.default.shape({x:s.default.number,y:s.default.number}),positionOffset:s.default.shape({x:s.default.oneOfType([s.default.number,s.default.string]),y:s.default.oneOfType([s.default.number,s.default.string])}),position:s.default.shape({x:s.default.number,y:s.default.number}),className:u.dontSetMe,style:u.dontSetMe,transform:u.dontSetMe}),ce(_e,"defaultProps",{...f.default.defaultProps,axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1})})(xhe);const{default:Phe,DraggableCore:FYe}=xhe;IF.exports=Phe;IF.exports.default=Phe;IF.exports.DraggableCore=FYe;var MYe=IF.exports,LG={};LG.__esModule=!0;LG.cloneElement=KYe;var UYe=$Ye(Vt);function $Ye(r){return r&&r.__esModule?r:{default:r}}function uee(r,t){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),s.push.apply(s,o)}return s}function cee(r){for(var t=1;t=0)&&(s[i]=r[i]);return s}function fee(r,t){var s=Object.keys(r);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(r);t&&(o=o.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),s.push.apply(s,o)}return s}function nU(r){for(var t=1;tMath.abs(T*y)?a=i/y:i=a*y}var D=i,ce=a,ge=this.slack||[0,0],Ee=ge[0],_e=ge[1];return i+=Ee,a+=_e,u&&(i=Math.max(u[0],i),a=Math.max(u[1],a)),f&&(i=Math.min(f[0],i),a=Math.min(f[1],a)),this.slack=[Ee+(D-i),_e+(ce-a)],[i,a]},s.resizeHandler=function(i,a){var n=this;return function(u,f){var e=f.node,y=f.deltaX,_=f.deltaY;i==="onResizeStart"&&n.resetData();var T=(n.props.axis==="both"||n.props.axis==="x")&&a!=="n"&&a!=="s",D=(n.props.axis==="both"||n.props.axis==="y")&&a!=="e"&&a!=="w";if(!(!T&&!D)){var ce=a[0],ge=a[a.length-1],Ee=e.getBoundingClientRect();if(n.lastHandleRect!=null){if(ge==="w"){var _e=Ee.left-n.lastHandleRect.left;y+=_e}if(ce==="n"){var Be=Ee.top-n.lastHandleRect.top;_+=Be}}n.lastHandleRect=Ee,ge==="w"&&(y=-y),ce==="n"&&(_=-_);var He=n.props.width+(T?y/n.props.transformScale:0),at=n.props.height+(D?_/n.props.transformScale:0),st=n.runConstraints(He,at);He=st[0],at=st[1];var vt=He!==n.props.width||at!==n.props.height,Ot=typeof n.props[i]=="function"?n.props[i]:null,Kt=i==="onResize"&&!vt;Ot&&!Kt&&(u.persist==null||u.persist(),Ot(u,{node:e,size:{width:He,height:at},handle:a})),i==="onResizeStop"&&n.resetData()}}},s.renderResizeHandle=function(i,a){var n=this.props.handle;if(!n)return qN.createElement("span",{className:"react-resizable-handle react-resizable-handle-"+i,ref:a});if(typeof n=="function")return n(i,a);var u=typeof n.type=="string",f=nU({ref:a},u?{}:{handleAxis:i});return qN.cloneElement(n,f)},s.render=function(){var i=this,a=this.props,n=a.children,u=a.className,f=a.draggableOpts;a.width,a.height,a.handle,a.handleSize,a.lockAspectRatio,a.axis,a.minConstraints,a.maxConstraints,a.onResize,a.onResizeStop,a.onResizeStart;var e=a.resizeHandles;a.transformScale;var y=ZYe(a,YYe);return(0,WYe.cloneElement)(n,nU(nU({},y),{},{className:(u?u+" ":"")+"react-resizable",children:[].concat(n.props.children,e.map(function(_){var T,D=(T=i.handleRefs[_])!=null?T:i.handleRefs[_]=qN.createRef();return qN.createElement(GYe.DraggableCore,K9({},f,{nodeRef:D,key:"resizableHandle-"+_,onStop:i.resizeHandler("onResizeStop",_),onStart:i.resizeHandler("onResizeStart",_),onDrag:i.resizeHandler("onResize",_)}),i.renderResizeHandle(_,D))}))}))},t}(qN.Component);H4.default=SG;SG.propTypes=qYe.resizableProps;SG.defaultProps={axis:"both",handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:["se"],transformScale:1};var kF={};kF.__esModule=!0;kF.default=void 0;var rU=aXe(Vt),rXe=Fhe(b4),sXe=Fhe(H4),oXe=Q4,iXe=["handle","handleSize","onResize","onResizeStart","onResizeStop","draggableOpts","minConstraints","maxConstraints","lockAspectRatio","axis","width","height","resizeHandles","style","transformScale"];function Fhe(r){return r&&r.__esModule?r:{default:r}}function Mhe(r){if(typeof WeakMap!="function")return null;var t=new WeakMap,s=new WeakMap;return(Mhe=function(i){return i?s:t})(r)}function aXe(r,t){if(!t&&r&&r.__esModule)return r;if(r===null||typeof r!="object"&&typeof r!="function")return{default:r};var s=Mhe(t);if(s&&s.has(r))return s.get(r);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in r)if(a!=="default"&&Object.prototype.hasOwnProperty.call(r,a)){var n=i?Object.getOwnPropertyDescriptor(r,a):null;n&&(n.get||n.set)?Object.defineProperty(o,a,n):o[a]=r[a]}return o.default=r,s&&s.set(r,o),o}function V9(){return V9=Object.assign?Object.assign.bind():function(r){for(var t=1;t=0)&&(s[i]=r[i]);return s}function dXe(r,t){r.prototype=Object.create(t.prototype),r.prototype.constructor=r,G9(r,t)}function G9(r,t){return G9=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(o,i){return o.__proto__=i,o},G9(r,t)}var Uhe=function(r){dXe(t,r);function t(){for(var o,i=arguments.length,a=new Array(i),n=0;nct.createElement(ct.Fragment,{key:y},e)),ct.createElement(hXe,{width:a,height:0,onResize:s,onResizeStart:o,onResizeStop:i,draggableOpts:{enableUserSelectHack:!1},axis:"x"},ct.createElement("th",Object.assign({},u),f))}}const mXe=pXe;var gXe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;const{components:s,columns:o,resizable:i}=r,a=gXe(r,["components","columns","resizable"]),n="children",u=ro(i,"onResize",so),f=ro(i,"onResizeStart",so),e=ro(i,"onResizeStop",so),y=Array.isArray(o)&&o.length?o:wP(r.children),_=vP(Py(y),n),T=vP(Py(y),n);typeof r.expandedRowRender=="function"&&!r.hideExpandedColumn&&!pS(_,Ot=>Ot.key===Sc.DEFAULT_KEY_COLUMN_EXPAND)&&T.unshift({key:Sc.DEFAULT_KEY_COLUMN_EXPAND,width:dg.DEFAULT_WIDTH_COLUMN_EXPAND}),r.rowSelection&&!pS(_,Ot=>Ot.key===Sc.DEFAULT_KEY_COLUMN_SELECTION)&&T.unshift({width:ro(r,"rowSelection.width",dg.DEFAULT_WIDTH_COLUMN_SELECTION),key:Sc.DEFAULT_KEY_COLUMN_SELECTION});const[D,ce]=Vt.useState(T);Vt.useEffect(()=>{const Ot=bGe(D,T);ce(j9(D,Ot))},[o,r.expandedRowRender,r.hideExpandedColumn,r.rowSelection]);const ge=Vt.useMemo(()=>E4({header:{cell:mXe}},s),[s]),Ee=ro(i,"handlerClassName","resizing"),_e=Ot=>(Kt,sn)=>{let{size:Bn}=sn;const fn=Py(D),bn=$B(fn,Ot,n);let $n=Object.assign(Object.assign({},bn),{width:Bn.width});const _n=u($n)||{};$n=Object.assign(Object.assign({},$n),_n),Object.assign(bn,$n),ce(fn)},Be=Ot=>Kt=>{const sn=Py(D),Bn=$B(sn,Ot,n);let fn=Object.assign(Object.assign({},Bn),{className:Zqe(Bn.className,Ee)});const bn=f(fn)||{};fn=Object.assign(Object.assign({},fn),bn),Object.assign(Bn,fn),ce(sn)},He=Ot=>Kt=>{const sn=Py(D),Bn=$B(sn,Ot,n);let fn=Object.assign(Object.assign({},Bn),{className:Jqe(Bn.className,Ee)});const bn=e(fn)||{};fn=Object.assign(Object.assign({},fn),bn),Object.assign(Bn,fn),ce(sn)},at=function(Ot,Kt){let sn=arguments.length>3?arguments[3]:void 0;return Object.assign(Object.assign({},Ot),{onHeaderCell:Bn=>Object.assign(Object.assign({},sn),{width:Bn.width,onResize:_e(Bn),onResizeStart:Be(Bn),onResizeStop:He(Bn)})})},st=function(){let Ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Kt=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Array.isArray(Ot)&&Ot.length?Ot.map((sn,Bn)=>{var fn,bn;const $n=(bn=(fn=sn.onHeaderCell)===null||fn===void 0?void 0:fn.call(sn,sn,Bn,Kt))!==null&&bn!==void 0?bn:{};Object.assign(sn,at(sn,Bn,Kt,$n));const _n=sn[n];return Array.isArray(_n)&&_n.length&&(sn[n]=st(_n,Kt+1)),sn}):[]},vt=Vt.useMemo(()=>st(D),[D]);return ct.createElement(vG,Object.assign({},a,{columns:vt,components:ge,ref:t}))},vXe=ct.forwardRef(bXe);let MS=class extends ct.PureComponent{constructor(t){super(t),this.getCurrentPageData=()=>this.tableRef.current&&this.tableRef.current.getCurrentPageData(),this.tableRef=ct.createRef()}render(){var t;const s=this.props,o=(t=this.props.direction)!==null&&t!==void 0?t:this.context.direction;return s.resizable?ct.createElement(vXe,Object.assign({},s,{ref:this.tableRef,direction:o})):ct.createElement(vG,Object.assign({},s,{ref:this.tableRef,direction:o}))}};MS.Column=LF;MS.DEFAULT_KEY_COLUMN_SELECTION=Sc.DEFAULT_KEY_COLUMN_SELECTION;MS.DEFAULT_KEY_COLUMN_EXPAND=Sc.DEFAULT_KEY_COLUMN_EXPAND;MS.propTypes=Object.assign(Object.assign({},vG.propTypes),{resizable:be.oneOfType([be.bool,be.object])});MS.defaultProps={hideExpandedColumn:!0};MS.contextType=by;const yXe=MS,FA={TABS:`${fi}-tabs`,TABS_BAR:`${fi}-tabs-bar`,TABS_BAR_LINE:`${fi}-tabs-bar-line`,TABS_BAR_CARD:`${fi}-tabs-bar-card`,TABS_BAR_BUTTON:`${fi}-tabs-bar-button`,TABS_BAR_EXTRA:`${fi}-tabs-bar-extra`,TABS_TAB:`${fi}-tabs-tab`,TABS_TAB_ACTIVE:`${fi}-tabs-tab-active`,TABS_TAB_DISABLED:`${fi}-tabs-tab-disabled`,TABS_CONTENT:`${fi}-tabs-content`,TABS_CONTENT_ANIMATED:`${fi}-tabs-content-animated`,TABS_CONTENT_NO_ANIMATED:`${fi}-tabs-content-no-animated`,TABS_PANE:`${fi}-tabs-pane`,TABS_PANE_INACTIVE:`${fi}-tabs-pane-inactive`,TABS_PANE_ACTIVE:`${fi}-tabs-pane-active`,TABS_PANE_MOTION_OVERLAY:`${fi}-tabs-pane-motion-overlay`,TABS_PANE_ANIMATING:`${fi}-tabs-pane-animating`,TABS_PANE_ANIMATE_LEFT_SHOW:`${fi}-tabs-pane-animate-leftShow`,TABS_PANE_ANIMATE_RIGHT_SHOW:`${fi}-tabs-pane-animate-rightShow`,TABS_PANE_ANIMATE_TOP_SHOW:`${fi}-tabs-pane-animate-topShow`,TABS_PANE_ANIMATE_BOTTOM_SHOW:`${fi}-tabs-pane-animate-bottomShow`},S_={TYPE_MAP:["line","card","button"],SIZE:["small","medium","large"],POSITION_MAP:["top","left"]};class wXe extends lh{constructor(t){super(Object.assign({},t)),this.destroy=so,this.handlePrevent=s=>{s.stopPropagation(),s.preventDefault()},this.handleKeyDown=(s,o,i)=>{const{preventScroll:a}=this.getProps(),n=[...s.target.parentNode.childNodes].filter(u=>ro(u,"attributes.data-tabkey.value","").includes("semiTab")&&ro(u,"attributes.aria-disabled.value","")!=="true");switch(s.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this.determineOrientation(s,n);break;case"Backspace":case"Delete":this.handleDeleteKeyDown(s,n,o,i);break;case"Enter":case" ":this.handleTabClick(o,s),this.handlePrevent(s);break;case"Home":n[0].focus({preventScroll:a}),this.handlePrevent(s);break;case"End":n[n.length-1].focus({preventScroll:a}),this.handlePrevent(s);break}}}init(){this._adapter.collectPane()}_notifyChange(t){const{activeKey:s}=this.getStates();s!==t&&this._adapter.notifyChange(t)}handleTabClick(t,s){this._isInProps("activeKey")?this._notifyChange(t):(this._notifyChange(t),this.handleNewActiveKey(t)),this._adapter.notifyTabClick(t,s)}handleNewActiveKey(t){const{activeKey:s}=this.getStates();s!==t&&this._adapter.setNewActiveKey(t)}getDefaultActiveKey(){let t;const s=this.getProps();return"activeKey"in s?t=s.activeKey:"defaultActiveKey"in s?t=s.defaultActiveKey:t=this._adapter.getDefaultActiveKeyFromChildren(),t}handleTabListChange(){this._adapter.collectPane()}handleTabPanesChange(){this._adapter.collectPane(),this._adapter.collectActiveKey()}handleTabDelete(t){this._adapter.notifyTabDelete(t)}determineOrientation(t,s){const{tabPosition:o}=this.getProps();o==="left"?(t.key==="ArrowUp"||t.key==="ArrowDown")&&(this.switchTabOnArrowPress(t,s),this.handlePrevent(t)):(t.key==="ArrowLeft"||t.key==="ArrowRight")&&(this.switchTabOnArrowPress(t,s),this.handlePrevent(t))}handleDeleteKeyDown(t,s,o,i){const{preventScroll:a}=this.getProps();if(i){this.handleTabDelete(o);const n=s.indexOf(t.target);s.length!==1&&s[n+1>=s.length?n-1:n+1].focus({preventScroll:a})}}switchTabOnArrowPress(t,s){const{preventScroll:o}=this.getProps(),i=s.indexOf(t.target),a={ArrowLeft:-1,ArrowUp:-1,ArrowRight:1,ArrowDown:1};a[t.key]&&i!==void 0&&(s[i+a[t.key]]?s[i+a[t.key]].focus({preventScroll:o}):t.key==="ArrowLeft"||t.key==="ArrowUp"?s[s.length-1].focus({preventScroll:o}):(t.key==="ArrowRight"||t.key=="ArrowDown")&&s[0].focus({preventScroll:o}))}}const CXe=wXe;var EXe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{tab:s,size:o,type:i,icon:a,selected:n,closable:u,disabled:f,itemKey:e,deleteTabItem:y,tabPosition:_,handleKeyDown:T,onClick:D}=r,ce=EXe(r,["tab","size","type","icon","selected","closable","disabled","itemKey","deleteTabItem","tabPosition","handleKeyDown","onClick"]),ge=Vt.useMemo(()=>i==="card"&&u?ct.createElement(GC,{"aria-label":"Close",role:"button",className:`${FA.TABS_TAB}-icon-close`,onClick:st=>y(e,st)}):null,[i,u,y,e]),Ee=Vt.useCallback(st=>ct.createElement("span",null,st),[]),_e=Vt.useCallback(st=>{T&&T(st,e,u)},[T,e,u]),Be=Vt.useCallback(st=>{!f&&D&&D(e,st)},[e,f,D]),He=a?Ee(a):null,at=ds(FA.TABS_TAB,`${FA.TABS_TAB}-${i}`,`${FA.TABS_TAB}-${_}`,`${FA.TABS_TAB}-single`,{[FA.TABS_TAB_ACTIVE]:n,[FA.TABS_TAB_DISABLED]:f,[`${FA.TABS_TAB}-small`]:o==="small",[`${FA.TABS_TAB}-medium`]:o==="medium"});return ct.createElement("div",Object.assign({role:"tab",id:`semiTab${e}`,"data-tabkey":`semiTab${e}`,"aria-controls":`semiTabPanel${e}`,"aria-disabled":f?"true":"false","aria-selected":n?"true":"false",tabIndex:n?0:-1,onKeyDown:_e,onClick:Be,className:at},ce,{ref:t}),He,s,ge)},$he=Vt.forwardRef(LXe);$he.elementType="Tabs.TabItem";const jhe=$he;var SXe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{if(this.props.onTabClick(s,o),this.props.collapsible){const i=this._getItemKey(s);document.querySelector(`[data-uuid="${this.state.uuid}"] .${FA.TABS_TAB}[data-scrollkey="${i}"]`).scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}},this.handleKeyDown=(s,o,i)=>{this.props.handleKeyDown(s,o,i)},this.renderTabItem=s=>{const{size:o,type:i,deleteTabItem:a,handleKeyDown:n,tabPosition:u}=this.props,f=this._isActive(s.itemKey);return ct.createElement(jhe,Object.assign({},I1(s,["disabled","icon","itemKey","tab","closable"]),{key:this._getItemKey(s.itemKey),selected:f,size:o,type:i,tabPosition:u,handleKeyDown:n,deleteTabItem:a,onClick:this.handleItemClick}))},this.renderTabComponents=s=>s.map(o=>this.renderTabItem(o)),this.handleArrowClick=(s,o)=>{const i=o==="start"?s.pop():s.shift();if(!i)return;const a=this._getItemKey(i.itemKey);document.querySelector(`[data-uuid="${this.state.uuid}"] .${FA.TABS_TAB}[data-scrollkey="${a}"]`).scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})},this.renderCollapse=(s,o,i)=>{if($m(s))return ct.createElement(Wu,{disabled:!0,icon:o,theme:"borderless"});const{dropdownClassName:a,dropdownStyle:n}=this.props,{rePosKey:u}=this.state,f=!s.length,e=ct.createElement(Lh.Menu,null,s.map(T=>{const{icon:D,tab:ce,itemKey:ge}=T,Ee=D?this.renderIcon(T.icon):null;return ct.createElement(Lh.Item,{key:ge,onClick:_e=>this.handleItemClick(ge,_e),active:this._isActive(ge)},Ee,ce)})),y=ds({[`${FA.TABS_BAR}-arrow-${i}`]:i,[`${FA.TABS_BAR}-arrow`]:!0}),_=ds(a,{[`${FA.TABS_BAR}-dropdown`]:!0});return ct.createElement(Lh,{className:_,clickToHide:!0,clickTriggerToHide:!0,key:`${u}-${i}`,position:i==="start"?"bottomLeft":"bottomRight",render:f?null:e,showTick:!0,style:n,trigger:"hover",disableFocusListener:!0},ct.createElement("div",{role:"presentation",className:y,onClick:T=>this.handleArrowClick(s,i)},ct.createElement(Wu,{disabled:f,icon:o,theme:"borderless"})))},this.renderOverflow=s=>s.map((o,i)=>{const a=i===0?ct.createElement(Xz,null):ct.createElement(YT,null),n=i===0?"start":"end";return this.renderCollapse(o,a,n)}),this.renderCollapsedTab=()=>{const{list:s}=this.props,o=s.map(i=>{const{itemKey:a}=i;return Object.assign({key:this._getItemKey(a),active:this._isActive(a)},i)});return ct.createElement(Kde,{items:o,overflowRenderer:this.renderOverflow,renderMode:"scroll",className:`${FA.TABS_BAR}-overflow-list`,visibleItemRenderer:this.renderTabItem})},this._isActive=s=>s===this.props.activeKey,this._getItemKey=s=>`${s}-bar`,this.state={endInd:t.list.length,rePosKey:0,startInd:0,uuid:""}}componentDidMount(){this.setState({uuid:OB()})}renderIcon(t){return ct.createElement("span",null,t)}renderExtra(){const{tabBarExtraContent:t,type:s,size:o}=this.props,i={float:"right"},a=t&&t.props?t.props.style:{},n=ds(FA.TABS_BAR_EXTRA,{[`${FA.TABS_BAR}-${s}-extra`]:s,[`${FA.TABS_BAR}-${s}-extra-${o}`]:o});if(t){const u=Object.assign(Object.assign({},i),a);return ct.createElement("div",{className:n,style:u,"x-semi-prop":"tabBarExtraContent"},t)}return null}render(){const t=this.props,{type:s,style:o,className:i,list:a,tabPosition:n,collapsible:u}=t,f=SXe(t,["type","style","className","list","tabPosition","collapsible"]),e=ds(i,{[FA.TABS_BAR]:!0,[FA.TABS_BAR_LINE]:s==="line",[FA.TABS_BAR_CARD]:s==="card",[FA.TABS_BAR_BUTTON]:s==="button",[`${FA.TABS_BAR}-${n}`]:n,[`${FA.TABS_BAR}-collapse`]:u}),y=this.renderExtra(),_=u?this.renderCollapsedTab():this.renderTabComponents(a);return ct.createElement("div",Object.assign({role:"tablist","aria-orientation":n==="left"?"vertical":"horizontal",className:e,style:o},T1(f),{"data-uuid":this.state.uuid}),_,y)}}Hhe.propTypes={activeKey:be.string,className:be.string,collapsible:be.bool,list:be.array,onTabClick:be.func,size:be.oneOf(S_.SIZE),style:be.object,tabBarExtraContent:be.node,tabPosition:be.oneOf(S_.POSITION_MAP),type:be.oneOf(S_.TYPE_MAP),closable:be.bool,deleteTabItem:be.func};const hee=Hhe,xXe=ct.createContext({}),Qhe=xXe;var _Xe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{if(s!==null&&t!==null&&Array.isArray(o)&&o.length){const a=o.findIndex(f=>f.itemKey===t),n=o.findIndex(f=>f.itemKey===s),u=o.findIndex(f=>f.itemKey===i);return a===n?u>a:n{const{itemKey:t}=this.props,{activeKey:s,lazyRender:o}=this.context,i=s===t;return this._active=this._active||i,o?this._active:!0}}render(){const{tabPaneMotion:t,tabPosition:s,prevActiveKey:o}=this.context,i=this.props,{className:a,style:n,children:u,itemKey:f,tabIndex:e}=i,y=_Xe(i,["className","style","children","itemKey","tabIndex"]),_=this.context.activeKey===f,T=ds(a,{[FA.TABS_PANE_INACTIVE]:!_,[FA.TABS_PANE_ACTIVE]:_,[FA.TABS_PANE]:!0}),D=this.shouldRender(),ce=(()=>{const _e=this.getDirection(this.context.activeKey,f,this.context.panes,o);return s==="top"?_e?FA.TABS_PANE_ANIMATE_RIGHT_SHOW:FA.TABS_PANE_ANIMATE_LEFT_SHOW:_e?FA.TABS_PANE_ANIMATE_BOTTOM_SHOW:FA.TABS_PANE_ANIMATE_TOP_SHOW})(),ge=!this.context.panes.find(_e=>_e.itemKey===o),Ee=t&&_&&!ge&&!this.context.forceDisableMotion;return ct.createElement("div",Object.assign({ref:this.ref,role:"tabpanel",id:`semiTabPanel${f}`,"aria-labelledby":`semiTab${f}`,className:T,style:n,"aria-hidden":_?"false":"true",tabIndex:e||0},T1(y),{"x-semi-prop":"children"}),ct.createElement(IL,{motion:Ee,animationState:_?"enter":"leave",startClassName:ce},_e=>{let{animationClassName:Be,animationEventsNeedBind:He}=_e;return ct.createElement("div",Object.assign({className:ds(FA.TABS_PANE_MOTION_OVERLAY,Be),"x-semi-prop":"children"},He),D?u:null)}))}}PF.isTabPane=!0;PF.contextType=Qhe;PF.propTypes={className:be.string,style:be.object,children:be.node,disabled:be.bool,itemKey:be.string,tab:be.node,icon:be.node,closable:be.bool};const LP=PF;var TXe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{this.contentRef={current:s}},this.onTabClick=(s,o)=>{this.foundation.handleTabClick(s,o)},this.rePosChildren=(s,o)=>{const i=[],a=ct.Children.toArray(s);return s.length&&(i.push(...a.filter(n=>n.props&&n.props.itemKey===o)),i.push(...a.filter(n=>n.props&&n.props.itemKey!==o))),i},this.getActiveItem=()=>{const{activeKey:s}=this.state,{children:o,tabList:i}=this.props;return i||!Array.isArray(o)?o:ct.Children.toArray(o).filter(a=>Vt.isValidElement(a)&&a.type&&a.type.isTabPane?a.props.itemKey===s:!0)},this.deleteTabItem=(s,o)=>{o.stopPropagation(),this.foundation.handleTabDelete(s)},this.foundation=new CXe(this.adapter),this.state={activeKey:this.foundation.getDefaultActiveKey(),panes:[],prevActiveKey:null,forceDisableMotion:!1},this.contentRef=Vt.createRef(),this.contentHeight="auto"}get adapter(){return Object.assign(Object.assign({},super.adapter),{collectPane:()=>{const{tabList:t,children:s}=this.props;if(Array.isArray(t)&&t.length){this.setState({panes:t});return}const o=ct.Children.map(s,i=>{if(i){const{tab:a,icon:n,disabled:u,itemKey:f,closable:e}=i.props;return{tab:a,icon:n,disabled:u,itemKey:f,closable:e}}});this.setState({panes:o})},collectActiveKey:()=>{let t=[];const{tabList:s,children:o,activeKey:i}=this.props;if(typeof i<"u")return;const{activeKey:a}=this.state;Array.isArray(s)&&s.length?t=s:t=ct.Children.map(o,n=>{if(n){const{tab:u,icon:f,disabled:e,itemKey:y,closable:_}=n.props;return{tab:u,icon:f,disabled:e,itemKey:y,closable:_}}}),t.findIndex(n=>n.itemKey===a)===-1&&(t.length>0?this.setState({activeKey:t[0].itemKey}):this.setState({activeKey:""}))},notifyTabClick:(t,s)=>{this.props.onTabClick(t,s)},notifyChange:t=>{this.props.onChange(t)},setNewActiveKey:t=>{this.setState({activeKey:t})},getDefaultActiveKeyFromChildren:()=>{const{tabList:t,children:s}=this.props;let o="";return(t||ct.Children.toArray(s).map(a=>Vt.isValidElement(a)?a.props:null)).forEach(a=>{a&&!o&&!a.disabled&&(o=a.itemKey)}),o},notifyTabDelete:t=>{this.props.onTabClose&&this.props.onTabClose(t)}})}static getDerivedStateFromProps(t,s){const o={};return!yw(t.activeKey)&&t.activeKey!==s.activeKey&&(s.prevActiveKey=s.activeKey,o.activeKey=t.activeKey),o}componentDidUpdate(t,s){const o=ct.Children.toArray(t.children).map(n=>I1(Vt.isValidElement(n)?n.props:null,Aee)),i=ct.Children.toArray(this.props.children).map(n=>I1(Vt.isValidElement(n)?n.props:null,Aee)),a=this.props.tabList||t.tabList;if(_0(this.props.tabList,t.tabList)||this.foundation.handleTabListChange(),s.activeKey!==this.state.activeKey&&s.activeKey!==this.state.prevActiveKey&&this.setState({prevActiveKey:s.activeKey}),t.activeKey!==this.props.activeKey){const n=(()=>{const u=new Set(o.map(f=>f.itemKey));return i.map(f=>f.itemKey).filter(f=>!u.has(f))})();this.setState({forceDisableMotion:n.includes(this.props.activeKey)})}!_0(o,i)&&!a&&this.foundation.handleTabPanesChange()}render(){const t=this.props,{children:s,className:o,collapsible:i,contentStyle:a,keepDOM:n,lazyRender:u,renderTabBar:f,size:e,style:y,tabBarClassName:_,tabBarExtraContent:T,tabBarStyle:D,tabPaneMotion:ce,tabPosition:ge,type:Ee}=t,_e=TXe(t,["children","className","collapsible","contentStyle","keepDOM","lazyRender","renderTabBar","size","style","tabBarClassName","tabBarExtraContent","tabBarStyle","tabPaneMotion","tabPosition","type"]),{panes:Be,activeKey:He}=this.state,at=ds(o,{[FA.TABS]:!0,[`${FA.TABS}-${ge}`]:ge}),st=ds({[FA.TABS_CONTENT]:!0,[`${FA.TABS_CONTENT}-${ge}`]:ge}),vt={activeKey:He,className:_,collapsible:i,list:Be,onTabClick:this.onTabClick,size:e,style:D,tabBarExtraContent:T,tabPosition:ge,type:Ee,deleteTabItem:this.deleteTabItem,handleKeyDown:this.foundation.handleKeyDown},Ot=f?f(vt,hee):ct.createElement(hee,Object.assign({},vt)),Kt=n?s:this.getActiveItem();return ct.createElement("div",Object.assign({className:at,style:y},this.getDataAttr(_e)),Ot,ct.createElement(Qhe.Provider,{value:{activeKey:He,lazyRender:u,panes:Be,tabPaneMotion:ce,tabPosition:ge,prevActiveKey:this.state.prevActiveKey,forceDisableMotion:this.state.forceDisableMotion}},ct.createElement("div",{ref:this.setContentRef,className:st,style:Object.assign({},a)},Kt)))}}K4.TabPane=LP;K4.TabItem=jhe;K4.propTypes={activeKey:be.string,className:be.string,collapsible:be.bool,contentStyle:be.oneOfType([be.object]),defaultActiveKey:be.string,keepDOM:be.bool,lazyRender:be.bool,onChange:be.func,onTabClick:be.func,renderTabBar:be.func,size:be.oneOf(S_.SIZE),style:be.object,tabBarClassName:be.string,tabBarExtraContent:be.node,tabBarStyle:be.object,tabList:be.array,tabPaneMotion:be.bool,tabPosition:be.oneOf(S_.POSITION_MAP),type:be.oneOf(S_.TYPE_MAP),onTabClose:be.func,preventScroll:be.bool};K4.defaultProps={children:[],collapsible:!1,keepDOM:!0,lazyRender:!1,onChange:()=>{},onTabClick:()=>{},size:"large",tabPaneMotion:!0,tabPosition:"top",type:"line",onTabClose:()=>{}};const Khe=K4;class xG extends lh{constructor(t){super(Object.assign(Object.assign({},xG.defaultAdapter),t)),this.handleMouseInSideChange=s=>{this._adapter.handleMouseInSideChange(s)},this.getInputWrapperRect=()=>this._adapter.getInputWrapperRect()}hasToast(t){return this._adapter.getState("list").map(o=>{let{id:i}=o;return i}).includes(t)}addToast(t){const s=this._adapter.getState("list");s.push(t),this._adapter.updateToast(s,[],[])}updateToast(t,s){let o=this._adapter.getState("list");o=o.map(a=>a.id===t?Object.assign(Object.assign({},a),s):a);const i=o.filter(a=>a.id===t);this._adapter.updateToast(o,[],i)}removeToast(t){let s=this._adapter.getState("list");const o=[];s=s.filter(i=>i.id===t?(o.push(i),!1):!0),this._adapter.updateToast(s,o,[])}destroyAll(){const t=this._adapter.getState("list");t.length>0&&this._adapter.updateToast([],t,[])}}const sU=`${fi}-toast`,xx={PREFIX:sU,WRAPPER:`${sU}-wrapper`,LIST:`${sU}-list`},jB={types:["warning","success","info","error","default"],themes:["normal","light"],directions:["ltr","rtl"]},NXe={duration:3};class _G extends lh{constructor(t){super(Object.assign(Object.assign({},_G.defaultAdapter),t)),this._timer=null,this._id=null}init(){this.startCloseTimer_(),this._id=this._adapter.getProp("id")}destroy(){this.clearCloseTimer_()}startCloseTimer_(){const t=this._adapter.getProp("duration");t&&mg(t)&&(this._timer=setTimeout(()=>{this.close()},t*1e3))}close(t){t&&t.stopPropagation(),this._adapter.notifyWrapperToRemove(this._id),this._adapter.notifyClose()}clearCloseTimer_(){this._timer&&(clearTimeout(this._timer),this._timer=null)}restartCloseTimer(){this.clearCloseTimer_(),this.startCloseTimer_()}}const d1=xx.PREFIX;let DF=class extends Uc{constructor(t){super(t),this.toastEle=ct.createRef(),this.clearCloseTimer=()=>{this.foundation.clearCloseTimer_()},this.startCloseTimer=()=>{this.foundation.startCloseTimer_()},this.restartCloseTimer=()=>{this.foundation.restartCloseTimer()},this.state={},this.foundation=new _G(this.adapter)}get adapter(){return Object.assign(Object.assign({},super.adapter),{notifyWrapperToRemove:t=>{this.props.close(t)},notifyClose:()=>{this.props.onClose()}})}componentDidMount(){this.foundation.init()}componentWillUnmount(){this.foundation.destroy()}close(t){this.foundation.close(t)}renderIcon(){const{type:t,icon:s}=this.props,i={warning:ct.createElement(WT,null),success:ct.createElement(S4,null),info:ct.createElement(H6,null),error:ct.createElement(GT,null)}[t],a="large",n=ds(`${d1}-icon`,`${d1}-icon-${t}`);return s?Iv(s)?ct.cloneElement(s,{size:a,className:`${d1}-icon`}):s:t&&i?ct.cloneElement(i,{size:a,className:n}):null}render(){const{content:t,type:s,theme:o,showClose:i,textMaxWidth:a,className:n,style:u}=this.props,f=this.props.direction||this.context.direction,e=ds(d1,n,{[`${d1}-${s}`]:!0,[`${d1}-${o}`]:o==="light",[`${d1}-rtl`]:f==="rtl"}),y={};y.maxWidth=a;const _="borderless",T="small",D=this.props.positionInList?this.props.positionInList.length-this.props.positionInList.index-1:0,ce=ct.createElement("div",{ref:this.toastEle,role:"alert","aria-label":`${s||"default"} type`,className:e,style:Object.assign(Object.assign({},u),{transform:`translate3d(0,0,${D*-10}px)`}),onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onAnimationStart:this.props.onAnimationStart,onAnimationEnd:this.props.onAnimationEnd},ct.createElement("div",{className:`${d1}-content`},this.renderIcon(),ct.createElement("span",{className:`${d1}-content-text`,style:y,"x-semi-prop":"content"},t),i&&ct.createElement("div",{className:`${d1}-close-button`},ct.createElement(eN,{onClick:ge=>this.close(ge),type:"tertiary",icon:ct.createElement(GC,{"x-semi-prop":"icon"}),theme:_,size:T}))));if(this.props.stack){const ge=this.props.stackExpanded&&this.toastEle.current&&getComputedStyle(this.toastEle.current).height||0;return ct.createElement("div",{className:`${d1}-zero-height-wrapper`,style:{height:ge}},ce)}else return ce}};DF.contextType=by;DF.propTypes={onClose:be.func,content:be.node,close:be.func,duration:be.number,theme:be.oneOf(jB.themes),type:be.oneOf(jB.types),textMaxWidth:be.oneOfType([be.string,be.number]),style:be.object,className:be.string,showClose:be.bool,stack:be.bool,stackExpanded:be.bool,icon:be.node,direction:be.oneOf(jB.directions)};DF.defaultProps={onClose:so,content:"",close:so,duration:NXe.duration,textMaxWidth:450,showClose:!0,stack:!1,stackExpanded:!1,theme:"normal"};const zhe=DF;var IXe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{var{afterClose:s}=r,o=IXe(r,["afterClose"]);const[i,a]=Vt.useState(!0),n=()=>{a(!1)};return ct.useImperativeHandle(t,()=>({close:()=>{a(!1)}})),Vt.useEffect(()=>{i||s(o.id)},[i]),i?ct.createElement(zhe,Object.assign({},o,{close:n})):null},RXe=ct.forwardRef(OXe),YN={motion:!0,zIndex:1010,duration:3};function BXe(){const[r,t]=ct.useState([]);function s(o,i){return t(a=>[{element:o,config:i},...a]),a=>{t(n=>n.filter(u=>{let{config:f}=u;return f.id!==a}))}}return[r,s]}function kXe(){const[r,t]=BXe(),s=Vt.useRef(new Map),o=a=>{const n=rP("semi_toast_"),u=Object.assign(Object.assign({},a),{id:n});let f;const e=ct.createElement(RXe,Object.assign({},u,{key:n,afterClose:y=>f(y),ref:y=>{var _;s.current.set(n,{close:(_=y==null?void 0:y.close)!==null&&_!==void 0?_:so})}}));return f=t(e,Object.assign({},u)),n},i=a=>{var n;const{close:u}=(n=s.current.get(a))!==null&&n!==void 0?n:{};u==null||u()};return[{success:a=>o(Object.assign(Object.assign(Object.assign({},YN),a),{type:"success"})),info:a=>o(Object.assign(Object.assign(Object.assign({},YN),a),{type:"info"})),error:a=>o(Object.assign(Object.assign(Object.assign({},YN),a),{type:"error"})),warning:a=>o(Object.assign(Object.assign(Object.assign({},YN),a),{type:"warning"})),open:a=>o(Object.assign(Object.assign(Object.assign({},YN),a),{type:"default"})),close:a=>i(a)},ct.createElement(ct.Fragment,null,Array.isArray(r)&&r.length?ct.createElement(ct.Fragment,null,r.map(a=>a.element)):null)]}const PXe=()=>{var r;return r=class L0 extends Uc{constructor(s){super(s),this.stack=!1,this.innerWrapperRef=ct.createRef(),this.handleMouseEnter=o=>{this.stack&&this.foundation.handleMouseInSideChange(!0)},this.handleMouseLeave=o=>{var i;this.stack&&(!((i=this.foundation.getInputWrapperRect())===null||i===void 0)&&i.height)&&this.foundation.handleMouseInSideChange(!1)},this.state={list:[],removedItems:[],updatedItems:[],mouseInSide:!1},this.foundation=new xG(this.adapter)}get adapter(){return Object.assign(Object.assign({},super.adapter),{updateToast:(s,o,i)=>{this.setState({list:s,removedItems:o,updatedItems:i})},handleMouseInSideChange:s=>{this.setState({mouseInSide:s})},getInputWrapperRect:()=>{var s;return(s=this.innerWrapperRef.current)===null||s===void 0?void 0:s.getBoundingClientRect()}})}static create(s){var o;const i=(o=s.id)!==null&&o!==void 0?o:rP("toast");if(L0.ref){const a=document.querySelector(`#${this.wrapperId}`);["top","left","bottom","right"].map(n=>{n in s&&(a.style[n]=typeof s[n]=="number"?`${s[n]}px`:s[n])}),!!s.stack!==L0.ref.stack&&(L0.ref.stack=!!s.stack),L0.ref.has(i)?L0.ref.update(i,Object.assign(Object.assign({},s),{id:i})):L0.ref.add(Object.assign(Object.assign({},s),{id:i}))}else{const a=document.createElement("div");this.wrapperId||(this.wrapperId=rP("toast-wrapper").slice(0,26)),a.className=xx.WRAPPER,a.id=this.wrapperId,a.style.zIndex=String(typeof s.zIndex=="number"?s.zIndex:L0.defaultOpts.zIndex),["top","left","bottom","right"].map(n=>{if(n in L0.defaultOpts||n in s){const u=s[n]?s[n]:L0.defaultOpts[n];a.style[n]=typeof u=="number"?`${u}px`:u}}),L0.defaultOpts.getPopupContainer?L0.defaultOpts.getPopupContainer().appendChild(a):document.body.appendChild(a),zy.render(ct.createElement(L0,{ref:n=>L0.ref=n}),a,()=>{L0.ref.add(Object.assign(Object.assign({},s),{id:i})),L0.ref.stack=!!s.stack})}return i}static close(s){L0.ref&&L0.ref.remove(s)}static destroyAll(){if(L0.ref){L0.ref.destroyAll();const s=document.querySelector(`#${this.wrapperId}`);zy.unmountComponentAtNode(s),s&&s.parentNode.removeChild(s),L0.ref=null,this.wrapperId=null}}static getWrapperId(){return this.wrapperId}static info(s){return typeof s=="string"&&(s={content:s}),this.create(Object.assign(Object.assign(Object.assign({},L0.defaultOpts),s),{type:"info"}))}static warning(s){return typeof s=="string"&&(s={content:s}),this.create(Object.assign(Object.assign(Object.assign({},L0.defaultOpts),s),{type:"warning"}))}static error(s){return typeof s=="string"&&(s={content:s}),this.create(Object.assign(Object.assign(Object.assign({},L0.defaultOpts),s),{type:"error"}))}static success(s){return typeof s=="string"&&(s={content:s}),this.create(Object.assign(Object.assign(Object.assign({},L0.defaultOpts),s),{type:"success"}))}static config(s){["top","left","bottom","right"].forEach(o=>{o in s&&(L0.defaultOpts[o]=s[o])}),typeof s.zIndex=="number"&&(L0.defaultOpts.zIndex=s.zIndex),typeof s.duration=="number"&&(L0.defaultOpts.duration=s.duration),typeof s.getPopupContainer=="function"&&(L0.defaultOpts.getPopupContainer=s.getPopupContainer)}has(s){return this.foundation.hasToast(s)}add(s){return this.foundation.addToast(s)}update(s,o){return this.foundation.updateToast(s,o)}remove(s){return this.foundation.removeToast(s)}destroyAll(){return this.foundation.destroyAll()}render(){let{list:s}=this.state;const{removedItems:o,updatedItems:i}=this.state;s=Array.from(new Set([...s,...o]));const a=i.map(u=>{let{id:f}=u;return f}),n=u=>{var f;!((f=u==null?void 0:u.foundation)===null||f===void 0)&&f._id&&a.includes(u.foundation._id)&&u.foundation.restartCloseTimer()};return ct.createElement(ct.Fragment,null,ct.createElement("div",{className:ds({[`${xx.PREFIX}-innerWrapper`]:!0,[`${xx.PREFIX}-innerWrapper-hover`]:this.state.mouseInSide}),ref:this.innerWrapperRef,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave},s.map((u,f)=>{const e=o.find(y=>y.id===u.id)!==void 0;return ct.createElement(IL,{key:u.id,motion:u.motion,animationState:e?"leave":"enter",startClassName:e?`${xx.PREFIX}-animation-hide`:`${xx.PREFIX}-animation-show`},y=>{let{animationClassName:_,animationEventsNeedBind:T,isAnimating:D}=y;return e&&!D?null:ct.createElement(zhe,Object.assign({},u,{stack:this.stack,stackExpanded:this.state.mouseInSide,positionInList:{length:s.length,index:f},className:ds({[u.className]:!!u.className,[_]:!0})},T,{style:Object.assign({},u.style),close:ce=>this.remove(ce),ref:n}))})})))}},r.defaultOpts={motion:!0,zIndex:1010,content:""},r.propTypes={content:be.node,duration:be.number,onClose:be.func,icon:be.node,direction:be.oneOf(jB.directions),stack:be.bool},r.defaultProps={},r};class DXe{static create(t){const s=PXe();return s.useToast=kXe,t&&s.config(t),s}}const Ch=DXe.create(),Vhe={PREFIX:`${fi}-tree`,PREFIX_OPTION:`${fi}-tree-option`};function oU(r){return sfe(r,t=>{if(Oce(t)&&!t._innerDataTag||ct.isValidElement(t))return t})}const FXe=Vhe.PREFIX;class TG extends Vt.PureComponent{constructor(t){super(t),this._onResize=s=>{const o=s&&s[1]&&s[1].target;if(o){const i=ro(o,"offsetHeight")||0,a=window.getComputedStyle(o)||{},n=parseInt(ro(a,"paddingTop"),10)||0,u=parseInt(ro(a,"paddingBottom"),10)||0,f=i-n-u;this.state.height!==f&&this.setState({height:i-n-u})}},this.state={height:this.props.defaultHeight||0}}componentDidMount(){const{height:t}=this.state}render(){const{children:t,defaultWidth:s,defaultHeight:o}=this.props,{height:i}=this.state;let a=!1;return(i===0||typeof i!="number")&&(a=!0),ct.createElement(hL,{observeParent:!0,onResize:this._onResize},ct.createElement("div",{style:{height:o,overflow:"visible"},className:`${FXe}-auto-wrapper`},!a&&t({height:i,width:s})))}}TG.propTypes={defaultHeight:be.oneOfType([be.number,be.string]),defaultWidth:be.oneOfType([be.number,be.string])};TG.defaultProps={defaultHeight:"100%",defaultWidth:"100%"};const MXe=ct.createContext(null),NG=MXe,UXe=r=>{let{prefixcls:t,level:s,isEnd:o,showLine:i}=r;const a=`${t}-indent-unit`,n=[];for(let u=0;u{const{onNodeSelect:o}=this.context;o(s,this.props)},this.onExpand=s=>{const{onNodeExpand:o}=this.context;s&&s.stopPropagation(),s.nativeEvent.stopImmediatePropagation(),o(s,this.props)},this.onCheck=s=>{if(this.isDisabled())return;const{onNodeCheck:o}=this.context;s.stopPropagation(),s.nativeEvent.stopImmediatePropagation(),o(s,this.props)},this.handleCheckEnterPress=s=>{N1(s)&&this.onCheck(s)},this.onContextMenu=s=>{const{onNodeRightClick:o}=this.context;o(s,this.props)},this.onClick=s=>{const{expandAction:o}=this.context;if(o==="doubleClick"){this.debounceSelect(s);return}this.onSelect(s),o==="click"&&this.onExpand(s)},this.handleliEnterPress=s=>{N1(s)&&this.onClick(s)},this.onDoubleClick=s=>{const{expandAction:o,onNodeDoubleClick:i}=this.context;s.stopPropagation(),s.nativeEvent.stopImmediatePropagation(),Mc(i)&&i(s,this.props),o==="doubleClick"&&this.onExpand(s)},this.onDragStart=s=>{const{onNodeDragStart:o}=this.context;s.stopPropagation(),o(s,Object.assign(Object.assign({},this.props),{nodeInstance:this.refNode}));try{s.dataTransfer.setData("text/plain","")}catch{}},this.onDragEnter=s=>{const{onNodeDragEnter:o}=this.context;s.preventDefault(),s.stopPropagation(),o(s,Object.assign(Object.assign({},this.props),{nodeInstance:this.refNode}))},this.onDragOver=s=>{const{onNodeDragOver:o}=this.context;s.preventDefault(),s.stopPropagation(),o(s,Object.assign(Object.assign({},this.props),{nodeInstance:this.refNode}))},this.onDragLeave=s=>{const{onNodeDragLeave:o}=this.context;s.stopPropagation(),o(s,Object.assign(Object.assign({},this.props),{nodeInstance:this.refNode}))},this.onDragEnd=s=>{const{onNodeDragEnd:o}=this.context;s.stopPropagation(),o(s,Object.assign(Object.assign({},this.props),{nodeInstance:this.refNode}))},this.onDrop=s=>{const{onNodeDrop:o}=this.context;s.preventDefault(),s.stopPropagation(),o(s,Object.assign(Object.assign({},this.props),{nodeInstance:this.refNode}))},this.getNodeChildren=()=>{const{children:s}=this.props;return s||[]},this.isLeaf=()=>{const{isLeaf:s,loaded:o}=this.props,{loadData:i}=this.context,a=this.getNodeChildren().length!==0;return s===!1?!1:s||!i&&!a||i&&o&&!a},this.isDisabled=()=>{const{disabled:s}=this.props,{treeDisabled:o}=this.context;return s===!1?!1:!!(o||s)},this.renderSwitcher=()=>this.isLeaf()?ct.createElement("span",{className:ds(`${Wp}-switcher`)},ct.createElement("span",{className:`${Wp}-switcher-leaf-line`})):null,this.renderRealLabel=()=>{const{renderLabel:s}=this.context,{label:o,keyword:i,data:a,filtered:n,treeNodeFilterProp:u}=this.props;return Mc(s)?s(o,a):rA(o)&&n&&i?Gz({sourceString:o,searchWords:[i],option:{highlightTag:"span",highlightClassName:`${Wp}-highlight`}}):o},this.setRef=s=>{this.refNode=s},this.state={},this.debounceSelect=pce(this.onSelect,500,{leading:!0,trailing:!1})}renderArrow(){const t=!this.isLeaf(),{loading:s,expanded:o,showLine:i}=this.props;return s?ct.createElement(e1,{wrapperClassName:`${Wp}-spin-icon`}):t?ct.createElement(pfe,{role:"button","aria-label":`${o?"Expand":"Collapse"} the tree item`,className:`${Wp}-expand-icon`,size:"small",onClick:this.onExpand}):i?this.renderSwitcher():ct.createElement("span",{className:`${Wp}-empty-icon`})}renderCheckbox(){const{checked:t,halfChecked:s,eventKey:o}=this.props,i=this.isDisabled();return ct.createElement("div",{role:"none",onClick:this.onCheck,onKeyPress:this.handleCheckEnterPress},ct.createElement(iT,{"aria-label":"Toggle the checked state of checkbox",value:o,indeterminate:s,checked:t,disabled:!!i}))}renderIcon(){const{directory:t,treeIcon:s}=this.context,{expanded:o,icon:i}=this.props,a=!this.isLeaf(),n=i||s;let u;return(n||t)&&(n?u=i||s:a?u=o?ct.createElement(s7e,{className:`${Wp}-item-icon`}):ct.createElement(t7e,{className:`${Wp}-item-icon`}):u=ct.createElement(_9,{className:`${Wp}-item-icon`})),u}renderEmptyNode(){const{emptyContent:t}=this.props,s=ds(Wp,{[`${Wp}-empty`]:!0});return ct.createElement("ul",{className:s},ct.createElement("li",{className:`${Wp}-label ${Wp}-label-empty`,"x-semi-prop":"emptyContent"},t))}render(){const t=this.props,{eventKey:s,expanded:o,selected:i,checked:a,halfChecked:n,loading:u,active:f,level:e,empty:y,filtered:_,treeNodeFilterProp:T,display:D,style:ce,isEnd:ge,showLine:Ee}=t,_e=jXe(t,["eventKey","expanded","selected","checked","halfChecked","loading","active","level","empty","filtered","treeNodeFilterProp","display","style","isEnd","showLine"]);if(y)return this.renderEmptyNode();const{multiple:Be,draggable:He,renderFullLabel:at,dragOverNodeKey:st,dropPosition:vt,labelEllipsis:Ot}=this.context,Kt=ge[ge.length-1],sn=this.isDisabled(),Bn=st===s&&vt===0,fn=st===s&&vt===-1,bn=st===s&&vt===1,$n=ds(Wp,{[`${Wp}-level-${e+1}`]:!0,[`${Wp}-fullLabel-level-${e+1}`]:at,[`${Wp}-collapsed`]:!o,[`${Wp}-disabled`]:!!sn,[`${Wp}-selected`]:i,[`${Wp}-active`]:!Be&&f,[`${Wp}-ellipsis`]:Ot,[`${Wp}-drag-over`]:!sn&&Bn,[`${Wp}-draggable`]:!sn&&He&&!at,[`${Wp}-fullLabel-draggable`]:!sn&&He&&at,[`${Wp}-fullLabel-drag-over-gap-top`]:!sn&&fn&&at,[`${Wp}-fullLabel-drag-over-gap-bottom`]:!sn&&bn&&at,[`${Wp}-tree-node-last-leaf`]:Kt}),_n={onClick:this.onClick,onContextMenu:this.onContextMenu,onDoubleClick:this.onDoubleClick,className:$n,onExpand:this.onExpand,data:_e.data,level:e,onCheck:this.onCheck,style:ce,expandIcon:this.renderArrow(),checkStatus:{checked:a,halfChecked:n},expandStatus:{expanded:o,loading:u},filtered:_,searchWord:_e.keyword},Nr={onDoubleClick:this.onDoubleClick,onDragStart:He?this.onDragStart:void 0,onDragEnter:He?this.onDragEnter:void 0,onDragOver:He?this.onDragOver:void 0,onDragLeave:He?this.onDragLeave:void 0,onDrop:He?this.onDrop:void 0,onDragEnd:He?this.onDragEnd:void 0,draggable:!sn&&He||void 0};if(at){const _r=at(Object.assign({},_n));return He?ct.cloneElement(_r,Object.assign({ref:this.setRef},Nr)):$m(ce)?_r:ct.cloneElement(_r,{style:Object.assign(Object.assign({},ro(_r,["props","style"])),ce)})}const Cr=ds(`${Wp}-label`,{[`${Wp}-drag-over-gap-top`]:!sn&&fn,[`${Wp}-drag-over-gap-bottom`]:!sn&&bn}),Dr=ro(_e,["data","children","length"]),fr=rA(_e.pos)?Number(_e.pos.split("-")[e+1])+1:1;return ct.createElement("li",Object.assign({className:$n,role:"treeitem","aria-disabled":sn,"aria-checked":a,"aria-selected":i,"aria-setsize":Dr,"aria-posinset":fr,"aria-expanded":o,"aria-level":e+1,"data-key":s,onClick:this.onClick,onKeyPress:this.handleliEnterPress,onContextMenu:this.onContextMenu,onDoubleClick:this.onDoubleClick,ref:this.setRef,style:ce},Nr),ct.createElement($Xe,{showLine:Ee,prefixcls:Wp,level:e,isEnd:ge}),this.renderArrow(),ct.createElement("span",{className:Cr},Be?this.renderCheckbox():null,this.renderIcon(),ct.createElement("span",{className:`${Wp}-label-text`},this.renderRealLabel())))}};x_.contextType=NG;x_.propTypes={expanded:be.bool,selected:be.bool,checked:be.bool,halfChecked:be.bool,active:be.bool,disabled:be.bool,loaded:be.bool,loading:be.bool,isLeaf:be.bool,pos:be.string,children:be.oneOfType([be.array,be.object]),icon:be.node,directory:be.bool,keyword:be.string,treeNodeFilterProp:be.string,selectedKey:be.string,motionKey:be.oneOfType([be.string,be.arrayOf(be.string)]),isEnd:be.arrayOf(be.bool),showLine:be.bool};x_.defaultProps={selectedKey:"",motionKey:""};var HXe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{setTimeout(()=>{a(!r.open)},0)},[]),ct.createElement(_de,Object.assign({},o,{isOpen:i}),s)}const pee=r=>r.key;class Ghe extends Vt.PureComponent{constructor(t){super(t),this.onMotionEnd=()=>{typeof this.props.onMotionEnd=="function"&&this.props.onMotionEnd(),this.setState({transitionNodes:[]})},this.state={transitionNodes:[]}}static getDerivedStateFromProps(t,s){const{flattenNodes:o=[],motionKeys:i,motionType:a,flattenList:n=[]}=t,u=!_0(s.cachedMotionKeys,i)||!_0(s.cachedData.map(ce=>ce.key),o.map(ce=>ce.key)),f=[...i];if(!u||!f.length)return null;const e=[],y=[];let _=0,T={};return(a==="hide"&&n?n:o).forEach((ce,ge)=>{const Ee=pee(ce);i.has(Ee)?(y.push(ce),Ee===f[0]&&(_=ge)):e.push(ce)}),e.splice(_,0,y),T={transitionNodes:e,cachedData:o,cachedMotionKeys:i,cachedMotionType:a},T}render(){const{flattenNodes:t,motionType:s,searchTargetIsDeep:o,renderTreeNode:i}=this.props,{transitionNodes:a}=this.state;return(a.length&&!o?a:t).map(f=>{const e=Array.isArray(f);if(e&&!f.length)return null;if(e&&f.length){const y=pee(f[0]);return ct.createElement(QXe,{open:s==="hide",duration:200,motion:!!s,key:`motion-${y}`,onMotionEnd:this.onMotionEnd},f.map(_=>i(_)))}return i(f)})}}Ghe.contextType=NG;const Whe={PREFIX:`${fi}-tree-select`,PREFIX_TREE:`${fi}-tree`,PREFIX_OPTION:`${fi}-tree-select-option`},tv={SIZE_SET:["small","large","default"],SEARCH_POSITION_DROPDOWN:"dropdown",SEARCH_POSITION_TRIGGER:"trigger",STATUS:x6};class KXe extends lh{constructor(t){super(Object.assign({},t)),this._registerClickOutsideHandler=s=>{this._adapter.registerClickOutsideHandler(o=>{this.handlerTriggerBlur(o),this.close(o)})},this.clearInputValue=()=>{const{inputValue:s}=this.getStates();s&&this._adapter.updateInputValue("")}}init(){const{searchAutoFocus:t,searchPosition:s,filterTreeNode:o}=this.getProps(),i=s===tv.SEARCH_POSITION_TRIGGER&&o,a=t&&i;this._setDropdownWidth(),(this.getProp("defaultOpen")||a)&&!this._isDisabled()&&this.open(),a&&this.handleTriggerFocus(null)}destroy(){this._adapter.unregisterClickOutsideHandler()}_setDropdownWidth(){const{style:t,dropdownMatchSelectWidth:s}=this.getProps();let o;s&&(t&&mg(t.width)||t&&rA(t.width)&&!t.width.includes("%")?o=t.width:o=this._adapter.getTriggerWidth(),this._adapter.setOptionWrapperWidth(o))}_isMultiple(){return this.getProp("multiple")}_isAnimated(){return this.getProp("motionExpand")}_isDisabled(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return this.getProp("disabled")||t.disabled}_isExpandControlled(){return this.getProp("expandedKeys")}_isSelectToClose(){return!this.getProp("expandAction")}_isLoadControlled(){return this.getProp("loadedKeys")}_showFilteredOnly(){const{inputValue:t}=this.getStates(),{showFilteredOnly:s}=this.getProps();return!!t&&s}findDataForValue(t){const{value:s,defaultValue:o,keyMaps:i}=this.getProps(),a=ro(i,"value","value"),n=ro(i,"key","key");let u=[];return s?u=Array.isArray(s)?s:[s]:o&&(u=Array.isArray(o)?o:[o]),u.find(f=>f[a]===t||f[n]===t)}constructDataForValue(t){const{treeNodeLabelProp:s,keyMaps:o}=this.getProps(),i=ro(o,"key","key"),a=ro(o,"label",s);return{[i]:t,[a]:t}}getDataForKeyNotInKeyEntities(t){const{onChangeWithObject:s}=this.getProps();return s?this.findDataForValue(t):this.constructDataForValue(t)}getCopyFromState(t){const s={};return x9e(t).forEach(o=>{s[o]=O9(this.getState(o))}),s}getTreeNodeProps(t){const{expandedKeys:s=new Set([]),selectedKeys:o=[],checkedKeys:i=new Set([]),halfCheckedKeys:a=new Set([]),realCheckedKeys:n=new Set([]),keyEntities:u={},filteredKeys:f=new Set([]),inputValue:e="",loadedKeys:y,loadingKeys:_,filteredExpandedKeys:T=new Set([]),disabledKeys:D=new Set([])}=this.getStates(),{treeNodeFilterProp:ce,checkRelation:ge}=this.getProps(),Ee=u[t];if(!Ee)return null;let Be=!1,He=!1;ge==="related"?(Be=i.has(t),He=a.has(t)):ge==="unRelated"&&(Be=n.has(t),He=!1);const st={eventKey:t,expanded:!!e?T.has(t):s.has(t),selected:o.includes(t),checked:Be,halfChecked:He,pos:String(Ee?Ee.pos:""),level:Ee.level,filtered:f.has(t),keyword:e,treeNodeFilterProp:ce,loading:_.has(t)&&!y.has(t),loaded:y.has(t)};return this.getProp("disableStrictly")&&D.has(t)&&(st.disabled=!0),st}handleNodeLoad(t,s,o,i){const{loadData:a}=this.getProps(),{key:n}=o;return!a||t.has(n)||s.has(n)?{}:(a(o).then(()=>{const{loadedKeys:u,loadingKeys:f}=this.getCopyFromState(["loadedKeys","loadingKeys"]),e=u.add(n),y=new Set([...f]);y.delete(n),this._adapter.notifyLoad(e,o),this._isLoadControlled()||this._adapter.updateState({loadedKeys:e}),this._adapter.setState({loadingKeys:y}),i()}),{loadingKeys:s.add(n)})}focusInput(t){this._adapter.updateInputFocus(t)}_notifyMultipleChange(t,s){const{keyEntities:o}=this.getStates(),{leafOnly:i,checkRelation:a,keyMaps:n}=this.getProps();let u=[];a==="related"?u=ME(t,o,i,!0):a==="unRelated"&&(u=t);const f=u.map(e=>o[e]&&o[e].key===e?o[e].data:this.getDataForKeyNotInKeyEntities(e));if(this.getProp("onChangeWithObject"))this._adapter.notifyChangeWithObject(f,s);else{const e=lP(f,n);this._adapter.notifyChange(e,f,s)}}_notifyChange(t,s){const{keyEntities:o}=this.getStates(),{keyMaps:i}=this.getProps();if(this._isMultiple()&&Array.isArray(t))this._notifyMultipleChange(t,s);else{const a=wm(t)?t:o[t].data,n=wm(t)?t:lP(a,i);this.getProp("onChangeWithObject")?this._adapter.notifyChangeWithObject(a,s):this._adapter.notifyChange(n,a,s)}}_notifyFocus(t){this._adapter.notifyFocus(t)}handleTriggerFocus(t){this._adapter.updateIsFocus(!0),this._notifyFocus(t),this._registerClickOutsideHandler(t)}_notifyBlur(t){this._adapter.notifyBlur(t)}handlerTriggerBlur(t){this._adapter.updateIsFocus(!1),this._notifyBlur(t),this._adapter.unregisterClickOutsideHandler()}toggleHoverState(t){this._adapter.toggleHovering(t)}open(){this._adapter.openMenu(),this._setDropdownWidth()}close(t){this._adapter.closeMenu(),this.getProp("motionExpand")&&this._adapter.updateState({motionKeys:new Set([])})}handleClick(t){const s=this._isDisabled(),{isOpen:o,inputValue:i,isFocus:a}=this.getStates(),{searchPosition:n,clickTriggerToHide:u}=this.getProps();if(!s)if(a||this.handleTriggerFocus(t),o){if(n==="trigger"&&i)return;u&&this.close(t)}else this.open()}handleSelectionEnterPress(t){N1(t)&&this.handleClick(t)}handleClear(t){const{searchPosition:s,filterTreeNode:o}=this.getProps(),{inputValue:i,selectedKeys:a}=this.getStates(),n=this._isMultiple(),u=this._isControlledComponent(),f=n?[]:void 0;this._notifyChange(f,t),u||(this._adapter.rePositionDropdown(),this._adapter.updateState({selectedKeys:[],checkedKeys:new Set,halfCheckedKeys:new Set,realCheckedKeys:new Set([])})),o&&s===tv.SEARCH_POSITION_TRIGGER&&i!==""&&($m(a)?this.handleInputChange(""):this.clearInput())}handleClearEnterPress(t){N1(t)&&this.handleClear(t)}removeTag(t){const{disableStrictly:s,checkRelation:o,keyMaps:i}=this.getProps(),{keyEntities:a,disabledKeys:n,realCheckedKeys:u}=this.getStates(),f=a[t]&&a[t].key===t?a[t].data:this.getDataForKeyNotInKeyEntities(t),e=ro(i,"disabled","disabled");if(!(f[e]||s&&n.has(t))){if(o==="unRelated"){const y=new Set(u);y.delete(t),this._notifyChange([...y],null),this._isControlledComponent()||(this._adapter.updateState({realCheckedKeys:y}),this._adapter.rePositionDropdown())}else if(o==="related"){const{checkedKeys:y,halfCheckedKeys:_}=this.calcCheckedKeys(t,!1);this._notifyChange([...y],null),this._isControlledComponent()||(this._adapter.updateState({checkedKeys:y,halfCheckedKeys:_}),this._adapter.rePositionDropdown())}this._adapter.notifySelect(t,!1,f),this._adapter.rePositionDropdown()}}clearInput(){const{flattenNodes:t,expandedKeys:s,selectedKeys:o,keyEntities:i,treeData:a}=this.getStates(),{keyMaps:n}=this.getProps(),u=new Set(s);this._isExpandControlled();const f=EC(o,i);f.forEach(y=>u.add(y));const e=BE(a,u,n);this._adapter.updateState({expandedKeys:u,flattenNodes:e,inputValue:"",motionKeys:new Set([]),filteredKeys:new Set([]),filteredExpandedKeys:new Set(f),filteredShownKeys:new Set([])})}handleInputChange(t){this._adapter.updateInputValue(t);const{flattenNodes:s,expandedKeys:o,selectedKeys:i,keyEntities:a,treeData:n}=this.getStates(),{showFilteredOnly:u,filterTreeNode:f,treeNodeFilterProp:e,keyMaps:y}=this.getProps(),_=e!=="label"?e:ro(y,"label","label"),T=new Set(o);let D=[],ce=[],ge=[],Ee=new Set([]);if(!t)ce=EC(i,a),ce.forEach(Be=>T.add(Be)),ge=BE(n,T,y);else{D=Object.values(a).filter(He=>{const{data:at}=He;return jfe(t,at,f,_)}).map(He=>He.key),ce=EC(D,a,!1);const Be=AL(D,a,!0);Ee=new Set([...Be,...ce]),ge=BE(n,new Set(ce),y,u&&Ee)}const _e=new Set(ce);this._adapter.notifySearch(t,Array.from(_e)),this._adapter.updateState({expandedKeys:T,flattenNodes:ge,motionKeys:new Set([]),filteredKeys:new Set(D),filteredExpandedKeys:_e,filteredShownKeys:Ee})}handleNodeSelect(t,s){this._isDisabled(s)||(this._isMultiple()?this.handleMultipleSelect(t,s):this.handleSingleSelect(t,s))}handleSingleSelect(t,s){let{selectedKeys:o}=this.getCopyFromState("selectedKeys");const{clickToHide:i}=this.getProps(),{selected:a,eventKey:n,data:u}=s;this._adapter.notifySelect(n,!0,u),!o.includes(n)&&!a&&(o=[n],this._notifyChange(n,t),this._isControlledComponent()||this._adapter.updateState({selectedKeys:o})),i&&(this._isSelectToClose()||!u.children)&&(this.close(t),this.handlerTriggerBlur(t))}calcCheckedKeys(t,s){const{keyEntities:o}=this.getStates(),{checkedKeys:i,halfCheckedKeys:a}=this.getCopyFromState(["checkedKeys","halfCheckedKeys"]);return s?_9e(t,o,i,a):T9e(t,o,i,a)}handleMultipleSelect(t,s){const{searchPosition:o,disableStrictly:i,checkRelation:a}=this.getProps(),{inputValue:n,realCheckedKeys:u}=this.getStates(),{checked:f,eventKey:e,data:y}=s;if(a==="related"){const _=i?this.calcCheckedStatus(!f,e):!f,{checkedKeys:T,halfCheckedKeys:D}=i?this.calcNonDisabledCheckedKeys(e,_):this.calcCheckedKeys(e,_);this._adapter.notifySelect(e,_,y),this._notifyChange([...T],t),this._isControlledComponent()||(this._adapter.updateState({checkedKeys:T,halfCheckedKeys:D}),this._adapter.rePositionDropdown())}else if(a==="unRelated"){const _=new Set(u);let T;u.has(e)?(_.delete(e),T=!1):(_.add(e),T=!0),this._adapter.notifySelect(e,T,y),this._notifyChange([..._],t),this._isControlledComponent()||(this._adapter.updateState({realCheckedKeys:_}),this._adapter.rePositionDropdown())}o===tv.SEARCH_POSITION_TRIGGER&&n!==""&&this._adapter.updateState({inputValue:""})}calcNonDisabledCheckedKeys(t,s){const{keyEntities:o,disabledKeys:i}=this.getStates(),{checkedKeys:a}=this.getCopyFromState(["checkedKeys"]),n=ME(AL([t],o,!1),o,!0);if(!n.some(y=>i.has(y)))return this.calcCheckedKeys(t,s);const f=n.filter(y=>!i.has(y)),e=s?[...f,...a]:fO(ME([...a],o,!0,!0),f);return yV(e,o)}calcCheckedStatus(t,s){if(!t)return t;const{checkedKeys:o,keyEntities:i,disabledKeys:a}=this.getStates(),n=ME(AL([s],i,!1),i,!0);return n.some(y=>a.has(y))?!n.filter(y=>!a.has(y)).every(y=>o.has(y)):t}handleNodeExpandInSearch(t,s){const{treeData:o,filteredShownKeys:i,keyEntities:a,keyMaps:n}=this.getStates(),u=this._showFilteredOnly(),{filteredExpandedKeys:f}=this.getCopyFromState("filteredExpandedKeys");let e="show";const{eventKey:y,expanded:_,data:T}=s;if(_?f.has(y)&&(f.delete(y),e="hide"):f.add(y),this._adapter.cacheFlattenNodes(e==="hide"&&this._isAnimated()),!this._isExpandControlled()){const D=BE(o,f,n,u&&i),ce=this._isAnimated()?XZ(y,f,a):[],ge={filteredExpandedKeys:f,flattenNodes:D,motionKeys:new Set(ce),motionType:e};this._adapter.updateState(ge)}this._adapter.notifyExpand(f,{expanded:!_,node:T})}handleNodeExpand(t,s){const{loadData:o,keyMaps:i}=this.getProps(),{inputValue:a,keyEntities:n}=this.getStates(),u=!!a;if(!o&&(!s.children||!s.children.length))return;const f=this._isExpandControlled();if(u){this.handleNodeExpandInSearch(t,s);return}const{treeData:e}=this.getStates(),{expandedKeys:y}=this.getCopyFromState("expandedKeys");let _="show";const{eventKey:T,expanded:D,data:ce}=s;if(D?y.has(T)&&(y.delete(T),_="hide"):y.add(T),this._adapter.cacheFlattenNodes(_==="hide"&&this._isAnimated()),!f){const ge=BE(e,y,i),Ee=this._isAnimated()?XZ(T,y,n):[],_e={expandedKeys:y,flattenNodes:ge,motionKeys:new Set(Ee),motionType:_};this._adapter.updateState(_e)}this._adapter.notifyExpand(y,{expanded:!D,node:ce})}getRenderTextInSingle(){const{renderSelectedItem:t,treeNodeLabelProp:s,keyMaps:o}=this.getProps(),{selectedKeys:i,keyEntities:a}=this.getStates(),n=ro(o,"label",s),u=Mc(t)?t:y=>ro(y,n,null);let f;if(i.length){const y=i[0];f=a[y]&&a[y].key===y?a[y].data:this.getDataForKeyNotInKeyEntities(y)}return f?u(f):null}handleInputTriggerBlur(){this._adapter.updateState({inputTriggerFocus:!1})}handleInputTriggerFocus(){this.clearInput(),this._adapter.updateState({inputTriggerFocus:!0})}setLoadKeys(t,s){this._adapter.updateLoadKeys(t,s)}}var zXe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{suffix:s}=this.props,o=ds({[`${kA}-suffix`]:!0,[`${kA}-suffix-text`]:s&&rA(s),[`${kA}-suffix-icon`]:Iv(s)});return ct.createElement("div",{className:o,"x-semi-prop":"suffix"},s)},this.renderPrefix=()=>{const{prefix:s,insetLabel:o,insetLabelId:i}=this.props,a=s||o,n=ds({[`${kA}-prefix`]:!0,[`${kA}-inset-label`]:o,[`${kA}-prefix-text`]:a&&rA(a),[`${kA}-prefix-icon`]:Iv(a)});return ct.createElement("div",{className:n,id:i,"x-semi-prop":"prefix,insetLabel"},a)},this.renderContent=()=>{const{dropdownMinWidth:s}=this.state,{dropdownStyle:o,dropdownClassName:i}=this.props,a=Object.assign({minWidth:s},o),n=ds(i,`${kA}-popover`);return ct.createElement("div",{className:n,style:a},this.renderTree())},this.removeTag=s=>{this.foundation.removeTag(s)},this.handleClick=s=>{this.foundation.handleClick(s)},this.getDataForKeyNotInKeyEntities=s=>this.foundation.getDataForKeyNotInKeyEntities(s),this.handleSelectionEnterPress=s=>{this.foundation.handleSelectionEnterPress(s)},this.hasValue=()=>{const{multiple:s,checkRelation:o}=this.props,{realCheckedKeys:i,checkedKeys:a,selectedKeys:n}=this.state;let u=!1;return s?o==="related"?u=!!a.size:o==="unRelated"&&(u=!!i.size):u=!!n.length,u},this.showClearBtn=()=>{const{showClear:s,disabled:o,searchPosition:i}=this.props,{inputValue:a,isOpen:n,isHovering:u}=this.state,f=i===tv.SEARCH_POSITION_TRIGGER&&a;return s&&(this.hasValue()||f)&&!o&&(n||u)},this.renderTagList=()=>{const{checkedKeys:s,keyEntities:o,disabledKeys:i,realCheckedKeys:a}=this.state,{treeNodeLabelProp:n,leafOnly:u,disabled:f,disableStrictly:e,size:y,checkRelation:_,renderSelectedItem:T,keyMaps:D}=this.props,ce=ro(D,"label",n),ge=Mc(T)?T:Be=>({isRenderInTag:!0,content:ro(Be,ce,null)});let Ee=[];_==="related"?Ee=ME([...s],o,u,!0):_==="unRelated"&&Object.keys(o).length>0&&(Ee=[...a]);const _e=[];return Ee.forEach((Be,He)=>{const at=o[Be]&&o[Be].key===Be?o[Be].data:this.getDataForKeyNotInKeyEntities(Be),st=(Bn,fn)=>{fn&&typeof fn.preventDefault=="function"&&fn.preventDefault(),this.removeTag(Be)},{content:vt,isRenderInTag:Ot}=at?ge(at,{index:He,onClose:st}):{};if(TL(vt)||wm(vt))return;const sn={closable:!(f||at.disabled||e&&i.has(at.key)),color:"white",visible:!0,onClose:st,key:`tag-${Be}-${He}`,size:y==="small"?"small":"large"};Ot?_e.push(ct.createElement(og,Object.assign({},sn),vt)):_e.push(vt)}),_e},this.renderSingleTriggerSearchItem=()=>{const{placeholder:s,disabled:o}=this.props,{inputTriggerFocus:i}=this.state,a=this.foundation.getRenderTextInSingle(),n=ds(`${kA}-selection-TriggerSearchItem`,{[`${kA}-selection-TriggerSearchItem-placeholder`]:(i||!a)&&!o,[`${kA}-selection-TriggerSearchItem-disabled`]:o});return ct.createElement("span",{className:n},a||s)},this.renderSingleTriggerSearch=()=>{const{inputValue:s}=this.state;return ct.createElement(ct.Fragment,null,!s&&this.renderSingleTriggerSearchItem(),this.renderInput())},this.renderSelectContent=()=>{const{multiple:s,placeholder:o,maxTagCount:i,searchPosition:a,filterTreeNode:n,showRestTagsPopover:u,restTagsPopoverProps:f}=this.props;if(n&&a===tv.SEARCH_POSITION_TRIGGER)return s?this.renderTagInput():this.renderSingleTriggerSearch();if(!s||!this.hasValue()){const _=this.foundation.getRenderTextInSingle(),T=ds(`${kA}-selection-content`,{[`${kA}-selection-placeholder`]:!_});return ct.createElement("span",{className:T},_||o)}const y=this.renderTagList();return ct.createElement(gO,{maxTagCount:i,tagList:y,size:"large",mode:"custom",showPopover:u,popoverProps:f})},this.handleClear=s=>{s&&s.stopPropagation(),this.foundation.handleClear(s)},this.handleClearEnterPress=s=>{s&&s.stopPropagation(),this.foundation.handleClearEnterPress(s)},this.handleMouseOver=s=>{this.foundation.toggleHoverState(!0)},this.handleMouseLeave=s=>{this.foundation.toggleHoverState(!1)},this.search=s=>{const{isOpen:o}=this.state;o||this.foundation.open(),this.foundation.handleInputChange(s)},this.close=()=>{this.foundation.close(null)},this.renderArrow=()=>{const s=this.showClearBtn(),{arrowIcon:o}=this.props;return s?null:o?ct.createElement("div",{className:ds(`${kA}-arrow`),"x-semi-prop":"arrowIcon"},o):null},this.renderClearBtn=()=>{const s=this.showClearBtn(),{clearIcon:o}=this.props,i=ds(`${kA}-clearbtn`);return s?ct.createElement("div",{role:"button",tabIndex:0,"aria-label":"Clear TreeSelect value",className:i,onClick:this.handleClear,onKeyPress:this.handleClearEnterPress},o||ct.createElement(XT,null)):null},this.renderSelection=()=>{const s=this.props,{disabled:o,multiple:i,filterTreeNode:a,validateStatus:n,prefix:u,suffix:f,style:e,size:y,insetLabel:_,className:T,placeholder:D,showClear:ce,leafOnly:ge,searchPosition:Ee,triggerRender:_e,borderless:Be}=s,He=zXe(s,["disabled","multiple","filterTreeNode","validateStatus","prefix","suffix","style","size","insetLabel","className","placeholder","showClear","leafOnly","searchPosition","triggerRender","borderless"]),{inputValue:at,selectedKeys:st,checkedKeys:vt,keyEntities:Ot,isFocus:Kt}=this.state,sn=!!a,Bn=typeof _e=="function",fn=ce?{onMouseEnter:_r=>this.handleMouseOver(_r),onMouseLeave:_r=>this.handleMouseLeave(_r)}:{},bn=Ee===tv.SEARCH_POSITION_TRIGGER&&sn,$n=bn&&$m(vt),_n=bn&&!$m(vt),Nr=Bn?ds(T):ds(kA,{[`${kA}-borderless`]:Be,[`${kA}-focus`]:Kt,[`${kA}-disabled`]:o,[`${kA}-single`]:!i,[`${kA}-multiple`]:i,[`${kA}-multiple-tagInput-empty`]:i&&$n,[`${kA}-multiple-tagInput-notEmpty`]:i&&_n,[`${kA}-filterable`]:sn,[`${kA}-error`]:n==="error",[`${kA}-warning`]:n==="warning",[`${kA}-small`]:y==="small",[`${kA}-large`]:y==="large",[`${kA}-with-prefix`]:u||_,[`${kA}-with-suffix`]:f,[`${kA}-with-suffix`]:f},T),Cr=i?ME([...vt],Ot,ge,!0):st,Dr=Bn?ct.createElement(fV,{inputValue:at,value:Cr.map(_r=>ro(Ot,[_r,"data"])),disabled:o,placeholder:D,onClear:this.handleClear,componentName:"TreeSelect",triggerRender:_e,componentProps:Object.assign({},this.props),onSearch:this.search,onRemove:this.removeTag}):[ct.createElement(Vt.Fragment,{key:"prefix"},u||_?this.renderPrefix():null),ct.createElement(Vt.Fragment,{key:"selection"},ct.createElement("div",{className:`${kA}-selection`},this.renderSelectContent())),ct.createElement(Vt.Fragment,{key:"suffix"},f?this.renderSuffix():null),ct.createElement(Vt.Fragment,{key:"clearBtn"},ce||bn&&at?this.renderClearBtn():null),ct.createElement(Vt.Fragment,{key:"arrow"},this.renderArrow())],fr=o?null:0;return ct.createElement("div",Object.assign({role:"combobox","aria-disabled":o,"aria-haspopup":"tree",tabIndex:fr,className:Nr,style:e,ref:this.triggerRef,onClick:this.handleClick,onKeyPress:this.handleSelectionEnterPress,"aria-invalid":this.props["aria-invalid"],"aria-errormessage":this.props["aria-errormessage"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-describedby":this.props["aria-describedby"],"aria-required":this.props["aria-required"]},fn,this.getDataAttr(He)),Dr)},this.renderTagItem=(s,o)=>{const{keyEntities:i,disabledKeys:a}=this.state,{size:n,leafOnly:u,disabled:f,disableStrictly:e,renderSelectedItem:y,treeNodeLabelProp:_,keyMaps:T}=this.props,D=ro(T,"label",_),ge=ME([s],i,u,!0).map(sn=>i[s]&&i[s].key===s?i[s].data:this.getDataForKeyNotInKeyEntities(s)),Ee=lP(ge,T),_e=ds(`${kA}-selection-tag`,{[`${kA}-selection-tag-disabled`]:f}),Be=!$m(ge)&&!$m(ge[0]),He=e&&Be&&a.has(ge[0].key),at=Be&&!ge[0].disabled&&!f&&!He,st=(sn,Bn)=>{Bn.preventDefault(),this.removeTag(s)},vt={size:n==="small"?"small":"large",key:`tag-${Ee}-${o}`,color:"white",className:_e,closable:at,onClose:st},Ot=ge[0],Kt=Mc(y)?y:sn=>({isRenderInTag:!0,content:ro(sn,D,null)});if(Mc(Kt)){const{content:sn,isRenderInTag:Bn}=Ot?Kt(Ot,{index:o,onClose:st}):{};return Bn?ct.createElement(og,Object.assign({},vt),sn):sn}return ct.createElement(og,Object.assign({},vt),Ee)},this.renderTagInput=()=>{const{leafOnly:s,disabled:o,size:i,searchAutoFocus:a,placeholder:n,maxTagCount:u,checkRelation:f,showRestTagsPopover:e,restTagsPopoverProps:y,searchPosition:_,filterTreeNode:T,preventScroll:D}=this.props,{keyEntities:ce,checkedKeys:ge,inputValue:Ee,realCheckedKeys:_e}=this.state;let Be=[];f==="related"?Be=ME(ge,ce,s,!0):f==="unRelated"&&(Be=[..._e]);const He=T&&_===tv.SEARCH_POSITION_TRIGGER?a:void 0;return ct.createElement(uF,{maxTagCount:u,disabled:o,onInputChange:at=>this.search(at),ref:this.tagInputRef,placeholder:n,value:Be,inputValue:Ee,size:i,showRestTagsPopover:e,restTagsPopoverProps:y,autoFocus:He,renderTagItem:(at,st)=>this.renderTagItem(at,st),onRemove:at=>this.removeTag(at),expandRestTagsOnClick:!1,preventScroll:D})},this.renderInput=()=>{const{searchPlaceholder:s,searchRender:o,showSearchClear:i,searchPosition:a,searchAutoFocus:n,multiple:u,disabled:f,preventScroll:e}=this.props,y=a===tv.SEARCH_POSITION_DROPDOWN,_=ds({[`${sx}-input`]:y,[`${kA}-inputTrigger`]:!y}),{inputValue:T}=this.state,D={value:T,className:_,preventScroll:e,onChange:He=>this.search(He)},Ee=y?{showClear:i,prefix:ct.createElement(MC,null)}:{autofocus:n,onFocus:He=>this.foundation.handleInputTriggerFocus(),onBlur:He=>this.foundation.handleInputTriggerBlur(),disabled:f},_e=ds({[`${sx}-search-wrapper`]:y,[`${kA}-triggerSingleSearch-wrapper`]:!y&&!u}),Be=typeof o=="function"||typeof o=="boolean";return Be&&!o?null:ct.createElement("div",{className:_e},ct.createElement(Bm,{componentName:"TreeSelect"},He=>{const at=y?s||He.searchPlaceholder:"";return Be?o(Object.assign(Object.assign(Object.assign({},Ee),D),{placeholder:at})):ct.createElement(Em,Object.assign({"aria-label":"Filter TreeSelect item",ref:this.inputRef,placeholder:at},D,Ee))}))},this.renderEmpty=()=>{const{emptyContent:s}=this.props;return s?ct.createElement(x_,{empty:!0,emptyContent:this.props.emptyContent}):ct.createElement(Bm,{componentName:"Tree"},o=>ct.createElement(x_,{empty:!0,emptyContent:o.emptyText}))},this.onNodeLoad=s=>new Promise(o=>this.foundation.setLoadKeys(s,o)),this.onNodeSelect=(s,o)=>{this.foundation.handleNodeSelect(s,o)},this.onNodeCheck=(s,o)=>{this.foundation.handleNodeSelect(s,o)},this.onNodeExpand=(s,o)=>{this.foundation.handleNodeExpand(s,o)},this.getTreeNodeRequiredProps=()=>{const{expandedKeys:s,selectedKeys:o,checkedKeys:i,halfCheckedKeys:a,keyEntities:n,filteredKeys:u}=this.state;return{expandedKeys:s||new Set,selectedKeys:o||[],checkedKeys:i||new Set,halfCheckedKeys:a||new Set,filteredKeys:u||new Set,keyEntities:n}},this.getTreeNodeKey=s=>{const{data:o}=s,{key:i}=o;return i},this.handlePopoverClose=s=>{const{filterTreeNode:o,searchAutoFocus:i,searchPosition:a}=this.props;s===!1&&o&&this.foundation.clearInputValue(),o&&a===tv.SEARCH_POSITION_DROPDOWN&&s&&i&&this.foundation.focusInput(!0)},this.afterClose=()=>{const{filterTreeNode:s}=this.props;s&&this.foundation.clearInput()},this.renderTreeNode=(s,o,i)=>{const{data:a,key:n}=s,u=this.foundation.getTreeNodeProps(n),{showLine:f}=this.props;if(!u)return null;const e=I1(s,["key","label","disabled","isLeaf","icon","isEnd"]),{keyMaps:y}=this.props,_=a[ro(y,"children","children")];return!wm(_)&&(e.children=_),ct.createElement(x_,Object.assign({},u,a,e,{data:a,style:i,showLine:f}))},this.itemKey=(s,o)=>{const{visibleOptions:i}=o;return i[s].key},this.renderNodeList=()=>{const{flattenNodes:s,cachedFlattenNodes:o,motionKeys:i,motionType:a,filteredKeys:n}=this.state,{direction:u}=this.context,{virtualize:f,motionExpand:e}=this.props,y="expandedKeys"in this.props;if(!f||$m(f))return ct.createElement(Ghe,{flattenNodes:s,flattenList:o,motionKeys:e?i:new Set([]),motionType:a,searchTargetIsDeep:y&&e&&$m(i)&&!$m(n),onMotionEnd:this.onMotionEnd,renderTreeNode:this.renderTreeNode});const _={visibleOptions:s,renderOption:this.renderTreeNode};return ct.createElement(TG,{defaultHeight:f.height,defaultWidth:f.width},T=>{let{height:D,width:ce}=T;return ct.createElement(SV,{itemCount:s.length,itemSize:f.itemSize,height:D,width:ce,itemKey:this.itemKey,itemData:_,className:`${sx}-virtual-list`,style:{direction:u}},Gde)})},this.renderTree=()=>{const{keyEntities:s,motionKeys:o,motionType:i,inputValue:a,filteredKeys:n,flattenNodes:u,checkedKeys:f,realCheckedKeys:e}=this.state,{loadData:y,filterTreeNode:_,disabled:T,multiple:D,showFilteredOnly:ce,motionExpand:ge,outerBottomSlot:Ee,outerTopSlot:_e,expandAction:Be,labelEllipsis:He,virtualize:at,optionListStyle:st,searchPosition:vt,renderLabel:Ot,renderFullLabel:Kt,checkRelation:sn}=this.props,Bn=ds(`${sx}-wrapper`),fn=ds(`${sx}-option-list`,{[`${sx}-option-list-block`]:!0}),bn=!!a&&!n.size,$n=$m(u)||ce&&bn,_n=vt===tv.SEARCH_POSITION_DROPDOWN;return ct.createElement(NG.Provider,{value:{loadData:y,treeDisabled:T,motion:ge,motionKeys:o,motionType:i,expandAction:Be,filterTreeNode:_,keyEntities:s,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeRightClick:so,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,renderTreeNode:this.renderTreeNode,multiple:D,showFilteredOnly:ce,isSearching:!!a,renderLabel:Ot,renderFullLabel:Kt,labelEllipsis:typeof He>"u"?at:He}},ct.createElement("div",{className:Bn},_e,!_e&&_&&_n&&this.renderInput(),ct.createElement("div",{className:fn,role:"tree","aria-multiselectable":!!D,style:st},$n?this.renderEmpty():D?ct.createElement(Hfe,{value:Array.from(sn==="related"?f:e)},this.renderNodeList()):this.renderNodeList()),Ee))},this.state={inputTriggerFocus:!1,isOpen:!1,isFocus:!1,rePosKey:VXe,dropdownMinWidth:null,inputValue:"",keyEntities:{},treeData:[],flattenNodes:[],cachedFlattenNodes:void 0,selectedKeys:[],checkedKeys:new Set,halfCheckedKeys:new Set,realCheckedKeys:new Set([]),disabledKeys:new Set,motionKeys:new Set([]),motionType:"hide",expandedKeys:new Set(t.expandedKeys),filteredKeys:new Set,filteredExpandedKeys:new Set,filteredShownKeys:new Set,prevProps:null,isHovering:!1,cachedKeyValuePairs:{},loadedKeys:new Set,loadingKeys:new Set},this.inputRef=ct.createRef(),this.tagInputRef=ct.createRef(),this.triggerRef=ct.createRef(),this.optionsRef=ct.createRef(),this.clickOutsideHandler=null,this.foundation=new KXe(this.adapter),this.treeSelectID=Math.random().toString(36).slice(2),this.onMotionEnd=()=>{this.adapter.rePositionDropdown()}}static getDerivedStateFromProps(t,s){var o;const{prevProps:i,rePosKey:a}=s,{keyMaps:n}=t,u=He=>!i&&He in t||i&&!_0(i[He],t[He]);let f;const e=t.onChangeWithObject;let y=s.keyEntities||{},_=s.cachedKeyValuePairs||{};const T={prevProps:t},D=u("treeData"),ce=u("expandedKeys"),ge="expandedKeys"in t,Ee=!!(t.filterTreeNode&&s.inputValue&&s.inputValue.length);if(D){f=t.treeData,T.treeData=f;const He=E9e(f,n);T.keyEntities=Object.assign({},He.keyEntities),y=T.keyEntities,T.cachedKeyValuePairs=Object.assign({},He.valueEntities),_=T.cachedKeyValuePairs}f&&t.motion&&!_0(Object.keys(T.keyEntities),Object.keys(s.keyEntities))&&i&&t.motion&&(T.motionKeys=new Set([]),T.motionType=null);const _e=D&&t.expandAll;if(Ee){let He;if(f&&(He=N9e({treeData:f,inputValue:s.inputValue,filterTreeNode:t.filterTreeNode,filterProps:t.treeNodeFilterProp,showFilteredOnly:t.showFilteredOnly,keyEntities:T.keyEntities,prevExpandedKeys:[...s.filteredExpandedKeys],keyMaps:n}),T.flattenNodes=He.flattenNodes,T.motionKeys=new Set([]),T.filteredKeys=He.filteredKeys,T.filteredShownKeys=He.filteredShownKeys,T.filteredExpandedKeys=He.filteredExpandedKeys),t.expandedKeys){if(T.filteredExpandedKeys=FM(t.expandedKeys,y,t.autoExpandParent||!i),i&&t.motion){const at=s?s.filteredExpandedKeys:new Set([]);if(!f){const st=YZ(at,T.filteredExpandedKeys,y);let{motionKeys:vt}=st;const{motionType:Ot}=st;t.showFilteredOnly&&(vt=vt.filter(Kt=>s.filteredShownKeys.has(Kt))),Ot==="hide"&&(T.cachedFlattenNodes=oU(s.flattenNodes)),T.motionKeys=new Set(vt),T.motionType=Ot}}T.flattenNodes=BE(f||s.treeData,T.filteredExpandedKeys||s.filteredExpandedKeys,n,t.showFilteredOnly&&s.filteredShownKeys)}}else{if(ce||i&&u("autoExpandParent")){if(T.expandedKeys=FM(t.expandedKeys,y,t.autoExpandParent||!i),i&&t.motion&&!f){const{motionKeys:He,motionType:at}=YZ(s.expandedKeys,T.expandedKeys,y);T.motionKeys=new Set(He),T.motionType=at,at==="hide"&&(T.cachedFlattenNodes=oU(s.flattenNodes))}}else!i&&(t.defaultExpandAll||t.expandAll)||_e?T.expandedKeys=new Set(Object.keys(y)):!i&&t.defaultExpandedKeys?T.expandedKeys=FM(t.defaultExpandedKeys,y):!i&&t.defaultValue?T.expandedKeys=MM(rE(t.defaultValue,e,n),y,t.multiple,_):!i&&t.value?T.expandedKeys=MM(rE(t.value,e,n),y,t.multiple,_):!ge&&D&&t.value&&(s.treeData&&((o=s.treeData)===null||o===void 0?void 0:o.length)>0&&t.loadData||(T.expandedKeys=MM(t.value,y,t.multiple,_)));if(T.expandedKeys||delete T.expandedKeys,f||T.expandedKeys){const He=BE(f||s.treeData,T.expandedKeys||s.expandedKeys,n);T.flattenNodes=He}}const Be=t.multiple;if(!Be)u("value")?T.selectedKeys=E2(rE(t.value,e,n),_,Be):!i&&t.defaultValue?T.selectedKeys=E2(rE(t.defaultValue,e,n),_,Be):f&&(t.value?T.selectedKeys=E2(rE(t.value,e,n)||"",_,Be):T.selectedKeys=ZZ(s.selectedKeys,y));else{let He;if(u("value")?He=E2(rE(t.value,e,n),_,Be):!i&&t.defaultValue?He=E2(rE(t.defaultValue,e,n),_,Be):f&&(t.value?He=E2(rE(t.value,e,n)||[],_,Be):He=ZZ(t.checkRelation==="related"?s.checkedKeys:s.realCheckedKeys,y)),He){if(t.checkRelation==="unRelated")T.realCheckedKeys=new Set(He);else if(t.checkRelation==="related"){const{checkedKeys:at,halfCheckedKeys:st}=yV(He,y);T.checkedKeys=at,T.halfCheckedKeys=st}}}return u("loadedKeys")&&(T.loadedKeys=new Set(t.loadedKeys)),(D||u("value"))&&(T.rePosKey=a+1),f&&t.disableStrictly&&t.checkRelation==="related"&&(T.disabledKeys=I9e(y,n)),T}get adapter(){var t=this;const s={updateInputValue:a=>{this.setState({inputValue:a})}},o={registerClickOutsideHandler:a=>{const n=u=>{const f=this.optionsRef&&this.optionsRef.current,e=this.triggerRef&&this.triggerRef.current,y=zy.findDOMNode(f),_=u.target;y&&(!y.contains(_)||!y.contains(_.parentNode))&&e&&!e.contains(_)&&a(u)};this.clickOutsideHandler=n,document.addEventListener("mousedown",n,!1)},unregisterClickOutsideHandler:()=>{document.removeEventListener("mousedown",this.clickOutsideHandler,!1),this.clickOutsideHandler=null},rePositionDropdown:()=>{let{rePosKey:a}=this.state;a=a+1,this.setState({rePosKey:a})}},i={updateState:a=>{this.setState(Object.assign({},a))},notifySelect:(a,n,u)=>{this.props.onSelect&&this.props.onSelect(a,n,u)},notifySearch:(a,n)=>{this.props.onSearch&&this.props.onSearch(a,n)},cacheFlattenNodes:a=>{this.setState({cachedFlattenNodes:a?oU(this.state.flattenNodes):void 0})},notifyLoad:(a,n)=>{const{onLoad:u}=this.props;Mc(u)&&u(a,n)}};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},super.adapter),s),o),i),{updateLoadKeys:(a,n)=>{this.setState(u=>{let{loadedKeys:f,loadingKeys:e}=u;return this.foundation.handleNodeLoad(f,e,a,n)})},updateState:a=>{this.setState(Object.assign({},a))},openMenu:()=>{this.setState({isOpen:!0},()=>{this.props.onVisibleChange(!0)})},closeMenu:a=>{this.setState({isOpen:!1},()=>{a&&a(),this.props.onVisibleChange(!1)})},getTriggerWidth:()=>{const a=this.triggerRef.current;return a&&a.getBoundingClientRect().width},setOptionWrapperWidth:a=>{this.setState({dropdownMinWidth:a})},notifyChange:(a,n,u)=>{this.props.onChange&&this.props.onChange(a,n,u)},notifyChangeWithObject:(a,n)=>{this.props.onChange&&this.props.onChange(a,n)},notifyExpand:(a,n)=>{let{expanded:u,node:f}=n;this.props.onExpand&&this.props.onExpand([...a],{expanded:u,node:f}),u&&this.props.loadData&&this.onNodeLoad(f)},notifyFocus:function(){t.props.onFocus&&t.props.onFocus(...arguments)},notifyBlur:function(){t.props.onBlur&&t.props.onBlur(...arguments)},toggleHovering:a=>{this.setState({isHovering:a})},updateInputFocus:a=>{if(a){if(this.inputRef&&this.inputRef.current){const{preventScroll:n}=this.props;this.inputRef.current.focus({preventScroll:n})}this.tagInputRef&&this.tagInputRef.current&&this.tagInputRef.current.focus()}else this.inputRef&&this.inputRef.current&&this.inputRef.current.blur(),this.tagInputRef&&this.tagInputRef.current&&this.tagInputRef.current.blur()},updateIsFocus:a=>{this.setState({isFocus:a})}})}componentDidMount(){this.foundation.init()}componentWillUnmount(){this.foundation.destroy()}render(){const t=this.renderContent(),{motion:s,zIndex:o,mouseLeaveDelay:i,mouseEnterDelay:a,autoAdjustOverflow:n,stopPropagation:u,getPopupContainer:f,dropdownMargin:e,position:y}=this.props,{isOpen:_,rePosKey:T}=this.state,D=this.renderSelection(),ce=y||"bottomLeft";return ct.createElement(fm,{stopPropagation:u,getPopupContainer:f,zIndex:o,motion:s,margin:e,ref:this.optionsRef,content:t,visible:_,trigger:"custom",rePosKey:T,position:ce,autoAdjustOverflow:n,mouseLeaveDelay:i,mouseEnterDelay:a,onVisibleChange:this.handlePopoverClose,afterClose:this.afterClose},D)}}FF.contextType=by;FF.propTypes={"aria-describedby":be.string,"aria-errormessage":be.string,"aria-invalid":be.bool,"aria-labelledby":be.string,"aria-required":be.bool,borderless:be.bool,loadedKeys:be.arrayOf(be.string),loadData:be.func,onLoad:be.func,arrowIcon:be.node,clearIcon:be.node,defaultOpen:be.bool,defaultValue:be.oneOfType([be.string,be.array,be.object]),defaultExpandAll:be.bool,defaultExpandedKeys:be.array,expandAll:be.bool,disabled:be.bool,disableStrictly:be.bool,filterTreeNode:be.oneOfType([be.func,be.bool]),multiple:be.bool,searchPlaceholder:be.string,searchAutoFocus:be.bool,virtualize:be.object,treeNodeFilterProp:be.string,onChange:be.func,onSearch:be.func,onSelect:be.func,onExpand:be.func,onChangeWithObject:be.bool,onBlur:be.func,onFocus:be.func,value:be.oneOfType([be.string,be.number,be.array,be.object]),expandedKeys:be.array,autoExpandParent:be.bool,showClear:be.bool,showSearchClear:be.bool,autoAdjustOverflow:be.bool,showFilteredOnly:be.bool,showLine:be.bool,motionExpand:be.bool,emptyContent:be.node,keyMaps:be.object,leafOnly:be.bool,treeData:be.arrayOf(be.shape({key:be.string,value:be.oneOfType([be.string,be.number]),label:be.any})),dropdownClassName:be.string,dropdownStyle:be.object,dropdownMargin:be.oneOfType([be.number,be.object]),motion:be.bool,placeholder:be.string,maxTagCount:be.number,size:be.oneOf(tv.SIZE_SET),className:be.string,style:be.object,treeNodeLabelProp:be.string,suffix:be.node,prefix:be.node,insetLabel:be.node,insetLabelId:be.string,zIndex:be.number,getPopupContainer:be.func,dropdownMatchSelectWidth:be.bool,validateStatus:be.oneOf(tv.STATUS),mouseEnterDelay:be.number,mouseLeaveDelay:be.number,triggerRender:be.func,stopPropagation:be.oneOfType([be.bool,be.string]),outerBottomSlot:be.node,outerTopSlot:be.node,onVisibleChange:be.func,expandAction:be.oneOf(["click","doubleClick",!1]),searchPosition:be.oneOf([tv.SEARCH_POSITION_DROPDOWN,tv.SEARCH_POSITION_TRIGGER]),clickToHide:be.bool,renderLabel:be.func,renderFullLabel:be.func,labelEllipsis:be.bool,optionListStyle:be.object,searchRender:be.oneOfType([be.func,be.bool]),renderSelectedItem:be.func,checkRelation:be.string,"aria-label":be.string,showRestTagsPopover:be.bool,restTagsPopoverProps:be.object,preventScroll:be.bool,clickTriggerToHide:be.bool};FF.defaultProps={borderless:!1,searchPosition:tv.SEARCH_POSITION_DROPDOWN,arrowIcon:ct.createElement(qT,null),autoExpandParent:!1,autoAdjustOverflow:!0,stopPropagation:!0,motion:!0,motionExpand:!0,expandAll:!1,zIndex:Sw.DEFAULT_Z_INDEX,disableStrictly:!1,multiple:!1,filterTreeNode:!1,size:"default",treeNodeFilterProp:"label",onChangeWithObject:!1,treeNodeLabelProp:"label",dropdownMatchSelectWidth:!0,defaultOpen:!1,showSearchClear:!0,showClear:!1,onVisibleChange:so,expandAction:!1,clickToHide:!0,searchAutoFocus:!1,checkRelation:"related","aria-label":"TreeSelect",showRestTagsPopover:!1,restTagsPopoverProps:{},clickTriggerToHide:!0};const GXe=FF,mee=`${fi}-upload`,gee="picture",bee="list",WXe=.95,qhe={PREFIX:mee,LIST:`${mee}-list`},vee="auto",yee="custom",np={FILE_STATUS_UPLOADING:"uploading",FILE_STATUS_SUCCESS:"success",FILE_STATUS_UPLOAD_FAIL:"uploadFail",FILE_STATUS_VALIDATING:"validating",FILE_STATUS_VALID_FAIL:"validateFail",FILE_STATUS_WAIT_UPLOAD:"wait",FILE_LIST_PIC:gee,FILE_LIST_DEFAULT:bee,LIST_TYPE:[gee,bee],imageTypes:["image","webp","png","svg","gif","jpg","jpeg","bmp","dpg"],DRAG_AREA_DEFAULT:"default",DRAG_AREA_LEGAL:"legal",DRAG_AREA_ILLEGAL:"illegal",TRIGGER_AUTO:vee,TRIGGER_CUSTOM:yee,UPLOAD_TRIGGER:[vee,yee],VALIDATE_STATUS:x6,PROMPT_POSITION:["left","right","bottom"]},qXe={PROGRESS_COEFFICIENT:WXe};var W9=function(r,t,s,o){function i(a){return a instanceof s?a:new s(function(n){n(a)})}return new(s||(s=Promise))(function(a,n){function u(y){try{e(o.next(y))}catch(_){n(_)}}function f(y){try{e(o.throw(y))}catch(_){n(_)}}function e(y){y.done?a(y.value):i(y.value).then(u,f)}e((o=o.apply(r,t||[])).next())})};const t_=1024,iU=1048576;function q9(r){if(r=t_&&r=iU)return`${(r/iU).toFixed(1)}MB`}function YXe(r,t){return r.indexOf(t,r.length-t.length)!==-1}function XXe(r){return W9(this,void 0,void 0,function*(){return new Promise((t,s)=>{const o=r.createReader();let i=[];function a(){o.readEntries(n=>{const u=Array.prototype.slice.apply(n);i=i.concat(u),!u.length?t(i):a()},s)}a()})})}function ZXe(r){return W9(this,void 0,void 0,function*(){const t=[],s=(o,i)=>W9(this,void 0,void 0,function*(){if(i=i||"",o.path=i,o.isFile)t.push(new Promise((a,n)=>{o.file(u=>{o.fullPath&&!u.webkitRelativePath&&(Object.defineProperties(u,{webkitRelativePath:{writable:!0}}),u.webkitRelativePath=o.fullPath.replace(/^\//,""),Object.defineProperties(u,{webkitRelativePath:{writable:!1}})),a(u)},n)}));else if(o.isDirectory){const a=yield XXe(o);for(let n=0;ns(a.webkitGetAsEntry()));return yield Promise.all(o),yield Promise.all(t)}catch(o){return console.warn("Captured error while loop directory."),console.error(o),[]}})}var JXe=function(r,t,s,o){function i(a){return a instanceof s?a:new s(function(n){n(a)})}return new(s||(s=Promise))(function(a,n){function u(y){try{e(o.next(y))}catch(_){n(_)}}function f(y){try{e(o.throw(y))}catch(_){n(_)}}function e(y){y.done?a(y.value):i(y.value).then(u,f)}e((o=o.apply(r,t||[])).next())})};const{FILE_STATUS_UPLOADING:wee,FILE_STATUS_SUCCESS:eZe,FILE_STATUS_UPLOAD_FAIL:tZe,FILE_STATUS_VALID_FAIL:aU,FILE_STATUS_WAIT_UPLOAD:Cee,DRAG_AREA_DEFAULT:lU,DRAG_AREA_LEGAL:nZe,TRIGGER_AUTO:YR}=np;class rZe extends lh{constructor(t){super(Object.assign({},t))}init(){const{disabled:t,addOnPasting:s}=this.getProps();s&&!t&&this.bindPastingHandler()}destroy(){const{disabled:t,addOnPasting:s}=this.getProps();this.releaseMemory(),s&&!t&&this.unbindPastingHandler()}getError(t){let{action:s,xhr:o,message:i,fileName:a}=t;const n=o?o.status:0,u=i||`cannot post ${a} to ${s}, xhr status: ${n}'`,f=new Error(u);return f.status=n,f.method="post",f.url=s,f}getBody(t){if(!t)return;const s=t.responseText||t.response;if(!s)return s;try{return JSON.parse(s)}catch{return s}}checkFileSize(t){const{size:s}=t,{maxSize:o,minSize:i}=this.getProps();let a=!1;return(s>o*t_||s{const y=this.checkFileFormat(a,e);return y||s.push(e),y}),s.length!==0&&this._adapter.notifyAcceptInvalid(s),u.length===0))return;u=u.map(e=>(i&&(e=i(e)),e.uid||(e.uid=OB()),this.checkFileSize(e)&&(e._sizeInvalid=!0,e.status=aU,this._adapter.notifySizeError(e,n)),e));const f=n.length+u.length;if(typeof o<"u"&&f>o){if(this._adapter.notifyExceed(u),o===1){u=u.slice(-1),this._adapter.notifyFileSelect(u),this._adapter.resetInput(),this.replaceFileList(u);return}const e=o-n.length;u=u.slice(0,e)}this._adapter.notifyFileSelect(u),this._adapter.resetInput(),this.addFilesToList(u)}handleReplaceChange(t){if(t.length===0)return;const{transformFile:s,uploadTrigger:o,accept:i}=this.getProps(),{replaceIdx:a,fileList:n}=this.getStates();let u=Array.from(t).pop();if(typeof i<"u"&&!this.checkFileFormat(i,u)){this._adapter.notifyAcceptInvalid([u]);return}s&&(u=s(u)),u.uid||(u.uid=OB()),this.checkFileSize(u)&&(u._sizeInvalid=!0,u.status=aU,this._adapter.notifySizeError(u,n)),this._adapter.notifyFileSelect([u]);const f=this.buildFileItem(u,o),e=[...n];e.splice(a,1,f),this._adapter.notifyChange({currentFile:f,fileList:e}),this._adapter.updateFileList(e,()=>{this._adapter.resetReplaceInput(),f._sizeInvalid||this.upload(f)})}buildFileItem(t,s){const{_sizeInvalid:o,status:i}=t;try{delete t._sizeInvalid,delete t.status}catch{}const a={status:i||(s===YR?wee:Cee),name:t.name,size:q9(t.size),uid:t.uid,percent:0,fileInstance:t,url:this._createURL(t)};return o&&(a._sizeInvalid=!0),this.isImage(t)&&(a.preview=!0),a}replaceFileList(t){const{uploadTrigger:s}=this.getProps(),o=t.map(i=>this.buildFileItem(i,s));this._adapter.notifyChange({fileList:o,currentFile:o[0]}),this._adapter.updateFileList(o,()=>{s===YR&&this.startUpload(o)})}addFilesToList(t){const s=this.getState("fileList").slice(),{uploadTrigger:o}=this.getProps(),i=t.map(a=>this.buildFileItem(a,o));i.forEach(a=>{const n=s.findIndex(u=>u.uid===a.uid);n!==-1?s[n]=a:(s.push(a),this._adapter.notifyChange({fileList:s,currentFile:a}))}),this._adapter.updateFileList(s,()=>{o===YR&&this.startUpload(i)})}insertFileToList(t,s){const{limit:o,transformFile:i,accept:a,uploadTrigger:n}=this.getProps(),{fileList:u}=this.getStates(),f=[];let e=Array.from(t);if(typeof a<"u"&&(e=e.filter(D=>{const ce=this.checkFileFormat(a,D);return ce||f.push(D),ce}),f.length!==0&&this._adapter.notifyAcceptInvalid(f),e.length===0))return;e=e.map(D=>(D.uid||(D.uid=OB()),this.checkFileSize(D)&&(D._sizeInvalid=!0,D.status=aU,this._adapter.notifySizeError(D,u)),i&&(D=i(D)),D));const y=u.length+e.length;if(typeof o<"u"&&y>o){if(o===1){e=e.slice(-1),this._adapter.notifyFileSelect(e),this._adapter.resetInput(),this.replaceFileList(e);return}const D=o-u.length;e=e.slice(0,D),this._adapter.notifyExceed(e)}const _=e.map(D=>this.buildFileItem(D,n)),T=u.slice();typeof s<"u"?T.splice(s,0,..._):T.push(..._),this._adapter.notifyFileSelect(e),this._adapter.notifyChange({fileList:T,currentFile:null}),this._adapter.updateFileList(T,()=>{n===YR&&this.startUpload(_)})}manualUpload(){const t=this.getState("fileList").filter(s=>s.status===Cee);this.startUpload(t)}startUpload(t){t.forEach(s=>{s._sizeInvalid||this.upload(s)})}upload(t){const{beforeUpload:s}=this.getProps();if(typeof s>"u"){this.post(t);return}if(typeof s=="function"){const{fileList:o}=this.getStates(),i=this._adapter.notifyBeforeUpload({file:t,fileList:o});switch(!0){case i===!0:{this.post(t);break}case i===!1:{const a={shouldUpload:!1,status:np.FILE_STATUS_VALID_FAIL};this.handleBeforeUploadResultInObject(a,t);break}case(i&&mO(i)):{Promise.resolve(i).then(a=>{let n={shouldUpload:!0};Object.prototype.toString.call(a).slice(8,-1)==="Object"&&(n=Object.assign(Object.assign({},n),a)),this.handleBeforeUploadResultInObject(n,t)},a=>{let n={shouldUpload:!1,status:np.FILE_STATUS_VALID_FAIL};Object.prototype.toString.call(a).slice(8,-1)==="Object"&&(n=Object.assign(Object.assign({},n),a)),this.handleBeforeUploadResultInObject(n,t)});break}case typeof i=="object":this.handleBeforeUploadResultInObject(i,t);break}}}handleBeforeUploadResultInObject(t,s){const{shouldUpload:o,status:i,autoRemove:a,validateMessage:n,fileInstance:u}=t;let f=this.getState("fileList").slice();if(a)f=f.filter(e=>e.uid!==s.uid);else{const e=this._getFileIndex(s,f);if(e<0)return;i&&(f[e].status=i),n&&(f[e].validateMessage=n),u&&(u.uid=s.uid,f[e].fileInstance=u,f[e].size=q9(u.size),f[e].name=u.name,f[e].url=this._createURL(u)),f[e].shouldUpload=o}this._adapter.updateFileList(f),this._adapter.notifyChange({fileList:f,currentFile:s}),o&&this.post(s)}post(t){const{fileInstance:s}=t,o=this.getProps();if(typeof XMLHttpRequest>"u")return;const i=new XMLHttpRequest,a=new FormData,{action:n}=o;let{data:u}=o;u&&(typeof u=="function"&&(u=u(s)),Object.keys(u).forEach(y=>{a.append(y,u[y])}));const f=o.name||o.fileName||s.name;if(o.customRequest)return o.customRequest({fileName:f,data:u,file:t,fileInstance:s,onProgress:y=>this.handleProgress({e:y,fileInstance:s}),onError:(y,_)=>this.handleError({e:_,xhr:y,fileInstance:s}),onSuccess:(y,_)=>this.handleSuccess({response:y,fileInstance:s,e:_,isCustomRequest:!0}),withCredentials:o.withCredentials,action:o.action});a.append(f,s),i.open("post",n,!0),o.withCredentials&&"withCredentials"in i&&(i.withCredentials=!0),i.upload&&(i.upload.onprogress=y=>this.handleProgress({e:y,fileInstance:s})),i.onload=y=>this.handleOnLoad({e:y,xhr:i,fileInstance:s}),i.onerror=y=>this.handleError({e:y,xhr:i,fileInstance:s});let e=o.headers||{};typeof e=="function"&&(e=e(s));for(const y in e)Object.prototype.hasOwnProperty.call(e,y)&&e[y]!==null&&i.setRequestHeader(y,e[y]);i.send(a)}handleProgress(t){let{e:s,fileInstance:o}=t;const{fileList:i}=this.getStates(),a=i.slice();let n=0;s.total>0&&(n=Number((s.loaded/s.total*100*qXe.PROGRESS_COEFFICIENT).toFixed(0))||0);const u=this._getFileIndex(o,a);u<0||(a[u].percent=n,a[u].status=wee,this._adapter.notifyProgress(n,o,a),this._adapter.updateFileList(a),this._adapter.notifyChange({fileList:a,currentFile:a[u]}))}handleOnLoad(t){let{e:s,xhr:o,fileInstance:i}=t;const{fileList:a}=this.getStates(),n=this._getFileIndex(i,a);n<0||(o.status<200||o.status>=300?this.handleError({e:s,xhr:o,fileInstance:i}):this.handleSuccess({e:s,xhr:o,fileInstance:i,index:n}))}handleSuccess(t){let{e:s,fileInstance:o,isCustomRequest:i=!1,xhr:a,response:n}=t;const{fileList:u}=this.getStates();let f=null;const e=this._getFileIndex(o,u);if(e<0)return;i?f=n:f=this.getBody(a);const y=u.slice(),{afterUpload:_}=this.getProps();if(y[e].status=eZe,y[e].percent=100,this._adapter.notifyProgress(100,o,y),y[e].response=f,s&&(y[e].event=s),_&&typeof _=="function"){const{autoRemove:T,status:D,validateMessage:ce,name:ge}=this._adapter.notifyAfterUpload({response:f,file:y[e],fileList:y})||{};D&&(y[e].status=D),ce&&(y[e].validateMessage=ce),ge&&(y[e].name=ge),T&&y.splice(e,1)}this._adapter.notifySuccess(f,o,y),this._adapter.notifyChange({fileList:y,currentFile:y[e]}),this._adapter.updateFileList(y)}_getFileIndex(t,s){return s.findIndex(o=>o.uid===t.uid)}handleRemove(t){const{disabled:s}=this.getProps();if(s)return;const{fileList:o}=this.getStates();Promise.resolve(this._adapter.notifyBeforeRemove(t,o)).then(i=>{if(i===!1)return;const a=o.slice(),n=this._getFileIndex(t,o);n<0||(a.splice(n,1),this._adapter.notifyRemove(t.fileInstance,a,t),this._adapter.updateFileList(a),this._adapter.notifyChange({fileList:a,currentFile:t}))})}handleError(t){let{e:s,xhr:o,fileInstance:i}=t;const{fileList:a}=this.getStates(),n=this._getFileIndex(i,a);if(n<0)return;const{action:u}=this.getProps(),f=a.slice(),e=this.getError({action:u,xhr:o,fileName:i.name});f[n].status=tZe,f[n].response=e,f[n].event=s,this._adapter.notifyError(e,i,f,o),this._adapter.updateFileList(f),this._adapter.notifyChange({currentFile:f[n],fileList:f})}handleClear(){const{disabled:t}=this.getProps(),{fileList:s}=this.getStates();t||Promise.resolve(this._adapter.notifyBeforeClear(s)).then(o=>{o!==!1&&(this._adapter.updateFileList([]),this._adapter.notifyClear(),this._adapter.notifyChange({fileList:[]}))}).catch(o=>{})}_createURL(t){const s=URL.createObjectURL(t),{localUrls:o}=this.getStates(),i=o.slice();return i.push(s),this._adapter.updateLocalUrls(i),s}releaseMemory(){const{localUrls:t}=this.getStates();t.forEach(s=>{this._releaseBlob(s)})}_releaseBlob(t){try{URL.revokeObjectURL(t)}catch(s){console.log(s)}}isImage(t){return/(webp|svg|png|gif|jpg|jpeg|bmp|dpg)$/i.test(t.type)}isMultiple(){return!!this.getProp("multiple")}handleDragEnter(t){t.preventDefault(),t.stopPropagation(),this._dragEnterTarget=t.currentTarget;const{disabled:s}=this.getProps();s||this._adapter.updateDragAreaStatus(nZe)}handleDirectoryDrop(t){return JXe(this,void 0,void 0,function*(){const s=this.getState("fileList").slice(),o=[].slice.call(t.dataTransfer.items),i=yield ZXe(o);this.handleChange(i),this._adapter.updateDragAreaStatus(lU),this._adapter.notifyDrop(t,i,s)})}handleDrop(t){t.preventDefault(),t.stopPropagation();const{disabled:s,directory:o}=this.getProps(),i=this.getState("fileList").slice();if(!s){if(o){this.handleDirectoryDrop(t);return}const a=Array.from(t.dataTransfer.files);this.handleChange(a),this._adapter.updateDragAreaStatus(lU),this._adapter.notifyDrop(t,a,i)}}handleDragOver(t){t.preventDefault(),t.stopPropagation()}handleDragLeave(t){t.preventDefault(),t.stopPropagation(),this._dragEnterTarget===t.target&&this._adapter.updateDragAreaStatus(lU)}checkFileFormat(t,s){const o=t.split(",").map(n=>n.trim()).filter(n=>n),i=s.type||"",a=i.replace(/\/.*$/,"");return o.some(n=>{if(n.charAt(0)==="."){const u=s.name||"",f=n.split(".").pop().toLowerCase();return YXe(u.toLowerCase(),f)}if(/\/\*$/.test(n)){const u=n.replace(/\/.*$/,"");return a===u}return/^[^\/]+\/[^\/]+$/.test(n)?i===n:!1})}retry(t){const{onRetry:s}=this.getProps();s&&typeof s=="function"&&s(t),this.post(t)}handlePreviewClick(t){this._adapter.notifyPreviewClick(t)}readFileFromClipboard(t){for(const s of t)for(const o of s.types)o.startsWith("image")&&s.getType(o).then(i=>i.arrayBuffer()).then(i=>{const a=o.split("/")[1],n=new File([i],`upload.${a}`,{type:o});this.handleChange([n])})}handlePasting(t){if((this._adapter.isMac()?t.metaKey:t.ctrlKey)&&t.code==="KeyV"&&t.target===document.body){const i="clipboard-read";navigator.permissions.query({name:i}).then(a=>{console.log(a),a.state==="granted"||a.state==="prompt"?navigator.clipboard.read().then(n=>{this.readFileFromClipboard(n)}):this._adapter.notifyPastingError(a)}).catch(a=>{this._adapter.notifyPastingError(a)})}}bindPastingHandler(){this._adapter.registerPastingHandler(t=>this.handlePasting(t))}unbindPastingHandler(){this._adapter.unRegisterPastingHandler()}}const sZe=rZe;class oZe extends lh{constructor(t){super(Object.assign({},t))}handleImageError(t){this._adapter.updateFallbackPreview(!0)}}const iZe=oZe,V0=qhe.PREFIX,aZe=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ct.createElement("svg",Object.assign({focusable:!1,"aria-hidden":!0,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),ct.createElement("circle",{cx:"7.99992",cy:"7.99992",r:"6.66667",fill:"white"}),ct.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.3332 8.00008C15.3332 12.0502 12.0499 15.3334 7.99984 15.3334C3.94975 15.3334 0.666504 12.0502 0.666504 8.00008C0.666504 3.94999 3.94975 0.666748 7.99984 0.666748C12.0499 0.666748 15.3332 3.94999 15.3332 8.00008ZM8.99984 11.6667C8.99984 11.1145 8.55212 10.6667 7.99984 10.6667C7.44755 10.6667 6.99984 11.1145 6.99984 11.6667C6.99984 12.219 7.44755 12.6667 7.99984 12.6667C8.55212 12.6667 8.99984 12.219 8.99984 11.6667ZM7.99984 3.33341C7.27573 3.33341 6.7003 3.94171 6.74046 4.66469L6.94437 8.33495C6.97549 8.89513 7.4388 9.33341 7.99984 9.33341C8.56087 9.33341 9.02419 8.89513 9.05531 8.33495L9.25921 4.66469C9.29938 3.94171 8.72394 3.33341 7.99984 3.33341Z",fill:"#F93920"}))},lZe=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ct.createElement("svg",Object.assign({focusable:!1,"aria-hidden":!0,width:"28",height:"28",viewBox:"0 0 28 28",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),ct.createElement("circle",{cx:"14",cy:"14",r:"14",fill:"#16161A",fillOpacity:"0.6"}),ct.createElement("path",{d:"M9 10.25V18.25L10.25 13.25H17.875V11.75C17.875 11.4739 17.6511 11.25 17.375 11.25H14L12.75 9.75H9.5C9.22386 9.75 9 9.97386 9 10.25Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),ct.createElement("path",{d:"M18 18.25L19 13.25H10.2031L9 18.25H18Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}))},uZe=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return ct.createElement("svg",Object.assign({focusable:!1,"aria-hidden":!0,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),ct.createElement("path",{d:"M6 17V7.58824C6 7.26336 6.26863 7 6.6 7H10.5L12 8.76471H16.05C16.3814 8.76471 16.65 9.02806 16.65 9.35294V11.1176H7.5L6 17ZM6 17L7.44375 11.1176H18L16.8 17L6 17Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}))};class IG extends Uc{constructor(t){super(t),this.state={fallbackPreview:!1},this.foundation=new iZe(this.adapter)}get adapter(){return Object.assign(Object.assign({},super.adapter),{updateFallbackPreview:t=>this.setState({fallbackPreview:t})})}transSize(t){return typeof t=="number"?q9(t):t}renderValidateMessage(){const{status:t,validateMessage:s}=this.props;let o=null;switch(!0){case(typeof s=="string"&&t===np.FILE_STATUS_VALIDATING):o=ct.createElement(ct.Fragment,null,ct.createElement(e1,{size:"small",wrapperClassName:`${V0}-file-card-icon-loading`}),s);break;case typeof s=="string":o=ct.createElement(ct.Fragment,null,ct.createElement(GT,{className:`${V0}-file-card-icon-error`}),s);break;case HPe(s):o=s;break}return o}renderPicValidateMsg(){const{status:t,validateMessage:s}=this.props;let o=null;switch(!0){case(s&&t===np.FILE_STATUS_VALIDATING):o=ct.createElement(e1,{size:"small",wrapperClassName:`${V0}-picture-file-card-icon-loading`});break;case(s&&(t===np.FILE_STATUS_VALID_FAIL||t===np.FILE_STATUS_UPLOAD_FAIL)):o=ct.createElement("div",{className:`${V0}-picture-file-card-icon-error`},ct.createElement(aZe,null));break}return o?ct.createElement(Y0,{content:s,trigger:"hover",position:"bottom"},o):null}renderPic(t){const{fallbackPreview:s}=this.state,{url:o,percent:i,status:a,disabled:n,style:u,onPreviewClick:f,showPicInfo:e,renderPicInfo:y,renderPicPreviewIcon:_,renderThumbnail:T,name:D,index:ce,picHeight:ge,picWidth:Ee}=this.props,_e=a===np.FILE_STATUS_UPLOADING&&i!==100,Be=a===np.FILE_STATUS_UPLOAD_FAIL&&this.props.showRetry,He=a===np.FILE_STATUS_SUCCESS&&this.props.showReplace,at=a===np.FILE_STATUS_SUCCESS&&!this.props.showReplace,st=ds({[`${V0}-picture-file-card`]:!0,[`${V0}-picture-file-card-preview-fallback`]:s,[`${V0}-picture-file-card-disabled`]:n,[`${V0}-picture-file-card-show-pointer`]:typeof f<"u",[`${V0}-picture-file-card-error`]:a===np.FILE_STATUS_UPLOAD_FAIL,[`${V0}-picture-file-card-uploading`]:_e}),vt=ct.createElement("div",{role:"button",tabIndex:0,className:`${V0}-picture-file-card-retry`,onClick:Nr=>this.onRetry(Nr)},ct.createElement(z7e,{className:`${V0}-picture-file-card-icon-retry`})),Ot=ct.createElement(Y0,{trigger:"hover",position:"top",content:t.replace,showArrow:!1,spacing:4},ct.createElement("div",{role:"button",tabIndex:0,className:`${V0}-picture-file-card-replace`,onClick:Nr=>this.onReplace(Nr)},ct.createElement(lZe,{className:`${V0}-picture-file-card-icon-replace`}))),Kt=ct.createElement("div",{className:`${V0}-picture-file-card-preview`},typeof _=="function"?_(this.props):null),sn=ct.createElement("div",{role:"button",tabIndex:0,className:`${V0}-picture-file-card-close`,onClick:Nr=>this.onRemove(Nr)},ct.createElement(XT,{className:`${V0}-picture-file-card-icon-close`})),Bn=typeof y=="function"?y(this.props):ct.createElement("div",{className:`${V0}-picture-file-card-pic-info`},ce+1);let fn={},bn=u?Object.assign({},u):{};ge&&(bn.height=ge,fn.height=ge),Ee&&(bn.width=Ee,fn.width=Ee);const _n=typeof T=="function"?T(this.props):s?ct.createElement(_9,{size:"large"}):ct.createElement("img",{src:o,alt:D,onError:Nr=>this.foundation.handleImageError(Nr),style:fn});return ct.createElement("div",{role:"listitem",className:st,style:bn,onClick:f},_n,_e?ct.createElement(HJ,{percent:i,type:"circle",size:"small",orbitStroke:"#FFF","aria-label":"uploading file progress"}):null,Be?vt:null,He&&Ot,at&&Kt,e&&Bn,!n&&sn,this.renderPicValidateMsg())}renderFile(t){const{name:s,size:o,percent:i,url:a,showRetry:n,showReplace:u,preview:f,previewFile:e,status:y,style:_,onPreviewClick:T,renderFileOperation:D}=this.props,{fallbackPreview:ce}=this.state,ge=ds({[`${V0}-file-card`]:!0,[`${V0}-file-card-fail`]:y===np.FILE_STATUS_VALID_FAIL||y===np.FILE_STATUS_UPLOAD_FAIL,[`${V0}-file-card-show-pointer`]:typeof T<"u"}),Ee=ds({[`${V0}-file-card-preview`]:!0,[`${V0}-file-card-preview-placeholder`]:!f||e||ce}),_e=`${V0}-file-card-info`,Be=`${V0}-file-card-close`,He=`${V0}-file-card-replace`,at=!(i===100||typeof i>"u")&&y===np.FILE_STATUS_UPLOADING,st=y===np.FILE_STATUS_UPLOAD_FAIL&&n,vt=y===np.FILE_STATUS_SUCCESS&&u,Ot=this.transSize(o);let Kt=f&&!ce?ct.createElement("img",{src:a,alt:s,onError:Bn=>this.foundation.handleImageError(Bn)}):ct.createElement(_9,{size:"large"});e&&(Kt=e(this.props));const sn=typeof D=="function"?D(this.props):ct.createElement(Wu,{onClick:Bn=>this.onRemove(Bn),type:"tertiary",icon:ct.createElement(GC,null),theme:"borderless",size:"small",className:Be});return ct.createElement("div",{role:"listitem",className:ge,style:_,onClick:T},ct.createElement("div",{className:Ee},Kt),ct.createElement("div",{className:`${_e}-main`},ct.createElement("div",{className:`${_e}-main-text`},ct.createElement("span",{className:`${_e}-name`},s),ct.createElement("span",null,ct.createElement("span",{className:`${_e}-size`},Ot),vt&&ct.createElement(Y0,{trigger:"hover",position:"top",showArrow:!1,content:t.replace},ct.createElement(Wu,{onClick:Bn=>this.onReplace(Bn),type:"tertiary",theme:"borderless",size:"small",icon:ct.createElement(uZe,null),className:He})))),at?ct.createElement(HJ,{percent:i,style:{width:"100%"},"aria-label":"uploading file progress"}):null,ct.createElement("div",{className:`${_e}-main-control`},ct.createElement("span",{className:`${_e}-validate-message`},this.renderValidateMessage()),st?ct.createElement("span",{role:"button",tabIndex:0,className:`${_e}-retry`,onClick:Bn=>this.onRetry(Bn)},t.retry):null)),sn)}onRemove(t){t.stopPropagation(),this.props.onRemove()}onReplace(t){t.stopPropagation(),this.props.onReplace()}onRetry(t){t.stopPropagation(),this.props.onRetry()}render(){const{listType:t}=this.props;return t===np.FILE_LIST_PIC?ct.createElement(Bm,{componentName:"Upload"},s=>this.renderPic(s)):t===np.FILE_LIST_DEFAULT?ct.createElement(Bm,{componentName:"Upload"},s=>this.renderFile(s)):null}}IG.propTypes={className:be.string,disabled:be.bool,listType:be.string,name:be.string,onPreviewClick:be.func,onRemove:be.func,onReplace:be.func,onRetry:be.func,percent:be.number,preview:be.bool,previewFile:be.func,picWidth:be.oneOfType([be.number,be.string]),picHeight:be.oneOfType([be.number,be.string]),showReplace:be.bool,showRetry:be.bool,size:be.oneOfType([be.number,be.string]),status:be.string,style:be.object,url:be.string,validateMessage:be.node,index:be.number};IG.defaultProps={listType:np.FILE_LIST_DEFAULT,name:"",onRemove:()=>{},onRetry:()=>{},preview:!1,size:""};const Yhe=IG;var cZe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);i{const{inputRef:s,props:o}=this,{onOpenFileDialog:i}=o;this.props.disabled||!s||!s.current||(s.current.click(),i&&i())},this.onChange=s=>{const{files:o}=s.target;this.foundation.handleChange(o)},this.replace=s=>{this.setState({replaceIdx:s},()=>{this.replaceInputRef.current.click()})},this.onReplaceChange=s=>{const{files:o}=s.target;this.foundation.handleReplaceChange(o)},this.clear=()=>{this.foundation.handleClear()},this.remove=s=>{this.foundation.handleRemove(s)},this.insert=(s,o)=>this.foundation.insertFileToList(s,o),this.upload=()=>{this.foundation.manualUpload()},this.openFileDialog=()=>{this.onClick()},this.renderFile=(s,o,i)=>{const{name:a,status:n,validateMessage:u,_sizeInvalid:f,uid:e}=s,{previewFile:y,listType:_,itemStyle:T,showPicInfo:D,renderPicInfo:ce,renderPicPreviewIcon:ge,renderFileOperation:Ee,renderFileItem:_e,renderThumbnail:Be,disabled:He,onPreviewClick:at,picWidth:st,picHeight:vt}=this.props,Ot=()=>this.remove(s),Kt=()=>{this.foundation.retry(s)},sn=()=>{this.replace(o)},Bn=Object.assign(Object.assign(Object.assign({},I1(this.props,["showRetry","showReplace",""])),s),{previewFile:y,listType:_,onRemove:Ot,onRetry:Kt,index:o,key:e||`${a}${o}`,style:T,disabled:He,showPicInfo:D,renderPicInfo:ce,renderPicPreviewIcon:ge,renderFileOperation:Ee,renderThumbnail:Be,onReplace:sn,onPreviewClick:typeof at<"u"?()=>this.foundation.handlePreviewClick(s):void 0,picWidth:st,picHeight:vt});return n===np.FILE_STATUS_UPLOAD_FAIL&&!u&&(Bn.validateMessage=i.fail),f&&!u&&(Bn.validateMessage=i.illegalSize),typeof _e>"u"?ct.createElement(Yhe,Object.assign({},Bn)):_e(Bn)},this.renderFileList=()=>{const{listType:s}=this.props;return s===np.FILE_LIST_PIC?this.renderFileListPic():s===np.FILE_LIST_DEFAULT?this.renderFileListDefault():null},this.renderFileListPic=()=>{const{showUploadList:s,limit:o,disabled:i,children:a,draggable:n,hotSpotLocation:u,picHeight:f,picWidth:e}=this.props,{fileList:y,dragAreaStatus:_}=this.state,T=this.props.fileList||y,D=o?o>T.length:!0,ce=`${xm}-drag-area`,ge=ds(`${xm}-add`,{[`${xm}-picture-add`]:!0,[`${xm}-picture-add-disabled`]:i}),Ee=ds(`${xm}-file-list`,{[`${xm}-picture-file-list`]:!0}),_e=ds({[`${ce}-legal`]:_===np.DRAG_AREA_LEGAL,[`${ce}-illegal`]:_===np.DRAG_AREA_ILLEGAL}),Be=`${xm}-file-list-main`,He={role:"button",className:ge,onClick:this.onClick,style:{height:f,width:e}},at={className:Ee},st={onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDragEnter:this.onDragEnter};n&&Object.assign(He,st,{className:ds(ge,_e)});const vt=ct.createElement("div",Object.assign({},He,{"x-semi-prop":"children"}),a);return!s||!T.length?D?vt:null:ct.createElement(Bm,{componentName:"Upload"},Ot=>ct.createElement("div",Object.assign({},at),ct.createElement("div",{className:Be,role:"list","aria-label":"picture list"},D&&u==="start"?vt:null,T.map((Kt,sn)=>this.renderFile(Kt,sn,Ot)),D&&u==="end"?vt:null)))},this.renderFileListDefault=()=>{const{showUploadList:s,limit:o,disabled:i}=this.props,{fileList:a}=this.state,n=this.props.fileList||a,u=ds(`${xm}-file-list`),f=`${xm}-file-list-title`,e=`${xm}-file-list-main`,y=o!==1&&n.length,_=this.props.showClear&&!i,T={className:u};return!s||!n.length?null:ct.createElement(Bm,{componentName:"Upload"},D=>ct.createElement("div",Object.assign({},T),y?ct.createElement("div",{className:f},ct.createElement("span",{className:`${f}-choosen`},D.selectedFiles),_?ct.createElement("span",{role:"button",tabIndex:0,onClick:this.clear,className:`${f}-clear`},D.clear):null):null,ct.createElement("div",{className:e,role:"list","aria-label":"file list"},n.map((ce,ge)=>this.renderFile(ce,ge,D)))))},this.onDrop=s=>{this.foundation.handleDrop(s)},this.onDragOver=s=>{this.foundation.handleDragOver(s)},this.onDragLeave=s=>{this.foundation.handleDragLeave(s)},this.onDragEnter=s=>{this.foundation.handleDragEnter(s)},this.renderAddContent=()=>{const{draggable:s,children:o,listType:i,disabled:a}=this.props,n=ds(`${xm}-add`);return i===np.FILE_LIST_PIC?null:s?this.renderDragArea():ct.createElement("div",{role:"button",tabIndex:0,"aria-disabled":a,className:n,onClick:this.onClick},o)},this.renderDragArea=()=>{const{dragAreaStatus:s}=this.state,{children:o,dragIcon:i,dragMainText:a,dragSubText:n,disabled:u}=this.props,f=`${xm}-drag-area`,e=ds(f,{[`${f}-legal`]:s===np.DRAG_AREA_LEGAL,[`${f}-illegal`]:s===np.DRAG_AREA_ILLEGAL,[`${f}-custom`]:o});return ct.createElement(Bm,{componentName:"Upload"},y=>ct.createElement("div",{role:"button",tabIndex:0,"aria-disabled":u,className:e,onDrop:this.onDrop,onDragOver:this.onDragOver,onDragLeave:this.onDragLeave,onDragEnter:this.onDragEnter,onClick:this.onClick},o||ct.createElement(ct.Fragment,null,ct.createElement("div",{className:`${f}-icon`,"x-semi-prop":"dragIcon"},i||ct.createElement(vMe,{size:"extra-large"})),ct.createElement("div",{className:`${f}-text`},ct.createElement("div",{className:`${f}-main-text`,"x-semi-prop":"dragMainText"},a||y.mainText),ct.createElement("div",{className:`${f}-sub-text`,"x-semi-prop":"dragSubText"},n),ct.createElement("div",{className:`${f}-tips`},s===np.DRAG_AREA_LEGAL&&ct.createElement("span",{className:`${f}-tips-legal`},y.legalTips),s===np.DRAG_AREA_ILLEGAL&&ct.createElement("span",{className:`${f}-tips-illegal`},y.illegalTips))))))},this.state={fileList:t.defaultFileList||[],replaceIdx:-1,inputKey:Math.random(),replaceInputKey:Math.random(),dragAreaStatus:"default",localUrls:[]},this.foundation=new sZe(this.adapter),this.inputRef=ct.createRef(),this.replaceInputRef=ct.createRef()}static getDerivedStateFromProps(t){const{fileList:s}=t;return"fileList"in t?{fileList:s||[]}:null}get adapter(){return Object.assign(Object.assign({},super.adapter),{notifyFileSelect:t=>this.props.onFileChange(t),notifyError:(t,s,o,i)=>this.props.onError(t,s,o,i),notifySuccess:(t,s,o)=>this.props.onSuccess(t,s,o),notifyProgress:(t,s,o)=>this.props.onProgress(t,s,o),notifyRemove:(t,s,o)=>this.props.onRemove(t,s,o),notifySizeError:(t,s)=>this.props.onSizeError(t,s),notifyExceed:t=>this.props.onExceed(t),updateFileList:(t,s)=>{typeof s=="function"?this.setState({fileList:t},s):this.setState({fileList:t})},notifyBeforeUpload:t=>{let{file:s,fileList:o}=t;return this.props.beforeUpload({file:s,fileList:o})},notifyAfterUpload:t=>{let{response:s,file:o,fileList:i}=t;return this.props.afterUpload({response:s,file:o,fileList:i})},resetInput:()=>{this.setState(t=>({inputKey:Math.random()}))},resetReplaceInput:()=>{this.setState(t=>({replaceInputKey:Math.random()}))},isMac:()=>navigator.platform.toUpperCase().indexOf("MAC")>=0,registerPastingHandler:t=>{document.body.addEventListener("keydown",t),this.pastingCb=t},unRegisterPastingHandler:()=>{this.pastingCb&&document.body.removeEventListener("keydown",this.pastingCb)},notifyPastingError:t=>this.props.onPastingError(t),updateDragAreaStatus:t=>this.setState({dragAreaStatus:t}),notifyChange:t=>{let{currentFile:s,fileList:o}=t;return this.props.onChange({currentFile:s,fileList:o})},updateLocalUrls:t=>this.setState({localUrls:t}),notifyClear:()=>this.props.onClear(),notifyPreviewClick:t=>this.props.onPreviewClick(t),notifyDrop:(t,s,o)=>this.props.onDrop(t,s,o),notifyAcceptInvalid:t=>this.props.onAcceptInvalid(t),notifyBeforeRemove:(t,s)=>this.props.beforeRemove(t,s),notifyBeforeClear:t=>this.props.beforeClear(t)})}componentDidMount(){this.foundation.init()}componentWillUnmount(){this.foundation.destroy()}render(){const t=this.props,{style:s,className:o,multiple:i,accept:a,disabled:n,children:u,capture:f,listType:e,prompt:y,promptPosition:_,draggable:T,validateMessage:D,validateStatus:ce,directory:ge}=t,Ee=cZe(t,["style","className","multiple","accept","disabled","children","capture","listType","prompt","promptPosition","draggable","validateMessage","validateStatus","directory"]),_e=ds(xm,{[`${xm}-picture`]:e===np.FILE_LIST_PIC,[`${xm}-disabled`]:n,[`${xm}-default`]:ce==="default",[`${xm}-error`]:ce==="error",[`${xm}-warning`]:ce==="warning",[`${xm}-success`]:ce==="success"},o),Be=ds(`${xm}-hidden-input`),He=ds(`${xm}-hidden-input-replace`),at=ds(`${xm}-prompt`),st=ds(`${xm}-validate-message`),vt=ge?{directory:"directory",webkitdirectory:"webkitdirectory"}:{};return ct.createElement("div",Object.assign({className:_e,style:s,"x-prompt-pos":_},this.getDataAttr(Ee)),ct.createElement("input",Object.assign({key:this.state.inputKey,capture:f,multiple:i,accept:a,onChange:this.onChange,type:"file",autoComplete:"off",tabIndex:-1,className:Be,ref:this.inputRef},vt)),ct.createElement("input",{key:this.state.replaceInputKey,multiple:!1,accept:a,onChange:this.onReplaceChange,type:"file",autoComplete:"off",tabIndex:-1,className:He,ref:this.replaceInputRef}),this.renderAddContent(),y?ct.createElement("div",{className:at,"x-semi-prop":"prompt"},y):null,D?ct.createElement("div",{className:st,"x-semi-prop":"validateMessage"},D):null,this.renderFileList())}}MF.propTypes={accept:be.string,action:be.string.isRequired,addOnPasting:be.bool,afterUpload:be.func,beforeClear:be.func,beforeRemove:be.func,beforeUpload:be.func,children:be.node,className:be.string,customRequest:be.func,data:be.oneOfType([be.object,be.func]),defaultFileList:be.array,directory:be.bool,disabled:be.bool,dragIcon:be.node,dragMainText:be.node,dragSubText:be.node,draggable:be.bool,fileList:be.array,fileName:be.string,headers:be.oneOfType([be.object,be.func]),hotSpotLocation:be.oneOf(["start","end"]),itemStyle:be.object,limit:be.number,listType:be.oneOf(np.LIST_TYPE),maxSize:be.number,minSize:be.number,multiple:be.bool,name:be.string,onAcceptInvalid:be.func,onChange:be.func,onClear:be.func,onDrop:be.func,onError:be.func,onExceed:be.func,onFileChange:be.func,onOpenFileDialog:be.func,onPreviewClick:be.func,onProgress:be.func,onRemove:be.func,onRetry:be.func,onSizeError:be.func,onSuccess:be.func,onPastingError:be.func,previewFile:be.func,prompt:be.node,promptPosition:be.oneOf(np.PROMPT_POSITION),picWidth:be.oneOfType([be.number,be.string]),picHeight:be.oneOfType([be.number,be.string]),renderFileItem:be.func,renderPicPreviewIcon:be.func,renderFileOperation:be.func,renderPicInfo:be.func,renderThumbnail:be.func,showClear:be.bool,showPicInfo:be.bool,showReplace:be.bool,showRetry:be.bool,showUploadList:be.bool,style:be.object,timeout:be.number,transformFile:be.func,uploadTrigger:be.oneOf(np.UPLOAD_TRIGGER),validateMessage:be.node,validateStatus:be.oneOf(np.VALIDATE_STATUS),withCredentials:be.bool};MF.defaultProps={defaultFileList:[],disabled:!1,listType:"list",hotSpotLocation:"end",multiple:!1,onAcceptInvalid:so,onChange:so,beforeRemove:()=>!0,beforeClear:()=>!0,onClear:so,onDrop:so,onError:so,onExceed:so,onFileChange:so,onOpenFileDialog:so,onProgress:so,onRemove:so,onRetry:so,onSizeError:so,onSuccess:so,onPastingError:so,promptPosition:"right",showClear:!0,showPicInfo:!1,showReplace:!1,showRetry:!0,showUploadList:!0,uploadTrigger:"auto",withCredentials:!1};MF.FileCard=Yhe;const OG=MF;class RG extends Vt.Component{constructor(t){super(t),this.state={}}render(){const{children:t,locale:s}=this.props;return ct.createElement(ufe.Provider,{value:s},t)}}RG.propTypes={locale:be.object,children:be.node};RG.defaultProps={locale:x9};const z4={PREFIX:`${fi}-image`},fZe={DEFAULT_Z_INDEX:1070},BG=Vt.createContext({}),uU=`${z4.PREFIX}-preview-header`,dZe=Vt.forwardRef((r,t)=>{let{onClose:s,titleStyle:o,className:i,renderHeader:a,closable:n}=r;return ct.createElement(BG.Consumer,null,u=>{let{currentIndex:f,titles:e}=u,y;return e&&typeof f=="number"&&(y=e[f]),ct.createElement("section",{ref:t,className:ds(uU,i)},ct.createElement("section",{className:`${uU}-title`,style:o},a?a(y):y),n&&ct.createElement("section",{className:`${uU}-close`,onMouseUp:s},ct.createElement(GC,null)))})}),hZe=dZe;class AZe extends lh{constructor(){super(...arguments),this.changeSliderValue=t=>{const{zoom:s,step:o,min:i,max:a}=this.getProps();let n=t==="plus"?s+o:s-o;n>a?n=a:n{const{onZoomIn:s,onZoomOut:o,zoom:i}=this.getProps();t>i?s(Number((t/100).toFixed(2))):o(Number((t/100).toFixed(2)))},this.handleRatioClick=()=>{const{ratio:t,onAdjustRatio:s}=this.getProps();s(t==="adaptation"?"realSize":"adaptation")},this.handleRotate=t=>{const{onRotate:s}=this.getProps();s&&s(t)}}}const h1=`${z4.PREFIX}-preview-footer`;class kG extends Uc{get adapter(){return Object.assign({},super.adapter)}constructor(t){super(t),this.changeSliderValue=s=>{this.foundation.changeSliderValue(s)},this.handleMinusClick=()=>{this.changeSliderValue("minus")},this.handlePlusClick=()=>{this.changeSliderValue("plus")},this.handleRotateLeft=()=>{this.foundation.handleRotate("left")},this.handleRotateRight=()=>{this.foundation.handleRotate("right")},this.handleSlideChange=iO(s=>{this.foundation.handleValueChange(s)},50),this.handleRatioClick=()=>{this.foundation.handleRatioClick()},this.customRenderViewMenu=()=>{const{min:s,max:o,step:i,curPage:a,totalNum:n,ratio:u,zoom:f,disabledPrev:e,disabledNext:y,disableDownload:_,onNext:T,onPrev:D,onDownload:ce,renderPreviewMenu:ge}=this.props,Ee={min:s,max:o,step:i,curPage:a,totalNum:n,ratio:u,zoom:f,disabledPrev:e,disabledNext:y,disableDownload:_,onNext:T,onPrev:D,onDownload:ce,onRotateLeft:this.handleRotateLeft,onRotateRight:this.handleRotateRight,disabledZoomIn:f===o,disabledZoomOut:f===s,onRatioClick:this.handleRatioClick,onZoomIn:this.handlePlusClick,onZoomOut:this.handleMinusClick,menuItems:this.getMenu()};return ge(Ee)},this.getFinalIconElement=(s,o,i)=>{const{showTooltip:a,zIndex:n}=this.props;return a?ct.createElement(Y0,{content:o,key:`tooltip-${i}`,zIndex:n+1},s):s},this.getLocalTextByKey=s=>ct.createElement(Bm,{componentName:"Image"},o=>o[s]),this.getIconChevronLeft=()=>{const{disabledPrev:s,onPrev:o,prevTip:i}=this.props,a=ct.createElement(Xz,{key:"chevron-left",size:"large",className:s?`${h1}-disabled`:"",onClick:s?void 0:o}),n=i??this.getLocalTextByKey("prevTip");return this.getFinalIconElement(a,n,"chevron-left")},this.getIconChevronRight=()=>{const{disabledNext:s,onNext:o,nextTip:i}=this.props,a=ct.createElement(YT,{key:"chevron-right",size:"large",className:s?`${h1}-disabled`:"",onClick:s?void 0:o}),n=i??this.getLocalTextByKey("nextTip");return this.getFinalIconElement(a,n,"chevron-right")},this.getIconMinus=()=>{const{zoomOutTip:s,zoom:o,min:i}=this.props,a=o===i,n=ct.createElement(Afe,{key:"minus",size:"large",onClick:a?void 0:this.handleMinusClick,className:a?`${h1}-disabled`:""}),u=s??this.getLocalTextByKey("zoomOutTip");return this.getFinalIconElement(n,u,"minus")},this.getIconPlus=()=>{const{zoomInTip:s,zoom:o,max:i}=this.props,a=o===i,n=ct.createElement(e2,{key:"plus",size:"large",onClick:a?void 0:this.handlePlusClick,className:a?`${h1}-disabled`:""}),u=s??this.getLocalTextByKey("zoomInTip");return this.getFinalIconElement(n,u,"plus")},this.getIconRatio=()=>{const{ratio:s,originTip:o,adaptiveTip:i}=this.props,a={key:"ratio",size:"large",className:ds(`${h1}-gap`),onClick:this.handleRatioClick},n=s==="adaptation"?ct.createElement(U7e,Object.assign({},a)):ct.createElement(SMe,Object.assign({},a));let u;return s==="adaptation"?u=o??this.getLocalTextByKey("originTip"):u=i??this.getLocalTextByKey("adaptiveTip"),this.getFinalIconElement(n,u,"ratio")},this.getIconRotate=()=>{const{rotateTip:s}=this.props,o=ct.createElement(W7e,{key:"rotate",size:"large",onClick:this.handleRotateLeft}),i=s??this.getLocalTextByKey("rotateTip");return this.getFinalIconElement(o,i,"rotate")},this.getIconDownload=()=>{const{downloadTip:s,onDownload:o,disableDownload:i}=this.props,a=ct.createElement($Fe,{key:"download",size:"large",onClick:i?void 0:o,className:ds(`${h1}-gap`,{[`${h1}-disabled`]:i})}),n=s??this.getLocalTextByKey("downloadTip");return this.getFinalIconElement(a,n,"download")},this.getNumberInfo=()=>{const{curPage:s,totalNum:o}=this.props;return ct.createElement("div",{className:`${h1}-page`,key:"info"},s,"/",o)},this.getSlider=()=>{const{zoom:s,min:o,max:i,step:a,showTooltip:n}=this.props;return ct.createElement(E_,{key:"slider",value:s,min:o,max:i,step:a,tipFormatter:u=>`${u}%`,tooltipVisible:n?void 0:!1,onChange:this.handleSlideChange})},this.getMenu=()=>[this.getIconChevronLeft(),this.getNumberInfo(),this.getIconChevronRight(),this.getIconMinus(),this.getSlider(),this.getIconPlus(),this.getIconRatio(),this.getIconRotate(),this.getIconDownload()],this.getFooterMenu=()=>{const s=this.getMenu();return s.splice(3,0,ct.createElement(AC,{layout:"vertical",key:"divider-first"})),s.splice(8,0,ct.createElement(AC,{layout:"vertical",key:"divider-second"})),s},this.foundation=new AZe(this.adapter)}render(){const{className:t,renderPreviewMenu:s,forwardRef:o}=this.props,i=ds(h1,`${h1}-wrapper`,t,{[`${h1}-content`]:!s});return ct.createElement("section",{className:i,ref:o},s?this.customRenderViewMenu():this.getFooterMenu())}}kG.propTypes={curPage:be.number,totalNum:be.number,disabledPrev:be.bool,disabledNext:be.bool,disableDownload:be.bool,className:be.string,zoom:be.number,ratio:be.string,prevTip:be.string,nextTip:be.string,zoomInTip:be.string,zoomOutTip:be.string,rotateTip:be.string,downloadTip:be.string,adaptiveTip:be.string,originTip:be.string,showTooltip:be.bool,onZoomIn:be.func,onZoomOut:be.func,onPrev:be.func,onNext:be.func,onAdjustRatio:be.func,onRotateLeft:be.func,onDownload:be.func};kG.defaultProps={min:10,max:500,step:10,showTooltip:!1,disableDownload:!1};const Eee={bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0,toJSON:()=>({})};class pZe extends lh{constructor(t){var s;super(Object.assign({},t)),s=this,this.startMouseOffset={x:0,y:0},this.originImageWidth=null,this.originImageHeight=null,this._isImageVertical=()=>this.getProp("rotation")%180!==0,this._getImageBounds=()=>{const o=this._adapter.getImage();return o?o.getBoundingClientRect():Eee},this._getContainerBounds=()=>{const o=this._adapter.getContainer();return o?o.getBoundingClientRect():Eee},this._getOffset=o=>{const{left:i,top:a}=this._getImageBounds();return{x:o.clientX-i,y:o.clientY-a}},this.setLoading=o=>{this._adapter.setLoading(o)},this.handleWindowResize=()=>{this.originImageWidth&&this.originImageHeight&&this.handleResizeImage()},this.handleLoad=o=>{if(o.target){const{naturalWidth:n,naturalHeight:u}=o.target;this.originImageHeight=u,this.originImageWidth=n,this.setState({loading:!1}),this.handleResizeImage(!1)}const{src:i,onLoad:a}=this.getProps();a&&a(i)},this.handleError=o=>{const{onError:i,src:a}=this.getProps();this.setState({loading:!1}),i&&i(a)},this.handleResizeImage=function(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;const i=!s._isImageVertical(),{currZoom:a}=s.getStates(),n=i?s.originImageWidth:s.originImageHeight,u=i?s.originImageHeight:s.originImageWidth,{onZoom:f,setRatio:e,ratio:y}=s.getProps();if(s._adapter.getContainer()){const{width:T,height:D}=s._getContainerBounds(),ce=T-80,ge=D-80;let Ee=1;(n>ce||u>ge)&&(Ee=Number(Math.min(ce/n,ge/u).toFixed(2))),a===Ee?s.calculatePreviewImage(Ee,null):f(Ee,o)}},this.handleRatioChange=()=>{if(this.originImageWidth&&this.originImageHeight){const{currZoom:o}=this.getStates(),{ratio:i,onZoom:a}=this.getProps();let n;if(i==="adaptation"){const u=!this._isImageVertical(),f=u?this.originImageWidth:this.originImageHeight,e=u?this.originImageHeight:this.originImageWidth,{width:y,height:_}=this._getContainerBounds(),T=y-80,D=_-80;n=Number(Math.min(T/f,D/e).toFixed(2))}else n=1;o!==n&&a(n)}},this.handleRightClickImage=o=>{const{disableDownload:i}=this.getProps();return i?(o.preventDefault(),o.stopPropagation(),!1):!0},this.calcCanDragDirection=()=>{const{width:o,height:i}=this.getStates();this.getProps();const{width:a,height:n}=this._getContainerBounds();let u=o>a,f=i>n;return this._isImageVertical()&&(u=i>a,f=o>n),{canDragVertical:f,canDragHorizontal:u}},this.calculatePreviewImage=(o,i)=>{const a=this._adapter.getImage(),{canDragVertical:n,canDragHorizontal:u}=this.calcCanDragDirection(),f=n||u,{width:e,height:y}=this._getContainerBounds(),_=Math.floor(this.originImageWidth*o),T=Math.floor(this.originImageHeight*o);let D;const ce=!this._isImageVertical();let ge=0,Ee=0;ce?(D={x:.5*(e-_),y:.5*(y-T)},Ee=D.x,ge=D.y):(D={x:.5*(e-T),y:.5*(y-_)},Ee=D.x-(_-T)/2,ge=D.y+(_-T)/2),this.setState({width:_,height:T,offset:D,left:Ee,top:ge,currZoom:o}),a&&this._adapter.setImageCursor(f)},this.calcExtremeBounds=()=>{const{width:o,height:i}=this.getStates(),{width:a,height:n}=this._getContainerBounds();let u=a-o,f=n-i;return this._isImageVertical()&&(u=a-i,f=n-o),{left:u,top:f}},this.handleMoveImage=o=>{const{offset:i,width:a,height:n}=this.getStates(),{canDragVertical:u,canDragHorizontal:f}=this.calcCanDragDirection();if(o.buttons===1&&(u||f)){const{clientX:y,clientY:_}=o,{left:T,top:D}=this._getContainerBounds(),{left:ce,top:ge}=this.calcExtremeBounds();let Ee=f?y-T-this.startMouseOffset.x:i.x,_e=u?_-D-this.startMouseOffset.y:i.y;f&&(Ee=Ee>0?0:Ee0?0:_e{this.startMouseOffset=this._getOffset(o)}}}const mZe=z4.PREFIX,cU=`${mZe}-preview-image`;class PG extends Uc{get adapter(){return Object.assign(Object.assign({},super.adapter),{getContainer:()=>this.containerRef.current,getImage:()=>this.imageRef.current,setLoading:t=>{this.setState({loading:t})},setImageCursor:t=>{this.imageRef.current.style.cursor=t?"grab":"default"}})}constructor(t){super(t),this.onWindowResize=()=>{this.foundation.handleWindowResize()},this.handleRightClickImage=s=>{this.foundation.handleRightClickImage(s)},this.handleLoad=s=>{this.foundation.handleLoad(s)},this.handleError=s=>{this.foundation.handleError(s)},this.handleMoveImage=s=>{this.foundation.handleMoveImage(s)},this.onImageMouseDown=s=>{this.foundation.handleImageMouseDown(s)},this.state={width:0,height:0,loading:!0,offset:{x:0,y:0},currZoom:0,top:0,left:0},this.containerRef=ct.createRef(),this.imageRef=ct.createRef(),this.foundation=new pZe(this.adapter)}componentDidMount(){window.addEventListener("resize",this.onWindowResize)}componentWillUnmount(){window.removeEventListener("resize",this.onWindowResize)}componentDidUpdate(t,s){const o="zoom"in this.props&&this.props.zoom!==this.state.currZoom,i=this.props.src&&this.props.src!==t.src;i&&this.foundation.setLoading(!0),o&&this.foundation.calculatePreviewImage(this.props.zoom,null),!o&&!i&&t&&("ratio"in this.props&&this.props.ratio!==t.ratio&&this.foundation.handleRatioChange(),"rotation"in this.props&&this.props.rotation!==t.rotation&&this.onWindowResize())}render(){const{src:t,rotation:s,crossOrigin:o}=this.props,{loading:i,width:a,height:n,top:u,left:f}=this.state,e={position:"absolute",visibility:i?"hidden":"visible",transform:`rotate(${-s}deg)`,top:u,left:f,width:a,height:n};return ct.createElement("div",{className:`${cU}`,ref:this.containerRef},ct.createElement("img",{ref:this.imageRef,src:t,alt:"previewImag",className:`${cU}-img`,key:t,onMouseMove:this.handleMoveImage,onMouseDown:this.onImageMouseDown,onContextMenu:this.handleRightClickImage,onDragStart:y=>y.preventDefault(),onLoad:this.handleLoad,onError:this.handleError,style:e,crossOrigin:o}),i&&ct.createElement(e1,{size:"large",wrapperClassName:`${cU}-spin`}))}}PG.propTypes={src:be.string,rotation:be.number,style:be.object,zoom:be.number,ratio:be.string,disableDownload:be.bool,clickZoom:be.number,setRatio:be.func,onZoom:be.func,onLoad:be.func,onError:be.func};PG.defaultProps={zoom:void 0};const gZe=(r,t)=>{const s=r==null?void 0:r.composedPath();return s==null?void 0:s.slice(0,s.length-4).some(i=>i.className&&typeof i.className=="string"?t.some(a=>i.className.includes(a)):!1)},bZe=(r,t)=>{const s=new Image;s.src=r,s.crossOrigin="anonymous",s.onload=o=>{const i=document.createElement("a");i.download=t,i.style.display="none",i.download=t,i.href=r;const a=document.createElement("canvas");a.width=s.width,a.height=s.height,a.getContext("2d").drawImage(s,0,0,s.width,s.height),i.href=a.toDataURL("image/jpeg"),document.body.appendChild(i),i.click(),document.body.removeChild(i)}},vZe=function(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],s=[];const o=r.length,i=t.length,a=o<=i?o:i;return new Array(a).fill(0).forEach((n,u)=>{s.push(t[u]),s.push(r[u])}),o>i?s=s.concat(r.slice(i,o)):o{const i=t-s,a=t+s,n=r.length;let u=[],f=[];s>=Math.floor(n/2)?o?(u=r.concat(r).slice(i+n<0?0:i+n,t+n),f=r.concat(r).slice(t+1,a+1<2*n?a+1:2*n)):(u=r.slice(0,t),f=r.slice(t+1,n)):o?(u=r.concat(r).slice(i+n,t+n),f=r.concat(r).slice(t+1,a+1)):i>=0&&a{const{viewerVisible:o}=this.getStates();o&&(this.setState({viewerVisible:!1}),this.clearTimer())},this.handleMouseMove=o=>{this._persistEvent(o),this.mouseMoveHandler(o)},this.mouseMoveHandler=iO(o=>{const{viewerVisible:i}=this.getStates();this._adapter.isValidTarget(o)?(i||this.setState({viewerVisible:!0}),this.updateTimer()):this.clearTimer()},50),this.updateTimer=()=>{const{viewerVisibleDelay:o}=this.getProps();this.clearTimer(),this._timer=setTimeout(this.handleViewVisibleChange,o)},this.clearTimer=()=>{this._timer&&(clearTimeout(this._timer),this._timer=null)},this.handleWheel=o=>{this.onWheel(o),fb(o)},this.onWheel=o=>{const{zoomStep:i,maxZoom:a,minZoom:n}=this.getProps(),{zoom:u}=this.getStates();let f;o.deltaY<0?u+i<=a&&(f=Number((u+i).toFixed(2))):o.deltaY>0&&u-i>=n&&(f=Number((u-i).toFixed(2))),wm(f)||this.handleZoomImage(f)},this.handleMouseUp=o=>{const{maskClosable:i}=this.getProps();let a=!gZe(o,wZe);const{clientX:n,clientY:u}=o,{x:f,y:e}=this._startMouseDown;(Math.abs(n-f)>5||Math.abs(e-u)>5)&&(a=!1),a&&i&&this._adapter.notifyVisibleChange(!1)},this.handleMouseDown=o=>{const{clientX:i,clientY:a}=o;this._startMouseDown={x:i,y:a}},this.handleKeyDown=o=>{const{closeOnEsc:i}=this.getProps();if(i&&o.keyCode===hg.ESC){o.stopPropagation(),this._adapter.notifyVisibleChange(!1),this._adapter.notifyClose();return}},this.handleSwitchImage=o=>{const i=o==="prev"?-1:1,{imgSrc:a,currentIndex:n}=this.getStates(),u=a.length,f=(n+i+u)%u;"currentIndex"in this.getProps()?this._adapter.getIsInGroup()&&this._adapter.getContext("setCurrentIndex")(f):this.setState({currentIndex:f}),this._adapter.notifyChange(f,o),this.setState({direction:o,rotation:0})},this.handleDownload=()=>{const{currentIndex:o,imgSrc:i}=this.getStates(),a=this._adapter.getSetDownloadFunc(),n=i[o],u=a?a(n):n.slice(n.lastIndexOf("/")+1).split("?")[0];bZe(n,u),this._adapter.notifyDownload(n,o)},this.handlePreviewClose=o=>{this._adapter.notifyVisibleChange(!1),this._adapter.notifyClose(),fb(o)},this.handleAdjustRatio=o=>{this.setState({ratio:o}),this._adapter.notifyRatioChange(o)},this.handleRotateImage=o=>{const{rotation:i}=this.getStates(),a=i+(o==="left"?90:-90);this.setState({rotation:a}),this._adapter.notifyRotateChange(a)},this.handleZoomImage=function(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;const{zoom:a}=s.getStates();a!==o&&(i&&s._adapter.notifyZoom(o,o>a),s.setState({zoom:o}))},this.preloadGapImage=()=>{const{preLoad:o,preLoadGap:i,infinite:a,currentIndex:n}=this.getProps(),{imgSrc:u}=this.getStates();if(!o||typeof i!="number"||i<1)return;const f=yZe(u,n,i,a),e=new Image;let y=0;function _(T){y++,y{this.setLoadSuccessStatus(e.src),_()},e.onerror=_,e.src=f[0]},this.preloadSingleImage=()=>{const{preLoad:o,preLoadGap:i,infinite:a}=this.getProps(),{imgSrc:n,currentIndex:u,direction:f,imgLoadStatus:e}=this.getStates();if(!o||typeof i!="number"||i<1)return;let y=u+(f==="prev"?-1:1)*i;if(y<0||y>=n.length)if(a)y=(y+n.length)%n.length;else return;if(!e[y]){const _=new Image;_.onload=T=>{this.setLoadSuccessStatus(n[y])},_.src=n[y]}},this.setLoadSuccessStatus=o=>{const{imgLoadStatus:i}=this.getStates(),a=Object.assign({},i);a[o]=!0,this.setState({imgLoadStatus:a})},this.onImageLoad=o=>{const{preloadAfterVisibleChange:i}=this.getStates();this.setLoadSuccessStatus(o),i?(this.preloadGapImage(),this.setState({preloadAfterVisibleChange:!1})):this.preloadSingleImage()}}beforeShow(){this._adapter.registerKeyDownListener(),this._adapter.disabledBodyScroll(),this.updateTimer()}afterHide(){this._adapter.unregisterKeyDownListener(),this._adapter.enabledBodyScroll(),this.clearTimer()}}const Lee=z4.PREFIX;class UF extends Uc{get adapter(){return Object.assign(Object.assign({},super.adapter),{getIsInGroup:()=>this.isInGroup(),disabledBodyScroll:()=>{const{getPopupContainer:t}=this.props;this.bodyOverflow=document.body.style.overflow||"",!t&&this.bodyOverflow!=="hidden"&&(document.body.style.overflow="hidden",document.body.style.width=`calc(${this.originBodyWidth||"100%"} - ${this.scrollBarWidth}px)`)},enabledBodyScroll:()=>{const{getPopupContainer:t}=this.props;!t&&this.bodyOverflow!=="hidden"&&(document.body.style.overflow=this.bodyOverflow,document.body.style.width=this.originBodyWidth)},notifyChange:(t,s)=>{const{onChange:o,onPrev:i,onNext:a}=this.props;Mc(o)&&o(t),s==="prev"?i&&i(t):a&&a(t)},notifyZoom:(t,s)=>{const{onZoomIn:o,onZoomOut:i}=this.props;s?Mc(o)&&o(t):Mc(i)&&i(t)},notifyClose:()=>{const{onClose:t}=this.props;Mc(t)&&t()},notifyVisibleChange:t=>{const{onVisibleChange:s}=this.props;Mc(s)&&s(t)},notifyRatioChange:t=>{const{onRatioChange:s}=this.props;Mc(s)&&s(t)},notifyRotateChange:t=>{const{onRotateLeft:s}=this.props;Mc(s)&&s(t)},notifyDownload:(t,s)=>{const{onDownload:o}=this.props;Mc(o)&&o(t,s)},registerKeyDownListener:()=>{window&&window.addEventListener("keydown",this.handleKeyDown)},unregisterKeyDownListener:()=>{window&&window.removeEventListener("keydown",this.handleKeyDown)},getSetDownloadFunc:()=>{var t,s;return(s=(t=this.context)===null||t===void 0?void 0:t.setDownloadName)!==null&&s!==void 0?s:this.props.setDownloadName},isValidTarget:t=>{const s=this.headerRef&&this.headerRef.current,o=this.footerRef&&this.footerRef.current,i=this.leftIconRef&&this.leftIconRef.current,a=this.rightIconRef&&this.rightIconRef.current,n=t.target;return!(s&&s.contains(n)||o&&o.contains(n)||i&&i.contains(n)||a&&a.contains(n))}})}constructor(t){var s;super(t),s=this,this.viewVisibleChange=()=>{this.foundation.handleViewVisibleChange()},this.handleSwitchImage=o=>{this.foundation.handleSwitchImage(o)},this.handleDownload=()=>{this.foundation.handleDownload()},this.handlePreviewClose=o=>{this.foundation.handlePreviewClose(o)},this.handleAdjustRatio=o=>{this.foundation.handleAdjustRatio(o)},this.handleRotateImage=o=>{this.foundation.handleRotateImage(o)},this.handleZoomImage=function(o){let i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;s.foundation.handleZoomImage(o,i)},this.handleMouseUp=o=>{this.foundation.handleMouseUp(o.nativeEvent)},this.handleMouseMove=o=>{this.foundation.handleMouseMove(o)},this.handleKeyDown=o=>{this.foundation.handleKeyDown(o)},this.onImageError=()=>{this.foundation.preloadSingleImage()},this.onImageLoad=o=>{this.foundation.onImageLoad(o)},this.handleMouseDown=o=>{this.foundation.handleMouseDown(o)},this.handleWheel=o=>{this.foundation.handleWheel(o)},this.registryImageWrapRef=o=>{this.imageWrapRef&&this.imageWrapRef.removeEventListener("wheel",this.handleWheel),o&&o.addEventListener("wheel",this.handleWheel,{passive:!1}),this.imageWrapRef=o},this.state={imgSrc:[],imgLoadStatus:new Map,zoom:.1,currentIndex:0,ratio:"adaptation",rotation:0,viewerVisible:!0,visible:!1,preloadAfterVisibleChange:!0,direction:""},this.foundation=new CZe(this.adapter),this.bodyOverflow="",this.originBodyWidth="100%",this.scrollBarWidth=0,this.imageWrapRef=null,this.headerRef=ct.createRef(),this.footerRef=ct.createRef(),this.leftIconRef=ct.createRef(),this.rightIconRef=ct.createRef()}static getDerivedStateFromProps(t,s){const o={};let i=[];return t.visible&&(i=Array.isArray(t.src)?t.src:[t.src]),_0(i,s.imgSrc)||(o.imgSrc=i),t.visible!==s.visible&&(o.visible=t.visible,t.visible&&(o.preloadAfterVisibleChange=!0,o.viewerVisible=!0,o.rotation=0,o.ratio="adaptation")),"currentIndex"in t&&t.currentIndex!==s.currentIndex&&(o.currentIndex=t.currentIndex,o.ratio="adaptation"),o}componentDidMount(){this.scrollBarWidth=Wz(),this.originBodyWidth=document.body.style.width,this.props.visible&&this.foundation.beforeShow()}componentDidUpdate(t,s){t.src!==this.props.src&&this.foundation.updateTimer(),!t.visible&&this.props.visible&&this.foundation.beforeShow(),t.visible&&!this.props.visible&&this.foundation.afterHide()}componentWillUnmount(){this.foundation.clearTimer()}isInGroup(){return!!(this.context&&this.context.isGroup)}render(){const{getPopupContainer:t,closable:s,zIndex:o,visible:i,className:a,style:n,infinite:u,zoomStep:f,crossOrigin:e,prevTip:y,nextTip:_,zoomInTip:T,zoomOutTip:D,rotateTip:ce,downloadTip:ge,adaptiveTip:Ee,originTip:_e,showTooltip:Be,disableDownload:He,renderPreviewMenu:at,renderHeader:st}=this.props,{currentIndex:vt,imgSrc:Ot,zoom:Kt,ratio:sn,rotation:Bn,viewerVisible:fn}=this.state;let bn={zIndex:o};t&&(bn={zIndex:o,position:"static"});const $n=`${Lee}-preview`,_n=ds($n,{[`${Lee}-hide`]:!i,[`${$n}-popup`]:t},a),Nr=fn?"":`${$n}-hide`,Cr=Ot.length,Dr=Cr!==1&&(u||vt!==0),fr=Cr!==1&&(u||vt!==Cr-1);return i&&ct.createElement(U6,{getPopupContainer:t,style:bn},ct.createElement("div",{className:_n,style:n,onMouseDown:this.handleMouseDown,onMouseUp:this.handleMouseUp,ref:this.registryImageWrapRef,onMouseMove:this.handleMouseMove},ct.createElement(hZe,{ref:this.headerRef,className:ds(Nr),onClose:this.handlePreviewClose,renderHeader:st,closable:s}),ct.createElement(PG,{src:Ot[vt],onZoom:this.handleZoomImage,disableDownload:He,setRatio:this.handleAdjustRatio,zoom:Kt,ratio:sn,rotation:Bn,crossOrigin:e,onError:this.onImageError,onLoad:this.onImageLoad}),Dr&&ct.createElement("div",{ref:this.leftIconRef,className:ds(`${$n}-icon`,`${$n}-prev`,Nr),onClick:()=>this.handleSwitchImage("prev")},ct.createElement(sFe,{size:"large"})),fr&&ct.createElement("div",{ref:this.rightIconRef,className:ds(`${$n}-icon`,`${$n}-next`,Nr),onClick:()=>this.handleSwitchImage("next")},ct.createElement(aFe,{size:"large"})),ct.createElement(kG,{forwardRef:this.footerRef,className:Nr,totalNum:Cr,curPage:vt+1,disabledPrev:!Dr,disabledNext:!fr,zoom:Kt*100,step:f*100,showTooltip:Be,ratio:sn,prevTip:y,nextTip:_,zIndex:o,zoomInTip:T,zoomOutTip:D,rotateTip:ce,downloadTip:ge,disableDownload:He,adaptiveTip:Ee,originTip:_e,onPrev:()=>this.handleSwitchImage("prev"),onNext:()=>this.handleSwitchImage("next"),onZoomIn:this.handleZoomImage,onZoomOut:this.handleZoomImage,onDownload:this.handleDownload,onRotate:this.handleRotateImage,onAdjustRatio:this.handleAdjustRatio,renderPreviewMenu:at})))}}UF.contextType=BG;UF.propTypes={style:be.object,className:be.string,visible:be.bool,src:be.oneOfType([be.string,be.array]),currentIndex:be.number,defaultCurrentIndex:be.number,defaultVisible:be.bool,maskClosable:be.bool,closable:be.bool,zoomStep:be.number,infinite:be.bool,showTooltip:be.bool,closeOnEsc:be.bool,prevTip:be.string,nextTip:be.string,zoomInTip:be.string,zoomOutTip:be.string,downloadTip:be.string,adaptiveTip:be.string,originTip:be.string,lazyLoad:be.bool,preLoad:be.bool,preLoadGap:be.number,disableDownload:be.bool,viewerVisibleDelay:be.number,zIndex:be.number,maxZoom:be.number,minZoom:be.number,renderHeader:be.func,renderPreviewMenu:be.func,getPopupContainer:be.func,onVisibleChange:be.func,onChange:be.func,onClose:be.func,onZoomIn:be.func,onZoomOut:be.func,onPrev:be.func,onNext:be.func,onDownload:be.func,onRatioChange:be.func,onRotateLeft:be.func};UF.defaultProps={showTooltip:!1,zoomStep:.1,infinite:!1,closeOnEsc:!0,lazyLoad:!1,preLoad:!0,preLoadGap:2,zIndex:fZe.DEFAULT_Z_INDEX,maskClosable:!0,viewerVisibleDelay:1e4,maxZoom:5,minZoom:.1};class EZe extends lh{constructor(t){super(Object.assign({},t)),this.handleClick=s=>{const{imageID:o,preview:i}=this.getProps();if(i)if(this._adapter.getIsInGroup()){const{setCurrentIndex:a,handleVisibleChange:n}=this._adapter.getContexts();a(o),n(!0)}else this.handlePreviewVisibleChange(!0)},this.handleLoaded=s=>{const{onLoad:o}=this.getProps();o&&o(s),this.setState({loadStatus:"success"})},this.handleError=s=>{const{onError:o}=this.getProps();o&&o(s),this.setState({loadStatus:"error"})},this.handlePreviewVisibleChange=s=>{const{preview:o}=this.getProps();if(ev(o)){const{onVisibleChange:i}=o;i&&i(s),"visible"in o||this.setState({previewVisible:s})}else this.setState({previewVisible:s})}}}var LZe=function(r,t){var s={};for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&t.indexOf(o)<0&&(s[o]=r[o]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,o=Object.getOwnPropertySymbols(r);ithis.isInGroup()})}constructor(t){super(t),this.handleClick=s=>{this.foundation.handleClick(s)},this.handleLoaded=s=>{this.foundation.handleLoaded(s)},this.handleError=s=>{this.foundation.handleError(s)},this.handlePreviewVisibleChange=s=>{this.foundation.handlePreviewVisibleChange(s)},this.renderDefaultLoading=()=>{const{width:s,height:o}=this.props;return ct.createElement(BB.Image,{style:{width:s,height:o}})},this.renderDefaultError=()=>{const s=`${A1}-status`;return ct.createElement("div",{className:s},ct.createElement(CMe,{size:"extra-large"}))},this.renderLoad=()=>{const s=`${A1}-status`,{placeholder:o}=this.props;return o?ct.createElement("div",{className:s},o):this.renderDefaultLoading()},this.renderError=()=>{const{fallback:s}=this.props,o=`${A1}-status`,i=typeof s=="string"?ct.createElement("img",{style:{width:"100%",height:"100%"},src:s,alt:"fallback"}):s;return s?ct.createElement("div",{className:o},i):this.renderDefaultError()},this.renderExtra=()=>{const{loadStatus:s}=this.state;return ct.createElement("div",{className:`${A1}-overlay`},s==="error"&&this.renderError(),s==="loading"&&this.renderLoad())},this.getLocalTextByKey=s=>ct.createElement(Bm,{componentName:"Image"},o=>o[s]),this.renderMask=()=>ct.createElement("div",{className:`${A1}-mask`},ct.createElement("div",{className:`${A1}-mask-info`},ct.createElement(dfe,{size:"extra-large"}),ct.createElement("span",{className:`${A1}-mask-info-text`},this.getLocalTextByKey("preview")))),this.state={src:"",loadStatus:"loading",previewVisible:!1},this.foundation=new EZe(this.adapter),this.imgRef=ct.createRef()}static getDerivedStateFromProps(t,s){const o={};if(t.src!==s.src&&(o.src=t.src,o.loadStatus="loading"),ev(t.preview)){const{visible:i}=t.preview;wV(i)&&(o.previewVisible=i)}return o}isInGroup(){return!!(this.context&&this.context.isGroup)}isLazyLoad(){return this.context?this.context.lazyLoad:!1}render(){var t;const{src:s,loadStatus:o,previewVisible:i}=this.state,a=this.props,{src:n,width:u,height:f,alt:e,style:y,className:_,crossOrigin:T,preview:D,fallback:ce,placeholder:ge,imageID:Ee,setDownloadName:_e}=a,Be=LZe(a,["src","width","height","alt","style","className","crossOrigin","preview","fallback","placeholder","imageID","setDownloadName"]),He=Object.assign({width:u,height:f},y),at=ds(A1,_),st=o==="success"&&D&&!this.isInGroup(),vt=D&&o==="success",Ot=ev(D)&&(t=D.src)!==null&&t!==void 0?t:s,Kt=ev(D)&&st?Object.assign(Object.assign({},ig(D,["className","style","previewCls","previewStyle"])),{className:D==null?void 0:D.previewCls,style:D==null?void 0:D.previewStyle}):{};return ct.createElement("div",{style:He,className:at,onClick:this.handleClick},ct.createElement("img",Object.assign({ref:this.imgRef},Be,{src:this.isInGroup()&&this.isLazyLoad()?void 0:s,"data-src":s,alt:e,className:ds(`${A1}-img`,{[`${A1}-img-preview`]:vt,[`${A1}-img-error`]:o==="error"}),width:u,height:f,crossOrigin:T,onError:this.handleError,onLoad:this.handleLoaded})),o!=="success"&&this.renderExtra(),st&&ct.createElement(UF,Object.assign({},Kt,{src:Ot,visible:i,onVisibleChange:this.handlePreviewVisibleChange,crossOrigin:wm(T)?Kt==null?void 0:Kt.crossOrigin:T,setDownloadName:_e})))}};V4.isSemiImage=!0;V4.contextType=BG;V4.propTypes={style:be.object,className:be.string,src:be.string,width:be.oneOfType([be.string,be.number]),height:be.oneOfType([be.string,be.number]),alt:be.string,placeholder:be.node,fallback:be.oneOfType([be.string,be.node]),preview:be.oneOfType([be.bool,be.object]),onLoad:be.func,onError:be.func,onClick:be.func,crossOrigin:be.string,imageID:be.number};V4.defaultProps={preview:!0};var SZe="@vercel/analytics",xZe="1.2.2",_Ze=()=>{window.va||(window.va=function(...t){(window.vaq=window.vaq||[]).push(t)})};function Xhe(){return typeof window<"u"}function Zhe(){try{const r="production"}catch{}return"production"}function TZe(r="auto"){if(r==="auto"){window.vam=Zhe();return}window.vam=r}function NZe(){return(Xhe()?window.vam:Zhe())||"production"}function fU(){return NZe()==="development"}var IZe="https://va.vercel-scripts.com/v1/script.debug.js",OZe="./_vercel/insights/script.js";function RZe(r={debug:!0}){var t;if(!Xhe())return;TZe(r.mode),_Ze(),r.beforeSend&&((t=window.va)==null||t.call(window,"beforeSend",r.beforeSend));const s=r.scriptSrc||(fU()?IZe:OZe);if(document.head.querySelector(`script[src*="${s}"]`))return;const o=document.createElement("script");o.src=s,o.defer=!0,o.dataset.sdkn=SZe+(r.framework?`/${r.framework}`:""),o.dataset.sdkv=xZe,r.disableAutoTrack&&(o.dataset.disableAutoTrack="1"),r.endpoint&&(o.dataset.endpoint=r.endpoint),r.dsn&&(o.dataset.dsn=r.dsn),o.onerror=()=>{const i=fU()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log(`[Vercel Web Analytics] Failed to load script from ${s}. ${i}`)},fU()&&r.debug===!1&&(o.dataset.debug="false"),document.head.appendChild(o)}function BZe({route:r,path:t}){var s;(s=window.va)==null||s.call(window,"pageview",{route:r,path:t})}function kZe(r){return Vt.useEffect(()=>{RZe({framework:r.framework||"react",...r.route!==void 0&&{disableAutoTrack:!0},...r})},[]),Vt.useEffect(()=>{r.route&&r.path&&BZe({route:r.route,path:r.path})},[r.route,r.path]),null}/** + * @remix-run/router v1.14.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 vO(){return vO=Object.assign?Object.assign.bind():function(r){for(var t=1;t"u")throw new Error(t)}function DG(r,t){if(!r){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function DZe(){return Math.random().toString(36).substr(2,8)}function xee(r,t){return{usr:r.state,key:r.key,idx:t}}function Y9(r,t,s,o){return s===void 0&&(s=null),vO({pathname:typeof r=="string"?r:r.pathname,search:"",hash:""},typeof t=="string"?fN(t):t,{state:s,key:t&&t.key||o||DZe()})}function SP(r){let{pathname:t="/",search:s="",hash:o=""}=r;return s&&s!=="?"&&(t+=s.charAt(0)==="?"?s:"?"+s),o&&o!=="#"&&(t+=o.charAt(0)==="#"?o:"#"+o),t}function fN(r){let t={};if(r){let s=r.indexOf("#");s>=0&&(t.hash=r.substr(s),r=r.substr(0,s));let o=r.indexOf("?");o>=0&&(t.search=r.substr(o),r=r.substr(0,o)),r&&(t.pathname=r)}return t}function FZe(r,t,s,o){o===void 0&&(o={});let{window:i=document.defaultView,v5Compat:a=!1}=o,n=i.history,u=HE.Pop,f=null,e=y();e==null&&(e=0,n.replaceState(vO({},n.state,{idx:e}),""));function y(){return(n.state||{idx:null}).idx}function _(){u=HE.Pop;let Ee=y(),_e=Ee==null?null:Ee-e;e=Ee,f&&f({action:u,location:ge.location,delta:_e})}function T(Ee,_e){u=HE.Push;let Be=Y9(ge.location,Ee,_e);s&&s(Be,Ee),e=y()+1;let He=xee(Be,e),at=ge.createHref(Be);try{n.pushState(He,"",at)}catch(st){if(st instanceof DOMException&&st.name==="DataCloneError")throw st;i.location.assign(at)}a&&f&&f({action:u,location:ge.location,delta:1})}function D(Ee,_e){u=HE.Replace;let Be=Y9(ge.location,Ee,_e);s&&s(Be,Ee),e=y();let He=xee(Be,e),at=ge.createHref(Be);n.replaceState(He,"",at),a&&f&&f({action:u,location:ge.location,delta:0})}function ce(Ee){let _e=i.location.origin!=="null"?i.location.origin:i.location.href,Be=typeof Ee=="string"?Ee:SP(Ee);return bg(_e,"No window.location.(origin|href) available to create URL for href: "+Be),new URL(Be,_e)}let ge={get action(){return u},get location(){return r(i,n)},listen(Ee){if(f)throw new Error("A history only accepts one active listener");return i.addEventListener(See,_),f=Ee,()=>{i.removeEventListener(See,_),f=null}},createHref(Ee){return t(i,Ee)},createURL:ce,encodeLocation(Ee){let _e=ce(Ee);return{pathname:_e.pathname,search:_e.search,hash:_e.hash}},push:T,replace:D,go(Ee){return n.go(Ee)}};return ge}var _ee;(function(r){r.data="data",r.deferred="deferred",r.redirect="redirect",r.error="error"})(_ee||(_ee={}));function MZe(r,t,s){s===void 0&&(s="/");let o=typeof t=="string"?fN(t):t,i=FG(o.pathname||"/",s);if(i==null)return null;let a=Jhe(r);UZe(a);let n=null;for(let u=0;n==null&&u{let f={relativePath:u===void 0?a.path||"":u,caseSensitive:a.caseSensitive===!0,childrenIndex:n,route:a};f.relativePath.startsWith("/")&&(bg(f.relativePath.startsWith(o),'Absolute route path "'+f.relativePath+'" nested under path '+('"'+o+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),f.relativePath=f.relativePath.slice(o.length));let e=pL([o,f.relativePath]),y=s.concat(f);a.children&&a.children.length>0&&(bg(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+e+'".')),Jhe(a.children,t,y,e)),!(a.path==null&&!a.index)&&t.push({path:e,score:VZe(e,a.index),routesMeta:y})};return r.forEach((a,n)=>{var u;if(a.path===""||!((u=a.path)!=null&&u.includes("?")))i(a,n);else for(let f of eAe(a.path))i(a,n,f)}),t}function eAe(r){let t=r.split("/");if(t.length===0)return[];let[s,...o]=t,i=s.endsWith("?"),a=s.replace(/\?$/,"");if(o.length===0)return i?[a,""]:[a];let n=eAe(o.join("/")),u=[];return u.push(...n.map(f=>f===""?a:[a,f].join("/"))),i&&u.push(...n),u.map(f=>r.startsWith("/")&&f===""?"/":f)}function UZe(r){r.sort((t,s)=>t.score!==s.score?s.score-t.score:GZe(t.routesMeta.map(o=>o.childrenIndex),s.routesMeta.map(o=>o.childrenIndex)))}const $Ze=/^:\w+$/,jZe=3,HZe=2,QZe=1,KZe=10,zZe=-2,Tee=r=>r==="*";function VZe(r,t){let s=r.split("/"),o=s.length;return s.some(Tee)&&(o+=zZe),t&&(o+=HZe),s.filter(i=>!Tee(i)).reduce((i,a)=>i+($Ze.test(a)?jZe:a===""?QZe:KZe),o)}function GZe(r,t){return r.length===t.length&&r.slice(0,-1).every((o,i)=>o===t[i])?r[r.length-1]-t[t.length-1]:0}function WZe(r,t){let{routesMeta:s}=r,o={},i="/",a=[];for(let n=0;n{let{paramName:T,isOptional:D}=y;if(T==="*"){let ge=u[_]||"";n=a.slice(0,a.length-ge.length).replace(/(.)\/+$/,"$1")}const ce=u[_];return D&&!ce?e[T]=void 0:e[T]=ZZe(ce||"",T),e},{}),pathname:a,pathnameBase:n,pattern:r}}function YZe(r,t,s){t===void 0&&(t=!1),s===void 0&&(s=!0),DG(r==="*"||!r.endsWith("*")||r.endsWith("/*"),'Route path "'+r+'" will be treated as if it were '+('"'+r.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+r.replace(/\*$/,"/*")+'".'));let o=[],i="^"+r.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:(\w+)(\?)?/g,(n,u,f)=>(o.push({paramName:u,isOptional:f!=null}),f?"/?([^\\/]+)?":"/([^\\/]+)"));return r.endsWith("*")?(o.push({paramName:"*"}),i+=r==="*"||r==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?i+="\\/*$":r!==""&&r!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),o]}function XZe(r){try{return decodeURI(r)}catch(t){return DG(!1,'The URL path "'+r+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),r}}function ZZe(r,t){try{return decodeURIComponent(r)}catch(s){return DG(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+r+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+s+").")),r}}function FG(r,t){if(t==="/")return r;if(!r.toLowerCase().startsWith(t.toLowerCase()))return null;let s=t.endsWith("/")?t.length-1:t.length,o=r.charAt(s);return o&&o!=="/"?null:r.slice(s)||"/"}function JZe(r,t){t===void 0&&(t="/");let{pathname:s,search:o="",hash:i=""}=typeof r=="string"?fN(r):r;return{pathname:s?s.startsWith("/")?s:eJe(s,t):t,search:rJe(o),hash:sJe(i)}}function eJe(r,t){let s=t.replace(/\/+$/,"").split("/");return r.split("/").forEach(i=>{i===".."?s.length>1&&s.pop():i!=="."&&s.push(i)}),s.length>1?s.join("/"):"/"}function dU(r,t,s,o){return"Cannot include a '"+r+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(o)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function tJe(r){return r.filter((t,s)=>s===0||t.route.path&&t.route.path.length>0)}function tAe(r,t){let s=tJe(r);return t?s.map((o,i)=>i===r.length-1?o.pathname:o.pathnameBase):s.map(o=>o.pathnameBase)}function nAe(r,t,s,o){o===void 0&&(o=!1);let i;typeof r=="string"?i=fN(r):(i=vO({},r),bg(!i.pathname||!i.pathname.includes("?"),dU("?","pathname","search",i)),bg(!i.pathname||!i.pathname.includes("#"),dU("#","pathname","hash",i)),bg(!i.search||!i.search.includes("#"),dU("#","search","hash",i)));let a=r===""||i.pathname==="",n=a?"/":i.pathname,u;if(n==null)u=s;else if(o){let _=t.length===0?[]:t[t.length-1].replace(/^\//,"").split("/");if(n.startsWith("..")){let T=n.split("/");for(;T[0]==="..";)T.shift(),_.pop();i.pathname=T.join("/")}u="/"+_.join("/")}else{let _=t.length-1;if(n.startsWith("..")){let T=n.split("/");for(;T[0]==="..";)T.shift(),_-=1;i.pathname=T.join("/")}u=_>=0?t[_]:"/"}let f=JZe(i,u),e=n&&n!=="/"&&n.endsWith("/"),y=(a||n===".")&&s.endsWith("/");return!f.pathname.endsWith("/")&&(e||y)&&(f.pathname+="/"),f}const pL=r=>r.join("/").replace(/\/\/+/g,"/"),nJe=r=>r.replace(/\/+$/,"").replace(/^\/*/,"/"),rJe=r=>!r||r==="?"?"":r.startsWith("?")?r:"?"+r,sJe=r=>!r||r==="#"?"":r.startsWith("#")?r:"#"+r;function oJe(r){return r!=null&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.internal=="boolean"&&"data"in r}const rAe=["post","put","patch","delete"];new Set(rAe);const iJe=["get",...rAe];new Set(iJe);/** + * React Router v6.21.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 yO(){return yO=Object.assign?Object.assign.bind():function(r){for(var t=1;t{u.current=!0}),Vt.useCallback(function(e,y){if(y===void 0&&(y={}),!u.current)return;if(typeof e=="number"){o.go(e);return}let _=nAe(e,JSON.parse(n),a,y.relative==="path");r==null&&t!=="/"&&(_.pathname=_.pathname==="/"?t:pL([t,_.pathname])),(y.replace?o.replace:o.push)(_,y.state,y)},[t,o,n,a,r])}function aAe(r,t){let{relative:s}=t===void 0?{}:t,{future:o}=Vt.useContext(US),{matches:i}=Vt.useContext($S),{pathname:a}=W4(),n=JSON.stringify(tAe(i,o.v7_relativeSplatPath));return Vt.useMemo(()=>nAe(r,JSON.parse(n),a,s==="path"),[r,n,a,s])}function cJe(r,t){return fJe(r,t)}function fJe(r,t,s,o){G4()||bg(!1);let{navigator:i}=Vt.useContext(US),{matches:a}=Vt.useContext($S),n=a[a.length-1],u=n?n.params:{};n&&n.pathname;let f=n?n.pathnameBase:"/";n&&n.route;let e=W4(),y;if(t){var _;let Ee=typeof t=="string"?fN(t):t;f==="/"||(_=Ee.pathname)!=null&&_.startsWith(f)||bg(!1),y=Ee}else y=e;let T=y.pathname||"/",D=f==="/"?T:T.slice(f.length)||"/",ce=MZe(r,{pathname:D}),ge=mJe(ce&&ce.map(Ee=>Object.assign({},Ee,{params:Object.assign({},u,Ee.params),pathname:pL([f,i.encodeLocation?i.encodeLocation(Ee.pathname).pathname:Ee.pathname]),pathnameBase:Ee.pathnameBase==="/"?f:pL([f,i.encodeLocation?i.encodeLocation(Ee.pathnameBase).pathname:Ee.pathnameBase])})),a,s,o);return t&&ge?Vt.createElement($F.Provider,{value:{location:yO({pathname:"/",search:"",hash:"",state:null,key:"default"},y),navigationType:HE.Pop}},ge):ge}function dJe(){let r=yJe(),t=oJe(r)?r.status+" "+r.statusText:r instanceof Error?r.message:JSON.stringify(r),s=r instanceof Error?r.stack:null,i={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},a=null;return Vt.createElement(Vt.Fragment,null,Vt.createElement("h2",null,"Unexpected Application Error!"),Vt.createElement("h3",{style:{fontStyle:"italic"}},t),s?Vt.createElement("pre",{style:i},s):null,a)}const hJe=Vt.createElement(dJe,null);class AJe extends Vt.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,s){return s.location!==t.location||s.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:s.error,location:s.location,revalidation:t.revalidation||s.revalidation}}componentDidCatch(t,s){console.error("React Router caught the following error during render",t,s)}render(){return this.state.error!==void 0?Vt.createElement($S.Provider,{value:this.props.routeContext},Vt.createElement(sAe.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function pJe(r){let{routeContext:t,match:s,children:o}=r,i=Vt.useContext(MG);return i&&i.static&&i.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=s.route.id),Vt.createElement($S.Provider,{value:t},o)}function mJe(r,t,s,o){var i;if(t===void 0&&(t=[]),s===void 0&&(s=null),o===void 0&&(o=null),r==null){var a;if((a=s)!=null&&a.errors)r=s.matches;else return null}let n=r,u=(i=s)==null?void 0:i.errors;if(u!=null){let y=n.findIndex(_=>_.route.id&&(u==null?void 0:u[_.route.id]));y>=0||bg(!1),n=n.slice(0,Math.min(n.length,y+1))}let f=!1,e=-1;if(s&&o&&o.v7_partialHydration)for(let y=0;y=0?n=n.slice(0,e+1):n=[n[0]];break}}return n.reduceRight((y,_,T)=>{let D,ce=!1,ge=null,Ee=null;s&&(D=u&&_.route.id?u[_.route.id]:void 0,ge=_.route.errorElement||hJe,f&&(e<0&&T===0?(CJe("route-fallback",!1),ce=!0,Ee=null):e===T&&(ce=!0,Ee=_.route.hydrateFallbackElement||null)));let _e=t.concat(n.slice(0,T+1)),Be=()=>{let He;return D?He=ge:ce?He=Ee:_.route.Component?He=Vt.createElement(_.route.Component,null):_.route.element?He=_.route.element:He=y,Vt.createElement(pJe,{match:_,routeContext:{outlet:y,matches:_e,isDataRoute:s!=null},children:He})};return s&&(_.route.ErrorBoundary||_.route.errorElement||T===0)?Vt.createElement(AJe,{location:s.location,revalidation:s.revalidation,component:ge,error:D,children:Be(),routeContext:{outlet:null,matches:_e,isDataRoute:!0}}):Be()},null)}var lAe=function(r){return r.UseBlocker="useBlocker",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r}(lAe||{}),xP=function(r){return r.UseBlocker="useBlocker",r.UseLoaderData="useLoaderData",r.UseActionData="useActionData",r.UseRouteError="useRouteError",r.UseNavigation="useNavigation",r.UseRouteLoaderData="useRouteLoaderData",r.UseMatches="useMatches",r.UseRevalidator="useRevalidator",r.UseNavigateStable="useNavigate",r.UseRouteId="useRouteId",r}(xP||{});function gJe(r){let t=Vt.useContext(MG);return t||bg(!1),t}function bJe(r){let t=Vt.useContext(aJe);return t||bg(!1),t}function vJe(r){let t=Vt.useContext($S);return t||bg(!1),t}function uAe(r){let t=vJe(),s=t.matches[t.matches.length-1];return s.route.id||bg(!1),s.route.id}function yJe(){var r;let t=Vt.useContext(sAe),s=bJe(xP.UseRouteError),o=uAe(xP.UseRouteError);return t!==void 0?t:(r=s.errors)==null?void 0:r[o]}function wJe(){let{router:r}=gJe(lAe.UseNavigateStable),t=uAe(xP.UseNavigateStable),s=Vt.useRef(!1);return oAe(()=>{s.current=!0}),Vt.useCallback(function(i,a){a===void 0&&(a={}),s.current&&(typeof i=="number"?r.navigate(i):r.navigate(i,yO({fromRouteId:t},a)))},[r,t])}const Nee={};function CJe(r,t,s){!t&&!Nee[r]&&(Nee[r]=!0)}function fE(r){bg(!1)}function EJe(r){let{basename:t="/",children:s=null,location:o,navigationType:i=HE.Pop,navigator:a,static:n=!1,future:u}=r;G4()&&bg(!1);let f=t.replace(/^\/*/,"/"),e=Vt.useMemo(()=>({basename:f,navigator:a,static:n,future:yO({v7_relativeSplatPath:!1},u)}),[f,u,a,n]);typeof o=="string"&&(o=fN(o));let{pathname:y="/",search:_="",hash:T="",state:D=null,key:ce="default"}=o,ge=Vt.useMemo(()=>{let Ee=FG(y,f);return Ee==null?null:{location:{pathname:Ee,search:_,hash:T,state:D,key:ce},navigationType:i}},[f,y,_,T,D,ce,i]);return ge==null?null:Vt.createElement(US.Provider,{value:e},Vt.createElement($F.Provider,{children:s,value:ge}))}function LJe(r){let{children:t,location:s}=r;return cJe(X9(t),s)}new Promise(()=>{});function X9(r,t){t===void 0&&(t=[]);let s=[];return Vt.Children.forEach(r,(o,i)=>{if(!Vt.isValidElement(o))return;let a=[...t,i];if(o.type===Vt.Fragment){s.push.apply(s,X9(o.props.children,a));return}o.type!==fE&&bg(!1),!o.props.index||!o.props.children||bg(!1);let n={id:o.props.id||a.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,loader:o.props.loader,action:o.props.action,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(n.children=X9(o.props.children,a)),s.push(n)}),s}/** + * React Router DOM v6.21.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 Z9(){return Z9=Object.assign?Object.assign.bind():function(r){for(var t=1;t=0)&&(s[i]=r[i]);return s}function xJe(r){return!!(r.metaKey||r.altKey||r.ctrlKey||r.shiftKey)}function _Je(r,t){return r.button===0&&(!t||t==="_self")&&!xJe(r)}const TJe=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],NJe="startTransition",Iee=HEe[NJe];function IJe(r){let{basename:t,children:s,future:o,window:i}=r,a=Vt.useRef();a.current==null&&(a.current=PZe({window:i,v5Compat:!0}));let n=a.current,[u,f]=Vt.useState({action:n.action,location:n.location}),{v7_startTransition:e}=o||{},y=Vt.useCallback(_=>{e&&Iee?Iee(()=>f(_)):f(_)},[f,e]);return Vt.useLayoutEffect(()=>n.listen(y),[n,y]),Vt.createElement(EJe,{basename:t,children:s,location:u.location,navigationType:u.action,navigator:n,future:o})}const OJe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",RJe=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ib=Vt.forwardRef(function(t,s){let{onClick:o,relative:i,reloadDocument:a,replace:n,state:u,target:f,to:e,preventScrollReset:y,unstable_viewTransition:_}=t,T=SJe(t,TJe),{basename:D}=Vt.useContext(US),ce,ge=!1;if(typeof e=="string"&&RJe.test(e)&&(ce=e,OJe))try{let He=new URL(window.location.href),at=e.startsWith("//")?new URL(He.protocol+e):new URL(e),st=FG(at.pathname,D);at.origin===He.origin&&st!=null?e=st+at.search+at.hash:ge=!0}catch{}let Ee=lJe(e,{relative:i}),_e=BJe(e,{replace:n,state:u,target:f,preventScrollReset:y,relative:i,unstable_viewTransition:_});function Be(He){o&&o(He),He.defaultPrevented||_e(He)}return Vt.createElement("a",Z9({},T,{href:ce||Ee,onClick:ge||a?o:Be,ref:s,target:f}))});var Oee;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(Oee||(Oee={}));var Ree;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(Ree||(Ree={}));function BJe(r,t){let{target:s,replace:o,state:i,preventScrollReset:a,relative:n,unstable_viewTransition:u}=t===void 0?{}:t,f=iAe(),e=W4(),y=aAe(r,{relative:n});return Vt.useCallback(_=>{if(_Je(_,s)){_.preventDefault();let T=o!==void 0?o:SP(e)===SP(y);f(r,{replace:T,state:i,preventScrollReset:a,relative:n,unstable_viewTransition:u})}},[e,f,y,o,i,s,r,a,n,u])}const cAe=Vt.createContext(null);function kJe({children:r}){const[t,s]=Vt.useState({header:!0,sidebar:!0,issues:!0,toolbar:!0});return Ye.jsx(cAe.Provider,{value:{layout:t,setLayout:s},children:r})}const fAe=Vt.createContext(null);function PJe({children:r}){const[t,s]=Vt.useState({zoom:1,pan:{x:0,y:0}}),o=Vt.useCallback(i=>{const a=(u,f,e)=>Math.max(f,Math.min(e,u)),n=(...u)=>u.find(f=>typeof f=="number"&&!isNaN(f));s(u=>{var f,e,y,_;return typeof i=="function"&&(i=i(u)),{zoom:a(n(i.zoom,u.zoom,1),.02,5),pan:{x:n((f=i.pan)==null?void 0:f.x,(e=u.pan)==null?void 0:e.x,0),y:n((y=i.pan)==null?void 0:y.y,(_=u.pan)==null?void 0:_.y,0)}}})},[s]);return Ye.jsx(fAe.Provider,{value:{transform:t,setTransform:o},children:r})}const DJe={type:"logger",log(r){this.output("log",r)},warn(r){this.output("warn",r)},error(r){this.output("error",r)},output(r,t){console&&console[r]&&console[r].apply(console,t)}};let FJe=class J9{constructor(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.init(t,s)}init(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=s.prefix||"i18next:",this.logger=t||DJe,this.options=s,this.debug=s.debug}log(){for(var t=arguments.length,s=new Array(t),o=0;o{this.observers[o]||(this.observers[o]=new Map);const i=this.observers[o].get(s)||0;this.observers[o].set(s,i+1)}),this}off(t,s){if(this.observers[t]){if(!s){delete this.observers[t];return}this.observers[t].delete(s)}}emit(t){for(var s=arguments.length,o=new Array(s>1?s-1:0),i=1;i{let[u,f]=n;for(let e=0;e{let[u,f]=n;for(let e=0;e{r=o,t=i});return s.resolve=r,s.reject=t,s}function Bee(r){return r==null?"":""+r}function MJe(r,t,s){r.forEach(o=>{t[o]&&(s[o]=t[o])})}const UJe=/###/g;function l5(r,t,s){function o(u){return u&&u.indexOf("###")>-1?u.replace(UJe,"."):u}function i(){return!r||typeof r=="string"}const a=typeof t!="string"?t:t.split(".");let n=0;for(;n":">",'"':""","'":"'","/":"/"};function QJe(r){return typeof r=="string"?r.replace(/[&<>"'\/]/g,t=>HJe[t]):r}class KJe{constructor(t){this.capacity=t,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(t){const s=this.regExpMap.get(t);if(s!==void 0)return s;const o=new RegExp(t);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(t,o),this.regExpQueue.push(t),o}}const zJe=[" ",",","?","!",";"],VJe=new KJe(20);function GJe(r,t,s){t=t||"",s=s||"";const o=zJe.filter(n=>t.indexOf(n)<0&&s.indexOf(n)<0);if(o.length===0)return!0;const i=VJe.getRegExp(`(${o.map(n=>n==="?"?"\\?":n).join("|")})`);let a=!i.test(r);if(!a){const n=r.indexOf(s);n>0&&!i.test(r.substring(0,n))&&(a=!0)}return a}function ej(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(!r)return;if(r[t])return r[t];const o=t.split(s);let i=r;for(let a=0;a-1&&f0?r.replace("_","-"):r}class Pee extends jF{constructor(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};super(),this.data=t||{},this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(t){this.options.ns.indexOf(t)<0&&this.options.ns.push(t)}removeNamespaces(t){const s=this.options.ns.indexOf(t);s>-1&&this.options.ns.splice(s,1)}getResource(t,s,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};const a=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,n=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let u;t.indexOf(".")>-1?u=t.split("."):(u=[t,s],o&&(Array.isArray(o)?u.push(...o):typeof o=="string"&&a?u.push(...o.split(a)):u.push(o)));const f=_P(this.data,u);return!f&&!s&&!o&&t.indexOf(".")>-1&&(t=u[0],s=u[1],o=u.slice(2).join(".")),f||!n||typeof o!="string"?f:ej(this.data&&this.data[t]&&this.data[t][s],o,a)}addResource(t,s,o,i){let a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1};const n=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator;let u=[t,s];o&&(u=u.concat(n?o.split(n):o)),t.indexOf(".")>-1&&(u=t.split("."),i=s,s=u[1]),this.addNamespaces(s),kee(this.data,u,i),a.silent||this.emit("added",t,s,o,i)}addResources(t,s,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(const a in o)(typeof o[a]=="string"||Object.prototype.toString.apply(o[a])==="[object Array]")&&this.addResource(t,s,a,o[a],{silent:!0});i.silent||this.emit("added",t,s,o)}addResourceBundle(t,s,o,i,a){let n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1,skipCopy:!1},u=[t,s];t.indexOf(".")>-1&&(u=t.split("."),i=o,o=s,s=u[1]),this.addNamespaces(s);let f=_P(this.data,u)||{};n.skipCopy||(o=JSON.parse(JSON.stringify(o))),i?dAe(f,o,a):f={...f,...o},kee(this.data,u,f),n.silent||this.emit("added",t,s,o)}removeResourceBundle(t,s){this.hasResourceBundle(t,s)&&delete this.data[t][s],this.removeNamespaces(s),this.emit("removed",t,s)}hasResourceBundle(t,s){return this.getResource(t,s)!==void 0}getResourceBundle(t,s){return s||(s=this.options.defaultNS),this.options.compatibilityAPI==="v1"?{...this.getResource(t,s)}:this.getResource(t,s)}getDataByLanguage(t){return this.data[t]}hasLanguageSomeTranslations(t){const s=this.getDataByLanguage(t);return!!(s&&Object.keys(s)||[]).find(i=>s[i]&&Object.keys(s[i]).length>0)}toJSON(){return this.data}}var hAe={processors:{},addPostProcessor(r){this.processors[r.name]=r},handle(r,t,s,o,i){return r.forEach(a=>{this.processors[a]&&(t=this.processors[a].process(t,s,o,i))}),t}};const Dee={};class NP extends jF{constructor(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(),MJe(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],t,this),this.options=s,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=dw.create("translator")}changeLanguage(t){t&&(this.language=t)}exists(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(t==null)return!1;const o=this.resolve(t,s);return o&&o.res!==void 0}extractFromKey(t,s){let o=s.nsSeparator!==void 0?s.nsSeparator:this.options.nsSeparator;o===void 0&&(o=":");const i=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator;let a=s.ns||this.options.defaultNS||[];const n=o&&t.indexOf(o)>-1,u=!this.options.userDefinedKeySeparator&&!s.keySeparator&&!this.options.userDefinedNsSeparator&&!s.nsSeparator&&!GJe(t,o,i);if(n&&!u){const f=t.match(this.interpolator.nestingRegexp);if(f&&f.length>0)return{key:t,namespaces:a};const e=t.split(o);(o!==i||o===i&&this.options.ns.indexOf(e[0])>-1)&&(a=e.shift()),t=e.join(i)}return typeof a=="string"&&(a=[a]),{key:t,namespaces:a}}translate(t,s,o){if(typeof s!="object"&&this.options.overloadTranslationOptionHandler&&(s=this.options.overloadTranslationOptionHandler(arguments)),typeof s=="object"&&(s={...s}),s||(s={}),t==null)return"";Array.isArray(t)||(t=[String(t)]);const i=s.returnDetails!==void 0?s.returnDetails:this.options.returnDetails,a=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,{key:n,namespaces:u}=this.extractFromKey(t[t.length-1],s),f=u[u.length-1],e=s.lng||this.language,y=s.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(e&&e.toLowerCase()==="cimode"){if(y){const at=s.nsSeparator||this.options.nsSeparator;return i?{res:`${f}${at}${n}`,usedKey:n,exactUsedKey:n,usedLng:e,usedNS:f,usedParams:this.getUsedParamsDetails(s)}:`${f}${at}${n}`}return i?{res:n,usedKey:n,exactUsedKey:n,usedLng:e,usedNS:f,usedParams:this.getUsedParamsDetails(s)}:n}const _=this.resolve(t,s);let T=_&&_.res;const D=_&&_.usedKey||n,ce=_&&_.exactUsedKey||n,ge=Object.prototype.toString.apply(T),Ee=["[object Number]","[object Function]","[object RegExp]"],_e=s.joinArrays!==void 0?s.joinArrays:this.options.joinArrays,Be=!this.i18nFormat||this.i18nFormat.handleAsObject;if(Be&&T&&(typeof T!="string"&&typeof T!="boolean"&&typeof T!="number")&&Ee.indexOf(ge)<0&&!(typeof _e=="string"&&ge==="[object Array]")){if(!s.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const at=this.options.returnedObjectHandler?this.options.returnedObjectHandler(D,T,{...s,ns:u}):`key '${n} (${this.language})' returned an object instead of string.`;return i?(_.res=at,_.usedParams=this.getUsedParamsDetails(s),_):at}if(a){const at=ge==="[object Array]",st=at?[]:{},vt=at?ce:D;for(const Ot in T)if(Object.prototype.hasOwnProperty.call(T,Ot)){const Kt=`${vt}${a}${Ot}`;st[Ot]=this.translate(Kt,{...s,joinArrays:!1,ns:u}),st[Ot]===Kt&&(st[Ot]=T[Ot])}T=st}}else if(Be&&typeof _e=="string"&&ge==="[object Array]")T=T.join(_e),T&&(T=this.extendTranslation(T,t,s,o));else{let at=!1,st=!1;const vt=s.count!==void 0&&typeof s.count!="string",Ot=NP.hasDefaultValue(s),Kt=vt?this.pluralResolver.getSuffix(e,s.count,s):"",sn=s.ordinal&&vt?this.pluralResolver.getSuffix(e,s.count,{ordinal:!1}):"",Bn=vt&&!s.ordinal&&s.count===0&&this.pluralResolver.shouldUseIntlApi(),fn=Bn&&s[`defaultValue${this.options.pluralSeparator}zero`]||s[`defaultValue${Kt}`]||s[`defaultValue${sn}`]||s.defaultValue;!this.isValidLookup(T)&&Ot&&(at=!0,T=fn),this.isValidLookup(T)||(st=!0,T=n);const $n=(s.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&st?void 0:T,_n=Ot&&fn!==T&&this.options.updateMissing;if(st||at||_n){if(this.logger.log(_n?"updateKey":"missingKey",e,f,n,_n?fn:T),a){const fr=this.resolve(n,{...s,keySeparator:!1});fr&&fr.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let Nr=[];const Cr=this.languageUtils.getFallbackCodes(this.options.fallbackLng,s.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Cr&&Cr[0])for(let fr=0;fr{const ss=Ot&&br!==T?br:$n;this.options.missingKeyHandler?this.options.missingKeyHandler(fr,f,_r,ss,_n,s):this.backendConnector&&this.backendConnector.saveMissing&&this.backendConnector.saveMissing(fr,f,_r,ss,_n,s),this.emit("missingKey",fr,f,_r,T)};this.options.saveMissing&&(this.options.saveMissingPlurals&&vt?Nr.forEach(fr=>{const _r=this.pluralResolver.getSuffixes(fr,s);Bn&&s[`defaultValue${this.options.pluralSeparator}zero`]&&_r.indexOf(`${this.options.pluralSeparator}zero`)<0&&_r.push(`${this.options.pluralSeparator}zero`),_r.forEach(br=>{Dr([fr],n+br,s[`defaultValue${br}`]||fn)})}):Dr(Nr,n,fn))}T=this.extendTranslation(T,t,s,_,o),st&&T===n&&this.options.appendNamespaceToMissingKey&&(T=`${f}:${n}`),(st||at)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?T=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${f}:${n}`:n,at?T:void 0):T=this.options.parseMissingKeyHandler(T))}return i?(_.res=T,_.usedParams=this.getUsedParamsDetails(s),_):T}extendTranslation(t,s,o,i,a){var n=this;if(this.i18nFormat&&this.i18nFormat.parse)t=this.i18nFormat.parse(t,{...this.options.interpolation.defaultVariables,...o},o.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!o.skipInterpolation){o.interpolation&&this.interpolator.init({...o,interpolation:{...this.options.interpolation,...o.interpolation}});const e=typeof t=="string"&&(o&&o.interpolation&&o.interpolation.skipOnVariables!==void 0?o.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(e){const T=t.match(this.interpolator.nestingRegexp);y=T&&T.length}let _=o.replace&&typeof o.replace!="string"?o.replace:o;if(this.options.interpolation.defaultVariables&&(_={...this.options.interpolation.defaultVariables,..._}),t=this.interpolator.interpolate(t,_,o.lng||this.language,o),e){const T=t.match(this.interpolator.nestingRegexp),D=T&&T.length;y1&&arguments[1]!==void 0?arguments[1]:{},o,i,a,n,u;return typeof t=="string"&&(t=[t]),t.forEach(f=>{if(this.isValidLookup(o))return;const e=this.extractFromKey(f,s),y=e.key;i=y;let _=e.namespaces;this.options.fallbackNS&&(_=_.concat(this.options.fallbackNS));const T=s.count!==void 0&&typeof s.count!="string",D=T&&!s.ordinal&&s.count===0&&this.pluralResolver.shouldUseIntlApi(),ce=s.context!==void 0&&(typeof s.context=="string"||typeof s.context=="number")&&s.context!=="",ge=s.lngs?s.lngs:this.languageUtils.toResolveHierarchy(s.lng||this.language,s.fallbackLng);_.forEach(Ee=>{this.isValidLookup(o)||(u=Ee,!Dee[`${ge[0]}-${Ee}`]&&this.utils&&this.utils.hasLoadedNamespace&&!this.utils.hasLoadedNamespace(u)&&(Dee[`${ge[0]}-${Ee}`]=!0,this.logger.warn(`key "${i}" for languages "${ge.join(", ")}" won't get resolved as namespace "${u}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),ge.forEach(_e=>{if(this.isValidLookup(o))return;n=_e;const Be=[y];if(this.i18nFormat&&this.i18nFormat.addLookupKeys)this.i18nFormat.addLookupKeys(Be,y,_e,Ee,s);else{let at;T&&(at=this.pluralResolver.getSuffix(_e,s.count,s));const st=`${this.options.pluralSeparator}zero`,vt=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(T&&(Be.push(y+at),s.ordinal&&at.indexOf(vt)===0&&Be.push(y+at.replace(vt,this.options.pluralSeparator)),D&&Be.push(y+st)),ce){const Ot=`${y}${this.options.contextSeparator}${s.context}`;Be.push(Ot),T&&(Be.push(Ot+at),s.ordinal&&at.indexOf(vt)===0&&Be.push(Ot+at.replace(vt,this.options.pluralSeparator)),D&&Be.push(Ot+st))}}let He;for(;He=Be.pop();)this.isValidLookup(o)||(a=He,o=this.getResource(_e,Ee,He,s))}))})}),{res:o,usedKey:i,exactUsedKey:a,usedLng:n,usedNS:u}}isValidLookup(t){return t!==void 0&&!(!this.options.returnNull&&t===null)&&!(!this.options.returnEmptyString&&t==="")}getResource(t,s,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(t,s,o,i):this.resourceStore.getResource(t,s,o,i)}getUsedParamsDetails(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};const s=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],o=t.replace&&typeof t.replace!="string";let i=o?t.replace:t;if(o&&typeof t.count<"u"&&(i.count=t.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!o){i={...i};for(const a of s)delete i[a]}return i}static hasDefaultValue(t){const s="defaultValue";for(const o in t)if(Object.prototype.hasOwnProperty.call(t,o)&&s===o.substring(0,s.length)&&t[o]!==void 0)return!0;return!1}}function hU(r){return r.charAt(0).toUpperCase()+r.slice(1)}class Fee{constructor(t){this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=dw.create("languageUtils")}getScriptPartFromCode(t){if(t=TP(t),!t||t.indexOf("-")<0)return null;const s=t.split("-");return s.length===2||(s.pop(),s[s.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(s.join("-"))}getLanguagePartFromCode(t){if(t=TP(t),!t||t.indexOf("-")<0)return t;const s=t.split("-");return this.formatLanguageCode(s[0])}formatLanguageCode(t){if(typeof t=="string"&&t.indexOf("-")>-1){const s=["hans","hant","latn","cyrl","cans","mong","arab"];let o=t.split("-");return this.options.lowerCaseLng?o=o.map(i=>i.toLowerCase()):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),s.indexOf(o[1].toLowerCase())>-1&&(o[1]=hU(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),s.indexOf(o[1].toLowerCase())>-1&&(o[1]=hU(o[1].toLowerCase())),s.indexOf(o[2].toLowerCase())>-1&&(o[2]=hU(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?t.toLowerCase():t}isSupportedCode(t){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(t=this.getLanguagePartFromCode(t)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(t)>-1}getBestMatchFromCodes(t){if(!t)return null;let s;return t.forEach(o=>{if(s)return;const i=this.formatLanguageCode(o);(!this.options.supportedLngs||this.isSupportedCode(i))&&(s=i)}),!s&&this.options.supportedLngs&&t.forEach(o=>{if(s)return;const i=this.getLanguagePartFromCode(o);if(this.isSupportedCode(i))return s=i;s=this.options.supportedLngs.find(a=>{if(a===i)return a;if(!(a.indexOf("-")<0&&i.indexOf("-")<0)&&(a.indexOf("-")>0&&i.indexOf("-")<0&&a.substring(0,a.indexOf("-"))===i||a.indexOf(i)===0&&i.length>1))return a})}),s||(s=this.getFallbackCodes(this.options.fallbackLng)[0]),s}getFallbackCodes(t,s){if(!t)return[];if(typeof t=="function"&&(t=t(s)),typeof t=="string"&&(t=[t]),Object.prototype.toString.apply(t)==="[object Array]")return t;if(!s)return t.default||[];let o=t[s];return o||(o=t[this.getScriptPartFromCode(s)]),o||(o=t[this.formatLanguageCode(s)]),o||(o=t[this.getLanguagePartFromCode(s)]),o||(o=t.default),o||[]}toResolveHierarchy(t,s){const o=this.getFallbackCodes(s||this.options.fallbackLng||[],t),i=[],a=n=>{n&&(this.isSupportedCode(n)?i.push(n):this.logger.warn(`rejecting language code not found in supportedLngs: ${n}`))};return typeof t=="string"&&(t.indexOf("-")>-1||t.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&a(this.formatLanguageCode(t)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&a(this.getScriptPartFromCode(t)),this.options.load!=="currentOnly"&&a(this.getLanguagePartFromCode(t))):typeof t=="string"&&a(this.formatLanguageCode(t)),o.forEach(n=>{i.indexOf(n)<0&&a(this.formatLanguageCode(n))}),i}}let WJe=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],qJe={1:function(r){return+(r>1)},2:function(r){return+(r!=1)},3:function(r){return 0},4:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},5:function(r){return r==0?0:r==1?1:r==2?2:r%100>=3&&r%100<=10?3:r%100>=11?4:5},6:function(r){return r==1?0:r>=2&&r<=4?1:2},7:function(r){return r==1?0:r%10>=2&&r%10<=4&&(r%100<10||r%100>=20)?1:2},8:function(r){return r==1?0:r==2?1:r!=8&&r!=11?2:3},9:function(r){return+(r>=2)},10:function(r){return r==1?0:r==2?1:r<7?2:r<11?3:4},11:function(r){return r==1||r==11?0:r==2||r==12?1:r>2&&r<20?2:3},12:function(r){return+(r%10!=1||r%100==11)},13:function(r){return+(r!==0)},14:function(r){return r==1?0:r==2?1:r==3?2:3},15:function(r){return r%10==1&&r%100!=11?0:r%10>=2&&(r%100<10||r%100>=20)?1:2},16:function(r){return r%10==1&&r%100!=11?0:r!==0?1:2},17:function(r){return r==1||r%10==1&&r%100!=11?0:1},18:function(r){return r==0?0:r==1?1:2},19:function(r){return r==1?0:r==0||r%100>1&&r%100<11?1:r%100>10&&r%100<20?2:3},20:function(r){return r==1?0:r==0||r%100>0&&r%100<20?1:2},21:function(r){return r%100==1?1:r%100==2?2:r%100==3||r%100==4?3:0},22:function(r){return r==1?0:r==2?1:(r<0||r>10)&&r%10==0?2:3}};const YJe=["v1","v2","v3"],XJe=["v4"],Mee={zero:0,one:1,two:2,few:3,many:4,other:5};function ZJe(){const r={};return WJe.forEach(t=>{t.lngs.forEach(s=>{r[s]={numbers:t.nr,plurals:qJe[t.fc]}})}),r}class JJe{constructor(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.languageUtils=t,this.options=s,this.logger=dw.create("pluralResolver"),(!this.options.compatibilityJSON||XJe.includes(this.options.compatibilityJSON))&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=ZJe()}addRule(t,s){this.rules[t]=s}getRule(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(TP(t==="dev"?"en":t),{type:s.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[t]||this.rules[this.languageUtils.getLanguagePartFromCode(t)]}needsPlural(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=this.getRule(t,s);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}getPluralFormsOfKey(t,s){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(t,o).map(i=>`${s}${i}`)}getSuffixes(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const o=this.getRule(t,s);return o?this.shouldUseIntlApi()?o.resolvedOptions().pluralCategories.sort((i,a)=>Mee[i]-Mee[a]).map(i=>`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i}`):o.numbers.map(i=>this.getSuffix(t,i,s)):[]}getSuffix(t,s){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const i=this.getRule(t,o);return i?this.shouldUseIntlApi()?`${this.options.prepend}${o.ordinal?`ordinal${this.options.prepend}`:""}${i.select(s)}`:this.getSuffixRetroCompatible(i,s):(this.logger.warn(`no plural rule found for: ${t}`),"")}getSuffixRetroCompatible(t,s){const o=t.noAbs?t.plurals(s):t.plurals(Math.abs(s));let i=t.numbers[o];this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));const a=()=>this.options.prepend&&i.toString()?this.options.prepend+i.toString():i.toString();return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?`_plural_${i.toString()}`:a():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&t.numbers.length===2&&t.numbers[0]===1?a():this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}shouldUseIntlApi(){return!YJe.includes(this.options.compatibilityJSON)}}function Uee(r,t,s){let o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:".",i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,a=jJe(r,t,s);return!a&&i&&typeof s=="string"&&(a=ej(r,s,o),a===void 0&&(a=ej(t,s,o))),a}class eet{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=dw.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||(s=>s),this.init(t)}init(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};t.interpolation||(t.interpolation={escapeValue:!0});const{escape:s,escapeValue:o,useRawValueToEscape:i,prefix:a,prefixEscaped:n,suffix:u,suffixEscaped:f,formatSeparator:e,unescapeSuffix:y,unescapePrefix:_,nestingPrefix:T,nestingPrefixEscaped:D,nestingSuffix:ce,nestingSuffixEscaped:ge,nestingOptionsSeparator:Ee,maxReplaces:_e,alwaysFormat:Be}=t.interpolation;this.escape=s!==void 0?s:QJe,this.escapeValue=o!==void 0?o:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=a?ox(a):n||"{{",this.suffix=u?ox(u):f||"}}",this.formatSeparator=e||",",this.unescapePrefix=y?"":_||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=T?ox(T):D||ox("$t("),this.nestingSuffix=ce?ox(ce):ge||ox(")"),this.nestingOptionsSeparator=Ee||",",this.maxReplaces=_e||1e3,this.alwaysFormat=Be!==void 0?Be:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const t=(s,o)=>s&&s.source===o?(s.lastIndex=0,s):new RegExp(o,"g");this.regexp=t(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=t(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=t(this.nestingRegexp,`${this.nestingPrefix}(.+?)${this.nestingSuffix}`)}interpolate(t,s,o,i){let a,n,u;const f=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function e(ce){return ce.replace(/\$/g,"$$$$")}const y=ce=>{if(ce.indexOf(this.formatSeparator)<0){const Be=Uee(s,f,ce,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(Be,void 0,o,{...i,...s,interpolationkey:ce}):Be}const ge=ce.split(this.formatSeparator),Ee=ge.shift().trim(),_e=ge.join(this.formatSeparator).trim();return this.format(Uee(s,f,Ee,this.options.keySeparator,this.options.ignoreJSONStructure),_e,o,{...i,...s,interpolationkey:Ee})};this.resetRegExp();const _=i&&i.missingInterpolationHandler||this.options.missingInterpolationHandler,T=i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:ce=>e(ce)},{regex:this.regexp,safeValue:ce=>this.escapeValue?e(this.escape(ce)):e(ce)}].forEach(ce=>{for(u=0;a=ce.regex.exec(t);){const ge=a[1].trim();if(n=y(ge),n===void 0)if(typeof _=="function"){const _e=_(t,a,i);n=typeof _e=="string"?_e:""}else if(i&&Object.prototype.hasOwnProperty.call(i,ge))n="";else if(T){n=a[0];continue}else this.logger.warn(`missed to pass in variable ${ge} for interpolating ${t}`),n="";else typeof n!="string"&&!this.useRawValueToEscape&&(n=Bee(n));const Ee=ce.safeValue(n);if(t=t.replace(a[0],Ee),T?(ce.regex.lastIndex+=n.length,ce.regex.lastIndex-=a[0].length):ce.regex.lastIndex=0,u++,u>=this.maxReplaces)break}}),t}nest(t,s){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,a,n;function u(f,e){const y=this.nestingOptionsSeparator;if(f.indexOf(y)<0)return f;const _=f.split(new RegExp(`${y}[ ]*{`));let T=`{${_[1]}`;f=_[0],T=this.interpolate(T,n);const D=T.match(/'/g),ce=T.match(/"/g);(D&&D.length%2===0&&!ce||ce.length%2!==0)&&(T=T.replace(/'/g,'"'));try{n=JSON.parse(T),e&&(n={...e,...n})}catch(ge){return this.logger.warn(`failed parsing options string in nesting for key ${f}`,ge),`${f}${y}${T}`}return n.defaultValue&&n.defaultValue.indexOf(this.prefix)>-1&&delete n.defaultValue,f}for(;i=this.nestingRegexp.exec(t);){let f=[];n={...o},n=n.replace&&typeof n.replace!="string"?n.replace:n,n.applyPostProcessor=!1,delete n.defaultValue;let e=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){const y=i[1].split(this.formatSeparator).map(_=>_.trim());i[1]=y.shift(),f=y,e=!0}if(a=s(u.call(this,i[1].trim(),n),n),a&&i[0]===t&&typeof a!="string")return a;typeof a!="string"&&(a=Bee(a)),a||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`),a=""),e&&(a=f.reduce((y,_)=>this.format(y,_,o.lng,{...o,interpolationkey:i[1].trim()}),a.trim())),t=t.replace(i[0],a),this.regexp.lastIndex=0}return t}}function tet(r){let t=r.toLowerCase().trim();const s={};if(r.indexOf("(")>-1){const o=r.split("(");t=o[0].toLowerCase().trim();const i=o[1].substring(0,o[1].length-1);t==="currency"&&i.indexOf(":")<0?s.currency||(s.currency=i.trim()):t==="relativetime"&&i.indexOf(":")<0?s.range||(s.range=i.trim()):i.split(";").forEach(n=>{if(!n)return;const[u,...f]=n.split(":"),e=f.join(":").trim().replace(/^'+|'+$/g,"");s[u.trim()]||(s[u.trim()]=e),e==="false"&&(s[u.trim()]=!1),e==="true"&&(s[u.trim()]=!0),isNaN(e)||(s[u.trim()]=parseInt(e,10))})}return{formatName:t,formatOptions:s}}function ix(r){const t={};return function(o,i,a){const n=i+JSON.stringify(a);let u=t[n];return u||(u=r(TP(i),a),t[n]=u),u(o)}}class net{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};this.logger=dw.create("formatter"),this.options=t,this.formats={number:ix((s,o)=>{const i=new Intl.NumberFormat(s,{...o});return a=>i.format(a)}),currency:ix((s,o)=>{const i=new Intl.NumberFormat(s,{...o,style:"currency"});return a=>i.format(a)}),datetime:ix((s,o)=>{const i=new Intl.DateTimeFormat(s,{...o});return a=>i.format(a)}),relativetime:ix((s,o)=>{const i=new Intl.RelativeTimeFormat(s,{...o});return a=>i.format(a,o.range||"day")}),list:ix((s,o)=>{const i=new Intl.ListFormat(s,{...o});return a=>i.format(a)})},this.init(t)}init(t){const o=(arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}}).interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}add(t,s){this.formats[t.toLowerCase().trim()]=s}addCached(t,s){this.formats[t.toLowerCase().trim()]=ix(s)}format(t,s,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return s.split(this.formatSeparator).reduce((u,f)=>{const{formatName:e,formatOptions:y}=tet(f);if(this.formats[e]){let _=u;try{const T=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},D=T.locale||T.lng||i.locale||i.lng||o;_=this.formats[e](u,D,{...y,...i,...T})}catch(T){this.logger.warn(T)}return _}else this.logger.warn(`there was no format function for ${e}`);return u},t)}}function ret(r,t){r.pending[t]!==void 0&&(delete r.pending[t],r.pendingCount--)}class set extends jF{constructor(t,s,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};super(),this.backend=t,this.store=s,this.services=o,this.languageUtils=o.languageUtils,this.options=i,this.logger=dw.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],this.backend&&this.backend.init&&this.backend.init(o,i.backend,i)}queueLoad(t,s,o,i){const a={},n={},u={},f={};return t.forEach(e=>{let y=!0;s.forEach(_=>{const T=`${e}|${_}`;!o.reload&&this.store.hasResourceBundle(e,_)?this.state[T]=2:this.state[T]<0||(this.state[T]===1?n[T]===void 0&&(n[T]=!0):(this.state[T]=1,y=!1,n[T]===void 0&&(n[T]=!0),a[T]===void 0&&(a[T]=!0),f[_]===void 0&&(f[_]=!0)))}),y||(u[e]=!0)}),(Object.keys(a).length||Object.keys(n).length)&&this.queue.push({pending:n,pendingCount:Object.keys(n).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(a),pending:Object.keys(n),toLoadLanguages:Object.keys(u),toLoadNamespaces:Object.keys(f)}}loaded(t,s,o){const i=t.split("|"),a=i[0],n=i[1];s&&this.emit("failedLoading",a,n,s),o&&this.store.addResourceBundle(a,n,o,void 0,void 0,{skipCopy:!0}),this.state[t]=s?-1:2;const u={};this.queue.forEach(f=>{$Je(f.loaded,[a],n),ret(f,t),s&&f.errors.push(s),f.pendingCount===0&&!f.done&&(Object.keys(f.loaded).forEach(e=>{u[e]||(u[e]={});const y=f.loaded[e];y.length&&y.forEach(_=>{u[e][_]===void 0&&(u[e][_]=!0)})}),f.done=!0,f.errors.length?f.callback(f.errors):f.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(f=>!f.done)}read(t,s,o){let i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,n=arguments.length>5?arguments[5]:void 0;if(!t.length)return n(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:t,ns:s,fcName:o,tried:i,wait:a,callback:n});return}this.readingCalls++;const u=(e,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const _=this.waitingReads.shift();this.read(_.lng,_.ns,_.fcName,_.tried,_.wait,_.callback)}if(e&&y&&i{this.read.call(this,t,s,o,i+1,a*2,n)},a);return}n(e,y)},f=this.backend[o].bind(this.backend);if(f.length===2){try{const e=f(t,s);e&&typeof e.then=="function"?e.then(y=>u(null,y)).catch(u):u(null,e)}catch(e){u(e)}return}return f(t,s,u)}prepareLoading(t,s){let o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();typeof t=="string"&&(t=this.languageUtils.toResolveHierarchy(t)),typeof s=="string"&&(s=[s]);const a=this.queueLoad(t,s,o,i);if(!a.toLoad.length)return a.pending.length||i(),null;a.toLoad.forEach(n=>{this.loadOne(n)})}load(t,s,o){this.prepareLoading(t,s,{},o)}reload(t,s,o){this.prepareLoading(t,s,{reload:!0},o)}loadOne(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";const o=t.split("|"),i=o[0],a=o[1];this.read(i,a,"read",void 0,void 0,(n,u)=>{n&&this.logger.warn(`${s}loading namespace ${a} for language ${i} failed`,n),!n&&u&&this.logger.log(`${s}loaded namespace ${a} for language ${i}`,u),this.loaded(t,n,u)})}saveMissing(t,s,o,i,a){let n=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:()=>{};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(s)){this.logger.warn(`did not save key "${o}" as the namespace "${s}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(o==null||o==="")){if(this.backend&&this.backend.create){const f={...n,isUpdate:a},e=this.backend.create.bind(this.backend);if(e.length<6)try{let y;e.length===5?y=e(t,s,o,i,f):y=e(t,s,o,i),y&&typeof y.then=="function"?y.then(_=>u(null,_)).catch(u):u(null,y)}catch(y){u(y)}else e(t,s,o,i,u,f)}!t||!t[0]||this.store.addResource(t[0],s,o,i)}}}function $ee(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){let s={};if(typeof t[1]=="object"&&(s=t[1]),typeof t[1]=="string"&&(s.defaultValue=t[1]),typeof t[2]=="string"&&(s.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const o=t[3]||t[2];Object.keys(o).forEach(i=>{s[i]=o[i]})}return s},interpolation:{escapeValue:!0,format:r=>r,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function jee(r){return typeof r.ns=="string"&&(r.ns=[r.ns]),typeof r.fallbackLng=="string"&&(r.fallbackLng=[r.fallbackLng]),typeof r.fallbackNS=="string"&&(r.fallbackNS=[r.fallbackNS]),r.supportedLngs&&r.supportedLngs.indexOf("cimode")<0&&(r.supportedLngs=r.supportedLngs.concat(["cimode"])),r}function XR(){}function oet(r){Object.getOwnPropertyNames(Object.getPrototypeOf(r)).forEach(s=>{typeof r[s]=="function"&&(r[s]=r[s].bind(r))})}class wO extends jF{constructor(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;if(super(),this.options=jee(t),this.services={},this.logger=dw,this.modules={external:[]},oet(this),s&&!this.isInitialized&&!t.isClone){if(!this.options.initImmediate)return this.init(t,s),this;setTimeout(()=>{this.init(t,s)},0)}}init(){var t=this;let s=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0;this.isInitializing=!0,typeof s=="function"&&(o=s,s={}),!s.defaultNS&&s.defaultNS!==!1&&s.ns&&(typeof s.ns=="string"?s.defaultNS=s.ns:s.ns.indexOf("translation")<0&&(s.defaultNS=s.ns[0]));const i=$ee();this.options={...i,...this.options,...jee(s)},this.options.compatibilityAPI!=="v1"&&(this.options.interpolation={...i.interpolation,...this.options.interpolation}),s.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=s.keySeparator),s.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=s.nsSeparator);function a(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?dw.init(a(this.modules.logger),this.options):dw.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:typeof Intl<"u"&&(y=net);const _=new Fee(this.options);this.store=new Pee(this.options.resources,this.options);const T=this.services;T.logger=dw,T.resourceStore=this.store,T.languageUtils=_,T.pluralResolver=new JJe(_,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),y&&(!this.options.interpolation.format||this.options.interpolation.format===i.interpolation.format)&&(T.formatter=a(y),T.formatter.init(T,this.options),this.options.interpolation.format=T.formatter.format.bind(T.formatter)),T.interpolator=new eet(this.options),T.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},T.backendConnector=new set(a(this.modules.backend),T.resourceStore,T,this.options),T.backendConnector.on("*",function(D){for(var ce=arguments.length,ge=new Array(ce>1?ce-1:0),Ee=1;Ee1?ce-1:0),Ee=1;Ee{D.init&&D.init(this)})}if(this.format=this.options.interpolation.format,o||(o=XR),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(y=>{this[y]=function(){return t.store[y](...arguments)}}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=function(){return t.store[y](...arguments),t}});const f=XN(),e=()=>{const y=(_,T)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),f.resolve(T),o(_,T)};if(this.languages&&this.options.compatibilityAPI!=="v1"&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initImmediate?e():setTimeout(e,0),f}loadResources(t){let o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:XR;const i=typeof t=="string"?t:this.language;if(typeof t=="function"&&(o=t),!this.options.resources||this.options.partialBundledLanguages){if(i&&i.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return o();const a=[],n=u=>{if(!u||u==="cimode")return;this.services.languageUtils.toResolveHierarchy(u).forEach(e=>{e!=="cimode"&&a.indexOf(e)<0&&a.push(e)})};i?n(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(f=>n(f)),this.options.preload&&this.options.preload.forEach(u=>n(u)),this.services.backendConnector.load(a,this.options.ns,u=>{!u&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),o(u)})}else o(null)}reloadResources(t,s,o){const i=XN();return t||(t=this.languages),s||(s=this.options.ns),o||(o=XR),this.services.backendConnector.reload(t,s,a=>{i.resolve(),o(a)}),i}use(t){if(!t)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!t.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return t.type==="backend"&&(this.modules.backend=t),(t.type==="logger"||t.log&&t.warn&&t.error)&&(this.modules.logger=t),t.type==="languageDetector"&&(this.modules.languageDetector=t),t.type==="i18nFormat"&&(this.modules.i18nFormat=t),t.type==="postProcessor"&&hAe.addPostProcessor(t),t.type==="formatter"&&(this.modules.formatter=t),t.type==="3rdParty"&&this.modules.external.push(t),this}setResolvedLanguage(t){if(!(!t||!this.languages)&&!(["cimode","dev"].indexOf(t)>-1))for(let s=0;s-1)&&this.store.hasLanguageSomeTranslations(o)){this.resolvedLanguage=o;break}}}changeLanguage(t,s){var o=this;this.isLanguageChangingTo=t;const i=XN();this.emit("languageChanging",t);const a=f=>{this.language=f,this.languages=this.services.languageUtils.toResolveHierarchy(f),this.resolvedLanguage=void 0,this.setResolvedLanguage(f)},n=(f,e)=>{e?(a(e),this.translator.changeLanguage(e),this.isLanguageChangingTo=void 0,this.emit("languageChanged",e),this.logger.log("languageChanged",e)):this.isLanguageChangingTo=void 0,i.resolve(function(){return o.t(...arguments)}),s&&s(f,function(){return o.t(...arguments)})},u=f=>{!t&&!f&&this.services.languageDetector&&(f=[]);const e=typeof f=="string"?f:this.services.languageUtils.getBestMatchFromCodes(f);e&&(this.language||a(e),this.translator.language||this.translator.changeLanguage(e),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage&&this.services.languageDetector.cacheUserLanguage(e)),this.loadResources(e,y=>{n(y,e)})};return!t&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!t&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(t),i}getFixedT(t,s,o){var i=this;const a=function(n,u){let f;if(typeof u!="object"){for(var e=arguments.length,y=new Array(e>2?e-2:0),_=2;_`${f.keyPrefix}${T}${ce}`):D=f.keyPrefix?`${f.keyPrefix}${T}${n}`:n,i.t(D,f)};return typeof t=="string"?a.lng=t:a.lngs=t,a.ns=s,a.keyPrefix=o,a}t(){return this.translator&&this.translator.translate(...arguments)}exists(){return this.translator&&this.translator.exists(...arguments)}setDefaultNamespace(t){this.options.defaultNS=t}hasLoadedNamespace(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const o=s.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,a=this.languages[this.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const n=(u,f)=>{const e=this.services.backendConnector.state[`${u}|${f}`];return e===-1||e===2};if(s.precheck){const u=s.precheck(this,n);if(u!==void 0)return u}return!!(this.hasResourceBundle(o,t)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||n(o,t)&&(!i||n(a,t)))}loadNamespaces(t,s){const o=XN();return this.options.ns?(typeof t=="string"&&(t=[t]),t.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{o.resolve(),s&&s(i)}),o):(s&&s(),Promise.resolve())}loadLanguages(t,s){const o=XN();typeof t=="string"&&(t=[t]);const i=this.options.preload||[],a=t.filter(n=>i.indexOf(n)<0&&this.services.languageUtils.isSupportedCode(n));return a.length?(this.options.preload=i.concat(a),this.loadResources(n=>{o.resolve(),s&&s(n)}),o):(s&&s(),Promise.resolve())}dir(t){if(t||(t=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!t)return"rtl";const s=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],o=this.services&&this.services.languageUtils||new Fee($ee());return s.indexOf(o.getLanguagePartFromCode(t))>-1||t.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1?arguments[1]:void 0;return new wO(t,s)}cloneInstance(){let t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:XR;const o=t.forkResourceStore;o&&delete t.forkResourceStore;const i={...this.options,...t,isClone:!0},a=new wO(i);return(t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),["store","services","language"].forEach(u=>{a[u]=this[u]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},o&&(a.store=new Pee(this.store.data,i),a.services.resourceStore=a.store),a.translator=new NP(a.services,i),a.translator.on("*",function(u){for(var f=arguments.length,e=new Array(f>1?f-1:0),y=1;y()=>{if(r.isInitialized)t();else{const s=()=>{setTimeout(()=>{r.off("initialized",s)},0),t()};r.on("initialized",s)}};function Qee(r,t,s){r.loadNamespaces(t,AAe(r,s))}function Kee(r,t,s,o){typeof s=="string"&&(s=[s]),s.forEach(i=>{r.options.ns.indexOf(i)<0&&r.options.ns.push(i)}),r.loadLanguages(t,AAe(r,o))}function aet(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};const o=t.languages[0],i=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(o.toLowerCase()==="cimode")return!0;const n=(u,f)=>{const e=t.services.backendConnector.state[`${u}|${f}`];return e===-1||e===2};return s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!n(t.isLanguageChangingTo,r)?!1:!!(t.hasResourceBundle(o,r)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||n(o,r)&&(!i||n(a,r)))}function uet(r,t){let s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return!t.languages||!t.languages.length?(tj("i18n.languages were undefined or empty",t.languages),!0):t.options.ignoreJSONStructure!==void 0?t.hasLoadedNamespace(r,{lng:s.lng,precheck:(i,a)=>{if(s.bindI18n&&s.bindI18n.indexOf("languageChanging")>-1&&i.services.backendConnector.backend&&i.isLanguageChangingTo&&!a(i.isLanguageChangingTo,r))return!1}}):aet(r,t,s)}const cet=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,fet={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},det=r=>fet[r],het=r=>r.replace(cet,det);let nj={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:het};function Aet(){let r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nj={...nj,...r}}function pet(){return nj}let pAe;function met(r){pAe=r}function get(){return pAe}const bet={type:"3rdParty",init(r){Aet(r.options.react),met(r)}},vet=Vt.createContext();class yet{constructor(){this.usedNamespaces={}}addUsedNamespaces(t){t.forEach(s=>{this.usedNamespaces[s]||(this.usedNamespaces[s]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}const wet=(r,t)=>{const s=Vt.useRef();return Vt.useEffect(()=>{s.current=t?s.current:r},[r,t]),s.current};function mAe(r,t,s,o){return r.getFixedT(t,s,o)}function Cet(r,t,s,o){return Vt.useCallback(mAe(r,t,s,o),[r,t,s,o])}function If(r){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{i18n:s}=t,{i18n:o,defaultNS:i}=Vt.useContext(vet)||{},a=s||o||get();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new yet),!a){tj("You will need to pass in an i18next instance by using initReactI18next");const at=(vt,Ot)=>typeof Ot=="string"?Ot:Ot&&typeof Ot=="object"&&typeof Ot.defaultValue=="string"?Ot.defaultValue:Array.isArray(vt)?vt[vt.length-1]:vt,st=[at,{},!1];return st.t=at,st.i18n={},st.ready=!1,st}a.options.react&&a.options.react.wait!==void 0&&tj("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");const n={...pet(),...a.options.react,...t},{useSuspense:u,keyPrefix:f}=n;let e=r||i||a.options&&a.options.defaultNS;e=typeof e=="string"?[e]:e||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(e);const y=(a.isInitialized||a.initializedStoreOnce)&&e.every(at=>uet(at,a,n)),_=Cet(a,t.lng||null,n.nsMode==="fallback"?e:e[0],f),T=()=>_,D=()=>mAe(a,t.lng||null,n.nsMode==="fallback"?e:e[0],f),[ce,ge]=Vt.useState(T);let Ee=e.join();t.lng&&(Ee=`${t.lng}${Ee}`);const _e=wet(Ee),Be=Vt.useRef(!0);Vt.useEffect(()=>{const{bindI18n:at,bindI18nStore:st}=n;Be.current=!0,!y&&!u&&(t.lng?Kee(a,t.lng,e,()=>{Be.current&&ge(D)}):Qee(a,e,()=>{Be.current&&ge(D)})),y&&_e&&_e!==Ee&&Be.current&&ge(D);function vt(){Be.current&&ge(D)}return at&&a&&a.on(at,vt),st&&a&&a.store.on(st,vt),()=>{Be.current=!1,at&&a&&at.split(" ").forEach(Ot=>a.off(Ot,vt)),st&&a&&st.split(" ").forEach(Ot=>a.store.off(Ot,vt))}},[a,Ee]),Vt.useEffect(()=>{Be.current&&y&&ge(T)},[a,f,y]);const He=[ce,a,y];if(He.t=ce,He.i18n=a,He.ready=y,y||!y&&!u)return He;throw new Promise(at=>{t.lng?Kee(a,t.lng,e,()=>at()):Qee(a,e,()=>at())})}const{slice:Eet,forEach:Let}=[];function xet(r){return Let.call(Eet.call(arguments,1),t=>{if(t)for(const s in t)r[s]===void 0&&(r[s]=t[s])}),r}const zee=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,_et=(r,t,s)=>{const o=s||{};o.path=o.path||"/";const i=encodeURIComponent(t);let a=`${r}=${i}`;if(o.maxAge>0){const n=o.maxAge-0;if(Number.isNaN(n))throw new Error("maxAge should be a Number");a+=`; Max-Age=${Math.floor(n)}`}if(o.domain){if(!zee.test(o.domain))throw new TypeError("option domain is invalid");a+=`; Domain=${o.domain}`}if(o.path){if(!zee.test(o.path))throw new TypeError("option path is invalid");a+=`; Path=${o.path}`}if(o.expires){if(typeof o.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+=`; Expires=${o.expires.toUTCString()}`}if(o.httpOnly&&(a+="; HttpOnly"),o.secure&&(a+="; Secure"),o.sameSite)switch(typeof o.sameSite=="string"?o.sameSite.toLowerCase():o.sameSite){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return a},Vee={create(r,t,s,o){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};s&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+s*60*1e3)),o&&(i.domain=o),document.cookie=_et(r,encodeURIComponent(t),i)},read(r){const t=`${r}=`,s=document.cookie.split(";");for(let o=0;o-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const n=i.substring(1).split("&");for(let u=0;u0&&n[u].substring(0,f)===t&&(s=n[u].substring(f+1))}}return s}};let ZN=null;const Gee=()=>{if(ZN!==null)return ZN;try{ZN=window!=="undefined"&&window.localStorage!==null;const r="i18next.translate.boo";window.localStorage.setItem(r,"foo"),window.localStorage.removeItem(r)}catch{ZN=!1}return ZN};var Iet={name:"localStorage",lookup(r){let{lookupLocalStorage:t}=r;if(t&&Gee())return window.localStorage.getItem(t)||void 0},cacheUserLanguage(r,t){let{lookupLocalStorage:s}=t;s&&Gee()&&window.localStorage.setItem(s,r)}};let JN=null;const Wee=()=>{if(JN!==null)return JN;try{JN=window!=="undefined"&&window.sessionStorage!==null;const r="i18next.translate.boo";window.sessionStorage.setItem(r,"foo"),window.sessionStorage.removeItem(r)}catch{JN=!1}return JN};var Oet={name:"sessionStorage",lookup(r){let{lookupSessionStorage:t}=r;if(t&&Wee())return window.sessionStorage.getItem(t)||void 0},cacheUserLanguage(r,t){let{lookupSessionStorage:s}=t;s&&Wee()&&window.sessionStorage.setItem(s,r)}},Ret={name:"navigator",lookup(r){const t=[];if(typeof navigator<"u"){const{languages:s,userLanguage:o,language:i}=navigator;if(s)for(let a=0;a0?t:void 0}},Bet={name:"htmlTag",lookup(r){let{htmlTag:t}=r,s;const o=t||(typeof document<"u"?document.documentElement:null);return o&&typeof o.getAttribute=="function"&&(s=o.getAttribute("lang")),s}},ket={name:"path",lookup(r){var i;let{lookupFromPathIndex:t}=r;if(typeof window>"u")return;const s=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(s)?(i=s[typeof t=="number"?t:0])==null?void 0:i.replace("/",""):void 0}},Pet={name:"subdomain",lookup(r){var i,a;let{lookupFromSubdomainIndex:t}=r;const s=typeof t=="number"?t+1:1,o=typeof window<"u"&&((a=(i=window.location)==null?void 0:i.hostname)==null?void 0:a.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(o)return o[s]}};function Det(){return{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:r=>r}}class gAe{constructor(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(t,s)}init(t){let s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=t||{languageUtils:{}},this.options=xet(s,this.options||{},Det()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=o,this.addDetector(Tet),this.addDetector(Net),this.addDetector(Iet),this.addDetector(Oet),this.addDetector(Ret),this.addDetector(Bet),this.addDetector(ket),this.addDetector(Pet)}addDetector(t){return this.detectors[t.name]=t,this}detect(t){t||(t=this.options.order);let s=[];return t.forEach(o=>{if(this.detectors[o]){let i=this.detectors[o].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(s=s.concat(i))}}),s=s.map(o=>this.options.convertDetectedLanguage(o)),this.services.languageUtils.getBestMatchFromCodes?s:s.length>0?s[0]:null}cacheUserLanguage(t,s){s||(s=this.options.caches),s&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(t)>-1||s.forEach(o=>{this.detectors[o]&&this.detectors[o].cacheUserLanguage(t,this.options)}))}}gAe.type="languageDetector";const Fet={name:"English",native_name:"English",code:"en"},Met={translation:{report_bug:"Report a bug",import:"Import",file:"File",new:"New",new_window:"New window",open:"Open",save:"Save",save_as:"Save as",save_as_template:"Save as template",template_saved:"Template saved!",rename:"Rename",delete_diagram:"Delete diagram",are_you_sure_delete_diagram:"Are you sure you want to delete this diagram? This operation is irreversible.",oops_smth_went_wrong:"Oops! Something went wrong.",import_diagram:"Import diagram",import_from_source:"Import from SQL",export_as:"Export as",export_source:"Export SQL",models:"Models",exit:"Exit",edit:"Edit",undo:"Undo",redo:"Redo",clear:"Clear",are_you_sure_clear:"Are you sure you want to clear the diagram? This is irreversible.",cut:"Cut",copy:"Copy",paste:"Paste",duplicate:"Duplicate",delete:"Delete",copy_as_image:"Copy as image",view:"View",header:"Menubar",sidebar:"Sidebar",issues:"Issues",presentation_mode:"Presentation mode",strict_mode:"Strict mode",field_details:"Field details",reset_view:"Reset view",show_grid:"Show grid",show_cardinality:"Show cardinality",theme:"Theme",light:"Light",dark:"Dark",zoom_in:"Zoom in",zoom_out:"Zoom out",fullscreen:"Fullscreen",settings:"Settings",show_timeline:"Show timeline",autosave:"Autosave",panning:"Panning",show_debug_coordinates:"Show debug coordinates",transform:"Transform",viewbox:"View Box",cursor_coordinates:"Cursor Coordinates",coordinate_space:"Space",coordinate_space_screen:"Screen",coordinate_space_diagram:"Diagram",table_width:"Table width",language:"Language",flush_storage:"Flush storage",are_you_sure_flush_storage:"Are you sure you want to flush the storage? This will irreversibly delete all your diagrams and custom templates.",storage_flushed:"Storage flushed",help:"Help",shortcuts:"Shortcuts",ask_on_discord:"Ask us on Discord",feedback:"Feedback",no_changes:"No changes",loading:"Loading...",last_saved:"Last saved",saving:"Saving...",failed_to_save:"Failed to save",fit_window_reset:"Fit window / Reset",zoom:"Zoom",add_table:"Add table",add_area:"Add area",add_note:"Add note",add_type:"Add type",to_do:"To-do",tables:"Tables",relationships:"Relationships",subject_areas:"Subject areas",notes:"Notes",types:"Types",search:"Search...",no_tables:"No tables",no_tables_text:"Start building your diagram!",no_relationships:"No relationships",no_relationships_text:"Drag to connect fields and form relationships!",no_subject_areas:"No subject areas",no_subject_areas_text:"Add subject areas to group tables!",no_notes:"No notes",no_notes_text:"Use notes to record extra info",no_types:"No types",no_types_text:"Make your own custom data types",no_issues:"No issues were detected.",strict_mode_is_on_no_issues:"Strict mode is off so no issues will be displayed.",name:"Name",type:"Type",null:"Null",not_null:"Not null",primary:"Primary",unique:"Unique",autoincrement:"Autoincrement",default_value:"Default",check:"Check expression",this_will_appear_as_is:"*This will appear in the generated script as is.",comment:"Comment",add_field:"Add field",values:"Values",size:"Size",precision:"Precision",set_precision:"Set precision: (size, digits)",use_for_batch_input:"Use , for batch input",indices:"Indices",add_index:"Add index",select_fields:"Select fields",title:"Title",not_set:"Not set",foreign:"Foreign",cardinality:"Cardinality",on_update:"On update",on_delete:"On delete",swap:"Swap",one_to_one:"One to one",one_to_many:"One to many",many_to_one:"Many to one",content:"Content",types_info:`This feature is meant for object-relational DBMSs like PostgreSQL. +If used for MySQL or MariaDB a JSON type will be generated with the corresponding json validation check. +If used for SQLite it will be translated to a BLOB. +If used for MSSQL a type alias to the first field will be generated.`,table_deleted:"Table deleted",area_deleted:"Area deleted",note_deleted:"Note deleted",relationship_deleted:"Relationship deleted",type_deleted:"Type deleted",cannot_connect:"Cannot connect, the columns have different types",copied_to_clipboard:"Copied to clipboard",create_new_diagram:"Create new diagram",cancel:"Cancel",open_diagram:"Open diagram",rename_diagram:"Rename diagram",export:"Export",export_image:"Export image",create:"Create",confirm:"Confirm",last_modified:"Last modified",drag_and_drop_files:"Drag and drop the file here or click to upload.",support_json_and_ddb:"JSON and DDB files are supported",upload_sql_to_generate_diagrams:"Upload an sql file to autogenerate your tables and columns.",overwrite_existing_diagram:"Overwrite existing diagram",only_mysql_supported:"*For the time being loading only MySQL scripts is supported.",blank:"Blank",filename:"Filename",table_w_no_name:"Declared a table with no name",duplicate_table_by_name:"Duplicate table by the name '{{tableName}}'",empty_field_name:"Empty field `name` in table '{{tableName}}'",empty_field_type:"Empty field `type` in table '{{tableName}}'",no_values_for_field:"'{{fieldName}}' field of table '{{tableName}}' is of type `{{type}}` but no values have been specified",default_doesnt_match_type:"Default value for field '{{fieldName}}' in table '{{tableName}}' does not match its type",not_null_is_null:"'{{fieldName}}' field of table '{{tableName}}' is NOT NULL but has default NULL",duplicate_fields:"Duplicate table fields by name '{{fieldName}}' in table '{{tableName}}'",duplicate_index:"Duplicate index by name '{{indexName}}' in table '{{tableName}}'",empty_index:"Index in table '{{tableName}}' indexes no columns",no_primary_key:"Table '{{tableName}}' has no primary key",type_with_no_name:"Declared a type with no name",duplicate_types:"Duplicate types by the name '{{typeName}}'",type_w_no_fields:"Declared an empty type '{{typeName}}'with no fields",empty_type_field_name:"Empty field `name` in type '{{typeName}}'",empty_type_field_type:"Empty field `type` in type '{{typeName}}'",no_values_for_type_field:"'{{fieldName}}' field of type '{{typeName}}' is of type `{{type}}` but no values have been specified",duplicate_type_fields:"Duplicate type fields by name '{{fieldName}}' in type '{{typeName}}'",duplicate_reference:"Duplicate reference by the name '{{refName}}'",circular_dependency:"Circular dependency involvind table '{{refName}}'",timeline:"Timeline",priority:"Priority",none:"None",low:"Low",medium:"Medium",high:"High",sort_by:"Sort by",my_order:"My order",completed:"Completed",alphabetically:"Alphabetically",add_task:"Add task",details:"Details",no_tasks:"You have no tasks yet.",no_activity:"You have no activity yet.",move_element:"Move {{name}} to {{coords}}",edit_area:"{{extra}} Edit area {{areaName}}",delete_area:"Delete area {{areaName}}",edit_note:"{{extra}} Edit note {{noteTitle}}",delete_note:"Delete note {{noteTitle}}",edit_table:"{{extra}} Edit table {{tableName}}",delete_table:"Delete table {{tableName}}",edit_type:"{{extra}} Edit type {{typeName}}",delete_type:"Delete type {{typeName}}",add_relationship:"Add relationship",edit_relationship:"{{extra}} Edit relationship {{refName}}",delete_relationship:"Delete relationship {{refName}}",not_found:"Not found",pick_db:"Choose a database",generic:"Generic",generic_description:"Generic diagrams can be exported to any SQL flavor but support few data types.",enums:"Enums",add_enum:"Add enum",edit_enum:"{{extra}} Edit enum {{enumName}}",delete_enum:"Delete enum",enum_w_no_name:"Found enum with no name",enum_w_no_values:"Found enum '{{enumName}}' with no values",duplicate_enums:"Duplicate enums with the name '{{enumName}}'",no_enums:"No enums",no_enums_text:"Define enums here",declare_array:"Declare array",empty_index_name:"Declared an index with no name in table '{{tableName}}'",didnt_find_diagram:"Oops! Didn't find the diagram."}},Uet={name:"Simplified Chinese",native_name:"简体中文",code:"zh"},$et={translation:{report_bug:"报告问题",import:"导入",file:"文件",new:"新建",new_window:"在新标签中打开",open:"打开",save:"保存",save_as:"另存为",save_as_template:"保存为模板",template_saved:"模板已保存!",rename:"重命名",delete_diagram:"删除图表",are_you_sure_delete_diagram:"确定要删除此图表吗?此操作不可逆转。",oops_smth_went_wrong:"糟糕!出了些问题。",import_diagram:"导入图表",import_from_source:"导入 SQL 源代码",export_as:"导出为",export_source:"导出为 SQL 源代码",models:"模型",exit:"退出",edit:"编辑",undo:"撤销",redo:"恢复",clear:"清除",are_you_sure_clear:"确定要清除图表吗?此操作不可逆转。",cut:"剪切",copy:"复制",paste:"粘贴",duplicate:"克隆",delete:"删除",copy_as_image:"复制画布为图片",view:"视图",header:"菜单栏",sidebar:"侧边栏",issues:"问题",presentation_mode:"演示模式",strict_mode:"严格模式",field_details:"字段详情",reset_view:"重置视图",show_grid:"显示网格",show_cardinality:"显示关系",theme:"主题",light:"浅色",dark:"深色",zoom_in:"放大",zoom_out:"缩小",fullscreen:"全屏",settings:"设置",show_timeline:"修改记录",autosave:"自动保存",panning:"画布可拖动",table_width:"表格宽度",language:"语言",flush_storage:"清除存储",are_you_sure_flush_storage:"您确定要清除存储吗?此操作将无法恢复地删除您所有的图表和自定义模板。",storage_flushed:"存储已清空",help:"帮助",shortcuts:"快捷键",ask_on_discord:"在 Discord 联系我们",feedback:"反馈",no_changes:"没有更改",loading:"加载中...",last_saved:"上次保存",saving:"保存中...",failed_to_save:"保存失败",fit_window_reset:"适应窗口/重置",zoom:"缩放",add_table:"添加表",add_area:"添加区域",add_note:"添加注释",add_type:"添加类型",to_do:"待办事项",tables:"表",relationships:"关系",subject_areas:"主题区域",notes:"注释",types:"类型",search:"搜索...",no_tables:"空空如也",no_tables_text:"开始构建您的图表!",no_relationships:"空空如也",no_relationships_text:"拖动以连接字段并形成关系!",no_subject_areas:"空空如也",no_subject_areas_text:"添加主题区域以分组表!",no_notes:"空空如也",no_notes_text:"使用注释记录额外信息",no_types:"空空如也",no_types_text:"制作您自己的自定义数据类型",no_issues:"未检测到问题。",strict_mode_is_on_no_issues:"严格模式已关闭,因此不会显示任何问题。",name:"名称",type:"类型",null:"空",not_null:"非空",primary:"主键",unique:"唯一",autoincrement:"自增",default_value:"默认值",check:"检查表达式",this_will_appear_as_is:"*此内容将按原样显示在生成的脚本中。",comment:"评论",add_field:"添加字段",values:"值",size:"大小",precision:"精度",set_precision:"设置精度:(大小,位数)",use_for_batch_input:"用于批量输入,使用逗号",indices:"索引",add_index:"添加索引",select_fields:"选择字段",title:"标题",not_set:"未设置",foreign:"外键",cardinality:"关系映射",on_update:"更新时",on_delete:"删除时",swap:"交换",one_to_one:"一对一",one_to_many:"一对多",many_to_one:"多对一",content:"内容",types_info:`此功能适用于像 PostgreSQL 这样的对象关系型数据库管理系统。 +如果用于 MySQL 或 MariaDB,将生成具有相应 JSON 验证检查的 JSON 类型。 +如果用于 SQLite,它将被转换为 BLOB。 +如果用于 MSSQL,将生成到第一个字段的类型别名。`,table_deleted:"表已删除",area_deleted:"区域已删除",note_deleted:"注释已删除",relationship_deleted:"关系已删除",type_deleted:"类型已删除",cannot_connect:"无法连接,列具有不同的类型",copied_to_clipboard:"已复制到剪贴板",create_new_diagram:"创建新图表",cancel:"取消",open_diagram:"打开图表",rename_diagram:"重命名图表",export:"导出",export_image:"导出图像",create:"创建",confirm:"确认",last_modified:"最后修改",drag_and_drop_files:"拖放文件到此处或点击上传。",support_json_and_ddb:"支持 JSON 和 DDB 文件",upload_sql_to_generate_diagrams:"上传 SQL 文件以自动生成表和列。",overwrite_existing_diagram:"覆盖现有图表",only_mysql_supported:"目前仅支持加载 MySQL 脚本。",blank:"空",filename:"文件名",table_w_no_name:"声明了一个没有名称的表",duplicate_table_by_name:"重复声明了名为 '{{tableName}}' 的表",empty_field_name:"表 '{{tableName}}' 中的字段 `name` 为空",empty_field_type:"表 '{{tableName}}' 中的字段 `type` 为空",no_values_for_field:"表 '{{tableName}}' 的 '{{fieldName}}' 字段类型为 `{{type}}`,但未指定任何值",default_doesnt_match_type:"表 '{{tableName}}' 中字段 '{{fieldName}}' 的默认值与其类型不匹配",not_null_is_null:"表 '{{tableName}}' 中的 '{{fieldName}}' 字段为 NOT NULL,但默认值为 NULL",duplicate_fields:"在表 '{{tableName}}' 中重复声明了名为 '{{fieldName}}' 的字段",duplicate_index:"在表 '{{tableName}}' 中重复声明了名为 '{{indexName}}' 的索引",empty_index:"在表 '{{tableName}}' 中的索引未指定任何列",no_primary_key:"表 '{{tableName}}' 没有主键",type_with_no_name:"声明了一个没有名称的类型",duplicate_types:"重复声明了名为 '{{typeName}}' 的类型",type_w_no_fields:"声明了一个没有字段的空类型 '{{typeName}}'",empty_type_field_name:"类型 '{{typeName}}' 中的字段 `name` 为空",empty_type_field_type:"类型 '{{typeName}}' 中的字段 `type` 为空",no_values_for_type_field:"类型 '{{typeName}}' 的 '{{fieldName}}' 字段类型为 `{{type}}`,但未指定任何值",duplicate_type_fields:"在自定义类 '{{typeName}}' 中重复声明了名为 '{{fieldName}}' 的字段",duplicate_reference:"重复声明了名为 '{{refName}}' 的引用",circular_dependency:"涉及到表 '{{refName}}' 的循环依赖",timeline:"时间轴",priority:"优先级",none:"无",low:"低",medium:"中",high:"高",sort_by:"排序方式",my_order:"我的排序",completed:"已完成",alphabetically:"按字母顺序",add_task:"添加任务",details:"详情",no_tasks:"您还没有任务。",no_activity:"您还没有活动。",move_element:"将 {{name}} 移动到 {{coords}}",edit_area:"{{extra}} 编辑区域 {{areaName}}",delete_area:"删除区域 {{areaName}}",edit_note:"{{extra}} 编辑注释 {{noteTitle}}",delete_note:"删除注释 {{noteTitle}}",edit_table:"{{extra}} 编辑表格 {{tableName}}",delete_table:"删除表格 {{tableName}}",edit_type:"{{extra}} 编辑类型 {{typeName}}",delete_type:"删除类型 {{typeName}}",add_relationship:"添加关系",edit_relationship:"{{extra}} 编辑关系 {{refName}}",delete_relationship:"删除关系 {{refName}}",not_found:"未找到"}},jet={name:"Spanish",native_name:"Español",code:"es"},Het={translation:{report_bug:"Reportar Error",import:"Importar",file:"Archivo ",new:"Nuevo",new_window:"Nueva Ventana",open:"Abrir",save:"Guardar",save_as:"Guardar como",save_as_template:"Guardar como plantilla",template_saved:"Guardado de plantilla!",rename:"Renombrar",delete_diagram:"Eliminar diagrama",are_you_sure_delete_diagram:"Estás seguro de que quieres eliminar este diagrama? Esta operación es irreversible.",oops_smth_went_wrong:"Oops! Algo salió mal.",import_diagram:"Importar diagrama",import_from_source:"Importar desde fuente",export_as:"Exportar como",export_source:"Exportar fuente",models:"Modelos",exit:"Salir",edit:"Editar",undo:"Deshacer",redo:"Rehacer",clear:"limpiar",are_you_sure_clear:"Estás seguro de que quieres borrar el diagrama? Esto es irreversible.",cut:"cortar",copy:"Copiar",paste:"Pegar",duplicate:"Duplicar",delete:"Eliminar",copy_as_image:"Copiar como imagen",view:"Ver",header:"Encabezado",sidebar:"Barra lateral",issues:"Problemas",presentation_mode:"Modo de presentación",strict_mode:"Modo estricto",field_details:"Detalles del campo",reset_view:"Restablecer vista",show_grid:"Mostrar cuadrícula",show_cardinality:"Mostrar cardinalidad",theme:"Tema",light:"Claro",dark:"Oscuro",zoom_in:"Acercar",zoom_out:"Alejar",fullscreen:"Pantalla completa",settings:"Configuraciones",show_timeline:"Mostrar línea de tiempo",autosave:"Guardado automático",panning:"Desplazamiento",table_width:"Ancho de la tabla",language:"Idioma",flush_storage:"Vaciar almacenamiento",are_you_sure_flush_storage:"Estás seguro de que quieres vaciar el almacenamiento? Esta operación es irreversible.",storage_flushed:"Almacenamiento vaciado!",help:"Ayuda",shortcuts:"Atajos",ask_on_discord:"Pregúntanos en Discord",feedback:"Retroalimentación",no_changes:"Sin cambios",loading:"Cargando...",last_saved:"Último guardado",saving:"Guardando... ",failed_to_save:"Error al guardar",fit_window_reset:"Ajustar ventana / Restablecer",zoom:"Zoom",add_table:"Añadir tabla",add_area:"Añadir área",add_note:"Añadir nota",add_type:"Añadir tipo",to_do:"Por hacer",tables:"Tablas",relationships:"Relaciones",subject_areas:"Áreas de tema",notes:"Notas",types:"Tipos",search:"Buscar...",no_tables:"Sin tablas",no_tables_text:"¡Comienza a construir tu diagrama!",no_relationships:"Sin relaciones",no_relationships_text:"¡Añade relaciones entre tablas!",no_subject_areas:"Sin áreas de tema",no_subject_areas_text:"¡Añade áreas de tema!",no_notes:"Sin notas",no_notes_text:"¡Añade notas!",no_types:"Sin tipos",no_types_text:" ¡Añade tipos!",no_issues:" Sin problemas",strict_mode_is_on_no_issues:"El modo estricto está activado y no hay problemas.",name:"Nombre",type:"Tipo",null:"Nulo",not_null:"No nulo",primary:"Primario",unique:"Único",autoincrement:"Autoincremental",default_value:"Valor predeterminado",check:"Expresión de verificación",this_will_appear_as_is:"*Esto aparecerá en el script generado tal cual.",comment:"Comentario",add_field:"Agregar campo",values:"valores",size:"Tamaño",precision:"Precisión",set_precision:"Establecer precisión: (tamaño, dígitos)",use_for_batch_input:"Usar, para entrada por lotes",indices:"Índices",add_index:"Agregar índice",select_fields:"Seleccionar campos",title:"Título",not_set:"No establecido",foreign:"Extranjero",cardinality:"Cardinalidad",on_update:"Al actualizar",on_delete:"Al eliminar",swap:"Intercambiar",one_to_one:"Uno a uno",one_to_many:"Uno a muchos",many_to_one:"Muchos a uno",content:"Contenido",types_info:`Esta característica está destinada a DBMSs objeto-relacionales como PostgreSQL. +Si se usa para MySQL o MariaDB, se generará un tipo JSON con la verificación de validación json correspondiente. +Si se usa para SQLite, se traducirá a un BLOB. +Si se usa para MSSQL, se generará un alias de tipo al primer campo.`,table_deleted:"Tabla eliminada",area_deleted:"Área eliminada",note_deleted:"Nota eliminada",relationship_deleted:"Relación eliminada",type_deleted:"Tipo eliminado",cannot_connect:"No se puede conectar, las columnas tienen diferentes tipos",copied_to_clipboard:"Copiado al portapapeles",create_new_diagram:"Crear nuevo diagrama",cancel:"Cancelar",open_diagram:"Abrir diagrama",rename_diagram:"Renombrar diagrama",export:"Exportar",export_image:"Exportar imagen",create:"Crear",confirm:"Confirmar",last_modified:"Última modificación",drag_and_drop_files:"Arrastra y suelta el archivo aquí o haz clic para subir.",support_json_and_ddb:"Se admiten archivos JSON y DDB",upload_sql_to_generate_diagrams:"Sube un archivo sql para autogenerar tus tablas y columnas.",overwrite_existing_diagram:"Sobrescribir diagrama existente",only_mysql_supported:"*Por el momento, solo se admite la carga de scripts de MySQL.",blank:"En blanco",filename:"Nombre del archivo",table_w_no_name:"Declarada una tabla sin nombre",duplicate_table_by_name:"Tabla duplicada con el nombre '{{tableName}}'",empty_field_name:"Campo `name` vacío en la tabla '{{tableName}}'",empty_field_type:"Campo `type` vacío en la tabla '{{tableName}}'",no_values_for_field:"El campo '{{fieldName}}' de la tabla '{{tableName}}' es de tipo `{{type}}` pero no se han especificado valores",default_doesnt_match_type:"El valor predeterminado para el campo '{{fieldName}}' en la tabla '{{tableName}}' no coincide con su tipo",not_null_is_null:"El campo '{{fieldName}}' de la tabla '{{tableName}}' es NOT NULL pero tiene NULL por defecto",duplicate_fields:"Campos de tabla duplicados por nombre '{{fieldName}}' en la tabla '{{tableName}}'",duplicate_index:"Índice duplicado por nombre '{{indexName}}' en la tabla '{{tableName}}'",empty_index:"Índice en la tabla '{{tableName}}' no indexa columnas",no_primary_key:"La tabla '{{tableName}}' no tiene clave primaria",type_with_no_name:"Declarado un tipo sin nombre",duplicate_types:"Tipos duplicados con el nombre '{{typeName}}'",type_w_no_fields:"Declarado un tipo vacío '{{typeName}}' sin campos",empty_type_field_name:"Campo `name` vacío en el tipo '{{typeName}}'",empty_type_field_type:"Campo `type` vacío en el tipo '{{typeName}}'",no_values_for_type_field:"El campo '{{fieldName}}' del tipo '{{typeName}}' es de tipo `{{type}}` pero no se han especificado valores",duplicate_type_fields:"Campos de tipo duplicados por nombre '{{fieldName}}' en el tipo '{{typeName}}'",duplicate_reference:"Referencia duplicada con el nombre '{{refName}}'",circular_dependency:"Dependencia circular involucrando la tabla '{{refName}}'",timeline:"Linea del tiempo",priority:"Prioridad",none:"Ninguno",low:"Bajo",medium:"Medio",high:"Alto",sort_by:"Ordenar por",my_order:"Mi orden",completed:"Completado",alphabetically:"Alfabéticamente",add_task:"Agregar tarea",details:"Detalles",no_tasks:"Aún no tienes tareas.",no_activity:"Aún no tienes actividad.",move_element:"Mover {{name}} a {{coords}}",edit_area:"{{extra}} Editar área {{areaName}}",delete_area:"Eliminar área {{areaName}}",edit_note:"{{extra}} Editar nota {{noteTitle}}",delete_note:"Eliminar nota {{noteTitle}}",edit_table:"{{extra}} Editar tabla {{tableName}}",delete_table:"Eliminar tabla {{tableName}}",edit_type:"{{extra}} Editar tipo {{typeName}}",delete_type:"Eliminar tipo {{typeName}}",add_relationship:"Agregar relación",edit_relationship:"{{extra}} Editar relación {{refName}}",delete_relationship:"Eliminar relación {{refName}}",not_found:"No encontrado"}},Qet={name:"Danish",native_name:"Dansk",code:"da"},Ket={translation:{report_bug:"Rapportér en fejl",import:"Importér",file:"Fil",new:"Ny",new_window:"Nyt vindue",open:"Åben",save:"Gem",save_as:"Gem som",save_as_template:"Gem som skabelon",template_saved:"Skabelon gemt!",rename:"Omdøb",delete_diagram:"Slet diagram",are_you_sure_delete_diagram:"Er du sikker på at du vil slette dette diagram? Denne handling er irreversibel.",oops_smth_went_wrong:"Ups! Noget gik galt.",import_diagram:"Importér diagram",import_from_source:"Importér fra kilde",export_as:"Eksportér som",export_source:"Eksportér kilde",models:"Modeller",exit:"Afslut",edit:"Redigér",undo:"Fortryd",redo:"Gentag",clear:"Ryd",are_you_sure_clear:"Er du sikker på at du vil rydde diagrammet? Denne handling er irreversibel.",cut:"Klip",copy:"Kopiér",paste:"Indsæt",duplicate:"Duplikér",delete:"Slet",copy_as_image:"Kopiér som billede",view:"Visning",header:"Hoved",sidebar:"Sidebar",issues:"Problemer",presentation_mode:"Præsentations tilstand",strict_mode:"Streng tilstand",field_details:"Felt detaljer",reset_view:"Nulstil visning",show_grid:"Vis gitter",show_cardinality:"Vis kardinalitet",theme:"Tema",light:"Lyst",dark:"Mørkt",zoom_in:"Zoom ind",zoom_out:"Zoom ud",fullscreen:"Fuld skærm",settings:"Indstillinger",show_timeline:"Vis tidslinje",autosave:"Gem automatisk",panning:"Panorering",table_width:"Tabel bredde",language:"Sprog",flush_storage:"Tøm lagring",are_you_sure_flush_storage:"Er du sikker på at du vil tømme lagringen? Dette gør at alle dine diagrammer og individuelle skabeloner bliver slettet irreversibelt",storage_flushed:"Lagring tømt",help:"Hjælp",shortcuts:"Genveje",ask_on_discord:"Spørg os på Discord",feedback:"Feedback",no_changes:"Ingen ændringer",loading:"Loader...",last_saved:"Sidst gemt",saving:"Gemmer...",failed_to_save:"Gem fejlede",fit_window_reset:"Tilpas vindue / Nulstil",zoom:"Zoom",add_table:"Tilføj tabel",add_area:"Tilføj område",add_note:"Tilføj note",add_type:"Tilføj type",to_do:"To-do",tables:"Tabeller",relationships:"Forhold",subject_areas:"Emne områder",notes:"Noter",types:"Typer",search:"Søg...",no_tables:"Ingen tabeller",no_tables_text:"Begynd at bygge dit diagram!",no_relationships:"Ingen forhold",no_relationships_text:"Træk for at forbinde felter og dan forhold!",no_subject_areas:"Ingen emne områder",no_subject_areas_text:"Tilføj emne områder for at gruppere tabeller!",no_notes:"Ingen noter",no_notes_text:"Brug noter for at registrere ekstra info",no_types:"Ingen typer",no_types_text:"Lav dine egne tilpassede data typer",no_issues:"Ingen problemer blev opdaget.",strict_mode_is_on_no_issues:"Streng tilstand er slået fra, så ingen problemer vil blive vist.",name:"Navn",type:"Type",null:"Nul",not_null:"Ikke nul",primary:"Primær",unique:"Unik",autoincrement:"Auto-inkrementel",default_value:"Standardværdi",check:"Tjek udtryk",this_will_appear_as_is:"*Dette vil fremstå i det generede script som det er.",comment:"Kommentar",add_field:"Tilføj felt",values:"værdier",size:"Størrelse",precision:"Præcision",set_precision:"Sæt præcision: (størrelse, cifre)",use_for_batch_input:"Brug , for samlet indtastning",indices:"Indekser",add_index:"Tilføj indeks",select_fields:"Vælg felter",title:"Titel",not_set:"Ikke sat",foreign:"Fremmed",cardinality:"Kardinalitet",on_update:"På opdater",on_delete:"På slet",swap:"Swap",one_to_one:"En til en",one_to_many:"En til mange",many_to_one:"Mange til en",content:"Indhold",types_info:`Denne feature er ment til objekt-relationelle DBMSer ligesom PostgreSQL. +Hvis brugt til MySQL eller MariaDB, vil en JSON type blive genereret med tilsvarende JSON validerings-tjek. +Hvis brugt til SQLite, vil det blive oversat til en BLOB. +Hvis brugt til MSSQL vil et type-alias til det første felt blive genereret.`,table_deleted:"Tabel slettet",area_deleted:"Område slettet",note_deleted:"Note slettet",relationship_deleted:"Forhold slettet",type_deleted:"Type slettet",cannot_connect:"Kan ikke forbinde, kolonnerne har forskellige typer",copied_to_clipboard:"Kopiér til clipboard",create_new_diagram:"Opret nyt diagram",cancel:"Afbryd",open_diagram:"Åben diagram",rename_diagram:"Omdøb diagram",export:"Eksportér",export_image:"Eksportér billede",create:"Opret",confirm:"Bekræft",last_modified:"Sidst ændret",drag_and_drop_files:"Træk og drop filen her eller klik for at uploade.",support_json_and_ddb:"JSON og DDB filer er understøttet",upload_sql_to_generate_diagrams:"Upload en sql fil for at auto-generere dine tabeller og kolonner.",overwrite_existing_diagram:"Overskriv eksisterende diagram",only_mysql_supported:"*For tiden er det kun MySQL scripts der er understøttet.",blank:"Blank",filename:"Filnavn",table_w_no_name:"Erklærede en tabel med intet navn",duplicate_table_by_name:"Dupliker tabellen med navnet '{{tableName}}'",empty_field_name:"Tomt felt `navn` i tabellen '{{tableName}}'",empty_field_type:"Tomt felt `type` i tabellen '{{tableName}}'",no_values_for_field:"'{{fieldName}}' felt fra tabellen '{{tableName}}' er af type `{{type}}` men ingen værdi er blevet specificeret",default_doesnt_match_type:"Standardværdien for feltet '{{fieldName}}' i tabellen '{{tableName}}' stemmer ikke overens med dens type",not_null_is_null:"'{{fieldName}}' felt fra tabellen '{{tableName}}' er IKKE NUL, men har standardværdien NUL",duplicate_fields:"Duplikat tabel felter med navn '{{fieldName}}' på tabellen '{{tableName}}'",duplicate_index:"Duplikat indeks med navn '{{indexName}}' på tabellen '{{tableName}}'",empty_index:"Indeks på tabel '{{tableName}}' indekser ingen kolonner",no_primary_key:"Tabel '{{tableName}}' har ingen primær nøgle",type_with_no_name:"Erklæret en type med intet navn",duplicate_types:"Duplikat typer med navnet '{{typeName}}'",type_w_no_fields:"Erklæret en tom type '{{typeName}}' med ingen felter",empty_type_field_name:"Tomt felt `navn` på typen '{{typeName}}'",empty_type_field_type:"Tomt felt `type` på typen '{{typeName}}'",no_values_for_type_field:"'{{fieldName}}' felt af typen '{{typeName}}' er af typen `{{type}}` men ingen værdier er blevet specificeret",duplicate_type_fields:"Duplikat type felter med navnet '{{fieldName}}' på typen '{{typeName}}'",duplicate_reference:"Duplikat reference med navnet '{{refName}}'",circular_dependency:"Cirkulær afhængighed involveret tabel '{{refName}}'",timeline:"Tidslinje",priority:"Prioritet",none:"Ingen",low:"Lav",medium:"Middel",high:"Høj",sort_by:"Sortér på",my_order:"Min prioritering",completed:"Færdiggjort",alphabetically:"Alfabetisk",add_task:"Tilføj opgave",details:"Detaljer",no_tasks:"Du har ingen opgaver endnu.",no_activity:"Du har ingen aktivitet endnu.",move_element:"Flyt {{name}} til {{coords}}",edit_area:"{{extra}} Redigér område {{areaName}}",delete_area:"Slet område {{areaName}}",edit_note:"{{extra}} Redigér note {{noteTitle}}",delete_note:"Slet note {{noteTitle}}",edit_table:"{{extra}} Redigér tabel {{tableName}}",delete_table:"Slet tabel {{tableName}}",edit_type:"{{extra}} Redigér type {{typeName}}",delete_type:"Slet type {{typeName}}",add_relationship:"Tilføj forhold",edit_relationship:"{{extra}} Redigér forhold {{refName}}",delete_relationship:"Slet forhold {{refName}}",not_found:"Ikke fundet"}},zet={name:"German",native_name:"Deutsch",code:"de"},Vet={translation:{report_bug:"Einen Fehler melden",import:"Importieren",file:"Datei",new:"Neu",new_window:"Neues Fenster",open:"Öffnen",save:"Speichern",save_as:"Speichern unter",save_as_template:"Als Vorlage speichern",template_saved:"Vorlage gespeichert!",rename:"Umbenennen",delete_diagram:"Diagramm löschen",are_you_sure_delete_diagram:"Möchten Sie dieses Diagramm wirklich löschen? Dieser Vorgang kann nicht rückgängig gemacht werden.",oops_smth_went_wrong:"Hoppla! Etwas ist schief gelaufen.",import_diagram:"Diagramm importieren",import_from_source:"Von SQL importieren",export_as:"Exportieren als",export_source:"SQL exportieren",models:"Modelle",exit:"Beenden",edit:"Bearbeiten",undo:"Rückgängig",redo:"Wiederherstellen",clear:"Leeren",are_you_sure_clear:"Möchten Sie das Diagramm wirklich leeren? Dieser Vorgang kann nicht rückgängig gemacht werden.",cut:"Ausschneiden",copy:"Kopieren",paste:"Einfügen",duplicate:"Duplizieren",delete:"Löschen",copy_as_image:"Als Bild kopieren",view:"Ansicht",header:"Menüleiste",sidebar:"Seitenleiste",issues:"Probleme",presentation_mode:"Präsentationsmodus",strict_mode:"Strikter Modus",field_details:"Angaben zum Feld",reset_view:"Ansicht zurücksetzen",show_grid:"Gitter anzeigen",show_cardinality:"Kardinalität anzeigen",theme:"Motiv",light:"Hell",dark:"Dunkel",zoom_in:"Heranzoomen",zoom_out:"Herauszoomen",fullscreen:"Vollbild",settings:"Einstellungen",show_timeline:"Zeitleiste anzeigen",autosave:"Automatisch speichern",panning:"Verschieben",table_width:"Tabellenbreite",language:"Sprache",flush_storage:"Speicher leeren",are_you_sure_flush_storage:"Sind Sie sicher, dass Sie den Speicher leeren wollen? Dadurch werden alle Ihre Diagramme und benutzerdefinierten Vorlagen unwiderruflich gelöscht.",storage_flushed:"Speicher geleert",help:"Hilfe",shortcuts:"Tastenkürzel",ask_on_discord:"Fragen Sie uns auf Discord",feedback:"Feedback",no_changes:"Keine Änderungen",loading:"Laden...",last_saved:"Zuletzt gespeichert",saving:"Speichern...",failed_to_save:"Speichern fehlgeschlagen",fit_window_reset:"Fenster anpassen / Zurücksetzen",zoom:"Zoom",add_table:"Tabelle hinzufügen",add_area:"Bereich hinzufügen",add_note:"Notiz hinzufügen",add_type:"Typ hinzufügen",to_do:"Zu erledigen",tables:"Tabellen",relationships:"Beziehungen",subject_areas:"Themengebiete",notes:"Notizen",types:"Typen",search:"Suchen...",no_tables:"Keine Tabellen",no_tables_text:"Beginnen Sie mit dem Aufbau Ihres Diagramms!",no_relationships:"Keine Beziehungen",no_relationships_text:"Ziehen Sie, um Felder zu verbinden und Beziehungen herzustellen!",no_subject_areas:"Keine Themenbereiche",no_subject_areas_text:"Fügen Sie Themenbereiche zu Gruppentabellen hinzu!",no_notes:"Keine Notizen",no_notes_text:"Fügen Sie Notizen hinzu, um Ihr Diagramm zu kommentieren!",no_types:"Keine Typen",no_types_text:"Fügen Sie benutzerdefinierte Typen hinzu!",no_issues:"Keine Probleme gefunden.",strict_mode_is_on_no_issues:"Der strenge Modus ist ausgeschaltet, es werden keine Probleme angezeigt.",name:"Name",type:"Typ",null:"Null",not_null:"Nicht Null",primary:"Primär",unique:"Einzigartig",autoincrement:"Autoinkrement",default_value:"Standardwert",check:"Ausdruck prüfen",this_will_appear_as_is:"*Dies wird im generierten Skript so erscheinen.",comment:"Kommentar",add_field:"Feld hinzufügen",values:"Werte",size:"Größe",precision:"Präzision",set_precision:"Präzision festlegen: (Größe, Ziffern)",use_for_batch_input:"Verwenden Sie , für Batch-Input",indices:"Indizes",add_index:"Index hinzufügen",select_fields:"Felder auswählen",title:"Titel",not_set:"Nicht festgelegt",foreign:"Fremd",cardinality:"Kardinalität",on_update:"Beim Aktualisieren",on_delete:"Beim Löschen",swap:"Tauschen",one_to_one:"Eins zu eins",one_to_many:"Eins zu viele",many_to_one:"Viele zu eins",content:"Inhalt",types_info:`Diese Funktion ist für objekt-relationale DBMS wie PostgreSQL gedacht. +Bei Verwendung für MySQL oder MariaDB wird ein JSON-Typ mit der entsprechenden JSON-Validierungsprüfung erzeugt. +Bei Verwendung für SQLite wird es in ein BLOB übersetzt. +Bei der Verwendung für MSSQL wird ein Typ-Alias für das erste Feld erzeugt.`,table_deleted:"Tabelle gelöscht",area_deleted:"Bereich gelöscht",note_deleted:"Notiz gelöscht",relationship_deleted:"Beziehung gelöscht",type_deleted:"Typ gelöscht",cannot_connect:"Kann nicht verbinden, die Spalten haben unterschiedliche Typen",copied_to_clipboard:"In die Zwischenablage kopiert",create_new_diagram:"Neues Diagramm erstellen",cancel:"Abbrechen",open_diagram:"Diagramm öffnen",rename_diagram:"Diagramm umbenennen",export:"Exportieren",export_image:"Bild exportieren",create:"Erstellen",confirm:"Bestätigen",last_modified:"Zuletzt geändert",drag_and_drop_files:"Ziehen Sie die Datei hierher oder klicken Sie, um sie hochzuladen.",support_json_and_ddb:"JSON- und DDB-Dateien werden unterstützt",upload_sql_to_generate_diagrams:"Laden Sie eine SQL-Datei hoch, um Ihre Tabellen und Spalten automatisch zu generieren.",overwrite_existing_diagram:"Vorhandenes Diagramm überschreiben",only_mysql_supported:"*Vorläufig wird nur das Laden von MySQL-Skripten unterstützt.",blank:"Leer",filename:"Dateiname",table_w_no_name:"Eine Tabelle ohne Namen wurde deklariert",duplicate_table_by_name:"Doppelte Tabelle mit dem Namen '{{tableName}}'",empty_field_name:"Leeres Feld `name` in der Tabelle '{{tableName}}'",empty_field_type:"Leeres Feld `type` in der Tabelle '{{tableName}}'",no_values_for_field:"Das Feld '{{fieldName}}' der Tabelle '{{tableName}}' ist vom Typ `{{type}}`, aber es wurden keine Werte angegeben",default_doesnt_match_type:"Der Standardwert für das Feld '{{fieldName}}' in der Tabelle '{{tableName}}' entspricht nicht seinem Typ",not_null_is_null:"Das Feld '{{fieldName}}' der Tabelle '{{tableName}}' ist NOT NULL, hat aber standardmäßig NULL",duplicate_fields:"Doppelte Tabellenfelder mit dem Namen '{{fieldName}}' in der Tabelle '{{tableName}}'",duplicate_index:"Doppelter Index mit dem Namen '{{indexName}}' in der Tabelle '{{tableName}}'",empty_index:"Der Index in Tabelle '{{tableName}}' indiziert keine Spalten",no_primary_key:"Tabelle '{{Tabellenname}}' hat keinen Primärschlüssel",type_with_no_name:"Ein Typ ohne Namen wurde deklariert",duplicate_types:"Doppelte Typen mit dem Namen '{{typeName}}'",type_w_no_fields:"Ein leerer Typ '{{typeName}}' ohne Felder wurde deklariert",empty_type_field_name:"Leeres Feld `name` im Typ '{{typeName}}'",empty_type_field_type:"Leeres Feld `type` im Typ '{{typeName}}'",no_values_for_type_field:"Das Feld '{{fieldName}}' des Typs '{{typeName}}' ist vom Typ `{{type}}`, aber es wurden keine Werte angegeben",duplicate_type_fields:"Doppelte Typfelder mit dem Namen '{{fieldName}}' im Typ '{{typeName}}'",duplicate_reference:"Doppelte Referenz mit dem Namen '{{refName}}'",circular_dependency:"Zirkuläre Abhängigkeit, die Tabelle '{{refName}}' betrifft",timeline:"Zeitleiste",priority:"Priorität",none:"Keine",low:"Niedrig",medium:"Mittel",high:"Hoch",sort_by:"Sortieren nach",my_order:"Meine Reihenfolge",completed:"Abgeschlossen",alphabetically:"Alphabetisch",add_task:"Aufgabe hinzufügen",details:"Details",no_tasks:"Sie haben noch keine Aufgaben.",no_activity:"Sie haben noch keine Aktivitäten.",move_element:"{{name}} nach {{coords}} verschieben",edit_area:"{{extra}} Bereich {{areaName}} bearbeiten",delete_area:"Bereich {{areaName}} löschen",edit_note:"{{extra}} Notiz {{noteTitle}} bearbeiten",delete_note:"Notiz {{noteTitle}} löschen",edit_table:"{{extra}} Tabelle {{tableName}} bearbeiten",delete_table:"Tabelle {{tableName}} löschen",edit_type:"{{extra}} Typ {{typeName}} bearbeiten",delete_type:"Typ {{typeName}} löschen",add_relationship:"Beziehung hinzufügen",edit_relationship:"{{extra}} Beziehung {{refName}} bearbeiten",delete_relationship:"Beziehung {{refName}} löschen",not_found:"Nicht gefunden"}},Get={name:"Vietnamese",native_name:"Tiếng Việt",code:"vi"},Wet={translation:{report_bug:"Báo cáo lỗi",import:"Nhập",file:"Tệp",new:"Tạo mới",new_window:"Tạo mới cửa sổ",open:"Mở",save:"Lưu",save_as:"Lưu thành",save_as_template:"Lưu thành mẫu",template_saved:"Mẫu được lưu!",rename:"Đổi tên",delete_diagram:"Xoá sơ đồ",are_you_sure_delete_diagram:"Bạn muốn xoá sơ đồ này không? Hành động này không thể phục hồi.",oops_smth_went_wrong:"Có cái gì đó bị sai.",import_diagram:"Nhập sơ đồ",import_from_source:"Nhập từ SQL",export_as:"Xuất thành",export_source:"Xuất SQL",models:"Mô hình",exit:"Thoát",edit:"Sửa",undo:"Quay lại",redo:"Làm lại",clear:"Xóa",are_you_sure_clear:"Bạn có chắc chắn muốn xóa sơ đồ không? Điều này là không thể phục hồi.",cut:"Cắt",copy:"Sao chép",paste:"Dán",duplicate:"Nhân bản",delete:"Xóa",copy_as_image:"Sao chép dưới dạng hình ảnh",view:"Xem",header:"Thanh menu",sidebar:"Thanh bên",issues:"Vấn đề",presentation_mode:"Chế độ trình bày",strict_mode:"Chế độ nghiêm ngặt",field_details:"Chi tiết trường",reset_view:"Đặt lại chế độ xem",show_grid:"Hiển thị lưới",show_cardinality:"Hiển thị số lượng",theme:"Chủ đề",light:"Sáng",dark:"Tối",zoom_in:"Phóng to",zoom_out:"Thu nhỏ",fullscreen:"Toàn màn hình",settings:"Cài đặt",show_timeline:"Hiển thị dòng thời gian",autosave:"Tự động lưu",panning:"Xoay",table_width:"Chiều rộng của bảng",language:"Ngôn ngữ",flush_storage:"Xoá bộ nhớ",are_you_sure_flush_storage:"Bạn có chắc chắn muốn xóa bộ nhớ không? Thao tác này sẽ xóa vĩnh viễn tất cả sơ đồ và mẫu tùy chỉnh của bạn.",storage_flushed:"Bộ nhớ đã được xoá",help:"Giúp đỡ",shortcuts:"Phím tắt",ask_on_discord:"Theo dõi chúng tôi trên Discord",feedback:"Nhận xét",no_changes:"Không thay đổi",loading:"Đang tải...",last_saved:"Đã lưu lần cuối",saving:"Đang lưu...",failed_to_save:"Lưu thất bại",fit_window_reset:"Đặt cửa số vừa độ rộng / Cài lại",zoom:"Phóng",add_table:"Thêm bảng",add_area:"Thêm vùng",add_note:"Thêm ghi chú",add_type:"Thêm loại",to_do:"Việc cần làm",tables:"Bảng",relationships:"Quan hệ",subject_areas:"Vùng",notes:"Ghi chú",types:"Loại",search:"Tìm kiếm...",no_tables:"Không có bảng",no_tables_text:"Bắt đầu xây dựng sơ đồ của bạn!",no_relationships:"Không có quan hệ",no_relationships_text:"Kéo để kết nối các trường và hình thành các quan hệ!",no_subject_areas:"Không có vùng",no_subject_areas_text:"Thêm vùng vào nhóm các bảng!",no_notes:"Không có ghi chú",no_notes_text:"Sử dụng ghi chú để ghi lại thông tin bổ sung",no_types:"Không có loại",no_types_text:"Tạo các loại dữ liệu tùy chỉnh của riêng bạn",no_issues:"Không có vấn đề nào được phát hiện.",strict_mode_is_on_no_issues:"Chế độ nghiêm ngặt bị tắt nên sẽ không có vấn đề nào được hiển thị.",name:"Tên",type:"Kiểu",null:"Không có giá trị",not_null:"Có giá trị",primary:"Chính",unique:"Duy nhất",autoincrement:"Tự động tăng",default_value:"Giá trị mặc định",check:"Kiểm tra biểu thức",this_will_appear_as_is:"*Điều này sẽ xuất hiện trong đoạn lệnh được tạo như hiện tại.",comment:"Bình luận",add_field:"Thêm trường",values:"Giá trị",size:"Kích cỡ",precision:"Độ chính xác",set_precision:"Đặt độ chính xác: (kích thước, chữ số)",use_for_batch_input:"Sử dụng , để nhập hàng loạt",indices:"Chỉ số",add_index:"Thêm chỉ mục",select_fields:"Chọn các trường",title:"Tiêu đề",not_set:"Không được thiết lập",foreign:"Ngoài",cardinality:"Quan hệ",on_update:"Khi cập nhật",on_delete:"Khi xóa",swap:"Tráo đổi",one_to_one:"Một đối một",one_to_many:"Một đến nhiều",many_to_one:"Nhiều thành một",content:"Nội dung",types_info:`Tính năng này dành cho các DBMS quan hệ đối tượng như PostgreSQL. +Nếu được sử dụng cho MySQL hoặc MariaDB, loại JSON sẽ được tạo bằng kiểm tra xác thực json tương ứng. +Nếu được sử dụng cho SQLite, nó sẽ được dịch sang BLOB. +Nếu được sử dụng cho MSSQL một bí danh loại cho trường đầu tiên sẽ được tạo.`,table_deleted:"Đã xóa bảng",area_deleted:"Khu vực bị xóa",note_deleted:"Đã xóa ghi chú",relationship_deleted:"Đã xóa quan hệ",type_deleted:"Loại đã xóa",cannot_connect:"Không thể kết nối, các cột có nhiều loại khác nhau",copied_to_clipboard:"Sao chép vào clipboard",create_new_diagram:"Tạo sơ đồ mới",cancel:"Hủy bỏ",open_diagram:"Mở sở đồ",rename_diagram:"Đổi tên sơ đồ",export:"Xuất",export_image:"Xuất hình ảnh",create:"Tạo",confirm:"Xác nhận",last_modified:"Sửa đổi lần cuối",drag_and_drop_files:"Kéo và thả tệp vào đây hoặc nhấp để tải lên.",support_json_and_ddb:"Các tệp JSON và DDB được hỗ trợ",upload_sql_to_generate_diagrams:"Tải tệp sql lên để tự động tạo bảng và cột của bạn.",overwrite_existing_diagram:"Ghi đè sơ đồ hiện có",only_mysql_supported:"*Hiện tại, chỉ hỗ trợ tải các tập lệnh MySQL.",blank:"Trống",filename:"Tên tập tin",table_w_no_name:"Khai báo một bảng không có tên",duplicate_table_by_name:"Bảng trùng lặp theo tên '{{tableName}}'",empty_field_name:"Trường trống `name` trong bảng '{{tableName}}'",empty_field_type:"Trường trống `loại` trong bảng '{{tableName}}'",no_values_for_field:"Trường '{{fieldName}}' của bảng '{{tableName}}' thuộc loại `{{type}}` nhưng không có giá trị nào được chỉ định",default_doesnt_match_type:"Giá trị mặc định cho trường '{{fieldName}}' trong bảng '{{tableName}}' không khớp với loại của nó",not_null_is_null:"Trường '{{fieldName}}' của bảng '{{tableName}}' là NOT NULL nhưng đang là NULL",duplicate_fields:"Các trường bảng trùng lặp theo tên '{{fieldName}}' trong bảng '{{tableName}}'",duplicate_index:"Chỉ mục trùng lặp theo tên '{{indexName}}' trong bảng '{{tableName}}'",empty_index:"Chỉ mục trong bảng '{{tableName}}' chỉ mục không có cột",no_primary_key:"Bảng '{{tableName}}' không có khóa chính",type_with_no_name:"Khai báo một loại không có tên",duplicate_types:"Các loại trùng lặp theo tên '{{typeName}}'",type_w_no_fields:"Đã khai báo một loại trống '{{typeName}}'không có trường nào",empty_type_field_name:"Trường trống `name` trong loại '{{typeName}}'",empty_type_field_type:"Trường trống `type` trong loại '{{typeName}}'",no_values_for_type_field:"Trường '{{fieldName}}' thuộc loại '{{typeName}}' thuộc loại `{{type}}` nhưng không có giá trị nào được chỉ định",duplicate_type_fields:"Các trường loại trùng lặp theo tên '{{fieldName}}' trong loại '{{typeName}}'",duplicate_reference:"Tham chiếu trùng lặp theo tên '{{refName}}'",circular_dependency:"Bảng phụ thuộc vòng tròn liên quan đến '{{refName}}'",timeline:"Dòng thời gian",priority:"Độ ưu tiên",none:"Không có",low:"Thấp",medium:"Trung bình",high:"Cao",sort_by:"Sắp xếp theo",my_order:"Thứ tự của tôi",completed:"Thứ tự hoàn thành",alphabetically:"Thứ tự bảng chữ cái",add_task:"Thêm nhiệm vụ",details:"Chi tiết",no_tasks:"Bạn chưa có nhiệm vụ nào.",no_activity:"Bạn chưa có hoạt động nào.",move_element:"Di chuyển {{name}} tới {{coords}}",edit_area:"{{extra}} Chỉnh sửa khu vực {{areaName}}",delete_area:"Xóa khu vực {{areaName}}",edit_note:"{{extra}} Chỉnh sửa ghi chú {{noteTitle}}",delete_note:"Xóa ghi chú {{noteTitle}}",edit_table:"{{extra}} Chỉnh sửa bảng {{tableName}}",delete_table:"Xóa bảng {{tableName}}",edit_type:"{{extra}} Chỉnh sửa loại {{typeName}}",delete_type:"Xóa loại {{typeName}}",add_relationship:"Thêm quan hệ",edit_relationship:"{{extra}} Chỉnh sửa quan hệ {{refName}}",delete_relationship:"Xóa quan hệ {{refName}}",not_found:"Không tìm thấy"}},qet={name:"Portuguese",native_name:"Português",code:"pt-BR"},Yet={translation:{report_bug:"Reportar um erro",import:"Importar",file:"Arquivo",new:"Novo",new_window:"Nova janela",open:"Abrir",save:"Salvar",save_as:"Salvar como",save_as_template:"Salvar como template",template_saved:"Template salvo!",rename:"Renomear",delete_diagram:"Excluir diagrama",are_you_sure_delete_diagram:"Tem certeza de que deseja excluir este diagrama? Esta ação é irreversível.",oops_smth_went_wrong:"Ops! Algo deu errado.",import_diagram:"Importar diagrama",import_from_source:"Importar de SQL",export_as:"Exportar como",export_source:"Exportar SQL",models:"Modelos",exit:"Sair",edit:"Editar",undo:"Desfazer",redo:"Refazer",clear:"Limpar",are_you_sure_clear:"Tem certeza de que deseja limpar o diagrama? Isso é irreversível.",cut:"Recortar",copy:"Copiar",paste:"Colar",duplicate:"Duplicar",delete:"Excluir",copy_as_image:"Copiar como imagem",view:"Ver",header:"Barra de menu",sidebar:"Barra lateral",issues:"Problemas",presentation_mode:"Modo de apresentação",strict_mode:"Modo estrito",field_details:"Detalhes do campo",reset_view:"Redefinir visualização",show_grid:"Mostrar grade",show_cardinality:"Mostrar cardinalidade",theme:"Tema",light:"Claro",dark:"Escuro",zoom_in:"Aumentar zoom",zoom_out:"Diminuir zoom",fullscreen:"Tela cheia",settings:"Configurações",show_timeline:"Mostrar linha do tempo",autosave:"Salvar automaticamente",panning:"Deslocar",table_width:"Largura da tabela",language:"Idioma",flush_storage:"Limpar armazenamento",are_you_sure_flush_storage:"Tem certeza de que deseja limpar o armazenamento? Isso irá excluir permanentemente todos os seus diagramas e modelos personalizados.",storage_flushed:"Armazenamento limpo",help:"Ajuda",shortcuts:"Atalhos",ask_on_discord:"Pergunte no Discord",feedback:"Feedback",no_changes:"Sem alterações",loading:"Carregando...",last_saved:"Última vez salvo às",saving:"Salvando...",failed_to_save:"Falha ao salvar",fit_window_reset:"Ajustar janela / Redefinir",zoom:"Zoom",add_table:"Adicionar tabela",add_area:"Adicionar área",add_note:"Adicionar nota",add_type:"Adicionar tipo",to_do:"Para fazer",tables:"Tabelas",relationships:"Relacionamentos",subject_areas:"Áreas de assunto",notes:"Notas",types:"Tipos",search:"Buscar...",no_tables:"Sem tabelas",no_tables_text:"Comece a construir seu diagrama!",no_relationships:"Sem relacionamentos",no_relationships_text:"Arraste para conectar campos e formar relacionamentos!",no_subject_areas:"Sem áreas de assunto",no_subject_areas_text:"Adicione áreas de assunto para agrupar tabelas!",no_notes:"Sem notas",no_notes_text:"Use notas para registrar informações extras",no_types:"Sem tipos",no_types_text:"Crie seus próprios tipos de dados personalizados",no_issues:"Nenhum problema foi detectado.",strict_mode_is_on_no_issues:"O modo estrito está desativado, portanto, nenhum problema será exibido.",name:"Nome",type:"Tipo",null:"Nulo",not_null:"Não nulo",primary:"Primário",unique:"Único",autoincrement:"Auto incremento",default_value:"Padrão",check:"Verificar expressão",this_will_appear_as_is:"*Isso aparecerá no script gerado como está.",comment:"Comentário",add_field:"Adicionar campo",values:"valores",size:"Tamanho",precision:"Precisão",set_precision:"Definir precisão: (tamanho, dígitos)",use_for_batch_input:"Usar , para entrada em massa",indices:"Índices",add_index:"Adicionar índice",select_fields:"Selecionar campos",title:"Título",not_set:"Não definido",foreign:"Estrangeiro",cardinality:"Cardinalidade",on_update:"Na atualização",on_delete:"Na exclusão",swap:"Trocar",one_to_one:"Um para um",one_to_many:"Um para muitos",many_to_one:"Muitos para um",content:"Conteúdo",types_info:`Este recurso destina-se a SGBDs objeto-relacionais como PostgreSQL. +Se usado para MySQL ou MariaDB, será gerado um tipo JSON com a validação json correspondente. +Se usado para SQLite, será traduzido para um BLOB. +Se usado para MSSQL, será gerado um alias de tipo para o primeiro campo.`,table_deleted:"Tabela excluída",area_deleted:"Área excluída",note_deleted:"Nota excluída",relationship_deleted:"Relacionamento excluído",type_deleted:"Tipo excluído",cannot_connect:"Não é possível conectar, as colunas têm tipos diferentes",copied_to_clipboard:"Copiado para a área de transferência",create_new_diagram:"Criar novo diagrama",cancel:"Cancelar",open_diagram:"Abrir diagrama",rename_diagram:"Renomear diagrama",export:"Exportar",export_image:"Exportar imagem",create:"Criar",confirm:"Confirmar",last_modified:"Última modificação",drag_and_drop_files:"Arraste e solte o arquivo aqui ou clique para fazer upload.",support_json_and_ddb:"Arquivos JSON e DDB são suportados",upload_sql_to_generate_diagrams:"Faça o upload de um arquivo SQL para gerar automaticamente suas tabelas e colunas.",overwrite_existing_diagram:"Substituir diagrama existente",only_mysql_supported:"*Por enquanto, apenas o carregamento de scripts MySQL é suportado.",blank:"Em branco",filename:"Nome do arquivo",table_w_no_name:"Declarada uma tabela sem nome",duplicate_table_by_name:"Tabela duplicada com o nome '{{tableName}}'",empty_field_name:"Campo `name` vazio na tabela '{{tableName}}'",empty_field_type:"Campo `type` vazio na tabela '{{tableName}}'",no_values_for_field:"O campo '{{fieldName}}' da tabela '{{tableName}}' é do tipo `{{type}}`, mas nenhum valor foi especificado",default_doesnt_match_type:"O valor padrão para o campo '{{fieldName}}' na tabela '{{tableName}}' não corresponde ao seu tipo",not_null_is_null:"O campo '{{fieldName}}' da tabela '{{tableName}}' é NOT NULL mas tem o valor padrão NULL",duplicate_fields:"Campos de tabela duplicados pelo nome '{{fieldName}}' na tabela '{{tableName}}'",duplicate_index:"Índice duplicado pelo nome '{{indexName}}' na tabela '{{tableName}}'",empty_index:"O índice na tabela '{{tableName}}' não indexa colunas",no_primary_key:"A tabela '{{tableName}}' não tem chave primária",type_with_no_name:"Declarado um tipo sem nome",duplicate_types:"Tipos duplicados pelo nome '{{typeName}}'",type_w_no_fields:"Declarado um tipo vazio '{{typeName}}' sem campos",empty_type_field_name:"Campo `name` vazio no tipo '{{typeName}}'",empty_type_field_type:"Campo `type` vazio no tipo '{{typeName}}'",no_values_for_type_field:"O campo '{{fieldName}}' do tipo '{{typeName}}' é do tipo `{{type}}` mas nenhum valor foi especificado",duplicate_type_fields:"Campos de tipo duplicados pelo nome '{{fieldName}}' no tipo '{{typeName}}'",duplicate_reference:"Referência duplicada pelo nome '{{refName}}'",circular_dependency:"Dependência circular envolvendo tabela '{{refName}}'",timeline:"Linha do tempo",priority:"Prioridade",none:"Nenhuma",low:"Baixa",medium:"Média",high:"Alta",sort_by:"Ordenar por",my_order:"Minha ordem",completed:"Concluído",alphabetically:"Alfabeticamente",add_task:"Adicionar tarefa",details:"Detalhes",no_tasks:"Você ainda não possui tarefas.",no_activity:"Você ainda não possui atividades.",move_element:"Mover {{name}} para {{coords}}",edit_area:"{{extra}} Editar área {{areaName}}",delete_area:"Excluir área {{areaName}}",edit_note:"{{extra}} Editar nota {{noteTitle}}",delete_note:"Excluir nota {{noteTitle}}",edit_table:"{{extra}} Editar tabela {{tableName}}",delete_table:"Excluir tabela {{tableName}}",edit_type:"{{extra}} Editar tipo {{typeName}}",delete_type:"Excluir tipo {{typeName}}",add_relationship:"Adicionar relacionamento",edit_relationship:"{{extra}} Editar relacionamento {{refName}}",delete_relationship:"Excluir relacionamento {{refName}}",not_found:"Não encontrado"}},Xet={name:"Persian",native_name:"فارسی",code:"fa"},Zet={translation:{report_bug:"گزارش خطا",import:"وارد کردن",file:"فایل",new:"جدید",new_window:"پنجره جدید",open:"باز کردن",save:"ذخیره",save_as:"ذخیره به عنوان",save_as_template:"ذخیره به عنوان الگو",template_saved:"الگو ذخیره شد!",rename:"تغییر نام",delete_diagram:"حذف نمودار",are_you_sure_delete_diagram:"آیا مطمئن هستید که می‌خواهید این نمودار را حذف کنید؟ این عملیات غیر قابل برگشت است.",oops_smth_went_wrong:"اوه! مشکلی پیش آمد.",import_diagram:"وارد کردن نمودار",import_from_source:"وارد کردن از SQL",export_as:"صادر کردن به عنوان",export_source:"صادر کردن SQL",models:"مدل‌ها",exit:"خروج",edit:"ویرایش",undo:"واگرد",redo:"از نو",clear:"پاک کردن",are_you_sure_clear:"آیا مطمئن هستید که می‌خواهید نمودار را پاک کنید؟ این عملیات غیر قابل برگشت است.",cut:"برش",copy:"کپی",paste:"چسباندن",duplicate:"تکرار",delete:"حذف",copy_as_image:"کپی به عنوان تصویر",view:"مشاهده",header:"نوار منو",sidebar:"نوار کناری",issues:"مشکلات",presentation_mode:"حالت ارائه",strict_mode:"حالت سختگیرانه",field_details:"جزئیات فیلد",reset_view:"بازنشانی نما",show_grid:"نمایش شبکه",show_cardinality:"نمایش کاردینالیته",theme:"تم",light:"روشن",dark:"تاریک",zoom_in:"بزرگنمایی",zoom_out:"کوچکنمایی",fullscreen:"تمام صفحه",settings:"تنظیمات",show_timeline:"نمایش خط زمانی",autosave:"ذخیره خودکار",panning:"پانینگ",table_width:"عرض جدول",language:"زبان",flush_storage:"پاک کردن حافظه",are_you_sure_flush_storage:"آیا مطمئن هستید که می‌خواهید حافظه را پاک کنید؟ این عمل تمام نمودارها و الگوهای سفارشی شما را به طور غیر قابل برگشت حذف می‌کند.",storage_flushed:"حافظه پاک شد",help:"راهنما",shortcuts:"میانبرها",ask_on_discord:"پرسیدن در Discord",feedback:"بازخورد",no_changes:"بدون تغییرات",loading:"در حال بارگذاری...",last_saved:"آخرین ذخیره",saving:"در حال ذخیره...",failed_to_save:"ذخیره‌سازی ناموفق",fit_window_reset:"تنظیم پنجره / بازنشانی",zoom:"بزرگنمایی",add_table:"افزودن جدول",add_area:"افزودن ناحیه",add_note:"افزودن یادداشت",add_type:"افزودن نوع",to_do:"برای انجام",tables:"جدول‌ها",relationships:"روابط",subject_areas:"ناحیه‌های موضوعی",notes:"یادداشت‌ها",types:"نوع‌ها",search:"جستجو...",no_tables:"بدون جدول",no_tables_text:"شروع به ساخت نمودار خود کنید!",no_relationships:"بدون رابطه",no_relationships_text:"برای اتصال فیلدها و تشکیل روابط بکشید!",no_subject_areas:"بدون ناحیه موضوعی",no_subject_areas_text:"ناحیه‌های موضوعی را برای گروه‌بندی جدول‌ها اضافه کنید!",no_notes:"بدون یادداشت",no_notes_text:"از یادداشت‌ها برای ثبت اطلاعات اضافی استفاده کنید",no_types:"بدون نوع",no_types_text:"نوع داده سفارشی خود را بسازید",no_issues:"هیچ مشکلی شناسایی نشد.",strict_mode_is_on_no_issues:"حالت سختگیرانه خاموش است بنابراین هیچ مشکلی نمایش داده نخواهد شد.",name:"نام",type:"نوع",null:"خالی",not_null:"غیر خالی",primary:"اصلی",unique:"یگانه",autoincrement:"افزایش خودکار",default_value:"پیش‌فرض",check:"عبارت بررسی",this_will_appear_as_is:"*این در اسکریپت تولید شده به همان صورت نمایش داده می‌شود.",comment:"نظر",add_field:"افزودن فیلد",values:"مقادیر",size:"اندازه",precision:"دقت",set_precision:"تنظیم دقت: (اندازه، ارقام)",use_for_batch_input:"برای ورودی دسته‌ای از , استفاده کنید",indices:"شاخص‌ها",add_index:"افزودن شاخص",select_fields:"انتخاب فیلدها",title:"عنوان",not_set:"تنظیم نشده",foreign:"خارجی",cardinality:"کاردینالیته",on_update:"در به‌روزرسانی",on_delete:"در حذف",swap:"جابجایی",one_to_one:"یک به یک",one_to_many:"یک به چند",many_to_one:"چند به یک",content:"محتوا",types_info:`این ویژگی برای DBMS‌های شیء‌گرا مانند PostgreSQL طراحی شده است. +اگر برای MySQL یا MariaDB استفاده شود، نوع JSON با بررسی اعتبار json متناظر تولید می‌شود. +اگر برای SQLite استفاده شود، به BLOB ترجمه می‌شود. +اگر برای MSSQL استفاده شود، یک نام مستعار نوع برای فیلد اول تولید می‌شود.`,table_deleted:"جدول حذف شد",area_deleted:"ناحیه حذف شد",note_deleted:"یادداشت حذف شد",relationship_deleted:"رابطه حذف شد",type_deleted:"نوع حذف شد",cannot_connect:"اتصال غیر ممکن است، ستون‌ها انواع مختلفی دارند",copied_to_clipboard:"به کلیپ‌بورد کپی شد",create_new_diagram:"ایجاد نمودار جدید",cancel:"لغو",open_diagram:"باز کردن نمودار",rename_diagram:"تغییر نام نمودار",export:"صادر کردن",export_image:"صادر کردن تصویر",create:"ایجاد",confirm:"تأیید",last_modified:"آخرین ویرایش",drag_and_drop_files:"فایل را اینجا بکشید و رها کنید یا کلیک کنید تا بارگذاری شود.",support_json_and_ddb:"فایل‌های JSON و DDB پشتیبانی می‌شوند",upload_sql_to_generate_diagrams:"یک فایل sql را بارگذاری کنید تا جداول و ستون‌هایتان به‌طور خودکار تولید شوند.",overwrite_existing_diagram:"بازنویسی نمودار موجود",only_mysql_supported:"*در حال حاضر فقط بارگذاری اسکریپت‌های MySQL پشتیبانی می‌شود.",blank:"خالی",filename:"نام فایل",table_w_no_name:"جدولی بدون نام اعلام شد",duplicate_table_by_name:"جدول تکراری با نام '{{tableName}}'",empty_field_name:"فیلد خالی name در جدول '{{tableName}}'",empty_field_type:"فیلد خالی type در جدول '{{tableName}}'",no_values_for_field:"فیلد '{{fieldName}}' جدول '{{tableName}}' از نوع {{type}} است اما هیچ مقداری مشخص نشده است",default_doesnt_match_type:"مقدار پیش‌فرض برای فیلد '{{fieldName}}' در جدول '{{tableName}}' با نوع آن مطابقت ندارد",not_null_is_null:"فیلد '{{fieldName}}' جدول '{{tableName}}' غیر خالی است اما پیش‌فرض آن خالی است",duplicate_fields:"فیلدهای تکراری جدول به نام '{{fieldName}}' در جدول '{{tableName}}'",duplicate_index:"شاخص تکراری به نام '{{indexName}}' در جدول '{{tableName}}'",empty_index:"شاخص در جدول '{{tableName}}' هیچ ستونی را شاخص نمی‌کند",no_primary_key:"جدول '{{tableName}}' کلید اصلی ندارد",type_with_no_name:"نوعی بدون نام اعلام شد",duplicate_types:"انواع تکراری به نام '{{typeName}}'",type_w_no_fields:"نوع خالی '{{typeName}}' بدون فیلد اعلام شد",empty_type_field_name:"فیلد `name` خالی در نوع '{{typeName}}'",empty_type_field_type:"فیلد `type` خالی در نوع '{{typeName}}'",no_values_for_type_field:"'{{fieldName}}' فیلد از نوع '{{typeName}}' از نوع `{{type}}` است اما هیچ مقداری مشخص نشده است",duplicate_type_fields:"فیلدهای تکراری نوع با نام '{{fieldName}}' در نوع '{{typeName}}'",duplicate_reference:"ارجاع تکراری به نام '{{refName}}'",circular_dependency:"وابستگی دورانی شامل جدول '{{refName}}'",timeline:"جدول زمانی",priority:"اولویت",none:"هیچکدام",low:"کم",medium:"متوسط",high:"زیاد",sort_by:"مرتب‌سازی بر اساس",my_order:"ترتیب من",completed:"تکمیل شده",alphabetically:"الفبایی",add_task:"اضافه کردن کار",details:"جزئیات",no_tasks:"هنوز کاری ندارید.",no_activity:"هنوز فعالیتی ندارید.",move_element:"انتقال {{name}} به {{coords}}",edit_area:"{{extra}} ویرایش ناحیه {{areaName}}",delete_area:"حذف ناحیه {{areaName}}",edit_note:"{{extra}} ویرایش یادداشت {{noteTitle}}",delete_note:"حذف یادداشت {{noteTitle}}",edit_table:"{{extra}} ویرایش جدول {{tableName}}",delete_table:"حذف جدول {{tableName}}",edit_type:"{{extra}} ویرایش نوع {{typeName}}",delete_type:"حذف نوع {{typeName}}",add_relationship:"اضافه کردن ارتباط",edit_relationship:"{{extra}} ویرایش ارتباط {{refName}}",delete_relationship:"حذف ارتباط {{refName}}",not_found:"یافت نشد"}},Jet={name:"Hindi",native_name:"हिंदी",code:"hi"},ett={translation:{report_bug:"बग रिपोर्ट करें",import:"इम्पोर्ट",file:"फ़ाइल",new:"नया",new_window:"नई विंडो",open:"खोलें",save:"सेव",save_as:"के रूप में सेव करें",save_as_template:"टेम्पलेट के रूप में सेव करें",template_saved:"टेम्पलेट सेव हो गया!",rename:"नाम बदलें",delete_diagram:"डायग्राम हटाएं",are_you_sure_delete_diagram:"क्या आप वाकई इस डायग्राम को हटाना चाहते हैं? यह क्रिया अपरिवर्तनीय है।",oops_smth_went_wrong:"उफ़! कुछ गलत हो गया।",import_diagram:"डायग्राम इम्पोर्ट करें",import_from_source:"SQL से इम्पोर्ट करें",export_as:"के रूप में एक्सपोर्ट करें",export_source:"SQL एक्सपोर्ट करें",models:"मॉडल्स",exit:"बाहर निकलें",edit:"एडिट करें",undo:"पूर्ववत करें",redo:"फिर से करें",clear:"साफ़ करें",are_you_sure_clear:"क्या आप वाकई इस डायग्राम को साफ़ करना चाहते हैं? यह अपरिवर्तनीय है।",cut:"काटें",copy:"कॉपी करें",paste:"पेस्ट करें",duplicate:"प्रतिलिपि बनाएं",delete:"हटाएं",copy_as_image:"इमेज के रूप में कॉपी करें",view:"दृश्य",header:"मेनूबार",sidebar:"साइडबार",issues:"समस्याएं",presentation_mode:"प्रस्तुति मोड",strict_mode:"स्ट्रिक्ट मोड",field_details:"फ़ील्ड डिटेल्स",reset_view:"दृश्य रीसेट करें",show_grid:"ग्रिड दिखाएं",show_cardinality:"कार्डिनैलिटी दिखाएं",theme:"थीम",light:"प्रकाश",dark:"अंधकार",zoom_in:"ज़ूम इन",zoom_out:"ज़ूम आउट",fullscreen:"पूर्ण स्क्रीन",settings:"सेटिंग्स",show_timeline:"टाइमलाइन दिखाएं",autosave:"ऑटोसेव",panning:"पैनिंग",table_width:"टेबल की चौड़ाई",language:"भाषा",flush_storage:"स्टोरेज साफ़ करें",are_you_sure_flush_storage:"क्या आप वाकई स्टोरेज को साफ़ करना चाहते हैं? यह सभी आपके डायग्राम और कस्टम टेम्पलेट्स को अपरिवर्तनीय रूप से हटा देगा।",storage_flushed:"स्टोरेज साफ़ किया गया",help:"मदद",shortcuts:"शॉर्टकट्स",ask_on_discord:"हमसे Discord पर पूछें",feedback:"फीडबॅक",no_changes:"कोई बदलाव नहीं",loading:"लोड हो रहा है...",last_saved:"आखिरी बार सेव्हड",saving:"सेव हो रहा है...",failed_to_save:"सेव करने में विफल",fit_window_reset:"विंडो फिट करें / रीसेट करें",zoom:"ज़ूम",add_table:"टेबल जोड़ें",add_area:"एरिया जोड़ें",add_note:"नोट जोड़ें",add_type:"प्रकार जोड़ें",to_do:"करने के लिए",tables:"टेबल्स",relationships:"संबंध",subject_areas:"सब्जेक्ट एरियाज",notes:"नोट्स",types:"प्रकार",search:"खोजें...",no_tables:"कोई टेबल्स नहीं",no_tables_text:"अपना डायग्राम बनाना शुरू करें!",no_relationships:"कोई संबंध नहीं",no_relationships_text:"फील्ड्स को कनेक्ट करने के लिए खींचें और संबंध बनाएं!",no_subject_areas:"कोई विषय एरियाज नहीं",no_subject_areas_text:"ग्रूप टेबल्स को सब्जेक्ट एरियाज जोड़ें!",no_notes:"कोई नोट्स नहीं",no_notes_text:"अतिरिक्त जानकारी रिकॉर्ड करने के लिए नोट्स का उपयोग करें",no_types:"कोई प्रकार नहीं",no_types_text:"अपने स्वयं के कस्टम डेटा प्रकार बनाएं",no_issues:"कोई समस्याएं नहीं पाए गए।",strict_mode_is_on_no_issues:"स्ट्रिक्ट मोड बंद है इसलिए कोई समस्याएं नहीं दिखाए जाएंगे।",name:"नाम",type:"प्रकार",null:"Null",not_null:"नॉट null",primary:"प्राथमिक",unique:"युनिक",autoincrement:"स्वतः वाढ",default_value:"डिफ़ॉल्ट",check:"चेक एक्सप्रेशन",this_will_appear_as_is:"*यह जेनरेटेड स्क्रिप्ट में जैसा है वैसा ही दिखेगा।",comment:"टिप्पणी",add_field:"फ़ील्ड जोड़ें",values:"व्हॅल्यूज",size:"साइज",precision:"सटीकता",set_precision:"सटीकता सेट करें: (साइज, डिजिट्स)",use_for_batch_input:"Use , बैच इनपुट के लिए",indices:"इंडायसेस",add_index:"इंडेक्स जोड़ें",select_fields:"फ़ील्ड्स चुनें",title:"शीर्षक",not_set:"सेट नहीं किया गया",foreign:"फॉरेन",cardinality:"कार्डिनैलिटी",on_update:"अपडेट पर",on_delete:"हटाने पर",swap:"स्वैप",one_to_one:"एक से एक",one_to_many:"एक से कई",many_to_one:"कई से एक",content:"कंटेंट",types_info:`यह सुविधा object-relational DBMS जैसे PostgreSQL के लिए है। +यदि MySQL या MariaDB के लिए उपयोग किया जाता है, तो एक JSON प्रकार जेनरेट किया जाएगा जिसमें संबंधित json वैधता जांच होगी। +यदि SQLite के लिए उपयोग किया जाता है तो इसे BLOB में परिवर्तित किया जाएगा। +यदि MSSQL के लिए उपयोग किया जाता है तो पहले फ़ील्ड के लिए एक प्रकार उपनाम जेनरेट किया जाएगा।`,table_deleted:"टेबल हटाई गई",area_deleted:"एरिया हटाया गया",note_deleted:"नोट हटाया गया",relationship_deleted:"संबंध हटाया गया",type_deleted:"प्रकार हटाया गया",cannot_connect:"कनेक्ट नहीं कर सकते, कॉलम के प्रकार अलग-अलग हैं",copied_to_clipboard:"क्लिपबोर्ड पर कॉपी किया गया",create_new_diagram:"नया डायग्राम बनाएं",cancel:"रद्द करें",open_diagram:"डायग्राम खोलें",rename_diagram:"डायग्राम का नाम बदलें",export:"एक्सपोर्ट",export_image:"एक्सपोर्ट इमेज",create:"बनाएं",confirm:"पुष्टि करें",last_modified:"अंतिम बार मॉडिफाइड",drag_and_drop_files:"फ़ाइल को यहां खींचें और छोड़ें या अपलोड करने के लिए क्लिक करें।",support_json_and_ddb:"JSON और DDB फ़ाइलें समर्थित हैं",upload_sql_to_generate_diagrams:"अपनी टेबल और कॉलम को स्वचालित रूप से जेनरेट करने के लिए एक sql फ़ाइल अपलोड करें।",overwrite_existing_diagram:"मौजूदा डायग्राम को अधिलेखित करें",only_mysql_supported:"*फिलहाल केवल MySQL स्क्रिप्ट्स को लोड करना समर्थित है।",blank:"खाली",filename:"फ़ाइलनाम",table_w_no_name:"नाम के बिना टेबल घोषित की गई",duplicate_table_by_name:"नाम से डुप्लिकेट टेबल '{{tableName}}'",empty_field_name:"टेबल '{{tableName}}' में खाली फ़ील्ड `नाम`",empty_field_type:"टेबल '{{tableName}}' में खाली फ़ील्ड `प्रकार`",no_values_for_field:"टेबल '{{tableName}}' के फ़ील्ड '{{fieldName}}' का प्रकार `{{type}}` है लेकिन कोई व्हॅल्यू निर्दिष्ट नहीं की गयी है",default_doesnt_match_type:"टेबल '{{tableName}}' में फ़ील्ड '{{fieldName}}' की डिफ़ॉल्ट व्हॅल्यू उसके प्रकार से मेल नहीं खाती",not_null_is_null:"टेबल '{{tableName}}' के फ़ील्ड '{{fieldName}}' की व्हॅल्यू NOT NULL है लेकिन डिफ़ॉल्ट NULL है",duplicate_fields:"टेबल '{{tableName}}' में नाम '{{fieldName}}' वाले डुप्लिकेट टेबल फ़ील्ड्स",duplicate_index:"टेबल '{{tableName}}' में नाम '{{indexName}}' वाला डुप्लिकेट इंडेक्स",empty_index:"टेबल '{{tableName}}' में इंडेक्स कोई कॉलम इंडेक्स नहीं करता",no_primary_key:"टेबल '{{tableName}}' में कोई प्राथमिक कुंजी नहीं है",type_with_no_name:"कोई नाम नहीं होने वाले प्रकार को घोषित किया",duplicate_types:"नाम '{{typeName}}' वाले डुप्लिकेट प्रकार",type_w_no_fields:"कोई फ़ील्ड्स नहीं होने वाले प्रकार '{{typeName}}' को घोषित किया",empty_type_field_name:"प्रकार '{{typeName}}' में खाली फ़ील्ड `नाम`",empty_type_field_type:"प्रकार '{{typeName}}' में खाली फ़ील्ड `प्रकार`",no_values_for_type_field:"प्रकार '{{typeName}}' के फ़ील्ड '{{fieldName}}' का प्रकार `{{type}}` है लेकिन कोई व्हॅल्यू निर्दिष्ट नहीं की गयी है",duplicate_type_fields:"प्रकार '{{typeName}}' में नाम '{{fieldName}}' वाले डुप्लिकेट प्रकार फ़ील्ड्स",duplicate_reference:"नाम '{{refName}}' वाला डुप्लिकेट संदर्भ",circular_dependency:"टेबल '{{refName}}' में परिपत्र निर्भरता",timeline:"समयरेखा",priority:"प्राथमिकता",none:"कोई नहीं",low:"निम्न",medium:"मध्यम",high:"उच्च",sort_by:"द्वारा क्रमबद्ध करें",my_order:"मेरा क्रम",completed:"पूर्ण",alphabetically:"वर्णानुक्रम में",add_task:"कार्य जोड़ें",details:"डिटेल्स",no_tasks:"आपके पास अभी तक कोई कार्य नहीं है।",no_activity:"आपके पास अभी तक कोई गतिविधि नहीं है।",move_element:"{{name}} को {{coords}} पर ले जाएँ",edit_area:"{{extra}} एडिट एरिया {{areaName}}",delete_area:"एरिया हटाएं {{areaName}}",edit_note:"{{extra}} नोट एडिट करें {{noteTitle}}",delete_note:"नोट हटाएं {{noteTitle}}",edit_table:"{{extra}} टेबल एडिट करें {{tableName}}",delete_table:"टेबल हटाएं {{tableName}}",edit_type:"{{extra}} प्रकार एडिट करें {{typeName}}",delete_type:"प्रकार हटाएं {{typeName}}",add_relationship:"संबंध जोड़ें",edit_relationship:"{{extra}} संबंध एडिट करें {{refName}}",delete_relationship:"संबंध हटाएं {{refName}}",not_found:"नहीं मिला"}},ttt={name:"Ukrainian",native_name:"Українська",code:"uk"},ntt={translation:{report_bug:"Повідомити про помилку",import:"Імпортувати",file:"Файл",new:"Новий",new_window:"Нове вікно",open:"Відкрити",save:"Зберегти",save_as:"Зберегти як",save_as_template:"Зберегти як шаблон",template_saved:"Шаблон збережено!",rename:"Перейменувати",delete_diagram:"Видалити діаграму",are_you_sure_delete_diagram:"Ви впевнені, що хочете видалити цю діаграму? Ця операція є незворотною.",oops_smth_went_wrong:"Упс! Щось пішло не так.",import_diagram:"Імпортувати діаграму",import_from_source:"Імпортувати з SQL",export_as:"Експортувати як",export_source:"Експортувати SQL",models:"Моделі",exit:"Вихід",edit:"Редагувати",undo:"Скасувати",redo:"Повторити",clear:"Очистити",are_you_sure_clear:"Ви впевнені, що хочете очистити діаграму? Це незворотно.",cut:"Вирізати",copy:"Копіювати",paste:"Вставити",duplicate:"Дублювати",delete:"Видалити",copy_as_image:"Копіювати як зображення",view:"Перегляд",header:"Меню",sidebar:"Бічна панель",issues:"Проблеми",presentation_mode:"Режим презентації",strict_mode:"Строгий режим",field_details:"Деталі поля",reset_view:"Скинути перегляд",show_grid:"Показати сітку",show_cardinality:"Показати кардинальність",theme:"Тема",light:"Світла",dark:"Темна",zoom_in:"Збільшити",zoom_out:"Зменшити",fullscreen:"Повний екран",settings:"Налаштування",show_timeline:"Показати хронологію",autosave:"Автозбереження",panning:"Прокрутка",table_width:"Ширина таблиці",language:"Мова",flush_storage:"Очистити сховище",are_you_sure_flush_storage:"Ви впевнені, що хочете очистити сховище? Це незворотно видалить всі ваші діаграми та користувацькі шаблони.",storage_flushed:"Сховище очищено",help:"Допомога",shortcuts:"Гарячі клавіші",ask_on_discord:"Запитайте нас на Discord",feedback:"Відгук",no_changes:"Змін немає",loading:"Завантаження...",last_saved:"Останнє збереження",saving:"Збереження...",failed_to_save:"Не вдалося зберегти",fit_window_reset:"Підлаштувати під вікно / Скинути",zoom:"Масштаб",add_table:"Додати таблицю",add_area:"Додати область",add_note:"Додати нотатку",add_type:"Додати тип",to_do:"Зробити",tables:"Таблиці",relationships:"Зв'язки",subject_areas:"Тематичні області",notes:"Нотатки",types:"Типи",search:"Пошук...",no_tables:"Немає таблиць",no_tables_text:"Почніть створювати вашу діаграму!",no_relationships:"Немає зв'язків",no_relationships_text:"Перетягніть, щоб з'єднати поля та створити зв'язки!",no_subject_areas:"Немає тематичних областей",no_subject_areas_text:"Додайте тематичні області для групування таблиць!",no_notes:"Немає нотаток",no_notes_text:"Використовуйте нотатки для запису додаткової інформації",no_types:"Немає типів",no_types_text:"Створіть власні користувацькі типи даних",no_issues:"Проблем не виявлено.",strict_mode_is_on_no_issues:"Строгий режим вимкнено, тому проблеми не будуть відображатися.",name:"Назва",type:"Тип",null:"Null",not_null:"Не Null",primary:"Первинний",unique:"Унікальний",autoincrement:"Автоінкремент",default_value:"За замовчуванням",check:"Перевірка виразу",this_will_appear_as_is:"*Це з'явиться в згенерованому скрипті так, як є.",comment:"Коментар",add_field:"Додати поле",values:"Значення",size:"Розмір",precision:"Точність",set_precision:"Встановити точність: (розмір, цифри)",use_for_batch_input:"Використовуйте , для пакетного введення",indices:"Індекси",add_index:"Додати індекс",select_fields:"Виберіть поля",title:"Заголовок",not_set:"Не встановлено",foreign:"Зовнішній",cardinality:"Кардинальність",on_update:"При оновленні",on_delete:"При видаленні",swap:"Поміняти місцями",one_to_one:"Один до одного",one_to_many:"Один до багатьох",many_to_one:"Багато до одного",content:"Зміст",types_info:`Ця функція призначена для об'єктно-реляційних СУБД, таких як PostgreSQL. +Якщо використовується для MySQL або MariaDB, буде згенерований тип JSON з відповідною перевіркою JSON. +Якщо використовується для SQLite, буде перетворено на BLOB. +Якщо використовується для MSSQL, буде згенеровано тип-аліас для першого поля.`,table_deleted:"Таблицю видалено",area_deleted:"Область видалено",note_deleted:"Нотатку видалено",relationship_deleted:"Зв'язок видалено",type_deleted:"Тип видалено",cannot_connect:"Неможливо з'єднати, стовпці мають різні типи",copied_to_clipboard:"Скопійовано до буфера обміну",create_new_diagram:"Створити нову діаграму",cancel:"Скасувати",open_diagram:"Відкрити діаграму",rename_diagram:"Перейменувати діаграму",export:"Експортувати",export_image:"Експортувати зображення",create:"Створити",confirm:"Підтвердити",last_modified:"Остання зміна",drag_and_drop_files:"Перетягніть файл сюди або натисніть для завантаження.",support_json_and_ddb:"Підтримуються файли JSON та DDB",upload_sql_to_generate_diagrams:"Завантажте SQL файл для автоматичного створення ваших таблиць та стовпців.",overwrite_existing_diagram:"Перезаписати існуючу діаграму",only_mysql_supported:"*На даний момент підтримується завантаження лише MySQL скриптів.",blank:"Порожній",filename:"Назва файлу",table_w_no_name:"Оголошено таблицю без назви",duplicate_table_by_name:"Дубльована таблиця з назвою '{{tableName}}'",empty_field_name:"Порожнє поле `name` в таблиці '{{tableName}}'",empty_field_type:"Порожнє поле `type` в таблиці '{{tableName}}'",no_values_for_field:"'{{fieldName}}' поле в таблиці '{{tableName}}' має тип `{{type}}`, але значення не вказані",default_doesnt_match_type:"Значення за замовчуванням для поля '{{fieldName}}' в таблиці '{{tableName}}' не відповідає його типу",not_null_is_null:"'{{fieldName}}' поле в таблиці '{{tableName}}' є NOT NULL, але має значення за замовчуванням NULL",duplicate_fields:"Дубльовані поля таблиці з назвою '{{fieldName}}' в таблиці '{{tableName}}'",duplicate_index:"Дубльований індекс з назвою '{{indexName}}' в таблиці '{{tableName}}'",empty_index:"Індекс в таблиці '{{tableName}}' не індексує жодного стовпця",no_primary_key:"Таблиця '{{tableName}}' не має первинного ключа",type_with_no_name:"Оголошено тип без назви",duplicate_types:"Дубльовані типи з назвою '{{typeName}}'",type_w_no_fields:"Оголошено порожній тип '{{typeName}}' без полів",empty_type_field_name:"Порожнє поле `name` в типі '{{typeName}}'",empty_type_field_type:"Порожнє поле `type` в типі '{{typeName}}'",no_values_for_type_field:"'{{fieldName}}' поле в типі '{{typeName}}' має тип `{{type}}`, але значення не вказані",duplicate_type_fields:"Дубльовані поля типу з назвою '{{fieldName}}' в типі '{{typeName}}'",duplicate_reference:"Дубльована посилання з назвою '{{refName}}'",circular_dependency:"Циклічна залежність, що стосується таблиці '{{refName}}'",timeline:"Хронологія",priority:"Пріоритет",none:"Жодний",low:"Низький",medium:"Середній",high:"Високий",sort_by:"Сортувати за",my_order:"Мій порядок",completed:"Завершено",alphabetically:"Алфавітно",add_task:"Додати завдання",details:"Деталі",no_tasks:"У вас поки немає завдань.",no_activity:"У вас поки немає активності.",move_element:"Перемістити {{name}} до {{coords}}",edit_area:"{{extra}} Редагувати область {{areaName}}",delete_area:"Видалити область {{areaName}}",edit_note:"{{extra}} Редагувати нотатку {{noteTitle}}",delete_note:"Видалити нотатку {{noteTitle}}",edit_table:"{{extra}} Редагувати таблицю {{tableName}}",delete_table:"Видалити таблицю {{tableName}}",edit_type:"{{extra}} Редагувати тип {{typeName}}",delete_type:"Видалити тип {{typeName}}",add_relationship:"Додати зв'язок",edit_relationship:"{{extra}} Редагувати зв'язок {{refName}}",delete_relationship:"Видалити зв'язок {{refName}}",not_found:"Не знайдено"}},rtt={name:"Russian",native_name:"Русский",code:"ru"},stt={translation:{report_bug:"Сообщить об ошибке",import:"Импорт",file:"Файл",new:"Новый",new_window:"Новое окно",open:"Открыть",save:"Сохранить",save_as:"Сохранить как",save_as_template:"Сохранить как шаблон",template_saved:"Шаблон сохранен!",rename:"Переименовать",delete_diagram:"Удалить диаграмму",are_you_sure_delete_diagram:"Вы уверены, что хотите удалить эту диаграмму? Эта операция необратима.",oops_smth_went_wrong:"Упс! Что-то пошло не так.",import_diagram:"Импорт диаграммы",import_from_source:"Импорт из SQL",export_as:"Экспорт как",export_source:"Экспорт в SQL",models:"Модели",exit:"Выход",edit:"Редактировать",undo:"Отменить",redo:"Повторить",clear:"Очистить",are_you_sure_clear:"Вы уверены, что хотите очистить диаграмму? Это необратимо.",cut:"Вырезать",copy:"Копировать",paste:"Вставить",duplicate:"Дублировать",delete:"Удалить",copy_as_image:"Копировать как изображение",view:"Вид",header:"Меню",sidebar:"Боковая панель",issues:"Проблемы",presentation_mode:"Режим презентации",strict_mode:"Строгий режим",field_details:"Подробности поля",reset_view:"Сбросить вид",show_grid:"Показать сетку",show_cardinality:"Показать кардинальность",theme:"Тема",light:"Светлая",dark:"Темная",zoom_in:"Увеличить",zoom_out:"Уменьшить",fullscreen:"Полноэкранный режим",settings:"Настройки",show_timeline:"Показать временную шкалу",autosave:"Автосохранение",panning:"Панорамирование",table_width:"Ширина таблицы",language:"Язык",flush_storage:"Очистить хранилище",are_you_sure_flush_storage:"Вы уверены, что хотите очистить хранилище? Это необратимо удалит все ваши диаграммы и пользовательские шаблоны.",storage_flushed:"Хранилище очищено",help:"Помощь",shortcuts:"Горячие клавиши",ask_on_discord:"Задайте вопрос в Discord",feedback:"Обратная связь",no_changes:"Нет изменений",loading:"Загрузка...",last_saved:"Последнее сохранение",saving:"Сохранение...",failed_to_save:"Не удалось сохранить",fit_window_reset:"Подогнать к окну / Сбросить",zoom:"Масштаб",add_table:"Добавить таблицу",add_area:"Добавить область",add_note:"Добавить заметку",add_type:"Добавить тип",to_do:"Делать",tables:"Таблицы",relationships:"Отношения",subject_areas:"Области предметной области",notes:"Заметки",types:"Типы",search:"Поиск...",no_tables:"Нет таблиц",no_tables_text:"Начните создавать свою диаграмму!",no_relationships:"Нет отношений",no_relationships_text:"Перетащите, чтобы соединить поля и формировать отношения!",no_subject_areas:"Нет предметных областей",no_subject_areas_text:"Добавьте предметные области для группировки таблиц!",no_notes:"Нет заметок",no_notes_text:"Используйте заметки для записи дополнительной информации",no_types:"Нет типов",no_types_text:"Создайте собственные пользовательские типы данных",no_issues:"Проблемы не обнаружены.",strict_mode_is_on_no_issues:"Строгий режим выключен, поэтому проблемы не будут отображаться.",name:"Имя",type:"Тип",null:"Null",not_null:"Не Null",primary:"Первичный",unique:"Уникальный",autoincrement:"Автоувеличение",default_value:"Значение по умолчанию",check:"Проверка выражения",this_will_appear_as_is:"*Это будет отображаться в сгенерированном скрипте как есть.",comment:"Комментарий",add_field:"Добавить поле",values:"значения",size:"Размер",precision:"Точность",set_precision:"Установить точность: (размер, цифры)",use_for_batch_input:"Использовать , для пакетного ввода",indices:"Индексы",add_index:"Добавить индекс",select_fields:"Выберите поля",title:"Заголовок",not_set:"Не установлено",foreign:"Внешний",cardinality:"Кардинальность",on_update:"При обновлении",on_delete:"При удалении",swap:"Поменять",one_to_one:"Один к одному",one_to_many:"Один ко многим",many_to_one:"Многие к одному",content:"Содержание",types_info:`Эта функция предназначена для объектно-реляционных СУБД, таких как PostgreSQL. +При использовании для MySQL или MariaDB будет сгенерирован тип JSON с соответствующей проверкой json. +При использовании для SQLite он будет преобразован в BLOB. +При использовании для MSSQL будет сгенерирован псевдоним типа для первого поля.`,table_deleted:"Таблица удалена",area_deleted:"Область удалена",note_deleted:"Заметка удалена",relationship_deleted:"Отношение удалено",type_deleted:"Тип удален",cannot_connect:"Невозможно подключиться, колонки имеют разные типы",copied_to_clipboard:"Скопировано в буфер обмена",create_new_diagram:"Создать новую диаграмму",cancel:"Отмена",open_diagram:"Открыть диаграмму",rename_diagram:"Переименовать диаграмму",export:"Экспорт",export_image:"Экспорт изображения",create:"Создать",confirm:"Подтвердить",last_modified:"Последнее изменение",drag_and_drop_files:"Перетащите файл сюда или нажмите, чтобы загрузить.",support_json_and_ddb:"Поддерживаются файлы JSON и DDB",upload_sql_to_generate_diagrams:"Загрузите файл sql для автогенерации ваших таблиц и колонок.",overwrite_existing_diagram:"Перезаписать существующую диаграмму",only_mysql_supported:"*На данный момент поддерживается только загрузка скриптов MySQL.",blank:"Пустой",filename:"Имя файла",table_w_no_name:"Объявлена таблица без названия",duplicate_table_by_name:"Дублировать таблицу по имени '{{tableName}}'",empty_field_name:"Пустое поле `name` в таблице '{{tableName}}'",empty_field_type:"Пустое поле `type` в таблице '{{tableName}}'",no_values_for_field:"Поле '{{fieldName}}' таблицы '{{tableName}}' имеет тип `{{type}}`, но не указаны значения",default_doesnt_match_type:"Значение по умолчанию для поля '{{fieldName}}' в таблице '{{tableName}}' не соответствует его типу",not_null_is_null:"Поле '{{fieldName}}' таблицы '{{tableName}}' НЕ NULL, но имеет значение NULL по умолчанию",duplicate_fields:"Дублирование полей таблицы по имени '{{fieldName}}' в таблице '{{tableName}}'",duplicate_index:"Дублирование индекса по имени '{{indexName}}' в таблице '{{tableName}}'",empty_index:"Индекс в таблице '{{tableName}}' не индексирует столбцы",no_primary_key:"В таблице '{{tableName}}' нет первичного ключа",type_with_no_name:"Объявлен тип без названия",duplicate_types:"Дублирование типов по имени '{{typeName}}'",type_w_no_fields:"Объявлен пустой тип '{{typeName}}' без полей",empty_type_field_name:"Пустое поле `name` в типе '{{typeName}}'",empty_type_field_type:"Пустое поле `type` в типе '{{typeName}}'",no_values_for_type_field:"Поле '{{fieldName}}' типа '{{typeName}}' имеет тип `{{type}}`, но не указаны значения",duplicate_type_fields:"Дублирование полей типа по имени '{{fieldName}}' в типе '{{typeName}}'",duplicate_reference:"Дублирование ссылки по имени '{{refName}}'",circular_dependency:"Циклическая зависимость, вовлекающая таблицу '{{refName}}'",timeline:"Временная шкала",priority:"Приоритет",none:"Нет",low:"Низкий",medium:"Средний",high:"Высокий",sort_by:"Сортировать по",my_order:"Мой порядок",completed:"Завершено",alphabetically:"По алфавиту",add_task:"Добавить задачу",details:"Подробности",no_tasks:"У вас еще нет задач.",no_activity:"У вас пока нет активности.",move_element:"Переместить {{name}} в {{coords}}",edit_area:"{{extra}} Редактировать область {{areaName}}",delete_area:"Удалить область {{areaName}}",edit_note:"{{extra}} Редактировать заметку {{noteTitle}}",delete_note:"Удалить заметку {{noteTitle}}",edit_table:"{{extra}} Редактировать таблицу {{tableName}}",delete_table:"Удалить таблицу {{tableName}}",edit_type:"{{extra}} Редактировать тип {{typeName}}",delete_type:"Удалить тип {{typeName}}",add_relationship:"Добавить отношение",edit_relationship:"{{extra}} Редактировать отношение {{refName}}",delete_relationship:"Удалить отношение {{refName}}",not_found:"Не найдено"}},ott=[Fet,Uet,Qet,jet,zet,Get,qet,Xet,Jet,ttt,rtt].sort((r,t)=>r.name.localeCompare(t.name));jl.use(gAe).use(bet).init({fallbackLng:"en",debug:!1,interpolation:{escapeValue:!1},resources:{en:Met,zh:$et,es:Het,da:Ket,de:Vet,vi:Wet,pt:Yet,fa:Zet,hi:ett,uk:ntt,ru:stt}});const itt=["#f03c3c","#ff4f81","#bc49c4","#a751e8","#7c4af0","#6360f7","#7d9dff","#32c9b0","#3cde7d","#89e667","#ffe159","#ff9159"],bAe=["#ffdfd9","#fcf7ac","#cffcb1","#c7d2ff","#e7c7ff"],fT="#175e7a",att="#fcf7ac",Uy=50,UG=200,Ub=36,QE=7,qg={ONE_TO_ONE:jl.t("one_to_one"),ONE_TO_MANY:jl.t("one_to_many"),MANY_TO_ONE:jl.t("many_to_one")},IP={NONE:"No action",RESTRICT:"Restrict",CASCADE:"Cascade",SET_NULL:"Set null",SET_DEFAULT:"Set default"},tg={TABLES:"1",RELATIONSHIPS:"2",AREAS:"3",NOTES:"4",TYPES:"5",ENUMS:"6"},po={NONE:0,TABLE:1,AREA:2,NOTE:3,RELATIONSHIP:4,TYPE:5,ENUM:6},Va={ADD:0,MOVE:1,DELETE:2,EDIT:3,PAN:4},X0={NONE:0,SAVING:1,SAVED:2,LOADING:3,ERROR:4},Ia={NONE:0,IMG:1,CODE:2,IMPORT:3,RENAME:4,OPEN:5,SAVEAS:6,NEW:7,IMPORT_SRC:8,TABLE_WIDTH:9,LANGUAGE:10},Mm={NONE:0,WARNING:1,ERROR:2,OK:3},pC={NONE:0,TODO:1,TIMELINE:2},$a={MYSQL:"mysql",POSTGRES:"postgresql",MSSQL:"transactsql",SQLITE:"sqlite",MARIADB:"mariadb",GENERIC:"generic"},vAe=Vt.createContext(null);function ltt({children:r}){const{t}=If(),[s,o]=Vt.useState([]),{transform:i}=YC(),{selectedElement:a,setSelectedElement:n}=gb(),{setUndoStack:u,setRedoStack:f}=zm(),e=(T,D=!0)=>{o(T?ce=>{const ge=ce.slice();return ge.splice(T.id,0,T),ge.map((Ee,_e)=>({...Ee,id:_e}))}:Ee=>[...Ee,{id:Ee.length,name:`area_${Ee.length}`,x:i.pan.x-200/2,y:i.pan.y-200/2,width:200,height:200,color:fT}]),D&&(u(ce=>[...ce,{action:Va.ADD,element:po.AREA,message:t("add_area")}]),f([]))},y=(T,D=!0)=>{D&&(Ch.success(t("area_deleted")),u(ce=>[...ce,{action:Va.DELETE,element:po.AREA,data:s[T],message:t("delete_area",s[T].name)}]),f([])),o(ce=>ce.filter(ge=>ge.id!==T).map((ge,Ee)=>({...ge,id:Ee}))),T===a.id&&n(ce=>({...ce,element:po.NONE,id:-1,open:!1}))},_=(T,D)=>{o(ce=>ce.map(ge=>ge.id===T?{...ge,...D}:ge))};return Ye.jsx(vAe.Provider,{value:{areas:s,setAreas:o,updateArea:_,addArea:e,deleteArea:y},children:r})}function WC(){return Vt.useContext(vAe)}var utt=typeof om=="object"&&om&&om.Object===Object&&om,ctt=typeof self=="object"&&self&&self.Object===Object&&self;utt||ctt||Function("return this")();var ftt=typeof window<"u"?Vt.useLayoutEffect:Vt.useEffect;function dT(r,t,s,o){const i=Vt.useRef(t);ftt(()=>{i.current=t},[t]),Vt.useEffect(()=>{const a=(s==null?void 0:s.current)??window;if(!(a&&a.addEventListener))return;const n=u=>{i.current(u)};return a.addEventListener(r,n,o),()=>{a.removeEventListener(r,n,o)}},[r,s,o])}function dtt(r){const[t,s]=Vt.useState(!1),o=()=>{s(!0)},i=()=>{s(!1)};return dT("mouseenter",o,r),dT("mouseleave",i,r),t}function htt(){const r=Vt.useRef(!1);return Vt.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),Vt.useCallback(()=>r.current,[])}var qee={width:void 0,height:void 0};function Att(r){const{ref:t,box:s="content-box"}=r,[{width:o,height:i},a]=Vt.useState(qee),n=htt(),u=Vt.useRef({...qee}),f=Vt.useRef(void 0);return f.current=r.onResize,Vt.useEffect(()=>{if(!t.current||typeof window>"u"||!("ResizeObserver"in window))return;const e=new ResizeObserver(([y])=>{const _=s==="border-box"?"borderBoxSize":s==="device-pixel-content-box"?"devicePixelContentBoxSize":"contentBoxSize",T=Yee(y,_,"inlineSize"),D=Yee(y,_,"blockSize");if(u.current.width!==T||u.current.height!==D){const ge={width:T,height:D};u.current.width=T,u.current.height=D,f.current?f.current(ge):n()&&a(ge)}});return e.observe(t.current,{box:s}),()=>{e.disconnect()}},[s,t,n]),{width:o,height:i}}function Yee(r,t,s){return r[t]?Array.isArray(r[t])?r[t][0][s]:r[t][s]:t==="contentBoxSize"?r.contentRect[s==="inlineSize"?"width":"height"]:void 0}const yAe=Vt.createContext({canvas:{screenSize:{x:0,y:0},viewBox:new DOMRect},coords:{toDiagramSpace(r){return r},toScreenSpace(r){return r}},pointer:{spaces:{screen:{x:0,y:0},diagram:{x:0,y:0}},style:"default",setStyle(){}}});function ptt({children:r,...t}){const s=Vt.useRef(null),{transform:o}=YC(),i=Att({ref:s,box:"content-box"}),a=Vt.useMemo(()=>({x:i.width??0,y:i.height??0}),[i.height,i.width]),n=Vt.useMemo(()=>({x:a.x/o.zoom,y:a.y/o.zoom}),[a.x,a.y,o.zoom]),u=Vt.useMemo(()=>new DOMRect(o.pan.x-n.x/2,o.pan.y-n.y/2,n.x,n.y),[o.pan.x,o.pan.y,n.x,n.y]),f=Vt.useCallback(_e=>({x:typeof _e.x=="number"?_e.x/a.x*u.width+u.left:void 0,y:typeof _e.y=="number"?_e.y/a.y*u.height+u.top:void 0}),[a.x,a.y,u.height,u.left,u.top,u.width]),e=Vt.useCallback(_e=>({x:typeof _e.x=="number"?(_e.x-u.left)/u.width*a.x:void 0,y:typeof _e.y=="number"?(_e.y-u.top)/u.height*a.y:void 0}),[a.x,a.y,u.height,u.left,u.top,u.width]),[y,_]=Vt.useState({x:0,y:0}),T=Vt.useMemo(()=>f(y),[y,f]),[D,ce]=Vt.useState("default");function ge(_e){const Be=_e.currentTarget;if(!_e.isPrimary||!Be)return;const He=Be.getBoundingClientRect();_({x:_e.clientX-He.left,y:_e.clientY-He.top})}dT("pointerdown",ge,s),dT("pointermove",ge,s);const Ee={canvas:{screenSize:a,viewBox:u},coords:{toDiagramSpace:f,toScreenSpace:e},pointer:{spaces:{screen:y,diagram:T},style:D,setStyle:ce}};return Ye.jsx(yAe.Provider,{value:Ee,children:Ye.jsx("div",{...t,ref:s,children:r})})}function wAe(){return Vt.useContext(yAe)}function mtt(){const[r,t]=Vt.useState(()=>document.fullscreenElement===document.documentElement);function s(){t(document.fullscreenElement===document.documentElement)}return dT("fullscreenchange",s,document),r}function Bw(){return Vt.useContext(cAe)}const CAe=Vt.createContext(null);function gtt({children:r}){const{t}=If(),[s,o]=Vt.useState([]),{transform:i}=YC(),{setUndoStack:a,setRedoStack:n}=zm(),{selectedElement:u,setSelectedElement:f}=gb(),e=(T,D=!0)=>{o(T?ce=>{const ge=ce.slice();return ge.splice(T.id,0,T),ge.map((Ee,_e)=>({...Ee,id:_e}))}:ge=>[...ge,{id:ge.length,x:i.pan.x,y:i.pan.y-88/2,title:`note_${ge.length}`,content:"",color:att,height:88}]),D&&(a(ce=>[...ce,{action:Va.ADD,element:po.NOTE,message:t("add_note")}]),n([]))},y=(T,D=!0)=>{D&&(Ch.success(t("note_deleted")),a(ce=>[...ce,{action:Va.DELETE,element:po.NOTE,data:s[T],message:t("delete_note",{noteTitle:s[T].title})}]),n([])),o(ce=>ce.filter(ge=>ge.id!==T).map((ge,Ee)=>({...ge,id:Ee}))),T===u.id&&f(ce=>({...ce,element:po.NONE,id:-1,open:!1}))},_=(T,D)=>{o(ce=>ce.map(ge=>ge.id===T?{...ge,...D}:ge))};return Ye.jsx(CAe.Provider,{value:{notes:s,setNotes:o,updateNote:_,addNote:e,deleteNote:y},children:r})}function qC(){return Vt.useContext(CAe)}const EAe=Vt.createContext(null);function btt({children:r}){const[t,s]=Vt.useState(X0.NONE);return Ye.jsx(EAe.Provider,{value:{saveState:t,setSaveState:s},children:r})}function jS(){return Vt.useContext(EAe)}const LAe=Vt.createContext(null);function vtt({children:r}){const[t,s]=Vt.useState({element:po.NONE,id:-1,openDialogue:!1,openCollapse:!1,currentTab:tg.TABLES,open:!1,openFromToolbar:!1});return Ye.jsx(LAe.Provider,{value:{selectedElement:t,setSelectedElement:s},children:r})}function gb(){return Vt.useContext(LAe)}const SAe=Vt.createContext({strictMode:!1,showFieldSummary:!0,showGrid:!0,mode:"light",autosave:!0,panning:!0,showCardinality:!0,tableWidth:UG,showDebugCoordinates:!1});function ytt({children:r}){const[t,s]=Vt.useState({strictMode:!1,showFieldSummary:!0,showGrid:!0,mode:"light",autosave:!1,panning:!0,showCardinality:!0,tableWidth:UG,showDebugCoordinates:!1});return Ye.jsx(SAe.Provider,{value:{settings:t,setSettings:s},children:r})}function vy(){return Vt.useContext(SAe)}function ag(){return Vt.useContext(IAe)}const xAe=Vt.createContext(null);function wtt({children:r}){const[t,s]=Vt.useState([]),o=(i,a)=>s(n=>n.map((u,f)=>i===f?{...u,...a}:u));return Ye.jsx(xAe.Provider,{value:{tasks:t,setTasks:s,updateTask:o},children:r})}function $G(){return Vt.useContext(xAe)}function YC(){return Vt.useContext(fAe)}const _Ae=Vt.createContext(null);function Ctt({children:r}){const{t}=If(),[s,o]=Vt.useState([]),{setUndoStack:i,setRedoStack:a}=zm(),n=(e,y=!0)=>{o(e?_=>{const T=_.slice();return T.splice(e.id,0,e),T}:_=>[..._,{name:`type_${_.length}`,fields:[],comment:""}]),y&&(i(_=>[..._,{action:Va.ADD,element:po.TYPE,message:t("add_type")}]),a([]))},u=(e,y=!0)=>{y&&(Ch.success(t("type_deleted")),i(_=>[..._,{action:Va.DELETE,element:po.TYPE,id:e,data:s[e],message:t("delete_type",{typeName:s[e].name})}]),a([])),o(_=>_.filter((T,D)=>D!==e))},f=(e,y)=>{o(_=>_.map((T,D)=>D===e?{...T,...y}:T))};return Ye.jsx(_Ae.Provider,{value:{types:s,setTypes:o,addType:n,updateType:f,deleteType:u},children:r})}function kw(){return Vt.useContext(_Ae)}const TAe=Vt.createContext({undoStack:[],setUndoStack:()=>{},redoStack:[],setRedoStack:()=>{}});function Ett({children:r}){const[t,s]=Vt.useState([]),[o,i]=Vt.useState([]);return Ye.jsx(TAe.Provider,{value:{undoStack:t,redoStack:o,setUndoStack:s,setRedoStack:i},children:r})}function zm(){return Vt.useContext(TAe)}const NAe=Vt.createContext(null);function Ltt({children:r}){const{t}=If(),[s,o]=Vt.useState([]),{setUndoStack:i,setRedoStack:a}=zm(),n=(e,y=!0)=>{o(e?_=>{const T=_.slice();return T.splice(e.id,0,e),T}:_=>[..._,{name:`enum_${_.length}`,values:[]}]),y&&(i(_=>[..._,{action:Va.ADD,element:po.ENUM,message:t("add_enum")}]),a([]))},u=(e,y=!0)=>{y&&(Ch.success(t("enum_deleted")),i(_=>[..._,{action:Va.DELETE,element:po.ENUM,id:e,data:s[e],message:t("delete_enum",{enumName:s[e].name})}]),a([])),o(_=>_.filter((T,D)=>D!==e))},f=(e,y)=>{o(_=>_.map((T,D)=>D===e?{...T,...y}:T))};return Ye.jsx(NAe.Provider,{value:{enums:s,setEnums:o,addEnum:n,updateEnum:f,deleteEnum:u},children:r})}function Pw(){return Vt.useContext(NAe)}const IAe=Vt.createContext(null);function Stt({children:r}){const{t}=If(),[s,o]=Vt.useState($a.GENERIC),[i,a]=Vt.useState([]),[n,u]=Vt.useState([]),{transform:f}=YC(),{setUndoStack:e,setRedoStack:y}=zm(),{selectedElement:_,setSelectedElement:T}=gb(),D=(at,st=!0)=>{a(at?vt=>{const Ot=vt.slice();return Ot.splice(at.id,0,at),Ot.map((Kt,sn)=>({...Kt,id:sn}))}:vt=>[...vt,{id:vt.length,name:`table_${vt.length}`,x:f.pan.x,y:f.pan.y,fields:[{name:"id",type:s===$a.GENERIC?"INT":"INTEGER",default:"",check:"",primary:!0,unique:!0,notNull:!0,increment:!0,comment:"",id:0}],comment:"",indices:[],color:fT,key:Date.now()}]),st&&(e(vt=>[...vt,{action:Va.ADD,element:po.TABLE,message:t("add_table")}]),y([]))},ce=(at,st=!0)=>{if(st){Ch.success(t("table_deleted"));const vt=n.reduce((Ot,Kt)=>((Kt.startTableId===at||Kt.endTableId===at)&&Ot.push(Kt),Ot),[]);e(Ot=>[...Ot,{action:Va.DELETE,element:po.TABLE,data:{table:i[at],relationship:vt},message:t("delete_table",{tableName:i[at].name})}]),y([])}u(vt=>vt.filter(Ot=>!(Ot.startTableId===at||Ot.endTableId===at)).map((Ot,Kt)=>{const sn={...Ot};return Ot.startTableId>at&&(sn.startTableId=Ot.startTableId-1),Ot.endTableId>at&&(sn.endTableId=Ot.endTableId-1),{...sn,id:Kt}})),a(vt=>vt.filter(Ot=>Ot.id!==at).map((Ot,Kt)=>({...Ot,id:Kt}))),at===_.id&&T(vt=>({...vt,element:po.NONE,id:-1,open:!1}))},ge=(at,st)=>{a(vt=>vt.map(Ot=>Ot.id===at?{...Ot,...st}:Ot))},Ee=(at,st,vt)=>{a(Ot=>Ot.map((Kt,sn)=>at===sn?{...Kt,fields:Kt.fields.map((Bn,fn)=>st===fn?{...Bn,...vt}:Bn)}:Kt))},_e=(at,st,vt=!0)=>{if(vt){const Ot=n.reduce((Kt,sn)=>((sn.startTableId===st&&sn.startFieldId===at.id||sn.endTableId===st&&sn.endFieldId===at.id)&&Kt.push(sn),Kt),[]);e(Kt=>[...Kt,{action:Va.EDIT,element:po.TABLE,component:"field_delete",tid:st,data:{field:at,relationship:Ot},message:t("edit_table",{tableName:i[st].name,extra:"[delete field]"})}]),y([])}u(Ot=>Ot.filter(sn=>!(sn.startTableId===st&&sn.startFieldId===at.id||sn.endTableId===st&&sn.endFieldId===at.id)).map((sn,Bn)=>sn.startTableId===st&&sn.startFieldId>at.id?{...sn,startFieldId:sn.startFieldId-1,id:Bn}:sn.endTableId===st&&sn.endFieldId>at.id?{...sn,endFieldId:sn.endFieldId-1,id:Bn}:{...sn,id:Bn})),ge(st,{fields:i[st].fields.filter(Ot=>Ot.id!==at.id).map((Ot,Kt)=>({...Ot,id:Kt}))})},Be=(at,st=!0)=>{u(st?vt=>(e(Ot=>[...Ot,{action:Va.ADD,element:po.RELATIONSHIP,data:at,message:t("add_relationship")}]),y([]),[...vt,at]):vt=>{const Ot=vt.slice();return Ot.splice(at.id,0,at),Ot.map((Kt,sn)=>({...Kt,id:sn}))})},He=(at,st=!0)=>{st&&(e(vt=>[...vt,{action:Va.DELETE,element:po.RELATIONSHIP,data:n[at],message:t("delete_relationship",{refName:n[at].name})}]),y([])),u(vt=>vt.filter(Ot=>Ot.id!==at).map((Ot,Kt)=>({...Ot,id:Kt})))};return Ye.jsx(IAe.Provider,{value:{tables:i,setTables:a,addTable:D,updateTable:ge,updateField:Ee,deleteField:_e,deleteTable:ce,relationships:n,setRelationships:u,addRelationship:Be,deleteRelationship:He,database:s,setDatabase:o},children:r})}const xtt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEEAAABACAYAAABFqxrgAAAACXBIWXMAAAOWAAADlgE172qiAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAADIxJREFUeJztW3tYVWXW/629OXC4cw4oVxFR0VDRMlEbFcySGjO1MvMyk1byOU442jSGY980kxV+MuYF02zSpzSbzMpLWZaa1wEURURUUEBBQETgHO6Hc9nr++PAAYaLcDZxvucbf89z/tjvWWft9f72+6613rXXIQBwjZzt5ehAG5hpGBPs8f8eXC+wcKleIcVUHPxcQ+on57oJTEfB/KCtTetxMF+AUvmo6Bw8fAPAU2xtj01A5AuT0VMgYKStbbEtaKTAgIetzbApGB4CCGRrO2wKIkGwtQ3/F3CfBNwnAcB9EgAAdj1xE4WdCF9PNfx7qcnXSw0XRyUcFAo4Ks3JaXWtDkaTCZqqGtwp0+BWSSkXl2vBzD1h3i9DQrCfNx59OIyGD+xHIwYGIzjAh8Qu+mC9wYgrN25x2rUcXMjK5SPn0rmsovKXMBfkFTUvG+AguYrUbi54ccokmj5hDA3q69/tYdckSUi5cp33HD3Ne35OZL3B0E2a6aZsEpQO9lg+7xlh/pRJ5KR06CbDOkZxmQbvf75P2nnoOMvfMjJJ6OfrjR1vLRMGBvrZJOE6mnKRX3kvQaqr18vQQjetjg7OjkqbEgAAk0YNpw3LFsqOcFYreDZyLNmSgEY8PWE0De4bIMsOq0lQu7nKuW+3wstdni1Wk3Ao6TwbDEZZN+8OFN0tQ0pmtizvaDUJmfmFiN38qdRTCU1bqKnT4eV3E6R6vbxwKcup7PrxBL/w5hrpdqlGlhHWIO3aDZ685C+mC9dzAUAE2OqygNUhMtjPG7lFdwCYc4W5kyMoenqU0Ne3tzV2dBoXsnI44cvv+FByKkvmVSi2EGBmEEmd1ygjT1jz6nxh7a590h2NtkkdER4c2I9+/cjDFDlyGB4ICiBRFDvQcm/U6uqRnn2Tj5xN4+8Tz3Ej8WawABABgNLeHjp9s3yBSOrc4UMGCTv/+poQ0MsTL7wZ34KI5lA62CMsuC8NDgqAfy9PCvD2go+nCm7OTrC3s4PSXkEAUKOrZ4PRCE1lNYrLNCi8W875xSVIz83DtbxCNkltPFgiArMAANMmjEZ8zALEf7YX2789jGbyDAKD0QEZMkl4YsxDVF5RhRVbdkh7TyR3QwrbORARARCYGSGBfvhxw9twcVQCANKu3cCKzZ/iXGZ28x90sCropug0IGwJrCi2PhM5lgYE+JKj0gFTx4XT1HHhVFOnQ25RMYwmkxVTuzcEIvxqeChVVNcKOr0ezo5KfBUXCz8vtUXGx1OFOVERcLBXIDkjE5LEAEANnzaIIG23FVUGBwXQB39aJFz9YrP4UezvhVmTxlGf3p6y9YqCgBED+9GK3z4nJG2PF+v1BqGiugYAsHLB8xgU6N/qNwIRls56Ggfffwt9vHs1DlN70cPqekLKlWv8xJiHWil1dlRiRuRYmhE5lgDgVkkpMm8WcFZeIXIKb3NJeQVKNFpoq2vYaDShuk4HQSC4OTvB3dmJVK4uCPLzRrC/Dw3u649RoSHUuNRXbNmBlKvXLfdate0L1Onq8erMpyBQ6/l5qz1QU1fXNNCOb7DaJ9grFPhh3VtC2ICgHjk/7DuRjIVxmwCYJ1eqrbQ4wDFDB2H9soXo7+9jkTdJEmb+eTVOpV0xD7TrF2T4BJMkYf/JZH4k7AHy81L/okRkF9zGvL++D73BCJWrC37a+DfMemw8UrNyUaLRoqCkDDsPHYPRJCE8NASiIGD1jq+w+8hpswLz5NtzjFqrSQCAer0B3xxLZEEQ6KHB/btcQusMaup0eG7FahSVlkMgwqd/WYrhA4PRW+2BOVERcFI6IPlSFvQGIxLTr+JQcipEQcA723eb585gCB0lTzJI6O/vA01VNYwmE06mXeYDJ8+wKAg0IMCXHBQKGdNuiaXr/oGTaZcBALEvPoc5kyMs34mCgNFDBuHJsQ8h7Xouisu0uKupwE9nL0BqXPmEe2SPMkj48/yZwqXsm1xdpwMAlFdW4/DZNP74wGHOyM1Dda0OHm4u5O7s1FXVFvxj/09I2PMdAOCxUSMQH7MA1IYD7KVyx5zJEVC5uuDEhYwmAnAvAgCAtFZHBx9PFb54Z7kw+7/jpdtlTQeomjod9p88w/tPnmEAULm6YGhwIIUE+sNb7UG+Xip4uLqgsR4pCgIMBiOqautQWVOLwrvlXFByF5dv3EJ6trny1ae3FzYvX9RmBGiEnSiirl7flC1yQ7bYCcgquQ8JDqTjW+LElVt2SN8cT2KpDeerqarGqYtX+NTFK2bTOg0WAYKdKOLDNxZD5erSofT5zBys+ezrpoF7boMmyPZkajcXbHljsXBy62px9uQJ5NwQ02VCQENe88ZvnkX4kJAOhbXVNVj4XgIMRkum2oVTZDe+hhsU6I+Nr0ULmV9sFrevXCLMnjyBgqw5VpMlxcUjwx5AzPNPdSjOzFiy9iPcKiltHJLQpRUnYzucychqM2NUOthj6vhwmjo+nADgdqkGWXkFnJlXgJzCYr5TrkGpthKl2ipmMPQGA0wmhquzI+wVCrqeXygYTCZ4urtha+xi3Cvsbt17CD8knTdfdMEPNIfVJHy070eeFjGGRwzs12Gi5Oulgq+XiiJHDgPQfuXHaDJh6h9XwWAygYiQ8Mdo+HiqOrQhNSsHq7bvbhrogh9oDqu3g95oxHMr4qRzV693y/l5056DluNv9PQoPB4+okP58spqvPzuRuiNRphXf1eqSS1hNQkCESqqazEjNk5a98/9st4NXs7NR/xn3wAAQgL98OaC5zuUl5ixOH4LCkrKGkZIAqwvZlhNQviQEAIAXb0e7326Rxr/X7GmbQd+4sqa2i7p0RuNWBz/IfRGI+xEEZteXwSlfcf9pGt37cXRlIvmCwbPfPRX1k2iAVaTEDPzKRoSHGjZ47lFdxC7eYc0bG6M6aV3Nko7fzjGebdL7qlnzc6vceVGPgDgtdnT8GBIcIfyp9KuYO3n+yzX0yNG8yvTJss6wFntGF2dHLH7neXCK+8lSMkZWZalWKurx7enz/K3p88yALi7OCE0qA+FBPrDx1NFvVXuULm6wMVJiZyiO0j48jsCgGH9g7D0hWkd3rOotBwL4zZZssI5URHS+394WUjPvinLL8nKGL3VHti3ZqWw7cBhXr/7gHRXU9FKpqK6FkkZWZyUkQW0jt8iAIiigE2vR0Nh135lul5vwIJVG9DYqPG7Z57kt6PndkueI1uJKAiInh5FqZ+sE+NjFgjhoSHU1iGnDViETCYJy9ZvQ3vbh5mxdP3HSM3KAQC8NPVxvB09t9tqGFavhH8vgysd7DF/yiSaP2US3SopxYnUDE5Mv8pnMrI4vymbawI3yw3ZHPMn/n4l1i55CTMix7YQ3fDlt/jq538BACIeHIp3F82z1uw2YTUJXx9L5HHDQ9t8Gn16e2HeE5E074lIAoCq2jpcv1XE2QW3UaqtRHGZhg+cOovCu2Xw81JjblQk1u7ai6raOkSv/gBHUi7i70tegqODPX5IOo+4T/YAAIL9ffDxyhjY/dsLne//dU6WT7C6nnApJw+D+wZ0qj/JQaGAr5eahgQH0qjQgTRxZBjt+vEElVZUIrRfID740yKMGToYx1MvoaZOh8s38nEwMQW+niq8+vetqDcY4OrkiK/iYhHQ26uF7vOZOfzaxu1tv6DpFGSU3JkZC+M2SbsPn7LqKRQ31CB8vcyp8fgRoTj2wbuYaE6vcS2/CPNXrUdVbR1EQcC2lTEY3DeghY6fz6XzsyviJLlNXLIco0mS8OrardKLf1sn3Wpr37cDiRmNSVXzOkEvlTtenzMDoUF9zK6igd63o+di4sgwi1xRaTl+9z+bpVlvrpFqGipbctAtfYzfJ53nI+fSTU+PG0ULnnqMGrPJ9lBZU2spgbm7OIGZcfhsGhL2fIdkcygFADgpHfCHWVMRPT0KRpMJSZeyeMf3P/PBxBRuVjuQjW7rY2wOH7UHJj4cRhNGDKFhA4LQ39+Hmjuz/OK7GDl/GQBg4sgw3C4tR2ZegeV7T3c3zJ8yCaOHhvCNwjtIvHSVj6de4orqrqXknUM39DF2BvZ2dugf4EM+ahV6q9zBAL48errVVnRSOqCXyo0NepN0R6NtFYZ/GfQQCa3vCwK38EcMIu6xZuaWxtzskQbvVmCwxe0RmfsHbNj7ZBsSAFiKILabuwX3/++A+yQAAISO+3n+A8AsCQDa7rr6TwFBK4Ckc7a2w5YgQooAB+VyMF+wtTE2gcSp0OnfIABwnzJHpTDQRiIKY3DP/H3FhiBQPUt80WhQLNEe/0T7v5vnMV9N9djHAAAAAElFTkSuQmCC";function _tt(r,t){if(r.match(/^[a-z]+:\/\//i))return r;if(r.match(/^\/\//))return window.location.protocol+r;if(r.match(/^[a-z]+:/i))return r;const s=document.implementation.createHTMLDocument(),o=s.createElement("base"),i=s.createElement("a");return s.head.appendChild(o),s.body.appendChild(i),t&&(o.href=t),i.href=r,i.href}const Ttt=(()=>{let r=0;const t=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(r+=1,`u${t()}${r}`)})();function SC(r){const t=[];for(let s=0,o=r.length;sVv||r.height>Vv)&&(r.width>Vv&&r.height>Vv?r.width>r.height?(r.height*=Vv/r.width,r.width=Vv):(r.width*=Vv/r.height,r.height=Vv):r.width>Vv?(r.height*=Vv/r.width,r.width=Vv):(r.width*=Vv/r.height,r.height=Vv))}function RP(r){return new Promise((t,s)=>{const o=new Image;o.decode=()=>t(o),o.onload=()=>t(o),o.onerror=s,o.crossOrigin="anonymous",o.decoding="async",o.src=r})}async function Btt(r){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(r)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function ktt(r,t,s){const o="http://www.w3.org/2000/svg",i=document.createElementNS(o,"svg"),a=document.createElementNS(o,"foreignObject");return i.setAttribute("width",`${t}`),i.setAttribute("height",`${s}`),i.setAttribute("viewBox",`0 0 ${t} ${s}`),a.setAttribute("width","100%"),a.setAttribute("height","100%"),a.setAttribute("x","0"),a.setAttribute("y","0"),a.setAttribute("externalResourcesRequired","true"),i.appendChild(a),a.appendChild(r),Btt(i)}const Fv=(r,t)=>{if(r instanceof t)return!0;const s=Object.getPrototypeOf(r);return s===null?!1:s.constructor.name===t.name||Fv(s,t)};function Ptt(r){const t=r.getPropertyValue("content");return`${r.cssText} content: '${t.replace(/'|"/g,"")}';`}function Dtt(r){return SC(r).map(t=>{const s=r.getPropertyValue(t),o=r.getPropertyPriority(t);return`${t}: ${s}${o?" !important":""};`}).join(" ")}function Ftt(r,t,s){const o=`.${r}:${t}`,i=s.cssText?Ptt(s):Dtt(s);return document.createTextNode(`${o}{${i}}`)}function Xee(r,t,s){const o=window.getComputedStyle(r,s),i=o.getPropertyValue("content");if(i===""||i==="none")return;const a=Ttt();try{t.className=`${t.className} ${a}`}catch{return}const n=document.createElement("style");n.appendChild(Ftt(a,s,o)),t.appendChild(n)}function Mtt(r,t){Xee(r,t,":before"),Xee(r,t,":after")}const Zee="application/font-woff",Jee="image/jpeg",Utt={woff:Zee,woff2:Zee,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:Jee,jpeg:Jee,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function $tt(r){const t=/\.([^./]*?)$/g.exec(r);return t?t[1]:""}function jG(r){const t=$tt(r).toLowerCase();return Utt[t]||""}function jtt(r){return r.split(/,/)[1]}function rj(r){return r.search(/^(data:)/)!==-1}function RAe(r,t){return`data:${t};base64,${r}`}async function BAe(r,t,s){const o=await fetch(r,t);if(o.status===404)throw new Error(`Resource "${o.url}" not found`);const i=await o.blob();return new Promise((a,n)=>{const u=new FileReader;u.onerror=n,u.onloadend=()=>{try{a(s({res:o,result:u.result}))}catch(f){n(f)}},u.readAsDataURL(i)})}const AU={};function Htt(r,t,s){let o=r.replace(/\?.*/,"");return s&&(o=r),/ttf|otf|eot|woff2?/i.test(o)&&(o=o.replace(/.*\//,"")),t?`[${t}]${o}`:o}async function HG(r,t,s){const o=Htt(r,t,s.includeQueryParams);if(AU[o]!=null)return AU[o];s.cacheBust&&(r+=(/\?/.test(r)?"&":"?")+new Date().getTime());let i;try{const a=await BAe(r,s.fetchRequestInit,({res:n,result:u})=>(t||(t=n.headers.get("Content-Type")||""),jtt(u)));i=RAe(a,t)}catch(a){i=s.imagePlaceholder||"";let n=`Failed to fetch resource: ${r}`;a&&(n=typeof a=="string"?a:a.message),n&&console.warn(n)}return AU[o]=i,i}async function Qtt(r){const t=r.toDataURL();return t==="data:,"?r.cloneNode(!1):RP(t)}async function Ktt(r,t){if(r.currentSrc){const a=document.createElement("canvas"),n=a.getContext("2d");a.width=r.clientWidth,a.height=r.clientHeight,n==null||n.drawImage(r,0,0,a.width,a.height);const u=a.toDataURL();return RP(u)}const s=r.poster,o=jG(s),i=await HG(s,o,t);return RP(i)}async function ztt(r){var t;try{if(!((t=r==null?void 0:r.contentDocument)===null||t===void 0)&&t.body)return await HF(r.contentDocument.body,{},!0)}catch{}return r.cloneNode(!1)}async function Vtt(r,t){return Fv(r,HTMLCanvasElement)?Qtt(r):Fv(r,HTMLVideoElement)?Ktt(r,t):Fv(r,HTMLIFrameElement)?ztt(r):r.cloneNode(!1)}const Gtt=r=>r.tagName!=null&&r.tagName.toUpperCase()==="SLOT";async function Wtt(r,t,s){var o,i;let a=[];return Gtt(r)&&r.assignedNodes?a=SC(r.assignedNodes()):Fv(r,HTMLIFrameElement)&&(!((o=r.contentDocument)===null||o===void 0)&&o.body)?a=SC(r.contentDocument.body.childNodes):a=SC(((i=r.shadowRoot)!==null&&i!==void 0?i:r).childNodes),a.length===0||Fv(r,HTMLVideoElement)||await a.reduce((n,u)=>n.then(()=>HF(u,s)).then(f=>{f&&t.appendChild(f)}),Promise.resolve()),t}function qtt(r,t){const s=t.style;if(!s)return;const o=window.getComputedStyle(r);o.cssText?(s.cssText=o.cssText,s.transformOrigin=o.transformOrigin):SC(o).forEach(i=>{let a=o.getPropertyValue(i);i==="font-size"&&a.endsWith("px")&&(a=`${Math.floor(parseFloat(a.substring(0,a.length-2)))-.1}px`),Fv(r,HTMLIFrameElement)&&i==="display"&&a==="inline"&&(a="block"),i==="d"&&t.getAttribute("d")&&(a=`path(${t.getAttribute("d")})`),s.setProperty(i,a,o.getPropertyPriority(i))})}function Ytt(r,t){Fv(r,HTMLTextAreaElement)&&(t.innerHTML=r.value),Fv(r,HTMLInputElement)&&t.setAttribute("value",r.value)}function Xtt(r,t){if(Fv(r,HTMLSelectElement)){const s=t,o=Array.from(s.children).find(i=>r.value===i.getAttribute("value"));o&&o.setAttribute("selected","")}}function Ztt(r,t){return Fv(t,Element)&&(qtt(r,t),Mtt(r,t),Ytt(r,t),Xtt(r,t)),t}async function Jtt(r,t){const s=r.querySelectorAll?r.querySelectorAll("use"):[];if(s.length===0)return r;const o={};for(let a=0;aVtt(o,t)).then(o=>Wtt(r,o,t)).then(o=>Ztt(r,o)).then(o=>Jtt(o,t))}const kAe=/url\((['"]?)([^'"]+?)\1\)/g,ent=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,tnt=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function nnt(r){const t=r.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`,"g")}function rnt(r){const t=[];return r.replace(kAe,(s,o,i)=>(t.push(i),s)),t.filter(s=>!rj(s))}async function snt(r,t,s,o,i){try{const a=s?_tt(t,s):t,n=jG(t);let u;if(i){const f=await i(a);u=RAe(f,n)}else u=await HG(a,n,o);return r.replace(nnt(t),`$1${u}$3`)}catch{}return r}function ont(r,{preferredFontFormat:t}){return t?r.replace(tnt,s=>{for(;;){const[o,,i]=ent.exec(s)||[];if(!i)return"";if(i===t)return`src: ${o};`}}):r}function PAe(r){return r.search(kAe)!==-1}async function DAe(r,t,s){if(!PAe(r))return r;const o=ont(r,s);return rnt(o).reduce((a,n)=>a.then(u=>snt(u,n,t,s)),Promise.resolve(o))}async function ZR(r,t,s){var o;const i=(o=t.style)===null||o===void 0?void 0:o.getPropertyValue(r);if(i){const a=await DAe(i,null,s);return t.style.setProperty(r,a,t.style.getPropertyPriority(r)),!0}return!1}async function int(r,t){await ZR("background",r,t)||await ZR("background-image",r,t),await ZR("mask",r,t)||await ZR("mask-image",r,t)}async function ant(r,t){const s=Fv(r,HTMLImageElement);if(!(s&&!rj(r.src))&&!(Fv(r,SVGImageElement)&&!rj(r.href.baseVal)))return;const o=s?r.src:r.href.baseVal,i=await HG(o,jG(o),t);await new Promise((a,n)=>{r.onload=a,r.onerror=n;const u=r;u.decode&&(u.decode=a),u.loading==="lazy"&&(u.loading="eager"),s?(r.srcset="",r.src=i):r.href.baseVal=i})}async function lnt(r,t){const o=SC(r.childNodes).map(i=>FAe(i,t));await Promise.all(o).then(()=>r)}async function FAe(r,t){Fv(r,Element)&&(await int(r,t),await ant(r,t),await lnt(r,t))}function unt(r,t){const{style:s}=r;t.backgroundColor&&(s.backgroundColor=t.backgroundColor),t.width&&(s.width=`${t.width}px`),t.height&&(s.height=`${t.height}px`);const o=t.style;return o!=null&&Object.keys(o).forEach(i=>{s[i]=o[i]}),r}const ete={};async function tte(r){let t=ete[r];if(t!=null)return t;const o=await(await fetch(r)).text();return t={url:r,cssText:o},ete[r]=t,t}async function nte(r,t){let s=r.cssText;const o=/url\(["']?([^"')]+)["']?\)/g,a=(s.match(/url\([^)]+\)/g)||[]).map(async n=>{let u=n.replace(o,"$1");return u.startsWith("https://")||(u=new URL(u,r.url).href),BAe(u,t.fetchRequestInit,({result:f})=>(s=s.replace(n,`url(${f})`),[n,f]))});return Promise.all(a).then(()=>s)}function rte(r){if(r==null)return[];const t=[],s=/(\/\*[\s\S]*?\*\/)/gi;let o=r.replace(s,"");const i=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const f=i.exec(o);if(f===null)break;t.push(f[0])}o=o.replace(i,"");const a=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,n="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",u=new RegExp(n,"gi");for(;;){let f=a.exec(o);if(f===null){if(f=u.exec(o),f===null)break;a.lastIndex=u.lastIndex}else u.lastIndex=a.lastIndex;t.push(f[0])}return t}async function cnt(r,t){const s=[],o=[];return r.forEach(i=>{if("cssRules"in i)try{SC(i.cssRules||[]).forEach((a,n)=>{if(a.type===CSSRule.IMPORT_RULE){let u=n+1;const f=a.href,e=tte(f).then(y=>nte(y,t)).then(y=>rte(y).forEach(_=>{try{i.insertRule(_,_.startsWith("@import")?u+=1:i.cssRules.length)}catch(T){console.error("Error inserting rule from remote css",{rule:_,error:T})}})).catch(y=>{console.error("Error loading remote css",y.toString())});o.push(e)}})}catch(a){const n=r.find(u=>u.href==null)||document.styleSheets[0];i.href!=null&&o.push(tte(i.href).then(u=>nte(u,t)).then(u=>rte(u).forEach(f=>{n.insertRule(f,i.cssRules.length)})).catch(u=>{console.error("Error loading remote stylesheet",u)})),console.error("Error inlining remote css file",a)}}),Promise.all(o).then(()=>(r.forEach(i=>{if("cssRules"in i)try{SC(i.cssRules||[]).forEach(a=>{s.push(a)})}catch(a){console.error(`Error while reading CSS rules from ${i.href}`,a)}}),s))}function fnt(r){return r.filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>PAe(t.style.getPropertyValue("src")))}async function dnt(r,t){if(r.ownerDocument==null)throw new Error("Provided element is not within a Document");const s=SC(r.ownerDocument.styleSheets),o=await cnt(s,t);return fnt(o)}async function hnt(r,t){const s=await dnt(r,t);return(await Promise.all(s.map(i=>{const a=i.parentStyleSheet?i.parentStyleSheet.href:null;return DAe(i.cssText,a,t)}))).join(` +`)}async function Ant(r,t){const s=t.fontEmbedCSS!=null?t.fontEmbedCSS:t.skipFonts?null:await hnt(r,t);if(s){const o=document.createElement("style"),i=document.createTextNode(s);o.appendChild(i),r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o)}}async function MAe(r,t={}){const{width:s,height:o}=OAe(r,t),i=await HF(r,t,!0);return await Ant(i,t),await FAe(i,t),unt(i,t),await ktt(i,s,o)}async function UAe(r,t={}){const{width:s,height:o}=OAe(r,t),i=await MAe(r,t),a=await RP(i),n=document.createElement("canvas"),u=n.getContext("2d"),f=t.pixelRatio||Ott(),e=t.canvasWidth||s,y=t.canvasHeight||o;return n.width=e*f,n.height=y*f,t.skipAutoScale||Rtt(n),n.style.width=`${e}`,n.style.height=`${y}`,t.backgroundColor&&(u.fillStyle=t.backgroundColor,u.fillRect(0,0,n.width,n.height)),u.drawImage(a,0,0,n.width,n.height),n}async function sj(r,t={}){return(await UAe(r,t)).toDataURL()}async function ste(r,t={}){return(await UAe(r,t)).toDataURL("image/jpeg",t.quality||1)}var $Ae={exports:{}};(function(r,t){(function(s,o){o()})(om,function(){function s(e,y){return typeof y>"u"?y={autoBom:!1}:typeof y!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),y={autoBom:!y}),y.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\uFEFF",e],{type:e.type}):e}function o(e,y,_){var T=new XMLHttpRequest;T.open("GET",e),T.responseType="blob",T.onload=function(){f(T.response,y,_)},T.onerror=function(){console.error("could not download file")},T.send()}function i(e){var y=new XMLHttpRequest;y.open("HEAD",e,!1);try{y.send()}catch{}return 200<=y.status&&299>=y.status}function a(e){try{e.dispatchEvent(new MouseEvent("click"))}catch{var y=document.createEvent("MouseEvents");y.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(y)}}var n=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof om=="object"&&om.global===om?om:void 0,u=n.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),f=n.saveAs||(typeof window!="object"||window!==n?function(){}:"download"in HTMLAnchorElement.prototype&&!u?function(e,y,_){var T=n.URL||n.webkitURL,D=document.createElement("a");y=y||e.name||"download",D.download=y,D.rel="noopener",typeof e=="string"?(D.href=e,D.origin===location.origin?a(D):i(D.href)?o(e,y,_):a(D,D.target="_blank")):(D.href=T.createObjectURL(e),setTimeout(function(){T.revokeObjectURL(D.href)},4e4),setTimeout(function(){a(D)},0))}:"msSaveOrOpenBlob"in navigator?function(e,y,_){if(y=y||e.name||"download",typeof e!="string")navigator.msSaveOrOpenBlob(s(e,_),y);else if(i(e))o(e,y,_);else{var T=document.createElement("a");T.href=e,T.target="_blank",setTimeout(function(){a(T)})}}:function(e,y,_,T){if(T=T||open("","_blank"),T&&(T.document.title=T.document.body.innerText="downloading..."),typeof e=="string")return o(e,y,_);var D=e.type==="application/octet-stream",ce=/constructor/i.test(n.HTMLElement)||n.safari,ge=/CriOS\/[\d]+/.test(navigator.userAgent);if((ge||D&&ce||u)&&typeof FileReader<"u"){var Ee=new FileReader;Ee.onloadend=function(){var He=Ee.result;He=ge?He:He.replace(/^data:[^;]*;/,"data:attachment/file;"),T?T.location.href=He:location=He,T=null},Ee.readAsDataURL(e)}else{var _e=n.URL||n.webkitURL,Be=_e.createObjectURL(e);T?T.location=Be:location.href=Be,T=null,setTimeout(function(){_e.revokeObjectURL(Be)},4e4)}});n.saveAs=f.saveAs=f,r.exports=f})})($Ae);var oj=$Ae.exports;function pnt(r){const t=atob(r.split(",")[1]),s=r.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(t.length),i=new Uint8Array(o);for(let a=0;a_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},SMALLINT:{type:"SMALLINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},BIGINT:{type:"BIGINT",checkDefault:r=>_g.test(r.default),isSized:!1,hasCheck:!0,hasPrecision:!1,canIncrement:!0},DECIMAL:{type:"DECIMAL",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},NUMERIC:{type:"NUMERIC",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},FLOAT:{type:"FLOAT",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},DOUBLE:{type:"DOUBLE",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},REAL:{type:"REAL",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1},CHAR:{type:"CHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!0},VARCHAR:{type:"VARCHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:255,hasQuotes:!0},TEXT:{type:"TEXT",checkDefault:r=>!0,hasCheck:!1,isSized:!0,hasPrecision:!1,defaultSize:65535,hasQuotes:!0},TIME:{type:"TIME",checkDefault:r=>/^(?:[01]?\d|2[0-3]):[0-5]?\d:[0-5]?\d$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},TIMESTAMP:{type:"TIMESTAMP",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1970&&parseInt(s[0])<=2038},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},DATE:{type:"DATE",checkDefault:r=>/^\d{4}-\d{2}-\d{2}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},DATETIME:{type:"DATETIME",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1e3&&parseInt(s[0])<=9999},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},BOOLEAN:{type:"BOOLEAN",checkDefault:r=>r.default.toLowerCase()==="false"||r.default.toLowerCase()==="true"||r.default==="0"||r.default==="1",hasCheck:!1,isSized:!1,hasPrecision:!1},BINARY:{type:"BINARY",checkDefault:r=>r.default.length<=r.size&&hT.test(r.default),hasCheck:!1,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!0},VARBINARY:{type:"VARBINARY",checkDefault:r=>r.default.length<=r.size&&hT.test(r.default),hasCheck:!1,isSized:!0,hasPrecision:!1,defaultSize:255,hasQuotes:!0},BLOB:{type:"BLOB",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},JSON:{type:"JSON",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},UUID:{type:"UUID",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},ENUM:{type:"ENUM",checkDefault:r=>r.values.includes(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},SET:{type:"SET",checkDefault:r=>{const t=r.default.split(",");for(let s=0;st in r?r[t]:!1}),ynt={TINYINT:{type:"TINYINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},SMALLINT:{type:"SMALLINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},MEDIUMINT:{type:"MEDIUMINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},INTEGER:{type:"INTEGER",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},BIGINT:{type:"BIGINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},DECIMAL:{type:"DECIMAL",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},NUMERIC:{type:"NUMERIC",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},FLOAT:{type:"FLOAT",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},DOUBLE:{type:"DOUBLE",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},BIT:{type:"BIT",checkDefault:r=>r.default==="1"||r.default==="0",hasCheck:!0,isSized:!1,hasPrecision:!0},BOOLEAN:{type:"BOOLEAN",checkDefault:r=>r.default.toLowerCase()==="false"||r.default.toLowerCase()==="true"||r.default==="0"||r.default==="1",hasCheck:!1,isSized:!1,hasPrecision:!1},TIME:{type:"TIME",checkDefault:r=>/^(?:[01]?\d|2[0-3]):[0-5]?\d:[0-5]?\d$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},TIMESTAMP:{type:"TIMESTAMP",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1970&&parseInt(s[0])<=2038},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},DATE:{type:"DATE",checkDefault:r=>/^\d{4}-\d{2}-\d{2}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},DATETIME:{type:"DATETIME",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1e3&&parseInt(s[0])<=9999},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},YEAR:{type:"YEAR",checkDefault:r=>/^\d{4}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1},CHAR:{type:"CHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!0},VARCHAR:{type:"VARCHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:255,hasQuotes:!0},BINARY:{type:"BINARY",checkDefault:r=>r.default.length<=r.size&&hT.test(r.default),hasCheck:!1,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!0},VARBINARY:{type:"VARBINARY",checkDefault:r=>r.default.length<=r.size&&hT.test(r.default),hasCheck:!1,isSized:!0,hasPrecision:!1,defaultSize:255,hasQuotes:!0},TINYBLOB:{type:"TINYBLOB",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},BLOB:{type:"BLOB",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},MEDIUMBLOB:{type:"MEDIUMBLOB",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},LONGBLOB:{type:"LONGBLOB",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},TINYTEXT:{type:"TINYTEXT",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:65535,hasQuotes:!0},TEXT:{type:"TEXT",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:65535,hasQuotes:!0},MEDIUMTEXT:{type:"MEDIUMTEXT",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:65535,hasQuotes:!0},LONGTEXT:{type:"LONGTEXT",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:65535,hasQuotes:!0},ENUM:{type:"ENUM",checkDefault:r=>r.values.includes(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},SET:{type:"SET",checkDefault:r=>{const t=r.default.split(",");for(let s=0;s!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},POINT:{type:"POINT",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},LINESTRING:{type:"LINESTRING",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},POLYGON:{type:"POLYGON",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},MULTIPOINT:{type:"MULTIPOINT",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},MULTILINESTRING:{type:"MULTILINESTRING",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},MULTIPOLYGON:{type:"MULTIPOLYGON",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},GEOMETRYCOLLECTION:{type:"GEOMETRYCOLLECTION",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},JSON:{type:"JSON",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0}},ote=new Proxy(ynt,{get:(r,t)=>t in r?r[t]:!1}),wnt={SMALLINT:{type:"SMALLINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},INTEGER:{type:"INTEGER",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},BIGINT:{type:"BIGINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},DECIMAL:{type:"DECIMAL",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},NUMERIC:{type:"NUMERIC",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},REAL:{type:"REAL",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},"DOUBLE PRECISION":{type:"DOUBLE PRECISION",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},SMALLSERIAL:{type:"SMALLSERIAL",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1},SERIAL:{type:"SERIAL",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1},BIGSERIAL:{type:"BIGSERIAL",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1},MONEY:{type:"MONEY",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},CHAR:{type:"CHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!0},VARCHAR:{type:"VARCHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:255,hasQuotes:!0},TEXT:{type:"TEXT",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:65535,hasQuotes:!0},BYTEA:{type:"BYTEA",checkDefault:r=>/^[0-9a-fA-F]*$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,defaultSize:null,hasQuotes:!0},DATE:{type:"DATE",checkDefault:r=>/^\d{4}-\d{2}-\d{2}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},TIME:{type:"TIME",checkDefault:r=>/^(?:[01]?\d|2[0-3]):[0-5]?\d:[0-5]?\d$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},TIMESTAMP:{type:"TIMESTAMP",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1970&&parseInt(s[0])<=2038},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},TIMESTAMPTZ:{type:"TIMESTAMPTZ",checkDefault:r=>r.default.toUpperCase()==="CURRENT_TIMESTAMP"?!0:/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}([+-]\d{2}:\d{2})?$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},INTERVAL:{type:"INTERVAL",checkDefault:r=>/^['"\d\s\\-]+$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},BOOLEAN:{type:"BOOLEAN",checkDefault:r=>/^(true|false)$/i.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!1},POINT:{type:"POINT",checkDefault:r=>/^\(\d+,\d+\)$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!1},LINE:{type:"LINE",checkDefault:r=>/^(\(\d+,\d+\),)+\(\d+,\d+\)$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!1},LSEG:{type:"LSEG",checkDefault:r=>/^(\(\d+,\d+\),)+\(\d+,\d+\)$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!1},BOX:{type:"BOX",checkDefault:r=>/^\(\d+(\.\d+)?,\d+(\.\d+)?\),\(\d+(\.\d+)?,\d+(\.\d+)?\)$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},PATH:{type:"PATH",checkDefault:r=>/^\((\d+(\.\d+)?,\d+(\.\d+)?(,\d+(\.\d+)?,\d+(\.\d+)?)*?)\)$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},POLYGON:{type:"POLYGON",checkDefault:r=>/^\((\d+(\.\d+)?,\d+(\.\d+)?(,\d+(\.\d+)?,\d+(\.\d+)?)*?)\)$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},CIRCLE:{type:"CIRCLE",checkDefault:r=>/^<\(\d+(\.\d+)?,\d+(\.\d+)?\),\d+(\.\d+)?\\>$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},CIDR:{type:"CIDR",checkDefault:r=>/^(\d{1,3}\.){3}\d{1,3}\/\d{1,2}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},INET:{type:"INET",checkDefault:r=>/^(\d{1,3}\.){3}\d{1,3}(\/\d{1,2})?$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},MACADDR:{type:"MACADDR",checkDefault:r=>/^([A-Fa-f0-9]{2}:){5}[A-Fa-f0-9]{2}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},MACADDR8:{type:"MACADDR8",checkDefault:r=>/^([A-Fa-f0-9]{2}:){7}[A-Fa-f0-9]{2}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},BIT:{type:"BIT",checkDefault:r=>/^[01]{1,}$/.test(r.default),hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!1},VARBIT:{type:"VARBIT",checkDefault:r=>/^[01]*$/.test(r.default),hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!1},TSVECTOR:{type:"TSVECTOR",checkDefault:r=>/^[A-Za-z0-9: ]*$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!1},TSQUERY:{type:"TSQUERY",checkDefault:r=>/^[A-Za-z0-9: &|!()]*$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!1},JSON:{type:"JSON",checkDefault:r=>!0,hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0,noDefault:!0},JSONB:{type:"JSONB",checkDefault:r=>!0,hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0,noDefault:!0},UUID:{type:"UUID",checkDefault:r=>/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0,noDefault:!0},XML:{type:"XML",checkDefault:r=>!0,hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0,noDefault:!0}},Cnt=new Proxy(wnt,{get:(r,t)=>t in r?r[t]:!1}),Ent={INTEGER:{type:"INTEGER",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},REAL:{type:"REAL",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},NUMERIC:{type:"NUMERIC",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},BOOLEAN:{type:"BOOLEAN",checkDefault:r=>r.default.toLowerCase()==="false"||r.default.toLowerCase()==="true"||r.default==="0"||r.default==="1",hasCheck:!1,isSized:!1,hasPrecision:!1},VARCHAR:{type:"VARCHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:255,hasQuotes:!0},TEXT:{type:"TEXT",checkDefault:r=>!0,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:65535,hasQuotes:!0},BLOB:{type:"BLOB",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},TIME:{type:"TIME",checkDefault:r=>/^(?:[01]?\d|2[0-3]):[0-5]?\d:[0-5]?\d$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},TIMESTAMP:{type:"TIMESTAMP",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1970&&parseInt(s[0])<=2038},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},DATE:{type:"DATE",checkDefault:r=>/^\d{4}-\d{2}-\d{2}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},DATETIME:{type:"DATETIME",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1e3&&parseInt(s[0])<=9999},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0}},Lnt=new Proxy(Ent,{get:(r,t)=>t in r?r[t]:!1}),Snt={TINYINT:{type:"TINYINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},SMALLINT:{type:"SMALLINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},INTEGER:{type:"INTEGER",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},BIGINT:{type:"BIGINT",checkDefault:r=>_g.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1,canIncrement:!0},BIT:{type:"BIT",checkDefault:r=>r.default==="1"||r.default==="0",hasCheck:!0,isSized:!1,hasPrecision:!0},DECIMAL:{type:"DECIMAL",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},NUMERIC:{type:"NUMERIC",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},FLOAT:{type:"FLOAT",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},DOUBLE:{type:"DOUBLE",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},REAL:{type:"REAL",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!1},MONEY:{type:"MONEY",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},SMALLMONEY:{type:"MONEY",checkDefault:r=>Nm.test(r.default),hasCheck:!0,isSized:!1,hasPrecision:!0},DATE:{type:"DATE",checkDefault:r=>/^\d{4}-\d{2}-\d{2}$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},DATETIME:{type:"DATETIME",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1e3&&parseInt(s[0])<=9999},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},DATETIME2:{type:"DATETIME2",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1e3&&parseInt(s[0])<=9999},hasCheck:!1,isSized:!1,hasPrecision:!0,hasQuotes:!0},DATETIMEOFFSET:{type:"DATETIMEOFFSET",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}(\.\d{1,7})?([+-]\d{2}:\d{2})?$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1e3&&parseInt(s[0])<=9999},hasCheck:!1,isSized:!1,hasPrecision:!0,hasQuotes:!0},SMALLDATETIME:{type:"SMALLDATETIME",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}(:\d{2})?$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1900&&parseInt(s[0])<=2079},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},TIME:{type:"TIME",checkDefault:r=>/^(?:[01]?\d|2[0-3]):[0-5]?\d:[0-5]?\d$/.test(r.default),hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},TIMESTAMP:{type:"TIMESTAMP",checkDefault:r=>{if(r.default.toUpperCase()==="CURRENT_TIMESTAMP")return!0;if(!/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(r.default))return!1;const s=r.default.split(" ")[0].split("-");return parseInt(s[0])>=1970&&parseInt(s[0])<=2038},hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0},CHAR:{type:"CHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!0},VARCHAR:{type:"VARCHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:255,hasQuotes:!0},TEXT:{type:"TEXT",checkDefault:r=>!0,hasCheck:!1,isSized:!0,hasPrecision:!1,defaultSize:65535,hasQuotes:!0},NCHAR:{type:"CHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!0},NVARCHAR:{type:"VARCHAR",checkDefault:r=>ab(r.default)?r.default.length-2<=r.size:r.default.length<=r.size,hasCheck:!0,isSized:!0,hasPrecision:!1,defaultSize:255,hasQuotes:!0},NTEXT:{type:"TEXT",checkDefault:r=>!0,hasCheck:!1,isSized:!0,hasPrecision:!1,defaultSize:65535,hasQuotes:!0},BINARY:{type:"BINARY",checkDefault:r=>r.default.length<=r.size&&hT.test(r.default),hasCheck:!1,isSized:!0,hasPrecision:!1,defaultSize:1,hasQuotes:!0},VARBINARY:{type:"VARBINARY",checkDefault:r=>r.default.length<=r.size&&hT.test(r.default),hasCheck:!1,isSized:!0,hasPrecision:!1,defaultSize:255,hasQuotes:!0},IMAGE:{type:"IMAGE",checkDefault:r=>!0,hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0,noDefault:!0},UNIQUEIDENTIFIER:{type:"UNIQUEIDENTIFIER",checkDefault:r=>!0,isSized:!1,hasCheck:!1,hasPrecision:!1,noDefault:!0},XML:{type:"XML",checkDefault:r=>!0,hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0,noDefault:!0},CURSOR:{type:"CURSOR",checkDefault:r=>!0,hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!1,noDefault:!0},SQL_VARIANT:{type:"SQL_VARIANT",checkDefault:r=>!0,hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!1,noDefault:!0},JSON:{type:"JSON",checkDefault:r=>!0,hasCheck:!1,isSized:!1,hasPrecision:!1,hasQuotes:!0,noDefault:!0}},xnt=new Proxy(Snt,{get:(r,t)=>t in r?r[t]:!1}),_nt={[$a.GENERIC]:q4,[$a.MYSQL]:ote,[$a.POSTGRES]:Cnt,[$a.SQLITE]:Lnt,[$a.MSSQL]:xnt,[$a.MARIADB]:ote},ah=new Proxy(_nt,{get:(r,t)=>t in r?r[t]:!1});function Dw(r,t=$a.GENERIC){return ab(r.default)||jAe(r.default)||bnt(r.default)||!ah[t][r.type].hasQuotes?r.default:`'${r.default}'`}function Tnt(r){if(!Object.keys(q4).includes(r.type))return'{ "type" : "object", additionalProperties : true }';switch(r.type){case"INT":case"SMALLINT":case"BIGINT":case"DECIMAL":case"NUMERIC":case"REAL":case"FLOAT":return'{ "type" : "number" }';case"BOOLEAN":return'{ "type" : "boolean" }';case"JSON":return'{ "type" : "object", "additionalProperties" : true }';case"ENUM":return`{ + "type" : "string", + "enum" : [${r.values.map(t=>`"${t}"`).join(", ")}] + }`;case"SET":return`{ + "type": "array", + "items": { + "type": "string", + "enum": [${r.values.map(t=>`"${t}"`).join(", ")}] + } + }`;default:return'{ "type" : "string"}'}}function HAe(r){return`{ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + ${r.fields.map(t=>`"${t.name}" : ${Tnt(t)}`).join(`, + `)} + }, + "additionalProperties": false + }`}function W2(r,t,s="mysql",o=!1){if(s==="mysql")return r.type==="UUID"?"VARCHAR(36)":ah[t][r.type].isSized||ah[t][r.type].hasPrecision?`${r.type}${r.size?`(${r.size})`:""}`:r.type==="SET"||r.type==="ENUM"?`${r.type}(${r.values.map(i=>`"${i}"`).join(", ")})`:Object.keys(q4).includes(r.type)?r.type:"JSON";if(s==="postgres")return r.type==="SMALLINT"&&r.increment?"smallserial":r.type==="INT"&&r.increment?"serial":r.type==="BIGINT"&&r.increment?"bigserial":r.type==="ENUM"?`${r.name}_t`:r.type==="SET"?`${r.name}_t[]`:r.type==="TIMESTAMP"?"TIMESTAMPTZ":r.type==="DATETIME"?"timestamp":ah[t][r.type].isSized?`${r.type==="BINARY"?"bit":r.type==="VARBINARY"?"bit varying":r.type.toLowerCase()}(${r.size})`:ah[t][r.type].hasPrecision&&r.size!==""?`${r.type}${r.size}`:r.type.toLowerCase();if(s==="mssql"){let i=r.type;switch(r.type){case"ENUM":return o?"NVARCHAR(255)":`NVARCHAR(255) CHECK([${r.name}] in (${r.values.map(a=>`'${a}'`).join(", ")}))`;case"VARCHAR":i="NVARCHAR";break;case"UUID":i="UNIQUEIDENTIFIER";break;case"DOUBLE":i="FLOAT";break;case"BOOLEAN":return"BIT";case"SET":return"NVARCHAR(255)";case"BLOB":return"VARBINARY(MAX)";case"JSON":return"NVARCHAR(MAX)";case"TEXT":return"TEXT";default:i=r.type;break}return ah[t][r.type].isSized?`${i}(${r.size})`:i}}function Nnt(r){return`${r.tables.map(t=>`${t.comment===""?"":`/* ${t.comment} */ +`}CREATE TABLE \`${t.name}\` ( +${t.fields.map(s=>`${s.comment===""?"":` -- ${s.comment} +`} \`${s.name}\` ${W2(s,r.database)}${s.notNull?" NOT NULL":""}${s.increment?" AUTO_INCREMENT":""}${s.unique?" UNIQUE":""}${s.default!==""?` DEFAULT ${Dw(s,r.database)}`:""}${s.check===""||!ah[r.database][s.type].hasCheck?Object.keys(q4).includes(s.type)?"":` CHECK( + JSON_SCHEMA_VALID("${HAe(r.types.find(o=>o.name===s.type.toLowerCase()))}", \`${s.name}\`))`:` CHECK(${s.check})`}${s.comment?` COMMENT '${s.comment}'`:""}`).join(`, +`)}${t.fields.filter(s=>s.primary).length>0?`, + PRIMARY KEY(${t.fields.filter(s=>s.primary).map(s=>`\`${s.name}\``).join(", ")})`:""} +)${t.comment?` COMMENT='${t.comment}'`:""}; +${` +${t.indices.map(s=>`CREATE ${s.unique?"UNIQUE ":""}INDEX \`${s.name}\` +ON \`${t.name}\` (${s.fields.map(o=>`\`${o}\``).join(", ")});`).join(` +`)}`}`).join(` +`)} +${r.references.map(t=>`ALTER TABLE \`${r.tables[t.startTableId].name}\` +ADD FOREIGN KEY(\`${r.tables[t.startTableId].fields[t.startFieldId].name}\`) REFERENCES \`${r.tables[t.endTableId].name}\`(\`${r.tables[t.endTableId].fields[t.endFieldId].name}\`) +ON UPDATE ${t.updateConstraint.toUpperCase()} ON DELETE ${t.deleteConstraint.toUpperCase()};`).join(` +`)}`}function Int(r){return`${r.types.map(t=>{const s=t.fields.filter(o=>o.type==="ENUM"||o.type==="SET").map(o=>`CREATE TYPE "${o.name}_t" AS ENUM (${o.values.map(i=>`'${i}'`).join(", ")}); +`);return s.length>0?s.join("")+`${t.comment===""?"":`/** +${t.comment} +*/ +`}CREATE TYPE ${t.name} AS ( +${t.fields.map(o=>` ${o.name} ${W2(o,r.database,"postgres")}`).join(` +`)} +);`:`${t.comment===""?"":`/** +${t.comment} +*/ +`}CREATE TYPE ${t.name} AS ( +${t.fields.map(o=>` ${o.name} ${W2(o,r.database,"postgres")}`).join(` +`)} +);`})} +${r.tables.map(t=>`${t.comment===""?"":`/** +${t.comment} +*/ +`}${t.fields.filter(s=>s.type==="ENUM"||s.type==="SET").length>0?`${t.fields.filter(s=>s.type==="ENUM"||s.type==="SET").map(s=>`CREATE TYPE "${s.name}_t" AS ENUM (${s.values.map(o=>`'${o}'`).join(", ")}); + +`)}`:""}CREATE TABLE "${t.name}" ( +${t.fields.map(s=>`${s.comment===""?"":` -- ${s.comment} +`} "${s.name}" ${W2(s,r.database,"postgres")}${s.notNull?" NOT NULL":""}${s.unique?" UNIQUE":""}${s.default!==""?` DEFAULT ${Dw(s)}`:""}${s.check===""||!ah[r.database][s.type].hasCheck?"":` CHECK(${s.check})`}`).join(`, +`)}${t.fields.filter(s=>s.primary).length>0?`, + PRIMARY KEY(${t.fields.filter(s=>s.primary).map(s=>`"${s.name}"`).join(", ")})`:""} +); +${t.indices.map(s=>`CREATE ${s.unique?"UNIQUE ":""}INDEX "${s.name}" +ON "${t.name}" (${s.fields.map(o=>`"${o}"`).join(", ")});`).join(` +`)}`).join(` +`)} +${r.references.map(t=>`ALTER TABLE "${r.tables[t.startTableId].name}" +ADD FOREIGN KEY("${r.tables[t.startTableId].fields[t.startFieldId].name}") REFERENCES "${r.tables[t.endTableId].name}"("${r.tables[t.endTableId].fields[t.endFieldId].name}") +ON UPDATE ${t.updateConstraint.toUpperCase()} ON DELETE ${t.deleteConstraint.toUpperCase()};`).join(` +`)}`}function Ont(r){switch(r.type){case"INT":case"SMALLINT":case"BIGINT":case"BOOLEAN":return"INTEGER";case"DECIMAL":case"NUMERIC":case"FLOAT":case"DOUBLE":case"REAL":return"REAL";case"CHAR":case"VARCHAR":case"UUID":case"TEXT":case"DATE":case"TIME":case"TIMESTAMP":case"DATETIME":case"BINARY":case"VARBINARY":return"TEXT";case"ENUM":return`TEXT CHECK("${r.name}" in (${r.values.map(t=>`'${t}'`).join(", ")}))`;default:return"BLOB"}}function Rnt(r,t){let s="";return t.references.forEach(o=>{s===""&&o.startTableId===r.id&&(s=`FOREIGN KEY ("${r.fields[o.startFieldId].name}") REFERENCES "${t.tables[o.endTableId].name}"("${t.tables[o.endTableId].fields[o.endFieldId].name}") + ON UPDATE ${o.updateConstraint.toUpperCase()} ON DELETE ${o.deleteConstraint.toUpperCase()}`)}),s}function Bnt(r){return r.tables.map(t=>{const s=Rnt(t,r);return`${t.comment===""?"":`/* ${t.comment} */ +`}CREATE TABLE IF NOT EXISTS "${t.name}" ( +${t.fields.map(o=>`${o.comment===""?"":` -- ${o.comment} +`} "${o.name}" ${Ont(o)}${o.notNull?" NOT NULL":""}${o.unique?" UNIQUE":""}${o.default!==""?` DEFAULT ${Dw(o,r.database)}`:""}${o.check===""||!ah[r.database][o.type].hasCheck?"":` CHECK(${o.check})`}`).join(`, +`)}${t.fields.filter(o=>o.primary).length>0?`, + PRIMARY KEY(${t.fields.filter(o=>o.primary).map(o=>`"${o.name}"`).join(", ")})${s!==""?`, +`:""}`:""} ${s} +); +${t.indices.map(o=>` +CREATE ${o.unique?"UNIQUE ":""}INDEX IF NOT EXISTS "${o.name}" +ON "${t.name}" (${o.fields.map(i=>`"${i}"`).join(", ")});`).join(` +`)}`}).join(` +`)}function knt(r){return`${r.tables.map(t=>`${t.comment===""?"":`/* ${t.comment} */ +`}CREATE OR REPLACE TABLE \`${t.name}\` ( +${t.fields.map(s=>`${s.comment===""?"":` -- ${s.comment} +`} \`${s.name}\` ${W2(s,r.database)}${s.notNull?" NOT NULL":""}${s.increment?" AUTO_INCREMENT":""}${s.unique?" UNIQUE":""}${s.default!==""?` DEFAULT ${Dw(s,r.database)}`:""}${s.check===""||!ah[r.database][s.type].hasCheck?Object.keys(q4).includes(s.type)?"":` CHECK( + JSON_SCHEMA_VALID('${HAe(r.types.find(o=>o.name===s.type.toLowerCase()))}', \`${s.name}\`))`:` CHECK(${s.check})`}`).join(`, +`)}${t.fields.filter(s=>s.primary).length>0?`, + PRIMARY KEY(${t.fields.filter(s=>s.primary).map(s=>`\`${s.name}\``).join(", ")})`:""} +);${` +${t.indices.map(s=>`CREATE ${s.unique?"UNIQUE ":""}INDEX \`${s.name}\` +ON \`${t.name}\` (${s.fields.map(o=>`\`${o}\``).join(", ")});`).join(` +`)}`}`).join(` +`)} +${r.references.map(t=>`ALTER TABLE \`${r.tables[t.startTableId].name}\` +ADD FOREIGN KEY(\`${r.tables[t.startTableId].fields[t.startFieldId].name}\`) REFERENCES \`${r.tables[t.endTableId].name}\`(\`${r.tables[t.endTableId].fields[t.endFieldId].name}\`) +ON UPDATE ${t.updateConstraint.toUpperCase()} ON DELETE ${t.deleteConstraint.toUpperCase()};`).join(` +`)}`}function Pnt(r){return`${r.types.map(t=>`${t.comment===""?"":`/** +${t.comment} +*/ +`}CREATE TYPE [${t.name}] FROM ${t.fields.length<0?"":`${W2(t.fields[0],r.database,"mssql",!0)}`}; +GO +`).join(` +`)} +${r.tables.map(t=>`${t.comment===""?"":`/** +${t.comment} +*/ +`}CREATE TABLE [${t.name}] ( +${t.fields.map(s=>`${s.comment===""?"":` -- ${s.comment} +`} [${s.name}] ${W2(s,r.database,"mssql")}${s.notNull?" NOT NULL":""}${s.increment?" IDENTITY":""}${s.unique?" UNIQUE":""}${s.default!==""?` DEFAULT ${Dw(s,r.database)}`:""}${s.check===""||!ah[r.database][s.type].hasCheck?"":` CHECK(${s.check})`}`).join(`, +`)}${t.fields.filter(s=>s.primary).length>0?`, + PRIMARY KEY(${t.fields.filter(s=>s.primary).map(s=>`[${s.name}]`).join(", ")})`:""} +); +GO +${t.indices.map(s=>` +CREATE ${s.unique?"UNIQUE ":""}INDEX [${s.name}] +ON [${t.name}] (${s.fields.map(o=>`[${o}]`).join(", ")}); +GO +`).join("")}`).join(` +`)} +${r.references.map(t=>`ALTER TABLE [${r.tables[t.startTableId].name}] +ADD FOREIGN KEY([${r.tables[t.startTableId].fields[t.startFieldId].name}]) REFERENCES [${r.tables[t.endTableId].name}]([${r.tables[t.endTableId].fields[t.endFieldId].name}]) +ON UPDATE ${t.updateConstraint.toUpperCase()} ON DELETE ${t.deleteConstraint.toUpperCase()}; +GO`).join(` +`)}`}const Dnt="modulepreload",Fnt=function(r,t){return new URL(r,t).href},ite={},ij=function(t,s,o){let i=Promise.resolve();if(s&&s.length>0){const a=document.getElementsByTagName("link");i=Promise.all(s.map(n=>{if(n=Fnt(n,o),n in ite)return;ite[n]=!0;const u=n.endsWith(".css"),f=u?'[rel="stylesheet"]':"";if(!!o)for(let _=a.length-1;_>=0;_--){const T=a[_];if(T.href===n&&(!u||T.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${n}"]${f}`))return;const y=document.createElement("link");if(y.rel=u?"stylesheet":Dnt,u||(y.as="script",y.crossOrigin=""),y.href=n,document.head.appendChild(y),u)return new Promise((_,T)=>{y.addEventListener("load",_),y.addEventListener("error",()=>T(new Error(`Unable to preload CSS for ${n}`)))})}))}return i.then(()=>t()).catch(a=>{const n=new Event("vite:preloadError",{cancelable:!0});if(n.payload=a,window.dispatchEvent(n),!n.defaultPrevented)throw a})};var dv=Uint8Array,hv=Uint16Array,CO=Uint32Array,QF=new dv([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),KF=new dv([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),aj=new dv([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),QAe=function(r,t){for(var s=new hv(31),o=0;o<31;++o)s[o]=t+=1<>>1|(am&21845)<<1;iE=(iE&52428)>>>2|(iE&13107)<<2,iE=(iE&61680)>>>4|(iE&3855)<<4,uj[am]=((iE&65280)>>>8|(iE&255)<<8)>>>1}var Cw=function(r,t,s){for(var o=r.length,i=0,a=new hv(t);i>>f]=e}else for(u=new hv(o),i=0;i>>15-r[i];return u},RL=new dv(288);for(var am=0;am<144;++am)RL[am]=8;for(var am=144;am<256;++am)RL[am]=9;for(var am=256;am<280;++am)RL[am]=7;for(var am=280;am<288;++am)RL[am]=8;var EO=new dv(32);for(var am=0;am<32;++am)EO[am]=5;var Unt=Cw(RL,9,0),$nt=Cw(RL,9,1),jnt=Cw(EO,5,0),Hnt=Cw(EO,5,1),pU=function(r){for(var t=r[0],s=1;st&&(t=r[s]);return t},p1=function(r,t,s){var o=t/8>>0;return(r[o]|r[o+1]<<8)>>>(t&7)&s},mU=function(r,t){var s=t/8>>0;return(r[s]|r[s+1]<<8|r[s+2]<<16)>>>(t&7)},QG=function(r){return(r/8>>0)+(r&7&&1)},GAe=function(r,t,s){(t==null||t<0)&&(t=0),(s==null||s>r.length)&&(s=r.length);var o=new(r instanceof hv?hv:r instanceof CO?CO:dv)(s-t);return o.set(r.subarray(t,s)),o},Qnt=function(r,t,s){var o=r.length,i=!t||s,a=!s||s.i;s||(s={}),t||(t=new dv(o*3));var n=function(Pr){var Kr=t.length;if(Pr>Kr){var ls=new dv(Math.max(Kr*2,Pr));ls.set(t),t=ls}},u=s.f||0,f=s.p||0,e=s.b||0,y=s.l,_=s.d,T=s.m,D=s.n,ce=o*8;do{if(!y){s.f=u=p1(r,f,1);var ge=p1(r,f+1,3);if(f+=3,ge)if(ge==1)y=$nt,_=Hnt,T=9,D=5;else if(ge==2){var He=p1(r,f,31)+257,at=p1(r,f+10,15)+4,st=He+p1(r,f+5,31)+1;f+=14;for(var vt=new dv(st),Ot=new dv(19),Kt=0;Ktce)break;for(var fn=Cw(Ot,sn,1),Kt=0;Kt>>4;if(Ee<16)vt[Kt++]=Ee;else{var $n=0,_n=0;for(Ee==16?(_n=3+p1(r,f,3),f+=2,$n=vt[Kt-1]):Ee==17?(_n=3+p1(r,f,7),f+=3):Ee==18&&(_n=11+p1(r,f,127),f+=7);_n--;)vt[Kt++]=$n}}var Nr=vt.subarray(0,He),Cr=vt.subarray(He);T=pU(Nr),D=pU(Cr),y=Cw(Nr,T,1),_=Cw(Cr,D,1)}else throw"invalid block type";else{var Ee=QG(f)+4,_e=r[Ee-4]|r[Ee-3]<<8,Be=Ee+_e;if(Be>o){if(a)throw"unexpected EOF";break}i&&n(e+_e),t.set(r.subarray(Ee,Be),e),s.b=e+=_e,s.p=f=Be*8;continue}if(f>ce)throw"unexpected EOF"}i&&n(e+131072);for(var Dr=(1<>>4;if(f+=$n&15,f>ce)throw"unexpected EOF";if(!$n)throw"invalid length/literal";if(br<256)t[e++]=br;else if(br==256){y=null;break}else{var ss=br-254;if(br>264){var Kt=br-257,In=QF[Kt];ss=p1(r,f,(1<>>4;if(!dr)throw"invalid distance";f+=dr&15;var Cr=Mnt[lr];if(lr>3){var In=KF[lr];Cr+=mU(r,f)&(1<ce)throw"unexpected EOF";i&&n(e+131072);for(var Ir=e+ss;e>0;r[o]|=s,r[o+1]|=s>>>8},eI=function(r,t,s){s<<=t&7;var o=t/8>>0;r[o]|=s,r[o+1]|=s>>>8,r[o+2]|=s>>>16},gU=function(r,t){for(var s=[],o=0;oT&&(T=a[o].s);var D=new hv(T+1),ce=cj(s[y-1],D,0);if(ce>t){var o=0,ge=0,Ee=ce-t,_e=1<t)ge+=_e-(1<>>=Ee;ge>0;){var He=a[o].s;D[He]=0&≥--o){var at=a[o].s;D[at]==t&&(--D[at],++ge)}ce=t}return[new dv(D),ce]},cj=function(r,t,s){return r.s==-1?Math.max(cj(r.l,t,s+1),cj(r.r,t,s+1)):t[r.s]=s},lte=function(r){for(var t=r.length;t&&!r[--t];);for(var s=new hv(++t),o=0,i=r[0],a=1,n=function(f){s[o++]=f},u=1;u<=t;++u)if(r[u]==i&&u!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)n(32754);a>2&&(n(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(n(i),--a;a>6;a-=6)n(8304);a>2&&(n(a-3<<5|8208),a=0)}for(;a--;)n(i);a=1,i=r[u]}return[s.subarray(0,o),t]},tI=function(r,t){for(var s=0,o=0;o>>8,r[i+2]=r[i]^255,r[i+3]=r[i+1]^255;for(var a=0;a4&&!Bn[aj[bn-1]];--bn);var $n=e+5<<3,_n=tI(i,RL)+tI(a,EO)+n,Nr=tI(i,T)+tI(a,ge)+n+14+3*bn+tI(Ot,Bn)+(2*Ot[16]+3*Ot[17]+7*Ot[18]);if($n<=_n&&$n<=Nr)return HB(t,y,r.subarray(f,f+e));var Cr,Dr,fr,_r;if(tC(t,y,1+(Nr<_n)),y+=2,Nr<_n){Cr=Cw(T,D,0),Dr=T,fr=Cw(ge,Ee,0),_r=ge;var br=Cw(Bn,fn,0);tC(t,y,He-257),tC(t,y+5,vt-1),tC(t,y+10,bn-4),y+=14;for(var Kt=0;Kt15&&(tC(t,y,dr[Kt]>>>5&127),y+=dr[Kt]>>>12)}}else Cr=Unt,Dr=RL,fr=jnt,_r=EO;for(var Kt=0;Kt255){var lr=o[Kt]>>>18&31;eI(t,y,Cr[lr+257]),y+=Dr[lr+257],lr>7&&(tC(t,y,o[Kt]>>>23&31),y+=QF[lr]);var Ir=o[Kt]&31;eI(t,y,fr[Ir]),y+=_r[Ir],Ir>3&&(eI(t,y,o[Kt]>>>5&8191),y+=KF[Ir])}else eI(t,y,Cr[o[Kt]]),y+=Dr[o[Kt]];return eI(t,y,Cr[256]),y+Dr[256]},Knt=new CO([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),znt=new dv(0),Vnt=function(r,t,s,o,i,a){var n=r.length,u=new dv(o+n+5*(1+Math.floor(n/7e3))+i),f=u.subarray(o,u.length-i),e=0;if(!t||n<8)for(var y=0;y<=n;y+=65535){var _=y+65535;_>>13,ce=T&8191,ge=(1<7e3||Bn>24576)&&Cr>423){e=ute(r,f,0,st,vt,Ot,sn,Bn,bn,y-bn,e),Bn=Kt=sn=0,bn=y;for(var Dr=0;Dr<286;++Dr)vt[Dr]=0;for(var Dr=0;Dr<30;++Dr)Ot[Dr]=0}var fr=2,_r=0,br=ce,ss=_n-Nr&32767;if(Cr>2&&$n==at(y-ss))for(var In=Math.min(D,Cr)-1,dr=Math.min(32767,y),lr=Math.min(258,Cr);ss<=dr&&--br&&_n!=Nr;){if(r[y+fr]==r[y+fr-ss]){for(var Ir=0;Irfr){if(fr=Ir,_r=ss,Ir>In)break;for(var Pr=Math.min(ss,Ir-2),Kr=0,Dr=0;DrKr&&(Kr=Ps,Nr=ls)}}}_n=Nr,Nr=Ee[_n],ss+=_n-Nr+32768&32767}if(_r){st[Bn++]=268435456|lj[fr]<<18|ate[_r];var Ws=lj[fr]&31,qs=ate[_r]&31;sn+=QF[Ws]+KF[qs],++vt[257+Ws],++Ot[qs],fn=y+fr,++Kt}else st[Bn++]=r[y],++vt[r[y]]}}e=ute(r,f,a,st,vt,Ot,sn,Bn,bn,y-bn,e),a||(e=HB(f,e,znt))}return GAe(u,0,o+QG(e)+i)},Gnt=function(){var r=1,t=0;return{p:function(s){for(var o=r,i=t,a=s.length,n=0;n!=a;){for(var u=Math.min(n+5552,a);n>>8<<16|(t&255)<<8|t>>>8)+((r&255)<<23)*2}}},Wnt=function(r,t,s,o,i){return Vnt(r,t.level==null?6:t.level,t.mem==null?Math.ceil(Math.max(8,Math.min(13,Math.log(r.length)))*1.5):12+t.mem,s,o,!i)},qnt=function(r,t,s){for(;s;++t)r[t]=s,s>>>=8},Ynt=function(r,t){var s=t.level,o=s==0?0:s<6?1:s==9?3:2;r[0]=120,r[1]=o<<6|(o?32-2*o:1)},Xnt=function(r){if((r[0]&15)!=8||r[0]>>>4>7||(r[0]<<8|r[1])%31)throw"invalid zlib data";if(r[1]&32)throw"invalid zlib data: preset dictionaries not supported"};function fj(r,t){t===void 0&&(t={});var s=Gnt();s.p(r);var o=Wnt(r,t,2,4);return Ynt(o,t),qnt(o,o.length-4,s.d()),o}function Znt(r,t){return Qnt((Xnt(r),r.subarray(2,-4)),t)}var ff=function(){return typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:this}();function bU(){ff.console&&typeof ff.console.log=="function"&&ff.console.log.apply(ff.console,arguments)}var D0={log:bU,warn:function(r){ff.console&&(typeof ff.console.warn=="function"?ff.console.warn.apply(ff.console,arguments):bU.call(null,arguments))},error:function(r){ff.console&&(typeof ff.console.error=="function"?ff.console.error.apply(ff.console,arguments):bU(r))}};function vU(r,t,s){var o=new XMLHttpRequest;o.open("GET",r),o.responseType="blob",o.onload=function(){L2(o.response,t,s)},o.onerror=function(){D0.error("could not download file")},o.send()}function cte(r){var t=new XMLHttpRequest;t.open("HEAD",r,!1);try{t.send()}catch{}return t.status>=200&&t.status<=299}function JR(r){try{r.dispatchEvent(new MouseEvent("click"))}catch{var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),r.dispatchEvent(t)}}var u5,dj,L2=ff.saveAs||((typeof window>"u"?"undefined":m0(window))!=="object"||window!==ff?function(){}:typeof HTMLAnchorElement<"u"&&"download"in HTMLAnchorElement.prototype?function(r,t,s){var o=ff.URL||ff.webkitURL,i=document.createElement("a");t=t||r.name||"download",i.download=t,i.rel="noopener",typeof r=="string"?(i.href=r,i.origin!==location.origin?cte(i.href)?vU(r,t,s):JR(i,i.target="_blank"):JR(i)):(i.href=o.createObjectURL(r),setTimeout(function(){o.revokeObjectURL(i.href)},4e4),setTimeout(function(){JR(i)},0))}:"msSaveOrOpenBlob"in navigator?function(r,t,s){if(t=t||r.name||"download",typeof r=="string")if(cte(r))vU(r,t,s);else{var o=document.createElement("a");o.href=r,o.target="_blank",setTimeout(function(){JR(o)})}else navigator.msSaveOrOpenBlob(function(i,a){return a===void 0?a={autoBom:!1}:m0(a)!=="object"&&(D0.warn("Deprecated: Expected third argument to be a object"),a={autoBom:!a}),a.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(i.type)?new Blob(["\uFEFF",i],{type:i.type}):i}(r,s),t)}:function(r,t,s,o){if((o=o||open("","_blank"))&&(o.document.title=o.document.body.innerText="downloading..."),typeof r=="string")return vU(r,t,s);var i=r.type==="application/octet-stream",a=/constructor/i.test(ff.HTMLElement)||ff.safari,n=/CriOS\/[\d]+/.test(navigator.userAgent);if((n||i&&a)&&(typeof FileReader>"u"?"undefined":m0(FileReader))==="object"){var u=new FileReader;u.onloadend=function(){var y=u.result;y=n?y:y.replace(/^data:[^;]*;/,"data:attachment/file;"),o?o.location.href=y:location=y,o=null},u.readAsDataURL(r)}else{var f=ff.URL||ff.webkitURL,e=f.createObjectURL(r);o?o.location=e:location.href=e,o=null,setTimeout(function(){f.revokeObjectURL(e)},4e4)}});/** + * A class to parse color values + * @author Stoyan Stefanov + * {@link http://www.phpied.com/rgb-color-parser-in-javascript/} + * @license Use it if you like it + */function WAe(r){var t;r=r||"",this.ok=!1,r.charAt(0)=="#"&&(r=r.substr(1,6)),r={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"00ffff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000000",blanchedalmond:"ffebcd",blue:"0000ff",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"00ffff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dodgerblue:"1e90ff",feldspar:"d19275",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"ff00ff",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgrey:"d3d3d3",lightgreen:"90ee90",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslateblue:"8470ff",lightslategray:"778899",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"00ff00",limegreen:"32cd32",linen:"faf0e6",magenta:"ff00ff",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370d8",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"d87093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",red:"ff0000",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",violetred:"d02090",wheat:"f5deb3",white:"ffffff",whitesmoke:"f5f5f5",yellow:"ffff00",yellowgreen:"9acd32"}[r=(r=r.replace(/ /g,"")).toLowerCase()]||r;for(var s=[{re:/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/,example:["rgb(123, 234, 45)","rgb(255,234,245)"],process:function(u){return[parseInt(u[1]),parseInt(u[2]),parseInt(u[3])]}},{re:/^(\w{2})(\w{2})(\w{2})$/,example:["#00ff00","336699"],process:function(u){return[parseInt(u[1],16),parseInt(u[2],16),parseInt(u[3],16)]}},{re:/^(\w{1})(\w{1})(\w{1})$/,example:["#fb0","f0f"],process:function(u){return[parseInt(u[1]+u[1],16),parseInt(u[2]+u[2],16),parseInt(u[3]+u[3],16)]}}],o=0;o255?255:this.r,this.g=this.g<0||isNaN(this.g)?0:this.g>255?255:this.g,this.b=this.b<0||isNaN(this.b)?0:this.b>255?255:this.b,this.toRGB=function(){return"rgb("+this.r+", "+this.g+", "+this.b+")"},this.toHex=function(){var u=this.r.toString(16),f=this.g.toString(16),e=this.b.toString(16);return u.length==1&&(u="0"+u),f.length==1&&(f="0"+f),e.length==1&&(e="0"+e),"#"+u+f+e}}/** + * @license + * Joseph Myers does not specify a particular license for his work. + * + * Author: Joseph Myers + * Accessed from: http://www.myersdaily.org/joseph/javascript/md5.js + * + * Modified by: Owen Leong + */function yU(r,t){var s=r[0],o=r[1],i=r[2],a=r[3];s=Sb(s,o,i,a,t[0],7,-680876936),a=Sb(a,s,o,i,t[1],12,-389564586),i=Sb(i,a,s,o,t[2],17,606105819),o=Sb(o,i,a,s,t[3],22,-1044525330),s=Sb(s,o,i,a,t[4],7,-176418897),a=Sb(a,s,o,i,t[5],12,1200080426),i=Sb(i,a,s,o,t[6],17,-1473231341),o=Sb(o,i,a,s,t[7],22,-45705983),s=Sb(s,o,i,a,t[8],7,1770035416),a=Sb(a,s,o,i,t[9],12,-1958414417),i=Sb(i,a,s,o,t[10],17,-42063),o=Sb(o,i,a,s,t[11],22,-1990404162),s=Sb(s,o,i,a,t[12],7,1804603682),a=Sb(a,s,o,i,t[13],12,-40341101),i=Sb(i,a,s,o,t[14],17,-1502002290),s=xb(s,o=Sb(o,i,a,s,t[15],22,1236535329),i,a,t[1],5,-165796510),a=xb(a,s,o,i,t[6],9,-1069501632),i=xb(i,a,s,o,t[11],14,643717713),o=xb(o,i,a,s,t[0],20,-373897302),s=xb(s,o,i,a,t[5],5,-701558691),a=xb(a,s,o,i,t[10],9,38016083),i=xb(i,a,s,o,t[15],14,-660478335),o=xb(o,i,a,s,t[4],20,-405537848),s=xb(s,o,i,a,t[9],5,568446438),a=xb(a,s,o,i,t[14],9,-1019803690),i=xb(i,a,s,o,t[3],14,-187363961),o=xb(o,i,a,s,t[8],20,1163531501),s=xb(s,o,i,a,t[13],5,-1444681467),a=xb(a,s,o,i,t[2],9,-51403784),i=xb(i,a,s,o,t[7],14,1735328473),s=_b(s,o=xb(o,i,a,s,t[12],20,-1926607734),i,a,t[5],4,-378558),a=_b(a,s,o,i,t[8],11,-2022574463),i=_b(i,a,s,o,t[11],16,1839030562),o=_b(o,i,a,s,t[14],23,-35309556),s=_b(s,o,i,a,t[1],4,-1530992060),a=_b(a,s,o,i,t[4],11,1272893353),i=_b(i,a,s,o,t[7],16,-155497632),o=_b(o,i,a,s,t[10],23,-1094730640),s=_b(s,o,i,a,t[13],4,681279174),a=_b(a,s,o,i,t[0],11,-358537222),i=_b(i,a,s,o,t[3],16,-722521979),o=_b(o,i,a,s,t[6],23,76029189),s=_b(s,o,i,a,t[9],4,-640364487),a=_b(a,s,o,i,t[12],11,-421815835),i=_b(i,a,s,o,t[15],16,530742520),s=Tb(s,o=_b(o,i,a,s,t[2],23,-995338651),i,a,t[0],6,-198630844),a=Tb(a,s,o,i,t[7],10,1126891415),i=Tb(i,a,s,o,t[14],15,-1416354905),o=Tb(o,i,a,s,t[5],21,-57434055),s=Tb(s,o,i,a,t[12],6,1700485571),a=Tb(a,s,o,i,t[3],10,-1894986606),i=Tb(i,a,s,o,t[10],15,-1051523),o=Tb(o,i,a,s,t[1],21,-2054922799),s=Tb(s,o,i,a,t[8],6,1873313359),a=Tb(a,s,o,i,t[15],10,-30611744),i=Tb(i,a,s,o,t[6],15,-1560198380),o=Tb(o,i,a,s,t[13],21,1309151649),s=Tb(s,o,i,a,t[4],6,-145523070),a=Tb(a,s,o,i,t[11],10,-1120210379),i=Tb(i,a,s,o,t[2],15,718787259),o=Tb(o,i,a,s,t[9],21,-343485551),r[0]=KE(s,r[0]),r[1]=KE(o,r[1]),r[2]=KE(i,r[2]),r[3]=KE(a,r[3])}function zF(r,t,s,o,i,a){return t=KE(KE(t,r),KE(o,a)),KE(t<>>32-i,s)}function Sb(r,t,s,o,i,a,n){return zF(t&s|~t&o,r,t,i,a,n)}function xb(r,t,s,o,i,a,n){return zF(t&o|s&~o,r,t,i,a,n)}function _b(r,t,s,o,i,a,n){return zF(t^s^o,r,t,i,a,n)}function Tb(r,t,s,o,i,a,n){return zF(s^(t|~o),r,t,i,a,n)}function qAe(r){var t,s=r.length,o=[1732584193,-271733879,-1732584194,271733878];for(t=64;t<=r.length;t+=64)yU(o,Jnt(r.substring(t-64,t)));r=r.substring(t-64);var i=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];for(t=0;t>2]|=r.charCodeAt(t)<<(t%4<<3);if(i[t>>2]|=128<<(t%4<<3),t>55)for(yU(o,i),t=0;t<16;t++)i[t]=0;return i[14]=8*s,yU(o,i),o}function Jnt(r){var t,s=[];for(t=0;t<64;t+=4)s[t>>2]=r.charCodeAt(t)+(r.charCodeAt(t+1)<<8)+(r.charCodeAt(t+2)<<16)+(r.charCodeAt(t+3)<<24);return s}u5=ff.atob.bind(ff),dj=ff.btoa.bind(ff);var fte="0123456789abcdef".split("");function ert(r){for(var t="",s=0;s<4;s++)t+=fte[r>>8*s+4&15]+fte[r>>8*s&15];return t}function trt(r){return String.fromCharCode((255&r)>>0,(65280&r)>>8,(16711680&r)>>16,(4278190080&r)>>24)}function hj(r){return qAe(r).map(trt).join("")}var nrt=function(r){for(var t=0;t>16)+(t>>16)+(s>>16)<<16|65535&s}return r+t&4294967295}/** + * @license + * FPDF is released under a permissive license: there is no usage restriction. + * You may embed it freely in your application (commercial or not), with or + * without modifications. + * + * Reference: http://www.fpdf.org/en/script/script37.php + */function Aj(r,t){var s,o,i,a;if(r!==s){for(var n=(i=r,a=1+(256/r.length>>0),new Array(a+1).join(i)),u=[],f=0;f<256;f++)u[f]=f;var e=0;for(f=0;f<256;f++){var y=u[f];e=(e+y+n.charCodeAt(f))%256,u[f]=u[e],u[e]=y}s=r,o=u}else u=o;var _=t.length,T=0,D=0,ce="";for(f=0;f<_;f++)D=(D+(y=u[T=(T+1)%256]))%256,u[T]=u[D],u[D]=y,n=u[(u[T]+u[D])%256],ce+=String.fromCharCode(t.charCodeAt(f)^n);return ce}/** + * @license + * Licensed under the MIT License. + * http://opensource.org/licenses/mit-license + * Author: Owen Leong (@owenl131) + * Date: 15 Oct 2020 + * References: + * https://www.cs.cmu.edu/~dst/Adobe/Gallery/anon21jul01-pdf-encryption.txt + * https://github.com/foliojs/pdfkit/blob/master/lib/security.js + * http://www.fpdf.org/en/script/script37.php + */var dte={print:4,modify:8,copy:16,"annot-forms":32};function _x(r,t,s,o){this.v=1,this.r=2;var i=192;r.forEach(function(u){if(dte.perm!==void 0)throw new Error("Invalid permission: "+u);i+=dte[u]}),this.padding="(¿N^NuŠAd\0NVÿú\b..\0¶Ðh>€/\f©þdSiz";var a=(t+this.padding).substr(0,32),n=(s+this.padding).substr(0,32);this.O=this.processOwnerPassword(a,n),this.P=-(1+(255^i)),this.encryptionKey=hj(a+this.O+this.lsbFirstWord(this.P)+this.hexToBytes(o)).substr(0,5),this.U=Aj(this.encryptionKey,this.padding)}function Tx(r){if(/[^\u0000-\u00ff]/.test(r))throw new Error("Invalid PDF Name Object: "+r+", Only accept ASCII characters.");for(var t="",s=r.length,o=0;o126?t+="#"+("0"+i.toString(16)).slice(-2):t+=r[o]}return t}function hte(r){if(m0(r)!=="object")throw new Error("Invalid Context passed to initialize PubSub (jsPDF-module)");var t={};this.subscribe=function(s,o,i){if(i=i||!1,typeof s!="string"||typeof o!="function"||typeof i!="boolean")throw new Error("Invalid arguments passed to PubSub.subscribe (jsPDF-module)");t.hasOwnProperty(s)||(t[s]={});var a=Math.random().toString(35);return t[s][a]=[o,!!i],a},this.unsubscribe=function(s){for(var o in t)if(t[o][s])return delete t[o][s],Object.keys(t[o]).length===0&&delete t[o],!0;return!1},this.publish=function(s){if(t.hasOwnProperty(s)){var o=Array.prototype.slice.call(arguments,1),i=[];for(var a in t[s]){var n=t[s][a];try{n[0].apply(r,o)}catch(u){ff.console&&D0.error("jsPDF PubSub Error",u.message,u)}n[1]&&i.push(a)}i.length&&i.forEach(this.unsubscribe)}},this.getTopics=function(){return t}}function BP(r){if(!(this instanceof BP))return new BP(r);var t="opacity,stroke-opacity".split(",");for(var s in r)r.hasOwnProperty(s)&&t.indexOf(s)>=0&&(this[s]=r[s]);this.id="",this.objectNumber=-1}function YAe(r,t){this.gState=r,this.matrix=t,this.id="",this.objectNumber=-1}function N2(r,t,s,o,i){if(!(this instanceof N2))return new N2(r,t,s,o,i);this.type=r==="axial"?2:3,this.coords=t,this.colors=s,YAe.call(this,o,i)}function n_(r,t,s,o,i){if(!(this instanceof n_))return new n_(r,t,s,o,i);this.boundingBox=r,this.xStep=t,this.yStep=s,this.stream="",this.cloneIndex=0,YAe.call(this,o,i)}function cf(r){var t,s=typeof arguments[0]=="string"?arguments[0]:"p",o=arguments[1],i=arguments[2],a=arguments[3],n=[],u=1,f=16,e="S",y=null;m0(r=r||{})==="object"&&(s=r.orientation,o=r.unit||o,i=r.format||i,a=r.compress||r.compressPdf||a,(y=r.encryption||null)!==null&&(y.userPassword=y.userPassword||"",y.ownerPassword=y.ownerPassword||"",y.userPermissions=y.userPermissions||[]),u=typeof r.userUnit=="number"?Math.abs(r.userUnit):1,r.precision!==void 0&&(t=r.precision),r.floatPrecision!==void 0&&(f=r.floatPrecision),e=r.defaultPathOperation||"S"),n=r.filters||(a===!0?["FlateEncode"]:n),o=o||"mm",s=(""+(s||"P")).toLowerCase();var _=r.putOnlyUsedFonts||!1,T={},D={internal:{},__private__:{}};D.__private__.PubSub=hte;var ce="1.3",ge=D.__private__.getPdfVersion=function(){return ce};D.__private__.setPdfVersion=function(Qt){ce=Qt};var Ee={a0:[2383.94,3370.39],a1:[1683.78,2383.94],a2:[1190.55,1683.78],a3:[841.89,1190.55],a4:[595.28,841.89],a5:[419.53,595.28],a6:[297.64,419.53],a7:[209.76,297.64],a8:[147.4,209.76],a9:[104.88,147.4],a10:[73.7,104.88],b0:[2834.65,4008.19],b1:[2004.09,2834.65],b2:[1417.32,2004.09],b3:[1000.63,1417.32],b4:[708.66,1000.63],b5:[498.9,708.66],b6:[354.33,498.9],b7:[249.45,354.33],b8:[175.75,249.45],b9:[124.72,175.75],b10:[87.87,124.72],c0:[2599.37,3676.54],c1:[1836.85,2599.37],c2:[1298.27,1836.85],c3:[918.43,1298.27],c4:[649.13,918.43],c5:[459.21,649.13],c6:[323.15,459.21],c7:[229.61,323.15],c8:[161.57,229.61],c9:[113.39,161.57],c10:[79.37,113.39],dl:[311.81,623.62],letter:[612,792],"government-letter":[576,756],legal:[612,1008],"junior-legal":[576,360],ledger:[1224,792],tabloid:[792,1224],"credit-card":[153,243]};D.__private__.getPageFormats=function(){return Ee};var _e=D.__private__.getPageFormat=function(Qt){return Ee[Qt]};i=i||"a4";var Be={COMPAT:"compat",ADVANCED:"advanced"},He=Be.COMPAT;function at(){this.saveGraphicsState(),Qr(new Yi(Xr,0,0,-Xr,0,LA()*Xr).toString()+" cm"),this.setFontSize(this.getFontSize()/Xr),e="n",He=Be.ADVANCED}function st(){this.restoreGraphicsState(),e="S",He=Be.COMPAT}var vt=D.__private__.combineFontStyleAndFontWeight=function(Qt,Zn){if(Qt=="bold"&&Zn=="normal"||Qt=="bold"&&Zn==400||Qt=="normal"&&Zn=="italic"||Qt=="bold"&&Zn=="italic")throw new Error("Invalid Combination of fontweight and fontstyle");return Zn&&(Qt=Zn==400||Zn==="normal"?Qt==="italic"?"italic":"normal":Zn!=700&&Zn!=="bold"||Qt!=="normal"?(Zn==700?"bold":Zn)+""+Qt:"bold"),Qt};D.advancedAPI=function(Qt){var Zn=He===Be.COMPAT;return Zn&&at.call(this),typeof Qt!="function"||(Qt(this),Zn&&st.call(this)),this},D.compatAPI=function(Qt){var Zn=He===Be.ADVANCED;return Zn&&st.call(this),typeof Qt!="function"||(Qt(this),Zn&&at.call(this)),this},D.isAdvancedAPI=function(){return He===Be.ADVANCED};var Ot,Kt=function(Qt){if(He!==Be.ADVANCED)throw new Error(Qt+" is only available in 'advanced' API mode. You need to call advancedAPI() first.")},sn=D.roundToPrecision=D.__private__.roundToPrecision=function(Qt,Zn){var Gr=t||Zn;if(isNaN(Qt)||isNaN(Gr))throw new Error("Invalid argument passed to jsPDF.roundToPrecision");return Qt.toFixed(Gr).replace(/0+$/,"")};Ot=D.hpf=D.__private__.hpf=typeof f=="number"?function(Qt){if(isNaN(Qt))throw new Error("Invalid argument passed to jsPDF.hpf");return sn(Qt,f)}:f==="smart"?function(Qt){if(isNaN(Qt))throw new Error("Invalid argument passed to jsPDF.hpf");return sn(Qt,Qt>-1&&Qt<1?16:5)}:function(Qt){if(isNaN(Qt))throw new Error("Invalid argument passed to jsPDF.hpf");return sn(Qt,16)};var Bn=D.f2=D.__private__.f2=function(Qt){if(isNaN(Qt))throw new Error("Invalid argument passed to jsPDF.f2");return sn(Qt,2)},fn=D.__private__.f3=function(Qt){if(isNaN(Qt))throw new Error("Invalid argument passed to jsPDF.f3");return sn(Qt,3)},bn=D.scale=D.__private__.scale=function(Qt){if(isNaN(Qt))throw new Error("Invalid argument passed to jsPDF.scale");return He===Be.COMPAT?Qt*Xr:He===Be.ADVANCED?Qt:void 0},$n=function(Qt){return He===Be.COMPAT?LA()-Qt:He===Be.ADVANCED?Qt:void 0},_n=function(Qt){return bn($n(Qt))};D.__private__.setPrecision=D.setPrecision=function(Qt){typeof parseInt(Qt,10)=="number"&&(t=parseInt(Qt,10))};var Nr,Cr="00000000000000000000000000000000",Dr=D.__private__.getFileId=function(){return Cr},fr=D.__private__.setFileId=function(Qt){return Cr=Qt!==void 0&&/^[a-fA-F0-9]{32}$/.test(Qt)?Qt.toUpperCase():Cr.split("").map(function(){return"ABCDEF0123456789".charAt(Math.floor(16*Math.random()))}).join(""),y!==null&&(Mt=new _x(y.userPermissions,y.userPassword,y.ownerPassword,Cr)),Cr};D.setFileId=function(Qt){return fr(Qt),this},D.getFileId=function(){return Dr()};var _r=D.__private__.convertDateToPDFDate=function(Qt){var Zn=Qt.getTimezoneOffset(),Gr=Zn<0?"+":"-",ps=Math.floor(Math.abs(Zn/60)),ks=Math.abs(Zn%60),lo=[Gr,lr(ps),"'",lr(ks),"'"].join("");return["D:",Qt.getFullYear(),lr(Qt.getMonth()+1),lr(Qt.getDate()),lr(Qt.getHours()),lr(Qt.getMinutes()),lr(Qt.getSeconds()),lo].join("")},br=D.__private__.convertPDFDateToDate=function(Qt){var Zn=parseInt(Qt.substr(2,4),10),Gr=parseInt(Qt.substr(6,2),10)-1,ps=parseInt(Qt.substr(8,2),10),ks=parseInt(Qt.substr(10,2),10),lo=parseInt(Qt.substr(12,2),10),Ho=parseInt(Qt.substr(14,2),10);return new Date(Zn,Gr,ps,ks,lo,Ho,0)},ss=D.__private__.setCreationDate=function(Qt){var Zn;if(Qt===void 0&&(Qt=new Date),Qt instanceof Date)Zn=_r(Qt);else{if(!/^D:(20[0-2][0-9]|203[0-7]|19[7-9][0-9])(0[0-9]|1[0-2])([0-2][0-9]|3[0-1])(0[0-9]|1[0-9]|2[0-3])(0[0-9]|[1-5][0-9])(0[0-9]|[1-5][0-9])(\+0[0-9]|\+1[0-4]|-0[0-9]|-1[0-1])'(0[0-9]|[1-5][0-9])'?$/.test(Qt))throw new Error("Invalid argument passed to jsPDF.setCreationDate");Zn=Qt}return Nr=Zn},In=D.__private__.getCreationDate=function(Qt){var Zn=Nr;return Qt==="jsDate"&&(Zn=br(Nr)),Zn};D.setCreationDate=function(Qt){return ss(Qt),this},D.getCreationDate=function(Qt){return In(Qt)};var dr,lr=D.__private__.padd2=function(Qt){return("0"+parseInt(Qt)).slice(-2)},Ir=D.__private__.padd2Hex=function(Qt){return("00"+(Qt=Qt.toString())).substr(Qt.length)},Pr=0,Kr=[],ls=[],as=0,Ps=[],Ws=[],qs=!1,xs=ls,Do=function(){Pr=0,as=0,ls=[],Kr=[],Ps=[],Of=ya(),ir=ya()};D.__private__.setCustomOutputDestination=function(Qt){qs=!0,xs=Qt};var Is=function(Qt){qs||(xs=Qt)};D.__private__.resetCustomOutputDestination=function(){qs=!1,xs=ls};var Qr=D.__private__.out=function(Qt){return Qt=Qt.toString(),as+=Qt.length+1,xs.push(Qt),xs},Xo=D.__private__.write=function(Qt){return Qr(arguments.length===1?Qt.toString():Array.prototype.join.call(arguments," "))},Go=D.__private__.getArrayBuffer=function(Qt){for(var Zn=Qt.length,Gr=new ArrayBuffer(Zn),ps=new Uint8Array(Gr);Zn--;)ps[Zn]=Qt.charCodeAt(Zn);return Gr},ao=[["Helvetica","helvetica","normal","WinAnsiEncoding"],["Helvetica-Bold","helvetica","bold","WinAnsiEncoding"],["Helvetica-Oblique","helvetica","italic","WinAnsiEncoding"],["Helvetica-BoldOblique","helvetica","bolditalic","WinAnsiEncoding"],["Courier","courier","normal","WinAnsiEncoding"],["Courier-Bold","courier","bold","WinAnsiEncoding"],["Courier-Oblique","courier","italic","WinAnsiEncoding"],["Courier-BoldOblique","courier","bolditalic","WinAnsiEncoding"],["Times-Roman","times","normal","WinAnsiEncoding"],["Times-Bold","times","bold","WinAnsiEncoding"],["Times-Italic","times","italic","WinAnsiEncoding"],["Times-BoldItalic","times","bolditalic","WinAnsiEncoding"],["ZapfDingbats","zapfdingbats","normal",null],["Symbol","symbol","normal",null]];D.__private__.getStandardFonts=function(){return ao};var fo=r.fontSize||16;D.__private__.setFontSize=D.setFontSize=function(Qt){return fo=He===Be.ADVANCED?Qt/Xr:Qt,this};var uo,Xs=D.__private__.getFontSize=D.getFontSize=function(){return He===Be.COMPAT?fo:fo*Xr},jo=r.R2L||!1;D.__private__.setR2L=D.setR2L=function(Qt){return jo=Qt,this},D.__private__.getR2L=D.getR2L=function(){return jo};var gs,Zo=D.__private__.setZoomMode=function(Qt){var Zn=[void 0,null,"fullwidth","fullheight","fullpage","original"];if(/^(?:\d+\.\d*|\d*\.\d+|\d+)%$/.test(Qt))uo=Qt;else if(isNaN(Qt)){if(Zn.indexOf(Qt)===-1)throw new Error('zoom must be Integer (e.g. 2), a percentage Value (e.g. 300%) or fullwidth, fullheight, fullpage, original. "'+Qt+'" is not recognized.');uo=Qt}else uo=parseInt(Qt,10)};D.__private__.getZoomMode=function(){return uo};var Mn,er=D.__private__.setPageMode=function(Qt){if([void 0,null,"UseNone","UseOutlines","UseThumbs","FullScreen"].indexOf(Qt)==-1)throw new Error('Page mode must be one of UseNone, UseOutlines, UseThumbs, or FullScreen. "'+Qt+'" is not recognized.');gs=Qt};D.__private__.getPageMode=function(){return gs};var Hr=D.__private__.setLayoutMode=function(Qt){if([void 0,null,"continuous","single","twoleft","tworight","two"].indexOf(Qt)==-1)throw new Error('Layout mode must be one of continuous, single, twoleft, tworight. "'+Qt+'" is not recognized.');Mn=Qt};D.__private__.getLayoutMode=function(){return Mn},D.__private__.setDisplayMode=D.setDisplayMode=function(Qt,Zn,Gr){return Zo(Qt),Hr(Zn),er(Gr),this};var Mr={title:"",subject:"",author:"",keywords:"",creator:""};D.__private__.getDocumentProperty=function(Qt){if(Object.keys(Mr).indexOf(Qt)===-1)throw new Error("Invalid argument passed to jsPDF.getDocumentProperty");return Mr[Qt]},D.__private__.getDocumentProperties=function(){return Mr},D.__private__.setDocumentProperties=D.setProperties=D.setDocumentProperties=function(Qt){for(var Zn in Mr)Mr.hasOwnProperty(Zn)&&Qt[Zn]&&(Mr[Zn]=Qt[Zn]);return this},D.__private__.setDocumentProperty=function(Qt,Zn){if(Object.keys(Mr).indexOf(Qt)===-1)throw new Error("Invalid arguments passed to jsPDF.setDocumentProperty");return Mr[Qt]=Zn};var ys,Xr,to,Yr,mo,Rr={},fs={},No=[],Ii={},tl={},ga={},ca={},la=null,na=0,Oi=[],Ri=new hte(D),eu=r.hotfixes||[],Oa={},ac={},Fl=[],Yi=function Qt(Zn,Gr,ps,ks,lo,Ho){if(!(this instanceof Qt))return new Qt(Zn,Gr,ps,ks,lo,Ho);isNaN(Zn)&&(Zn=1),isNaN(Gr)&&(Gr=0),isNaN(ps)&&(ps=0),isNaN(ks)&&(ks=1),isNaN(lo)&&(lo=0),isNaN(Ho)&&(Ho=0),this._matrix=[Zn,Gr,ps,ks,lo,Ho]};Object.defineProperty(Yi.prototype,"sx",{get:function(){return this._matrix[0]},set:function(Qt){this._matrix[0]=Qt}}),Object.defineProperty(Yi.prototype,"shy",{get:function(){return this._matrix[1]},set:function(Qt){this._matrix[1]=Qt}}),Object.defineProperty(Yi.prototype,"shx",{get:function(){return this._matrix[2]},set:function(Qt){this._matrix[2]=Qt}}),Object.defineProperty(Yi.prototype,"sy",{get:function(){return this._matrix[3]},set:function(Qt){this._matrix[3]=Qt}}),Object.defineProperty(Yi.prototype,"tx",{get:function(){return this._matrix[4]},set:function(Qt){this._matrix[4]=Qt}}),Object.defineProperty(Yi.prototype,"ty",{get:function(){return this._matrix[5]},set:function(Qt){this._matrix[5]=Qt}}),Object.defineProperty(Yi.prototype,"a",{get:function(){return this._matrix[0]},set:function(Qt){this._matrix[0]=Qt}}),Object.defineProperty(Yi.prototype,"b",{get:function(){return this._matrix[1]},set:function(Qt){this._matrix[1]=Qt}}),Object.defineProperty(Yi.prototype,"c",{get:function(){return this._matrix[2]},set:function(Qt){this._matrix[2]=Qt}}),Object.defineProperty(Yi.prototype,"d",{get:function(){return this._matrix[3]},set:function(Qt){this._matrix[3]=Qt}}),Object.defineProperty(Yi.prototype,"e",{get:function(){return this._matrix[4]},set:function(Qt){this._matrix[4]=Qt}}),Object.defineProperty(Yi.prototype,"f",{get:function(){return this._matrix[5]},set:function(Qt){this._matrix[5]=Qt}}),Object.defineProperty(Yi.prototype,"rotation",{get:function(){return Math.atan2(this.shx,this.sx)}}),Object.defineProperty(Yi.prototype,"scaleX",{get:function(){return this.decompose().scale.sx}}),Object.defineProperty(Yi.prototype,"scaleY",{get:function(){return this.decompose().scale.sy}}),Object.defineProperty(Yi.prototype,"isIdentity",{get:function(){return this.sx===1&&this.shy===0&&this.shx===0&&this.sy===1&&this.tx===0&&this.ty===0}}),Yi.prototype.join=function(Qt){return[this.sx,this.shy,this.shx,this.sy,this.tx,this.ty].map(Ot).join(Qt)},Yi.prototype.multiply=function(Qt){var Zn=Qt.sx*this.sx+Qt.shy*this.shx,Gr=Qt.sx*this.shy+Qt.shy*this.sy,ps=Qt.shx*this.sx+Qt.sy*this.shx,ks=Qt.shx*this.shy+Qt.sy*this.sy,lo=Qt.tx*this.sx+Qt.ty*this.shx+this.tx,Ho=Qt.tx*this.shy+Qt.ty*this.sy+this.ty;return new Yi(Zn,Gr,ps,ks,lo,Ho)},Yi.prototype.decompose=function(){var Qt=this.sx,Zn=this.shy,Gr=this.shx,ps=this.sy,ks=this.tx,lo=this.ty,Ho=Math.sqrt(Qt*Qt+Zn*Zn),Ci=(Qt/=Ho)*Gr+(Zn/=Ho)*ps;Gr-=Qt*Ci,ps-=Zn*Ci;var Xi=Math.sqrt(Gr*Gr+ps*ps);return Ci/=Xi,Qt*(ps/=Xi)>16&255,ps=Xi>>8&255,ks=255&Xi}if(ps===void 0||lo===void 0&&Gr===ps&&ps===ks)if(typeof Gr=="string")Zn=Gr+" "+Ho[0];else switch(Qt.precision){case 2:Zn=Bn(Gr/255)+" "+Ho[0];break;case 3:default:Zn=fn(Gr/255)+" "+Ho[0]}else if(lo===void 0||m0(lo)==="object"){if(lo&&!isNaN(lo.a)&&lo.a===0)return Zn=["1.","1.","1.",Ho[1]].join(" ");if(typeof Gr=="string")Zn=[Gr,ps,ks,Ho[1]].join(" ");else switch(Qt.precision){case 2:Zn=[Bn(Gr/255),Bn(ps/255),Bn(ks/255),Ho[1]].join(" ");break;default:case 3:Zn=[fn(Gr/255),fn(ps/255),fn(ks/255),Ho[1]].join(" ")}}else if(typeof Gr=="string")Zn=[Gr,ps,ks,lo,Ho[2]].join(" ");else switch(Qt.precision){case 2:Zn=[Bn(Gr),Bn(ps),Bn(ks),Bn(lo),Ho[2]].join(" ");break;case 3:default:Zn=[fn(Gr),fn(ps),fn(ks),fn(lo),Ho[2]].join(" ")}return Zn},di=D.__private__.getFilters=function(){return n},ml=D.__private__.putStream=function(Qt){var Zn=(Qt=Qt||{}).data||"",Gr=Qt.filters||di(),ps=Qt.alreadyAppliedFilters||[],ks=Qt.addLength1||!1,lo=Zn.length,Ho=Qt.objectId,Ci=function(Af){return Af};if(y!==null&&Ho===void 0)throw new Error("ObjectId must be passed to putStream for file encryption");y!==null&&(Ci=Mt.encryptor(Ho,0));var Xi={};Gr===!0&&(Gr=["FlateEncode"]);var Ma=Qt.additionalKeyValues||[],sl=(Xi=cf.API.processDataByFilters!==void 0?cf.API.processDataByFilters(Zn,Gr):{data:Zn,reverseChain:[]}).reverseChain+(Array.isArray(ps)?ps.join(" "):ps.toString());if(Xi.data.length!==0&&(Ma.push({key:"Length",value:Xi.data.length}),ks===!0&&Ma.push({key:"Length1",value:lo})),sl.length!=0)if(sl.split("/").length-1==1)Ma.push({key:"Filter",value:sl});else{Ma.push({key:"Filter",value:"["+sl+"]"});for(var Ha=0;Ha>"),Xi.data.length!==0&&(Qr("stream"),Qr(Ci(Xi.data)),Qr("endstream"))},ql=D.__private__.putPage=function(Qt){var Zn=Qt.number,Gr=Qt.data,ps=Qt.objId,ks=Qt.contentsObjId;pl(ps,!0),Qr("<>"),Qr("endobj");var lo=Gr.join(` +`);return He===Be.ADVANCED&&(lo+=` +Q`),pl(ks,!0),ml({data:lo,filters:di(),objectId:ks}),Qr("endobj"),ps},df=D.__private__.putPages=function(){var Qt,Zn,Gr=[];for(Qt=1;Qt<=na;Qt++)Oi[Qt].objId=ya(),Oi[Qt].contentsObjId=ya();for(Qt=1;Qt<=na;Qt++)Gr.push(ql({number:Qt,data:Ws[Qt],objId:Oi[Qt].objId,contentsObjId:Oi[Qt].contentsObjId,mediaBox:Oi[Qt].mediaBox,cropBox:Oi[Qt].cropBox,bleedBox:Oi[Qt].bleedBox,trimBox:Oi[Qt].trimBox,artBox:Oi[Qt].artBox,userUnit:Oi[Qt].userUnit,rootDictionaryObjId:Of,resourceDictionaryObjId:ir}));pl(Of,!0),Qr("<>"),Qr("endobj"),Ri.publish("postPutPages")},nl=function(Qt){Ri.publish("putFont",{font:Qt,out:Qr,newObject:Wl,putStream:ml}),Qt.isAlreadyPutted!==!0&&(Qt.objectNumber=Wl(),Qr("<<"),Qr("/Type /Font"),Qr("/BaseFont /"+Tx(Qt.postScriptName)),Qr("/Subtype /Type1"),typeof Qt.encoding=="string"&&Qr("/Encoding /"+Qt.encoding),Qr("/FirstChar 32"),Qr("/LastChar 255"),Qr(">>"),Qr("endobj"))},Yf=function(){for(var Qt in Rr)Rr.hasOwnProperty(Qt)&&(_===!1||_===!0&&T.hasOwnProperty(Qt))&&nl(Rr[Qt])},Mf=function(Qt){Qt.objectNumber=Wl();var Zn=[];Zn.push({key:"Type",value:"/XObject"}),Zn.push({key:"Subtype",value:"/Form"}),Zn.push({key:"BBox",value:"["+[Ot(Qt.x),Ot(Qt.y),Ot(Qt.x+Qt.width),Ot(Qt.y+Qt.height)].join(" ")+"]"}),Zn.push({key:"Matrix",value:"["+Qt.matrix.toString()+"]"});var Gr=Qt.pages[1].join(` +`);ml({data:Gr,additionalKeyValues:Zn,objectId:Qt.objectNumber}),Qr("endobj")},Sd=function(){for(var Qt in Oa)Oa.hasOwnProperty(Qt)&&Mf(Oa[Qt])},oA=function(Qt,Zn){var Gr,ps=[],ks=1/(Zn-1);for(Gr=0;Gr<1;Gr+=ks)ps.push(Gr);if(ps.push(1),Qt[0].offset!=0){var lo={offset:0,color:Qt[0].color};Qt.unshift(lo)}if(Qt[Qt.length-1].offset!=1){var Ho={offset:1,color:Qt[Qt.length-1].color};Qt.push(Ho)}for(var Ci="",Xi=0,Ma=0;MaQt[Xi+1].offset;)Xi++;var sl=Qt[Xi].offset,Ha=(Gr-sl)/(Qt[Xi+1].offset-sl),Xu=Qt[Xi].color,uc=Qt[Xi+1].color;Ci+=Ir(Math.round((1-Ha)*Xu[0]+Ha*uc[0]).toString(16))+Ir(Math.round((1-Ha)*Xu[1]+Ha*uc[1]).toString(16))+Ir(Math.round((1-Ha)*Xu[2]+Ha*uc[2]).toString(16))}return Ci.trim()},wA=function(Qt,Zn){Zn||(Zn=21);var Gr=Wl(),ps=oA(Qt.colors,Zn),ks=[];ks.push({key:"FunctionType",value:"0"}),ks.push({key:"Domain",value:"[0.0 1.0]"}),ks.push({key:"Size",value:"["+Zn+"]"}),ks.push({key:"BitsPerSample",value:"8"}),ks.push({key:"Range",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ks.push({key:"Decode",value:"[0.0 1.0 0.0 1.0 0.0 1.0]"}),ml({data:ps,additionalKeyValues:ks,alreadyAppliedFilters:["/ASCIIHexDecode"],objectId:Gr}),Qr("endobj"),Qt.objectNumber=Wl(),Qr("<< /ShadingType "+Qt.type),Qr("/ColorSpace /DeviceRGB");var lo="/Coords ["+Ot(parseFloat(Qt.coords[0]))+" "+Ot(parseFloat(Qt.coords[1]))+" ";Qt.type===2?lo+=Ot(parseFloat(Qt.coords[2]))+" "+Ot(parseFloat(Qt.coords[3])):lo+=Ot(parseFloat(Qt.coords[2]))+" "+Ot(parseFloat(Qt.coords[3]))+" "+Ot(parseFloat(Qt.coords[4]))+" "+Ot(parseFloat(Qt.coords[5])),Qr(lo+="]"),Qt.matrix&&Qr("/Matrix ["+Qt.matrix.toString()+"]"),Qr("/Function "+Gr+" 0 R"),Qr("/Extend [true true]"),Qr(">>"),Qr("endobj")},$A=function(Qt,Zn){var Gr=ya(),ps=Wl();Zn.push({resourcesOid:Gr,objectOid:ps}),Qt.objectNumber=ps;var ks=[];ks.push({key:"Type",value:"/Pattern"}),ks.push({key:"PatternType",value:"1"}),ks.push({key:"PaintType",value:"1"}),ks.push({key:"TilingType",value:"1"}),ks.push({key:"BBox",value:"["+Qt.boundingBox.map(Ot).join(" ")+"]"}),ks.push({key:"XStep",value:Ot(Qt.xStep)}),ks.push({key:"YStep",value:Ot(Qt.yStep)}),ks.push({key:"Resources",value:Gr+" 0 R"}),Qt.matrix&&ks.push({key:"Matrix",value:"["+Qt.matrix.toString()+"]"}),ml({data:Qt.stream,additionalKeyValues:ks,objectId:Qt.objectNumber}),Qr("endobj")},Uf=function(Qt){var Zn;for(Zn in Ii)Ii.hasOwnProperty(Zn)&&(Ii[Zn]instanceof N2?wA(Ii[Zn]):Ii[Zn]instanceof n_&&$A(Ii[Zn],Qt))},$f=function(Qt){for(var Zn in Qt.objectNumber=Wl(),Qr("<<"),Qt)switch(Zn){case"opacity":Qr("/ca "+Bn(Qt[Zn]));break;case"stroke-opacity":Qr("/CA "+Bn(Qt[Zn]))}Qr(">>"),Qr("endobj")},iA=function(){var Qt;for(Qt in ga)ga.hasOwnProperty(Qt)&&$f(ga[Qt])},Uh=function(){for(var Qt in Qr("/XObject <<"),Oa)Oa.hasOwnProperty(Qt)&&Oa[Qt].objectNumber>=0&&Qr("/"+Qt+" "+Oa[Qt].objectNumber+" 0 R");Ri.publish("putXobjectDict"),Qr(">>")},zd=function(){Mt.oid=Wl(),Qr("<<"),Qr("/Filter /Standard"),Qr("/V "+Mt.v),Qr("/R "+Mt.r),Qr("/U <"+Mt.toHexString(Mt.U)+">"),Qr("/O <"+Mt.toHexString(Mt.O)+">"),Qr("/P "+Mt.P),Qr(">>"),Qr("endobj")},Xf=function(){for(var Qt in Qr("/Font <<"),Rr)Rr.hasOwnProperty(Qt)&&(_===!1||_===!0&&T.hasOwnProperty(Qt))&&Qr("/"+Qt+" "+Rr[Qt].objectNumber+" 0 R");Qr(">>")},Bd=function(){if(Object.keys(Ii).length>0){for(var Qt in Qr("/Shading <<"),Ii)Ii.hasOwnProperty(Qt)&&Ii[Qt]instanceof N2&&Ii[Qt].objectNumber>=0&&Qr("/"+Qt+" "+Ii[Qt].objectNumber+" 0 R");Ri.publish("putShadingPatternDict"),Qr(">>")}},jf=function(Qt){if(Object.keys(Ii).length>0){for(var Zn in Qr("/Pattern <<"),Ii)Ii.hasOwnProperty(Zn)&&Ii[Zn]instanceof D.TilingPattern&&Ii[Zn].objectNumber>=0&&Ii[Zn].objectNumber>")}},_o=function(){if(Object.keys(ga).length>0){var Qt;for(Qt in Qr("/ExtGState <<"),ga)ga.hasOwnProperty(Qt)&&ga[Qt].objectNumber>=0&&Qr("/"+Qt+" "+ga[Qt].objectNumber+" 0 R");Ri.publish("putGStateDict"),Qr(">>")}},Lu=function(Qt){pl(Qt.resourcesOid,!0),Qr("<<"),Qr("/ProcSet [/PDF /Text /ImageB /ImageC /ImageI]"),Xf(),Bd(),jf(Qt.objectOid),_o(),Uh(),Qr(">>"),Qr("endobj")},Rf=function(){var Qt=[];Yf(),iA(),Sd(),Uf(Qt),Ri.publish("putResources"),Qt.forEach(Lu),Lu({resourcesOid:ir,objectOid:Number.MAX_SAFE_INTEGER}),Ri.publish("postPutResources")},Zf=function(){Ri.publish("putAdditionalObjects");for(var Qt=0;Qt>8&&(Xi=!0);Qt=Ci.join("")}for(Gr=Qt.length;Xi===void 0&&Gr!==0;)Qt.charCodeAt(Gr-1)>>8&&(Xi=!0),Gr--;if(!Xi)return Qt;for(Ci=Zn.noBOM?[]:[254,255],Gr=0,ps=Qt.length;Gr>8)>>8)throw new Error("Character at position "+Gr+" of string '"+Qt+"' exceeds 16bits. Cannot be encoded into UCS-2 BE");Ci.push(sl),Ci.push(Ma-(sl<<8))}return String.fromCharCode.apply(void 0,Ci)},mu=D.__private__.pdfEscape=D.pdfEscape=function(Qt,Zn){return $h(Qt,Zn).replace(/\\/g,"\\\\").replace(/\(/g,"\\(").replace(/\)/g,"\\)")},jh=D.__private__.beginPage=function(Qt){Ws[++na]=[],Oi[na]={objId:0,contentsObjId:0,userUnit:Number(u),artBox:null,bleedBox:null,cropBox:null,trimBox:null,mediaBox:{bottomLeftX:0,bottomLeftY:0,topRightX:Number(Qt[0]),topRightY:Number(Qt[1])}},Yu(na),Is(Ws[dr])},xh=function(Qt,Zn){var Gr,ps,ks;switch(s=Zn||s,typeof Qt=="string"&&(Gr=_e(Qt.toLowerCase()),Array.isArray(Gr)&&(ps=Gr[0],ks=Gr[1])),Array.isArray(Qt)&&(ps=Qt[0]*Xr,ks=Qt[1]*Xr),isNaN(ps)&&(ps=i[0],ks=i[1]),(ps>14400||ks>14400)&&(D0.warn("A page in a PDF can not be wider or taller than 14400 userUnit. jsPDF limits the width/height to 14400"),ps=Math.min(14400,ps),ks=Math.min(14400,ks)),i=[ps,ks],s.substr(0,1)){case"l":ks>ps&&(i=[ks,ps]);break;case"p":ps>ks&&(i=[ks,ps])}jh(i),vl(_a),Qr($u),jA!==0&&Qr(jA+" J"),Kh!==0&&Qr(Kh+" j"),Ri.publish("addPage",{pageNumber:na})},jc=function(Qt){Qt>0&&Qt<=na&&(Ws.splice(Qt,1),Oi.splice(Qt,1),na--,dr>na&&(dr=na),this.setPage(dr))},Yu=function(Qt){Qt>0&&Qt<=na&&(dr=Qt)},CA=D.__private__.getNumberOfPages=D.getNumberOfPages=function(){return Ws.length-1},Hh=function(Qt,Zn,Gr){var ps,ks=void 0;return Gr=Gr||{},Qt=Qt!==void 0?Qt:Rr[ys].fontName,Zn=Zn!==void 0?Zn:Rr[ys].fontStyle,ps=Qt.toLowerCase(),fs[ps]!==void 0&&fs[ps][Zn]!==void 0?ks=fs[ps][Zn]:fs[Qt]!==void 0&&fs[Qt][Zn]!==void 0?ks=fs[Qt][Zn]:Gr.disableWarning===!1&&D0.warn("Unable to look up font label for font '"+Qt+"', '"+Zn+"'. Refer to getFontList() for available fonts."),ks||Gr.noFallback||(ks=fs.times[Zn])==null&&(ks=fs.times.normal),ks},kd=D.__private__.putInfo=function(){var Qt=Wl(),Zn=function(ps){return ps};for(var Gr in y!==null&&(Zn=Mt.encryptor(Qt,0)),Qr("<<"),Qr("/Producer ("+mu(Zn("jsPDF "+cf.version))+")"),Mr)Mr.hasOwnProperty(Gr)&&Mr[Gr]&&Qr("/"+Gr.substr(0,1).toUpperCase()+Gr.substr(1)+" ("+mu(Zn(Mr[Gr]))+")");Qr("/CreationDate ("+mu(Zn(Nr))+")"),Qr(">>"),Qr("endobj")},Hc=D.__private__.putCatalog=function(Qt){var Zn=(Qt=Qt||{}).rootDictionaryObjId||Of;switch(Wl(),Qr("<<"),Qr("/Type /Catalog"),Qr("/Pages "+Zn+" 0 R"),uo||(uo="fullwidth"),uo){case"fullwidth":Qr("/OpenAction [3 0 R /FitH null]");break;case"fullheight":Qr("/OpenAction [3 0 R /FitV null]");break;case"fullpage":Qr("/OpenAction [3 0 R /Fit]");break;case"original":Qr("/OpenAction [3 0 R /XYZ null null 1]");break;default:var Gr=""+uo;Gr.substr(Gr.length-1)==="%"&&(uo=parseInt(uo)/100),typeof uo=="number"&&Qr("/OpenAction [3 0 R /XYZ null null "+Bn(uo)+"]")}switch(Mn||(Mn="continuous"),Mn){case"continuous":Qr("/PageLayout /OneColumn");break;case"single":Qr("/PageLayout /SinglePage");break;case"two":case"twoleft":Qr("/PageLayout /TwoColumnLeft");break;case"tworight":Qr("/PageLayout /TwoColumnRight")}gs&&Qr("/PageMode /"+gs),Ri.publish("putCatalog"),Qr(">>"),Qr("endobj")},gl=D.__private__.putTrailer=function(){Qr("trailer"),Qr("<<"),Qr("/Size "+(Pr+1)),Qr("/Root "+Pr+" 0 R"),Qr("/Info "+(Pr-1)+" 0 R"),y!==null&&Qr("/Encrypt "+Mt.oid+" 0 R"),Qr("/ID [ <"+Cr+"> <"+Cr+"> ]"),Qr(">>")},_l=D.__private__.putHeader=function(){Qr("%PDF-"+ce),Qr("%ºß¬à")},Bf=D.__private__.putXRef=function(){var Qt="0000000000";Qr("xref"),Qr("0 "+(Pr+1)),Qr("0000000000 65535 f ");for(var Zn=1;Zn<=Pr;Zn++)typeof Kr[Zn]=="function"?Qr((Qt+Kr[Zn]()).slice(-10)+" 00000 n "):Kr[Zn]!==void 0?Qr((Qt+Kr[Zn]).slice(-10)+" 00000 n "):Qr("0000000000 00000 n ")},td=D.__private__.buildDocument=function(){Do(),Is(ls),Ri.publish("buildDocument"),_l(),df(),Zf(),Rf(),y!==null&&zd(),kd(),Hc();var Qt=as;return Bf(),gl(),Qr("startxref"),Qr(""+Qt),Qr("%%EOF"),Is(Ws[dr]),ls.join(` +`)},xd=D.__private__.getBlob=function(Qt){return new Blob([Go(Qt)],{type:"application/pdf"})},Qh=D.output=D.__private__.output=ed(function(Qt,Zn){switch(typeof(Zn=Zn||{})=="string"?Zn={filename:Zn}:Zn.filename=Zn.filename||"generated.pdf",Qt){case void 0:return td();case"save":D.save(Zn.filename);break;case"arraybuffer":return Go(td());case"blob":return xd(td());case"bloburi":case"bloburl":if(ff.URL!==void 0&&typeof ff.URL.createObjectURL=="function")return ff.URL&&ff.URL.createObjectURL(xd(td()))||void 0;D0.warn("bloburl is not supported by your system, because URL.createObjectURL is not supported by your browser.");break;case"datauristring":case"dataurlstring":var Gr="",ps=td();try{Gr=dj(ps)}catch{Gr=dj(unescape(encodeURIComponent(ps)))}return"data:application/pdf;filename="+Zn.filename+";base64,"+Gr;case"pdfobjectnewwindow":if(Object.prototype.toString.call(ff)==="[object Window]"){var ks="https://cdnjs.cloudflare.com/ajax/libs/pdfobject/2.1.1/pdfobject.min.js",lo=' integrity="sha512-4ze/a9/4jqu+tX9dfOqJYSvyYd5M6qum/3HpCLr+/Jqf0whc37VUbkpNGHR7/8pSnCFw47T1fmIpwBV7UySh3g==" crossorigin="anonymous"';Zn.pdfObjectUrl&&(ks=Zn.pdfObjectUrl,lo="");var Ho=' + Index: reference/drawdb/source/src/components/arms/ControlPanel.jsx =================================================================== diff -u -rbf12c738cd29de5ba9c561979b271b6708dfdc77 -ree3613a26e17cdd6b85d1a74840a598abcf86bfc --- reference/drawdb/source/src/components/arms/ControlPanel.jsx (.../ControlPanel.jsx) (revision bf12c738cd29de5ba9c561979b271b6708dfdc77) +++ reference/drawdb/source/src/components/arms/ControlPanel.jsx (.../ControlPanel.jsx) (revision ee3613a26e17cdd6b85d1a74840a598abcf86bfc) @@ -715,10 +715,10 @@ // newWindow.name = window.name; // }, // }, - open: { - function: open, - shortcut: "Ctrl+O", - }, + // open: { + // function: open, + // shortcut: "Ctrl+O", + // }, save: { function: save, shortcut: "Ctrl+S", @@ -1071,7 +1071,9 @@ exit: { function: () => { save(); - if (saveState === State.SAVED) navigate("/"); + if (saveState === State.SAVED) { + window.close(); + } }, }, }, Index: reference/drawdb/source/src/components/arms/Workspace.jsx =================================================================== diff -u -rbc69de8f50c72efca9fff699d96444023e43d5fc -ree3613a26e17cdd6b85d1a74840a598abcf86bfc --- reference/drawdb/source/src/components/arms/Workspace.jsx (.../Workspace.jsx) (revision bc69de8f50c72efca9fff699d96444023e43d5fc) +++ reference/drawdb/source/src/components/arms/Workspace.jsx (.../Workspace.jsx) (revision ee3613a26e17cdd6b85d1a74840a598abcf86bfc) @@ -213,7 +213,7 @@ if (selectedDb === "") setShowSelectDbModal(true); } } else { - Toast.error("c_drawdb_contents 데이터가 없습니다."); + Toast.success("c_drawdb_contents 데이터가 없습니다."); } }) .catch((error) => {