diff --git a/changelog.md b/changelog.md index 47b5e50..f7721fb 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,12 @@ +## [1.8.4] - 2025-05-31 +* fix: error when queuePrompt #167 +* fix: Get/send slow in some cases +* optimization: sort workflow by name +* optimization: add missing node error message +* optimization: add status bar tips +* feature: open mask edit for LoadImage in left sidebar + + ## [1.8.3] - 2025-05-18 * fix: The slider widget not worked well. * fix: When running with xN, only the last previewed image will be sent. diff --git a/javascript/sdppp-comfy.js b/javascript/sdppp-comfy.js index f047cf0..0247895 100644 --- a/javascript/sdppp-comfy.js +++ b/javascript/sdppp-comfy.js @@ -1,21 +1,21 @@ -var tz=Object.create;var sm=Object.defineProperty;var UR=Object.getOwnPropertyDescriptor;var rz=Object.getOwnPropertyNames;var oz=Object.getPrototypeOf,nz=Object.prototype.hasOwnProperty;var yx=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var zn=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),xx=(e,t)=>{for(var r in t)sm(e,r,{get:t[r],enumerable:!0})},iz=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of rz(t))!nz.call(e,n)&&n!==r&&sm(e,n,{get:()=>t[n],enumerable:!(o=UR(t,n))||o.enumerable});return e};var E=(e,t,r)=>(r=e!=null?tz(oz(e)):{},iz(t||!e||!e.__esModule?sm(r,"default",{value:e,enumerable:!0}):r,e));var or=(e,t,r,o)=>{for(var n=o>1?void 0:o?UR(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(n=(o?a(t,r,n):a(n))||n);return o&&n&&sm(t,r,n),n};var ZO=zn(Et=>{"use strict";var Ud=Symbol.for("react.element"),Hz=Symbol.for("react.portal"),Uz=Symbol.for("react.fragment"),Gz=Symbol.for("react.strict_mode"),qz=Symbol.for("react.profiler"),Kz=Symbol.for("react.provider"),Xz=Symbol.for("react.context"),Yz=Symbol.for("react.forward_ref"),Qz=Symbol.for("react.suspense"),Zz=Symbol.for("react.memo"),Jz=Symbol.for("react.lazy"),BO=Symbol.iterator;function e6(e){return e===null||typeof e!="object"?null:(e=BO&&e[BO]||e["@@iterator"],typeof e=="function"?e:null)}var HO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},UO=Object.assign,GO={};function Lc(e,t,r){this.props=e,this.context=t,this.refs=GO,this.updater=r||HO}Lc.prototype.isReactComponent={};Lc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Lc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qO(){}qO.prototype=Lc.prototype;function Jx(e,t,r){this.props=e,this.context=t,this.refs=GO,this.updater=r||HO}var eb=Jx.prototype=new qO;eb.constructor=Jx;UO(eb,Lc.prototype);eb.isPureReactComponent=!0;var jO=Array.isArray,KO=Object.prototype.hasOwnProperty,tb={current:null},XO={key:!0,ref:!0,__self:!0,__source:!0};function YO(e,t,r){var o,n={},i=null,a=null;if(t!=null)for(o in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)KO.call(t,o)&&!XO.hasOwnProperty(o)&&(n[o]=t[o]);var s=arguments.length-2;if(s===1)n.children=r;else if(1{"use strict";JO.exports=ZO()});var c_=zn(Jt=>{"use strict";function ab(e,t){var r=e.length;e.push(t);e:for(;0>>1,n=e[o];if(0>>1;oqm(s,r))lqm(c,s)?(e[o]=c,e[l]=r,o=l):(e[o]=s,e[a]=r,o=a);else if(lqm(c,r))e[o]=c,e[l]=r,o=l;else break e}}return t}function qm(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(e_=performance,Jt.unstable_now=function(){return e_.now()}):(ob=Date,t_=ob.now(),Jt.unstable_now=function(){return ob.now()-t_});var e_,ob,t_,ji=[],ls=[],i6=1,Bn=null,_o=3,Ym=!1,xl=!1,qd=!1,n_=typeof setTimeout=="function"?setTimeout:null,i_=typeof clearTimeout=="function"?clearTimeout:null,r_=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function sb(e){for(var t=pi(ls);t!==null;){if(t.callback===null)Xm(ls);else if(t.startTime<=e)Xm(ls),t.sortIndex=t.expirationTime,ab(ji,t);else break;t=pi(ls)}}function lb(e){if(qd=!1,sb(e),!xl)if(pi(ji)!==null)xl=!0,ub(cb);else{var t=pi(ls);t!==null&&db(lb,t.startTime-e)}}function cb(e,t){xl=!1,qd&&(qd=!1,i_(Kd),Kd=-1),Ym=!0;var r=_o;try{for(sb(t),Bn=pi(ji);Bn!==null&&(!(Bn.expirationTime>t)||e&&!l_());){var o=Bn.callback;if(typeof o=="function"){Bn.callback=null,_o=Bn.priorityLevel;var n=o(Bn.expirationTime<=t);t=Jt.unstable_now(),typeof n=="function"?Bn.callback=n:Bn===pi(ji)&&Xm(ji),sb(t)}else Xm(ji);Bn=pi(ji)}if(Bn!==null)var i=!0;else{var a=pi(ls);a!==null&&db(lb,a.startTime-t),i=!1}return i}finally{Bn=null,_o=r,Ym=!1}}var Qm=!1,Km=null,Kd=-1,a_=5,s_=-1;function l_(){return!(Jt.unstable_now()-s_e||125o?(e.sortIndex=r,ab(ls,e),pi(ji)===null&&e===pi(ls)&&(qd?(i_(Kd),Kd=-1):qd=!0,db(lb,r-o))):(e.sortIndex=n,ab(ji,e),xl||Ym||(xl=!0,ub(cb))),e};Jt.unstable_shouldYield=l_;Jt.unstable_wrapCallback=function(e){var t=_o;return function(){var r=_o;_o=t;try{return e.apply(this,arguments)}finally{_o=r}}}});var d_=zn((OJ,u_)=>{"use strict";u_.exports=c_()});var gN=zn(On=>{"use strict";var a6=I(),En=d_();function he(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ab=Object.prototype.hasOwnProperty,s6=/^[: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]*$/,f_={},p_={};function l6(e){return Ab.call(p_,e)?!0:Ab.call(f_,e)?!1:s6.test(e)?p_[e]=!0:(f_[e]=!0,!1)}function c6(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function u6(e,t,r,o){if(t===null||typeof t>"u"||c6(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.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 Xo(e,t,r,o,n,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var xo={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){xo[e]=new Xo(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];xo[t]=new Xo(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){xo[e]=new Xo(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){xo[e]=new Xo(e,2,!1,e,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(e){xo[e]=new Xo(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){xo[e]=new Xo(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){xo[e]=new Xo(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){xo[e]=new Xo(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){xo[e]=new Xo(e,5,!1,e.toLowerCase(),null,!1,!1)});var OS=/[\-:]([a-z])/g;function _S(e){return e[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(e){var t=e.replace(OS,_S);xo[t]=new Xo(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(OS,_S);xo[t]=new Xo(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(OS,_S);xo[t]=new Xo(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){xo[e]=new Xo(e,1,!1,e.toLowerCase(),null,!1,!1)});xo.xlinkHref=new Xo("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){xo[e]=new Xo(e,1,!1,e.toLowerCase(),null,!0,!0)});function PS(e,t,r,o){var n=xo.hasOwnProperty(t)?xo[t]:null;(n!==null?n.type!==0:o||!(2s||n[a]!==i[s]){var l=` -`+n[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{pb=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?of(e):""}function d6(e){switch(e.tag){case 5:return of(e.type);case 16:return of("Lazy");case 13:return of("Suspense");case 19:return of("SuspenseList");case 0:case 2:case 15:return e=mb(e.type,!1),e;case 11:return e=mb(e.type.render,!1),e;case 1:return e=mb(e.type,!0),e;default:return""}}function Fb(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wc:return"Fragment";case zc:return"Portal";case Mb:return"Profiler";case TS:return"StrictMode";case Lb:return"Suspense";case kb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bP:return(e.displayName||"Context")+".Consumer";case xP:return(e._context.displayName||"Context")+".Provider";case NS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case IS:return t=e.displayName||null,t!==null?t:Fb(e.type)||"Memo";case us:t=e._payload,e=e._init;try{return Fb(e(t))}catch{}}return null}function f6(e){var t=e.type;switch(e.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 e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Fb(t);case 8:return t===TS?"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 Es(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function CP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function p6(e){var t=CP(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(a){o=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(a){o=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Jm(e){e._valueTracker||(e._valueTracker=p6(e))}function wP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=CP(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function _g(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function zb(e,t){var r=t.checked;return wr({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function g_(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=Es(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function EP(e,t){t=t.checked,t!=null&&PS(e,"checked",t,!1)}function Wb(e,t){EP(e,t);var r=Es(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Bb(e,t.type,r):t.hasOwnProperty("defaultValue")&&Bb(e,t.type,Es(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function h_(e,t,r){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=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Bb(e,t,r){(t!=="number"||_g(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var nf=Array.isArray;function Qc(e,t,r,o){if(e=e.options,t){t={};for(var n=0;n"+t.valueOf().toString()+"",t=eg.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function yf(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var lf={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},m6=["Webkit","ms","Moz","O"];Object.keys(lf).forEach(function(e){m6.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),lf[t]=lf[e]})});function PP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||lf.hasOwnProperty(e)&&lf[e]?(""+t).trim():t+"px"}function TP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=PP(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var g6=wr({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 Hb(e,t){if(t){if(g6[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(he(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(he(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(he(61))}if(t.style!=null&&typeof t.style!="object")throw Error(he(62))}}function Ub(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 Gb=null;function $S(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var qb=null,Zc=null,Jc=null;function x_(e){if(e=Lf(e)){if(typeof qb!="function")throw Error(he(280));var t=e.stateNode;t&&(t=th(t),qb(e.stateNode,e.type,t))}}function NP(e){Zc?Jc?Jc.push(e):Jc=[e]:Zc=e}function IP(){if(Zc){var e=Zc,t=Jc;if(Jc=Zc=null,x_(e),t)for(e=0;e>>=0,e===0?32:31-(O6(e)/_6|0)|0}var tg=64,rg=4194304;function af(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ig(e,t){var r=e.pendingLanes;if(r===0)return 0;var o=0,n=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~n;s!==0?o=af(s):(i&=a,i!==0&&(o=af(i)))}else a=r&~n,a!==0?o=af(a):i!==0&&(o=af(i));if(o===0)return 0;if(t!==0&&t!==o&&(t&n)===0&&(n=o&-o,i=t&-t,n>=i||n===16&&(i&4194240)!==0))return t;if((o&4)!==0&&(o|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0r;r++)t.push(e);return t}function Af(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yi(t),e[t]=r}function I6(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0=uf),P_=" ",T_=!1;function QP(e,t){switch(e){case"keyup":return iW.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZP(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Bc=!1;function sW(e,t){switch(e){case"compositionend":return ZP(t);case"keypress":return t.which!==32?null:(T_=!0,P_);case"textInput":return e=t.data,e===P_&&T_?null:e;default:return null}}function lW(e,t){if(Bc)return e==="compositionend"||!WS&&QP(e,t)?(e=XP(),yg=kS=ms=null,Bc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=$_(r)}}function rT(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?rT(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oT(){for(var e=window,t=_g();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=_g(e.document)}return t}function BS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function vW(e){var t=oT(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&rT(r.ownerDocument.documentElement,r)){if(o!==null&&BS(r)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=r.textContent.length,i=Math.min(o.start,n);o=o.end===void 0?i:Math.min(o.end,n),!e.extend&&i>o&&(n=o,o=i,i=n),n=D_(r,i);var a=D_(r,o);n&&a&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),i>o?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,jc=null,Jb=null,ff=null,eS=!1;function A_(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;eS||jc==null||jc!==_g(o)||(o=jc,"selectionStart"in o&&BS(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}),ff&&Ef(ff,o)||(ff=o,o=Ag(Jb,"onSelect"),0Uc||(e.current=aS[Uc],aS[Uc]=null,Uc--)}function er(e,t){Uc++,aS[Uc]=e.current,e.current=t}var Rs={},Io=_s(Rs),sn=_s(!1),_l=Rs;function nu(e,t){var r=e.type.contextTypes;if(!r)return Rs;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var n={},i;for(i in r)n[i]=t[i];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function ln(e){return e=e.childContextTypes,e!=null}function Lg(){ir(sn),ir(Io)}function V_(e,t,r){if(Io.current!==Rs)throw Error(he(168));er(Io,t),er(sn,r)}function fT(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var n in o)if(!(n in t))throw Error(he(108,f6(e)||"Unknown",n));return wr({},r,o)}function kg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Rs,_l=Io.current,er(Io,e),er(sn,sn.current),!0}function H_(e,t,r){var o=e.stateNode;if(!o)throw Error(he(169));r?(e=fT(e,t,_l),o.__reactInternalMemoizedMergedChildContext=e,ir(sn),ir(Io),er(Io,e)):ir(sn),er(sn,r)}var ba=null,rh=!1,Rb=!1;function pT(e){ba===null?ba=[e]:ba.push(e)}function _W(e){rh=!0,pT(e)}function Ps(){if(!Rb&&ba!==null){Rb=!0;var e=0,t=jt;try{var r=ba;for(jt=1;e>=a,n-=a,Sa=1<<32-yi(t)+n|r<R?(_=C,C=null):_=C.sibling;var O=f(g,C,x[R],S);if(O===null){C===null&&(C=_);break}e&&C&&O.alternate===null&&t(g,C),p=i(O,p,R),w===null?b=O:w.sibling=O,w=O,C=_}if(R===x.length)return r(g,C),vr&&bl(g,R),b;if(C===null){for(;RR?(_=C,C=null):_=C.sibling;var N=f(g,C,O.value,S);if(N===null){C===null&&(C=_);break}e&&C&&N.alternate===null&&t(g,C),p=i(N,p,R),w===null?b=N:w.sibling=N,w=N,C=_}if(O.done)return r(g,C),vr&&bl(g,R),b;if(C===null){for(;!O.done;R++,O=x.next())O=d(g,O.value,S),O!==null&&(p=i(O,p,R),w===null?b=O:w.sibling=O,w=O);return vr&&bl(g,R),b}for(C=o(g,C);!O.done;R++,O=x.next())O=m(C,g,R,O.value,S),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?R:O.key),p=i(O,p,R),w===null?b=O:w.sibling=O,w=O);return e&&C.forEach(function(k){return t(g,k)}),vr&&bl(g,R),b}function y(g,p,x,S){if(typeof x=="object"&&x!==null&&x.type===Wc&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Zm:e:{for(var b=x.key,w=p;w!==null;){if(w.key===b){if(b=x.type,b===Wc){if(w.tag===7){r(g,w.sibling),p=n(w,x.props.children),p.return=g,g=p;break e}}else if(w.elementType===b||typeof b=="object"&&b!==null&&b.$$typeof===us&&q_(b)===w.type){r(g,w.sibling),p=n(w,x.props),p.ref=Jd(g,w,x),p.return=g,g=p;break e}r(g,w);break}else t(g,w);w=w.sibling}x.type===Wc?(p=Ol(x.props.children,g.mode,S,x.key),p.return=g,g=p):(S=Og(x.type,x.key,x.props,null,g.mode,S),S.ref=Jd(g,p,x),S.return=g,g=S)}return a(g);case zc:e:{for(w=x.key;p!==null;){if(p.key===w)if(p.tag===4&&p.stateNode.containerInfo===x.containerInfo&&p.stateNode.implementation===x.implementation){r(g,p.sibling),p=n(p,x.children||[]),p.return=g,g=p;break e}else{r(g,p);break}else t(g,p);p=p.sibling}p=Db(x,g.mode,S),p.return=g,g=p}return a(g);case us:return w=x._init,y(g,p,w(x._payload),S)}if(nf(x))return h(g,p,x,S);if(Xd(x))return v(g,p,x,S);pg(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,p!==null&&p.tag===6?(r(g,p.sibling),p=n(p,x),p.return=g,g=p):(r(g,p),p=$b(x,g.mode,S),p.return=g,g=p),a(g)):r(g,p)}return y}var au=vT(!0),yT=vT(!1),Wg=_s(null),Bg=null,Kc=null,US=null;function GS(){US=Kc=Bg=null}function qS(e){var t=Wg.current;ir(Wg),e._currentValue=t}function cS(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function tu(e,t){Bg=e,US=Kc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(an=!0),e.firstContext=null)}function Gn(e){var t=e._currentValue;if(US!==e)if(e={context:e,memoizedValue:t,next:null},Kc===null){if(Bg===null)throw Error(he(308));Kc=e,Bg.dependencies={lanes:0,firstContext:e}}else Kc=Kc.next=e;return t}var wl=null;function KS(e){wl===null?wl=[e]:wl.push(e)}function xT(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,KS(t)):(r.next=n.next,n.next=r),t.interleaved=r,Oa(e,o)}function Oa(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var ds=!1;function XS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bT(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function wa(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function bs(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(At&2)!==0){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,Oa(e,r)}return n=o.interleaved,n===null?(t.next=t,KS(o)):(t.next=n.next,n.next=t),o.interleaved=t,Oa(e,r)}function bg(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,AS(e,r)}}function K_(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var n=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?n=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?n=i=t:i=i.next=t}else n=i=t;r={baseState:o.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function jg(e,t,r,o){var n=e.updateQueue;ds=!1;var i=n.firstBaseUpdate,a=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var d=n.baseState;a=0,u=c=l=null,s=i;do{var f=s.lane,m=s.eventTime;if((o&f)===f){u!==null&&(u=u.next={eventTime:m,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,v=s;switch(f=t,m=r,v.tag){case 1:if(h=v.payload,typeof h=="function"){d=h.call(m,d,f);break e}d=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,f=typeof h=="function"?h.call(m,d,f):h,f==null)break e;d=wr({},d,f);break e;case 2:ds=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=n.effects,f===null?n.effects=[s]:f.push(s))}else m={eventTime:m,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=m,l=d):u=u.next=m,a|=f;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;f=s,s=f.next,f.next=null,n.lastBaseUpdate=f,n.shared.pending=null}}while(!0);if(u===null&&(l=d),n.baseState=l,n.firstBaseUpdate=c,n.lastBaseUpdate=u,t=n.shared.interleaved,t!==null){n=t;do a|=n.lane,n=n.next;while(n!==t)}else i===null&&(n.shared.lanes=0);Nl|=a,e.lanes=a,e.memoizedState=d}}function X_(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var o=_b.transition;_b.transition={};try{e(!1),t()}finally{jt=r,_b.transition=o}}function kT(){return qn().memoizedState}function IW(e,t,r){var o=Cs(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},FT(e))zT(t,r);else if(r=xT(e,t,r,o),r!==null){var n=Ko();xi(r,e,o,n),WT(r,t,o)}}function $W(e,t,r){var o=Cs(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(FT(e))zT(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(n.hasEagerState=!0,n.eagerState=s,bi(s,a)){var l=t.interleaved;l===null?(n.next=n,KS(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}finally{}r=xT(e,t,n,o),r!==null&&(n=Ko(),xi(r,e,o,n),WT(r,t,o))}}function FT(e){var t=e.alternate;return e===Cr||t!==null&&t===Cr}function zT(e,t){pf=Hg=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function WT(e,t,r){if((r&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,AS(e,r)}}var Ug={readContext:Gn,useCallback:Po,useContext:Po,useEffect:Po,useImperativeHandle:Po,useInsertionEffect:Po,useLayoutEffect:Po,useMemo:Po,useReducer:Po,useRef:Po,useState:Po,useDebugValue:Po,useDeferredValue:Po,useTransition:Po,useMutableSource:Po,useSyncExternalStore:Po,useId:Po,unstable_isNewReconciler:!1},DW={readContext:Gn,useCallback:function(e,t){return Hi().memoizedState=[e,t===void 0?null:t],e},useContext:Gn,useEffect:Q_,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Cg(4194308,4,$T.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Cg(4194308,4,e,t)},useInsertionEffect:function(e,t){return Cg(4,2,e,t)},useMemo:function(e,t){var r=Hi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=Hi();return t=r!==void 0?r(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=IW.bind(null,Cr,e),[o.memoizedState,e]},useRef:function(e){var t=Hi();return e={current:e},t.memoizedState=e},useState:Y_,useDebugValue:oC,useDeferredValue:function(e){return Hi().memoizedState=e},useTransition:function(){var e=Y_(!1),t=e[0];return e=NW.bind(null,e[1]),Hi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=Cr,n=Hi();if(vr){if(r===void 0)throw Error(he(407));r=r()}else{if(r=t(),io===null)throw Error(he(349));(Tl&30)!==0||ET(o,t,r)}n.memoizedState=r;var i={value:r,getSnapshot:t};return n.queue=i,Q_(OT.bind(null,o,i,e),[e]),o.flags|=2048,$f(9,RT.bind(null,o,i,r,t),void 0,null),r},useId:function(){var e=Hi(),t=io.identifierPrefix;if(vr){var r=Ca,o=Sa;r=(o&~(1<<32-yi(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=Nf++,0typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var $o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),q0=(e,t)=>{for(var r in t)Dp(e,r,{get:t[r],enumerable:!0})},L4=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of k4(t))!F4.call(e,o)&&o!==r&&Dp(e,o,{get:()=>t[o],enumerable:!(n=yR(t,o))||n.enumerable});return e};var E=(e,t,r)=>(r=e!=null?A4(M4(e)):{},L4(t||!e||!e.__esModule?Dp(r,"default",{value:e,enumerable:!0}):r,e));var Qt=(e,t,r,n)=>{for(var o=n>1?void 0:n?yR(t,r):t,i=e.length-1,a;i>=0;i--)(a=e[i])&&(o=(n?a(t,r,o):a(o))||o);return n&&o&&Dp(t,r,o),o};var RO=$o(Ct=>{"use strict";var xf=Symbol.for("react.element"),w5=Symbol.for("react.portal"),E5=Symbol.for("react.fragment"),R5=Symbol.for("react.strict_mode"),O5=Symbol.for("react.profiler"),_5=Symbol.for("react.provider"),P5=Symbol.for("react.context"),T5=Symbol.for("react.forward_ref"),N5=Symbol.for("react.suspense"),I5=Symbol.for("react.memo"),$5=Symbol.for("react.lazy"),mO=Symbol.iterator;function D5(e){return e===null||typeof e!="object"?null:(e=mO&&e[mO]||e["@@iterator"],typeof e=="function"?e:null)}var vO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},yO=Object.assign,xO={};function vc(e,t,r){this.props=e,this.context=t,this.refs=xO,this.updater=r||vO}vc.prototype.isReactComponent={};vc.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};vc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function bO(){}bO.prototype=vc.prototype;function Rx(e,t,r){this.props=e,this.context=t,this.refs=xO,this.updater=r||vO}var Ox=Rx.prototype=new bO;Ox.constructor=Rx;yO(Ox,vc.prototype);Ox.isPureReactComponent=!0;var gO=Array.isArray,SO=Object.prototype.hasOwnProperty,_x={current:null},CO={key:!0,ref:!0,__self:!0,__source:!0};function wO(e,t,r){var n,o={},i=null,a=null;if(t!=null)for(n in t.ref!==void 0&&(a=t.ref),t.key!==void 0&&(i=""+t.key),t)SO.call(t,n)&&!CO.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1{"use strict";OO.exports=RO()});var MO=$o(Zt=>{"use strict";function $x(e,t){var r=e.length;e.push(t);e:for(;0>>1,o=e[n];if(0>>1;nbm(s,r))lbm(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[a]=r,n=a);else if(lbm(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function bm(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(_O=performance,Zt.unstable_now=function(){return _O.now()}):(Tx=Date,PO=Tx.now(),Zt.unstable_now=function(){return Tx.now()-PO});var _O,Tx,PO,Fi=[],Qa=[],L5=1,ko=null,En=3,wm=!1,al=!1,Sf=!1,IO=typeof setTimeout=="function"?setTimeout:null,$O=typeof clearTimeout=="function"?clearTimeout:null,TO=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Dx(e){for(var t=ui(Qa);t!==null;){if(t.callback===null)Cm(Qa);else if(t.startTime<=e)Cm(Qa),t.sortIndex=t.expirationTime,$x(Fi,t);else break;t=ui(Qa)}}function Ax(e){if(Sf=!1,Dx(e),!al)if(ui(Fi)!==null)al=!0,Mx(kx);else{var t=ui(Qa);t!==null&&Fx(Ax,t.startTime-e)}}function kx(e,t){al=!1,Sf&&(Sf=!1,$O(Cf),Cf=-1),wm=!0;var r=En;try{for(Dx(t),ko=ui(Fi);ko!==null&&(!(ko.expirationTime>t)||e&&!kO());){var n=ko.callback;if(typeof n=="function"){ko.callback=null,En=ko.priorityLevel;var o=n(ko.expirationTime<=t);t=Zt.unstable_now(),typeof o=="function"?ko.callback=o:ko===ui(Fi)&&Cm(Fi),Dx(t)}else Cm(Fi);ko=ui(Fi)}if(ko!==null)var i=!0;else{var a=ui(Qa);a!==null&&Fx(Ax,a.startTime-t),i=!1}return i}finally{ko=null,En=r,wm=!1}}var Em=!1,Sm=null,Cf=-1,DO=5,AO=-1;function kO(){return!(Zt.unstable_now()-AOe||125n?(e.sortIndex=r,$x(Qa,e),ui(Fi)===null&&e===ui(Qa)&&(Sf?($O(Cf),Cf=-1):Sf=!0,Fx(Ax,r-n))):(e.sortIndex=o,$x(Fi,e),al||wm||(al=!0,Mx(kx))),e};Zt.unstable_shouldYield=kO;Zt.unstable_wrapCallback=function(e){var t=En;return function(){var r=En;En=t;try{return e.apply(this,arguments)}finally{En=r}}}});var LO=$o((RJ,FO)=>{"use strict";FO.exports=MO()});var jT=$o(bo=>{"use strict";var z5=$(),yo=LO();function ge(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ab=Object.prototype.hasOwnProperty,W5=/^[: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]*$/,zO={},WO={};function B5(e){return ab.call(WO,e)?!0:ab.call(zO,e)?!1:W5.test(e)?WO[e]=!0:(zO[e]=!0,!1)}function j5(e,t,r,n){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return n?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function V5(e,t,r,n){if(t===null||typeof t>"u"||j5(e,t,r,n))return!0;if(n)return!1;if(r!==null)switch(r.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 Un(e,t,r,n,o,i,a){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=n,this.attributeNamespace=o,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var vn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){vn[e]=new Un(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];vn[t]=new Un(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){vn[e]=new Un(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){vn[e]=new Un(e,2,!1,e,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(e){vn[e]=new Un(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){vn[e]=new Un(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){vn[e]=new Un(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){vn[e]=new Un(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){vn[e]=new Un(e,5,!1,e.toLowerCase(),null,!1,!1)});var Jb=/[\-:]([a-z])/g;function Zb(e){return e[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(e){var t=e.replace(Jb,Zb);vn[t]=new Un(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Jb,Zb);vn[t]=new Un(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Jb,Zb);vn[t]=new Un(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){vn[e]=new Un(e,1,!1,e.toLowerCase(),null,!1,!1)});vn.xlinkHref=new Un("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){vn[e]=new Un(e,1,!1,e.toLowerCase(),null,!0,!0)});function eS(e,t,r,n){var o=vn.hasOwnProperty(t)?vn[t]:null;(o!==null?o.type!==0:n||!(2s||o[a]!==i[s]){var l=` +`+o[a].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=a&&0<=s);break}}}finally{zx=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?If(e):""}function H5(e){switch(e.tag){case 5:return If(e.type);case 16:return If("Lazy");case 13:return If("Suspense");case 19:return If("SuspenseList");case 0:case 2:case 15:return e=Wx(e.type,!1),e;case 11:return e=Wx(e.type.render,!1),e;case 1:return e=Wx(e.type,!0),e;default:return""}}function ub(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Sc:return"Fragment";case bc:return"Portal";case sb:return"Profiler";case tS:return"StrictMode";case lb:return"Suspense";case cb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case G_:return(e.displayName||"Context")+".Consumer";case q_:return(e._context.displayName||"Context")+".Provider";case rS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case nS:return t=e.displayName||null,t!==null?t:ub(e.type)||"Memo";case Za:t=e._payload,e=e._init;try{return ub(e(t))}catch{}}return null}function U5(e){var t=e.type;switch(e.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 e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ub(t);case 8:return t===tS?"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 ps(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function X_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function q5(e){var t=X_(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),n=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var o=r.get,i=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(a){n=""+a,i.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Om(e){e._valueTracker||(e._valueTracker=q5(e))}function Y_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=X_(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function eg(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function fb(e,t){var r=t.checked;return Er({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function jO(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ps(t.value!=null?t.value:r),e._wrapperState={initialChecked:n,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Q_(e,t){t=t.checked,t!=null&&eS(e,"checked",t,!1)}function db(e,t){Q_(e,t);var r=ps(t.value),n=t.type;if(r!=null)n==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(n==="submit"||n==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?pb(e,t.type,r):t.hasOwnProperty("defaultValue")&&pb(e,t.type,ps(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function VO(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var n=t.type;if(!(n!=="submit"&&n!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function pb(e,t,r){(t!=="number"||eg(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var $f=Array.isArray;function $c(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=_m.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Uf(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var kf={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},G5=["Webkit","ms","Moz","O"];Object.keys(kf).forEach(function(e){G5.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),kf[t]=kf[e]})});function tP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||kf.hasOwnProperty(e)&&kf[e]?(""+t).trim():t+"px"}function rP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=tP(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var K5=Er({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 hb(e,t){if(t){if(K5[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(ge(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(ge(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(ge(61))}if(t.style!=null&&typeof t.style!="object")throw Error(ge(62))}}function vb(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){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 yb=null;function oS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var xb=null,Dc=null,Ac=null;function qO(e){if(e=cd(e)){if(typeof xb!="function")throw Error(ge(280));var t=e.stateNode;t&&(t=Pg(t),xb(e.stateNode,e.type,t))}}function nP(e){Dc?Ac?Ac.push(e):Ac=[e]:Dc=e}function oP(){if(Dc){var e=Dc,t=Ac;if(Ac=Dc=null,qO(e),t)for(e=0;e>>=0,e===0?32:31-(i6(e)/a6|0)|0}var Pm=64,Tm=4194304;function Df(e){switch(e&-e){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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function og(e,t){var r=e.pendingLanes;if(r===0)return 0;var n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=Df(s):(i&=a,i!==0&&(n=Df(i)))}else a=r&~o,a!==0?n=Df(a):i!==0&&(n=Df(i));if(n===0)return 0;if(t!==0&&t!==n&&(t&o)===0&&(o=n&-n,i=t&-t,o>=i||o===16&&(i&4194240)!==0))return t;if((n&4)!==0&&(n|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=n;0r;r++)t.push(e);return t}function sd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-gi(t),e[t]=r}function u6(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var n=e.eventTimes;for(e=e.expirationTimes;0=Ff),t_=" ",r_=!1;function EP(e,t){switch(e){case"keyup":return L6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function RP(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cc=!1;function W6(e,t){switch(e){case"compositionend":return RP(t);case"keypress":return t.which!==32?null:(r_=!0,t_);case"textInput":return e=t.data,e===t_&&r_?null:e;default:return null}}function B6(e,t){if(Cc)return e==="compositionend"||!dS&&EP(e,t)?(e=CP(),Um=cS=ns=null,Cc=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=i_(r)}}function TP(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?TP(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function NP(){for(var e=window,t=eg();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=eg(e.document)}return t}function pS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Y6(e){var t=NP(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&TP(r.ownerDocument.documentElement,r)){if(n!==null&&pS(r)){if(t=n.start,e=n.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var o=r.textContent.length,i=Math.min(n.start,o);n=n.end===void 0?i:Math.min(n.end,o),!e.extend&&i>n&&(o=n,n=i,i=o),o=a_(r,i);var a=a_(r,n);o&&a&&(e.rangeCount!==1||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&(t=t.createRange(),t.setStart(o.node,o.offset),e.removeAllRanges(),i>n?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r=document.documentMode,wc=null,Rb=null,zf=null,Ob=!1;function s_(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ob||wc==null||wc!==eg(n)||(n=wc,"selectionStart"in n&&pS(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),zf&&Qf(zf,n)||(zf=n,n=sg(Rb,"onSelect"),0Oc||(e.current=$b[Oc],$b[Oc]=null,Oc--)}function er(e,t){Oc++,$b[Oc]=e.current,e.current=t}var ms={},Pn=hs(ms),Zn=hs(!1),ml=ms;function zc(e,t){var r=e.type.contextTypes;if(!r)return ms;var n=e.stateNode;if(n&&n.__reactInternalMemoizedUnmaskedChildContext===t)return n.__reactInternalMemoizedMaskedChildContext;var o={},i;for(i in r)o[i]=t[i];return n&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function eo(e){return e=e.childContextTypes,e!=null}function cg(){ir(Zn),ir(Pn)}function h_(e,t,r){if(Pn.current!==ms)throw Error(ge(168));er(Pn,t),er(Zn,r)}function zP(e,t,r){var n=e.stateNode;if(t=t.childContextTypes,typeof n.getChildContext!="function")return r;n=n.getChildContext();for(var o in n)if(!(o in t))throw Error(ge(108,U5(e)||"Unknown",o));return Er({},r,n)}function ug(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ms,ml=Pn.current,er(Pn,e),er(Zn,Zn.current),!0}function v_(e,t,r){var n=e.stateNode;if(!n)throw Error(ge(169));r?(e=zP(e,t,ml),n.__reactInternalMemoizedMergedChildContext=e,ir(Zn),ir(Pn),er(Pn,e)):ir(Zn),er(Zn,r)}var fa=null,Tg=!1,Qx=!1;function WP(e){fa===null?fa=[e]:fa.push(e)}function az(e){Tg=!0,WP(e)}function vs(){if(!Qx&&fa!==null){Qx=!0;var e=0,t=jt;try{var r=fa;for(jt=1;e>=a,o-=a,da=1<<32-gi(t)+o|r<R?(P=C,C=null):P=C.sibling;var O=p(m,C,x[R],b);if(O===null){C===null&&(C=P);break}e&&C&&O.alternate===null&&t(m,C),d=i(O,d,R),w===null?S=O:w.sibling=O,w=O,C=P}if(R===x.length)return r(m,C),yr&&sl(m,R),S;if(C===null){for(;RR?(P=C,C=null):P=C.sibling;var A=p(m,C,O.value,b);if(A===null){C===null&&(C=P);break}e&&C&&A.alternate===null&&t(m,C),d=i(A,d,R),w===null?S=A:w.sibling=A,w=A,C=P}if(O.done)return r(m,C),yr&&sl(m,R),S;if(C===null){for(;!O.done;R++,O=x.next())O=f(m,O.value,b),O!==null&&(d=i(O,d,R),w===null?S=O:w.sibling=O,w=O);return yr&&sl(m,R),S}for(C=n(m,C);!O.done;R++,O=x.next())O=g(C,m,R,O.value,b),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?R:O.key),d=i(O,d,R),w===null?S=O:w.sibling=O,w=O);return e&&C.forEach(function(F){return t(m,F)}),yr&&sl(m,R),S}function y(m,d,x,b){if(typeof x=="object"&&x!==null&&x.type===Sc&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Rm:e:{for(var S=x.key,w=d;w!==null;){if(w.key===S){if(S=x.type,S===Sc){if(w.tag===7){r(m,w.sibling),d=o(w,x.props.children),d.return=m,m=d;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Za&&b_(S)===w.type){r(m,w.sibling),d=o(w,x.props),d.ref=_f(m,w,x),d.return=m,m=d;break e}r(m,w);break}else t(m,w);w=w.sibling}x.type===Sc?(d=pl(x.props.children,m.mode,b,x.key),d.return=m,m=d):(b=Zm(x.type,x.key,x.props,null,m.mode,b),b.ref=_f(m,d,x),b.return=m,m=b)}return a(m);case bc:e:{for(w=x.key;d!==null;){if(d.key===w)if(d.tag===4&&d.stateNode.containerInfo===x.containerInfo&&d.stateNode.implementation===x.implementation){r(m,d.sibling),d=o(d,x.children||[]),d.return=m,m=d;break e}else{r(m,d);break}else t(m,d);d=d.sibling}d=ib(x,m.mode,b),d.return=m,m=d}return a(m);case Za:return w=x._init,y(m,d,w(x._payload),b)}if($f(x))return h(m,d,x,b);if(wf(x))return v(m,d,x,b);Wm(m,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,d!==null&&d.tag===6?(r(m,d.sibling),d=o(d,x),d.return=m,m=d):(r(m,d),d=ob(x,m.mode,b),d.return=m,m=d),a(m)):r(m,d)}return y}var Bc=HP(!0),UP=HP(!1),pg=hs(null),mg=null,Tc=null,vS=null;function yS(){vS=Tc=mg=null}function xS(e){var t=pg.current;ir(pg),e._currentValue=t}function kb(e,t,r){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===r)break;e=e.return}}function Mc(e,t){mg=e,vS=Tc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Jn=!0),e.firstContext=null)}function Wo(e){var t=e._currentValue;if(vS!==e)if(e={context:e,memoizedValue:t,next:null},Tc===null){if(mg===null)throw Error(ge(308));Tc=e,mg.dependencies={lanes:0,firstContext:e}}else Tc=Tc.next=e;return t}var ul=null;function bS(e){ul===null?ul=[e]:ul.push(e)}function qP(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,bS(t)):(r.next=o.next,o.next=r),t.interleaved=r,va(e,n)}function va(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var es=!1;function SS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function GP(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ma(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function cs(e,t,r){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,($t&2)!==0){var o=n.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),n.pending=t,va(e,r)}return o=n.interleaved,o===null?(t.next=t,bS(n)):(t.next=o.next,o.next=t),n.interleaved=t,va(e,r)}function Gm(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,aS(e,r)}}function S_(e,t){var r=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,r===n)){var o=null,i=null;if(r=r.firstBaseUpdate,r!==null){do{var a={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};i===null?o=i=a:i=i.next=a,r=r.next}while(r!==null);i===null?o=i=t:i=i.next=t}else o=i=t;r={baseState:n.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:n.shared,effects:n.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function gg(e,t,r,n){var o=e.updateQueue;es=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(s!==null){o.shared.pending=null;var l=s,c=l.next;l.next=null,a===null?i=c:a.next=c,a=l;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==a&&(s===null?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(i!==null){var f=o.baseState;a=0,u=c=l=null,s=i;do{var p=s.lane,g=s.eventTime;if((n&p)===p){u!==null&&(u=u.next={eventTime:g,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,v=s;switch(p=t,g=r,v.tag){case 1:if(h=v.payload,typeof h=="function"){f=h.call(g,f,p);break e}f=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,p=typeof h=="function"?h.call(g,f,p):h,p==null)break e;f=Er({},f,p);break e;case 2:es=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,p=o.effects,p===null?o.effects=[s]:p.push(s))}else g={eventTime:g,lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=g,l=f):u=u.next=g,a|=p;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;p=s,s=p.next,p.next=null,o.lastBaseUpdate=p,o.shared.pending=null}}while(!0);if(u===null&&(l=f),o.baseState=l,o.firstBaseUpdate=c,o.lastBaseUpdate=u,t=o.shared.interleaved,t!==null){o=t;do a|=o.lane,o=o.next;while(o!==t)}else i===null&&(o.shared.lanes=0);vl|=a,e.lanes=a,e.memoizedState=f}}function C_(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=Zx.transition;Zx.transition={};try{e(!1),t()}finally{jt=r,Zx.transition=n}}function uT(){return Bo().memoizedState}function uz(e,t,r){var n=fs(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},fT(e))dT(t,r);else if(r=qP(e,t,r,n),r!==null){var o=Hn();hi(r,e,n,o),pT(r,t,n)}}function fz(e,t,r){var n=fs(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(fT(e))dT(t,o);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var a=t.lastRenderedState,s=i(a,r);if(o.hasEagerState=!0,o.eagerState=s,vi(s,a)){var l=t.interleaved;l===null?(o.next=o,bS(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=qP(e,t,o,n),r!==null&&(o=Hn(),hi(r,e,n,o),pT(r,t,n))}}function fT(e){var t=e.alternate;return e===wr||t!==null&&t===wr}function dT(e,t){Wf=vg=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function pT(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,aS(e,r)}}var yg={readContext:Wo,useCallback:Rn,useContext:Rn,useEffect:Rn,useImperativeHandle:Rn,useInsertionEffect:Rn,useLayoutEffect:Rn,useMemo:Rn,useReducer:Rn,useRef:Rn,useState:Rn,useDebugValue:Rn,useDeferredValue:Rn,useTransition:Rn,useMutableSource:Rn,useSyncExternalStore:Rn,useId:Rn,unstable_isNewReconciler:!1},dz={readContext:Wo,useCallback:function(e,t){return zi().memoizedState=[e,t===void 0?null:t],e},useContext:Wo,useEffect:E_,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Xm(4194308,4,iT.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Xm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Xm(4,2,e,t)},useMemo:function(e,t){var r=zi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=zi();return t=r!==void 0?r(t):t,n.memoizedState=n.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},n.queue=e,e=e.dispatch=uz.bind(null,wr,e),[n.memoizedState,e]},useRef:function(e){var t=zi();return e={current:e},t.memoizedState=e},useState:w_,useDebugValue:TS,useDeferredValue:function(e){return zi().memoizedState=e},useTransition:function(){var e=w_(!1),t=e[0];return e=cz.bind(null,e[1]),zi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=wr,o=zi();if(yr){if(r===void 0)throw Error(ge(407));r=r()}else{if(r=t(),an===null)throw Error(ge(349));(hl&30)!==0||QP(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,E_(ZP.bind(null,n,i,e),[e]),n.flags|=2048,id(9,JP.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=zi(),t=an.identifierPrefix;if(yr){var r=pa,n=da;r=(n&~(1<<32-gi(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=nd++,0<\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=a.createElement(r,{is:o.is}):(e=a.createElement(r),r==="select"&&(a=e,o.multiple?a.multiple=!0:o.size&&(a.size=o.size))):e=a.createElementNS(e,r),e[Ui]=t,e[_f]=o,YT(e,t,!1,!1),t.stateNode=e;e:{switch(a=Ub(r,o),r){case"dialog":nr("cancel",e),nr("close",e),n=o;break;case"iframe":case"object":case"embed":nr("load",e),n=o;break;case"video":case"audio":for(n=0;ncu&&(t.flags|=128,o=!0,ef(i,!1),t.lanes=4194304)}else{if(!o)if(e=Vg(a),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ef(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!vr)return To(t),null}else 2*kr()-i.renderingStartTime>cu&&r!==1073741824&&(t.flags|=128,o=!0,ef(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=kr(),t.sibling=null,r=Sr.current,er(Sr,o?r&1|2:r&1),t):(To(t),null);case 22:case 23:return cC(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(Sn&1073741824)!==0&&(To(t),t.subtreeFlags&6&&(t.flags|=8192)):To(t),null;case 24:return null;case 25:return null}throw Error(he(156,t.tag))}function BW(e,t){switch(VS(t),t.tag){case 1:return ln(t.type)&&Lg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return su(),ir(sn),ir(Io),ZS(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return QS(t),null;case 13:if(ir(Sr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(he(340));iu()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ir(Sr),null;case 4:return su(),null;case 10:return qS(t.type._context),null;case 22:case 23:return cC(),null;case 24:return null;default:return null}}var gg=!1,No=!1,jW=typeof WeakSet=="function"?WeakSet:Set,qe=null;function Xc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){Nr(e,t,o)}else r.current=null}function yS(e,t,r){try{r()}catch(o){Nr(e,t,o)}}var lP=!1;function VW(e,t){if(tS=$g,e=oT(),BS(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var n=o.anchorOffset,i=o.focusNode;o=o.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,u=0,d=e,f=null;t:for(;;){for(var m;d!==r||n!==0&&d.nodeType!==3||(s=a+n),d!==i||o!==0&&d.nodeType!==3||(l=a+o),d.nodeType===3&&(a+=d.nodeValue.length),(m=d.firstChild)!==null;)f=d,d=m;for(;;){if(d===e)break t;if(f===r&&++c===n&&(s=a),f===i&&++u===o&&(l=a),(m=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=m}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(rS={focusedElem:e,selectionRange:r},$g=!1,qe=t;qe!==null;)if(t=qe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,qe=e;else for(;qe!==null;){t=qe;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,y=h.memoizedState,g=t.stateNode,p=g.getSnapshotBeforeUpdate(t.elementType===t.type?v:gi(t.type,v),y);g.__reactInternalSnapshotBeforeUpdate=p}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(he(163))}}catch(S){Nr(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,qe=e;break}qe=t.return}return h=lP,lP=!1,h}function mf(e,t,r){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var n=o=o.next;do{if((n.tag&e)===e){var i=n.destroy;n.destroy=void 0,i!==void 0&&yS(t,r,i)}n=n.next}while(n!==o)}}function ih(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==t)}}function xS(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function JT(e){var t=e.alternate;t!==null&&(e.alternate=null,JT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ui],delete t[_f],delete t[iS],delete t[RW],delete t[OW])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function eN(e){return e.tag===5||e.tag===3||e.tag===4}function cP(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||eN(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function bS(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Mg));else if(o!==4&&(e=e.child,e!==null))for(bS(e,t,r),e=e.sibling;e!==null;)bS(e,t,r),e=e.sibling}function SS(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(SS(e,t,r),e=e.sibling;e!==null;)SS(e,t,r),e=e.sibling}var vo=null,hi=!1;function cs(e,t,r){for(r=r.child;r!==null;)tN(e,t,r),r=r.sibling}function tN(e,t,r){if(Gi&&typeof Gi.onCommitFiberUnmount=="function")try{Gi.onCommitFiberUnmount(Qg,r)}catch{}switch(r.tag){case 5:No||Xc(r,t);case 6:var o=vo,n=hi;vo=null,cs(e,t,r),vo=o,hi=n,vo!==null&&(hi?(e=vo,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):vo.removeChild(r.stateNode));break;case 18:vo!==null&&(hi?(e=vo,r=r.stateNode,e.nodeType===8?Eb(e.parentNode,r):e.nodeType===1&&Eb(e,r),Cf(e)):Eb(vo,r.stateNode));break;case 4:o=vo,n=hi,vo=r.stateNode.containerInfo,hi=!0,cs(e,t,r),vo=o,hi=n;break;case 0:case 11:case 14:case 15:if(!No&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){n=o=o.next;do{var i=n,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&yS(r,t,a),n=n.next}while(n!==o)}cs(e,t,r);break;case 1:if(!No&&(Xc(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(s){Nr(r,t,s)}cs(e,t,r);break;case 21:cs(e,t,r);break;case 22:r.mode&1?(No=(o=No)||r.memoizedState!==null,cs(e,t,r),No=o):cs(e,t,r);break;default:cs(e,t,r)}}function uP(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new jW),t.forEach(function(o){var n=ZW.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function mi(e,t){var r=t.deletions;if(r!==null)for(var o=0;on&&(n=a),o&=~i}if(o=n,o=kr()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*UW(o/1960))-o,10e?16:e,gs===null)var o=!1;else{if(e=gs,gs=null,Kg=0,(At&6)!==0)throw Error(he(331));var n=At;for(At|=4,qe=e.current;qe!==null;){var i=qe,a=i.child;if((qe.flags&16)!==0){var s=i.deletions;if(s!==null){for(var l=0;lkr()-sC?Rl(e,0):aC|=r),cn(e,t)}function cN(e,t){t===0&&((e.mode&1)===0?t=1:(t=rg,rg<<=1,(rg&130023424)===0&&(rg=4194304)));var r=Ko();e=Oa(e,t),e!==null&&(Af(e,t,r),cn(e,r))}function QW(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),cN(e,r)}function ZW(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(he(314))}o!==null&&o.delete(t),cN(e,r)}var uN;uN=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||sn.current)an=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return an=!1,zW(e,t,r);an=(e.flags&131072)!==0}else an=!1,vr&&(t.flags&1048576)!==0&&mT(t,zg,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;wg(e,t),e=t.pendingProps;var n=nu(t,Io.current);tu(t,r),n=eC(null,t,o,e,n,r);var i=tC();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ln(o)?(i=!0,kg(t)):i=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,XS(t),n.updater=nh,t.stateNode=n,n._reactInternals=t,dS(t,o,e,r),t=mS(null,t,o,!0,i,r)):(t.tag=0,vr&&i&&jS(t),qo(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(wg(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=eB(o),e=gi(o,e),n){case 0:t=pS(null,t,o,e,r);break e;case 1:t=iP(null,t,o,e,r);break e;case 11:t=oP(null,t,o,e,r);break e;case 14:t=nP(null,t,o,gi(o.type,e),r);break e}throw Error(he(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:gi(o,n),pS(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:gi(o,n),iP(e,t,o,n,r);case 3:e:{if(qT(t),e===null)throw Error(he(387));o=t.pendingProps,i=t.memoizedState,n=i.element,bT(e,t),jg(t,o,null,r);var a=t.memoizedState;if(o=a.element,i.isDehydrated)if(i={element:o,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){n=lu(Error(he(423)),t),t=aP(e,t,o,r,n);break e}else if(o!==n){n=lu(Error(he(424)),t),t=aP(e,t,o,r,n);break e}else for(Cn=xs(t.stateNode.containerInfo.firstChild),wn=t,vr=!0,vi=null,r=yT(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(iu(),o===n){t=_a(e,t,r);break e}qo(e,t,o,r)}t=t.child}return t;case 5:return ST(t),e===null&&lS(t),o=t.type,n=t.pendingProps,i=e!==null?e.memoizedProps:null,a=n.children,oS(o,n)?a=null:i!==null&&oS(o,i)&&(t.flags|=32),GT(e,t),qo(e,t,a,r),t.child;case 6:return e===null&&lS(t),null;case 13:return KT(e,t,r);case 4:return YS(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=au(t,null,o,r):qo(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:gi(o,n),oP(e,t,o,n,r);case 7:return qo(e,t,t.pendingProps,r),t.child;case 8:return qo(e,t,t.pendingProps.children,r),t.child;case 12:return qo(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,n=t.pendingProps,i=t.memoizedProps,a=n.value,er(Wg,o._currentValue),o._currentValue=a,i!==null)if(bi(i.value,a)){if(i.children===n.children&&!sn.current){t=_a(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===o){if(i.tag===1){l=wa(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),cS(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(he(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),cS(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}qo(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,tu(t,r),n=Gn(n),o=o(n),t.flags|=1,qo(e,t,o,r),t.child;case 14:return o=t.type,n=gi(o,t.pendingProps),n=gi(o.type,n),nP(e,t,o,n,r);case 15:return HT(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:gi(o,n),wg(e,t),t.tag=1,ln(o)?(e=!0,kg(t)):e=!1,tu(t,r),BT(t,o,n),dS(t,o,n,r),mS(null,t,o,!0,e,r);case 19:return XT(e,t,r);case 22:return UT(e,t,r)}throw Error(he(156,t.tag))};function dN(e,t){return FP(e,t)}function JW(e,t,r,o){this.tag=e,this.key=r,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 Hn(e,t,r,o){return new JW(e,t,r,o)}function dC(e){return e=e.prototype,!(!e||!e.isReactComponent)}function eB(e){if(typeof e=="function")return dC(e)?1:0;if(e!=null){if(e=e.$$typeof,e===NS)return 11;if(e===IS)return 14}return 2}function ws(e,t){var r=e.alternate;return r===null?(r=Hn(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Og(e,t,r,o,n,i){var a=2;if(o=e,typeof e=="function")dC(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Wc:return Ol(r.children,n,i,t);case TS:a=8,n|=8;break;case Mb:return e=Hn(12,r,t,n|2),e.elementType=Mb,e.lanes=i,e;case Lb:return e=Hn(13,r,t,n),e.elementType=Lb,e.lanes=i,e;case kb:return e=Hn(19,r,t,n),e.elementType=kb,e.lanes=i,e;case SP:return sh(r,n,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case xP:a=10;break e;case bP:a=9;break e;case NS:a=11;break e;case IS:a=14;break e;case us:a=16,o=null;break e}throw Error(he(130,e==null?e:typeof e,""))}return t=Hn(a,r,t,n),t.elementType=e,t.type=o,t.lanes=i,t}function Ol(e,t,r,o){return e=Hn(7,e,o,t),e.lanes=r,e}function sh(e,t,r,o){return e=Hn(22,e,o,t),e.elementType=SP,e.lanes=r,e.stateNode={isHidden:!1},e}function $b(e,t,r){return e=Hn(6,e,null,t),e.lanes=r,e}function Db(e,t,r){return t=Hn(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function tB(e,t,r,o,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=hb(0),this.expirationTimes=hb(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hb(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function fC(e,t,r,o,n,i,a,s,l){return e=new tB(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Hn(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},XS(i),e}function rB(e,t,r){var o=3{"use strict";function hN(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(hN)}catch(e){console.error(e)}}hN(),vN.exports=gN()});var xN=zn(hC=>{"use strict";var yN=Si();hC.createRoot=yN.createRoot,hC.hydrateRoot=yN.hydrateRoot;var TJ});var Ee=zn(($J,fh)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var n="",i=0;i{"use strict";var xC=Symbol.for("react.element"),bC=Symbol.for("react.portal"),gh=Symbol.for("react.fragment"),hh=Symbol.for("react.strict_mode"),vh=Symbol.for("react.profiler"),yh=Symbol.for("react.provider"),xh=Symbol.for("react.context"),gB=Symbol.for("react.server_context"),bh=Symbol.for("react.forward_ref"),Sh=Symbol.for("react.suspense"),Ch=Symbol.for("react.suspense_list"),wh=Symbol.for("react.memo"),Eh=Symbol.for("react.lazy"),hB=Symbol.for("react.offscreen"),PN;PN=Symbol.for("react.module.reference");function Kn(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case xC:switch(e=e.type,e){case gh:case vh:case hh:case Sh:case Ch:return e;default:switch(e=e&&e.$$typeof,e){case gB:case xh:case bh:case Eh:case wh:case yh:return e;default:return t}}case bC:return t}}}Ht.ContextConsumer=xh;Ht.ContextProvider=yh;Ht.Element=xC;Ht.ForwardRef=bh;Ht.Fragment=gh;Ht.Lazy=Eh;Ht.Memo=wh;Ht.Portal=bC;Ht.Profiler=vh;Ht.StrictMode=hh;Ht.Suspense=Sh;Ht.SuspenseList=Ch;Ht.isAsyncMode=function(){return!1};Ht.isConcurrentMode=function(){return!1};Ht.isContextConsumer=function(e){return Kn(e)===xh};Ht.isContextProvider=function(e){return Kn(e)===yh};Ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===xC};Ht.isForwardRef=function(e){return Kn(e)===bh};Ht.isFragment=function(e){return Kn(e)===gh};Ht.isLazy=function(e){return Kn(e)===Eh};Ht.isMemo=function(e){return Kn(e)===wh};Ht.isPortal=function(e){return Kn(e)===bC};Ht.isProfiler=function(e){return Kn(e)===vh};Ht.isStrictMode=function(e){return Kn(e)===hh};Ht.isSuspense=function(e){return Kn(e)===Sh};Ht.isSuspenseList=function(e){return Kn(e)===Ch};Ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===gh||e===vh||e===hh||e===Sh||e===Ch||e===hB||typeof e=="object"&&e!==null&&(e.$$typeof===Eh||e.$$typeof===wh||e.$$typeof===yh||e.$$typeof===xh||e.$$typeof===bh||e.$$typeof===PN||e.getModuleId!==void 0)};Ht.typeOf=Kn});var IN=zn((ZJ,NN)=>{"use strict";NN.exports=TN()});var D4=zn(fx=>{"use strict";var qK=I(),KK=Symbol.for("react.element"),XK=Symbol.for("react.fragment"),YK=Object.prototype.hasOwnProperty,QK=qK.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ZK={key:!0,ref:!0,__self:!0,__source:!0};function $4(e,t,r){var o,n={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(o in t)YK.call(t,o)&&!ZK.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)n[o]===void 0&&(n[o]=t[o]);return{$$typeof:KK,type:e,key:i,ref:a,props:n,_owner:QK.current}}fx.Fragment=XK;fx.jsx=$4;fx.jsxs=$4});var Rr=zn((J4e,A4)=>{"use strict";A4.exports=D4()});var bx={"SDPPP Get Document":"SDPPP Get Document","SDPPP Get Layer By ID":"SDPPP Get Layer","SDPPP Get Linked Layers":"SDPPP Get Linked Layers","SDPPP Get Layers In Group":"SDPPP Get Layers In Group","SDPPP Get Text From Layer":"SDPPP Get Text From Layer","SDPPP Parse Layer Info":"SDPPP Parse Layer Info","SDPPP Get Selection":"SDPPP Get Selection","SDPPP Get Image From Photoshop":"SDPPP Get Image From Photoshop","SDPPP Send Images To Photoshop":"SDPPP Send Images To Photoshop","SDPPP Settings":"SDPPP Settings/Misc"};var Sx={"### Active Document ###":"### \u5F53\u524D\u6587\u6863 ###","### The Canvas ###":"### \u6574\u4E2A\u753B\u5E03 ###","### New Layer ###":"### \u65B0\u56FE\u5C42 ###","### Selected Layer ###":"### \u6240\u9009\u56FE\u5C42 ###","### Keep Size or Fit Canvas ###":"### \u4FDD\u6301\u5C3A\u5BF8\u6216\u9002\u5E94\u753B\u5E03 ###",_SDPPP_PSD_:"_SDPPP_PSD_","Save and run immediately":"\u4FDD\u5B58\u5E76\u7ACB\u5373\u6267\u884C",Close:"\u5173\u95ED","Select a {0}":"\u9009\u62E9\u4E00\u4E2A {0}","How to use .ccx file":"\u5982\u4F55\u4F7F\u7528 .ccx \u6587\u4EF6","1. If you have installed Adobe Creative Cloud":"1. \u5982\u679C\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 Adobe Creative Cloud","Just double click the .ccx file, it will install the plugin automatically":"\u53CC\u51FB .ccx \u6587\u4EF6\uFF0C\u5B83\u4F1A\u81EA\u52A8\u5B89\u88C5","2. If you don't have Adobe Creative Cloud":"2. \u5982\u679C\u4F60\u6CA1\u6709 Adobe Creative Cloud","Rename .ccx to .zip and extract it into ":"\u5C06 .ccx \u91CD\u547D\u540D\u4E3A .zip \u5E76\u89E3\u538B\u5230",or:"\u6216","Photoshop directory":"Photoshop \u5B89\u88C5\u76EE\u5F55","Cannot connect multiple different document widgets with same value":"\u4E0D\u80FD\u8FDE\u63A5\u591A\u4E2A\u5177\u6709\u76F8\u540C\u503C\u7684\u6587\u6863\u5C0F\u90E8\u4EF6","You can only have one SDPPP Settings node in a workflow":"\u4E00\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2A SDPPP Settings \u8282\u70B9","convert widget {0} failed:":"\u63A7\u4EF6{0}\u8F6C\u6362\u5931\u8D25\uFF1A","hidden webview load failed: {0}, please select a browser page to continue":"\u5185\u7F6E webview \u52A0\u8F7D\u5931\u8D25: {0}\uFF0C\u8BF7\u9009\u62E9\u4E00\u4E2A\u6D4F\u89C8\u5668\u9875\u9762\u7EE7\u7EED","SDPPP Get Document":"SDPPP\u83B7\u53D6\u6587\u6863(GetDocument)","SDPPP Get Layer By ID":"SDPPP\u83B7\u53D6\u56FE\u5C42(GetLayer)","SDPPP Get Linked Layers":"SDPPP\u83B7\u53D6\u94FE\u63A5\u56FE\u5C42(GetLinkedLayers)","SDPPP Get Layers In Group":"SDPPP\u83B7\u53D6\u7EC4\u4E2D\u56FE\u5C42(GetLayersInGroup)","SDPPP Get Text From Layer":"SDPPP\u83B7\u53D6\u56FE\u5C42\u6587\u672C(GetTextFromLayer)","SDPPP Parse Layer Info":"SDPPP\u89E3\u6790\u56FE\u5C42\u4FE1\u606F(ParseLayerInfo)","SDPPP Get Selection":"SDPPP\u83B7\u53D6\u9009\u533A(GetSelection)","SDPPP Get Image From Photoshop":"SDPPP\u4ECEPS\u83B7\u53D6\u56FE\u50CF(GetImageFromPhotoshop)","SDPPP Send Images To Photoshop":"SDPPP\u53D1\u9001\u56FE\u50CF\u5230PS(SendImagesToPhotoshop)","SDPPP Send Text To Layer":"SDPPP\u53D1\u9001\u6587\u672C\u5230\u56FE\u5C42(SendTextToLayer)","SDPPP Run Photoshop Action":"SDPPP\u8FD0\u884CPS Action(RunPhotoshopAction)","download PS plugin (.ccx)":"\u4E0B\u8F7D Photoshop \u63D2\u4EF6 (.ccx)","current ComfyUI pageid: {0}":"\u5F53\u524D ComfyUI \u9875\u9762ID: {0}","current A1111 pageid: {0}":"\u5F53\u524D A1111 \u9875\u9762ID: {0}","document linked":"\u6587\u6863\u53C2\u6570\u5DF2\u94FE\u63A5","layer linked":"\u56FE\u5C42\u53C2\u6570\u5DF2\u94FE\u63A5","bound linked":"\u8303\u56F4\u53C2\u6570\u5DF2\u94FE\u63A5",document:"\u6587\u6863",Document:"\u6587\u6863",DOCUMENT:"\u6587\u6863",document_name:"\u6587\u6863\u540D\u5B57id",layer_nameid:"\u56FE\u5C42\u540D\u5B57id",layer_name:"\u56FE\u5C42\u540D\u5B57",layer_info:"\u56FE\u5C42\u4FE1\u606F",bound_top:"\u8303\u56F4\u4E0A\u8FB9\u8DDD",bound_left:"\u8303\u56F4\u5DE6\u8FB9\u8DDD",bound_width:"\u8303\u56F4\u5BBD\u5EA6",bound_height:"\u8303\u56F4\u9AD8\u5EA6",center_x:"\u4E2D\u5FC3\u70B9x",center_y:"\u4E2D\u5FC3\u70B9y",opacity:"\u900F\u660E\u5EA6",layer:"\u56FE\u5C42",layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",Layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",bound:"\u8303\u56F4",bounds:"\u8303\u56F4","bounds [optional]":"\u8303\u56F4[\u53EF\u9009]",boundary:"\u8303\u56F4",Boundary:"\u8303\u56F4",canvas_boundary:"\u753B\u5E03\u8303\u56F4",canvas_bound:"\u753B\u5E03\u8303\u56F4",layer_boundary:"\u56FE\u5C42\u8303\u56F4",layer_bound:"\u56FE\u5C42\u8303\u56F4","Photoshop Disconnected!":"Photoshop \u672A\u8FDE\u63A5\uFF01",rgb_out:"RGB\u8F93\u51FA",alpha_out:"Alpha\u8F93\u51FA",images:"\u56FE\u50CF",text:"\u6587\u672C",ID_mode:"\u7CBE\u786EID\u6A21\u5F0F",name_mode:"\u540D\u5B57\u5339\u914D\u6A21\u5F0F",select:"\u9009\u62E9","document boundary":"\u6587\u6863\u8303\u56F4","layer boundary":"\u56FE\u5C42\u8303\u56F4","selection boundary":"\u9009\u4E2D\u8303\u56F4","save .psd to this workflow":"\u4FDD\u5B58.psd\u5230\u8FD9\u4E2A\u5DE5\u4F5C\u6D41","extract saved .psd to Photoshop":"\u63D0\u53D6\u4FDD\u5B58\u7684.psd\u5230Photoshop","sample .psd":"\u793A\u4F8B.psd",mask:"\u906E\u7F69",name:"\u540D\u79F0",quality:"\u56FE\u50CF\u8D28\u91CF",Runner:"\u8FD0\u884C\u8F7D\u4F53","PS Webview":"PS \u5185\u7F6E\u7F51\u9875","Browser {0}":"\u6D4F\u89C8\u5668\u9875\u9762 {0}",timeout:"\u8D85\u65F6","Loading...":"\u52A0\u8F7D\u4E2D...","--multi-user Not Login!":"--multi-user\u5DF2\u6FC0\u6D3B\uFF0C\u4F46\u672A\u767B\u5F55\uFF01",Logout:"\u767B\u51FA","User: ":"\u7528\u6237: ",connect:"\u8FDE\u63A5",connected:"\u5DF2\u8FDE\u63A5",disconnect:"\u65AD\u5F00",disconnected:"\u5DF2\u65AD\u5F00\u8FDE\u63A5","reconnecting...":"\u91CD\u8FDE\u4E2D...",connecting:"\u8FDE\u63A5\u4E2D",webpages:"\u7F51\u9875\u5217\u8868",workflows:"\u5DE5\u4F5C\u6D41",workflow:"\u5DE5\u4F5C\u6D41","auto run page [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u9875\u9762 {0}..","auto run workflow [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41 {0}..","auto run workflow after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41..",selection_only:"\u4EC5\u9009\u533A","Queue:":"\u961F\u5217:","Set As:":"\u8BBE\u7F6E\u4E3A:","Error {0}... please contact me via Discord/Github":"\u51FA\u73B0\u9519\u8BEF {0}...\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211","Webview initialize failed. Please report to me via Discord/Github with your ComfyURL, Operate System":"Webview \u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211\u5E76\u9644\u4E0A\u4F60\u7684Comfy\u5730\u5740\u3001\u64CD\u4F5C\u7CFB\u7EDF","ComfyUI with --multi-user is only available for sponsors":'\u5E26"--multi-user"\u7684ComfyUI\u4EC5\u5BF9\u8D5E\u52A9\u8005\u5F00\u653E',"Workflow Runner is loading...":"\u8FD0\u884C\u8F7D\u4F53\u5C1A\u5728\u52A0\u8F7D...","(Page ID: {0})Queue: {1}":"(\u9875\u9762ID: {0}) \u961F\u5217\u957F\u5EA6 {1}","no suitable node to control in this workflow":"\u8FD9\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u6CA1\u6709\u80FD\u63A7\u5236\u7684\u8282\u70B9",Save:"\u4FDD\u5B58",Edit:"\u7F16\u8F91","Edit in ComfyUI":"\u5728 ComfyUI \u4E2D\u7F16\u8F91","using browser page [{0}] for workflow running":"\u6B63\u63A5\u7BA1\u7F51\u9875 [{0}] \u8FD0\u884C\u5DE5\u4F5C\u6D41","workflow running by hidden webview":"\u5DE5\u4F5C\u6D41\u5728\u9690\u85CF\u7684webview\u4E2D\u8FD0\u884C","Lock Image":"\u9501\u5B9A\u56FE\u50CF","Unlock Image":"\u89E3\u9501\u56FE\u50CF","search...":"\u641C\u7D22...","disabled when running in browser page":"\u63A5\u7BA1\u7F51\u9875\u65F6\u4E0D\u53EF\u7528","only supported in Photoshop":"\u4EC5\u5728 Photoshop \u4E2D\u652F\u6301",Login:"\u767B\u5F55","Invitation Code":"\u9080\u8BF7\u7801",Username:"\u7528\u6237\u540D",Password:"\u5BC6\u7801","Please input invitation code":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","Please input username":"\u8BF7\u8F93\u5165\u7528\u6237\u540D","Please input password":"\u8BF7\u8F93\u5165\u5BC6\u7801","Open more ComfyUI pages to see more options here":"\u6253\u5F00\u66F4\u591A ComfyUI \u9875\u9762\u4EE5\u67E5\u770B\u66F4\u591A\u9009\u9879","Comfy multi-user: ":"Comfy \u591A\u7528\u6237: ","Not Login":"\u672A\u767B\u5F55","Comfy API-Key: ":"Comfy API-Key: ","Login/Auth":"\u767B\u5F55/\u8BA4\u8BC1","Logged in by email/password":"\u5DF2\u901A\u8FC7\u90AE\u7BB1/\u5BC6\u7801\u767B\u5F55","Set API Key":"\u8BBE\u7F6E API Key","Please input API key (will reload Runner)":"\u8BF7\u8F93\u5165 API Key (\u4F1A\u91CD\u542F\u8FD0\u884C\u8F7D\u4F53)","### Active Workflow ###":"### \u5F53\u524D\u5DE5\u4F5C\u6D41 ###","### Example SDXL ###":"### \u793A\u4F8BSDXL\u5DE5\u4F5C\u6D41 ###","Open ComfyUI in the browser to see more options":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00 ComfyUI \u4EE5\u5F97\u5230\u66F4\u591A\u9009\u9879","502: Maybe the server is not running":"502: \u670D\u52A1\u5668\u53EF\u80FD\u672A\u8FD0\u884C","404: Maybe SDPPP is not installed or failed to run in ComfyUI":"404: \u53EF\u80FD\u5728ComfyUI\u4E2DSDPPP\u672A\u5B89\u88C5\u6216\u8FD0\u884C\u5931\u8D25","{0}. reconnecting...":"{0}. \u91CD\u8FDE\u4E2D...","disconnected to {0} failed {1}":"\u65AD\u5F00\u8FDE\u63A5 {0} \u9519\u8BEF {1}","version mismatch, please reinstall PS plugin":"\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5 PS \u63D2\u4EF6","instance type not recognized":"\u672A\u8BC6\u522B\u7684\u8F6F\u4EF6\u7C7B\u578B","Error: {0}":"\u9519\u8BEF: {0}","Verification Error":"\u9A8C\u8BC1\u9519\u8BEF","document {0} not found":"\u627E\u4E0D\u5230\u6587\u6863: {0}",'only layer kind "TEXT" is supported, invalid layer: {0}':"\u4E0D\u652F\u6301\u975E\u6587\u672C\u56FE\u5C42: {0}","create layer failed":"\u521B\u5EFA\u56FE\u5C42\u5931\u8D25","layer not found {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","no linked layer for {0}":"\u6CA1\u6709\u94FE\u63A5\u56FE\u5C42: {0}","layer {0} is not a group":"\u56FE\u5C42 {0} \u4E0D\u662F\u4E00\u4E2A\u7EC4","no layer in group {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u56FE\u5C42","layer not found: {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","No upload_name":"\u4E0A\u4F20\u63A5\u53E3\u8FD4\u56DE\u4E86\u5931\u8D25","get pixel of {0} failed":"\u83B7\u53D6\u50CF\u7D20\u5931\u8D25: {0}","merge group failed":"\u5408\u5E76\u7EC4\u5931\u8D25","invalid name: {0}":"\u975E\u6CD5\u7684\u540D\u79F0: {0}","get_layer_info: layer_identify required":"get_layer_info: \u9700\u8981 layer_identify","invalid action: {0}":"\u65E0\u6548\u7684\u64CD\u4F5C: {0}","create document failed":"\u521B\u5EFA\u6587\u6863\u5931\u8D25","create document for preview":"\u521B\u5EFA\u9884\u89C8\u6587\u6863","resize document for preview":"\u8C03\u6574\u9884\u89C8\u6587\u6863\u5C3A\u5BF8","no first related layer in {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u7B2C\u4E00\u4E2A\u76F8\u5173\u56FE\u5C42","imageDataError: data length is not multiple of width * height":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: \u6570\u636E\u957F\u5EA6\u4E0D\u662F\u5BBD\u5EA6 * \u9AD8\u5EA6\u7684\u500D\u6570","imageDataError: originComponents must be 1 or 3":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: originComponents \u5FC5\u987B\u662F 1 \u6216 3","unexpected connection lost, please try to reconnect":"\u610F\u5916\u65AD\u5F00\u8FDE\u63A5\uFF0C\u8BF7\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5","Workflow list is empty, please save a workflow by Comfy's lastest UI":"\u5DE5\u4F5C\u6D41\u5217\u8868\u4E3A\u7A7A\uFF0C\u8BF7\u5728Comfy\u7684\u65B0\u7248UI\u4E2D\u4FDD\u5B58\u4E00\u4E2A\u5DE5\u4F5C\u6D41","No opened ComfyUI pages":"\u6CA1\u6709\u5DF2\u6253\u5F00\u7684ComfyUI\u9875\u9762","comfyAPI is not initialized, maybe comfyUI is too old":"\u65E0\u6CD5\u83B7\u53D6 ComfyAPI\uFF0C\u53EF\u80FD ComfyUI \u7248\u672C\u592A\u65E7","unsupported channel counts: {0}":"\u4E0D\u652F\u6301\u7684\u901A\u9053\u6570: {0}","Timeout, Maybe the URL is wrong":"\u8D85\u65F6\uFF0C\u53EF\u80FD comfy\u5730\u5740 \u586B\u5199\u9519\u8BEF","Workflow list loading failed: {0}":"\u5DE5\u4F5C\u6D41\u5217\u8868\u52A0\u8F7D\u5931\u8D25: {0}","Please register a user in ComfyUI":"\u8BF7\u5728 ComfyUI \u4E2D\u6CE8\u518C\u4E00\u4E2A\u7528\u6237","GetSelection need Photoshop version 25+":"GetSelection \u9700\u8981 Photoshop 25+ \u7248\u672C","Action {0} not found":"Action {0} \u672A\u627E\u5230","Action set {0} not found":"ActionSet {0} \u672A\u627E\u5230","{0} cannot be used in Photoshop Action Node":"{0} \u4E0D\u80FD\u5728 Photoshop Action \u8282\u70B9\u4E2D\u4F7F\u7528","Group layers":"\u56FE\u5C42\u7EC4","Show All Groups":"\u663E\u793A\u6240\u6709\u7EC4","create document for sent images":"\u7ED9\u53D1\u9001\u7684\u56FE\u7247\u521B\u5EFA\u6587\u6863","show sent images":"\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","fallback show sent images":"\u53D6\u6D88\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","get content of layer {0}":"\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","fallback get content of layer {0}":"\u53D6\u6D88\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","get layer info":"\u83B7\u53D6\u56FE\u5C42\u4FE1\u606F","sdppp extract PSD":"sdppp \u5BFC\u5165 PSD","sdppp get PSD":"sdppp \u83B7\u53D6 PSD","set text to layer":"\u8BBE\u7F6E\u56FE\u5C42\u7684\u6587\u672C","run Photoshop Action":"sdppp \u8FD0\u884C Photoshop Action","select layer":"sdppp \u9009\u4E2D\u56FE\u5C42","{0} wants to extract a PSD file to Photoshop, are you sure?":"{0} \u60F3\u8981\u91CA\u653E\u4E00\u4E2A.psd\u6587\u4EF6\u5230Photoshop\uFF0C\u786E\u5B9A\u5417\uFF1F","should sdppp refuse extracting PSD to Photoshop in this session anymore?":"\u662F\u5426\u8981\u8BA9 sdppp \u62D2\u7EDD\u672C\u6B21PS\u4F1A\u8BDD\u518D\u6B21\u63A5\u53D7.psd\u91CA\u653E\u8BF7\u6C42\uFF1F","Wide Mode":"\u5BBD\u5C4F\u6A21\u5F0F","Quick Set":"\u5FEB\u901F\u8BBE\u7F6E","Selected Layer":"\u9009\u4E2D\u56FE\u5C42","Selected Layer (invert)":"\u9009\u4E2D\u56FE\u5C42(\u53CD\u5411)",Canvas:"\u753B\u5E03",Selection:"\u9009\u533A",Manual:"\u624B\u52A8\u6A21\u5F0F",Auto:"\u81EA\u52A8\u6A21\u5F0F","This plugin is based on sd-ppp":"\u672C\u63D2\u4EF6\u57FA\u4E8Esd-ppp\u5F00\u53D1","And follows its open source license:":"\u5E76\u9075\u5FAA\u5176\u5F00\u6E90\u534F\u8BAE\uFF1A",Cloud:"\u4E91\u7AEF\u63A8\u8350",Sponsors:"\u8D5E\u52A9","waiting...":"\u865A\u4F4D\u4EE5\u5F85",Links:"\u53CB\u60C5\u94FE\u63A5",Community:"\u793E\u533A","LICENSE:":"\u8BB8\u53EF\u8BC1\uFF1A","Official Site":"\u5B98\u65B9\u7F51\u7AD9",upload:"\u4E0A\u4F20","Simplify Workflow":"\u7B80\u5316\u5DE5\u4F5C\u6D41",Photoshop:"Photoshop","Photoshop plugin settings":"Photoshop \u63D2\u4EF6\u8BBE\u7F6E","Photoshop plugin":"Photoshop \u63D2\u4EF6","SDPPP Settings/Misc":"SDPPP \u8BBE\u7F6E/\u6742\u9879","Sample .PSD for this workflow:":"\u793A\u4F8B.PSD","Download Example .PSD":"\u4E0B\u8F7D\u793A\u4F8B.PSD","Maximum Image Size (px):":"\u6700\u5927\u56FE\u50CF\u5C3A\u5BF8(px)",Download:"\u4E0B\u8F7D",Upload:"\u4E0A\u4F20",Reset:"\u91CD\u7F6E",Refresh:"\u5237\u65B0","Comfy URL (You can copy it to connect ComfyUI in the plugin):":"Comfy\u5730\u5740(\u4F60\u53EF\u4EE5\u590D\u5236\u5B83\u5230\u63D2\u4EF6\u4E2D\u8FDE\u63A5ComfyUI):","use slider for number widget:":"\u6570\u5B57\u63A7\u4EF6\u4F7F\u7528\u6ED1\u5757","Photoshop is not connected":"Photoshop \u672A\u8FDE\u63A5","select...":"\u8BF7\u9009\u62E9","click to edit":"\u70B9\u51FB\u7F16\u8F91","ComfyManager not found, cannot reboot":"Comfy Manager\u672A\u5B89\u88C5\uFF0C\u65E0\u6CD5\u91CD\u542F","Failed to reboot ComfyUI":"\u91CD\u542FComfyUI\u5931\u8D25"};var GR=typeof yx<"u"?yx:void 0,Cx="en";typeof navigator<"u"&&navigator.language?Cx=navigator.language=="zh-CN"?"zhcn":"en":GR&&(Cx=GR("uxp").host.uiLocale.startsWith("zh")?"zhcn":"en");function ge(e,...t){let r=Cx=="zhcn"?Sx[e]:e in bx?bx[e]:e;if(!r)throw new Error(`i18n key not found: ${e}`);return r.replace(/{(\d+)}/g,function(o,n){return typeof t[n]<"u"?t[n]:o})}function fl(e,t){return e==t||Sx[e]==t}var Xt=class e{static SPECIAL_DOCUMENT_CURRENT="### Active Document ###";static is_SPECIAL_DOCUMENT_CURRENT(t){return fl(this.SPECIAL_DOCUMENT_CURRENT,t)}static get_SPECIAL_DOCUMENT_CURRENT(){return ge(this.SPECIAL_DOCUMENT_CURRENT)}static SPECIAL_LAYER_KEEP_SIZE="### Keep Size or Fit Canvas ###";static is_SPECIAL_LAYER_FIT(t){return fl(this.SPECIAL_LAYER_KEEP_SIZE,t)}static get_SPECIAL_LAYER_FIT(){return ge(this.SPECIAL_LAYER_KEEP_SIZE)}static SPECIAL_LAYER_USE_CANVAS="### The Canvas ###";static is_SPECIAL_LAYER_USE_CANVAS(t){return fl(this.SPECIAL_LAYER_USE_CANVAS,t)}static get_SPECIAL_LAYER_USE_CANVAS(){return ge(this.SPECIAL_LAYER_USE_CANVAS)}static SPECIAL_LAYER_NEW_LAYER="### New Layer ###";static is_SPECIAL_LAYER_NEW_LAYER(t){return fl(this.SPECIAL_LAYER_NEW_LAYER,t)}static get_SPECIAL_LAYER_NEW_LAYER(){return ge(this.SPECIAL_LAYER_NEW_LAYER)}static SPECIAL_LAYER_SELECTED_LAYER="### Selected Layer ###";static is_SPECIAL_LAYER_SELECTED_LAYER(t){return fl(this.SPECIAL_LAYER_SELECTED_LAYER,t)}static get_SPECIAL_LAYER_SELECTED_LAYER(){return ge(this.SPECIAL_LAYER_SELECTED_LAYER)}static SPECIAL_LAYER_PREVIEW_DOCUMENT="_SDPPP_PSD_";static is_SPECIAL_LAYER_PREVIEW_DOCUMENT(t){return fl(this.SPECIAL_LAYER_PREVIEW_DOCUMENT,t)}static get_SPECIAL_LAYER_PREVIEW_DOCUMENT(){return ge(this.SPECIAL_LAYER_PREVIEW_DOCUMENT)}static getSpecialDocumentCurrent(){return ge(e.SPECIAL_DOCUMENT_CURRENT)}static getSpecialLayerForGet(){return[ge(e.SPECIAL_LAYER_USE_CANVAS),ge(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialLayerForSend(){return[ge(e.SPECIAL_LAYER_NEW_LAYER),ge(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialDocumentForPreview(){return ge(e.SPECIAL_LAYER_PREVIEW_DOCUMENT)}static fixI18n(t){return this.is_SPECIAL_DOCUMENT_CURRENT(t)?this.SPECIAL_DOCUMENT_CURRENT:this.is_SPECIAL_LAYER_NEW_LAYER(t)?this.SPECIAL_LAYER_NEW_LAYER:this.is_SPECIAL_LAYER_PREVIEW_DOCUMENT(t)?this.SPECIAL_LAYER_PREVIEW_DOCUMENT:this.is_SPECIAL_LAYER_USE_CANVAS(t)?this.SPECIAL_LAYER_USE_CANVAS:this.is_SPECIAL_LAYER_SELECTED_LAYER(t)?this.SPECIAL_LAYER_SELECTED_LAYER:t}};var wx={};xx(wx,{JsonPatchError:()=>Tr,_areEquals:()=>Nd,applyOperation:()=>pl,applyPatch:()=>Oc,applyReducer:()=>uz,deepClone:()=>lz,getValueByPointer:()=>ml,validate:()=>KR,validator:()=>fm});var az=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),sz=Object.prototype.hasOwnProperty;function cm(e,t){return sz.call(e,t)}function um(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r=48&&o<=57){t++;continue}return!1}return!0}function zi(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Pd(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function lm(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t0&&l[u-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&f===void 0&&(c[m]===void 0?f=l.slice(0,u).join("/"):u==d-1&&(f=t.path),f!==void 0&&h(t,0,e,f)),u++,Array.isArray(c)){if(m==="-")m=c.length;else{if(r&&!dm(m))throw new Tr("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",i,t,e);dm(m)&&(m=~~m)}if(u>=d){if(r&&t.op==="add"&&m>c.length)throw new Tr("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);var a=cz[t.op].call(t,c,m,e);if(a.test===!1)throw new Tr("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}}else if(u>=d){var a=Rc[t.op].call(t,c,m,e);if(a.test===!1)throw new Tr("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}if(c=c[m],r&&u0)throw new Tr('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new Tr("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new Tr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&lm(e.value))throw new Tr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r){if(e.op=="add"){var n=e.path.split("/").length,i=o.split("/").length;if(n!==i+1&&n!==i)throw new Tr("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==o)throw new Tr("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if(e.op==="move"||e.op==="copy"){var a={op:"_get",path:e.from,value:void 0},s=KR([a],r);if(s&&s.name==="OPERATION_PATH_UNRESOLVABLE")throw new Tr("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new Tr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function KR(e,t,r){try{if(!Array.isArray(e))throw new Tr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)Oc(Pr(t),Pr(e),r||!0);else{r=r||fm;for(var o=0;opm,generate:()=>Ex,observe:()=>vz,unobserve:()=>hz});var Rx=new WeakMap,dz=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),fz=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function pz(e){return Rx.get(e)}function mz(e,t){return e.observers.get(t)}function gz(e,t){e.observers.delete(t.callback)}function hz(e,t){t.unobserve()}function vz(e,t){var r=[],o,n=pz(e);if(!n)n=new dz(e),Rx.set(e,n);else{var i=mz(n,t);o=i&&i.observer}if(o)return o;if(o={},n.value=Pr(e),t){o.callback=t,o.next=null;var a=function(){Ex(o)},s=function(){clearTimeout(o.next),o.next=setTimeout(a)};typeof window<"u"&&(window.addEventListener("mouseup",s),window.addEventListener("keyup",s),window.addEventListener("mousedown",s),window.addEventListener("keydown",s),window.addEventListener("change",s))}return o.patches=r,o.object=e,o.unobserve=function(){Ex(o),clearTimeout(o.next),gz(n,o),typeof window<"u"&&(window.removeEventListener("mouseup",s),window.removeEventListener("keyup",s),window.removeEventListener("mousedown",s),window.removeEventListener("keydown",s),window.removeEventListener("change",s))},n.observers.set(t,new fz(t,o)),o}function Ex(e,t){t===void 0&&(t=!1);var r=Rx.get(e.object);Ox(r.value,e.object,e.patches,"",t),e.patches.length&&Oc(r.value,e.patches);var o=e.patches;return o.length>0&&(e.patches=[],e.callback&&e.callback(o)),o}function Ox(e,t,r,o,n){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var i=um(t),a=um(e),s=!1,l=!1,c=a.length-1;c>=0;c--){var u=a[c],d=e[u];if(cm(t,u)&&!(t[u]===void 0&&d!==void 0&&Array.isArray(t)===!1)){var f=t[u];typeof d=="object"&&d!=null&&typeof f=="object"&&f!=null&&Array.isArray(d)===Array.isArray(f)?Ox(d,f,r,o+"/"+zi(u),n):d!==f&&(s=!0,n&&r.push({op:"test",path:o+"/"+zi(u),value:Pr(d)}),r.push({op:"replace",path:o+"/"+zi(u),value:Pr(f)}))}else Array.isArray(e)===Array.isArray(t)?(n&&r.push({op:"test",path:o+"/"+zi(u),value:Pr(d)}),r.push({op:"remove",path:o+"/"+zi(u)}),l=!0):(n&&r.push({op:"test",path:o,value:e}),r.push({op:"replace",path:o,value:t}),s=!0)}if(!(!l&&i.length==a.length))for(var c=0;co!=t)}dispatch(t,r){let o=new Map;t.forEach(n=>{this.subscribers.forEach(([i,a])=>{n.path.startsWith(i)&&!o.has(i)&&o.set(i,JSON.stringify(i==="/"?r:ml(r,i)))})}),o.forEach((n,i)=>{let a=i==="/"?this._data:ml(this._data,i);n!==JSON.stringify(a)&&this.subscribers.filter(([s,l])=>s===i).forEach(([s,l])=>{let c={};try{c=l(a,JSON.parse(n||{}))}catch(u){console.error(u.stack||u.message||u)}c instanceof Promise&&c.catch(u=>{console.error(u.stack||u.message||u)})})})}};function hr(e,t,r){return e.constructor[mm]||(e.constructor[mm]=[]),e.constructor[mm].push(t),{value:function(...o){let n=Pr(this._data);r.value.apply(this,o);let i=pm(n,this._data);i.length!=0&&(this._mutationRecords.push(...i),this._version+=i.length,this.dispatch(i,n))}}}var gl=class extends Px{constructor(t){super(Object.assign({sid:"",ssid:""},t||{}))}setSID(t){this._data.sid=t,this._data.ssid=t.slice(0,4)}};or([hr],gl.prototype,"setSID",1);var oo=class extends gl{constructor(t,r){super(t||{title:"",webviewFromSid:location.search.match(/webview_fromsid=([^&]+)/)?.[1]||"",progress:0,lastError:"",queueSize:0,executingNodeTitle:"",widgetTableStructure:{widgetTablePath:"",widgetTablePersisted:!1,widgetTableID:"",nodes:{},groups:{},nodeIndexes:[],extraOptions:{}},widgetTableValue:{},widgetTableErrors:{},useSliderForNumberWidget:!1,hasPSDNodes:!1,comfyUserToken:"",comfyOrgLoggedIn:!1,comfyOrgAPIKey:""}),this._version=r||0}setWebviewFromSid(t){this._data.webviewFromSid=t}setTitle(t){this._data.title=t}setProgress(t){this._data.progress=t}setLastError(t){this._data.lastError=t}setQueueSize(t){this._data.queueSize=t}setExecutingNodeTitle(t){this._data.executingNodeTitle=t}setWidgetTableStructure(t){this._data.widgetTableStructure=JSON.parse(JSON.stringify(t))}setWidgetTableValue(t){this._data.widgetTableValue=JSON.parse(JSON.stringify(t))}setWidgetTableErrors(t){this._data.widgetTableErrors=JSON.parse(JSON.stringify(t))}setHasPSDNodes(t){this._data.hasPSDNodes=t}setComfyUserToken(t){this._data.comfyUserToken=t}setComfyOrgLoggedIn(t){this._data.comfyOrgLoggedIn=t}setComfyOrgAPIKey(t){this._data.comfyOrgAPIKey=t}setUseSliderForNumberWidget(t){this._data.useSliderForNumberWidget=t}};or([hr],oo.prototype,"setWebviewFromSid",1),or([hr],oo.prototype,"setTitle",1),or([hr],oo.prototype,"setProgress",1),or([hr],oo.prototype,"setLastError",1),or([hr],oo.prototype,"setQueueSize",1),or([hr],oo.prototype,"setExecutingNodeTitle",1),or([hr],oo.prototype,"setWidgetTableStructure",1),or([hr],oo.prototype,"setWidgetTableValue",1),or([hr],oo.prototype,"setWidgetTableErrors",1),or([hr],oo.prototype,"setHasPSDNodes",1),or([hr],oo.prototype,"setComfyUserToken",1),or([hr],oo.prototype,"setComfyOrgLoggedIn",1),or([hr],oo.prototype,"setComfyOrgAPIKey",1),or([hr],oo.prototype,"setUseSliderForNumberWidget",1);var di=class extends gl{constructor(t,r){super(t||{uname:"",comfyUserToken:"",isLocal:!1,activeDocumentID:0,documents:{},canvasStateID:0,selectionStateID:"",historyStateID:0}),this._version=r||0}setIsLocal(t){this._data.isLocal=t}setUName(t){this._data.uname="PS_"+t}setDocument(t,r){this._data.activeDocumentID=t,this._data.documents=r}setCanvasStateID(t){this._data.canvasStateID=t}setSelectionStateID(t){this._data.selectionStateID=t}setHistoryStateID(t){this._data.historyStateID=t}setComfyUserToken(t){this._data.comfyUserToken=t}};or([hr],di.prototype,"setIsLocal",1),or([hr],di.prototype,"setUName",1),or([hr],di.prototype,"setDocument",1),or([hr],di.prototype,"setCanvasStateID",1),or([hr],di.prototype,"setSelectionStateID",1),or([hr],di.prototype,"setHistoryStateID",1),or([hr],di.prototype,"setComfyUserToken",1);var gm=class{storeMap=new Map;storeCount(){return this.storeMap.size}getStore(t){return this.storeMap.get(t)}getAllStore(){return Object.fromEntries(this.storeMap.entries())}subscribers=[];subscribersWithoutKey=new WeakMap;subscribe(t,r){this.subscribers.push([t,r]);let o={};this.subscribersWithoutKey.set(r,o),this.storeMap.forEach((n,i)=>{o[i]=r.bind(this,i),n.subscribe(t,o[i])})}unsubscribe(t){this.subscribers=this.subscribers.filter(([o,n])=>n!=t);let r=this.subscribersWithoutKey.get(t);r&&this.storeMap.forEach((o,n)=>{o.unsubscribe(r[n])})}addStore(t,r,o){let n=this.createStore(r,o);this.storeMap.set(t,n),this.subscribers.forEach(([i,a])=>{let s=this.subscribersWithoutKey.get(a);s||(s={},this.subscribersWithoutKey.set(a,s)),s[t]=a.bind(this,t),n.subscribe(i,s[t]),i=="/"&&a(t,r,null)})}removeStore(t){let r=this.storeMap.get(t);r&&(this.subscribers.forEach(([o,n])=>{let i=this.subscribersWithoutKey.get(n);i&&(r.unsubscribe(i[t]),o=="/"&&n(t,null,r.data))}),this.storeMap.delete(t))}sync(t){if(t instanceof Array){let r=Array.from(this.storeMap.keys()),o=t.filter(i=>!r.includes(i)),n=r.filter(i=>!t.includes(i));o.forEach(i=>this.addStore(i,{},0)),n.forEach(i=>this.removeStore(i))}else{Array.from(this.storeMap.keys()).filter(o=>!Object.keys(t).includes(o)).forEach(o=>this.removeStore(o));for(let o in t){let{data:n,version:i}=t[o];this.storeMap.has(o)?this.storeMap.get(o)?.sync(n,i):this.addStore(o,n,i)}}}};var wt=window.comfyAPI.app.app,DX=window.comfyAPI.ui.$el,ho=window.comfyAPI.api.api;var Tx=class extends gm{createStore(t,r){return new di(t,r)}getStoreByName(t){for(let r of this.storeMap.values())if(r.data.uname===t)return r}getAllPhotoshopDocumentData(){let t={};return this.storeMap.forEach(r=>{t[r.data.uname]={sid:r.data.sid,activeDocumentID:r.data.activeDocumentID,documents:r.data.documents}}),t}},on=new Tx,Xe=new oo;if(window.uxpHost){let e=t=>{if(t.data.action!=="webview-connect"||!t.data.payload.webviewFromSid)return console.log(t);t.data.payload.webviewFromSid=t.data.payload.webviewFromSid,Xe.setWebviewFromSid(t.data.payload.webviewFromSid),window.removeEventListener("message",e)};window.addEventListener("message",e),window.uxpHost.postMessage({from:"sdppp-webview",action:"webview-connect"},"*")}function YR(){document.title!==Xe.data.title&&Xe.setTitle(document.title),"user"in wt.extensionManager.user&&Xe.setComfyOrgLoggedIn(wt.extensionManager.user.isLoggedIn),requestAnimationFrame(YR)}requestAnimationFrame(YR);var XR=!1;async function QR(){if(XR)return Promise.resolve();ho.user&&Xe.setComfyUserToken(ho.user);let e=await ho.getSetting("sdppp.useSliderForNumberWidget");e&&Xe.setUseSliderForNumberWidget(e),XR=!0}function yz(e){let t=e.split(" (id:");return{name:t[0],id:parseInt(t[1].slice(0,-1))}}function hm(e){return yz(e)}globalThis.sdpppX=globalThis.sdpppX||{};var ma=globalThis.sdpppX;var Wi=class{static makeDocumentDataOptions(t){let r=t.data,o=[`${Xt.getSpecialDocumentCurrent()}`];return Object.keys(r.documents).forEach(n=>{let i=r.documents[n];o.push(i.identify)}),o}static findDocumentData(t,r){let o=Xt.is_SPECIAL_DOCUMENT_CURRENT(r)?t.data.activeDocumentID:hm(r).id;return t.data.documents[o]}static makeLayerOptions(t,r){return r.concat(t.layers.map(n=>n.identify))}static getLayerDirtyID(t,r){return t.layers.find(n=>n.identify===r)?.dirtyID||0}static getCanvasDirtyID(t){return t.canvasDirtyID||0}static getSelectionDirtyID(t){return t.selectionDirtyID||0}};function Nx(){let e=on.getAllStore(),t=[];return Object.values(e).forEach(r=>{if(ho.user&&ho.user!=r.data.comfyUserToken)return;let o=Wi.makeDocumentDataOptions(r).map(n=>Ix(n,r.data.uname));t.push(...o)}),t}function ZR(e,t){let r=[""],o=_c(e);if(!o)return[];let n=Wi.makeLayerOptions(o.documentData,t);return r.push(...n),r}function JR(){return ho.user?Object.values(on.getAllStore()).filter(e=>ho.user==e.data.comfyUserToken).length>0:on.storeCount()}function Ix(e,t){return`${t}/${e}`}function _c(e){if(!e||!e.split)return null;let t=on.getAllPhotoshopDocumentData(),[r,o]=e.split("/");if(o||(o=r,r=Object.keys(t)[0]),!t[r])return null;let n=Xt.is_SPECIAL_DOCUMENT_CURRENT(o)?t[r].activeDocumentID:hm(o).id;if(t[r]?.documents[n]){let i=t[r].documents[n];return{instance_id:t[r].sid,identify:o,documentData:i}}return null}var xz=function(e){let t=wt.graph.links;return Array.isArray(t)?t.find(o=>o&&o.origin_id==e):t.get(e)};function $x(e){let t=wt.graph.nodes,r=t.find(i=>e.id==i.id);if(!r)return null;let o=[];if(n(r,o),o.length>2){let i=o[0].widgets[0].value;if(!o.map(a=>a.widgets[0].value).every(a=>a==i))throw new Error(ge("Cannot connect multiple different document widgets with same value"))}return o?.[0]||null;function n(i,a){if(i.type=="SDPPP Get Document")return a.push(i),i;if(i.inputs.length==0)return null;for(let s of i.inputs)if(s.link){let l=xz(s.link);if(!l)continue;let c=t.find(d=>d.id==l.origin_id);if(!c)continue;let u=n(c,a);if(u)return u}return null}}ma.findDocumentNodeRecursive=$x;var vm=class{flushing=Promise.resolve();newFlushPending=!1;constructor(t){this.doFlush=t,this.pause()}doFlush;runFlush(){this.newFlushPending||(this.newFlushPending=!0,this.flushing=this.flushing.then(async()=>{await new Promise(t=>requestAnimationFrame(t)),this.newFlushPending=!1,await this.doFlush()}))}pause(){this.flushing=this.flushing.then(t=>new Promise(r=>{this.resume=r})).then(()=>{this.resume=()=>{}})}resume=()=>{}};function eO(e,t){return function(r){return class extends r{constructor(o){super(o),this.socket.on("store_request",(i,a)=>{a({data:e.data,version:e.version})});let n=new vm(async()=>{let{operations:i,fromVersion:a,toVersion:s}=e.flush();await new Promise(l=>{let c=!1;setTimeout(()=>{c||(console.warn("flush timeout"),l())},5e3),this.socket.emit("store_flush",{operations:i,fromVersion:a},u=>{c=!0,l(),u?.error?console.error("flush error",u.error):e.flushDone(s)})})});e.subscribe("/",()=>{n.runFlush()}),this.socket.on("disconnect",()=>{n.pause()}),this.socket.on("connect",()=>{e.setSID(this.socket.id||""),requestAnimationFrame(()=>{this.socket.emit("sdppp_init",{type:t,data:e.data,version:e.version})})}),this.socket.on("sdppp_inited",i=>{n.resume()})}}}}function tO(e,t){return function(r){return class extends r{constructor(o){super(o),this.socket.on("store_flush",n=>{if(n.type!==t)return;let i=e.getStore(n.sid);if(i)i.patchVersionAcceptable(n.fromVersion)?i.patchData(n.operations):(console.warn("patch version not acceptable from",n.fromVersion,"current version is",i.version),this.socket.emit("store_request",{type:t},a=>{e.sync(a)}));else return this.socket.emit("store_request",{sid:n.sid},a=>{e.addStore(a.sid,a.data,a.version)})}),this.socket.on("store_remove",n=>{e.removeStore(n.sid)}),this.socket.on("sdppp_inited",n=>{this.socket.emit("store_request",{type:t},i=>{e.sync(i)})})}}}}var fi=Object.create(null);fi.open="0";fi.close="1";fi.ping="2";fi.pong="3";fi.message="4";fi.upgrade="5";fi.noop="6";var Id=Object.create(null);Object.keys(fi).forEach(e=>{Id[fi[e]]=e});var $d={type:"error",data:"parser error"};var nO=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",iO=typeof ArrayBuffer=="function",aO=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Dd=({type:e,data:t},r,o)=>nO&&t instanceof Blob?r?o(t):rO(t,o):iO&&(t instanceof ArrayBuffer||aO(t))?r?o(t):rO(new Blob([t]),o):o(fi[e]+(t||"")),rO=(e,t)=>{let r=new FileReader;return r.onload=function(){let o=r.result.split(",")[1];t("b"+(o||""))},r.readAsDataURL(e)};function oO(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var Dx;function sO(e,t){if(nO&&e.data instanceof Blob)return e.data.arrayBuffer().then(oO).then(t);if(iO&&(e.data instanceof ArrayBuffer||aO(e.data)))return t(oO(e.data));Dd(e,!1,r=>{Dx||(Dx=new TextEncoder),t(Dx.encode(r))})}var lO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ad=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,r=e.length,o,n=0,i,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let c=new ArrayBuffer(t),u=new Uint8Array(c);for(o=0;o>4,u[n++]=(a&15)<<4|s>>2,u[n++]=(s&3)<<6|l&63;return c};var bz=typeof ArrayBuffer=="function",Md=(e,t)=>{if(typeof e!="string")return{type:"message",data:uO(e,t)};let r=e.charAt(0);return r==="b"?{type:"message",data:Sz(e.substring(1),t)}:Id[r]?e.length>1?{type:Id[r],data:e.substring(1)}:{type:Id[r]}:$d},Sz=(e,t)=>{if(bz){let r=cO(e);return uO(r,t)}else return{base64:!0,data:e}},uO=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};var dO="",fO=(e,t)=>{let r=e.length,o=new Array(r),n=0;e.forEach((i,a)=>{Dd(i,!1,s=>{o[a]=s,++n===r&&t(o.join(dO))})})},pO=(e,t)=>{let r=e.split(dO),o=[];for(let n=0;n{let o=r.length,n;if(o<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,o);else if(o<65536){n=new Uint8Array(3);let i=new DataView(n.buffer);i.setUint8(0,126),i.setUint16(1,o)}else{n=new Uint8Array(9);let i=new DataView(n.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(o))}e.data&&typeof e.data!="string"&&(n[0]|=128),t.enqueue(n),t.enqueue(r)})}})}var Ax;function ym(e){return e.reduce((t,r)=>t+r.length,0)}function xm(e,t){if(e[0].length===t)return e.shift();let r=new Uint8Array(t),o=0;for(let n=0;nMath.pow(2,21)-1){s.enqueue($d);break}n=u*Math.pow(2,32)+c.getUint32(4),o=3}else{if(ym(r)e){s.enqueue($d);break}}}})}var Mx=4;function Zt(e){if(e)return Cz(e)}function Cz(e){for(var t in Zt.prototype)e[t]=Zt.prototype[t];return e}Zt.prototype.on=Zt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Zt.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Zt.prototype.off=Zt.prototype.removeListener=Zt.prototype.removeAllListeners=Zt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o,n=0;nPromise.resolve().then(t):(t,r)=>r(t,0),Ho=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),hO="arraybuffer";function bm(e,...t){return t.reduce((r,o)=>(e.hasOwnProperty(o)&&(r[o]=e[o]),r),{})}var wz=Ho.setTimeout,Ez=Ho.clearTimeout;function ha(e,t){t.useNativeTimers?(e.setTimeoutFn=wz.bind(Ho),e.clearTimeoutFn=Ez.bind(Ho)):(e.setTimeoutFn=Ho.setTimeout.bind(Ho),e.clearTimeoutFn=Ho.clearTimeout.bind(Ho))}var Rz=1.33;function vO(e){return typeof e=="string"?Oz(e):Math.ceil((e.byteLength||e.size)*Rz)}function Oz(e){let t=0,r=0;for(let o=0,n=e.length;o=57344?r+=3:(o++,r+=4);return r}function Sm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function yO(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function xO(e){let t={},r=e.split("&");for(let o=0,n=r.length;o{this.readyState="paused",t()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||r()})),this.writable||(o++,this.once("drain",function(){--o||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let r=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};pO(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,fO(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Sm()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}};var bO=!1;try{bO=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var SO=bO;function _z(){}var Lx=class extends Ld{constructor(t){if(super(t),typeof location<"u"){let r=location.protocol==="https:",o=location.port;o||(o=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||o!==t.port}}doWrite(t,r){let o=this.request({method:"POST",data:t});o.on("success",r),o.on("error",(n,i)=>{this.onError("xhr post error",n,i)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,o)=>{this.onError("xhr poll error",r,o)}),this.pollXhr=t}},os=class e extends Zt{constructor(t,r,o){super(),this.createRequest=t,ha(this,o),this._opts=o,this._method=o.method||"GET",this._uri=r,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var t;let r=bm(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let o=this._xhr=this.createRequest(r);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let n in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(n)&&o.setRequestHeader(n,this._opts.extraHeaders[n])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var n;o.readyState===3&&((n=this._opts.cookieJar)===null||n===void 0||n.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(n){this.setTimeoutFn(()=>{this._onError(n)},0);return}typeof document<"u"&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=_z,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};os.requestsCount=0;os.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",CO);else if(typeof addEventListener=="function"){let e="onpagehide"in Ho?"pagehide":"unload";addEventListener(e,CO,!1)}}function CO(){for(let e in os.requests)os.requests.hasOwnProperty(e)&&os.requests[e].abort()}var Pz=function(){let e=wO({xdomain:!1});return e&&e.responseType!==null}(),ns=class extends Lx{constructor(t){super(t);let r=t&&t.forceBase64;this.supportsBinary=Pz&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new os(wO,this.uri(),t)}};function wO(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||SO))return new XMLHttpRequest}catch{}if(!t)try{return new Ho[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var EO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",Fx=class extends va{get name(){return"websocket"}doOpen(){let t=this.uri(),r=this.opts.protocols,o=EO?{}:bm(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,o)}catch(n){return this.emitReserved("error",n)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r{try{this.doWrite(o,i)}catch{}n&&ga(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Sm()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}},kx=Ho.WebSocket||Ho.MozWebSocket,is=class extends Fx{createSocket(t,r,o){return EO?new kx(t,r,o):r?new kx(t,r):new kx(t)}doWrite(t,r){this.ws.send(r)}};var Pc=class extends va{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let r=gO(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=t.readable.pipeThrough(r).getReader(),n=mO();n.readable.pipeTo(t.writable),this._writer=n.writable.getWriter();let i=()=>{o.read().then(({done:s,value:l})=>{s||(this.onPacket(l),i())}).catch(s=>{})};i();let a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r{n&&ga(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}};var zx={websocket:is,webtransport:Pc,polling:ns};var Tz=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nz=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Tc(e){if(e.length>8e3)throw"URI too long";let t=e,r=e.indexOf("["),o=e.indexOf("]");r!=-1&&o!=-1&&(e=e.substring(0,r)+e.substring(r,o).replace(/:/g,";")+e.substring(o,e.length));let n=Tz.exec(e||""),i={},a=14;for(;a--;)i[Nz[a]]=n[a]||"";return r!=-1&&o!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Iz(i,i.path),i.queryKey=$z(i,i.query),i}function Iz(e,t){let r=/\/{2,9}/g,o=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&o.splice(0,1),t.slice(-1)=="/"&&o.splice(o.length-1,1),o}function $z(e,t){let r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,n,i){n&&(r[n]=i)}),r}var Wx=typeof addEventListener=="function"&&typeof removeEventListener=="function",wm=[];Wx&&addEventListener("offline",()=>{wm.forEach(e=>e())},!1);var hl=class e extends Zt{constructor(t,r){if(super(),this.binaryType=hO,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){let o=Tc(t);r.hostname=o.host,r.secure=o.protocol==="https"||o.protocol==="wss",r.port=o.port,o.query&&(r.query=o.query)}else r.host&&(r.hostname=Tc(r.host).host);ha(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(o=>{let n=o.prototype.name;this.transports.push(n),this._transportsByName[n]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=xO(this.opts.query)),Wx&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},wm.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let r=Object.assign({},this.opts.query);r.EIO=Mx,r.transport=t,this.id&&(r.sid=this.id);let o=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",e.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let o=0;o0&&r>this._maxPayload)return this.writeBuffer.slice(0,o);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ga(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,o){return this._sendPacket("message",t,r,o),this}send(t,r,o){return this._sendPacket("message",t,r,o),this}_sendPacket(t,r,o,n){if(typeof r=="function"&&(n=r,r=void 0),typeof o=="function"&&(n=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;let i={type:t,data:r,options:o};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),n&&this.once("flush",n),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},o=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():t()}):this.upgrading?o():t()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Wx&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let o=wm.indexOf(this._offlineEventListener);o!==-1&&wm.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}};hl.protocol=Mx;var Em=class extends hl{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{o||(r.send([{type:"ping",data:"probe"}]),r.once("packet",d=>{if(!o)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;hl.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(u(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let f=new Error("probe error");f.transport=r.name,this.emitReserved("upgradeError",f)}}))};function i(){o||(o=!0,u(),r.close(),r=null)}let a=d=>{let f=new Error("probe error: "+d);f.transport=r.name,i(),this.emitReserved("upgradeError",f)};function s(){a("transport closed")}function l(){a("socket closed")}function c(d){r&&d.name!==r.name&&i()}let u=()=>{r.removeListener("open",n),r.removeListener("error",a),r.removeListener("close",s),this.off("close",l),this.off("upgrading",c)};r.once("open",n),r.once("error",a),r.once("close",s),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{o||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let r=[];for(let o=0;ozx[n]).filter(n=>!!n)),super(t,o)}};var uQ=Nc.protocol;function RO(e,t="",r){let o=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),o=Tc(e)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";let i=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+i+":"+o.port+t,o.href=o.protocol+"://"+i+(r&&r.port===o.port?"":":"+o.port),o}var Gx={};xx(Gx,{Decoder:()=>Hx,Encoder:()=>Vx,PacketType:()=>Ot,protocol:()=>NO});var Az=typeof ArrayBuffer=="function",Mz=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,OO=Object.prototype.toString,Lz=typeof Blob=="function"||typeof Blob<"u"&&OO.call(Blob)==="[object BlobConstructor]",kz=typeof File=="function"||typeof File<"u"&&OO.call(File)==="[object FileConstructor]";function Fd(e){return Az&&(e instanceof ArrayBuffer||Mz(e))||Lz&&e instanceof Blob||kz&&e instanceof File}function kd(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,o=e.length;r=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(i),r.apply(this,s)};a.withError=!0,this.acks[t]=a}emitWithAck(t,...r){return new Promise((o,n)=>{let i=(a,s)=>a?n(a):o(s);i.withError=!0,r.push(i),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());let o={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((n,...i)=>o!==this._queue[0]?void 0:(n!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(n)):(this._queue.shift(),r&&r(null,...i)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ot.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(o=>String(o.id)===t)){let o=this.acks[t];delete this.acks[t],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ot.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ot.EVENT:case Ot.BINARY_EVENT:this.onevent(t);break;case Ot.ACK:case Ot.BINARY_ACK:this.onack(t);break;case Ot.DISCONNECT:this.ondisconnect();break;case Ot.CONNECT_ERROR:this.destroy();let o=new Error(t.data.message);o.data=t.data.data,this.emitReserved("connect_error",o);break}}onevent(t){let r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let o of r)o.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let r=this,o=!1;return function(...n){o||(o=!0,r.packet({type:Ot.ACK,id:t,data:n}))}}onack(t){let r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ot.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let r=this._anyListeners;for(let o=0;o0&&e.jitter<=1?e.jitter:0,this.attempts=0}vl.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};vl.prototype.reset=function(){this.attempts=0};vl.prototype.setMin=function(e){this.ms=e};vl.prototype.setMax=function(e){this.max=e};vl.prototype.setJitter=function(e){this.jitter=e};var $c=class extends Zt{constructor(t,r){var o;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,ha(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((o=r.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new vl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;let n=r.parser||Gx;this.encoder=new n.Encoder,this.decoder=new n.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Nc(this.uri,this.opts);let r=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;let n=bn(r,"open",function(){o.onopen(),t&&t()}),i=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=bn(r,"error",i);if(this._timeout!==!1){let s=this._timeout,l=this.setTimeoutFn(()=>{n(),i(new Error("timeout")),r.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(n),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(bn(t,"ping",this.onping.bind(this)),bn(t,"data",this.ondata.bind(this)),bn(t,"error",this.onerror.bind(this)),bn(t,"close",this.onclose.bind(this)),bn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){ga(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let o=this.nsps[t];return o?this._autoConnect&&!o.active&&o.connect():(o=new Ic(this,t,r),this.nsps[t]=o),o}_destroy(t){let r=Object.keys(this.nsps);for(let o of r)if(this.nsps[o].active)return;this._close()}_packet(t){let r=this.encoder.encode(t);for(let o=0;ot()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let r=this.backoff.duration();this._reconnecting=!0;let o=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(n=>{n?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",n)):t.onreconnect()}))},r);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}};var zd={};function Wd(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};let r=RO(e,t.path||"/socket.io"),o=r.source,n=r.id,i=r.path,a=zd[n]&&i in zd[n].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a,l;return s?l=new $c(o,t):(zd[n]||(zd[n]=new $c(o,t)),l=zd[n]),r.query&&!t.query&&(t.query=r.queryKey),l.socket(r.path,t)}Object.assign(Wd,{Manager:$c,Socket:Ic,io:Wd,connect:Wd});var IO=`504 -`;var Rm=IO.trim();var qx=class{socket;constructor(t){let r="/"+[t.split("/").slice(3).filter(o=>o).join("/"),"sd-ppp/"].filter(o=>o).join("/");t=t.split("/").slice(0,3).join("/"),this.socket=Wd(t,{transports:["websocket"],path:r,query:{api_level:Rm},rejectUnauthorized:!1,autoConnect:!1}),this.socket.on("connect",()=>{this.socket.io.engine.binaryType="blob"})}get id(){return this.socket.id}connect(){this.socket.connect()}close(){this.socket.close()}};function $O(...e){return e.reduce((t,r)=>r(t),qx)}function DO(e){return class extends e{constructor(t){super(t),this.socket.on("F_photoshop",(r,o)=>{try{r.action=="extractPSD"&&wt.graph.nodes.forEach(n=>{n.type=="SDPPP Get Document"&&this.extractPSD(n,r.params.from_sid,"")}),o({})}catch(n){o({error:n instanceof Error?n.message:n?.toString()||"unknown error"})}})}async importPSDDataURLFromPhotoshop(t,r,o){let n=await new Promise((a,s)=>{this.socket.emit("B_photoshop",{action:"psd",sid:t,params:{action:"get",fromSSID:o,document_identify:r}},l=>{a(l.data)})});var i=new FileReader;return i.readAsDataURL(n),new Promise(a=>{i.onloadend=function(){var s=i.result;a(s)}})}async exportPSDDataURLToPhotoshop(t,r,o,n){let i=await fetch(o).then(a=>a.arrayBuffer());await new Promise((a,s)=>{this.socket.emit("B_photoshop",{action:"psd",sid:t,params:{action:"extract",fromSSID:n,document_identify:r,data:i}},l=>{a(l)})})}async sendImage(t,r){return new Promise((o,n)=>{this.socket.emit("B_photoshop",{action:"sendImages",sid:t,params:r},i=>{i&&i.error?n(new Error(i.error)):o(i)})})}async getSpecialIdentifierValue(t,r){return new Promise((o,n)=>{this.socket.emit("B_photoshop",{action:"getSpecialIdentifierValue",sid:t,params:r},i=>{i&&i.error?n(new Error(i.error)):o(i)})})}async extractPSD(t,r,o){t.properties.psd&&await this.exportPSDDataURLToPhotoshop(r,o,t.properties.psd,this.socket.id||"??").then(async()=>{await new Promise(n=>setTimeout(n,300)),globalThis.app.canvas.draw(!0,!0)}).catch(console.error)}}}var AO={last_node_id:0,last_link_id:0,nodes:[],links:[],groups:[],config:{},extra:{},version:.4};var as=[];ma.widgetable=ma.widgetable||{};ma.widgetable.add=function(e,t){typeof t=="function"?as.push([e,{formatter:t,setter:null}]):as.push([e,t])};function _m(e,t,r){let o=as.find(([s])=>s=="__DEFAULT__"),n=as.find(([s])=>Kx(s,e.type))||o,i=!1;if(n){let s=n[1].setter;s&&(i=!!s(e,t,r))}i||(e.widgets[t].value=r,e.widgets[t].callback?.(r)),(wt.workflowManager||wt.extensionManager.workflow).activeWorkflow?.changeTracker.checkState()}function Bd(e){let t={},r=as.find(([o])=>o=="__DEFAULT__");return e.nodes.forEach(o=>{if(!o.widgets||o.widgets.length==0)return;let n=as.find(([i])=>Kx(i,o.type))||r;if(n){let i=n[1].formatter(o);i&&(t[o.id]=i.widgets.map(a=>a.value))}}),t}function Pm(e,t){if(!e)return{widgetTableID:"",widgetTablePath:"",widgetTablePersisted:!1,groups:{},nodes:{},nodeIndexes:[],extraOptions:{useSliderForNumberWidget:Xe.data.useSliderForNumberWidget}};let r=e.groups.map(n=>(n.recomputeInsideNodes(),{id:n.id,name:n.title,color:n.color,nodeIDs:n.nodes.map(i=>i.id)})),o=e.nodes.map(n=>{if(n.mode!=0)return;let i=Om(n);if(!i||i.startsWith(".")||!n.widgets||n.widgets.length==0)return;let a=as.find(([u])=>Kx(u,n.type));if(a)try{let u=a[1].formatter(n);if(u)return u.id=n.id,u.uiWeightSum=u.widgets.reduce((d,f)=>d+(f.uiWeight||12),0),u}catch(u){return{id:n.id,title:i,uiWeightSum:12,widgets:[{outputType:"error",value:ge("convert widget {0} failed:",a[0])+(u.message||u||"")+(u?.stack||"")}]}}if(!i.startsWith("#"))return null;let s=n.widgets,l=as.find(([u])=>u=="__DEFAULT__");if(l){let u=l[1].formatter(n);if(u)return Object.assign(u,{uiWeightSum:u.widgets.reduce((d,f)=>d+(f.uiWeight||12),0)})}let c={id:n.id,title:i,widgets:s.map(u=>({name:u.label||u.name,outputType:u.type||"string",value:u.value,options:u.options}))};return Object.assign(c,{uiWeightSum:c.widgets.reduce((u,d)=>u+(d.uiWeight||12),0)})}).filter(Boolean).sort((n,i)=>{let a=Om(n),s=Om(i);return a=a.startsWith("#")?a.slice(1).trim():a.trim(),s=s.startsWith("#")?s.slice(1).trim():s.trim(),a.localeCompare(s)});return{widgetTablePath:t.activeState.extra.sdppp_workflow_alias||t.path,widgetTablePersisted:t.isPersisted,widgetTableID:t.activeState.id,groups:r,nodes:o.reduce((n,i)=>(n[i.id]=i,n),{}),nodeIndexes:o.map(n=>n.id),extraOptions:{useSliderForNumberWidget:Xe.data.useSliderForNumberWidget}}}function Kx(e,t){let r=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${r}$`).test(t)}function Om(e,t=""){let r=t||e.title||"";return e.setProperty&&(r.startsWith("#")||r.startsWith("."))?e.setProperty("sdppp_widgetable_title",r):r=e.properties?.sdppp_widgetable_title||r,r}ma.getNodeTitle=Om;var Bz=new Map,yl=Bz;function LO(e){return class extends e{workflowManager;constructor(t){super(t),this.workflowManager=wt.workflowManager||wt.extensionManager.workflow,this.socket.on("F_workflow",async(r,o)=>{if(r.action=="open"||r.action=="save"||r.action=="list"||r.action=="setWidgetValue"||r.action=="run"||r.action=="setNodeTitle"||r.action=="logout"||r.action=="interrupt"||r.action=="clearQueue"||r.action=="reboot"||r.action=="setComfyOrgAPIKey")try{let n=await this[r.action](r.params);o(n||{})}catch(n){o({error:n.stack||n.message||n})}else o({error:"Invalid action"})})}async logout(){this.socket.disconnect(),document.querySelector(".pi-sign-out").parentElement.click()}async run(t){Xx||jz();let r=t.size,o=!1,n="",i={};try{Yx=[];let s=await wt.queuePrompt(1,r);Yx.forEach(l=>{let c=l.prompt_id;yl.set(c,t.from_sid)}),s||(o=!0,i=a(wt.lastNodeErrors))}catch{o=!0}o&&(n?Xe.setLastError(n):Xe.setWidgetTableErrors(i));function a(s){let l={};return Object.keys(s).forEach(c=>{let u=c.split(":")[0],d=wt.graph.nodes.find(f=>f.id==u);l[u]=`[${d?.title||u}]`+s[c].errors.map(JSON.stringify).join(` -`)}),l}}async list(){let r=this.workflowManager.workflows.map(o=>o.path.replace("workflows/",""));try{let o=new Headers,n=localStorage.getItem("Comfy.userId");n&&o.set("comfy-user",n);let i=await fetch("./api/userdata/workflows%2F.index.json",{headers:o});if(i.ok){let s=(await i.json()).favorites.map(l=>l.replace("workflows/",""));r.sort((l,c)=>{let u=s.includes(l),d=s.includes(c);return u&&!d?-1:!u&&d?1:0})}}catch(o){console.warn("Error fetching favorites, returning unsorted workflows:",o)}return r}setWidgetValue(t){t.values.forEach(({nodeID:r,widgetIndex:o,value:n})=>{let i=wt.graph.nodes.find(a=>a.id==r);!i||n==i.widgets[o].value||_m(i,o,n)})}async open(t){let{workflow_path:r}=t;try{Xe.setLastError(""),Xe.setWidgetTableErrors({}),r.startsWith("sdppp://")?await this.openSDPPPWorkflow(t):await this.openComfyWorkflow(t)}catch(o){throw o}}async openSDPPPWorkflow(t){let r=t.workflow_path.replace("sdppp://",""),o=await fetch("/sd-ppp-static/sdppp-workflows/"+r).then(n=>n.json());o.extra.sdppp_workflow_alias=t.workflow_path,await wt.loadGraphData(o)}async openComfyWorkflow(t){let{workflow_path:r,from_sid:o,reset:n}=t,i=this.workflowManager.workflows.find(a=>a.fullFilename===r||a.path===r||a.path==="workflows/"+r);(i.isOpen||this.workflowManager.isOpen?.(i))&&!n||(this.workflowManager.openWorkflows.length===1?await wt.loadGraphData(AO):await MO(this.workflowManager,this.workflowManager.openWorkflows[0]==i?this.workflowManager.openWorkflows[1]:this.workflowManager.openWorkflows[0]),await this.workflowManager.closeWorkflow(i,!1),await new Promise(a=>requestAnimationFrame(a)),await MO(this.workflowManager,i),await new Promise(a=>setTimeout(a,500)),Xe.data.widgetTableStructure&&await this.socket.emit("B_workflow",{action:"getStoredWidgetValue",sid:o,params:{widgetTableID:Xe.data.widgetTableStructure.widgetTableID,widgetTablePath:Xe.data.widgetTableStructure.widgetTablePath,widgetTablePersisted:Xe.data.widgetTableStructure.widgetTablePersisted}},a=>{this.setWidgetValue(a)}))}async save(t){let{workflow_path:r,from_sid:o}=t,n=this.workflowManager.workflows.find(i=>i.fullFilename===r||i.path===r||i.path==="workflows/"+r);if(!n)throw new Error("Workflow not found");this.workflowManager.activeWorkflow?.id!=n.id&&this.open({workflow_path:r,from_sid:o,reset:!1}),n.changeTracker.checkState(),await this.workflowManager.saveWorkflow(n)}setNodeTitle(t){let{node_id:r,title:o}=t,n=wt.graph.nodes.find(i=>i.id==r);if(!n)throw new Error("Node not found");n.title=o,n.setProperty("sdppp_widgetable_title",o)}async interrupt(t){await wt.api.interrupt()}async clearQueue(t){await wt.api.clearItems("queue")}async reboot(t){let r=await fetch("./api/manager/reboot");return r.status==404?{error:ge("ComfyManager not found, cannot reboot"),success:!1}:r.status==200?{success:!0}:{error:ge("Failed to reboot ComfyUI")+r.statusText,success:!1}}async setComfyOrgAPIKey(t){let{api_key:r}=t;localStorage.setItem("comfy_api_key",r),location.reload()}}}async function MO(e,t){wt.workflowManager==e?await t.load():(await e.openWorkflow(t),await wt.loadGraphData(JSON.parse(JSON.stringify(t.activeState)),!0,!0,t,{}))}var Xx=!1,Yx=[];function jz(){if(Xx)return;let e=ho.queuePrompt;ho.queuePrompt=async(...t)=>{let r=await e(...t);return Yx.push(r),r},Xx=!0}var Uo=class e extends $O(eO(Xe,"comfy"),tO(on,"photoshop"),DO,LO){static instance;constructor(){super(location.href.split("?")[0].split("#")[0]),e.instance=this}};function Tm(e){return e.replace(/^workflows\//,"").replace(/\.json$/,"")}var Nm=class{widget;node;originLabel="";indexInNode=0;constructor(t,r){this.widget=r,this.node=t,this.indexInNode=t.widgets.indexOf(r);let o=this;r.callback=function(...n){o.widget!=this&&(o.widget=o.node.widgets[o.indexInNode]=this),o._callbacks.forEach(i=>i(...n))},this.originLabel=r.label}_callbacks=[];onChange(t){this._callbacks.push(t)}removeOnChange(t){this._callbacks.splice(this._callbacks.indexOf(t),1)}},Im=class extends Nm{lockMode(t,r){if(t){if(this.widget.type=="button")return;this.widget.type="button",this.widget.value="",this.widget.label=r}else{if(this.widget.type=="combo")return;this.widget.type="combo",this.widget.value="",this.widget.label=this.originLabel}}},ss=class e extends Im{static create(t,r){let o=Nx(),n=t.size.slice(0),i=t.addWidget("combo",r,o[0]||"",()=>{},{forceInput:!0,values:Nx});return i.serializeValue=async()=>{let a=_c(i.value);if(!a)return JSON.stringify({instance_id:ge("document {0} not found",i.value),identify:"",dirtyID:0});let s=a.identify;return Xt.is_SPECIAL_DOCUMENT_CURRENT(s)&&(s=(await Uo.instance.getSpecialIdentifierValue(a.instance_id,{identifier:s})).value),JSON.stringify({instance_id:a.instance_id,identify:s,canvasDirtyID:a.documentData.canvasDirtyID,selectionDirtyID:a.documentData.selectionDirtyID})},t.size=[n[0],Math.max(n[1],t.size[1])],new e(t,i)}static link(t,r){if(r.type=="combo")return new e(t,r);let o=e.create(t,r.name),n=t.widgets.indexOf(r);return t.widgets[n]=t.widgets.pop(),o}constructor(t,r){super(t,r),this.onChange(o=>{if(!isNaN(+o))r.value=Object.keys(r.options.values)[+o];else if(typeof o=="string"){let n=o.split("/");Xt.is_SPECIAL_DOCUMENT_CURRENT(n[1])&&(r.value=n[0]+"/"+Xt.getSpecialDocumentCurrent())}})}update(){FO(this.widget,this.widget.options.values,!0)}selectConcreteDocument(){if(Xt.is_SPECIAL_DOCUMENT_CURRENT(this.widget.value)){let[t]=this.widget.value.split("/"),r=on.getStoreByName(t);if(!r)return console.warn(`store ${t} not found`);this.widget.value=Ix(r.data.documents[r.data.activeDocumentID].identify,t)}}},Dc=class e extends Im{documentWidgetByLinked=null;extraOptions;constructor(t,r,o){super(t,r),this.extraOptions=o.extraOptions,this.update=this.update.bind(this),this.onChange(n=>{this.node.setProperty("layerWidgetDetail"+this.indexInNode,this.currentOptionsDetail[Object.values(this.currentOptions).indexOf(this.widget.value)]),typeof n=="string"&&(n=Xt.fixI18n(n))}),r.serializeValue=async()=>{let n=this.documentWidgetByLinked;if(!n)return JSON.stringify({identify:r.value,dirtyID:0});let i=_c(n.widget.value);if(!i)return JSON.stringify({identify:r.value,dirtyID:0});let a=r.value;Xt.is_SPECIAL_LAYER_SELECTED_LAYER(a)&&(a=(await Uo.instance.getSpecialIdentifierValue(i.instance_id,{identifier:a})).value);let s=0;return Xt.is_SPECIAL_LAYER_NEW_LAYER(a)||Xt.is_SPECIAL_LAYER_USE_CANVAS(a)?s=Wi.getCanvasDirtyID(i.documentData):s=Wi.getLayerDirtyID(i.documentData,a),JSON.stringify({identify:a,dirtyID:s})}}static link(t,r,o){if(r.type=="combo")return new e(t,r,o);let n=e.create(t,r.name,o),i=t.widgets.indexOf(r);return t.widgets[i]=t.widgets.pop(),n}linkDocumentWidget(t){this.documentWidgetByLinked&&t?.removeOnChange(this.update),this.documentWidgetByLinked=t,this.documentWidgetByLinked&&this.documentWidgetByLinked.onChange(this.update)}update(){let t=this.documentWidgetByLinked;this.updateOptions(t)}currentOptions=[];currentOptionsDetail=[];updateOptions(t){if(this.currentOptions=this.extraOptions.slice(0),this.currentOptionsDetail=new Array(this.currentOptions.length).fill({id:0,name:"",identify:"",level:0,fullPath:""}),t&&t.widget.value){let r=_c(t.widget.value);if(!r)return;r.documentData.layers.map(o=>{this.currentOptions.push(o.identify),this.currentOptionsDetail.push(o)})}if(this.widget.options.values=this.currentOptions,Object.values(this.currentOptions).indexOf(this.widget.value)==-1){let r=this.node.properties["layerWidgetDetail"+this.indexInNode];if(r){let o=this.currentOptionsDetail.findIndex(n=>n.fullPath==r.fullPath);if(o!=-1){this.widget.value=this.currentOptions[o];return}}}}static create(t,r,o){let n=t.size.slice(0),i=t.addWidget("combo",r,o.extraOptions[0]||"",()=>{},{forceInput:!0,values:o.extraOptions});return t.size=[n[0],Math.max(n[1],t.size[1])],new e(t,i,{extraOptions:o.extraOptions})}},Vz={extraOptions:[],documentWidgetInNode:null},jd=class e extends Dc{documentWidgetInNode;constructor(t,r,o=Vz){super(t,r,o),this.documentWidgetInNode=o.documentWidgetInNode,this.onChange(()=>{(this.documentWidgetInNode||this.documentWidgetByLinked)?.selectConcreteDocument()}),r.serializeValue=async()=>{let n=this.documentWidgetInNode||this.documentWidgetByLinked;if(!n)return JSON.stringify({identify:r.value,dirtyID:0});let i=_c(n.widget.value);if(!i)return JSON.stringify({identify:r.value,dirtyID:0});let a=r.value;Xt.is_SPECIAL_LAYER_SELECTED_LAYER(a)&&(a=(await Uo.instance.getSpecialIdentifierValue(i.instance_id,{identifier:a})).value);let s=0;return Xt.is_SPECIAL_LAYER_NEW_LAYER(a)||Xt.is_SPECIAL_LAYER_USE_CANVAS(a)?s=Wi.getCanvasDirtyID(i.documentData):s=Wi.getLayerDirtyID(i.documentData,a),JSON.stringify({identify:a,dirtyID:s})},this.documentWidgetInNode?.onChange(this.update)}update(){let t=this.documentWidgetInNode||this.documentWidgetByLinked;t?.widget.value&&(this.widget.options.values=ZR(t.widget.value,this.extraOptions),FO(this.widget,this.widget.options.values))}static create(t,r,o){let n=t.size.slice(0),i=t.addWidget("combo",r,o.extraOptions[0]||"",()=>{},{forceInput:!0,values:o.extraOptions});return t.size=[n[0],Math.max(n[1],t.size[1])],new e(t,i,{documentWidgetInNode:o.documentWidgetInNode,extraOptions:o.extraOptions})}},kO=0,Ac=class extends Nm{constructor(t,r){if(!r){let o=t.size.slice(0);r=t.addWidget("button","sdppp","",()=>{}),t.size=[o[0],Math.max(o[1],t.size[1])],r.serializeValue=async()=>{let n={lastOpenedWorkflow:Tm(Xe.data.widgetTableStructure.widgetTablePath)},i=$x(t);if(i?.widgets[0]){let a=await i.widgets[0].serializeValue();try{n.document=JSON.parse(a),n.isLocal=on.getStore(n.document.instance_id)?.data.isLocal||!1}catch{return""}}return JSON.stringify(n)}}super(t,r),this.onChange(()=>{on.storeCount()==0&&Date.now()-kO>3e3&&(kO=Date.now(),location.href="/sd-ppp-static/sd-ppp_PS.ccx?_="+Date.now(),setTimeout(()=>{app.ui.dialog.show(`

${ge("How to use .ccx file")}

${ge("1. If you have installed Adobe Creative Cloud")}

${ge("Just double click the .ccx file, it will install the plugin automatically")}

${ge("2. If you don't have Adobe Creative Cloud")}

${ge("Rename .ccx to .zip and extract it into ")}[${ge("Photoshop directory")}]/Plug-ins ${ge("or")} [${ge("Photoshop directory")}]/Plug-ins/Generator

<\/script>",e=e.removeChild(e.firstChild)):typeof n.is=="string"?e=a.createElement(r,{is:n.is}):(e=a.createElement(r),r==="select"&&(a=e,n.multiple?a.multiple=!0:n.size&&(a.size=n.size))):e=a.createElementNS(e,r),e[Wi]=t,e[ed]=n,wT(e,t,!1,!1),t.stateNode=e;e:{switch(a=vb(r,n),r){case"dialog":or("cancel",e),or("close",e),o=n;break;case"iframe":case"object":case"embed":or("load",e),o=n;break;case"video":case"audio":for(o=0;oHc&&(t.flags|=128,n=!0,Pf(i,!1),t.lanes=4194304)}else{if(!n)if(e=hg(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Pf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!yr)return On(t),null}else 2*Fr()-i.renderingStartTime>Hc&&r!==1073741824&&(t.flags|=128,n=!0,Pf(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(r=i.last,r!==null?r.sibling=a:t.child=a,i.last=a)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Fr(),t.sibling=null,r=Cr.current,er(Cr,n?r&1|2:r&1),t):(On(t),null);case 22:case 23:return kS(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(go&1073741824)!==0&&(On(t),t.subtreeFlags&6&&(t.flags|=8192)):On(t),null;case 24:return null;case 25:return null}throw Error(ge(156,t.tag))}function bz(e,t){switch(gS(t),t.tag){case 1:return eo(t.type)&&cg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return jc(),ir(Zn),ir(Pn),ES(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return wS(t),null;case 13:if(ir(Cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ge(340));Wc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ir(Cr),null;case 4:return jc(),null;case 10:return xS(t.type._context),null;case 22:case 23:return kS(),null;case 24:return null;default:return null}}var jm=!1,_n=!1,Sz=typeof WeakSet=="function"?WeakSet:Set,qe=null;function Nc(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Nr(e,t,n)}else r.current=null}function Hb(e,t,r){try{r()}catch(n){Nr(e,t,n)}}var k_=!1;function Cz(e,t){if(_b=ig,e=NP(),pS(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var n=r.getSelection&&r.getSelection();if(n&&n.rangeCount!==0){r=n.anchorNode;var o=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{r.nodeType,i.nodeType}catch{r=null;break e}var a=0,s=-1,l=-1,c=0,u=0,f=e,p=null;t:for(;;){for(var g;f!==r||o!==0&&f.nodeType!==3||(s=a+o),f!==i||n!==0&&f.nodeType!==3||(l=a+n),f.nodeType===3&&(a+=f.nodeValue.length),(g=f.firstChild)!==null;)p=f,f=g;for(;;){if(f===e)break t;if(p===r&&++c===o&&(s=a),p===i&&++u===n&&(l=a),(g=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=g}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(Pb={focusedElem:e,selectionRange:r},ig=!1,qe=t;qe!==null;)if(t=qe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,qe=e;else for(;qe!==null;){t=qe;try{var h=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(h!==null){var v=h.memoizedProps,y=h.memoizedState,m=t.stateNode,d=m.getSnapshotBeforeUpdate(t.elementType===t.type?v:di(t.type,v),y);m.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(ge(163))}}catch(b){Nr(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,qe=e;break}qe=t.return}return h=k_,k_=!1,h}function Bf(e,t,r){var n=t.updateQueue;if(n=n!==null?n.lastEffect:null,n!==null){var o=n=n.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,i!==void 0&&Hb(t,r,i)}o=o.next}while(o!==n)}}function $g(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var n=r.create;r.destroy=n()}r=r.next}while(r!==t)}}function Ub(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function OT(e){var t=e.alternate;t!==null&&(e.alternate=null,OT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Wi],delete t[ed],delete t[Ib],delete t[oz],delete t[iz])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function _T(e){return e.tag===5||e.tag===3||e.tag===4}function M_(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_T(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function qb(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=lg));else if(n!==4&&(e=e.child,e!==null))for(qb(e,t,r),e=e.sibling;e!==null;)qb(e,t,r),e=e.sibling}function Gb(e,t,r){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(n!==4&&(e=e.child,e!==null))for(Gb(e,t,r),e=e.sibling;e!==null;)Gb(e,t,r),e=e.sibling}var gn=null,pi=!1;function Ja(e,t,r){for(r=r.child;r!==null;)PT(e,t,r),r=r.sibling}function PT(e,t,r){if(Bi&&typeof Bi.onCommitFiberUnmount=="function")try{Bi.onCommitFiberUnmount(Eg,r)}catch{}switch(r.tag){case 5:_n||Nc(r,t);case 6:var n=gn,o=pi;gn=null,Ja(e,t,r),gn=n,pi=o,gn!==null&&(pi?(e=gn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):gn.removeChild(r.stateNode));break;case 18:gn!==null&&(pi?(e=gn,r=r.stateNode,e.nodeType===8?Yx(e.parentNode,r):e.nodeType===1&&Yx(e,r),Xf(e)):Yx(gn,r.stateNode));break;case 4:n=gn,o=pi,gn=r.stateNode.containerInfo,pi=!0,Ja(e,t,r),gn=n,pi=o;break;case 0:case 11:case 14:case 15:if(!_n&&(n=r.updateQueue,n!==null&&(n=n.lastEffect,n!==null))){o=n=n.next;do{var i=o,a=i.destroy;i=i.tag,a!==void 0&&((i&2)!==0||(i&4)!==0)&&Hb(r,t,a),o=o.next}while(o!==n)}Ja(e,t,r);break;case 1:if(!_n&&(Nc(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Nr(r,t,s)}Ja(e,t,r);break;case 21:Ja(e,t,r);break;case 22:r.mode&1?(_n=(n=_n)||r.memoizedState!==null,Ja(e,t,r),_n=n):Ja(e,t,r);break;default:Ja(e,t,r)}}function F_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Sz),t.forEach(function(n){var o=Iz.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function fi(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=a),n&=~i}if(n=o,n=Fr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ez(n/1960))-n,10e?16:e,os===null)var n=!1;else{if(e=os,os=null,Sg=0,($t&6)!==0)throw Error(ge(331));var o=$t;for($t|=4,qe=e.current;qe!==null;){var i=qe,a=i.child;if((qe.flags&16)!==0){var s=i.deletions;if(s!==null){for(var l=0;lFr()-DS?dl(e,0):$S|=r),to(e,t)}function MT(e,t){t===0&&((e.mode&1)===0?t=1:(t=Tm,Tm<<=1,(Tm&130023424)===0&&(Tm=4194304)));var r=Hn();e=va(e,t),e!==null&&(sd(e,t,r),to(e,r))}function Nz(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),MT(e,r)}function Iz(e,t){var r=0;switch(e.tag){case 13:var n=e.stateNode,o=e.memoizedState;o!==null&&(r=o.retryLane);break;case 19:n=e.stateNode;break;default:throw Error(ge(314))}n!==null&&n.delete(t),MT(e,r)}var FT;FT=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Zn.current)Jn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Jn=!1,yz(e,t,r);Jn=(e.flags&131072)!==0}else Jn=!1,yr&&(t.flags&1048576)!==0&&BP(t,dg,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Ym(e,t),e=t.pendingProps;var o=zc(t,Pn.current);Mc(t,r),o=OS(null,t,n,e,o,r);var i=_S();return t.flags|=1,typeof o=="object"&&o!==null&&typeof o.render=="function"&&o.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,eo(n)?(i=!0,ug(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,SS(t),o.updater=Ig,t.stateNode=o,o._reactInternals=t,Fb(t,n,e,r),t=Wb(null,t,n,!0,i,r)):(t.tag=0,yr&&i&&mS(t),Vn(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Ym(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=Dz(n),e=di(n,e),o){case 0:t=zb(null,t,n,e,r);break e;case 1:t=$_(null,t,n,e,r);break e;case 11:t=N_(null,t,n,e,r);break e;case 14:t=I_(null,t,n,di(n.type,e),r);break e}throw Error(ge(306,n,""))}return t;case 0:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:di(n,o),zb(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:di(n,o),$_(e,t,n,o,r);case 3:e:{if(bT(t),e===null)throw Error(ge(387));n=t.pendingProps,i=t.memoizedState,o=i.element,GP(e,t),gg(t,n,null,r);var a=t.memoizedState;if(n=a.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:a.cache,pendingSuspenseBoundaries:a.pendingSuspenseBoundaries,transitions:a.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){o=Vc(Error(ge(423)),t),t=D_(e,t,n,r,o);break e}else if(n!==o){o=Vc(Error(ge(424)),t),t=D_(e,t,n,r,o);break e}else for(ho=ls(t.stateNode.containerInfo.firstChild),vo=t,yr=!0,mi=null,r=UP(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Wc(),n===o){t=ya(e,t,r);break e}Vn(e,t,n,r)}t=t.child}return t;case 5:return KP(t),e===null&&Ab(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Tb(n,o)?a=null:i!==null&&Tb(n,i)&&(t.flags|=32),xT(e,t),Vn(e,t,a,r),t.child;case 6:return e===null&&Ab(t),null;case 13:return ST(e,t,r);case 4:return CS(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=Bc(t,null,n,r):Vn(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:di(n,o),N_(e,t,n,o,r);case 7:return Vn(e,t,t.pendingProps,r),t.child;case 8:return Vn(e,t,t.pendingProps.children,r),t.child;case 12:return Vn(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(n=t.type._context,o=t.pendingProps,i=t.memoizedProps,a=o.value,er(pg,n._currentValue),n._currentValue=a,i!==null)if(vi(i.value,a)){if(i.children===o.children&&!Zn.current){t=ya(e,t,r);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var s=i.dependencies;if(s!==null){a=i.child;for(var l=s.firstContext;l!==null;){if(l.context===n){if(i.tag===1){l=ma(-1,r&-r),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var u=c.pending;u===null?l.next=l:(l.next=u.next,u.next=l),c.pending=l}}i.lanes|=r,l=i.alternate,l!==null&&(l.lanes|=r),kb(i.return,r,t),s.lanes|=r;break}l=l.next}}else if(i.tag===10)a=i.type===t.type?null:i.child;else if(i.tag===18){if(a=i.return,a===null)throw Error(ge(341));a.lanes|=r,s=a.alternate,s!==null&&(s.lanes|=r),kb(a,r,t),a=i.sibling}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}Vn(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Mc(t,r),o=Wo(o),n=n(o),t.flags|=1,Vn(e,t,n,r),t.child;case 14:return n=t.type,o=di(n,t.pendingProps),o=di(n.type,o),I_(e,t,n,o,r);case 15:return vT(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:di(n,o),Ym(e,t),t.tag=1,eo(n)?(e=!0,ug(t)):e=!1,Mc(t,r),mT(t,n,o),Fb(t,n,o,r),Wb(null,t,n,!0,e,r);case 19:return CT(e,t,r);case 22:return yT(e,t,r)}throw Error(ge(156,t.tag))};function LT(e,t){return fP(e,t)}function $z(e,t,r,n){this.tag=e,this.key=r,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=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Lo(e,t,r,n){return new $z(e,t,r,n)}function FS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Dz(e){if(typeof e=="function")return FS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===rS)return 11;if(e===nS)return 14}return 2}function ds(e,t){var r=e.alternate;return r===null?(r=Lo(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Zm(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")FS(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Sc:return pl(r.children,o,i,t);case tS:a=8,o|=8;break;case sb:return e=Lo(12,r,t,o|2),e.elementType=sb,e.lanes=i,e;case lb:return e=Lo(13,r,t,o),e.elementType=lb,e.lanes=i,e;case cb:return e=Lo(19,r,t,o),e.elementType=cb,e.lanes=i,e;case K_:return Ag(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case q_:a=10;break e;case G_:a=9;break e;case rS:a=11;break e;case nS:a=14;break e;case Za:a=16,n=null;break e}throw Error(ge(130,e==null?e:typeof e,""))}return t=Lo(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function pl(e,t,r,n){return e=Lo(7,e,n,t),e.lanes=r,e}function Ag(e,t,r,n){return e=Lo(22,e,n,t),e.elementType=K_,e.lanes=r,e.stateNode={isHidden:!1},e}function ob(e,t,r){return e=Lo(6,e,null,t),e.lanes=r,e}function ib(e,t,r){return t=Lo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Az(e,t,r,n,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=jx(0),this.expirationTimes=jx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=jx(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function LS(e,t,r,n,o,i,a,s,l){return e=new Az(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=Lo(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},SS(i),e}function kz(e,t,r){var n=3{"use strict";function VT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(VT)}catch(e){console.error(e)}}VT(),HT.exports=jT()});var qT=$o(jS=>{"use strict";var UT=Vi();jS.createRoot=UT.createRoot,jS.hydrateRoot=UT.hydrateRoot;var PJ});var Ne=$o((IJ,zg)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",i=0;i{"use strict";var US=Symbol.for("react.element"),qS=Symbol.for("react.portal"),jg=Symbol.for("react.fragment"),Vg=Symbol.for("react.strict_mode"),Hg=Symbol.for("react.profiler"),Ug=Symbol.for("react.provider"),qg=Symbol.for("react.context"),Kz=Symbol.for("react.server_context"),Gg=Symbol.for("react.forward_ref"),Kg=Symbol.for("react.suspense"),Xg=Symbol.for("react.suspense_list"),Yg=Symbol.for("react.memo"),Qg=Symbol.for("react.lazy"),Xz=Symbol.for("react.offscreen"),tN;tN=Symbol.for("react.module.reference");function jo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case US:switch(e=e.type,e){case jg:case Hg:case Vg:case Kg:case Xg:return e;default:switch(e=e&&e.$$typeof,e){case Kz:case qg:case Gg:case Qg:case Yg:case Ug:return e;default:return t}}case qS:return t}}}Ht.ContextConsumer=qg;Ht.ContextProvider=Ug;Ht.Element=US;Ht.ForwardRef=Gg;Ht.Fragment=jg;Ht.Lazy=Qg;Ht.Memo=Yg;Ht.Portal=qS;Ht.Profiler=Hg;Ht.StrictMode=Vg;Ht.Suspense=Kg;Ht.SuspenseList=Xg;Ht.isAsyncMode=function(){return!1};Ht.isConcurrentMode=function(){return!1};Ht.isContextConsumer=function(e){return jo(e)===qg};Ht.isContextProvider=function(e){return jo(e)===Ug};Ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===US};Ht.isForwardRef=function(e){return jo(e)===Gg};Ht.isFragment=function(e){return jo(e)===jg};Ht.isLazy=function(e){return jo(e)===Qg};Ht.isMemo=function(e){return jo(e)===Yg};Ht.isPortal=function(e){return jo(e)===qS};Ht.isProfiler=function(e){return jo(e)===Hg};Ht.isStrictMode=function(e){return jo(e)===Vg};Ht.isSuspense=function(e){return jo(e)===Kg};Ht.isSuspenseList=function(e){return jo(e)===Xg};Ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===jg||e===Hg||e===Vg||e===Kg||e===Xg||e===Xz||typeof e=="object"&&e!==null&&(e.$$typeof===Qg||e.$$typeof===Yg||e.$$typeof===Ug||e.$$typeof===qg||e.$$typeof===Gg||e.$$typeof===tN||e.getModuleId!==void 0)};Ht.typeOf=jo});var oN=$o((QJ,nN)=>{"use strict";nN.exports=rN()});var v3=$o(_0=>{"use strict";var CG=$(),wG=Symbol.for("react.element"),EG=Symbol.for("react.fragment"),RG=Object.prototype.hasOwnProperty,OG=CG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_G={key:!0,ref:!0,__self:!0,__source:!0};function h3(e,t,r){var n,o={},i=null,a=null;r!==void 0&&(i=""+r),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(a=t.ref);for(n in t)RG.call(t,n)&&!_G.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps,t)o[n]===void 0&&(o[n]=t[n]);return{$$typeof:wG,type:e,key:i,ref:a,props:o,_owner:OG.current}}_0.Fragment=EG;_0.jsx=h3;_0.jsxs=h3});var Or=$o((Yke,y3)=>{"use strict";y3.exports=v3()});var G0={"SDPPP Get Document":"Get Document","SDPPP Get Layer By ID":"Get Layer","SDPPP Get Linked Layers":"Get Linked Layers","SDPPP Get Layers In Group":"Get Layers In Group","SDPPP Get Text From Layer":"Get Text From Layer","SDPPP Parse Layer Info":"Parse Layer Info","SDPPP Get Selection":"Get Selection","SDPPP Get Image From Photoshop":"Get Image From Photoshop","SDPPP Send Images To Photoshop":"Send Images To Photoshop","SDPPP Select Layer And Run PS Action":"Select Layer And Run PS Action"};var K0={"### Active Document ###":"### \u5F53\u524D\u6587\u6863 ###","### The Canvas ###":"### \u6574\u4E2A\u753B\u5E03 ###","### New Layer ###":"### \u65B0\u56FE\u5C42 ###","### Selected Layer ###":"### \u6240\u9009\u56FE\u5C42 ###","### Keep Size or Fit Canvas ###":"### \u4FDD\u6301\u5C3A\u5BF8\u6216\u9002\u5E94\u753B\u5E03 ###",_SDPPP_PSD_:"_SDPPP_PSD_","Save and run immediately":"\u4FDD\u5B58\u5E76\u7ACB\u5373\u6267\u884C",Close:"\u5173\u95ED","Select a {0}":"\u9009\u62E9\u4E00\u4E2A {0}","How to use .ccx file":"\u5982\u4F55\u4F7F\u7528 .ccx \u6587\u4EF6","1. If you have installed Adobe Creative Cloud":"1. \u5982\u679C\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 Adobe Creative Cloud","Just double click the .ccx file, it will install the plugin automatically":"\u53CC\u51FB .ccx \u6587\u4EF6\uFF0C\u5B83\u4F1A\u81EA\u52A8\u5B89\u88C5","2. If you don't have Adobe Creative Cloud":"2. \u5982\u679C\u4F60\u6CA1\u6709 Adobe Creative Cloud","Rename .ccx to .zip and extract it into ":"\u5C06 .ccx \u91CD\u547D\u540D\u4E3A .zip \u5E76\u89E3\u538B\u5230",or:"\u6216","Photoshop directory":"Photoshop \u5B89\u88C5\u76EE\u5F55","Cannot connect multiple different document widgets with same value":"\u4E0D\u80FD\u8FDE\u63A5\u591A\u4E2A\u5177\u6709\u76F8\u540C\u503C\u7684\u6587\u6863\u5C0F\u90E8\u4EF6","You can only have one SDPPP Settings node in a workflow":"\u4E00\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2A SDPPP Settings \u8282\u70B9","convert widget {0} failed:":"\u63A7\u4EF6{0}\u8F6C\u6362\u5931\u8D25\uFF1A","hidden webview load failed: {0}, please select a browser page to continue":"\u5185\u7F6E webview \u52A0\u8F7D\u5931\u8D25: {0}\uFF0C\u8BF7\u9009\u62E9\u4E00\u4E2A\u6D4F\u89C8\u5668\u9875\u9762\u7EE7\u7EED","SDPPP Get Document":"\u83B7\u53D6\u6587\u6863(GetDocument)","SDPPP Get Layer By ID":"\u83B7\u53D6\u56FE\u5C42(GetLayer)","SDPPP Get Linked Layers":"\u83B7\u53D6\u94FE\u63A5\u56FE\u5C42(GetLinkedLayers)","SDPPP Get Layers In Group":"\u83B7\u53D6\u7EC4\u4E2D\u56FE\u5C42(GetLayersInGroup)","SDPPP Get Text From Layer":"\u83B7\u53D6\u56FE\u5C42\u6587\u672C(GetTextFromLayer)","SDPPP Parse Layer Info":"\u89E3\u6790\u56FE\u5C42\u4FE1\u606F(ParseLayerInfo)","SDPPP Get Selection":"\u83B7\u53D6\u9009\u533A(GetSelection)","SDPPP Get Image From Photoshop":"\u4ECEPS\u83B7\u53D6\u56FE\u50CF(GetImageFromPhotoshop)","SDPPP Send Images To Photoshop":"\u53D1\u9001\u56FE\u50CF\u5230PS(SendImagesToPhotoshop)","SDPPP Send Text To Layer":"\u53D1\u9001\u6587\u672C\u5230\u56FE\u5C42(SendTextToLayer)","SDPPP Select Layer And Run PS Action":"\u9009\u4E2D\u56FE\u5C42\u5E76\u8FD0\u884CPS Action(RunPhotoshopAction)","download PS plugin (.ccx)":"\u4E0B\u8F7D Photoshop \u63D2\u4EF6 (.ccx)","current ComfyUI pageid: {0}":"\u5F53\u524D ComfyUI \u9875\u9762ID: {0}","current A1111 pageid: {0}":"\u5F53\u524D A1111 \u9875\u9762ID: {0}","document linked":"\u6587\u6863\u53C2\u6570\u5DF2\u94FE\u63A5","layer linked":"\u56FE\u5C42\u53C2\u6570\u5DF2\u94FE\u63A5","bound linked":"\u8303\u56F4\u53C2\u6570\u5DF2\u94FE\u63A5",document:"\u6587\u6863",Document:"\u6587\u6863",DOCUMENT:"\u6587\u6863",document_name:"\u6587\u6863\u540D\u5B57id",layer_nameid:"\u56FE\u5C42\u540D\u5B57id",layer_name:"\u56FE\u5C42\u540D\u5B57",layer_info:"\u56FE\u5C42\u4FE1\u606F",bound_top:"\u8303\u56F4\u4E0A\u8FB9\u8DDD",bound_left:"\u8303\u56F4\u5DE6\u8FB9\u8DDD",bound_width:"\u8303\u56F4\u5BBD\u5EA6",bound_height:"\u8303\u56F4\u9AD8\u5EA6",center_x:"\u4E2D\u5FC3\u70B9x",center_y:"\u4E2D\u5FC3\u70B9y",opacity:"\u900F\u660E\u5EA6",layer:"\u56FE\u5C42",layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",Layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",bound:"\u8303\u56F4",bounds:"\u8303\u56F4","bounds [optional]":"\u8303\u56F4[\u53EF\u9009]",boundary:"\u8303\u56F4",Boundary:"\u8303\u56F4",canvas_boundary:"\u753B\u5E03\u8303\u56F4",canvas_bound:"\u753B\u5E03\u8303\u56F4",layer_boundary:"\u56FE\u5C42\u8303\u56F4",layer_bound:"\u56FE\u5C42\u8303\u56F4","Photoshop Disconnected!":"Photoshop \u672A\u8FDE\u63A5\uFF01",rgb_out:"RGB\u8F93\u51FA",alpha_out:"Alpha\u8F93\u51FA",images:"\u56FE\u50CF",text:"\u6587\u672C",ID_mode:"\u7CBE\u786EID\u6A21\u5F0F",name_mode:"\u540D\u5B57\u5339\u914D\u6A21\u5F0F",select:"\u9009\u62E9","document boundary":"\u6587\u6863\u8303\u56F4","layer boundary":"\u56FE\u5C42\u8303\u56F4","selection boundary":"\u9009\u4E2D\u8303\u56F4","save .psd to this workflow":"\u4FDD\u5B58.psd\u5230\u8FD9\u4E2A\u5DE5\u4F5C\u6D41","extract saved .psd to Photoshop":"\u63D0\u53D6\u4FDD\u5B58\u7684.psd\u5230Photoshop","sample .psd":"\u793A\u4F8B.psd",mask:"\u906E\u7F69",name:"\u540D\u79F0",quality:"\u56FE\u50CF\u8D28\u91CF",action_set:"\u52A8\u4F5C\u7EC4",action:"\u52A8\u4F5C",Runner:"\u8FD0\u884C\u8F7D\u4F53","PS Webview":"PS \u5185\u7F6E\u7F51\u9875","Browser {0}":"\u6D4F\u89C8\u5668\u9875\u9762 {0}",timeout:"\u8D85\u65F6","Loading...":"\u52A0\u8F7D\u4E2D...","--multi-user Not Login!":"--multi-user\u5DF2\u6FC0\u6D3B\uFF0C\u4F46\u672A\u767B\u5F55\uFF01",Logout:"\u767B\u51FA","User: ":"\u7528\u6237: ",connect:"\u8FDE\u63A5",connected:"\u5DF2\u8FDE\u63A5",disconnect:"\u65AD\u5F00",disconnected:"\u5DF2\u65AD\u5F00\u8FDE\u63A5","reconnecting...":"\u91CD\u8FDE\u4E2D...",connecting:"\u8FDE\u63A5\u4E2D",webpages:"\u7F51\u9875\u5217\u8868",workflows:"\u5DE5\u4F5C\u6D41",workflow:"\u5DE5\u4F5C\u6D41","auto run page [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u9875\u9762 {0}..","auto run workflow [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41 {0}..","auto run workflow after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41..",selection_only:"\u4EC5\u9009\u533A","Queue:":"\u961F\u5217:","Set As:":"\u8BBE\u7F6E\u4E3A:","Error {0}... please contact me via Discord/Github":"\u51FA\u73B0\u9519\u8BEF {0}...\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211","Webview initialize failed. Please report to me via Discord/Github with your ComfyURL, Operate System":"Webview \u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211\u5E76\u9644\u4E0A\u4F60\u7684Comfy\u5730\u5740\u3001\u64CD\u4F5C\u7CFB\u7EDF","ComfyUI with --multi-user is only available for sponsors":'\u5E26"--multi-user"\u7684ComfyUI\u4EC5\u5BF9\u8D5E\u52A9\u8005\u5F00\u653E',"Workflow Runner is loading...":"\u8FD0\u884C\u8F7D\u4F53\u5C1A\u5728\u52A0\u8F7D...","(Page ID: {0})Queue: {1}":"(\u9875\u9762ID: {0}) \u961F\u5217\u957F\u5EA6 {1}","no suitable node to control in this workflow":"\u8FD9\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u6CA1\u6709\u80FD\u63A7\u5236\u7684\u8282\u70B9",Save:"\u4FDD\u5B58",Edit:"\u7F16\u8F91","Edit in ComfyUI":"\u5728 ComfyUI \u4E2D\u7F16\u8F91","using browser page [{0}] for workflow running":"\u6B63\u63A5\u7BA1\u7F51\u9875 [{0}] \u8FD0\u884C\u5DE5\u4F5C\u6D41","workflow running by hidden webview":"\u5DE5\u4F5C\u6D41\u5728\u9690\u85CF\u7684webview\u4E2D\u8FD0\u884C","Lock Image":"\u9501\u5B9A\u56FE\u50CF","Unlock Image":"\u89E3\u9501\u56FE\u50CF","search...":"\u641C\u7D22...","disabled when running in browser page":"\u63A5\u7BA1\u7F51\u9875\u65F6\u4E0D\u53EF\u7528","only supported in Photoshop":"\u4EC5\u5728 Photoshop \u4E2D\u652F\u6301",Login:"\u767B\u5F55","Invitation Code":"\u9080\u8BF7\u7801",Username:"\u7528\u6237\u540D",Password:"\u5BC6\u7801","Please input invitation code":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","Please input username":"\u8BF7\u8F93\u5165\u7528\u6237\u540D","Please input password":"\u8BF7\u8F93\u5165\u5BC6\u7801","Open more ComfyUI pages to see more options here":"\u6253\u5F00\u66F4\u591A ComfyUI \u9875\u9762\u4EE5\u67E5\u770B\u66F4\u591A\u9009\u9879","Comfy multi-user: ":"Comfy \u591A\u7528\u6237: ","Not Login":"\u672A\u767B\u5F55","Comfy API-Key: ":"Comfy API-Key: ","Login/Auth":"\u767B\u5F55/\u8BA4\u8BC1","Logged in by email/password":"\u5DF2\u901A\u8FC7\u90AE\u7BB1/\u5BC6\u7801\u767B\u5F55","Set API Key":"\u8BBE\u7F6E API Key","Please input API key (will reload Runner)":"\u8BF7\u8F93\u5165 API Key (\u4F1A\u91CD\u542F\u8FD0\u884C\u8F7D\u4F53)","### Active Workflow ###":"### \u5F53\u524D\u5DE5\u4F5C\u6D41 ###","### Example SDXL ###":"### \u793A\u4F8BSDXL\u5DE5\u4F5C\u6D41 ###","Open ComfyUI in the browser to see more options":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00 ComfyUI \u4EE5\u5F97\u5230\u66F4\u591A\u9009\u9879","Webview load timeout, please switch to a different runner":"Webview \u52A0\u8F7D\u8D85\u65F6\uFF0C\u8BF7\u5207\u6362\u5230\u5176\u4ED6\u8FD0\u884C\u8F7D\u4F53","Save workflow to ComfyUI":"\u4FDD\u5B58\u5DE5\u4F5C\u6D41\u5230 ComfyUI","Reload workflow":"\u91CD\u65B0\u52A0\u8F7D\u5DE5\u4F5C\u6D41","Stop and cancel all":"\u505C\u6B62\u5E76\u53D6\u6D88\u6240\u6709","Start auto running after change":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C","Stop auto run":"\u505C\u6B62\u81EA\u52A8\u8FD0\u884C","Run workflow":"\u8FD0\u884C\u5DE5\u4F5C\u6D41","Run workflow xN":"\u8FD0\u884C\u5DE5\u4F5C\u6D41N\u6B21","502: Maybe the server is not running":"502: \u670D\u52A1\u5668\u53EF\u80FD\u672A\u8FD0\u884C","404: Maybe SDPPP is not installed or failed to run in ComfyUI":"404: \u53EF\u80FD\u5728ComfyUI\u4E2DSDPPP\u672A\u5B89\u88C5\u6216\u8FD0\u884C\u5931\u8D25","{0}. reconnecting...":"{0}. \u91CD\u8FDE\u4E2D...","disconnected to {0} failed {1}":"\u65AD\u5F00\u8FDE\u63A5 {0} \u9519\u8BEF {1}","version mismatch, please reinstall PS plugin":"\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5 PS \u63D2\u4EF6","instance type not recognized":"\u672A\u8BC6\u522B\u7684\u8F6F\u4EF6\u7C7B\u578B","Error: {0}":"\u9519\u8BEF: {0}","Verification Error":"\u9A8C\u8BC1\u9519\u8BEF","document {0} not found":"\u627E\u4E0D\u5230\u6587\u6863: {0}",'only layer kind "TEXT" is supported, invalid layer: {0}':"\u4E0D\u652F\u6301\u975E\u6587\u672C\u56FE\u5C42: {0}","create layer failed":"\u521B\u5EFA\u56FE\u5C42\u5931\u8D25","layer not found {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","no linked layer for {0}":"\u6CA1\u6709\u94FE\u63A5\u56FE\u5C42: {0}","layer {0} is not a group":"\u56FE\u5C42 {0} \u4E0D\u662F\u4E00\u4E2A\u7EC4","no layer in group {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u56FE\u5C42","layer not found: {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","No upload_name":"\u4E0A\u4F20\u63A5\u53E3\u8FD4\u56DE\u4E86\u5931\u8D25","get pixel of {0} failed":"\u83B7\u53D6\u50CF\u7D20\u5931\u8D25: {0}","merge group failed":"\u5408\u5E76\u7EC4\u5931\u8D25","invalid name: {0}":"\u975E\u6CD5\u7684\u540D\u79F0: {0}","get_layer_info: layer_identify required":"get_layer_info: \u9700\u8981 layer_identify","invalid action: {0}":"\u65E0\u6548\u7684\u64CD\u4F5C: {0}","create document failed":"\u521B\u5EFA\u6587\u6863\u5931\u8D25","create document for preview":"\u521B\u5EFA\u9884\u89C8\u6587\u6863","resize document for preview":"\u8C03\u6574\u9884\u89C8\u6587\u6863\u5C3A\u5BF8","no first related layer in {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u7B2C\u4E00\u4E2A\u76F8\u5173\u56FE\u5C42","imageDataError: data length is not multiple of width * height":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: \u6570\u636E\u957F\u5EA6\u4E0D\u662F\u5BBD\u5EA6 * \u9AD8\u5EA6\u7684\u500D\u6570","imageDataError: originComponents must be 1 or 3":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: originComponents \u5FC5\u987B\u662F 1 \u6216 3","unexpected connection lost, please try to reconnect":"\u610F\u5916\u65AD\u5F00\u8FDE\u63A5\uFF0C\u8BF7\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5","Workflow list is empty, please save a workflow by Comfy's lastest UI":"\u5DE5\u4F5C\u6D41\u5217\u8868\u4E3A\u7A7A\uFF0C\u8BF7\u5728Comfy\u7684\u65B0\u7248UI\u4E2D\u4FDD\u5B58\u4E00\u4E2A\u5DE5\u4F5C\u6D41","No opened ComfyUI pages":"\u6CA1\u6709\u5DF2\u6253\u5F00\u7684ComfyUI\u9875\u9762","comfyAPI is not initialized, maybe comfyUI is too old":"\u65E0\u6CD5\u83B7\u53D6 ComfyAPI\uFF0C\u53EF\u80FD ComfyUI \u7248\u672C\u592A\u65E7","unsupported channel counts: {0}":"\u4E0D\u652F\u6301\u7684\u901A\u9053\u6570: {0}","Timeout, Maybe the URL is wrong":"\u8D85\u65F6\uFF0C\u53EF\u80FD comfy\u5730\u5740 \u586B\u5199\u9519\u8BEF","Workflow list loading failed: {0}":"\u5DE5\u4F5C\u6D41\u5217\u8868\u52A0\u8F7D\u5931\u8D25: {0}","Please register a user in ComfyUI":"\u8BF7\u5728 ComfyUI \u4E2D\u6CE8\u518C\u4E00\u4E2A\u7528\u6237","GetSelection need Photoshop version 25+":"GetSelection \u9700\u8981 Photoshop 25+ \u7248\u672C","Action {0} not found":"Action {0} \u672A\u627E\u5230","Action set {0} not found":"ActionSet {0} \u672A\u627E\u5230","{0} cannot be used in Photoshop Action Node":"{0} \u4E0D\u80FD\u5728 Photoshop Action \u8282\u70B9\u4E2D\u4F7F\u7528","Group layers":"\u56FE\u5C42\u7EC4","Show All Groups":"\u663E\u793A\u6240\u6709\u7EC4","create document for sent images":"\u7ED9\u53D1\u9001\u7684\u56FE\u7247\u521B\u5EFA\u6587\u6863","show sent images":"\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","fallback show sent images":"\u53D6\u6D88\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","get content of layer {0}":"\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","fallback get content of layer {0}":"\u53D6\u6D88\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","get layer info":"\u83B7\u53D6\u56FE\u5C42\u4FE1\u606F","sdppp extract PSD":"sdppp \u5BFC\u5165 PSD","sdppp get PSD":"sdppp \u83B7\u53D6 PSD","set text to layer":"\u8BBE\u7F6E\u56FE\u5C42\u7684\u6587\u672C","run Photoshop Action":"sdppp \u8FD0\u884C Photoshop Action","select layer":"sdppp \u9009\u4E2D\u56FE\u5C42","{0} wants to extract a PSD file to Photoshop, are you sure?":"{0} \u60F3\u8981\u91CA\u653E\u4E00\u4E2A.psd\u6587\u4EF6\u5230Photoshop\uFF0C\u786E\u5B9A\u5417\uFF1F","should sdppp refuse extracting PSD to Photoshop in this session anymore?":"\u662F\u5426\u8981\u8BA9 sdppp \u62D2\u7EDD\u672C\u6B21PS\u4F1A\u8BDD\u518D\u6B21\u63A5\u53D7.psd\u91CA\u653E\u8BF7\u6C42\uFF1F","Wide Mode":"\u5BBD\u5C4F\u6A21\u5F0F","Quick Set":"\u5FEB\u901F\u8BBE\u7F6E","Selected Layer":"\u9009\u4E2D\u56FE\u5C42","Selected Layer (invert)":"\u9009\u4E2D\u56FE\u5C42(\u53CD\u5411)",Canvas:"\u753B\u5E03",Selection:"\u9009\u533A",Manual:"\u624B\u52A8\u6A21\u5F0F",Auto:"\u81EA\u52A8\u6A21\u5F0F","This plugin is based on sd-ppp":"\u672C\u63D2\u4EF6\u57FA\u4E8Esd-ppp\u5F00\u53D1","And follows its open source license:":"\u5E76\u9075\u5FAA\u5176\u5F00\u6E90\u534F\u8BAE\uFF1A",Cloud:"\u4E91\u7AEF\u63A8\u8350",Sponsors:"\u8D5E\u52A9","waiting...":"\u865A\u4F4D\u4EE5\u5F85",Links:"\u53CB\u60C5\u94FE\u63A5",Community:"\u793E\u533A","LICENSE:":"\u8BB8\u53EF\u8BC1\uFF1A","Official Site":"\u5B98\u65B9\u7F51\u7AD9",upload:"\u4E0A\u4F20","Simplify Workflow":"\u7B80\u5316\u5DE5\u4F5C\u6D41",Photoshop:"Photoshop","Photoshop plugin settings":"Photoshop \u63D2\u4EF6\u8BBE\u7F6E","Photoshop plugin":"Photoshop \u63D2\u4EF6","SDPPP Settings/Misc":"SDPPP \u8BBE\u7F6E/\u6742\u9879","Sample .PSD for this workflow:":"\u793A\u4F8B.PSD","Download Example .PSD":"\u4E0B\u8F7D\u793A\u4F8B.PSD","Maximum Image Size (px):":"\u6700\u5927\u56FE\u50CF\u5C3A\u5BF8(px)",Download:"\u4E0B\u8F7D",Upload:"\u4E0A\u4F20",Reset:"\u91CD\u7F6E",Refresh:"\u5237\u65B0","Comfy URL (You can copy it to connect ComfyUI in the plugin):":"Comfy\u5730\u5740(\u4F60\u53EF\u4EE5\u590D\u5236\u5B83\u5230\u63D2\u4EF6\u4E2D\u8FDE\u63A5ComfyUI):","use slider for number widget:":"\u6570\u5B57\u63A7\u4EF6\u4F7F\u7528\u6ED1\u5757","Photoshop is not connected":"Photoshop \u672A\u8FDE\u63A5","select...":"\u8BF7\u9009\u62E9","click to edit":"\u70B9\u51FB\u7F16\u8F91","ComfyManager not found, cannot reboot":"Comfy Manager\u672A\u5B89\u88C5\uFF0C\u65E0\u6CD5\u91CD\u542F","Failed to reboot ComfyUI":"\u91CD\u542FComfyUI\u5931\u8D25"};var xR=typeof U0<"u"?U0:void 0,X0="en";typeof navigator<"u"&&navigator.language?X0=navigator.language=="zh-CN"?"zhcn":"en":xR&&(X0=xR("uxp").host.uiLocale.startsWith("zh")?"zhcn":"en");function me(e,...t){let r=X0=="zhcn"?K0[e]:e in G0?G0[e]:e;if(!r)throw new Error(`i18n key not found: ${e}`);return r.replace(/{(\d+)}/g,function(n,o){return typeof t[o]<"u"?t[o]:n})}function Zs(e,t){return e==t||K0[e]==t}var Xt=class e{static SPECIAL_DOCUMENT_CURRENT="### Active Document ###";static is_SPECIAL_DOCUMENT_CURRENT(t){return Zs(this.SPECIAL_DOCUMENT_CURRENT,t)}static get_SPECIAL_DOCUMENT_CURRENT(){return me(this.SPECIAL_DOCUMENT_CURRENT)}static SPECIAL_LAYER_KEEP_SIZE="### Keep Size or Fit Canvas ###";static is_SPECIAL_LAYER_FIT(t){return Zs(this.SPECIAL_LAYER_KEEP_SIZE,t)}static get_SPECIAL_LAYER_FIT(){return me(this.SPECIAL_LAYER_KEEP_SIZE)}static SPECIAL_LAYER_USE_CANVAS="### The Canvas ###";static is_SPECIAL_LAYER_USE_CANVAS(t){return Zs(this.SPECIAL_LAYER_USE_CANVAS,t)}static get_SPECIAL_LAYER_USE_CANVAS(){return me(this.SPECIAL_LAYER_USE_CANVAS)}static SPECIAL_LAYER_NEW_LAYER="### New Layer ###";static is_SPECIAL_LAYER_NEW_LAYER(t){return Zs(this.SPECIAL_LAYER_NEW_LAYER,t)}static get_SPECIAL_LAYER_NEW_LAYER(){return me(this.SPECIAL_LAYER_NEW_LAYER)}static SPECIAL_LAYER_SELECTED_LAYER="### Selected Layer ###";static is_SPECIAL_LAYER_SELECTED_LAYER(t){return Zs(this.SPECIAL_LAYER_SELECTED_LAYER,t)}static get_SPECIAL_LAYER_SELECTED_LAYER(){return me(this.SPECIAL_LAYER_SELECTED_LAYER)}static SPECIAL_LAYER_PREVIEW_DOCUMENT="_SDPPP_PSD_";static is_SPECIAL_LAYER_PREVIEW_DOCUMENT(t){return Zs(this.SPECIAL_LAYER_PREVIEW_DOCUMENT,t)}static get_SPECIAL_LAYER_PREVIEW_DOCUMENT(){return me(this.SPECIAL_LAYER_PREVIEW_DOCUMENT)}static getSpecialDocumentCurrent(){return me(e.SPECIAL_DOCUMENT_CURRENT)}static getSpecialLayerForGet(){return[me(e.SPECIAL_LAYER_USE_CANVAS),me(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialLayerForSend(){return[me(e.SPECIAL_LAYER_NEW_LAYER),me(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialDocumentForPreview(){return me(e.SPECIAL_LAYER_PREVIEW_DOCUMENT)}static fixI18n(t){return this.is_SPECIAL_DOCUMENT_CURRENT(t)?this.SPECIAL_DOCUMENT_CURRENT:this.is_SPECIAL_LAYER_NEW_LAYER(t)?this.SPECIAL_LAYER_NEW_LAYER:this.is_SPECIAL_LAYER_PREVIEW_DOCUMENT(t)?this.SPECIAL_LAYER_PREVIEW_DOCUMENT:this.is_SPECIAL_LAYER_USE_CANVAS(t)?this.SPECIAL_LAYER_USE_CANVAS:this.is_SPECIAL_LAYER_SELECTED_LAYER(t)?this.SPECIAL_LAYER_SELECTED_LAYER:t}};var Y0={};q0(Y0,{JsonPatchError:()=>Tr,_areEquals:()=>nf,applyOperation:()=>el,applyPatch:()=>sc,applyReducer:()=>V4,deepClone:()=>B4,getValueByPointer:()=>tl,validate:()=>SR,validator:()=>Lp});var z4=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var i in o)o.hasOwnProperty(i)&&(n[i]=o[i])},e(t,r)};return function(t,r){e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),W4=Object.prototype.hasOwnProperty;function kp(e,t){return W4.call(e,t)}function Mp(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r=48&&n<=57){t++;continue}return!1}return!0}function Ai(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function tf(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Ap(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t0&&l[u-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&p===void 0&&(c[g]===void 0?p=l.slice(0,u).join("/"):u==f-1&&(p=t.path),p!==void 0&&h(t,0,e,p)),u++,Array.isArray(c)){if(g==="-")g=c.length;else{if(r&&!Fp(g))throw new Tr("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",i,t,e);Fp(g)&&(g=~~g)}if(u>=f){if(r&&t.op==="add"&&g>c.length)throw new Tr("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);var a=j4[t.op].call(t,c,g,e);if(a.test===!1)throw new Tr("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}}else if(u>=f){var a=ac[t.op].call(t,c,g,e);if(a.test===!1)throw new Tr("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}if(c=c[g],r&&u0)throw new Tr('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new Tr("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new Tr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&Ap(e.value))throw new Tr("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r){if(e.op=="add"){var o=e.path.split("/").length,i=n.split("/").length;if(o!==i+1&&o!==i)throw new Tr("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==n)throw new Tr("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if(e.op==="move"||e.op==="copy"){var a={op:"_get",path:e.from,value:void 0},s=SR([a],r);if(s&&s.name==="OPERATION_PATH_UNRESOLVABLE")throw new Tr("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new Tr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function SR(e,t,r){try{if(!Array.isArray(e))throw new Tr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)sc(Pr(t),Pr(e),r||!0);else{r=r||Lp;for(var n=0;nzp,generate:()=>Q0,observe:()=>Y4,unobserve:()=>X4});var J0=new WeakMap,H4=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),U4=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function q4(e){return J0.get(e)}function G4(e,t){return e.observers.get(t)}function K4(e,t){e.observers.delete(t.callback)}function X4(e,t){t.unobserve()}function Y4(e,t){var r=[],n,o=q4(e);if(!o)o=new H4(e),J0.set(e,o);else{var i=G4(o,t);n=i&&i.observer}if(n)return n;if(n={},o.value=Pr(e),t){n.callback=t,n.next=null;var a=function(){Q0(n)},s=function(){clearTimeout(n.next),n.next=setTimeout(a)};typeof window<"u"&&(window.addEventListener("mouseup",s),window.addEventListener("keyup",s),window.addEventListener("mousedown",s),window.addEventListener("keydown",s),window.addEventListener("change",s))}return n.patches=r,n.object=e,n.unobserve=function(){Q0(n),clearTimeout(n.next),K4(o,n),typeof window<"u"&&(window.removeEventListener("mouseup",s),window.removeEventListener("keyup",s),window.removeEventListener("mousedown",s),window.removeEventListener("keydown",s),window.removeEventListener("change",s))},o.observers.set(t,new U4(t,n)),n}function Q0(e,t){t===void 0&&(t=!1);var r=J0.get(e.object);Z0(r.value,e.object,e.patches,"",t),e.patches.length&&sc(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function Z0(e,t,r,n,o){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var i=Mp(t),a=Mp(e),s=!1,l=!1,c=a.length-1;c>=0;c--){var u=a[c],f=e[u];if(kp(t,u)&&!(t[u]===void 0&&f!==void 0&&Array.isArray(t)===!1)){var p=t[u];typeof f=="object"&&f!=null&&typeof p=="object"&&p!=null&&Array.isArray(f)===Array.isArray(p)?Z0(f,p,r,n+"/"+Ai(u),o):f!==p&&(s=!0,o&&r.push({op:"test",path:n+"/"+Ai(u),value:Pr(f)}),r.push({op:"replace",path:n+"/"+Ai(u),value:Pr(p)}))}else Array.isArray(e)===Array.isArray(t)?(o&&r.push({op:"test",path:n+"/"+Ai(u),value:Pr(f)}),r.push({op:"remove",path:n+"/"+Ai(u)}),l=!0):(o&&r.push({op:"test",path:n,value:e}),r.push({op:"replace",path:n,value:t}),s=!0)}if(!(!l&&i.length==a.length))for(var c=0;cn!=t)}dispatch(t,r){let n=new Map;t.forEach(o=>{this.subscribers.forEach(([i,a])=>{o.path.startsWith(i)&&!n.has(i)&&n.set(i,JSON.stringify(i==="/"?r:tl(r,i)))})}),n.forEach((o,i)=>{let a=i==="/"?this._data:tl(this._data,i);o!==JSON.stringify(a)&&this.subscribers.filter(([s,l])=>s===i).forEach(([s,l])=>{let c={};try{c=l(a,JSON.parse(o||{}))}catch(u){console.error(u.stack||u.message||u)}c instanceof Promise&&c.catch(u=>{console.error(u.stack||u.message||u)})})})}};function nr(e,t,r){return e.constructor[Wp]||(e.constructor[Wp]=[]),e.constructor[Wp].push(t),{value:function(...n){let o=Pr(this._data);r.value.apply(this,n);let i=zp(o,this._data);i.length!=0&&(this._mutationRecords.push(...i),this._version+=i.length,this.dispatch(i,o))}}}var rl=class extends tx{constructor(t){super(Object.assign({sid:"",ssid:""},t||{}))}setSID(t){this._data.sid=t,this._data.ssid=t.slice(0,4)}};Qt([nr],rl.prototype,"setSID",1);var rn=class extends rl{constructor(t,r){super(t||{title:"",webviewFromSid:location.search.match(/webview_fromsid=([^&]+)/)?.[1]||"",progress:0,lastError:"",queueSize:0,executingNodeTitle:"",widgetTableStructure:{widgetTablePath:"",widgetTablePersisted:!1,widgetTableID:"",nodes:{},groups:{},nodeIndexes:[],extraOptions:{}},widgetTableValue:{},widgetTableErrors:{},useSliderForNumberWidget:!1,hasPSDNodes:!1,comfyUserToken:"",comfyOrgLoggedIn:!1,comfyOrgAPIKey:""}),this._version=r||0}setWebviewFromSid(t){this._data.webviewFromSid=t}setTitle(t){this._data.title=t}setProgress(t){this._data.progress=t}setLastError(t){this._data.lastError=t}setQueueSize(t){this._data.queueSize=t}setExecutingNodeTitle(t){this._data.executingNodeTitle=t}setWidgetTableStructure(t){this._data.widgetTableStructure=JSON.parse(JSON.stringify(t))}setWidgetTableValue(t){this._data.widgetTableValue=JSON.parse(JSON.stringify(t))}setWidgetTableErrors(t){this._data.widgetTableErrors=JSON.parse(JSON.stringify(t))}setHasPSDNodes(t){this._data.hasPSDNodes=t}setComfyUserToken(t){this._data.comfyUserToken=t}setComfyOrgLoggedIn(t){this._data.comfyOrgLoggedIn=t}setComfyOrgAPIKey(t){this._data.comfyOrgAPIKey=t}setUseSliderForNumberWidget(t){this._data.useSliderForNumberWidget=t}};Qt([nr],rn.prototype,"setWebviewFromSid",1),Qt([nr],rn.prototype,"setTitle",1),Qt([nr],rn.prototype,"setProgress",1),Qt([nr],rn.prototype,"setLastError",1),Qt([nr],rn.prototype,"setQueueSize",1),Qt([nr],rn.prototype,"setExecutingNodeTitle",1),Qt([nr],rn.prototype,"setWidgetTableStructure",1),Qt([nr],rn.prototype,"setWidgetTableValue",1),Qt([nr],rn.prototype,"setWidgetTableErrors",1),Qt([nr],rn.prototype,"setHasPSDNodes",1),Qt([nr],rn.prototype,"setComfyUserToken",1),Qt([nr],rn.prototype,"setComfyOrgLoggedIn",1),Qt([nr],rn.prototype,"setComfyOrgAPIKey",1),Qt([nr],rn.prototype,"setUseSliderForNumberWidget",1);var Do=class extends rl{constructor(t,r){super(t||{uname:"",comfyUserToken:"",isLocal:!1,activeDocumentID:0,documents:{},actions:[],canvasStateID:0,selectionStateID:"",historyStateID:0}),this._version=r||0}setIsLocal(t){this._data.isLocal=t}setUName(t){this._data.uname="PS_"+t}setDocument(t,r){this._data.activeDocumentID=t,this._data.documents=r}setCanvasStateID(t){this._data.canvasStateID=t}setSelectionStateID(t){this._data.selectionStateID=t}setHistoryStateID(t){this._data.historyStateID=t}setComfyUserToken(t){this._data.comfyUserToken=t}setActions(t){this._data.actions=t}};Qt([nr],Do.prototype,"setIsLocal",1),Qt([nr],Do.prototype,"setUName",1),Qt([nr],Do.prototype,"setDocument",1),Qt([nr],Do.prototype,"setCanvasStateID",1),Qt([nr],Do.prototype,"setSelectionStateID",1),Qt([nr],Do.prototype,"setHistoryStateID",1),Qt([nr],Do.prototype,"setComfyUserToken",1),Qt([nr],Do.prototype,"setActions",1);var Bp=class{storeMap=new Map;storeCount(){return this.storeMap.size}getStore(t){return this.storeMap.get(t)}getAllStore(){return Object.fromEntries(this.storeMap.entries())}subscribers=[];subscribersWithoutKey=new WeakMap;subscribe(t,r){this.subscribers.push([t,r]);let n={};this.subscribersWithoutKey.set(r,n),this.storeMap.forEach((o,i)=>{n[i]=r.bind(this,i),o.subscribe(t,n[i])})}unsubscribe(t){this.subscribers=this.subscribers.filter(([n,o])=>o!=t);let r=this.subscribersWithoutKey.get(t);r&&this.storeMap.forEach((n,o)=>{n.unsubscribe(r[o])})}addStore(t,r,n){let o=this.createStore(r,n);this.storeMap.set(t,o),this.subscribers.forEach(([i,a])=>{let s=this.subscribersWithoutKey.get(a);s||(s={},this.subscribersWithoutKey.set(a,s)),s[t]=a.bind(this,t),o.subscribe(i,s[t]),i=="/"&&a(t,r,null)})}removeStore(t){let r=this.storeMap.get(t);r&&(this.subscribers.forEach(([n,o])=>{let i=this.subscribersWithoutKey.get(o);i&&(r.unsubscribe(i[t]),n=="/"&&o(t,null,r.data))}),this.storeMap.delete(t))}sync(t){if(t instanceof Array){let r=Array.from(this.storeMap.keys()),n=t.filter(i=>!r.includes(i)),o=r.filter(i=>!t.includes(i));n.forEach(i=>this.addStore(i,{},0)),o.forEach(i=>this.removeStore(i))}else{Array.from(this.storeMap.keys()).filter(n=>!Object.keys(t).includes(n)).forEach(n=>this.removeStore(n));for(let n in t){let{data:o,version:i}=t[n];this.storeMap.has(n)?this.storeMap.get(n)?.sync(o,i):this.addStore(n,o,i)}}}};var mt=window.comfyAPI.app.app,$K=window.comfyAPI.ui.$el,nn=window.comfyAPI.api.api;var rx=class extends Bp{createStore(t,r){return new Do(t,r)}getStoreByName(t){for(let r of this.storeMap.values())if(r.data.uname===t)return r}getAllPhotoshopDocumentData(){let t={};return this.storeMap.forEach(r=>{t[r.data.uname]={sid:r.data.sid,activeDocumentID:r.data.activeDocumentID,documents:r.data.documents}}),t}},zn=new rx,Xe=new rn;if(window.uxpHost){let e=t=>{if(t.data.action!=="webview-connect"||!t.data.payload.webviewFromSid)return console.log(t);t.data.payload.webviewFromSid=t.data.payload.webviewFromSid,Xe.setWebviewFromSid(t.data.payload.webviewFromSid),window.removeEventListener("message",e)};window.addEventListener("message",e),window.uxpHost.postMessage({from:"sdppp-webview",action:"webview-connect"},"*")}function wR(){document.title!==Xe.data.title&&Xe.setTitle(document.title),"user"in mt.extensionManager&&Xe.setComfyOrgLoggedIn(mt.extensionManager.user.isLoggedIn),requestAnimationFrame(wR)}requestAnimationFrame(wR);var CR=!1;async function ER(){if(CR)return Promise.resolve();nn.user&&Xe.setComfyUserToken(nn.user);let e=await nn.getSetting("sdppp.useSliderForNumberWidget");e&&Xe.setUseSliderForNumberWidget(e),CR=!0}function Q4(e){let t=e.split(" (id:");return{name:t[0],id:parseInt(t[1].slice(0,-1))}}function jp(e){return Q4(e)}globalThis.sdpppX=globalThis.sdpppX||{};var ia=globalThis.sdpppX;var ki=class{static makeDocumentDataOptions(t){let r=t.data,n=[`${Xt.getSpecialDocumentCurrent()}`];return Object.keys(r.documents).forEach(o=>{let i=r.documents[o];n.push(i.identify)}),n}static findDocumentData(t,r){let n=Xt.is_SPECIAL_DOCUMENT_CURRENT(r)?t.data.activeDocumentID:jp(r).id;return t.data.documents[n]}static makeLayerOptions(t,r){return r.concat(t.layers.map(o=>o.identify))}static getLayerDirtyID(t,r){return t.layers.find(o=>o.identify===r)?.dirtyID||0}static getCanvasDirtyID(t){return t.canvasDirtyID||0}static getSelectionDirtyID(t){return t.selectionDirtyID||0}};function nx(){let e=zn.getAllStore(),t=[];return Object.values(e).forEach(r=>{if(nn.user&&nn.user!=r.data.comfyUserToken)return;let n=ki.makeDocumentDataOptions(r).map(o=>ox(o,r.data.uname));t.push(...n)}),t}function RR(e,t){let r=[""],n=lc(e);if(!n)return[];let o=ki.makeLayerOptions(n.documentData,t);return r.push(...o),r}function OR(){return nn.user?Object.values(zn.getAllStore()).filter(e=>nn.user==e.data.comfyUserToken).length>0:zn.storeCount()}function ox(e,t){return`${t}/${e}`}function lc(e){if(!e||!e.split||e.indexOf("/")==-1)return null;let t=zn.getAllPhotoshopDocumentData(),[r,n]=e.split("/");if(n||(n=r,r=Object.keys(t)[0]),!t[r])return null;let o=Xt.is_SPECIAL_DOCUMENT_CURRENT(n)?t[r].activeDocumentID:jp(n).id;if(t[r]?.documents[o]){let i=t[r].documents[o];return{instance_id:t[r].sid,identify:n,documentData:i}}return null}var J4=function(e){let t=mt.graph.links;return Array.isArray(t)?t.find(n=>n&&n.origin_id==e):t.get(e)};function ix(e){let t=mt.graph.nodes,r=t.find(i=>e.id==i.id);if(!r)return null;let n=[];if(o(r,n),n.length>2){let i=n[0].widgets[0].value;if(!n.map(a=>a.widgets[0].value).every(a=>a==i))throw new Error(me("Cannot connect multiple different document widgets with same value"))}return n?.[0]||null;function o(i,a){if(i.type=="SDPPP Get Document")return a.push(i),i;if(i.inputs.length==0)return null;for(let s of i.inputs)if(s.link){let l=J4(s.link);if(!l)continue;let c=t.find(f=>f.id==l.origin_id);if(!c)continue;let u=o(c,a);if(u)return u}return null}}ia.findDocumentNodeRecursive=ix;var Vp=class{flushing=Promise.resolve();newFlushPending=!1;constructor(t){this.doFlush=t,this.pause()}doFlush;runFlush(){this.newFlushPending||(this.newFlushPending=!0,this.flushing=this.flushing.then(async()=>{await new Promise(t=>requestAnimationFrame(t)),this.newFlushPending=!1,await this.doFlush()}))}pause(){this.flushing=this.flushing.then(t=>new Promise(r=>{this.resume=r})).then(()=>{this.resume=()=>{}})}resume=()=>{}};function _R(e,t){return function(r){return class extends r{constructor(n){super(n),this.socket.on("store_request",(i,a)=>{a({data:e.data,version:e.version})});let o=new Vp(async()=>{let{operations:i,fromVersion:a,toVersion:s}=e.flush();await new Promise(l=>{let c=!1;setTimeout(()=>{c||(console.warn("flush timeout"),l())},5e3),this.socket.emit("store_flush",{operations:i,fromVersion:a},u=>{c=!0,l(),u?.error?console.error("flush error",u.error):e.flushDone(s)})})});e.subscribe("/",()=>{o.runFlush()}),this.socket.on("disconnect",()=>{o.pause()}),this.socket.on("connect",()=>{e.setSID(this.socket.id||""),requestAnimationFrame(()=>{this.socket.emit("sdppp_init",{type:t,data:e.data,version:e.version})})}),this.socket.on("sdppp_inited",i=>{o.resume()})}}}}function PR(e,t){return function(r){return class extends r{constructor(n){super(n),this.socket.on("store_flush",o=>{if(o.type!==t)return;let i=e.getStore(o.sid);if(i)i.patchVersionAcceptable(o.fromVersion)?i.patchData(o.operations):(console.warn("patch version not acceptable from",o.fromVersion,"current version is",i.version),this.socket.emit("store_request",{type:t},a=>{e.sync(a)}));else return this.socket.emit("store_request",{sid:o.sid},a=>{e.addStore(a.sid,a.data,a.version)})}),this.socket.on("store_remove",o=>{e.removeStore(o.sid)}),this.socket.on("sdppp_inited",o=>{this.socket.emit("store_request",{type:t},i=>{e.sync(i)})})}}}}var ci=Object.create(null);ci.open="0";ci.close="1";ci.ping="2";ci.pong="3";ci.message="4";ci.upgrade="5";ci.noop="6";var of=Object.create(null);Object.keys(ci).forEach(e=>{of[ci[e]]=e});var af={type:"error",data:"parser error"};var IR=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",$R=typeof ArrayBuffer=="function",DR=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,sf=({type:e,data:t},r,n)=>IR&&t instanceof Blob?r?n(t):TR(t,n):$R&&(t instanceof ArrayBuffer||DR(t))?r?n(t):TR(new Blob([t]),n):n(ci[e]+(t||"")),TR=(e,t)=>{let r=new FileReader;return r.onload=function(){let n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function NR(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var ax;function AR(e,t){if(IR&&e.data instanceof Blob)return e.data.arrayBuffer().then(NR).then(t);if($R&&(e.data instanceof ArrayBuffer||DR(e.data)))return t(NR(e.data));sf(e,!1,r=>{ax||(ax=new TextEncoder),t(ax.encode(r))})}var kR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",lf=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e{let t=e.length*.75,r=e.length,n,o=0,i,a,s,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let c=new ArrayBuffer(t),u=new Uint8Array(c);for(n=0;n>4,u[o++]=(a&15)<<4|s>>2,u[o++]=(s&3)<<6|l&63;return c};var Z4=typeof ArrayBuffer=="function",cf=(e,t)=>{if(typeof e!="string")return{type:"message",data:FR(e,t)};let r=e.charAt(0);return r==="b"?{type:"message",data:e5(e.substring(1),t)}:of[r]?e.length>1?{type:of[r],data:e.substring(1)}:{type:of[r]}:af},e5=(e,t)=>{if(Z4){let r=MR(e);return FR(r,t)}else return{base64:!0,data:e}},FR=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}};var LR="",zR=(e,t)=>{let r=e.length,n=new Array(r),o=0;e.forEach((i,a)=>{sf(i,!1,s=>{n[a]=s,++o===r&&t(n.join(LR))})})},WR=(e,t)=>{let r=e.split(LR),n=[];for(let o=0;o{let n=r.length,o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);let i=new DataView(o.buffer);i.setUint8(0,126),i.setUint16(1,n)}else{o=new Uint8Array(9);let i=new DataView(o.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(n))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(r)})}})}var sx;function Hp(e){return e.reduce((t,r)=>t+r.length,0)}function Up(e,t){if(e[0].length===t)return e.shift();let r=new Uint8Array(t),n=0;for(let o=0;oMath.pow(2,21)-1){s.enqueue(af);break}o=u*Math.pow(2,32)+c.getUint32(4),n=3}else{if(Hp(r)e){s.enqueue(af);break}}}})}var lx=4;function Jt(e){if(e)return t5(e)}function t5(e){for(var t in Jt.prototype)e[t]=Jt.prototype[t];return e}Jt.prototype.on=Jt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Jt.prototype.once=function(e,t){function r(){this.off(e,r),t.apply(this,arguments)}return r.fn=t,this.on(e,r),this};Jt.prototype.off=Jt.prototype.removeListener=Jt.prototype.removeAllListeners=Jt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var n,o=0;oPromise.resolve().then(t):(t,r)=>r(t,0),Wn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),VR="arraybuffer";function qp(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}var r5=Wn.setTimeout,n5=Wn.clearTimeout;function sa(e,t){t.useNativeTimers?(e.setTimeoutFn=r5.bind(Wn),e.clearTimeoutFn=n5.bind(Wn)):(e.setTimeoutFn=Wn.setTimeout.bind(Wn),e.clearTimeoutFn=Wn.clearTimeout.bind(Wn))}var o5=1.33;function HR(e){return typeof e=="string"?i5(e):Math.ceil((e.byteLength||e.size)*o5)}function i5(e){let t=0,r=0;for(let n=0,o=e.length;n=57344?r+=3:(n++,r+=4);return r}function Gp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function UR(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function qR(e){let t={},r=e.split("&");for(let n=0,o=r.length;n{this.readyState="paused",t()};if(this._polling||!this.writable){let n=0;this._polling&&(n++,this.once("pollComplete",function(){--n||r()})),this.writable||(n++,this.once("drain",function(){--n||r()}))}else r()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let r=n=>{if(this.readyState==="opening"&&n.type==="open"&&this.onOpen(),n.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(n)};WR(t,this.socket.binaryType).forEach(r),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,zR(t,r=>{this.doWrite(r,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",r=this.query||{};return this.opts.timestampRequests!==!1&&(r[this.opts.timestampParam]=Gp()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}};var GR=!1;try{GR=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var KR=GR;function a5(){}var cx=class extends uf{constructor(t){if(super(t),typeof location<"u"){let r=location.protocol==="https:",n=location.port;n||(n=r?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||n!==t.port}}doWrite(t,r){let n=this.request({method:"POST",data:t});n.on("success",r),n.on("error",(o,i)=>{this.onError("xhr post error",o,i)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(r,n)=>{this.onError("xhr poll error",r,n)}),this.pollXhr=t}},qa=class e extends Jt{constructor(t,r,n){super(),this.createRequest=t,sa(this,n),this._opts=n,this._method=n.method||"GET",this._uri=r,this._data=n.data!==void 0?n.data:null,this._create()}_create(){var t;let r=qp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");r.xdomain=!!this._opts.xd;let n=this._xhr=this.createRequest(r);try{n.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){n.setDisableHeaderCheck&&n.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&n.setRequestHeader(o,this._opts.extraHeaders[o])}}catch{}if(this._method==="POST")try{n.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{n.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(n),"withCredentials"in n&&(n.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(n.timeout=this._opts.requestTimeout),n.onreadystatechange=()=>{var o;n.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(n.getResponseHeader("set-cookie"))),n.readyState===4&&(n.status===200||n.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof n.status=="number"?n.status:0)},0))},n.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document<"u"&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=a5,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};qa.requestsCount=0;qa.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",XR);else if(typeof addEventListener=="function"){let e="onpagehide"in Wn?"pagehide":"unload";addEventListener(e,XR,!1)}}function XR(){for(let e in qa.requests)qa.requests.hasOwnProperty(e)&&qa.requests[e].abort()}var s5=function(){let e=YR({xdomain:!1});return e&&e.responseType!==null}(),Ga=class extends cx{constructor(t){super(t);let r=t&&t.forceBase64;this.supportsBinary=s5&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new qa(YR,this.uri(),t)}};function YR(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||KR))return new XMLHttpRequest}catch{}if(!t)try{return new Wn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var QR=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",fx=class extends la{get name(){return"websocket"}doOpen(){let t=this.uri(),r=this.opts.protocols,n=QR?{}:qp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(n.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,r,n)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let r=0;r{try{this.doWrite(n,i)}catch{}o&&aa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",r=this.query||{};return this.opts.timestampRequests&&(r[this.opts.timestampParam]=Gp()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}},ux=Wn.WebSocket||Wn.MozWebSocket,Ka=class extends fx{createSocket(t,r,n){return QR?new ux(t,r,n):r?new ux(t,r):new ux(t)}doWrite(t,r){this.ws.send(r)}};var cc=class extends la{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let r=jR(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=BR();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();let i=()=>{n.read().then(({done:s,value:l})=>{s||(this.onPacket(l),i())}).catch(s=>{})};i();let a={type:"open"};this.query.sid&&(a.data=`{"sid":"${this.query.sid}"}`),this._writer.write(a).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let r=0;r{o&&aa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}};var dx={websocket:Ka,webtransport:cc,polling:Ga};var l5=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,c5=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function uc(e){if(e.length>8e3)throw"URI too long";let t=e,r=e.indexOf("["),n=e.indexOf("]");r!=-1&&n!=-1&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let o=l5.exec(e||""),i={},a=14;for(;a--;)i[c5[a]]=o[a]||"";return r!=-1&&n!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=u5(i,i.path),i.queryKey=f5(i,i.query),i}function u5(e,t){let r=/\/{2,9}/g,n=t.replace(r,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&n.splice(0,1),t.slice(-1)=="/"&&n.splice(n.length-1,1),n}function f5(e,t){let r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}var px=typeof addEventListener=="function"&&typeof removeEventListener=="function",Xp=[];px&&addEventListener("offline",()=>{Xp.forEach(e=>e())},!1);var nl=class e extends Jt{constructor(t,r){if(super(),this.binaryType=VR,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(r=t,t=null),t){let n=uc(t);r.hostname=n.host,r.secure=n.protocol==="https"||n.protocol==="wss",r.port=n.port,n.query&&(r.query=n.query)}else r.host&&(r.hostname=uc(r.host).host);sa(this,r),this.secure=r.secure!=null?r.secure:typeof location<"u"&&location.protocol==="https:",r.hostname&&!r.port&&(r.port=this.secure?"443":"80"),this.hostname=r.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=r.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},r.transports.forEach(n=>{let o=n.prototype.name;this.transports.push(o),this._transportsByName[o]=n}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},r),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=qR(this.opts.query)),px&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Xp.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let r=Object.assign({},this.opts.query);r.EIO=lx,r.transport=t,this.id&&(r.sid=this.id);let n=Object.assign({},this.opts,{query:r,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](n)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let r=this.createTransport(t);r.open(),this.setTransport(r)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",r=>this._onClose("transport close",r))}onOpen(){this.readyState="open",e.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let r=new Error("server error");r.code=t.data,this._onError(r);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let r=1;for(let n=0;n0&&r>this._maxPayload)return this.writeBuffer.slice(0,n);r+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,aa(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,r,n){return this._sendPacket("message",t,r,n),this}send(t,r,n){return this._sendPacket("message",t,r,n),this}_sendPacket(t,r,n,o){if(typeof r=="function"&&(o=r,r=void 0),typeof n=="function"&&(o=n,n=null),this.readyState==="closing"||this.readyState==="closed")return;n=n||{},n.compress=n.compress!==!1;let i={type:t,data:r,options:n};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),o&&this.once("flush",o),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},r=()=>{this.off("upgrade",r),this.off("upgradeError",r),t()},n=()=>{this.once("upgrade",r),this.once("upgradeError",r)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?n():t()}):this.upgrading?n():t()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,r){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),px&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let n=Xp.indexOf(this._offlineEventListener);n!==-1&&Xp.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}};nl.protocol=lx;var Yp=class extends nl{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t{n||(r.send([{type:"ping",data:"probe"}]),r.once("packet",f=>{if(!n)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;nl.priorWebsocketSuccess=r.name==="websocket",this.transport.pause(()=>{n||this.readyState!=="closed"&&(u(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())})}else{let p=new Error("probe error");p.transport=r.name,this.emitReserved("upgradeError",p)}}))};function i(){n||(n=!0,u(),r.close(),r=null)}let a=f=>{let p=new Error("probe error: "+f);p.transport=r.name,i(),this.emitReserved("upgradeError",p)};function s(){a("transport closed")}function l(){a("socket closed")}function c(f){r&&f.name!==r.name&&i()}let u=()=>{r.removeListener("open",o),r.removeListener("error",a),r.removeListener("close",s),this.off("close",l),this.off("upgrading",c)};r.once("open",o),r.once("error",a),r.once("close",s),this.once("close",l),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{n||r.open()},200):r.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let r=[];for(let n=0;ndx[o]).filter(o=>!!o)),super(t,n)}};var cY=fc.protocol;function JR(e,t="",r){let n=e;r=r||typeof location<"u"&&location,e==null&&(e=r.protocol+"//"+r.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=r.protocol+e:e=r.host+e),/^(https?|wss?):\/\//.test(e)||(typeof r<"u"?e=r.protocol+"//"+e:e="https://"+e),n=uc(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";let i=n.host.indexOf(":")!==-1?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+i+":"+n.port+t,n.href=n.protocol+"://"+i+(r&&r.port===n.port?"":":"+n.port),n}var xx={};q0(xx,{Decoder:()=>vx,Encoder:()=>hx,PacketType:()=>Rt,protocol:()=>nO});var p5=typeof ArrayBuffer=="function",m5=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ZR=Object.prototype.toString,g5=typeof Blob=="function"||typeof Blob<"u"&&ZR.call(Blob)==="[object BlobConstructor]",h5=typeof File=="function"||typeof File<"u"&&ZR.call(File)==="[object FileConstructor]";function df(e){return p5&&(e instanceof ArrayBuffer||m5(e))||g5&&e instanceof Blob||h5&&e instanceof File}function ff(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let r=0,n=e.length;r=0&&e.num{delete this.acks[t];for(let s=0;s{this.io.clearTimeoutFn(i),r.apply(this,s)};a.withError=!0,this.acks[t]=a}emitWithAck(t,...r){return new Promise((n,o)=>{let i=(a,s)=>a?o(a):n(s);i.withError=!0,r.push(i),this.emit(t,...r)})}_addToQueue(t){let r;typeof t[t.length-1]=="function"&&(r=t.pop());let n={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...i)=>n!==this._queue[0]?void 0:(o!==null?n.tryCount>this._opts.retries&&(this._queue.shift(),r&&r(o)):(this._queue.shift(),r&&r(null,...i)),n.pending=!1,this._drainQueue())),this._queue.push(n),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let r=this._queue[0];r.pending&&!t||(r.pending=!0,r.tryCount++,this.flags=r.flags,this.emit.apply(this,r.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Rt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,r){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,r),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(n=>String(n.id)===t)){let n=this.acks[t];delete this.acks[t],n.withError&&n.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Rt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Rt.EVENT:case Rt.BINARY_EVENT:this.onevent(t);break;case Rt.ACK:case Rt.BINARY_ACK:this.onack(t);break;case Rt.DISCONNECT:this.ondisconnect();break;case Rt.CONNECT_ERROR:this.destroy();let n=new Error(t.data.message);n.data=t.data.data,this.emitReserved("connect_error",n);break}}onevent(t){let r=t.data||[];t.id!=null&&r.push(this.ack(t.id)),this.connected?this.emitEvent(r):this.receiveBuffer.push(Object.freeze(r))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let r=this._anyListeners.slice();for(let n of r)n.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let r=this,n=!1;return function(...o){n||(n=!0,r.packet({type:Rt.ACK,id:t,data:o}))}}onack(t){let r=this.acks[t.id];typeof r=="function"&&(delete this.acks[t.id],r.withError&&t.data.unshift(null),r.apply(this,t.data))}onconnect(t,r){this.id=t,this.recovered=r&&this._pid===r,this._pid=r,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Rt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let r=this._anyListeners;for(let n=0;n0&&e.jitter<=1?e.jitter:0,this.attempts=0}ol.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-r:e+r}return Math.min(e,this.max)|0};ol.prototype.reset=function(){this.attempts=0};ol.prototype.setMin=function(e){this.ms=e};ol.prototype.setMax=function(e){this.max=e};ol.prototype.setJitter=function(e){this.jitter=e};var pc=class extends Jt{constructor(t,r){var n;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(r=t,t=void 0),r=r||{},r.path=r.path||"/socket.io",this.opts=r,sa(this,r),this.reconnection(r.reconnection!==!1),this.reconnectionAttempts(r.reconnectionAttempts||1/0),this.reconnectionDelay(r.reconnectionDelay||1e3),this.reconnectionDelayMax(r.reconnectionDelayMax||5e3),this.randomizationFactor((n=r.randomizationFactor)!==null&&n!==void 0?n:.5),this.backoff=new ol({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(r.timeout==null?2e4:r.timeout),this._readyState="closed",this.uri=t;let o=r.parser||xx;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=r.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var r;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(r=this.backoff)===null||r===void 0||r.setMin(t),this)}randomizationFactor(t){var r;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(r=this.backoff)===null||r===void 0||r.setJitter(t),this)}reconnectionDelayMax(t){var r;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(r=this.backoff)===null||r===void 0||r.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new fc(this.uri,this.opts);let r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=mo(r,"open",function(){n.onopen(),t&&t()}),i=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=mo(r,"error",i);if(this._timeout!==!1){let s=this._timeout,l=this.setTimeoutFn(()=>{o(),i(new Error("timeout")),r.close()},s);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(o),this.subs.push(a),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(mo(t,"ping",this.onping.bind(this)),mo(t,"data",this.ondata.bind(this)),mo(t,"error",this.onerror.bind(this)),mo(t,"close",this.onclose.bind(this)),mo(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(r){this.onclose("parse error",r)}}ondecoded(t){aa(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,r){let n=this.nsps[t];return n?this._autoConnect&&!n.active&&n.connect():(n=new dc(this,t,r),this.nsps[t]=n),n}_destroy(t){let r=Object.keys(this.nsps);for(let n of r)if(this.nsps[n].active)return;this._close()}_packet(t){let r=this.encoder.encode(t);for(let n=0;nt()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,r){var n;this.cleanup(),(n=this.engine)===null||n===void 0||n.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,r),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let r=this.backoff.duration();this._reconnecting=!0;let n=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},r);this.opts.autoUnref&&n.unref(),this.subs.push(()=>{this.clearTimeoutFn(n)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}};var pf={};function mf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};let r=JR(e,t.path||"/socket.io"),n=r.source,o=r.id,i=r.path,a=pf[o]&&i in pf[o].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a,l;return s?l=new pc(n,t):(pf[o]||(pf[o]=new pc(n,t)),l=pf[o]),r.query&&!t.query&&(t.query=r.queryKey),l.socket(r.path,t)}Object.assign(mf,{Manager:pc,Socket:dc,io:mf,connect:mf});var oO=`504 +`;var Qp=oO.trim();var bx=class{socket;constructor(t){let r="/"+[t.split("/").slice(3).filter(n=>n).join("/"),"sd-ppp/"].filter(n=>n).join("/");t=t.split("/").slice(0,3).join("/"),this.socket=mf(t,{transports:["websocket"],path:r,query:{api_level:Qp},rejectUnauthorized:!1,autoConnect:!1}),this.socket.on("connect",()=>{this.socket.io.engine.binaryType="blob"})}get id(){return this.socket.id}connect(){this.socket.connect()}close(){this.socket.close()}};function iO(...e){return e.reduce((t,r)=>r(t),bx)}function aO(e){return class extends e{constructor(t){super(t),this.socket.on("F_photoshop",(r,n)=>{try{r.action=="extractPSD"&&mt.graph.nodes.forEach(o=>{o.type=="SDPPP Get Document"&&this.extractPSD(o,r.params.from_sid,"")}),n({})}catch(o){n({error:o instanceof Error?o.message:o?.toString()||"unknown error"})}})}async importPSDDataURLFromPhotoshop(t,r,n){let o=await new Promise((a,s)=>{this.socket.emit("B_photoshop",{action:"psd",sid:t,params:{action:"get",fromSSID:n,document_identify:r}},l=>{a(l.data)})});var i=new FileReader;return i.readAsDataURL(o),new Promise(a=>{i.onloadend=function(){var s=i.result;a(s)}})}async exportPSDDataURLToPhotoshop(t,r,n,o){let i=await fetch(n).then(a=>a.arrayBuffer());await new Promise((a,s)=>{this.socket.emit("B_photoshop",{action:"psd",sid:t,params:{action:"extract",fromSSID:o,document_identify:r,data:i}},l=>{a(l)})})}async sendImage(t,r){return new Promise((n,o)=>{this.socket.emit("B_photoshop",{action:"sendImages",sid:t,params:r},i=>{i&&i.error?o(new Error(i.error)):n(i)})})}async getSpecialIdentifierValue(t,r){return new Promise((n,o)=>{this.socket.emit("B_photoshop",{action:"getSpecialIdentifierValue",sid:t,params:r},i=>{i&&i.error?o(new Error(i.error)):n(i)})})}async extractPSD(t,r,n){t.properties.psd&&await this.exportPSDDataURLToPhotoshop(r,n,t.properties.psd,this.socket.id||"??").then(async()=>{await new Promise(o=>setTimeout(o,300)),globalThis.app.canvas.draw(!0,!0)}).catch(console.error)}}}var sO={last_node_id:0,last_link_id:0,nodes:[],links:[],groups:[],config:{},extra:{},version:.4};var Xa=[];ia.widgetable=ia.widgetable||{};ia.widgetable.add=function(e,t){typeof t=="function"?Xa.push([e,{formatter:t,setter:null}]):Xa.push([e,t])};function Zp(e,t,r){let n=Xa.find(([s])=>s=="__DEFAULT__"),o=Xa.find(([s])=>Sx(s,e.type))||n,i=!1;if(o){let s=o[1].setter;s&&(i=!!s(e,t,r))}i||(e.widgets[t].value=r,e.widgets[t].callback?.(r)),(mt.workflowManager||mt.extensionManager.workflow).activeWorkflow?.changeTracker.checkState()}function gf(e){let t={},r=Xa.find(([n])=>n=="__DEFAULT__");return e.nodes.forEach(n=>{if(!n.widgets||n.widgets.length==0)return;let o=Xa.find(([i])=>Sx(i,n.type))||r;if(o){let i=o[1].formatter(n);i&&(t[n.id]=i.widgets.map(a=>a.value))}}),t}function em(e,t){if(!e)return{widgetTableID:"",widgetTablePath:"",widgetTablePersisted:!1,groups:{},nodes:{},nodeIndexes:[],extraOptions:{useSliderForNumberWidget:Xe.data.useSliderForNumberWidget}};let r=e.groups.map(o=>(o.recomputeInsideNodes(),{id:o.id,name:o.title,color:o.color,nodeIDs:o.nodes.map(i=>i.id)})),n=e.nodes.map(o=>{if(o.mode!=0)return;let i=Jp(o);if(!i||i.startsWith(".")||!o.widgets||o.widgets.length==0)return;let a=Xa.find(([u])=>Sx(u,o.type));if(a)try{let u=a[1].formatter(o);if(u)return u.id=o.id,u.uiWeightSum=u.widgets.reduce((f,p)=>f+(p.uiWeight||12),0),u}catch(u){return{id:o.id,title:i,uiWeightSum:12,widgets:[{outputType:"error",value:me("convert widget {0} failed:",a[0])+(u.message||u||"")+(u?.stack||"")}]}}if(!i.startsWith("#"))return null;let s=o.widgets,l=Xa.find(([u])=>u=="__DEFAULT__");if(l){let u=l[1].formatter(o);if(u)return Object.assign(u,{uiWeightSum:u.widgets.reduce((f,p)=>f+(p.uiWeight||12),0)})}let c={id:o.id,title:i,widgets:s.map(u=>({name:u.label||u.name,outputType:u.type||"string",value:u.value,options:u.options}))};return Object.assign(c,{uiWeightSum:c.widgets.reduce((u,f)=>u+(f.uiWeight||12),0)})}).filter(Boolean).sort((o,i)=>{let a=Jp(o),s=Jp(i);return a=a.startsWith("#")?a.slice(1).trim():a.trim(),s=s.startsWith("#")?s.slice(1).trim():s.trim(),a.localeCompare(s)});return{widgetTablePath:t.activeState.extra.sdppp_workflow_alias||t.path,widgetTablePersisted:t.isPersisted,widgetTableID:t.activeState.id,groups:r,nodes:n.reduce((o,i)=>(o[i.id]=i,o),{}),nodeIndexes:n.map(o=>o.id),extraOptions:{useSliderForNumberWidget:Xe.data.useSliderForNumberWidget}}}function Sx(e,t){let r=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${r}$`).test(t)}function Jp(e,t=""){let r=t||e.title||"";return e.setProperty&&(r.startsWith("#")||r.startsWith("."))?e.setProperty("sdppp_widgetable_title",r):r=e.properties?.sdppp_widgetable_title||r,r}ia.getNodeTitle=Jp;var b5=new Map,il=b5;function cO(e){return class extends e{workflowManager;constructor(t){super(t),this.workflowManager=mt.workflowManager||mt.extensionManager.workflow,this.socket.on("F_workflow",async(r,n)=>{if(r.action=="open"||r.action=="save"||r.action=="list"||r.action=="setWidgetValue"||r.action=="run"||r.action=="setNodeTitle"||r.action=="logout"||r.action=="interrupt"||r.action=="clearQueue"||r.action=="reboot"||r.action=="setComfyOrgAPIKey")try{let o=await this[r.action](r.params);n(o||{})}catch(o){n({error:o.stack||o.message||o})}else n({error:"Invalid action"})})}async logout(){this.socket.disconnect(),document.querySelector(".pi-sign-out").parentElement.click()}async run(t){Cx||S5();let r=t.size,n=!1,o="",i={};try{tm=[];let s=await mt.queuePrompt(1,r);tm.forEach(l=>{if(!n)if(l.error)n=!0,i=a(l.error.response.node_errors),Object.assign(i,{"-1":l.error.response.error.message});else{let c=l.result.prompt_id;il.set(c,t.from_sid)}})}catch(s){n=!0,i={"-1":s.message||s.stack||s.toString()}}n&&(o?Xe.setLastError(o):Xe.setWidgetTableErrors(i));function a(s){let l={};return Object.keys(s).forEach(c=>{let u=c.split(":")[0],f=mt.graph.nodes.find(p=>p.id==u);l[u]=`[${f?.title||u}]`+s[c].errors.map(JSON.stringify).join(` +`)}),l}}async list(t){let n=this.workflowManager.workflows.map(o=>o.path.replace("workflows/",""));try{let o=new Headers,i=localStorage.getItem("Comfy.userId");i&&o.set("comfy-user",i);let a=await fetch("./api/userdata/workflows%2F.index.json",{headers:o}),s=[];a.ok&&(s=(await a.json()).favorites.map(c=>c.replace("workflows/",""))),n.sort((l,c)=>{let u=s.includes(l),f=s.includes(c);return u&&!f?-1:!u&&f?1:l.localeCompare(c)})}catch(o){console.warn("Error fetching favorites, returning unsorted workflows:",o)}return{workflows:n,error:""}}setWidgetValue(t){t.values.forEach(({nodeID:r,widgetIndex:n,value:o})=>{let i=mt.graph.nodes.find(a=>a.id==r);!i||o==i.widgets[n].value||Zp(i,n,o)})}async open(t){let{workflow_path:r}=t;try{Xe.setLastError(""),Xe.setWidgetTableErrors({}),r.startsWith("sdppp://")?await this.openSDPPPWorkflow(t):await this.openComfyWorkflow(t)}catch(n){throw n}}async openSDPPPWorkflow(t){let r=t.workflow_path.replace("sdppp://",""),n=await fetch("/sd-ppp-static/sdppp-workflows/"+r).then(o=>o.json());n.extra.sdppp_workflow_alias=t.workflow_path,await mt.loadGraphData(n)}async openComfyWorkflow(t){let{workflow_path:r,from_sid:n,reset:o}=t,i=this.workflowManager.workflows.find(a=>a.fullFilename===r||a.path===r||a.path==="workflows/"+r);(i.isOpen||this.workflowManager.isOpen?.(i))&&!o||(this.workflowManager.openWorkflows.length===1?await mt.loadGraphData(sO):await lO(this.workflowManager,this.workflowManager.openWorkflows[0]==i?this.workflowManager.openWorkflows[1]:this.workflowManager.openWorkflows[0]),await this.workflowManager.closeWorkflow(i,!1),await new Promise(a=>requestAnimationFrame(a)),await lO(this.workflowManager,i),await new Promise(a=>setTimeout(a,500)),Xe.data.widgetTableStructure&&await this.socket.emit("B_workflow",{action:"getStoredWidgetValue",sid:n,params:{widgetTableID:Xe.data.widgetTableStructure.widgetTableID,widgetTablePath:Xe.data.widgetTableStructure.widgetTablePath,widgetTablePersisted:Xe.data.widgetTableStructure.widgetTablePersisted}},a=>{this.setWidgetValue(a)}))}async save(t){let{workflow_path:r,from_sid:n}=t,o=this.workflowManager.workflows.find(i=>i.fullFilename===r||i.path===r||i.path==="workflows/"+r);if(!o)throw new Error("Workflow not found");this.workflowManager.activeWorkflow?.id!=o.id&&this.open({workflow_path:r,from_sid:n,reset:!1}),o.changeTracker.checkState(),await this.workflowManager.saveWorkflow(o)}setNodeTitle(t){let{node_id:r,title:n}=t,o=mt.graph.nodes.find(i=>i.id==r);if(!o)throw new Error("Node not found");o.title=n,o.setProperty("sdppp_widgetable_title",n)}async interrupt(t){await mt.api.interrupt()}async clearQueue(t){await mt.api.clearItems("queue")}async reboot(t){let r=await fetch("./api/manager/reboot");return r.status==404?{error:me("ComfyManager not found, cannot reboot"),success:!1}:r.status==200?{success:!0}:{error:me("Failed to reboot ComfyUI")+r.statusText,success:!1}}async setComfyOrgAPIKey(t){let{api_key:r}=t;localStorage.setItem("comfy_api_key",r),location.reload()}}}async function lO(e,t){mt.workflowManager==e?await t.load():(await e.openWorkflow(t),await mt.loadGraphData(JSON.parse(JSON.stringify(t.activeState)),!0,!0,t,{}))}var Cx=!1,tm=[];function S5(){if(Cx)return;let e=nn.queuePrompt;nn.queuePrompt=async(...t)=>{try{let r=await e.call(nn,...t);return tm.push({error:null,result:r}),r}catch(r){throw tm.push({error:r,result:null}),r}},Cx=!0}var Bn=class e extends iO(_R(Xe,"comfy"),PR(zn,"photoshop"),aO,cO){static instance;constructor(){super(location.href.split("?")[0].split("#")[0]),e.instance=this}};function rm(e){return e.replace(/^workflows\//,"").replace(/\.json$/,"").split("://").pop()}var nm=class{widget;node;originLabel="";indexInNode=0;constructor(t,r){this.widget=r,this.node=t,this.indexInNode=t.widgets.indexOf(r);let n=this;r.callback=function(...o){n.widget!=this&&(n.widget=n.node.widgets[n.indexInNode]=this),n._callbacks.forEach(i=>i(...o))},this.originLabel=r.label}_callbacks=[];onChange(t){this._callbacks.push(t)}removeOnChange(t){this._callbacks.splice(this._callbacks.indexOf(t),1)}},om=class extends nm{lockMode(t,r){if(t){if(this.widget.type=="button")return;this.widget.type="button",this.widget.value="",this.widget.label=r}else{if(this.widget.type=="combo")return;this.widget.type="combo",this.widget.value="",this.widget.label=this.originLabel}}},Ya=class e extends om{getPSStore(){if(!this.widget.value||this.widget.value.indexOf("/")==-1)return null;let[t]=this.widget.value.split("/");return zn.getStoreByName(t)?.data||null}static create(t,r){let n=nx(),o=t.size.slice(0),i=t.addWidget("combo",r,n[0]||"",()=>{},{forceInput:!0,values:nx});return i.serializeValue=async()=>{let a=lc(i.value);if(!a)return JSON.stringify({instance_id:me("document {0} not found",i.value),identify:"",dirtyID:0});let s=a.identify;return Xt.is_SPECIAL_DOCUMENT_CURRENT(s)&&(s=(await Bn.instance.getSpecialIdentifierValue(a.instance_id,{identifier:s})).value),JSON.stringify({instance_id:a.instance_id,identify:s,canvasDirtyID:a.documentData.canvasDirtyID,selectionDirtyID:a.documentData.selectionDirtyID})},t.size=[o[0],Math.max(o[1],t.size[1])],new e(t,i)}static link(t,r){if(r.type=="combo")return new e(t,r);let n=e.create(t,r.name),o=t.widgets.indexOf(r);return t.widgets[o]=t.widgets.pop(),n}constructor(t,r){super(t,r),this.onChange(n=>{if(!isNaN(+n))r.value=Object.keys(r.options.values)[+n];else if(typeof n=="string"){let o=n.split("/");Xt.is_SPECIAL_DOCUMENT_CURRENT(o[1])&&(r.value=o[0]+"/"+Xt.getSpecialDocumentCurrent())}})}update(){fO(this.widget,this.widget.options.values,!0)}selectConcreteDocument(){if(Xt.is_SPECIAL_DOCUMENT_CURRENT(this.widget.value)){let[t]=this.widget.value.split("/"),r=zn.getStoreByName(t);if(!r)return console.warn(`store ${t} not found`);this.widget.value=ox(r.data.documents[r.data.activeDocumentID].identify,t)}}},mc=class e extends om{documentWidgetByLinked=null;extraOptions;constructor(t,r,n){super(t,r),this.extraOptions=n.extraOptions,this.update=this.update.bind(this),this.onChange(o=>{this.node.setProperty("layerWidgetDetail"+this.indexInNode,this.currentOptionsDetail[Object.values(this.currentOptions).indexOf(this.widget.value)]),typeof o=="string"&&(o=Xt.fixI18n(o))}),r.serializeValue=async()=>{let o=this.documentWidgetByLinked;if(!o)return JSON.stringify({identify:r.value,dirtyID:0});let i=lc(o.widget.value);if(!i)return JSON.stringify({identify:r.value,dirtyID:0});let a=r.value;Xt.is_SPECIAL_LAYER_SELECTED_LAYER(a)&&(a=(await Bn.instance.getSpecialIdentifierValue(i.instance_id,{identifier:a})).value);let s=0;return Xt.is_SPECIAL_LAYER_NEW_LAYER(a)||Xt.is_SPECIAL_LAYER_USE_CANVAS(a)?s=ki.getCanvasDirtyID(i.documentData):s=ki.getLayerDirtyID(i.documentData,a),JSON.stringify({identify:a,dirtyID:s})}}static link(t,r,n){if(r.type=="combo")return new e(t,r,n);let o=e.create(t,r.name,n),i=t.widgets.indexOf(r);return t.widgets[i]=t.widgets.pop(),o}linkDocumentWidget(t){this.documentWidgetByLinked&&t?.removeOnChange(this.update),this.documentWidgetByLinked=t,this.documentWidgetByLinked&&this.documentWidgetByLinked.onChange(this.update)}update(){let t=this.documentWidgetByLinked;this.updateOptions(t)}currentOptions=[];currentOptionsDetail=[];updateOptions(t){if(this.currentOptions=this.extraOptions.slice(0),this.currentOptionsDetail=new Array(this.currentOptions.length).fill({id:0,name:"",identify:"",level:0,fullPath:""}),t&&t.widget.value){let r=lc(t.widget.value);if(!r)return;r.documentData.layers.map(n=>{this.currentOptions.push(n.identify),this.currentOptionsDetail.push(n)})}if(this.widget.options.values=this.currentOptions,Object.values(this.currentOptions).indexOf(this.widget.value)==-1){let r=this.node.properties["layerWidgetDetail"+this.indexInNode];if(r){let n=this.currentOptionsDetail.findIndex(o=>o.fullPath==r.fullPath);if(n!=-1){this.widget.value=this.currentOptions[n];return}}}}static create(t,r,n){let o=t.size.slice(0),i=t.addWidget("combo",r,n.extraOptions[0]||"",()=>{},{forceInput:!0,values:n.extraOptions});return t.size=[o[0],Math.max(o[1],t.size[1])],new e(t,i,{extraOptions:n.extraOptions})}},C5={extraOptions:[],documentWidgetInNode:null},hf=class e extends mc{documentWidgetInNode;constructor(t,r,n=C5){super(t,r,n),this.documentWidgetInNode=n.documentWidgetInNode,this.onChange(()=>{(this.documentWidgetInNode||this.documentWidgetByLinked)?.selectConcreteDocument()}),r.serializeValue=async()=>{let o=this.documentWidgetInNode||this.documentWidgetByLinked;if(!o)return JSON.stringify({identify:r.value,dirtyID:0});let i=lc(o.widget.value);if(!i)return JSON.stringify({identify:r.value,dirtyID:0});let a=r.value;Xt.is_SPECIAL_LAYER_SELECTED_LAYER(a)&&(a=(await Bn.instance.getSpecialIdentifierValue(i.instance_id,{identifier:a})).value);let s=0;return Xt.is_SPECIAL_LAYER_NEW_LAYER(a)||Xt.is_SPECIAL_LAYER_USE_CANVAS(a)?s=ki.getCanvasDirtyID(i.documentData):s=ki.getLayerDirtyID(i.documentData,a),JSON.stringify({identify:a,dirtyID:s})},this.documentWidgetInNode?.onChange(this.update)}update(){let t=this.documentWidgetInNode||this.documentWidgetByLinked;t?.widget.value&&(this.widget.options.values=RR(t.widget.value,this.extraOptions),fO(this.widget,this.widget.options.values))}static create(t,r,n){let o=t.size.slice(0),i=t.addWidget("combo",r,n.extraOptions[0]||"",()=>{},{forceInput:!0,values:n.extraOptions});return t.size=[o[0],Math.max(o[1],t.size[1])],new e(t,i,{documentWidgetInNode:n.documentWidgetInNode,extraOptions:n.extraOptions})}},uO=0,gc=class extends nm{constructor(t,r){if(!r){let n=t.size.slice(0);r=t.addWidget("button","sdppp","",()=>{}),t.size=[n[0],Math.max(n[1],t.size[1])],r.serializeValue=async()=>{let o={lastOpenedWorkflow:rm(Xe.data.widgetTableStructure.widgetTablePath)},i=ix(t);if(i?.widgets[0]){let a=await i.widgets[0].serializeValue();try{o.document=JSON.parse(a),o.isLocal=zn.getStore(o.document.instance_id)?.data.isLocal||!1}catch{return""}}return JSON.stringify(o)}}super(t,r),this.onChange(()=>{zn.storeCount()==0&&Date.now()-uO>3e3&&(uO=Date.now(),location.href="/sd-ppp-static/sd-ppp_PS.ccx?_="+Date.now(),setTimeout(()=>{app.ui.dialog.show(`

${me("How to use .ccx file")}

${me("1. If you have installed Adobe Creative Cloud")}

${me("Just double click the .ccx file, it will install the plugin automatically")}

${me("2. If you don't have Adobe Creative Cloud")}

${me("Rename .ccx to .zip and extract it into ")}[${me("Photoshop directory")}]/Plug-ins ${me("or")} [${me("Photoshop directory")}]/Plug-ins/Generator

- `)},300))})}update(){this.widget.label=on.storeCount()>0&&Uo.instance.id?ge("current ComfyUI pageid: {0}",Uo.instance.id.slice(0,4)):ge("download PS plugin (.ccx)")}documentWidgetByLinked=null;linkDocumentWidget(t){this.documentWidgetByLinked=t}};function FO(e,t,r=!1){t instanceof Function&&(t=t()),e.value||(e.value=t[0]),t.indexOf(e.value)==-1&&r&&(e.value=t[0])}var ya=class e{static nodeMap=new WeakMap;static registerNodeType(t,r,o){o.prehandleNodeType&&o.prehandleNodeType(t.nodeData||r);let n=t.prototype.onAdded,i=t.prototype.onRemoved;t.prototype.onAdded=async function(...s){n&&await n.call(this,...s);let l=new o(this);e.nodeMap.set(this,l),await l.update()},t.prototype.onRemoved=async function(...s){i&&await i.call(this,...s);let l=e.nodeMap.get(this);e.nodeMap.delete(this),l?.onDestroy()},t.prototype.onDrawForeground=async function(s){let l=e.nodeMap.get(this);l?.onDrawForeground(s),await l?.update()},t.prototype.onConfigure=async function(...s){let l=e.nodeMap.get(this);l?.onConfigure(s[0]),await l?.update()};let a=t.prototype.onConnectionsChange;t.prototype.onConnectionsChange=async function(s,l,c,u){let d=e.nodeMap.get(this);return s==1&&(d?.inputConnectionChange(l,c&&u),await d?.update()),s==2&&d?.outputConnectionChange(l,c),a?.apply(this,arguments)}}node;constructor(t){this.node=t}inputConnectionChange(t,r){}outputConnectionChange(t,r){}onDrawForeground(t){}onDestroy(){}onConfigure(t){this.node.setProperty("sdppp-version",Rm)}};var Bi=class extends ya{downloadWidget;constructor(t){super(t),this.downloadWidget||(this.downloadWidget=new Ac(this.node))}onConfigure(t){super.onConfigure(t)}onDrawForeground(t){this.node.flags.collapsed||JR()||(t.save(),t.fillStyle="rgba(255, 0, 0, 0.2)",t.fillRect(0,0,this.node.size[0],this.node.size[1]),t.fillStyle="white",t.textAlign="center",t.fillText(ge("Photoshop Disconnected!"),this.node.size[0]/2,5),t.restore())}async update(){this.downloadWidget?.update()}};var $m=class{node;inputIndex;get index(){return this.inputIndex}constructor(t,r){this.node=t,this.inputIndex=r}update(){}connected=!1},Vd=class extends $m{get documentWidget(){return zO(this.node,this.node.inputs[this.inputIndex])?.documentWidget||null}},Hd=class extends $m{get documentWidget(){return zO(this.node,this.node.inputs[this.inputIndex])?.documentWidget||null}};function zO(e,t){if(!e.graph.links[t.link])return null;let r=e.graph.links[t.link].origin_id,o=e.graph.getNodeById(r);for(;o.type=="Reroute";)r=e.graph.links[o.inputs[0].link].origin_id,o=e.graph.getNodeById(r);return ya.nodeMap.get(o)}var Wn=class extends Bi{get documentWidget(){let t=this.inputs.find(r=>r.connected&&(r instanceof Vd||r instanceof Hd));return t?t.documentWidget:this.sdpppWidgets.find(r=>r instanceof ss)}inputs=[];sdpppWidgets=[];constructor(t){super(t);let r=null;for(let o=0;o{if(!t.label)try{t.label=ge(t.name)}catch{t.label=t.name}}),this.sdpppWidgets?.forEach(t=>{t.update()}),this.inputs?.forEach(t=>{t.update()}),super.update()}inputConnectionChange(t,r){super.inputConnectionChange(t,r),this.inputs.forEach(o=>{if(o.index==t){o.connected=r;let n=this.documentWidget;this.downloadWidget&&this.downloadWidget.linkDocumentWidget(n),this.sdpppWidgets.forEach(i=>{(i instanceof Dc||i instanceof Ac)&&i.linkDocumentWidget(n)})}})}};var Dm=class extends Wn{get documentWidget(){return this.inputs[0]?.documentWidget}async update(){super.update(),this.node.inputs.forEach(t=>t.label=ge(t.name)),this.node.outputs.forEach(t=>t.label=ge(t.name))}},Mc=class extends Wn{async update(){super.update(),this.node.inputs.forEach(t=>t.label=ge(t.name)),this.node.outputs.forEach(t=>t.label=ge(t.name))}},Am=class extends Wn{async update(){super.update(),this.node.inputs.forEach(t=>t.label=ge(t.name)),this.node.outputs.forEach(t=>t.label=ge(t.name))}},Mm=class extends Wn{get documentWidget(){return this.inputs[0]?.documentWidget}async update(){super.update(),this.node.inputs.forEach(t=>t.label=ge(t.name)),this.node.outputs.forEach(t=>t.label=ge(t.name)),this.node.widgets[0].label=ge(this.node.widgets[0].name)}},Lm=class extends Wn{get documentWidget(){return this.inputs[0]?.documentWidget}async update(){super.update(),this.node.inputs.forEach(t=>t.label=ge(t.name)),this.node.outputs.forEach(t=>t.label=ge(t.name)),this.node.widgets[0].label=ge(this.node.widgets[0].name)}},km=class extends Bi{async update(){super.update(),this.node.inputs[0].label=ge(this.node.inputs[0].name),this.node.inputs[1].label=ge(this.node.inputs[1].name),this.node.outputs[0]&&(this.node.outputs[0].label=ge(this.node.outputs[0].name))}},Fm=class extends Bi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}constructor(t){super(t)}async update(){super.update(),this.node.inputs[0].label=ge(this.node.inputs[0].name),this.node.outputs[0]&&(this.node.outputs[0].label=ge(this.node.outputs[0].name))}},zm=class extends Wn{get documentWidget(){return this.sdpppWidgets[0]}psdWidget;extractPSD(t,r){this.node.properties.psd&&Uo.instance.exportPSDDataURLToPhotoshop(t,r,this.node.properties.psd,Xe.data.ssid).then(async()=>{await new Promise(o=>setTimeout(o,300)),globalThis.app.canvas.draw(!0,!0)}).catch(console.error)}constructor(t){super(t),this.psdWidget=t.addWidget("button","","",()=>{if(!this.documentWidget.widget.value)return;let r=on.getAllPhotoshopDocumentData(),[o,n]=this.documentWidget.widget.value.split("/");this.node.properties.psd?this.extractPSD(r[o].sid,n):Uo.instance.importPSDDataURLFromPhotoshop(r[o].sid,n,Xe.data.ssid).then(i=>{this.node.setProperty("psd",i)})},{})}async update(){super.update(),this.node.outputs.forEach(t=>t.label=ge(t.name)),this.node.properties.psd?(Xe.setHasPSDNodes(!0),this.psdWidget.label=ge("extract saved .psd to Photoshop")):(Xe.setHasPSDNodes(!1),this.psdWidget.label=ge("save .psd to this workflow"))}},Wm=class extends Wn{async update(){super.update(),this.node.inputs.forEach(t=>t.label=ge(t.name)),this.node.outputs.forEach(t=>t.label=ge(t.name))}};var Bm=class extends Bi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}documentWidget;layerWidget;constructor(t){let r=ss.create(t,"document"),o=jd.create(t,"layer_or_group",{documentWidgetInNode:r,extraOptions:Xt.getSpecialLayerForGet()});super(t),this.documentWidget=r,this.layerWidget=o,this.node.widgets[0].name=="quality"?(this.node.widgets[1]=r.widget,this.node.widgets[2]=o.widget):(this.node.widgets[0]=r.widget,this.node.widgets[1]=o.widget)}onConfigure(t){if(t.properties["sdppp-version"])if(+t.properties["sdppp-version"]<=410){if(this.node.widgets[0].value===!0||this.node.widgets[0].value==="true"){let r=comfyAPI.app.app.addNodeOnGraph(Vm["SDPPP Get Selection"],{pos:this.node.pos});new Mc(r),this.node.outputs[0].links?.length?comfyAPI.app.app.addNodeOnGraph(Vm.JoinImageWithAlpha,{pos:[this.node.pos[0]+r.size[0]+10,this.node.pos[1]-20]}):r.size=this.node.size,comfyAPI.app.app.graph.remove(this.node)}this.node.widgets[0].value=t.widgets_values[1],this.node.widgets[1].value=t.widgets_values[2]}else+t.properties["sdppp-version"]<504&&this.node.widgets[0].name=="quality"&&(this.node.widgets[0].value=100,this.node.widgets[1].value=t.widgets_values[0],this.node.widgets[2].value=t.widgets_values[1]);super.onConfigure(t)}async update(){this.documentWidget.lockMode(this.layerLinked,ge("document linked")),this.layerWidget.lockMode(this.layerLinked,ge("layer linked")),this.documentWidget.update(),this.layerWidget.update(),super.update(),this.node.widgets.forEach(t=>{if(!t.label)try{t.label=ge(t.name)}catch{}}),this.node.inputs.forEach(t=>{if(!t.label)try{t.label=ge(t.name)}catch{}}),this.node.outputs.forEach(t=>{if(!t.label)try{t.label=ge(t.name)}catch{}})}layerLinked=!1;inputConnectionChange(t,r){super.inputConnectionChange(t,r),t==0&&(this.layerLinked=r)}},jm=class extends Bi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}documentWidget;layerWidget;constructor(t){let r=ss.create(t,"document"),o=jd.create(t,"layer_or_group",{documentWidgetInNode:r,extraOptions:Xt.getSpecialLayerForSend()});super(t),this.documentWidget=r,this.layerWidget=o}async update(){this.documentWidget?.lockMode(this.layerLinked,ge("document linked")),this.layerWidget?.lockMode(this.layerLinked,ge("layer linked")),this.documentWidget.update(),this.layerWidget.update(),super.update(),this.node.widgets[0].label||(this.node.widgets[0].label=ge(this.node.widgets[0].name)),this.node.widgets[1].label||(this.node.widgets[1].label=ge(this.node.widgets[1].name)),this.node.inputs[0].label=ge(this.node.inputs[0].name),this.node.inputs[1].label=ge(this.node.inputs[1].name),this.node.inputs[2].label=ge(this.node.inputs[2].name),this.node.outputs[0].label=ge(this.node.outputs[0].name)}layerLinked=!1;inputConnectionChange(t,r){super.inputConnectionChange(t,r),t==1&&(this.layerLinked=r)}};var Qx={"Get Image From Photoshop Layer":Bm,"Send Images To Photoshop":jm,"SDPPP Send Text To Layer":km,"SDPPP Get Text From Layer":Fm,"SDPPP Parse Layer Info":Am,"SDPPP Get Linked Layers":Lm,"SDPPP Get Layers In Group":Mm,"SDPPP Get Layer By ID":Dm,"SDPPP Get Document":zm,"SDPPP Get Selection":Mc,"SDPPP Run Photoshop Action":Wm},Vm={};function WO(e,t){let r=e.comfyClass||t.name;if(Vm[r]=t,r in Qx)e.title=ge(t.display_name),t.display_name=ge(t.display_name),ya.registerNodeType(e,t,Qx[r]);else if(r.startsWith("workflow")&&comfyAPI.groupNode.GroupNodeHandler.getGroupData(e)){let o=comfyAPI.groupNode.GroupNodeHandler.getGroupData(e),n=!1;o.nodeData.nodes.forEach((i,a)=>{i.type in Qx&&(n=!0)}),n&&ya.registerNodeType(e,t,Wn)}else return}var zR=E(xN(),1),WR=E(I(),1);var bN=`#sdppp-popup-root { + `)},300))})}update(){this.widget.label=zn.storeCount()>0&&Bn.instance.id?me("current ComfyUI pageid: {0}",Bn.instance.id.slice(0,4)):me("download PS plugin (.ccx)")}documentWidgetByLinked=null;linkDocumentWidget(t){this.documentWidgetByLinked=t}};function fO(e,t,r=!1){t instanceof Function&&(t=t()),e.value||(e.value=t[0]),t.indexOf(e.value)==-1&&r&&(e.value=t[0])}var ca=class e{static nodeMap=new WeakMap;static registerNodeType(t,r,n){n.prehandleNodeType&&n.prehandleNodeType(t.nodeData||r);let o=t.prototype.onAdded,i=t.prototype.onRemoved;t.prototype.onAdded=async function(...s){o&&await o.call(this,...s);let l=new n(this);e.nodeMap.set(this,l),await l.update()},t.prototype.onRemoved=async function(...s){i&&await i.call(this,...s);let l=e.nodeMap.get(this);e.nodeMap.delete(this),l?.onDestroy()},t.prototype.onDrawForeground=async function(s){let l=e.nodeMap.get(this);l?.onDrawForeground(s),await l?.update()},t.prototype.onConfigure=async function(...s){let l=e.nodeMap.get(this);l?.onConfigure(s[0]),await l?.update()};let a=t.prototype.onConnectionsChange;t.prototype.onConnectionsChange=async function(s,l,c,u){let f=e.nodeMap.get(this);return s==1&&(f?.inputConnectionChange(l,c&&u),await f?.update()),s==2&&f?.outputConnectionChange(l,c),a?.apply(this,arguments)}}node;constructor(t){this.node=t}inputConnectionChange(t,r){}outputConnectionChange(t,r){}onDrawForeground(t){}onDestroy(){}onConfigure(t){this.node.setProperty("sdppp-version",Qp)}};var Mi=class extends ca{downloadWidget;constructor(t){super(t),this.downloadWidget||(this.downloadWidget=new gc(this.node))}onConfigure(t){super.onConfigure(t)}onDrawForeground(t){this.node.flags.collapsed||OR()||(t.save(),t.fillStyle="rgba(255, 0, 0, 0.2)",t.fillRect(0,0,this.node.size[0],this.node.size[1]),t.fillStyle="white",t.textAlign="center",t.fillText(me("Photoshop Disconnected!"),this.node.size[0]/2,5),t.restore())}async update(){this.downloadWidget?.update()}};var im=class{node;inputIndex;get index(){return this.inputIndex}constructor(t,r){this.node=t,this.inputIndex=r}update(){}connected=!1},vf=class extends im{get documentWidget(){return dO(this.node,this.node.inputs[this.inputIndex])?.documentWidget||null}},yf=class extends im{get documentWidget(){return dO(this.node,this.node.inputs[this.inputIndex])?.documentWidget||null}};function dO(e,t){if(!e.graph.links[t.link])return null;let r=e.graph.links[t.link].origin_id,n=e.graph.getNodeById(r);for(;n.type=="Reroute";)r=e.graph.links[n.inputs[0].link].origin_id,n=e.graph.getNodeById(r);return ca.nodeMap.get(n)}var Ao=class extends Mi{get documentWidget(){let t=this.inputs.find(r=>r.connected&&(r instanceof vf||r instanceof yf));return t?t.documentWidget:this.sdpppWidgets.find(r=>r instanceof Ya)}inputs=[];sdpppWidgets=[];constructor(t){super(t);let r=null;for(let n=0;n{if(!t.label)try{t.label=me(t.name)}catch{t.label=t.name}}),this.sdpppWidgets?.forEach(t=>{t.update()}),this.inputs?.forEach(t=>{t.update()}),super.update()}inputConnectionChange(t,r){super.inputConnectionChange(t,r),this.inputs.forEach(n=>{if(n.index==t){n.connected=r;let o=this.documentWidget;this.downloadWidget&&this.downloadWidget.linkDocumentWidget(o),this.sdpppWidgets.forEach(i=>{(i instanceof mc||i instanceof gc)&&i.linkDocumentWidget(o)})}})}};var am=class extends Ao{get documentWidget(){return this.inputs[0]?.documentWidget}async update(){super.update(),this.node.inputs.forEach(t=>t.label=me(t.name)),this.node.outputs.forEach(t=>t.label=me(t.name))}},hc=class extends Ao{async update(){super.update(),this.node.inputs.forEach(t=>t.label=me(t.name)),this.node.outputs.forEach(t=>t.label=me(t.name))}},sm=class extends Ao{async update(){super.update(),this.node.inputs.forEach(t=>t.label=me(t.name)),this.node.outputs.forEach(t=>t.label=me(t.name))}},lm=class extends Ao{get documentWidget(){return this.inputs[0]?.documentWidget}async update(){super.update(),this.node.inputs.forEach(t=>t.label=me(t.name)),this.node.outputs.forEach(t=>t.label=me(t.name)),this.node.widgets[0].label=me(this.node.widgets[0].name)}},cm=class extends Ao{get documentWidget(){return this.inputs[0]?.documentWidget}async update(){super.update(),this.node.inputs.forEach(t=>t.label=me(t.name)),this.node.outputs.forEach(t=>t.label=me(t.name)),this.node.widgets[0].label=me(this.node.widgets[0].name)}},um=class extends Mi{async update(){super.update(),this.node.inputs[0].label=me(this.node.inputs[0].name),this.node.inputs[1].label=me(this.node.inputs[1].name),this.node.outputs[0]&&(this.node.outputs[0].label=me(this.node.outputs[0].name))}},fm=class extends Mi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}async update(){super.update(),this.node.inputs[0].label=me(this.node.inputs[0].name),this.node.outputs[0]&&(this.node.outputs[0].label=me(this.node.outputs[0].name))}},dm=class extends Ao{get documentWidget(){return this.sdpppWidgets[0]}psdWidget;extractPSD(t,r){this.node.properties.psd&&Bn.instance.exportPSDDataURLToPhotoshop(t,r,this.node.properties.psd,Xe.data.ssid).then(async()=>{await new Promise(n=>setTimeout(n,300)),globalThis.app.canvas.draw(!0,!0)}).catch(console.error)}constructor(t){super(t),this.psdWidget=t.addWidget("button","","",()=>{if(!this.documentWidget.widget.value)return;let r=zn.getAllPhotoshopDocumentData(),[n,o]=this.documentWidget.widget.value.split("/");this.node.properties.psd?this.extractPSD(r[n].sid,o):Bn.instance.importPSDDataURLFromPhotoshop(r[n].sid,o,Xe.data.ssid).then(i=>{this.node.setProperty("psd",i)})},{})}async update(){super.update(),this.node.outputs.forEach(t=>t.label=me(t.name)),this.node.properties.psd?(Xe.setHasPSDNodes(!0),this.psdWidget.label=me("extract saved .psd to Photoshop")):(Xe.setHasPSDNodes(!1),this.psdWidget.label=me("save .psd to this workflow"))}},pm=class extends Ao{async update(){super.update(),this.node.inputs.forEach(r=>r.label=me(r.name)),this.node.outputs.forEach(r=>r.label=me(r.name));let t=[];if(this.documentWidget){let r=this.documentWidget.getPSStore();r&&(t=r.actions)}this.node.widgets[0].options.values=t,this.node.constructor.nodeData.input.required.action[0]=t}};var mm=class extends Mi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}documentWidget;layerWidget;constructor(t){let r=Ya.create(t,"document"),n=hf.create(t,"layer_or_group",{documentWidgetInNode:r,extraOptions:Xt.getSpecialLayerForGet()});super(t),this.documentWidget=r,this.layerWidget=n,this.node.widgets[0].name=="quality"?(this.node.widgets[1]=r.widget,this.node.widgets[2]=n.widget):(this.node.widgets[0]=r.widget,this.node.widgets[1]=n.widget)}onConfigure(t){if(t.properties["sdppp-version"])if(+t.properties["sdppp-version"]<=410){if(this.node.widgets[0].value===!0||this.node.widgets[0].value==="true"){let r=comfyAPI.app.app.addNodeOnGraph(hm["SDPPP Get Selection"],{pos:this.node.pos});new hc(r),this.node.outputs[0].links?.length?comfyAPI.app.app.addNodeOnGraph(hm.JoinImageWithAlpha,{pos:[this.node.pos[0]+r.size[0]+10,this.node.pos[1]-20]}):r.size=this.node.size,comfyAPI.app.app.graph.remove(this.node)}this.node.widgets[0].value=t.widgets_values[1],this.node.widgets[1].value=t.widgets_values[2]}else+t.properties["sdppp-version"]<504&&this.node.widgets[0].name=="quality"&&(this.node.widgets[0].value=100,this.node.widgets[1].value=t.widgets_values[0],this.node.widgets[2].value=t.widgets_values[1]);super.onConfigure(t)}async update(){this.documentWidget.lockMode(this.layerLinked,me("document linked")),this.layerWidget.lockMode(this.layerLinked,me("layer linked")),this.documentWidget.update(),this.layerWidget.update(),super.update(),this.node.widgets.forEach(t=>{if(!t.label)try{t.label=me(t.name)}catch{}}),this.node.inputs.forEach(t=>{if(!t.label)try{t.label=me(t.name)}catch{}}),this.node.outputs.forEach(t=>{if(!t.label)try{t.label=me(t.name)}catch{}})}layerLinked=!1;inputConnectionChange(t,r){super.inputConnectionChange(t,r),t==0&&(this.layerLinked=r)}},gm=class extends Mi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}documentWidget;layerWidget;constructor(t){let r=Ya.create(t,"document"),n=hf.create(t,"layer_or_group",{documentWidgetInNode:r,extraOptions:Xt.getSpecialLayerForSend()});super(t),this.documentWidget=r,this.layerWidget=n}async update(){this.documentWidget?.lockMode(this.layerLinked,me("document linked")),this.layerWidget?.lockMode(this.layerLinked,me("layer linked")),this.documentWidget.update(),this.layerWidget.update(),super.update(),this.node.widgets[0].label||(this.node.widgets[0].label=me(this.node.widgets[0].name)),this.node.widgets[1].label||(this.node.widgets[1].label=me(this.node.widgets[1].name)),this.node.inputs[0].label=me(this.node.inputs[0].name),this.node.inputs[1].label=me(this.node.inputs[1].name),this.node.inputs[2].label=me(this.node.inputs[2].name),this.node.outputs[0].label=me(this.node.outputs[0].name)}layerLinked=!1;inputConnectionChange(t,r){super.inputConnectionChange(t,r),t==1&&(this.layerLinked=r)}};var wx={"Get Image From Photoshop Layer":mm,"Send Images To Photoshop":gm,"SDPPP Send Text To Layer":um,"SDPPP Get Text From Layer":fm,"SDPPP Parse Layer Info":sm,"SDPPP Get Linked Layers":cm,"SDPPP Get Layers In Group":lm,"SDPPP Get Layer By ID":am,"SDPPP Get Document":dm,"SDPPP Get Selection":hc,"SDPPP Select Layer And Run PS Action":pm},hm={};function pO(e,t){let r=e.comfyClass||t.name;if(hm[r]=t,r in wx)e.title=me(t.display_name),t.display_name=me(t.display_name),ca.registerNodeType(e,t,wx[r]);else if(r.startsWith("workflow")&&comfyAPI.groupNode.GroupNodeHandler.getGroupData(e)){let n=comfyAPI.groupNode.GroupNodeHandler.getGroupData(e),o=!1;n.nodeData.nodes.forEach((i,a)=>{i.type in wx&&(o=!0)}),o&&ca.registerNodeType(e,t,Ao)}else return}var dR=E(qT(),1),pR=E($(),1);var GT=`#sdppp-popup-root { width: 100%; height: 100%; position: absolute; @@ -173,11 +173,19 @@ Error generating stack: `+i.message+` gap: 10px; } .workflow-edit-field { + color: var(--fg-color); display: flex; - flex-direction: column; + flex-direction: row; + flex-wrap: wrap; + gap: 5px; width: 100%; } +.workflow-edit-field > * { + max-width: 100%; + box-sizing: border-box; +} + @media (min-width: 639px) { .workflow-edit-content { flex-wrap: wrap; @@ -199,14 +207,6 @@ Error generating stack: `+i.message+` display: inline-flex; } -.workflow-edit-field { - color: var(--fg-color); - display: flex; - flex-direction: row; - flex-wrap: wrap; - gap: 5px; -} - .sdppp-side-icon { width: 64px; height: 64px; @@ -265,18 +265,18 @@ Error generating stack: `+i.message+` .sdppp-side-container .group-filter-item:not(:first-child) { margin-left: 8px; } -/* end of GroupFilter component styles */`;var _d=E(I(),1);var M4=E(I(),1);function ee(){return ee=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=[];return SN.default.Children.forEach(e,function(o){o==null&&!t.keepEmpty||(Array.isArray(o)?r=r.concat(Ci(o)):Ff(o)&&o.props?r=r.concat(Ci(o.props.children,t)):r.push(o))}),r}var vC={},dB=[],fB=function(t){dB.push(t)};function Al(e,t){if(0)var r}function pB(e,t){if(0)var r}function CN(){vC={}}function wN(e,t,r){!t&&!vC[r]&&(e(!1,r),vC[r]=!0)}function ph(e,t){wN(Al,e,t)}function EN(e,t){wN(pB,e,t)}ph.preMessage=fB;ph.resetWarned=CN;ph.noteOnce=EN;var Vt=ph;function RN(e,t){if(pe(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(pe(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function mh(e){var t=RN(e,"string");return pe(t)=="symbol"?t:t+""}function T(e,t,r){return(t=mh(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ON(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function P(e){for(var t=1;t=19)return!0;var n=(0,zf.isMemo)(t)?t.type.type:t.type;return!(typeof n=="function"&&!((r=n.prototype)!==null&&r!==void 0&&r.render)&&n.$$typeof!==zf.ForwardRef||typeof t=="function"&&!((o=t.prototype)!==null&&o!==void 0&&o.render)&&t.$$typeof!==zf.ForwardRef)};function DN(e){return(0,Rh.isValidElement)(e)&&!Ff(e)}var Ts=function(t){if(t&&DN(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null};var zr=E(I());var Ei=E(I()),Oh=Ei.createContext(null);function AN(e){var t=e.children,r=e.onBatchResize,o=Ei.useRef(0),n=Ei.useRef([]),i=Ei.useContext(Oh),a=Ei.useCallback(function(s,l,c){o.current+=1;var u=o.current;n.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===o.current&&(r?.(n.current),n.current=[])}),i?.(s,l,c)},[r,i]);return Ei.createElement(Oh.Provider,{value:a},t)}var LN=function(){if(typeof Map<"u")return Map;function e(t,r){var o=-1;return t.some(function(n,i){return n[0]===r?(o=i,!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(r){var o=e(this.__entries__,r),n=this.__entries__[o];return n&&n[1]},t.prototype.set=function(r,o){var n=e(this.__entries__,r);~n?this.__entries__[n][1]=o:this.__entries__.push([r,o])},t.prototype.delete=function(r){var o=this.__entries__,n=e(o,r);~n&&o.splice(n,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,o){o===void 0&&(o=null);for(var n=0,i=this.__entries__;n0},e.prototype.connect_=function(){!SC||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),wB?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!SC||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,o=r===void 0?"":r,n=CB.some(function(i){return!!~o.indexOf(i)});n&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),kN=function(e,t){for(var r=0,o=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof fu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new $B(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.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 fu(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(o){return new DB(o.target,o.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),zN=typeof WeakMap<"u"?new WeakMap:new LN,WN=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=EB.getInstance(),o=new AB(t,r,this);zN.set(this,o)}return e}();["observe","unobserve","disconnect"].forEach(function(e){WN.prototype[e]=function(){var t;return(t=zN.get(this))[e].apply(t,arguments)}});var MB=function(){return typeof _h.ResizeObserver<"u"?_h.ResizeObserver:WN}(),BN=MB;var Ns=new Map;function LB(e){e.forEach(function(t){var r,o=t.target;(r=Ns.get(o))===null||r===void 0||r.forEach(function(n){return n(o)})})}var jN=new BN(LB);function VN(e,t){Ns.has(e)||(Ns.set(e,new Set),jN.observe(e)),Ns.get(e).add(t)}function HN(e,t){Ns.has(e)&&(Ns.get(e).delete(t),Ns.get(e).size||(jN.unobserve(e),Ns.delete(e)))}function lt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function UN(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,o=Array(t);r1&&arguments[1]!==void 0?arguments[1]:1;JN+=1;var o=JN;function n(i){if(i===0)rI(o),t();else{var a=eI(function(){n(i-1)});CC.set(o,a)}}return n(r),o};oI.cancel=function(e){var t=CC.get(e);return rI(e),tI(t)};var ut=oI;var ar=E(I());function $h(e){if(Array.isArray(e))return e}function nI(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var o,n,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(o=i.call(r)).done)&&(s.push(o.value),s.length!==t);l=!0);}catch(u){c=!0,n=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return s}}function Dh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(e,t){return $h(e)||nI(e,t)||pu(e,t)||Dh()}function BB(e){for(var t=0,r,o=0,n=e.length;n>=4;++o,n-=4)r=e.charCodeAt(o)&255|(e.charCodeAt(++o)&255)<<8|(e.charCodeAt(++o)&255)<<16|(e.charCodeAt(++o)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(n){case 3:t^=(e.charCodeAt(o+2)&255)<<16;case 2:t^=(e.charCodeAt(o+1)&255)<<8;case 1:t^=e.charCodeAt(o)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var $s=BB;function Yt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function mu(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var iI="data-rc-order",aI="data-rc-priority",jB="rc-util-key",wC=new Map;function sI(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):jB}function Ah(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function VB(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function EC(e){return Array.from((wC.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function lI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Yt())return null;var r=t.csp,o=t.prepend,n=t.priority,i=n===void 0?0:n,a=VB(o),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(iI,a),s&&i&&l.setAttribute(aI,"".concat(i)),r!=null&&r.nonce&&(l.nonce=r?.nonce),l.innerHTML=e;var c=Ah(t),u=c.firstChild;if(o){if(s){var d=(t.styles||EC(c)).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(iI)))return!1;var m=Number(f.getAttribute(aI)||0);return i>=m});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function cI(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=Ah(t);return(t.styles||EC(r)).find(function(o){return o.getAttribute(sI(t))===e})}function Xi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=cI(e,t);if(r){var o=Ah(t);o.removeChild(r)}}function HB(e,t){var r=wC.get(e);if(!r||!mu(document,r)){var o=lI("",t),n=o.parentNode;wC.set(e,n),e.removeChild(o)}}function bo(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=Ah(r),n=EC(o),i=P(P({},r),{},{styles:n});HB(o,i);var a=cI(t,i);if(a){var s,l;if((s=i.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=i.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=i.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==e&&(a.innerHTML=e),a}var u=lI(e,i);return u.setAttribute(sI(i),t),u}var CI=E(I());function uI(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function Ae(e,t){if(e==null)return{};var r,o,n=uI(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o2&&arguments[2]!==void 0?arguments[2]:!1,o=new Set;function n(i,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=o.has(i);if(Vt(!l,"Warning: There may be circular references"),l)return!1;if(i===a)return!0;if(r&&s>1)return!1;o.add(i);var c=s+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return r.forEach(function(s){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(s)}}),(o=a)!==null&&o!==void 0&&o.value&&i&&(a.value[1]=this.cacheCallTimes++),(n=a)===null||n===void 0?void 0:n.value}},{key:"get",value:function(r){var o;return(o=this.internalGet(r,!0))===null||o===void 0?void 0:o[0]}},{key:"has",value:function(r){return!!this.internalGet(r)}},{key:"set",value:function(r,o){var n=this;if(!this.has(r)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(c,u){var d=B(c,2),f=d[1];return n.internalGet(u)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),pI+=1}return ct(e,[{key:"getDerivativeToken",value:function(r){return this.derivatives.reduce(function(o,n){return n(r,o)},void 0)}}]),e}();var RC=new Vf;function Ds(e){var t=Array.isArray(e)?e:[e];return RC.has(t)||RC.set(t,new gu(t)),RC.get(t)}var JB=new WeakMap,OC={};function gI(e,t){for(var r=JB,o=0;o3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return e;var a=P(P({},n),{},(o={},T(o,Qi,t),T(o,$o,r),o)),s=Object.keys(a).map(function(l){var c=a[l];return c?"".concat(l,'="').concat(c,'"'):null}).filter(function(l){return l}).join(" ");return"")}var vu=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(r?"".concat(r,"-"):"").concat(t).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},ej=function(t,r,o){return Object.keys(t).length?".".concat(r).concat(o!=null&&o.scope?".".concat(o.scope):"","{").concat(Object.entries(t).map(function(n){var i=B(n,2),a=i[0],s=i[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},kh=function(t,r,o){var n={},i={};return Object.entries(t).forEach(function(a){var s,l,c=B(a,2),u=c[0],d=c[1];if(o!=null&&(s=o.preserve)!==null&&s!==void 0&&s[u])i[u]=d;else if((typeof d=="string"||typeof d=="number")&&!(o!=null&&(l=o.ignore)!==null&&l!==void 0&&l[u])){var f,m=vu(u,o?.prefix);n[m]=typeof d=="number"&&!(o!=null&&(f=o.unitless)!==null&&f!==void 0&&f[u])?"".concat(d,"px"):String(d),i[u]="var(".concat(m,")")}}),[i,ej(n,r,{scope:o?.scope})]};var Fh=E(I());var yu=E(I());var hI=Yt()?yu.useLayoutEffect:yu.useEffect,vI=function(t,r){var o=yu.useRef(!0);hI(function(){return t(o.current)},r),hI(function(){return o.current=!1,function(){o.current=!0}},[])},Fl=function(t,r){vI(function(o){if(!o)return t()},r)},yt=vI;var PC=E(I()),tj=P({},PC),yI=tj.useInsertionEffect,rj=function(t,r,o){PC.useMemo(t,o),yt(function(){return r(!0)},o)},oj=yI?function(e,t,r){return yI(function(){return e(),t()},r)}:rj,xI=oj;var TC=E(I()),nj=P({},TC),ij=nj.useInsertionEffect,aj=function(t){var r=[],o=!1;function n(i){o||r.push(i)}return TC.useEffect(function(){return o=!1,function(){o=!0,r.length&&r.forEach(function(i){return i()})}},t),n},sj=function(){return function(t){t()}},lj=typeof ij<"u"?aj:sj,bI=lj;function cj(){return!1}var SI=cj;function zl(e,t,r,o,n){var i=Fh.useContext(Oi),a=i.cache,s=[e].concat(se(t)),l=Mh(s),c=bI([l]),u=SI(),d=function(v){a.opUpdate(l,function(y){var g=y||[void 0,void 0],p=B(g,2),x=p[0],S=x===void 0?0:x,b=p[1],w=b,C=w||r(),R=[S,C];return v?v(R):R})};Fh.useMemo(function(){d()},[l]);var f=a.opGet(l),m=f[1];return xI(function(){n?.(m)},function(h){return d(function(v){var y=B(v,2),g=y[0],p=y[1];return h&&g===0&&n?.(m),[g+1,p]}),function(){a.opUpdate(l,function(v){var y=v||[],g=B(y,2),p=g[0],x=p===void 0?0:p,S=g[1],b=x-1;return b===0?(c(function(){(h||!a.opGet(l))&&o?.(S,!1)}),null):[x-1,S]})}},[l]),m}var uj={},dj="css",Wl=new Map;function fj(e){Wl.set(e,(Wl.get(e)||0)+1)}function pj(e,t){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat(Qi,'="').concat(e,'"]'));r.forEach(function(o){if(o[Ri]===t){var n;(n=o.parentNode)===null||n===void 0||n.removeChild(o)}})}}var mj=0;function gj(e,t){Wl.set(e,(Wl.get(e)||0)-1);var r=Array.from(Wl.keys()),o=r.filter(function(n){var i=Wl.get(n)||0;return i<=0});r.length-o.length>mj&&o.forEach(function(n){pj(n,t),Wl.delete(n)})}var wI=function(t,r,o,n){var i=o.getDerivativeToken(t),a=P(P({},i),r);return n&&(a=n(a)),a},NC="token";function zh(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=(0,CI.useContext)(Oi),n=o.cache.instanceId,i=o.container,a=r.salt,s=a===void 0?"":a,l=r.override,c=l===void 0?uj:l,u=r.formatToken,d=r.getComputedToken,f=r.cssVar,m=gI(function(){return Object.assign.apply(Object,[{}].concat(se(t)))},t),h=hu(m),v=hu(c),y=f?hu(f):"",g=zl(NC,[s,e.id,h,v,y],function(){var p,x=d?d(m,c,e):wI(m,c,e,u),S=P({},x),b="";if(f){var w=kh(x,f.key,{prefix:f.prefix,ignore:f.ignore,unitless:f.unitless,preserve:f.preserve}),C=B(w,2);x=C[0],b=C[1]}var R=_C(x,s);x._tokenKey=R,S._tokenKey=_C(S,s);var _=(p=f?.key)!==null&&p!==void 0?p:R;x._themeKey=_,fj(_);var O="".concat(dj,"-").concat($s(R));return x._hashId=O,[x,O,S,b,f?.key||""]},function(p){gj(p[0]._themeKey,n)},function(p){var x=B(p,4),S=x[0],b=x[3];if(f&&b){var w=bo(b,$s("css-variables-".concat(S._themeKey)),{mark:$o,prepend:"queue",attachTo:i,priority:-999});w[Ri]=n,w.setAttribute(Qi,S._themeKey)}});return g}var EI=function(t,r,o){var n=B(t,5),i=n[2],a=n[3],s=n[4],l=o||{},c=l.plain;if(!a)return null;var u=i._tokenKey,d=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(d)},m=As(a,s,u,f,c);return[d,u,m]};var YI=E(I());var ks=E(I());var hj={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},IC=hj;var Wh="comm",Bh="rule",jh="decl";var RI="@import";var OI="@namespace",_I="@keyframes";var PI="@layer";var $C=Math.abs,Uf=String.fromCharCode;function Vh(e){return e.trim()}function Gf(e,t,r){return e.replace(t,r)}function TI(e,t,r){return e.indexOf(t,r)}function Ms(e,t){return e.charCodeAt(t)|0}function Ls(e,t,r){return e.slice(t,r)}function Pn(e){return e.length}function NI(e){return e.length}function xu(e,t){return t.push(e),e}var Hh=1,bu=1,II=0,Xn=0,Hr=0,Cu="";function Uh(e,t,r,o,n,i,a,s){return{value:e,root:t,parent:r,type:o,props:n,children:i,line:Hh,column:bu,length:a,return:"",siblings:s}}function $I(){return Hr}function DI(){return Hr=Xn>0?Ms(Cu,--Xn):0,bu--,Hr===10&&(bu=1,Hh--),Hr}function Yn(){return Hr=Xn2||Su(Hr)>3?"":" "}function kI(e,t){for(;--t&&Yn()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return Gh(e,qf()+(t<6&&Ta()==32&&Yn()==32))}function DC(e){for(;Yn();)switch(Hr){case e:return Xn;case 34:case 39:e!==34&&e!==39&&DC(Hr);break;case 40:e===41&&DC(e);break;case 92:Yn();break}return Xn}function FI(e,t){for(;Yn()&&e+Hr!==57;)if(e+Hr===84&&Ta()===47)break;return"/*"+Gh(t,Xn-1)+"*"+Uf(e===47?e:Yn())}function zI(e){for(;!Su(Ta());)Yn();return Gh(e,Xn)}function jI(e){return MI(Kh("",null,null,null,[""],e=AI(e),0,[0],e))}function Kh(e,t,r,o,n,i,a,s,l){for(var c=0,u=0,d=a,f=0,m=0,h=0,v=1,y=1,g=1,p=0,x="",S=n,b=i,w=o,C=x;y;)switch(h=p,p=Yn()){case 40:if(h!=108&&Ms(C,d-1)==58){TI(C+=Gf(qh(p),"&","&\f"),"&\f",$C(c?s[c-1]:0))!=-1&&(g=-1);break}case 34:case 39:case 91:C+=qh(p);break;case 9:case 10:case 13:case 32:C+=LI(h);break;case 92:C+=kI(qf()-1,7);continue;case 47:switch(Ta()){case 42:case 47:xu(vj(FI(Yn(),qf()),t,r,l),l),(Su(h||1)==5||Su(Ta()||1)==5)&&Pn(C)&&Ls(C,-1,void 0)!==" "&&(C+=" ");break;default:C+="/"}break;case 123*v:s[c++]=Pn(C)*g;case 125*v:case 59:case 0:switch(p){case 0:case 125:y=0;case 59+u:g==-1&&(C=Gf(C,/\f/g,"")),m>0&&(Pn(C)-d||v===0&&h===47)&&xu(m>32?BI(C+";",o,r,d-1,l):BI(Gf(C," ","")+";",o,r,d-2,l),l);break;case 59:C+=";";default:if(xu(w=WI(C,t,r,c,u,n,s,x,S=[],b=[],d,i),i),p===123)if(u===0)Kh(C,t,w,w,S,i,d,s,b);else{switch(f){case 99:if(Ms(C,3)===110)break;case 108:if(Ms(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Kh(e,w,w,o&&xu(WI(e,w,w,0,0,n,s,x,n,S=[],d,b),b),n,b,d,s,o?S:b):Kh(C,w,w,w,[""],b,0,s,b)}}c=u=m=0,v=g=1,x=C="",d=a;break;case 58:d=1+Pn(C),m=h;default:if(v<1){if(p==123)--v;else if(p==125&&v++==0&&DI()==125)continue}switch(C+=Uf(p),p*v){case 38:g=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(Pn(C)-1)*g,g=1;break;case 64:Ta()===45&&(C+=qh(Yn())),f=Ta(),u=d=Pn(x=C+=zI(qf())),p++;break;case 45:h===45&&Pn(C)==2&&(v=0)}}return i}function WI(e,t,r,o,n,i,a,s,l,c,u,d){for(var f=n-1,m=n===0?i:[""],h=NI(m),v=0,y=0,g=0;v0?m[p]+" "+x:Gf(x,/&\f/g,m[p])))&&(l[g++]=S);return Uh(e,t,r,n===0?Bh:s,l,c,u,d)}function vj(e,t,r,o){return Uh(e,t,r,Wh,Uf($I()),Ls(e,2,-2),0,o)}function BI(e,t,r,o,n){return Uh(e,t,r,jh,Ls(e,0,o),Ls(e,o+1,-1),o,n)}function Xh(e,t){for(var r="",o=0;o1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},n=o.root,i=o.injectHash,a=o.parentSelectors,s=r.hashId,l=r.layer,c=r.path,u=r.hashPriority,d=r.transformers,f=d===void 0?[]:d,m=r.linters,h=m===void 0?[]:m,v="",y={};function g(S){var b=S.getName(s);if(!y[b]){var w=e(S.style,r,{root:!1,parentSelectors:a}),C=B(w,1),R=C[0];y[b]="@keyframes ".concat(S.getName(s)).concat(R)}}function p(S){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return S.forEach(function(w){Array.isArray(w)?p(w,b):w&&b.push(w)}),b}var x=p(Array.isArray(t)?t:[t]);return x.forEach(function(S){var b=typeof S=="string"&&!n?{}:S;if(typeof b=="string")v+="".concat(b,` -`);else if(b._keyframe)g(b);else{var w=f.reduce(function(C,R){var _;return(R==null||(_=R.visit)===null||_===void 0?void 0:_.call(R,C))||C},b);Object.keys(w).forEach(function(C){var R=w[C];if(pe(R)==="object"&&R&&(C!=="animationName"||!R._keyframe)&&!Ej(R)){var _=!1,O=C.trim(),N=!1;(n||i)&&s?O.startsWith("@")?_=!0:O==="&"?O=qI("",s,u):O=qI(C,s,u):n&&!s&&(O==="&"||O==="")&&(O="",N=!0);var k=e(R,r,{root:N,injectHash:_,parentSelectors:[].concat(se(a),[O])}),L=B(k,2),j=L[0],W=L[1];y=P(P({},y),W),v+="".concat(O).concat(j)}else{let V=function(F,z){var U=F.replace(/[A-Z]/g,function(A){return"-".concat(A.toLowerCase())}),H=z;!IC[F]&&typeof H=="number"&&H!==0&&(H="".concat(H,"px")),F==="animationName"&&z!==null&&z!==void 0&&z._keyframe&&(g(z),H=z.getName(s)),v+="".concat(U,":").concat(H,";")};var M=V,D,$=(D=R?.value)!==null&&D!==void 0?D:R;pe(R)==="object"&&R!==null&&R!==void 0&&R[KI]&&Array.isArray($)?$.forEach(function(F){V(C,F)}):V(C,$)}})}}),n?l&&(v&&(v="@layer ".concat(l.name," {").concat(v,"}")),l.dependencies&&(y["@layer ".concat(l.name)]=l.dependencies.map(function(S){return"@layer ".concat(S,", ").concat(l.name,";")}).join(` -`))):v="{".concat(v,"}"),[v,y]};function LC(e,t){return $s("".concat(e.join("%")).concat(t))}function Oj(){return null}var kC="style";function Fs(e,t){var r=e.token,o=e.path,n=e.hashId,i=e.layer,a=e.nonce,s=e.clientOnly,l=e.order,c=l===void 0?0:l,u=ks.useContext(Oi),d=u.autoClear,f=u.mock,m=u.defaultCache,h=u.hashPriority,v=u.container,y=u.ssrInline,g=u.transformers,p=u.linters,x=u.cache,S=u.layer,b=r._tokenKey,w=[b];S&&w.push("layer"),w.push.apply(w,se(o));var C=Hf,R=zl(kC,w,function(){var L=w.join("|");if(UI(L)){var j=GI(L),W=B(j,2),D=W[0],$=W[1];if(D)return[D,b,$,{},s,c]}var M=t(),V=Rj(M,{hashId:n,hashPriority:h,layer:S?i:void 0,path:o.join("-"),transformers:g,linters:p}),F=B(V,2),z=F[0],U=F[1],H=Yh(z),A=LC(w,H);return[H,b,A,U,s,c]},function(L,j){var W=B(L,3),D=W[2];(j||d)&&Hf&&Xi(D,{mark:$o})},function(L){var j=B(L,4),W=j[0],D=j[1],$=j[2],M=j[3];if(C&&W!==MC){var V={mark:$o,prepend:S?!1:"queue",attachTo:v,priority:c},F=typeof a=="function"?a():a;F&&(V.csp={nonce:F});var z=[],U=[];Object.keys(M).forEach(function(A){A.startsWith("@layer")?z.push(A):U.push(A)}),z.forEach(function(A){bo(Yh(M[A]),"_layer-".concat(A),P(P({},V),{},{prepend:!0}))});var H=bo(W,$,V);H[Ri]=x.instanceId,H.setAttribute(Qi,b),U.forEach(function(A){bo(Yh(M[A]),"_effect-".concat(A),V)})}}),_=B(R,3),O=_[0],N=_[1],k=_[2];return function(L){var j;if(!y||C||!m)j=ks.createElement(Oj,null);else{var W;j=ks.createElement("style",ee({},(W={},T(W,Qi,N),T(W,$o,k),W),{dangerouslySetInnerHTML:{__html:O}}))}return ks.createElement(ks.Fragment,null,j,L)}}var XI=function(t,r,o){var n=B(t,6),i=n[0],a=n[1],s=n[2],l=n[3],c=n[4],u=n[5],d=o||{},f=d.plain;if(c)return null;var m=i,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return m=As(i,a,s,h,f),l&&Object.keys(l).forEach(function(v){if(!r[v]){r[v]=!0;var y=Yh(l[v]),g=As(y,a,"_effect-".concat(v),h,f);v.startsWith("@layer")?m=g+m:m+=g}}),[u,s,m]};var FC="cssVar",_j=function(t,r){var o=t.key,n=t.prefix,i=t.unitless,a=t.ignore,s=t.token,l=t.scope,c=l===void 0?"":l,u=(0,YI.useContext)(Oi),d=u.cache.instanceId,f=u.container,m=s._tokenKey,h=[].concat(se(t.path),[o,c,m]),v=zl(FC,h,function(){var y=r(),g=kh(y,o,{prefix:n,unitless:i,ignore:a,scope:c}),p=B(g,2),x=p[0],S=p[1],b=LC(h,S);return[x,S,b,o]},function(y){var g=B(y,3),p=g[2];Hf&&Xi(p,{mark:$o})},function(y){var g=B(y,3),p=g[1],x=g[2];if(p){var S=bo(p,x,{mark:$o,prepend:"queue",attachTo:f,priority:-999});S[Ri]=d,S.setAttribute(Qi,o)}});return v},QI=function(t,r,o){var n=B(t,4),i=n[1],a=n[2],s=n[3],l=o||{},c=l.plain;if(!i)return null;var u=-999,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},f=As(i,s,a,d,c);return[u,a,f]},zC=_j;var Xf,Ane=(Xf={},T(Xf,kC,XI),T(Xf,NC,EI),T(Xf,FC,QI),Xf);var Pj=function(){function e(t,r){lt(this,e),T(this,"name",void 0),T(this,"style",void 0),T(this,"_keyframe",!0),this.name=t,this.style=r}return ct(e,[{key:"getName",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return r?"".concat(r,"-").concat(this.name):this.name}}]),e}(),xt=Pj;function wu(e){return e.notSplit=!0,e}var Bne={inset:["top","right","bottom","left"],insetBlock:["top","bottom"],insetBlockStart:["top"],insetBlockEnd:["bottom"],insetInline:["left","right"],insetInlineStart:["left"],insetInlineEnd:["right"],marginBlock:["marginTop","marginBottom"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],marginInline:["marginLeft","marginRight"],marginInlineStart:["marginLeft"],marginInlineEnd:["marginRight"],paddingBlock:["paddingTop","paddingBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"],paddingInline:["paddingLeft","paddingRight"],paddingInlineStart:["paddingLeft"],paddingInlineEnd:["paddingRight"],borderBlock:wu(["borderTop","borderBottom"]),borderBlockStart:wu(["borderTop"]),borderBlockEnd:wu(["borderBottom"]),borderInline:wu(["borderLeft","borderRight"]),borderInlineStart:wu(["borderLeft"]),borderInlineEnd:wu(["borderRight"]),borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndWidth:["borderBottomWidth"],borderInlineWidth:["borderLeftWidth","borderRightWidth"],borderInlineStartWidth:["borderLeftWidth"],borderInlineEndWidth:["borderRightWidth"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderBlockStartStyle:["borderTopStyle"],borderBlockEndStyle:["borderBottomStyle"],borderInlineStyle:["borderLeftStyle","borderRightStyle"],borderInlineStartStyle:["borderLeftStyle"],borderInlineEndStyle:["borderRightStyle"],borderBlockColor:["borderTopColor","borderBottomColor"],borderBlockStartColor:["borderTopColor"],borderBlockEndColor:["borderBottomColor"],borderInlineColor:["borderLeftColor","borderRightColor"],borderInlineStartColor:["borderLeftColor"],borderInlineEndColor:["borderRightColor"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"]};var ZI=E(I()),Tj=(0,ZI.createContext)({}),Eu=Tj;function Qh(e){return $h(e)||Ih(e)||pu(e)||Dh()}function So(e,t){for(var r=e,o=0;o3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&o&&r===void 0&&!So(e,t.slice(0,-1))?e:e2(e,t,r,o)}function Nj(e){return pe(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function JI(e){return Array.isArray(e)?[]:{}}var Ij=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Na(){for(var e=arguments.length,t=new Array(e),r=0;r{let e=()=>{};return e.deprecated=$j,e};var r2=E(I()),o2=(0,r2.createContext)(void 0);var Ou=E(I());var Dj={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},n2=Dj;var i2={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};var Aj=P(P({},i2),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),a2=Aj;var Mj={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Jh=Mj;var Lj={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},a2),timePickerLocale:Object.assign({},Jh)},ev=Lj;var s2=ev;var Tn="${label} is not a valid ${type}",kj={locale:"en",Pagination:n2,DatePicker:ev,TimePicker:Jh,Calendar:s2,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Tn,method:Tn,array:Tn,object:Tn,number:Tn,date:Tn,boolean:Tn,integer:Tn,float:Tn,regexp:Tn,email:Tn,url:Tn,hex:Tn},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}},_i=kj;var BC=Object.assign({},_i.Modal),tv=[],l2=()=>tv.reduce((e,t)=>Object.assign(Object.assign({},e),t),_i.Modal);function c2(e){if(e){let t=Object.assign({},e);return tv.push(t),BC=l2(),()=>{tv=tv.filter(r=>r!==t),BC=l2()}}BC=Object.assign({},_i.Modal)}var u2=E(I()),Fj=(0,u2.createContext)(void 0),Ru=Fj;var Yf=E(I());var zj=(e,t)=>{let r=Yf.useContext(Ru),o=Yf.useMemo(()=>{var i;let a=t||_i[e],s=(i=r?.[e])!==null&&i!==void 0?i:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[e,t,r]),n=Yf.useMemo(()=>{let i=r?.locale;return r?.exist&&!i?_i.locale:i},[r]);return[o,n]},Pi=zj;var d2="internalMark",Wj=e=>{let{locale:t={},children:r,_ANT_MARK__:o}=e;Ou.useEffect(()=>c2(t?.Modal),[t]);let n=Ou.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return Ou.createElement(Ru.Provider,{value:n},r)},f2=Wj;var F2=E(I());var jC={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},Bj=Object.assign(Object.assign({},jC),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, +/* end of GroupFilter component styles */`;var ef=E($(),1);var x3=E($(),1);function fe(){return fe=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=[];return KT.default.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(yi(n)):fd(n)&&n.props?r=r.concat(yi(n.props.children,t)):r.push(n))}),r}var VS={},Hz=[],Uz=function(t){Hz.push(t)};function dd(e,t){if(0)var r}function qz(e,t){if(0)var r}function XT(){VS={}}function YT(e,t,r){!t&&!VS[r]&&(e(!1,r),VS[r]=!0)}function Wg(e,t){YT(dd,e,t)}function QT(e,t){YT(qz,e,t)}Wg.preMessage=Uz;Wg.resetWarned=XT;Wg.noteOnce=QT;var Vt=Wg;function JT(e,t){if(ue(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(ue(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Bg(e){var t=JT(e,"string");return ue(t)=="symbol"?t:t+""}function _(e,t,r){return(t=Bg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZT(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function T(e){for(var t=1;t=19)return!0;var o=(0,pd.isMemo)(t)?t.type.type:t.type;return!(typeof o=="function"&&!((r=o.prototype)!==null&&r!==void 0&&r.render)&&o.$$typeof!==pd.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==pd.ForwardRef)};function aN(e){return(0,Jg.isValidElement)(e)&&!fd(e)}var ys=function(t){if(t&&aN(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null};var zr=E($());var Si=E($()),Zg=Si.createContext(null);function sN(e){var t=e.children,r=e.onBatchResize,n=Si.useRef(0),o=Si.useRef([]),i=Si.useContext(Zg),a=Si.useCallback(function(s,l,c){n.current+=1;var u=n.current;o.current.push({size:s,element:l,data:c}),Promise.resolve().then(function(){u===n.current&&(r?.(o.current),o.current=[])}),i?.(s,l,c)},[r,i]);return Si.createElement(Zg.Provider,{value:a},t)}var cN=function(){if(typeof Map<"u")return Map;function e(t,r){var n=-1;return t.some(function(o,i){return o[0]===r?(n=i,!0):!1}),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(r){var n=e(this.__entries__,r),o=this.__entries__[n];return o&&o[1]},t.prototype.set=function(r,n){var o=e(this.__entries__,r);~o?this.__entries__[o][1]=n:this.__entries__.push([r,n])},t.prototype.delete=function(r){var n=this.__entries__,o=e(n,r);~o&&n.splice(o,1)},t.prototype.has=function(r){return!!~e(this.__entries__,r)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(r,n){n===void 0&&(n=null);for(var o=0,i=this.__entries__;o0},e.prototype.connect_=function(){!GS||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),rW?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){!GS||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(t){var r=t.propertyName,n=r===void 0?"":r,o=tW.some(function(i){return!!~n.indexOf(i)});o&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),uN=function(e,t){for(var r=0,n=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof Gc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new fW(t)),this.controller_.addObserver(this),this.controller_.refresh())}},e.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 Gc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)&&(r.delete(t),r.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach(function(r){r.isActive()&&t.activeObservations_.push(r)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,r=this.activeObservations_.map(function(n){return new dW(n.target,n.broadcastRect())});this.callback_.call(t,r,t),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),dN=typeof WeakMap<"u"?new WeakMap:new cN,pN=function(){function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=nW.getInstance(),n=new pW(t,r,this);dN.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){pN.prototype[e]=function(){var t;return(t=dN.get(this))[e].apply(t,arguments)}});var mW=function(){return typeof eh.ResizeObserver<"u"?eh.ResizeObserver:pN}(),mN=mW;var xs=new Map;function gW(e){e.forEach(function(t){var r,n=t.target;(r=xs.get(n))===null||r===void 0||r.forEach(function(o){return o(n)})})}var gN=new mN(gW);function hN(e,t){xs.has(e)||(xs.set(e,new Set),gN.observe(e)),xs.get(e).add(t)}function vN(e,t){xs.has(e)&&(xs.get(e).delete(t),xs.get(e).size||(gN.unobserve(e),xs.delete(e)))}function it(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function yN(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=Array(t);r1&&arguments[1]!==void 0?arguments[1]:1;ON+=1;var n=ON;function o(i){if(i===0)TN(n),t();else{var a=_N(function(){o(i-1)});KS.set(n,a)}}return o(r),n};NN.cancel=function(e){var t=KS.get(e);return TN(e),PN(t)};var dt=NN;var lr=E($());function ih(e){if(Array.isArray(e))return e}function IN(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,a,s=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}function ah(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function B(e,t){return ih(e)||IN(e,t)||Kc(e,t)||ah()}function bW(e){for(var t=0,r,n=0,o=e.length;o>=4;++n,o-=4)r=e.charCodeAt(n)&255|(e.charCodeAt(++n)&255)<<8|(e.charCodeAt(++n)&255)<<16|(e.charCodeAt(++n)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(n+2)&255)<<16;case 2:t^=(e.charCodeAt(n+1)&255)<<8;case 1:t^=e.charCodeAt(n)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var Ss=bW;function Yt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function XS(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var r=t;r;){if(r===e)return!0;r=r.parentNode}return!1}var $N="data-rc-order",DN="data-rc-priority",SW="rc-util-key",YS=new Map;function AN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):SW}function sh(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function CW(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function QS(e){return Array.from((YS.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function kN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!Yt())return null;var r=t.csp,n=t.prepend,o=t.priority,i=o===void 0?0:o,a=CW(n),s=a==="prependQueue",l=document.createElement("style");l.setAttribute($N,a),s&&i&&l.setAttribute(DN,"".concat(i)),r!=null&&r.nonce&&(l.nonce=r?.nonce),l.innerHTML=e;var c=sh(t),u=c.firstChild;if(n){if(s){var f=(t.styles||QS(c)).filter(function(p){if(!["prepend","prependQueue"].includes(p.getAttribute($N)))return!1;var g=Number(p.getAttribute(DN)||0);return i>=g});if(f.length)return c.insertBefore(l,f[f.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function MN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=sh(t);return(t.styles||QS(r)).find(function(n){return n.getAttribute(AN(t))===e})}function Ui(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=MN(e,t);if(r){var n=sh(t);n.removeChild(r)}}function wW(e,t){var r=YS.get(e);if(!r||!XS(document,r)){var n=kN("",t),o=n.parentNode;YS.set(e,o),e.removeChild(n)}}function yn(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=sh(r),o=QS(n),i=T(T({},r),{},{styles:o});wW(n,i);var a=MN(t,i);if(a){var s,l;if((s=i.csp)!==null&&s!==void 0&&s.nonce&&a.nonce!==((l=i.csp)===null||l===void 0?void 0:l.nonce)){var c;a.nonce=(c=i.csp)===null||c===void 0?void 0:c.nonce}return a.innerHTML!==e&&(a.innerHTML=e),a}var u=kN(e,i);return u.setAttribute(AN(i),t),u}var XN=E($());function FN(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ve(e,t){if(e==null)return{};var r,n,o=FN(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n2&&arguments[2]!==void 0?arguments[2]:!1,n=new Set;function o(i,a){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=n.has(i);if(Vt(!l,"Warning: There may be circular references"),l)return!1;if(i===a)return!0;if(r&&s>1)return!1;n.add(i);var c=s+1;if(Array.isArray(i)){if(!Array.isArray(a)||i.length!==a.length)return!1;for(var u=0;u1&&arguments[1]!==void 0?arguments[1]:!1,a={map:this.cache};return r.forEach(function(s){if(!a)a=void 0;else{var l;a=(l=a)===null||l===void 0||(l=l.map)===null||l===void 0?void 0:l.get(s)}}),(n=a)!==null&&n!==void 0&&n.value&&i&&(a.value[1]=this.cacheCallTimes++),(o=a)===null||o===void 0?void 0:o.value}},{key:"get",value:function(r){var n;return(n=this.internalGet(r,!0))===null||n===void 0?void 0:n[0]}},{key:"has",value:function(r){return!!this.internalGet(r)}},{key:"set",value:function(r,n){var o=this;if(!this.has(r)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var i=this.keys.reduce(function(c,u){var f=B(c,2),p=f[1];return o.internalGet(u)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),WN+=1}return at(e,[{key:"getDerivativeToken",value:function(r){return this.derivatives.reduce(function(n,o){return o(r,n)},void 0)}}]),e}();var JS=new vd;function ws(e){var t=Array.isArray(e)?e:[e];return JS.has(t)||JS.set(t,new Xc(t)),JS.get(t)}var $W=new WeakMap,ZS={};function jN(e,t){for(var r=$W,n=0;n3&&arguments[3]!==void 0?arguments[3]:{},i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(i)return e;var a=T(T({},o),{},(n={},_(n,qi,t),_(n,Tn,r),n)),s=Object.keys(a).map(function(l){var c=a[l];return c?"".concat(l,'="').concat(c,'"'):null}).filter(function(l){return l}).join(" ");return"")}var Qc=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return"--".concat(r?"".concat(r,"-"):"").concat(t).replace(/([a-z0-9])([A-Z])/g,"$1-$2").replace(/([A-Z]+)([A-Z][a-z0-9]+)/g,"$1-$2").replace(/([a-z])([A-Z0-9])/g,"$1-$2").toLowerCase()},DW=function(t,r,n){return Object.keys(t).length?".".concat(r).concat(n!=null&&n.scope?".".concat(n.scope):"","{").concat(Object.entries(t).map(function(o){var i=B(o,2),a=i[0],s=i[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},uh=function(t,r,n){var o={},i={};return Object.entries(t).forEach(function(a){var s,l,c=B(a,2),u=c[0],f=c[1];if(n!=null&&(s=n.preserve)!==null&&s!==void 0&&s[u])i[u]=f;else if((typeof f=="string"||typeof f=="number")&&!(n!=null&&(l=n.ignore)!==null&&l!==void 0&&l[u])){var p,g=Qc(u,n?.prefix);o[g]=typeof f=="number"&&!(n!=null&&(p=n.unitless)!==null&&p!==void 0&&p[u])?"".concat(f,"px"):String(f),i[u]="var(".concat(g,")")}}),[i,DW(o,r,{scope:n?.scope})]};var fh=E($());var Jc=E($());var VN=Yt()?Jc.useLayoutEffect:Jc.useEffect,HN=function(t,r){var n=Jc.useRef(!0);VN(function(){return t(n.current)},r),VN(function(){return n.current=!1,function(){n.current=!0}},[])},El=function(t,r){HN(function(n){if(!n)return t()},r)},vt=HN;var tC=E($()),AW=T({},tC),UN=AW.useInsertionEffect,kW=function(t,r,n){tC.useMemo(t,n),vt(function(){return r(!0)},n)},MW=UN?function(e,t,r){return UN(function(){return e(),t()},r)}:kW,qN=MW;var rC=E($()),FW=T({},rC),LW=FW.useInsertionEffect,zW=function(t){var r=[],n=!1;function o(i){n||r.push(i)}return rC.useEffect(function(){return n=!1,function(){n=!0,r.length&&r.forEach(function(i){return i()})}},t),o},WW=function(){return function(t){t()}},BW=typeof LW<"u"?zW:WW,GN=BW;function jW(){return!1}var KN=jW;function Rl(e,t,r,n,o){var i=fh.useContext(wi),a=i.cache,s=[e].concat(te(t)),l=lh(s),c=GN([l]),u=KN(),f=function(v){a.opUpdate(l,function(y){var m=y||[void 0,void 0],d=B(m,2),x=d[0],b=x===void 0?0:x,S=d[1],w=S,C=w||r(),R=[b,C];return v?v(R):R})};fh.useMemo(function(){f()},[l]);var p=a.opGet(l),g=p[1];return qN(function(){o?.(g)},function(h){return f(function(v){var y=B(v,2),m=y[0],d=y[1];return h&&m===0&&o?.(g),[m+1,d]}),function(){a.opUpdate(l,function(v){var y=v||[],m=B(y,2),d=m[0],x=d===void 0?0:d,b=m[1],S=x-1;return S===0?(c(function(){(h||!a.opGet(l))&&n?.(b,!1)}),null):[x-1,b]})}},[l]),g}var VW={},HW="css",Ol=new Map;function UW(e){Ol.set(e,(Ol.get(e)||0)+1)}function qW(e,t){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat(qi,'="').concat(e,'"]'));r.forEach(function(n){if(n[Ci]===t){var o;(o=n.parentNode)===null||o===void 0||o.removeChild(n)}})}}var GW=0;function KW(e,t){Ol.set(e,(Ol.get(e)||0)-1);var r=Array.from(Ol.keys()),n=r.filter(function(o){var i=Ol.get(o)||0;return i<=0});r.length-n.length>GW&&n.forEach(function(o){qW(o,t),Ol.delete(o)})}var YN=function(t,r,n,o){var i=n.getDerivativeToken(t),a=T(T({},i),r);return o&&(a=o(a)),a},nC="token";function dh(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=(0,XN.useContext)(wi),o=n.cache.instanceId,i=n.container,a=r.salt,s=a===void 0?"":a,l=r.override,c=l===void 0?VW:l,u=r.formatToken,f=r.getComputedToken,p=r.cssVar,g=jN(function(){return Object.assign.apply(Object,[{}].concat(te(t)))},t),h=Yc(g),v=Yc(c),y=p?Yc(p):"",m=Rl(nC,[s,e.id,h,v,y],function(){var d,x=f?f(g,c,e):YN(g,c,e,u),b=T({},x),S="";if(p){var w=uh(x,p.key,{prefix:p.prefix,ignore:p.ignore,unitless:p.unitless,preserve:p.preserve}),C=B(w,2);x=C[0],S=C[1]}var R=eC(x,s);x._tokenKey=R,b._tokenKey=eC(b,s);var P=(d=p?.key)!==null&&d!==void 0?d:R;x._themeKey=P,UW(P);var O="".concat(HW,"-").concat(Ss(R));return x._hashId=O,[x,O,b,S,p?.key||""]},function(d){KW(d[0]._themeKey,o)},function(d){var x=B(d,4),b=x[0],S=x[3];if(p&&S){var w=yn(S,Ss("css-variables-".concat(b._themeKey)),{mark:Tn,prepend:"queue",attachTo:i,priority:-999});w[Ci]=o,w.setAttribute(qi,b._themeKey)}});return m}var QN=function(t,r,n){var o=B(t,5),i=o[2],a=o[3],s=o[4],l=n||{},c=l.plain;if(!a)return null;var u=i._tokenKey,f=-999,p={"data-rc-order":"prependQueue","data-rc-priority":"".concat(f)},g=Es(a,s,u,p,c);return[f,u,g]};var wI=E($());var _s=E($());var XW={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},oC=XW;var ph="comm",mh="rule",gh="decl";var JN="@import";var ZN="@namespace",eI="@keyframes";var tI="@layer";var iC=Math.abs,xd=String.fromCharCode;function hh(e){return e.trim()}function bd(e,t,r){return e.replace(t,r)}function rI(e,t,r){return e.indexOf(t,r)}function Rs(e,t){return e.charCodeAt(t)|0}function Os(e,t,r){return e.slice(t,r)}function So(e){return e.length}function nI(e){return e.length}function Zc(e,t){return t.push(e),e}var vh=1,eu=1,oI=0,Vo=0,Hr=0,ru="";function yh(e,t,r,n,o,i,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:vh,column:eu,length:a,return:"",siblings:s}}function iI(){return Hr}function aI(){return Hr=Vo>0?Rs(ru,--Vo):0,eu--,Hr===10&&(eu=1,vh--),Hr}function Ho(){return Hr=Vo2||tu(Hr)>3?"":" "}function uI(e,t){for(;--t&&Ho()&&!(Hr<48||Hr>102||Hr>57&&Hr<65||Hr>70&&Hr<97););return xh(e,Sd()+(t<6&&ba()==32&&Ho()==32))}function aC(e){for(;Ho();)switch(Hr){case e:return Vo;case 34:case 39:e!==34&&e!==39&&aC(Hr);break;case 40:e===41&&aC(e);break;case 92:Ho();break}return Vo}function fI(e,t){for(;Ho()&&e+Hr!==57;)if(e+Hr===84&&ba()===47)break;return"/*"+xh(t,Vo-1)+"*"+xd(e===47?e:Ho())}function dI(e){for(;!tu(ba());)Ho();return xh(e,Vo)}function gI(e){return lI(Sh("",null,null,null,[""],e=sI(e),0,[0],e))}function Sh(e,t,r,n,o,i,a,s,l){for(var c=0,u=0,f=a,p=0,g=0,h=0,v=1,y=1,m=1,d=0,x="",b=o,S=i,w=n,C=x;y;)switch(h=d,d=Ho()){case 40:if(h!=108&&Rs(C,f-1)==58){rI(C+=bd(bh(d),"&","&\f"),"&\f",iC(c?s[c-1]:0))!=-1&&(m=-1);break}case 34:case 39:case 91:C+=bh(d);break;case 9:case 10:case 13:case 32:C+=cI(h);break;case 92:C+=uI(Sd()-1,7);continue;case 47:switch(ba()){case 42:case 47:Zc(YW(fI(Ho(),Sd()),t,r,l),l),(tu(h||1)==5||tu(ba()||1)==5)&&So(C)&&Os(C,-1,void 0)!==" "&&(C+=" ");break;default:C+="/"}break;case 123*v:s[c++]=So(C)*m;case 125*v:case 59:case 0:switch(d){case 0:case 125:y=0;case 59+u:m==-1&&(C=bd(C,/\f/g,"")),g>0&&(So(C)-f||v===0&&h===47)&&Zc(g>32?mI(C+";",n,r,f-1,l):mI(bd(C," ","")+";",n,r,f-2,l),l);break;case 59:C+=";";default:if(Zc(w=pI(C,t,r,c,u,o,s,x,b=[],S=[],f,i),i),d===123)if(u===0)Sh(C,t,w,w,b,i,f,s,S);else{switch(p){case 99:if(Rs(C,3)===110)break;case 108:if(Rs(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Sh(e,w,w,n&&Zc(pI(e,w,w,0,0,o,s,x,o,b=[],f,S),S),o,S,f,s,n?b:S):Sh(C,w,w,w,[""],S,0,s,S)}}c=u=g=0,v=m=1,x=C="",f=a;break;case 58:f=1+So(C),g=h;default:if(v<1){if(d==123)--v;else if(d==125&&v++==0&&aI()==125)continue}switch(C+=xd(d),d*v){case 38:m=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(So(C)-1)*m,m=1;break;case 64:ba()===45&&(C+=bh(Ho())),p=ba(),u=f=So(x=C+=dI(Sd())),d++;break;case 45:h===45&&So(C)==2&&(v=0)}}return i}function pI(e,t,r,n,o,i,a,s,l,c,u,f){for(var p=o-1,g=o===0?i:[""],h=nI(g),v=0,y=0,m=0;v0?g[d]+" "+x:bd(x,/&\f/g,g[d])))&&(l[m++]=b);return yh(e,t,r,o===0?mh:s,l,c,u,f)}function YW(e,t,r,n){return yh(e,t,r,ph,xd(iI()),Os(e,2,-2),0,n)}function mI(e,t,r,n,o){return yh(e,t,r,gh,Os(e,0,n),Os(e,n+1,-1),n,o)}function Ch(e,t){for(var r="",n=0;n1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=n.root,i=n.injectHash,a=n.parentSelectors,s=r.hashId,l=r.layer,c=r.path,u=r.hashPriority,f=r.transformers,p=f===void 0?[]:f,g=r.linters,h=g===void 0?[]:g,v="",y={};function m(b){var S=b.getName(s);if(!y[S]){var w=e(b.style,r,{root:!1,parentSelectors:a}),C=B(w,1),R=C[0];y[S]="@keyframes ".concat(b.getName(s)).concat(R)}}function d(b){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return b.forEach(function(w){Array.isArray(w)?d(w,S):w&&S.push(w)}),S}var x=d(Array.isArray(t)?t:[t]);return x.forEach(function(b){var S=typeof b=="string"&&!o?{}:b;if(typeof S=="string")v+="".concat(S,` +`);else if(S._keyframe)m(S);else{var w=p.reduce(function(C,R){var P;return(R==null||(P=R.visit)===null||P===void 0?void 0:P.call(R,C))||C},S);Object.keys(w).forEach(function(C){var R=w[C];if(ue(R)==="object"&&R&&(C!=="animationName"||!R._keyframe)&&!nB(R)){var P=!1,O=C.trim(),A=!1;(o||i)&&s?O.startsWith("@")?P=!0:O==="&"?O=bI("",s,u):O=bI(C,s,u):o&&!s&&(O==="&"||O==="")&&(O="",A=!0);var F=e(R,r,{root:A,injectHash:P,parentSelectors:[].concat(te(a),[O])}),M=B(F,2),H=M[0],L=M[1];y=T(T({},y),L),v+="".concat(O).concat(H)}else{let U=function(z,W){var q=z.replace(/[A-Z]/g,function(k){return"-".concat(k.toLowerCase())}),j=W;!oC[z]&&typeof j=="number"&&j!==0&&(j="".concat(j,"px")),z==="animationName"&&W!==null&&W!==void 0&&W._keyframe&&(m(W),j=W.getName(s)),v+="".concat(q,":").concat(j,";")};var D=U,N,I=(N=R?.value)!==null&&N!==void 0?N:R;ue(R)==="object"&&R!==null&&R!==void 0&&R[SI]&&Array.isArray(I)?I.forEach(function(z){U(C,z)}):U(C,I)}})}}),o?l&&(v&&(v="@layer ".concat(l.name," {").concat(v,"}")),l.dependencies&&(y["@layer ".concat(l.name)]=l.dependencies.map(function(b){return"@layer ".concat(b,", ").concat(l.name,";")}).join(` +`))):v="{".concat(v,"}"),[v,y]};function cC(e,t){return Ss("".concat(e.join("%")).concat(t))}function iB(){return null}var uC="style";function Ps(e,t){var r=e.token,n=e.path,o=e.hashId,i=e.layer,a=e.nonce,s=e.clientOnly,l=e.order,c=l===void 0?0:l,u=_s.useContext(wi),f=u.autoClear,p=u.mock,g=u.defaultCache,h=u.hashPriority,v=u.container,y=u.ssrInline,m=u.transformers,d=u.linters,x=u.cache,b=u.layer,S=r._tokenKey,w=[S];b&&w.push("layer"),w.push.apply(w,te(n));var C=yd,R=Rl(uC,w,function(){var M=w.join("|");if(yI(M)){var H=xI(M),L=B(H,2),N=L[0],I=L[1];if(N)return[N,S,I,{},s,c]}var D=t(),U=oB(D,{hashId:o,hashPriority:h,layer:b?i:void 0,path:n.join("-"),transformers:m,linters:d}),z=B(U,2),W=z[0],q=z[1],j=wh(W),k=cC(w,j);return[j,S,k,q,s,c]},function(M,H){var L=B(M,3),N=L[2];(H||f)&&yd&&Ui(N,{mark:Tn})},function(M){var H=B(M,4),L=H[0],N=H[1],I=H[2],D=H[3];if(C&&L!==lC){var U={mark:Tn,prepend:b?!1:"queue",attachTo:v,priority:c},z=typeof a=="function"?a():a;z&&(U.csp={nonce:z});var W=[],q=[];Object.keys(D).forEach(function(k){k.startsWith("@layer")?W.push(k):q.push(k)}),W.forEach(function(k){yn(wh(D[k]),"_layer-".concat(k),T(T({},U),{},{prepend:!0}))});var j=yn(L,I,U);j[Ci]=x.instanceId,j.setAttribute(qi,S),q.forEach(function(k){yn(wh(D[k]),"_effect-".concat(k),U)})}}),P=B(R,3),O=P[0],A=P[1],F=P[2];return function(M){var H;if(!y||C||!g)H=_s.createElement(iB,null);else{var L;H=_s.createElement("style",fe({},(L={},_(L,qi,A),_(L,Tn,F),L),{dangerouslySetInnerHTML:{__html:O}}))}return _s.createElement(_s.Fragment,null,H,M)}}var CI=function(t,r,n){var o=B(t,6),i=o[0],a=o[1],s=o[2],l=o[3],c=o[4],u=o[5],f=n||{},p=f.plain;if(c)return null;var g=i,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return g=Es(i,a,s,h,p),l&&Object.keys(l).forEach(function(v){if(!r[v]){r[v]=!0;var y=wh(l[v]),m=Es(y,a,"_effect-".concat(v),h,p);v.startsWith("@layer")?g=m+g:g+=m}}),[u,s,g]};var fC="cssVar",aB=function(t,r){var n=t.key,o=t.prefix,i=t.unitless,a=t.ignore,s=t.token,l=t.scope,c=l===void 0?"":l,u=(0,wI.useContext)(wi),f=u.cache.instanceId,p=u.container,g=s._tokenKey,h=[].concat(te(t.path),[n,c,g]),v=Rl(fC,h,function(){var y=r(),m=uh(y,n,{prefix:o,unitless:i,ignore:a,scope:c}),d=B(m,2),x=d[0],b=d[1],S=cC(h,b);return[x,b,S,n]},function(y){var m=B(y,3),d=m[2];yd&&Ui(d,{mark:Tn})},function(y){var m=B(y,3),d=m[1],x=m[2];if(d){var b=yn(d,x,{mark:Tn,prepend:"queue",attachTo:p,priority:-999});b[Ci]=f,b.setAttribute(qi,n)}});return v},EI=function(t,r,n){var o=B(t,4),i=o[1],a=o[2],s=o[3],l=n||{},c=l.plain;if(!i)return null;var u=-999,f={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)},p=Es(i,s,a,f,c);return[u,a,p]},dC=aB;var wd,Dne=(wd={},_(wd,uC,CI),_(wd,nC,QN),_(wd,fC,EI),wd);var sB=function(){function e(t,r){it(this,e),_(this,"name",void 0),_(this,"style",void 0),_(this,"_keyframe",!0),this.name=t,this.style=r}return at(e,[{key:"getName",value:function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return r?"".concat(r,"-").concat(this.name):this.name}}]),e}(),yt=sB;function nu(e){return e.notSplit=!0,e}var Wne={inset:["top","right","bottom","left"],insetBlock:["top","bottom"],insetBlockStart:["top"],insetBlockEnd:["bottom"],insetInline:["left","right"],insetInlineStart:["left"],insetInlineEnd:["right"],marginBlock:["marginTop","marginBottom"],marginBlockStart:["marginTop"],marginBlockEnd:["marginBottom"],marginInline:["marginLeft","marginRight"],marginInlineStart:["marginLeft"],marginInlineEnd:["marginRight"],paddingBlock:["paddingTop","paddingBottom"],paddingBlockStart:["paddingTop"],paddingBlockEnd:["paddingBottom"],paddingInline:["paddingLeft","paddingRight"],paddingInlineStart:["paddingLeft"],paddingInlineEnd:["paddingRight"],borderBlock:nu(["borderTop","borderBottom"]),borderBlockStart:nu(["borderTop"]),borderBlockEnd:nu(["borderBottom"]),borderInline:nu(["borderLeft","borderRight"]),borderInlineStart:nu(["borderLeft"]),borderInlineEnd:nu(["borderRight"]),borderBlockWidth:["borderTopWidth","borderBottomWidth"],borderBlockStartWidth:["borderTopWidth"],borderBlockEndWidth:["borderBottomWidth"],borderInlineWidth:["borderLeftWidth","borderRightWidth"],borderInlineStartWidth:["borderLeftWidth"],borderInlineEndWidth:["borderRightWidth"],borderBlockStyle:["borderTopStyle","borderBottomStyle"],borderBlockStartStyle:["borderTopStyle"],borderBlockEndStyle:["borderBottomStyle"],borderInlineStyle:["borderLeftStyle","borderRightStyle"],borderInlineStartStyle:["borderLeftStyle"],borderInlineEndStyle:["borderRightStyle"],borderBlockColor:["borderTopColor","borderBottomColor"],borderBlockStartColor:["borderTopColor"],borderBlockEndColor:["borderBottomColor"],borderInlineColor:["borderLeftColor","borderRightColor"],borderInlineStartColor:["borderLeftColor"],borderInlineEndColor:["borderRightColor"],borderStartStartRadius:["borderTopLeftRadius"],borderStartEndRadius:["borderTopRightRadius"],borderEndStartRadius:["borderBottomLeftRadius"],borderEndEndRadius:["borderBottomRightRadius"]};var RI=E($()),lB=(0,RI.createContext)({}),ou=lB;function Eh(e){return ih(e)||oh(e)||Kc(e)||ah()}function xn(e,t){for(var r=e,n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!xn(e,t.slice(0,-1))?e:_I(e,t,r,n)}function cB(e){return ue(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function OI(e){return Array.isArray(e)?[]:{}}var uB=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Sa(){for(var e=arguments.length,t=new Array(e),r=0;r{let e=()=>{};return e.deprecated=fB,e};var TI=E($()),NI=(0,TI.createContext)(void 0);var au=E($());var dB={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"},II=dB;var $I={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};var pB=T(T({},$I),{},{locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",week:"Week",month:"Month",year:"Year",timeSelect:"select time",dateSelect:"select date",weekSelect:"Choose a week",monthSelect:"Choose a month",yearSelect:"Choose a year",decadeSelect:"Choose a decade",dateFormat:"M/D/YYYY",dateTimeFormat:"M/D/YYYY HH:mm:ss",previousMonth:"Previous month (PageUp)",nextMonth:"Next month (PageDown)",previousYear:"Last year (Control + left)",nextYear:"Next year (Control + right)",previousDecade:"Last decade",nextDecade:"Next decade",previousCentury:"Last century",nextCentury:"Next century"}),DI=pB;var mB={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Oh=mB;var gB={lang:Object.assign({placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"]},DI),timePickerLocale:Object.assign({},Oh)},_h=gB;var AI=_h;var Co="${label} is not a valid ${type}",hB={locale:"en",Pagination:II,DatePicker:_h,TimePicker:Oh,Calendar:AI,global:{placeholder:"Please select",close:"Close"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckAll:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",deselectAll:"Deselect all data",removeAll:"Remove all data",selectInvert:"Invert current page"},Upload:{uploading:"Uploading...",removeFile:"Remove file",uploadError:"Upload error",previewFile:"Preview file",downloadFile:"Download file"},Empty:{description:"No data"},Icon:{icon:"icon"},Text:{edit:"Edit",copy:"Copy",copied:"Copied",expand:"Expand",collapse:"Collapse"},Form:{optional:"(optional)",defaultValidateMessages:{default:"Field validation error for ${label}",required:"Please enter ${label}",enum:"${label} must be one of [${enum}]",whitespace:"${label} cannot be a blank character",date:{format:"${label} date format is invalid",parse:"${label} cannot be converted to a date",invalid:"${label} is an invalid date"},types:{string:Co,method:Co,array:Co,object:Co,number:Co,date:Co,boolean:Co,integer:Co,float:Co,regexp:Co,email:Co,url:Co,hex:Co},string:{len:"${label} must be ${len} characters",min:"${label} must be at least ${min} characters",max:"${label} must be up to ${max} characters",range:"${label} must be between ${min}-${max} characters"},number:{len:"${label} must be equal to ${len}",min:"${label} must be minimum ${min}",max:"${label} must be maximum ${max}",range:"${label} must be between ${min}-${max}"},array:{len:"Must be ${len} ${label}",min:"At least ${min} ${label}",max:"At most ${max} ${label}",range:"The amount of ${label} must be between ${min}-${max}"},pattern:{mismatch:"${label} does not match the pattern ${pattern}"}}},Image:{preview:"Preview"},QRCode:{expired:"QR code expired",refresh:"Refresh",scanned:"Scanned"},ColorPicker:{presetEmpty:"Empty",transparent:"Transparent",singleColor:"Single",gradientColor:"Gradient"}},Ei=hB;var mC=Object.assign({},Ei.Modal),Ph=[],kI=()=>Ph.reduce((e,t)=>Object.assign(Object.assign({},e),t),Ei.Modal);function MI(e){if(e){let t=Object.assign({},e);return Ph.push(t),mC=kI(),()=>{Ph=Ph.filter(r=>r!==t),mC=kI()}}mC=Object.assign({},Ei.Modal)}var FI=E($()),vB=(0,FI.createContext)(void 0),iu=vB;var Ed=E($());var yB=(e,t)=>{let r=Ed.useContext(iu),n=Ed.useMemo(()=>{var i;let a=t||Ei[e],s=(i=r?.[e])!==null&&i!==void 0?i:{};return Object.assign(Object.assign({},typeof a=="function"?a():a),s||{})},[e,t,r]),o=Ed.useMemo(()=>{let i=r?.locale;return r?.exist&&!i?Ei.locale:i},[r]);return[n,o]},Ca=yB;var LI="internalMark",xB=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e;au.useEffect(()=>MI(t?.Modal),[t]);let o=au.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return au.createElement(iu.Provider,{value:o},r)},zI=xB;var f2=E($());var gC={blue:"#1677FF",purple:"#722ED1",cyan:"#13C2C2",green:"#52C41A",magenta:"#EB2F96",pink:"#EB2F96",red:"#F5222D",orange:"#FA8C16",yellow:"#FADB14",volcano:"#FA541C",geekblue:"#2F54EB",gold:"#FAAD14",lime:"#A0D911"},bB=Object.assign(Object.assign({},gC),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorLink:"",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', -'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),Ia=Bj;var ao=Math.round;function VC(e,t){let r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],o=r.map(n=>parseFloat(n));for(let n=0;n<3;n+=1)o[n]=t(o[n]||0,r[n]||"",n);return r[3]?o[3]=r[3].includes("%")?o[3]/100:o[3]:o[3]=1,o}var p2=(e,t,r)=>r===0?e:e/100;function Qf(e,t){let r=t||255;return e>r?r:e<0?0:e}var it=class e{constructor(t){T(this,"isValid",!0),T(this,"r",0),T(this,"g",0),T(this,"b",0),T(this,"a",1),T(this,"_h",void 0),T(this,"_s",void 0),T(this,"_l",void 0),T(this,"_v",void 0),T(this,"_max",void 0),T(this,"_min",void 0),T(this,"_brightness",void 0);function r(n){return n[0]in t&&n[1]in t&&n[2]in t}if(t)if(typeof t=="string"){let i=function(a){return n.startsWith(a)};var o=i;let n=t.trim();/^#?[A-F\d]{3,8}$/i.test(n)?this.fromHexString(n):i("rgb")?this.fromRgbString(n):i("hsl")?this.fromHslString(n):(i("hsv")||i("hsb"))&&this.fromHsvString(n)}else if(t instanceof e)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Qf(t.r),this.g=Qf(t.g),this.b=Qf(t.b),this.a=typeof t.a=="number"?Qf(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){let r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(i){let a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}let r=t(this.r),o=t(this.g),n=t(this.b);return .2126*r+.7152*o+.0722*n}getHue(){if(typeof this._h>"u"){let t=this.getMax()-this.getMin();t===0?this._h=0:this._h=ao(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g"u"){let t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){let r=this.getHue(),o=this.getSaturation(),n=this.getLightness()-t/100;return n<0&&(n=0),this._c({h:r,s:o,l:n,a:this.a})}lighten(t=10){let r=this.getHue(),o=this.getSaturation(),n=this.getLightness()+t/100;return n>1&&(n=1),this._c({h:r,s:o,l:n,a:this.a})}mix(t,r=50){let o=this._c(t),n=r/100,i=s=>(o[s]-this[s])*n+this[s],a={r:ao(i("r")),g:ao(i("g")),b:ao(i("b")),a:ao(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){let r=this._c(t),o=this.a+r.a*(1-this.a),n=i=>ao((this[i]*this.a+r[i]*r.a*(1-this.a))/o);return this._c({r:n("r"),g:n("g"),b:n("b"),a:o})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#",r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;let o=(this.g||0).toString(16);t+=o.length===2?o:"0"+o;let n=(this.b||0).toString(16);if(t+=n.length===2?n:"0"+n,typeof this.a=="number"&&this.a>=0&&this.a<1){let i=ao(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let t=this.getHue(),r=ao(this.getSaturation()*100),o=ao(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${o}%,${this.a})`:`hsl(${t},${r}%,${o}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,o){let n=this.clone();return n[t]=Qf(r,o),n}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){let r=t.replace("#","");function o(n,i){return parseInt(r[n]+r[i||n],16)}r.length<6?(this.r=o(0),this.g=o(1),this.b=o(2),this.a=r[3]?o(3)/255:1):(this.r=o(0,1),this.g=o(2,3),this.b=o(4,5),this.a=r[6]?o(6,7)/255:1)}fromHsl({h:t,s:r,l:o,a:n}){if(this._h=t%360,this._s=r,this._l=o,this.a=typeof n=="number"?n:1,r<=0){let f=ao(o*255);this.r=f,this.g=f,this.b=f}let i=0,a=0,s=0,l=t/60,c=(1-Math.abs(2*o-1))*r,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,a=u):l>=1&&l<2?(i=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(i=u,s=c):l>=5&&l<6&&(i=c,s=u);let d=o-c/2;this.r=ao((i+d)*255),this.g=ao((a+d)*255),this.b=ao((s+d)*255)}fromHsv({h:t,s:r,v:o,a:n}){this._h=t%360,this._s=r,this._v=o,this.a=typeof n=="number"?n:1;let i=ao(o*255);if(this.r=i,this.g=i,this.b=i,r<=0)return;let a=t/60,s=Math.floor(a),l=a-s,c=ao(o*(1-r)*255),u=ao(o*(1-r*l)*255),d=ao(o*(1-r*(1-l))*255);switch(s){case 0:this.g=d,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=d;break;case 3:this.r=c,this.g=u;break;case 4:this.r=d,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(t){let r=VC(t,p2);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=VC(t,p2);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){let r=VC(t,(o,n)=>n.includes("%")?ao(o/100*255):o);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}};var rv=2,m2=.16,jj=.05,Vj=.05,Hj=.15,y2=5,x2=4,Uj=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function g2(e,t,r){var o;return Math.round(e.h)>=60&&Math.round(e.h)<=240?o=r?Math.round(e.h)-rv*t:Math.round(e.h)+rv*t:o=r?Math.round(e.h)+rv*t:Math.round(e.h)-rv*t,o<0?o+=360:o>=360&&(o-=360),o}function h2(e,t,r){if(e.h===0&&e.s===0)return e.s;var o;return r?o=e.s-m2*t:t===x2?o=e.s+m2:o=e.s+jj*t,o>1&&(o=1),r&&t===y2&&o>.1&&(o=.1),o<.06&&(o=.06),Math.round(o*100)/100}function v2(e,t,r){var o;return r?o=e.v+Vj*t:o=e.v-Hj*t,o=Math.max(0,Math.min(1,o)),Math.round(o*100)/100}function Ti(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],o=new it(e),n=o.toHsv(),i=y2;i>0;i-=1){var a=new it({h:g2(n,i,!0),s:h2(n,i,!0),v:v2(n,i,!0)});r.push(a)}r.push(o);for(var s=1;s<=x2;s+=1){var l=new it({h:g2(n,s),s:h2(n,s),v:v2(n,s)});r.push(l)}return t.theme==="dark"?Uj.map(function(c){var u=c.index,d=c.amount;return new it(t.backgroundColor||"#141414").mix(r[u],d).toHexString()}):r.map(function(c){return c.toHexString()})}var $a={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},HC=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];HC.primary=HC[5];var UC=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];UC.primary=UC[5];var GC=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];GC.primary=GC[5];var qC=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];qC.primary=qC[5];var KC=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];KC.primary=KC[5];var XC=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];XC.primary=XC[5];var YC=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];YC.primary=YC[5];var QC=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];QC.primary=QC[5];var zs=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];zs.primary=zs[5];var ZC=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];ZC.primary=ZC[5];var JC=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];JC.primary=JC[5];var ew=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];ew.primary=ew[5];var tw=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];tw.primary=tw[5];var ov={red:HC,volcano:UC,orange:GC,gold:qC,yellow:KC,lime:XC,green:YC,cyan:QC,blue:zs,geekblue:ZC,purple:JC,magenta:ew,grey:tw},b2=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];b2.primary=b2[5];var S2=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];S2.primary=S2[5];var C2=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];C2.primary=C2[5];var w2=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];w2.primary=w2[5];var E2=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];E2.primary=E2[5];var R2=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];R2.primary=R2[5];var O2=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];O2.primary=O2[5];var _2=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];_2.primary=_2[5];var P2=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];P2.primary=P2[5];var T2=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];T2.primary=T2[5];var N2=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];N2.primary=N2[5];var I2=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];I2.primary=I2[5];var $2=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];$2.primary=$2[5];function rw(e,t){let{generateColorPalettes:r,generateNeutralColorPalettes:o}=t,{colorSuccess:n,colorWarning:i,colorError:a,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=r(l),f=r(n),m=r(i),h=r(a),v=r(s),y=o(c,u),g=e.colorLink||e.colorInfo,p=r(g),x=new it(h[1]).mix(new it(h[3]),50).toHexString();return Object.assign(Object.assign({},y),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBgFilledHover:x,colorErrorBgActive:h[3],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg:m[1],colorWarningBgHover:m[2],colorWarningBorder:m[3],colorWarningBorderHover:m[4],colorWarningHover:m[4],colorWarning:m[6],colorWarningActive:m[7],colorWarningTextHover:m[8],colorWarningText:m[9],colorWarningTextActive:m[10],colorInfoBg:v[1],colorInfoBgHover:v[2],colorInfoBorder:v[3],colorInfoBorderHover:v[4],colorInfoHover:v[4],colorInfo:v[6],colorInfoActive:v[7],colorInfoTextHover:v[8],colorInfoText:v[9],colorInfoTextActive:v[10],colorLinkHover:p[4],colorLink:p[6],colorLinkActive:p[7],colorBgMask:new it("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}var Gj=e=>{let t=e,r=e,o=e,n=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?o=1:e>=6&&(o=2),e>4&&e<8?n=4:e>=8&&(n=6),{borderRadius:e,borderRadiusXS:o,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:n}},D2=Gj;function ow(e){let{motionUnit:t,motionBase:r,borderRadius:o,lineWidth:n}=e;return Object.assign({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:n+1},D2(o))}var qj=e=>{let{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},A2=qj;function _u(e){return(e+8)/e}function nw(e){let t=Array.from({length:10}).map((r,o)=>{let n=o-1,i=e*Math.pow(Math.E,n/5),a=o>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:_u(r)}))}var Kj=e=>{let t=nw(e),r=t.map(u=>u.size),o=t.map(u=>u.lineHeight),n=r[1],i=r[0],a=r[2],s=o[1],l=o[0],c=o[2];return{fontSizeSM:i,fontSize:n,fontSizeLG:a,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*n),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:o[6],lineHeightHeading2:o[5],lineHeightHeading3:o[4],lineHeightHeading4:o[3],lineHeightHeading5:o[2]}},M2=Kj;function iw(e){let{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}var Nn=(e,t)=>new it(e).setA(t).toRgbString(),Pu=(e,t)=>new it(e).darken(t).toHexString();var L2=e=>{let t=Ti(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},k2=(e,t)=>{let r=e||"#fff",o=t||"#000";return{colorBgBase:r,colorTextBase:o,colorText:Nn(o,.88),colorTextSecondary:Nn(o,.65),colorTextTertiary:Nn(o,.45),colorTextQuaternary:Nn(o,.25),colorFill:Nn(o,.15),colorFillSecondary:Nn(o,.06),colorFillTertiary:Nn(o,.04),colorFillQuaternary:Nn(o,.02),colorBgSolid:Nn(o,1),colorBgSolidHover:Nn(o,.75),colorBgSolidActive:Nn(o,.95),colorBgLayout:Pu(r,4),colorBgContainer:Pu(r,0),colorBgElevated:Pu(r,0),colorBgSpotlight:Nn(o,.85),colorBgBlur:"transparent",colorBorder:Pu(r,15),colorBorderSecondary:Pu(r,6)}};function aw(e){$a.pink=$a.magenta,ov.pink=ov.magenta;let t=Object.keys(jC).map(r=>{let o=e[r]===$a[r]?ov[r]:Ti(e[r]);return Array.from({length:10},()=>1).reduce((n,i,a)=>(n[`${r}-${a+1}`]=o[a],n[`${r}${a+1}`]=o[a],n),{})}).reduce((r,o)=>(r=Object.assign(Object.assign({},r),o),r),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),rw(e,{generateColorPalettes:L2,generateNeutralColorPalettes:k2})),M2(e.fontSize)),iw(e)),A2(e)),ow(e))}var Xj=Ds(aw),Zf=Xj;var Jf={token:Ia,override:{override:Ia},hashed:!0},ep=F2.default.createContext(Jf);var nv=E(I()),Ws="ant",tp="anticon",sw=["outlined","borderless","filled","underlined"],Yj=(e,t)=>t||(e?`${Ws}-${e}`:Ws),at=nv.createContext({getPrefixCls:Yj,iconPrefixCls:tp}),{Consumer:Qj}=at,z2={};function Do(e){let t=nv.useContext(at),{getPrefixCls:r,direction:o,getPopupContainer:n}=t,i=t[e];return Object.assign(Object.assign({classNames:z2,styles:z2},i),{getPrefixCls:r,direction:o,getPopupContainer:n})}var Zj=`-ant-${Date.now()}-${Math.random()}`;function Jj(e,t){let r={},o=(a,s)=>{let l=a.clone();return l=s?.(l)||l,l.toRgbString()},n=(a,s)=>{let l=new it(a),c=Ti(l.toRgbString());r[`${s}-color`]=o(l),r[`${s}-color-disabled`]=c[1],r[`${s}-color-hover`]=c[4],r[`${s}-color-active`]=c[6],r[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),r[`${s}-color-deprecated-bg`]=c[0],r[`${s}-color-deprecated-border`]=c[2]};if(t.primaryColor){n(t.primaryColor,"primary");let a=new it(t.primaryColor),s=Ti(a.toRgbString());s.forEach((c,u)=>{r[`primary-${u+1}`]=c}),r["primary-color-deprecated-l-35"]=o(a,c=>c.lighten(35)),r["primary-color-deprecated-l-20"]=o(a,c=>c.lighten(20)),r["primary-color-deprecated-t-20"]=o(a,c=>c.tint(20)),r["primary-color-deprecated-t-50"]=o(a,c=>c.tint(50)),r["primary-color-deprecated-f-12"]=o(a,c=>c.setA(c.a*.12));let l=new it(s[0]);r["primary-color-active-deprecated-f-30"]=o(l,c=>c.setA(c.a*.3)),r["primary-color-active-deprecated-d-02"]=o(l,c=>c.darken(2))}return t.successColor&&n(t.successColor,"success"),t.warningColor&&n(t.warningColor,"warning"),t.errorColor&&n(t.errorColor,"error"),t.infoColor&&n(t.infoColor,"info"),` +'Noto Color Emoji'`,fontFamilyCode:"'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace",fontSize:14,lineWidth:1,lineType:"solid",motionUnit:.1,motionBase:0,motionEaseOutCirc:"cubic-bezier(0.08, 0.82, 0.17, 1)",motionEaseInOutCirc:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",motionEaseOut:"cubic-bezier(0.215, 0.61, 0.355, 1)",motionEaseInOut:"cubic-bezier(0.645, 0.045, 0.355, 1)",motionEaseOutBack:"cubic-bezier(0.12, 0.4, 0.29, 1.46)",motionEaseInBack:"cubic-bezier(0.71, -0.46, 0.88, 0.6)",motionEaseInQuint:"cubic-bezier(0.755, 0.05, 0.855, 0.06)",motionEaseOutQuint:"cubic-bezier(0.23, 1, 0.32, 1)",borderRadius:6,sizeUnit:4,sizeStep:4,sizePopupArrow:16,controlHeight:32,zIndexBase:0,zIndexPopupBase:1e3,opacityImage:1,wireframe:!1,motion:!0}),wa=bB;var sn=Math.round;function hC(e,t){let r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)n[o]=t(n[o]||0,r[o]||"",o);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}var WI=(e,t,r)=>r===0?e:e/100;function Rd(e,t){let r=t||255;return e>r?r:e<0?0:e}var gt=class e{constructor(t){_(this,"isValid",!0),_(this,"r",0),_(this,"g",0),_(this,"b",0),_(this,"a",1),_(this,"_h",void 0),_(this,"_s",void 0),_(this,"_l",void 0),_(this,"_v",void 0),_(this,"_max",void 0),_(this,"_min",void 0),_(this,"_brightness",void 0);function r(o){return o[0]in t&&o[1]in t&&o[2]in t}if(t)if(typeof t=="string"){let i=function(a){return o.startsWith(a)};var n=i;let o=t.trim();/^#?[A-F\d]{3,8}$/i.test(o)?this.fromHexString(o):i("rgb")?this.fromRgbString(o):i("hsl")?this.fromHslString(o):(i("hsv")||i("hsb"))&&this.fromHsvString(o)}else if(t instanceof e)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Rd(t.r),this.g=Rd(t.g),this.b=Rd(t.b),this.a=typeof t.a=="number"?Rd(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){let r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(i){let a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}let r=t(this.r),n=t(this.g),o=t(this.b);return .2126*r+.7152*n+.0722*o}getHue(){if(typeof this._h>"u"){let t=this.getMax()-this.getMin();t===0?this._h=0:this._h=sn(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g"u"){let t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){let r=this.getHue(),n=this.getSaturation(),o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:r,s:n,l:o,a:this.a})}lighten(t=10){let r=this.getHue(),n=this.getSaturation(),o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:r,s:n,l:o,a:this.a})}mix(t,r=50){let n=this._c(t),o=r/100,i=s=>(n[s]-this[s])*o+this[s],a={r:sn(i("r")),g:sn(i("g")),b:sn(i("b")),a:sn(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){let r=this._c(t),n=this.a+r.a*(1-this.a),o=i=>sn((this[i]*this.a+r[i]*r.a*(1-this.a))/n);return this._c({r:o("r"),g:o("g"),b:o("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#",r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;let n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;let o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){let i=sn(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let t=this.getHue(),r=sn(this.getSaturation()*100),n=sn(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){let o=this.clone();return o[t]=Rd(r,n),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){let r=t.replace("#","");function n(o,i){return parseInt(r[o]+r[i||o],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:o}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof o=="number"?o:1,r<=0){let p=sn(n*255);this.r=p,this.g=p,this.b=p}let i=0,a=0,s=0,l=t/60,c=(1-Math.abs(2*n-1))*r,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,a=u):l>=1&&l<2?(i=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(i=u,s=c):l>=5&&l<6&&(i=c,s=u);let f=n-c/2;this.r=sn((i+f)*255),this.g=sn((a+f)*255),this.b=sn((s+f)*255)}fromHsv({h:t,s:r,v:n,a:o}){this._h=t%360,this._s=r,this._v=n,this.a=typeof o=="number"?o:1;let i=sn(n*255);if(this.r=i,this.g=i,this.b=i,r<=0)return;let a=t/60,s=Math.floor(a),l=a-s,c=sn(n*(1-r)*255),u=sn(n*(1-r*l)*255),f=sn(n*(1-r*(1-l))*255);switch(s){case 0:this.g=f,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=f;break;case 3:this.r=c,this.g=u;break;case 4:this.r=f,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(t){let r=hC(t,WI);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=hC(t,WI);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){let r=hC(t,(n,o)=>o.includes("%")?sn(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}};var Th=2,BI=.16,SB=.05,CB=.05,wB=.15,UI=5,qI=4,EB=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function jI(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Th*t:Math.round(e.h)+Th*t:n=r?Math.round(e.h)+Th*t:Math.round(e.h)-Th*t,n<0?n+=360:n>=360&&(n-=360),n}function VI(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-BI*t:t===qI?n=e.s+BI:n=e.s+SB*t,n>1&&(n=1),r&&t===UI&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function HI(e,t,r){var n;return r?n=e.v+CB*t:n=e.v-wB*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Ri(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new gt(e),o=n.toHsv(),i=UI;i>0;i-=1){var a=new gt({h:jI(o,i,!0),s:VI(o,i,!0),v:HI(o,i,!0)});r.push(a)}r.push(n);for(var s=1;s<=qI;s+=1){var l=new gt({h:jI(o,s),s:VI(o,s),v:HI(o,s)});r.push(l)}return t.theme==="dark"?EB.map(function(c){var u=c.index,f=c.amount;return new gt(t.backgroundColor||"#141414").mix(r[u],f).toHexString()}):r.map(function(c){return c.toHexString()})}var Ea={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1677FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},vC=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];vC.primary=vC[5];var yC=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];yC.primary=yC[5];var xC=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];xC.primary=xC[5];var bC=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];bC.primary=bC[5];var SC=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];SC.primary=SC[5];var CC=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];CC.primary=CC[5];var wC=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];wC.primary=wC[5];var EC=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];EC.primary=EC[5];var Ts=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ts.primary=Ts[5];var RC=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];RC.primary=RC[5];var OC=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];OC.primary=OC[5];var _C=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];_C.primary=_C[5];var PC=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];PC.primary=PC[5];var Nh={red:vC,volcano:yC,orange:xC,gold:bC,yellow:SC,lime:CC,green:wC,cyan:EC,blue:Ts,geekblue:RC,purple:OC,magenta:_C,grey:PC},GI=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];GI.primary=GI[5];var KI=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];KI.primary=KI[5];var XI=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];XI.primary=XI[5];var YI=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];YI.primary=YI[5];var QI=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];QI.primary=QI[5];var JI=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];JI.primary=JI[5];var ZI=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];ZI.primary=ZI[5];var e2=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];e2.primary=e2[5];var t2=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];t2.primary=t2[5];var r2=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];r2.primary=r2[5];var n2=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];n2.primary=n2[5];var o2=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];o2.primary=o2[5];var i2=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];i2.primary=i2[5];function TC(e,{generateColorPalettes:t,generateNeutralColorPalettes:r}){let{colorSuccess:n,colorWarning:o,colorError:i,colorInfo:a,colorPrimary:s,colorBgBase:l,colorTextBase:c}=e,u=t(s),f=t(n),p=t(o),g=t(i),h=t(a),v=r(l,c),y=e.colorLink||e.colorInfo,m=t(y),d=new gt(g[1]).mix(new gt(g[3]),50).toHexString();return Object.assign(Object.assign({},v),{colorPrimaryBg:u[1],colorPrimaryBgHover:u[2],colorPrimaryBorder:u[3],colorPrimaryBorderHover:u[4],colorPrimaryHover:u[5],colorPrimary:u[6],colorPrimaryActive:u[7],colorPrimaryTextHover:u[8],colorPrimaryText:u[9],colorPrimaryTextActive:u[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:g[1],colorErrorBgHover:g[2],colorErrorBgFilledHover:d,colorErrorBgActive:g[3],colorErrorBorder:g[3],colorErrorBorderHover:g[4],colorErrorHover:g[5],colorError:g[6],colorErrorActive:g[7],colorErrorTextHover:g[8],colorErrorText:g[9],colorErrorTextActive:g[10],colorWarningBg:p[1],colorWarningBgHover:p[2],colorWarningBorder:p[3],colorWarningBorderHover:p[4],colorWarningHover:p[4],colorWarning:p[6],colorWarningActive:p[7],colorWarningTextHover:p[8],colorWarningText:p[9],colorWarningTextActive:p[10],colorInfoBg:h[1],colorInfoBgHover:h[2],colorInfoBorder:h[3],colorInfoBorderHover:h[4],colorInfoHover:h[4],colorInfo:h[6],colorInfoActive:h[7],colorInfoTextHover:h[8],colorInfoText:h[9],colorInfoTextActive:h[10],colorLinkHover:m[4],colorLink:m[6],colorLinkActive:m[7],colorBgMask:new gt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}var RB=e=>{let t=e,r=e,n=e,o=e;return e<6&&e>=5?t=e+1:e<16&&e>=6?t=e+2:e>=16&&(t=16),e<7&&e>=5?r=4:e<8&&e>=7?r=5:e<14&&e>=8?r=6:e<16&&e>=14?r=7:e>=16&&(r=8),e<6&&e>=2?n=1:e>=6&&(n=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e,borderRadiusXS:n,borderRadiusSM:r,borderRadiusLG:t,borderRadiusOuter:o}},a2=RB;function NC(e){let{motionUnit:t,motionBase:r,borderRadius:n,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(r+t).toFixed(1)}s`,motionDurationMid:`${(r+t*2).toFixed(1)}s`,motionDurationSlow:`${(r+t*3).toFixed(1)}s`,lineWidthBold:o+1},a2(n))}var OB=e=>{let{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},s2=OB;function su(e){return(e+8)/e}function IC(e){let t=Array.from({length:10}).map((r,n)=>{let o=n-1,i=e*Math.pow(Math.E,o/5),a=n>1?Math.floor(i):Math.ceil(i);return Math.floor(a/2)*2});return t[1]=e,t.map(r=>({size:r,lineHeight:su(r)}))}var _B=e=>{let t=IC(e),r=t.map(u=>u.size),n=t.map(u=>u.lineHeight),o=r[1],i=r[0],a=r[2],s=n[1],l=n[0],c=n[2];return{fontSizeSM:i,fontSize:o,fontSizeLG:a,fontSizeXL:r[3],fontSizeHeading1:r[6],fontSizeHeading2:r[5],fontSizeHeading3:r[4],fontSizeHeading4:r[3],fontSizeHeading5:r[2],lineHeight:s,lineHeightLG:c,lineHeightSM:l,fontHeight:Math.round(s*o),fontHeightLG:Math.round(c*a),fontHeightSM:Math.round(l*i),lineHeightHeading1:n[6],lineHeightHeading2:n[5],lineHeightHeading3:n[4],lineHeightHeading4:n[3],lineHeightHeading5:n[2]}},l2=_B;function $C(e){let{sizeUnit:t,sizeStep:r}=e;return{sizeXXL:t*(r+8),sizeXL:t*(r+4),sizeLG:t*(r+2),sizeMD:t*(r+1),sizeMS:t*r,size:t*r,sizeSM:t*(r-1),sizeXS:t*(r-2),sizeXXS:t*(r-3)}}var wo=(e,t)=>new gt(e).setA(t).toRgbString(),lu=(e,t)=>new gt(e).darken(t).toHexString();var c2=e=>{let t=Ri(e);return{1:t[0],2:t[1],3:t[2],4:t[3],5:t[4],6:t[5],7:t[6],8:t[4],9:t[5],10:t[6]}},u2=(e,t)=>{let r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:wo(n,.88),colorTextSecondary:wo(n,.65),colorTextTertiary:wo(n,.45),colorTextQuaternary:wo(n,.25),colorFill:wo(n,.15),colorFillSecondary:wo(n,.06),colorFillTertiary:wo(n,.04),colorFillQuaternary:wo(n,.02),colorBgSolid:wo(n,1),colorBgSolidHover:wo(n,.75),colorBgSolidActive:wo(n,.95),colorBgLayout:lu(r,4),colorBgContainer:lu(r,0),colorBgElevated:lu(r,0),colorBgSpotlight:wo(n,.85),colorBgBlur:"transparent",colorBorder:lu(r,15),colorBorderSecondary:lu(r,6)}};function DC(e){Ea.pink=Ea.magenta,Nh.pink=Nh.magenta;let t=Object.keys(gC).map(r=>{let n=e[r]===Ea[r]?Nh[r]:Ri(e[r]);return Array.from({length:10},()=>1).reduce((o,i,a)=>(o[`${r}-${a+1}`]=n[a],o[`${r}${a+1}`]=n[a],o),{})}).reduce((r,n)=>(r=Object.assign(Object.assign({},r),n),r),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),TC(e,{generateColorPalettes:c2,generateNeutralColorPalettes:u2})),l2(e.fontSize)),$C(e)),s2(e)),NC(e))}var PB=ws(DC),Od=PB;var _d={token:wa,override:{override:wa},hashed:!0},Pd=f2.default.createContext(_d);var Ih=E($()),Ns="ant",Td="anticon",AC=["outlined","borderless","filled","underlined"],TB=(e,t)=>t||(e?`${Ns}-${e}`:Ns),rt=Ih.createContext({getPrefixCls:TB,iconPrefixCls:Td}),{Consumer:NB}=rt,d2={};function no(e){let t=Ih.useContext(rt),{getPrefixCls:r,direction:n,getPopupContainer:o}=t,i=t[e];return Object.assign(Object.assign({classNames:d2,styles:d2},i),{getPrefixCls:r,direction:n,getPopupContainer:o})}var IB=`-ant-${Date.now()}-${Math.random()}`;function $B(e,t){let r={},n=(a,s)=>{let l=a.clone();return l=s?.(l)||l,l.toRgbString()},o=(a,s)=>{let l=new gt(a),c=Ri(l.toRgbString());r[`${s}-color`]=n(l),r[`${s}-color-disabled`]=c[1],r[`${s}-color-hover`]=c[4],r[`${s}-color-active`]=c[6],r[`${s}-color-outline`]=l.clone().setA(.2).toRgbString(),r[`${s}-color-deprecated-bg`]=c[0],r[`${s}-color-deprecated-border`]=c[2]};if(t.primaryColor){o(t.primaryColor,"primary");let a=new gt(t.primaryColor),s=Ri(a.toRgbString());s.forEach((c,u)=>{r[`primary-${u+1}`]=c}),r["primary-color-deprecated-l-35"]=n(a,c=>c.lighten(35)),r["primary-color-deprecated-l-20"]=n(a,c=>c.lighten(20)),r["primary-color-deprecated-t-20"]=n(a,c=>c.tint(20)),r["primary-color-deprecated-t-50"]=n(a,c=>c.tint(50)),r["primary-color-deprecated-f-12"]=n(a,c=>c.setA(c.a*.12));let l=new gt(s[0]);r["primary-color-active-deprecated-f-30"]=n(l,c=>c.setA(c.a*.3)),r["primary-color-active-deprecated-d-02"]=n(l,c=>c.darken(2))}return t.successColor&&o(t.successColor,"success"),t.warningColor&&o(t.warningColor,"warning"),t.errorColor&&o(t.errorColor,"error"),t.infoColor&&o(t.infoColor,"info"),` :root { ${Object.keys(r).map(a=>`--${e}-${a}: ${r[a]};`).join(` `)} } - `.trim()}function W2(e,t){let r=Jj(e,t);Yt()&&bo(r,`${Zj}-dynamic-theme`)}var Tu=E(I()),lw=Tu.createContext(!1),B2=e=>{let{children:t,disabled:r}=e,o=Tu.useContext(lw);return Tu.createElement(lw.Provider,{value:r??o},t)},Ur=lw;var uw=E(I());var Nu=E(I()),cw=Nu.createContext(void 0),j2=e=>{let{children:t,size:r}=e,o=Nu.useContext(cw);return Nu.createElement(cw.Provider,{value:r||o},t)},jl=cw;function e5(){let e=(0,uw.useContext)(Ur),t=(0,uw.useContext)(jl);return{componentDisabled:e,componentSize:t}}var V2=e5;var uv=E(I());var t5=ct(function e(){lt(this,e)}),iv=t5;var H2="CALC_UNIT",r5=new RegExp(H2,"g");function dw(e){return typeof e=="number"?"".concat(e).concat(H2):e}var U2=function(e){Ir(r,e);var t=$r(r);function r(o,n){var i;lt(this,r),i=t.call(this),T(et(i),"result",""),T(et(i),"unitlessCssVar",void 0),T(et(i),"lowPriority",void 0);var a=pe(o);return i.unitlessCssVar=n,o instanceof r?i.result="(".concat(o.result,")"):a==="number"?i.result=dw(o):a==="string"&&(i.result=o),i}return ct(r,[{key:"add",value:function(n){return n instanceof r?this.result="".concat(this.result," + ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," + ").concat(dw(n))),this.lowPriority=!0,this}},{key:"sub",value:function(n){return n instanceof r?this.result="".concat(this.result," - ").concat(n.getResult()):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," - ").concat(dw(n))),this.lowPriority=!0,this}},{key:"mul",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," * ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," * ").concat(n)),this.lowPriority=!1,this}},{key:"div",value:function(n){return this.lowPriority&&(this.result="(".concat(this.result,")")),n instanceof r?this.result="".concat(this.result," / ").concat(n.getResult(!0)):(typeof n=="number"||typeof n=="string")&&(this.result="".concat(this.result," / ").concat(n)),this.lowPriority=!1,this}},{key:"getResult",value:function(n){return this.lowPriority||n?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(n){var i=this,a=n||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=!1),this.result=this.result.replace(r5,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r}(iv);var o5=function(e){Ir(r,e);var t=$r(r);function r(o){var n;return lt(this,r),n=t.call(this),T(et(n),"result",0),o instanceof r?n.result=o.result:typeof o=="number"&&(n.result=o),n}return ct(r,[{key:"add",value:function(n){return n instanceof r?this.result+=n.result:typeof n=="number"&&(this.result+=n),this}},{key:"sub",value:function(n){return n instanceof r?this.result-=n.result:typeof n=="number"&&(this.result-=n),this}},{key:"mul",value:function(n){return n instanceof r?this.result*=n.result:typeof n=="number"&&(this.result*=n),this}},{key:"div",value:function(n){return n instanceof r?this.result/=n.result:typeof n=="number"&&(this.result/=n),this}},{key:"equal",value:function(){return this.result}}]),r}(iv),G2=o5;var n5=function(t,r){var o=t==="css"?U2:G2;return function(n){return new o(n,r)}},av=n5;var i5=function(t,r){return"".concat([r,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))},fw=i5;var sv=E(I());function Rt(e){var t=sv.useRef();t.current=e;var r=sv.useCallback(function(){for(var o,n=arguments.length,i=new Array(n),a=0;a1e4){var o=Date.now();this.lastAccessBeat.forEach(function(n,i){o-n>d5&&(r.map.delete(i),r.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),X2=new f5;function p5(e,t){return Y2.default.useMemo(function(){var r=X2.get(t);if(r)return r;var o=e();return X2.set(t,o),o},t)}var Q2=p5;var m5=function(){return{}},Z2=m5;function g5(e){var t=e.useCSP,r=t===void 0?Z2:t,o=e.useToken,n=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(f,m,h,v){var y=Array.isArray(f)?f[0]:f;function g(R){return"".concat(String(y)).concat(R.slice(0,1).toUpperCase()).concat(R.slice(1))}var p=v?.unitless||{},x=typeof s=="function"?s(f):{},S=P(P({},x),{},T({},g("zIndexPopup"),!0));Object.keys(p).forEach(function(R){S[g(R)]=p[R]});var b=P(P({},v),{},{unitless:S,prefixToken:g}),w=u(f,m,h,b),C=c(y,h,b);return function(R){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,O=w(R,_),N=B(O,2),k=N[1],L=C(_),j=B(L,2),W=j[0],D=j[1];return[W,k,D]}}function c(f,m,h){var v=h.unitless,y=h.injectStyle,g=y===void 0?!0:y,p=h.prefixToken,x=h.ignore,S=function(C){var R=C.rootCls,_=C.cssVar,O=_===void 0?{}:_,N=o(),k=N.realToken;return zC({path:[f],prefix:O.prefix,key:O.key,unitless:v,ignore:x,token:k,scope:R},function(){var L=hw(f,k,m),j=mw(f,k,L,{deprecatedTokens:h?.deprecatedTokens});return Object.keys(L).forEach(function(W){j[p(W)]=j[W],delete j[W]}),j}),null},b=function(C){var R=o(),_=R.cssVar;return[function(O){return g&&_?uv.default.createElement(uv.default.Fragment,null,uv.default.createElement(S,{rootCls:C,cssVar:_,component:f}),O):O},_?.key]};return b}function u(f,m,h){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=Array.isArray(f)?f:[f,f],g=B(y,1),p=g[0],x=y.join("-"),S=e.layer||{name:"antd"};return function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:b,C=o(),R=C.theme,_=C.realToken,O=C.hashId,N=C.token,k=C.cssVar,L=n(),j=L.rootPrefixCls,W=L.iconPrefixCls,D=r(),$=k?"css":"js",M=Q2(function(){var A=new Set;return k&&Object.keys(v.unitless||{}).forEach(function(G){A.add(vu(G,k.prefix)),A.add(vu(G,fw(p,k.prefix)))}),av($,A)},[$,p,k?.prefix]),V=K2($),F=V.max,z=V.min,U={theme:R,token:N,hashId:O,nonce:function(){return D.nonce},clientOnly:v.clientOnly,layer:S,order:v.order||-999};typeof i=="function"&&Fs(P(P({},U),{},{clientOnly:!1,path:["Shared",j]}),function(){return i(N,{prefix:{rootPrefixCls:j,iconPrefixCls:W},csp:D})});var H=Fs(P(P({},U),{},{path:[x,b,W]}),function(){if(v.injectStyle===!1)return[];var A=cv(N),G=A.token,q=A.flush,oe=hw(p,_,h),Z=".".concat(b),X=mw(p,_,oe,{deprecatedTokens:v.deprecatedTokens});k&&oe&&pe(oe)==="object"&&Object.keys(oe).forEach(function(Y){oe[Y]="var(".concat(vu(Y,fw(p,k.prefix)),")")});var ie=rt(G,{componentCls:Z,prefixCls:b,iconCls:".".concat(W),antCls:".".concat(j),calc:M,max:F,min:z},k?oe:X),te=m(ie,{hashId:O,prefixCls:b,rootPrefixCls:j,iconPrefixCls:W});q(p,X);var K=typeof a=="function"?a(ie,b,w,v.resetFont):null;return[v.resetStyle===!1?null:K,te]});return[H,O]}}function d(f,m,h){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=u(f,m,h,P({resetStyle:!1,order:-998},v)),g=function(x){var S=x.prefixCls,b=x.rootCls,w=b===void 0?S:b;return y(S,w),null};return g}return{genStyleHooks:l,genSubStyleComponent:d,genComponentStyleHook:u}}var vw=g5;var In=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var r$=E(I());var J2="5.24.7";var e$=J2;function yw(e){return e>=0&&e<=255}function h5(e,t){let{r,g:o,b:n,a:i}=new it(e).toRgb();if(i<1)return e;let{r:a,g:s,b:l}=new it(t).toRgb();for(let c=.01;c<=1;c+=.01){let u=Math.round((r-a*(1-c))/c),d=Math.round((o-s*(1-c))/c),f=Math.round((n-l*(1-c))/c);if(yw(u)&&yw(d)&&yw(f))return new it({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new it({r,g:o,b:n,a:1}).toRgbString()}var Vl=h5;var v5=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{delete o[f]});let n=Object.assign(Object.assign({},r),o),i=480,a=576,s=768,l=992,c=1200,u=1600;if(n.motion===!1){let f="0s";n.motionDurationFast=f,n.motionDurationMid=f,n.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},n),{colorFillContent:n.colorFillSecondary,colorFillContentHover:n.colorFill,colorFillAlter:n.colorFillQuaternary,colorBgContainerDisabled:n.colorFillTertiary,colorBorderBg:n.colorBgContainer,colorSplit:Vl(n.colorBorderSecondary,n.colorBgContainer),colorTextPlaceholder:n.colorTextQuaternary,colorTextDisabled:n.colorTextQuaternary,colorTextHeading:n.colorText,colorTextLabel:n.colorTextSecondary,colorTextDescription:n.colorTextTertiary,colorTextLightSolid:n.colorWhite,colorHighlight:n.colorError,colorBgTextHover:n.colorFillSecondary,colorBgTextActive:n.colorFill,colorIcon:n.colorTextTertiary,colorIconHover:n.colorText,colorErrorOutline:Vl(n.colorErrorBg,n.colorBgContainer),colorWarningOutline:Vl(n.colorWarningBg,n.colorBgContainer),fontSizeIcon:n.fontSizeSM,lineWidthFocus:n.lineWidth*3,lineWidth:n.lineWidth,controlOutlineWidth:n.lineWidth*2,controlInteractiveSize:n.controlHeight/2,controlItemBgHover:n.colorFillTertiary,controlItemBgActive:n.colorPrimaryBg,controlItemBgActiveHover:n.colorPrimaryBgHover,controlItemBgActiveDisabled:n.colorFill,controlTmpOutline:n.colorFillQuaternary,controlOutline:Vl(n.colorPrimaryBg,n.colorBgContainer),lineType:n.lineType,borderRadius:n.borderRadius,borderRadiusXS:n.borderRadiusXS,borderRadiusSM:n.borderRadiusSM,borderRadiusLG:n.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:n.sizeXXS,paddingXS:n.sizeXS,paddingSM:n.sizeSM,padding:n.size,paddingMD:n.sizeMD,paddingLG:n.sizeLG,paddingXL:n.sizeXL,paddingContentHorizontalLG:n.sizeLG,paddingContentVerticalLG:n.sizeMS,paddingContentHorizontal:n.sizeMS,paddingContentVertical:n.sizeSM,paddingContentHorizontalSM:n.size,paddingContentVerticalSM:n.sizeXS,marginXXS:n.sizeXXS,marginXS:n.sizeXS,marginSM:n.sizeSM,margin:n.size,marginMD:n.sizeMD,marginLG:n.sizeLG,marginXL:n.sizeXL,marginXXL:n.sizeXXL,boxShadow:` + `.trim()}function p2(e,t){let r=$B(e,t);Yt()&&yn(r,`${IB}-dynamic-theme`)}var cu=E($()),kC=cu.createContext(!1),m2=({children:e,disabled:t})=>{let r=cu.useContext(kC);return cu.createElement(kC.Provider,{value:t??r},e)},Ur=kC;var FC=E($());var uu=E($()),MC=uu.createContext(void 0),g2=({children:e,size:t})=>{let r=uu.useContext(MC);return uu.createElement(MC.Provider,{value:t||r},e)},Pl=MC;function DB(){let e=(0,FC.useContext)(Ur),t=(0,FC.useContext)(Pl);return{componentDisabled:e,componentSize:t}}var h2=DB;var Fh=E($());var AB=at(function e(){it(this,e)}),$h=AB;var v2="CALC_UNIT",kB=new RegExp(v2,"g");function LC(e){return typeof e=="number"?"".concat(e).concat(v2):e}var y2=function(e){Ir(r,e);var t=$r(r);function r(n,o){var i;it(this,r),i=t.call(this),_(Ze(i),"result",""),_(Ze(i),"unitlessCssVar",void 0),_(Ze(i),"lowPriority",void 0);var a=ue(n);return i.unitlessCssVar=o,n instanceof r?i.result="(".concat(n.result,")"):a==="number"?i.result=LC(n):a==="string"&&(i.result=n),i}return at(r,[{key:"add",value:function(o){return o instanceof r?this.result="".concat(this.result," + ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," + ").concat(LC(o))),this.lowPriority=!0,this}},{key:"sub",value:function(o){return o instanceof r?this.result="".concat(this.result," - ").concat(o.getResult()):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," - ").concat(LC(o))),this.lowPriority=!0,this}},{key:"mul",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof r?this.result="".concat(this.result," * ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," * ").concat(o)),this.lowPriority=!1,this}},{key:"div",value:function(o){return this.lowPriority&&(this.result="(".concat(this.result,")")),o instanceof r?this.result="".concat(this.result," / ").concat(o.getResult(!0)):(typeof o=="number"||typeof o=="string")&&(this.result="".concat(this.result," / ").concat(o)),this.lowPriority=!1,this}},{key:"getResult",value:function(o){return this.lowPriority||o?"(".concat(this.result,")"):this.result}},{key:"equal",value:function(o){var i=this,a=o||{},s=a.unit,l=!0;return typeof s=="boolean"?l=s:Array.from(this.unitlessCssVar).some(function(c){return i.result.includes(c)})&&(l=!1),this.result=this.result.replace(kB,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r}($h);var MB=function(e){Ir(r,e);var t=$r(r);function r(n){var o;return it(this,r),o=t.call(this),_(Ze(o),"result",0),n instanceof r?o.result=n.result:typeof n=="number"&&(o.result=n),o}return at(r,[{key:"add",value:function(o){return o instanceof r?this.result+=o.result:typeof o=="number"&&(this.result+=o),this}},{key:"sub",value:function(o){return o instanceof r?this.result-=o.result:typeof o=="number"&&(this.result-=o),this}},{key:"mul",value:function(o){return o instanceof r?this.result*=o.result:typeof o=="number"&&(this.result*=o),this}},{key:"div",value:function(o){return o instanceof r?this.result/=o.result:typeof o=="number"&&(this.result/=o),this}},{key:"equal",value:function(){return this.result}}]),r}($h),x2=MB;var FB=function(t,r){var n=t==="css"?y2:x2;return function(o){return new n(o,r)}},Dh=FB;var LB=function(t,r){return"".concat([r,t.replace(/([A-Z]+)([A-Z][a-z]+)/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2")].filter(Boolean).join("-"))},zC=LB;var Ah=E($());function wt(e){var t=Ah.useRef();t.current=e;var r=Ah.useCallback(function(){for(var n,o=arguments.length,i=new Array(o),a=0;a1e4){var n=Date.now();this.lastAccessBeat.forEach(function(o,i){n-o>HB&&(r.map.delete(i),r.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),C2=new UB;function qB(e,t){return w2.default.useMemo(function(){var r=C2.get(t);if(r)return r;var n=e();return C2.set(t,n),n},t)}var E2=qB;var GB=function(){return{}},R2=GB;function KB(e){var t=e.useCSP,r=t===void 0?R2:t,n=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(p,g,h,v){var y=Array.isArray(p)?p[0]:p;function m(R){return"".concat(String(y)).concat(R.slice(0,1).toUpperCase()).concat(R.slice(1))}var d=v?.unitless||{},x=typeof s=="function"?s(p):{},b=T(T({},x),{},_({},m("zIndexPopup"),!0));Object.keys(d).forEach(function(R){b[m(R)]=d[R]});var S=T(T({},v),{},{unitless:b,prefixToken:m}),w=u(p,g,h,S),C=c(y,h,S);return function(R){var P=arguments.length>1&&arguments[1]!==void 0?arguments[1]:R,O=w(R,P),A=B(O,2),F=A[1],M=C(P),H=B(M,2),L=H[0],N=H[1];return[L,F,N]}}function c(p,g,h){var v=h.unitless,y=h.injectStyle,m=y===void 0?!0:y,d=h.prefixToken,x=h.ignore,b=function(C){var R=C.rootCls,P=C.cssVar,O=P===void 0?{}:P,A=n(),F=A.realToken;return dC({path:[p],prefix:O.prefix,key:O.key,unitless:v,ignore:x,token:F,scope:R},function(){var M=VC(p,F,g),H=BC(p,F,M,{deprecatedTokens:h?.deprecatedTokens});return Object.keys(M).forEach(function(L){H[d(L)]=H[L],delete H[L]}),H}),null},S=function(C){var R=n(),P=R.cssVar;return[function(O){return m&&P?Fh.default.createElement(Fh.default.Fragment,null,Fh.default.createElement(b,{rootCls:C,cssVar:P,component:p}),O):O},P?.key]};return S}function u(p,g,h){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=Array.isArray(p)?p:[p,p],m=B(y,1),d=m[0],x=y.join("-"),b=e.layer||{name:"antd"};return function(S){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:S,C=n(),R=C.theme,P=C.realToken,O=C.hashId,A=C.token,F=C.cssVar,M=o(),H=M.rootPrefixCls,L=M.iconPrefixCls,N=r(),I=F?"css":"js",D=E2(function(){var k=new Set;return F&&Object.keys(v.unitless||{}).forEach(function(V){k.add(Qc(V,F.prefix)),k.add(Qc(V,zC(d,F.prefix)))}),Dh(I,k)},[I,d,F?.prefix]),U=S2(I),z=U.max,W=U.min,q={theme:R,token:A,hashId:O,nonce:function(){return N.nonce},clientOnly:v.clientOnly,layer:b,order:v.order||-999};typeof i=="function"&&Ps(T(T({},q),{},{clientOnly:!1,path:["Shared",H]}),function(){return i(A,{prefix:{rootPrefixCls:H,iconPrefixCls:L},csp:N})});var j=Ps(T(T({},q),{},{path:[x,S,L]}),function(){if(v.injectStyle===!1)return[];var k=Mh(A),V=k.token,G=k.flush,J=VC(d,P,h),Y=".".concat(S),X=BC(d,P,J,{deprecatedTokens:v.deprecatedTokens});F&&J&&ue(J)==="object"&&Object.keys(J).forEach(function(Q){J[Q]="var(".concat(Qc(Q,zC(d,F.prefix)),")")});var ae=ut(V,{componentCls:Y,prefixCls:S,iconCls:".".concat(L),antCls:".".concat(H),calc:D,max:z,min:W},F?J:X),Z=g(ae,{hashId:O,prefixCls:S,rootPrefixCls:H,iconPrefixCls:L});G(d,X);var K=typeof a=="function"?a(ae,S,w,v.resetFont):null;return[v.resetStyle===!1?null:K,Z]});return[j,O]}}function f(p,g,h){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=u(p,g,h,T({resetStyle:!1,order:-998},v)),m=function(x){var b=x.prefixCls,S=x.rootCls,w=S===void 0?b:S;return y(b,w),null};return m}return{genStyleHooks:l,genSubStyleComponent:f,genComponentStyleHook:u}}var HC=KB;var Eo=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var T2=E($());var O2="5.25.3";var _2=O2;function UC(e){return e>=0&&e<=255}function XB(e,t){let{r,g:n,b:o,a:i}=new gt(e).toRgb();if(i<1)return e;let{r:a,g:s,b:l}=new gt(t).toRgb();for(let c=.01;c<=1;c+=.01){let u=Math.round((r-a*(1-c))/c),f=Math.round((n-s*(1-c))/c),p=Math.round((o-l*(1-c))/c);if(UC(u)&&UC(f)&&UC(p))return new gt({r:u,g:f,b:p,a:Math.round(c*100)/100}).toRgbString()}return new gt({r,g:n,b:o,a:1}).toRgbString()}var Tl=XB;var YB=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{delete n[p]});let o=Object.assign(Object.assign({},r),n),i=480,a=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){let p="0s";o.motionDurationFast=p,o.motionDurationMid=p,o.motionDurationSlow=p}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Tl(o.colorBorderSecondary,o.colorBgContainer),colorTextPlaceholder:o.colorTextQuaternary,colorTextDisabled:o.colorTextQuaternary,colorTextHeading:o.colorText,colorTextLabel:o.colorTextSecondary,colorTextDescription:o.colorTextTertiary,colorTextLightSolid:o.colorWhite,colorHighlight:o.colorError,colorBgTextHover:o.colorFillSecondary,colorBgTextActive:o.colorFill,colorIcon:o.colorTextTertiary,colorIconHover:o.colorText,colorErrorOutline:Tl(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Tl(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*3,lineWidth:o.lineWidth,controlOutlineWidth:o.lineWidth*2,controlInteractiveSize:o.controlHeight/2,controlItemBgHover:o.colorFillTertiary,controlItemBgActive:o.colorPrimaryBg,controlItemBgActiveHover:o.colorPrimaryBgHover,controlItemBgActiveDisabled:o.colorFill,controlTmpOutline:o.colorFillQuaternary,controlOutline:Tl(o.colorPrimaryBg,o.colorBgContainer),lineType:o.lineType,borderRadius:o.borderRadius,borderRadiusXS:o.borderRadiusXS,borderRadiusSM:o.borderRadiusSM,borderRadiusLG:o.borderRadiusLG,fontWeightStrong:600,opacityLoading:.65,linkDecoration:"none",linkHoverDecoration:"none",linkFocusDecoration:"none",controlPaddingHorizontal:12,controlPaddingHorizontalSM:8,paddingXXS:o.sizeXXS,paddingXS:o.sizeXS,paddingSM:o.sizeSM,padding:o.size,paddingMD:o.sizeMD,paddingLG:o.sizeLG,paddingXL:o.sizeXL,paddingContentHorizontalLG:o.sizeLG,paddingContentVerticalLG:o.sizeMS,paddingContentHorizontal:o.sizeMS,paddingContentVertical:o.sizeSM,paddingContentHorizontalSM:o.size,paddingContentVerticalSM:o.sizeXS,marginXXS:o.sizeXXS,marginXS:o.sizeXS,marginSM:o.sizeSM,margin:o.size,marginMD:o.sizeMD,marginLG:o.sizeLG,marginXL:o.sizeXL,marginXXL:o.sizeXXL,boxShadow:` 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05) @@ -289,9 +289,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02) `,screenXS:i,screenXSMin:i,screenXSMax:a-1,screenSM:a,screenSMMin:a,screenSMMax:s-1,screenMD:s,screenMDMin:s,screenMDMax:l-1,screenLG:l,screenLGMin:l,screenLGMax:c-1,screenXL:c,screenXLMin:c,screenXLMax:u-1,screenXXL:u,screenXXLMin:u,boxShadowPopoverArrow:"2px 2px 5px rgba(0, 0, 0, 0.05)",boxShadowCard:` - 0 1px 2px -2px ${new it("rgba(0, 0, 0, 0.16)").toRgbString()}, - 0 3px 6px 0 ${new it("rgba(0, 0, 0, 0.12)").toRgbString()}, - 0 5px 12px 4px ${new it("rgba(0, 0, 0, 0.09)").toRgbString()} + 0 1px 2px -2px ${new gt("rgba(0, 0, 0, 0.16)").toRgbString()}, + 0 3px 6px 0 ${new gt("rgba(0, 0, 0, 0.12)").toRgbString()}, + 0 5px 12px 4px ${new gt("rgba(0, 0, 0, 0.09)").toRgbString()} `,boxShadowDrawerRight:` -6px 0 16px 0 rgba(0, 0, 0, 0.08), -3px 0 6px -4px rgba(0, 0, 0, 0.12), @@ -308,7 +308,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho 0 -6px 16px 0 rgba(0, 0, 0, 0.08), 0 -3px 6px -4px rgba(0, 0, 0, 0.12), 0 -9px 28px 8px rgba(0, 0, 0, 0.05) - `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),o)}var t$=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let o=r.getDerivativeToken(e),{override:n}=t,i=t$(t,["override"]),a=Object.assign(Object.assign({},o),{override:n});return a=dv(a),i&&Object.entries(i).forEach(s=>{let[l,c]=s,{theme:u}=c,d=t$(c,["theme"]),f=d;u&&(f=o$(Object.assign(Object.assign({},a),d),{override:d},u)),a[l]=f}),a};function yr(){let{token:e,hashed:t,theme:r,override:o,cssVar:n}=r$.default.useContext(ep),i=`${e$}-${t||""}`,a=r||Zf,[s,l,c]=zh(a,[Ia,e],{salt:i,override:o,getComputedToken:o$,formatToken:dv,cssVar:n&&{prefix:n.prefix,key:n.key,unitless:xw,ignore:y5,preserve:x5}});return[a,c,t?l:"",s,n]}var Sw=E(I());var Ni={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},Qt=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return{boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}},Aa=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),$u=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),n$=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),i$=(e,t,r,o)=>{let n=`[class^="${t}"], [class*=" ${t}"]`,i=r?`.${r}`:n,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},s={};return o!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},s),a),{[n]:a})}},bw=(e,t)=>({outline:`${re(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),fv=(e,t)=>({"&:focus-visible":Object.assign({},bw(e,t))}),pv=e=>({[`.${e}`]:Object.assign(Object.assign({},Aa()),{[`.${e} .${e}-icon`]:{display:"block"}})});var{genStyleHooks:Pt,genComponentStyleHook:Cw,genSubStyleComponent:ww}=vw({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,Sw.useContext)(at);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,r,o,n]=yr();return{theme:e,realToken:t,hashId:r,token:o,cssVar:n}},useCSP:()=>{let{csp:e}=(0,Sw.useContext)(at);return e??{}},getResetStyles:(e,t)=>{var r;let o=n$(e);return[o,{"&":o},pv((r=t?.prefix.iconPrefixCls)!==null&&r!==void 0?r:tp)]},getCommonStyle:i$,getCompUnitless:()=>xw});function mv(e,t){return In.reduce((r,o)=>{let n=e[`${o}1`],i=e[`${o}3`],a=e[`${o}6`],s=e[`${o}7`];return Object.assign(Object.assign({},r),t(o,{lightColor:n,lightBorderColor:i,darkColor:a,textColor:s}))},{})}var b5=(e,t)=>{let[r,o]=yr();return Fs({theme:r,token:o,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>[pv(e)])},gv=b5;var S5=E(I()),C5=Object.assign({},S5),{useId:a$}=C5,w5=()=>"",E5=typeof a$>"u"?w5:a$,s$=E5;function Ew(e,t,r){var o,n;let i=Zh("ConfigProvider"),a=e||{},s=a.inherit===!1||!t?Object.assign(Object.assign({},Jf),{hashed:(o=t?.hashed)!==null&&o!==void 0?o:Jf.hashed,cssVar:t?.cssVar}):t,l=s$();return Ki(()=>{var c,u;if(!e)return t;let d=Object.assign({},s.components);Object.keys(e.components||{}).forEach(h=>{d[h]=Object.assign(Object.assign({},d[h]),e.components[h])});let f=`css-var-${l.replace(/:/g,"")}`,m=((c=a.cssVar)!==null&&c!==void 0?c:s.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:r?.prefixCls},typeof s.cssVar=="object"?s.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((u=a.cssVar)===null||u===void 0?void 0:u.key)||f});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:d,cssVar:m})},[a,s],(c,u)=>c.some((d,f)=>{let m=u[f];return!Yi(d,m,!0)}))}var Av=E(I());var w$=E(Ee());var fn=E(I()),Dw=E(I());var hv=E(I()),R5=["children"],Rw=hv.createContext({});function vv(e){var t=e.children,r=Ae(e,R5);return hv.createElement(Rw.Provider,{value:r},t)}var l$=E(I()),O5=function(e){Ir(r,e);var t=$r(r);function r(){return lt(this,r),t.apply(this,arguments)}return ct(r,[{key:"render",value:function(){return this.props.children}}]),r}(l$.Component),c$=O5;var yv=E(I());function Ow(e){var t=yv.useReducer(function(s){return s+1},0),r=B(t,2),o=r[1],n=yv.useRef(e),i=Rt(function(){return n.current}),a=Rt(function(s){n.current=typeof s=="function"?s(n.current):s,o()});return[i,a]}var _v=E(I()),La=E(I());var Zi="none",rp="appear",op="enter",np="leave",_w="none",dn="prepare",Ma="start",Bs="active",xv="end",bv="prepared";var h$=E(I()),v$=E(I());function u$(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}function _5(e,t){var r={animationend:u$("Animation","AnimationEnd"),transitionend:u$("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var P5=_5(Yt(),typeof window<"u"?window:{}),f$={};Yt()&&(d$=document.createElement("div"),f$=d$.style);var d$,Sv={};function p$(e){if(Sv[e])return Sv[e];var t=P5[e];if(t)for(var r=Object.keys(t),o=r.length,n=0;n1&&arguments[1]!==void 0?arguments[1]:2;t();var i=ut(function(){n<=1?o({isCanceled:function(){return i!==e.current}}):r(o,n-1)});e.current=i}return Rv.useEffect(function(){return function(){t()}},[]),[r,t]};var N5=[dn,Ma,Bs,xv],I5=[dn,bv],Iw=!1,S$=!0;function Ov(e){return e===Bs||e===xv}var C$=function(e,t,r){var o=Da(_w),n=B(o,2),i=n[0],a=n[1],s=x$(),l=B(s,2),c=l[0],u=l[1];function d(){a(dn,!0)}var f=t?I5:N5;return Ev(function(){if(i!==_w&&i!==xv){var m=f.indexOf(i),h=f[m+1],v=r(i);v===Iw?a(h,!0):h&&c(function(y){function g(){y.isCanceled()||a(h,!0)}v===!0?g():Promise.resolve(v).then(g)})}},[e,i]),b$.useEffect(function(){return function(){u()}},[]),[d,i]};function $w(e,t,r,o){var n=o.motionEnter,i=n===void 0?!0:n,a=o.motionAppear,s=a===void 0?!0:a,l=o.motionLeave,c=l===void 0?!0:l,u=o.motionDeadline,d=o.motionLeaveImmediately,f=o.onAppearPrepare,m=o.onEnterPrepare,h=o.onLeavePrepare,v=o.onAppearStart,y=o.onEnterStart,g=o.onLeaveStart,p=o.onAppearActive,x=o.onEnterActive,S=o.onLeaveActive,b=o.onAppearEnd,w=o.onEnterEnd,C=o.onLeaveEnd,R=o.onVisibleChanged,_=Da(),O=B(_,2),N=O[0],k=O[1],L=Ow(Zi),j=B(L,2),W=j[0],D=j[1],$=Da(null),M=B($,2),V=M[0],F=M[1],z=W(),U=(0,La.useRef)(!1),H=(0,La.useRef)(null);function A(){return r()}var G=(0,La.useRef)(!1);function q(){D(Zi),F(null,!0)}var oe=Rt(function(ye){var we=W();if(we!==Zi){var ce=A();if(!(ye&&!ye.deadline&&ye.target!==ce)){var ae=G.current,Re;we===rp&&ae?Re=b?.(ce,ye):we===op&&ae?Re=w?.(ce,ye):we===np&&ae&&(Re=C?.(ce,ye)),ae&&Re!==!1&&q()}}}),Z=y$(oe),X=B(Z,1),ie=X[0],te=function(we){switch(we){case rp:return T(T(T({},dn,f),Ma,v),Bs,p);case op:return T(T(T({},dn,m),Ma,y),Bs,x);case np:return T(T(T({},dn,h),Ma,g),Bs,S);default:return{}}},K=_v.useMemo(function(){return te(z)},[z]),Y=C$(z,!e,function(ye){if(ye===dn){var we=K[dn];return we?we(A()):Iw}if(J in K){var ce;F(((ce=K[J])===null||ce===void 0?void 0:ce.call(K,A(),null))||null)}return J===Bs&&z!==Zi&&(ie(A()),u>0&&(clearTimeout(H.current),H.current=setTimeout(function(){oe({deadline:!0})},u))),J===bv&&q(),S$}),ne=B(Y,2),Q=ne[0],J=ne[1],le=Ov(J);G.current=le;var ue=(0,La.useRef)(null);Ev(function(){if(!(U.current&&ue.current===t)){k(t);var ye=U.current;U.current=!0;var we;!ye&&t&&s&&(we=rp),ye&&t&&i&&(we=op),(ye&&!t&&c||!ye&&d&&!t&&c)&&(we=np);var ce=te(we);we&&(e||ce[dn])?(D(we),Q()):D(Zi),ue.current=t}},[t]),(0,La.useEffect)(function(){(z===rp&&!s||z===op&&!i||z===np&&!c)&&D(Zi)},[s,i,c]),(0,La.useEffect)(function(){return function(){U.current=!1,clearTimeout(H.current)}},[]);var de=_v.useRef(!1);(0,La.useEffect)(function(){N&&(de.current=!0),N!==void 0&&z===Zi&&((de.current||N)&&R?.(N),de.current=!0)},[N,z]);var ve=V;return K[dn]&&J===Ma&&(ve=P({transition:"none"},ve)),[z,J,ve,N??t]}function $5(e){var t=e;pe(e)==="object"&&(t=e.transitionSupport);function r(n,i){return!!(n.motionName&&t&&i!==!1)}var o=fn.forwardRef(function(n,i){var a=n.visible,s=a===void 0?!0:a,l=n.removeOnLeave,c=l===void 0?!0:l,u=n.forceRender,d=n.children,f=n.motionName,m=n.leavedClassName,h=n.eventProps,v=fn.useContext(Rw),y=v.motion,g=r(n,y),p=(0,Dw.useRef)(),x=(0,Dw.useRef)();function S(){try{return p.current instanceof HTMLElement?p.current:Ll(x.current)}catch{return null}}var b=$w(g,s,S,n),w=B(b,4),C=w[0],R=w[1],_=w[2],O=w[3],N=fn.useRef(O);O&&(N.current=!0);var k=fn.useCallback(function(M){p.current=M,Wf(i,M)},[i]),L,j=P(P({},h),{},{visible:s});if(!d)L=null;else if(C===Zi)O?L=d(P({},j),k):!c&&N.current&&m?L=d(P(P({},j),{},{className:m}),k):u||!c&&!m?L=d(P(P({},j),{},{style:{display:"none"}}),k):L=null;else{var W;R===dn?W="prepare":Ov(R)?W="active":R===Ma&&(W="start");var D=Nw(f,"".concat(C,"-").concat(W));L=d(P(P({},j),{},{className:(0,w$.default)(Nw(f,C),T(T({},D,D&&W),f,typeof f=="string")),style:_}),k)}if(fn.isValidElement(L)&&wi(L)){var $=Ts(L);$||(L=fn.cloneElement(L,{ref:k}))}return fn.createElement(c$,{ref:x},L)});return o.displayName="CSSMotion",o}var Pv=$5(Cv);var Hl=E(I());var Tv="add",Nv="keep",Iv="remove",Dv="removed";function D5(e){var t;return e&&pe(e)==="object"&&"key"in e?t=e:t={key:e},P(P({},t),{},{key:String(t.key)})}function $v(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(D5)}function E$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[],o=0,n=t.length,i=$v(e),a=$v(t);i.forEach(function(c){for(var u=!1,d=o;d1});return l.forEach(function(c){r=r.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Iv}),r.forEach(function(u){u.key===c&&(u.status=Nv)})}),r}var A5=["component","children","onVisibleChanged","onAllRemoved"],M5=["status"],L5=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function k5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Pv,r=function(o){Ir(i,o);var n=$r(i);function i(){var a;lt(this,i);for(var s=arguments.length,l=new Array(s),c=0;cnull;var z5=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);nt.endsWith("Color"))}var G5=e=>{let{prefixCls:t,iconPrefixCls:r,theme:o,holderRender:n}=e;t!==void 0&&(O$=t),r!==void 0&&(B5=r),"holderRender"in e&&(V5=n),o&&(U5(o)?W2(H5(),o):j5=o)};var q5=e=>{let{children:t,csp:r,autoInsertSpaceInButton:o,alert:n,anchor:i,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:d,virtual:f,dropdownMatchSelectWidth:m,popupMatchSelectWidth:h,popupOverflow:v,legacyLocale:y,parentContext:g,iconPrefixCls:p,theme:x,componentDisabled:S,segmented:b,statistic:w,spin:C,calendar:R,carousel:_,cascader:O,collapse:N,typography:k,checkbox:L,descriptions:j,divider:W,drawer:D,skeleton:$,steps:M,image:V,layout:F,list:z,mentions:U,modal:H,progress:A,result:G,slider:q,breadcrumb:oe,menu:Z,pagination:X,input:ie,textArea:te,empty:K,badge:Y,radio:ne,rate:Q,switch:J,transfer:le,avatar:ue,message:de,tag:ve,table:ye,card:we,tabs:ce,timeline:ae,timePicker:Re,upload:Me,notification:Be,tree:Ie,colorPicker:Oe,datePicker:be,rangePicker:Ve,flex:He,wave:$e,dropdown:fe,warning:me,tour:ze,tooltip:Ce,popover:Ue,popconfirm:Qe,floatButtonGroup:gt,variant:Nt,inputNumber:ht,treeSelect:We}=e,Pe=ar.useCallback((Ke,ot)=>{let{prefixCls:kt}=e;if(ot)return ot;let It=kt||g.getPrefixCls("");return Ke?`${It}-${Ke}`:It},[g.getPrefixCls,e.prefixCls]),tt=p||g.iconPrefixCls||tp,De=r||g.csp;gv(tt,De);let Le=Ew(x,g.theme,{prefixCls:Pe("")}),Te={csp:De,autoInsertSpaceInButton:o,alert:n,anchor:i,locale:s||y,direction:c,space:u,splitter:d,virtual:f,popupMatchSelectWidth:h??m,popupOverflow:v,getPrefixCls:Pe,iconPrefixCls:tt,theme:Le,segmented:b,statistic:w,spin:C,calendar:R,carousel:_,cascader:O,collapse:N,typography:k,checkbox:L,descriptions:j,divider:W,drawer:D,skeleton:$,steps:M,image:V,input:ie,textArea:te,layout:F,list:z,mentions:U,modal:H,progress:A,result:G,slider:q,breadcrumb:oe,menu:Z,pagination:X,empty:K,badge:Y,radio:ne,rate:Q,switch:J,transfer:le,avatar:ue,message:de,tag:ve,table:ye,card:we,tabs:ce,timeline:ae,timePicker:Re,upload:Me,notification:Be,tree:Ie,colorPicker:Oe,datePicker:be,rangePicker:Ve,flex:He,wave:$e,dropdown:fe,warning:me,tour:ze,tooltip:Ce,popover:Ue,popconfirm:Qe,floatButtonGroup:gt,variant:Nt,inputNumber:ht,treeSelect:We},Ne=Object.assign({},g);Object.keys(Te).forEach(Ke=>{Te[Ke]!==void 0&&(Ne[Ke]=Te[Ke])}),W5.forEach(Ke=>{let ot=e[Ke];ot&&(Ne[Ke]=ot)}),typeof o<"u"&&(Ne.button=Object.assign({autoInsertSpace:o},Ne.button));let vt=Ki(()=>Ne,Ne,(Ke,ot)=>{let kt=Object.keys(Ke),It=Object.keys(ot);return kt.length!==It.length||kt.some(tr=>Ke[tr]!==ot[tr])}),{layer:Bt}=ar.useContext(Oi),je=ar.useMemo(()=>({prefixCls:tt,csp:De,layer:Bt?"antd":void 0}),[tt,De,Bt]),_e=ar.createElement(ar.Fragment,null,ar.createElement(R$,{dropdownMatchSelectWidth:m}),t),Ze=ar.useMemo(()=>{var Ke,ot,kt,It;return Na(((Ke=_i.Form)===null||Ke===void 0?void 0:Ke.defaultValidateMessages)||{},((kt=(ot=vt.locale)===null||ot===void 0?void 0:ot.Form)===null||kt===void 0?void 0:kt.defaultValidateMessages)||{},((It=vt.form)===null||It===void 0?void 0:It.validateMessages)||{},a?.validateMessages||{})},[vt,a?.validateMessages]);Object.keys(Ze).length>0&&(_e=ar.createElement(o2.Provider,{value:Ze},_e)),s&&(_e=ar.createElement(f2,{locale:s,_ANT_MARK__:d2},_e)),(tt||De)&&(_e=ar.createElement(Eu.Provider,{value:je},_e)),l&&(_e=ar.createElement(j2,{size:l},_e)),_e=ar.createElement(Mw,null,_e);let Je=ar.useMemo(()=>{let Ke=Le||{},{algorithm:ot,token:kt,components:It,cssVar:tr}=Ke,Ft=z5(Ke,["algorithm","token","components","cssVar"]),rr=ot&&(!Array.isArray(ot)||ot.length>0)?Ds(ot):Zf,dr={};Object.entries(It||{}).forEach(Wo=>{let[pr,Or]=Wo,Se=Object.assign({},Or);"algorithm"in Se&&(Se.algorithm===!0?Se.theme=rr:(Array.isArray(Se.algorithm)||typeof Se.algorithm=="function")&&(Se.theme=Ds(Se.algorithm)),delete Se.algorithm),dr[pr]=Se});let fr=Object.assign(Object.assign({},Ia),kt);return Object.assign(Object.assign({},Ft),{theme:rr,token:fr,components:dr,override:Object.assign({override:fr},dr),cssVar:tr})},[Le]);return x&&(_e=ar.createElement(ep.Provider,{value:Je},_e)),vt.warning&&(_e=ar.createElement(t2.Provider,{value:vt.warning},_e)),S!==void 0&&(_e=ar.createElement(B2,{disabled:S},_e)),ar.createElement(at.Provider,{value:vt},_e)},Du=e=>{let t=ar.useContext(at),r=ar.useContext(Ru);return ar.createElement(q5,Object.assign({parentContext:t,legacyLocale:r},e))};Du.ConfigContext=at;Du.SizeContext=jl;Du.config=G5;Du.useConfig=V2;Object.defineProperty(Du,"SizeContext",{get:()=>jl});var ka=Du;var zv=E(I());var K5={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},_$=K5;var ql=E(I()),A$=E(Ee());var $$=E(I());function P$(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function X5(e){return P$(e)instanceof ShadowRoot}function Ul(e){return X5(e)?P$(e):null}var Gl=E(I());function Y5(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function N$(e,t){Vt(e,"[@ant-design/icons] ".concat(t))}function Lw(e){return pe(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(pe(e.icon)==="object"||typeof e.icon=="function")}function T$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var o=e[r];switch(r){case"class":t.className=o,delete t.class;break;default:delete t[r],t[Y5(r)]=o}return t},{})}function Mv(e,t,r){return r?Gl.default.createElement(e.tag,P(P({key:t},T$(e.attrs)),r),(e.children||[]).map(function(o,n){return Mv(o,"".concat(t,"-").concat(e.tag,"-").concat(n))})):Gl.default.createElement(e.tag,P({key:t},T$(e.attrs)),(e.children||[]).map(function(o,n){return Mv(o,"".concat(t,"-").concat(e.tag,"-").concat(n))}))}function kw(e){return Ti(e)[0]}function Lv(e){return e?Array.isArray(e)?e:[e]:[]}var Q5=` + `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),n)}var P2=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let n=r.getDerivativeToken(e),{override:o}=t,i=P2(t,["override"]),a=Object.assign(Object.assign({},n),{override:o});return a=Lh(a),i&&Object.entries(i).forEach(([s,l])=>{let{theme:c}=l,u=P2(l,["theme"]),f=u;c&&(f=N2(Object.assign(Object.assign({},a),u),{override:u},c)),a[s]=f}),a};function xr(){let{token:e,hashed:t,theme:r,override:n,cssVar:o}=T2.default.useContext(Pd),i=`${_2}-${t||""}`,a=r||Od,[s,l,c]=dh(a,[wa,e],{salt:i,override:n,getComputedToken:N2,formatToken:Lh,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:qC,ignore:QB,preserve:JB}});return[a,c,t?l:"",s,o]}var KC=E($());var Oa={overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},sr=(e,t=!1)=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:t?"inherit":e.fontFamily}),_a=()=>({display:"inline-flex",alignItems:"center",color:"inherit",fontStyle:"normal",lineHeight:0,textAlign:"center",textTransform:"none",verticalAlign:"-0.125em",textRendering:"optimizeLegibility","-webkit-font-smoothing":"antialiased","-moz-osx-font-smoothing":"grayscale","> *":{lineHeight:1},svg:{display:"inline-block"}}),du=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),I2=e=>({a:{color:e.colorLink,textDecoration:e.linkDecoration,backgroundColor:"transparent",outline:"none",cursor:"pointer",transition:`color ${e.motionDurationSlow}`,"-webkit-text-decoration-skip":"objects","&:hover":{color:e.colorLinkHover},"&:active":{color:e.colorLinkActive},"&:active, &:hover":{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),$2=(e,t,r,n)=>{let o=`[class^="${t}"], [class*=" ${t}"]`,i=r?`.${r}`:o,a={boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}},s={};return n!==!1&&(s={fontFamily:e.fontFamily,fontSize:e.fontSize}),{[i]:Object.assign(Object.assign(Object.assign({},s),a),{[o]:a})}},GC=(e,t)=>({outline:`${oe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),D2=(e,t)=>({"&:focus-visible":Object.assign({},GC(e,t))}),zh=e=>({[`.${e}`]:Object.assign(Object.assign({},_a()),{[`.${e} .${e}-icon`]:{display:"block"}})});var{genStyleHooks:Gt,genComponentStyleHook:XC,genSubStyleComponent:YC}=HC({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,KC.useContext)(rt);return{rootPrefixCls:e(),iconPrefixCls:t}},useToken:()=>{let[e,t,r,n,o]=xr();return{theme:e,realToken:t,hashId:r,token:n,cssVar:o}},useCSP:()=>{let{csp:e}=(0,KC.useContext)(rt);return e??{}},getResetStyles:(e,t)=>{var r;let n=I2(e);return[n,{"&":n},zh((r=t?.prefix.iconPrefixCls)!==null&&r!==void 0?r:Td)]},getCommonStyle:$2,getCompUnitless:()=>qC});function Wh(e,t){return Eo.reduce((r,n)=>{let o=e[`${n}1`],i=e[`${n}3`],a=e[`${n}6`],s=e[`${n}7`];return Object.assign(Object.assign({},r),t(n,{lightColor:o,lightBorderColor:i,darkColor:a,textColor:s}))},{})}var ZB=(e,t)=>{let[r,n]=xr();return Ps({theme:r,token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>[zh(e)])},Bh=ZB;var ej=E($()),tj=Object.assign({},ej),{useId:A2}=tj,rj=()=>"",nj=typeof A2>"u"?rj:A2,k2=nj;function QC(e,t,r){var n,o;let i=Rh("ConfigProvider"),a=e||{},s=a.inherit===!1||!t?Object.assign(Object.assign({},_d),{hashed:(n=t?.hashed)!==null&&n!==void 0?n:_d.hashed,cssVar:t?.cssVar}):t,l=k2();return Hi(()=>{var c,u;if(!e)return t;let f=Object.assign({},s.components);Object.keys(e.components||{}).forEach(h=>{f[h]=Object.assign(Object.assign({},f[h]),e.components[h])});let p=`css-var-${l.replace(/:/g,"")}`,g=((c=a.cssVar)!==null&&c!==void 0?c:s.cssVar)&&Object.assign(Object.assign(Object.assign({prefix:r?.prefixCls},typeof s.cssVar=="object"?s.cssVar:{}),typeof a.cssVar=="object"?a.cssVar:{}),{key:typeof a.cssVar=="object"&&((u=a.cssVar)===null||u===void 0?void 0:u.key)||p});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:f,cssVar:g})},[a,s],(c,u)=>c.some((f,p)=>{let g=u[p];return!Cs(f,g,!0)}))}var av=E($());var Q2=E(Ne());var io=E($()),aw=E($());var jh=E($()),oj=["children"],JC=jh.createContext({});function Vh(e){var t=e.children,r=Ve(e,oj);return jh.createElement(JC.Provider,{value:r},t)}var M2=E($()),ij=function(e){Ir(r,e);var t=$r(r);function r(){return it(this,r),t.apply(this,arguments)}return at(r,[{key:"render",value:function(){return this.props.children}}]),r}(M2.Component),F2=ij;var Hh=E($());function ZC(e){var t=Hh.useReducer(function(s){return s+1},0),r=B(t,2),n=r[1],o=Hh.useRef(e),i=wt(function(){return o.current}),a=wt(function(s){o.current=typeof s=="function"?s(o.current):s,n()});return[i,a]}var Zh=E($()),Ta=E($());var Gi="none",Nd="appear",Id="enter",$d="leave",ew="none",oo="prepare",Pa="start",Is="active",Uh="end",qh="prepared";var H2=E($()),U2=E($());function L2(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit".concat(e)]="webkit".concat(t),r["Moz".concat(e)]="moz".concat(t),r["ms".concat(e)]="MS".concat(t),r["O".concat(e)]="o".concat(t.toLowerCase()),r}function aj(e,t){var r={animationend:L2("Animation","AnimationEnd"),transitionend:L2("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var sj=aj(Yt(),typeof window<"u"?window:{}),W2={};Yt()&&(z2=document.createElement("div"),W2=z2.style);var z2,Gh={};function B2(e){if(Gh[e])return Gh[e];var t=sj[e];if(t)for(var r=Object.keys(t),n=r.length,o=0;o1&&arguments[1]!==void 0?arguments[1]:2;t();var i=dt(function(){o<=1?n({isCanceled:function(){return i!==e.current}}):r(n,o-1)});e.current=i}return Qh.useEffect(function(){return function(){t()}},[]),[r,t]};var cj=[oo,Pa,Is,Uh],uj=[oo,qh],ow=!1,X2=!0;function Jh(e){return e===Is||e===Uh}var Y2=function(e,t,r){var n=Ra(ew),o=B(n,2),i=o[0],a=o[1],s=G2(),l=B(s,2),c=l[0],u=l[1];function f(){a(oo,!0)}var p=t?uj:cj;return Yh(function(){if(i!==ew&&i!==Uh){var g=p.indexOf(i),h=p[g+1],v=r(i);v===ow?a(h,!0):h&&c(function(y){function m(){y.isCanceled()||a(h,!0)}v===!0?m():Promise.resolve(v).then(m)})}},[e,i]),K2.useEffect(function(){return function(){u()}},[]),[f,i]};function iw(e,t,r,n){var o=n.motionEnter,i=o===void 0?!0:o,a=n.motionAppear,s=a===void 0?!0:a,l=n.motionLeave,c=l===void 0?!0:l,u=n.motionDeadline,f=n.motionLeaveImmediately,p=n.onAppearPrepare,g=n.onEnterPrepare,h=n.onLeavePrepare,v=n.onAppearStart,y=n.onEnterStart,m=n.onLeaveStart,d=n.onAppearActive,x=n.onEnterActive,b=n.onLeaveActive,S=n.onAppearEnd,w=n.onEnterEnd,C=n.onLeaveEnd,R=n.onVisibleChanged,P=Ra(),O=B(P,2),A=O[0],F=O[1],M=ZC(Gi),H=B(M,2),L=H[0],N=H[1],I=Ra(null),D=B(I,2),U=D[0],z=D[1],W=L(),q=(0,Ta.useRef)(!1),j=(0,Ta.useRef)(null);function k(){return r()}var V=(0,Ta.useRef)(!1);function G(){N(Gi),z(null,!0)}var J=wt(function(Ce){var De=L();if(De!==Gi){var ce=k();if(!(Ce&&!Ce.deadline&&Ce.target!==ce)){var ie=V.current,Re;De===Nd&&ie?Re=S?.(ce,Ce):De===Id&&ie?Re=w?.(ce,Ce):De===$d&&ie&&(Re=C?.(ce,Ce)),ie&&Re!==!1&&G()}}}),Y=q2(J),X=B(Y,1),ae=X[0],Z=function(De){switch(De){case Nd:return _(_(_({},oo,p),Pa,v),Is,d);case Id:return _(_(_({},oo,g),Pa,y),Is,x);case $d:return _(_(_({},oo,h),Pa,m),Is,b);default:return{}}},K=Zh.useMemo(function(){return Z(W)},[W]),Q=Y2(W,!e,function(Ce){if(Ce===oo){var De=K[oo];return De?De(k()):ow}if(ne in K){var ce;z(((ce=K[ne])===null||ce===void 0?void 0:ce.call(K,k(),null))||null)}return ne===Is&&W!==Gi&&(ae(k()),u>0&&(clearTimeout(j.current),j.current=setTimeout(function(){J({deadline:!0})},u))),ne===qh&&G(),X2}),re=B(Q,2),ee=re[0],ne=re[1],de=Jh(ne);V.current=de;var le=(0,Ta.useRef)(null);Yh(function(){if(!(q.current&&le.current===t)){F(t);var Ce=q.current;q.current=!0;var De;!Ce&&t&&s&&(De=Nd),Ce&&t&&i&&(De=Id),(Ce&&!t&&c||!Ce&&f&&!t&&c)&&(De=$d);var ce=Z(De);De&&(e||ce[oo])?(N(De),ee()):N(Gi),le.current=t}},[t]),(0,Ta.useEffect)(function(){(W===Nd&&!s||W===Id&&!i||W===$d&&!c)&&N(Gi)},[s,i,c]),(0,Ta.useEffect)(function(){return function(){q.current=!1,clearTimeout(j.current)}},[]);var pe=Zh.useRef(!1);(0,Ta.useEffect)(function(){A&&(pe.current=!0),A!==void 0&&W===Gi&&((pe.current||A)&&R?.(A),pe.current=!0)},[A,W]);var Oe=U;return K[oo]&&ne===Pa&&(Oe=T({transition:"none"},Oe)),[W,ne,Oe,A??t]}function fj(e){var t=e;ue(e)==="object"&&(t=e.transitionSupport);function r(o,i){return!!(o.motionName&&t&&i!==!1)}var n=io.forwardRef(function(o,i){var a=o.visible,s=a===void 0?!0:a,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,f=o.children,p=o.motionName,g=o.leavedClassName,h=o.eventProps,v=io.useContext(JC),y=v.motion,m=r(o,y),d=(0,aw.useRef)(),x=(0,aw.useRef)();function b(){try{return d.current instanceof HTMLElement?d.current:Cl(x.current)}catch{return null}}var S=iw(m,s,b,o),w=B(S,4),C=w[0],R=w[1],P=w[2],O=w[3],A=io.useRef(O);O&&(A.current=!0);var F=io.useCallback(function(D){d.current=D,md(i,D)},[i]),M,H=T(T({},h),{},{visible:s});if(!f)M=null;else if(C===Gi)O?M=f(T({},H),F):!c&&A.current&&g?M=f(T(T({},H),{},{className:g}),F):u||!c&&!g?M=f(T(T({},H),{},{style:{display:"none"}}),F):M=null;else{var L;R===oo?L="prepare":Jh(R)?L="active":R===Pa&&(L="start");var N=nw(p,"".concat(C,"-").concat(L));M=f(T(T({},H),{},{className:(0,Q2.default)(nw(p,C),_(_({},N,N&&L),p,typeof p=="string")),style:P}),F)}if(io.isValidElement(M)&&bi(M)){var I=ys(M);I||(M=io.cloneElement(M,{ref:F}))}return io.createElement(F2,{ref:x},M)});return n.displayName="CSSMotion",n}var ev=fj(Kh);var Nl=E($());var tv="add",rv="keep",nv="remove",iv="removed";function dj(e){var t;return e&&ue(e)==="object"&&"key"in e?t=e:t={key:e},T(T({},t),{},{key:String(t.key)})}function ov(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(dj)}function J2(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=[],n=0,o=t.length,i=ov(e),a=ov(t);i.forEach(function(c){for(var u=!1,f=n;f1});return l.forEach(function(c){r=r.filter(function(u){var f=u.key,p=u.status;return f!==c||p!==nv}),r.forEach(function(u){u.key===c&&(u.status=rv)})}),r}var pj=["component","children","onVisibleChanged","onAllRemoved"],mj=["status"],gj=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function hj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ev,r=function(n){Ir(i,n);var o=$r(i);function i(){var a;it(this,i);for(var s=arguments.length,l=new Array(s),c=0;cnull;var yj=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);ot.endsWith("Color"))}var Rj=e=>{let{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:o}=e;t!==void 0&&(e$=t),r!==void 0&&(bj=r),"holderRender"in e&&(Cj=o),n&&(Ej(n)?p2(wj(),n):Sj=n)};var Oj=e=>{let{children:t,csp:r,autoInsertSpaceInButton:n,alert:o,anchor:i,form:a,locale:s,componentSize:l,direction:c,space:u,splitter:f,virtual:p,dropdownMatchSelectWidth:g,popupMatchSelectWidth:h,popupOverflow:v,legacyLocale:y,parentContext:m,iconPrefixCls:d,theme:x,componentDisabled:b,segmented:S,statistic:w,spin:C,calendar:R,carousel:P,cascader:O,collapse:A,typography:F,checkbox:M,descriptions:H,divider:L,drawer:N,skeleton:I,steps:D,image:U,layout:z,list:W,mentions:q,modal:j,progress:k,result:V,slider:G,breadcrumb:J,menu:Y,pagination:X,input:ae,textArea:Z,empty:K,badge:Q,radio:re,rate:ee,switch:ne,transfer:de,avatar:le,message:pe,tag:Oe,table:Ce,card:De,tabs:ce,timeline:ie,timePicker:Re,upload:Le,notification:Ge,tree:Me,colorPicker:Ie,datePicker:je,rangePicker:We,flex:He,wave:ye,dropdown:se,warning:xe,tour:_e,tooltip:he,popover:Je,popconfirm:lt,floatButtonGroup:Et,variant:Pt,inputNumber:pt,treeSelect:Ae}=e,we=lr.useCallback((ze,tt)=>{let{prefixCls:At}=e;if(tt)return tt;let Tt=At||m.getPrefixCls("");return ze?`${Tt}-${ze}`:Tt},[m.getPrefixCls,e.prefixCls]),et=d||m.iconPrefixCls||Td,Pe=r||m.csp;Bh(et,Pe);let $e=QC(x,m.theme,{prefixCls:we("")}),Ee={csp:Pe,autoInsertSpaceInButton:n,alert:o,anchor:i,locale:s||y,direction:c,space:u,splitter:f,virtual:p,popupMatchSelectWidth:h??g,popupOverflow:v,getPrefixCls:we,iconPrefixCls:et,theme:$e,segmented:S,statistic:w,spin:C,calendar:R,carousel:P,cascader:O,collapse:A,typography:F,checkbox:M,descriptions:H,divider:L,drawer:N,skeleton:I,steps:D,image:U,input:ae,textArea:Z,layout:z,list:W,mentions:q,modal:j,progress:k,result:V,slider:G,breadcrumb:J,menu:Y,pagination:X,empty:K,badge:Q,radio:re,rate:ee,switch:ne,transfer:de,avatar:le,message:pe,tag:Oe,table:Ce,card:De,tabs:ce,timeline:ie,timePicker:Re,upload:Le,notification:Ge,tree:Me,colorPicker:Ie,datePicker:je,rangePicker:We,flex:He,wave:ye,dropdown:se,warning:xe,tour:_e,tooltip:he,popover:Je,popconfirm:lt,floatButtonGroup:Et,variant:Pt,inputNumber:pt,treeSelect:Ae},be=Object.assign({},m);Object.keys(Ee).forEach(ze=>{Ee[ze]!==void 0&&(be[ze]=Ee[ze])}),xj.forEach(ze=>{let tt=e[ze];tt&&(be[ze]=tt)}),typeof n<"u"&&(be.button=Object.assign({autoInsertSpace:n},be.button));let ht=Hi(()=>be,be,(ze,tt)=>{let At=Object.keys(ze),Tt=Object.keys(tt);return At.length!==Tt.length||At.some(tr=>ze[tr]!==tt[tr])}),{layer:Mt}=lr.useContext(wi),Fe=lr.useMemo(()=>({prefixCls:et,csp:Pe,layer:Mt?"antd":void 0}),[et,Pe,Mt]),Se=lr.createElement(lr.Fragment,null,lr.createElement(Z2,{dropdownMatchSelectWidth:g}),t),Ke=lr.useMemo(()=>{var ze,tt,At,Tt;return Sa(((ze=Ei.Form)===null||ze===void 0?void 0:ze.defaultValidateMessages)||{},((At=(tt=ht.locale)===null||tt===void 0?void 0:tt.Form)===null||At===void 0?void 0:At.defaultValidateMessages)||{},((Tt=ht.form)===null||Tt===void 0?void 0:Tt.validateMessages)||{},a?.validateMessages||{})},[ht,a?.validateMessages]);Object.keys(Ke).length>0&&(Se=lr.createElement(NI.Provider,{value:Ke},Se)),s&&(Se=lr.createElement(zI,{locale:s,_ANT_MARK__:LI},Se)),(et||Pe)&&(Se=lr.createElement(ou.Provider,{value:Fe},Se)),l&&(Se=lr.createElement(g2,{size:l},Se)),Se=lr.createElement(lw,null,Se);let Be=lr.useMemo(()=>{let ze=$e||{},{algorithm:tt,token:At,components:Tt,cssVar:tr}=ze,Ft=yj(ze,["algorithm","token","components","cssVar"]),rr=tt&&(!Array.isArray(tt)||tt.length>0)?ws(tt):Od,pr={};Object.entries(Tt||{}).forEach(([kn,gr])=>{let Lt=Object.assign({},gr);"algorithm"in Lt&&(Lt.algorithm===!0?Lt.theme=rr:(Array.isArray(Lt.algorithm)||typeof Lt.algorithm=="function")&&(Lt.theme=ws(Lt.algorithm)),delete Lt.algorithm),pr[kn]=Lt});let mr=Object.assign(Object.assign({},wa),At);return Object.assign(Object.assign({},Ft),{theme:rr,token:mr,components:pr,override:Object.assign({override:mr},pr),cssVar:tr})},[$e]);return x&&(Se=lr.createElement(Pd.Provider,{value:Be},Se)),ht.warning&&(Se=lr.createElement(PI.Provider,{value:ht.warning},Se)),b!==void 0&&(Se=lr.createElement(m2,{disabled:b},Se)),lr.createElement(rt.Provider,{value:ht},Se)},pu=e=>{let t=lr.useContext(rt),r=lr.useContext(iu);return lr.createElement(Oj,Object.assign({parentContext:t,legacyLocale:r},e))};pu.ConfigContext=rt;pu.SizeContext=Pl;pu.config=Rj;pu.useConfig=h2;Object.defineProperty(pu,"SizeContext",{get:()=>Pl});var Na=pu;var fv=E($());var _j={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},t$=_j;var Dl=E($()),l$=E(Ne());var a$=E($());function r$(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function Pj(e){return r$(e)instanceof ShadowRoot}function Il(e){return Pj(e)?r$(e):null}var $l=E($());function Tj(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function o$(e,t){Vt(e,"[@ant-design/icons] ".concat(t))}function cw(e){return ue(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(ue(e.icon)==="object"||typeof e.icon=="function")}function n$(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,r){var n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[Tj(r)]=n}return t},{})}function sv(e,t,r){return r?$l.default.createElement(e.tag,T(T({key:t},n$(e.attrs)),r),(e.children||[]).map(function(n,o){return sv(n,"".concat(t,"-").concat(e.tag,"-").concat(o))})):$l.default.createElement(e.tag,T({key:t},n$(e.attrs)),(e.children||[]).map(function(n,o){return sv(n,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function uw(e){return Ri(e)[0]}function lv(e){return e?Array.isArray(e)?e:[e]:[]}var Nj=` .anticon { display: inline-flex; align-items: center; @@ -363,9 +363,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho transform: rotate(360deg); } } -`,I$=function(t){var r=(0,Gl.useContext)(Eu),o=r.csp,n=r.prefixCls,i=r.layer,a=Q5;n&&(a=a.replace(/anticon/g,n)),i&&(a="@layer ".concat(i,` { +`,i$=function(t){var r=(0,$l.useContext)(ou),n=r.csp,o=r.prefixCls,i=r.layer,a=Nj;o&&(a=a.replace(/anticon/g,o)),i&&(a="@layer ".concat(i,` { `).concat(a,` -}`)),(0,Gl.useEffect)(function(){var s=t.current,l=Ul(s);bo(a,"@ant-design-icons",{prepend:!i,csp:o,attachTo:l})},[])};var Z5=["icon","className","onClick","style","primaryColor","secondaryColor"],ip={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function J5(e){var t=e.primaryColor,r=e.secondaryColor;ip.primaryColor=t,ip.secondaryColor=r||kw(t),ip.calculated=!!r}function e8(){return P({},ip)}var kv=function(t){var r=t.icon,o=t.className,n=t.onClick,i=t.style,a=t.primaryColor,s=t.secondaryColor,l=Ae(t,Z5),c=$$.useRef(),u=ip;if(a&&(u={primaryColor:a,secondaryColor:s||kw(a)}),I$(c),N$(Lw(r),"icon should be icon definiton, but got ".concat(r)),!Lw(r))return null;var d=r;return d&&typeof d.icon=="function"&&(d=P(P({},d),{},{icon:d.icon(u.primaryColor,u.secondaryColor)})),Mv(d.icon,"svg-".concat(d.name),P(P({className:o,onClick:n,style:i,"data-icon":d.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};kv.displayName="IconReact";kv.getTwoToneColors=e8;kv.setTwoToneColors=J5;var ap=kv;function Fw(e){var t=Lv(e),r=B(t,2),o=r[0],n=r[1];return ap.setTwoToneColors({primaryColor:o,secondaryColor:n})}function D$(){var e=ap.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var t8=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];Fw(zs.primary);var Fv=ql.forwardRef(function(e,t){var r=e.className,o=e.icon,n=e.spin,i=e.rotate,a=e.tabIndex,s=e.onClick,l=e.twoToneColor,c=Ae(e,t8),u=ql.useContext(Eu),d=u.prefixCls,f=d===void 0?"anticon":d,m=u.rootClassName,h=(0,A$.default)(m,f,T(T({},"".concat(f,"-").concat(o.name),!!o.name),"".concat(f,"-spin"),!!n||o.name==="loading"),r),v=a;v===void 0&&s&&(v=-1);var y=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,g=Lv(l),p=B(g,2),x=p[0],S=p[1];return ql.createElement("span",ee({role:"img","aria-label":o.name},c,{ref:t,tabIndex:v,onClick:s,className:h}),ql.createElement(ap,{icon:o,primaryColor:x,secondaryColor:S,style:y}))});Fv.displayName="AntdIcon";Fv.getTwoToneColor=D$;Fv.setTwoToneColor=Fw;var mt=Fv;var r8=function(t,r){return zv.createElement(mt,ee({},t,{ref:r,icon:_$}))},o8=zv.forwardRef(r8),M$=o8;var Wv=E(I());var n8={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},L$=n8;var i8=function(t,r){return Wv.createElement(mt,ee({},t,{ref:r,icon:L$}))},a8=Wv.forwardRef(i8),Au=a8;var Bv=E(I());var s8={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},k$=s8;var l8=function(t,r){return Bv.createElement(mt,ee({},t,{ref:r,icon:k$}))},c8=Bv.forwardRef(l8),Fa=c8;var u8=`accept acceptCharset accessKey action allowFullScreen allowTransparency +}`)),(0,$l.useEffect)(function(){var s=t.current,l=Il(s);yn(a,"@ant-design-icons",{prepend:!i,csp:n,attachTo:l})},[])};var Ij=["icon","className","onClick","style","primaryColor","secondaryColor"],Dd={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function $j(e){var t=e.primaryColor,r=e.secondaryColor;Dd.primaryColor=t,Dd.secondaryColor=r||uw(t),Dd.calculated=!!r}function Dj(){return T({},Dd)}var cv=function(t){var r=t.icon,n=t.className,o=t.onClick,i=t.style,a=t.primaryColor,s=t.secondaryColor,l=Ve(t,Ij),c=a$.useRef(),u=Dd;if(a&&(u={primaryColor:a,secondaryColor:s||uw(a)}),i$(c),o$(cw(r),"icon should be icon definiton, but got ".concat(r)),!cw(r))return null;var f=r;return f&&typeof f.icon=="function"&&(f=T(T({},f),{},{icon:f.icon(u.primaryColor,u.secondaryColor)})),sv(f.icon,"svg-".concat(f.name),T(T({className:n,onClick:o,style:i,"data-icon":f.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l),{},{ref:c}))};cv.displayName="IconReact";cv.getTwoToneColors=Dj;cv.setTwoToneColors=$j;var Ad=cv;function fw(e){var t=lv(e),r=B(t,2),n=r[0],o=r[1];return Ad.setTwoToneColors({primaryColor:n,secondaryColor:o})}function s$(){var e=Ad.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Aj=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];fw(Ts.primary);var uv=Dl.forwardRef(function(e,t){var r=e.className,n=e.icon,o=e.spin,i=e.rotate,a=e.tabIndex,s=e.onClick,l=e.twoToneColor,c=Ve(e,Aj),u=Dl.useContext(ou),f=u.prefixCls,p=f===void 0?"anticon":f,g=u.rootClassName,h=(0,l$.default)(g,p,_(_({},"".concat(p,"-").concat(n.name),!!n.name),"".concat(p,"-spin"),!!o||n.name==="loading"),r),v=a;v===void 0&&s&&(v=-1);var y=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,m=lv(l),d=B(m,2),x=d[0],b=d[1];return Dl.createElement("span",fe({role:"img","aria-label":n.name},c,{ref:t,tabIndex:v,onClick:s,className:h}),Dl.createElement(Ad,{icon:n,primaryColor:x,secondaryColor:b,style:y}))});uv.displayName="AntdIcon";uv.getTwoToneColor=s$;uv.setTwoToneColor=fw;var zt=uv;var kj=function(t,r){return fv.createElement(zt,fe({},t,{ref:r,icon:t$}))},Mj=fv.forwardRef(kj),c$=Mj;var dv=E($());var Fj={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z"}}]},name:"close-circle",theme:"filled"},u$=Fj;var Lj=function(t,r){return dv.createElement(zt,fe({},t,{ref:r,icon:u$}))},zj=dv.forwardRef(Lj),mu=zj;var mv=E($());var Wj={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M799.86 166.31c.02 0 .04.02.08.06l57.69 57.7c.04.03.05.05.06.08a.12.12 0 010 .06c0 .03-.02.05-.06.09L569.93 512l287.7 287.7c.04.04.05.06.06.09a.12.12 0 010 .07c0 .02-.02.04-.06.08l-57.7 57.69c-.03.04-.05.05-.07.06a.12.12 0 01-.07 0c-.03 0-.05-.02-.09-.06L512 569.93l-287.7 287.7c-.04.04-.06.05-.09.06a.12.12 0 01-.07 0c-.02 0-.04-.02-.08-.06l-57.69-57.7c-.04-.03-.05-.05-.06-.07a.12.12 0 010-.07c0-.03.02-.05.06-.09L454.07 512l-287.7-287.7c-.04-.04-.05-.06-.06-.09a.12.12 0 010-.07c0-.02.02-.04.06-.08l57.7-57.69c.03-.04.05-.05.07-.06a.12.12 0 01.07 0c.03 0 .05.02.09.06L512 454.07l287.7-287.7c.04-.04.06-.05.09-.06a.12.12 0 01.07 0z"}}]},name:"close",theme:"outlined"},pv=Wj;var Bj=function(t,r){return mv.createElement(zt,fe({},t,{ref:r,icon:pv}))},jj=mv.forwardRef(Bj),gv=jj;var Vj=`accept acceptCharset accessKey action allowFullScreen allowTransparency alt async autoComplete autoFocus autoPlay capture cellPadding cellSpacing challenge charSet checked classID className colSpan cols content contentEditable contextMenu controls coords crossOrigin data dateTime default defer dir disabled download draggable @@ -376,71 +376,69 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho optimum pattern placeholder poster preload radioGroup readOnly rel required reversed role rowSpan rows sandbox scope scoped scrolling seamless selected shape size sizes span spellCheck src srcDoc srcLang srcSet start step style - summary tabIndex target title type useMap value width wmode wrap`,d8=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown + summary tabIndex target title type useMap value width wmode wrap`,Hj=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown onKeyPress onKeyUp onFocus onBlur onChange onInput onSubmit onClick onContextMenu onDoubleClick onDrag onDragEnd onDragEnter onDragExit onDragLeave onDragOver onDragStart onDrop onMouseDown onMouseEnter onMouseLeave onMouseMove onMouseOut onMouseOver onMouseUp onSelect onTouchCancel onTouchEnd onTouchMove onTouchStart onScroll onWheel onAbort onCanPlay onCanPlayThrough onDurationChange onEmptied onEncrypted onEnded onError onLoadedData onLoadedMetadata - onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,f8="".concat(u8," ").concat(d8).split(/[\s\n]+/),p8="aria-",m8="data-";function F$(e,t){return e.indexOf(t)===0}function Ao(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r=P({},t);var o={};return Object.keys(e).forEach(function(n){(r.aria&&(n==="role"||F$(n,p8))||r.data&&F$(n,m8)||r.attr&&f8.includes(n))&&(o[n]=e[n])}),o}var sp=E(I());function jv(e){return e&&sp.default.isValidElement(e)&&e.type===sp.default.Fragment}var g8=(e,t,r)=>sp.default.isValidElement(e)?sp.default.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function Qn(e,t){return g8(e,e,t)}var h8=e=>{let[,,,,t]=yr();return t?`${e}-css-var`:""},Mo=h8;var dt={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,isTextModifyingKeyEvent:function(t){var r=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||r>=dt.F1&&r<=dt.F12)return!1;switch(r){case dt.ALT:case dt.CAPS_LOCK:case dt.CONTEXT_MENU:case dt.CTRL:case dt.DOWN:case dt.END:case dt.ESC:case dt.HOME:case dt.INSERT:case dt.LEFT:case dt.MAC_FF_META:case dt.META:case dt.NUMLOCK:case dt.NUM_CENTER:case dt.PAGE_DOWN:case dt.PAGE_UP:case dt.PAUSE:case dt.PRINT_SCREEN:case dt.RIGHT:case dt.SHIFT:case dt.UP:case dt.WIN_KEY:case dt.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=dt.ZERO&&t<=dt.NINE||t>=dt.NUM_ZERO&&t<=dt.NUM_MULTIPLY||t>=dt.A&&t<=dt.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case dt.SPACE:case dt.QUESTION_MARK:case dt.NUM_PLUS:case dt.NUM_MINUS:case dt.NUM_PERIOD:case dt.NUM_DIVISION:case dt.SEMICOLON:case dt.DASH:case dt.EQUALS:case dt.COMMA:case dt.PERIOD:case dt.SLASH:case dt.APOSTROPHE:case dt.SINGLE_QUOTE:case dt.OPEN_SQUARE_BRACKET:case dt.BACKSLASH:case dt.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Fe=dt;var Vv=E(I());var v8={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},z$=v8;var y8=function(t,r){return Vv.createElement(mt,ee({},t,{ref:r,icon:z$}))},x8=Vv.forwardRef(y8),Kl=x8;var B$=E(I());var W$=E(I()),b8=W$.default.createContext(void 0),Hv=b8;var za=100,S8=10,C8=za*S8,cfe=C8+za,j$={Modal:za,Drawer:za,Popover:za,Popconfirm:za,Tooltip:za,Tour:za,FloatButton:za},w8={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function E8(e){return e in j$}var js=(e,t)=>{let[,r]=yr(),o=B$.default.useContext(Hv),n=E8(e),i;if(t!==void 0)i=[t,t];else{let a=o??0;n?a+=(o?0:r.zIndexPopupBase)+j$[e]:a+=w8[e],i=[o===void 0?t:a,a]}return i};var $8=E(I()),xfe=E(Si());function Lt(){"use strict";Lt=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,n=Object.defineProperty||function(D,$,M){D[$]=M.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(D,$,M){return Object.defineProperty(D,$,{value:M,enumerable:!0,configurable:!0,writable:!0}),D[$]}try{c({},"")}catch{c=function(M,V,F){return M[V]=F}}function u(D,$,M,V){var F=$&&$.prototype instanceof g?$:g,z=Object.create(F.prototype),U=new j(V||[]);return n(z,"_invoke",{value:O(D,M,U)}),z}function d(D,$,M){try{return{type:"normal",arg:D.call($,M)}}catch(V){return{type:"throw",arg:V}}}t.wrap=u;var f="suspendedStart",m="suspendedYield",h="executing",v="completed",y={};function g(){}function p(){}function x(){}var S={};c(S,a,function(){return this});var b=Object.getPrototypeOf,w=b&&b(b(W([])));w&&w!==r&&o.call(w,a)&&(S=w);var C=x.prototype=g.prototype=Object.create(S);function R(D){["next","throw","return"].forEach(function($){c(D,$,function(M){return this._invoke($,M)})})}function _(D,$){function M(F,z,U,H){var A=d(D[F],D,z);if(A.type!=="throw"){var G=A.arg,q=G.value;return q&&pe(q)=="object"&&o.call(q,"__await")?$.resolve(q.__await).then(function(oe){M("next",oe,U,H)},function(oe){M("throw",oe,U,H)}):$.resolve(q).then(function(oe){G.value=oe,U(G)},function(oe){return M("throw",oe,U,H)})}H(A.arg)}var V;n(this,"_invoke",{value:function(z,U){function H(){return new $(function(A,G){M(z,U,A,G)})}return V=V?V.then(H,H):H()}})}function O(D,$,M){var V=f;return function(F,z){if(V===h)throw Error("Generator is already running");if(V===v){if(F==="throw")throw z;return{value:e,done:!0}}for(M.method=F,M.arg=z;;){var U=M.delegate;if(U){var H=N(U,M);if(H){if(H===y)continue;return H}}if(M.method==="next")M.sent=M._sent=M.arg;else if(M.method==="throw"){if(V===f)throw V=v,M.arg;M.dispatchException(M.arg)}else M.method==="return"&&M.abrupt("return",M.arg);V=h;var A=d(D,$,M);if(A.type==="normal"){if(V=M.done?v:m,A.arg===y)continue;return{value:A.arg,done:M.done}}A.type==="throw"&&(V=v,M.method="throw",M.arg=A.arg)}}}function N(D,$){var M=$.method,V=D.iterator[M];if(V===e)return $.delegate=null,M==="throw"&&D.iterator.return&&($.method="return",$.arg=e,N(D,$),$.method==="throw")||M!=="return"&&($.method="throw",$.arg=new TypeError("The iterator does not provide a '"+M+"' method")),y;var F=d(V,D.iterator,$.arg);if(F.type==="throw")return $.method="throw",$.arg=F.arg,$.delegate=null,y;var z=F.arg;return z?z.done?($[D.resultName]=z.value,$.next=D.nextLoc,$.method!=="return"&&($.method="next",$.arg=e),$.delegate=null,y):z:($.method="throw",$.arg=new TypeError("iterator result is not an object"),$.delegate=null,y)}function k(D){var $={tryLoc:D[0]};1 in D&&($.catchLoc=D[1]),2 in D&&($.finallyLoc=D[2],$.afterLoc=D[3]),this.tryEntries.push($)}function L(D){var $=D.completion||{};$.type="normal",delete $.arg,D.completion=$}function j(D){this.tryEntries=[{tryLoc:"root"}],D.forEach(k,this),this.reset(!0)}function W(D){if(D||D===""){var $=D[a];if($)return $.call(D);if(typeof D.next=="function")return D;if(!isNaN(D.length)){var M=-1,V=function F(){for(;++M=0;--F){var z=this.tryEntries[F],U=z.completion;if(z.tryLoc==="root")return V("end");if(z.tryLoc<=this.prev){var H=o.call(z,"catchLoc"),A=o.call(z,"finallyLoc");if(H&&A){if(this.prev=0;--V){var F=this.tryEntries[V];if(F.tryLoc<=this.prev&&o.call(F,"finallyLoc")&&this.prev=0;--M){var V=this.tryEntries[M];if(V.finallyLoc===$)return this.complete(V.completion,V.afterLoc),L(V),y}},catch:function($){for(var M=this.tryEntries.length-1;M>=0;--M){var V=this.tryEntries[M];if(V.tryLoc===$){var F=V.completion;if(F.type==="throw"){var z=F.arg;L(V)}return z}}throw Error("illegal catch attempt")},delegateYield:function($,M,V){return this.delegate={iterator:W($),resultName:M,nextLoc:V},this.method==="next"&&(this.arg=e),y}},t}function V$(e,t,r,o,n,i,a){try{var s=e[i](a),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(o,n)}function lo(e){return function(){var t=this,r=arguments;return new Promise(function(o,n){var i=e.apply(t,r);function a(l){V$(i,o,n,a,s,"next",l)}function s(l){V$(i,o,n,a,s,"throw",l)}a(void 0)})}}var R8=E(Si()),lp=P({},R8),O8=lp.version,zw=lp.render,_8=lp.unmountComponentAtNode,Gv;try{H$=Number((O8||"").split(".")[0]),H$>=18&&(Gv=lp.createRoot)}catch{}var H$;function U$(e){var t=lp.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&pe(t)==="object"&&(t.usingClientEntryPoint=e)}var Uv="__rc_react_root__";function P8(e,t){U$(!0);var r=t[Uv]||Gv(t);U$(!1),r.render(e),t[Uv]=r}function T8(e,t){zw?.(e,t)}function G$(e,t){if(Gv){P8(e,t);return}T8(e,t)}function N8(e){return Ww.apply(this,arguments)}function Ww(){return Ww=lo(Lt().mark(function e(t){return Lt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:return o.abrupt("return",Promise.resolve().then(function(){var n;(n=t[Uv])===null||n===void 0||n.unmount(),delete t[Uv]}));case 1:case"end":return o.stop()}},e)})),Ww.apply(this,arguments)}function I8(e){_8(e)}function q$(e){return Bw.apply(this,arguments)}function Bw(){return Bw=lo(Lt().mark(function e(t){return Lt().wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(Gv===void 0){o.next=2;break}return o.abrupt("return",N8(t));case 2:I8(t);case 3:case"end":return o.stop()}},e)})),Bw.apply(this,arguments)}var D8=(e,t)=>(G$(e,t),()=>q$(t)),A8=D8;function K$(){return A8}var jw=()=>({height:0,opacity:0}),X$=e=>{let{scrollHeight:t}=e;return{height:t,opacity:1}},M8=e=>({height:e?e.offsetHeight:0}),Vw=(e,t)=>t?.deadline===!0||t.propertyName==="height",L8=function(){return{motionName:`${arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ws}-motion-collapse`,onAppearStart:jw,onEnterStart:jw,onAppearActive:X$,onEnterActive:X$,onLeaveStart:M8,onLeaveActive:jw,onAppearEnd:Vw,onEnterEnd:Vw,onLeaveEnd:Vw,motionDeadline:500}};var Ji=(e,t,r)=>r!==void 0?r:`${e}-${t}`;var Y$=L8;var Ut=E(I()),my=E(Ee());function Gr(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(o){delete r[o]}),r}var Xl=E(I()),rD=E(Ee());var qv=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,o=t.height;if(r||o)return!0}if(e.getBoundingClientRect){var n=e.getBoundingClientRect(),i=n.width,a=n.height;if(i||a)return!0}}return!1};var k8=e=>{let{componentCls:t,colorPrimary:r}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${r})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},Q$=Cw("Wave",e=>[k8(e)]);var Kv=E(I());var Mu=`${Ws}-wave-target`;var co=E(I()),J$=E(Ee());function Hw(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function Z$(e){let{borderTopColor:t,borderColor:r,backgroundColor:o}=getComputedStyle(e);return Hw(t)?t:Hw(r)?r:Hw(o)?o:null}function Uw(e){return Number.isNaN(e)?0:e}var F8=e=>{let{className:t,target:r,component:o,registerUnmount:n}=e,i=co.useRef(null),a=co.useRef(null);co.useEffect(()=>{a.current=n()},[]);let[s,l]=co.useState(null),[c,u]=co.useState([]),[d,f]=co.useState(0),[m,h]=co.useState(0),[v,y]=co.useState(0),[g,p]=co.useState(0),[x,S]=co.useState(!1),b={left:d,top:m,width:v,height:g,borderRadius:c.map(R=>`${R}px`).join(" ")};s&&(b["--wave-color"]=s);function w(){let R=getComputedStyle(r);l(Z$(r));let _=R.position==="static",{borderLeftWidth:O,borderTopWidth:N}=R;f(_?r.offsetLeft:Uw(-parseFloat(O))),h(_?r.offsetTop:Uw(-parseFloat(N))),y(r.offsetWidth),p(r.offsetHeight);let{borderTopLeftRadius:k,borderTopRightRadius:L,borderBottomLeftRadius:j,borderBottomRightRadius:W}=R;u([k,L,W,j].map(D=>Uw(parseFloat(D))))}if(co.useEffect(()=>{if(r){let R=ut(()=>{w(),S(!0)}),_;return typeof ResizeObserver<"u"&&(_=new ResizeObserver(w),_.observe(r)),()=>{ut.cancel(R),_?.disconnect()}}},[]),!x)return null;let C=(o==="Checkbox"||o==="Radio")&&r?.classList.contains(Mu);return co.createElement(so,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(R,_)=>{var O,N;if(_.deadline||_.propertyName==="opacity"){let k=(O=i.current)===null||O===void 0?void 0:O.parentElement;(N=a.current)===null||N===void 0||N.call(a).then(()=>{k?.remove()})}return!1}},(R,_)=>{let{className:O}=R;return co.createElement("div",{ref:Fr(i,_),className:(0,J$.default)(t,O,{"wave-quick":C}),style:b})})},z8=(e,t)=>{var r;let{component:o}=t;if(o==="Checkbox"&&!(!((r=e.querySelector("input"))===null||r===void 0)&&r.checked))return;let n=document.createElement("div");n.style.position="absolute",n.style.left="0px",n.style.top="0px",e?.insertBefore(n,e?.firstChild);let i=K$(),a=null;function s(){return a}a=i(co.createElement(F8,Object.assign({},t,{target:e,registerUnmount:s})),n)},eD=z8;var W8=(e,t,r)=>{let{wave:o}=Kv.useContext(at),[,n,i]=yr(),a=Rt(c=>{let u=e.current;if(o?.disabled||!u)return;let d=u.querySelector(`.${Mu}`)||u,{showEffect:f}=o||{};(f||eD)(d,{className:t,token:n,component:r,event:c,hashId:i})}),s=Kv.useRef(null);return c=>{ut.cancel(s.current),s.current=ut(()=>{a(c)})}},tD=W8;var B8=e=>{let{children:t,disabled:r,component:o}=e,{getPrefixCls:n}=(0,Xl.useContext)(at),i=(0,Xl.useRef)(null),a=n("wave"),[,s]=Q$(a),l=tD(i,(0,rD.default)(a,s),o);if(Xl.default.useEffect(()=>{let u=i.current;if(!u||u.nodeType!==1||r)return;let d=f=>{!qv(f.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||l(f)};return u.addEventListener("click",d,!0),()=>{u.removeEventListener("click",d,!0)}},[r]),!Xl.default.isValidElement(t))return t??null;let c=wi(t)?Fr(Ts(t),i):i;return Qn(t,{ref:c})},Xv=B8;var Gw=E(I());var j8=e=>{let t=Gw.default.useContext(jl);return Gw.default.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},pn=j8;var Vs=E(I()),oD=E(Ee());var nD=Vs.createContext(null),Zn=(e,t)=>{let r=Vs.useContext(nD),o=Vs.useMemo(()=>{if(!r)return"";let{compactDirection:n,isFirstItem:i,isLastItem:a}=r,s=n==="vertical"?"-vertical-":"-";return(0,oD.default)(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:i,[`${e}-compact${s}last-item`]:a,[`${e}-compact${s}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r?.compactSize,compactDirection:r?.compactDirection,compactItemClassnames:o}},iD=e=>{let{children:t}=e;return Vs.createElement(nD.Provider,{value:null},t)};var Wa=E(I()),aD=E(Ee());var V8=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{getPrefixCls:t,direction:r}=Wa.useContext(at),{prefixCls:o,size:n,className:i}=e,a=V8(e,["prefixCls","size","className"]),s=t("btn-group",o),[,,l]=yr(),c=Wa.useMemo(()=>{switch(n){case"large":return"lg";case"small":return"sm";default:return""}},[n]),u=(0,aD.default)(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:r==="rtl"},i,l);return Wa.createElement(qw.Provider,{value:n},Wa.createElement("div",Object.assign({},a,{className:u})))},sD=H8;var Lu=E(I());var lD=/^[\u4E00-\u9FA5]{2}$/,Yv=lD.test.bind(lD);function cD(e){return typeof e=="string"}function Qv(e){return e==="text"||e==="link"}function U8(e,t){if(e==null)return;let r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&cD(e.type)&&Yv(e.props.children)?Qn(e,{children:e.props.children.split("").join(r)}):cD(e)?Yv(e)?Lu.default.createElement("span",null,e.split("").join(r)):Lu.default.createElement("span",null,e):jv(e)?Lu.default.createElement("span",null,e):e}function uD(e,t){let r=!1,o=[];return Lu.default.Children.forEach(e,n=>{let i=typeof n,a=i==="string"||i==="number";if(r&&a){let s=o.length-1,l=o[s];o[s]=`${l}${n}`}else o.push(n);r=a}),Lu.default.Children.map(o,n=>U8(n,t))}var lpe=["default","primary","danger"].concat(se(In));var Hs=E(I());var Yw=E(Ee());var Zv=E(I()),dD=E(Ee()),G8=(0,Zv.forwardRef)((e,t)=>{let{className:r,style:o,children:n,prefixCls:i}=e,a=(0,dD.default)(`${i}-icon`,r);return Zv.default.createElement("span",{ref:t,className:a,style:o},n)}),cp=G8;var fD=(0,Hs.forwardRef)((e,t)=>{let{prefixCls:r,className:o,style:n,iconClassName:i}=e,a=(0,Yw.default)(`${r}-loading-icon`,o);return Hs.default.createElement(cp,{prefixCls:r,className:a,style:n,ref:t},Hs.default.createElement(Kl,{className:i}))}),Kw=()=>({width:0,opacity:0,transform:"scale(0)"}),Xw=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),q8=e=>{let{prefixCls:t,loading:r,existIcon:o,className:n,style:i,mount:a}=e,s=!!r;return o?Hs.default.createElement(fD,{prefixCls:t,className:n,style:i}):Hs.default.createElement(so,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Kw,onAppearActive:Xw,onEnterStart:Kw,onEnterActive:Xw,onLeaveStart:Xw,onLeaveActive:Kw},(l,c)=>{let{className:u,style:d}=l,f=Object.assign(Object.assign({},i),d);return Hs.default.createElement(fD,{prefixCls:t,className:(0,Yw.default)(n,u),style:f,ref:c})})},pD=q8;var mD=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),K8=e=>{let{componentCls:t,fontSize:r,lineWidth:o,groupBorderColor:n,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(o).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},mD(`${t}-primary`,n),mD(`${t}-danger`,i)]}},gD=K8;var e1=E(I());var X8=["b"],Y8=["v"],Qw=function(t){return Math.round(Number(t||0))},Q8=function(t){if(t instanceof it)return t;if(t&&pe(t)==="object"&&"h"in t&&"b"in t){var r=t,o=r.b,n=Ae(r,X8);return P(P({},n),{},{v:o})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},Jn=function(e){Ir(r,e);var t=$r(r);function r(o){return lt(this,r),t.call(this,Q8(o))}return ct(r,[{key:"toHsbString",value:function(){var n=this.toHsb(),i=Qw(n.s*100),a=Qw(n.b*100),s=Qw(n.h),l=n.a,c="hsb(".concat(s,", ").concat(i,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(i,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var n=this.toHsv(),i=n.v,a=Ae(n,Y8);return P(P({},a),{},{b:i,a:this.a})}}]),r}(it);var Zw=function(t){return t instanceof Jn?t:new Jn(t)},Z8=Zw("#1677ff");var pV=E(Ee());var J8=E(Ee()),eV=E(I());var vD=E(I());var Jw=E(I());var tV=E(Ee()),rV=E(I());var oV=E(I());var hD=E(I());var uV=E(I());var fV=E(I());var xD=E(I());var dV=E(Ee());var yD=E(I());var mV=(e,t)=>e?.replace(/[^\w/]/g,"").slice(0,t?8:6)||"",gV=(e,t)=>e?mV(e,t):"",SD=function(){function e(t){lt(this,e);var r;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)===null||r===void 0?void 0:r.map(n=>({color:new e(n.color),percent:n.percent})),this.cleared=t.cleared;return}let o=Array.isArray(t);o&&t.length?(this.colors=t.map(n=>{let{color:i,percent:a}=n;return{color:new e(i),percent:a}}),this.metaColor=new Jn(this.colors[0].color.metaColor)):this.metaColor=new Jn(o?"":t),(!t||o&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return ct(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return gV(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){let{colors:r}=this;return r?`linear-gradient(90deg, ${r.map(n=>`${n.color.toRgbString()} ${n.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(r){return!r||this.isGradient()!==r.isGradient()?!1:this.isGradient()?this.colors.length===r.colors.length&&this.colors.every((o,n)=>{let i=r.colors[n];return o.percent===i.percent&&o.color.equals(i.color)}):this.toHexString()===r.toHexString()}}])}();var KD=E(I());var RV=E(Ee());var Jv=E(I());var hV={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},CD=hV;var vV=function(t,r){return Jv.createElement(mt,ee({},t,{ref:r,icon:CD}))},yV=Jv.forwardRef(vV),wD=yV;var xV=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, + onLoadStart onPause onPlay onPlaying onProgress onRateChange onSeeked onSeeking onStalled onSuspend onTimeUpdate onVolumeChange onWaiting onLoad onError`,Uj="".concat(Vj," ").concat(Hj).split(/[\s\n]+/),qj="aria-",Gj="data-";function f$(e,t){return e.indexOf(t)===0}function qo(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r;t===!1?r={aria:!0,data:!0,attr:!0}:t===!0?r={aria:!0}:r=T({},t);var n={};return Object.keys(e).forEach(function(o){(r.aria&&(o==="role"||f$(o,qj))||r.data&&f$(o,Gj)||r.attr&&Uj.includes(o))&&(n[o]=e[o])}),n}var kd=E($());function hv(e){return e&&kd.default.isValidElement(e)&&e.type===kd.default.Fragment}var Kj=(e,t,r)=>kd.default.isValidElement(e)?kd.default.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function Go(e,t){return Kj(e,e,t)}var Xj=e=>{let[,,,,t]=xr();return t?`${e}-css-var`:""},Ko=Xj;var st={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,isTextModifyingKeyEvent:function(t){var r=t.keyCode;if(t.altKey&&!t.ctrlKey||t.metaKey||r>=st.F1&&r<=st.F12)return!1;switch(r){case st.ALT:case st.CAPS_LOCK:case st.CONTEXT_MENU:case st.CTRL:case st.DOWN:case st.END:case st.ESC:case st.HOME:case st.INSERT:case st.LEFT:case st.MAC_FF_META:case st.META:case st.NUMLOCK:case st.NUM_CENTER:case st.PAGE_DOWN:case st.PAGE_UP:case st.PAUSE:case st.PRINT_SCREEN:case st.RIGHT:case st.SHIFT:case st.UP:case st.WIN_KEY:case st.WIN_KEY_RIGHT:return!1;default:return!0}},isCharacterKey:function(t){if(t>=st.ZERO&&t<=st.NINE||t>=st.NUM_ZERO&&t<=st.NUM_MULTIPLY||t>=st.A&&t<=st.Z||window.navigator.userAgent.indexOf("WebKit")!==-1&&t===0)return!0;switch(t){case st.SPACE:case st.QUESTION_MARK:case st.NUM_PLUS:case st.NUM_MINUS:case st.NUM_PERIOD:case st.NUM_DIVISION:case st.SEMICOLON:case st.DASH:case st.EQUALS:case st.COMMA:case st.PERIOD:case st.SLASH:case st.APOSTROPHE:case st.SINGLE_QUOTE:case st.OPEN_SQUARE_BRACKET:case st.BACKSLASH:case st.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}},Ye=st;var vv=E($());var Yj={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},d$=Yj;var Qj=function(t,r){return vv.createElement(zt,fe({},t,{ref:r,icon:d$}))},Jj=vv.forwardRef(Qj),Al=Jj;var m$=E($());var p$=E($()),Zj=p$.default.createContext(void 0),yv=Zj;var Ia=100,e8=10,t8=Ia*e8,sfe=t8+Ia,g$={Modal:Ia,Drawer:Ia,Popover:Ia,Popconfirm:Ia,Tooltip:Ia,Tour:Ia,FloatButton:Ia},r8={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function n8(e){return e in g$}var xv=(e,t)=>{let[,r]=xr(),n=m$.default.useContext(yv),o=n8(e),i;if(t!==void 0)i=[t,t];else{let a=n??0;o?a+=(n?0:r.zIndexPopupBase)+g$[e]:a+=r8[e],i=[n===void 0?t:a,a]}return i};var f8=E($()),vfe=E(Vi());function kt(){"use strict";kt=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(N,I,D){N[I]=D.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(N,I,D){return Object.defineProperty(N,I,{value:D,enumerable:!0,configurable:!0,writable:!0}),N[I]}try{c({},"")}catch{c=function(D,U,z){return D[U]=z}}function u(N,I,D,U){var z=I&&I.prototype instanceof m?I:m,W=Object.create(z.prototype),q=new H(U||[]);return o(W,"_invoke",{value:O(N,D,q)}),W}function f(N,I,D){try{return{type:"normal",arg:N.call(I,D)}}catch(U){return{type:"throw",arg:U}}}t.wrap=u;var p="suspendedStart",g="suspendedYield",h="executing",v="completed",y={};function m(){}function d(){}function x(){}var b={};c(b,a,function(){return this});var S=Object.getPrototypeOf,w=S&&S(S(L([])));w&&w!==r&&n.call(w,a)&&(b=w);var C=x.prototype=m.prototype=Object.create(b);function R(N){["next","throw","return"].forEach(function(I){c(N,I,function(D){return this._invoke(I,D)})})}function P(N,I){function D(z,W,q,j){var k=f(N[z],N,W);if(k.type!=="throw"){var V=k.arg,G=V.value;return G&&ue(G)=="object"&&n.call(G,"__await")?I.resolve(G.__await).then(function(J){D("next",J,q,j)},function(J){D("throw",J,q,j)}):I.resolve(G).then(function(J){V.value=J,q(V)},function(J){return D("throw",J,q,j)})}j(k.arg)}var U;o(this,"_invoke",{value:function(W,q){function j(){return new I(function(k,V){D(W,q,k,V)})}return U=U?U.then(j,j):j()}})}function O(N,I,D){var U=p;return function(z,W){if(U===h)throw Error("Generator is already running");if(U===v){if(z==="throw")throw W;return{value:e,done:!0}}for(D.method=z,D.arg=W;;){var q=D.delegate;if(q){var j=A(q,D);if(j){if(j===y)continue;return j}}if(D.method==="next")D.sent=D._sent=D.arg;else if(D.method==="throw"){if(U===p)throw U=v,D.arg;D.dispatchException(D.arg)}else D.method==="return"&&D.abrupt("return",D.arg);U=h;var k=f(N,I,D);if(k.type==="normal"){if(U=D.done?v:g,k.arg===y)continue;return{value:k.arg,done:D.done}}k.type==="throw"&&(U=v,D.method="throw",D.arg=k.arg)}}}function A(N,I){var D=I.method,U=N.iterator[D];if(U===e)return I.delegate=null,D==="throw"&&N.iterator.return&&(I.method="return",I.arg=e,A(N,I),I.method==="throw")||D!=="return"&&(I.method="throw",I.arg=new TypeError("The iterator does not provide a '"+D+"' method")),y;var z=f(U,N.iterator,I.arg);if(z.type==="throw")return I.method="throw",I.arg=z.arg,I.delegate=null,y;var W=z.arg;return W?W.done?(I[N.resultName]=W.value,I.next=N.nextLoc,I.method!=="return"&&(I.method="next",I.arg=e),I.delegate=null,y):W:(I.method="throw",I.arg=new TypeError("iterator result is not an object"),I.delegate=null,y)}function F(N){var I={tryLoc:N[0]};1 in N&&(I.catchLoc=N[1]),2 in N&&(I.finallyLoc=N[2],I.afterLoc=N[3]),this.tryEntries.push(I)}function M(N){var I=N.completion||{};I.type="normal",delete I.arg,N.completion=I}function H(N){this.tryEntries=[{tryLoc:"root"}],N.forEach(F,this),this.reset(!0)}function L(N){if(N||N===""){var I=N[a];if(I)return I.call(N);if(typeof N.next=="function")return N;if(!isNaN(N.length)){var D=-1,U=function z(){for(;++D=0;--z){var W=this.tryEntries[z],q=W.completion;if(W.tryLoc==="root")return U("end");if(W.tryLoc<=this.prev){var j=n.call(W,"catchLoc"),k=n.call(W,"finallyLoc");if(j&&k){if(this.prev=0;--U){var z=this.tryEntries[U];if(z.tryLoc<=this.prev&&n.call(z,"finallyLoc")&&this.prev=0;--D){var U=this.tryEntries[D];if(U.finallyLoc===I)return this.complete(U.completion,U.afterLoc),M(U),y}},catch:function(I){for(var D=this.tryEntries.length-1;D>=0;--D){var U=this.tryEntries[D];if(U.tryLoc===I){var z=U.completion;if(z.type==="throw"){var W=z.arg;M(U)}return W}}throw Error("illegal catch attempt")},delegateYield:function(I,D,U){return this.delegate={iterator:L(I),resultName:D,nextLoc:U},this.method==="next"&&(this.arg=e),y}},t}function h$(e,t,r,n,o,i,a){try{var s=e[i](a),l=s.value}catch(c){return void r(c)}s.done?t(l):Promise.resolve(l).then(n,o)}function ln(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(l){h$(i,n,o,a,s,"next",l)}function s(l){h$(i,n,o,a,s,"throw",l)}a(void 0)})}}var o8=E(Vi()),Md=T({},o8),i8=Md.version,dw=Md.render,a8=Md.unmountComponentAtNode,Sv;try{v$=Number((i8||"").split(".")[0]),v$>=18&&(Sv=Md.createRoot)}catch{}var v$;function y$(e){var t=Md.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&ue(t)==="object"&&(t.usingClientEntryPoint=e)}var bv="__rc_react_root__";function s8(e,t){y$(!0);var r=t[bv]||Sv(t);y$(!1),r.render(e),t[bv]=r}function l8(e,t){dw?.(e,t)}function x$(e,t){if(Sv){s8(e,t);return}l8(e,t)}function c8(e){return pw.apply(this,arguments)}function pw(){return pw=ln(kt().mark(function e(t){return kt().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var o;(o=t[bv])===null||o===void 0||o.unmount(),delete t[bv]}));case 1:case"end":return n.stop()}},e)})),pw.apply(this,arguments)}function u8(e){a8(e)}function b$(e){return mw.apply(this,arguments)}function mw(){return mw=ln(kt().mark(function e(t){return kt().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Sv===void 0){n.next=2;break}return n.abrupt("return",c8(t));case 2:u8(t);case 3:case"end":return n.stop()}},e)})),mw.apply(this,arguments)}var d8=(e,t)=>(x$(e,t),()=>b$(t)),S$=d8;function C$(e){return e&&(S$=e),S$}var gw=()=>({height:0,opacity:0}),w$=e=>{let{scrollHeight:t}=e;return{height:t,opacity:1}},p8=e=>({height:e?e.offsetHeight:0}),hw=(e,t)=>t?.deadline===!0||t.propertyName==="height",m8=(e=Ns)=>({motionName:`${e}-motion-collapse`,onAppearStart:gw,onEnterStart:gw,onAppearActive:w$,onEnterActive:w$,onLeaveStart:p8,onLeaveActive:gw,onAppearEnd:hw,onEnterEnd:hw,onLeaveEnd:hw,motionDeadline:500});var Cv=(e,t,r)=>r!==void 0?r:`${e}-${t}`;var E$=m8;var Wt=E($()),Vv=E(Ne());function qr(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}var kl=E($()),N$=E(Ne());var wv=function(e){if(!e)return!1;if(e instanceof Element){if(e.offsetParent)return!0;if(e.getBBox){var t=e.getBBox(),r=t.width,n=t.height;if(r||n)return!0}if(e.getBoundingClientRect){var o=e.getBoundingClientRect(),i=o.width,a=o.height;if(i||a)return!0}}return!1};var g8=e=>{let{componentCls:t,colorPrimary:r}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${r})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0},"&.wave-quick":{transition:[`box-shadow ${e.motionDurationSlow} ${e.motionEaseInOut}`,`opacity ${e.motionDurationSlow} ${e.motionEaseInOut}`].join(",")}}}}},R$=XC("Wave",e=>[g8(e)]);var Ev=E($());var gu=`${Ns}-wave-target`;var cn=E($()),_$=E(Ne());function vw(e){return e&&e!=="#fff"&&e!=="#ffffff"&&e!=="rgb(255, 255, 255)"&&e!=="rgba(255, 255, 255, 1)"&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&e!=="transparent"}function O$(e){let{borderTopColor:t,borderColor:r,backgroundColor:n}=getComputedStyle(e);return vw(t)?t:vw(r)?r:vw(n)?n:null}function yw(e){return Number.isNaN(e)?0:e}var h8=e=>{let{className:t,target:r,component:n,registerUnmount:o}=e,i=cn.useRef(null),a=cn.useRef(null);cn.useEffect(()=>{a.current=o()},[]);let[s,l]=cn.useState(null),[c,u]=cn.useState([]),[f,p]=cn.useState(0),[g,h]=cn.useState(0),[v,y]=cn.useState(0),[m,d]=cn.useState(0),[x,b]=cn.useState(!1),S={left:f,top:g,width:v,height:m,borderRadius:c.map(R=>`${R}px`).join(" ")};s&&(S["--wave-color"]=s);function w(){let R=getComputedStyle(r);l(O$(r));let P=R.position==="static",{borderLeftWidth:O,borderTopWidth:A}=R;p(P?r.offsetLeft:yw(-parseFloat(O))),h(P?r.offsetTop:yw(-parseFloat(A))),y(r.offsetWidth),d(r.offsetHeight);let{borderTopLeftRadius:F,borderTopRightRadius:M,borderBottomLeftRadius:H,borderBottomRightRadius:L}=R;u([F,M,L,H].map(N=>yw(parseFloat(N))))}if(cn.useEffect(()=>{if(r){let R=dt(()=>{w(),b(!0)}),P;return typeof ResizeObserver<"u"&&(P=new ResizeObserver(w),P.observe(r)),()=>{dt.cancel(R),P?.disconnect()}}},[]),!x)return null;let C=(n==="Checkbox"||n==="Radio")&&r?.classList.contains(gu);return cn.createElement(Uo,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(R,P)=>{var O,A;if(P.deadline||P.propertyName==="opacity"){let F=(O=i.current)===null||O===void 0?void 0:O.parentElement;(A=a.current)===null||A===void 0||A.call(a).then(()=>{F?.remove()})}return!1}},({className:R},P)=>cn.createElement("div",{ref:Lr(i,P),className:(0,_$.default)(t,R,{"wave-quick":C}),style:S}))},v8=(e,t)=>{var r;let{component:n}=t;if(n==="Checkbox"&&!(!((r=e.querySelector("input"))===null||r===void 0)&&r.checked))return;let o=document.createElement("div");o.style.position="absolute",o.style.left="0px",o.style.top="0px",e?.insertBefore(o,e?.firstChild);let i=C$(),a=null;function s(){return a}a=i(cn.createElement(h8,Object.assign({},t,{target:e,registerUnmount:s})),o)},P$=v8;var y8=(e,t,r)=>{let{wave:n}=Ev.useContext(rt),[,o,i]=xr(),a=wt(c=>{let u=e.current;if(n?.disabled||!u)return;let f=u.querySelector(`.${gu}`)||u,{showEffect:p}=n||{};(p||P$)(f,{className:t,token:o,component:r,event:c,hashId:i})}),s=Ev.useRef(null);return c=>{dt.cancel(s.current),s.current=dt(()=>{a(c)})}},T$=y8;var x8=e=>{let{children:t,disabled:r,component:n}=e,{getPrefixCls:o}=(0,kl.useContext)(rt),i=(0,kl.useRef)(null),a=o("wave"),[,s]=R$(a),l=T$(i,(0,N$.default)(a,s),n);if(kl.default.useEffect(()=>{let u=i.current;if(!u||u.nodeType!==1||r)return;let f=p=>{!wv(p.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||l(p)};return u.addEventListener("click",f,!0),()=>{u.removeEventListener("click",f,!0)}},[r]),!kl.default.isValidElement(t))return t??null;let c=bi(t)?Lr(ys(t),i):i;return Go(t,{ref:c})},Rv=x8;var xw=E($());var b8=e=>{let t=xw.default.useContext(Pl);return xw.default.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},ao=b8;var $s=E($()),I$=E(Ne());var $$=$s.createContext(null),Xo=(e,t)=>{let r=$s.useContext($$),n=$s.useMemo(()=>{if(!r)return"";let{compactDirection:o,isFirstItem:i,isLastItem:a}=r,s=o==="vertical"?"-vertical-":"-";return(0,I$.default)(`${e}-compact${s}item`,{[`${e}-compact${s}first-item`]:i,[`${e}-compact${s}last-item`]:a,[`${e}-compact${s}item-rtl`]:t==="rtl"})},[e,t,r]);return{compactSize:r?.compactSize,compactDirection:r?.compactDirection,compactItemClassnames:n}},D$=e=>{let{children:t}=e;return $s.createElement($$.Provider,{value:null},t)};var $a=E($()),A$=E(Ne());var S8=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{getPrefixCls:t,direction:r}=$a.useContext(rt),{prefixCls:n,size:o,className:i}=e,a=S8(e,["prefixCls","size","className"]),s=t("btn-group",n),[,,l]=xr(),c=$a.useMemo(()=>{switch(o){case"large":return"lg";case"small":return"sm";default:return""}},[o]),u=(0,A$.default)(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:r==="rtl"},i,l);return $a.createElement(bw.Provider,{value:o},$a.createElement("div",Object.assign({},a,{className:u})))},k$=C8;var hu=E($());var M$=/^[\u4E00-\u9FA5]{2}$/,Ov=M$.test.bind(M$);function F$(e){return typeof e=="string"}function _v(e){return e==="text"||e==="link"}function w8(e,t){if(e==null)return;let r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&F$(e.type)&&Ov(e.props.children)?Go(e,{children:e.props.children.split("").join(r)}):F$(e)?Ov(e)?hu.default.createElement("span",null,e.split("").join(r)):hu.default.createElement("span",null,e):hv(e)?hu.default.createElement("span",null,e):e}function L$(e,t){let r=!1,n=[];return hu.default.Children.forEach(e,o=>{let i=typeof o,a=i==="string"||i==="number";if(r&&a){let s=n.length-1,l=n[s];n[s]=`${l}${o}`}else n.push(o);r=a}),hu.default.Children.map(n,o=>w8(o,t))}var ade=["default","primary","danger"].concat(te(Eo));var Ds=E($());var ww=E(Ne());var Pv=E($()),z$=E(Ne()),E8=(0,Pv.forwardRef)((e,t)=>{let{className:r,style:n,children:o,prefixCls:i}=e,a=(0,z$.default)(`${i}-icon`,r);return Pv.default.createElement("span",{ref:t,className:a,style:n},o)}),Fd=E8;var W$=(0,Ds.forwardRef)((e,t)=>{let{prefixCls:r,className:n,style:o,iconClassName:i}=e,a=(0,ww.default)(`${r}-loading-icon`,n);return Ds.default.createElement(Fd,{prefixCls:r,className:a,style:o,ref:t},Ds.default.createElement(Al,{className:i}))}),Sw=()=>({width:0,opacity:0,transform:"scale(0)"}),Cw=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),R8=e=>{let{prefixCls:t,loading:r,existIcon:n,className:o,style:i,mount:a}=e,s=!!r;return n?Ds.default.createElement(W$,{prefixCls:t,className:o,style:i}):Ds.default.createElement(Uo,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:Sw,onAppearActive:Cw,onEnterStart:Sw,onEnterActive:Cw,onLeaveStart:Cw,onLeaveActive:Sw},({className:l,style:c},u)=>{let f=Object.assign(Object.assign({},i),c);return Ds.default.createElement(W$,{prefixCls:t,className:(0,ww.default)(o,l),style:f,ref:u})})},B$=R8;var j$=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),O8=e=>{let{componentCls:t,fontSize:r,lineWidth:n,groupBorderColor:o,colorErrorHover:i}=e;return{[`${t}-group`]:[{position:"relative",display:"inline-flex",[`> span, > ${t}`]:{"&:not(:last-child)":{[`&, & > ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},"&:not(:first-child)":{marginInlineStart:e.calc(n).mul(-1).equal(),[`&, & > ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}},[t]:{position:"relative",zIndex:1,"&:hover, &:focus, &:active":{zIndex:2},"&[disabled]":{zIndex:0}},[`${t}-icon-only`]:{fontSize:r}},j$(`${t}-primary`,o),j$(`${t}-danger`,i)]}},V$=O8;var _w=E($());var _8=["b"],P8=["v"],Ew=function(t){return Math.round(Number(t||0))},T8=function(t){if(t instanceof gt)return t;if(t&&ue(t)==="object"&&"h"in t&&"b"in t){var r=t,n=r.b,o=Ve(r,_8);return T(T({},o),{},{v:n})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},Yo=function(e){Ir(r,e);var t=$r(r);function r(n){return it(this,r),t.call(this,T8(n))}return at(r,[{key:"toHsbString",value:function(){var o=this.toHsb(),i=Ew(o.s*100),a=Ew(o.b*100),s=Ew(o.h),l=o.a,c="hsb(".concat(s,", ").concat(i,"%, ").concat(a,"%)"),u="hsba(".concat(s,", ").concat(i,"%, ").concat(a,"%, ").concat(l.toFixed(l===0?0:2),")");return l===1?c:u}},{key:"toHsb",value:function(){var o=this.toHsv(),i=o.v,a=Ve(o,P8);return T(T({},a),{},{b:i,a:this.a})}}]),r}(gt);var Rw=function(t){return t instanceof Yo?t:new Yo(t)},N8=Rw("#1677ff");var U8=E(Ne());var I8=E(Ne()),$8=E($());var U$=E($());var Ow=E($());var D8=E(Ne()),A8=E($());var k8=E($());var H$=E($());var j8=E($());var H8=E($());var G$=E($());var V8=E(Ne());var q$=E($());var q8=(e,t)=>e?.replace(/[^\w/]/g,"").slice(0,t?8:6)||"",G8=(e,t)=>e?q8(e,t):"",X$=function(){function e(t){it(this,e);var r;if(this.cleared=!1,t instanceof e){this.metaColor=t.metaColor.clone(),this.colors=(r=t.colors)===null||r===void 0?void 0:r.map(o=>({color:new e(o.color),percent:o.percent})),this.cleared=t.cleared;return}let n=Array.isArray(t);n&&t.length?(this.colors=t.map(({color:o,percent:i})=>({color:new e(o),percent:i})),this.metaColor=new Yo(this.colors[0].color.metaColor)):this.metaColor=new Yo(n?"":t),(!t||n&&!this.colors)&&(this.metaColor=this.metaColor.setA(0),this.cleared=!0)}return at(e,[{key:"toHsb",value:function(){return this.metaColor.toHsb()}},{key:"toHsbString",value:function(){return this.metaColor.toHsbString()}},{key:"toHex",value:function(){return G8(this.toHexString(),this.metaColor.a<1)}},{key:"toHexString",value:function(){return this.metaColor.toHexString()}},{key:"toRgb",value:function(){return this.metaColor.toRgb()}},{key:"toRgbString",value:function(){return this.metaColor.toRgbString()}},{key:"isGradient",value:function(){return!!this.colors&&!this.cleared}},{key:"getColors",value:function(){return this.colors||[{color:this,percent:0}]}},{key:"toCssString",value:function(){let{colors:r}=this;return r?`linear-gradient(90deg, ${r.map(o=>`${o.color.toRgbString()} ${o.percent}%`).join(", ")})`:this.metaColor.toRgbString()}},{key:"equals",value:function(r){return!r||this.isGradient()!==r.isGradient()?!1:this.isGradient()?this.colors.length===r.colors.length&&this.colors.every((n,o)=>{let i=r.colors[o];return n.percent===i.percent&&n.color.equals(i.color)}):this.toHexString()===r.toHexString()}}])}();var bD=E($());var eV=E(Ne());var K8=e=>({[e.componentCls]:{[`${e.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}},[`${e.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${e.motionDurationMid} ${e.motionEaseInOut}, - opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),t1=xV;var bV=e=>({animationDuration:e,animationFillMode:"both"}),SV=e=>({animationDuration:e,animationFillMode:"both"}),Us=function(e,t,r,o){let i=(arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1)?"&":"";return{[` + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Pw=K8;var X8=e=>({animationDuration:e,animationFillMode:"both"}),Y8=e=>({animationDuration:e,animationFillMode:"both"}),As=(e,t,r,n,o=!1)=>{let i=o?"&":"";return{[` ${i}${e}-enter, ${i}${e}-appear - `]:Object.assign(Object.assign({},bV(o)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:Object.assign(Object.assign({},SV(o)),{animationPlayState:"paused"}),[` + `]:Object.assign(Object.assign({},X8(n)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:Object.assign(Object.assign({},Y8(n)),{animationPlayState:"paused"}),[` ${i}${e}-enter${e}-enter-active, ${i}${e}-appear${e}-appear-active - `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}};var ED=new xt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),RD=new xt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Yl=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,{antCls:r}=e,o=`${r}-fade`,n=t?"&":"";return[Us(o,ED,RD,e.motionDurationMid,t),{[` - ${n}${o}-enter, - ${n}${o}-appear - `]:{opacity:0,animationTimingFunction:"linear"},[`${n}${o}-leave`]:{animationTimingFunction:"linear"}}]};var OD=new xt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_D=new xt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),PD=new xt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),TD=new xt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),ND=new xt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ID=new xt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),$D=new xt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),DD=new xt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),CV={"move-up":{inKeyframes:$D,outKeyframes:DD},"move-down":{inKeyframes:OD,outKeyframes:_D},"move-left":{inKeyframes:PD,outKeyframes:TD},"move-right":{inKeyframes:ND,outKeyframes:ID}},ey=(e,t)=>{let{antCls:r}=e,o=`${r}-${t}`,{inKeyframes:n,outKeyframes:i}=CV[t];return[Us(o,n,i,e.motionDurationMid),{[` - ${o}-enter, - ${o}-appear - `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var ty=new xt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),ry=new xt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),oy=new xt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),ny=new xt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),AD=new xt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),MD=new xt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),LD=new xt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),kD=new xt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),wV={"slide-up":{inKeyframes:ty,outKeyframes:ry},"slide-down":{inKeyframes:oy,outKeyframes:ny},"slide-left":{inKeyframes:AD,outKeyframes:MD},"slide-right":{inKeyframes:LD,outKeyframes:kD}},iy=(e,t)=>{let{antCls:r}=e,o=`${r}-${t}`,{inKeyframes:n,outKeyframes:i}=wV[t];return[Us(o,n,i,e.motionDurationMid),{[` - ${o}-enter, - ${o}-appear - `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]};var FD=new xt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),zD=new xt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),r1=new xt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),o1=new xt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),WD=new xt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),BD=new xt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),jD=new xt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),VD=new xt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),HD=new xt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),UD=new xt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),GD=new xt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),qD=new xt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),EV={zoom:{inKeyframes:FD,outKeyframes:zD},"zoom-big":{inKeyframes:r1,outKeyframes:o1},"zoom-big-fast":{inKeyframes:r1,outKeyframes:o1},"zoom-left":{inKeyframes:jD,outKeyframes:VD},"zoom-right":{inKeyframes:HD,outKeyframes:UD},"zoom-up":{inKeyframes:WD,outKeyframes:BD},"zoom-down":{inKeyframes:GD,outKeyframes:qD}},Ql=(e,t)=>{let{antCls:r}=e,o=`${r}-${t}`,{inKeyframes:n,outKeyframes:i}=EV[t];return[Us(o,n,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` - ${o}-enter, - ${o}-appear - `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${o}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var XD=(e,t)=>{let{r,g:o,b:n,a:i}=e.toRgb(),a=new Jn(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:r*.299+o*.587+n*.114>192};var ay=e=>{let{paddingInline:t,onlyIconSize:r}=e;return rt(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r})},sy=e=>{var t,r,o,n,i,a;let s=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,l=(r=e.contentFontSizeSM)!==null&&r!==void 0?r:e.fontSize,c=(o=e.contentFontSizeLG)!==null&&o!==void 0?o:e.fontSizeLG,u=(n=e.contentLineHeight)!==null&&n!==void 0?n:_u(s),d=(i=e.contentLineHeightSM)!==null&&i!==void 0?i:_u(l),f=(a=e.contentLineHeightLG)!==null&&a!==void 0?a:_u(c),m=XD(new SD(e.colorBgSolid),"#fff")?"#000":"#fff",h=In.reduce((v,y)=>Object.assign(Object.assign({},v),{[`${y}ShadowColor`]:`0 ${re(e.controlOutlineWidth)} 0 ${Vl(e[`${y}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},h),{fontWeight:400,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:m,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:d,contentLineHeightLG:f,paddingBlock:Math.max((e.controlHeight-s*u)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-l*d)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-c*f)/2-e.lineWidth,0)})};var OV=e=>{let{componentCls:t,iconCls:r,fontWeight:o,opacityLoading:n,motionDurationSlow:i,motionEaseInOut:a,marginXS:s,calc:l}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:e.marginXS,alignItems:"center",justifyContent:"center",fontWeight:o,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${re(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:Aa(),"> a":{color:"currentColor"},"&:not(:disabled)":fv(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"},[`&${t}-round`]:{width:"auto"}},[`&${t}-loading`]:{opacity:n,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},YD=(e,t,r)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":r}}),_V=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),PV=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),TV=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),ly=(e,t,r,o,n,i,a,s)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:r||void 0,background:t,borderColor:o||void 0,boxShadow:"none"},YD(e,Object.assign({background:t},a),Object.assign({background:t},s))),{"&:disabled":{cursor:"not-allowed",color:n||void 0,borderColor:i||void 0}})}),NV=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},TV(e))}),IV=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),cy=(e,t,r,o)=>{let i=o&&["link","text"].includes(o)?IV:NV;return Object.assign(Object.assign({},i(e)),YD(e.componentCls,t,r))},uy=(e,t,r,o,n)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:r},cy(e,o,n))}),dy=(e,t,r,o,n)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:r},cy(e,o,n))}),fy=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),py=(e,t,r,o)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},cy(e,r,o))}),ea=(e,t,r,o,n)=>({[`&${e.componentCls}-variant-${r}`]:Object.assign({color:t,boxShadow:"none"},cy(e,o,n,r))}),$V=e=>{let{componentCls:t}=e;return In.reduce((r,o)=>{let n=e[`${o}6`],i=e[`${o}1`],a=e[`${o}5`],s=e[`${o}2`],l=e[`${o}3`],c=e[`${o}7`];return Object.assign(Object.assign({},r),{[`&${t}-color-${o}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:n,boxShadow:e[`${o}ShadowColor`]},uy(e,e.colorTextLightSolid,n,{background:a},{background:c})),dy(e,n,e.colorBgContainer,{color:a,borderColor:a,background:e.colorBgContainer},{color:c,borderColor:c,background:e.colorBgContainer})),fy(e)),py(e,i,{background:s},{background:l})),ea(e,n,"link",{color:a},{color:c})),ea(e,n,"text",{color:a,background:i},{color:c,background:l}))})},{})},DV=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},uy(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),fy(e)),py(e,e.colorFillTertiary,{background:e.colorFillSecondary},{background:e.colorFill})),ly(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),ea(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),AV=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},dy(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),fy(e)),py(e,e.colorPrimaryBg,{background:e.colorPrimaryBgHover},{background:e.colorPrimaryBorder})),ea(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),ea(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),ly(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),MV=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},uy(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),dy(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),fy(e)),py(e,e.colorErrorBg,{background:e.colorErrorBgFilledHover},{background:e.colorErrorBgActive})),ea(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),ea(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),ly(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),LV=e=>Object.assign(Object.assign({},ea(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),ly(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),kV=e=>{let{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:DV(e),[`${t}-color-primary`]:AV(e),[`${t}-color-dangerous`]:MV(e),[`${t}-color-link`]:LV(e)},$V(e))},FV=e=>Object.assign(Object.assign(Object.assign(Object.assign({},dy(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),ea(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),uy(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),ea(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),n1=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",{componentCls:r,controlHeight:o,fontSize:n,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:n,height:o,padding:`${re(l)} ${re(a)}`,borderRadius:i,[`&${r}-icon-only`]:{width:o,[s]:{fontSize:c}}}},{[`${r}${r}-circle${t}`]:_V(e)},{[`${r}${r}-round${t}`]:PV(e)}]},zV=e=>{let t=rt(e,{fontSize:e.contentFontSize});return n1(t,e.componentCls)},WV=e=>{let t=rt(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return n1(t,`${e.componentCls}-sm`)},BV=e=>{let t=rt(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return n1(t,`${e.componentCls}-lg`)},jV=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},QD=Pt("Button",e=>{let t=ay(e);return[OV(t),zV(t),WV(t),BV(t),jV(t),kV(t),FV(t),gD(t)]},sy,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function VV(e,t,r){let{focusElCls:o,focus:n,borderElCls:i}=r,a=i?"> *":"",s=["hover",n?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},o?{[`&${o}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function HV(e,t,r){let{borderElCls:o}=r,n=o?`> ${o}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${n}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${n}, &${e}-sm ${n}, &${e}-lg ${n}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${n}, &${e}-sm ${n}, &${e}-lg ${n}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function Gs(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{focus:!0},{componentCls:r}=e,o=`${r}-compact`;return{[o]:Object.assign(Object.assign({},VV(e,o,t)),HV(r,o,t))}}function UV(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function GV(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function ZD(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},UV(e,t)),GV(e.componentCls,t))}}var qV=e=>{let{componentCls:t,colorPrimaryHover:r,lineWidth:o,calc:n}=e,i=n(o).mul(-1).equal(),a=s=>{let l=`${t}-compact${s?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?i:0,insetInlineStart:s?0:i,backgroundColor:r,content:'""',width:s?"100%":o,height:s?o:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},JD=ww(["Button","compact"],e=>{let t=ay(e);return[Gs(t),ZD(t),qV(t)]},sy);var KV=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{var r,o;let{loading:n=!1,prefixCls:i,color:a,variant:s,type:l,danger:c=!1,shape:u="default",size:d,styles:f,disabled:m,className:h,rootClassName:v,children:y,icon:g,iconPosition:p="start",ghost:x=!1,block:S=!1,htmlType:b="button",classNames:w,style:C={},autoInsertSpace:R,autoFocus:_}=e,O=KV(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),N=l||"default",[k,L]=(0,Ut.useMemo)(()=>{if(a&&s)return[a,s];let me=YV[N]||[];return c?["danger",me[1]]:me},[l,a,s,c]),W=k==="danger"?"dangerous":k,{getPrefixCls:D,direction:$,autoInsertSpace:M,className:V,style:F,classNames:z,styles:U}=Do("button"),H=(r=R??M)!==null&&r!==void 0?r:!0,A=D("btn",i),[G,q,oe]=QD(A),Z=(0,Ut.useContext)(Ur),X=m??Z,ie=(0,Ut.useContext)(qw),te=(0,Ut.useMemo)(()=>XV(n),[n]),[K,Y]=(0,Ut.useState)(te.loading),[ne,Q]=(0,Ut.useState)(!1),J=(0,Ut.useRef)(null),le=_n(t,J),ue=Ut.Children.count(y)===1&&!g&&!Qv(L),de=(0,Ut.useRef)(!0);Ut.default.useEffect(()=>(de.current=!1,()=>{de.current=!0}),[]),(0,Ut.useEffect)(()=>{let me=null;te.delay>0?me=setTimeout(()=>{me=null,Y(!0)},te.delay):Y(te.loading);function ze(){me&&(clearTimeout(me),me=null)}return ze},[te]),(0,Ut.useEffect)(()=>{if(!J.current||!H)return;let me=J.current.textContent||"";ue&&Yv(me)?ne||Q(!0):ne&&Q(!1)}),(0,Ut.useEffect)(()=>{_&&J.current&&J.current.focus()},[]);let ve=Ut.default.useCallback(me=>{var ze;if(K||X){me.preventDefault();return}(ze=e.onClick)===null||ze===void 0||ze.call(e,("href"in e,me))},[e.onClick,K,X]),{compactSize:ye,compactItemClassnames:we}=Zn(A,$),ce={large:"lg",small:"sm",middle:void 0},ae=pn(me=>{var ze,Ce;return(Ce=(ze=d??ye)!==null&&ze!==void 0?ze:ie)!==null&&Ce!==void 0?Ce:me}),Re=ae&&(o=ce[ae])!==null&&o!==void 0?o:"",Me=K?"loading":g,Be=Gr(O,["navigate"]),Ie=(0,my.default)(A,q,oe,{[`${A}-${u}`]:u!=="default"&&u,[`${A}-${N}`]:N,[`${A}-dangerous`]:c,[`${A}-color-${W}`]:W,[`${A}-variant-${L}`]:L,[`${A}-${Re}`]:Re,[`${A}-icon-only`]:!y&&y!==0&&!!Me,[`${A}-background-ghost`]:x&&!Qv(L),[`${A}-loading`]:K,[`${A}-two-chinese-chars`]:ne&&H&&!K,[`${A}-block`]:S,[`${A}-rtl`]:$==="rtl",[`${A}-icon-end`]:p==="end"},we,h,v,V),Oe=Object.assign(Object.assign({},F),C),be=(0,my.default)(w?.icon,z.icon),Ve=Object.assign(Object.assign({},f?.icon||{}),U.icon||{}),He=g&&!K?Ut.default.createElement(cp,{prefixCls:A,className:be,style:Ve},g):n&&typeof n=="object"&&n.icon?Ut.default.createElement(cp,{prefixCls:A,className:be,style:Ve},n.icon):Ut.default.createElement(pD,{existIcon:!!g,prefixCls:A,loading:K,mount:de.current}),$e=y||y===0?uD(y,ue&&H):null;if(Be.href!==void 0)return G(Ut.default.createElement("a",Object.assign({},Be,{className:(0,my.default)(Ie,{[`${A}-disabled`]:X}),href:X?void 0:Be.href,style:Oe,onClick:ve,ref:le,tabIndex:X?-1:0}),He,$e));let fe=Ut.default.createElement("button",Object.assign({},O,{type:b,className:Ie,style:Oe,onClick:ve,disabled:X,ref:le}),He,$e,we&&Ut.default.createElement(JD,{prefixCls:A}));return Qv(L)||(fe=Ut.default.createElement(Xv,{component:"Button",disabled:K},fe)),G(fe)}),i1=QV;i1.Group=sD;i1.__ANT_BUTTON=!0;var eA=i1;var up=eA;var ei=E(I()),cA=E(Si());var tA=E(I()),ZV=tA.createContext(null),gy=ZV;var Zl=E(I());var rA=[];function a1(e,t){var r=Zl.useState(function(){if(!Yt())return null;var h=document.createElement("div");return h}),o=B(r,1),n=o[0],i=Zl.useRef(!1),a=Zl.useContext(gy),s=Zl.useState(rA),l=B(s,2),c=l[0],u=l[1],d=a||(i.current?void 0:function(h){u(function(v){var y=[h].concat(se(v));return y})});function f(){n.parentElement||document.body.appendChild(n),i.current=!0}function m(){var h;(h=n.parentElement)===null||h===void 0||h.removeChild(n),i.current=!1}return yt(function(){return e?a?a(f):f():m(),m},[e]),yt(function(){c.length&&(c.forEach(function(h){return h()}),u(rA))},[c]),[n,d]}var aA=E(I());function JV(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var o=r.style;o.position="absolute",o.left="0",o.top="0",o.width="100px",o.height="100px",o.overflow="scroll";var n,i;if(e){var a=getComputedStyle(e);o.scrollbarColor=a.scrollbarColor,o.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(e,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",d=c?"height: ".concat(s.height,";"):"";bo(` + `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}};var Y$=new yt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),Q$=new yt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),Tw=(e,t=!1)=>{let{antCls:r}=e,n=`${r}-fade`,o=t?"&":"";return[As(n,Y$,Q$,e.motionDurationMid,t),{[` + ${o}${n}-enter, + ${o}${n}-appear + `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${n}-leave`]:{animationTimingFunction:"linear"}}]};var J$=new yt("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Z$=new yt("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),eD=new yt("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),tD=new yt("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),rD=new yt("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),nD=new yt("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),oD=new yt("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),iD=new yt("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),Q8={"move-up":{inKeyframes:oD,outKeyframes:iD},"move-down":{inKeyframes:J$,outKeyframes:Z$},"move-left":{inKeyframes:eD,outKeyframes:tD},"move-right":{inKeyframes:rD,outKeyframes:nD}},Tv=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:i}=Q8[t];return[As(n,o,i,e.motionDurationMid),{[` + ${n}-enter, + ${n}-appear + `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var Nv=new yt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Iv=new yt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),$v=new yt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Dv=new yt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),aD=new yt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),sD=new yt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),lD=new yt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),cD=new yt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),J8={"slide-up":{inKeyframes:Nv,outKeyframes:Iv},"slide-down":{inKeyframes:$v,outKeyframes:Dv},"slide-left":{inKeyframes:aD,outKeyframes:sD},"slide-right":{inKeyframes:lD,outKeyframes:cD}},Av=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:i}=J8[t];return[As(n,o,i,e.motionDurationMid),{[` + ${n}-enter, + ${n}-appear + `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]};var uD=new yt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),fD=new yt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Nw=new yt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Iw=new yt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),dD=new yt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),pD=new yt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),mD=new yt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),gD=new yt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),hD=new yt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),vD=new yt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),yD=new yt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),xD=new yt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),Z8={zoom:{inKeyframes:uD,outKeyframes:fD},"zoom-big":{inKeyframes:Nw,outKeyframes:Iw},"zoom-big-fast":{inKeyframes:Nw,outKeyframes:Iw},"zoom-left":{inKeyframes:mD,outKeyframes:gD},"zoom-right":{inKeyframes:hD,outKeyframes:vD},"zoom-up":{inKeyframes:dD,outKeyframes:pD},"zoom-down":{inKeyframes:yD,outKeyframes:xD}},$w=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:i}=Z8[t];return[As(n,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` + ${n}-enter, + ${n}-appear + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var SD=(e,t)=>{let{r,g:n,b:o,a:i}=e.toRgb(),a=new Yo(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:r*.299+n*.587+o*.114>192};var kv=e=>{let{paddingInline:t,onlyIconSize:r}=e;return ut(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r})},Mv=e=>{var t,r,n,o,i,a;let s=(t=e.contentFontSize)!==null&&t!==void 0?t:e.fontSize,l=(r=e.contentFontSizeSM)!==null&&r!==void 0?r:e.fontSize,c=(n=e.contentFontSizeLG)!==null&&n!==void 0?n:e.fontSizeLG,u=(o=e.contentLineHeight)!==null&&o!==void 0?o:su(s),f=(i=e.contentLineHeightSM)!==null&&i!==void 0?i:su(l),p=(a=e.contentLineHeightLG)!==null&&a!==void 0?a:su(c),g=SD(new X$(e.colorBgSolid),"#fff")?"#000":"#fff",h=Eo.reduce((v,y)=>Object.assign(Object.assign({},v),{[`${y}ShadowColor`]:`0 ${oe(e.controlOutlineWidth)} 0 ${Tl(e[`${y}1`],e.colorBgContainer)}`}),{});return Object.assign(Object.assign({},h),{fontWeight:400,defaultShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlTmpOutline}`,primaryShadow:`0 ${e.controlOutlineWidth}px 0 ${e.controlOutline}`,dangerShadow:`0 ${e.controlOutlineWidth}px 0 ${e.colorErrorOutline}`,primaryColor:e.colorTextLightSolid,dangerColor:e.colorTextLightSolid,borderColorDisabled:e.colorBorder,defaultGhostColor:e.colorBgContainer,ghostBg:"transparent",defaultGhostBorderColor:e.colorBgContainer,paddingInline:e.paddingContentHorizontal-e.lineWidth,paddingInlineLG:e.paddingContentHorizontal-e.lineWidth,paddingInlineSM:8-e.lineWidth,onlyIconSize:"inherit",onlyIconSizeSM:"inherit",onlyIconSizeLG:"inherit",groupBorderColor:e.colorPrimaryHover,linkHoverBg:"transparent",textTextColor:e.colorText,textTextHoverColor:e.colorText,textTextActiveColor:e.colorText,textHoverBg:e.colorFillTertiary,defaultColor:e.colorText,defaultBg:e.colorBgContainer,defaultBorderColor:e.colorBorder,defaultBorderColorDisabled:e.colorBorder,defaultHoverBg:e.colorBgContainer,defaultHoverColor:e.colorPrimaryHover,defaultHoverBorderColor:e.colorPrimaryHover,defaultActiveBg:e.colorBgContainer,defaultActiveColor:e.colorPrimaryActive,defaultActiveBorderColor:e.colorPrimaryActive,solidTextColor:g,contentFontSize:s,contentFontSizeSM:l,contentFontSizeLG:c,contentLineHeight:u,contentLineHeightSM:f,contentLineHeightLG:p,paddingBlock:Math.max((e.controlHeight-s*u)/2-e.lineWidth,0),paddingBlockSM:Math.max((e.controlHeightSM-l*f)/2-e.lineWidth,0),paddingBlockLG:Math.max((e.controlHeightLG-c*p)/2-e.lineWidth,0)})};var tV=e=>{let{componentCls:t,iconCls:r,fontWeight:n,opacityLoading:o,motionDurationSlow:i,motionEaseInOut:a,marginXS:s,calc:l}=e;return{[t]:{outline:"none",position:"relative",display:"inline-flex",gap:e.marginXS,alignItems:"center",justifyContent:"center",fontWeight:n,whiteSpace:"nowrap",textAlign:"center",backgroundImage:"none",background:"transparent",border:`${oe(e.lineWidth)} ${e.lineType} transparent`,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,userSelect:"none",touchAction:"manipulation",color:e.colorText,"&:disabled > *":{pointerEvents:"none"},[`${t}-icon > svg`]:_a(),"> a":{color:"currentColor"},"&:not(:disabled)":D2(e),[`&${t}-two-chinese-chars::first-letter`]:{letterSpacing:"0.34em"},[`&${t}-two-chinese-chars > *:not(${r})`]:{marginInlineEnd:"-0.34em",letterSpacing:"0.34em"},[`&${t}-icon-only`]:{paddingInline:0,[`&${t}-compact-item`]:{flex:"none"},[`&${t}-round`]:{width:"auto"}},[`&${t}-loading`]:{opacity:o,cursor:"default"},[`${t}-loading-icon`]:{transition:["width","opacity","margin"].map(c=>`${c} ${i} ${a}`).join(",")},[`&:not(${t}-icon-end)`]:{[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineEnd:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineEnd:0},"&-leave-start":{marginInlineEnd:0},"&-leave-active":{marginInlineEnd:l(s).mul(-1).equal()}}},"&-icon-end":{flexDirection:"row-reverse",[`${t}-loading-icon-motion`]:{"&-appear-start, &-enter-start":{marginInlineStart:l(s).mul(-1).equal()},"&-appear-active, &-enter-active":{marginInlineStart:0},"&-leave-start":{marginInlineStart:0},"&-leave-active":{marginInlineStart:l(s).mul(-1).equal()}}}}}},CD=(e,t,r)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":r}}),rV=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),nV=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),oV=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),Fv=(e,t,r,n,o,i,a,s)=>({[`&${e}-background-ghost`]:Object.assign(Object.assign({color:r||void 0,background:t,borderColor:n||void 0,boxShadow:"none"},CD(e,Object.assign({background:t},a),Object.assign({background:t},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),iV=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},oV(e))}),aV=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Lv=(e,t,r,n)=>{let i=n&&["link","text"].includes(n)?aV:iV;return Object.assign(Object.assign({},i(e)),CD(e.componentCls,t,r))},zv=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:r},Lv(e,n,o))}),Wv=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:r},Lv(e,n,o))}),Bv=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),jv=(e,t,r,n)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},Lv(e,r,n))}),Ki=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-${r}`]:Object.assign({color:t,boxShadow:"none"},Lv(e,n,o,r))}),sV=e=>{let{componentCls:t}=e;return Eo.reduce((r,n)=>{let o=e[`${n}6`],i=e[`${n}1`],a=e[`${n}5`],s=e[`${n}2`],l=e[`${n}3`],c=e[`${n}7`];return Object.assign(Object.assign({},r),{[`&${t}-color-${n}`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:o,boxShadow:e[`${n}ShadowColor`]},zv(e,e.colorTextLightSolid,o,{background:a},{background:c})),Wv(e,o,e.colorBgContainer,{color:a,borderColor:a,background:e.colorBgContainer},{color:c,borderColor:c,background:e.colorBgContainer})),Bv(e)),jv(e,i,{background:s},{background:l})),Ki(e,o,"link",{color:a},{color:c})),Ki(e,o,"text",{color:a,background:i},{color:c,background:l}))})},{})},lV=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},zv(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),Bv(e)),jv(e,e.colorFillTertiary,{background:e.colorFillSecondary},{background:e.colorFill})),Fv(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),Ki(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),cV=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Wv(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),Bv(e)),jv(e,e.colorPrimaryBg,{background:e.colorPrimaryBgHover},{background:e.colorPrimaryBorder})),Ki(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),Ki(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),Fv(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),uV=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},zv(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Wv(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),Bv(e)),jv(e,e.colorErrorBg,{background:e.colorErrorBgFilledHover},{background:e.colorErrorBgActive})),Ki(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),Ki(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),Fv(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),fV=e=>Object.assign(Object.assign({},Ki(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),Fv(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),dV=e=>{let{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:lV(e),[`${t}-color-primary`]:cV(e),[`${t}-color-dangerous`]:uV(e),[`${t}-color-link`]:fV(e)},sV(e))},pV=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Wv(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),Ki(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),zv(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),Ki(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),Dw=(e,t="")=>{let{componentCls:r,controlHeight:n,fontSize:o,borderRadius:i,buttonPaddingHorizontal:a,iconCls:s,buttonPaddingVertical:l,buttonIconOnlyFontSize:c}=e;return[{[t]:{fontSize:o,height:n,padding:`${oe(l)} ${oe(a)}`,borderRadius:i,[`&${r}-icon-only`]:{width:n,[s]:{fontSize:c}}}},{[`${r}${r}-circle${t}`]:rV(e)},{[`${r}${r}-round${t}`]:nV(e)}]},mV=e=>{let t=ut(e,{fontSize:e.contentFontSize});return Dw(t,e.componentCls)},gV=e=>{let t=ut(e,{controlHeight:e.controlHeightSM,fontSize:e.contentFontSizeSM,padding:e.paddingXS,buttonPaddingHorizontal:e.paddingInlineSM,buttonPaddingVertical:0,borderRadius:e.borderRadiusSM,buttonIconOnlyFontSize:e.onlyIconSizeSM});return Dw(t,`${e.componentCls}-sm`)},hV=e=>{let t=ut(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return Dw(t,`${e.componentCls}-lg`)},vV=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},wD=Gt("Button",e=>{let t=kv(e);return[tV(t),mV(t),gV(t),hV(t),vV(t),dV(t),pV(t),V$(t)]},Mv,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function yV(e,t,r){let{focusElCls:n,focus:o,borderElCls:i}=r,a=i?"> *":"",s=["hover",o?"focus":null,"active"].filter(Boolean).map(l=>`&:${l} ${a}`).join(",");return{[`&-item:not(${t}-last-item)`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal()},"&-item":Object.assign(Object.assign({[s]:{zIndex:2}},n?{[`&${n}`]:{zIndex:2}}:{}),{[`&[disabled] ${a}`]:{zIndex:0}})}}function xV(e,t,r){let{borderElCls:n}=r,o=n?`> ${n}`:"";return{[`&-item:not(${t}-first-item):not(${t}-last-item) ${o}`]:{borderRadius:0},[`&-item:not(${t}-last-item)${t}-first-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&-item:not(${t}-first-item)${t}-last-item`]:{[`& ${o}, &${e}-sm ${o}, &${e}-lg ${o}`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}}function ks(e,t={focus:!0}){let{componentCls:r}=e,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},yV(e,n,t)),xV(r,n,t))}}function bV(e,t){return{[`&-item:not(${t}-last-item)`]:{marginBottom:e.calc(e.lineWidth).mul(-1).equal()},"&-item":{"&:hover,&:focus,&:active":{zIndex:2},"&[disabled]":{zIndex:0}}}}function SV(e,t){return{[`&-item:not(${t}-first-item):not(${t}-last-item)`]:{borderRadius:0},[`&-item${t}-first-item:not(${t}-last-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderEndEndRadius:0,borderEndStartRadius:0}},[`&-item${t}-last-item:not(${t}-first-item)`]:{[`&, &${e}-sm, &${e}-lg`]:{borderStartStartRadius:0,borderStartEndRadius:0}}}}function ED(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},bV(e,t)),SV(e.componentCls,t))}}var CV=e=>{let{componentCls:t,colorPrimaryHover:r,lineWidth:n,calc:o}=e,i=o(n).mul(-1).equal(),a=s=>{let l=`${t}-compact${s?"-vertical":""}-item${t}-primary:not([disabled])`;return{[`${l} + ${l}::before`]:{position:"absolute",top:s?i:0,insetInlineStart:s?0:i,backgroundColor:r,content:'""',width:s?"100%":n,height:s?n:"100%"}}};return Object.assign(Object.assign({},a()),a(!0))},RD=YC(["Button","compact"],e=>{let t=kv(e);return[ks(t),ED(t),CV(t)]},Mv);var wV=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{var r,n;let{loading:o=!1,prefixCls:i,color:a,variant:s,type:l,danger:c=!1,shape:u="default",size:f,styles:p,disabled:g,className:h,rootClassName:v,children:y,icon:m,iconPosition:d="start",ghost:x=!1,block:b=!1,htmlType:S="button",classNames:w,style:C={},autoInsertSpace:R,autoFocus:P}=e,O=wV(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),A=l||"default",{button:F}=Wt.default.useContext(rt),[M,H]=(0,Wt.useMemo)(()=>{if(a&&s)return[a,s];if(l||c){let _e=RV[A]||[];return c?["danger",_e[1]]:_e}return F?.color&&F?.variant?[F.color,F.variant]:["default","outlined"]},[l,a,s,c,F?.variant,F?.color]),N=M==="danger"?"dangerous":M,{getPrefixCls:I,direction:D,autoInsertSpace:U,className:z,style:W,classNames:q,styles:j}=no("button"),k=(r=R??U)!==null&&r!==void 0?r:!0,V=I("btn",i),[G,J,Y]=wD(V),X=(0,Wt.useContext)(Ur),ae=g??X,Z=(0,Wt.useContext)(bw),K=(0,Wt.useMemo)(()=>EV(o),[o]),[Q,re]=(0,Wt.useState)(K.loading),[ee,ne]=(0,Wt.useState)(!1),de=(0,Wt.useRef)(null),le=xi(t,de),pe=Wt.Children.count(y)===1&&!m&&!_v(H),Oe=(0,Wt.useRef)(!0);Wt.default.useEffect(()=>(Oe.current=!1,()=>{Oe.current=!0}),[]),(0,Wt.useEffect)(()=>{let _e=null;K.delay>0?_e=setTimeout(()=>{_e=null,re(!0)},K.delay):re(K.loading);function he(){_e&&(clearTimeout(_e),_e=null)}return he},[K]),(0,Wt.useEffect)(()=>{if(!de.current||!k)return;let _e=de.current.textContent||"";pe&&Ov(_e)?ee||ne(!0):ee&&ne(!1)}),(0,Wt.useEffect)(()=>{P&&de.current&&de.current.focus()},[]);let Ce=Wt.default.useCallback(_e=>{var he;if(Q||ae){_e.preventDefault();return}(he=e.onClick)===null||he===void 0||he.call(e,("href"in e,_e))},[e.onClick,Q,ae]),{compactSize:De,compactItemClassnames:ce}=Xo(V,D),ie={large:"lg",small:"sm",middle:void 0},Re=ao(_e=>{var he,Je;return(Je=(he=f??De)!==null&&he!==void 0?he:Z)!==null&&Je!==void 0?Je:_e}),Le=Re&&(n=ie[Re])!==null&&n!==void 0?n:"",Ge=Q?"loading":m,Me=qr(O,["navigate"]),Ie=(0,Vv.default)(V,J,Y,{[`${V}-${u}`]:u!=="default"&&u,[`${V}-${A}`]:A,[`${V}-dangerous`]:c,[`${V}-color-${N}`]:N,[`${V}-variant-${H}`]:H,[`${V}-${Le}`]:Le,[`${V}-icon-only`]:!y&&y!==0&&!!Ge,[`${V}-background-ghost`]:x&&!_v(H),[`${V}-loading`]:Q,[`${V}-two-chinese-chars`]:ee&&k&&!Q,[`${V}-block`]:b,[`${V}-rtl`]:D==="rtl",[`${V}-icon-end`]:d==="end"},ce,h,v,z),je=Object.assign(Object.assign({},W),C),We=(0,Vv.default)(w?.icon,q.icon),He=Object.assign(Object.assign({},p?.icon||{}),j.icon||{}),ye=m&&!Q?Wt.default.createElement(Fd,{prefixCls:V,className:We,style:He},m):o&&typeof o=="object"&&o.icon?Wt.default.createElement(Fd,{prefixCls:V,className:We,style:He},o.icon):Wt.default.createElement(B$,{existIcon:!!m,prefixCls:V,loading:Q,mount:Oe.current}),se=y||y===0?L$(y,pe&&k):null;if(Me.href!==void 0)return G(Wt.default.createElement("a",Object.assign({},Me,{className:(0,Vv.default)(Ie,{[`${V}-disabled`]:ae}),href:ae?void 0:Me.href,style:je,onClick:Ce,ref:le,tabIndex:ae?-1:0}),ye,se));let xe=Wt.default.createElement("button",Object.assign({},O,{type:S,className:Ie,style:je,onClick:Ce,disabled:ae,ref:le}),ye,se,ce&&Wt.default.createElement(RD,{prefixCls:V}));return _v(H)||(xe=Wt.default.createElement(Rv,{component:"Button",disabled:Q},xe)),G(xe)}),Aw=OV;Aw.Group=k$;Aw.__ANT_BUTTON=!0;var OD=Aw;var Ld=OD;var Qo=E($()),kD=E(Vi());var _D=E($()),_V=_D.createContext(null),Hv=_V;var Ml=E($());var PD=[];function kw(e,t){var r=Ml.useState(function(){if(!Yt())return null;var h=document.createElement("div");return h}),n=B(r,1),o=n[0],i=Ml.useRef(!1),a=Ml.useContext(Hv),s=Ml.useState(PD),l=B(s,2),c=l[0],u=l[1],f=a||(i.current?void 0:function(h){u(function(v){var y=[h].concat(te(v));return y})});function p(){o.parentElement||document.body.appendChild(o),i.current=!0}function g(){var h;(h=o.parentElement)===null||h===void 0||h.removeChild(o),i.current=!1}return vt(function(){return e?a?a(p):p():g(),g},[e]),vt(function(){c.length&&(c.forEach(function(h){return h()}),u(PD))},[c]),[o,f]}var $D=E($());function PV(e){var t="rc-scrollbar-measure-".concat(Math.random().toString(36).substring(7)),r=document.createElement("div");r.id=t;var n=r.style;n.position="absolute",n.left="0",n.top="0",n.width="100px",n.height="100px",n.overflow="scroll";var o,i;if(e){var a=getComputedStyle(e);n.scrollbarColor=a.scrollbarColor,n.scrollbarWidth=a.scrollbarWidth;var s=getComputedStyle(e,"::-webkit-scrollbar"),l=parseInt(s.width,10),c=parseInt(s.height,10);try{var u=l?"width: ".concat(s.width,";"):"",f=c?"height: ".concat(s.height,";"):"";yn(` #`.concat(t,`::-webkit-scrollbar { `).concat(u,` -`).concat(d,` -}`),t)}catch(h){console.error(h),n=l,i=c}}document.body.appendChild(r);var f=e&&n&&!isNaN(n)?n:r.offsetWidth-r.clientWidth,m=e&&i&&!isNaN(i)?i:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),Xi(t),{width:f,height:m}}function oA(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:JV(e)}function nA(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var eH="rc-util-locker-".concat(Date.now()),iA=0;function s1(e){var t=!!e,r=aA.useState(function(){return iA+=1,"".concat(eH,"_").concat(iA)}),o=B(r,1),n=o[0];yt(function(){if(t){var i=oA(document.body).width,a=nA();bo(` +`).concat(f,` +}`),t)}catch(h){console.error(h),o=l,i=c}}document.body.appendChild(r);var p=e&&o&&!isNaN(o)?o:r.offsetWidth-r.clientWidth,g=e&&i&&!isNaN(i)?i:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),Ui(t),{width:p,height:g}}function TD(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:PV(e)}function ND(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var TV="rc-util-locker-".concat(Date.now()),ID=0;function Mw(e){var t=!!e,r=$D.useState(function(){return ID+=1,"".concat(TV,"_").concat(ID)}),n=B(r,1),o=n[0];vt(function(){if(t){var i=TD(document.body).width,a=ND();yn(` html body { overflow-y: hidden; `.concat(a?"width: calc(100% - ".concat(i,"px);"):"",` -}`),n)}else Xi(n);return function(){Xi(n)}},[t,n])}var sA=!1;function l1(e){return typeof e=="boolean"&&(sA=e),sA}var lA=function(t){return t===!1?!1:!Yt()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},tH=ei.forwardRef(function(e,t){var r=e.open,o=e.autoLock,n=e.getContainer,i=e.debug,a=e.autoDestroy,s=a===void 0?!0:a,l=e.children,c=ei.useState(r),u=B(c,2),d=u[0],f=u[1],m=d||r;ei.useEffect(function(){(s||r)&&f(r)},[r,s]);var h=ei.useState(function(){return lA(n)}),v=B(h,2),y=v[0],g=v[1];ei.useEffect(function(){var k=lA(n);g(k??null)});var p=a1(m&&!y,i),x=B(p,2),S=x[0],b=x[1],w=y??S;s1(o&&r&&Yt()&&(w===S||w===document.body));var C=null;if(l&&wi(l)&&t){var R=l;C=R.ref}var _=_n(C,t);if(!m||!Yt()||y===void 0)return null;var O=w===!1||l1(),N=l;return t&&(N=ei.cloneElement(l,{ref:_})),ei.createElement(gy.Provider,{value:b},O?N:(0,cA.createPortal)(N,w))}),uA=tH;var Jl=uA;var ta=E(I());var dA=E(I()),hy=dA.createContext({});var f1=E(Ee());var dp=E(I());function rH(){var e=P({},dp);return e.useId}var fA=0;var pA=rH(),ku=pA?function(t){var r=pA();return t||r}:function(t){var r=dp.useState("ssr-id"),o=B(r,2),n=o[0],i=o[1];return dp.useEffect(function(){var a=fA;fA+=1,i("rc_unique_".concat(a))},[]),t||n};var tc=E(I()),Ba=E(I());function c1(e,t,r){var o=t;return!o&&r&&(o="".concat(e,"-").concat(r)),o}function mA(e,t){var r=e["page".concat(t?"Y":"X","Offset")],o="scroll".concat(t?"Top":"Left");if(typeof r!="number"){var n=e.document;r=n.documentElement[o],typeof r!="number"&&(r=n.body[o])}return r}function gA(e){var t=e.getBoundingClientRect(),r={left:t.left,top:t.top},o=e.ownerDocument,n=o.defaultView||o.parentWindow;return r.left+=mA(n),r.top+=mA(n,!0),r}var ec=E(I()),yA=E(I()),xA=E(Ee());var Fu=E(Ee());var qr=E(I());var hA=E(I()),vA=hA.memo(function(e){var t=e.children;return t},function(e,t){var r=t.shouldUpdate;return!r});var oH={width:0,height:0,overflow:"hidden",outline:"none"},nH={outline:"none"},iH=qr.default.forwardRef(function(e,t){var r=e.prefixCls,o=e.className,n=e.style,i=e.title,a=e.ariaId,s=e.footer,l=e.closable,c=e.closeIcon,u=e.onClose,d=e.children,f=e.bodyStyle,m=e.bodyProps,h=e.modalRender,v=e.onMouseDown,y=e.onMouseUp,g=e.holderRef,p=e.visible,x=e.forceRender,S=e.width,b=e.height,w=e.classNames,C=e.styles,R=qr.default.useContext(hy),_=R.panel,O=_n(g,_),N=(0,qr.useRef)(),k=(0,qr.useRef)();qr.default.useImperativeHandle(t,function(){return{focus:function(){var U;(U=N.current)===null||U===void 0||U.focus({preventScroll:!0})},changeActive:function(U){var H=document,A=H.activeElement;U&&A===k.current?N.current.focus({preventScroll:!0}):!U&&A===N.current&&k.current.focus({preventScroll:!0})}}});var L={};S!==void 0&&(L.width=S),b!==void 0&&(L.height=b);var j=s?qr.default.createElement("div",{className:(0,Fu.default)("".concat(r,"-footer"),w?.footer),style:P({},C?.footer)},s):null,W=i?qr.default.createElement("div",{className:(0,Fu.default)("".concat(r,"-header"),w?.header),style:P({},C?.header)},qr.default.createElement("div",{className:"".concat(r,"-title"),id:a},i)):null,D=(0,qr.useMemo)(function(){return pe(l)==="object"&&l!==null?l:l?{closeIcon:c??qr.default.createElement("span",{className:"".concat(r,"-close-x")})}:{}},[l,c,r]),$=Ao(D,!0),M=pe(l)==="object"&&l.disabled,V=l?qr.default.createElement("button",ee({type:"button",onClick:u,"aria-label":"Close"},$,{className:"".concat(r,"-close"),disabled:M}),D.closeIcon):null,F=qr.default.createElement("div",{className:(0,Fu.default)("".concat(r,"-content"),w?.content),style:C?.content},V,W,qr.default.createElement("div",ee({className:(0,Fu.default)("".concat(r,"-body"),w?.body),style:P(P({},f),C?.body)},m),d),j);return qr.default.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":i?a:null,"aria-modal":"true",ref:O,style:P(P({},n),L),className:(0,Fu.default)(r,o),onMouseDown:v,onMouseUp:y},qr.default.createElement("div",{ref:N,tabIndex:0,style:nH},qr.default.createElement(vA,{shouldUpdate:p||x},h?h(F):F)),qr.default.createElement("div",{tabIndex:0,ref:k,style:oH}))}),u1=iH;var bA=ec.forwardRef(function(e,t){var r=e.prefixCls,o=e.title,n=e.style,i=e.className,a=e.visible,s=e.forceRender,l=e.destroyOnClose,c=e.motionName,u=e.ariaId,d=e.onVisibleChanged,f=e.mousePosition,m=(0,yA.useRef)(),h=ec.useState(),v=B(h,2),y=v[0],g=v[1],p={};y&&(p.transformOrigin=y);function x(){var S=gA(m.current);g(f&&(f.x||f.y)?"".concat(f.x-S.left,"px ").concat(f.y-S.top,"px"):"")}return ec.createElement(so,{visible:a,onVisibleChanged:d,onAppearPrepare:x,onEnterPrepare:x,forceRender:s,motionName:c,removeOnLeave:l,ref:m},function(S,b){var w=S.className,C=S.style;return ec.createElement(u1,ee({},e,{ref:t,title:o,ariaId:u,prefixCls:r,holderRef:b,style:P(P(P({},C),n),p),className:(0,xA.default)(i,w)}))})});bA.displayName="Content";var SA=bA;var d1=E(I()),CA=E(Ee());var aH=function(t){var r=t.prefixCls,o=t.style,n=t.visible,i=t.maskProps,a=t.motionName,s=t.className;return d1.createElement(so,{key:"mask",visible:n,motionName:a,leavedClassName:"".concat(r,"-mask-hidden")},function(l,c){var u=l.className,d=l.style;return d1.createElement("div",ee({ref:c,style:P(P({},d),o),className:(0,CA.default)("".concat(r,"-mask"),u,s)},i))})},wA=aH;var sH=function(t){var r=t.prefixCls,o=r===void 0?"rc-dialog":r,n=t.zIndex,i=t.visible,a=i===void 0?!1:i,s=t.keyboard,l=s===void 0?!0:s,c=t.focusTriggerAfterClose,u=c===void 0?!0:c,d=t.wrapStyle,f=t.wrapClassName,m=t.wrapProps,h=t.onClose,v=t.afterOpenChange,y=t.afterClose,g=t.transitionName,p=t.animation,x=t.closable,S=x===void 0?!0:x,b=t.mask,w=b===void 0?!0:b,C=t.maskTransitionName,R=t.maskAnimation,_=t.maskClosable,O=_===void 0?!0:_,N=t.maskStyle,k=t.maskProps,L=t.rootClassName,j=t.classNames,W=t.styles,D=(0,Ba.useRef)(),$=(0,Ba.useRef)(),M=(0,Ba.useRef)(),V=tc.useState(a),F=B(V,2),z=F[0],U=F[1],H=ku();function A(){mu($.current,document.activeElement)||(D.current=document.activeElement)}function G(){if(!mu($.current,document.activeElement)){var Q;(Q=M.current)===null||Q===void 0||Q.focus()}}function q(Q){if(Q)G();else{if(U(!1),w&&D.current&&u){try{D.current.focus({preventScroll:!0})}catch{}D.current=null}z&&y?.()}v?.(Q)}function oe(Q){h?.(Q)}var Z=(0,Ba.useRef)(!1),X=(0,Ba.useRef)(),ie=function(){clearTimeout(X.current),Z.current=!0},te=function(){X.current=setTimeout(function(){Z.current=!1})},K=null;O&&(K=function(J){Z.current?Z.current=!1:$.current===J.target&&oe(J)});function Y(Q){if(l&&Q.keyCode===Fe.ESC){Q.stopPropagation(),oe(Q);return}a&&Q.keyCode===Fe.TAB&&M.current.changeActive(!Q.shiftKey)}(0,Ba.useEffect)(function(){a&&(U(!0),A())},[a]),(0,Ba.useEffect)(function(){return function(){clearTimeout(X.current)}},[]);var ne=P(P(P({zIndex:n},d),W?.wrapper),{},{display:z?null:"none"});return tc.createElement("div",ee({className:(0,f1.default)("".concat(o,"-root"),L)},Ao(t,{data:!0})),tc.createElement(wA,{prefixCls:o,visible:w&&a,motionName:c1(o,C,R),style:P(P({zIndex:n},N),W?.mask),maskProps:k,className:j?.mask}),tc.createElement("div",ee({tabIndex:-1,onKeyDown:Y,className:(0,f1.default)("".concat(o,"-wrap"),f,j?.wrapper),ref:$,onClick:K,style:ne},m),tc.createElement(SA,ee({},t,{onMouseDown:ie,onMouseUp:te,ref:M,closable:S,ariaId:H,prefixCls:o,visible:a&&z,onClose:oe,onVisibleChanged:q,motionName:c1(o,g,p)}))))},EA=sH;var RA=function(t){var r=t.visible,o=t.getContainer,n=t.forceRender,i=t.destroyOnClose,a=i===void 0?!1:i,s=t.afterClose,l=t.panelRef,c=ta.useState(r),u=B(c,2),d=u[0],f=u[1],m=ta.useMemo(function(){return{panel:l}},[l]);return ta.useEffect(function(){r&&f(!0)},[r]),!n&&a&&!d?null:ta.createElement(hy.Provider,{value:m},ta.createElement(Jl,{open:r||n||d,autoDestroy:!1,getContainer:o,autoLock:r||d},ta.createElement(EA,ee({},t,{destroyOnClose:a,afterClose:function(){s?.(),f(!1)}}))))};RA.displayName="Dialog";var OA=RA;var _A=OA;var _1=E(I());var ja=E(I());var vM=E(I());var Qo=E(I());var PA=E(I()),Ii="RC_FORM_INTERNAL_HOOKS",Kt=function(){Vt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},lH=PA.createContext({getFieldValue:Kt,getFieldsValue:Kt,getFieldError:Kt,getFieldWarning:Kt,getFieldsError:Kt,isFieldsTouched:Kt,isFieldTouched:Kt,isFieldValidating:Kt,isFieldsValidating:Kt,resetFields:Kt,setFields:Kt,setFieldValue:Kt,setFieldsValue:Kt,validateFields:Kt,submit:Kt,getInternalHooks:function(){return Kt(),{dispatch:Kt,initEntityValue:Kt,registerField:Kt,useSubscribe:Kt,setInitialValues:Kt,destroyForm:Kt,setCallbacks:Kt,registerWatch:Kt,getFields:Kt,setValidateMessages:Kt,setPreserve:Kt,getInitialValue:Kt}}}),$i=lH;var TA=E(I()),cH=TA.createContext(null),qs=cH;function fp(e){return e==null?[]:Array.isArray(e)?e:[e]}function NA(e){return e&&!!e._init}function vy(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var yy=vy();function IA(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function $A(e,t,r){if(Bf())return Reflect.construct.apply(null,arguments);var o=[null];o.push.apply(o,t);var n=new(e.bind.apply(e,o));return r&&Is(n,r.prototype),n}function xy(e){var t=typeof Map=="function"?new Map:void 0;return xy=function(o){if(o===null||!IA(o))return o;if(typeof o!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(o))return t.get(o);t.set(o,n)}function n(){return $A(o,arguments,kl(this).constructor)}return n.prototype=Object.create(o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),Is(n,o)},xy(e)}var uH=/%[sdj%]/g,MA=function(){};typeof process<"u"&&process.env;function by(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var o=r.field;t[o]=t[o]||[],t[o].push(r)}),t}function Kr(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o=i)return s;switch(s){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch{return"[Circular]"}break;default:return s}});return a}return e}function dH(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Mt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||dH(t)&&typeof e=="string"&&!e)}function fH(e,t,r){var o=[],n=0,i=e.length;function a(s){o.push.apply(o,se(s||[])),n++,n===i&&r(o)}e.forEach(function(s){t(s,a)})}function DA(e,t,r){var o=0,n=e.length;function i(a){if(a&&a.length){r(a);return}var s=o;o=o+1,st.max?n.push(Kr(i.messages[d].max,t.fullField,t.max)):s&&l&&(ut.max)&&n.push(Kr(i.messages[d].range,t.fullField,t.min,t.max))},zA=yH;var xH=function(t,r,o,n,i,a){t.required&&(!o.hasOwnProperty(t.field)||Mt(r,a||t.type))&&n.push(Kr(i.messages.required,t.fullField))},Sy=xH;var Cy,WA=function(){if(Cy)return Cy;var e="[a-fA-F\\d:]",t=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",o="[a-fA-F\\d]{1,4}",n=["(?:".concat(o,":){7}(?:").concat(o,"|:)"),"(?:".concat(o,":){6}(?:").concat(r,"|:").concat(o,"|:)"),"(?:".concat(o,":){5}(?::").concat(r,"|(?::").concat(o,"){1,2}|:)"),"(?:".concat(o,":){4}(?:(?::").concat(o,"){0,1}:").concat(r,"|(?::").concat(o,"){1,3}|:)"),"(?:".concat(o,":){3}(?:(?::").concat(o,"){0,2}:").concat(r,"|(?::").concat(o,"){1,4}|:)"),"(?:".concat(o,":){2}(?:(?::").concat(o,"){0,3}:").concat(r,"|(?::").concat(o,"){1,5}|:)"),"(?:".concat(o,":){1}(?:(?::").concat(o,"){0,4}:").concat(r,"|(?::").concat(o,"){1,6}|:)"),"(?::(?:(?::".concat(o,"){0,5}:").concat(r,"|(?::").concat(o,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(n.join("|"),")").concat(i),s=new RegExp("(?:^".concat(r,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(r,"$")),c=new RegExp("^".concat(a,"$")),u=function(w){return w&&w.exact?s:new RegExp("(?:".concat(t(w)).concat(r).concat(t(w),")|(?:").concat(t(w)).concat(a).concat(t(w),")"),"g")};u.v4=function(b){return b&&b.exact?l:new RegExp("".concat(t(b)).concat(r).concat(t(b)),"g")},u.v6=function(b){return b&&b.exact?c:new RegExp("".concat(t(b)).concat(a).concat(t(b)),"g")};var d="(?:(?:[a-z]+:)?//)",f="(?:\\S+(?::\\S*)?@)?",m=u.v4().source,h=u.v6().source,v="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",y="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",g="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",p="(?::\\d{2,5})?",x='(?:[/?#][^\\s"]*)?',S="(?:".concat(d,"|www\\.)").concat(f,"(?:localhost|").concat(m,"|").concat(h,"|").concat(v).concat(y).concat(g,")").concat(p).concat(x);return Cy=new RegExp("(?:^".concat(S,"$)"),"i"),Cy};var BA={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},pp={integer:function(t){return pp.number(t)&&parseInt(t,10)===t},float:function(t){return pp.number(t)&&!pp.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return pe(t)==="object"&&!pp.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(BA.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(WA())},hex:function(t){return typeof t=="string"&&!!t.match(BA.hex)}},bH=function(t,r,o,n,i){if(t.required&&r===void 0){Sy(t,r,o,n,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;a.indexOf(s)>-1?pp[s](r)||n.push(Kr(i.messages.types[s],t.fullField,t.type)):s&&pe(r)!==t.type&&n.push(Kr(i.messages.types[s],t.fullField,t.type))},jA=bH;var SH=function(t,r,o,n,i){(/^\s+$/.test(r)||r==="")&&n.push(Kr(i.messages.whitespace,t.fullField))},VA=SH;var st={required:Sy,whitespace:VA,type:jA,range:zA,enum:kA,pattern:FA};var CH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r)&&!t.required)return o();st.required(t,r,n,a,i)}o(a)},HA=CH;var wH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(r==null&&!t.required)return o();st.required(t,r,n,a,i,"array"),r!=null&&(st.type(t,r,n,a,i),st.range(t,r,n,a,i))}o(a)},UA=wH;var EH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r)&&!t.required)return o();st.required(t,r,n,a,i),r!==void 0&&st.type(t,r,n,a,i)}o(a)},GA=EH;var RH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r,"date")&&!t.required)return o();if(st.required(t,r,n,a,i),!Mt(r,"date")){var l;r instanceof Date?l=r:l=new Date(r),st.type(t,l,n,a,i),l&&st.range(t,l.getTime(),n,a,i)}}o(a)},qA=RH;var OH="enum",_H=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r)&&!t.required)return o();st.required(t,r,n,a,i),r!==void 0&&st[OH](t,r,n,a,i)}o(a)},KA=_H;var PH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r)&&!t.required)return o();st.required(t,r,n,a,i),r!==void 0&&(st.type(t,r,n,a,i),st.range(t,r,n,a,i))}o(a)},XA=PH;var TH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r)&&!t.required)return o();st.required(t,r,n,a,i),r!==void 0&&(st.type(t,r,n,a,i),st.range(t,r,n,a,i))}o(a)},YA=TH;var NH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r)&&!t.required)return o();st.required(t,r,n,a,i),r!==void 0&&st.type(t,r,n,a,i)}o(a)},QA=NH;var IH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(r===""&&(r=void 0),Mt(r)&&!t.required)return o();st.required(t,r,n,a,i),r!==void 0&&(st.type(t,r,n,a,i),st.range(t,r,n,a,i))}o(a)},ZA=IH;var $H=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r)&&!t.required)return o();st.required(t,r,n,a,i),r!==void 0&&st.type(t,r,n,a,i)}o(a)},JA=$H;var DH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r,"string")&&!t.required)return o();st.required(t,r,n,a,i),Mt(r,"string")||st.pattern(t,r,n,a,i)}o(a)},eM=DH;var AH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r)&&!t.required)return o();st.required(t,r,n,a,i),Mt(r)||st.type(t,r,n,a,i)}o(a)},tM=AH;var MH=function(t,r,o,n,i){var a=[],s=Array.isArray(r)?"array":pe(r);st.required(t,r,n,a,i,s),o(a)},rM=MH;var LH=function(t,r,o,n,i){var a=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(Mt(r,"string")&&!t.required)return o();st.required(t,r,n,a,i,"string"),Mt(r,"string")||(st.type(t,r,n,a,i),st.range(t,r,n,a,i),st.pattern(t,r,n,a,i),t.whitespace===!0&&st.whitespace(t,r,n,a,i))}o(a)},oM=LH;var kH=function(t,r,o,n,i){var a=t.type,s=[],l=t.required||!t.required&&n.hasOwnProperty(t.field);if(l){if(Mt(r,a)&&!t.required)return o();st.required(t,r,n,s,i,a),Mt(r,a)||st.type(t,r,n,s,i)}o(s)},wy=kH;var Wu={string:oM,method:QA,number:ZA,boolean:GA,regexp:tM,integer:YA,float:XA,array:UA,object:JA,enum:KA,pattern:eM,date:qA,url:wy,hex:wy,email:wy,required:rM,any:HA};var mp=function(){function e(t){lt(this,e),T(this,"rules",null),T(this,"_messages",yy),this.define(t)}return ct(e,[{key:"define",value:function(r){var o=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(pe(r)!=="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(n){var i=r[n];o.rules[n]=Array.isArray(i)?i:[i]})}},{key:"messages",value:function(r){return r&&(this._messages=m1(vy(),r)),this._messages}},{key:"validate",value:function(r){var o=this,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=r,s=n,l=i;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(h){var v=[],y={};function g(x){if(Array.isArray(x)){var S;v=(S=v).concat.apply(S,se(x))}else v.push(x)}for(var p=0;p0&&arguments[0]!==void 0?arguments[0]:[],R=Array.isArray(C)?C:[C];!s.suppressWarning&&R.length&&e.warning("async-validator:",R),R.length&&y.message!==void 0&&(R=[].concat(y.message));var _=R.map(p1(y,a));if(s.first&&_.length)return m[y.field]=1,v(_);if(!g)v(_);else{if(y.required&&!h.value)return y.message!==void 0?_=[].concat(y.message).map(p1(y,a)):s.error&&(_=[s.error(y,Kr(s.messages.required,y.field))]),v(_);var O={};y.defaultField&&Object.keys(h.value).map(function(L){O[L]=y.defaultField}),O=P(P({},O),h.rule.fields);var N={};Object.keys(O).forEach(function(L){var j=O[L],W=Array.isArray(j)?j:[j];N[L]=W.map(p.bind(null,L))});var k=new e(N);k.messages(s.messages),h.rule.options&&(h.rule.options.messages=s.messages,h.rule.options.error=s.error),k.validate(h.value,h.rule.options||s,function(L){var j=[];_&&_.length&&j.push.apply(j,se(_)),L&&L.length&&j.push.apply(j,se(L)),v(j.length?j:null)})}}var S;if(y.asyncValidator)S=y.asyncValidator(y,h.value,x,h.source,s);else if(y.validator){try{S=y.validator(y,h.value,x,h.source,s)}catch(C){var b,w;(b=(w=console).error)===null||b===void 0||b.call(w,C),s.suppressValidatorError||setTimeout(function(){throw C},0),x(C.message)}S===!0?x():S===!1?x(typeof y.message=="function"?y.message(y.fullField||y.field):y.message||"".concat(y.fullField||y.field," fails")):S instanceof Array?x(S):S instanceof Error&&x(S.message)}S&&S.then&&S.then(function(){return x()},function(C){return x(C)})},function(h){c(h)},a)}},{key:"getType",value:function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!Wu.hasOwnProperty(r.type))throw new Error(Kr("Unknown rule type %s",r.type));return r.type||"string"}},{key:"getValidationMethod",value:function(r){if(typeof r.validator=="function")return r.validator;var o=Object.keys(r),n=o.indexOf("message");return n!==-1&&o.splice(n,1),o.length===1&&o[0]==="required"?Wu.required:Wu[this.getType(r)]||void 0}}]),e}();T(mp,"register",function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");Wu[t]=r});T(mp,"warning",MA);T(mp,"messages",yy);T(mp,"validators",Wu);var nM=mp;var Ry=E(I());var $n="'${name}' is not a valid ${type}",Ey={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:$n,method:$n,array:$n,object:$n,number:$n,date:$n,boolean:$n,integer:$n,float:$n,regexp:$n,email:$n,url:$n,hex:$n},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};var iM=nM;function FH(e,t){return e.replace(/\\?\$\{\w+\}/g,function(r){if(r.startsWith("\\"))return r.slice(1);var o=r.slice(2,-1);return t[o]})}var aM="CODE_LOGIC_ERROR";function g1(e,t,r,o,n){return h1.apply(this,arguments)}function h1(){return h1=lo(Lt().mark(function e(t,r,o,n,i){var a,s,l,c,u,d,f,m,h;return Lt().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return a=P({},o),delete a.ruleIndex,iM.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(g){return console.error(g),Promise.reject(aM)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new iM(T({},t,[a])),u=Na(Ey,n.validateMessages),c.messages(u),d=[],y.prev=10,y.next=13,Promise.resolve(c.validate(T({},t,r),P({},n)));case 13:y.next=18;break;case 15:y.prev=15,y.t0=y.catch(10),y.t0.errors&&(d=y.t0.errors.map(function(g,p){var x=g.message,S=x===aM?u.default:x;return Ry.isValidElement(S)?Ry.cloneElement(S,{key:"error_".concat(p)}):S}));case 18:if(!(!d.length&&l)){y.next=23;break}return y.next=21,Promise.all(r.map(function(g,p){return g1("".concat(t,".").concat(p),g,l,n,i)}));case 21:return f=y.sent,y.abrupt("return",f.reduce(function(g,p){return[].concat(se(g),se(p))},[]));case 23:return m=P(P({},o),{},{name:t,enum:(o.enum||[]).join(", ")},i),h=d.map(function(g){return typeof g=="string"?FH(g,m):g}),y.abrupt("return",h);case 26:case"end":return y.stop()}},e,null,[[10,15]])})),h1.apply(this,arguments)}function sM(e,t,r,o,n,i){var a=e.join("."),s=r.map(function(u,d){var f=u.validator,m=P(P({},u),{},{ruleIndex:d});return f&&(m.validator=function(h,v,y){var g=!1,p=function(){for(var b=arguments.length,w=new Array(b),C=0;C2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(o){return b1(t,o,r)})}function b1(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!r&&e.length!==t.length?!1:t.every(function(o,n){return e[n]===o})}function lM(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||pe(e)!=="object"||pe(t)!=="object")return!1;var r=Object.keys(e),o=Object.keys(t),n=new Set([].concat(r,o));return se(n).every(function(i){var a=e[i],s=t[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function cM(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&pe(t.target)==="object"&&e in t.target?t.target[e]:t}function S1(e,t,r){var o=e.length;if(t<0||t>=o||r<0||r>=o)return e;var n=e[t],i=t-r;return i>0?[].concat(se(e.slice(0,r)),[n],se(e.slice(r,t)),se(e.slice(t+1,o))):i<0?[].concat(se(e.slice(0,t)),se(e.slice(t+1,r+1)),[n],se(e.slice(r+1,o))):e}var BH=["name"],ti=[];function C1(e,t,r,o,n,i){return typeof e=="function"?e(t,r,"source"in i?{source:i.source}:{}):o!==n}var w1=function(e){Ir(r,e);var t=$r(r);function r(o){var n;if(lt(this,r),n=t.call(this,o),T(et(n),"state",{resetCount:0}),T(et(n),"cancelRegisterFunc",null),T(et(n),"mounted",!1),T(et(n),"touched",!1),T(et(n),"dirty",!1),T(et(n),"validatePromise",void 0),T(et(n),"prevValidating",void 0),T(et(n),"errors",ti),T(et(n),"warnings",ti),T(et(n),"cancelRegister",function(){var l=n.props,c=l.preserve,u=l.isListField,d=l.name;n.cancelRegisterFunc&&n.cancelRegisterFunc(u,c,sr(d)),n.cancelRegisterFunc=null}),T(et(n),"getNamePath",function(){var l=n.props,c=l.name,u=l.fieldContext,d=u.prefixName,f=d===void 0?[]:d;return c!==void 0?[].concat(se(f),se(c)):[]}),T(et(n),"getRules",function(){var l=n.props,c=l.rules,u=c===void 0?[]:c,d=l.fieldContext;return u.map(function(f){return typeof f=="function"?f(d):f})}),T(et(n),"refresh",function(){n.mounted&&n.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),T(et(n),"metaCache",null),T(et(n),"triggerMetaEvent",function(l){var c=n.props.onMetaChange;if(c){var u=P(P({},n.getMeta()),{},{destroy:l});Yi(n.metaCache,u)||c(u),n.metaCache=u}else n.metaCache=null}),T(et(n),"onStoreChange",function(l,c,u){var d=n.props,f=d.shouldUpdate,m=d.dependencies,h=m===void 0?[]:m,v=d.onReset,y=u.store,g=n.getNamePath(),p=n.getValue(l),x=n.getValue(y),S=c&&Ks(c,g);switch(u.type==="valueUpdate"&&u.source==="external"&&!Yi(p,x)&&(n.touched=!0,n.dirty=!0,n.validatePromise=null,n.errors=ti,n.warnings=ti,n.triggerMetaEvent()),u.type){case"reset":if(!c||S){n.touched=!1,n.dirty=!1,n.validatePromise=void 0,n.errors=ti,n.warnings=ti,n.triggerMetaEvent(),v?.(),n.refresh();return}break;case"remove":{if(f&&C1(f,l,y,p,x,u)){n.reRender();return}break}case"setField":{var b=u.data;if(S){"touched"in b&&(n.touched=b.touched),"validating"in b&&!("originRCField"in b)&&(n.validatePromise=b.validating?Promise.resolve([]):null),"errors"in b&&(n.errors=b.errors||ti),"warnings"in b&&(n.warnings=b.warnings||ti),n.dirty=!0,n.triggerMetaEvent(),n.reRender();return}else if("value"in b&&Ks(c,g,!0)){n.reRender();return}if(f&&!g.length&&C1(f,l,y,p,x,u)){n.reRender();return}break}case"dependenciesUpdate":{var w=h.map(sr);if(w.some(function(C){return Ks(u.relatedFields,C)})){n.reRender();return}break}default:if(S||(!h.length||g.length||f)&&C1(f,l,y,p,x,u)){n.reRender();return}break}f===!0&&n.reRender()}),T(et(n),"validateRules",function(l){var c=n.getNamePath(),u=n.getValue(),d=l||{},f=d.triggerName,m=d.validateOnly,h=m===void 0?!1:m,v=Promise.resolve().then(lo(Lt().mark(function y(){var g,p,x,S,b,w,C;return Lt().wrap(function(_){for(;;)switch(_.prev=_.next){case 0:if(n.mounted){_.next=2;break}return _.abrupt("return",[]);case 2:if(g=n.props,p=g.validateFirst,x=p===void 0?!1:p,S=g.messageVariables,b=g.validateDebounce,w=n.getRules(),f&&(w=w.filter(function(O){return O}).filter(function(O){var N=O.validateTrigger;if(!N)return!0;var k=fp(N);return k.includes(f)})),!(b&&f)){_.next=10;break}return _.next=8,new Promise(function(O){setTimeout(O,b)});case 8:if(n.validatePromise===v){_.next=10;break}return _.abrupt("return",[]);case 10:return C=sM(c,u,w,l,x,S),C.catch(function(O){return O}).then(function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ti;if(n.validatePromise===v){var N;n.validatePromise=null;var k=[],L=[];(N=O.forEach)===null||N===void 0||N.call(O,function(j){var W=j.rule.warningOnly,D=j.errors,$=D===void 0?ti:D;W?L.push.apply(L,se($)):k.push.apply(k,se($))}),n.errors=k,n.warnings=L,n.triggerMetaEvent(),n.reRender()}}),_.abrupt("return",C);case 13:case"end":return _.stop()}},y)})));return h||(n.validatePromise=v,n.dirty=!0,n.errors=ti,n.warnings=ti,n.triggerMetaEvent(),n.reRender()),v}),T(et(n),"isFieldValidating",function(){return!!n.validatePromise}),T(et(n),"isFieldTouched",function(){return n.touched}),T(et(n),"isFieldDirty",function(){if(n.dirty||n.props.initialValue!==void 0)return!0;var l=n.props.fieldContext,c=l.getInternalHooks(Ii),u=c.getInitialValue;return u(n.getNamePath())!==void 0}),T(et(n),"getErrors",function(){return n.errors}),T(et(n),"getWarnings",function(){return n.warnings}),T(et(n),"isListField",function(){return n.props.isListField}),T(et(n),"isList",function(){return n.props.isList}),T(et(n),"isPreserve",function(){return n.props.preserve}),T(et(n),"getMeta",function(){n.prevValidating=n.isFieldValidating();var l={touched:n.isFieldTouched(),validating:n.prevValidating,errors:n.errors,warnings:n.warnings,name:n.getNamePath(),validated:n.validatePromise===null};return l}),T(et(n),"getOnlyChild",function(l){if(typeof l=="function"){var c=n.getMeta();return P(P({},n.getOnlyChild(l(n.getControlled(),c,n.props.fieldContext))),{},{isFunction:!0})}var u=Ci(l);return u.length!==1||!Qo.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),T(et(n),"getValue",function(l){var c=n.props.fieldContext.getFieldsValue,u=n.getNamePath();return So(l||c(!0),u)}),T(et(n),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=n.props,u=c.name,d=c.trigger,f=c.validateTrigger,m=c.getValueFromEvent,h=c.normalize,v=c.valuePropName,y=c.getValueProps,g=c.fieldContext,p=f!==void 0?f:g.validateTrigger,x=n.getNamePath(),S=g.getInternalHooks,b=g.getFieldsValue,w=S(Ii),C=w.dispatch,R=n.getValue(),_=y||function(j){return T({},v,j)},O=l[d],N=u!==void 0?_(R):{},k=P(P({},l),N);k[d]=function(){n.touched=!0,n.dirty=!0,n.triggerMetaEvent();for(var j,W=arguments.length,D=new Array(W),$=0;$=0&&O<=N.length?(u.keys=[].concat(se(u.keys.slice(0,O)),[u.id],se(u.keys.slice(O))),x([].concat(se(N.slice(0,O)),[_],se(N.slice(O))))):(u.keys=[].concat(se(u.keys),[u.id]),x([].concat(se(N),[_]))),u.id+=1},remove:function(_){var O=b(),N=new Set(Array.isArray(_)?_:[_]);N.size<=0||(u.keys=u.keys.filter(function(k,L){return!N.has(L)}),x(O.filter(function(k,L){return!N.has(L)})))},move:function(_,O){if(_!==O){var N=b();_<0||_>=N.length||O<0||O>=N.length||(u.keys=S1(u.keys,_,O),x(S1(N,_,O)))}}},C=p||[];return Array.isArray(C)||(C=[]),o(C.map(function(R,_){var O=u.keys[_];return O===void 0&&(u.keys[_]=u.id,O=u.keys[_],u.id+=1),{name:_,key:O,isListField:!0}}),w,y)})))}var uM=VH;var _y=E(I());function dM(e){var t=!1,r=e.length,o=[];return e.length?new Promise(function(n,i){e.forEach(function(a,s){a.catch(function(l){return t=!0,l}).then(function(l){r-=1,o[s]=l,!(r>0)&&(t&&i(o),n(o))})})}):Promise.resolve([])}var fM="__@field_split__";function E1(e){return e.map(function(t){return"".concat(pe(t),":").concat(t)}).join(fM)}var HH=function(){function e(){lt(this,e),T(this,"kvs",new Map)}return ct(e,[{key:"set",value:function(r,o){this.kvs.set(E1(r),o)}},{key:"get",value:function(r){return this.kvs.get(E1(r))}},{key:"update",value:function(r,o){var n=this.get(r),i=o(n);i?this.set(r,i):this.delete(r)}},{key:"delete",value:function(r){this.kvs.delete(E1(r))}},{key:"map",value:function(r){return se(this.kvs.entries()).map(function(o){var n=B(o,2),i=n[0],a=n[1],s=i.split(fM);return r({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=B(c,3),d=u[1],f=u[2];return d==="number"?Number(f):f}),value:a})})}},{key:"toJSON",value:function(){var r={};return this.map(function(o){var n=o.key,i=o.value;return r[n.join(".")]=i,null}),r}}]),e}(),rc=HH;var UH=["name"],GH=ct(function e(t){var r=this;lt(this,e),T(this,"formHooked",!1),T(this,"forceRootUpdate",void 0),T(this,"subscribable",!0),T(this,"store",{}),T(this,"fieldEntities",[]),T(this,"initialValues",{}),T(this,"callbacks",{}),T(this,"validateMessages",null),T(this,"preserve",null),T(this,"lastValidatePromise",null),T(this,"getForm",function(){return{getFieldValue:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}}),T(this,"getInternalHooks",function(o){return o===Ii?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(Vt(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),T(this,"useSubscribe",function(o){r.subscribable=o}),T(this,"prevWithoutPreserves",null),T(this,"setInitialValues",function(o,n){if(r.initialValues=o||{},n){var i,a=Na(o,r.store);(i=r.prevWithoutPreserves)===null||i===void 0||i.map(function(s){var l=s.key;a=Yo(a,l,So(o,l))}),r.prevWithoutPreserves=null,r.updateStore(a)}}),T(this,"destroyForm",function(o){if(o)r.updateStore({});else{var n=new rc;r.getFieldEntities(!0).forEach(function(i){r.isMergedPreserve(i.isPreserve())||n.set(i.getNamePath(),!0)}),r.prevWithoutPreserves=n}}),T(this,"getInitialValue",function(o){var n=So(r.initialValues,o);return o.length?Na(n):n}),T(this,"setCallbacks",function(o){r.callbacks=o}),T(this,"setValidateMessages",function(o){r.validateMessages=o}),T(this,"setPreserve",function(o){r.preserve=o}),T(this,"watchList",[]),T(this,"registerWatch",function(o){return r.watchList.push(o),function(){r.watchList=r.watchList.filter(function(n){return n!==o})}}),T(this,"notifyWatch",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var n=r.getFieldsValue(),i=r.getFieldsValue(!0);r.watchList.forEach(function(a){a(n,i,o)})}}),T(this,"timeoutId",null),T(this,"warningUnhooked",function(){}),T(this,"updateStore",function(o){r.store=o}),T(this,"getFieldEntities",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return o?r.fieldEntities.filter(function(n){return n.getNamePath().length}):r.fieldEntities}),T(this,"getFieldsMap",function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,n=new rc;return r.getFieldEntities(o).forEach(function(i){var a=i.getNamePath();n.set(a,i)}),n}),T(this,"getFieldEntitiesForNamePathList",function(o){if(!o)return r.getFieldEntities(!0);var n=r.getFieldsMap(!0);return o.map(function(i){var a=sr(i);return n.get(a)||{INVALIDATE_NAME_PATH:sr(i)}})}),T(this,"getFieldsValue",function(o,n){r.warningUnhooked();var i,a,s;if(o===!0||Array.isArray(o)?(i=o,a=n):o&&pe(o)==="object"&&(s=o.strict,a=o.filter),i===!0&&!a)return r.store;var l=r.getFieldEntitiesForNamePathList(Array.isArray(i)?i:null),c=[];return l.forEach(function(u){var d,f,m="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var h,v;if((h=(v=u).isList)!==null&&h!==void 0&&h.call(v))return}else if(!i&&(d=(f=u).isListField)!==null&&d!==void 0&&d.call(f))return;if(!a)c.push(m);else{var y="getMeta"in u?u.getMeta():null;a(y)&&c.push(m)}}),x1(r.store,c.map(sr))}),T(this,"getFieldValue",function(o){r.warningUnhooked();var n=sr(o);return So(r.store,n)}),T(this,"getFieldsError",function(o){r.warningUnhooked();var n=r.getFieldEntitiesForNamePathList(o);return n.map(function(i,a){return i&&!("INVALIDATE_NAME_PATH"in i)?{name:i.getNamePath(),errors:i.getErrors(),warnings:i.getWarnings()}:{name:sr(o[a]),errors:[],warnings:[]}})}),T(this,"getFieldError",function(o){r.warningUnhooked();var n=sr(o),i=r.getFieldsError([n])[0];return i.errors}),T(this,"getFieldWarning",function(o){r.warningUnhooked();var n=sr(o),i=r.getFieldsError([n])[0];return i.warnings}),T(this,"isFieldsTouched",function(){r.warningUnhooked();for(var o=arguments.length,n=new Array(o),i=0;i0&&arguments[0]!==void 0?arguments[0]:{},n=new rc,i=r.getFieldEntities(!0);i.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var d=n.get(u)||new Set;d.add({entity:l,value:c}),n.set(u,d)}});var a=function(c){c.forEach(function(u){var d=u.props.initialValue;if(d!==void 0){var f=u.getNamePath(),m=r.getInitialValue(f);if(m!==void 0)Vt(!1,"Form already set 'initialValues' with path '".concat(f.join("."),"'. Field can not overwrite it."));else{var h=n.get(f);if(h&&h.size>1)Vt(!1,"Multiple Field with path '".concat(f.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var v=r.getFieldValue(f),y=u.isListField();!y&&(!o.skipExist||v===void 0)&&r.updateStore(Yo(r.store,f,se(h)[0].value))}}}})},s;o.entities?s=o.entities:o.namePathList?(s=[],o.namePathList.forEach(function(l){var c=n.get(l);if(c){var u;(u=s).push.apply(u,se(se(c).map(function(d){return d.entity})))}})):s=i,a(s)}),T(this,"resetFields",function(o){r.warningUnhooked();var n=r.store;if(!o){r.updateStore(Na(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(n,null,{type:"reset"}),r.notifyWatch();return}var i=o.map(sr);i.forEach(function(a){var s=r.getInitialValue(a);r.updateStore(Yo(r.store,a,s))}),r.resetWithFieldInitialValue({namePathList:i}),r.notifyObservers(n,i,{type:"reset"}),r.notifyWatch(i)}),T(this,"setFields",function(o){r.warningUnhooked();var n=r.store,i=[];o.forEach(function(a){var s=a.name,l=Ae(a,UH),c=sr(s);i.push(c),"value"in l&&r.updateStore(Yo(r.store,c,l.value)),r.notifyObservers(n,[c],{type:"setField",data:a})}),r.notifyWatch(i)}),T(this,"getFields",function(){var o=r.getFieldEntities(!0),n=o.map(function(i){var a=i.getNamePath(),s=i.getMeta(),l=P(P({},s),{},{name:a,value:r.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return n}),T(this,"initEntityValue",function(o){var n=o.props.initialValue;if(n!==void 0){var i=o.getNamePath(),a=So(r.store,i);a===void 0&&r.updateStore(Yo(r.store,i,n))}}),T(this,"isMergedPreserve",function(o){var n=o!==void 0?o:r.preserve;return n??!0}),T(this,"registerField",function(o){r.fieldEntities.push(o);var n=o.getNamePath();if(r.notifyWatch([n]),o.props.initialValue!==void 0){var i=r.store;r.resetWithFieldInitialValue({entities:[o],skipExist:!0}),r.notifyObservers(i,[o.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(d){return d!==o}),!r.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:r.getInitialValue(n);if(n.length&&r.getFieldValue(n)!==c&&r.fieldEntities.every(function(d){return!b1(d.getNamePath(),n)})){var u=r.store;r.updateStore(Yo(u,n,c,!0)),r.notifyObservers(u,[n],{type:"remove"}),r.triggerDependenciesUpdate(u,n)}}r.notifyWatch([n])}}),T(this,"dispatch",function(o){switch(o.type){case"updateValue":{var n=o.namePath,i=o.value;r.updateValue(n,i);break}case"validateField":{var a=o.namePath,s=o.triggerName;r.validateFields([a],{triggerName:s});break}default:}}),T(this,"notifyObservers",function(o,n,i){if(r.subscribable){var a=P(P({},i),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(o,n,a)})}else r.forceRootUpdate()}),T(this,"triggerDependenciesUpdate",function(o,n){var i=r.getDependencyChildrenFields(n);return i.length&&r.validateFields(i),r.notifyObservers(o,i,{type:"dependenciesUpdate",relatedFields:[n].concat(se(i))}),i}),T(this,"updateValue",function(o,n){var i=sr(o),a=r.store;r.updateStore(Yo(r.store,i,n)),r.notifyObservers(a,[i],{type:"valueUpdate",source:"internal"}),r.notifyWatch([i]);var s=r.triggerDependenciesUpdate(a,i),l=r.callbacks.onValuesChange;if(l){var c=x1(r.store,[i]);l(c,r.getFieldsValue())}r.triggerOnFieldsChange([i].concat(se(s)))}),T(this,"setFieldsValue",function(o){r.warningUnhooked();var n=r.store;if(o){var i=Na(r.store,o);r.updateStore(i)}r.notifyObservers(n,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()}),T(this,"setFieldValue",function(o,n){r.setFields([{name:o,value:n,errors:[],warnings:[]}])}),T(this,"getDependencyChildrenFields",function(o){var n=new Set,i=[],a=new rc;r.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var d=sr(u);a.update(d,function(){var f=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return f.add(l),f})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(d){if(!n.has(d)){n.add(d);var f=d.getNamePath();d.isFieldDirty()&&f.length&&(i.push(f),l(f))}})};return s(o),i}),T(this,"triggerOnFieldsChange",function(o,n){var i=r.callbacks.onFieldsChange;if(i){var a=r.getFields();if(n){var s=new rc;n.forEach(function(c){var u=c.name,d=c.errors;s.set(u,d)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return Ks(o,u)});l.length&&i(l,a)}}),T(this,"validateFields",function(o,n){r.warningUnhooked();var i,a;Array.isArray(o)||typeof o=="string"||typeof n=="string"?(i=o,a=n):a=o;var s=!!i,l=s?i.map(sr):[],c=[],u=String(Date.now()),d=new Set,f=a||{},m=f.recursive,h=f.dirty;r.getFieldEntities(!0).forEach(function(p){if(s||l.push(p.getNamePath()),!(!p.props.rules||!p.props.rules.length)&&!(h&&!p.isFieldDirty())){var x=p.getNamePath();if(d.add(x.join(u)),!s||Ks(l,x,m)){var S=p.validateRules(P({validateMessages:P(P({},Ey),r.validateMessages)},a));c.push(S.then(function(){return{name:x,errors:[],warnings:[]}}).catch(function(b){var w,C=[],R=[];return(w=b.forEach)===null||w===void 0||w.call(b,function(_){var O=_.rule.warningOnly,N=_.errors;O?R.push.apply(R,se(N)):C.push.apply(C,se(N))}),C.length?Promise.reject({name:x,errors:C,warnings:R}):{name:x,errors:C,warnings:R}}))}}});var v=dM(c);r.lastValidatePromise=v,v.catch(function(p){return p}).then(function(p){var x=p.map(function(S){var b=S.name;return b});r.notifyObservers(r.store,x,{type:"validateFinish"}),r.triggerOnFieldsChange(x,p)});var y=v.then(function(){return r.lastValidatePromise===v?Promise.resolve(r.getFieldsValue(l)):Promise.reject([])}).catch(function(p){var x=p.filter(function(S){return S&&S.errors.length});return Promise.reject({values:r.getFieldsValue(l),errorFields:x,outOfDate:r.lastValidatePromise!==v})});y.catch(function(p){return p});var g=l.filter(function(p){return d.has(p.join(u))});return r.triggerOnFieldsChange(g),y}),T(this,"submit",function(){r.warningUnhooked(),r.validateFields().then(function(o){var n=r.callbacks.onFinish;if(n)try{n(o)}catch(i){console.error(i)}}).catch(function(o){var n=r.callbacks.onFinishFailed;n&&n(o)})}),this.forceRootUpdate=t});function qH(e){var t=_y.useRef(),r=_y.useState({}),o=B(r,2),n=o[1];if(!t.current)if(e)t.current=e;else{var i=function(){n({})},a=new GH(i);t.current=a.getForm()}return[t.current]}var Py=qH;var uo=E(I());var Xs=E(I()),R1=Xs.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),O1=function(t){var r=t.validateMessages,o=t.onFormChange,n=t.onFormFinish,i=t.children,a=Xs.useContext(R1),s=Xs.useRef({});return Xs.createElement(R1.Provider,{value:P(P({},a),{},{validateMessages:P(P({},a.validateMessages),r),triggerFormChange:function(c,u){o&&o(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){n&&n(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=P(P({},s.current),{},T({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=P({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},i)};var pM=R1;var KH=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],XH=function(t,r){var o=t.name,n=t.initialValues,i=t.fields,a=t.form,s=t.preserve,l=t.children,c=t.component,u=c===void 0?"form":c,d=t.validateMessages,f=t.validateTrigger,m=f===void 0?"onChange":f,h=t.onValuesChange,v=t.onFieldsChange,y=t.onFinish,g=t.onFinishFailed,p=t.clearOnDestroy,x=Ae(t,KH),S=uo.useRef(null),b=uo.useContext(pM),w=Py(a),C=B(w,1),R=C[0],_=R.getInternalHooks(Ii),O=_.useSubscribe,N=_.setInitialValues,k=_.setCallbacks,L=_.setValidateMessages,j=_.setPreserve,W=_.destroyForm;uo.useImperativeHandle(r,function(){return P(P({},R),{},{nativeElement:S.current})}),uo.useEffect(function(){return b.registerForm(o,R),function(){b.unregisterForm(o)}},[b,R,o]),L(P(P({},b.validateMessages),d)),k({onValuesChange:h,onFieldsChange:function(A){if(b.triggerFormChange(o,A),v){for(var G=arguments.length,q=new Array(G>1?G-1:0),oe=1;oe{let{children:t,status:r,override:o}=e,n=ja.useContext(fo),i=ja.useMemo(()=>{let a=Object.assign({},n);return o&&delete a.isFormItemInput,r&&(delete a.status,delete a.hasFeedback,delete a.feedbackIcon),a},[r,o,n]);return ja.createElement(fo.Provider,{value:i},t)},xM=ja.createContext(void 0);var JH=e=>{let{space:t,form:r,children:o}=e;if(o==null)return null;let n=o;return r&&(n=_1.default.createElement(yM,{override:!0,status:!0},n)),t&&(n=_1.default.createElement(iD,null,n)),n},Ys=JH;var e7=e=>{let{componentCls:t}=e;return{[t]:{display:"flex",flexFlow:"row wrap",minWidth:0,"&::before, &::after":{display:"flex"},"&-no-wrap":{flexWrap:"nowrap"},"&-start":{justifyContent:"flex-start"},"&-center":{justifyContent:"center"},"&-end":{justifyContent:"flex-end"},"&-space-between":{justifyContent:"space-between"},"&-space-around":{justifyContent:"space-around"},"&-space-evenly":{justifyContent:"space-evenly"},"&-top":{alignItems:"flex-start"},"&-middle":{alignItems:"center"},"&-bottom":{alignItems:"flex-end"}}}},t7=e=>{let{componentCls:t}=e;return{[t]:{position:"relative",maxWidth:"100%",minHeight:1}}},r7=(e,t)=>{let{prefixCls:r,componentCls:o,gridColumns:n}=e,i={};for(let a=n;a>=0;a--)a===0?(i[`${o}${t}-${a}`]={display:"none"},i[`${o}-push-${a}`]={insetInlineStart:"auto"},i[`${o}-pull-${a}`]={insetInlineEnd:"auto"},i[`${o}${t}-push-${a}`]={insetInlineStart:"auto"},i[`${o}${t}-pull-${a}`]={insetInlineEnd:"auto"},i[`${o}${t}-offset-${a}`]={marginInlineStart:0},i[`${o}${t}-order-${a}`]={order:0}):(i[`${o}${t}-${a}`]=[{"--ant-display":"block",display:"block"},{display:"var(--ant-display)",flex:`0 0 ${a/n*100}%`,maxWidth:`${a/n*100}%`}],i[`${o}${t}-push-${a}`]={insetInlineStart:`${a/n*100}%`},i[`${o}${t}-pull-${a}`]={insetInlineEnd:`${a/n*100}%`},i[`${o}${t}-offset-${a}`]={marginInlineStart:`${a/n*100}%`},i[`${o}${t}-order-${a}`]={order:a});return i[`${o}${t}-flex`]={flex:`var(--${r}${t}-flex)`},i},P1=(e,t)=>r7(e,t),o7=(e,t,r)=>({[`@media (min-width: ${re(t)})`]:Object.assign({},P1(e,r))}),n7=()=>({}),i7=()=>({}),Obe=Pt("Grid",e7,n7),T1=e=>({xs:e.screenXSMin,sm:e.screenSMMin,md:e.screenMDMin,lg:e.screenLGMin,xl:e.screenXLMin,xxl:e.screenXXLMin}),_be=Pt("Grid",e=>{let t=rt(e,{gridColumns:24}),r=T1(t);return delete r.xs,[t7(t),P1(t,""),P1(t,"-xs"),Object.keys(r).map(o=>o7(t,r[o],`-${o}`)).reduce((o,n)=>Object.assign(Object.assign({},o),n),{})]},i7);function bM(e){return{position:e,inset:0}}var N1=e=>{let{componentCls:t,antCls:r}=e;return[{[`${t}-root`]:{[`${t}${r}-zoom-enter, ${t}${r}-zoom-appear`]:{transform:"none",opacity:0,animationDuration:e.motionDurationSlow,userSelect:"none"},[`${t}${r}-zoom-leave ${t}-content`]:{pointerEvents:"none"},[`${t}-mask`]:Object.assign(Object.assign({},bM("fixed")),{zIndex:e.zIndexPopupBase,height:"100%",backgroundColor:e.colorBgMask,pointerEvents:"none",[`${t}-hidden`]:{display:"none"}}),[`${t}-wrap`]:Object.assign(Object.assign({},bM("fixed")),{zIndex:e.zIndexPopupBase,overflow:"auto",outline:0,WebkitOverflowScrolling:"touch"})}},{[`${t}-root`]:Yl(e)}]},a7=e=>{let{componentCls:t}=e;return[{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl"},[`${t}-centered`]:{textAlign:"center","&::before":{display:"inline-block",width:0,height:"100%",verticalAlign:"middle",content:'""'},[t]:{top:0,display:"inline-block",paddingBottom:0,textAlign:"start",verticalAlign:"middle"}},[`@media (max-width: ${e.screenSMMax}px)`]:{[t]:{maxWidth:"calc(100vw - 16px)",margin:`${re(e.marginXS)} auto`},[`${t}-centered`]:{[t]:{flex:1}}}}},{[t]:Object.assign(Object.assign({},Qt(e)),{pointerEvents:"none",position:"relative",top:100,width:"auto",maxWidth:`calc(100vw - ${re(e.calc(e.margin).mul(2).equal())})`,margin:"0 auto",paddingBottom:e.paddingLG,[`${t}-title`]:{margin:0,color:e.titleColor,fontWeight:e.fontWeightStrong,fontSize:e.titleFontSize,lineHeight:e.titleLineHeight,wordWrap:"break-word"},[`${t}-content`]:{position:"relative",backgroundColor:e.contentBg,backgroundClip:"padding-box",border:0,borderRadius:e.borderRadiusLG,boxShadow:e.boxShadow,pointerEvents:"auto",padding:e.contentPadding},[`${t}-close`]:Object.assign({position:"absolute",top:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),insetInlineEnd:e.calc(e.modalHeaderHeight).sub(e.modalCloseBtnSize).div(2).equal(),zIndex:e.calc(e.zIndexPopupBase).add(10).equal(),padding:0,color:e.modalCloseIconColor,fontWeight:e.fontWeightStrong,lineHeight:1,textDecoration:"none",background:"transparent",borderRadius:e.borderRadiusSM,width:e.modalCloseBtnSize,height:e.modalCloseBtnSize,border:0,outline:0,cursor:"pointer",transition:`color ${e.motionDurationMid}, background-color ${e.motionDurationMid}`,"&-x":{display:"flex",fontSize:e.fontSizeLG,fontStyle:"normal",lineHeight:re(e.modalCloseBtnSize),justifyContent:"center",textTransform:"none",textRendering:"auto"},"&:disabled":{pointerEvents:"none"},"&:hover":{color:e.modalCloseIconHoverColor,backgroundColor:e.colorBgTextHover,textDecoration:"none"},"&:active":{backgroundColor:e.colorBgTextActive}},fv(e)),[`${t}-header`]:{color:e.colorText,background:e.headerBg,borderRadius:`${re(e.borderRadiusLG)} ${re(e.borderRadiusLG)} 0 0`,marginBottom:e.headerMarginBottom,padding:e.headerPadding,borderBottom:e.headerBorderBottom},[`${t}-body`]:{fontSize:e.fontSize,lineHeight:e.lineHeight,wordWrap:"break-word",padding:e.bodyPadding,[`${t}-body-skeleton`]:{width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",margin:`${re(e.margin)} auto`}},[`${t}-footer`]:{textAlign:"end",background:e.footerBg,marginTop:e.footerMarginTop,padding:e.footerPadding,borderTop:e.footerBorderTop,borderRadius:e.footerBorderRadius,[`> ${e.antCls}-btn + ${e.antCls}-btn`]:{marginInlineStart:e.marginXS}},[`${t}-open`]:{overflow:"hidden"}})},{[`${t}-pure-panel`]:{top:"auto",padding:0,display:"flex",flexDirection:"column",[`${t}-content, - ${t}-body, - ${t}-confirm-body-wrapper`]:{display:"flex",flexDirection:"column",flex:"auto"},[`${t}-confirm-body`]:{marginBottom:"auto"}}}]},s7=e=>{let{componentCls:t}=e;return{[`${t}-root`]:{[`${t}-wrap-rtl`]:{direction:"rtl",[`${t}-confirm-body`]:{direction:"rtl"}}}}},l7=e=>{let{componentCls:t}=e,r=T1(e);delete r.xs;let o=Object.keys(r).map(n=>({[`@media (min-width: ${re(r[n])})`]:{width:`var(--${t.replace(".","")}-${n}-width)`}}));return{[`${t}-root`]:{[t]:[{width:`var(--${t.replace(".","")}-xs-width)`}].concat(se(o))}}},c7=e=>{let t=e.padding,r=e.fontSizeHeading5,o=e.lineHeightHeading5;return rt(e,{modalHeaderHeight:e.calc(e.calc(o).mul(r).equal()).add(e.calc(t).mul(2).equal()).equal(),modalFooterBorderColorSplit:e.colorSplit,modalFooterBorderStyle:e.lineType,modalFooterBorderWidth:e.lineWidth,modalCloseIconColor:e.colorIcon,modalCloseIconHoverColor:e.colorIconHover,modalCloseBtnSize:e.controlHeight,modalConfirmIconSize:e.fontHeight,modalTitleHeight:e.calc(e.titleFontSize).mul(e.titleLineHeight).equal()})},u7=e=>({footerBg:"transparent",headerBg:e.colorBgElevated,titleLineHeight:e.lineHeightHeading5,titleFontSize:e.fontSizeHeading5,contentBg:e.colorBgElevated,titleColor:e.colorTextHeading,contentPadding:e.wireframe?0:`${re(e.paddingMD)} ${re(e.paddingContentHorizontalLG)}`,headerPadding:e.wireframe?`${re(e.padding)} ${re(e.paddingLG)}`:0,headerBorderBottom:e.wireframe?`${re(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",headerMarginBottom:e.wireframe?0:e.marginXS,bodyPadding:e.wireframe?e.paddingLG:0,footerPadding:e.wireframe?`${re(e.paddingXS)} ${re(e.padding)}`:0,footerBorderTop:e.wireframe?`${re(e.lineWidth)} ${e.lineType} ${e.colorSplit}`:"none",footerBorderRadius:e.wireframe?`0 0 ${re(e.borderRadiusLG)} ${re(e.borderRadiusLG)}`:0,footerMarginTop:e.wireframe?0:e.marginSM,confirmBodyPadding:e.wireframe?`${re(e.padding*2)} ${re(e.padding*2)} ${re(e.paddingLG)}`:0,confirmIconMarginInlineEnd:e.wireframe?e.margin:e.marginSM,confirmBtnsMarginTop:e.wireframe?e.marginLG:e.marginSM}),Mbe=Pt("Modal",e=>{let t=c7(e);return[a7(t),s7(t),N1(t),Ql(t,"zoom"),l7(t)]},u7,{unitless:{titleLineHeight:!0}});var mn=E(I());function d7(e){return t=>mn.createElement(ka,{theme:{token:{motion:!1,zIndexPopupBase:0}}},mn.createElement(e,Object.assign({},t)))}var f7=(e,t,r,o,n)=>d7(a=>{let{prefixCls:s,style:l}=a,c=mn.useRef(null),[u,d]=mn.useState(0),[f,m]=mn.useState(0),[h,v]=zt(!1,{value:a.open}),{getPrefixCls:y}=mn.useContext(at),g=y(o||"select",s);mn.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){let S=new ResizeObserver(w=>{let C=w[0].target;d(C.offsetHeight+8),m(C.offsetWidth)}),b=setInterval(()=>{var w;let C=n?`.${n(g)}`:`.${g}-dropdown`,R=(w=c.current)===null||w===void 0?void 0:w.querySelector(C);R&&(clearInterval(b),S.observe(R))},10);return()=>{clearInterval(b),S.disconnect()}}},[]);let p=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:h,visible:h,getPopupContainer:()=>c.current});return r&&(p=r(p)),t&&Object.assign(p,{[t]:{overflow:{adjustX:!1,adjustY:!1}}}),mn.createElement("div",{ref:c,style:{paddingBottom:u,position:"relative",minWidth:f}},mn.createElement(e,Object.assign({},p)))}),SM=f7;var ai=E(I()),CE=E(Ee());var cr=E(I());var Y1=E(Ee());var Bu=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substr(0,4))};var St=E(I());var I1=E(I()),CM=E(Ee()),p7=function(t){var r=t.className,o=t.customizeIcon,n=t.customizeIconProps,i=t.children,a=t.onMouseDown,s=t.onClick,l=typeof o=="function"?o(n):o;return I1.createElement("span",{className:r,onMouseDown:function(u){u.preventDefault(),a?.(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:I1.createElement("span",{className:(0,CM.default)(r.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},Qs=p7;var Ty=E(I()),wM=function(t,r,o,n,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=Ty.default.useMemo(function(){if(pe(n)==="object")return n.clearIcon;if(i)return i},[n,i]),u=Ty.default.useMemo(function(){return!!(!a&&n&&(o.length||s)&&!(l==="combobox"&&s===""))},[n,a,o.length,s,l]);return{allowClear:u,clearIcon:Ty.default.createElement(Qs,{className:"".concat(t,"-clear"),onMouseDown:r,customizeIcon:c},"\xD7")}};var Ny=E(I()),$1=Ny.createContext(null);function Iy(){return Ny.useContext($1)}var ju=E(I());function D1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=ju.useState(!1),r=B(t,2),o=r[0],n=r[1],i=ju.useRef(null),a=function(){window.clearTimeout(i.current)};ju.useEffect(function(){return a},[]);var s=function(c,u){a(),i.current=window.setTimeout(function(){n(c),u&&u()},e)};return[o,s,a]}var hp=E(I());function vp(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=hp.useRef(null),r=hp.useRef(null);hp.useEffect(function(){return function(){window.clearTimeout(r.current)}},[]);function o(n){(n||t.current===null)&&(t.current=n),window.clearTimeout(r.current),r.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},o]}var $y=E(I());function A1(e,t,r,o){var n=$y.useRef(null);n.current={open:t,triggerOpen:r,customizedTrigger:o},$y.useEffect(function(){function i(a){var s;if(!((s=n.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),n.current.open&&e().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&n.current.triggerOpen(!1)}}return window.addEventListener("mousedown",i),function(){return window.removeEventListener("mousedown",i)}},[])}var Va=E(I()),ky=E(I());function EM(e){return e&&![Fe.ESC,Fe.SHIFT,Fe.BACKSPACE,Fe.TAB,Fe.WIN_KEY,Fe.ALT,Fe.META,Fe.WIN_KEY_RIGHT,Fe.CTRL,Fe.SEMICOLON,Fe.EQUALS,Fe.CAPS_LOCK,Fe.CONTEXT_MENU,Fe.F1,Fe.F2,Fe.F3,Fe.F4,Fe.F5,Fe.F6,Fe.F7,Fe.F8,Fe.F9,Fe.F10,Fe.F11,Fe.F12].includes(e)}var An=E(I()),k1=E(I()),HM=E(Ee());var ri=E(I()),ra=E(I()),DM=E(Ee());var oc=E(I()),RM=E(Ee());var m7=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Vu=void 0;function g7(e,t){var r=e.prefixCls,o=e.invalidate,n=e.item,i=e.renderItem,a=e.responsive,s=e.responsiveDisabled,l=e.registerSize,c=e.itemKey,u=e.className,d=e.style,f=e.children,m=e.display,h=e.order,v=e.component,y=v===void 0?"div":v,g=Ae(e,m7),p=a&&!m;function x(R){l(c,R)}oc.useEffect(function(){return function(){x(null)}},[]);var S=i&&n!==Vu?i(n,{index:h}):f,b;o||(b={opacity:p?0:1,height:p?0:Vu,overflowY:p?"hidden":Vu,order:a?h:Vu,pointerEvents:p?"none":Vu,position:p?"absolute":Vu});var w={};p&&(w["aria-hidden"]=!0);var C=oc.createElement(y,ee({className:(0,RM.default)(!o&&r,u),style:P(P({},b),d)},w,g,{ref:t}),S);return a&&(C=oc.createElement(un,{onResize:function(_){var O=_.offsetWidth;x(O)},disabled:s},C)),C}var OM=oc.forwardRef(g7);OM.displayName="Item";var Hu=OM;var Dy=E(I()),_M=E(Si());function M1(e){if(typeof MessageChannel>"u")ut(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function PM(){var e=Dy.useRef(null),t=function(o){e.current||(e.current=[],M1(function(){(0,_M.unstable_batchedUpdates)(function(){e.current.forEach(function(n){n()}),e.current=null})})),e.current.push(o)};return t}function nc(e,t){var r=Dy.useState(t),o=B(r,2),n=o[0],i=o[1],a=Rt(function(s){e(function(){i(s)})});return[n,a]}var Zs=E(I()),NM=E(Ee());var TM=E(I()),ic=TM.default.createContext(null);var h7=["component"],v7=["className"],y7=["className"],x7=function(t,r){var o=Zs.useContext(ic);if(!o){var n=t.component,i=n===void 0?"div":n,a=Ae(t,h7);return Zs.createElement(i,ee({},a,{ref:r}))}var s=o.className,l=Ae(o,v7),c=t.className,u=Ae(t,y7);return Zs.createElement(ic.Provider,{value:null},Zs.createElement(Hu,ee({ref:r,className:(0,NM.default)(s,c)},l,u)))},IM=Zs.forwardRef(x7);IM.displayName="RawItem";var $M=IM;var b7=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],AM="responsive",MM="invalidate";function S7(e){return"+ ".concat(e.length," ...")}function C7(e,t){var r=e.prefixCls,o=r===void 0?"rc-overflow":r,n=e.data,i=n===void 0?[]:n,a=e.renderItem,s=e.renderRawItem,l=e.itemKey,c=e.itemWidth,u=c===void 0?10:c,d=e.ssr,f=e.style,m=e.className,h=e.maxCount,v=e.renderRest,y=e.renderRawRest,g=e.suffix,p=e.component,x=p===void 0?"div":p,S=e.itemComponent,b=e.onVisibleChange,w=Ae(e,b7),C=d==="full",R=PM(),_=nc(R,null),O=B(_,2),N=O[0],k=O[1],L=N||0,j=nc(R,new Map),W=B(j,2),D=W[0],$=W[1],M=nc(R,0),V=B(M,2),F=V[0],z=V[1],U=nc(R,0),H=B(U,2),A=H[0],G=H[1],q=nc(R,0),oe=B(q,2),Z=oe[0],X=oe[1],ie=(0,ra.useState)(null),te=B(ie,2),K=te[0],Y=te[1],ne=(0,ra.useState)(null),Q=B(ne,2),J=Q[0],le=Q[1],ue=ri.useMemo(function(){return J===null&&C?Number.MAX_SAFE_INTEGER:J||0},[J,N]),de=(0,ra.useState)(!1),ve=B(de,2),ye=ve[0],we=ve[1],ce="".concat(o,"-item"),ae=Math.max(F,A),Re=h===AM,Me=i.length&&Re,Be=h===MM,Ie=Me||typeof h=="number"&&i.length>h,Oe=(0,ra.useMemo)(function(){var Le=i;return Me?N===null&&C?Le=i:Le=i.slice(0,Math.min(i.length,L/u)):typeof h=="number"&&(Le=i.slice(0,h)),Le},[i,u,N,h,Me]),be=(0,ra.useMemo)(function(){return Me?i.slice(ue+1):i.slice(Oe.length)},[i,Oe,Me,ue]),Ve=(0,ra.useCallback)(function(Le,Te){var Ne;return typeof l=="function"?l(Le):(Ne=l&&Le?.[l])!==null&&Ne!==void 0?Ne:Te},[l]),He=(0,ra.useCallback)(a||function(Le){return Le},[a]);function $e(Le,Te,Ne){J===Le&&(Te===void 0||Te===K)||(le(Le),Ne||(we(LeL){$e(vt-1,Le-Bt-Z+A);break}}g&&Ue(0)+Z>L&&Y(null)}},[L,D,A,Z,Ve,Oe]);var Qe=ye&&!!be.length,gt={};K!==null&&Me&&(gt={position:"absolute",left:K,top:0});var Nt={prefixCls:ce,responsive:Me,component:S,invalidate:Be},ht=s?function(Le,Te){var Ne=Ve(Le,Te);return ri.createElement(ic.Provider,{key:Ne,value:P(P({},Nt),{},{order:Te,item:Le,itemKey:Ne,registerSize:me,display:Te<=ue})},s(Le,Te))}:function(Le,Te){var Ne=Ve(Le,Te);return ri.createElement(Hu,ee({},Nt,{order:Te,key:Ne,item:Le,renderItem:He,itemKey:Ne,registerSize:me,display:Te<=ue}))},We={order:Qe?ue:Number.MAX_SAFE_INTEGER,className:"".concat(ce,"-rest"),registerSize:ze,display:Qe},Pe=v||S7,tt=y?ri.createElement(ic.Provider,{value:P(P({},Nt),We)},y(be)):ri.createElement(Hu,ee({},Nt,We),typeof Pe=="function"?Pe(be):Pe),De=ri.createElement(x,ee({className:(0,DM.default)(!Be&&o,m),style:f,ref:t},w),Oe.map(ht),Ie?tt:null,g&&ri.createElement(Hu,ee({},Nt,{responsive:Re,responsiveDisabled:!Me,order:ue,className:"".concat(ce,"-suffix"),registerSize:Ce,display:!0,style:gt}),g));return Re?ri.createElement(un,{onResize:fe,disabled:!Me},De):De}var yp=ri.forwardRef(C7);yp.displayName="Overflow";yp.Item=$M;yp.RESPONSIVE=AM;yp.INVALIDATE=MM;var LM=yp;var kM=LM;var Uu=E(I()),FM=E(Ee());var w7=function(t,r){var o,n=t.prefixCls,i=t.id,a=t.inputElement,s=t.disabled,l=t.tabIndex,c=t.autoFocus,u=t.autoComplete,d=t.editable,f=t.activeDescendantId,m=t.value,h=t.maxLength,v=t.onKeyDown,y=t.onMouseDown,g=t.onChange,p=t.onPaste,x=t.onCompositionStart,S=t.onCompositionEnd,b=t.onBlur,w=t.open,C=t.attrs,R=a||Uu.createElement("input",null),_=R,O=_.ref,N=_.props,k=N.onKeyDown,L=N.onChange,j=N.onMouseDown,W=N.onCompositionStart,D=N.onCompositionEnd,$=N.onBlur,M=N.style;return Al(!("maxLength"in R.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),R=Uu.cloneElement(R,P(P(P({type:"search"},N),{},{id:i,ref:Fr(r,O),disabled:s,tabIndex:l,autoComplete:u||"off",autoFocus:c,className:(0,FM.default)("".concat(n,"-selection-search-input"),(o=R)===null||o===void 0||(o=o.props)===null||o===void 0?void 0:o.className),role:"combobox","aria-expanded":w||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":w?f:void 0},C),{},{value:d?m:"",maxLength:h,readOnly:!d,unselectable:d?null:"on",style:P(P({},M),{},{opacity:d?null:0}),onKeyDown:function(F){v(F),k&&k(F)},onMouseDown:function(F){y(F),j&&j(F)},onChange:function(F){g(F),L&&L(F)},onCompositionStart:function(F){x(F),W&&W(F)},onCompositionEnd:function(F){S(F),D&&D(F)},onPaste:p,onBlur:function(F){b(F),$&&$(F)}})),R},E7=Uu.forwardRef(w7),Ay=E7;var Ly=E(I());function xp(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}var R7=typeof window<"u"&&window.document&&window.document.documentElement,WM=R7;function BM(e){return e!=null}function jM(e){return!e&&e!==0}function zM(e){return["string","number"].includes(pe(e))}function My(e){var t=void 0;return e&&(zM(e.title)?t=e.title.toString():zM(e.label)&&(t=e.label.toString())),t}function L1(e,t){WM?Ly.useLayoutEffect(e,t):Ly.useEffect(e,t)}function O7(e){var t;return(t=e.key)!==null&&t!==void 0?t:e.value}var VM=function(t){t.preventDefault(),t.stopPropagation()},_7=function(t){var r=t.id,o=t.prefixCls,n=t.values,i=t.open,a=t.searchValue,s=t.autoClearSearchValue,l=t.inputRef,c=t.placeholder,u=t.disabled,d=t.mode,f=t.showSearch,m=t.autoFocus,h=t.autoComplete,v=t.activeDescendantId,y=t.tabIndex,g=t.removeIcon,p=t.maxTagCount,x=t.maxTagTextLength,S=t.maxTagPlaceholder,b=S===void 0?function(ne){return"+ ".concat(ne.length," ...")}:S,w=t.tagRender,C=t.onToggleOpen,R=t.onRemove,_=t.onInputChange,O=t.onInputPaste,N=t.onInputKeyDown,k=t.onInputMouseDown,L=t.onInputCompositionStart,j=t.onInputCompositionEnd,W=t.onInputBlur,D=An.useRef(null),$=(0,k1.useState)(0),M=B($,2),V=M[0],F=M[1],z=(0,k1.useState)(!1),U=B(z,2),H=U[0],A=U[1],G="".concat(o,"-selection"),q=i||d==="multiple"&&s===!1||d==="tags"?a:"",oe=d==="tags"||d==="multiple"&&s===!1||f&&(i||H);L1(function(){F(D.current.scrollWidth)},[q]);var Z=function(Q,J,le,ue,de){return An.createElement("span",{title:My(Q),className:(0,HM.default)("".concat(G,"-item"),T({},"".concat(G,"-item-disabled"),le))},An.createElement("span",{className:"".concat(G,"-item-content")},J),ue&&An.createElement(Qs,{className:"".concat(G,"-item-remove"),onMouseDown:VM,onClick:de,customizeIcon:g},"\xD7"))},X=function(Q,J,le,ue,de,ve){var ye=function(ce){VM(ce),C(!i)};return An.createElement("span",{onMouseDown:ye},w({label:J,value:Q,disabled:le,closable:ue,onClose:de,isMaxTag:!!ve}))},ie=function(Q){var J=Q.disabled,le=Q.label,ue=Q.value,de=!u&&!J,ve=le;if(typeof x=="number"&&(typeof le=="string"||typeof le=="number")){var ye=String(ve);ye.length>x&&(ve="".concat(ye.slice(0,x),"..."))}var we=function(ae){ae&&ae.stopPropagation(),R(Q)};return typeof w=="function"?X(ue,ve,J,de,we):Z(Q,ve,J,de,we)},te=function(Q){if(!n.length)return null;var J=typeof b=="function"?b(Q):b;return typeof w=="function"?X(void 0,J,!1,!1,void 0,!0):Z({title:J},J,!1)},K=An.createElement("div",{className:"".concat(G,"-search"),style:{width:V},onFocus:function(){A(!0)},onBlur:function(){A(!1)}},An.createElement(Ay,{ref:l,open:i,prefixCls:o,id:r,inputElement:null,disabled:u,autoFocus:m,autoComplete:h,editable:oe,activeDescendantId:v,value:q,onKeyDown:N,onMouseDown:k,onChange:_,onPaste:O,onCompositionStart:L,onCompositionEnd:j,onBlur:W,tabIndex:y,attrs:Ao(t,!0)}),An.createElement("span",{ref:D,className:"".concat(G,"-search-mirror"),"aria-hidden":!0},q,"\xA0")),Y=An.createElement(kM,{prefixCls:"".concat(G,"-overflow"),data:n,renderItem:ie,renderRest:te,suffix:K,itemKey:O7,maxCount:p});return An.createElement("span",{className:"".concat(G,"-wrap")},Y,!n.length&&!q&&An.createElement("span",{className:"".concat(G,"-placeholder")},c))},UM=_7;var oi=E(I());var P7=function(t){var r=t.inputElement,o=t.prefixCls,n=t.id,i=t.inputRef,a=t.disabled,s=t.autoFocus,l=t.autoComplete,c=t.activeDescendantId,u=t.mode,d=t.open,f=t.values,m=t.placeholder,h=t.tabIndex,v=t.showSearch,y=t.searchValue,g=t.activeValue,p=t.maxLength,x=t.onInputKeyDown,S=t.onInputMouseDown,b=t.onInputChange,w=t.onInputPaste,C=t.onInputCompositionStart,R=t.onInputCompositionEnd,_=t.onInputBlur,O=t.title,N=oi.useState(!1),k=B(N,2),L=k[0],j=k[1],W=u==="combobox",D=W||v,$=f[0],M=y||"";W&&g&&!L&&(M=g),oi.useEffect(function(){W&&j(!1)},[W,g]);var V=u!=="combobox"&&!d&&!v?!1:!!M,F=O===void 0?My($):O,z=oi.useMemo(function(){return $?null:oi.createElement("span",{className:"".concat(o,"-selection-placeholder"),style:V?{visibility:"hidden"}:void 0},m)},[$,V,m,o]);return oi.createElement("span",{className:"".concat(o,"-selection-wrap")},oi.createElement("span",{className:"".concat(o,"-selection-search")},oi.createElement(Ay,{ref:i,prefixCls:o,id:n,open:d,inputElement:r,disabled:a,autoFocus:s,autoComplete:l,editable:D,activeDescendantId:c,value:M,onKeyDown:x,onMouseDown:S,onChange:function(H){j(!0),b(H)},onPaste:w,onCompositionStart:C,onCompositionEnd:R,onBlur:_,tabIndex:h,attrs:Ao(t,!0),maxLength:W?p:void 0})),!W&&$?oi.createElement("span",{className:"".concat(o,"-selection-item"),title:F,style:V?{visibility:"hidden"}:void 0},$.label):null,z)},GM=P7;var T7=function(t,r){var o=(0,ky.useRef)(null),n=(0,ky.useRef)(!1),i=t.prefixCls,a=t.open,s=t.mode,l=t.showSearch,c=t.tokenWithEnter,u=t.disabled,d=t.prefix,f=t.autoClearSearchValue,m=t.onSearch,h=t.onSearchSubmit,v=t.onToggleOpen,y=t.onInputKeyDown,g=t.onInputBlur,p=t.domRef;Va.useImperativeHandle(r,function(){return{focus:function(F){o.current.focus(F)},blur:function(){o.current.blur()}}});var x=vp(0),S=B(x,2),b=S[0],w=S[1],C=function(F){var z=F.which,U=o.current instanceof HTMLTextAreaElement;!U&&a&&(z===Fe.UP||z===Fe.DOWN)&&F.preventDefault(),y&&y(F),z===Fe.ENTER&&s==="tags"&&!n.current&&!a&&h?.(F.target.value),!(U&&!a&&~[Fe.UP,Fe.DOWN,Fe.LEFT,Fe.RIGHT].indexOf(z))&&EM(z)&&v(!0)},R=function(){w(!0)},_=(0,ky.useRef)(null),O=function(F){m(F,!0,n.current)!==!1&&v(!0)},N=function(){n.current=!0},k=function(F){n.current=!1,s!=="combobox"&&O(F.target.value)},L=function(F){var z=F.target.value;if(c&&_.current&&/[\r\n]/.test(_.current)){var U=_.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");z=z.replace(U,_.current)}_.current=null,O(z)},j=function(F){var z=F.clipboardData,U=z?.getData("text");_.current=U||""},W=function(F){var z=F.target;if(z!==o.current){var U=document.body.style.msTouchAction!==void 0;U?setTimeout(function(){o.current.focus()}):o.current.focus()}},D=function(F){var z=b();F.target!==o.current&&!z&&!(s==="combobox"&&u)&&F.preventDefault(),(s!=="combobox"&&(!l||!z)||!a)&&(a&&f!==!1&&m("",!0,!1),v())},$={inputRef:o,onInputKeyDown:C,onInputMouseDown:R,onInputChange:L,onInputPaste:j,onInputCompositionStart:N,onInputCompositionEnd:k,onInputBlur:g},M=s==="multiple"||s==="tags"?Va.createElement(UM,ee({},t,$)):Va.createElement(GM,ee({},t,$));return Va.createElement("div",{ref:p,className:"".concat(i,"-selector"),onClick:W,onMouseDown:D},d&&Va.createElement("div",{className:"".concat(i,"-prefix")},d),M)},N7=Va.forwardRef(T7),qM=N7;var zy=E(Ee());var bt=E(I());var ZM=E(Ee());var ni=E(I());var KM=E(Ee()),Fy=E(I());function F1(e){var t=e.prefixCls,r=e.align,o=e.arrow,n=e.arrowPos,i=o||{},a=i.className,s=i.content,l=n.x,c=l===void 0?0:l,u=n.y,d=u===void 0?0:u,f=Fy.useRef();if(!r||!r.points)return null;var m={position:"absolute"};if(r.autoArrow!==!1){var h=r.points[0],v=r.points[1],y=h[0],g=h[1],p=v[0],x=v[1];y===p||!["t","b"].includes(y)?m.top=d:y==="t"?m.top=0:m.bottom=0,g===x||!["l","r"].includes(g)?m.left=c:g==="l"?m.left=0:m.right=0}return Fy.createElement("div",{ref:f,className:(0,KM.default)("".concat(t,"-arrow"),a),style:m},s)}var XM=E(Ee());var z1=E(I());function W1(e){var t=e.prefixCls,r=e.open,o=e.zIndex,n=e.mask,i=e.motion;return n?z1.createElement(so,ee({},i,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(a){var s=a.className;return z1.createElement("div",{style:{zIndex:o},className:(0,XM.default)("".concat(t,"-mask"),s)})}):null}var YM=E(I()),I7=YM.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),QM=I7;var $7=ni.forwardRef(function(e,t){var r=e.popup,o=e.className,n=e.prefixCls,i=e.style,a=e.target,s=e.onVisibleChanged,l=e.open,c=e.keepDom,u=e.fresh,d=e.onClick,f=e.mask,m=e.arrow,h=e.arrowPos,v=e.align,y=e.motion,g=e.maskMotion,p=e.forceRender,x=e.getPopupContainer,S=e.autoDestroy,b=e.portal,w=e.zIndex,C=e.onMouseEnter,R=e.onMouseLeave,_=e.onPointerEnter,O=e.onPointerDownCapture,N=e.ready,k=e.offsetX,L=e.offsetY,j=e.offsetR,W=e.offsetB,D=e.onAlign,$=e.onPrepare,M=e.stretch,V=e.targetWidth,F=e.targetHeight,z=typeof r=="function"?r():r,U=l||c,H=x?.length>0,A=ni.useState(!x||!H),G=B(A,2),q=G[0],oe=G[1];if(yt(function(){!q&&H&&a&&oe(!0)},[q,H,a]),!q)return null;var Z="auto",X={left:"-1000vw",top:"-1000vh",right:Z,bottom:Z};if(N||!l){var ie,te=v.points,K=v.dynamicInset||((ie=v._experimental)===null||ie===void 0?void 0:ie.dynamicInset),Y=K&&te[0][1]==="r",ne=K&&te[0][0]==="b";Y?(X.right=j,X.left=Z):(X.left=k,X.right=Z),ne?(X.bottom=W,X.top=Z):(X.top=L,X.bottom=Z)}var Q={};return M&&(M.includes("height")&&F?Q.height=F:M.includes("minHeight")&&F&&(Q.minHeight=F),M.includes("width")&&V?Q.width=V:M.includes("minWidth")&&V&&(Q.minWidth=V)),l||(Q.pointerEvents="none"),ni.createElement(b,{open:p||U,getContainer:x&&function(){return x(a)},autoDestroy:S},ni.createElement(W1,{prefixCls:n,open:l,zIndex:w,mask:f,motion:g}),ni.createElement(un,{onResize:D,disabled:!l},function(J){return ni.createElement(so,ee({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:p,leavedClassName:"".concat(n,"-hidden")},y,{onAppearPrepare:$,onEnterPrepare:$,visible:l,onVisibleChanged:function(ue){var de;y==null||(de=y.onVisibleChanged)===null||de===void 0||de.call(y,ue),s(ue)}}),function(le,ue){var de=le.className,ve=le.style,ye=(0,ZM.default)(n,de,o);return ni.createElement("div",{ref:Fr(J,t,ue),className:ye,style:P(P(P(P({"--arrow-x":"".concat(h.x||0,"px"),"--arrow-y":"".concat(h.y||0,"px")},X),Q),ve),{},{boxSizing:"border-box",zIndex:w},i),onMouseEnter:C,onMouseLeave:R,onPointerEnter:_,onClick:d,onPointerDownCapture:O},m&&ni.createElement(F1,{prefixCls:n,arrow:m,arrowPos:h,align:v}),ni.createElement(QM,{cache:!l&&!u},z))})}))}),JM=$7;var Gu=E(I()),D7=Gu.forwardRef(function(e,t){var r=e.children,o=e.getTriggerDOMNode,n=wi(r),i=Gu.useCallback(function(s){Wf(t,o?o(s):s)},[o]),a=_n(i,Ts(r));return n?Gu.cloneElement(r,{ref:a}):r}),eL=D7;var tL=E(I()),A7=tL.createContext(null),B1=A7;var oL=E(I());function rL(e){return e?Array.isArray(e)?e:[e]:[]}function j1(e,t,r,o){return oL.useMemo(function(){var n=rL(r??t),i=rL(o??t),a=new Set(n),s=new Set(i);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[e,t,r,o])}var ac=E(I());function M7(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function nL(e,t,r,o){for(var n=r.points,i=Object.keys(e),a=0;a1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function bp(e){return qu(parseFloat(e),0)}function H1(e,t){var r=P({},e);return(t||[]).forEach(function(o){if(!(o instanceof HTMLBodyElement||o instanceof HTMLHtmlElement)){var n=Js(o).getComputedStyle(o),i=n.overflow,a=n.overflowClipMargin,s=n.borderTopWidth,l=n.borderBottomWidth,c=n.borderLeftWidth,u=n.borderRightWidth,d=o.getBoundingClientRect(),f=o.offsetHeight,m=o.clientHeight,h=o.offsetWidth,v=o.clientWidth,y=bp(s),g=bp(l),p=bp(c),x=bp(u),S=qu(Math.round(d.width/h*1e3)/1e3),b=qu(Math.round(d.height/f*1e3)/1e3),w=(h-v-p-x)*S,C=(f-m-y-g)*b,R=y*b,_=g*b,O=p*S,N=x*S,k=0,L=0;if(i==="clip"){var j=bp(a);k=j*S,L=j*b}var W=d.x+O-k,D=d.y+R-L,$=W+d.width+2*k-O-N-w,M=D+d.height+2*L-R-_-C;r.left=Math.max(r.left,W),r.top=Math.max(r.top,D),r.right=Math.min(r.right,$),r.bottom=Math.min(r.bottom,M)}}),r}function iL(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r="".concat(t),o=r.match(/^(.*)\%$/);return o?e*(parseFloat(o[1])/100):parseFloat(r)}function aL(e,t){var r=t||[],o=B(r,2),n=o[0],i=o[1];return[iL(e.width,n),iL(e.height,i)]}function sL(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function Ku(e,t){var r=t[0],o=t[1],n,i;return r==="t"?i=e.y:r==="b"?i=e.y+e.height:i=e.y+e.height/2,o==="l"?n=e.x:o==="r"?n=e.x+e.width:n=e.x+e.width/2,{x:n,y:i}}function el(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(o,n){return n===t?r[o]||"c":o}).join("")}function U1(e,t,r,o,n,i,a){var s=ac.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:n[o]||{}}),l=B(s,2),c=l[0],u=l[1],d=ac.useRef(0),f=ac.useMemo(function(){return t?Sp(t):[]},[t]),m=ac.useRef({}),h=function(){m.current={}};e||h();var v=Rt(function(){if(t&&r&&e){let Vo=function(wc,rs){var Ec=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ae,om=A.x+wc,nm=A.y+rs,hx=om+Y,Ye=nm+K,ft=Math.max(om,Ec.left),mr=Math.max(nm,Ec.top),Lr=Math.min(hx,Ec.right),gr=Math.min(Ye,Ec.bottom);return Math.max(0,(Lr-ft)*(gr-mr))},Cc=function(){rr=A.y+Ne,dr=rr+K,fr=A.x+Te,Wo=fr+Y};var jR=Vo,VR=Cc,p,x,S,b,w=t,C=w.ownerDocument,R=Js(w),_=R.getComputedStyle(w),O=_.width,N=_.height,k=_.position,L=w.style.left,j=w.style.top,W=w.style.right,D=w.style.bottom,$=w.style.overflow,M=P(P({},n[o]),i),V=C.createElement("div");(p=w.parentElement)===null||p===void 0||p.appendChild(V),V.style.left="".concat(w.offsetLeft,"px"),V.style.top="".concat(w.offsetTop,"px"),V.style.position=k,V.style.height="".concat(w.offsetHeight,"px"),V.style.width="".concat(w.offsetWidth,"px"),w.style.left="0",w.style.top="0",w.style.right="auto",w.style.bottom="auto",w.style.overflow="hidden";var F;if(Array.isArray(r))F={x:r[0],y:r[1],width:0,height:0};else{var z,U,H=r.getBoundingClientRect();H.x=(z=H.x)!==null&&z!==void 0?z:H.left,H.y=(U=H.y)!==null&&U!==void 0?U:H.top,F={x:H.x,y:H.y,width:H.width,height:H.height}}var A=w.getBoundingClientRect();A.x=(x=A.x)!==null&&x!==void 0?x:A.left,A.y=(S=A.y)!==null&&S!==void 0?S:A.top;var G=C.documentElement,q=G.clientWidth,oe=G.clientHeight,Z=G.scrollWidth,X=G.scrollHeight,ie=G.scrollTop,te=G.scrollLeft,K=A.height,Y=A.width,ne=F.height,Q=F.width,J={left:0,top:0,right:q,bottom:oe},le={left:-te,top:-ie,right:Z-te,bottom:X-ie},ue=M.htmlRegion,de="visible",ve="visibleFirst";ue!=="scroll"&&ue!==ve&&(ue=de);var ye=ue===ve,we=H1(le,f),ce=H1(J,f),ae=ue===de?ce:we,Re=ye?ce:ae;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";var Me=w.getBoundingClientRect();w.style.left=L,w.style.top=j,w.style.right=W,w.style.bottom=D,w.style.overflow=$,(b=w.parentElement)===null||b===void 0||b.removeChild(V);var Be=qu(Math.round(Y/parseFloat(O)*1e3)/1e3),Ie=qu(Math.round(K/parseFloat(N)*1e3)/1e3);if(Be===0||Ie===0||Ml(r)&&!qv(r))return;var Oe=M.offset,be=M.targetOffset,Ve=aL(A,Oe),He=B(Ve,2),$e=He[0],fe=He[1],me=aL(F,be),ze=B(me,2),Ce=ze[0],Ue=ze[1];F.x-=Ce,F.y-=Ue;var Qe=M.points||[],gt=B(Qe,2),Nt=gt[0],ht=gt[1],We=sL(ht),Pe=sL(Nt),tt=Ku(F,We),De=Ku(A,Pe),Le=P({},M),Te=tt.x-De.x+$e,Ne=tt.y-De.y+fe,vt=Vo(Te,Ne),Bt=Vo(Te,Ne,ce),je=Ku(F,["t","l"]),_e=Ku(A,["t","l"]),Ze=Ku(F,["b","r"]),Je=Ku(A,["b","r"]),Ke=M.overflow||{},ot=Ke.adjustX,kt=Ke.adjustY,It=Ke.shiftX,tr=Ke.shiftY,Ft=function(rs){return typeof rs=="boolean"?rs:rs>=0},rr,dr,fr,Wo;Cc();var pr=Ft(kt),Or=Pe[0]===We[0];if(pr&&Pe[0]==="t"&&(dr>Re.bottom||m.current.bt)){var Se=Ne;Or?Se-=K-ne:Se=je.y-Je.y-fe;var Ge=Vo(Te,Se),ke=Vo(Te,Se,ce);Ge>vt||Ge===vt&&(!ye||ke>=Bt)?(m.current.bt=!0,Ne=Se,fe=-fe,Le.points=[el(Pe,0),el(We,0)]):m.current.bt=!1}if(pr&&Pe[0]==="b"&&(rrvt||nt===vt&&(!ye||$t>=Bt)?(m.current.tb=!0,Ne=xe,fe=-fe,Le.points=[el(Pe,0),el(We,0)]):m.current.tb=!1}var Dt=Ft(ot),go=Pe[1]===We[1];if(Dt&&Pe[1]==="l"&&(Wo>Re.right||m.current.rl)){var Ar=Te;go?Ar-=Y-Q:Ar=je.x-Je.x-$e;var Br=Vo(Ar,Ne),_r=Vo(Ar,Ne,ce);Br>vt||Br===vt&&(!ye||_r>=Bt)?(m.current.rl=!0,Te=Ar,$e=-$e,Le.points=[el(Pe,1),el(We,1)]):m.current.rl=!1}if(Dt&&Pe[1]==="r"&&(frvt||tn===vt&&(!ye||Bo>=Bt)?(m.current.lr=!0,Te=jr,$e=-$e,Le.points=[el(Pe,1),el(We,1)]):m.current.lr=!1}Cc();var eo=It===!0?0:It;typeof eo=="number"&&(frce.right&&(Te-=Wo-ce.right-$e,F.x>ce.right-eo&&(Te+=F.x-ce.right+eo)));var Oo=tr===!0?0:tr;typeof Oo=="number"&&(rrce.bottom&&(Ne-=dr-ce.bottom-fe,F.y>ce.bottom-Oo&&(Ne+=F.y-ce.bottom+Oo)));var Ja=A.x+Te,es=Ja+Y,kn=A.y+Ne,Sc=kn+K,ts=F.x,Ct=ts+Q,pt=F.y,to=pt+ne,ro=Math.max(Ja,ts),br=Math.min(es,Ct),Mr=(ro+br)/2,xn=Mr-Ja,rn=Math.max(kn,pt),Fn=Math.min(Sc,to),ki=(rn+Fn)/2,ui=ki-kn;a?.(t,Le);var Fi=Me.right-A.x-(Te+A.width),jo=Me.bottom-A.y-(Ne+A.height);Be===1&&(Te=Math.round(Te),Fi=Math.round(Fi)),Ie===1&&(Ne=Math.round(Ne),jo=Math.round(jo));var gx={ready:!0,offsetX:Te/Be,offsetY:Ne/Ie,offsetR:Fi/Be,offsetB:jo/Ie,arrowX:xn/Be,arrowY:ui/Ie,scaleX:Be,scaleY:Ie,align:Le};u(gx)}}),y=function(){d.current+=1;var x=d.current;Promise.resolve().then(function(){d.current===x&&v()})},g=function(){u(function(x){return P(P({},x),{},{ready:!1})})};return yt(g,[o]),yt(function(){e||g()},[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,y]}function G1(e,t,r,o,n){yt(function(){if(e&&t&&r){let f=function(){o(),n()};var d=f,i=t,a=r,s=Sp(i),l=Sp(a),c=Js(a),u=new Set([c].concat(se(s),se(l)));return u.forEach(function(m){m.addEventListener("scroll",f,{passive:!0})}),c.addEventListener("resize",f,{passive:!0}),o(),function(){u.forEach(function(m){m.removeEventListener("scroll",f),c.removeEventListener("resize",f)})}}},[e,t,r])}var Cp=E(I());function q1(e,t,r,o,n,i,a,s){var l=Cp.useRef(e);l.current=e;var c=Cp.useRef(!1);Cp.useEffect(function(){if(t&&o&&(!n||i)){var d=function(){c.current=!1},f=function(S){var b;l.current&&!a(((b=S.composedPath)===null||b===void 0||(b=b.call(S))===null||b===void 0?void 0:b[0])||S.target)&&!c.current&&s(!1)},m=Js(o);m.addEventListener("pointerdown",d,!0),m.addEventListener("mousedown",f,!0),m.addEventListener("contextmenu",f,!0);var h=Ul(r);if(h&&(h.addEventListener("mousedown",f,!0),h.addEventListener("contextmenu",f,!0)),0)var v,y,g,p;return function(){m.removeEventListener("pointerdown",d,!0),m.removeEventListener("mousedown",f,!0),m.removeEventListener("contextmenu",f,!0),h&&(h.removeEventListener("mousedown",f,!0),h.removeEventListener("contextmenu",f,!0))}}},[t,r,o,n,i]);function u(){c.current=!0}return u}var L7=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function k7(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jl,t=bt.forwardRef(function(r,o){var n=r.prefixCls,i=n===void 0?"rc-trigger-popup":n,a=r.children,s=r.action,l=s===void 0?"hover":s,c=r.showAction,u=r.hideAction,d=r.popupVisible,f=r.defaultPopupVisible,m=r.onPopupVisibleChange,h=r.afterPopupVisibleChange,v=r.mouseEnterDelay,y=r.mouseLeaveDelay,g=y===void 0?.1:y,p=r.focusDelay,x=r.blurDelay,S=r.mask,b=r.maskClosable,w=b===void 0?!0:b,C=r.getPopupContainer,R=r.forceRender,_=r.autoDestroy,O=r.destroyPopupOnHide,N=r.popup,k=r.popupClassName,L=r.popupStyle,j=r.popupPlacement,W=r.builtinPlacements,D=W===void 0?{}:W,$=r.popupAlign,M=r.zIndex,V=r.stretch,F=r.getPopupClassNameFromAlign,z=r.fresh,U=r.alignPoint,H=r.onPopupClick,A=r.onPopupAlign,G=r.arrow,q=r.popupMotion,oe=r.maskMotion,Z=r.popupTransitionName,X=r.popupAnimation,ie=r.maskTransitionName,te=r.maskAnimation,K=r.className,Y=r.getTriggerDOMNode,ne=Ae(r,L7),Q=_||O||!1,J=bt.useState(!1),le=B(J,2),ue=le[0],de=le[1];yt(function(){de(Bu())},[]);var ve=bt.useRef({}),ye=bt.useContext(B1),we=bt.useMemo(function(){return{registerSubPopup:function(ft,mr){ve.current[ft]=mr,ye?.registerSubPopup(ft,mr)}}},[ye]),ce=ku(),ae=bt.useState(null),Re=B(ae,2),Me=Re[0],Be=Re[1],Ie=bt.useRef(null),Oe=Rt(function(Ye){Ie.current=Ye,Ml(Ye)&&Me!==Ye&&Be(Ye),ye?.registerSubPopup(ce,Ye)}),be=bt.useState(null),Ve=B(be,2),He=Ve[0],$e=Ve[1],fe=bt.useRef(null),me=Rt(function(Ye){Ml(Ye)&&He!==Ye&&($e(Ye),fe.current=Ye)}),ze=bt.Children.only(a),Ce=ze?.props||{},Ue={},Qe=Rt(function(Ye){var ft,mr,Lr=He;return Lr?.contains(Ye)||((ft=Ul(Lr))===null||ft===void 0?void 0:ft.host)===Ye||Ye===Lr||Me?.contains(Ye)||((mr=Ul(Me))===null||mr===void 0?void 0:mr.host)===Ye||Ye===Me||Object.values(ve.current).some(function(gr){return gr?.contains(Ye)||Ye===gr})}),gt=V1(i,q,X,Z),Nt=V1(i,oe,te,ie),ht=bt.useState(f||!1),We=B(ht,2),Pe=We[0],tt=We[1],De=d??Pe,Le=Rt(function(Ye){d===void 0&&tt(Ye)});yt(function(){tt(d||!1)},[d]);var Te=bt.useRef(De);Te.current=De;var Ne=bt.useRef([]);Ne.current=[];var vt=Rt(function(Ye){var ft;Le(Ye),((ft=Ne.current[Ne.current.length-1])!==null&&ft!==void 0?ft:De)!==Ye&&(Ne.current.push(Ye),m?.(Ye))}),Bt=bt.useRef(),je=function(){clearTimeout(Bt.current)},_e=function(ft){var mr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;je(),mr===0?vt(ft):Bt.current=setTimeout(function(){vt(ft)},mr*1e3)};bt.useEffect(function(){return je},[]);var Ze=bt.useState(!1),Je=B(Ze,2),Ke=Je[0],ot=Je[1];yt(function(Ye){(!Ye||De)&&ot(!0)},[De]);var kt=bt.useState(null),It=B(kt,2),tr=It[0],Ft=It[1],rr=bt.useState(null),dr=B(rr,2),fr=dr[0],Wo=dr[1],pr=function(ft){Wo([ft.clientX,ft.clientY])},Or=U1(De,Me,U&&fr!==null?fr:He,j,D,$,A),Se=B(Or,11),Ge=Se[0],ke=Se[1],xe=Se[2],nt=Se[3],$t=Se[4],Dt=Se[5],go=Se[6],Ar=Se[7],Br=Se[8],_r=Se[9],jr=Se[10],tn=j1(ue,l,c,u),Bo=B(tn,2),eo=Bo[0],Oo=Bo[1],Ja=eo.has("click"),es=Oo.has("click")||Oo.has("contextMenu"),kn=Rt(function(){Ke||jr()}),Sc=function(){Te.current&&U&&es&&_e(!1)};G1(De,He,Me,kn,Sc),yt(function(){kn()},[fr,j]),yt(function(){De&&!(D!=null&&D[j])&&kn()},[JSON.stringify($)]);var ts=bt.useMemo(function(){var Ye=nL(D,i,_r,U);return(0,zy.default)(Ye,F?.(_r))},[_r,F,D,i,U]);bt.useImperativeHandle(o,function(){return{nativeElement:fe.current,popupElement:Ie.current,forceAlign:kn}});var Ct=bt.useState(0),pt=B(Ct,2),to=pt[0],ro=pt[1],br=bt.useState(0),Mr=B(br,2),xn=Mr[0],rn=Mr[1],Fn=function(){if(V&&He){var ft=He.getBoundingClientRect();ro(ft.width),rn(ft.height)}},ki=function(){Fn(),kn()},ui=function(ft){ot(!1),jr(),h?.(ft)},Fi=function(){return new Promise(function(ft){Fn(),Ft(function(){return ft})})};yt(function(){tr&&(jr(),tr(),Ft(null))},[tr]);function jo(Ye,ft,mr,Lr){Ue[Ye]=function(gr){var im;Lr?.(gr),_e(ft,mr);for(var vx=arguments.length,HR=new Array(vx>1?vx-1:0),am=1;am1?mr-1:0),gr=1;gr1?mr-1:0),gr=1;gr1&&arguments[1]!==void 0?arguments[1]:{},r=t.fieldNames,o=t.childrenAsData,n=[],i=K1(r,!1),a=i.label,s=i.value,l=i.options,c=i.groupLabel;function u(d,f){Array.isArray(d)&&d.forEach(function(m){if(f||!(l in m)){var h=m[s];n.push({key:uL(m,n.length),groupOption:f,data:m,label:m[a],value:h})}else{var v=m[c];v===void 0&&o&&(v=m.label),n.push({key:uL(m,n.length),group:!0,data:m,label:v}),u(m[l],!0)}})}return u(e,!1),n}function Ep(e){var t=P({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Vt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var fL=function(t,r,o){if(!r||!r.length)return null;var n=!1,i=function s(l,c){var u=Qh(c),d=u[0],f=u.slice(1);if(!d)return[l];var m=l.split(d);return n=n||m.length>1,m.reduce(function(h,v){return[].concat(se(h),se(s(v,f)))},[]).filter(Boolean)},a=i(t,r);return n?typeof o<"u"?a.slice(0,o):a:null};var pL=E(I()),j7=pL.createContext(null),Xu=j7;var mL=E(I());function X1(e){var t=e.visible,r=e.values;if(!t)return null;var o=50;return mL.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(r.slice(0,o).map(function(n){var i=n.label,a=n.value;return["number","string"].includes(pe(i))?i:a}).join(", ")),r.length>o?", ...":null)}var V7=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],H7=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Rp=function(t){return t==="tags"||t==="multiple"},U7=St.forwardRef(function(e,t){var r,o=e.id,n=e.prefixCls,i=e.className,a=e.showSearch,s=e.tagRender,l=e.direction,c=e.omitDomProps,u=e.displayValues,d=e.onDisplayValuesChange,f=e.emptyOptions,m=e.notFoundContent,h=m===void 0?"Not Found":m,v=e.onClear,y=e.mode,g=e.disabled,p=e.loading,x=e.getInputElement,S=e.getRawInputElement,b=e.open,w=e.defaultOpen,C=e.onDropdownVisibleChange,R=e.activeValue,_=e.onActiveValueChange,O=e.activeDescendantId,N=e.searchValue,k=e.autoClearSearchValue,L=e.onSearch,j=e.onSearchSplit,W=e.tokenSeparators,D=e.allowClear,$=e.prefix,M=e.suffixIcon,V=e.clearIcon,F=e.OptionList,z=e.animation,U=e.transitionName,H=e.dropdownStyle,A=e.dropdownClassName,G=e.dropdownMatchSelectWidth,q=e.dropdownRender,oe=e.dropdownAlign,Z=e.placement,X=e.builtinPlacements,ie=e.getPopupContainer,te=e.showAction,K=te===void 0?[]:te,Y=e.onFocus,ne=e.onBlur,Q=e.onKeyUp,J=e.onKeyDown,le=e.onMouseDown,ue=Ae(e,V7),de=Rp(y),ve=(a!==void 0?a:de)||y==="combobox",ye=P({},ue);H7.forEach(function(Ct){delete ye[Ct]}),c?.forEach(function(Ct){delete ye[Ct]});var we=St.useState(!1),ce=B(we,2),ae=ce[0],Re=ce[1];St.useEffect(function(){Re(Bu())},[]);var Me=St.useRef(null),Be=St.useRef(null),Ie=St.useRef(null),Oe=St.useRef(null),be=St.useRef(null),Ve=St.useRef(!1),He=D1(),$e=B(He,3),fe=$e[0],me=$e[1],ze=$e[2];St.useImperativeHandle(t,function(){var Ct,pt;return{focus:(Ct=Oe.current)===null||Ct===void 0?void 0:Ct.focus,blur:(pt=Oe.current)===null||pt===void 0?void 0:pt.blur,scrollTo:function(ro){var br;return(br=be.current)===null||br===void 0?void 0:br.scrollTo(ro)},nativeElement:Me.current||Be.current}});var Ce=St.useMemo(function(){var Ct;if(y!=="combobox")return N;var pt=(Ct=u[0])===null||Ct===void 0?void 0:Ct.value;return typeof pt=="string"||typeof pt=="number"?String(pt):""},[N,y,u]),Ue=y==="combobox"&&typeof x=="function"&&x()||null,Qe=typeof S=="function"&&S(),gt=_n(Be,Qe==null||(r=Qe.props)===null||r===void 0?void 0:r.ref),Nt=St.useState(!1),ht=B(Nt,2),We=ht[0],Pe=ht[1];yt(function(){Pe(!0)},[]);var tt=zt(!1,{defaultValue:w,value:b}),De=B(tt,2),Le=De[0],Te=De[1],Ne=We?Le:!1,vt=!h&&f;(g||vt&&Ne&&y==="combobox")&&(Ne=!1);var Bt=vt?!1:Ne,je=St.useCallback(function(Ct){var pt=Ct!==void 0?Ct:!Ne;g||(Te(pt),Ne!==pt&&C?.(pt))},[g,Ne,Te,C]),_e=St.useMemo(function(){return(W||[]).some(function(Ct){return[` +}`),o)}else Ui(o);return function(){Ui(o)}},[t,o])}var DD=!1;function Fw(e){return typeof e=="boolean"&&(DD=e),DD}var AD=function(t){return t===!1?!1:!Yt()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},NV=Qo.forwardRef(function(e,t){var r=e.open,n=e.autoLock,o=e.getContainer,i=e.debug,a=e.autoDestroy,s=a===void 0?!0:a,l=e.children,c=Qo.useState(r),u=B(c,2),f=u[0],p=u[1],g=f||r;Qo.useEffect(function(){(s||r)&&p(r)},[r,s]);var h=Qo.useState(function(){return AD(o)}),v=B(h,2),y=v[0],m=v[1];Qo.useEffect(function(){var F=AD(o);m(F??null)});var d=kw(g&&!y,i),x=B(d,2),b=x[0],S=x[1],w=y??b;Mw(n&&r&&Yt()&&(w===b||w===document.body));var C=null;if(l&&bi(l)&&t){var R=l;C=R.ref}var P=xi(C,t);if(!g||!Yt()||y===void 0)return null;var O=w===!1||Fw(),A=l;return t&&(A=Qo.cloneElement(l,{ref:P})),Qo.createElement(Hv.Provider,{value:S},O?A:(0,kD.createPortal)(A,w))}),MD=NV;var Lw=MD;var zd=E($());function IV(){var e=T({},zd);return e.useId}var FD=0;var LD=IV(),Uv=LD?function(t){var r=LD();return t||r}:function(t){var r=zd.useState("ssr-id"),n=B(r,2),o=n[0],i=n[1];return zd.useEffect(function(){var a=FD;FD+=1,i("rc_unique_".concat(a))},[]),t||o};var Zw=E($());var Da=E($());var PA=E($());var Gn=E($());var zD=E($()),Oi="RC_FORM_INTERNAL_HOOKS",Kt=function(){Vt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},$V=zD.createContext({getFieldValue:Kt,getFieldsValue:Kt,getFieldError:Kt,getFieldWarning:Kt,getFieldsError:Kt,isFieldsTouched:Kt,isFieldTouched:Kt,isFieldValidating:Kt,isFieldsValidating:Kt,resetFields:Kt,setFields:Kt,setFieldValue:Kt,setFieldsValue:Kt,validateFields:Kt,submit:Kt,getInternalHooks:function(){return Kt(),{dispatch:Kt,initEntityValue:Kt,registerField:Kt,useSubscribe:Kt,setInitialValues:Kt,destroyForm:Kt,setCallbacks:Kt,registerWatch:Kt,getFields:Kt,setValidateMessages:Kt,setPreserve:Kt,getInitialValue:Kt}}}),_i=$V;var WD=E($()),DV=WD.createContext(null),Ms=DV;function Wd(e){return e==null?[]:Array.isArray(e)?e:[e]}function BD(e){return e&&!!e._init}function qv(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var Gv=qv();function jD(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function VD(e,t,r){if(gd())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&bs(o,r.prototype),o}function Kv(e){var t=typeof Map=="function"?new Map:void 0;return Kv=function(n){if(n===null||!jD(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(t!==void 0){if(t.has(n))return t.get(n);t.set(n,o)}function o(){return VD(n,arguments,wl(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),bs(o,n)},Kv(e)}var AV=/%[sdj%]/g,qD=function(){};typeof process<"u"&&process.env;function Xv(e){if(!e||!e.length)return null;var t={};return e.forEach(function(r){var n=r.field;t[n]=t[n]||[],t[n].push(r)}),t}function Gr(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n=i)return s;switch(s){case"%s":return String(r[o++]);case"%d":return Number(r[o++]);case"%j":try{return JSON.stringify(r[o++])}catch{return"[Circular]"}break;default:return s}});return a}return e}function kV(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function Dt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||kV(t)&&typeof e=="string"&&!e)}function MV(e,t,r){var n=[],o=0,i=e.length;function a(s){n.push.apply(n,te(s||[])),o++,o===i&&r(n)}e.forEach(function(s){t(s,a)})}function HD(e,t,r){var n=0,o=e.length;function i(a){if(a&&a.length){r(a);return}var s=n;n=n+1,st.max?o.push(Gr(i.messages[f].max,t.fullField,t.max)):s&&l&&(ut.max)&&o.push(Gr(i.messages[f].range,t.fullField,t.min,t.max))},YD=jV;var VV=function(t,r,n,o,i,a){t.required&&(!n.hasOwnProperty(t.field)||Dt(r,a||t.type))&&o.push(Gr(i.messages.required,t.fullField))},Yv=VV;var Qv,QD=function(){if(Qv)return Qv;var e="[a-fA-F\\d:]",t=function(w){return w&&w.includeBoundaries?"(?:(?<=\\s|^)(?=".concat(e,")|(?<=").concat(e,")(?=\\s|$))"):""},r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",o=["(?:".concat(n,":){7}(?:").concat(n,"|:)"),"(?:".concat(n,":){6}(?:").concat(r,"|:").concat(n,"|:)"),"(?:".concat(n,":){5}(?::").concat(r,"|(?::").concat(n,"){1,2}|:)"),"(?:".concat(n,":){4}(?:(?::").concat(n,"){0,1}:").concat(r,"|(?::").concat(n,"){1,3}|:)"),"(?:".concat(n,":){3}(?:(?::").concat(n,"){0,2}:").concat(r,"|(?::").concat(n,"){1,4}|:)"),"(?:".concat(n,":){2}(?:(?::").concat(n,"){0,3}:").concat(r,"|(?::").concat(n,"){1,5}|:)"),"(?:".concat(n,":){1}(?:(?::").concat(n,"){0,4}:").concat(r,"|(?::").concat(n,"){1,6}|:)"),"(?::(?:(?::".concat(n,"){0,5}:").concat(r,"|(?::").concat(n,"){1,7}|:))")],i="(?:%[0-9a-zA-Z]{1,})?",a="(?:".concat(o.join("|"),")").concat(i),s=new RegExp("(?:^".concat(r,"$)|(?:^").concat(a,"$)")),l=new RegExp("^".concat(r,"$")),c=new RegExp("^".concat(a,"$")),u=function(w){return w&&w.exact?s:new RegExp("(?:".concat(t(w)).concat(r).concat(t(w),")|(?:").concat(t(w)).concat(a).concat(t(w),")"),"g")};u.v4=function(S){return S&&S.exact?l:new RegExp("".concat(t(S)).concat(r).concat(t(S)),"g")},u.v6=function(S){return S&&S.exact?c:new RegExp("".concat(t(S)).concat(a).concat(t(S)),"g")};var f="(?:(?:[a-z]+:)?//)",p="(?:\\S+(?::\\S*)?@)?",g=u.v4().source,h=u.v6().source,v="(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)",y="(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*",m="(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))",d="(?::\\d{2,5})?",x='(?:[/?#][^\\s"]*)?',b="(?:".concat(f,"|www\\.)").concat(p,"(?:localhost|").concat(g,"|").concat(h,"|").concat(v).concat(y).concat(m,")").concat(d).concat(x);return Qv=new RegExp("(?:^".concat(b,"$)"),"i"),Qv};var JD={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},Bd={integer:function(t){return Bd.number(t)&&parseInt(t,10)===t},float:function(t){return Bd.number(t)&&!Bd.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch{return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return ue(t)==="object"&&!Bd.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(JD.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(QD())},hex:function(t){return typeof t=="string"&&!!t.match(JD.hex)}},HV=function(t,r,n,o,i){if(t.required&&r===void 0){Yv(t,r,n,o,i);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],s=t.type;a.indexOf(s)>-1?Bd[s](r)||o.push(Gr(i.messages.types[s],t.fullField,t.type)):s&&ue(r)!==t.type&&o.push(Gr(i.messages.types[s],t.fullField,t.type))},ZD=HV;var UV=function(t,r,n,o,i){(/^\s+$/.test(r)||r==="")&&o.push(Gr(i.messages.whitespace,t.fullField))},eA=UV;var ot={required:Yv,whitespace:eA,type:ZD,range:YD,enum:KD,pattern:XD};var qV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r)&&!t.required)return n();ot.required(t,r,o,a,i)}n(a)},tA=qV;var GV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(r==null&&!t.required)return n();ot.required(t,r,o,a,i,"array"),r!=null&&(ot.type(t,r,o,a,i),ot.range(t,r,o,a,i))}n(a)},rA=GV;var KV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot.type(t,r,o,a,i)}n(a)},nA=KV;var XV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r,"date")&&!t.required)return n();if(ot.required(t,r,o,a,i),!Dt(r,"date")){var l;r instanceof Date?l=r:l=new Date(r),ot.type(t,l,o,a,i),l&&ot.range(t,l.getTime(),o,a,i)}}n(a)},oA=XV;var YV="enum",QV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot[YV](t,r,o,a,i)}n(a)},iA=QV;var JV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&(ot.type(t,r,o,a,i),ot.range(t,r,o,a,i))}n(a)},aA=JV;var ZV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&(ot.type(t,r,o,a,i),ot.range(t,r,o,a,i))}n(a)},sA=ZV;var eH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot.type(t,r,o,a,i)}n(a)},lA=eH;var tH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(r===""&&(r=void 0),Dt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&(ot.type(t,r,o,a,i),ot.range(t,r,o,a,i))}n(a)},cA=tH;var rH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot.type(t,r,o,a,i)}n(a)},uA=rH;var nH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r,"string")&&!t.required)return n();ot.required(t,r,o,a,i),Dt(r,"string")||ot.pattern(t,r,o,a,i)}n(a)},fA=nH;var oH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r)&&!t.required)return n();ot.required(t,r,o,a,i),Dt(r)||ot.type(t,r,o,a,i)}n(a)},dA=oH;var iH=function(t,r,n,o,i){var a=[],s=Array.isArray(r)?"array":ue(r);ot.required(t,r,o,a,i,s),n(a)},pA=iH;var aH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(Dt(r,"string")&&!t.required)return n();ot.required(t,r,o,a,i,"string"),Dt(r,"string")||(ot.type(t,r,o,a,i),ot.range(t,r,o,a,i),ot.pattern(t,r,o,a,i),t.whitespace===!0&&ot.whitespace(t,r,o,a,i))}n(a)},mA=aH;var sH=function(t,r,n,o,i){var a=t.type,s=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(Dt(r,a)&&!t.required)return n();ot.required(t,r,o,s,i,a),Dt(r,a)||ot.type(t,r,o,s,i)}n(s)},Jv=sH;var yu={string:mA,method:lA,number:cA,boolean:nA,regexp:dA,integer:sA,float:aA,array:rA,object:uA,enum:iA,pattern:fA,date:oA,url:Jv,hex:Jv,email:Jv,required:pA,any:tA};var jd=function(){function e(t){it(this,e),_(this,"rules",null),_(this,"_messages",Gv),this.define(t)}return at(e,[{key:"define",value:function(r){var n=this;if(!r)throw new Error("Cannot configure a schema with no rules");if(ue(r)!=="object"||Array.isArray(r))throw new Error("Rules must be an object");this.rules={},Object.keys(r).forEach(function(o){var i=r[o];n.rules[o]=Array.isArray(i)?i:[i]})}},{key:"messages",value:function(r){return r&&(this._messages=Ww(qv(),r)),this._messages}},{key:"validate",value:function(r){var n=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:function(){},a=r,s=o,l=i;if(typeof s=="function"&&(l=s,s={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(null,a),Promise.resolve(a);function c(h){var v=[],y={};function m(x){if(Array.isArray(x)){var b;v=(b=v).concat.apply(b,te(x))}else v.push(x)}for(var d=0;d0&&arguments[0]!==void 0?arguments[0]:[],R=Array.isArray(C)?C:[C];!s.suppressWarning&&R.length&&e.warning("async-validator:",R),R.length&&y.message!==void 0&&(R=[].concat(y.message));var P=R.map(zw(y,a));if(s.first&&P.length)return g[y.field]=1,v(P);if(!m)v(P);else{if(y.required&&!h.value)return y.message!==void 0?P=[].concat(y.message).map(zw(y,a)):s.error&&(P=[s.error(y,Gr(s.messages.required,y.field))]),v(P);var O={};y.defaultField&&Object.keys(h.value).map(function(M){O[M]=y.defaultField}),O=T(T({},O),h.rule.fields);var A={};Object.keys(O).forEach(function(M){var H=O[M],L=Array.isArray(H)?H:[H];A[M]=L.map(d.bind(null,M))});var F=new e(A);F.messages(s.messages),h.rule.options&&(h.rule.options.messages=s.messages,h.rule.options.error=s.error),F.validate(h.value,h.rule.options||s,function(M){var H=[];P&&P.length&&H.push.apply(H,te(P)),M&&M.length&&H.push.apply(H,te(M)),v(H.length?H:null)})}}var b;if(y.asyncValidator)b=y.asyncValidator(y,h.value,x,h.source,s);else if(y.validator){try{b=y.validator(y,h.value,x,h.source,s)}catch(C){var S,w;(S=(w=console).error)===null||S===void 0||S.call(w,C),s.suppressValidatorError||setTimeout(function(){throw C},0),x(C.message)}b===!0?x():b===!1?x(typeof y.message=="function"?y.message(y.fullField||y.field):y.message||"".concat(y.fullField||y.field," fails")):b instanceof Array?x(b):b instanceof Error&&x(b.message)}b&&b.then&&b.then(function(){return x()},function(C){return x(C)})},function(h){c(h)},a)}},{key:"getType",value:function(r){if(r.type===void 0&&r.pattern instanceof RegExp&&(r.type="pattern"),typeof r.validator!="function"&&r.type&&!yu.hasOwnProperty(r.type))throw new Error(Gr("Unknown rule type %s",r.type));return r.type||"string"}},{key:"getValidationMethod",value:function(r){if(typeof r.validator=="function")return r.validator;var n=Object.keys(r),o=n.indexOf("message");return o!==-1&&n.splice(o,1),n.length===1&&n[0]==="required"?yu.required:yu[this.getType(r)]||void 0}}]),e}();_(jd,"register",function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");yu[t]=r});_(jd,"warning",qD);_(jd,"messages",Gv);_(jd,"validators",yu);var gA=jd;var ey=E($());var Ro="'${name}' is not a valid ${type}",Zv={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:Ro,method:Ro,array:Ro,object:Ro,number:Ro,date:Ro,boolean:Ro,integer:Ro,float:Ro,regexp:Ro,email:Ro,url:Ro,hex:Ro},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};var hA=gA;function lH(e,t){return e.replace(/\\?\$\{\w+\}/g,function(r){if(r.startsWith("\\"))return r.slice(1);var n=r.slice(2,-1);return t[n]})}var vA="CODE_LOGIC_ERROR";function Bw(e,t,r,n,o){return jw.apply(this,arguments)}function jw(){return jw=ln(kt().mark(function e(t,r,n,o,i){var a,s,l,c,u,f,p,g,h;return kt().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return a=T({},n),delete a.ruleIndex,hA.warning=function(){},a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(m){return console.error(m),Promise.reject(vA)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new hA(_({},t,[a])),u=Sa(Zv,o.validateMessages),c.messages(u),f=[],y.prev=10,y.next=13,Promise.resolve(c.validate(_({},t,r),T({},o)));case 13:y.next=18;break;case 15:y.prev=15,y.t0=y.catch(10),y.t0.errors&&(f=y.t0.errors.map(function(m,d){var x=m.message,b=x===vA?u.default:x;return ey.isValidElement(b)?ey.cloneElement(b,{key:"error_".concat(d)}):b}));case 18:if(!(!f.length&&l)){y.next=23;break}return y.next=21,Promise.all(r.map(function(m,d){return Bw("".concat(t,".").concat(d),m,l,o,i)}));case 21:return p=y.sent,y.abrupt("return",p.reduce(function(m,d){return[].concat(te(m),te(d))},[]));case 23:return g=T(T({},n),{},{name:t,enum:(n.enum||[]).join(", ")},i),h=f.map(function(m){return typeof m=="string"?lH(m,g):m}),y.abrupt("return",h);case 26:case"end":return y.stop()}},e,null,[[10,15]])})),jw.apply(this,arguments)}function yA(e,t,r,n,o,i){var a=e.join("."),s=r.map(function(u,f){var p=u.validator,g=T(T({},u),{},{ruleIndex:f});return p&&(g.validator=function(h,v,y){var m=!1,d=function(){for(var S=arguments.length,w=new Array(S),C=0;C2&&arguments[2]!==void 0?arguments[2]:!1;return e&&e.some(function(n){return qw(t,n,r)})}function qw(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return!e||!t||!r&&e.length!==t.length?!1:t.every(function(n,o){return e[o]===n})}function xA(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||ue(e)!=="object"||ue(t)!=="object")return!1;var r=Object.keys(e),n=Object.keys(t),o=new Set([].concat(r,n));return te(o).every(function(i){var a=e[i],s=t[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function bA(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&ue(t.target)==="object"&&e in t.target?t.target[e]:t}function Gw(e,t,r){var n=e.length;if(t<0||t>=n||r<0||r>=n)return e;var o=e[t],i=t-r;return i>0?[].concat(te(e.slice(0,r)),[o],te(e.slice(r,t)),te(e.slice(t+1,n))):i<0?[].concat(te(e.slice(0,t)),te(e.slice(t+1,r+1)),[o],te(e.slice(r+1,n))):e}var fH=["name"],Jo=[];function Kw(e,t,r,n,o,i){return typeof e=="function"?e(t,r,"source"in i?{source:i.source}:{}):n!==o}var Xw=function(e){Ir(r,e);var t=$r(r);function r(n){var o;if(it(this,r),o=t.call(this,n),_(Ze(o),"state",{resetCount:0}),_(Ze(o),"cancelRegisterFunc",null),_(Ze(o),"mounted",!1),_(Ze(o),"touched",!1),_(Ze(o),"dirty",!1),_(Ze(o),"validatePromise",void 0),_(Ze(o),"prevValidating",void 0),_(Ze(o),"errors",Jo),_(Ze(o),"warnings",Jo),_(Ze(o),"cancelRegister",function(){var l=o.props,c=l.preserve,u=l.isListField,f=l.name;o.cancelRegisterFunc&&o.cancelRegisterFunc(u,c,cr(f)),o.cancelRegisterFunc=null}),_(Ze(o),"getNamePath",function(){var l=o.props,c=l.name,u=l.fieldContext,f=u.prefixName,p=f===void 0?[]:f;return c!==void 0?[].concat(te(p),te(c)):[]}),_(Ze(o),"getRules",function(){var l=o.props,c=l.rules,u=c===void 0?[]:c,f=l.fieldContext;return u.map(function(p){return typeof p=="function"?p(f):p})}),_(Ze(o),"refresh",function(){o.mounted&&o.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),_(Ze(o),"metaCache",null),_(Ze(o),"triggerMetaEvent",function(l){var c=o.props.onMetaChange;if(c){var u=T(T({},o.getMeta()),{},{destroy:l});Cs(o.metaCache,u)||c(u),o.metaCache=u}else o.metaCache=null}),_(Ze(o),"onStoreChange",function(l,c,u){var f=o.props,p=f.shouldUpdate,g=f.dependencies,h=g===void 0?[]:g,v=f.onReset,y=u.store,m=o.getNamePath(),d=o.getValue(l),x=o.getValue(y),b=c&&Fs(c,m);switch(u.type==="valueUpdate"&&u.source==="external"&&!Cs(d,x)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Jo,o.warnings=Jo,o.triggerMetaEvent()),u.type){case"reset":if(!c||b){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Jo,o.warnings=Jo,o.triggerMetaEvent(),v?.(),o.refresh();return}break;case"remove":{if(p&&Kw(p,l,y,d,x,u)){o.reRender();return}break}case"setField":{var S=u.data;if(b){"touched"in S&&(o.touched=S.touched),"validating"in S&&!("originRCField"in S)&&(o.validatePromise=S.validating?Promise.resolve([]):null),"errors"in S&&(o.errors=S.errors||Jo),"warnings"in S&&(o.warnings=S.warnings||Jo),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in S&&Fs(c,m,!0)){o.reRender();return}if(p&&!m.length&&Kw(p,l,y,d,x,u)){o.reRender();return}break}case"dependenciesUpdate":{var w=h.map(cr);if(w.some(function(C){return Fs(u.relatedFields,C)})){o.reRender();return}break}default:if(b||(!h.length||m.length||p)&&Kw(p,l,y,d,x,u)){o.reRender();return}break}p===!0&&o.reRender()}),_(Ze(o),"validateRules",function(l){var c=o.getNamePath(),u=o.getValue(),f=l||{},p=f.triggerName,g=f.validateOnly,h=g===void 0?!1:g,v=Promise.resolve().then(ln(kt().mark(function y(){var m,d,x,b,S,w,C;return kt().wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(o.mounted){P.next=2;break}return P.abrupt("return",[]);case 2:if(m=o.props,d=m.validateFirst,x=d===void 0?!1:d,b=m.messageVariables,S=m.validateDebounce,w=o.getRules(),p&&(w=w.filter(function(O){return O}).filter(function(O){var A=O.validateTrigger;if(!A)return!0;var F=Wd(A);return F.includes(p)})),!(S&&p)){P.next=10;break}return P.next=8,new Promise(function(O){setTimeout(O,S)});case 8:if(o.validatePromise===v){P.next=10;break}return P.abrupt("return",[]);case 10:return C=yA(c,u,w,l,x,b),C.catch(function(O){return O}).then(function(){var O=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jo;if(o.validatePromise===v){var A;o.validatePromise=null;var F=[],M=[];(A=O.forEach)===null||A===void 0||A.call(O,function(H){var L=H.rule.warningOnly,N=H.errors,I=N===void 0?Jo:N;L?M.push.apply(M,te(I)):F.push.apply(F,te(I))}),o.errors=F,o.warnings=M,o.triggerMetaEvent(),o.reRender()}}),P.abrupt("return",C);case 13:case"end":return P.stop()}},y)})));return h||(o.validatePromise=v,o.dirty=!0,o.errors=Jo,o.warnings=Jo,o.triggerMetaEvent(),o.reRender()),v}),_(Ze(o),"isFieldValidating",function(){return!!o.validatePromise}),_(Ze(o),"isFieldTouched",function(){return o.touched}),_(Ze(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var l=o.props.fieldContext,c=l.getInternalHooks(Oi),u=c.getInitialValue;return u(o.getNamePath())!==void 0}),_(Ze(o),"getErrors",function(){return o.errors}),_(Ze(o),"getWarnings",function(){return o.warnings}),_(Ze(o),"isListField",function(){return o.props.isListField}),_(Ze(o),"isList",function(){return o.props.isList}),_(Ze(o),"isPreserve",function(){return o.props.preserve}),_(Ze(o),"getMeta",function(){o.prevValidating=o.isFieldValidating();var l={touched:o.isFieldTouched(),validating:o.prevValidating,errors:o.errors,warnings:o.warnings,name:o.getNamePath(),validated:o.validatePromise===null};return l}),_(Ze(o),"getOnlyChild",function(l){if(typeof l=="function"){var c=o.getMeta();return T(T({},o.getOnlyChild(l(o.getControlled(),c,o.props.fieldContext))),{},{isFunction:!0})}var u=yi(l);return u.length!==1||!Gn.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),_(Ze(o),"getValue",function(l){var c=o.props.fieldContext.getFieldsValue,u=o.getNamePath();return xn(l||c(!0),u)}),_(Ze(o),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=o.props,u=c.name,f=c.trigger,p=c.validateTrigger,g=c.getValueFromEvent,h=c.normalize,v=c.valuePropName,y=c.getValueProps,m=c.fieldContext,d=p!==void 0?p:m.validateTrigger,x=o.getNamePath(),b=m.getInternalHooks,S=m.getFieldsValue,w=b(Oi),C=w.dispatch,R=o.getValue(),P=y||function(H){return _({},v,H)},O=l[f],A=u!==void 0?P(R):{},F=T(T({},l),A);F[f]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var H,L=arguments.length,N=new Array(L),I=0;I=0&&O<=A.length?(u.keys=[].concat(te(u.keys.slice(0,O)),[u.id],te(u.keys.slice(O))),x([].concat(te(A.slice(0,O)),[P],te(A.slice(O))))):(u.keys=[].concat(te(u.keys),[u.id]),x([].concat(te(A),[P]))),u.id+=1},remove:function(P){var O=S(),A=new Set(Array.isArray(P)?P:[P]);A.size<=0||(u.keys=u.keys.filter(function(F,M){return!A.has(M)}),x(O.filter(function(F,M){return!A.has(M)})))},move:function(P,O){if(P!==O){var A=S();P<0||P>=A.length||O<0||O>=A.length||(u.keys=Gw(u.keys,P,O),x(Gw(A,P,O)))}}},C=d||[];return Array.isArray(C)||(C=[]),n(C.map(function(R,P){var O=u.keys[P];return O===void 0&&(u.keys[P]=u.id,O=u.keys[P],u.id+=1),{name:P,key:O,isListField:!0}}),w,y)})))}var SA=pH;var ry=E($());function CA(e){var t=!1,r=e.length,n=[];return e.length?new Promise(function(o,i){e.forEach(function(a,s){a.catch(function(l){return t=!0,l}).then(function(l){r-=1,n[s]=l,!(r>0)&&(t&&i(n),o(n))})})}):Promise.resolve([])}var wA="__@field_split__";function Yw(e){return e.map(function(t){return"".concat(ue(t),":").concat(t)}).join(wA)}var mH=function(){function e(){it(this,e),_(this,"kvs",new Map)}return at(e,[{key:"set",value:function(r,n){this.kvs.set(Yw(r),n)}},{key:"get",value:function(r){return this.kvs.get(Yw(r))}},{key:"update",value:function(r,n){var o=this.get(r),i=n(o);i?this.set(r,i):this.delete(r)}},{key:"delete",value:function(r){this.kvs.delete(Yw(r))}},{key:"map",value:function(r){return te(this.kvs.entries()).map(function(n){var o=B(n,2),i=o[0],a=o[1],s=i.split(wA);return r({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=B(c,3),f=u[1],p=u[2];return f==="number"?Number(p):p}),value:a})})}},{key:"toJSON",value:function(){var r={};return this.map(function(n){var o=n.key,i=n.value;return r[o.join(".")]=i,null}),r}}]),e}(),Fl=mH;var gH=["name"],hH=at(function e(t){var r=this;it(this,e),_(this,"formHooked",!1),_(this,"forceRootUpdate",void 0),_(this,"subscribable",!0),_(this,"store",{}),_(this,"fieldEntities",[]),_(this,"initialValues",{}),_(this,"callbacks",{}),_(this,"validateMessages",null),_(this,"preserve",null),_(this,"lastValidatePromise",null),_(this,"getForm",function(){return{getFieldValue:r.getFieldValue,getFieldsValue:r.getFieldsValue,getFieldError:r.getFieldError,getFieldWarning:r.getFieldWarning,getFieldsError:r.getFieldsError,isFieldsTouched:r.isFieldsTouched,isFieldTouched:r.isFieldTouched,isFieldValidating:r.isFieldValidating,isFieldsValidating:r.isFieldsValidating,resetFields:r.resetFields,setFields:r.setFields,setFieldValue:r.setFieldValue,setFieldsValue:r.setFieldsValue,validateFields:r.validateFields,submit:r.submit,_init:!0,getInternalHooks:r.getInternalHooks}}),_(this,"getInternalHooks",function(n){return n===Oi?(r.formHooked=!0,{dispatch:r.dispatch,initEntityValue:r.initEntityValue,registerField:r.registerField,useSubscribe:r.useSubscribe,setInitialValues:r.setInitialValues,destroyForm:r.destroyForm,setCallbacks:r.setCallbacks,setValidateMessages:r.setValidateMessages,getFields:r.getFields,setPreserve:r.setPreserve,getInitialValue:r.getInitialValue,registerWatch:r.registerWatch}):(Vt(!1,"`getInternalHooks` is internal usage. Should not call directly."),null)}),_(this,"useSubscribe",function(n){r.subscribable=n}),_(this,"prevWithoutPreserves",null),_(this,"setInitialValues",function(n,o){if(r.initialValues=n||{},o){var i,a=Sa(n,r.store);(i=r.prevWithoutPreserves)===null||i===void 0||i.map(function(s){var l=s.key;a=qn(a,l,xn(n,l))}),r.prevWithoutPreserves=null,r.updateStore(a)}}),_(this,"destroyForm",function(n){if(n)r.updateStore({});else{var o=new Fl;r.getFieldEntities(!0).forEach(function(i){r.isMergedPreserve(i.isPreserve())||o.set(i.getNamePath(),!0)}),r.prevWithoutPreserves=o}}),_(this,"getInitialValue",function(n){var o=xn(r.initialValues,n);return n.length?Sa(o):o}),_(this,"setCallbacks",function(n){r.callbacks=n}),_(this,"setValidateMessages",function(n){r.validateMessages=n}),_(this,"setPreserve",function(n){r.preserve=n}),_(this,"watchList",[]),_(this,"registerWatch",function(n){return r.watchList.push(n),function(){r.watchList=r.watchList.filter(function(o){return o!==n})}}),_(this,"notifyWatch",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];if(r.watchList.length){var o=r.getFieldsValue(),i=r.getFieldsValue(!0);r.watchList.forEach(function(a){a(o,i,n)})}}),_(this,"timeoutId",null),_(this,"warningUnhooked",function(){}),_(this,"updateStore",function(n){r.store=n}),_(this,"getFieldEntities",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return n?r.fieldEntities.filter(function(o){return o.getNamePath().length}):r.fieldEntities}),_(this,"getFieldsMap",function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,o=new Fl;return r.getFieldEntities(n).forEach(function(i){var a=i.getNamePath();o.set(a,i)}),o}),_(this,"getFieldEntitiesForNamePathList",function(n){if(!n)return r.getFieldEntities(!0);var o=r.getFieldsMap(!0);return n.map(function(i){var a=cr(i);return o.get(a)||{INVALIDATE_NAME_PATH:cr(i)}})}),_(this,"getFieldsValue",function(n,o){r.warningUnhooked();var i,a,s;if(n===!0||Array.isArray(n)?(i=n,a=o):n&&ue(n)==="object"&&(s=n.strict,a=n.filter),i===!0&&!a)return r.store;var l=r.getFieldEntitiesForNamePathList(Array.isArray(i)?i:null),c=[];return l.forEach(function(u){var f,p,g="INVALIDATE_NAME_PATH"in u?u.INVALIDATE_NAME_PATH:u.getNamePath();if(s){var h,v;if((h=(v=u).isList)!==null&&h!==void 0&&h.call(v))return}else if(!i&&(f=(p=u).isListField)!==null&&f!==void 0&&f.call(p))return;if(!a)c.push(g);else{var y="getMeta"in u?u.getMeta():null;a(y)&&c.push(g)}}),Uw(r.store,c.map(cr))}),_(this,"getFieldValue",function(n){r.warningUnhooked();var o=cr(n);return xn(r.store,o)}),_(this,"getFieldsError",function(n){r.warningUnhooked();var o=r.getFieldEntitiesForNamePathList(n);return o.map(function(i,a){return i&&!("INVALIDATE_NAME_PATH"in i)?{name:i.getNamePath(),errors:i.getErrors(),warnings:i.getWarnings()}:{name:cr(n[a]),errors:[],warnings:[]}})}),_(this,"getFieldError",function(n){r.warningUnhooked();var o=cr(n),i=r.getFieldsError([o])[0];return i.errors}),_(this,"getFieldWarning",function(n){r.warningUnhooked();var o=cr(n),i=r.getFieldsError([o])[0];return i.warnings}),_(this,"isFieldsTouched",function(){r.warningUnhooked();for(var n=arguments.length,o=new Array(n),i=0;i0&&arguments[0]!==void 0?arguments[0]:{},o=new Fl,i=r.getFieldEntities(!0);i.forEach(function(l){var c=l.props.initialValue,u=l.getNamePath();if(c!==void 0){var f=o.get(u)||new Set;f.add({entity:l,value:c}),o.set(u,f)}});var a=function(c){c.forEach(function(u){var f=u.props.initialValue;if(f!==void 0){var p=u.getNamePath(),g=r.getInitialValue(p);if(g!==void 0)Vt(!1,"Form already set 'initialValues' with path '".concat(p.join("."),"'. Field can not overwrite it."));else{var h=o.get(p);if(h&&h.size>1)Vt(!1,"Multiple Field with path '".concat(p.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var v=r.getFieldValue(p),y=u.isListField();!y&&(!n.skipExist||v===void 0)&&r.updateStore(qn(r.store,p,te(h)[0].value))}}}})},s;n.entities?s=n.entities:n.namePathList?(s=[],n.namePathList.forEach(function(l){var c=o.get(l);if(c){var u;(u=s).push.apply(u,te(te(c).map(function(f){return f.entity})))}})):s=i,a(s)}),_(this,"resetFields",function(n){r.warningUnhooked();var o=r.store;if(!n){r.updateStore(Sa(r.initialValues)),r.resetWithFieldInitialValue(),r.notifyObservers(o,null,{type:"reset"}),r.notifyWatch();return}var i=n.map(cr);i.forEach(function(a){var s=r.getInitialValue(a);r.updateStore(qn(r.store,a,s))}),r.resetWithFieldInitialValue({namePathList:i}),r.notifyObservers(o,i,{type:"reset"}),r.notifyWatch(i)}),_(this,"setFields",function(n){r.warningUnhooked();var o=r.store,i=[];n.forEach(function(a){var s=a.name,l=Ve(a,gH),c=cr(s);i.push(c),"value"in l&&r.updateStore(qn(r.store,c,l.value)),r.notifyObservers(o,[c],{type:"setField",data:a})}),r.notifyWatch(i)}),_(this,"getFields",function(){var n=r.getFieldEntities(!0),o=n.map(function(i){var a=i.getNamePath(),s=i.getMeta(),l=T(T({},s),{},{name:a,value:r.getFieldValue(a)});return Object.defineProperty(l,"originRCField",{value:!0}),l});return o}),_(this,"initEntityValue",function(n){var o=n.props.initialValue;if(o!==void 0){var i=n.getNamePath(),a=xn(r.store,i);a===void 0&&r.updateStore(qn(r.store,i,o))}}),_(this,"isMergedPreserve",function(n){var o=n!==void 0?n:r.preserve;return o??!0}),_(this,"registerField",function(n){r.fieldEntities.push(n);var o=n.getNamePath();if(r.notifyWatch([o]),n.props.initialValue!==void 0){var i=r.store;r.resetWithFieldInitialValue({entities:[n],skipExist:!0}),r.notifyObservers(i,[n.getNamePath()],{type:"valueUpdate",source:"internal"})}return function(a,s){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[];if(r.fieldEntities=r.fieldEntities.filter(function(f){return f!==n}),!r.isMergedPreserve(s)&&(!a||l.length>1)){var c=a?void 0:r.getInitialValue(o);if(o.length&&r.getFieldValue(o)!==c&&r.fieldEntities.every(function(f){return!qw(f.getNamePath(),o)})){var u=r.store;r.updateStore(qn(u,o,c,!0)),r.notifyObservers(u,[o],{type:"remove"}),r.triggerDependenciesUpdate(u,o)}}r.notifyWatch([o])}}),_(this,"dispatch",function(n){switch(n.type){case"updateValue":{var o=n.namePath,i=n.value;r.updateValue(o,i);break}case"validateField":{var a=n.namePath,s=n.triggerName;r.validateFields([a],{triggerName:s});break}default:}}),_(this,"notifyObservers",function(n,o,i){if(r.subscribable){var a=T(T({},i),{},{store:r.getFieldsValue(!0)});r.getFieldEntities().forEach(function(s){var l=s.onStoreChange;l(n,o,a)})}else r.forceRootUpdate()}),_(this,"triggerDependenciesUpdate",function(n,o){var i=r.getDependencyChildrenFields(o);return i.length&&r.validateFields(i),r.notifyObservers(n,i,{type:"dependenciesUpdate",relatedFields:[o].concat(te(i))}),i}),_(this,"updateValue",function(n,o){var i=cr(n),a=r.store;r.updateStore(qn(r.store,i,o)),r.notifyObservers(a,[i],{type:"valueUpdate",source:"internal"}),r.notifyWatch([i]);var s=r.triggerDependenciesUpdate(a,i),l=r.callbacks.onValuesChange;if(l){var c=Uw(r.store,[i]);l(c,r.getFieldsValue())}r.triggerOnFieldsChange([i].concat(te(s)))}),_(this,"setFieldsValue",function(n){r.warningUnhooked();var o=r.store;if(n){var i=Sa(r.store,n);r.updateStore(i)}r.notifyObservers(o,null,{type:"valueUpdate",source:"external"}),r.notifyWatch()}),_(this,"setFieldValue",function(n,o){r.setFields([{name:n,value:o,errors:[],warnings:[]}])}),_(this,"getDependencyChildrenFields",function(n){var o=new Set,i=[],a=new Fl;r.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var f=cr(u);a.update(f,function(){var p=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return p.add(l),p})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(f){if(!o.has(f)){o.add(f);var p=f.getNamePath();f.isFieldDirty()&&p.length&&(i.push(p),l(p))}})};return s(n),i}),_(this,"triggerOnFieldsChange",function(n,o){var i=r.callbacks.onFieldsChange;if(i){var a=r.getFields();if(o){var s=new Fl;o.forEach(function(c){var u=c.name,f=c.errors;s.set(u,f)}),a.forEach(function(c){c.errors=s.get(c.name)||c.errors})}var l=a.filter(function(c){var u=c.name;return Fs(n,u)});l.length&&i(l,a)}}),_(this,"validateFields",function(n,o){r.warningUnhooked();var i,a;Array.isArray(n)||typeof n=="string"||typeof o=="string"?(i=n,a=o):a=n;var s=!!i,l=s?i.map(cr):[],c=[],u=String(Date.now()),f=new Set,p=a||{},g=p.recursive,h=p.dirty;r.getFieldEntities(!0).forEach(function(d){if(s||l.push(d.getNamePath()),!(!d.props.rules||!d.props.rules.length)&&!(h&&!d.isFieldDirty())){var x=d.getNamePath();if(f.add(x.join(u)),!s||Fs(l,x,g)){var b=d.validateRules(T({validateMessages:T(T({},Zv),r.validateMessages)},a));c.push(b.then(function(){return{name:x,errors:[],warnings:[]}}).catch(function(S){var w,C=[],R=[];return(w=S.forEach)===null||w===void 0||w.call(S,function(P){var O=P.rule.warningOnly,A=P.errors;O?R.push.apply(R,te(A)):C.push.apply(C,te(A))}),C.length?Promise.reject({name:x,errors:C,warnings:R}):{name:x,errors:C,warnings:R}}))}}});var v=CA(c);r.lastValidatePromise=v,v.catch(function(d){return d}).then(function(d){var x=d.map(function(b){var S=b.name;return S});r.notifyObservers(r.store,x,{type:"validateFinish"}),r.triggerOnFieldsChange(x,d)});var y=v.then(function(){return r.lastValidatePromise===v?Promise.resolve(r.getFieldsValue(l)):Promise.reject([])}).catch(function(d){var x=d.filter(function(b){return b&&b.errors.length});return Promise.reject({values:r.getFieldsValue(l),errorFields:x,outOfDate:r.lastValidatePromise!==v})});y.catch(function(d){return d});var m=l.filter(function(d){return f.has(d.join(u))});return r.triggerOnFieldsChange(m),y}),_(this,"submit",function(){r.warningUnhooked(),r.validateFields().then(function(n){var o=r.callbacks.onFinish;if(o)try{o(n)}catch(i){console.error(i)}}).catch(function(n){var o=r.callbacks.onFinishFailed;o&&o(n)})}),this.forceRootUpdate=t});function vH(e){var t=ry.useRef(),r=ry.useState({}),n=B(r,2),o=n[1];if(!t.current)if(e)t.current=e;else{var i=function(){o({})},a=new hH(i);t.current=a.getForm()}return[t.current]}var ny=vH;var un=E($());var Ls=E($()),Qw=Ls.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Jw=function(t){var r=t.validateMessages,n=t.onFormChange,o=t.onFormFinish,i=t.children,a=Ls.useContext(Qw),s=Ls.useRef({});return Ls.createElement(Qw.Provider,{value:T(T({},a),{},{validateMessages:T(T({},a.validateMessages),r),triggerFormChange:function(c,u){n&&n(c,{changedFields:u,forms:s.current}),a.triggerFormChange(c,u)},triggerFormFinish:function(c,u){o&&o(c,{values:u,forms:s.current}),a.triggerFormFinish(c,u)},registerForm:function(c,u){c&&(s.current=T(T({},s.current),{},_({},c,u))),a.registerForm(c,u)},unregisterForm:function(c){var u=T({},s.current);delete u[c],s.current=u,a.unregisterForm(c)}})},i)};var EA=Qw;var yH=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],xH=function(t,r){var n=t.name,o=t.initialValues,i=t.fields,a=t.form,s=t.preserve,l=t.children,c=t.component,u=c===void 0?"form":c,f=t.validateMessages,p=t.validateTrigger,g=p===void 0?"onChange":p,h=t.onValuesChange,v=t.onFieldsChange,y=t.onFinish,m=t.onFinishFailed,d=t.clearOnDestroy,x=Ve(t,yH),b=un.useRef(null),S=un.useContext(EA),w=ny(a),C=B(w,1),R=C[0],P=R.getInternalHooks(Oi),O=P.useSubscribe,A=P.setInitialValues,F=P.setCallbacks,M=P.setValidateMessages,H=P.setPreserve,L=P.destroyForm;un.useImperativeHandle(r,function(){return T(T({},R),{},{nativeElement:b.current})}),un.useEffect(function(){return S.registerForm(n,R),function(){S.unregisterForm(n)}},[S,R,n]),M(T(T({},S.validateMessages),f)),F({onValuesChange:h,onFieldsChange:function(k){if(S.triggerFormChange(n,k),v){for(var V=arguments.length,G=new Array(V>1?V-1:0),J=1;J{let n=Da.useContext(fn),o=Da.useMemo(()=>{let i=Object.assign({},n);return r&&delete i.isFormItemInput,t&&(delete i.status,delete i.hasFeedback,delete i.feedbackIcon),i},[t,r,n]);return Da.createElement(fn.Provider,{value:o},e)},NA=Da.createContext(void 0);var wH=e=>{let{space:t,form:r,children:n}=e;if(n==null)return null;let o=n;return r&&(o=Zw.default.createElement(TA,{override:!0,status:!0},o)),t&&(o=Zw.default.createElement(D$,null,o)),o},zs=wH;var so=E($());function EH(e){return t=>so.createElement(Na,{theme:{token:{motion:!1,zIndexPopupBase:0}}},so.createElement(e,Object.assign({},t)))}var RH=(e,t,r,n,o)=>EH(a=>{let{prefixCls:s,style:l}=a,c=so.useRef(null),[u,f]=so.useState(0),[p,g]=so.useState(0),[h,v]=ar(!1,{value:a.open}),{getPrefixCls:y}=so.useContext(rt),m=y(n||"select",s);so.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){let b=new ResizeObserver(w=>{let C=w[0].target;f(C.offsetHeight+8),g(C.offsetWidth)}),S=setInterval(()=>{var w;let C=o?`.${o(m)}`:`.${m}-dropdown`,R=(w=c.current)===null||w===void 0?void 0:w.querySelector(C);R&&(clearInterval(S),b.observe(R))},10);return()=>{clearInterval(S),b.disconnect()}}},[]);let d=Object.assign(Object.assign({},a),{style:Object.assign(Object.assign({},l),{margin:0}),open:h,visible:h,getPopupContainer:()=>c.current});return r&&(d=r(d)),t&&Object.assign(d,{[t]:{overflow:{adjustX:!1,adjustY:!1}}}),so.createElement("div",{ref:c,style:{paddingBottom:u,position:"relative",minWidth:p}},so.createElement(e,Object.assign({},d)))}),IA=RH;var ni=E($()),U1=E(Ne());var fr=E($());var x1=E(Ne());var xu=function(){if(typeof navigator>"u"||typeof window>"u")return!1;var e=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e?.substr(0,4))};var bt=E($());var e1=E($()),$A=E(Ne()),OH=function(t){var r=t.className,n=t.customizeIcon,o=t.customizeIconProps,i=t.children,a=t.onMouseDown,s=t.onClick,l=typeof n=="function"?n(o):n;return e1.createElement("span",{className:r,onMouseDown:function(u){u.preventDefault(),a?.(u)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:s,"aria-hidden":!0},l!==void 0?l:e1.createElement("span",{className:(0,$A.default)(r.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},Ws=OH;var oy=E($()),DA=function(t,r,n,o,i){var a=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,s=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,c=oy.default.useMemo(function(){if(ue(o)==="object")return o.clearIcon;if(i)return i},[o,i]),u=oy.default.useMemo(function(){return!!(!a&&o&&(n.length||s)&&!(l==="combobox"&&s===""))},[o,a,n.length,s,l]);return{allowClear:u,clearIcon:oy.default.createElement(Ws,{className:"".concat(t,"-clear"),onMouseDown:r,customizeIcon:c},"\xD7")}};var iy=E($()),t1=iy.createContext(null);function ay(){return iy.useContext(t1)}var bu=E($());function r1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=bu.useState(!1),r=B(t,2),n=r[0],o=r[1],i=bu.useRef(null),a=function(){window.clearTimeout(i.current)};bu.useEffect(function(){return a},[]);var s=function(c,u){a(),i.current=window.setTimeout(function(){o(c),u&&u()},e)};return[n,s,a]}var Hd=E($());function Ud(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=Hd.useRef(null),r=Hd.useRef(null);Hd.useEffect(function(){return function(){window.clearTimeout(r.current)}},[]);function n(o){(o||t.current===null)&&(t.current=o),window.clearTimeout(r.current),r.current=window.setTimeout(function(){t.current=null},e)}return[function(){return t.current},n]}var sy=E($());function n1(e,t,r,n){var o=sy.useRef(null);o.current={open:t,triggerOpen:r,customizedTrigger:n},sy.useEffect(function(){function i(a){var s;if(!((s=o.current)!==null&&s!==void 0&&s.customizedTrigger)){var l=a.target;l.shadowRoot&&a.composed&&(l=a.composedPath()[0]||l),o.current.open&&e().filter(function(c){return c}).every(function(c){return!c.contains(l)&&c!==l})&&o.current.triggerOpen(!1)}}return window.addEventListener("mousedown",i),function(){return window.removeEventListener("mousedown",i)}},[])}var Aa=E($()),dy=E($());function AA(e){return e&&![Ye.ESC,Ye.SHIFT,Ye.BACKSPACE,Ye.TAB,Ye.WIN_KEY,Ye.ALT,Ye.META,Ye.WIN_KEY_RIGHT,Ye.CTRL,Ye.SEMICOLON,Ye.EQUALS,Ye.CAPS_LOCK,Ye.CONTEXT_MENU,Ye.F1,Ye.F2,Ye.F3,Ye.F4,Ye.F5,Ye.F6,Ye.F7,Ye.F8,Ye.F9,Ye.F10,Ye.F11,Ye.F12].includes(e)}var _o=E($()),a1=E($()),tk=E(Ne());var Zo=E($()),Xi=E($()),VA=E(Ne());var Ll=E($()),kA=E(Ne());var _H=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Su=void 0;function PH(e,t){var r=e.prefixCls,n=e.invalidate,o=e.item,i=e.renderItem,a=e.responsive,s=e.responsiveDisabled,l=e.registerSize,c=e.itemKey,u=e.className,f=e.style,p=e.children,g=e.display,h=e.order,v=e.component,y=v===void 0?"div":v,m=Ve(e,_H),d=a&&!g;function x(R){l(c,R)}Ll.useEffect(function(){return function(){x(null)}},[]);var b=i&&o!==Su?i(o,{index:h}):p,S;n||(S={opacity:d?0:1,height:d?0:Su,overflowY:d?"hidden":Su,order:a?h:Su,pointerEvents:d?"none":Su,position:d?"absolute":Su});var w={};d&&(w["aria-hidden"]=!0);var C=Ll.createElement(y,fe({className:(0,kA.default)(!n&&r,u),style:T(T({},S),f)},w,m,{ref:t}),b);return a&&(C=Ll.createElement(ro,{onResize:function(P){var O=P.offsetWidth;x(O)},disabled:s},C)),C}var MA=Ll.forwardRef(PH);MA.displayName="Item";var Cu=MA;var ly=E($()),FA=E(Vi());function o1(e){if(typeof MessageChannel>"u")dt(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function LA(){var e=ly.useRef(null),t=function(n){e.current||(e.current=[],o1(function(){(0,FA.unstable_batchedUpdates)(function(){e.current.forEach(function(o){o()}),e.current=null})})),e.current.push(n)};return t}function zl(e,t){var r=ly.useState(t),n=B(r,2),o=n[0],i=n[1],a=wt(function(s){e(function(){i(s)})});return[o,a]}var Bs=E($()),WA=E(Ne());var zA=E($()),Wl=zA.default.createContext(null);var TH=["component"],NH=["className"],IH=["className"],$H=function(t,r){var n=Bs.useContext(Wl);if(!n){var o=t.component,i=o===void 0?"div":o,a=Ve(t,TH);return Bs.createElement(i,fe({},a,{ref:r}))}var s=n.className,l=Ve(n,NH),c=t.className,u=Ve(t,IH);return Bs.createElement(Wl.Provider,{value:null},Bs.createElement(Cu,fe({ref:r,className:(0,WA.default)(s,c)},l,u)))},BA=Bs.forwardRef($H);BA.displayName="RawItem";var jA=BA;var DH=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],HA="responsive",UA="invalidate";function AH(e){return"+ ".concat(e.length," ...")}function kH(e,t){var r=e.prefixCls,n=r===void 0?"rc-overflow":r,o=e.data,i=o===void 0?[]:o,a=e.renderItem,s=e.renderRawItem,l=e.itemKey,c=e.itemWidth,u=c===void 0?10:c,f=e.ssr,p=e.style,g=e.className,h=e.maxCount,v=e.renderRest,y=e.renderRawRest,m=e.suffix,d=e.component,x=d===void 0?"div":d,b=e.itemComponent,S=e.onVisibleChange,w=Ve(e,DH),C=f==="full",R=LA(),P=zl(R,null),O=B(P,2),A=O[0],F=O[1],M=A||0,H=zl(R,new Map),L=B(H,2),N=L[0],I=L[1],D=zl(R,0),U=B(D,2),z=U[0],W=U[1],q=zl(R,0),j=B(q,2),k=j[0],V=j[1],G=zl(R,0),J=B(G,2),Y=J[0],X=J[1],ae=(0,Xi.useState)(null),Z=B(ae,2),K=Z[0],Q=Z[1],re=(0,Xi.useState)(null),ee=B(re,2),ne=ee[0],de=ee[1],le=Zo.useMemo(function(){return ne===null&&C?Number.MAX_SAFE_INTEGER:ne||0},[ne,A]),pe=(0,Xi.useState)(!1),Oe=B(pe,2),Ce=Oe[0],De=Oe[1],ce="".concat(n,"-item"),ie=Math.max(z,k),Re=h===HA,Le=i.length&&Re,Ge=h===UA,Me=Le||typeof h=="number"&&i.length>h,Ie=(0,Xi.useMemo)(function(){var $e=i;return Le?A===null&&C?$e=i:$e=i.slice(0,Math.min(i.length,M/u)):typeof h=="number"&&($e=i.slice(0,h)),$e},[i,u,A,h,Le]),je=(0,Xi.useMemo)(function(){return Le?i.slice(le+1):i.slice(Ie.length)},[i,Ie,Le,le]),We=(0,Xi.useCallback)(function($e,Ee){var be;return typeof l=="function"?l($e):(be=l&&$e?.[l])!==null&&be!==void 0?be:Ee},[l]),He=(0,Xi.useCallback)(a||function($e){return $e},[a]);function ye($e,Ee,be){ne===$e&&(Ee===void 0||Ee===K)||(de($e),be||(De($eM){ye(ht-1,$e-Mt-Y+k);break}}m&&Je(0)+Y>M&&Q(null)}},[M,N,k,Y,We,Ie]);var lt=Ce&&!!je.length,Et={};K!==null&&Le&&(Et={position:"absolute",left:K,top:0});var Pt={prefixCls:ce,responsive:Le,component:b,invalidate:Ge},pt=s?function($e,Ee){var be=We($e,Ee);return Zo.createElement(Wl.Provider,{key:be,value:T(T({},Pt),{},{order:Ee,item:$e,itemKey:be,registerSize:xe,display:Ee<=le})},s($e,Ee))}:function($e,Ee){var be=We($e,Ee);return Zo.createElement(Cu,fe({},Pt,{order:Ee,key:be,item:$e,renderItem:He,itemKey:be,registerSize:xe,display:Ee<=le}))},Ae={order:lt?le:Number.MAX_SAFE_INTEGER,className:"".concat(ce,"-rest"),registerSize:_e,display:lt},we=v||AH,et=y?Zo.createElement(Wl.Provider,{value:T(T({},Pt),Ae)},y(je)):Zo.createElement(Cu,fe({},Pt,Ae),typeof we=="function"?we(je):we),Pe=Zo.createElement(x,fe({className:(0,VA.default)(!Ge&&n,g),style:p,ref:t},w),Ie.map(pt),Me?et:null,m&&Zo.createElement(Cu,fe({},Pt,{responsive:Re,responsiveDisabled:!Le,order:le,className:"".concat(ce,"-suffix"),registerSize:he,display:!0,style:Et}),m));return Re?Zo.createElement(ro,{onResize:se,disabled:!Le},Pe):Pe}var qd=Zo.forwardRef(kH);qd.displayName="Overflow";qd.Item=jA;qd.RESPONSIVE=HA;qd.INVALIDATE=UA;var qA=qd;var GA=qA;var wu=E($()),XA=E(Ne());function MH(e,t,r){var n=T(T({},e),r?t:{});return Object.keys(t).forEach(function(o){var i=t[o];typeof i=="function"&&(n[o]=function(){for(var a,s=arguments.length,l=new Array(s),c=0;cx&&(Oe="".concat(Ce.slice(0,x),"..."))}var De=function(ie){ie&&ie.stopPropagation(),R(ee)};return typeof w=="function"?X(le,Oe,ne,pe,De):Y(ee,Oe,ne,pe,De)},Z=function(ee){if(!o.length)return null;var ne=typeof S=="function"?S(ee):S;return typeof w=="function"?X(void 0,ne,!1,!1,void 0,!0):Y({title:ne},ne,!1)},K=_o.createElement("div",{className:"".concat(V,"-search"),style:{width:U},onFocus:function(){k(!0)},onBlur:function(){k(!1)}},_o.createElement(cy,{ref:l,open:i,prefixCls:n,id:r,inputElement:null,disabled:u,autoFocus:g,autoComplete:h,editable:J,activeDescendantId:v,value:G,onKeyDown:A,onMouseDown:F,onChange:P,onPaste:O,onCompositionStart:M,onCompositionEnd:H,onBlur:L,tabIndex:y,attrs:qo(t,!0)}),_o.createElement("span",{ref:N,className:"".concat(V,"-search-mirror"),"aria-hidden":!0},G,"\xA0")),Q=_o.createElement(GA,{prefixCls:"".concat(V,"-overflow"),data:o,renderItem:ae,renderRest:Z,suffix:K,itemKey:BH,maxCount:d});return _o.createElement("span",{className:"".concat(V,"-wrap")},Q,!o.length&&!G&&_o.createElement("span",{className:"".concat(V,"-placeholder")},c))},rk=jH;var ei=E($());var VH=function(t){var r=t.inputElement,n=t.prefixCls,o=t.id,i=t.inputRef,a=t.disabled,s=t.autoFocus,l=t.autoComplete,c=t.activeDescendantId,u=t.mode,f=t.open,p=t.values,g=t.placeholder,h=t.tabIndex,v=t.showSearch,y=t.searchValue,m=t.activeValue,d=t.maxLength,x=t.onInputKeyDown,b=t.onInputMouseDown,S=t.onInputChange,w=t.onInputPaste,C=t.onInputCompositionStart,R=t.onInputCompositionEnd,P=t.onInputBlur,O=t.title,A=ei.useState(!1),F=B(A,2),M=F[0],H=F[1],L=u==="combobox",N=L||v,I=p[0],D=y||"";L&&m&&!M&&(D=m),ei.useEffect(function(){L&&H(!1)},[L,m]);var U=u!=="combobox"&&!f&&!v?!1:!!D,z=O===void 0?uy(I):O,W=ei.useMemo(function(){return I?null:ei.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:U?{visibility:"hidden"}:void 0},g)},[I,U,g,n]);return ei.createElement("span",{className:"".concat(n,"-selection-wrap")},ei.createElement("span",{className:"".concat(n,"-selection-search")},ei.createElement(cy,{ref:i,prefixCls:n,id:o,open:f,inputElement:r,disabled:a,autoFocus:s,autoComplete:l,editable:N,activeDescendantId:c,value:D,onKeyDown:x,onMouseDown:b,onChange:function(j){H(!0),S(j)},onPaste:w,onCompositionStart:C,onCompositionEnd:R,onBlur:P,tabIndex:h,attrs:qo(t,!0),maxLength:L?d:void 0})),!L&&I?ei.createElement("span",{className:"".concat(n,"-selection-item"),title:z,style:U?{visibility:"hidden"}:void 0},I.label):null,W)},nk=VH;var HH=function(t,r){var n=(0,dy.useRef)(null),o=(0,dy.useRef)(!1),i=t.prefixCls,a=t.open,s=t.mode,l=t.showSearch,c=t.tokenWithEnter,u=t.disabled,f=t.prefix,p=t.autoClearSearchValue,g=t.onSearch,h=t.onSearchSubmit,v=t.onToggleOpen,y=t.onInputKeyDown,m=t.onInputBlur,d=t.domRef;Aa.useImperativeHandle(r,function(){return{focus:function(z){n.current.focus(z)},blur:function(){n.current.blur()}}});var x=Ud(0),b=B(x,2),S=b[0],w=b[1],C=function(z){var W=z.which,q=n.current instanceof HTMLTextAreaElement;!q&&a&&(W===Ye.UP||W===Ye.DOWN)&&z.preventDefault(),y&&y(z),W===Ye.ENTER&&s==="tags"&&!o.current&&!a&&h?.(z.target.value),!(q&&!a&&~[Ye.UP,Ye.DOWN,Ye.LEFT,Ye.RIGHT].indexOf(W))&&AA(W)&&v(!0)},R=function(){w(!0)},P=(0,dy.useRef)(null),O=function(z){g(z,!0,o.current)!==!1&&v(!0)},A=function(){o.current=!0},F=function(z){o.current=!1,s!=="combobox"&&O(z.target.value)},M=function(z){var W=z.target.value;if(c&&P.current&&/[\r\n]/.test(P.current)){var q=P.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");W=W.replace(q,P.current)}P.current=null,O(W)},H=function(z){var W=z.clipboardData,q=W?.getData("text");P.current=q||""},L=function(z){var W=z.target;if(W!==n.current){var q=document.body.style.msTouchAction!==void 0;q?setTimeout(function(){n.current.focus()}):n.current.focus()}},N=function(z){var W=S();z.target!==n.current&&!W&&!(s==="combobox"&&u)&&z.preventDefault(),(s!=="combobox"&&(!l||!W)||!a)&&(a&&p!==!1&&g("",!0,!1),v())},I={inputRef:n,onInputKeyDown:C,onInputMouseDown:R,onInputChange:M,onInputPaste:H,onInputCompositionStart:A,onInputCompositionEnd:F,onInputBlur:m},D=s==="multiple"||s==="tags"?Aa.createElement(rk,fe({},t,I)):Aa.createElement(nk,fe({},t,I));return Aa.createElement("div",{ref:d,className:"".concat(i,"-selector"),onClick:L,onMouseDown:N},f&&Aa.createElement("div",{className:"".concat(i,"-prefix")},f),D)},UH=Aa.forwardRef(HH),ok=UH;var my=E(Ne());var xt=E($());var ck=E(Ne());var ti=E($());var ik=E(Ne()),py=E($());function s1(e){var t=e.prefixCls,r=e.align,n=e.arrow,o=e.arrowPos,i=n||{},a=i.className,s=i.content,l=o.x,c=l===void 0?0:l,u=o.y,f=u===void 0?0:u,p=py.useRef();if(!r||!r.points)return null;var g={position:"absolute"};if(r.autoArrow!==!1){var h=r.points[0],v=r.points[1],y=h[0],m=h[1],d=v[0],x=v[1];y===d||!["t","b"].includes(y)?g.top=f:y==="t"?g.top=0:g.bottom=0,m===x||!["l","r"].includes(m)?g.left=c:m==="l"?g.left=0:g.right=0}return py.createElement("div",{ref:p,className:(0,ik.default)("".concat(t,"-arrow"),a),style:g},s)}var ak=E(Ne());var l1=E($());function c1(e){var t=e.prefixCls,r=e.open,n=e.zIndex,o=e.mask,i=e.motion;return o?l1.createElement(Uo,fe({},i,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(a){var s=a.className;return l1.createElement("div",{style:{zIndex:n},className:(0,ak.default)("".concat(t,"-mask"),s)})}):null}var sk=E($()),qH=sk.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),lk=qH;var GH=ti.forwardRef(function(e,t){var r=e.popup,n=e.className,o=e.prefixCls,i=e.style,a=e.target,s=e.onVisibleChanged,l=e.open,c=e.keepDom,u=e.fresh,f=e.onClick,p=e.mask,g=e.arrow,h=e.arrowPos,v=e.align,y=e.motion,m=e.maskMotion,d=e.forceRender,x=e.getPopupContainer,b=e.autoDestroy,S=e.portal,w=e.zIndex,C=e.onMouseEnter,R=e.onMouseLeave,P=e.onPointerEnter,O=e.onPointerDownCapture,A=e.ready,F=e.offsetX,M=e.offsetY,H=e.offsetR,L=e.offsetB,N=e.onAlign,I=e.onPrepare,D=e.stretch,U=e.targetWidth,z=e.targetHeight,W=typeof r=="function"?r():r,q=l||c,j=x?.length>0,k=ti.useState(!x||!j),V=B(k,2),G=V[0],J=V[1];if(vt(function(){!G&&j&&a&&J(!0)},[G,j,a]),!G)return null;var Y="auto",X={left:"-1000vw",top:"-1000vh",right:Y,bottom:Y};if(A||!l){var ae,Z=v.points,K=v.dynamicInset||((ae=v._experimental)===null||ae===void 0?void 0:ae.dynamicInset),Q=K&&Z[0][1]==="r",re=K&&Z[0][0]==="b";Q?(X.right=H,X.left=Y):(X.left=F,X.right=Y),re?(X.bottom=L,X.top=Y):(X.top=M,X.bottom=Y)}var ee={};return D&&(D.includes("height")&&z?ee.height=z:D.includes("minHeight")&&z&&(ee.minHeight=z),D.includes("width")&&U?ee.width=U:D.includes("minWidth")&&U&&(ee.minWidth=U)),l||(ee.pointerEvents="none"),ti.createElement(S,{open:d||q,getContainer:x&&function(){return x(a)},autoDestroy:b},ti.createElement(c1,{prefixCls:o,open:l,zIndex:w,mask:p,motion:m}),ti.createElement(ro,{onResize:N,disabled:!l},function(ne){return ti.createElement(Uo,fe({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:d,leavedClassName:"".concat(o,"-hidden")},y,{onAppearPrepare:I,onEnterPrepare:I,visible:l,onVisibleChanged:function(le){var pe;y==null||(pe=y.onVisibleChanged)===null||pe===void 0||pe.call(y,le),s(le)}}),function(de,le){var pe=de.className,Oe=de.style,Ce=(0,ck.default)(o,pe,n);return ti.createElement("div",{ref:Lr(ne,t,le),className:Ce,style:T(T(T(T({"--arrow-x":"".concat(h.x||0,"px"),"--arrow-y":"".concat(h.y||0,"px")},X),ee),Oe),{},{boxSizing:"border-box",zIndex:w},i),onMouseEnter:C,onMouseLeave:R,onPointerEnter:P,onClick:f,onPointerDownCapture:O},g&&ti.createElement(s1,{prefixCls:o,arrow:g,arrowPos:h,align:v}),ti.createElement(lk,{cache:!l&&!u},W))})}))}),uk=GH;var Eu=E($()),KH=Eu.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,o=bi(r),i=Eu.useCallback(function(s){md(t,n?n(s):s)},[n]),a=xi(i,ys(r));return o?Eu.cloneElement(r,{ref:a}):r}),fk=KH;var dk=E($()),XH=dk.createContext(null),u1=XH;var mk=E($());function pk(e){return e?Array.isArray(e)?e:[e]:[]}function f1(e,t,r,n){return mk.useMemo(function(){var o=pk(r??t),i=pk(n??t),a=new Set(o),s=new Set(i);return e&&(a.has("hover")&&(a.delete("hover"),a.add("click")),s.has("hover")&&(s.delete("hover"),s.add("click"))),[a,s]},[e,t,r,n])}var Bl=E($());function YH(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],r=arguments.length>2?arguments[2]:void 0;return r?e[0]===t[0]:e[0]===t[0]&&e[1]===t[1]}function gk(e,t,r,n){for(var o=r.points,i=Object.keys(e),a=0;a1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(e)?t:e}function Kd(e){return Ru(parseFloat(e),0)}function p1(e,t){var r=T({},e);return(t||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var o=js(n).getComputedStyle(n),i=o.overflow,a=o.overflowClipMargin,s=o.borderTopWidth,l=o.borderBottomWidth,c=o.borderLeftWidth,u=o.borderRightWidth,f=n.getBoundingClientRect(),p=n.offsetHeight,g=n.clientHeight,h=n.offsetWidth,v=n.clientWidth,y=Kd(s),m=Kd(l),d=Kd(c),x=Kd(u),b=Ru(Math.round(f.width/h*1e3)/1e3),S=Ru(Math.round(f.height/p*1e3)/1e3),w=(h-v-d-x)*b,C=(p-g-y-m)*S,R=y*S,P=m*S,O=d*b,A=x*b,F=0,M=0;if(i==="clip"){var H=Kd(a);F=H*b,M=H*S}var L=f.x+O-F,N=f.y+R-M,I=L+f.width+2*F-O-A-w,D=N+f.height+2*M-R-P-C;r.left=Math.max(r.left,L),r.top=Math.max(r.top,N),r.right=Math.min(r.right,I),r.bottom=Math.min(r.bottom,D)}}),r}function hk(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r="".concat(t),n=r.match(/^(.*)\%$/);return n?e*(parseFloat(n[1])/100):parseFloat(r)}function vk(e,t){var r=t||[],n=B(r,2),o=n[0],i=n[1];return[hk(e.width,o),hk(e.height,i)]}function yk(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function Ou(e,t){var r=t[0],n=t[1],o,i;return r==="t"?i=e.y:r==="b"?i=e.y+e.height:i=e.y+e.height/2,n==="l"?o=e.x:n==="r"?o=e.x+e.width:o=e.x+e.width/2,{x:o,y:i}}function Vs(e,t){var r={t:"b",b:"t",l:"r",r:"l"};return e.map(function(n,o){return o===t?r[n]||"c":n}).join("")}function m1(e,t,r,n,o,i,a){var s=Bl.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[n]||{}}),l=B(s,2),c=l[0],u=l[1],f=Bl.useRef(0),p=Bl.useMemo(function(){return t?Xd(t):[]},[t]),g=Bl.useRef({}),h=function(){g.current={}};e||h();var v=wt(function(){if(t&&r&&e){let Ln=function(oc,Ua){var ic=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ie,Tp=k.x+oc,Np=k.y+Ua,V0=Tp+Q,Qe=Np+K,ct=Math.max(Tp,ic.left),hr=Math.max(Np,ic.top),Mr=Math.min(V0,ic.right),vr=Math.min(Qe,ic.bottom);return Math.max(0,(Mr-ct)*(vr-hr))},nc=function(){rr=k.y+be,pr=rr+K,mr=k.x+Ee,kn=mr+Q};var gR=Ln,hR=nc,d,x,b,S,w=t,C=w.ownerDocument,R=js(w),P=R.getComputedStyle(w),O=P.width,A=P.height,F=P.position,M=w.style.left,H=w.style.top,L=w.style.right,N=w.style.bottom,I=w.style.overflow,D=T(T({},o[n]),i),U=C.createElement("div");(d=w.parentElement)===null||d===void 0||d.appendChild(U),U.style.left="".concat(w.offsetLeft,"px"),U.style.top="".concat(w.offsetTop,"px"),U.style.position=F,U.style.height="".concat(w.offsetHeight,"px"),U.style.width="".concat(w.offsetWidth,"px"),w.style.left="0",w.style.top="0",w.style.right="auto",w.style.bottom="auto",w.style.overflow="hidden";var z;if(Array.isArray(r))z={x:r[0],y:r[1],width:0,height:0};else{var W,q,j=r.getBoundingClientRect();j.x=(W=j.x)!==null&&W!==void 0?W:j.left,j.y=(q=j.y)!==null&&q!==void 0?q:j.top,z={x:j.x,y:j.y,width:j.width,height:j.height}}var k=w.getBoundingClientRect();k.x=(x=k.x)!==null&&x!==void 0?x:k.left,k.y=(b=k.y)!==null&&b!==void 0?b:k.top;var V=C.documentElement,G=V.clientWidth,J=V.clientHeight,Y=V.scrollWidth,X=V.scrollHeight,ae=V.scrollTop,Z=V.scrollLeft,K=k.height,Q=k.width,re=z.height,ee=z.width,ne={left:0,top:0,right:G,bottom:J},de={left:-Z,top:-ae,right:Y-Z,bottom:X-ae},le=D.htmlRegion,pe="visible",Oe="visibleFirst";le!=="scroll"&&le!==Oe&&(le=pe);var Ce=le===Oe,De=p1(de,p),ce=p1(ne,p),ie=le===pe?ce:De,Re=Ce?ce:ie;w.style.left="auto",w.style.top="auto",w.style.right="0",w.style.bottom="0";var Le=w.getBoundingClientRect();w.style.left=M,w.style.top=H,w.style.right=L,w.style.bottom=N,w.style.overflow=I,(S=w.parentElement)===null||S===void 0||S.removeChild(U);var Ge=Ru(Math.round(Q/parseFloat(O)*1e3)/1e3),Me=Ru(Math.round(K/parseFloat(A)*1e3)/1e3);if(Ge===0||Me===0||Sl(r)&&!wv(r))return;var Ie=D.offset,je=D.targetOffset,We=vk(k,Ie),He=B(We,2),ye=He[0],se=He[1],xe=vk(z,je),_e=B(xe,2),he=_e[0],Je=_e[1];z.x-=he,z.y-=Je;var lt=D.points||[],Et=B(lt,2),Pt=Et[0],pt=Et[1],Ae=yk(pt),we=yk(Pt),et=Ou(z,Ae),Pe=Ou(k,we),$e=T({},D),Ee=et.x-Pe.x+ye,be=et.y-Pe.y+se,ht=Ln(Ee,be),Mt=Ln(Ee,be,ce),Fe=Ou(z,["t","l"]),Se=Ou(k,["t","l"]),Ke=Ou(z,["b","r"]),Be=Ou(k,["b","r"]),ze=D.overflow||{},tt=ze.adjustX,At=ze.adjustY,Tt=ze.shiftX,tr=ze.shiftY,Ft=function(Ua){return typeof Ua=="boolean"?Ua:Ua>=0},rr,pr,mr,kn;nc();var gr=Ft(At),Lt=we[0]===Ae[0];if(gr&&we[0]==="t"&&(pr>Re.bottom||g.current.bt)){var Te=be;Lt?Te-=K-re:Te=Fe.y-Be.y-se;var Ue=Ln(Ee,Te),ke=Ln(Ee,Te,ce);Ue>ht||Ue===ht&&(!Ce||ke>=Mt)?(g.current.bt=!0,be=Te,se=-se,$e.points=[Vs(we,0),Vs(Ae,0)]):g.current.bt=!1}if(gr&&we[0]==="b"&&(rrht||nt===ht&&(!Ce||Nt>=Mt)?(g.current.tb=!0,be=ve,se=-se,$e.points=[Vs(we,0),Vs(Ae,0)]):g.current.tb=!1}var It=Ft(tt),mn=we[1]===Ae[1];if(It&&we[1]==="l"&&(kn>Re.right||g.current.rl)){var Ar=Ee;mn?Ar-=Q-ee:Ar=Fe.x-Be.x-ye;var Br=Ln(Ar,be),_r=Ln(Ar,be,ce);Br>ht||Br===ht&&(!Ce||_r>=Mt)?(g.current.rl=!0,Ee=Ar,ye=-ye,$e.points=[Vs(we,1),Vs(Ae,1)]):g.current.rl=!1}if(It&&we[1]==="r"&&(mrht||Xn===ht&&(!Ce||Mn>=Mt)?(g.current.lr=!0,Ee=jr,ye=-ye,$e.points=[Vs(we,1),Vs(Ae,1)]):g.current.lr=!1}nc();var Zr=Tt===!0?0:Tt;typeof Zr=="number"&&(mrce.right&&(Ee-=kn-ce.right-ye,z.x>ce.right-Zr&&(Ee+=z.x-ce.right+Zr)));var wn=tr===!0?0:tr;typeof wn=="number"&&(rrce.bottom&&(be-=pr-ce.bottom-se,z.y>ce.bottom-wn&&(be+=z.y-ce.bottom+wn)));var ja=k.x+Ee,Va=ja+Q,No=k.y+be,rc=No+K,Ha=z.x,St=Ha+ee,ft=z.y,en=ft+re,tn=Math.max(ja,Ha),Sr=Math.min(Va,St),kr=(tn+Sr)/2,po=kr-ja,Yn=Math.max(No,ft),Io=Math.min(rc,en),$i=(Yn+Io)/2,li=$i-No;a?.(t,$e);var Di=Le.right-k.x-(Ee+k.width),Fn=Le.bottom-k.y-(be+k.height);Ge===1&&(Ee=Math.round(Ee),Di=Math.round(Di)),Me===1&&(be=Math.round(be),Fn=Math.round(Fn));var j0={ready:!0,offsetX:Ee/Ge,offsetY:be/Me,offsetR:Di/Ge,offsetB:Fn/Me,arrowX:po/Ge,arrowY:li/Me,scaleX:Ge,scaleY:Me,align:$e};u(j0)}}),y=function(){f.current+=1;var x=f.current;Promise.resolve().then(function(){f.current===x&&v()})},m=function(){u(function(x){return T(T({},x),{},{ready:!1})})};return vt(m,[n]),vt(function(){e||m()},[e]),[c.ready,c.offsetX,c.offsetY,c.offsetR,c.offsetB,c.arrowX,c.arrowY,c.scaleX,c.scaleY,c.align,y]}function g1(e,t,r,n,o){vt(function(){if(e&&t&&r){let p=function(){n(),o()};var f=p,i=t,a=r,s=Xd(i),l=Xd(a),c=js(a),u=new Set([c].concat(te(s),te(l)));return u.forEach(function(g){g.addEventListener("scroll",p,{passive:!0})}),c.addEventListener("resize",p,{passive:!0}),n(),function(){u.forEach(function(g){g.removeEventListener("scroll",p),c.removeEventListener("resize",p)})}}},[e,t,r])}var Yd=E($());function h1(e,t,r,n,o,i,a,s){var l=Yd.useRef(e);l.current=e;var c=Yd.useRef(!1);Yd.useEffect(function(){if(t&&n&&(!o||i)){var f=function(){c.current=!1},p=function(b){var S;l.current&&!a(((S=b.composedPath)===null||S===void 0||(S=S.call(b))===null||S===void 0?void 0:S[0])||b.target)&&!c.current&&s(!1)},g=js(n);g.addEventListener("pointerdown",f,!0),g.addEventListener("mousedown",p,!0),g.addEventListener("contextmenu",p,!0);var h=Il(r);if(h&&(h.addEventListener("mousedown",p,!0),h.addEventListener("contextmenu",p,!0)),0)var v,y,m,d;return function(){g.removeEventListener("pointerdown",f,!0),g.removeEventListener("mousedown",p,!0),g.removeEventListener("contextmenu",p,!0),h&&(h.removeEventListener("mousedown",p,!0),h.removeEventListener("contextmenu",p,!0))}}},[t,r,n,o,i]);function u(){c.current=!0}return u}var QH=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function JH(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Lw,t=xt.forwardRef(function(r,n){var o=r.prefixCls,i=o===void 0?"rc-trigger-popup":o,a=r.children,s=r.action,l=s===void 0?"hover":s,c=r.showAction,u=r.hideAction,f=r.popupVisible,p=r.defaultPopupVisible,g=r.onPopupVisibleChange,h=r.afterPopupVisibleChange,v=r.mouseEnterDelay,y=r.mouseLeaveDelay,m=y===void 0?.1:y,d=r.focusDelay,x=r.blurDelay,b=r.mask,S=r.maskClosable,w=S===void 0?!0:S,C=r.getPopupContainer,R=r.forceRender,P=r.autoDestroy,O=r.destroyPopupOnHide,A=r.popup,F=r.popupClassName,M=r.popupStyle,H=r.popupPlacement,L=r.builtinPlacements,N=L===void 0?{}:L,I=r.popupAlign,D=r.zIndex,U=r.stretch,z=r.getPopupClassNameFromAlign,W=r.fresh,q=r.alignPoint,j=r.onPopupClick,k=r.onPopupAlign,V=r.arrow,G=r.popupMotion,J=r.maskMotion,Y=r.popupTransitionName,X=r.popupAnimation,ae=r.maskTransitionName,Z=r.maskAnimation,K=r.className,Q=r.getTriggerDOMNode,re=Ve(r,QH),ee=P||O||!1,ne=xt.useState(!1),de=B(ne,2),le=de[0],pe=de[1];vt(function(){pe(xu())},[]);var Oe=xt.useRef({}),Ce=xt.useContext(u1),De=xt.useMemo(function(){return{registerSubPopup:function(ct,hr){Oe.current[ct]=hr,Ce?.registerSubPopup(ct,hr)}}},[Ce]),ce=Uv(),ie=xt.useState(null),Re=B(ie,2),Le=Re[0],Ge=Re[1],Me=xt.useRef(null),Ie=wt(function(Qe){Me.current=Qe,Sl(Qe)&&Le!==Qe&&Ge(Qe),Ce?.registerSubPopup(ce,Qe)}),je=xt.useState(null),We=B(je,2),He=We[0],ye=We[1],se=xt.useRef(null),xe=wt(function(Qe){Sl(Qe)&&He!==Qe&&(ye(Qe),se.current=Qe)}),_e=xt.Children.only(a),he=_e?.props||{},Je={},lt=wt(function(Qe){var ct,hr,Mr=He;return Mr?.contains(Qe)||((ct=Il(Mr))===null||ct===void 0?void 0:ct.host)===Qe||Qe===Mr||Le?.contains(Qe)||((hr=Il(Le))===null||hr===void 0?void 0:hr.host)===Qe||Qe===Le||Object.values(Oe.current).some(function(vr){return vr?.contains(Qe)||Qe===vr})}),Et=d1(i,G,X,Y),Pt=d1(i,J,Z,ae),pt=xt.useState(p||!1),Ae=B(pt,2),we=Ae[0],et=Ae[1],Pe=f??we,$e=wt(function(Qe){f===void 0&&et(Qe)});vt(function(){et(f||!1)},[f]);var Ee=xt.useRef(Pe);Ee.current=Pe;var be=xt.useRef([]);be.current=[];var ht=wt(function(Qe){var ct;$e(Qe),((ct=be.current[be.current.length-1])!==null&&ct!==void 0?ct:Pe)!==Qe&&(be.current.push(Qe),g?.(Qe))}),Mt=xt.useRef(),Fe=function(){clearTimeout(Mt.current)},Se=function(ct){var hr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Fe(),hr===0?ht(ct):Mt.current=setTimeout(function(){ht(ct)},hr*1e3)};xt.useEffect(function(){return Fe},[]);var Ke=xt.useState(!1),Be=B(Ke,2),ze=Be[0],tt=Be[1];vt(function(Qe){(!Qe||Pe)&&tt(!0)},[Pe]);var At=xt.useState(null),Tt=B(At,2),tr=Tt[0],Ft=Tt[1],rr=xt.useState(null),pr=B(rr,2),mr=pr[0],kn=pr[1],gr=function(ct){kn([ct.clientX,ct.clientY])},Lt=m1(Pe,Le,q&&mr!==null?mr:He,H,N,I,k),Te=B(Lt,11),Ue=Te[0],ke=Te[1],ve=Te[2],nt=Te[3],Nt=Te[4],It=Te[5],mn=Te[6],Ar=Te[7],Br=Te[8],_r=Te[9],jr=Te[10],Xn=f1(le,l,c,u),Mn=B(Xn,2),Zr=Mn[0],wn=Mn[1],ja=Zr.has("click"),Va=wn.has("click")||wn.has("contextMenu"),No=wt(function(){ze||jr()}),rc=function(){Ee.current&&q&&Va&&Se(!1)};g1(Pe,He,Le,No,rc),vt(function(){No()},[mr,H]),vt(function(){Pe&&!(N!=null&&N[H])&&No()},[JSON.stringify(I)]);var Ha=xt.useMemo(function(){var Qe=gk(N,i,_r,q);return(0,my.default)(Qe,z?.(_r))},[_r,z,N,i,q]);xt.useImperativeHandle(n,function(){return{nativeElement:se.current,popupElement:Me.current,forceAlign:No}});var St=xt.useState(0),ft=B(St,2),en=ft[0],tn=ft[1],Sr=xt.useState(0),kr=B(Sr,2),po=kr[0],Yn=kr[1],Io=function(){if(U&&He){var ct=He.getBoundingClientRect();tn(ct.width),Yn(ct.height)}},$i=function(){Io(),No()},li=function(ct){tt(!1),jr(),h?.(ct)},Di=function(){return new Promise(function(ct){Io(),Ft(function(){return ct})})};vt(function(){tr&&(jr(),tr(),Ft(null))},[tr]);function Fn(Qe,ct,hr,Mr){Je[Qe]=function(vr){var Ip;Mr?.(vr),Se(ct,hr);for(var H0=arguments.length,vR=new Array(H0>1?H0-1:0),$p=1;$p1?hr-1:0),vr=1;vr1?hr-1:0),vr=1;vr1&&arguments[1]!==void 0?arguments[1]:{},r=t.fieldNames,n=t.childrenAsData,o=[],i=v1(r,!1),a=i.label,s=i.value,l=i.options,c=i.groupLabel;function u(f,p){Array.isArray(f)&&f.forEach(function(g){if(p||!(l in g)){var h=g[s];o.push({key:Sk(g,o.length),groupOption:p,data:g,label:g[a],value:h})}else{var v=g[c];v===void 0&&n&&(v=g.label),o.push({key:Sk(g,o.length),group:!0,data:g,label:v}),u(g[l],!0)}})}return u(e,!1),o}function Jd(e){var t=T({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return Vt(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var wk=function(t,r,n){if(!r||!r.length)return null;var o=!1,i=function s(l,c){var u=Eh(c),f=u[0],p=u.slice(1);if(!f)return[l];var g=l.split(f);return o=o||g.length>1,g.reduce(function(h,v){return[].concat(te(h),te(s(v,p)))},[]).filter(Boolean)},a=i(t,r);return o?typeof n<"u"?a.slice(0,n):a:null};var Ek=E($()),n9=Ek.createContext(null),_u=n9;var Rk=E($());function y1(e){var t=e.visible,r=e.values;if(!t)return null;var n=50;return Rk.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(r.slice(0,n).map(function(o){var i=o.label,a=o.value;return["number","string"].includes(ue(i))?i:a}).join(", ")),r.length>n?", ...":null)}var o9=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],i9=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Zd=function(t){return t==="tags"||t==="multiple"},a9=bt.forwardRef(function(e,t){var r,n=e.id,o=e.prefixCls,i=e.className,a=e.showSearch,s=e.tagRender,l=e.direction,c=e.omitDomProps,u=e.displayValues,f=e.onDisplayValuesChange,p=e.emptyOptions,g=e.notFoundContent,h=g===void 0?"Not Found":g,v=e.onClear,y=e.mode,m=e.disabled,d=e.loading,x=e.getInputElement,b=e.getRawInputElement,S=e.open,w=e.defaultOpen,C=e.onDropdownVisibleChange,R=e.activeValue,P=e.onActiveValueChange,O=e.activeDescendantId,A=e.searchValue,F=e.autoClearSearchValue,M=e.onSearch,H=e.onSearchSplit,L=e.tokenSeparators,N=e.allowClear,I=e.prefix,D=e.suffixIcon,U=e.clearIcon,z=e.OptionList,W=e.animation,q=e.transitionName,j=e.dropdownStyle,k=e.dropdownClassName,V=e.dropdownMatchSelectWidth,G=e.dropdownRender,J=e.dropdownAlign,Y=e.placement,X=e.builtinPlacements,ae=e.getPopupContainer,Z=e.showAction,K=Z===void 0?[]:Z,Q=e.onFocus,re=e.onBlur,ee=e.onKeyUp,ne=e.onKeyDown,de=e.onMouseDown,le=Ve(e,o9),pe=Zd(y),Oe=(a!==void 0?a:pe)||y==="combobox",Ce=T({},le);i9.forEach(function(St){delete Ce[St]}),c?.forEach(function(St){delete Ce[St]});var De=bt.useState(!1),ce=B(De,2),ie=ce[0],Re=ce[1];bt.useEffect(function(){Re(xu())},[]);var Le=bt.useRef(null),Ge=bt.useRef(null),Me=bt.useRef(null),Ie=bt.useRef(null),je=bt.useRef(null),We=bt.useRef(!1),He=r1(),ye=B(He,3),se=ye[0],xe=ye[1],_e=ye[2];bt.useImperativeHandle(t,function(){var St,ft;return{focus:(St=Ie.current)===null||St===void 0?void 0:St.focus,blur:(ft=Ie.current)===null||ft===void 0?void 0:ft.blur,scrollTo:function(tn){var Sr;return(Sr=je.current)===null||Sr===void 0?void 0:Sr.scrollTo(tn)},nativeElement:Le.current||Ge.current}});var he=bt.useMemo(function(){var St;if(y!=="combobox")return A;var ft=(St=u[0])===null||St===void 0?void 0:St.value;return typeof ft=="string"||typeof ft=="number"?String(ft):""},[A,y,u]),Je=y==="combobox"&&typeof x=="function"&&x()||null,lt=typeof b=="function"&&b(),Et=xi(Ge,lt==null||(r=lt.props)===null||r===void 0?void 0:r.ref),Pt=bt.useState(!1),pt=B(Pt,2),Ae=pt[0],we=pt[1];vt(function(){we(!0)},[]);var et=ar(!1,{defaultValue:w,value:S}),Pe=B(et,2),$e=Pe[0],Ee=Pe[1],be=Ae?$e:!1,ht=!h&&p;(m||ht&&be&&y==="combobox")&&(be=!1);var Mt=ht?!1:be,Fe=bt.useCallback(function(St){var ft=St!==void 0?St:!be;m||(Ee(ft),be!==ft&&C?.(ft))},[m,be,Ee,C]),Se=bt.useMemo(function(){return(L||[]).some(function(St){return[` `,`\r -`].includes(Ct)})},[W]),Ze=St.useContext(Xu)||{},Je=Ze.maxCount,Ke=Ze.rawValues,ot=function(pt,to,ro){if(!(de&&wp(Je)&&Ke?.size>=Je)){var br=!0,Mr=pt;_?.(null);var xn=fL(pt,W,wp(Je)?Je-Ke.size:void 0),rn=ro?null:xn;return y!=="combobox"&&rn&&(Mr="",j?.(rn),je(!1),br=!1),L&&Ce!==Mr&&L(Mr,{source:to?"typing":"effect"}),br}},kt=function(pt){!pt||!pt.trim()||L(pt,{source:"submit"})};St.useEffect(function(){!Ne&&!de&&y!=="combobox"&&ot("",!1,!1)},[Ne]),St.useEffect(function(){Le&&g&&Te(!1),g&&!Ve.current&&me(!1)},[g]);var It=vp(),tr=B(It,2),Ft=tr[0],rr=tr[1],dr=St.useRef(!1),fr=function(pt){var to=Ft(),ro=pt.key,br=ro==="Enter";if(br&&(y!=="combobox"&&pt.preventDefault(),Ne||je(!0)),rr(!!Ce),ro==="Backspace"&&!to&&de&&!Ce&&u.length){for(var Mr=se(u),xn=null,rn=Mr.length-1;rn>=0;rn-=1){var Fn=Mr[rn];if(!Fn.disabled){Mr.splice(rn,1),xn=Fn;break}}xn&&d(Mr,{type:"remove",values:[xn]})}for(var ki=arguments.length,ui=new Array(ki>1?ki-1:0),Fi=1;Fi1?to-1:0),br=1;br1?xn-1:0),Fn=1;Fn"u"?"undefined":pe(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),eE=G7;var jy=E(I()),Vy=function(e,t,r,o){var n=(0,jy.useRef)(!1),i=(0,jy.useRef)(null);function a(){clearTimeout(i.current),n.current=!0,i.current=setTimeout(function(){n.current=!1},50)}var s=(0,jy.useRef)({top:e,bottom:t,left:r,right:o});return s.current.top=e,s.current.bottom=t,s.current.left=r,s.current.right=o,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,d=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&d?(clearTimeout(i.current),n.current=!1):(!d||n.current)&&a(),!n.current&&d}};function tE(e,t,r,o,n,i,a){var s=(0,sc.useRef)(0),l=(0,sc.useRef)(null),c=(0,sc.useRef)(null),u=(0,sc.useRef)(!1),d=Vy(t,r,o,n);function f(p,x){if(ut.cancel(l.current),!d(!1,x)){var S=p;if(!S._virtualHandled)S._virtualHandled=!0;else return;s.current+=x,c.current=x,eE||S.preventDefault(),l.current=ut(function(){var b=u.current?10:1;a(s.current*b,!1),s.current=0})}}function m(p,x){a(x,!0),eE||p.preventDefault()}var h=(0,sc.useRef)(null),v=(0,sc.useRef)(null);function y(p){if(e){ut.cancel(v.current),v.current=ut(function(){h.current=null},2);var x=p.deltaX,S=p.deltaY,b=p.shiftKey,w=x,C=S;(h.current==="sx"||!h.current&&b&&S&&!x)&&(w=S,C=0,h.current="sx");var R=Math.abs(w),_=Math.abs(C);h.current===null&&(h.current=i&&R>_?"x":"y"),h.current==="y"?f(p,C):m(p,w)}}function g(p){e&&(u.current=p.detail===c.current)}return[y,g]}var wL=E(I());function EL(e,t,r,o){var n=wL.useMemo(function(){return[new Map,[]]},[e,r.id,o]),i=B(n,2),a=i[0],s=i[1],l=function(u){var d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,f=a.get(u),m=a.get(d);if(f===void 0||m===void 0)for(var h=e.length,v=s.length;v0&&arguments[0]!==void 0?arguments[0]:!1;u();var h=function(){var g=!1;s.current.forEach(function(p,x){if(p&&p.offsetParent){var S=p.offsetHeight,b=getComputedStyle(p),w=b.marginTop,C=b.marginBottom,R=OL(w),_=OL(C),O=S+R+_;l.current.get(x)!==O&&(l.current.set(x,O),g=!0)}}),g&&a(function(p){return p+1})};if(m)h();else{c.current+=1;var v=c.current;Promise.resolve().then(function(){v===c.current&&h()})}}function f(m,h){var v=e(m),y=s.current.get(v);h?(s.current.set(v,h),d()):s.current.delete(v),!y!=!h&&(h?t?.(m):r?.(m))}return(0,Qu.useEffect)(function(){return u},[]),[f,d,l.current,i]}var Zu=E(I()),PL=14/15;function oE(e,t,r){var o=(0,Zu.useRef)(!1),n=(0,Zu.useRef)(0),i=(0,Zu.useRef)(0),a=(0,Zu.useRef)(null),s=(0,Zu.useRef)(null),l,c=function(m){if(o.current){var h=Math.ceil(m.touches[0].pageX),v=Math.ceil(m.touches[0].pageY),y=n.current-h,g=i.current-v,p=Math.abs(y)>Math.abs(g);p?n.current=h:i.current=v;var x=r(p,p?y:g,!1,m);x&&m.preventDefault(),clearInterval(s.current),x&&(s.current=setInterval(function(){p?y*=PL:g*=PL;var S=Math.floor(p?y:g);(!r(p,S,!0)||Math.abs(S)<=.1)&&clearInterval(s.current)},16))}},u=function(){o.current=!1,l()},d=function(m){l(),m.touches.length===1&&!o.current&&(o.current=!0,n.current=Math.ceil(m.touches[0].pageX),i.current=Math.ceil(m.touches[0].pageY),a.current=m.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},yt(function(){return e&&t.current.addEventListener("touchstart",d,{passive:!0}),function(){var f;(f=t.current)===null||f===void 0||f.removeEventListener("touchstart",d),l(),clearInterval(s.current)}},[e])}var NL=E(I());function TL(e){return Math.floor(Math.pow(e,.5))}function Hy(e,t){var r="touches"in e?e.touches[0]:e;return r[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function nE(e,t,r){NL.useEffect(function(){var o=t.current;if(e&&o){var n=!1,i,a,s=function(){ut.cancel(i)},l=function f(){s(),i=ut(function(){r(a),f()})},c=function(m){if(!(m.target.draggable||m.button!==0)){var h=m;h._virtualHandled||(h._virtualHandled=!0,n=!0)}},u=function(){n=!1,s()},d=function(m){if(n){var h=Hy(m,!1),v=o.getBoundingClientRect(),y=v.top,g=v.bottom;if(h<=y){var p=y-h;a=-TL(p),l()}else if(h>=g){var x=h-g;a=TL(x),l()}else s()}};return o.addEventListener("mousedown",c),o.ownerDocument.addEventListener("mouseup",u),o.ownerDocument.addEventListener("mousemove",d),function(){o.removeEventListener("mousedown",c),o.ownerDocument.removeEventListener("mouseup",u),o.ownerDocument.removeEventListener("mousemove",d),s()}}},[e])}var Uy=E(I());var K7=10;function iE(e,t,r,o,n,i,a,s){var l=Uy.useRef(),c=Uy.useState(null),u=B(c,2),d=u[0],f=u[1];return yt(function(){if(d&&d.times=0;j-=1){var W=n(t[j]),D=r.get(W);if(D===void 0){p=!0;break}if(L-=D,L<=0)break}switch(b){case"top":S=C-y;break;case"bottom":S=R-g+y;break;default:{var $=e.current.scrollTop,M=$+g;C<$?x="top":R>M&&(x="bottom")}}S!==null&&a(S),S!==d.lastTop&&(p=!0)}p&&f(P(P({},d),{},{times:d.times+1,targetAlign:x,lastTop:S}))}},[d,e.current]),function(m){if(m==null){s();return}if(ut.cancel(l.current),typeof m=="number")a(m);else if(m&&pe(m)==="object"){var h,v=m.align;"index"in m?h=m.index:h=t.findIndex(function(p){return n(p)===m.key});var y=m.offset,g=y===void 0?0:y;f({times:0,index:h,offset:g,originAlign:v})}}}var aE=E(Ee());var lr=E(I());var X7=lr.forwardRef(function(e,t){var r=e.prefixCls,o=e.rtl,n=e.scrollOffset,i=e.scrollRange,a=e.onStartMove,s=e.onStopMove,l=e.onScroll,c=e.horizontal,u=e.spinSize,d=e.containerSize,f=e.style,m=e.thumbStyle,h=e.showScrollBar,v=lr.useState(!1),y=B(v,2),g=y[0],p=y[1],x=lr.useState(null),S=B(x,2),b=S[0],w=S[1],C=lr.useState(null),R=B(C,2),_=R[0],O=R[1],N=!o,k=lr.useRef(),L=lr.useRef(),j=lr.useState(h),W=B(j,2),D=W[0],$=W[1],M=lr.useRef(),V=function(){h===!0||h===!1||(clearTimeout(M.current),$(!0),M.current=setTimeout(function(){$(!1)},3e3))},F=i-d||0,z=d-u||0,U=lr.useMemo(function(){if(n===0||F===0)return 0;var te=n/F;return te*z},[n,F,z]),H=function(K){K.stopPropagation(),K.preventDefault()},A=lr.useRef({top:U,dragging:g,pageY:b,startTop:_});A.current={top:U,dragging:g,pageY:b,startTop:_};var G=function(K){p(!0),w(Hy(K,c)),O(A.current.top),a(),K.stopPropagation(),K.preventDefault()};lr.useEffect(function(){var te=function(Q){Q.preventDefault()},K=k.current,Y=L.current;return K.addEventListener("touchstart",te,{passive:!1}),Y.addEventListener("touchstart",G,{passive:!1}),function(){K.removeEventListener("touchstart",te),Y.removeEventListener("touchstart",G)}},[]);var q=lr.useRef();q.current=F;var oe=lr.useRef();oe.current=z,lr.useEffect(function(){if(g){var te,K=function(Q){var J=A.current,le=J.dragging,ue=J.pageY,de=J.startTop;ut.cancel(te);var ve=k.current.getBoundingClientRect(),ye=d/(c?ve.width:ve.height);if(le){var we=(Hy(Q,c)-ue)*ye,ce=de;!N&&c?ce-=we:ce+=we;var ae=q.current,Re=oe.current,Me=Re?ce/Re:0,Be=Math.ceil(Me*ae);Be=Math.max(Be,0),Be=Math.min(Be,ae),te=ut(function(){l(Be,c)})}},Y=function(){p(!1),s()};return window.addEventListener("mousemove",K,{passive:!0}),window.addEventListener("touchmove",K,{passive:!0}),window.addEventListener("mouseup",Y,{passive:!0}),window.addEventListener("touchend",Y,{passive:!0}),function(){window.removeEventListener("mousemove",K),window.removeEventListener("touchmove",K),window.removeEventListener("mouseup",Y),window.removeEventListener("touchend",Y),ut.cancel(te)}}},[g]),lr.useEffect(function(){return V(),function(){clearTimeout(M.current)}},[n]),lr.useImperativeHandle(t,function(){return{delayHidden:V}});var Z="".concat(r,"-scrollbar"),X={position:"absolute",visibility:D?null:"hidden"},ie={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return c?(X.height=8,X.left=0,X.right=0,X.bottom=0,ie.height="100%",ie.width=u,N?ie.left=U:ie.right=U):(X.width=8,X.top=0,X.bottom=0,N?X.right=0:X.left=0,ie.width="100%",ie.height=u,ie.top=U),lr.createElement("div",{ref:k,className:(0,aE.default)(Z,T(T(T({},"".concat(Z,"-horizontal"),c),"".concat(Z,"-vertical"),!c),"".concat(Z,"-visible"),D)),style:P(P({},X),f),onMouseDown:H,onMouseMove:V},lr.createElement("div",{ref:L,className:(0,aE.default)("".concat(Z,"-thumb"),T({},"".concat(Z,"-thumb-moving"),g)),style:P(P({},ie),m),onMouseDown:G}))}),sE=X7;var Y7=20;function lE(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=e/t*e;return isNaN(r)&&(r=0),r=Math.max(r,Y7),Math.floor(r)}var Q7=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],Z7=[],J7={overflowY:"auto",overflowAnchor:"none"};function eU(e,t){var r=e.prefixCls,o=r===void 0?"rc-virtual-list":r,n=e.className,i=e.height,a=e.itemHeight,s=e.fullHeight,l=s===void 0?!0:s,c=e.style,u=e.data,d=e.children,f=e.itemKey,m=e.virtual,h=e.direction,v=e.scrollWidth,y=e.component,g=y===void 0?"div":y,p=e.onScroll,x=e.onVirtualScroll,S=e.onVisibleChange,b=e.innerProps,w=e.extraRender,C=e.styles,R=e.showScrollBar,_=R===void 0?"optional":R,O=Ae(e,Q7),N=Dr.useCallback(function(Se){return typeof f=="function"?f(Se):Se?.[f]},[f]),k=rE(N,null,null),L=B(k,4),j=L[0],W=L[1],D=L[2],$=L[3],M=!!(m!==!1&&i&&a),V=Dr.useMemo(function(){return Object.values(D.maps).reduce(function(Se,Ge){return Se+Ge},0)},[D.id,D.maps]),F=M&&u&&(Math.max(a*u.length,V)>i||!!v),z=h==="rtl",U=(0,IL.default)(o,T({},"".concat(o,"-rtl"),z),n),H=u||Z7,A=(0,gn.useRef)(),G=(0,gn.useRef)(),q=(0,gn.useRef)(),oe=(0,gn.useState)(0),Z=B(oe,2),X=Z[0],ie=Z[1],te=(0,gn.useState)(0),K=B(te,2),Y=K[0],ne=K[1],Q=(0,gn.useState)(!1),J=B(Q,2),le=J[0],ue=J[1],de=function(){ue(!0)},ve=function(){ue(!1)},ye={getKey:N};function we(Se){ie(function(Ge){var ke;typeof Se=="function"?ke=Se(Ge):ke=Se;var xe=Pe(ke);return A.current.scrollTop=xe,xe})}var ce=(0,gn.useRef)({start:0,end:H.length}),ae=(0,gn.useRef)(),Re=J1(H,N),Me=B(Re,1),Be=Me[0];ae.current=Be;var Ie=Dr.useMemo(function(){if(!M)return{scrollHeight:void 0,start:0,end:H.length-1,offset:void 0};if(!F){var Se;return{scrollHeight:((Se=G.current)===null||Se===void 0?void 0:Se.offsetHeight)||0,start:0,end:H.length-1,offset:void 0}}for(var Ge=0,ke,xe,nt,$t=H.length,Dt=0;Dt<$t;Dt+=1){var go=H[Dt],Ar=N(go),Br=D.get(Ar),_r=Ge+(Br===void 0?a:Br);_r>=X&&ke===void 0&&(ke=Dt,xe=Ge),_r>X+i&&nt===void 0&&(nt=Dt),Ge=_r}return ke===void 0&&(ke=0,xe=0,nt=Math.ceil(i/a)),nt===void 0&&(nt=H.length-1),nt=Math.min(nt+1,H.length-1),{scrollHeight:Ge,start:ke,end:nt,offset:xe}},[F,M,X,H,$,i]),Oe=Ie.scrollHeight,be=Ie.start,Ve=Ie.end,He=Ie.offset;ce.current.start=be,ce.current.end=Ve,Dr.useLayoutEffect(function(){var Se=D.getRecord();if(Se.size===1){var Ge=Array.from(Se)[0],ke=H[be];if(ke){var xe=N(ke);if(xe===Ge){var nt=D.get(Ge),$t=nt-a;we(function(Dt){return Dt+$t})}}}D.resetRecord()},[Oe]);var $e=Dr.useState({width:0,height:i}),fe=B($e,2),me=fe[0],ze=fe[1],Ce=function(Ge){ze({width:Ge.offsetWidth,height:Ge.offsetHeight})},Ue=(0,gn.useRef)(),Qe=(0,gn.useRef)(),gt=Dr.useMemo(function(){return lE(me.width,v)},[me.width,v]),Nt=Dr.useMemo(function(){return lE(me.height,Oe)},[me.height,Oe]),ht=Oe-i,We=(0,gn.useRef)(ht);We.current=ht;function Pe(Se){var Ge=Se;return Number.isNaN(We.current)||(Ge=Math.min(Ge,We.current)),Ge=Math.max(Ge,0),Ge}var tt=X<=0,De=X>=ht,Le=Y<=0,Te=Y>=v,Ne=Vy(tt,De,Le,Te),vt=function(){return{x:z?-Y:Y,y:X}},Bt=(0,gn.useRef)(vt()),je=Rt(function(Se){if(x){var Ge=P(P({},vt()),Se);(Bt.current.x!==Ge.x||Bt.current.y!==Ge.y)&&(x(Ge),Bt.current=Ge)}});function _e(Se,Ge){var ke=Se;Ge?((0,cE.flushSync)(function(){ne(ke)}),je()):we(ke)}function Ze(Se){var Ge=Se.currentTarget.scrollTop;Ge!==X&&we(Ge),p?.(Se),je()}var Je=function(Ge){var ke=Ge,xe=v?v-me.width:0;return ke=Math.max(ke,0),ke=Math.min(ke,xe),ke},Ke=Rt(function(Se,Ge){Ge?((0,cE.flushSync)(function(){ne(function(ke){var xe=ke+(z?-Se:Se);return Je(xe)})}),je()):we(function(ke){var xe=ke+Se;return xe})}),ot=tE(M,tt,De,Le,Te,!!v,Ke),kt=B(ot,2),It=kt[0],tr=kt[1];oE(M,A,function(Se,Ge,ke,xe){var nt=xe;return Ne(Se,Ge,ke)?!1:!nt||!nt._virtualHandled?(nt&&(nt._virtualHandled=!0),It({preventDefault:function(){},deltaX:Se?Ge:0,deltaY:Se?0:Ge}),!0):!1}),nE(F,A,function(Se){we(function(Ge){return Ge+Se})}),yt(function(){function Se(ke){var xe=tt&&ke.detail<0,nt=De&&ke.detail>0;M&&!xe&&!nt&&ke.preventDefault()}var Ge=A.current;return Ge.addEventListener("wheel",It,{passive:!1}),Ge.addEventListener("DOMMouseScroll",tr,{passive:!0}),Ge.addEventListener("MozMousePixelScroll",Se,{passive:!1}),function(){Ge.removeEventListener("wheel",It),Ge.removeEventListener("DOMMouseScroll",tr),Ge.removeEventListener("MozMousePixelScroll",Se)}},[M,tt,De]),yt(function(){if(v){var Se=Je(Y);ne(Se),je({x:Se})}},[me.width,v]);var Ft=function(){var Ge,ke;(Ge=Ue.current)===null||Ge===void 0||Ge.delayHidden(),(ke=Qe.current)===null||ke===void 0||ke.delayHidden()},rr=iE(A,H,D,a,N,function(){return W(!0)},we,Ft);Dr.useImperativeHandle(t,function(){return{nativeElement:q.current,getScrollInfo:vt,scrollTo:function(Ge){function ke(xe){return xe&&pe(xe)==="object"&&("left"in xe||"top"in xe)}ke(Ge)?(Ge.left!==void 0&&ne(Je(Ge.left)),rr(Ge.top)):rr(Ge)}}}),yt(function(){if(S){var Se=H.slice(be,Ve+1);S(Se,H)}},[be,Ve,H]);var dr=EL(H,N,D,a),fr=w?.({start:be,end:Ve,virtual:F,offsetX:Y,offsetY:He,rtl:z,getSize:dr}),Wo=Z1(H,be,Ve,v,Y,j,d,ye),pr=null;i&&(pr=P(T({},l?"height":"maxHeight",i),J7),M&&(pr.overflowY="hidden",v&&(pr.overflowX="hidden"),le&&(pr.pointerEvents="none")));var Or={};return z&&(Or.dir="rtl"),Dr.createElement("div",ee({ref:q,style:P(P({},c),{},{position:"relative"}),className:U},Or,O),Dr.createElement(un,{onResize:Ce},Dr.createElement(g,{className:"".concat(o,"-holder"),style:pr,ref:A,onScroll:Ze,onMouseEnter:Ft},Dr.createElement(xL,{prefixCls:o,height:Oe,offsetX:Y,offsetY:He,scrollWidth:v,onInnerResize:W,ref:G,innerProps:b,rtl:z,extra:fr},Wo))),F&&Oe>i&&Dr.createElement(sE,{ref:Ue,prefixCls:o,scrollOffset:X,scrollRange:Oe,rtl:z,onScroll:_e,onStartMove:de,onStopMove:ve,spinSize:Nt,containerSize:me.height,style:C?.verticalScrollBar,thumbStyle:C?.verticalScrollBarThumb,showScrollBar:_}),F&&v>me.width&&Dr.createElement(sE,{ref:Qe,prefixCls:o,scrollOffset:Y,scrollRange:v,rtl:z,onScroll:_e,onStartMove:de,onStopMove:ve,spinSize:gt,containerSize:me.width,horizontal:!0,style:C?.horizontalScrollBar,thumbStyle:C?.horizontalScrollBarThumb,showScrollBar:_}))}var $L=Dr.forwardRef(eU);$L.displayName="List";var DL=$L;var AL=DL;var Gt=E(I()),dE=E(I());function ML(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var tU=["disabled","title","children","style","className"];function LL(e){return typeof e=="string"||typeof e=="number"}var rU=function(t,r){var o=Iy(),n=o.prefixCls,i=o.id,a=o.open,s=o.multiple,l=o.mode,c=o.searchValue,u=o.toggleOpen,d=o.notFoundContent,f=o.onPopupScroll,m=Gt.useContext(Xu),h=m.maxCount,v=m.flattenOptions,y=m.onActiveValue,g=m.defaultActiveFirstOption,p=m.onSelect,x=m.menuItemSelectedIcon,S=m.rawValues,b=m.fieldNames,w=m.virtual,C=m.direction,R=m.listHeight,_=m.listItemHeight,O=m.optionRender,N="".concat(n,"-item"),k=Ki(function(){return v},[a,v],function(te,K){return K[0]&&te[1]!==K[1]}),L=Gt.useRef(null),j=Gt.useMemo(function(){return s&&wp(h)&&S?.size>=h},[s,h,S?.size]),W=function(K){K.preventDefault()},D=function(K){var Y;(Y=L.current)===null||Y===void 0||Y.scrollTo(typeof K=="number"?{index:K}:K)},$=Gt.useCallback(function(te){return l==="combobox"?!1:S.has(te)},[l,se(S).toString(),S.size]),M=function(K){for(var Y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,ne=k.length,Q=0;Q1&&arguments[1]!==void 0?arguments[1]:!1;U(K);var ne={source:Y?"keyboard":"mouse"},Q=k[K];if(!Q){y(null,-1,ne);return}y(Q.value,K,ne)};(0,dE.useEffect)(function(){H(g!==!1?M(0):-1)},[k.length,c]);var A=Gt.useCallback(function(te){return l==="combobox"?String(te).toLowerCase()===c.toLowerCase():S.has(te)},[l,c,se(S).toString(),S.size]);(0,dE.useEffect)(function(){var te=setTimeout(function(){if(!s&&a&&S.size===1){var Y=Array.from(S)[0],ne=k.findIndex(function(Q){var J=Q.data;return J.value===Y});ne!==-1&&(H(ne),D(ne))}});if(a){var K;(K=L.current)===null||K===void 0||K.scrollTo(void 0)}return function(){return clearTimeout(te)}},[a,c]);var G=function(K){K!==void 0&&p(K,{selected:!S.has(K)}),s||u(!1)};if(Gt.useImperativeHandle(r,function(){return{onKeyDown:function(K){var Y=K.which,ne=K.ctrlKey;switch(Y){case Fe.N:case Fe.P:case Fe.UP:case Fe.DOWN:{var Q=0;if(Y===Fe.UP?Q=-1:Y===Fe.DOWN?Q=1:ML()&&ne&&(Y===Fe.N?Q=1:Y===Fe.P&&(Q=-1)),Q!==0){var J=M(z+Q,Q);D(J),H(J,!0)}break}case Fe.TAB:case Fe.ENTER:{var le,ue=k[z];ue&&!(ue!=null&&(le=ue.data)!==null&&le!==void 0&&le.disabled)&&!j?G(ue.value):G(void 0),a&&K.preventDefault();break}case Fe.ESC:u(!1),a&&K.stopPropagation()}},onKeyUp:function(){},scrollTo:function(K){D(K)}}}),k.length===0)return Gt.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(N,"-empty"),onMouseDown:W},d);var q=Object.keys(b).map(function(te){return b[te]}),oe=function(K){return K.label};function Z(te,K){var Y=te.group;return{role:Y?"presentation":"option",id:"".concat(i,"_list_").concat(K)}}var X=function(K){var Y=k[K];if(!Y)return null;var ne=Y.data||{},Q=ne.value,J=Y.group,le=Ao(ne,!0),ue=oe(Y);return Y?Gt.createElement("div",ee({"aria-label":typeof ue=="string"&&!J?ue:null},le,{key:K},Z(Y,K),{"aria-selected":A(Q)}),Q):null},ie={role:"listbox",id:"".concat(i,"_list")};return Gt.createElement(Gt.Fragment,null,w&&Gt.createElement("div",ee({},ie,{style:{height:0,width:0,overflow:"hidden"}}),X(z-1),X(z),X(z+1)),Gt.createElement(AL,{itemKey:"key",ref:L,data:k,height:R,itemHeight:_,fullHeight:!1,onMouseDown:W,onScroll:f,virtual:w,direction:C,innerProps:w?null:ie},function(te,K){var Y=te.group,ne=te.groupOption,Q=te.data,J=te.label,le=te.value,ue=Q.key;if(Y){var de,ve=(de=Q.title)!==null&&de!==void 0?de:LL(J)?J.toString():void 0;return Gt.createElement("div",{className:(0,uE.default)(N,"".concat(N,"-group"),Q.className),title:ve},J!==void 0?J:ue)}var ye=Q.disabled,we=Q.title,ce=Q.children,ae=Q.style,Re=Q.className,Me=Ae(Q,tU),Be=Gr(Me,q),Ie=$(le),Oe=ye||!Ie&&j,be="".concat(N,"-option"),Ve=(0,uE.default)(N,be,Re,T(T(T(T({},"".concat(be,"-grouped"),ne),"".concat(be,"-active"),z===K&&!Oe),"".concat(be,"-disabled"),Oe),"".concat(be,"-selected"),Ie)),He=oe(te),$e=!x||typeof x=="function"||Ie,fe=typeof He=="number"?He:He||le,me=LL(fe)?fe.toString():void 0;return we!==void 0&&(me=we),Gt.createElement("div",ee({},Ao(Be),w?{}:Z(te,K),{"aria-selected":A(le),className:Ve,title:me,onMouseMove:function(){z===K||Oe||H(K)},onClick:function(){Oe||G(le)},style:ae}),Gt.createElement("div",{className:"".concat(be,"-content")},typeof O=="function"?O(te,{index:K}):fe),Gt.isValidElement(x)||Ie,$e&&Gt.createElement(Qs,{className:"".concat(N,"-option-state"),customizeIcon:x,customizeIconProps:{value:le,disabled:Oe,isSelected:Ie}},Ie?"\u2713":null))}))},oU=Gt.forwardRef(rU),kL=oU;var Ju=E(I()),FL=function(e,t){var r=Ju.useRef({values:new Map,options:new Map}),o=Ju.useMemo(function(){var i=r.current,a=i.values,s=i.options,l=e.map(function(d){if(d.label===void 0){var f;return P(P({},d),{},{label:(f=a.get(d.value))===null||f===void 0?void 0:f.label})}return d}),c=new Map,u=new Map;return l.forEach(function(d){c.set(d.value,d),u.set(d.value,t.get(d.value)||s.get(d.value))}),r.current.values=c,r.current.options=u,l},[e,t]),n=Ju.useCallback(function(i){return t.get(i)||r.current.options.get(i)},[t]);return[o,n]};var zL=E(I());function fE(e,t){return xp(e).join("").toUpperCase().includes(t)}var WL=function(e,t,r,o,n){return zL.useMemo(function(){if(!r||o===!1)return e;var i=t.options,a=t.label,s=t.value,l=[],c=typeof o=="function",u=r.toUpperCase(),d=c?o:function(m,h){return n?fE(h[n],u):h[i]?fE(h[a!=="children"?a:"label"],u):fE(h[s],u)},f=c?function(m){return Ep(m)}:function(m){return m};return e.forEach(function(m){if(m[i]){var h=d(r,f(m));if(h)l.push(m);else{var v=m[i].filter(function(y){return d(r,f(y))});v.length&&l.push(P(P({},m),{},T({},i,v)))}return}d(r,f(m))&&l.push(m)}),l},[e,o,n,r,t])};var Gy=E(I());var BL=0,nU=Yt();function iU(){var e;return nU?(e=BL,BL+=1):e="TEST_OR_SSR",e}function pE(e){var t=Gy.useState(),r=B(t,2),o=r[0],n=r[1];return Gy.useEffect(function(){n("rc_select_".concat(iU()))},[]),e||o}var VL=E(I());var jL=E(I());var aU=["children","value"],sU=["children"];function lU(e){var t=e,r=t.key,o=t.props,n=o.children,i=o.value,a=Ae(o,aU);return P({key:r,value:i!==void 0?i:r,children:n},a)}function qy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return Ci(e).map(function(r,o){if(!jL.isValidElement(r)||!r.type)return null;var n=r,i=n.type.isSelectOptGroup,a=n.key,s=n.props,l=s.children,c=Ae(s,sU);return t||!i?lU(r):P(P({key:"__RC_SELECT_GRP__".concat(a===null?o:a,"__"),label:a},c),{},{options:qy(l)})}).filter(function(r){return r})}var cU=function(t,r,o,n,i){return VL.useMemo(function(){var a=t,s=!t;s&&(a=qy(r));var l=new Map,c=new Map,u=function(m,h,v){v&&typeof v=="string"&&m.set(h[v],h)},d=function f(m){for(var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v0?je(Je.options):Je.options}):Je})},$e=cr.useMemo(function(){return p?He(Ve):Ve},[Ve,p,ie]),fe=cr.useMemo(function(){return dL($e,{fieldNames:oe,childrenAsData:G})},[$e,oe,G]),me=function(_e){var Ze=J(_e);if(ve(Ze),F&&(Ze.length!==ae.length||Ze.some(function(ot,kt){var It;return((It=ae[kt])===null||It===void 0?void 0:It.value)!==ot?.value}))){var Je=V?Ze:Ze.map(function(ot){return ot.value}),Ke=Ze.map(function(ot){return Ep(Re(ot.value))});F(A?Je:Je[0],A?Ke:Ke[0])}},ze=cr.useState(null),Ce=B(ze,2),Ue=Ce[0],Qe=Ce[1],gt=cr.useState(0),Nt=B(gt,2),ht=Nt[0],We=Nt[1],Pe=R!==void 0?R:o!=="combobox",tt=cr.useCallback(function(je,_e){var Ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Je=Ze.source,Ke=Je===void 0?"keyboard":Je;We(_e),a&&o==="combobox"&&je!==null&&Ke==="keyboard"&&Qe(String(je))},[a,o]),De=function(_e,Ze,Je){var Ke=function(){var pr,Or=Re(_e);return[V?{label:Or?.[oe.label],value:_e,key:(pr=Or?.key)!==null&&pr!==void 0?pr:_e}:_e,Ep(Or)]};if(Ze&&m){var ot=Ke(),kt=B(ot,2),It=kt[0],tr=kt[1];m(It,tr)}else if(!Ze&&h&&Je!=="clear"){var Ft=Ke(),rr=B(Ft,2),dr=rr[0],fr=rr[1];h(dr,fr)}},Le=Xy(function(je,_e){var Ze,Je=A?_e.selected:!0;Je?Ze=A?[].concat(se(ae),[je]):[je]:Ze=ae.filter(function(Ke){return Ke.value!==je}),me(Ze),De(je,Je),o==="combobox"?Qe(""):(!Rp||f)&&(te(""),Qe(""))}),Te=function(_e,Ze){me(_e);var Je=Ze.type,Ke=Ze.values;(Je==="remove"||Je==="clear")&&Ke.forEach(function(ot){De(ot.value,!1,Je)})},Ne=function(_e,Ze){if(te(_e),Qe(null),Ze.source==="submit"){var Je=(_e||"").trim();if(Je){var Ke=Array.from(new Set([].concat(se(Be),[Je])));me(Ke),De(Je,!0),te("")}return}Ze.source!=="blur"&&(o==="combobox"&&me(_e),u?.(_e))},vt=function(_e){var Ze=_e;o!=="tags"&&(Ze=_e.map(function(Ke){var ot=ne.get(Ke);return ot?.value}).filter(function(Ke){return Ke!==void 0}));var Je=Array.from(new Set([].concat(se(Be),se(Ze))));me(Je),Je.forEach(function(Ke){De(Ke,!0)})},Bt=cr.useMemo(function(){var je=O!==!1&&y!==!1;return P(P({},K),{},{flattenOptions:fe,onActiveValue:tt,defaultActiveFirstOption:Pe,onSelect:Le,menuItemSelectedIcon:_,rawValues:Be,fieldNames:oe,virtual:je,direction:N,listHeight:L,listItemHeight:W,childrenAsData:G,maxCount:z,optionRender:w})},[z,K,fe,tt,Pe,Le,_,Be,oe,O,y,N,L,W,G,w]);return cr.createElement(Xu.Provider,{value:Bt},cr.createElement(Q1,ee({},U,{id:H,prefixCls:i,ref:t,omitDomProps:fU,mode:o,displayValues:Me,onDisplayValuesChange:Te,direction:N,searchValue:ie,onSearch:Ne,autoClearSearchValue:f,onSearchSplit:vt,dropdownMatchSelectWidth:y,OptionList:kL,emptyOptions:!fe.length,activeValue:Ue,activeDescendantId:"".concat(H,"_list_").concat(ht)})))}),mE=mU;mE.Option=_p;mE.OptGroup=Op;var UL=mE;var GL=UL;var qL=E(Ee());function oa(e,t,r){return(0,qL.default)({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r})}var na=(e,t)=>t||e;var td=E(I());var rl=E(I()),Tp=E(Ee());var hn=E(I());var gU=()=>{let[,e]=yr(),[t]=Pi("Empty"),o=new it(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return hn.createElement("svg",{style:o,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},hn.createElement("title",null,t?.description||"Empty"),hn.createElement("g",{fill:"none",fillRule:"evenodd"},hn.createElement("g",{transform:"translate(24 31.67)"},hn.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),hn.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),hn.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),hn.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),hn.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),hn.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),hn.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},hn.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),hn.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},KL=gU;var tl=E(I()),XL=E(I());var hU=()=>{let[,e]=yr(),[t]=Pi("Empty"),{colorFill:r,colorFillTertiary:o,colorFillQuaternary:n,colorBgContainer:i}=e,{borderColor:a,shadowColor:s,contentColor:l}=(0,XL.useMemo)(()=>({borderColor:new it(r).onBackground(i).toHexString(),shadowColor:new it(o).onBackground(i).toHexString(),contentColor:new it(n).onBackground(i).toHexString()}),[r,o,n,i]);return tl.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},tl.createElement("title",null,t?.description||"Empty"),tl.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},tl.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),tl.createElement("g",{fillRule:"nonzero",stroke:a},tl.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),tl.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))},YL=hU;var vU=e=>{let{componentCls:t,margin:r,marginXS:o,marginXL:n,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:o,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:o,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:r},"&-normal":{marginBlock:n,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:o,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},QL=Pt("Empty",e=>{let{componentCls:t,controlHeightLG:r,calc:o}=e,n=rt(e,{emptyImgCls:`${t}-img`,emptyImgHeight:o(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:o(r).mul(.875).equal()});return[vU(n)]});var yU=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{className:t,rootClassName:r,prefixCls:o,image:n=ZL,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=e,d=yU(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:f,direction:m,className:h,style:v,classNames:y,styles:g}=Do("empty"),p=f("empty",o),[x,S,b]=QL(p),[w]=Pi("Empty"),C=typeof i<"u"?i:w?.description,R=typeof C=="string"?C:"empty",_=null;return typeof n=="string"?_=rl.createElement("img",{alt:R,src:n}):_=n,x(rl.createElement("div",Object.assign({className:(0,Tp.default)(S,b,p,h,{[`${p}-normal`]:n===JL,[`${p}-rtl`]:m==="rtl"},t,r,y.root,c?.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},g.root),v),u?.root),l)},d),rl.createElement("div",{className:(0,Tp.default)(`${p}-image`,y.image,c?.image),style:Object.assign(Object.assign(Object.assign({},s),g.image),u?.image)},_),C&&rl.createElement("div",{className:(0,Tp.default)(`${p}-description`,y.description,c?.description),style:Object.assign(Object.assign({},g.description),u?.description)},C),a&&rl.createElement("div",{className:(0,Tp.default)(`${p}-footer`,y.footer,c?.footer),style:Object.assign(Object.assign({},g.footer),u?.footer)},a)))};gE.PRESENTED_IMAGE_DEFAULT=ZL;gE.PRESENTED_IMAGE_SIMPLE=JL;var ed=gE;var xU=e=>{let{componentName:t}=e,{getPrefixCls:r}=(0,td.useContext)(at),o=r("empty");switch(t){case"Table":case"List":return td.default.createElement(ed,{image:ed.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return td.default.createElement(ed,{image:ed.PRESENTED_IMAGE_SIMPLE,className:`${o}-small`});case"Table.filter":return null;default:return td.default.createElement(ed,null)}},ek=xU;var hE=E(I());var bU=function(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0;var o,n;let{variant:i,[e]:a}=hE.useContext(at),s=hE.useContext(xM),l=a?.variant,c;typeof t<"u"?c=t:r===!1?c="borderless":c=(n=(o=s??l)!==null&&o!==void 0?o:i)!==null&&n!==void 0?n:"outlined";let u=sw.includes(c);return[c,u]},ol=bU;var SU=e=>{let r={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},r),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},r),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},r),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},r),{points:["br","tr"],offset:[0,-4]})}};function CU(e,t){return e||SU(t)}var tk=CU;var rk=e=>{let{optionHeight:t,optionFontSize:r,optionLineHeight:o,optionPadding:n}=e;return{position:"relative",display:"block",minHeight:t,padding:n,color:e.colorText,fontWeight:"normal",fontSize:r,lineHeight:o,boxSizing:"border-box"}},wU=e=>{let{antCls:t,componentCls:r}=e,o=`${r}-item`,n=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${r}-dropdown-placement-`,l=`${o}-option-selected`;return[{[`${r}-dropdown`]:Object.assign(Object.assign({},Qt(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[` - ${n}${s}bottomLeft, +`].includes(St)})},[L]),Ke=bt.useContext(_u)||{},Be=Ke.maxCount,ze=Ke.rawValues,tt=function(ft,en,tn){if(!(pe&&Qd(Be)&&ze?.size>=Be)){var Sr=!0,kr=ft;P?.(null);var po=wk(ft,L,Qd(Be)?Be-ze.size:void 0),Yn=tn?null:po;return y!=="combobox"&&Yn&&(kr="",H?.(Yn),Fe(!1),Sr=!1),M&&he!==kr&&M(kr,{source:en?"typing":"effect"}),Sr}},At=function(ft){!ft||!ft.trim()||M(ft,{source:"submit"})};bt.useEffect(function(){!be&&!pe&&y!=="combobox"&&tt("",!1,!1)},[be]),bt.useEffect(function(){$e&&m&&Ee(!1),m&&!We.current&&xe(!1)},[m]);var Tt=Ud(),tr=B(Tt,2),Ft=tr[0],rr=tr[1],pr=bt.useRef(!1),mr=function(ft){var en=Ft(),tn=ft.key,Sr=tn==="Enter";if(Sr&&(y!=="combobox"&&ft.preventDefault(),be||Fe(!0)),rr(!!he),tn==="Backspace"&&!en&&pe&&!he&&u.length){for(var kr=te(u),po=null,Yn=kr.length-1;Yn>=0;Yn-=1){var Io=kr[Yn];if(!Io.disabled){kr.splice(Yn,1),po=Io;break}}po&&f(kr,{type:"remove",values:[po]})}for(var $i=arguments.length,li=new Array($i>1?$i-1:0),Di=1;Di<$i;Di++)li[Di-1]=arguments[Di];if(be&&(!Sr||!pr.current)){var Fn;Sr&&(pr.current=!0),(Fn=je.current)===null||Fn===void 0||Fn.onKeyDown.apply(Fn,[ft].concat(li))}ne?.apply(void 0,[ft].concat(li))},kn=function(ft){for(var en=arguments.length,tn=new Array(en>1?en-1:0),Sr=1;Sr1?po-1:0),Io=1;Io"u"?"undefined":ue(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),w1=s9;var vy=E($()),yy=function(e,t,r,n){var o=(0,vy.useRef)(!1),i=(0,vy.useRef)(null);function a(){clearTimeout(i.current),o.current=!0,i.current=setTimeout(function(){o.current=!1},50)}var s=(0,vy.useRef)({top:e,bottom:t,left:r,right:n});return s.current.top=e,s.current.bottom=t,s.current.left=r,s.current.right=n,function(l,c){var u=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,f=l?c<0&&s.current.left||c>0&&s.current.right:c<0&&s.current.top||c>0&&s.current.bottom;return u&&f?(clearTimeout(i.current),o.current=!1):(!f||o.current)&&a(),!o.current&&f}};function E1(e,t,r,n,o,i,a){var s=(0,jl.useRef)(0),l=(0,jl.useRef)(null),c=(0,jl.useRef)(null),u=(0,jl.useRef)(!1),f=yy(t,r,n,o);function p(d,x){if(dt.cancel(l.current),!f(!1,x)){var b=d;if(!b._virtualHandled)b._virtualHandled=!0;else return;s.current+=x,c.current=x,w1||b.preventDefault(),l.current=dt(function(){var S=u.current?10:1;a(s.current*S,!1),s.current=0})}}function g(d,x){a(x,!0),w1||d.preventDefault()}var h=(0,jl.useRef)(null),v=(0,jl.useRef)(null);function y(d){if(e){dt.cancel(v.current),v.current=dt(function(){h.current=null},2);var x=d.deltaX,b=d.deltaY,S=d.shiftKey,w=x,C=b;(h.current==="sx"||!h.current&&S&&b&&!x)&&(w=b,C=0,h.current="sx");var R=Math.abs(w),P=Math.abs(C);h.current===null&&(h.current=i&&R>P?"x":"y"),h.current==="y"?p(d,C):g(d,w)}}function m(d){e&&(u.current=d.detail===c.current)}return[y,m]}var Ak=E($());function kk(e,t,r,n){var o=Ak.useMemo(function(){return[new Map,[]]},[e,r.id,n]),i=B(o,2),a=i[0],s=i[1],l=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,p=a.get(u),g=a.get(f);if(p===void 0||g===void 0)for(var h=e.length,v=s.length;v0&&arguments[0]!==void 0?arguments[0]:!1;u();var h=function(){var m=!1;s.current.forEach(function(d,x){if(d&&d.offsetParent){var b=d.offsetHeight,S=getComputedStyle(d),w=S.marginTop,C=S.marginBottom,R=Fk(w),P=Fk(C),O=b+R+P;l.current.get(x)!==O&&(l.current.set(x,O),m=!0)}}),m&&a(function(d){return d+1})};if(g)h();else{c.current+=1;var v=c.current;Promise.resolve().then(function(){v===c.current&&h()})}}function p(g,h){var v=e(g),y=s.current.get(v);h?(s.current.set(v,h),f()):s.current.delete(v),!y!=!h&&(h?t?.(g):r?.(g))}return(0,Tu.useEffect)(function(){return u},[]),[p,f,l.current,i]}var Nu=E($()),zk=14/15;function O1(e,t,r){var n=(0,Nu.useRef)(!1),o=(0,Nu.useRef)(0),i=(0,Nu.useRef)(0),a=(0,Nu.useRef)(null),s=(0,Nu.useRef)(null),l,c=function(g){if(n.current){var h=Math.ceil(g.touches[0].pageX),v=Math.ceil(g.touches[0].pageY),y=o.current-h,m=i.current-v,d=Math.abs(y)>Math.abs(m);d?o.current=h:i.current=v;var x=r(d,d?y:m,!1,g);x&&g.preventDefault(),clearInterval(s.current),x&&(s.current=setInterval(function(){d?y*=zk:m*=zk;var b=Math.floor(d?y:m);(!r(d,b,!0)||Math.abs(b)<=.1)&&clearInterval(s.current)},16))}},u=function(){n.current=!1,l()},f=function(g){l(),g.touches.length===1&&!n.current&&(n.current=!0,o.current=Math.ceil(g.touches[0].pageX),i.current=Math.ceil(g.touches[0].pageY),a.current=g.target,a.current.addEventListener("touchmove",c,{passive:!1}),a.current.addEventListener("touchend",u,{passive:!0}))};l=function(){a.current&&(a.current.removeEventListener("touchmove",c),a.current.removeEventListener("touchend",u))},vt(function(){return e&&t.current.addEventListener("touchstart",f,{passive:!0}),function(){var p;(p=t.current)===null||p===void 0||p.removeEventListener("touchstart",f),l(),clearInterval(s.current)}},[e])}var Bk=E($());function Wk(e){return Math.floor(Math.pow(e,.5))}function xy(e,t){var r="touches"in e?e.touches[0]:e;return r[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}function _1(e,t,r){Bk.useEffect(function(){var n=t.current;if(e&&n){var o=!1,i,a,s=function(){dt.cancel(i)},l=function p(){s(),i=dt(function(){r(a),p()})},c=function(g){if(!(g.target.draggable||g.button!==0)){var h=g;h._virtualHandled||(h._virtualHandled=!0,o=!0)}},u=function(){o=!1,s()},f=function(g){if(o){var h=xy(g,!1),v=n.getBoundingClientRect(),y=v.top,m=v.bottom;if(h<=y){var d=y-h;a=-Wk(d),l()}else if(h>=m){var x=h-m;a=Wk(x),l()}else s()}};return n.addEventListener("mousedown",c),n.ownerDocument.addEventListener("mouseup",u),n.ownerDocument.addEventListener("mousemove",f),function(){n.removeEventListener("mousedown",c),n.ownerDocument.removeEventListener("mouseup",u),n.ownerDocument.removeEventListener("mousemove",f),s()}}},[e])}var by=E($());var c9=10;function P1(e,t,r,n,o,i,a,s){var l=by.useRef(),c=by.useState(null),u=B(c,2),f=u[0],p=u[1];return vt(function(){if(f&&f.times=0;H-=1){var L=o(t[H]),N=r.get(L);if(N===void 0){d=!0;break}if(M-=N,M<=0)break}switch(S){case"top":b=C-y;break;case"bottom":b=R-m+y;break;default:{var I=e.current.scrollTop,D=I+m;CD&&(x="bottom")}}b!==null&&a(b),b!==f.lastTop&&(d=!0)}d&&p(T(T({},f),{},{times:f.times+1,targetAlign:x,lastTop:b}))}},[f,e.current]),function(g){if(g==null){s();return}if(dt.cancel(l.current),typeof g=="number")a(g);else if(g&&ue(g)==="object"){var h,v=g.align;"index"in g?h=g.index:h=t.findIndex(function(d){return o(d)===g.key});var y=g.offset,m=y===void 0?0:y;p({times:0,index:h,offset:m,originAlign:v})}}}var T1=E(Ne());var ur=E($());var u9=ur.forwardRef(function(e,t){var r=e.prefixCls,n=e.rtl,o=e.scrollOffset,i=e.scrollRange,a=e.onStartMove,s=e.onStopMove,l=e.onScroll,c=e.horizontal,u=e.spinSize,f=e.containerSize,p=e.style,g=e.thumbStyle,h=e.showScrollBar,v=ur.useState(!1),y=B(v,2),m=y[0],d=y[1],x=ur.useState(null),b=B(x,2),S=b[0],w=b[1],C=ur.useState(null),R=B(C,2),P=R[0],O=R[1],A=!n,F=ur.useRef(),M=ur.useRef(),H=ur.useState(h),L=B(H,2),N=L[0],I=L[1],D=ur.useRef(),U=function(){h===!0||h===!1||(clearTimeout(D.current),I(!0),D.current=setTimeout(function(){I(!1)},3e3))},z=i-f||0,W=f-u||0,q=ur.useMemo(function(){if(o===0||z===0)return 0;var Z=o/z;return Z*W},[o,z,W]),j=function(K){K.stopPropagation(),K.preventDefault()},k=ur.useRef({top:q,dragging:m,pageY:S,startTop:P});k.current={top:q,dragging:m,pageY:S,startTop:P};var V=function(K){d(!0),w(xy(K,c)),O(k.current.top),a(),K.stopPropagation(),K.preventDefault()};ur.useEffect(function(){var Z=function(ee){ee.preventDefault()},K=F.current,Q=M.current;return K.addEventListener("touchstart",Z,{passive:!1}),Q.addEventListener("touchstart",V,{passive:!1}),function(){K.removeEventListener("touchstart",Z),Q.removeEventListener("touchstart",V)}},[]);var G=ur.useRef();G.current=z;var J=ur.useRef();J.current=W,ur.useEffect(function(){if(m){var Z,K=function(ee){var ne=k.current,de=ne.dragging,le=ne.pageY,pe=ne.startTop;dt.cancel(Z);var Oe=F.current.getBoundingClientRect(),Ce=f/(c?Oe.width:Oe.height);if(de){var De=(xy(ee,c)-le)*Ce,ce=pe;!A&&c?ce-=De:ce+=De;var ie=G.current,Re=J.current,Le=Re?ce/Re:0,Ge=Math.ceil(Le*ie);Ge=Math.max(Ge,0),Ge=Math.min(Ge,ie),Z=dt(function(){l(Ge,c)})}},Q=function(){d(!1),s()};return window.addEventListener("mousemove",K,{passive:!0}),window.addEventListener("touchmove",K,{passive:!0}),window.addEventListener("mouseup",Q,{passive:!0}),window.addEventListener("touchend",Q,{passive:!0}),function(){window.removeEventListener("mousemove",K),window.removeEventListener("touchmove",K),window.removeEventListener("mouseup",Q),window.removeEventListener("touchend",Q),dt.cancel(Z)}}},[m]),ur.useEffect(function(){return U(),function(){clearTimeout(D.current)}},[o]),ur.useImperativeHandle(t,function(){return{delayHidden:U}});var Y="".concat(r,"-scrollbar"),X={position:"absolute",visibility:N?null:"hidden"},ae={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return c?(X.height=8,X.left=0,X.right=0,X.bottom=0,ae.height="100%",ae.width=u,A?ae.left=q:ae.right=q):(X.width=8,X.top=0,X.bottom=0,A?X.right=0:X.left=0,ae.width="100%",ae.height=u,ae.top=q),ur.createElement("div",{ref:F,className:(0,T1.default)(Y,_(_(_({},"".concat(Y,"-horizontal"),c),"".concat(Y,"-vertical"),!c),"".concat(Y,"-visible"),N)),style:T(T({},X),p),onMouseDown:j,onMouseMove:U},ur.createElement("div",{ref:M,className:(0,T1.default)("".concat(Y,"-thumb"),_({},"".concat(Y,"-thumb-moving"),m)),style:T(T({},ae),g),onMouseDown:V}))}),N1=u9;var f9=20;function I1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=e/t*e;return isNaN(r)&&(r=0),r=Math.max(r,f9),Math.floor(r)}var d9=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],p9=[],m9={overflowY:"auto",overflowAnchor:"none"};function g9(e,t){var r=e.prefixCls,n=r===void 0?"rc-virtual-list":r,o=e.className,i=e.height,a=e.itemHeight,s=e.fullHeight,l=s===void 0?!0:s,c=e.style,u=e.data,f=e.children,p=e.itemKey,g=e.virtual,h=e.direction,v=e.scrollWidth,y=e.component,m=y===void 0?"div":y,d=e.onScroll,x=e.onVirtualScroll,b=e.onVisibleChange,S=e.innerProps,w=e.extraRender,C=e.styles,R=e.showScrollBar,P=R===void 0?"optional":R,O=Ve(e,d9),A=Dr.useCallback(function(Te){return typeof p=="function"?p(Te):Te?.[p]},[p]),F=R1(A,null,null),M=B(F,4),H=M[0],L=M[1],N=M[2],I=M[3],D=!!(g!==!1&&i&&a),U=Dr.useMemo(function(){return Object.values(N.maps).reduce(function(Te,Ue){return Te+Ue},0)},[N.id,N.maps]),z=D&&u&&(Math.max(a*u.length,U)>i||!!v),W=h==="rtl",q=(0,jk.default)(n,_({},"".concat(n,"-rtl"),W),o),j=u||p9,k=(0,lo.useRef)(),V=(0,lo.useRef)(),G=(0,lo.useRef)(),J=(0,lo.useState)(0),Y=B(J,2),X=Y[0],ae=Y[1],Z=(0,lo.useState)(0),K=B(Z,2),Q=K[0],re=K[1],ee=(0,lo.useState)(!1),ne=B(ee,2),de=ne[0],le=ne[1],pe=function(){le(!0)},Oe=function(){le(!1)},Ce={getKey:A};function De(Te){ae(function(Ue){var ke;typeof Te=="function"?ke=Te(Ue):ke=Te;var ve=we(ke);return k.current.scrollTop=ve,ve})}var ce=(0,lo.useRef)({start:0,end:j.length}),ie=(0,lo.useRef)(),Re=C1(j,A),Le=B(Re,1),Ge=Le[0];ie.current=Ge;var Me=Dr.useMemo(function(){if(!D)return{scrollHeight:void 0,start:0,end:j.length-1,offset:void 0};if(!z){var Te;return{scrollHeight:((Te=V.current)===null||Te===void 0?void 0:Te.offsetHeight)||0,start:0,end:j.length-1,offset:void 0}}for(var Ue=0,ke,ve,nt,Nt=j.length,It=0;It=X&&ke===void 0&&(ke=It,ve=Ue),_r>X+i&&nt===void 0&&(nt=It),Ue=_r}return ke===void 0&&(ke=0,ve=0,nt=Math.ceil(i/a)),nt===void 0&&(nt=j.length-1),nt=Math.min(nt+1,j.length-1),{scrollHeight:Ue,start:ke,end:nt,offset:ve}},[z,D,X,j,I,i]),Ie=Me.scrollHeight,je=Me.start,We=Me.end,He=Me.offset;ce.current.start=je,ce.current.end=We,Dr.useLayoutEffect(function(){var Te=N.getRecord();if(Te.size===1){var Ue=Array.from(Te)[0],ke=j[je];if(ke){var ve=A(ke);if(ve===Ue){var nt=N.get(Ue),Nt=nt-a;De(function(It){return It+Nt})}}}N.resetRecord()},[Ie]);var ye=Dr.useState({width:0,height:i}),se=B(ye,2),xe=se[0],_e=se[1],he=function(Ue){_e({width:Ue.offsetWidth,height:Ue.offsetHeight})},Je=(0,lo.useRef)(),lt=(0,lo.useRef)(),Et=Dr.useMemo(function(){return I1(xe.width,v)},[xe.width,v]),Pt=Dr.useMemo(function(){return I1(xe.height,Ie)},[xe.height,Ie]),pt=Ie-i,Ae=(0,lo.useRef)(pt);Ae.current=pt;function we(Te){var Ue=Te;return Number.isNaN(Ae.current)||(Ue=Math.min(Ue,Ae.current)),Ue=Math.max(Ue,0),Ue}var et=X<=0,Pe=X>=pt,$e=Q<=0,Ee=Q>=v,be=yy(et,Pe,$e,Ee),ht=function(){return{x:W?-Q:Q,y:X}},Mt=(0,lo.useRef)(ht()),Fe=wt(function(Te){if(x){var Ue=T(T({},ht()),Te);(Mt.current.x!==Ue.x||Mt.current.y!==Ue.y)&&(x(Ue),Mt.current=Ue)}});function Se(Te,Ue){var ke=Te;Ue?((0,$1.flushSync)(function(){re(ke)}),Fe()):De(ke)}function Ke(Te){var Ue=Te.currentTarget.scrollTop;Ue!==X&&De(Ue),d?.(Te),Fe()}var Be=function(Ue){var ke=Ue,ve=v?v-xe.width:0;return ke=Math.max(ke,0),ke=Math.min(ke,ve),ke},ze=wt(function(Te,Ue){Ue?((0,$1.flushSync)(function(){re(function(ke){var ve=ke+(W?-Te:Te);return Be(ve)})}),Fe()):De(function(ke){var ve=ke+Te;return ve})}),tt=E1(D,et,Pe,$e,Ee,!!v,ze),At=B(tt,2),Tt=At[0],tr=At[1];O1(D,k,function(Te,Ue,ke,ve){var nt=ve;return be(Te,Ue,ke)?!1:!nt||!nt._virtualHandled?(nt&&(nt._virtualHandled=!0),Tt({preventDefault:function(){},deltaX:Te?Ue:0,deltaY:Te?0:Ue}),!0):!1}),_1(z,k,function(Te){De(function(Ue){return Ue+Te})}),vt(function(){function Te(ke){var ve=et&&ke.detail<0,nt=Pe&&ke.detail>0;D&&!ve&&!nt&&ke.preventDefault()}var Ue=k.current;return Ue.addEventListener("wheel",Tt,{passive:!1}),Ue.addEventListener("DOMMouseScroll",tr,{passive:!0}),Ue.addEventListener("MozMousePixelScroll",Te,{passive:!1}),function(){Ue.removeEventListener("wheel",Tt),Ue.removeEventListener("DOMMouseScroll",tr),Ue.removeEventListener("MozMousePixelScroll",Te)}},[D,et,Pe]),vt(function(){if(v){var Te=Be(Q);re(Te),Fe({x:Te})}},[xe.width,v]);var Ft=function(){var Ue,ke;(Ue=Je.current)===null||Ue===void 0||Ue.delayHidden(),(ke=lt.current)===null||ke===void 0||ke.delayHidden()},rr=P1(k,j,N,a,A,function(){return L(!0)},De,Ft);Dr.useImperativeHandle(t,function(){return{nativeElement:G.current,getScrollInfo:ht,scrollTo:function(Ue){function ke(ve){return ve&&ue(ve)==="object"&&("left"in ve||"top"in ve)}ke(Ue)?(Ue.left!==void 0&&re(Be(Ue.left)),rr(Ue.top)):rr(Ue)}}}),vt(function(){if(b){var Te=j.slice(je,We+1);b(Te,j)}},[je,We,j]);var pr=kk(j,A,N,a),mr=w?.({start:je,end:We,virtual:z,offsetX:Q,offsetY:He,rtl:W,getSize:pr}),kn=S1(j,je,We,v,Q,H,f,Ce),gr=null;i&&(gr=T(_({},l?"height":"maxHeight",i),m9),D&&(gr.overflowY="hidden",v&&(gr.overflowX="hidden"),de&&(gr.pointerEvents="none")));var Lt={};return W&&(Lt.dir="rtl"),Dr.createElement("div",fe({ref:G,style:T(T({},c),{},{position:"relative"}),className:q},Lt,O),Dr.createElement(ro,{onResize:he},Dr.createElement(m,{className:"".concat(n,"-holder"),style:gr,ref:k,onScroll:Ke,onMouseEnter:Ft},Dr.createElement(Nk,{prefixCls:n,height:Ie,offsetX:Q,offsetY:He,scrollWidth:v,onInnerResize:L,ref:V,innerProps:S,rtl:W,extra:mr},kn))),z&&Ie>i&&Dr.createElement(N1,{ref:Je,prefixCls:n,scrollOffset:X,scrollRange:Ie,rtl:W,onScroll:Se,onStartMove:pe,onStopMove:Oe,spinSize:Pt,containerSize:xe.height,style:C?.verticalScrollBar,thumbStyle:C?.verticalScrollBarThumb,showScrollBar:P}),z&&v>xe.width&&Dr.createElement(N1,{ref:lt,prefixCls:n,scrollOffset:Q,scrollRange:v,rtl:W,onScroll:Se,onStartMove:pe,onStopMove:Oe,spinSize:Et,containerSize:xe.width,horizontal:!0,style:C?.horizontalScrollBar,thumbStyle:C?.horizontalScrollBarThumb,showScrollBar:P}))}var Vk=Dr.forwardRef(g9);Vk.displayName="List";var Hk=Vk;var Uk=Hk;var Ut=E($()),A1=E($());function qk(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var h9=["disabled","title","children","style","className"];function Gk(e){return typeof e=="string"||typeof e=="number"}var v9=function(t,r){var n=ay(),o=n.prefixCls,i=n.id,a=n.open,s=n.multiple,l=n.mode,c=n.searchValue,u=n.toggleOpen,f=n.notFoundContent,p=n.onPopupScroll,g=Ut.useContext(_u),h=g.maxCount,v=g.flattenOptions,y=g.onActiveValue,m=g.defaultActiveFirstOption,d=g.onSelect,x=g.menuItemSelectedIcon,b=g.rawValues,S=g.fieldNames,w=g.virtual,C=g.direction,R=g.listHeight,P=g.listItemHeight,O=g.optionRender,A="".concat(o,"-item"),F=Hi(function(){return v},[a,v],function(Z,K){return K[0]&&Z[1]!==K[1]}),M=Ut.useRef(null),H=Ut.useMemo(function(){return s&&Qd(h)&&b?.size>=h},[s,h,b?.size]),L=function(K){K.preventDefault()},N=function(K){var Q;(Q=M.current)===null||Q===void 0||Q.scrollTo(typeof K=="number"?{index:K}:K)},I=Ut.useCallback(function(Z){return l==="combobox"?!1:b.has(Z)},[l,te(b).toString(),b.size]),D=function(K){for(var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,re=F.length,ee=0;ee1&&arguments[1]!==void 0?arguments[1]:!1;q(K);var re={source:Q?"keyboard":"mouse"},ee=F[K];if(!ee){y(null,-1,re);return}y(ee.value,K,re)};(0,A1.useEffect)(function(){j(m!==!1?D(0):-1)},[F.length,c]);var k=Ut.useCallback(function(Z){return l==="combobox"?String(Z).toLowerCase()===c.toLowerCase():b.has(Z)},[l,c,te(b).toString(),b.size]);(0,A1.useEffect)(function(){var Z=setTimeout(function(){if(!s&&a&&b.size===1){var Q=Array.from(b)[0],re=F.findIndex(function(ee){var ne=ee.data;return c?String(ne.value).startsWith(c):ne.value===Q});re!==-1&&(j(re),N(re))}});if(a){var K;(K=M.current)===null||K===void 0||K.scrollTo(void 0)}return function(){return clearTimeout(Z)}},[a,c]);var V=function(K){K!==void 0&&d(K,{selected:!b.has(K)}),s||u(!1)};if(Ut.useImperativeHandle(r,function(){return{onKeyDown:function(K){var Q=K.which,re=K.ctrlKey;switch(Q){case Ye.N:case Ye.P:case Ye.UP:case Ye.DOWN:{var ee=0;if(Q===Ye.UP?ee=-1:Q===Ye.DOWN?ee=1:qk()&&re&&(Q===Ye.N?ee=1:Q===Ye.P&&(ee=-1)),ee!==0){var ne=D(W+ee,ee);N(ne),j(ne,!0)}break}case Ye.TAB:case Ye.ENTER:{var de,le=F[W];le&&!(le!=null&&(de=le.data)!==null&&de!==void 0&&de.disabled)&&!H?V(le.value):V(void 0),a&&K.preventDefault();break}case Ye.ESC:u(!1),a&&K.stopPropagation()}},onKeyUp:function(){},scrollTo:function(K){N(K)}}}),F.length===0)return Ut.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(A,"-empty"),onMouseDown:L},f);var G=Object.keys(S).map(function(Z){return S[Z]}),J=function(K){return K.label};function Y(Z,K){var Q=Z.group;return{role:Q?"presentation":"option",id:"".concat(i,"_list_").concat(K)}}var X=function(K){var Q=F[K];if(!Q)return null;var re=Q.data||{},ee=re.value,ne=Q.group,de=qo(re,!0),le=J(Q);return Q?Ut.createElement("div",fe({"aria-label":typeof le=="string"&&!ne?le:null},de,{key:K},Y(Q,K),{"aria-selected":k(ee)}),ee):null},ae={role:"listbox",id:"".concat(i,"_list")};return Ut.createElement(Ut.Fragment,null,w&&Ut.createElement("div",fe({},ae,{style:{height:0,width:0,overflow:"hidden"}}),X(W-1),X(W),X(W+1)),Ut.createElement(Uk,{itemKey:"key",ref:M,data:F,height:R,itemHeight:P,fullHeight:!1,onMouseDown:L,onScroll:p,virtual:w,direction:C,innerProps:w?null:ae},function(Z,K){var Q=Z.group,re=Z.groupOption,ee=Z.data,ne=Z.label,de=Z.value,le=ee.key;if(Q){var pe,Oe=(pe=ee.title)!==null&&pe!==void 0?pe:Gk(ne)?ne.toString():void 0;return Ut.createElement("div",{className:(0,D1.default)(A,"".concat(A,"-group"),ee.className),title:Oe},ne!==void 0?ne:le)}var Ce=ee.disabled,De=ee.title,ce=ee.children,ie=ee.style,Re=ee.className,Le=Ve(ee,h9),Ge=qr(Le,G),Me=I(de),Ie=Ce||!Me&&H,je="".concat(A,"-option"),We=(0,D1.default)(A,je,Re,_(_(_(_({},"".concat(je,"-grouped"),re),"".concat(je,"-active"),W===K&&!Ie),"".concat(je,"-disabled"),Ie),"".concat(je,"-selected"),Me)),He=J(Z),ye=!x||typeof x=="function"||Me,se=typeof He=="number"?He:He||de,xe=Gk(se)?se.toString():void 0;return De!==void 0&&(xe=De),Ut.createElement("div",fe({},qo(Ge),w?{}:Y(Z,K),{"aria-selected":k(de),className:We,title:xe,onMouseMove:function(){W===K||Ie||j(K)},onClick:function(){Ie||V(de)},style:ie}),Ut.createElement("div",{className:"".concat(je,"-content")},typeof O=="function"?O(Z,{index:K}):se),Ut.isValidElement(x)||Me,ye&&Ut.createElement(Ws,{className:"".concat(A,"-option-state"),customizeIcon:x,customizeIconProps:{value:de,disabled:Ie,isSelected:Me}},Me?"\u2713":null))}))},y9=Ut.forwardRef(v9),Kk=y9;var Iu=E($()),Xk=function(e,t){var r=Iu.useRef({values:new Map,options:new Map}),n=Iu.useMemo(function(){var i=r.current,a=i.values,s=i.options,l=e.map(function(f){if(f.label===void 0){var p;return T(T({},f),{},{label:(p=a.get(f.value))===null||p===void 0?void 0:p.label})}return f}),c=new Map,u=new Map;return l.forEach(function(f){c.set(f.value,f),u.set(f.value,t.get(f.value)||s.get(f.value))}),r.current.values=c,r.current.options=u,l},[e,t]),o=Iu.useCallback(function(i){return t.get(i)||r.current.options.get(i)},[t]);return[n,o]};var Yk=E($());function k1(e,t){return Gd(e).join("").toUpperCase().includes(t)}var Qk=function(e,t,r,n,o){return Yk.useMemo(function(){if(!r||n===!1)return e;var i=t.options,a=t.label,s=t.value,l=[],c=typeof n=="function",u=r.toUpperCase(),f=c?n:function(g,h){return o?k1(h[o],u):h[i]?k1(h[a!=="children"?a:"label"],u):k1(h[s],u)},p=c?function(g){return Jd(g)}:function(g){return g};return e.forEach(function(g){if(g[i]){var h=f(r,p(g));if(h)l.push(g);else{var v=g[i].filter(function(y){return f(r,p(y))});v.length&&l.push(T(T({},g),{},_({},i,v)))}return}f(r,p(g))&&l.push(g)}),l},[e,n,o,r,t])};var Sy=E($());var Jk=0,x9=Yt();function b9(){var e;return x9?(e=Jk,Jk+=1):e="TEST_OR_SSR",e}function M1(e){var t=Sy.useState(),r=B(t,2),n=r[0],o=r[1];return Sy.useEffect(function(){o("rc_select_".concat(b9()))},[]),e||n}var eM=E($());var Zk=E($());var S9=["children","value"],C9=["children"];function w9(e){var t=e,r=t.key,n=t.props,o=n.children,i=n.value,a=Ve(n,S9);return T({key:r,value:i!==void 0?i:r,children:o},a)}function Cy(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return yi(e).map(function(r,n){if(!Zk.isValidElement(r)||!r.type)return null;var o=r,i=o.type.isSelectOptGroup,a=o.key,s=o.props,l=s.children,c=Ve(s,C9);return t||!i?w9(r):T(T({key:"__RC_SELECT_GRP__".concat(a===null?n:a,"__"),label:a},c),{},{options:Cy(l)})}).filter(function(r){return r})}var E9=function(t,r,n,o,i){return eM.useMemo(function(){var a=t,s=!t;s&&(a=Cy(r));var l=new Map,c=new Map,u=function(g,h,v){v&&typeof v=="string"&&g.set(h[v],h)},f=function p(g){for(var h=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=0;v0?Fe(Be.options):Be.options}):Be})},ye=fr.useMemo(function(){return d?He(We):We},[We,d,ae]),se=fr.useMemo(function(){return Ck(ye,{fieldNames:J,childrenAsData:V})},[ye,J,V]),xe=function(Se){var Ke=ne(Se);if(Oe(Ke),z&&(Ke.length!==ie.length||Ke.some(function(tt,At){var Tt;return((Tt=ie[At])===null||Tt===void 0?void 0:Tt.value)!==tt?.value}))){var Be=U?Ke:Ke.map(function(tt){return tt.value}),ze=Ke.map(function(tt){return Jd(Re(tt.value))});z(k?Be:Be[0],k?ze:ze[0])}},_e=fr.useState(null),he=B(_e,2),Je=he[0],lt=he[1],Et=fr.useState(0),Pt=B(Et,2),pt=Pt[0],Ae=Pt[1],we=R!==void 0?R:n!=="combobox",et=fr.useCallback(function(Fe,Se){var Ke=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Be=Ke.source,ze=Be===void 0?"keyboard":Be;Ae(Se),a&&n==="combobox"&&Fe!==null&&ze==="keyboard"&<(String(Fe))},[a,n]),Pe=function(Se,Ke,Be){var ze=function(){var gr,Lt=Re(Se);return[U?{label:Lt?.[J.label],value:Se,key:(gr=Lt?.key)!==null&&gr!==void 0?gr:Se}:Se,Jd(Lt)]};if(Ke&&g){var tt=ze(),At=B(tt,2),Tt=At[0],tr=At[1];g(Tt,tr)}else if(!Ke&&h&&Be!=="clear"){var Ft=ze(),rr=B(Ft,2),pr=rr[0],mr=rr[1];h(pr,mr)}},$e=Ey(function(Fe,Se){var Ke,Be=k?Se.selected:!0;Be?Ke=k?[].concat(te(ie),[Fe]):[Fe]:Ke=ie.filter(function(ze){return ze.value!==Fe}),xe(Ke),Pe(Fe,Be),n==="combobox"?lt(""):(!Zd||p)&&(Z(""),lt(""))}),Ee=function(Se,Ke){xe(Se);var Be=Ke.type,ze=Ke.values;(Be==="remove"||Be==="clear")&&ze.forEach(function(tt){Pe(tt.value,!1,Be)})},be=function(Se,Ke){if(Z(Se),lt(null),Ke.source==="submit"){var Be=(Se||"").trim();if(Be){var ze=Array.from(new Set([].concat(te(Ge),[Be])));xe(ze),Pe(Be,!0),Z("")}return}Ke.source!=="blur"&&(n==="combobox"&&xe(Se),u?.(Se))},ht=function(Se){var Ke=Se;n!=="tags"&&(Ke=Se.map(function(ze){var tt=re.get(ze);return tt?.value}).filter(function(ze){return ze!==void 0}));var Be=Array.from(new Set([].concat(te(Ge),te(Ke))));xe(Be),Be.forEach(function(ze){Pe(ze,!0)})},Mt=fr.useMemo(function(){var Fe=O!==!1&&y!==!1;return T(T({},K),{},{flattenOptions:se,onActiveValue:et,defaultActiveFirstOption:we,onSelect:$e,menuItemSelectedIcon:P,rawValues:Ge,fieldNames:J,virtual:Fe,direction:A,listHeight:M,listItemHeight:L,childrenAsData:V,maxCount:W,optionRender:w})},[W,K,se,et,we,$e,P,Ge,J,O,y,A,M,L,V,w]);return fr.createElement(_u.Provider,{value:Mt},fr.createElement(b1,fe({},q,{id:j,prefixCls:i,ref:t,omitDomProps:_9,mode:n,displayValues:Le,onDisplayValuesChange:Ee,direction:A,searchValue:ae,onSearch:be,autoClearSearchValue:p,onSearchSplit:ht,dropdownMatchSelectWidth:y,OptionList:Kk,emptyOptions:!se.length,activeValue:Je,activeDescendantId:"".concat(j,"_list_").concat(pt)})))}),F1=T9;F1.Option=tp;F1.OptGroup=ep;var rM=F1;var nM=rM;var oM=E(Ne());function Yi(e,t,r){return(0,oM.default)({[`${e}-status-success`]:t==="success",[`${e}-status-warning`]:t==="warning",[`${e}-status-error`]:t==="error",[`${e}-status-validating`]:t==="validating",[`${e}-has-feedback`]:r})}var Qi=(e,t)=>t||e;var Du=E($());var Us=E($()),np=E(Ne());var co=E($());var N9=()=>{let[,e]=xr(),[t]=Ca("Empty"),n=new gt(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return co.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},co.createElement("title",null,t?.description||"Empty"),co.createElement("g",{fill:"none",fillRule:"evenodd"},co.createElement("g",{transform:"translate(24 31.67)"},co.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),co.createElement("path",{d:"M122.034 69.674L98.109 40.229c-1.148-1.386-2.826-2.225-4.593-2.225h-51.44c-1.766 0-3.444.839-4.592 2.225L13.56 69.674v15.383h108.475V69.674z",fill:"#AEB8C2"}),co.createElement("path",{d:"M101.537 86.214L80.63 61.102c-1.001-1.207-2.507-1.867-4.048-1.867H31.724c-1.54 0-3.047.66-4.048 1.867L6.769 86.214v13.792h94.768V86.214z",fill:"url(#linearGradient-1)",transform:"translate(13.56)"}),co.createElement("path",{d:"M33.83 0h67.933a4 4 0 0 1 4 4v93.344a4 4 0 0 1-4 4H33.83a4 4 0 0 1-4-4V4a4 4 0 0 1 4-4z",fill:"#F5F5F7"}),co.createElement("path",{d:"M42.678 9.953h50.237a2 2 0 0 1 2 2V36.91a2 2 0 0 1-2 2H42.678a2 2 0 0 1-2-2V11.953a2 2 0 0 1 2-2zM42.94 49.767h49.713a2.262 2.262 0 1 1 0 4.524H42.94a2.262 2.262 0 0 1 0-4.524zM42.94 61.53h49.713a2.262 2.262 0 1 1 0 4.525H42.94a2.262 2.262 0 0 1 0-4.525zM121.813 105.032c-.775 3.071-3.497 5.36-6.735 5.36H20.515c-3.238 0-5.96-2.29-6.734-5.36a7.309 7.309 0 0 1-.222-1.79V69.675h26.318c2.907 0 5.25 2.448 5.25 5.42v.04c0 2.971 2.37 5.37 5.277 5.37h34.785c2.907 0 5.277-2.421 5.277-5.393V75.1c0-2.972 2.343-5.426 5.25-5.426h26.318v33.569c0 .617-.077 1.216-.221 1.789z",fill:"#DCE0E6"})),co.createElement("path",{d:"M149.121 33.292l-6.83 2.65a1 1 0 0 1-1.317-1.23l1.937-6.207c-2.589-2.944-4.109-6.534-4.109-10.408C138.802 8.102 148.92 0 161.402 0 173.881 0 184 8.102 184 18.097c0 9.995-10.118 18.097-22.599 18.097-4.528 0-8.744-1.066-12.28-2.902z",fill:"#DCE0E6"}),co.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},co.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),co.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},iM=N9;var Hs=E($()),aM=E($());var I9=()=>{let[,e]=xr(),[t]=Ca("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:s,contentColor:l}=(0,aM.useMemo)(()=>({borderColor:new gt(r).onBackground(i).toHexString(),shadowColor:new gt(n).onBackground(i).toHexString(),contentColor:new gt(o).onBackground(i).toHexString()}),[r,n,o,i]);return Hs.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Hs.createElement("title",null,t?.description||"Empty"),Hs.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Hs.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),Hs.createElement("g",{fillRule:"nonzero",stroke:a},Hs.createElement("path",{d:"M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z"}),Hs.createElement("path",{d:"M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z",fill:l}))))},sM=I9;var $9=e=>{let{componentCls:t,margin:r,marginXS:n,marginXL:o,fontSize:i,lineHeight:a}=e;return{[t]:{marginInline:n,fontSize:i,lineHeight:a,textAlign:"center",[`${t}-image`]:{height:e.emptyImgHeight,marginBottom:n,opacity:e.opacityImage,img:{height:"100%"},svg:{maxWidth:"100%",height:"100%",margin:"auto"}},[`${t}-description`]:{color:e.colorTextDescription},[`${t}-footer`]:{marginTop:r},"&-normal":{marginBlock:o,color:e.colorTextDescription,[`${t}-description`]:{color:e.colorTextDescription},[`${t}-image`]:{height:e.emptyImgHeightMD}},"&-small":{marginBlock:n,color:e.colorTextDescription,[`${t}-image`]:{height:e.emptyImgHeightSM}}}}},lM=Gt("Empty",e=>{let{componentCls:t,controlHeightLG:r,calc:n}=e,o=ut(e,{emptyImgCls:`${t}-img`,emptyImgHeight:n(r).mul(2.5).equal(),emptyImgHeightMD:r,emptyImgHeightSM:n(r).mul(.875).equal()});return[$9(o)]});var D9=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{className:t,rootClassName:r,prefixCls:n,image:o=cM,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=e,f=D9(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:p,direction:g,className:h,style:v,classNames:y,styles:m}=no("empty"),d=p("empty",n),[x,b,S]=lM(d),[w]=Ca("Empty"),C=typeof i<"u"?i:w?.description,R=typeof C=="string"?C:"empty",P=null;return typeof o=="string"?P=Us.createElement("img",{alt:R,src:o}):P=o,x(Us.createElement("div",Object.assign({className:(0,np.default)(b,S,d,h,{[`${d}-normal`]:o===uM,[`${d}-rtl`]:g==="rtl"},t,r,y.root,c?.root),style:Object.assign(Object.assign(Object.assign(Object.assign({},m.root),v),u?.root),l)},f),Us.createElement("div",{className:(0,np.default)(`${d}-image`,y.image,c?.image),style:Object.assign(Object.assign(Object.assign({},s),m.image),u?.image)},P),C&&Us.createElement("div",{className:(0,np.default)(`${d}-description`,y.description,c?.description),style:Object.assign(Object.assign({},m.description),u?.description)},C),a&&Us.createElement("div",{className:(0,np.default)(`${d}-footer`,y.footer,c?.footer),style:Object.assign(Object.assign({},m.footer),u?.footer)},a)))};L1.PRESENTED_IMAGE_DEFAULT=cM;L1.PRESENTED_IMAGE_SIMPLE=uM;var $u=L1;var A9=e=>{let{componentName:t}=e,{getPrefixCls:r}=(0,Du.useContext)(rt),n=r("empty");switch(t){case"Table":case"List":return Du.default.createElement($u,{image:$u.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return Du.default.createElement($u,{image:$u.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return Du.default.createElement($u,null)}},fM=A9;var z1=E($());var k9=(e,t,r=void 0)=>{var n,o;let{variant:i,[e]:a}=z1.useContext(rt),s=z1.useContext(NA),l=a?.variant,c;typeof t<"u"?c=t:r===!1?c="borderless":c=(o=(n=s??l)!==null&&n!==void 0?n:i)!==null&&o!==void 0?o:"outlined";let u=AC.includes(c);return[c,u]},qs=k9;var M9=e=>{let r={overflow:{adjustX:!0,adjustY:!0,shiftY:!0},htmlRegion:e==="scroll"?"scroll":"visible",dynamicInset:!0};return{bottomLeft:Object.assign(Object.assign({},r),{points:["tl","bl"],offset:[0,4]}),bottomRight:Object.assign(Object.assign({},r),{points:["tr","br"],offset:[0,4]}),topLeft:Object.assign(Object.assign({},r),{points:["bl","tl"],offset:[0,-4]}),topRight:Object.assign(Object.assign({},r),{points:["br","tr"],offset:[0,-4]})}};function F9(e,t){return e||M9(t)}var dM=F9;var pM=e=>{let{optionHeight:t,optionFontSize:r,optionLineHeight:n,optionPadding:o}=e;return{position:"relative",display:"block",minHeight:t,padding:o,color:e.colorText,fontWeight:"normal",fontSize:r,lineHeight:n,boxSizing:"border-box"}},L9=e=>{let{antCls:t,componentCls:r}=e,n=`${r}-item`,o=`&${t}-slide-up-enter${t}-slide-up-enter-active`,i=`&${t}-slide-up-appear${t}-slide-up-appear-active`,a=`&${t}-slide-up-leave${t}-slide-up-leave-active`,s=`${r}-dropdown-placement-`,l=`${n}-option-selected`;return[{[`${r}-dropdown`]:Object.assign(Object.assign({},sr(e)),{position:"absolute",top:-9999,zIndex:e.zIndexPopup,boxSizing:"border-box",padding:e.paddingXXS,overflow:"hidden",fontSize:e.fontSize,fontVariant:"initial",backgroundColor:e.colorBgElevated,borderRadius:e.borderRadiusLG,outline:"none",boxShadow:e.boxShadowSecondary,[` + ${o}${s}bottomLeft, ${i}${s}bottomLeft - `]:{animationName:ty},[` - ${n}${s}topLeft, + `]:{animationName:Nv},[` + ${o}${s}topLeft, ${i}${s}topLeft, - ${n}${s}topRight, + ${o}${s}topRight, ${i}${s}topRight - `]:{animationName:oy},[`${a}${s}bottomLeft`]:{animationName:ry},[` + `]:{animationName:$v},[`${a}${s}bottomLeft`]:{animationName:Iv},[` ${a}${s}topLeft, ${a}${s}topRight - `]:{animationName:ny},"&-hidden":{display:"none"},[o]:Object.assign(Object.assign({},rk(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Ni),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${o}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${o}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${o}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${o}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},rk(e)),{color:e.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},iy(e,"slide-up"),iy(e,"slide-down"),ey(e,"move-up"),ey(e,"move-down")]},ok=wU;var EU=e=>{let{multipleSelectItemHeight:t,paddingXXS:r,lineWidth:o,INTERNAL_FIXED_ITEM_MARGIN:n}=e,i=e.max(e.calc(r).sub(o).equal(),0),a=e.max(e.calc(i).sub(n).equal(),0);return{basePadding:i,containerPadding:a,itemHeight:re(t),itemLineHeight:re(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},RU=e=>{let{multipleSelectItemHeight:t,selectHeight:r,lineWidth:o}=e;return e.calc(r).sub(t).div(2).sub(o).equal()},OU=e=>{let{componentCls:t,iconCls:r,borderRadiusSM:o,motionDurationSlow:n,paddingXS:i,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:o,cursor:"default",transition:`font-size ${n}, line-height ${n}, height ${n}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:i,paddingInlineEnd:e.calc(i).div(2).equal(),[`${t}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(i).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},Aa()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},_U=(e,t)=>{let{componentCls:r,INTERNAL_FIXED_ITEM_MARGIN:o}=e,n=`${r}-selection-overflow`,i=e.multipleSelectItemHeight,a=RU(e),s=t?`${r}-${t}`:"",l=EU(e);return{[`${r}-multiple${s}`]:Object.assign(Object.assign({},OU(e)),{[`${r}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:e.borderRadius,[`${r}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${re(o)} 0`,lineHeight:re(i),visibility:"hidden",content:'"\\a0"'}},[`${r}-selection-item`]:{height:l.itemHeight,lineHeight:re(l.itemLineHeight)},[`${r}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:re(i),marginBlock:o}},[`${r}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${n}-item + ${n}-item, + `]:{animationName:Dv},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},pM(e)),{cursor:"pointer",transition:`background ${e.motionDurationSlow} ease`,borderRadius:e.borderRadiusSM,"&-group":{color:e.colorTextDescription,fontSize:e.fontSizeSM,cursor:"default"},"&-option":{display:"flex","&-content":Object.assign({flex:"auto"},Oa),"&-state":{flex:"none",display:"flex",alignItems:"center"},[`&-active:not(${n}-option-disabled)`]:{backgroundColor:e.optionActiveBg},[`&-selected:not(${n}-option-disabled)`]:{color:e.optionSelectedColor,fontWeight:e.optionSelectedFontWeight,backgroundColor:e.optionSelectedBg,[`${n}-option-state`]:{color:e.colorPrimary}},"&-disabled":{[`&${n}-option-selected`]:{backgroundColor:e.colorBgContainerDisabled},color:e.colorTextDisabled,cursor:"not-allowed"},"&-grouped":{paddingInlineStart:e.calc(e.controlPaddingHorizontal).mul(2).equal()}},"&-empty":Object.assign(Object.assign({},pM(e)),{color:e.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},Av(e,"slide-up"),Av(e,"slide-down"),Tv(e,"move-up"),Tv(e,"move-down")]},mM=L9;var z9=e=>{let{multipleSelectItemHeight:t,paddingXXS:r,lineWidth:n,INTERNAL_FIXED_ITEM_MARGIN:o}=e,i=e.max(e.calc(r).sub(n).equal(),0),a=e.max(e.calc(i).sub(o).equal(),0);return{basePadding:i,containerPadding:a,itemHeight:oe(t),itemLineHeight:oe(e.calc(t).sub(e.calc(e.lineWidth).mul(2)).equal())}},W9=e=>{let{multipleSelectItemHeight:t,selectHeight:r,lineWidth:n}=e;return e.calc(r).sub(t).div(2).sub(n).equal()},B9=e=>{let{componentCls:t,iconCls:r,borderRadiusSM:n,motionDurationSlow:o,paddingXS:i,multipleItemColorDisabled:a,multipleItemBorderColorDisabled:s,colorIcon:l,colorIconHover:c,INTERNAL_FIXED_ITEM_MARGIN:u}=e;return{[`${t}-selection-overflow`]:{position:"relative",display:"flex",flex:"auto",flexWrap:"wrap",maxWidth:"100%","&-item":{flex:"none",alignSelf:"center",maxWidth:"100%",display:"inline-flex"},[`${t}-selection-item`]:{display:"flex",alignSelf:"center",flex:"none",boxSizing:"border-box",maxWidth:"100%",marginBlock:u,borderRadius:n,cursor:"default",transition:`font-size ${o}, line-height ${o}, height ${o}`,marginInlineEnd:e.calc(u).mul(2).equal(),paddingInlineStart:i,paddingInlineEnd:e.calc(i).div(2).equal(),[`${t}-disabled&`]:{color:a,borderColor:s,cursor:"not-allowed"},"&-content":{display:"inline-block",marginInlineEnd:e.calc(i).div(2).equal(),overflow:"hidden",whiteSpace:"pre",textOverflow:"ellipsis"},"&-remove":Object.assign(Object.assign({},_a()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},j9=(e,t)=>{let{componentCls:r,INTERNAL_FIXED_ITEM_MARGIN:n}=e,o=`${r}-selection-overflow`,i=e.multipleSelectItemHeight,a=W9(e),s=t?`${r}-${t}`:"",l=z9(e);return{[`${r}-multiple${s}`]:Object.assign(Object.assign({},B9(e)),{[`${r}-selector`]:{display:"flex",alignItems:"center",width:"100%",height:"100%",paddingInline:l.basePadding,paddingBlock:l.containerPadding,borderRadius:e.borderRadius,[`${r}-disabled&`]:{background:e.multipleSelectorBgDisabled,cursor:"not-allowed"},"&:after":{display:"inline-block",width:0,margin:`${oe(n)} 0`,lineHeight:oe(i),visibility:"hidden",content:'"\\a0"'}},[`${r}-selection-item`]:{height:l.itemHeight,lineHeight:oe(l.itemLineHeight)},[`${r}-selection-wrap`]:{alignSelf:"flex-start","&:after":{lineHeight:oe(i),marginBlock:n}},[`${r}-prefix`]:{marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal()},[`${o}-item + ${o}-item, ${r}-prefix + ${r}-selection-wrap - `]:{[`${r}-selection-search`]:{marginInlineStart:0},[`${r}-selection-placeholder`]:{insetInlineStart:0}},[`${n}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:o},[`${r}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:re(i),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${r}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function vE(e,t){let{componentCls:r}=e,o=t?`${r}-${t}`:"",n={[`${r}-multiple${o}`]:{fontSize:e.fontSize,[`${r}-selector`]:{[`${r}-show-search&`]:{cursor:"text"}},[` + `]:{[`${r}-selection-search`]:{marginInlineStart:0},[`${r}-selection-placeholder`]:{insetInlineStart:0}},[`${o}-item-suffix`]:{minHeight:l.itemHeight,marginBlock:n},[`${r}-selection-search`]:{display:"inline-flex",position:"relative",maxWidth:"100%",marginInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(a).equal(),"\n &-input,\n &-mirror\n ":{height:i,fontFamily:e.fontFamily,lineHeight:oe(i),transition:`all ${e.motionDurationSlow}`},"&-input":{width:"100%",minWidth:4.1},"&-mirror":{position:"absolute",top:0,insetInlineStart:0,insetInlineEnd:"auto",zIndex:999,whiteSpace:"pre",visibility:"hidden"}},[`${r}-selection-placeholder`]:{position:"absolute",top:"50%",insetInlineStart:e.calc(e.inputPaddingHorizontalBase).sub(l.basePadding).equal(),insetInlineEnd:e.inputPaddingHorizontalBase,transform:"translateY(-50%)",transition:`all ${e.motionDurationSlow}`}})}};function W1(e,t){let{componentCls:r}=e,n=t?`${r}-${t}`:"",o={[`${r}-multiple${n}`]:{fontSize:e.fontSize,[`${r}-selector`]:{[`${r}-show-search&`]:{cursor:"text"}},[` &${r}-show-arrow ${r}-selector, &${r}-allow-clear ${r}-selector - `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[_U(e,t),n]}var PU=e=>{let{componentCls:t}=e,r=rt(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),o=rt(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[vE(e),vE(r,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},vE(o,"lg")]},nk=PU;function yE(e,t){let{componentCls:r,inputPaddingHorizontalBase:o,borderRadius:n}=e,i=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),a=t?`${r}-${t}`:"";return{[`${r}-single${a}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${r}-selector`]:Object.assign(Object.assign({},Qt(e,!0)),{display:"flex",borderRadius:n,flex:"1 1 auto",[`${r}-selection-wrap:after`]:{lineHeight:re(i)},[`${r}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[` + `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[j9(e,t),o]}var V9=e=>{let{componentCls:t}=e,r=ut(e,{selectHeight:e.controlHeightSM,multipleSelectItemHeight:e.multipleItemHeightSM,borderRadius:e.borderRadiusSM,borderRadiusSM:e.borderRadiusXS}),n=ut(e,{fontSize:e.fontSizeLG,selectHeight:e.controlHeightLG,multipleSelectItemHeight:e.multipleItemHeightLG,borderRadius:e.borderRadiusLG,borderRadiusSM:e.borderRadius});return[W1(e),W1(r,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},W1(n,"lg")]},gM=V9;function B1(e,t){let{componentCls:r,inputPaddingHorizontalBase:n,borderRadius:o}=e,i=e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),a=t?`${r}-${t}`:"";return{[`${r}-single${a}`]:{fontSize:e.fontSize,height:e.controlHeight,[`${r}-selector`]:Object.assign(Object.assign({},sr(e,!0)),{display:"flex",borderRadius:o,flex:"1 1 auto",[`${r}-selection-wrap:after`]:{lineHeight:oe(i)},[`${r}-selection-search`]:{position:"absolute",inset:0,width:"100%","&-input":{width:"100%",WebkitAppearance:"textfield"}},[` ${r}-selection-item, ${r}-selection-placeholder - `]:{display:"block",padding:0,lineHeight:re(i),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${r}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${r}-selection-item:empty:after`,`${r}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` + `]:{display:"block",padding:0,lineHeight:oe(i),transition:`all ${e.motionDurationSlow}, visibility 0s`,alignSelf:"center"},[`${r}-selection-placeholder`]:{transition:"none",pointerEvents:"none"},[["&:after",`${r}-selection-item:empty:after`,`${r}-selection-placeholder:empty:after`].join(",")]:{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'}}),[` &${r}-show-arrow ${r}-selection-item, &${r}-show-arrow ${r}-selection-search, &${r}-show-arrow ${r}-selection-placeholder - `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${r}-open ${r}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${r}-customize-input)`]:{[`${r}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${re(o)}`,[`${r}-selection-search-input`]:{height:i,fontSize:e.fontSize},"&:after":{lineHeight:re(i)}}},[`&${r}-customize-input`]:{[`${r}-selector`]:{"&:after":{display:"none"},[`${r}-selection-search`]:{position:"static",width:"100%"},[`${r}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${re(o)}`,"&:after":{display:"none"}}}}}}}function xE(e){let{componentCls:t}=e,r=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[yE(e),yE(rt(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${re(r)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(r).add(e.calc(e.fontSize).mul(1.5)).equal()},[` + `]:{paddingInlineEnd:e.showArrowPaddingInlineEnd},[`&${r}-open ${r}-selection-item`]:{color:e.colorTextPlaceholder},[`&:not(${r}-customize-input)`]:{[`${r}-selector`]:{width:"100%",height:"100%",alignItems:"center",padding:`0 ${oe(n)}`,[`${r}-selection-search-input`]:{height:i,fontSize:e.fontSize},"&:after":{lineHeight:oe(i)}}},[`&${r}-customize-input`]:{[`${r}-selector`]:{"&:after":{display:"none"},[`${r}-selection-search`]:{position:"static",width:"100%"},[`${r}-selection-placeholder`]:{position:"absolute",insetInlineStart:0,insetInlineEnd:0,padding:`0 ${oe(n)}`,"&:after":{display:"none"}}}}}}}function j1(e){let{componentCls:t}=e,r=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[B1(e),B1(ut(e,{controlHeight:e.controlHeightSM,borderRadius:e.borderRadiusSM}),"sm"),{[`${t}-single${t}-sm`]:{[`&:not(${t}-customize-input)`]:{[`${t}-selector`]:{padding:`0 ${oe(r)}`},[`&${t}-show-arrow ${t}-selection-search`]:{insetInlineEnd:e.calc(r).add(e.calc(e.fontSize).mul(1.5)).equal()},[` &${t}-show-arrow ${t}-selection-item, &${t}-show-arrow ${t}-selection-placeholder - `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},yE(rt(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}var ik=e=>{let{fontSize:t,lineHeight:r,lineWidth:o,controlHeight:n,controlHeightSM:i,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:d,controlItemBgActive:f,controlItemBgHover:m,colorBgContainer:h,colorFillSecondary:v,colorBgContainerDisabled:y,colorTextDisabled:g,colorPrimaryHover:p,colorPrimary:x,controlOutline:S}=e,b=s*2,w=o*2,C=Math.min(n-b,n-w),R=Math.min(i-b,i-w),_=Math.min(a-b,a-w);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:d,optionSelectedBg:f,optionActiveBg:m,optionPadding:`${(n-t*r)/2}px ${l}px`,optionFontSize:t,optionLineHeight:r,optionHeight:n,selectorBg:h,clearBg:h,singleItemHeightLG:a,multipleItemBg:v,multipleItemBorderColor:"transparent",multipleItemHeight:C,multipleItemHeightSM:R,multipleItemHeightLG:_,multipleSelectorBgDisabled:y,multipleItemColorDisabled:g,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:p,activeBorderColor:x,activeOutlineColor:S,selectAffixPadding:s}};var ck=(e,t)=>{let{componentCls:r,antCls:o,controlOutlineWidth:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{border:`${re(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${r}-disabled):not(${r}-customize-input):not(${o}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:t.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${re(n)} ${t.activeOutlineColor}`,outline:0},[`${r}-prefix`]:{color:t.color}}}},ak=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},ck(e,t))}),TU=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},ck(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),ak(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),ak(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${re(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),uk=(e,t)=>{let{componentCls:r,antCls:o}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{background:t.bg,border:`${re(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${r}-disabled):not(${r}-customize-input):not(${o}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{background:t.hoverBg},[`${r}-focused& ${r}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},sk=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},uk(e,t))}),NU=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},uk(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),sk(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),sk(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${re(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),IU=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${re(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${re(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),dk=(e,t)=>{let{componentCls:r,antCls:o}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{borderWidth:`0 0 ${re(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${r}-disabled):not(${r}-customize-input):not(${o}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:t.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${r}-prefix`]:{color:t.color}}}},lk=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},dk(e,t))}),$U=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},dk(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),lk(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),lk(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${re(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),DU=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},TU(e)),NU(e)),IU(e)),$U(e))}),fk=DU;var AU=e=>{let{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},MU=e=>{let{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},LU=e=>{let{antCls:t,componentCls:r,inputPaddingHorizontalBase:o,iconCls:n}=e;return{[r]:Object.assign(Object.assign({},Qt(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${r}-customize-input) ${r}-selector`]:Object.assign(Object.assign({},AU(e)),MU(e)),[`${r}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Ni),{[`> ${t}-typography`]:{display:"inline"}}),[`${r}-selection-placeholder`]:Object.assign(Object.assign({},Ni),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${r}-arrow`]:Object.assign(Object.assign({},Aa()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:o,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[n]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${r}-suffix)`]:{pointerEvents:"auto"}},[`${r}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${r}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${r}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:o,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorTextTertiary}},[`&:hover ${r}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}}),[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:e.calc(o).add(e.fontSize).add(e.paddingXS).equal()}}}}}},kU=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},LU(e),xE(e),nk(e),ok(e),{[`${t}-rtl`]:{direction:"rtl"}},Gs(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},pk=Pt("Select",(e,t)=>{let{rootPrefixCls:r}=t,o=rt(e,{rootPrefixCls:r,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[kU(o),fk(o)]},ik,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var ia=E(I());var Yy=E(I());var FU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},mk=FU;var zU=function(t,r){return Yy.createElement(mt,ee({},t,{ref:r,icon:mk}))},WU=Yy.forwardRef(zU),Qy=WU;var Zy=E(I());var BU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},gk=BU;var jU=function(t,r){return Zy.createElement(mt,ee({},t,{ref:r,icon:gk}))},VU=Zy.forwardRef(jU),Jy=VU;var e0=E(I());var HU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},hk=HU;var UU=function(t,r){return e0.createElement(mt,ee({},t,{ref:r,icon:hk}))},GU=e0.forwardRef(UU),t0=GU;function bE(e){let{suffixIcon:t,clearIcon:r,menuItemSelectedIcon:o,removeIcon:n,loading:i,multiple:a,hasFeedback:s,prefixCls:l,showSuffixIcon:c,feedbackIcon:u,showArrow:d,componentName:f}=e,m=r??ia.createElement(Au,null),h=p=>t===null&&!s&&!d?null:ia.createElement(ia.Fragment,null,c!==!1&&p,s&&u),v=null;if(t!==void 0)v=h(t);else if(i)v=h(ia.createElement(Kl,{spin:!0}));else{let p=`${l}-suffix`;v=x=>{let{open:S,showSearch:b}=x;return h(S&&b?ia.createElement(t0,{className:p}):ia.createElement(Jy,{className:p}))}}let y=null;o!==void 0?y=o:a?y=ia.createElement(Qy,null):y=null;let g=null;return n!==void 0?g=n:g=ia.createElement(Fa,null),{clearIcon:m,suffixIcon:v,itemIcon:y,removeIcon:g}}function SE(e,t){return t!==void 0?t:e!==null}var qU=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{var r;let{prefixCls:o,bordered:n,className:i,rootClassName:a,getPopupContainer:s,popupClassName:l,dropdownClassName:c,listHeight:u=256,placement:d,listItemHeight:f,size:m,disabled:h,notFoundContent:v,status:y,builtinPlacements:g,dropdownMatchSelectWidth:p,popupMatchSelectWidth:x,direction:S,style:b,allowClear:w,variant:C,dropdownStyle:R,transitionName:_,tagRender:O,maxCount:N,prefix:k}=e,L=qU(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix"]),{getPopupContainer:j,getPrefixCls:W,renderEmpty:D,direction:$,virtual:M,popupMatchSelectWidth:V,popupOverflow:F}=ai.useContext(at),z=Do("select"),[,U]=yr(),H=f??U?.controlHeight,A=W("select",o),G=W(),q=S??$,{compactSize:oe,compactItemClassnames:Z}=Zn(A,q),[X,ie]=ol("select",C,n),te=Mo(A),[K,Y,ne]=pk(A,te),Q=ai.useMemo(()=>{let{mode:Ue}=e;if(Ue!=="combobox")return Ue===vk?"combobox":Ue},[e.mode]),J=Q==="multiple"||Q==="tags",le=SE(e.suffixIcon,e.showArrow),ue=(r=x??p)!==null&&r!==void 0?r:V,{status:de,hasFeedback:ve,isFormItemInput:ye,feedbackIcon:we}=ai.useContext(fo),ce=na(de,y),ae;v!==void 0?ae=v:Q==="combobox"?ae=null:ae=D?.("Select")||ai.createElement(ek,{componentName:"Select"});let{suffixIcon:Re,itemIcon:Me,removeIcon:Be,clearIcon:Ie}=bE(Object.assign(Object.assign({},L),{multiple:J,hasFeedback:ve,feedbackIcon:we,showSuffixIcon:le,prefixCls:A,componentName:"Select"})),Oe=w===!0?{clearIcon:Ie}:w,be=Gr(L,["suffixIcon","itemIcon"]),Ve=(0,CE.default)(l||c,{[`${A}-dropdown-${q}`]:q==="rtl"},a,ne,te,Y),He=pn(Ue=>{var Qe;return(Qe=m??oe)!==null&&Qe!==void 0?Qe:Ue}),$e=ai.useContext(Ur),fe=h??$e,me=(0,CE.default)({[`${A}-lg`]:He==="large",[`${A}-sm`]:He==="small",[`${A}-rtl`]:q==="rtl",[`${A}-${X}`]:ie,[`${A}-in-form-item`]:ye},oa(A,ce,ve),Z,z.className,i,a,ne,te,Y),ze=ai.useMemo(()=>d!==void 0?d:q==="rtl"?"bottomRight":"bottomLeft",[d,q]),[Ce]=js("SelectLike",R?.zIndex);return K(ai.createElement(GL,Object.assign({ref:t,virtual:M,showSearch:z.showSearch},be,{style:Object.assign(Object.assign({},z.style),b),dropdownMatchSelectWidth:ue,transitionName:Ji(G,"slide-up",_),builtinPlacements:tk(g,F),listHeight:u,listItemHeight:H,mode:Q,prefixCls:A,placement:ze,direction:q,prefix:k,suffixIcon:Re,menuItemSelectedIcon:Me,removeIcon:Be,allowClear:Oe,notFoundContent:ae,className:me,getPopupContainer:s||j,dropdownClassName:Ve,disabled:fe,dropdownStyle:Object.assign(Object.assign({},R),{zIndex:Ce}),maxCount:J?N:void 0,tagRender:J?O:void 0})))},rd=ai.forwardRef(KU),XU=SM(rd,"dropdownAlign");rd.SECRET_COMBOBOX_MODE_DO_NOT_USE=vk;rd.Option=_p;rd.OptGroup=Op;rd._InternalPanelDoNotUseOrYouWillBeFired=XU;var Np=rd;var yk=E(I());function wE(){let[,e]=yk.useReducer(t=>t+1,0);return e}var Co=E(I()),a0=E(Ee());var EE=E(Ee()),RE=E(I());function od(e){var t=e.children,r=e.prefixCls,o=e.id,n=e.overlayInnerStyle,i=e.bodyClassName,a=e.className,s=e.style;return RE.createElement("div",{className:(0,EE.default)("".concat(r,"-content"),a),style:s},RE.createElement("div",{className:(0,EE.default)("".concat(r,"-inner"),i),id:o,role:"tooltip",style:n},typeof t=="function"?t():t))}var bk=E(Ee()),lc=E(I()),ad=E(I());var nd={shiftX:64,adjustY:1},id={adjustX:1,shiftY:!0},si=[0,0],xk={left:{points:["cr","cl"],overflow:id,offset:[-4,0],targetOffset:si},right:{points:["cl","cr"],overflow:id,offset:[4,0],targetOffset:si},top:{points:["bc","tc"],overflow:nd,offset:[0,-4],targetOffset:si},bottom:{points:["tc","bc"],overflow:nd,offset:[0,4],targetOffset:si},topLeft:{points:["bl","tl"],overflow:nd,offset:[0,-4],targetOffset:si},leftTop:{points:["tr","tl"],overflow:id,offset:[-4,0],targetOffset:si},topRight:{points:["br","tr"],overflow:nd,offset:[0,-4],targetOffset:si},rightTop:{points:["tl","tr"],overflow:id,offset:[4,0],targetOffset:si},bottomRight:{points:["tr","br"],overflow:nd,offset:[0,4],targetOffset:si},rightBottom:{points:["bl","br"],overflow:id,offset:[4,0],targetOffset:si},bottomLeft:{points:["tl","bl"],overflow:nd,offset:[0,4],targetOffset:si},leftBottom:{points:["br","bl"],overflow:id,offset:[-4,0],targetOffset:si}};var YU=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],QU=function(t,r){var o=t.overlayClassName,n=t.trigger,i=n===void 0?["hover"]:n,a=t.mouseEnterDelay,s=a===void 0?0:a,l=t.mouseLeaveDelay,c=l===void 0?.1:l,u=t.overlayStyle,d=t.prefixCls,f=d===void 0?"rc-tooltip":d,m=t.children,h=t.onVisibleChange,v=t.afterVisibleChange,y=t.transitionName,g=t.animation,p=t.motion,x=t.placement,S=x===void 0?"right":x,b=t.align,w=b===void 0?{}:b,C=t.destroyTooltipOnHide,R=C===void 0?!1:C,_=t.defaultVisible,O=t.getTooltipContainer,N=t.overlayInnerStyle,k=t.arrowContent,L=t.overlay,j=t.id,W=t.showArrow,D=W===void 0?!0:W,$=t.classNames,M=t.styles,V=Ae(t,YU),F=ku(j),z=(0,ad.useRef)(null);(0,ad.useImperativeHandle)(r,function(){return z.current});var U=P({},V);"visible"in t&&(U.popupVisible=t.visible);var H=function(){return lc.createElement(od,{key:"content",prefixCls:f,id:F,bodyClassName:$?.body,overlayInnerStyle:P(P({},N),M?.body)},L)},A=function(){var q=lc.Children.only(m),oe=q?.props||{},Z=P(P({},oe),{},{"aria-describedby":L?F:null});return lc.cloneElement(m,Z)};return lc.createElement(Wy,ee({popupClassName:(0,bk.default)(o,$?.root),prefixCls:f,popup:H,action:i,builtinPlacements:xk,popupPlacement:S,ref:z,popupAlign:w,getPopupContainer:O,onPopupVisibleChange:h,afterPopupVisibleChange:v,popupTransitionName:y,popupAnimation:g,popupMotion:p,defaultPopupVisible:_,autoDestroy:R,mouseLeaveDelay:c,popupStyle:P(P({},u),M?.root),mouseEnterDelay:s,arrow:D},U),A())},Sk=(0,ad.forwardRef)(QU);var Ck=Sk;function wk(e){let{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:o}=e,n=t/2,i=0,a=n,s=o*1/Math.sqrt(2),l=n-o*(1-1/Math.sqrt(2)),c=n-r*(1/Math.sqrt(2)),u=o*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),d=2*n-c,f=u,m=2*n-s,h=l,v=2*n-i,y=a,g=n*Math.sqrt(2)+o*(Math.sqrt(2)-2),p=o*(Math.sqrt(2)-1),x=`polygon(${p}px 100%, 50% ${p}px, ${2*n-p}px 100%, ${p}px 100%)`,S=`path('M ${i} ${a} A ${o} ${o} 0 0 0 ${s} ${l} L ${c} ${u} A ${r} ${r} 0 0 1 ${d} ${f} L ${m} ${h} A ${o} ${o} 0 0 0 ${v} ${y} Z')`;return{arrowShadowWidth:g,arrowPath:S,arrowPolygon:x}}var Ek=(e,t,r)=>{let{sizePopupArrow:o,arrowPolygon:n,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e;return{pointerEvents:"none",width:o,height:o,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:o,height:l(o).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[n,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${re(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}};var OE=8;function o0(e){let{contentRadius:t,limitVerticalRadius:r}=e,o=t>12?t+2:12;return{arrowOffsetHorizontal:o,arrowOffsetVertical:r?OE:o}}function r0(e,t){return e?t:{}}function _E(e,t,r){let{componentCls:o,boxShadowPopoverArrow:n,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=e,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=r||{};return{[o]:Object.assign(Object.assign(Object.assign(Object.assign({[`${o}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},Ek(e,t,n)),{"&:before":{background:t}})]},r0(!!l.top,{[[`&-placement-top > ${o}-arrow`,`&-placement-topLeft > ${o}-arrow`,`&-placement-topRight > ${o}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${o}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${o}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${re(a)})`,[`> ${o}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),r0(!!l.bottom,{[[`&-placement-bottom > ${o}-arrow`,`&-placement-bottomLeft > ${o}-arrow`,`&-placement-bottomRight > ${o}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${o}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${o}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${re(a)})`,[`> ${o}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),r0(!!l.left,{[[`&-placement-left > ${o}-arrow`,`&-placement-leftTop > ${o}-arrow`,`&-placement-leftBottom > ${o}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${o}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${o}-arrow`]:{top:i},[`&-placement-leftBottom > ${o}-arrow`]:{bottom:i}})),r0(!!l.right,{[[`&-placement-right > ${o}-arrow`,`&-placement-rightTop > ${o}-arrow`,`&-placement-rightBottom > ${o}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${o}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${o}-arrow`]:{top:i},[`&-placement-rightBottom > ${o}-arrow`]:{bottom:i}}))}}function ZU(e,t,r,o){if(o===!1)return{adjustX:!1,adjustY:!1};let n=o&&typeof o=="object"?o:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+r,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+r,i.shiftX=!0,i.adjustX=!0;break}let a=Object.assign(Object.assign({},i),n);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}var Rk={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},JU={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},e9=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function PE(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:o,offset:n,borderRadius:i,visibleFirst:a}=e,s=t/2,l={};return Object.keys(Rk).forEach(c=>{let u=o&&JU[c]||Rk[c],d=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=d,e9.has(c)&&(d.autoArrow=!1),c){case"top":case"topLeft":case"topRight":d.offset[1]=-s-n;break;case"bottom":case"bottomLeft":case"bottomRight":d.offset[1]=s+n;break;case"left":case"leftTop":case"leftBottom":d.offset[0]=-s-n;break;case"right":case"rightTop":case"rightBottom":d.offset[0]=s+n;break}let f=o0({contentRadius:i,limitVerticalRadius:!0});if(o)switch(c){case"topLeft":case"bottomLeft":d.offset[0]=-f.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":d.offset[0]=f.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":d.offset[1]=-f.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":d.offset[1]=f.arrowOffsetHorizontal*2-s;break}d.overflow=ZU(c,f,t,r),a&&(d.htmlRegion="visibleFirst")}),l}var sd=E(I()),Pk=E(Ee());var t9=e=>{let{calc:t,componentCls:r,tooltipMaxWidth:o,tooltipColor:n,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:d,arrowOffsetHorizontal:f,sizePopupArrow:m}=e,h=t(a).add(m).add(f).equal(),v=t(a).mul(2).add(m).equal();return[{[r]:Object.assign(Object.assign(Object.assign(Object.assign({},Qt(e)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:o,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${r}-inner`]:{minWidth:v,minHeight:l,padding:`${re(e.calc(u).div(2).equal())} ${re(d)}`,color:n,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:h},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(a,OE)}},[`${r}-content`]:{position:"relative"}}),mv(e,(y,g)=>{let{darkColor:p}=g;return{[`&${r}-${y}`]:{[`${r}-inner`]:{backgroundColor:p},[`${r}-arrow`]:{"--antd-arrow-background-color":p}}}})),{"&-rtl":{direction:"rtl"}})},_E(e,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},r9=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},o0({contentRadius:e.borderRadius,limitVerticalRadius:!0})),wk(rt(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),n0=function(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;return Pt("Tooltip",o=>{let{borderRadius:n,colorTextLightSolid:i,colorBgSpotlight:a}=o,s=rt(o,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:n,tooltipBg:a});return[t9(s),Ql(o,"zoom-big-fast")]},r9,{resetStyle:!1,injectStyle:t})(e)};var _k=E(Ee());var o9=In.map(e=>`${e}-inverse`);function Ok(e){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat(se(o9),se(In)).includes(e):In.includes(e)}function i0(e,t){let r=Ok(t),o=(0,_k.default)({[`${e}-${t}`]:t&&r}),n={},i={};return t&&!r&&(n.background=t,i["--antd-arrow-background-color"]=t),{className:o,overlayStyle:n,arrowStyle:i}}var n9=e=>{let{prefixCls:t,className:r,placement:o="top",title:n,color:i,overlayInnerStyle:a}=e,{getPrefixCls:s}=sd.useContext(at),l=s("tooltip",t),[c,u,d]=n0(l),f=i0(l,i),m=f.arrowStyle,h=Object.assign(Object.assign({},a),f.overlayStyle),v=(0,Pk.default)(u,d,l,`${l}-pure`,`${l}-placement-${o}`,r,f.className);return c(sd.createElement("div",{className:v,style:m},sd.createElement("div",{className:`${l}-arrow`}),sd.createElement(od,Object.assign({},e,{className:u,prefixCls:l,overlayInnerStyle:h}),n)))},Tk=n9;var i9=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{var r,o;let{prefixCls:n,openClassName:i,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:d,destroyTooltipOnHide:f,arrow:m=!0,title:h,overlay:v,builtinPlacements:y,arrowPointAtCenter:g=!1,autoAdjustOverflow:p=!0,motion:x,getPopupContainer:S,placement:b="top",mouseEnterDelay:w=.1,mouseLeaveDelay:C=.1,overlayStyle:R,rootClassName:_,overlayClassName:O,styles:N,classNames:k}=e,L=i9(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),j=!!m,[,W]=yr(),{getPopupContainer:D,getPrefixCls:$,direction:M,className:V,style:F,classNames:z,styles:U}=Do("tooltip"),H=Zh("Tooltip"),A=Co.useRef(null),G=()=>{var be;(be=A.current)===null||be===void 0||be.forceAlign()};Co.useImperativeHandle(t,()=>{var be,Ve;return{forceAlign:G,forcePopupAlign:()=>{H.deprecated(!1,"forcePopupAlign","forceAlign"),G()},nativeElement:(be=A.current)===null||be===void 0?void 0:be.nativeElement,popupElement:(Ve=A.current)===null||Ve===void 0?void 0:Ve.popupElement}});let[q,oe]=zt(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(o=e.defaultOpen)!==null&&o!==void 0?o:e.defaultVisible}),Z=!h&&!v&&h!==0,X=be=>{var Ve,He;oe(Z?!1:be),Z||((Ve=e.onOpenChange)===null||Ve===void 0||Ve.call(e,be),(He=e.onVisibleChange)===null||He===void 0||He.call(e,be))},ie=Co.useMemo(()=>{var be,Ve;let He=g;return typeof m=="object"&&(He=(Ve=(be=m.pointAtCenter)!==null&&be!==void 0?be:m.arrowPointAtCenter)!==null&&Ve!==void 0?Ve:g),y||PE({arrowPointAtCenter:He,autoAdjustOverflow:p,arrowWidth:j?W.sizePopupArrow:0,borderRadius:W.borderRadius,offset:W.marginXXS,visibleFirst:!0})},[g,m,y,W]),te=Co.useMemo(()=>h===0?h:v||h||"",[v,h]),K=Co.createElement(Ys,{space:!0},typeof te=="function"?te():te),Y=$("tooltip",n),ne=$(),Q=e["data-popover-inject"],J=q;!("open"in e)&&!("visible"in e)&&Z&&(J=!1);let le=Co.isValidElement(c)&&!jv(c)?c:Co.createElement("span",null,c),ue=le.props,de=!ue.className||typeof ue.className=="string"?(0,a0.default)(ue.className,i||`${Y}-open`):ue.className,[ve,ye,we]=n0(Y,!Q),ce=i0(Y,s),ae=ce.arrowStyle,Re=(0,a0.default)(O,{[`${Y}-rtl`]:M==="rtl"},ce.className,_,ye,we,V,z.root,k?.root),Me=(0,a0.default)(z.body,k?.body),[Be,Ie]=js("Tooltip",L.zIndex),Oe=Co.createElement(Ck,Object.assign({},L,{zIndex:Be,showArrow:j,placement:b,mouseEnterDelay:w,mouseLeaveDelay:C,prefixCls:Y,classNames:{root:Re,body:Me},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},ae),U.root),F),R),N?.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},U.body),l),N?.body),ce.overlayStyle)},getTooltipContainer:S||a||D,ref:A,builtinPlacements:ie,overlay:K,visible:J,onVisibleChange:X,afterVisibleChange:u??d,arrowContent:Co.createElement("span",{className:`${Y}-arrow-content`}),motion:{motionName:Ji(ne,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!f}),J?Qn(le,{className:de}):le);return ve(Co.createElement(Hv.Provider,{value:Ie},Oe))}),Nk=a9;Nk._InternalPanelDoNotUseOrYouWillBeFired=Tk;var Ha=Nk;var s0=E(I());var s9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},Ik=s9;var l9=function(t,r){return s0.createElement(mt,ee({},t,{ref:r,icon:Ik}))},c9=s0.forwardRef(l9),$k=c9;var Dk=E(Ee());var l0=E(I()),cc=E(I()),u9=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],d9=(0,cc.forwardRef)(function(e,t){var r=e.prefixCls,o=r===void 0?"rc-checkbox":r,n=e.className,i=e.style,a=e.checked,s=e.disabled,l=e.defaultChecked,c=l===void 0?!1:l,u=e.type,d=u===void 0?"checkbox":u,f=e.title,m=e.onChange,h=Ae(e,u9),v=(0,cc.useRef)(null),y=(0,cc.useRef)(null),g=zt(c,{value:a}),p=B(g,2),x=p[0],S=p[1];(0,cc.useImperativeHandle)(t,function(){return{focus:function(R){var _;(_=v.current)===null||_===void 0||_.focus(R)},blur:function(){var R;(R=v.current)===null||R===void 0||R.blur()},input:v.current,nativeElement:y.current}});var b=(0,Dk.default)(o,n,T(T({},"".concat(o,"-checked"),x),"".concat(o,"-disabled"),s)),w=function(R){s||("checked"in e||S(R.target.checked),m?.({target:P(P({},e),{},{type:d,checked:R.target.checked}),stopPropagation:function(){R.stopPropagation()},preventDefault:function(){R.preventDefault()},nativeEvent:R.nativeEvent}))};return l0.createElement("span",{className:b,title:f,style:i,ref:y},l0.createElement("input",ee({},h,{className:"".concat(o,"-input"),ref:v,onChange:w,disabled:s,checked:!!x,type:d})),l0.createElement("span",{className:"".concat(o,"-inner")}))}),Ak=d9;var Mk=E(I());function TE(e){let t=Mk.default.useRef(null),r=()=>{ut.cancel(t.current),t.current=null};return[()=>{r(),t.current=ut(()=>{t.current=null})},i=>{t.current&&(i.stopPropagation(),r()),e?.(i)}]}function Ua(e){return rt(e,{inputAffixPadding:e.paddingXXS})}var Ga=e=>{let{controlHeight:t,fontSize:r,lineHeight:o,lineWidth:n,controlHeightSM:i,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:d,colorFillAlter:f,colorPrimaryHover:m,colorPrimary:h,controlOutlineWidth:v,controlOutline:y,colorErrorOutline:g,colorWarningOutline:p,colorBgContainer:x,inputFontSize:S,inputFontSizeLG:b,inputFontSizeSM:w}=e,C=S||r,R=w||C,_=b||s,O=Math.round((t-C*o)/2*10)/10-n,N=Math.round((i-R*o)/2*10)/10-n,k=Math.ceil((a-_*l)/2*10)/10-n;return{paddingBlock:Math.max(O,0),paddingBlockSM:Math.max(N,0),paddingBlockLG:Math.max(k,0),paddingInline:c-n,paddingInlineSM:u-n,paddingInlineLG:d-n,addonBg:f,activeBorderColor:h,hoverBorderColor:m,activeShadow:`0 0 0 ${v}px ${y}`,errorActiveShadow:`0 0 0 ${v}px ${g}`,warningActiveShadow:`0 0 0 ${v}px ${p}`,hoverBg:x,activeBg:x,inputFontSize:C,inputFontSizeLG:_,inputFontSizeSM:R}};var f9=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),NE=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},f9(rt(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),Bk=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),Lk=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Bk(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),c0=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Bk(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},NE(e))}),Lk(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),Lk(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),kk=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),u0=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${re(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},kk(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),kk(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},NE(e))}})}),d0=(e,t)=>{let{componentCls:r}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},jk=(e,t)=>{var r;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(r=t?.inputColor)!==null&&r!==void 0?r:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},Fk=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},jk(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),f0=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},jk(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},NE(e))}),Fk(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),Fk(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),zk=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),p0=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary},[`${e.componentCls}-filled:not(:focus):not(:focus-within)`]:{"&:not(:first-child)":{borderInlineStart:`${re(e.lineWidth)} ${e.lineType} ${e.colorSplit}`},"&:not(:last-child)":{borderInlineEnd:`${re(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}}}},zk(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),zk(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${re(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${re(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${re(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${re(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${re(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${re(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),Vk=(e,t)=>({background:e.colorBgContainer,borderWidth:`${re(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.borderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),Wk=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},Vk(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),m0=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Vk(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),Wk(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),Wk(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)});var IE=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}});var Hk=e=>{let{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:o,paddingInlineLG:n}=e;return{padding:`${re(t)} ${re(n)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:o}},Uk=e=>({padding:`${re(e.paddingBlockSM)} ${re(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),Ip=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${re(e.paddingBlock)} ${re(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},IE(e.colorTextPlaceholder)),{"&-lg":Object.assign({},Hk(e)),"&-sm":Object.assign({},Uk(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),$E=e=>{let{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},Hk(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},Uk(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${re(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${re(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${re(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${re(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${r}-cascader-picker`]:{margin:`-9px ${re(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},$u()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[` + `]:{paddingInlineEnd:e.calc(e.fontSize).mul(1.5).equal()}}}},B1(ut(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}var hM=e=>{let{fontSize:t,lineHeight:r,lineWidth:n,controlHeight:o,controlHeightSM:i,controlHeightLG:a,paddingXXS:s,controlPaddingHorizontal:l,zIndexPopupBase:c,colorText:u,fontWeightStrong:f,controlItemBgActive:p,controlItemBgHover:g,colorBgContainer:h,colorFillSecondary:v,colorBgContainerDisabled:y,colorTextDisabled:m,colorPrimaryHover:d,colorPrimary:x,controlOutline:b}=e,S=s*2,w=n*2,C=Math.min(o-S,o-w),R=Math.min(i-S,i-w),P=Math.min(a-S,a-w);return{INTERNAL_FIXED_ITEM_MARGIN:Math.floor(s/2),zIndexPopup:c+50,optionSelectedColor:u,optionSelectedFontWeight:f,optionSelectedBg:p,optionActiveBg:g,optionPadding:`${(o-t*r)/2}px ${l}px`,optionFontSize:t,optionLineHeight:r,optionHeight:o,selectorBg:h,clearBg:h,singleItemHeightLG:a,multipleItemBg:v,multipleItemBorderColor:"transparent",multipleItemHeight:C,multipleItemHeightSM:R,multipleItemHeightLG:P,multipleSelectorBgDisabled:y,multipleItemColorDisabled:m,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:d,activeBorderColor:x,activeOutlineColor:b,selectAffixPadding:s}};var bM=(e,t)=>{let{componentCls:r,antCls:n,controlOutlineWidth:o}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{border:`${oe(e.lineWidth)} ${e.lineType} ${t.borderColor}`,background:e.selectorBg},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:t.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:t.activeBorderColor,boxShadow:`0 0 0 ${oe(o)} ${t.activeOutlineColor}`,outline:0},[`${r}-prefix`]:{color:t.color}}}},vM=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},bM(e,t))}),H9=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},bM(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),vM(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),vM(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${oe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),SM=(e,t)=>{let{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{background:t.bg,border:`${oe(e.lineWidth)} ${e.lineType} transparent`,color:t.color},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{background:t.hoverBg},[`${r}-focused& ${r}-selector`]:{background:e.selectorBg,borderColor:t.activeBorderColor,outline:0}}}},yM=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},SM(e,t))}),U9=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},SM(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),yM(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),yM(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{borderColor:e.colorBorder,background:e.colorBgContainerDisabled,color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.colorBgContainer,border:`${oe(e.lineWidth)} ${e.lineType} ${e.colorSplit}`}})}),q9=e=>({"&-borderless":{[`${e.componentCls}-selector`]:{background:"transparent",border:`${oe(e.lineWidth)} ${e.lineType} transparent`},[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${oe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`},[`&${e.componentCls}-status-error`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorError}},[`&${e.componentCls}-status-warning`]:{[`${e.componentCls}-prefix, ${e.componentCls}-selection-item`]:{color:e.colorWarning}}}}),CM=(e,t)=>{let{componentCls:r,antCls:n}=e;return{[`&:not(${r}-customize-input) ${r}-selector`]:{borderWidth:`0 0 ${oe(e.lineWidth)} 0`,borderStyle:`none none ${e.lineType} none`,borderColor:t.borderColor,background:e.selectorBg,borderRadius:0},[`&:not(${r}-disabled):not(${r}-customize-input):not(${n}-pagination-size-changer)`]:{[`&:hover ${r}-selector`]:{borderColor:t.hoverBorderHover},[`${r}-focused& ${r}-selector`]:{borderColor:t.activeBorderColor,outline:0},[`${r}-prefix`]:{color:t.color}}}},xM=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},CM(e,t))}),G9=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},CM(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),xM(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),xM(e,{status:"warning",borderColor:e.colorWarning,hoverBorderHover:e.colorWarningHover,activeBorderColor:e.colorWarning,activeOutlineColor:e.colorWarningOutline,color:e.colorWarning})),{[`&${e.componentCls}-disabled`]:{[`&:not(${e.componentCls}-customize-input) ${e.componentCls}-selector`]:{color:e.colorTextDisabled}},[`&${e.componentCls}-multiple ${e.componentCls}-selection-item`]:{background:e.multipleItemBg,border:`${oe(e.lineWidth)} ${e.lineType} ${e.multipleItemBorderColor}`}})}),K9=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},H9(e)),U9(e)),q9(e)),G9(e))}),wM=K9;var X9=e=>{let{componentCls:t}=e;return{position:"relative",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,input:{cursor:"pointer"},[`${t}-show-search&`]:{cursor:"text",input:{cursor:"auto",color:"inherit",height:"100%"}},[`${t}-disabled&`]:{cursor:"not-allowed",input:{cursor:"not-allowed"}}}},Y9=e=>{let{componentCls:t}=e;return{[`${t}-selection-search-input`]:{margin:0,padding:0,background:"transparent",border:"none",outline:"none",appearance:"none",fontFamily:"inherit","&::-webkit-search-cancel-button":{display:"none",appearance:"none"}}}},Q9=e=>{let{antCls:t,componentCls:r,inputPaddingHorizontalBase:n,iconCls:o}=e,i={[`${r}-clear`]:{opacity:1,background:e.colorBgBase,borderRadius:"50%"}};return{[r]:Object.assign(Object.assign({},sr(e)),{position:"relative",display:"inline-flex",cursor:"pointer",[`&:not(${r}-customize-input) ${r}-selector`]:Object.assign(Object.assign({},X9(e)),Y9(e)),[`${r}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},Oa),{[`> ${t}-typography`]:{display:"inline"}}),[`${r}-selection-placeholder`]:Object.assign(Object.assign({},Oa),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${r}-arrow`]:Object.assign(Object.assign({},_a()),{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,lineHeight:1,textAlign:"center",pointerEvents:"none",display:"flex",alignItems:"center",transition:`opacity ${e.motionDurationSlow} ease`,[o]:{verticalAlign:"top",transition:`transform ${e.motionDurationSlow}`,"> svg":{verticalAlign:"top"},[`&:not(${r}-suffix)`]:{pointerEvents:"auto"}},[`${r}-disabled &`]:{cursor:"not-allowed"},"> *:not(:last-child)":{marginInlineEnd:8}}),[`${r}-selection-wrap`]:{display:"flex",width:"100%",position:"relative",minWidth:0,"&:after":{content:'"\\a0"',width:0,overflow:"hidden"}},[`${r}-prefix`]:{flex:"none",marginInlineEnd:e.selectAffixPadding},[`${r}-clear`]:{position:"absolute",top:"50%",insetInlineStart:"auto",insetInlineEnd:n,zIndex:1,display:"inline-block",width:e.fontSizeIcon,height:e.fontSizeIcon,marginTop:e.calc(e.fontSizeIcon).mul(-1).div(2).equal(),color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,fontStyle:"normal",lineHeight:1,textAlign:"center",textTransform:"none",cursor:"pointer",opacity:0,transition:`color ${e.motionDurationMid} ease, opacity ${e.motionDurationSlow} ease`,textRendering:"auto","&:before":{display:"block"},"&:hover":{color:e.colorIcon}},"@media(hover:none)":i,"&:hover":i}),[`${r}-status`]:{"&-error, &-warning, &-success, &-validating":{[`&${r}-has-feedback`]:{[`${r}-clear`]:{insetInlineEnd:e.calc(n).add(e.fontSize).add(e.paddingXS).equal()}}}}}},J9=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},Q9(e),j1(e),gM(e),mM(e),{[`${t}-rtl`]:{direction:"rtl"}},ks(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},EM=Gt("Select",(e,{rootPrefixCls:t})=>{let r=ut(e,{rootPrefixCls:t,inputPaddingHorizontalBase:e.calc(e.paddingSM).sub(1).equal(),multipleSelectItemHeight:e.multipleItemHeight,selectHeight:e.controlHeight});return[J9(r),wM(r)]},hM,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Ji=E($());var Ry=E($());var Z9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 190h-69.9c-9.8 0-19.1 4.5-25.1 12.2L404.7 724.5 207 474a32 32 0 00-25.1-12.2H112c-6.7 0-10.4 7.7-6.3 12.9l273.9 347c12.8 16.2 37.4 16.2 50.3 0l488.4-618.9c4.1-5.1.4-12.8-6.3-12.8z"}}]},name:"check",theme:"outlined"},RM=Z9;var e7=function(t,r){return Ry.createElement(zt,fe({},t,{ref:r,icon:RM}))},t7=Ry.forwardRef(e7),Oy=t7;var _y=E($());var r7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},OM=r7;var n7=function(t,r){return _y.createElement(zt,fe({},t,{ref:r,icon:OM}))},o7=_y.forwardRef(n7),Py=o7;var Ty=E($());var i7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},_M=i7;var a7=function(t,r){return Ty.createElement(zt,fe({},t,{ref:r,icon:_M}))},s7=Ty.forwardRef(a7),Ny=s7;function V1({suffixIcon:e,clearIcon:t,menuItemSelectedIcon:r,removeIcon:n,loading:o,multiple:i,hasFeedback:a,prefixCls:s,showSuffixIcon:l,feedbackIcon:c,showArrow:u,componentName:f}){let p=t??Ji.createElement(mu,null),g=m=>e===null&&!a&&!u?null:Ji.createElement(Ji.Fragment,null,l!==!1&&m,a&&c),h=null;if(e!==void 0)h=g(e);else if(o)h=g(Ji.createElement(Al,{spin:!0}));else{let m=`${s}-suffix`;h=({open:d,showSearch:x})=>g(d&&x?Ji.createElement(Ny,{className:m}):Ji.createElement(Py,{className:m}))}let v=null;r!==void 0?v=r:i?v=Ji.createElement(Oy,null):v=null;let y=null;return n!==void 0?y=n:y=Ji.createElement(gv,null),{clearIcon:p,suffixIcon:h,itemIcon:v,removeIcon:y}}function H1(e,t){return t!==void 0?t:e!==null}var l7=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{var r,n,o,i,a;let{prefixCls:s,bordered:l,className:c,rootClassName:u,getPopupContainer:f,popupClassName:p,dropdownClassName:g,listHeight:h=256,placement:v,listItemHeight:y,size:m,disabled:d,notFoundContent:x,status:b,builtinPlacements:S,dropdownMatchSelectWidth:w,popupMatchSelectWidth:C,direction:R,style:P,allowClear:O,variant:A,dropdownStyle:F,transitionName:M,tagRender:H,maxCount:L,prefix:N,dropdownRender:I,popupRender:D,onDropdownVisibleChange:U,onOpenChange:z,styles:W,classNames:q}=e,j=l7(e,["prefixCls","bordered","className","rootClassName","getPopupContainer","popupClassName","dropdownClassName","listHeight","placement","listItemHeight","size","disabled","notFoundContent","status","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","direction","style","allowClear","variant","dropdownStyle","transitionName","tagRender","maxCount","prefix","dropdownRender","popupRender","onDropdownVisibleChange","onOpenChange","styles","classNames"]),{getPopupContainer:k,getPrefixCls:V,renderEmpty:G,direction:J,virtual:Y,popupMatchSelectWidth:X,popupOverflow:ae}=ni.useContext(rt),{showSearch:Z,style:K,styles:Q,className:re,classNames:ee}=no("select"),[,ne]=xr(),de=y??ne?.controlHeight,le=V("select",s),pe=V(),Oe=R??J,{compactSize:Ce,compactItemClassnames:De}=Xo(le,Oe),[ce,ie]=qs("select",A,l),Re=Ko(le),[Le,Ge,Me]=EM(le,Re),Ie=ni.useMemo(()=>{let{mode:Be}=e;if(Be!=="combobox")return Be===PM?"combobox":Be},[e.mode]),je=Ie==="multiple"||Ie==="tags",We=H1(e.suffixIcon,e.showArrow),He=(r=C??w)!==null&&r!==void 0?r:X,ye=((n=W?.popup)===null||n===void 0?void 0:n.root)||((o=Q.popup)===null||o===void 0?void 0:o.root)||F,se=D||I,xe=z||U,{status:_e,hasFeedback:he,isFormItemInput:Je,feedbackIcon:lt}=ni.useContext(fn),Et=Qi(_e,b),Pt;x!==void 0?Pt=x:Ie==="combobox"?Pt=null:Pt=G?.("Select")||ni.createElement(fM,{componentName:"Select"});let{suffixIcon:pt,itemIcon:Ae,removeIcon:we,clearIcon:et}=V1(Object.assign(Object.assign({},j),{multiple:je,hasFeedback:he,feedbackIcon:lt,showSuffixIcon:We,prefixCls:le,componentName:"Select"})),Pe=O===!0?{clearIcon:et}:O,$e=qr(j,["suffixIcon","itemIcon"]),Ee=(0,U1.default)(((i=q?.popup)===null||i===void 0?void 0:i.root)||((a=ee?.popup)===null||a===void 0?void 0:a.root)||p||g,{[`${le}-dropdown-${Oe}`]:Oe==="rtl"},u,ee.root,q?.root,Me,Re,Ge),be=ao(Be=>{var ze;return(ze=m??Ce)!==null&&ze!==void 0?ze:Be}),ht=ni.useContext(Ur),Mt=d??ht,Fe=(0,U1.default)({[`${le}-lg`]:be==="large",[`${le}-sm`]:be==="small",[`${le}-rtl`]:Oe==="rtl",[`${le}-${ce}`]:ie,[`${le}-in-form-item`]:Je},Yi(le,Et,he),De,re,c,ee.root,q?.root,u,Me,Re,Ge),Se=ni.useMemo(()=>v!==void 0?v:Oe==="rtl"?"bottomRight":"bottomLeft",[v,Oe]),[Ke]=xv("SelectLike",ye?.zIndex);return Le(ni.createElement(nM,Object.assign({ref:t,virtual:Y,showSearch:Z},$e,{style:Object.assign(Object.assign(Object.assign(Object.assign({},Q.root),W?.root),K),P),dropdownMatchSelectWidth:He,transitionName:Cv(pe,"slide-up",M),builtinPlacements:dM(S,ae),listHeight:h,listItemHeight:de,mode:Ie,prefixCls:le,placement:Se,direction:Oe,prefix:N,suffixIcon:pt,menuItemSelectedIcon:Ae,removeIcon:we,allowClear:Pe,notFoundContent:Pt,className:Fe,getPopupContainer:f||k,dropdownClassName:Ee,disabled:Mt,dropdownStyle:Object.assign(Object.assign({},ye),{zIndex:Ke}),maxCount:je?L:void 0,tagRender:je?H:void 0,dropdownRender:se,onDropdownVisibleChange:xe})))},Au=ni.forwardRef(c7),u7=IA(Au,"dropdownAlign");Au.SECRET_COMBOBOX_MODE_DO_NOT_USE=PM;Au.Option=tp;Au.OptGroup=ep;Au._InternalPanelDoNotUseOrYouWillBeFired=u7;var op=Au;var TM=E($());function q1(){let[,e]=TM.useReducer(t=>t+1,0);return e}var bn=E($()),ky=E(Ne());var G1=E(Ne()),K1=E($());function ku(e){var t=e.children,r=e.prefixCls,n=e.id,o=e.overlayInnerStyle,i=e.bodyClassName,a=e.className,s=e.style;return K1.createElement("div",{className:(0,G1.default)("".concat(r,"-content"),a),style:s},K1.createElement("div",{className:(0,G1.default)("".concat(r,"-inner"),i),id:n,role:"tooltip",style:o},typeof t=="function"?t():t))}var IM=E(Ne()),Vl=E($()),Lu=E($());var Mu={shiftX:64,adjustY:1},Fu={adjustX:1,shiftY:!0},oi=[0,0],NM={left:{points:["cr","cl"],overflow:Fu,offset:[-4,0],targetOffset:oi},right:{points:["cl","cr"],overflow:Fu,offset:[4,0],targetOffset:oi},top:{points:["bc","tc"],overflow:Mu,offset:[0,-4],targetOffset:oi},bottom:{points:["tc","bc"],overflow:Mu,offset:[0,4],targetOffset:oi},topLeft:{points:["bl","tl"],overflow:Mu,offset:[0,-4],targetOffset:oi},leftTop:{points:["tr","tl"],overflow:Fu,offset:[-4,0],targetOffset:oi},topRight:{points:["br","tr"],overflow:Mu,offset:[0,-4],targetOffset:oi},rightTop:{points:["tl","tr"],overflow:Fu,offset:[4,0],targetOffset:oi},bottomRight:{points:["tr","br"],overflow:Mu,offset:[0,4],targetOffset:oi},rightBottom:{points:["bl","br"],overflow:Fu,offset:[4,0],targetOffset:oi},bottomLeft:{points:["tl","bl"],overflow:Mu,offset:[0,4],targetOffset:oi},leftBottom:{points:["br","bl"],overflow:Fu,offset:[-4,0],targetOffset:oi}};var f7=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],d7=function(t,r){var n=t.overlayClassName,o=t.trigger,i=o===void 0?["hover"]:o,a=t.mouseEnterDelay,s=a===void 0?0:a,l=t.mouseLeaveDelay,c=l===void 0?.1:l,u=t.overlayStyle,f=t.prefixCls,p=f===void 0?"rc-tooltip":f,g=t.children,h=t.onVisibleChange,v=t.afterVisibleChange,y=t.transitionName,m=t.animation,d=t.motion,x=t.placement,b=x===void 0?"right":x,S=t.align,w=S===void 0?{}:S,C=t.destroyTooltipOnHide,R=C===void 0?!1:C,P=t.defaultVisible,O=t.getTooltipContainer,A=t.overlayInnerStyle,F=t.arrowContent,M=t.overlay,H=t.id,L=t.showArrow,N=L===void 0?!0:L,I=t.classNames,D=t.styles,U=Ve(t,f7),z=Uv(H),W=(0,Lu.useRef)(null);(0,Lu.useImperativeHandle)(r,function(){return W.current});var q=T({},U);"visible"in t&&(q.popupVisible=t.visible);var j=function(){return Vl.createElement(ku,{key:"content",prefixCls:p,id:z,bodyClassName:I?.body,overlayInnerStyle:T(T({},A),D?.body)},M)},k=function(){var G=Vl.Children.only(g),J=G?.props||{},Y=T(T({},J),{},{"aria-describedby":M?z:null});return Vl.cloneElement(g,Y)};return Vl.createElement(gy,fe({popupClassName:(0,IM.default)(n,I?.root),prefixCls:p,popup:j,action:i,builtinPlacements:NM,popupPlacement:b,ref:W,popupAlign:w,getPopupContainer:O,onPopupVisibleChange:h,afterPopupVisibleChange:v,popupTransitionName:y,popupAnimation:m,popupMotion:d,defaultPopupVisible:P,autoDestroy:R,mouseLeaveDelay:c,popupStyle:T(T({},u),D?.root),mouseEnterDelay:s,arrow:N},q),k())},$M=(0,Lu.forwardRef)(d7);var DM=$M;function AM(e){let{sizePopupArrow:t,borderRadiusXS:r,borderRadiusOuter:n}=e,o=t/2,i=0,a=o,s=n*1/Math.sqrt(2),l=o-n*(1-1/Math.sqrt(2)),c=o-r*(1/Math.sqrt(2)),u=n*(Math.sqrt(2)-1)+r*(1/Math.sqrt(2)),f=2*o-c,p=u,g=2*o-s,h=l,v=2*o-i,y=a,m=o*Math.sqrt(2)+n*(Math.sqrt(2)-2),d=n*(Math.sqrt(2)-1),x=`polygon(${d}px 100%, 50% ${d}px, ${2*o-d}px 100%, ${d}px 100%)`,b=`path('M ${i} ${a} A ${n} ${n} 0 0 0 ${s} ${l} L ${c} ${u} A ${r} ${r} 0 0 1 ${f} ${p} L ${g} ${h} A ${n} ${n} 0 0 0 ${v} ${y} Z')`;return{arrowShadowWidth:m,arrowPath:b,arrowPolygon:x}}var kM=(e,t,r)=>{let{sizePopupArrow:n,arrowPolygon:o,arrowPath:i,arrowShadowWidth:a,borderRadiusXS:s,calc:l}=e;return{pointerEvents:"none",width:n,height:n,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:n,height:l(n).div(2).equal(),background:t,clipPath:{_multi_value_:!0,value:[o,i]},content:'""'},"&::after":{content:'""',position:"absolute",width:a,height:a,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${oe(s)} 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:r,zIndex:0,background:"transparent"}}};var X1=8;function $y(e){let{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?X1:n}}function Iy(e,t){return e?t:{}}function Y1(e,t,r){let{componentCls:n,boxShadowPopoverArrow:o,arrowOffsetVertical:i,arrowOffsetHorizontal:a}=e,{arrowDistance:s=0,arrowPlacement:l={left:!0,right:!0,top:!0,bottom:!0}}=r||{};return{[n]:Object.assign(Object.assign(Object.assign(Object.assign({[`${n}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},kM(e,t,o)),{"&:before":{background:t}})]},Iy(!!l.top,{[[`&-placement-top > ${n}-arrow`,`&-placement-topLeft > ${n}-arrow`,`&-placement-topRight > ${n}-arrow`].join(",")]:{bottom:s,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},"&-placement-topLeft":{"--arrow-offset-horizontal":a,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-topRight":{"--arrow-offset-horizontal":`calc(100% - ${oe(a)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),Iy(!!l.bottom,{[[`&-placement-bottom > ${n}-arrow`,`&-placement-bottomLeft > ${n}-arrow`,`&-placement-bottomRight > ${n}-arrow`].join(",")]:{top:s,transform:"translateY(-100%)"},[`&-placement-bottom > ${n}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},"&-placement-bottomLeft":{"--arrow-offset-horizontal":a,[`> ${n}-arrow`]:{left:{_skip_check_:!0,value:a}}},"&-placement-bottomRight":{"--arrow-offset-horizontal":`calc(100% - ${oe(a)})`,[`> ${n}-arrow`]:{right:{_skip_check_:!0,value:a}}}})),Iy(!!l.left,{[[`&-placement-left > ${n}-arrow`,`&-placement-leftTop > ${n}-arrow`,`&-placement-leftBottom > ${n}-arrow`].join(",")]:{right:{_skip_check_:!0,value:s},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop > ${n}-arrow`]:{top:i},[`&-placement-leftBottom > ${n}-arrow`]:{bottom:i}})),Iy(!!l.right,{[[`&-placement-right > ${n}-arrow`,`&-placement-rightTop > ${n}-arrow`,`&-placement-rightBottom > ${n}-arrow`].join(",")]:{left:{_skip_check_:!0,value:s},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right > ${n}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop > ${n}-arrow`]:{top:i},[`&-placement-rightBottom > ${n}-arrow`]:{bottom:i}}))}}function p7(e,t,r,n){if(n===!1)return{adjustX:!1,adjustY:!1};let o=n&&typeof n=="object"?n:{},i={};switch(e){case"top":case"bottom":i.shiftX=t.arrowOffsetHorizontal*2+r,i.shiftY=!0,i.adjustY=!0;break;case"left":case"right":i.shiftY=t.arrowOffsetVertical*2+r,i.shiftX=!0,i.adjustX=!0;break}let a=Object.assign(Object.assign({},i),o);return a.shiftX||(a.adjustX=!0),a.shiftY||(a.adjustY=!0),a}var MM={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},m7={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},g7=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function Q1(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,l={};return Object.keys(MM).forEach(c=>{let u=n&&m7[c]||MM[c],f=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=f,g7.has(c)&&(f.autoArrow=!1),c){case"top":case"topLeft":case"topRight":f.offset[1]=-s-o;break;case"bottom":case"bottomLeft":case"bottomRight":f.offset[1]=s+o;break;case"left":case"leftTop":case"leftBottom":f.offset[0]=-s-o;break;case"right":case"rightTop":case"rightBottom":f.offset[0]=s+o;break}let p=$y({contentRadius:i,limitVerticalRadius:!0});if(n)switch(c){case"topLeft":case"bottomLeft":f.offset[0]=-p.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=p.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-p.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=p.arrowOffsetHorizontal*2-s;break}f.overflow=p7(c,p,t,r),a&&(f.htmlRegion="visibleFirst")}),l}var zu=E($()),zM=E(Ne());var h7=e=>{let{calc:t,componentCls:r,tooltipMaxWidth:n,tooltipColor:o,tooltipBg:i,tooltipBorderRadius:a,zIndexPopup:s,controlHeight:l,boxShadowSecondary:c,paddingSM:u,paddingXS:f,arrowOffsetHorizontal:p,sizePopupArrow:g}=e,h=t(a).add(g).add(p).equal(),v=t(a).mul(2).add(g).equal();return[{[r]:Object.assign(Object.assign(Object.assign(Object.assign({},sr(e)),{position:"absolute",zIndex:s,display:"block",width:"max-content",maxWidth:n,visibility:"visible","--valid-offset-x":"var(--arrow-offset-horizontal, var(--arrow-x))",transformOrigin:["var(--valid-offset-x, 50%)","var(--arrow-y, 50%)"].join(" "),"&-hidden":{display:"none"},"--antd-arrow-background-color":i,[`${r}-inner`]:{minWidth:v,minHeight:l,padding:`${oe(e.calc(u).div(2).equal())} ${oe(f)}`,color:o,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:i,borderRadius:a,boxShadow:c,boxSizing:"border-box"},[["&-placement-topLeft","&-placement-topRight","&-placement-bottomLeft","&-placement-bottomRight"].join(",")]:{minWidth:h},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${r}-inner`]:{borderRadius:e.min(a,X1)}},[`${r}-content`]:{position:"relative"}}),Wh(e,(y,{darkColor:m})=>({[`&${r}-${y}`]:{[`${r}-inner`]:{backgroundColor:m},[`${r}-arrow`]:{"--antd-arrow-background-color":m}}}))),{"&-rtl":{direction:"rtl"}})},Y1(e,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},v7=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},$y({contentRadius:e.borderRadius,limitVerticalRadius:!0})),AM(ut(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),Dy=(e,t=!0)=>Gt("Tooltip",n=>{let{borderRadius:o,colorTextLightSolid:i,colorBgSpotlight:a}=n,s=ut(n,{tooltipMaxWidth:250,tooltipColor:i,tooltipBorderRadius:o,tooltipBg:a});return[h7(s),$w(n,"zoom-big-fast")]},v7,{resetStyle:!1,injectStyle:t})(e);var LM=E(Ne());var y7=Eo.map(e=>`${e}-inverse`);function FM(e,t=!0){return t?[].concat(te(y7),te(Eo)).includes(e):Eo.includes(e)}function Ay(e,t){let r=FM(t),n=(0,LM.default)({[`${e}-${t}`]:t&&r}),o={},i={};return t&&!r&&(o.background=t,i["--antd-arrow-background-color"]=t),{className:n,overlayStyle:o,arrowStyle:i}}var x7=e=>{let{prefixCls:t,className:r,placement:n="top",title:o,color:i,overlayInnerStyle:a}=e,{getPrefixCls:s}=zu.useContext(rt),l=s("tooltip",t),[c,u,f]=Dy(l),p=Ay(l,i),g=p.arrowStyle,h=Object.assign(Object.assign({},a),p.overlayStyle),v=(0,zM.default)(u,f,l,`${l}-pure`,`${l}-placement-${n}`,r,p.className);return c(zu.createElement("div",{className:v,style:g},zu.createElement("div",{className:`${l}-arrow`}),zu.createElement(ku,Object.assign({},e,{className:u,prefixCls:l,overlayInnerStyle:h}),o)))},WM=x7;var b7=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{var r,n;let{prefixCls:o,openClassName:i,getTooltipContainer:a,color:s,overlayInnerStyle:l,children:c,afterOpenChange:u,afterVisibleChange:f,destroyTooltipOnHide:p,destroyOnHidden:g,arrow:h=!0,title:v,overlay:y,builtinPlacements:m,arrowPointAtCenter:d=!1,autoAdjustOverflow:x=!0,motion:b,getPopupContainer:S,placement:w="top",mouseEnterDelay:C=.1,mouseLeaveDelay:R=.1,overlayStyle:P,rootClassName:O,overlayClassName:A,styles:F,classNames:M}=e,H=b7(e,["prefixCls","openClassName","getTooltipContainer","color","overlayInnerStyle","children","afterOpenChange","afterVisibleChange","destroyTooltipOnHide","destroyOnHidden","arrow","title","overlay","builtinPlacements","arrowPointAtCenter","autoAdjustOverflow","motion","getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName","overlayClassName","styles","classNames"]),L=!!h,[,N]=xr(),{getPopupContainer:I,getPrefixCls:D,direction:U,className:z,style:W,classNames:q,styles:j}=no("tooltip"),k=Rh("Tooltip"),V=bn.useRef(null),G=()=>{var We;(We=V.current)===null||We===void 0||We.forceAlign()};bn.useImperativeHandle(t,()=>{var We,He;return{forceAlign:G,forcePopupAlign:()=>{k.deprecated(!1,"forcePopupAlign","forceAlign"),G()},nativeElement:(We=V.current)===null||We===void 0?void 0:We.nativeElement,popupElement:(He=V.current)===null||He===void 0?void 0:He.popupElement}});let[J,Y]=ar(!1,{value:(r=e.open)!==null&&r!==void 0?r:e.visible,defaultValue:(n=e.defaultOpen)!==null&&n!==void 0?n:e.defaultVisible}),X=!v&&!y&&v!==0,ae=We=>{var He,ye;Y(X?!1:We),X||((He=e.onOpenChange)===null||He===void 0||He.call(e,We),(ye=e.onVisibleChange)===null||ye===void 0||ye.call(e,We))},Z=bn.useMemo(()=>{var We,He;let ye=d;return typeof h=="object"&&(ye=(He=(We=h.pointAtCenter)!==null&&We!==void 0?We:h.arrowPointAtCenter)!==null&&He!==void 0?He:d),m||Q1({arrowPointAtCenter:ye,autoAdjustOverflow:x,arrowWidth:L?N.sizePopupArrow:0,borderRadius:N.borderRadius,offset:N.marginXXS,visibleFirst:!0})},[d,h,m,N]),K=bn.useMemo(()=>v===0?v:y||v||"",[y,v]),Q=bn.createElement(zs,{space:!0},typeof K=="function"?K():K),re=D("tooltip",o),ee=D(),ne=e["data-popover-inject"],de=J;!("open"in e)&&!("visible"in e)&&X&&(de=!1);let le=bn.isValidElement(c)&&!hv(c)?c:bn.createElement("span",null,c),pe=le.props,Oe=!pe.className||typeof pe.className=="string"?(0,ky.default)(pe.className,i||`${re}-open`):pe.className,[Ce,De,ce]=Dy(re,!ne),ie=Ay(re,s),Re=ie.arrowStyle,Le=(0,ky.default)(A,{[`${re}-rtl`]:U==="rtl"},ie.className,O,De,ce,z,q.root,M?.root),Ge=(0,ky.default)(q.body,M?.body),[Me,Ie]=xv("Tooltip",H.zIndex),je=bn.createElement(DM,Object.assign({},H,{zIndex:Me,showArrow:L,placement:w,mouseEnterDelay:C,mouseLeaveDelay:R,prefixCls:re,classNames:{root:Le,body:Ge},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Re),j.root),W),P),F?.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},j.body),l),F?.body),ie.overlayStyle)},getTooltipContainer:S||a||I,ref:V,builtinPlacements:Z,overlay:Q,visible:de,onVisibleChange:ae,afterVisibleChange:u??f,arrowContent:bn.createElement("span",{className:`${re}-arrow-content`}),motion:{motionName:Cv(ee,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:g??!!p}),de?Go(le,{className:Oe}):le);return Ce(bn.createElement(yv.Provider,{value:Ie},je))}),BM=S7;BM._InternalPanelDoNotUseOrYouWillBeFired=WM;var ka=BM;var jM=E(Ne());var My=E($()),Hl=E($()),C7=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],w7=(0,Hl.forwardRef)(function(e,t){var r=e.prefixCls,n=r===void 0?"rc-checkbox":r,o=e.className,i=e.style,a=e.checked,s=e.disabled,l=e.defaultChecked,c=l===void 0?!1:l,u=e.type,f=u===void 0?"checkbox":u,p=e.title,g=e.onChange,h=Ve(e,C7),v=(0,Hl.useRef)(null),y=(0,Hl.useRef)(null),m=ar(c,{value:a}),d=B(m,2),x=d[0],b=d[1];(0,Hl.useImperativeHandle)(t,function(){return{focus:function(R){var P;(P=v.current)===null||P===void 0||P.focus(R)},blur:function(){var R;(R=v.current)===null||R===void 0||R.blur()},input:v.current,nativeElement:y.current}});var S=(0,jM.default)(n,o,_(_({},"".concat(n,"-checked"),x),"".concat(n,"-disabled"),s)),w=function(R){s||("checked"in e||b(R.target.checked),g?.({target:T(T({},e),{},{type:f,checked:R.target.checked}),stopPropagation:function(){R.stopPropagation()},preventDefault:function(){R.preventDefault()},nativeEvent:R.nativeEvent}))};return My.createElement("span",{className:S,title:p,style:i,ref:y},My.createElement("input",fe({},h,{className:"".concat(n,"-input"),ref:v,onChange:w,disabled:s,checked:!!x,type:f})),My.createElement("span",{className:"".concat(n,"-inner")}))}),VM=w7;var HM=E($());function J1(e){let t=HM.default.useRef(null),r=()=>{dt.cancel(t.current),t.current=null};return[()=>{r(),t.current=dt(()=>{t.current=null})},i=>{t.current&&(i.stopPropagation(),r()),e?.(i)}]}function Ma(e){return ut(e,{inputAffixPadding:e.paddingXXS})}var Fa=e=>{let{controlHeight:t,fontSize:r,lineHeight:n,lineWidth:o,controlHeightSM:i,controlHeightLG:a,fontSizeLG:s,lineHeightLG:l,paddingSM:c,controlPaddingHorizontalSM:u,controlPaddingHorizontal:f,colorFillAlter:p,colorPrimaryHover:g,colorPrimary:h,controlOutlineWidth:v,controlOutline:y,colorErrorOutline:m,colorWarningOutline:d,colorBgContainer:x,inputFontSize:b,inputFontSizeLG:S,inputFontSizeSM:w}=e,C=b||r,R=w||C,P=S||s,O=Math.round((t-C*n)/2*10)/10-o,A=Math.round((i-R*n)/2*10)/10-o,F=Math.ceil((a-P*l)/2*10)/10-o;return{paddingBlock:Math.max(O,0),paddingBlockSM:Math.max(A,0),paddingBlockLG:Math.max(F,0),paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:f-o,addonBg:p,activeBorderColor:h,hoverBorderColor:g,activeShadow:`0 0 0 ${v}px ${y}`,errorActiveShadow:`0 0 0 ${v}px ${m}`,warningActiveShadow:`0 0 0 ${v}px ${d}`,hoverBg:x,activeBg:x,inputFontSize:C,inputFontSizeLG:P,inputFontSizeSM:R}};var E7=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),Z1=e=>({color:e.colorTextDisabled,backgroundColor:e.colorBgContainerDisabled,borderColor:e.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"input[disabled], textarea[disabled]":{cursor:"not-allowed"},"&:hover:not([disabled])":Object.assign({},E7(ut(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),YM=(e,t)=>({background:e.colorBgContainer,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:t.borderColor,"&:hover":{borderColor:t.hoverBorderColor,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:t.activeBorderColor,boxShadow:t.activeShadow,outline:0,backgroundColor:e.activeBg}}),UM=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},YM(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),Fy=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},YM(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Z1(e))}),UM(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),UM(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),qM=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Ly=e=>({"&-outlined":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group`]:{"&-addon":{background:e.addonBg,border:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}}},qM(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),qM(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},Z1(e))}})}),zy=(e,t)=>{let{componentCls:r}=e;return{"&-borderless":Object.assign({background:"transparent",border:"none","&:focus, &:focus-within":{outline:"none"},[`&${r}-disabled, &[disabled]`]:{color:e.colorTextDisabled,cursor:"not-allowed"},[`&${r}-status-error`]:{"&, & input, & textarea":{color:e.colorError}},[`&${r}-status-warning`]:{"&, & input, & textarea":{color:e.colorWarning}}},t)}},QM=(e,t)=>{var r;return{background:t.bg,borderWidth:e.lineWidth,borderStyle:e.lineType,borderColor:"transparent","input&, & input, textarea&, & textarea":{color:(r=t?.inputColor)!==null&&r!==void 0?r:"unset"},"&:hover":{background:t.hoverBg},"&:focus, &:focus-within":{outline:0,borderColor:t.activeBorderColor,backgroundColor:e.activeBg}}},GM=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},QM(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),Wy=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},QM(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Z1(e))}),GM(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),GM(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),KM=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),By=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},KM(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),KM(e,{status:"warning",addonBg:e.colorWarningBg,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group`]:{"&-addon":{background:e.colorFillTertiary,color:e.colorTextDisabled},"&-addon:first-child":{borderInlineStart:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},"&-addon:last-child":{borderInlineEnd:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderTop:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderBottom:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`}}}})}),JM=(e,t)=>({background:e.colorBgContainer,borderWidth:`${oe(e.lineWidth)} 0`,borderStyle:`${e.lineType} none`,borderColor:`transparent transparent ${t.borderColor} transparent`,borderRadius:0,"&:hover":{borderColor:`transparent transparent ${t.borderColor} transparent`,backgroundColor:e.hoverBg},"&:focus, &:focus-within":{borderColor:`transparent transparent ${t.borderColor} transparent`,outline:0,backgroundColor:e.activeBg}}),XM=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},JM(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:`transparent transparent ${t.borderColor} transparent`}}),jy=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},JM(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:{color:e.colorTextDisabled,boxShadow:"none",cursor:"not-allowed","&:hover":{borderColor:`transparent transparent ${e.colorBorder} transparent`}},"input[disabled], textarea[disabled]":{cursor:"not-allowed"}}),XM(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),XM(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)});var eE=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}});var ZM=e=>{let{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:o}=e;return{padding:`${oe(t)} ${oe(o)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},eF=e=>({padding:`${oe(e.paddingBlockSM)} ${oe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),ip=e=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${oe(e.paddingBlock)} ${oe(e.paddingInline)}`,color:e.colorText,fontSize:e.inputFontSize,lineHeight:e.lineHeight,borderRadius:e.borderRadius,transition:`all ${e.motionDurationMid}`},eE(e.colorTextPlaceholder)),{"&-lg":Object.assign({},ZM(e)),"&-sm":Object.assign({},eF(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),tE=e=>{let{componentCls:t,antCls:r}=e;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:e.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${t}, &-lg > ${t}-group-addon`]:Object.assign({},ZM(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},eF(e)),[`&-lg ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightLG},[`&-sm ${r}-select-single ${r}-select-selector`]:{height:e.controlHeightSM},[`> ${t}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${t}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${oe(e.paddingInline)}`,color:e.colorText,fontWeight:"normal",fontSize:e.inputFontSize,textAlign:"center",borderRadius:e.borderRadius,transition:`all ${e.motionDurationSlow}`,lineHeight:1,[`${r}-select`]:{margin:`${oe(e.calc(e.paddingBlock).add(1).mul(-1).equal())} ${oe(e.calc(e.paddingInline).mul(-1).equal())}`,[`&${r}-select-single:not(${r}-select-customize-input):not(${r}-pagination-size-changer)`]:{[`${r}-select-selector`]:{backgroundColor:"inherit",border:`${oe(e.lineWidth)} ${e.lineType} transparent`,boxShadow:"none"}}},[`${r}-cascader-picker`]:{margin:`-9px ${oe(e.calc(e.paddingInline).mul(-1).equal())}`,backgroundColor:"transparent",[`${r}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}}},[t]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${t}-search-with-button &`]:{zIndex:0}}},[`> ${t}:first-child, ${t}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}-affix-wrapper`]:{[`&:not(:first-child) ${t}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${t}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${t}:last-child, ${t}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${r}-select ${r}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${t}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${t}-search &`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius}},[`&:not(:first-child), ${t}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${t}-group-compact`]:Object.assign(Object.assign({display:"block"},du()),{[`${t}-group-addon, ${t}-group-wrap, > ${t}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:e.lineWidth,"&:hover, &:focus":{zIndex:1}}},"& > *":{display:"inline-flex",float:"none",verticalAlign:"top",borderRadius:0},[` & > ${t}-affix-wrapper, & > ${t}-number-affix-wrapper, & > ${r}-picker-range @@ -453,39 +451,39 @@ html body { & > ${r}-cascader-picker:first-child ${t}`]:{borderStartStartRadius:e.borderRadius,borderEndStartRadius:e.borderRadius},[`& > *:last-child, & > ${r}-select:last-child > ${r}-select-selector, & > ${r}-cascader-picker:last-child ${t}, - & > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},p9=e=>{let{componentCls:t,controlHeightSM:r,lineWidth:o,calc:n}=e,a=n(r).sub(n(o).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Qt(e)),Ip(e)),c0(e)),f0(e)),d0(e)),m0(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},m9=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorTextTertiary},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${re(e.inputAffixPadding)}`}}}},g9=e=>{let{componentCls:t,inputAffixPadding:r,colorTextDescription:o,motionDurationSlow:n,colorIcon:i,colorIconHover:a,iconCls:s}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},Ip(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:o},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}}}),m9(e)),{[`${s}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${n}`,"&:hover":{color:a}}}),[`${t}-underlined`]:{borderRadius:0},[c]:{[`${s}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},h9=e=>{let{componentCls:t,borderRadiusLG:r,borderRadiusSM:o}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},Qt(e)),$E(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:o}}},u0(e)),p0(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},v9=e=>{let{componentCls:t,antCls:r}=e,o=`${t}-search`;return{[o]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${o}-button:not(${r}-btn-primary)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${o}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${o}-button:not(${r}-btn-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${r}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${o}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${o}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${o}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button, + & > ${r}-cascader-picker-focused:last-child ${t}`]:{borderInlineEndWidth:e.lineWidth,borderStartEndRadius:e.borderRadius,borderEndEndRadius:e.borderRadius},[`& > ${r}-select-auto-complete ${t}`]:{verticalAlign:"top"},[`${t}-group-wrapper + ${t}-group-wrapper`]:{marginInlineStart:e.calc(e.lineWidth).mul(-1).equal(),[`${t}-affix-wrapper`]:{borderRadius:0}},[`${t}-group-wrapper:not(:last-child)`]:{[`&${t}-search > ${t}-group`]:{[`& > ${t}-group-addon > ${t}-search-button`]:{borderRadius:0},[`& > ${t}`]:{borderStartStartRadius:e.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:e.borderRadius}}}})}},R7=e=>{let{componentCls:t,controlHeightSM:r,lineWidth:n,calc:o}=e,a=o(r).sub(o(n).mul(2)).sub(16).div(2).equal();return{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},sr(e)),ip(e)),Fy(e)),Wy(e)),zy(e)),jy(e)),{'&[type="color"]':{height:e.controlHeight,[`&${t}-lg`]:{height:e.controlHeightLG},[`&${t}-sm`]:{height:r,paddingTop:a,paddingBottom:a}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{appearance:"none"}})}},O7=e=>{let{componentCls:t}=e;return{[`${t}-clear-icon`]:{margin:0,padding:0,lineHeight:0,color:e.colorTextQuaternary,fontSize:e.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${e.motionDurationSlow}`,border:"none",outline:"none",backgroundColor:"transparent","&:hover":{color:e.colorIcon},"&:active":{color:e.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${oe(e.inputAffixPadding)}`}}}},_7=e=>{let{componentCls:t,inputAffixPadding:r,colorTextDescription:n,motionDurationSlow:o,colorIcon:i,colorIconHover:a,iconCls:s}=e,l=`${t}-affix-wrapper`,c=`${t}-affix-wrapper-disabled`;return{[l]:Object.assign(Object.assign(Object.assign(Object.assign({},ip(e)),{display:"inline-flex",[`&:not(${t}-disabled):hover`]:{zIndex:1,[`${t}-search-with-button &`]:{zIndex:0}},"&-focused, &:focus":{zIndex:1},[`> input${t}`]:{padding:0},[`> input${t}, > textarea${t}`]:{fontSize:"inherit",border:"none",borderRadius:0,outline:"none",background:"transparent",color:"inherit","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[t]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:e.paddingXS}},"&-show-count-suffix":{color:n,direction:"ltr"},"&-show-count-has-suffix":{marginInlineEnd:e.paddingXXS},"&-prefix":{marginInlineEnd:r},"&-suffix":{marginInlineStart:r}}}),O7(e)),{[`${s}${t}-password-icon`]:{color:i,cursor:"pointer",transition:`all ${o}`,"&:hover":{color:a}}}),[`${t}-underlined`]:{borderRadius:0},[c]:{[`${s}${t}-password-icon`]:{color:i,cursor:"not-allowed","&:hover":{color:i}}}}},P7=e=>{let{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},sr(e)),tE(e)),{"&-rtl":{direction:"rtl"},"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${t}-group-addon`]:{borderRadius:r,fontSize:e.inputFontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:n}}},Ly(e)),By(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-item`]:{[`${t}-affix-wrapper`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})})}},T7=e=>{let{componentCls:t,antCls:r}=e,n=`${t}-search`;return{[n]:{[t]:{"&:hover, &:focus":{[`+ ${t}-group-addon ${n}-button:not(${r}-btn-color-primary):not(${r}-btn-variant-text)`]:{borderInlineStartColor:e.colorPrimaryHover}}},[`${t}-affix-wrapper`]:{height:e.controlHeight,borderRadius:0},[`${t}-lg`]:{lineHeight:e.calc(e.lineHeightLG).sub(2e-4).equal()},[`> ${t}-group`]:{[`> ${t}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${n}-button`]:{marginInlineEnd:-1,borderStartStartRadius:0,borderEndStartRadius:0,boxShadow:"none"},[`${n}-button:not(${r}-btn-color-primary)`]:{color:e.colorTextDescription,"&:hover":{color:e.colorPrimaryHover},"&:active":{color:e.colorPrimaryActive},[`&${r}-btn-loading::before`]:{inset:0}}}},[`${n}-button`]:{height:e.controlHeight,"&:hover, &:focus":{zIndex:1}},"&-large":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightLG}},"&-small":{[`${t}-affix-wrapper, ${n}-button`]:{height:e.controlHeightSM}},"&-rtl":{direction:"rtl"},[`&${t}-compact-item`]:{[`&:not(${t}-compact-last-item)`]:{[`${t}-group-addon`]:{[`${t}-search-button`]:{marginInlineEnd:e.calc(e.lineWidth).mul(-1).equal(),borderRadius:0}}},[`&:not(${t}-compact-first-item)`]:{[`${t},${t}-affix-wrapper`]:{borderRadius:0}},[`> ${t}-group-addon ${t}-search-button, > ${t}, - ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},y9=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},g0=Pt(["Input","Shared"],e=>{let t=rt(e,Ua(e));return[p9(t),g9(t)]},Ga,{resetFont:!1}),h0=Pt(["Input","Component"],e=>{let t=rt(e,Ua(e));return[h9(t),v9(t),y9(t),Gs(t)]},Ga,{resetFont:!1});var x9=e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},Qt(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},Qt(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},Qt(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Object.assign({},bw(e))},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${re(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${re(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[` + ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},N7=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Vy=Gt(["Input","Shared"],e=>{let t=ut(e,Ma(e));return[R7(t),_7(t)]},Fa,{resetFont:!1}),Hy=Gt(["Input","Component"],e=>{let t=ut(e,Ma(e));return[P7(t),T7(t),N7(t),ks(t)]},Fa,{resetFont:!1});var I7=e=>{let{checkboxCls:t}=e,r=`${t}-wrapper`;return[{[`${t}-group`]:Object.assign(Object.assign({},sr(e)),{display:"inline-flex",flexWrap:"wrap",columnGap:e.marginXS,[`> ${e.antCls}-row`]:{flex:1}}),[r]:Object.assign(Object.assign({},sr(e)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${r}`]:{marginInlineStart:0},[`&${r}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[t]:Object.assign(Object.assign({},sr(e)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:e.borderRadiusSM,alignSelf:"center",[`${t}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${t}-inner`]:Object.assign({},GC(e))},[`${t}-inner`]:{boxSizing:"border-box",display:"block",width:e.checkboxSize,height:e.checkboxSize,direction:"ltr",backgroundColor:e.colorBgContainer,border:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,borderCollapse:"separate",transition:`all ${e.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"25%",display:"table",width:e.calc(e.checkboxSize).div(14).mul(5).equal(),height:e.calc(e.checkboxSize).div(14).mul(8).equal(),border:`${oe(e.lineWidthBold)} solid ${e.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${e.motionDurationFast} ${e.motionEaseInBack}, opacity ${e.motionDurationFast}`}},"& + span":{paddingInlineStart:e.paddingXS,paddingInlineEnd:e.paddingXS}})},{[` ${r}:not(${r}-disabled), ${t}:not(${t}-disabled) `]:{[`&:hover ${t}-inner`]:{borderColor:e.colorPrimary}},[`${r}:not(${r}-disabled)`]:{[`&:hover ${t}-checked:not(${t}-disabled) ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${t}-checked:not(${t}-disabled):after`]:{borderColor:e.colorPrimaryHover}}},{[`${t}-checked`]:{[`${t}-inner`]:{backgroundColor:e.colorPrimary,borderColor:e.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${e.motionDurationMid} ${e.motionEaseOutBack} ${e.motionDurationFast}`}}},[` ${r}-checked:not(${r}-disabled), ${t}-checked:not(${t}-disabled) - `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer} !important`,borderColor:`${e.colorBorder} !important`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer} !important`,borderColor:`${e.colorPrimary} !important`}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function b9(e,t){let r=rt(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[x9(r)]}var v0=Pt("Checkbox",(e,t)=>{let{prefixCls:r}=t;return[b9(r,e)]});var Qr=E(I()),DE=E(Ee());var Gk=E(I()),S9=Gk.default.createContext(null),y0=S9;var C9=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{var r;let{prefixCls:o,className:n,rootClassName:i,children:a,indeterminate:s=!1,style:l,onMouseEnter:c,onMouseLeave:u,skipGroup:d=!1,disabled:f}=e,m=C9(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:h,direction:v,checkbox:y}=Qr.useContext(at),g=Qr.useContext(y0),{isFormItemInput:p}=Qr.useContext(fo),x=Qr.useContext(Ur),S=(r=g?.disabled||f)!==null&&r!==void 0?r:x,b=Qr.useRef(m.value),w=Qr.useRef(null),C=Fr(t,w);Qr.useEffect(()=>{g?.registerValue(m.value)},[]),Qr.useEffect(()=>{if(!d)return m.value!==b.current&&(g?.cancelValue(b.current),g?.registerValue(m.value),b.current=m.value),()=>g?.cancelValue(m.value)},[m.value]),Qr.useEffect(()=>{var M;!((M=w.current)===null||M===void 0)&&M.input&&(w.current.input.indeterminate=s)},[s]);let R=h("checkbox",o),_=Mo(R),[O,N,k]=v0(R,_),L=Object.assign({},m);g&&!d&&(L.onChange=function(){m.onChange&&m.onChange.apply(m,arguments),g.toggleOption&&g.toggleOption({label:a,value:m.value})},L.name=g.name,L.checked=g.value.includes(m.value));let j=(0,DE.default)(`${R}-wrapper`,{[`${R}-rtl`]:v==="rtl",[`${R}-wrapper-checked`]:L.checked,[`${R}-wrapper-disabled`]:S,[`${R}-wrapper-in-form-item`]:p},y?.className,n,i,k,_,N),W=(0,DE.default)({[`${R}-indeterminate`]:s},Mu,N),[D,$]=TE(L.onClick);return O(Qr.createElement(Xv,{component:"Checkbox",disabled:S},Qr.createElement("label",{className:j,style:Object.assign(Object.assign({},y?.style),l),onMouseEnter:c,onMouseLeave:u,onClick:D},Qr.createElement(Ak,Object.assign({},L,{onClick:$,prefixCls:R,className:W,disabled:S,ref:C})),a!==void 0&&Qr.createElement("span",{className:`${R}-label`},a))))},E9=Qr.forwardRef(w9),x0=E9;var Zo=E(I()),qk=E(Ee());var R9=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{defaultValue:r,children:o,options:n=[],prefixCls:i,className:a,rootClassName:s,style:l,onChange:c}=e,u=R9(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:d,direction:f}=Zo.useContext(at),[m,h]=Zo.useState(u.value||r||[]),[v,y]=Zo.useState([]);Zo.useEffect(()=>{"value"in u&&h(u.value||[])},[u.value]);let g=Zo.useMemo(()=>n.map(W=>typeof W=="string"||typeof W=="number"?{label:W,value:W}:W),[n]),p=W=>{y(D=>D.filter($=>$!==W))},x=W=>{y(D=>[].concat(se(D),[W]))},S=W=>{let D=m.indexOf(W.value),$=se(m);D===-1?$.push(W.value):$.splice(D,1),"value"in u||h($),c?.($.filter(M=>v.includes(M)).sort((M,V)=>{let F=g.findIndex(U=>U.value===M),z=g.findIndex(U=>U.value===V);return F-z}))},b=d("checkbox",i),w=`${b}-group`,C=Mo(b),[R,_,O]=v0(b,C),N=Gr(u,["value","disabled"]),k=n.length?g.map(W=>Zo.createElement(x0,{prefixCls:b,key:W.value.toString(),disabled:"disabled"in W?W.disabled:u.disabled,value:W.value,checked:m.includes(W.value),onChange:W.onChange,className:`${w}-item`,style:W.style,title:W.title,id:W.id,required:W.required},W.label)):o,L={toggleOption:S,value:m,disabled:u.disabled,name:u.name,registerValue:x,cancelValue:p},j=(0,qk.default)(w,{[`${w}-rtl`]:f==="rtl"},a,s,O,C,_);return R(Zo.createElement("div",Object.assign({className:j,style:l},N,{ref:t}),Zo.createElement(y0.Provider,{value:L},k)))});var Kk=O9;var AE=x0;AE.Group=Kk;AE.__ANT_CHECKBOX=!0;var $p=AE;var Er=E(I());var b0=E(I());var _9={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},Xk=_9;var P9=function(t,r){return b0.createElement(mt,ee({},t,{ref:r,icon:Xk}))},T9=b0.forwardRef(P9),Yk=T9;var fc=E(Ee());function Dp(){return typeof BigInt=="function"}function S0(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Ai(e){var t=e.trim(),r=t.startsWith("-");r&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var o=t||"0",n=o.split("."),i=n[0]||"0",a=n[1]||"0";i==="0"&&a==="0"&&(r=!1);var s=r?"-":"";return{negative:r,negativeStr:s,trimStr:o,integerStr:i,decimalStr:a,fullStr:"".concat(s).concat(o)}}function C0(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function aa(e){var t=String(e);if(C0(e)){var r=Number(t.slice(t.indexOf("e-")+2)),o=t.match(/\.(\d+)/);return o!=null&&o[1]&&(r+=o[1].length),r}return t.includes(".")&&ld(t)?t.length-t.indexOf(".")-1:0}function qa(e){var t=String(e);if(C0(e)){if(e>Number.MAX_SAFE_INTEGER)return String(Dp()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":Ai("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}();var Zk=function(){function e(t){if(lt(this,e),T(this,"origin",""),T(this,"number",void 0),T(this,"empty",void 0),S0(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return ct(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(r){if(this.isInvalidate())return new e(r);var o=Number(r);if(Number.isNaN(o))return this;var n=this.number+o;if(n>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(nNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(n0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":qa(this.number):this.origin}}]),e}();function w0(e){return Dp()?new Qk(e):new Zk(e)}function Ap(e,t,r){var o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var n=Ai(e),i=n.negativeStr,a=n.integerStr,s=n.decimalStr,l="".concat(t).concat(s),c="".concat(i).concat(a);if(r>=0){var u=Number(s[r]);if(u>=5&&!o){var d=w0(e).add("".concat(i,"0.").concat("0".repeat(r)).concat(10-u));return Ap(d.toString(),t,r,o)}return r===0?c:"".concat(c).concat(t).concat(s.padEnd(r,"0").slice(0,r))}return l===".0"?c:"".concat(c).concat(l)}var Mi=w0;var dF=E(Ee());var Ka=E(Ee()),wo=E(I());function eF(e){return!!(e.addonBefore||e.addonAfter)}function tF(e){return!!(e.prefix||e.suffix||e.allowClear)}function Jk(e,t,r){var o=t.cloneNode(!0),n=Object.create(e,{target:{value:o},currentTarget:{value:o}});return o.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(o.selectionStart=t.selectionStart,o.selectionEnd=t.selectionEnd),o.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},n}function cd(e,t,r,o){if(r){var n=t;if(t.type==="click"){n=Jk(t,e,""),r(n);return}if(e.type!=="file"&&o!==void 0){n=Jk(t,e,o),r(n);return}r(n)}}function uc(e,t){if(e){e.focus(t);var r=t||{},o=r.cursor;if(o){var n=e.value.length;switch(o){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(n,n);break;default:e.setSelectionRange(0,n)}}}}var N9=wo.default.forwardRef(function(e,t){var r,o,n,i=e.inputElement,a=e.children,s=e.prefixCls,l=e.prefix,c=e.suffix,u=e.addonBefore,d=e.addonAfter,f=e.className,m=e.style,h=e.disabled,v=e.readOnly,y=e.focused,g=e.triggerFocus,p=e.allowClear,x=e.value,S=e.handleReset,b=e.hidden,w=e.classes,C=e.classNames,R=e.dataAttrs,_=e.styles,O=e.components,N=e.onClear,k=a??i,L=O?.affixWrapper||"span",j=O?.groupWrapper||"span",W=O?.wrapper||"span",D=O?.groupAddon||"span",$=(0,wo.useRef)(null),M=function(Q){var J;(J=$.current)!==null&&J!==void 0&&J.contains(Q.target)&&g?.()},V=tF(e),F=(0,wo.cloneElement)(k,{value:x,className:(0,Ka.default)((r=k.props)===null||r===void 0?void 0:r.className,!V&&C?.variant)||null}),z=(0,wo.useRef)(null);if(wo.default.useImperativeHandle(t,function(){return{nativeElement:z.current||$.current}}),V){var U=null;if(p){var H=!h&&!v&&x,A="".concat(s,"-clear-icon"),G=pe(p)==="object"&&p!==null&&p!==void 0&&p.clearIcon?p.clearIcon:"\u2716";U=wo.default.createElement("button",{type:"button",tabIndex:-1,onClick:function(Q){S?.(Q),N?.()},onMouseDown:function(Q){return Q.preventDefault()},className:(0,Ka.default)(A,T(T({},"".concat(A,"-hidden"),!H),"".concat(A,"-has-suffix"),!!c))},G)}var q="".concat(s,"-affix-wrapper"),oe=(0,Ka.default)(q,T(T(T(T(T({},"".concat(s,"-disabled"),h),"".concat(q,"-disabled"),h),"".concat(q,"-focused"),y),"".concat(q,"-readonly"),v),"".concat(q,"-input-with-clear-btn"),c&&p&&x),w?.affixWrapper,C?.affixWrapper,C?.variant),Z=(c||p)&&wo.default.createElement("span",{className:(0,Ka.default)("".concat(s,"-suffix"),C?.suffix),style:_?.suffix},U,c);F=wo.default.createElement(L,ee({className:oe,style:_?.affixWrapper,onClick:M},R?.affixWrapper,{ref:$}),l&&wo.default.createElement("span",{className:(0,Ka.default)("".concat(s,"-prefix"),C?.prefix),style:_?.prefix},l),F,Z)}if(eF(e)){var X="".concat(s,"-group"),ie="".concat(X,"-addon"),te="".concat(X,"-wrapper"),K=(0,Ka.default)("".concat(s,"-wrapper"),X,w?.wrapper,C?.wrapper),Y=(0,Ka.default)(te,T({},"".concat(te,"-disabled"),h),w?.group,C?.groupWrapper);F=wo.default.createElement(j,{className:Y,ref:z},wo.default.createElement(W,{className:K},u&&wo.default.createElement(D,{className:ie},u),F,d&&wo.default.createElement(D,{className:ie},d)))}return wo.default.cloneElement(F,{className:(0,Ka.default)((o=F.props)===null||o===void 0?void 0:o.className,f)||null,style:P(P({},(n=F.props)===null||n===void 0?void 0:n.style),m),hidden:b})}),dc=N9;var E0=E(Ee());var Wr=E(I());var rF=E(I()),I9=["show"];function Mp(e,t){return rF.useMemo(function(){var r={};t&&(r.show=pe(t)==="object"&&t.formatter?t.formatter:!!t),r=P(P({},r),e);var o=r,n=o.show,i=Ae(o,I9);return P(P({},i),{},{show:!!n,showFormatter:typeof n=="function"?n:void 0,strategy:i.strategy||function(a){return a.length}})},[e,t])}var $9=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],D9=(0,Wr.forwardRef)(function(e,t){var r=e.autoComplete,o=e.onChange,n=e.onFocus,i=e.onBlur,a=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,c=e.prefixCls,u=c===void 0?"rc-input":c,d=e.disabled,f=e.htmlSize,m=e.className,h=e.maxLength,v=e.suffix,y=e.showCount,g=e.count,p=e.type,x=p===void 0?"text":p,S=e.classes,b=e.classNames,w=e.styles,C=e.onCompositionStart,R=e.onCompositionEnd,_=Ae(e,$9),O=(0,Wr.useState)(!1),N=B(O,2),k=N[0],L=N[1],j=(0,Wr.useRef)(!1),W=(0,Wr.useRef)(!1),D=(0,Wr.useRef)(null),$=(0,Wr.useRef)(null),M=function(ae){D.current&&uc(D.current,ae)},V=zt(e.defaultValue,{value:e.value}),F=B(V,2),z=F[0],U=F[1],H=z==null?"":String(z),A=(0,Wr.useState)(null),G=B(A,2),q=G[0],oe=G[1],Z=Mp(g,y),X=Z.max||h,ie=Z.strategy(H),te=!!X&&ie>X;(0,Wr.useImperativeHandle)(t,function(){var ce;return{focus:M,blur:function(){var Re;(Re=D.current)===null||Re===void 0||Re.blur()},setSelectionRange:function(Re,Me,Be){var Ie;(Ie=D.current)===null||Ie===void 0||Ie.setSelectionRange(Re,Me,Be)},select:function(){var Re;(Re=D.current)===null||Re===void 0||Re.select()},input:D.current,nativeElement:((ce=$.current)===null||ce===void 0?void 0:ce.nativeElement)||D.current}}),(0,Wr.useEffect)(function(){W.current&&(W.current=!1),L(function(ce){return ce&&d?!1:ce})},[d]);var K=function(ae,Re,Me){var Be=Re;if(!j.current&&Z.exceedFormatter&&Z.max&&Z.strategy(Re)>Z.max){if(Be=Z.exceedFormatter(Re,{max:Z.max}),Re!==Be){var Ie,Oe;oe([((Ie=D.current)===null||Ie===void 0?void 0:Ie.selectionStart)||0,((Oe=D.current)===null||Oe===void 0?void 0:Oe.selectionEnd)||0])}}else if(Me.source==="compositionEnd")return;U(Be),D.current&&cd(D.current,ae,o,Be)};(0,Wr.useEffect)(function(){if(q){var ce;(ce=D.current)===null||ce===void 0||ce.setSelectionRange.apply(ce,se(q))}},[q]);var Y=function(ae){K(ae,ae.target.value,{source:"change"})},ne=function(ae){j.current=!1,K(ae,ae.currentTarget.value,{source:"compositionEnd"}),R?.(ae)},Q=function(ae){a&&ae.key==="Enter"&&!W.current&&(W.current=!0,a(ae)),s?.(ae)},J=function(ae){ae.key==="Enter"&&(W.current=!1),l?.(ae)},le=function(ae){L(!0),n?.(ae)},ue=function(ae){W.current&&(W.current=!1),L(!1),i?.(ae)},de=function(ae){U(""),M(),D.current&&cd(D.current,ae,o)},ve=te&&"".concat(u,"-out-of-range"),ye=function(){var ae=Gr(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Wr.default.createElement("input",ee({autoComplete:r},ae,{onChange:Y,onFocus:le,onBlur:ue,onKeyDown:Q,onKeyUp:J,className:(0,E0.default)(u,T({},"".concat(u,"-disabled"),d),b?.input),style:w?.input,ref:D,size:f,type:x,onCompositionStart:function(Me){j.current=!0,C?.(Me)},onCompositionEnd:ne}))},we=function(){var ae=Number(X)>0;if(v||Z.show){var Re=Z.showFormatter?Z.showFormatter({value:H,count:ie,maxLength:X}):"".concat(ie).concat(ae?" / ".concat(X):"");return Wr.default.createElement(Wr.default.Fragment,null,Z.show&&Wr.default.createElement("span",{className:(0,E0.default)("".concat(u,"-show-count-suffix"),T({},"".concat(u,"-show-count-has-suffix"),!!v),b?.count),style:P({},w?.count)},Re),v)}return null};return Wr.default.createElement(dc,ee({},_,{prefixCls:u,className:(0,E0.default)(m,ve),handleReset:de,value:H,focused:k,triggerFocus:M,suffix:we(),disabled:d,classes:S,classNames:b,styles:w,ref:$}),ye())}),oF=D9;var nF=oF;function ME(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get:function(o,n){if(t[n])return t[n];var i=o[n];return typeof i=="function"?i.bind(o):i}}):e}var _t=E(I());var iF=E(I());function LE(e,t){var r=(0,iF.useRef)(null);function o(){try{var i=e.selectionStart,a=e.selectionEnd,s=e.value,l=s.substring(0,i),c=s.substring(a);r.current={start:i,end:a,value:s,beforeTxt:l,afterTxt:c}}catch{}}function n(){if(e&&r.current&&t)try{var i=e.value,a=r.current,s=a.beforeTxt,l=a.afterTxt,c=a.start,u=i.length;if(i.startsWith(s))u=s.length;else if(i.endsWith(l))u=i.length-r.current.afterTxt.length;else{var d=s[c-1],f=i.indexOf(d,c-1);f!==-1&&(u=f+1)}e.setSelectionRange(u,u)}catch(m){Vt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(m.message))}}return[o,n]}var li=E(I()),kE=E(Ee());var aF=E(I());var A9=function(){var t=(0,aF.useState)(!1),r=B(t,2),o=r[0],n=r[1];return yt(function(){n(Bu())},[]),o},sF=A9;var M9=200,L9=600;function FE(e){var t=e.prefixCls,r=e.upNode,o=e.downNode,n=e.upDisabled,i=e.downDisabled,a=e.onStep,s=li.useRef(),l=li.useRef([]),c=li.useRef();c.current=a;var u=function(){clearTimeout(s.current)},d=function(x,S){x.preventDefault(),u(),c.current(S);function b(){c.current(S),s.current=setTimeout(b,M9)}s.current=setTimeout(b,L9)};li.useEffect(function(){return function(){u(),l.current.forEach(function(p){return ut.cancel(p)})}},[]);var f=sF();if(f)return null;var m="".concat(t,"-handler"),h=(0,kE.default)(m,"".concat(m,"-up"),T({},"".concat(m,"-up-disabled"),n)),v=(0,kE.default)(m,"".concat(m,"-down"),T({},"".concat(m,"-down-disabled"),i)),y=function(){return l.current.push(ut(u))},g={unselectable:"on",role:"button",onMouseUp:y,onMouseLeave:y};return li.createElement("div",{className:"".concat(m,"-wrap")},li.createElement("span",ee({},g,{onMouseDown:function(x){d(x,!0)},"aria-label":"Increase Value","aria-disabled":n,className:h}),r||li.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),li.createElement("span",ee({},g,{onMouseDown:function(x){d(x,!1)},"aria-label":"Decrease Value","aria-disabled":i,className:v}),o||li.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function zE(e){var t=typeof e=="number"?qa(e):Ai(e).fullStr,r=t.includes(".");return r?Ai(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var R0=E(I());var lF=function(){var e=(0,R0.useRef)(0),t=function(){ut.cancel(e.current)};return(0,R0.useEffect)(function(){return t},[]),function(r){t(),e.current=ut(function(){r()})}};var k9=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],F9=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],cF=function(t,r){return t||r.isEmpty()?r.toString():r.toNumber()},uF=function(t){var r=Mi(t);return r.isInvalidate()?null:r},z9=_t.forwardRef(function(e,t){var r=e.prefixCls,o=e.className,n=e.style,i=e.min,a=e.max,s=e.step,l=s===void 0?1:s,c=e.defaultValue,u=e.value,d=e.disabled,f=e.readOnly,m=e.upHandler,h=e.downHandler,v=e.keyboard,y=e.changeOnWheel,g=y===void 0?!1:y,p=e.controls,x=p===void 0?!0:p,S=e.classNames,b=e.stringMode,w=e.parser,C=e.formatter,R=e.precision,_=e.decimalSeparator,O=e.onChange,N=e.onInput,k=e.onPressEnter,L=e.onStep,j=e.changeOnBlur,W=j===void 0?!0:j,D=e.domRef,$=Ae(e,k9),M="".concat(r,"-input"),V=_t.useRef(null),F=_t.useState(!1),z=B(F,2),U=z[0],H=z[1],A=_t.useRef(!1),G=_t.useRef(!1),q=_t.useRef(!1),oe=_t.useState(function(){return Mi(u??c)}),Z=B(oe,2),X=Z[0],ie=Z[1];function te(We){u===void 0&&ie(We)}var K=_t.useCallback(function(We,Pe){if(!Pe)return R>=0?R:Math.max(aa(We),aa(l))},[R,l]),Y=_t.useCallback(function(We){var Pe=String(We);if(w)return w(Pe);var tt=Pe;return _&&(tt=tt.replace(_,".")),tt.replace(/[^\w.-]+/g,"")},[w,_]),ne=_t.useRef(""),Q=_t.useCallback(function(We,Pe){if(C)return C(We,{userTyping:Pe,input:String(ne.current)});var tt=typeof We=="number"?qa(We):We;if(!Pe){var De=K(tt,Pe);if(ld(tt)&&(_||De>=0)){var Le=_||".";tt=Ap(tt,Le,De)}}return tt},[C,K,_]),J=_t.useState(function(){var We=c??u;return X.isInvalidate()&&["string","number"].includes(pe(We))?Number.isNaN(We)?"":We:Q(X.toString(),!1)}),le=B(J,2),ue=le[0],de=le[1];ne.current=ue;function ve(We,Pe){de(Q(We.isInvalidate()?We.toString(!1):We.toString(!Pe),Pe))}var ye=_t.useMemo(function(){return uF(a)},[a,R]),we=_t.useMemo(function(){return uF(i)},[i,R]),ce=_t.useMemo(function(){return!ye||!X||X.isInvalidate()?!1:ye.lessEquals(X)},[ye,X]),ae=_t.useMemo(function(){return!we||!X||X.isInvalidate()?!1:X.lessEquals(we)},[we,X]),Re=LE(V.current,U),Me=B(Re,2),Be=Me[0],Ie=Me[1],Oe=function(Pe){return ye&&!Pe.lessEquals(ye)?ye:we&&!we.lessEquals(Pe)?we:null},be=function(Pe){return!Oe(Pe)},Ve=function(Pe,tt){var De=Pe,Le=be(De)||De.isEmpty();if(!De.isEmpty()&&!tt&&(De=Oe(De)||De,Le=!0),!f&&!d&&Le){var Te=De.toString(),Ne=K(Te,tt);return Ne>=0&&(De=Mi(Ap(Te,".",Ne)),be(De)||(De=Mi(Ap(Te,".",Ne,!0)))),De.equals(X)||(te(De),O?.(De.isEmpty()?null:cF(b,De)),u===void 0&&ve(De,tt)),De}return X},He=lF(),$e=function We(Pe){if(Be(),ne.current=Pe,de(Pe),!G.current){var tt=Y(Pe),De=Mi(tt);De.isNaN()||Ve(De,!0)}N?.(Pe),He(function(){var Le=Pe;w||(Le=Pe.replace(/。/g,".")),Le!==Pe&&We(Le)})},fe=function(){G.current=!0},me=function(){G.current=!1,$e(V.current.value)},ze=function(Pe){$e(Pe.target.value)},Ce=function(Pe){var tt;if(!(Pe&&ce||!Pe&&ae)){A.current=!1;var De=Mi(q.current?zE(l):l);Pe||(De=De.negate());var Le=(X||Mi(0)).add(De.toString()),Te=Ve(Le,!1);L?.(cF(b,Te),{offset:q.current?zE(l):l,type:Pe?"up":"down"}),(tt=V.current)===null||tt===void 0||tt.focus()}},Ue=function(Pe){var tt=Mi(Y(ue)),De;tt.isNaN()?De=Ve(X,Pe):De=Ve(tt,Pe),u!==void 0?ve(X,!1):De.isNaN()||ve(De,!1)},Qe=function(){A.current=!0},gt=function(Pe){var tt=Pe.key,De=Pe.shiftKey;A.current=!0,q.current=De,tt==="Enter"&&(G.current||(A.current=!1),Ue(!1),k?.(Pe)),v!==!1&&!G.current&&["Up","ArrowUp","Down","ArrowDown"].includes(tt)&&(Ce(tt==="Up"||tt==="ArrowUp"),Pe.preventDefault())},Nt=function(){A.current=!1,q.current=!1};_t.useEffect(function(){if(g&&U){var We=function(De){Ce(De.deltaY<0),De.preventDefault()},Pe=V.current;if(Pe)return Pe.addEventListener("wheel",We,{passive:!1}),function(){return Pe.removeEventListener("wheel",We)}}});var ht=function(){W&&Ue(!1),H(!1),A.current=!1};return Fl(function(){X.isInvalidate()||ve(X,!1)},[R,C]),Fl(function(){var We=Mi(u);ie(We);var Pe=Mi(Y(ue));(!We.equals(Pe)||!A.current||C)&&ve(We,A.current)},[u]),Fl(function(){C&&Ie()},[ue]),_t.createElement("div",{ref:D,className:(0,dF.default)(r,o,T(T(T(T(T({},"".concat(r,"-focused"),U),"".concat(r,"-disabled"),d),"".concat(r,"-readonly"),f),"".concat(r,"-not-a-number"),X.isNaN()),"".concat(r,"-out-of-range"),!X.isInvalidate()&&!be(X))),style:n,onFocus:function(){H(!0)},onBlur:ht,onKeyDown:gt,onKeyUp:Nt,onCompositionStart:fe,onCompositionEnd:me,onBeforeInput:Qe},x&&_t.createElement(FE,{prefixCls:r,upNode:m,downNode:h,upDisabled:ce,downDisabled:ae,onStep:Ce}),_t.createElement("div",{className:"".concat(M,"-wrap")},_t.createElement("input",ee({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":X.isInvalidate()?null:X.toString(),step:l},$,{ref:Fr(V,t),className:M,value:ue,onChange:ze,disabled:d,readOnly:f}))))}),W9=_t.forwardRef(function(e,t){var r=e.disabled,o=e.style,n=e.prefixCls,i=n===void 0?"rc-input-number":n,a=e.value,s=e.prefix,l=e.suffix,c=e.addonBefore,u=e.addonAfter,d=e.className,f=e.classNames,m=Ae(e,F9),h=_t.useRef(null),v=_t.useRef(null),y=_t.useRef(null),g=function(x){y.current&&uc(y.current,x)};return _t.useImperativeHandle(t,function(){return ME(y.current,{focus:g,nativeElement:h.current.nativeElement||v.current})}),_t.createElement(dc,{className:d,triggerFocus:g,prefixCls:i,value:a,disabled:r,style:o,prefix:s,suffix:l,addonAfter:u,addonBefore:c,classNames:f,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:h},_t.createElement(z9,ee({prefixCls:i,disabled:r,ref:y,domRef:v,className:f?.input},m)))}),fF=W9;var pF=fF;var mF=e=>{var t;let r=(t=e.handleVisible)!==null&&t!==void 0?t:"auto",o=e.controlHeightSM-e.lineWidth*2;return Object.assign(Object.assign({},Ga(e)),{controlWidth:90,handleWidth:o,handleFontSize:e.fontSize/2,handleVisible:r,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new it(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:r===!0?1:0,handleVisibleWidth:r===!0?o:0})};var gF=(e,t)=>{let{componentCls:r,borderRadiusSM:o,borderRadiusLG:n}=e,i=t==="lg"?n:o;return{[`&-${t}`]:{[`${r}-handler-wrap`]:{borderStartEndRadius:i,borderEndEndRadius:i},[`${r}-handler-up`]:{borderStartEndRadius:i},[`${r}-handler-down`]:{borderEndEndRadius:i}}}},B9=e=>{let{componentCls:t,lineWidth:r,lineType:o,borderRadius:n,inputFontSizeSM:i,inputFontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,paddingInlineSM:u,paddingBlockSM:d,paddingBlockLG:f,paddingInlineLG:m,colorTextDescription:h,motionDurationMid:v,handleHoverColor:y,handleOpacity:g,paddingInline:p,paddingBlock:x,handleBg:S,handleActiveBg:b,colorTextDisabled:w,borderRadiusSM:C,borderRadiusLG:R,controlWidth:_,handleBorderColor:O,filledHandleBg:N,lineHeightLG:k,calc:L}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Qt(e)),Ip(e)),{display:"inline-block",width:_,margin:0,padding:0,borderRadius:n}),c0(e,{[`${t}-handler-wrap`]:{background:S,[`${t}-handler-down`]:{borderBlockStart:`${re(r)} ${o} ${O}`}}})),f0(e,{[`${t}-handler-wrap`]:{background:N,[`${t}-handler-down`]:{borderBlockStart:`${re(r)} ${o} ${O}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:S}}})),m0(e,{[`${t}-handler-wrap`]:{background:S,[`${t}-handler-down`]:{borderBlockStart:`${re(r)} ${o} ${O}`}}})),d0(e)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:k,borderRadius:R,[`input${t}-input`]:{height:L(s).sub(L(r).mul(2)).equal(),padding:`${re(f)} ${re(m)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:C,[`input${t}-input`]:{height:L(l).sub(L(r).mul(2)).equal(),padding:`${re(d)} ${re(u)}`}},"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},Qt(e)),$E(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:R,fontSize:e.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:C}}},u0(e)),p0(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},Qt(e)),{width:"100%",padding:`${re(x)} ${re(p)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:n,outline:0,transition:`all ${v} linear`,appearance:"textfield",fontSize:"inherit"}),IE(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1}})},{[t]:Object.assign(Object.assign(Object.assign({[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:g,height:"100%",borderStartStartRadius:0,borderStartEndRadius:n,borderEndEndRadius:n,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${v}`,overflow:"hidden",[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` + `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer} !important`,borderColor:`${e.colorBorder} !important`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer} !important`,borderColor:`${e.colorPrimary} !important`}}}},{[`${r}-disabled`]:{cursor:"not-allowed"},[`${t}-disabled`]:{[`&, ${t}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${t}-inner`]:{background:e.colorBgContainerDisabled,borderColor:e.colorBorder,"&:after":{borderColor:e.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:e.colorTextDisabled},[`&${t}-indeterminate ${t}-inner::after`]:{background:e.colorTextDisabled}}}]};function $7(e,t){let r=ut(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[I7(r)]}var Uy=Gt("Checkbox",(e,{prefixCls:t})=>[$7(t,e)]);var Yr=E($()),rE=E(Ne());var tF=E($()),D7=tF.default.createContext(null),qy=D7;var A7=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{var r;let{prefixCls:n,className:o,rootClassName:i,children:a,indeterminate:s=!1,style:l,onMouseEnter:c,onMouseLeave:u,skipGroup:f=!1,disabled:p}=e,g=A7(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:h,direction:v,checkbox:y}=Yr.useContext(rt),m=Yr.useContext(qy),{isFormItemInput:d}=Yr.useContext(fn),x=Yr.useContext(Ur),b=(r=m?.disabled||p)!==null&&r!==void 0?r:x,S=Yr.useRef(g.value),w=Yr.useRef(null),C=Lr(t,w);Yr.useEffect(()=>{m?.registerValue(g.value)},[]),Yr.useEffect(()=>{if(!f)return g.value!==S.current&&(m?.cancelValue(S.current),m?.registerValue(g.value),S.current=g.value),()=>m?.cancelValue(g.value)},[g.value]),Yr.useEffect(()=>{var D;!((D=w.current)===null||D===void 0)&&D.input&&(w.current.input.indeterminate=s)},[s]);let R=h("checkbox",n),P=Ko(R),[O,A,F]=Uy(R,P),M=Object.assign({},g);m&&!f&&(M.onChange=(...D)=>{g.onChange&&g.onChange.apply(g,D),m.toggleOption&&m.toggleOption({label:a,value:g.value})},M.name=m.name,M.checked=m.value.includes(g.value));let H=(0,rE.default)(`${R}-wrapper`,{[`${R}-rtl`]:v==="rtl",[`${R}-wrapper-checked`]:M.checked,[`${R}-wrapper-disabled`]:b,[`${R}-wrapper-in-form-item`]:d},y?.className,o,i,F,P,A),L=(0,rE.default)({[`${R}-indeterminate`]:s},gu,A),[N,I]=J1(M.onClick);return O(Yr.createElement(Rv,{component:"Checkbox",disabled:b},Yr.createElement("label",{className:H,style:Object.assign(Object.assign({},y?.style),l),onMouseEnter:c,onMouseLeave:u,onClick:N},Yr.createElement(VM,Object.assign({},M,{onClick:I,prefixCls:R,className:L,disabled:b,ref:C})),a!=null&&Yr.createElement("span",{className:`${R}-label`},a))))},M7=Yr.forwardRef(k7),Gy=M7;var Nn=E($()),nE=E(Ne());var F7=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{defaultValue:r,children:n,options:o=[],prefixCls:i,className:a,rootClassName:s,style:l,onChange:c}=e,u=F7(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:f,direction:p}=Nn.useContext(rt),[g,h]=Nn.useState(u.value||r||[]),[v,y]=Nn.useState([]);Nn.useEffect(()=>{"value"in u&&h(u.value||[])},[u.value]);let m=Nn.useMemo(()=>o.map(L=>typeof L=="string"||typeof L=="number"?{label:L,value:L}:L),[o]),d=L=>{y(N=>N.filter(I=>I!==L))},x=L=>{y(N=>[].concat(te(N),[L]))},b=L=>{let N=g.indexOf(L.value),I=te(g);N===-1?I.push(L.value):I.splice(N,1),"value"in u||h(I),c?.(I.filter(D=>v.includes(D)).sort((D,U)=>{let z=m.findIndex(q=>q.value===D),W=m.findIndex(q=>q.value===U);return z-W}))},S=f("checkbox",i),w=`${S}-group`,C=Ko(S),[R,P,O]=Uy(S,C),A=qr(u,["value","disabled"]),F=o.length?m.map(L=>Nn.createElement(Gy,{prefixCls:S,key:L.value.toString(),disabled:"disabled"in L?L.disabled:u.disabled,value:L.value,checked:g.includes(L.value),onChange:L.onChange,className:(0,nE.default)(`${w}-item`,L.className),style:L.style,title:L.title,id:L.id,required:L.required},L.label)):n,M=Nn.useMemo(()=>({toggleOption:b,value:g,disabled:u.disabled,name:u.name,registerValue:x,cancelValue:d}),[b,g,u.disabled,u.name,x,d]),H=(0,nE.default)(w,{[`${w}-rtl`]:p==="rtl"},a,s,O,C,P);return R(Nn.createElement("div",Object.assign({className:H,style:l},A,{ref:t}),Nn.createElement(qy.Provider,{value:M},F)))});var rF=L7;var oE=Gy;oE.Group=rF;oE.__ANT_CHECKBOX=!0;var ap=oE;var Rr=E($());var Ky=E($());var z7={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},nF=z7;var W7=function(t,r){return Ky.createElement(zt,fe({},t,{ref:r,icon:nF}))},B7=Ky.forwardRef(W7),oF=B7;var Gl=E(Ne());function sp(){return typeof BigInt=="function"}function Xy(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Ti(e){var t=e.trim(),r=t.startsWith("-");r&&(t=t.slice(1)),t=t.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),t.startsWith(".")&&(t="0".concat(t));var n=t||"0",o=n.split("."),i=o[0]||"0",a=o[1]||"0";i==="0"&&a==="0"&&(r=!1);var s=r?"-":"";return{negative:r,negativeStr:s,trimStr:n,integerStr:i,decimalStr:a,fullStr:"".concat(s).concat(n)}}function Yy(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function Zi(e){var t=String(e);if(Yy(e)){var r=Number(t.slice(t.indexOf("e-")+2)),n=t.match(/\.(\d+)/);return n!=null&&n[1]&&(r+=n[1].length),r}return t.includes(".")&&Wu(t)?t.length-t.indexOf(".")-1:0}function La(e){var t=String(e);if(Yy(e)){if(e>Number.MAX_SAFE_INTEGER)return String(sp()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":Ti("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}();var aF=function(){function e(t){if(it(this,e),_(this,"origin",""),_(this,"number",void 0),_(this,"empty",void 0),Xy(t)){this.empty=!0;return}this.origin=String(t),this.number=Number(t)}return at(e,[{key:"negate",value:function(){return new e(-this.toNumber())}},{key:"add",value:function(r){if(this.isInvalidate())return new e(r);var n=Number(r);if(Number.isNaN(n))return this;var o=this.number+n;if(o>Number.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(oNumber.MAX_SAFE_INTEGER)return new e(Number.MAX_SAFE_INTEGER);if(o0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":La(this.number):this.origin}}]),e}();function Qy(e){return sp()?new iF(e):new aF(e)}function lp(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var o=Ti(e),i=o.negativeStr,a=o.integerStr,s=o.decimalStr,l="".concat(t).concat(s),c="".concat(i).concat(a);if(r>=0){var u=Number(s[r]);if(u>=5&&!n){var f=Qy(e).add("".concat(i,"0.").concat("0".repeat(r)).concat(10-u));return lp(f.toString(),t,r,n)}return r===0?c:"".concat(c).concat(t).concat(s.padEnd(r,"0").slice(0,r))}return l===".0"?c:"".concat(c).concat(l)}var Ni=Qy;var xF=E(Ne());var za=E(Ne()),Sn=E($());function lF(e){return!!(e.addonBefore||e.addonAfter)}function cF(e){return!!(e.prefix||e.suffix||e.allowClear)}function sF(e,t,r){var n=t.cloneNode(!0),o=Object.create(e,{target:{value:n},currentTarget:{value:n}});return n.value=r,typeof t.selectionStart=="number"&&typeof t.selectionEnd=="number"&&(n.selectionStart=t.selectionStart,n.selectionEnd=t.selectionEnd),n.setSelectionRange=function(){t.setSelectionRange.apply(t,arguments)},o}function Bu(e,t,r,n){if(r){var o=t;if(t.type==="click"){o=sF(t,e,""),r(o);return}if(e.type!=="file"&&n!==void 0){o=sF(t,e,n),r(o);return}r(o)}}function Ul(e,t){if(e){e.focus(t);var r=t||{},n=r.cursor;if(n){var o=e.value.length;switch(n){case"start":e.setSelectionRange(0,0);break;case"end":e.setSelectionRange(o,o);break;default:e.setSelectionRange(0,o)}}}}var j7=Sn.default.forwardRef(function(e,t){var r,n,o,i=e.inputElement,a=e.children,s=e.prefixCls,l=e.prefix,c=e.suffix,u=e.addonBefore,f=e.addonAfter,p=e.className,g=e.style,h=e.disabled,v=e.readOnly,y=e.focused,m=e.triggerFocus,d=e.allowClear,x=e.value,b=e.handleReset,S=e.hidden,w=e.classes,C=e.classNames,R=e.dataAttrs,P=e.styles,O=e.components,A=e.onClear,F=a??i,M=O?.affixWrapper||"span",H=O?.groupWrapper||"span",L=O?.wrapper||"span",N=O?.groupAddon||"span",I=(0,Sn.useRef)(null),D=function(ee){var ne;(ne=I.current)!==null&&ne!==void 0&&ne.contains(ee.target)&&m?.()},U=cF(e),z=(0,Sn.cloneElement)(F,{value:x,className:(0,za.default)((r=F.props)===null||r===void 0?void 0:r.className,!U&&C?.variant)||null}),W=(0,Sn.useRef)(null);if(Sn.default.useImperativeHandle(t,function(){return{nativeElement:W.current||I.current}}),U){var q=null;if(d){var j=!h&&!v&&x,k="".concat(s,"-clear-icon"),V=ue(d)==="object"&&d!==null&&d!==void 0&&d.clearIcon?d.clearIcon:"\u2716";q=Sn.default.createElement("button",{type:"button",tabIndex:-1,onClick:function(ee){b?.(ee),A?.()},onMouseDown:function(ee){return ee.preventDefault()},className:(0,za.default)(k,_(_({},"".concat(k,"-hidden"),!j),"".concat(k,"-has-suffix"),!!c))},V)}var G="".concat(s,"-affix-wrapper"),J=(0,za.default)(G,_(_(_(_(_({},"".concat(s,"-disabled"),h),"".concat(G,"-disabled"),h),"".concat(G,"-focused"),y),"".concat(G,"-readonly"),v),"".concat(G,"-input-with-clear-btn"),c&&d&&x),w?.affixWrapper,C?.affixWrapper,C?.variant),Y=(c||d)&&Sn.default.createElement("span",{className:(0,za.default)("".concat(s,"-suffix"),C?.suffix),style:P?.suffix},q,c);z=Sn.default.createElement(M,fe({className:J,style:P?.affixWrapper,onClick:D},R?.affixWrapper,{ref:I}),l&&Sn.default.createElement("span",{className:(0,za.default)("".concat(s,"-prefix"),C?.prefix),style:P?.prefix},l),z,Y)}if(lF(e)){var X="".concat(s,"-group"),ae="".concat(X,"-addon"),Z="".concat(X,"-wrapper"),K=(0,za.default)("".concat(s,"-wrapper"),X,w?.wrapper,C?.wrapper),Q=(0,za.default)(Z,_({},"".concat(Z,"-disabled"),h),w?.group,C?.groupWrapper);z=Sn.default.createElement(H,{className:Q,ref:W},Sn.default.createElement(L,{className:K},u&&Sn.default.createElement(N,{className:ae},u),z,f&&Sn.default.createElement(N,{className:ae},f)))}return Sn.default.cloneElement(z,{className:(0,za.default)((n=z.props)===null||n===void 0?void 0:n.className,p)||null,style:T(T({},(o=z.props)===null||o===void 0?void 0:o.style),g),hidden:S})}),ql=j7;var Jy=E(Ne());var Wr=E($());var uF=E($()),V7=["show"];function cp(e,t){return uF.useMemo(function(){var r={};t&&(r.show=ue(t)==="object"&&t.formatter?t.formatter:!!t),r=T(T({},r),e);var n=r,o=n.show,i=Ve(n,V7);return T(T({},i),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:i.strategy||function(a){return a.length}})},[e,t])}var H7=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],U7=(0,Wr.forwardRef)(function(e,t){var r=e.autoComplete,n=e.onChange,o=e.onFocus,i=e.onBlur,a=e.onPressEnter,s=e.onKeyDown,l=e.onKeyUp,c=e.prefixCls,u=c===void 0?"rc-input":c,f=e.disabled,p=e.htmlSize,g=e.className,h=e.maxLength,v=e.suffix,y=e.showCount,m=e.count,d=e.type,x=d===void 0?"text":d,b=e.classes,S=e.classNames,w=e.styles,C=e.onCompositionStart,R=e.onCompositionEnd,P=Ve(e,H7),O=(0,Wr.useState)(!1),A=B(O,2),F=A[0],M=A[1],H=(0,Wr.useRef)(!1),L=(0,Wr.useRef)(!1),N=(0,Wr.useRef)(null),I=(0,Wr.useRef)(null),D=function(ie){N.current&&Ul(N.current,ie)},U=ar(e.defaultValue,{value:e.value}),z=B(U,2),W=z[0],q=z[1],j=W==null?"":String(W),k=(0,Wr.useState)(null),V=B(k,2),G=V[0],J=V[1],Y=cp(m,y),X=Y.max||h,ae=Y.strategy(j),Z=!!X&&ae>X;(0,Wr.useImperativeHandle)(t,function(){var ce;return{focus:D,blur:function(){var Re;(Re=N.current)===null||Re===void 0||Re.blur()},setSelectionRange:function(Re,Le,Ge){var Me;(Me=N.current)===null||Me===void 0||Me.setSelectionRange(Re,Le,Ge)},select:function(){var Re;(Re=N.current)===null||Re===void 0||Re.select()},input:N.current,nativeElement:((ce=I.current)===null||ce===void 0?void 0:ce.nativeElement)||N.current}}),(0,Wr.useEffect)(function(){L.current&&(L.current=!1),M(function(ce){return ce&&f?!1:ce})},[f]);var K=function(ie,Re,Le){var Ge=Re;if(!H.current&&Y.exceedFormatter&&Y.max&&Y.strategy(Re)>Y.max){if(Ge=Y.exceedFormatter(Re,{max:Y.max}),Re!==Ge){var Me,Ie;J([((Me=N.current)===null||Me===void 0?void 0:Me.selectionStart)||0,((Ie=N.current)===null||Ie===void 0?void 0:Ie.selectionEnd)||0])}}else if(Le.source==="compositionEnd")return;q(Ge),N.current&&Bu(N.current,ie,n,Ge)};(0,Wr.useEffect)(function(){if(G){var ce;(ce=N.current)===null||ce===void 0||ce.setSelectionRange.apply(ce,te(G))}},[G]);var Q=function(ie){K(ie,ie.target.value,{source:"change"})},re=function(ie){H.current=!1,K(ie,ie.currentTarget.value,{source:"compositionEnd"}),R?.(ie)},ee=function(ie){a&&ie.key==="Enter"&&!L.current&&(L.current=!0,a(ie)),s?.(ie)},ne=function(ie){ie.key==="Enter"&&(L.current=!1),l?.(ie)},de=function(ie){M(!0),o?.(ie)},le=function(ie){L.current&&(L.current=!1),M(!1),i?.(ie)},pe=function(ie){q(""),D(),N.current&&Bu(N.current,ie,n)},Oe=Z&&"".concat(u,"-out-of-range"),Ce=function(){var ie=qr(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Wr.default.createElement("input",fe({autoComplete:r},ie,{onChange:Q,onFocus:de,onBlur:le,onKeyDown:ee,onKeyUp:ne,className:(0,Jy.default)(u,_({},"".concat(u,"-disabled"),f),S?.input),style:w?.input,ref:N,size:p,type:x,onCompositionStart:function(Le){H.current=!0,C?.(Le)},onCompositionEnd:re}))},De=function(){var ie=Number(X)>0;if(v||Y.show){var Re=Y.showFormatter?Y.showFormatter({value:j,count:ae,maxLength:X}):"".concat(ae).concat(ie?" / ".concat(X):"");return Wr.default.createElement(Wr.default.Fragment,null,Y.show&&Wr.default.createElement("span",{className:(0,Jy.default)("".concat(u,"-show-count-suffix"),_({},"".concat(u,"-show-count-has-suffix"),!!v),S?.count),style:T({},w?.count)},Re),v)}return null};return Wr.default.createElement(ql,fe({},P,{prefixCls:u,className:(0,Jy.default)(g,Oe),handleReset:pe,value:j,focused:F,triggerFocus:D,suffix:De(),disabled:f,classes:b,classNames:S,styles:w,ref:I}),Ce())}),fF=U7;var dF=fF;function iE(e,t){return typeof Proxy<"u"&&e?new Proxy(e,{get:function(n,o){if(t[o])return t[o];var i=n[o];return typeof i=="function"?i.bind(n):i}}):e}var Ot=E($());var pF=E($());function aE(e,t){var r=(0,pF.useRef)(null);function n(){try{var i=e.selectionStart,a=e.selectionEnd,s=e.value,l=s.substring(0,i),c=s.substring(a);r.current={start:i,end:a,value:s,beforeTxt:l,afterTxt:c}}catch{}}function o(){if(e&&r.current&&t)try{var i=e.value,a=r.current,s=a.beforeTxt,l=a.afterTxt,c=a.start,u=i.length;if(i.startsWith(s))u=s.length;else if(i.endsWith(l))u=i.length-r.current.afterTxt.length;else{var f=s[c-1],p=i.indexOf(f,c-1);p!==-1&&(u=p+1)}e.setSelectionRange(u,u)}catch(g){Vt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(g.message))}}return[n,o]}var ii=E($()),sE=E(Ne());var mF=E($());var q7=function(){var t=(0,mF.useState)(!1),r=B(t,2),n=r[0],o=r[1];return vt(function(){o(xu())},[]),n},gF=q7;var G7=200,K7=600;function lE(e){var t=e.prefixCls,r=e.upNode,n=e.downNode,o=e.upDisabled,i=e.downDisabled,a=e.onStep,s=ii.useRef(),l=ii.useRef([]),c=ii.useRef();c.current=a;var u=function(){clearTimeout(s.current)},f=function(x,b){x.preventDefault(),u(),c.current(b);function S(){c.current(b),s.current=setTimeout(S,G7)}s.current=setTimeout(S,K7)};ii.useEffect(function(){return function(){u(),l.current.forEach(function(d){return dt.cancel(d)})}},[]);var p=gF();if(p)return null;var g="".concat(t,"-handler"),h=(0,sE.default)(g,"".concat(g,"-up"),_({},"".concat(g,"-up-disabled"),o)),v=(0,sE.default)(g,"".concat(g,"-down"),_({},"".concat(g,"-down-disabled"),i)),y=function(){return l.current.push(dt(u))},m={unselectable:"on",role:"button",onMouseUp:y,onMouseLeave:y};return ii.createElement("div",{className:"".concat(g,"-wrap")},ii.createElement("span",fe({},m,{onMouseDown:function(x){f(x,!0)},"aria-label":"Increase Value","aria-disabled":o,className:h}),r||ii.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),ii.createElement("span",fe({},m,{onMouseDown:function(x){f(x,!1)},"aria-label":"Decrease Value","aria-disabled":i,className:v}),n||ii.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function cE(e){var t=typeof e=="number"?La(e):Ti(e).fullStr,r=t.includes(".");return r?Ti(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var Zy=E($());var hF=function(){var e=(0,Zy.useRef)(0),t=function(){dt.cancel(e.current)};return(0,Zy.useEffect)(function(){return t},[]),function(r){t(),e.current=dt(function(){r()})}};var X7=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","changeOnWheel","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep","changeOnBlur","domRef"],Y7=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],vF=function(t,r){return t||r.isEmpty()?r.toString():r.toNumber()},yF=function(t){var r=Ni(t);return r.isInvalidate()?null:r},Q7=Ot.forwardRef(function(e,t){var r=e.prefixCls,n=e.className,o=e.style,i=e.min,a=e.max,s=e.step,l=s===void 0?1:s,c=e.defaultValue,u=e.value,f=e.disabled,p=e.readOnly,g=e.upHandler,h=e.downHandler,v=e.keyboard,y=e.changeOnWheel,m=y===void 0?!1:y,d=e.controls,x=d===void 0?!0:d,b=e.classNames,S=e.stringMode,w=e.parser,C=e.formatter,R=e.precision,P=e.decimalSeparator,O=e.onChange,A=e.onInput,F=e.onPressEnter,M=e.onStep,H=e.changeOnBlur,L=H===void 0?!0:H,N=e.domRef,I=Ve(e,X7),D="".concat(r,"-input"),U=Ot.useRef(null),z=Ot.useState(!1),W=B(z,2),q=W[0],j=W[1],k=Ot.useRef(!1),V=Ot.useRef(!1),G=Ot.useRef(!1),J=Ot.useState(function(){return Ni(u??c)}),Y=B(J,2),X=Y[0],ae=Y[1];function Z(Ae){u===void 0&&ae(Ae)}var K=Ot.useCallback(function(Ae,we){if(!we)return R>=0?R:Math.max(Zi(Ae),Zi(l))},[R,l]),Q=Ot.useCallback(function(Ae){var we=String(Ae);if(w)return w(we);var et=we;return P&&(et=et.replace(P,".")),et.replace(/[^\w.-]+/g,"")},[w,P]),re=Ot.useRef(""),ee=Ot.useCallback(function(Ae,we){if(C)return C(Ae,{userTyping:we,input:String(re.current)});var et=typeof Ae=="number"?La(Ae):Ae;if(!we){var Pe=K(et,we);if(Wu(et)&&(P||Pe>=0)){var $e=P||".";et=lp(et,$e,Pe)}}return et},[C,K,P]),ne=Ot.useState(function(){var Ae=c??u;return X.isInvalidate()&&["string","number"].includes(ue(Ae))?Number.isNaN(Ae)?"":Ae:ee(X.toString(),!1)}),de=B(ne,2),le=de[0],pe=de[1];re.current=le;function Oe(Ae,we){pe(ee(Ae.isInvalidate()?Ae.toString(!1):Ae.toString(!we),we))}var Ce=Ot.useMemo(function(){return yF(a)},[a,R]),De=Ot.useMemo(function(){return yF(i)},[i,R]),ce=Ot.useMemo(function(){return!Ce||!X||X.isInvalidate()?!1:Ce.lessEquals(X)},[Ce,X]),ie=Ot.useMemo(function(){return!De||!X||X.isInvalidate()?!1:X.lessEquals(De)},[De,X]),Re=aE(U.current,q),Le=B(Re,2),Ge=Le[0],Me=Le[1],Ie=function(we){return Ce&&!we.lessEquals(Ce)?Ce:De&&!De.lessEquals(we)?De:null},je=function(we){return!Ie(we)},We=function(we,et){var Pe=we,$e=je(Pe)||Pe.isEmpty();if(!Pe.isEmpty()&&!et&&(Pe=Ie(Pe)||Pe,$e=!0),!p&&!f&&$e){var Ee=Pe.toString(),be=K(Ee,et);return be>=0&&(Pe=Ni(lp(Ee,".",be)),je(Pe)||(Pe=Ni(lp(Ee,".",be,!0)))),Pe.equals(X)||(Z(Pe),O?.(Pe.isEmpty()?null:vF(S,Pe)),u===void 0&&Oe(Pe,et)),Pe}return X},He=hF(),ye=function Ae(we){if(Ge(),re.current=we,pe(we),!V.current){var et=Q(we),Pe=Ni(et);Pe.isNaN()||We(Pe,!0)}A?.(we),He(function(){var $e=we;w||($e=we.replace(/。/g,".")),$e!==we&&Ae($e)})},se=function(){V.current=!0},xe=function(){V.current=!1,ye(U.current.value)},_e=function(we){ye(we.target.value)},he=function(we){var et;if(!(we&&ce||!we&&ie)){k.current=!1;var Pe=Ni(G.current?cE(l):l);we||(Pe=Pe.negate());var $e=(X||Ni(0)).add(Pe.toString()),Ee=We($e,!1);M?.(vF(S,Ee),{offset:G.current?cE(l):l,type:we?"up":"down"}),(et=U.current)===null||et===void 0||et.focus()}},Je=function(we){var et=Ni(Q(le)),Pe;et.isNaN()?Pe=We(X,we):Pe=We(et,we),u!==void 0?Oe(X,!1):Pe.isNaN()||Oe(Pe,!1)},lt=function(){k.current=!0},Et=function(we){var et=we.key,Pe=we.shiftKey;k.current=!0,G.current=Pe,et==="Enter"&&(V.current||(k.current=!1),Je(!1),F?.(we)),v!==!1&&!V.current&&["Up","ArrowUp","Down","ArrowDown"].includes(et)&&(he(et==="Up"||et==="ArrowUp"),we.preventDefault())},Pt=function(){k.current=!1,G.current=!1};Ot.useEffect(function(){if(m&&q){var Ae=function(Pe){he(Pe.deltaY<0),Pe.preventDefault()},we=U.current;if(we)return we.addEventListener("wheel",Ae,{passive:!1}),function(){return we.removeEventListener("wheel",Ae)}}});var pt=function(){L&&Je(!1),j(!1),k.current=!1};return El(function(){X.isInvalidate()||Oe(X,!1)},[R,C]),El(function(){var Ae=Ni(u);ae(Ae);var we=Ni(Q(le));(!Ae.equals(we)||!k.current||C)&&Oe(Ae,k.current)},[u]),El(function(){C&&Me()},[le]),Ot.createElement("div",{ref:N,className:(0,xF.default)(r,n,_(_(_(_(_({},"".concat(r,"-focused"),q),"".concat(r,"-disabled"),f),"".concat(r,"-readonly"),p),"".concat(r,"-not-a-number"),X.isNaN()),"".concat(r,"-out-of-range"),!X.isInvalidate()&&!je(X))),style:o,onFocus:function(){j(!0)},onBlur:pt,onKeyDown:Et,onKeyUp:Pt,onCompositionStart:se,onCompositionEnd:xe,onBeforeInput:lt},x&&Ot.createElement(lE,{prefixCls:r,upNode:g,downNode:h,upDisabled:ce,downDisabled:ie,onStep:he}),Ot.createElement("div",{className:"".concat(D,"-wrap")},Ot.createElement("input",fe({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":X.isInvalidate()?null:X.toString(),step:l},I,{ref:Lr(U,t),className:D,value:le,onChange:_e,disabled:f,readOnly:p}))))}),J7=Ot.forwardRef(function(e,t){var r=e.disabled,n=e.style,o=e.prefixCls,i=o===void 0?"rc-input-number":o,a=e.value,s=e.prefix,l=e.suffix,c=e.addonBefore,u=e.addonAfter,f=e.className,p=e.classNames,g=Ve(e,Y7),h=Ot.useRef(null),v=Ot.useRef(null),y=Ot.useRef(null),m=function(x){y.current&&Ul(y.current,x)};return Ot.useImperativeHandle(t,function(){return iE(y.current,{focus:m,nativeElement:h.current.nativeElement||v.current})}),Ot.createElement(ql,{className:f,triggerFocus:m,prefixCls:i,value:a,disabled:r,style:n,prefix:s,suffix:l,addonAfter:u,addonBefore:c,classNames:p,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:h},Ot.createElement(Q7,fe({prefixCls:i,disabled:r,ref:y,domRef:v,className:p?.input},g)))}),bF=J7;var SF=bF;var CF=e=>{var t;let r=(t=e.handleVisible)!==null&&t!==void 0?t:"auto",n=e.controlHeightSM-e.lineWidth*2;return Object.assign(Object.assign({},Fa(e)),{controlWidth:90,handleWidth:n,handleFontSize:e.fontSize/2,handleVisible:r,handleActiveBg:e.colorFillAlter,handleBg:e.colorBgContainer,filledHandleBg:new gt(e.colorFillSecondary).onBackground(e.colorBgContainer).toHexString(),handleHoverColor:e.colorPrimary,handleBorderColor:e.colorBorder,handleOpacity:r===!0?1:0,handleVisibleWidth:r===!0?n:0})};var wF=({componentCls:e,borderRadiusSM:t,borderRadiusLG:r},n)=>{let o=n==="lg"?r:t;return{[`&-${n}`]:{[`${e}-handler-wrap`]:{borderStartEndRadius:o,borderEndEndRadius:o},[`${e}-handler-up`]:{borderStartEndRadius:o},[`${e}-handler-down`]:{borderEndEndRadius:o}}}},Z7=e=>{let{componentCls:t,lineWidth:r,lineType:n,borderRadius:o,inputFontSizeSM:i,inputFontSizeLG:a,controlHeightLG:s,controlHeightSM:l,colorError:c,paddingInlineSM:u,paddingBlockSM:f,paddingBlockLG:p,paddingInlineLG:g,colorIcon:h,motionDurationMid:v,handleHoverColor:y,handleOpacity:m,paddingInline:d,paddingBlock:x,handleBg:b,handleActiveBg:S,colorTextDisabled:w,borderRadiusSM:C,borderRadiusLG:R,controlWidth:P,handleBorderColor:O,filledHandleBg:A,lineHeightLG:F,calc:M}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},sr(e)),ip(e)),{display:"inline-block",width:P,margin:0,padding:0,borderRadius:o}),Fy(e,{[`${t}-handler-wrap`]:{background:b,[`${t}-handler-down`]:{borderBlockStart:`${oe(r)} ${n} ${O}`}}})),Wy(e,{[`${t}-handler-wrap`]:{background:A,[`${t}-handler-down`]:{borderBlockStart:`${oe(r)} ${n} ${O}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:b}}})),jy(e,{[`${t}-handler-wrap`]:{background:b,[`${t}-handler-down`]:{borderBlockStart:`${oe(r)} ${n} ${O}`}}})),zy(e)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:F,borderRadius:R,[`input${t}-input`]:{height:M(s).sub(M(r).mul(2)).equal(),padding:`${oe(p)} ${oe(g)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:C,[`input${t}-input`]:{height:M(l).sub(M(r).mul(2)).equal(),padding:`${oe(f)} ${oe(u)}`}},"&-out-of-range":{[`${t}-input-wrap`]:{input:{color:c}}},"&-group":Object.assign(Object.assign(Object.assign({},sr(e)),tE(e)),{"&-wrapper":Object.assign(Object.assign(Object.assign({display:"inline-block",textAlign:"start",verticalAlign:"top",[`${t}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${t}-group-addon`]:{borderRadius:R,fontSize:e.fontSizeLG}},"&-sm":{[`${t}-group-addon`]:{borderRadius:C}}},Ly(e)),By(e)),{[`&:not(${t}-compact-first-item):not(${t}-compact-last-item)${t}-compact-item`]:{[`${t}, ${t}-group-addon`]:{borderRadius:0}},[`&:not(${t}-compact-last-item)${t}-compact-first-item`]:{[`${t}, ${t}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${t}-compact-first-item)${t}-compact-last-item`]:{[`${t}, ${t}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}})}),[`&-disabled ${t}-input`]:{cursor:"not-allowed"},[t]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},sr(e)),{width:"100%",padding:`${oe(x)} ${oe(d)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${v} linear`,appearance:"textfield",fontSize:"inherit"}),eE(e.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,appearance:"none"}})},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1}})},{[t]:Object.assign(Object.assign(Object.assign({[`${t}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:e.handleVisibleWidth,opacity:m,height:"100%",borderStartStartRadius:0,borderStartEndRadius:o,borderEndEndRadius:o,borderEndStartRadius:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`all ${v}`,overflow:"hidden",[`${t}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[` ${t}-handler-up-inner, ${t}-handler-down-inner - `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:h,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${re(r)} ${o} ${O}`,transition:`all ${v} linear`,"&:active":{background:b},"&:hover":{height:"60%",[` + `]:{marginInlineEnd:0,fontSize:e.handleFontSize}}},[`${t}-handler`]:{height:"50%",overflow:"hidden",color:h,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${oe(r)} ${n} ${O}`,transition:`all ${v} linear`,"&:active":{background:S},"&:hover":{height:"60%",[` ${t}-handler-up-inner, ${t}-handler-down-inner - `]:{color:y}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},Aa()),{color:h,transition:`all ${v} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:n},[`${t}-handler-down`]:{borderEndEndRadius:n}},gF(e,"lg")),gF(e,"sm")),{"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[` + `]:{color:y}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},_a()),{color:h,transition:`all ${v} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:o},[`${t}-handler-down`]:{borderEndEndRadius:o}},wF(e,"lg")),wF(e,"sm")),{"&-disabled, &-readonly":{[`${t}-handler-wrap`]:{display:"none"},[`${t}-input`]:{color:"inherit"}},[` ${t}-handler-up-disabled, ${t}-handler-down-disabled `]:{cursor:"not-allowed"},[` ${t}-handler-up-disabled:hover &-handler-up-inner, ${t}-handler-down-disabled:hover &-handler-down-inner - `]:{color:w}})}]},j9=e=>{let{componentCls:t,paddingBlock:r,paddingInline:o,inputAffixPadding:n,controlWidth:i,borderRadiusLG:a,borderRadiusSM:s,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:d,motionDurationMid:f}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${re(r)} 0`}},Ip(e)),{position:"relative",display:"inline-flex",alignItems:"center",width:i,padding:0,paddingInlineStart:o,"&-lg":{borderRadius:a,paddingInlineStart:l,[`input${t}-input`]:{padding:`${re(u)} 0`}},"&-sm":{borderRadius:s,paddingInlineStart:c,[`input${t}-input`]:{padding:`${re(d)} 0`}},[`&:not(${t}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:n},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:o,marginInlineStart:n,transition:`margin ${f}`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&:not(${t}-affix-wrapper-without-controls):hover ${t}-suffix`]:{marginInlineEnd:e.calc(e.handleWidth).add(o).equal()}})}},hF=Pt("InputNumber",e=>{let t=rt(e,Ua(e));return[B9(t),j9(t),Gs(t)]},mF,{unitless:{handleOpacity:!0}});var V9=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{getPrefixCls:r,direction:o}=Er.useContext(at),n=Er.useRef(null);Er.useImperativeHandle(t,()=>n.current);let{className:i,rootClassName:a,size:s,disabled:l,prefixCls:c,addonBefore:u,addonAfter:d,prefix:f,suffix:m,bordered:h,readOnly:v,status:y,controls:g,variant:p}=e,x=V9(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),S=r("input-number",c),b=Mo(S),[w,C,R]=hF(S,b),{compactSize:_,compactItemClassnames:O}=Zn(S,o),N=Er.createElement(Yk,{className:`${S}-handler-up-inner`}),k=Er.createElement(Jy,{className:`${S}-handler-down-inner`}),L=typeof g=="boolean"?g:void 0;typeof g=="object"&&(N=typeof g.upIcon>"u"?N:Er.createElement("span",{className:`${S}-handler-up-inner`},g.upIcon),k=typeof g.downIcon>"u"?k:Er.createElement("span",{className:`${S}-handler-down-inner`},g.downIcon));let{hasFeedback:j,status:W,isFormItemInput:D,feedbackIcon:$}=Er.useContext(fo),M=na(W,y),V=pn(Z=>{var X;return(X=s??_)!==null&&X!==void 0?X:Z}),F=Er.useContext(Ur),z=l??F,[U,H]=ol("inputNumber",p,h),A=j&&Er.createElement(Er.Fragment,null,$),G=(0,fc.default)({[`${S}-lg`]:V==="large",[`${S}-sm`]:V==="small",[`${S}-rtl`]:o==="rtl",[`${S}-in-form-item`]:D},C),q=`${S}-group`,oe=Er.createElement(pF,Object.assign({ref:n,disabled:z,className:(0,fc.default)(R,b,i,a,O),upHandler:N,downHandler:k,prefixCls:S,readOnly:v,controls:L,prefix:f,suffix:A||m,addonBefore:u&&Er.createElement(Ys,{form:!0,space:!0},u),addonAfter:d&&Er.createElement(Ys,{form:!0,space:!0},d),classNames:{input:G,variant:(0,fc.default)({[`${S}-${U}`]:H},oa(S,M,j)),affixWrapper:(0,fc.default)({[`${S}-affix-wrapper-sm`]:V==="small",[`${S}-affix-wrapper-lg`]:V==="large",[`${S}-affix-wrapper-rtl`]:o==="rtl",[`${S}-affix-wrapper-without-controls`]:g===!1||z},C),wrapper:(0,fc.default)({[`${q}-rtl`]:o==="rtl"},C),groupWrapper:(0,fc.default)({[`${S}-group-wrapper-sm`]:V==="small",[`${S}-group-wrapper-lg`]:V==="large",[`${S}-group-wrapper-rtl`]:o==="rtl",[`${S}-group-wrapper-${U}`]:H},oa(`${S}-group-wrapper`,M,j),C)}},x));return w(oe)}),yF=vF,H9=e=>Er.createElement(ka,{theme:{components:{InputNumber:{handleVisible:!0}}}},Er.createElement(vF,Object.assign({},e)));yF._InternalPanelDoNotUseOrYouWillBeFired=H9;var O0=yF;var vn=E(I()),pc=E(Ee());var xF=E(I());var U9=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:xF.default.createElement(Au,null)}),t},_0=U9;var P0=E(I());function Lp(e,t){let r=(0,P0.useRef)([]),o=()=>{r.current.push(setTimeout(()=>{var n,i,a,s;!((n=e.current)===null||n===void 0)&&n.input&&((i=e.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((a=e.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=e.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return(0,P0.useEffect)(()=>(t&&o(),()=>r.current.forEach(n=>{n&&clearTimeout(n)})),[]),o}function bF(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var G9=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{prefixCls:r,bordered:o=!0,status:n,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:d,addonBefore:f,className:m,style:h,styles:v,rootClassName:y,onChange:g,classNames:p,variant:x}=e,S=G9(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:b,direction:w,allowClear:C,autoComplete:R,className:_,style:O,classNames:N,styles:k}=Do("input"),L=b("input",r),j=(0,vn.useRef)(null),W=Mo(L),[D,$,M]=g0(L,y),[V]=h0(L,W),{compactSize:F,compactItemClassnames:z}=Zn(L,w),U=pn(de=>{var ve;return(ve=i??F)!==null&&ve!==void 0?ve:de}),H=vn.default.useContext(Ur),A=a??H,{status:G,hasFeedback:q,feedbackIcon:oe}=(0,vn.useContext)(fo),Z=na(G,n),X=bF(e)||!!q,ie=(0,vn.useRef)(X),te=Lp(j,!0),K=de=>{te(),s?.(de)},Y=de=>{te(),l?.(de)},ne=de=>{te(),g?.(de)},Q=(q||c)&&vn.default.createElement(vn.default.Fragment,null,c,q&&oe),J=_0(u??C),[le,ue]=ol("input",x,o);return D(V(vn.default.createElement(nF,Object.assign({ref:Fr(t,j),prefixCls:L,autoComplete:R},S,{disabled:A,onBlur:K,onFocus:Y,style:Object.assign(Object.assign({},O),h),styles:Object.assign(Object.assign({},k),v),suffix:Q,allowClear:J,className:(0,pc.default)(m,y,M,W,z,_),onChange:ne,addonBefore:f&&vn.default.createElement(Ys,{form:!0,space:!0},f),addonAfter:d&&vn.default.createElement(Ys,{form:!0,space:!0},d),classNames:Object.assign(Object.assign(Object.assign({},p),N),{input:(0,pc.default)({[`${L}-sm`]:U==="small",[`${L}-lg`]:U==="large",[`${L}-rtl`]:w==="rtl"},p?.input,N.input,$),variant:(0,pc.default)({[`${L}-${le}`]:ue},oa(L,Z)),affixWrapper:(0,pc.default)({[`${L}-affix-wrapper-sm`]:U==="small",[`${L}-affix-wrapper-lg`]:U==="large",[`${L}-affix-wrapper-rtl`]:w==="rtl"},$),wrapper:(0,pc.default)({[`${L}-group-rtl`]:w==="rtl"},$),groupWrapper:(0,pc.default)({[`${L}-group-wrapper-sm`]:U==="small",[`${L}-group-wrapper-lg`]:U==="large",[`${L}-group-wrapper-rtl`]:w==="rtl",[`${L}-group-wrapper-${le}`]:ue},oa(`${L}-group-wrapper`,Z,q),$)})}))))}),nl=q9;var qE=E(Ee());var Tt=E(I());var Jo=E(I()),CF=E(Si());function T0(e,t,r){return(e-t)/(r-t)}function ud(e,t,r,o){var n=T0(t,r,o),i={};switch(e){case"rtl":i.right="".concat(n*100,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(n*100,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(n*100,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(n*100,"%"),i.transform="translateX(-50%)";break}return i}function sa(e,t){return Array.isArray(e)?e[t]:e}var SF=E(Ee());var dd=E(I());var WE=E(I()),K9=WE.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),yn=K9,BE=WE.createContext({});var X9=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],Y9=dd.forwardRef(function(e,t){var r=e.prefixCls,o=e.value,n=e.valueIndex,i=e.onStartMove,a=e.onDelete,s=e.style,l=e.render,c=e.dragging,u=e.draggingDelete,d=e.onOffsetChange,f=e.onChangeComplete,m=e.onFocus,h=e.onMouseEnter,v=Ae(e,X9),y=dd.useContext(yn),g=y.min,p=y.max,x=y.direction,S=y.disabled,b=y.keyboard,w=y.range,C=y.tabIndex,R=y.ariaLabelForHandle,_=y.ariaLabelledByForHandle,O=y.ariaRequired,N=y.ariaValueTextFormatterForHandle,k=y.styles,L=y.classNames,j="".concat(r,"-handle"),W=function(G){S||i(G,n)},D=function(G){m?.(G,n)},$=function(G){h(G,n)},M=function(G){if(!S&&b){var q=null;switch(G.which||G.keyCode){case Fe.LEFT:q=x==="ltr"||x==="btt"?-1:1;break;case Fe.RIGHT:q=x==="ltr"||x==="btt"?1:-1;break;case Fe.UP:q=x!=="ttb"?1:-1;break;case Fe.DOWN:q=x!=="ttb"?-1:1;break;case Fe.HOME:q="min";break;case Fe.END:q="max";break;case Fe.PAGE_UP:q=2;break;case Fe.PAGE_DOWN:q=-2;break;case Fe.BACKSPACE:case Fe.DELETE:a(n);break}q!==null&&(G.preventDefault(),d(q,n))}},V=function(G){switch(G.which||G.keyCode){case Fe.LEFT:case Fe.RIGHT:case Fe.UP:case Fe.DOWN:case Fe.HOME:case Fe.END:case Fe.PAGE_UP:case Fe.PAGE_DOWN:f?.();break}},F=ud(x,o,g,p),z={};if(n!==null){var U;z={tabIndex:S?null:sa(C,n),role:"slider","aria-valuemin":g,"aria-valuemax":p,"aria-valuenow":o,"aria-disabled":S,"aria-label":sa(R,n),"aria-labelledby":sa(_,n),"aria-required":sa(O,n),"aria-valuetext":(U=sa(N,n))===null||U===void 0?void 0:U(o),"aria-orientation":x==="ltr"||x==="rtl"?"horizontal":"vertical",onMouseDown:W,onTouchStart:W,onFocus:D,onMouseEnter:$,onKeyDown:M,onKeyUp:V}}var H=dd.createElement("div",ee({ref:t,className:(0,SF.default)(j,T(T(T({},"".concat(j,"-").concat(n+1),n!==null&&w),"".concat(j,"-dragging"),c),"".concat(j,"-dragging-delete"),u),L.handle),style:P(P(P({},F),s),k.handle)},z,v));return l&&(H=l(H,{index:n,prefixCls:r,value:o,dragging:c,draggingDelete:u})),H}),jE=Y9;var Q9=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],Z9=Jo.forwardRef(function(e,t){var r=e.prefixCls,o=e.style,n=e.onStartMove,i=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.activeHandleRender,c=e.draggingIndex,u=e.draggingDelete,d=e.onFocus,f=Ae(e,Q9),m=Jo.useRef({}),h=Jo.useState(!1),v=B(h,2),y=v[0],g=v[1],p=Jo.useState(-1),x=B(p,2),S=x[0],b=x[1],w=function(N){b(N),g(!0)},C=function(N,k){w(k),d?.(N)},R=function(N,k){w(k)};Jo.useImperativeHandle(t,function(){return{focus:function(N){var k;(k=m.current[N])===null||k===void 0||k.focus()},hideHelp:function(){(0,CF.flushSync)(function(){g(!1)})}}});var _=P({prefixCls:r,onStartMove:n,onOffsetChange:i,render:s,onFocus:C,onMouseEnter:R},f);return Jo.createElement(Jo.Fragment,null,a.map(function(O,N){var k=c===N;return Jo.createElement(jE,ee({ref:function(j){j?m.current[N]=j:delete m.current[N]},dragging:k,draggingDelete:k&&u,style:sa(o,N),key:N,value:O,valueIndex:N},_))}),l&&y&&Jo.createElement(jE,ee({key:"a11y"},_,{value:a[S],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))}),wF=Z9;var VE=E(I());var EF=E(Ee()),N0=E(I());var J9=function(t){var r=t.prefixCls,o=t.style,n=t.children,i=t.value,a=t.onClick,s=N0.useContext(yn),l=s.min,c=s.max,u=s.direction,d=s.includedStart,f=s.includedEnd,m=s.included,h="".concat(r,"-text"),v=ud(u,i,l,c);return N0.createElement("span",{className:(0,EF.default)(h,T({},"".concat(h,"-active"),m&&d<=i&&i<=f)),style:P(P({},v),o),onMouseDown:function(g){g.stopPropagation()},onClick:function(){a(i)}},n)},RF=J9;var eG=function(t){var r=t.prefixCls,o=t.marks,n=t.onClick,i="".concat(r,"-mark");return o.length?VE.createElement("div",{className:i},o.map(function(a){var s=a.value,l=a.style,c=a.label;return VE.createElement(RF,{key:s,prefixCls:i,style:l,value:s,onClick:n},c)})):null},OF=eG;var mc=E(I());var _F=E(Ee()),I0=E(I());var tG=function(t){var r=t.prefixCls,o=t.value,n=t.style,i=t.activeStyle,a=I0.useContext(yn),s=a.min,l=a.max,c=a.direction,u=a.included,d=a.includedStart,f=a.includedEnd,m="".concat(r,"-dot"),h=u&&d<=o&&o<=f,v=P(P({},ud(c,o,s,l)),typeof n=="function"?n(o):n);return h&&(v=P(P({},v),typeof i=="function"?i(o):i)),I0.createElement("span",{className:(0,_F.default)(m,T({},"".concat(m,"-active"),h)),style:v})},PF=tG;var rG=function(t){var r=t.prefixCls,o=t.marks,n=t.dots,i=t.style,a=t.activeStyle,s=mc.useContext(yn),l=s.min,c=s.max,u=s.step,d=mc.useMemo(function(){var f=new Set;if(o.forEach(function(h){f.add(h.value)}),n&&u!==null)for(var m=l;m<=c;)f.add(m),m+=u;return Array.from(f)},[l,c,u,n,o]);return mc.createElement("div",{className:"".concat(r,"-step")},d.map(function(f){return mc.createElement(PF,{prefixCls:r,key:f,value:f,style:i,activeStyle:a})}))},TF=rG;var IF=E(Ee()),la=E(I());var NF=E(Ee()),$0=E(I());var oG=function(t){var r=t.prefixCls,o=t.style,n=t.start,i=t.end,a=t.index,s=t.onStartMove,l=t.replaceCls,c=$0.useContext(yn),u=c.direction,d=c.min,f=c.max,m=c.disabled,h=c.range,v=c.classNames,y="".concat(r,"-track"),g=T0(n,d,f),p=T0(i,d,f),x=function(C){!m&&s&&s(C,-1)},S={};switch(u){case"rtl":S.right="".concat(g*100,"%"),S.width="".concat(p*100-g*100,"%");break;case"btt":S.bottom="".concat(g*100,"%"),S.height="".concat(p*100-g*100,"%");break;case"ttb":S.top="".concat(g*100,"%"),S.height="".concat(p*100-g*100,"%");break;default:S.left="".concat(g*100,"%"),S.width="".concat(p*100-g*100,"%")}var b=l||(0,NF.default)(y,T(T({},"".concat(y,"-").concat(a+1),a!==null&&h),"".concat(r,"-track-draggable"),s),v.track);return $0.createElement("div",{className:b,style:P(P({},S),o),onMouseDown:x,onTouchStart:x})},HE=oG;var nG=function(t){var r=t.prefixCls,o=t.style,n=t.values,i=t.startPoint,a=t.onStartMove,s=la.useContext(yn),l=s.included,c=s.range,u=s.min,d=s.styles,f=s.classNames,m=la.useMemo(function(){if(!c){if(n.length===0)return[];var v=i??u,y=n[0];return[{start:Math.min(v,y),end:Math.max(v,y)}]}for(var g=[],p=0;piG&&u<_.length:!1,w(ne),U(oe,Be,ne)},J=function le(ue){ue.preventDefault(),document.removeEventListener("mouseup",le),document.removeEventListener("mousemove",Q),$.current&&($.current.removeEventListener("touchmove",W.current),$.current.removeEventListener("touchend",D.current)),W.current=null,D.current=null,$.current=null,s(ne),p(-1),w(!1)};document.addEventListener("mouseup",J),document.addEventListener("mousemove",Q),q.currentTarget.addEventListener("touchend",J),q.currentTarget.addEventListener("touchmove",Q),W.current=Q,D.current=J,$.current=q.currentTarget},A=Lo.useMemo(function(){var G=se(r).sort(function(ie,te){return ie-te}),q=se(_).sort(function(ie,te){return ie-te}),oe={};q.forEach(function(ie){oe[ie]=(oe[ie]||0)+1}),G.forEach(function(ie){oe[ie]=(oe[ie]||0)-1});var Z=c?1:0,X=Object.values(oe).reduce(function(ie,te){return ie+Math.abs(te)},0);return X<=Z?_:r},[r,_,c]);return[g,m,b,A,H]}var AF=aG;var D0=E(I());function UE(e,t,r,o,n,i){var a=D0.useCallback(function(m){return Math.max(e,Math.min(t,m))},[e,t]),s=D0.useCallback(function(m){if(r!==null){var h=e+Math.round((a(m)-e)/r)*r,v=function(x){return(String(x).split(".")[1]||"").length},y=Math.max(v(r),v(t),v(e)),g=Number(h.toFixed(y));return e<=g&&g<=t?g:null}return null},[r,e,t,a]),l=D0.useCallback(function(m){var h=a(m),v=o.map(function(p){return p.value});r!==null&&v.push(s(m)),v.push(e,t);var y=v[0],g=t-e;return v.forEach(function(p){var x=Math.abs(h-p);x<=g&&(y=p,g=x)}),y},[e,t,o,r,a,s]),c=function m(h,v,y){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof v=="number"){var p,x=h[y],S=x+v,b=[];o.forEach(function(O){b.push(O.value)}),b.push(e,t),b.push(s(x));var w=v>0?1:-1;g==="unit"?b.push(s(x+w*r)):b.push(s(S)),b=b.filter(function(O){return O!==null}).filter(function(O){return v<0?O<=x:O>=x}),g==="unit"&&(b=b.filter(function(O){return O!==x}));var C=g==="unit"?x:S;p=b[0];var R=Math.abs(p-C);if(b.forEach(function(O){var N=Math.abs(O-C);N1){var _=se(h);return _[y]=p,m(_,v-w,y,g)}return p}else{if(v==="min")return e;if(v==="max")return t}},u=function(h,v,y){var g=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",p=h[y],x=c(h,v,y,g);return{value:x,changed:x!==p}},d=function(h){return i===null&&h===0||typeof i=="number"&&h3&&arguments[3]!==void 0?arguments[3]:"unit",p=h.map(l),x=p[y],S=c(p,v,y,g);if(p[y]=S,n===!1){var b=i||0;y>0&&p[y-1]!==x&&(p[y]=Math.max(p[y],p[y-1]+b)),y0;_-=1)for(var O=!0;d(p[_]-p[_-1])&&O;){var N=u(p,-1,_-1);p[_-1]=N.value,O=N.changed}for(var k=p.length-1;k>0;k-=1)for(var L=!0;d(p[k]-p[k-1])&&L;){var j=u(p,-1,k-1);p[k-1]=j.value,L=j.changed}for(var W=0;W=0?$:!1},[$,Ve]),$e=Tt.useMemo(function(){return Object.keys(Z||{}).map(function(ke){var xe=Z[ke],nt={value:Number(ke)};return xe&&pe(xe)==="object"&&!Tt.isValidElement(xe)&&("label"in xe||"style"in xe)?(nt.style=xe.style,nt.label=xe.label):nt.label=xe,nt}).filter(function(ke){var xe=ke.label;return xe||typeof xe=="number"}).sort(function(ke,xe){return ke.value-xe.value})},[Z]),fe=UE(Oe,be,Ve,$e,W,He),me=B(fe,2),ze=me[0],Ce=me[1],Ue=zt(C,{value:w}),Qe=B(Ue,2),gt=Qe[0],Nt=Qe[1],ht=Tt.useMemo(function(){var ke=gt==null?[]:Array.isArray(gt)?gt:[gt],xe=B(ke,1),nt=xe[0],$t=nt===void 0?Oe:nt,Dt=gt===null?[]:[$t];if(ae){if(Dt=se(ke),_||gt===void 0){var go=_>=0?_+1:2;for(Dt=Dt.slice(0,go);Dt.length=0&&de.current.focus(ke)}It(null)},[kt]);var Ft=Tt.useMemo(function(){return Me&&Ve===null?!1:Me},[Me,Ve]),rr=Rt(function(ke,xe){_e(ke,xe),N?.(We(ht))}),dr=Ne!==-1;Tt.useEffect(function(){if(!dr){var ke=ht.lastIndexOf(vt);de.current.focus(ke)}},[dr]);var fr=Tt.useMemo(function(){return se(je).sort(function(ke,xe){return ke-xe})},[je]),Wo=Tt.useMemo(function(){return ae?[fr[0],fr[fr.length-1]]:[Oe,fr[0]]},[fr,ae,Oe]),pr=B(Wo,2),Or=pr[0],Se=pr[1];Tt.useImperativeHandle(t,function(){return{focus:function(){de.current.focus(0)},blur:function(){var xe,nt=document,$t=nt.activeElement;(xe=ve.current)!==null&&xe!==void 0&&xe.contains($t)&&$t?.blur()}}}),Tt.useEffect(function(){m&&de.current.focus(0)},[]);var Ge=Tt.useMemo(function(){return{min:Oe,max:be,direction:ye,disabled:u,keyboard:f,step:Ve,included:z,includedStart:Or,includedEnd:Se,range:ae,tabIndex:ne,ariaLabelForHandle:Q,ariaLabelledByForHandle:J,ariaRequired:le,ariaValueTextFormatterForHandle:ue,styles:s||{},classNames:a||{}}},[Oe,be,ye,u,f,Ve,z,Or,Se,ae,ne,Q,J,le,ue,s,a]);return Tt.createElement(yn.Provider,{value:Ge},Tt.createElement("div",{ref:ve,className:(0,qE.default)(o,n,T(T(T(T({},"".concat(o,"-disabled"),u),"".concat(o,"-vertical"),V),"".concat(o,"-horizontal"),!V),"".concat(o,"-with-marks"),$e.length)),style:i,onMouseDown:Je,id:l},Tt.createElement("div",{className:(0,qE.default)("".concat(o,"-rail"),a?.rail),style:P(P({},G),s?.rail)}),K!==!1&&Tt.createElement($F,{prefixCls:o,style:H,values:ht,startPoint:U,onStartMove:Ft?rr:void 0}),Tt.createElement(TF,{prefixCls:o,marks:$e,dots:X,style:q,activeStyle:oe}),Tt.createElement(wF,{ref:de,prefixCls:o,style:A,values:je,draggingIndex:Ne,draggingDelete:Bt,onStartMove:rr,onOffsetChange:tr,onFocus:h,onBlur:v,handleRender:ie,activeHandleRender:te,onChangeComplete:tt,onDelete:Re?De:void 0}),Tt.createElement(OF,{prefixCls:o,marks:$e,onClick:Ze})))}),LF=sG;var kF=LF;var ca=E(I()),md=E(Ee());var FF=E(I()),lG=(0,FF.createContext)({}),zF=lG;var fd=E(I()),KE=E(I());var cG=fd.forwardRef((e,t)=>{let{open:r,draggingDelete:o}=e,n=(0,KE.useRef)(null),i=r&&!o,a=(0,KE.useRef)(null);function s(){ut.cancel(a.current),a.current=null}function l(){a.current=ut(()=>{var c;(c=n.current)===null||c===void 0||c.forceAlign(),a.current=null})}return fd.useEffect(()=>(i?l():s(),s),[i,e.title]),fd.createElement(Ha,Object.assign({ref:Fr(n,t)},e,{open:i}))}),XE=cG;var uG=e=>{let{componentCls:t,antCls:r,controlSize:o,dotSize:n,marginFull:i,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:d,handleActiveColor:f,handleActiveOutlineColor:m,handleLineWidth:h,handleLineWidthHover:v,motionDurationMid:y}=e;return{[t]:Object.assign(Object.assign({},Qt(e)),{position:"relative",height:o,margin:`${re(a)} ${re(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${re(i)} ${re(a)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${y}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${y}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${re(h)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(h).mul(-1).equal(),insetBlockStart:c(h).mul(-1).equal(),width:c(u).add(c(h).mul(2)).equal(),height:c(u).add(c(h).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${re(h)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:` + `]:{color:w}})}]},eU=e=>{let{componentCls:t,paddingBlock:r,paddingInline:n,inputAffixPadding:o,controlWidth:i,borderRadiusLG:a,borderRadiusSM:s,paddingInlineLG:l,paddingInlineSM:c,paddingBlockLG:u,paddingBlockSM:f,motionDurationMid:p}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${oe(r)} 0`}},ip(e)),{position:"relative",display:"inline-flex",alignItems:"center",width:i,padding:0,paddingInlineStart:n,"&-lg":{borderRadius:a,paddingInlineStart:l,[`input${t}-input`]:{padding:`${oe(u)} 0`}},"&-sm":{borderRadius:s,paddingInlineStart:c,[`input${t}-input`]:{padding:`${oe(f)} 0`}},[`&:not(${t}-disabled):hover`]:{zIndex:1},"&-focused, &:focus":{zIndex:1},[`&-disabled > ${t}-disabled`]:{background:"transparent"},[`> div${t}`]:{width:"100%",border:"none",outline:"none",[`&${t}-focused`]:{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${t}-handler-wrap`]:{zIndex:2},[t]:{position:"static",color:"inherit","&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:o},"&-suffix":{insetBlockStart:0,insetInlineEnd:0,height:"100%",marginInlineEnd:n,marginInlineStart:o,transition:`margin ${p}`}},[`&:hover ${t}-handler-wrap, &-focused ${t}-handler-wrap`]:{width:e.handleWidth,opacity:1},[`&:not(${t}-affix-wrapper-without-controls):hover ${t}-suffix`]:{marginInlineEnd:e.calc(e.handleWidth).add(n).equal()}})}},EF=Gt("InputNumber",e=>{let t=ut(e,Ma(e));return[Z7(t),eU(t),ks(t)]},CF,{unitless:{handleOpacity:!0}});var tU=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{getPrefixCls:r,direction:n}=Rr.useContext(rt),o=Rr.useRef(null);Rr.useImperativeHandle(t,()=>o.current);let{className:i,rootClassName:a,size:s,disabled:l,prefixCls:c,addonBefore:u,addonAfter:f,prefix:p,suffix:g,bordered:h,readOnly:v,status:y,controls:m,variant:d}=e,x=tU(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),b=r("input-number",c),S=Ko(b),[w,C,R]=EF(b,S),{compactSize:P,compactItemClassnames:O}=Xo(b,n),A=Rr.createElement(oF,{className:`${b}-handler-up-inner`}),F=Rr.createElement(Py,{className:`${b}-handler-down-inner`}),M=typeof m=="boolean"?m:void 0;typeof m=="object"&&(A=typeof m.upIcon>"u"?A:Rr.createElement("span",{className:`${b}-handler-up-inner`},m.upIcon),F=typeof m.downIcon>"u"?F:Rr.createElement("span",{className:`${b}-handler-down-inner`},m.downIcon));let{hasFeedback:H,status:L,isFormItemInput:N,feedbackIcon:I}=Rr.useContext(fn),D=Qi(L,y),U=ao(Y=>{var X;return(X=s??P)!==null&&X!==void 0?X:Y}),z=Rr.useContext(Ur),W=l??z,[q,j]=qs("inputNumber",d,h),k=H&&Rr.createElement(Rr.Fragment,null,I),V=(0,Gl.default)({[`${b}-lg`]:U==="large",[`${b}-sm`]:U==="small",[`${b}-rtl`]:n==="rtl",[`${b}-in-form-item`]:N},C),G=`${b}-group`,J=Rr.createElement(SF,Object.assign({ref:o,disabled:W,className:(0,Gl.default)(R,S,i,a,O),upHandler:A,downHandler:F,prefixCls:b,readOnly:v,controls:M,prefix:p,suffix:k||g,addonBefore:u&&Rr.createElement(zs,{form:!0,space:!0},u),addonAfter:f&&Rr.createElement(zs,{form:!0,space:!0},f),classNames:{input:V,variant:(0,Gl.default)({[`${b}-${q}`]:j},Yi(b,D,H)),affixWrapper:(0,Gl.default)({[`${b}-affix-wrapper-sm`]:U==="small",[`${b}-affix-wrapper-lg`]:U==="large",[`${b}-affix-wrapper-rtl`]:n==="rtl",[`${b}-affix-wrapper-without-controls`]:m===!1||W},C),wrapper:(0,Gl.default)({[`${G}-rtl`]:n==="rtl"},C),groupWrapper:(0,Gl.default)({[`${b}-group-wrapper-sm`]:U==="small",[`${b}-group-wrapper-lg`]:U==="large",[`${b}-group-wrapper-rtl`]:n==="rtl",[`${b}-group-wrapper-${q}`]:j},Yi(`${b}-group-wrapper`,D,H),C)}},x));return w(J)}),OF=RF,rU=e=>Rr.createElement(Na,{theme:{components:{InputNumber:{handleVisible:!0}}}},Rr.createElement(RF,Object.assign({},e)));OF._InternalPanelDoNotUseOrYouWillBeFired=rU;var e0=OF;var uo=E($()),Kl=E(Ne());var _F=E($());var nU=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:_F.default.createElement(mu,null)}),t},t0=nU;var r0=E($());function up(e,t){let r=(0,r0.useRef)([]),n=()=>{r.current.push(setTimeout(()=>{var o,i,a,s;!((o=e.current)===null||o===void 0)&&o.input&&((i=e.current)===null||i===void 0?void 0:i.input.getAttribute("type"))==="password"&&(!((a=e.current)===null||a===void 0)&&a.input.hasAttribute("value"))&&((s=e.current)===null||s===void 0||s.input.removeAttribute("value"))}))};return(0,r0.useEffect)(()=>(t&&n(),()=>r.current.forEach(o=>{o&&clearTimeout(o)})),[]),n}function PF(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var oU=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{prefixCls:r,bordered:n=!0,status:o,size:i,disabled:a,onBlur:s,onFocus:l,suffix:c,allowClear:u,addonAfter:f,addonBefore:p,className:g,style:h,styles:v,rootClassName:y,onChange:m,classNames:d,variant:x}=e,b=oU(e,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames","variant"]),{getPrefixCls:S,direction:w,allowClear:C,autoComplete:R,className:P,style:O,classNames:A,styles:F}=no("input"),M=S("input",r),H=(0,uo.useRef)(null),L=Ko(M),[N,I,D]=Vy(M,y),[U]=Hy(M,L),{compactSize:z,compactItemClassnames:W}=Xo(M,w),q=ao(pe=>{var Oe;return(Oe=i??z)!==null&&Oe!==void 0?Oe:pe}),j=uo.default.useContext(Ur),k=a??j,{status:V,hasFeedback:G,feedbackIcon:J}=(0,uo.useContext)(fn),Y=Qi(V,o),X=PF(e)||!!G,ae=(0,uo.useRef)(X),Z=up(H,!0),K=pe=>{Z(),s?.(pe)},Q=pe=>{Z(),l?.(pe)},re=pe=>{Z(),m?.(pe)},ee=(G||c)&&uo.default.createElement(uo.default.Fragment,null,c,G&&J),ne=t0(u??C),[de,le]=qs("input",x,n);return N(U(uo.default.createElement(dF,Object.assign({ref:Lr(t,H),prefixCls:M,autoComplete:R},b,{disabled:k,onBlur:K,onFocus:Q,style:Object.assign(Object.assign({},O),h),styles:Object.assign(Object.assign({},F),v),suffix:ee,allowClear:ne,className:(0,Kl.default)(g,y,D,L,W,P),onChange:re,addonBefore:p&&uo.default.createElement(zs,{form:!0,space:!0},p),addonAfter:f&&uo.default.createElement(zs,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},d),A),{input:(0,Kl.default)({[`${M}-sm`]:q==="small",[`${M}-lg`]:q==="large",[`${M}-rtl`]:w==="rtl"},d?.input,A.input,I),variant:(0,Kl.default)({[`${M}-${de}`]:le},Yi(M,Y)),affixWrapper:(0,Kl.default)({[`${M}-affix-wrapper-sm`]:q==="small",[`${M}-affix-wrapper-lg`]:q==="large",[`${M}-affix-wrapper-rtl`]:w==="rtl"},I),wrapper:(0,Kl.default)({[`${M}-group-rtl`]:w==="rtl"},I),groupWrapper:(0,Kl.default)({[`${M}-group-wrapper-sm`]:q==="small",[`${M}-group-wrapper-lg`]:q==="large",[`${M}-group-wrapper-rtl`]:w==="rtl",[`${M}-group-wrapper-${de}`]:le},Yi(`${M}-group-wrapper`,Y,G),I)})}))))}),Gs=iU;var vE=E(Ne());var _t=E($());var Kn=E($()),NF=E(Vi());function n0(e,t,r){return(e-t)/(r-t)}function ju(e,t,r,n){var o=n0(t,r,n),i={};switch(e){case"rtl":i.right="".concat(o*100,"%"),i.transform="translateX(50%)";break;case"btt":i.bottom="".concat(o*100,"%"),i.transform="translateY(50%)";break;case"ttb":i.top="".concat(o*100,"%"),i.transform="translateY(-50%)";break;default:i.left="".concat(o*100,"%"),i.transform="translateX(-50%)";break}return i}function ea(e,t){return Array.isArray(e)?e[t]:e}var TF=E(Ne());var Vu=E($());var uE=E($()),aU=uE.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),fo=aU,fE=uE.createContext({});var sU=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],lU=Vu.forwardRef(function(e,t){var r=e.prefixCls,n=e.value,o=e.valueIndex,i=e.onStartMove,a=e.onDelete,s=e.style,l=e.render,c=e.dragging,u=e.draggingDelete,f=e.onOffsetChange,p=e.onChangeComplete,g=e.onFocus,h=e.onMouseEnter,v=Ve(e,sU),y=Vu.useContext(fo),m=y.min,d=y.max,x=y.direction,b=y.disabled,S=y.keyboard,w=y.range,C=y.tabIndex,R=y.ariaLabelForHandle,P=y.ariaLabelledByForHandle,O=y.ariaRequired,A=y.ariaValueTextFormatterForHandle,F=y.styles,M=y.classNames,H="".concat(r,"-handle"),L=function(V){b||i(V,o)},N=function(V){g?.(V,o)},I=function(V){h(V,o)},D=function(V){if(!b&&S){var G=null;switch(V.which||V.keyCode){case Ye.LEFT:G=x==="ltr"||x==="btt"?-1:1;break;case Ye.RIGHT:G=x==="ltr"||x==="btt"?1:-1;break;case Ye.UP:G=x!=="ttb"?1:-1;break;case Ye.DOWN:G=x!=="ttb"?-1:1;break;case Ye.HOME:G="min";break;case Ye.END:G="max";break;case Ye.PAGE_UP:G=2;break;case Ye.PAGE_DOWN:G=-2;break;case Ye.BACKSPACE:case Ye.DELETE:a(o);break}G!==null&&(V.preventDefault(),f(G,o))}},U=function(V){switch(V.which||V.keyCode){case Ye.LEFT:case Ye.RIGHT:case Ye.UP:case Ye.DOWN:case Ye.HOME:case Ye.END:case Ye.PAGE_UP:case Ye.PAGE_DOWN:p?.();break}},z=ju(x,n,m,d),W={};if(o!==null){var q;W={tabIndex:b?null:ea(C,o),role:"slider","aria-valuemin":m,"aria-valuemax":d,"aria-valuenow":n,"aria-disabled":b,"aria-label":ea(R,o),"aria-labelledby":ea(P,o),"aria-required":ea(O,o),"aria-valuetext":(q=ea(A,o))===null||q===void 0?void 0:q(n),"aria-orientation":x==="ltr"||x==="rtl"?"horizontal":"vertical",onMouseDown:L,onTouchStart:L,onFocus:N,onMouseEnter:I,onKeyDown:D,onKeyUp:U}}var j=Vu.createElement("div",fe({ref:t,className:(0,TF.default)(H,_(_(_({},"".concat(H,"-").concat(o+1),o!==null&&w),"".concat(H,"-dragging"),c),"".concat(H,"-dragging-delete"),u),M.handle),style:T(T(T({},z),s),F.handle)},W,v));return l&&(j=l(j,{index:o,prefixCls:r,value:n,dragging:c,draggingDelete:u})),j}),dE=lU;var cU=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],uU=Kn.forwardRef(function(e,t){var r=e.prefixCls,n=e.style,o=e.onStartMove,i=e.onOffsetChange,a=e.values,s=e.handleRender,l=e.activeHandleRender,c=e.draggingIndex,u=e.draggingDelete,f=e.onFocus,p=Ve(e,cU),g=Kn.useRef({}),h=Kn.useState(!1),v=B(h,2),y=v[0],m=v[1],d=Kn.useState(-1),x=B(d,2),b=x[0],S=x[1],w=function(A){S(A),m(!0)},C=function(A,F){w(F),f?.(A)},R=function(A,F){w(F)};Kn.useImperativeHandle(t,function(){return{focus:function(A){var F;(F=g.current[A])===null||F===void 0||F.focus()},hideHelp:function(){(0,NF.flushSync)(function(){m(!1)})}}});var P=T({prefixCls:r,onStartMove:o,onOffsetChange:i,render:s,onFocus:C,onMouseEnter:R},p);return Kn.createElement(Kn.Fragment,null,a.map(function(O,A){var F=c===A;return Kn.createElement(dE,fe({ref:function(H){H?g.current[A]=H:delete g.current[A]},dragging:F,draggingDelete:F&&u,style:ea(n,A),key:A,value:O,valueIndex:A},P))}),l&&y&&Kn.createElement(dE,fe({key:"a11y"},P,{value:a[b],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))}),IF=uU;var pE=E($());var $F=E(Ne()),o0=E($());var fU=function(t){var r=t.prefixCls,n=t.style,o=t.children,i=t.value,a=t.onClick,s=o0.useContext(fo),l=s.min,c=s.max,u=s.direction,f=s.includedStart,p=s.includedEnd,g=s.included,h="".concat(r,"-text"),v=ju(u,i,l,c);return o0.createElement("span",{className:(0,$F.default)(h,_({},"".concat(h,"-active"),g&&f<=i&&i<=p)),style:T(T({},v),n),onMouseDown:function(m){m.stopPropagation()},onClick:function(){a(i)}},o)},DF=fU;var dU=function(t){var r=t.prefixCls,n=t.marks,o=t.onClick,i="".concat(r,"-mark");return n.length?pE.createElement("div",{className:i},n.map(function(a){var s=a.value,l=a.style,c=a.label;return pE.createElement(DF,{key:s,prefixCls:i,style:l,value:s,onClick:o},c)})):null},AF=dU;var Xl=E($());var kF=E(Ne()),i0=E($());var pU=function(t){var r=t.prefixCls,n=t.value,o=t.style,i=t.activeStyle,a=i0.useContext(fo),s=a.min,l=a.max,c=a.direction,u=a.included,f=a.includedStart,p=a.includedEnd,g="".concat(r,"-dot"),h=u&&f<=n&&n<=p,v=T(T({},ju(c,n,s,l)),typeof o=="function"?o(n):o);return h&&(v=T(T({},v),typeof i=="function"?i(n):i)),i0.createElement("span",{className:(0,kF.default)(g,_({},"".concat(g,"-active"),h)),style:v})},MF=pU;var mU=function(t){var r=t.prefixCls,n=t.marks,o=t.dots,i=t.style,a=t.activeStyle,s=Xl.useContext(fo),l=s.min,c=s.max,u=s.step,f=Xl.useMemo(function(){var p=new Set;if(n.forEach(function(h){p.add(h.value)}),o&&u!==null)for(var g=l;g<=c;)p.add(g),g+=u;return Array.from(p)},[l,c,u,o,n]);return Xl.createElement("div",{className:"".concat(r,"-step")},f.map(function(p){return Xl.createElement(MF,{prefixCls:r,key:p,value:p,style:i,activeStyle:a})}))},FF=mU;var zF=E(Ne()),ta=E($());var LF=E(Ne()),a0=E($());var gU=function(t){var r=t.prefixCls,n=t.style,o=t.start,i=t.end,a=t.index,s=t.onStartMove,l=t.replaceCls,c=a0.useContext(fo),u=c.direction,f=c.min,p=c.max,g=c.disabled,h=c.range,v=c.classNames,y="".concat(r,"-track"),m=n0(o,f,p),d=n0(i,f,p),x=function(C){!g&&s&&s(C,-1)},b={};switch(u){case"rtl":b.right="".concat(m*100,"%"),b.width="".concat(d*100-m*100,"%");break;case"btt":b.bottom="".concat(m*100,"%"),b.height="".concat(d*100-m*100,"%");break;case"ttb":b.top="".concat(m*100,"%"),b.height="".concat(d*100-m*100,"%");break;default:b.left="".concat(m*100,"%"),b.width="".concat(d*100-m*100,"%")}var S=l||(0,LF.default)(y,_(_({},"".concat(y,"-").concat(a+1),a!==null&&h),"".concat(r,"-track-draggable"),s),v.track);return a0.createElement("div",{className:S,style:T(T({},b),n),onMouseDown:x,onTouchStart:x})},mE=gU;var hU=function(t){var r=t.prefixCls,n=t.style,o=t.values,i=t.startPoint,a=t.onStartMove,s=ta.useContext(fo),l=s.included,c=s.range,u=s.min,f=s.styles,p=s.classNames,g=ta.useMemo(function(){if(!c){if(o.length===0)return[];var v=i??u,y=o[0];return[{start:Math.min(v,y),end:Math.max(v,y)}]}for(var m=[],d=0;dvU&&u3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof v=="number"){var d,x=h[y],b=x+v,S=[];n.forEach(function(O){S.push(O.value)}),S.push(e,t),S.push(s(x));var w=v>0?1:-1;m==="unit"?S.push(s(x+w*r)):S.push(s(b)),S=S.filter(function(O){return O!==null}).filter(function(O){return v<0?O<=x:O>=x}),m==="unit"&&(S=S.filter(function(O){return O!==x}));var C=m==="unit"?x:b;d=S[0];var R=Math.abs(d-C);if(S.forEach(function(O){var A=Math.abs(O-C);A1){var P=te(h);return P[y]=d,g(P,v-w,y,m)}return d}else{if(v==="min")return e;if(v==="max")return t}},u=function(h,v,y){var m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"unit",d=h[y],x=c(h,v,y,m);return{value:x,changed:x!==d}},f=function(h){return i===null&&h===0||typeof i=="number"&&h3&&arguments[3]!==void 0?arguments[3]:"unit",d=h.map(l),x=d[y],b=c(d,v,y,m);if(d[y]=b,o===!1){var S=i||0;y>0&&d[y-1]!==x&&(d[y]=Math.max(d[y],d[y-1]+S)),y0;P-=1)for(var O=!0;f(d[P]-d[P-1])&&O;){var A=u(d,-1,P-1);d[P-1]=A.value,O=A.changed}for(var F=d.length-1;F>0;F-=1)for(var M=!0;f(d[F]-d[F-1])&&M;){var H=u(d,-1,F-1);d[F-1]=H.value,M=H.changed}for(var L=0;L=0?I:!1},[I,We]),ye=_t.useMemo(function(){return Object.keys(Y||{}).map(function(ke){var ve=Y[ke],nt={value:Number(ke)};return ve&&ue(ve)==="object"&&!_t.isValidElement(ve)&&("label"in ve||"style"in ve)?(nt.style=ve.style,nt.label=ve.label):nt.label=ve,nt}).filter(function(ke){var ve=ke.label;return ve||typeof ve=="number"}).sort(function(ke,ve){return ke.value-ve.value})},[Y]),se=gE(Ie,je,We,ye,L,He),xe=B(se,2),_e=xe[0],he=xe[1],Je=ar(C,{value:w}),lt=B(Je,2),Et=lt[0],Pt=lt[1],pt=_t.useMemo(function(){var ke=Et==null?[]:Array.isArray(Et)?Et:[Et],ve=B(ke,1),nt=ve[0],Nt=nt===void 0?Ie:nt,It=Et===null?[]:[Nt];if(ie){if(It=te(ke),P||Et===void 0){var mn=P>=0?P+1:2;for(It=It.slice(0,mn);It.length=0&&pe.current.focus(ke)}Tt(null)},[At]);var Ft=_t.useMemo(function(){return Le&&We===null?!1:Le},[Le,We]),rr=wt(function(ke,ve){Se(ke,ve),A?.(Ae(pt))}),pr=be!==-1;_t.useEffect(function(){if(!pr){var ke=pt.lastIndexOf(ht);pe.current.focus(ke)}},[pr]);var mr=_t.useMemo(function(){return te(Fe).sort(function(ke,ve){return ke-ve})},[Fe]),kn=_t.useMemo(function(){return ie?[mr[0],mr[mr.length-1]]:[Ie,mr[0]]},[mr,ie,Ie]),gr=B(kn,2),Lt=gr[0],Te=gr[1];_t.useImperativeHandle(t,function(){return{focus:function(){pe.current.focus(0)},blur:function(){var ve,nt=document,Nt=nt.activeElement;(ve=Oe.current)!==null&&ve!==void 0&&ve.contains(Nt)&&Nt?.blur()}}}),_t.useEffect(function(){g&&pe.current.focus(0)},[]);var Ue=_t.useMemo(function(){return{min:Ie,max:je,direction:Ce,disabled:u,keyboard:p,step:We,included:W,includedStart:Lt,includedEnd:Te,range:ie,tabIndex:re,ariaLabelForHandle:ee,ariaLabelledByForHandle:ne,ariaRequired:de,ariaValueTextFormatterForHandle:le,styles:s||{},classNames:a||{}}},[Ie,je,Ce,u,p,We,W,Lt,Te,ie,re,ee,ne,de,le,s,a]);return _t.createElement(fo.Provider,{value:Ue},_t.createElement("div",{ref:Oe,className:(0,vE.default)(n,o,_(_(_(_({},"".concat(n,"-disabled"),u),"".concat(n,"-vertical"),U),"".concat(n,"-horizontal"),!U),"".concat(n,"-with-marks"),ye.length)),style:i,onMouseDown:Be,id:l},_t.createElement("div",{className:(0,vE.default)("".concat(n,"-rail"),a?.rail),style:T(T({},V),s?.rail)}),K!==!1&&_t.createElement(WF,{prefixCls:n,style:j,values:pt,startPoint:q,onStartMove:Ft?rr:void 0}),_t.createElement(FF,{prefixCls:n,marks:ye,dots:X,style:G,activeStyle:J}),_t.createElement(IF,{ref:pe,prefixCls:n,style:k,values:Fe,draggingIndex:be,draggingDelete:Mt,onStartMove:rr,onOffsetChange:tr,onFocus:h,onBlur:v,handleRender:ae,activeHandleRender:Z,onChangeComplete:et,onDelete:Re?Pe:void 0}),_t.createElement(AF,{prefixCls:n,marks:ye,onClick:Ke})))}),HF=xU;var UF=HF;var ra=E($()),qu=E(Ne());var qF=E($()),bU=(0,qF.createContext)({}),GF=bU;var Hu=E($()),yE=E($());var SU=Hu.forwardRef((e,t)=>{let{open:r,draggingDelete:n,value:o}=e,i=(0,yE.useRef)(null),a=r&&!n,s=(0,yE.useRef)(null);function l(){dt.cancel(s.current),s.current=null}function c(){s.current=dt(()=>{var u;(u=i.current)===null||u===void 0||u.forceAlign(),s.current=null})}return Hu.useEffect(()=>(a?c():l(),l),[a,e.title,o]),Hu.createElement(ka,Object.assign({ref:Lr(i,t)},e,{open:a}))}),xE=SU;var CU=e=>{let{componentCls:t,antCls:r,controlSize:n,dotSize:o,marginFull:i,marginPart:a,colorFillContentHover:s,handleColorDisabled:l,calc:c,handleSize:u,handleSizeHover:f,handleActiveColor:p,handleActiveOutlineColor:g,handleLineWidth:h,handleLineWidthHover:v,motionDurationMid:y}=e;return{[t]:Object.assign(Object.assign({},sr(e)),{position:"relative",height:n,margin:`${oe(a)} ${oe(i)}`,padding:0,cursor:"pointer",touchAction:"none","&-vertical":{margin:`${oe(i)} ${oe(a)}`},[`${t}-rail`]:{position:"absolute",backgroundColor:e.railBg,borderRadius:e.borderRadiusXS,transition:`background-color ${y}`},[`${t}-track,${t}-tracks`]:{position:"absolute",transition:`background-color ${y}`},[`${t}-track`]:{backgroundColor:e.trackBg,borderRadius:e.borderRadiusXS},[`${t}-track-draggable`]:{boxSizing:"content-box",backgroundClip:"content-box",border:"solid rgba(0,0,0,0)"},"&:hover":{[`${t}-rail`]:{backgroundColor:e.railHoverBg},[`${t}-track`]:{backgroundColor:e.trackHoverBg},[`${t}-dot`]:{borderColor:s},[`${t}-handle::after`]:{boxShadow:`0 0 0 ${oe(h)} ${e.colorPrimaryBorderHover}`},[`${t}-dot-active`]:{borderColor:e.dotActiveBorderColor}},[`${t}-handle`]:{position:"absolute",width:u,height:u,outline:"none",userSelect:"none","&-dragging-delete":{opacity:0},"&::before":{content:'""',position:"absolute",insetInlineStart:c(h).mul(-1).equal(),insetBlockStart:c(h).mul(-1).equal(),width:c(u).add(c(h).mul(2)).equal(),height:c(u).add(c(h).mul(2)).equal(),backgroundColor:"transparent"},"&::after":{content:'""',position:"absolute",insetBlockStart:0,insetInlineStart:0,width:u,height:u,backgroundColor:e.colorBgElevated,boxShadow:`0 0 0 ${oe(h)} ${e.handleColor}`,outline:"0px solid transparent",borderRadius:"50%",cursor:"pointer",transition:` inset-inline-start ${y}, inset-block-start ${y}, width ${y}, height ${y}, box-shadow ${y}, outline ${y} - `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(d).sub(u).div(2).add(v).mul(-1).equal(),insetBlockStart:c(d).sub(u).div(2).add(v).mul(-1).equal(),width:c(d).add(c(v).mul(2)).equal(),height:c(d).add(c(v).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${re(v)} ${f}`,outline:`6px solid ${m}`,width:d,height:d,insetInlineStart:e.calc(u).sub(d).div(2).equal(),insetBlockStart:e.calc(u).sub(d).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:"none"}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:n,height:n,backgroundColor:e.colorBgElevated,border:`${re(h)} solid ${e.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[` + `},"&:hover, &:active, &:focus":{"&::before":{insetInlineStart:c(f).sub(u).div(2).add(v).mul(-1).equal(),insetBlockStart:c(f).sub(u).div(2).add(v).mul(-1).equal(),width:c(f).add(c(v).mul(2)).equal(),height:c(f).add(c(v).mul(2)).equal()},"&::after":{boxShadow:`0 0 0 ${oe(v)} ${p}`,outline:`6px solid ${g}`,width:f,height:f,insetInlineStart:e.calc(u).sub(f).div(2).equal(),insetBlockStart:e.calc(u).sub(f).div(2).equal()}}},[`&-lock ${t}-handle`]:{"&::before, &::after":{transition:"none"}},[`${t}-mark`]:{position:"absolute",fontSize:e.fontSize},[`${t}-mark-text`]:{position:"absolute",display:"inline-block",color:e.colorTextDescription,textAlign:"center",wordBreak:"keep-all",cursor:"pointer",userSelect:"none","&-active":{color:e.colorText}},[`${t}-step`]:{position:"absolute",background:"transparent",pointerEvents:"none"},[`${t}-dot`]:{position:"absolute",width:o,height:o,backgroundColor:e.colorBgElevated,border:`${oe(h)} solid ${e.dotBorderColor}`,borderRadius:"50%",cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,pointerEvents:"auto","&-active":{borderColor:e.dotActiveBorderColor}},[`&${t}-disabled`]:{cursor:"not-allowed",[`${t}-rail`]:{backgroundColor:`${e.railBg} !important`},[`${t}-track`]:{backgroundColor:`${e.trackBgDisabled} !important`},[` ${t}-dot - `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${re(h)} ${l}`,insetInlineStart:0,insetBlockStart:0},[` + `]:{backgroundColor:e.colorBgElevated,borderColor:e.trackBgDisabled,boxShadow:"none",cursor:"not-allowed"},[`${t}-handle::after`]:{backgroundColor:e.colorBgElevated,cursor:"not-allowed",width:u,height:u,boxShadow:`0 0 0 ${oe(h)} ${l}`,insetInlineStart:0,insetBlockStart:0},[` ${t}-mark-text, ${t}-dot - `]:{cursor:"not-allowed !important"}},[`&-tooltip ${r}-tooltip-inner`]:{minWidth:"unset"}})}},WF=(e,t)=>{let{componentCls:r,railSize:o,handleSize:n,dotSize:i,marginFull:a,calc:s}=e,l=t?"paddingBlock":"paddingInline",c=t?"width":"height",u=t?"height":"width",d=t?"insetBlockStart":"insetInlineStart",f=t?"top":"insetInlineStart",m=s(o).mul(3).sub(n).div(2).equal(),h=s(n).sub(o).div(2).equal(),v=t?{borderWidth:`${re(h)} 0`,transform:`translateY(${re(s(h).mul(-1).equal())})`}:{borderWidth:`0 ${re(h)}`,transform:`translateX(${re(e.calc(h).mul(-1).equal())})`};return{[l]:o,[u]:s(o).mul(3).equal(),[`${r}-rail`]:{[c]:"100%",[u]:o},[`${r}-track,${r}-tracks`]:{[u]:o},[`${r}-track-draggable`]:Object.assign({},v),[`${r}-handle`]:{[d]:m},[`${r}-mark`]:{insetInlineStart:0,top:0,[f]:s(o).mul(3).add(t?0:a).equal(),[c]:"100%"},[`${r}-step`]:{insetInlineStart:0,top:0,[f]:o,[c]:"100%",[u]:o},[`${r}-dot`]:{position:"absolute",[d]:s(o).sub(i).div(2).equal()}}},dG=e=>{let{componentCls:t,marginPartWithMark:r}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},WF(e,!0)),{[`&${t}-with-marks`]:{marginBottom:r}})}},fG=e=>{let{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},WF(e,!1)),{height:"100%"})}},pG=e=>{let r=e.controlHeightLG/4,o=e.controlHeightSM/2,n=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,s=new it(a).setA(.2).toRgbString();return{controlSize:r,railSize:4,handleSize:r,handleSizeHover:o,dotSize:8,handleLineWidth:n,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:s,handleColorDisabled:new it(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},BF=Pt("Slider",e=>{let t=rt(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[uG(t),dG(t),fG(t)]},pG);var pd=E(I());function kp(){let[e,t]=pd.useState(!1),r=pd.useRef(null),o=()=>{ut.cancel(r.current)},n=i=>{o(),i?t(i):r.current=ut(()=>{t(i)})};return pd.useEffect(()=>o,[]),[e,n]}var mG=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);ntypeof r=="number"?r.toString():""}var hG=ca.default.forwardRef((e,t)=>{let{prefixCls:r,range:o,className:n,rootClassName:i,style:a,disabled:s,tooltipPrefixCls:l,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:d,tooltipPlacement:f,tooltip:m={},onChangeComplete:h,classNames:v,styles:y}=e,g=mG(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:p}=e,{getPrefixCls:x,direction:S,className:b,style:w,classNames:C,styles:R,getPopupContainer:_}=Do("slider"),O=ca.default.useContext(Ur),N=s??O,{handleRender:k,direction:L}=ca.default.useContext(zF),W=(L||S)==="rtl",[D,$]=kp(),[M,V]=kp(),F=Object.assign({},m),{open:z,placement:U,getPopupContainer:H,prefixCls:A,formatter:G}=F,q=z??u,oe=(D||M)&&q!==!1,Z=gG(G,c),[X,ie]=kp(),te=ae=>{h?.(ae),ie(!1)},K=(ae,Re)=>ae||(Re?W?"left":"right":"top"),Y=x("slider",r),[ne,Q,J]=BF(Y),le=(0,md.default)(n,b,C.root,v?.root,i,{[`${Y}-rtl`]:W,[`${Y}-lock`]:X},Q,J);W&&!g.vertical&&(g.reverse=!g.reverse),ca.default.useEffect(()=>{let ae=()=>{ut(()=>{V(!1)},1)};return document.addEventListener("mouseup",ae),()=>{document.removeEventListener("mouseup",ae)}},[]);let ue=o&&!q,de=k||((ae,Re)=>{let{index:Me}=Re,Be=ae.props;function Ie(He,$e,fe){var me,ze,Ce,Ue;fe&&((ze=(me=g)[He])===null||ze===void 0||ze.call(me,$e)),(Ue=(Ce=Be)[He])===null||Ue===void 0||Ue.call(Ce,$e)}let Oe=Object.assign(Object.assign({},Be),{onMouseEnter:He=>{$(!0),Ie("onMouseEnter",He)},onMouseLeave:He=>{$(!1),Ie("onMouseLeave",He)},onMouseDown:He=>{V(!0),ie(!0),Ie("onMouseDown",He)},onFocus:He=>{var $e;V(!0),($e=g.onFocus)===null||$e===void 0||$e.call(g,He),Ie("onFocus",He,!0)},onBlur:He=>{var $e;V(!1),($e=g.onBlur)===null||$e===void 0||$e.call(g,He),Ie("onBlur",He,!0)}}),be=ca.default.cloneElement(ae,Oe),Ve=(!!q||oe)&&Z!==null;return ue?be:ca.default.createElement(XE,Object.assign({},F,{prefixCls:x("tooltip",A??l),title:Z?Z(Re.value):"",open:Ve,placement:K(U??f,p),key:Me,classNames:{root:`${Y}-tooltip`},getPopupContainer:H||d||_}),be)}),ve=ue?(ae,Re)=>{let Me=ca.default.cloneElement(ae,{style:Object.assign(Object.assign({},ae.props.style),{visibility:"hidden"})});return ca.default.createElement(XE,Object.assign({},F,{prefixCls:x("tooltip",A??l),title:Z?Z(Re.value):"",open:Z!==null&&oe,placement:K(U??f,p),key:"tooltip",classNames:{root:`${Y}-tooltip`},getPopupContainer:H||d||_,draggingDelete:Re.draggingDelete}),Me)}:void 0,ye=Object.assign(Object.assign(Object.assign(Object.assign({},R.root),w),y?.root),a),we=Object.assign(Object.assign({},R.tracks),y?.tracks),ce=(0,md.default)(C.tracks,v?.tracks);return ne(ca.default.createElement(kF,Object.assign({},g,{classNames:Object.assign({handle:(0,md.default)(C.handle,v?.handle),rail:(0,md.default)(C.rail,v?.rail),track:(0,md.default)(C.track,v?.track)},ce?{tracks:ce}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},R.handle),y?.handle),rail:Object.assign(Object.assign({},R.rail),y?.rail),track:Object.assign(Object.assign({},R.track),y?.track)},Object.keys(we).length?{tracks:we}:{}),step:g.step,range:o,className:le,style:ye,disabled:N,ref:t,prefixCls:Y,handleRender:de,activeHandleRender:ve,onChangeComplete:te})))}),YE=hG;function QE(e){return["small","middle","large"].includes(e)}var A0=E(I()),UF=E(Ee());var jF=E(Ee()),ZE=["wrap","nowrap","wrap-reverse"],JE=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],eR=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],vG=(e,t)=>{let r=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${r}`]:r&&ZE.includes(r)}},yG=(e,t)=>{let r={};return eR.forEach(o=>{r[`${e}-align-${o}`]=t.align===o}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r},xG=(e,t)=>{let r={};return JE.forEach(o=>{r[`${e}-justify-${o}`]=t.justify===o}),r};function bG(e,t){return(0,jF.default)(Object.assign(Object.assign(Object.assign({},vG(e,t)),yG(e,t)),xG(e,t)))}var VF=bG;var SG=e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},CG=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},wG=e=>{let{componentCls:t}=e,r={};return ZE.forEach(o=>{r[`${t}-wrap-${o}`]={flexWrap:o}}),r},EG=e=>{let{componentCls:t}=e,r={};return eR.forEach(o=>{r[`${t}-align-${o}`]={alignItems:o}}),r},RG=e=>{let{componentCls:t}=e,r={};return JE.forEach(o=>{r[`${t}-justify-${o}`]={justifyContent:o}}),r},OG=()=>({}),HF=Pt("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:o}=e,n=rt(e,{flexGapSM:t,flexGap:r,flexGapLG:o});return[SG(n),CG(n),wG(n),EG(n),RG(n)]},OG,{resetStyle:!1});var _G=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{prefixCls:r,rootClassName:o,className:n,style:i,flex:a,gap:s,children:l,vertical:c=!1,component:u="div"}=e,d=_G(e,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:f,direction:m,getPrefixCls:h}=A0.default.useContext(at),v=h("flex",r),[y,g,p]=HF(v),x=c??f?.vertical,S=(0,UF.default)(n,o,f?.className,v,g,p,VF(v,e),{[`${v}-rtl`]:m==="rtl",[`${v}-gap-${s}`]:QE(s),[`${v}-vertical`]:x}),b=Object.assign(Object.assign({},f?.style),i);return a&&(b.flex=a),s&&!QE(s)&&(b.gap=s),y(A0.default.createElement(u,Object.assign({ref:t,className:S,style:b},Gr(d,["justify","wrap","align"])),l))}),Xa=PG;var xd=E(I());var M0=E(I());var TG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},GF=TG;var NG=function(t,r){return M0.createElement(mt,ee({},t,{ref:r,icon:GF}))},IG=M0.forwardRef(NG),gd=IG;var K0=E(Ee());var W0=E(Ee());function L0(){var e=document.documentElement.clientWidth,t=window.innerHeight||document.documentElement.clientHeight;return{width:e,height:t}}function qF(e){var t=e.getBoundingClientRect(),r=document.documentElement;return{left:t.left+(window.pageXOffset||r.scrollLeft)-(r.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||r.scrollTop)-(r.clientTop||document.body.clientTop||0)}}var Qa=E(I()),vc=E(I());var e3=E(Ee());var tR=E(Si());function ua(e,t,r,o){var n=tR.default.unstable_batchedUpdates?function(a){tR.default.unstable_batchedUpdates(r,a)}:r;return e!=null&&e.addEventListener&&e.addEventListener(t,n,o),{remove:function(){e!=null&&e.removeEventListener&&e.removeEventListener(t,n,o)}}}var Eo=E(I());var Fp=E(Ee());var po=E(I()),XF=E(I());var KF=E(I()),da=KF.createContext(null);var $G=function(t){var r=t.visible,o=t.maskTransitionName,n=t.getContainer,i=t.prefixCls,a=t.rootClassName,s=t.icons,l=t.countRender,c=t.showSwitch,u=t.showProgress,d=t.current,f=t.transform,m=t.count,h=t.scale,v=t.minScale,y=t.maxScale,g=t.closeIcon,p=t.onActive,x=t.onClose,S=t.onZoomIn,b=t.onZoomOut,w=t.onRotateRight,C=t.onRotateLeft,R=t.onFlipX,_=t.onFlipY,O=t.onReset,N=t.toolbarRender,k=t.zIndex,L=t.image,j=(0,XF.useContext)(da),W=s.rotateLeft,D=s.rotateRight,$=s.zoomIn,M=s.zoomOut,V=s.close,F=s.left,z=s.right,U=s.flipX,H=s.flipY,A="".concat(i,"-operations-operation");po.useEffect(function(){var J=function(ue){ue.keyCode===Fe.ESC&&x()};return r&&window.addEventListener("keydown",J),function(){window.removeEventListener("keydown",J)}},[r]);var G=function(le,ue){le.preventDefault(),le.stopPropagation(),p(ue)},q=po.useCallback(function(J){var le=J.type,ue=J.disabled,de=J.onClick,ve=J.icon;return po.createElement("div",{key:le,className:(0,Fp.default)(A,"".concat(i,"-operations-operation-").concat(le),T({},"".concat(i,"-operations-operation-disabled"),!!ue)),onClick:de},ve)},[A,i]),oe=c?q({icon:F,onClick:function(le){return G(le,-1)},type:"prev",disabled:d===0}):void 0,Z=c?q({icon:z,onClick:function(le){return G(le,1)},type:"next",disabled:d===m-1}):void 0,X=q({icon:H,onClick:_,type:"flipY"}),ie=q({icon:U,onClick:R,type:"flipX"}),te=q({icon:W,onClick:C,type:"rotateLeft"}),K=q({icon:D,onClick:w,type:"rotateRight"}),Y=q({icon:M,onClick:b,type:"zoomOut",disabled:h<=v}),ne=q({icon:$,onClick:S,type:"zoomIn",disabled:h===y}),Q=po.createElement("div",{className:"".concat(i,"-operations")},X,ie,te,K,Y,ne);return po.createElement(so,{visible:r,motionName:o},function(J){var le=J.className,ue=J.style;return po.createElement(Jl,{open:!0,getContainer:n??document.body},po.createElement("div",{className:(0,Fp.default)("".concat(i,"-operations-wrapper"),le,a),style:P(P({},ue),{},{zIndex:k})},g===null?null:po.createElement("button",{className:"".concat(i,"-close"),onClick:x},g||V),c&&po.createElement(po.Fragment,null,po.createElement("div",{className:(0,Fp.default)("".concat(i,"-switch-left"),T({},"".concat(i,"-switch-left-disabled"),d===0)),onClick:function(ve){return G(ve,-1)}},F),po.createElement("div",{className:(0,Fp.default)("".concat(i,"-switch-right"),T({},"".concat(i,"-switch-right-disabled"),d===m-1)),onClick:function(ve){return G(ve,1)}},z)),po.createElement("div",{className:"".concat(i,"-footer")},u&&po.createElement("div",{className:"".concat(i,"-progress")},l?l(d+1,m):"".concat(d+1," / ").concat(m)),N?N(Q,P(P({icons:{prevIcon:oe,nextIcon:Z,flipYIcon:X,flipXIcon:ie,rotateLeftIcon:te,rotateRightIcon:K,zoomOutIcon:Y,zoomInIcon:ne},actions:{onActive:p,onFlipY:_,onFlipX:R,onRotateLeft:C,onRotateRight:w,onZoomOut:b,onZoomIn:S,onReset:O,onClose:x},transform:f},j?{current:d,total:m}:{}),{},{image:L})):Q)))})},YF=$G;var zp=E(I()),k0={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function rR(e,t,r,o){var n=(0,zp.useRef)(null),i=(0,zp.useRef)([]),a=(0,zp.useState)(k0),s=B(a,2),l=s[0],c=s[1],u=function(h){c(k0),Yi(k0,l)||o?.({transform:k0,action:h})},d=function(h,v){n.current===null&&(i.current=[],n.current=ut(function(){c(function(y){var g=y;return i.current.forEach(function(p){g=P(P({},g),p)}),n.current=null,o?.({transform:g,action:v}),g})})),i.current.push(P(P({},l),h))},f=function(h,v,y,g,p){var x=e.current,S=x.width,b=x.height,w=x.offsetWidth,C=x.offsetHeight,R=x.offsetLeft,_=x.offsetTop,O=h,N=l.scale*h;N>r?(N=r,O=r/l.scale):No){if(t>0)return T({},e,i);if(t<0&&no)return T({},e,t<0?i:-i);return{}}function Wp(e,t,r,o){var n=L0(),i=n.width,a=n.height,s=null;return e<=i&&t<=a?s={x:0,y:0}:(e>i||t>a)&&(s=P(P({},QF("x",r,e,i)),QF("y",o,t,a))),s}var il=1,ZF=1;function oR(e,t,r,o,n,i,a){var s=n.rotate,l=n.scale,c=n.x,u=n.y,d=(0,hd.useState)(!1),f=B(d,2),m=f[0],h=f[1],v=(0,hd.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),y=function(b){!t||b.button!==0||(b.preventDefault(),b.stopPropagation(),v.current={diffX:b.pageX-c,diffY:b.pageY-u,transformX:c,transformY:u},h(!0))},g=function(b){r&&m&&i({x:b.pageX-v.current.diffX,y:b.pageY-v.current.diffY},"move")},p=function(){if(r&&m){h(!1);var b=v.current,w=b.transformX,C=b.transformY,R=c!==w&&u!==C;if(!R)return;var _=e.current.offsetWidth*l,O=e.current.offsetHeight*l,N=e.current.getBoundingClientRect(),k=N.left,L=N.top,j=s%180!==0,W=Wp(j?O:_,j?_:O,k,L);W&&i(P({},W),"dragRebound")}},x=function(b){if(!(!r||b.deltaY==0)){var w=Math.abs(b.deltaY/100),C=Math.min(w,ZF),R=il+C*o;b.deltaY>0&&(R=il/R),a(R,"wheel",b.clientX,b.clientY)}};return(0,hd.useEffect)(function(){var S,b,w,C;if(t){w=ua(window,"mouseup",p,!1),C=ua(window,"mousemove",g,!1);try{window.top!==window.self&&(S=ua(window.top,"mouseup",p,!1),b=ua(window.top,"mousemove",g,!1))}catch(R){Al(!1,"[rc-image] ".concat(R))}}return function(){var R,_,O,N;(R=w)===null||R===void 0||R.remove(),(_=C)===null||_===void 0||_.remove(),(O=S)===null||O===void 0||O.remove(),(N=b)===null||N===void 0||N.remove()}},[r,m,c,u,s,t]),{isMoving:m,onMouseDown:y,onMouseMove:g,onMouseUp:p,onWheel:x}}var gc=E(I());function JF(e){return new Promise(function(t){if(!e){t(!1);return}var r=document.createElement("img");r.onerror=function(){return t(!1)},r.onload=function(){return t(!0)},r.src=e})}function Bp(e){var t=e.src,r=e.isCustomPlaceholder,o=e.fallback,n=(0,gc.useState)(r?"loading":"normal"),i=B(n,2),a=i[0],s=i[1],l=(0,gc.useRef)(!1),c=a==="error";(0,gc.useEffect)(function(){var m=!0;return JF(t).then(function(h){!h&&m&&s("error")}),function(){m=!1}},[t]),(0,gc.useEffect)(function(){r&&!l.current?s("loading"):c&&s("normal")},[t]);var u=function(){s("normal")},d=function(h){l.current=!1,a==="loading"&&h!==null&&h!==void 0&&h.complete&&(h.naturalWidth||h.naturalHeight)&&(l.current=!0,u())},f=c&&o?{src:o}:{onLoad:u,src:t};return[d,f,a]}var vd=E(I());function F0(e,t){var r=e.x-t.x,o=e.y-t.y;return Math.hypot(r,o)}function DG(e,t,r,o){var n=F0(e,r),i=F0(t,o);if(n===0&&i===0)return[e.x,e.y];var a=n/(n+i),s=e.x+a*(t.x-e.x),l=e.y+a*(t.y-e.y);return[s,l]}function nR(e,t,r,o,n,i,a){var s=n.rotate,l=n.scale,c=n.x,u=n.y,d=(0,vd.useState)(!1),f=B(d,2),m=f[0],h=f[1],v=(0,vd.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),y=function(b){v.current=P(P({},v.current),b)},g=function(b){if(t){b.stopPropagation(),h(!0);var w=b.touches,C=w===void 0?[]:w;C.length>1?y({point1:{x:C[0].clientX,y:C[0].clientY},point2:{x:C[1].clientX,y:C[1].clientY},eventType:"touchZoom"}):y({point1:{x:C[0].clientX-c,y:C[0].clientY-u},eventType:"move"})}},p=function(b){var w=b.touches,C=w===void 0?[]:w,R=v.current,_=R.point1,O=R.point2,N=R.eventType;if(C.length>1&&N==="touchZoom"){var k={x:C[0].clientX,y:C[0].clientY},L={x:C[1].clientX,y:C[1].clientY},j=DG(_,O,k,L),W=B(j,2),D=W[0],$=W[1],M=F0(k,L)/F0(_,O);a(M,"touchZoom",D,$,!0),y({point1:k,point2:L,eventType:"touchZoom"})}else N==="move"&&(i({x:C[0].clientX-_.x,y:C[0].clientY-_.y},"move"),y({eventType:"move"}))},x=function(){if(r){if(m&&h(!1),y({eventType:"none"}),o>l)return i({x:0,y:0,scale:o},"touchZoom");var b=e.current.offsetWidth*l,w=e.current.offsetHeight*l,C=e.current.getBoundingClientRect(),R=C.left,_=C.top,O=s%180!==0,N=Wp(O?w:b,O?b:w,R,_);N&&i(P({},N),"dragRebound")}};return(0,vd.useEffect)(function(){var S;return r&&t&&(S=ua(window,"touchmove",function(b){return b.preventDefault()},{passive:!1})),function(){var b;(b=S)===null||b===void 0||b.remove()}},[r,t]),{isTouching:m,onTouchStart:g,onTouchMove:p,onTouchEnd:x}}var AG=["fallback","src","imgRef"],MG=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],LG=function(t){var r=t.fallback,o=t.src,n=t.imgRef,i=Ae(t,AG),a=Bp({src:o,fallback:r}),s=B(a,2),l=s[0],c=s[1];return Eo.default.createElement("img",ee({ref:function(d){n.current=d,l(d)}},i,c))},kG=function(t){var r=t.prefixCls,o=t.src,n=t.alt,i=t.imageInfo,a=t.fallback,s=t.movable,l=s===void 0?!0:s,c=t.onClose,u=t.visible,d=t.icons,f=d===void 0?{}:d,m=t.rootClassName,h=t.closeIcon,v=t.getContainer,y=t.current,g=y===void 0?0:y,p=t.count,x=p===void 0?1:p,S=t.countRender,b=t.scaleStep,w=b===void 0?.5:b,C=t.minScale,R=C===void 0?1:C,_=t.maxScale,O=_===void 0?50:_,N=t.transitionName,k=N===void 0?"zoom":N,L=t.maskTransitionName,j=L===void 0?"fade":L,W=t.imageRender,D=t.imgCommonProps,$=t.toolbarRender,M=t.onTransform,V=t.onChange,F=Ae(t,MG),z=(0,Eo.useRef)(),U=(0,Eo.useContext)(da),H=U&&x>1,A=U&&x>=1,G=(0,Eo.useState)(!0),q=B(G,2),oe=q[0],Z=q[1],X=rR(z,R,O,M),ie=X.transform,te=X.resetTransform,K=X.updateTransform,Y=X.dispatchZoomChange,ne=oR(z,l,u,w,ie,K,Y),Q=ne.isMoving,J=ne.onMouseDown,le=ne.onWheel,ue=nR(z,l,u,R,ie,K,Y),de=ue.isTouching,ve=ue.onTouchStart,ye=ue.onTouchMove,we=ue.onTouchEnd,ce=ie.rotate,ae=ie.scale,Re=(0,e3.default)(T({},"".concat(r,"-moving"),Q));(0,Eo.useEffect)(function(){oe||Z(!0)},[oe]);var Me=function(){te("close")},Be=function(){Y(il+w,"zoomIn")},Ie=function(){Y(il/(il+w),"zoomOut")},Oe=function(){K({rotate:ce+90},"rotateRight")},be=function(){K({rotate:ce-90},"rotateLeft")},Ve=function(){K({flipX:!ie.flipX},"flipX")},He=function(){K({flipY:!ie.flipY},"flipY")},$e=function(){te("reset")},fe=function(gt){var Nt=g+gt;!Number.isInteger(Nt)||Nt<0||Nt>x-1||(Z(!1),te(gt<0?"prev":"next"),V?.(Nt,g))},me=function(gt){!u||!H||(gt.keyCode===Fe.LEFT?fe(-1):gt.keyCode===Fe.RIGHT&&fe(1))},ze=function(gt){u&&(ae!==1?K({x:0,y:0,scale:1},"doubleClick"):Y(il+w,"doubleClick",gt.clientX,gt.clientY))};(0,Eo.useEffect)(function(){var Qe=ua(window,"keydown",me,!1);return function(){Qe.remove()}},[u,H,g]);var Ce=Eo.default.createElement(LG,ee({},D,{width:t.width,height:t.height,imgRef:z,className:"".concat(r,"-img"),alt:n,style:{transform:"translate3d(".concat(ie.x,"px, ").concat(ie.y,"px, 0) scale3d(").concat(ie.flipX?"-":"").concat(ae,", ").concat(ie.flipY?"-":"").concat(ae,", 1) rotate(").concat(ce,"deg)"),transitionDuration:(!oe||de)&&"0s"},fallback:a,src:o,onWheel:le,onMouseDown:J,onDoubleClick:ze,onTouchStart:ve,onTouchMove:ye,onTouchEnd:we,onTouchCancel:we})),Ue=P({url:o,alt:n},i);return Eo.default.createElement(Eo.default.Fragment,null,Eo.default.createElement(_A,ee({transitionName:k,maskTransitionName:j,closable:!1,keyboard:!0,prefixCls:r,onClose:c,visible:u,classNames:{wrapper:Re},rootClassName:m,getContainer:v},F,{afterClose:Me}),Eo.default.createElement("div",{className:"".concat(r,"-img-wrapper")},W?W(Ce,P({transform:ie,image:Ue},U?{current:g}:{})):Ce)),Eo.default.createElement(YF,{visible:u,transform:ie,maskTransitionName:j,closeIcon:h,getContainer:v,prefixCls:r,rootClassName:m,icons:f,countRender:S,showSwitch:H,showProgress:A,current:g,count:x,scale:ae,minScale:R,maxScale:O,toolbarRender:$,onActive:fe,onZoomIn:Be,onZoomOut:Ie,onRotateRight:Oe,onRotateLeft:be,onFlipX:Ve,onFlipY:He,onClose:c,onReset:$e,zIndex:F.zIndex!==void 0?F.zIndex+1:void 0,image:Ue}))},z0=kG;var Ya=E(I()),aR=E(I());var yd=E(I());var jp=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function iR(e){var t=yd.useState({}),r=B(t,2),o=r[0],n=r[1],i=yd.useCallback(function(s,l){return n(function(c){return P(P({},c),{},T({},s,l))}),function(){n(function(c){var u=P({},c);return delete u[s],u})}},[]),a=yd.useMemo(function(){return e?e.map(function(s){if(typeof s=="string")return{data:{src:s}};var l={};return Object.keys(s).forEach(function(c){["src"].concat(se(jp)).includes(c)&&(l[c]=s[c])}),{data:l}}):Object.keys(o).reduce(function(s,l){var c=o[l],u=c.canPreview,d=c.data;return u&&s.push({data:d,id:l}),s},[])},[e,o]);return[a,i,!!e]}var FG=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],zG=["src"],WG=function(t){var r,o=t.previewPrefixCls,n=o===void 0?"rc-image-preview":o,i=t.children,a=t.icons,s=a===void 0?{}:a,l=t.items,c=t.preview,u=t.fallback,d=pe(c)==="object"?c:{},f=d.visible,m=d.onVisibleChange,h=d.getContainer,v=d.current,y=d.movable,g=d.minScale,p=d.maxScale,x=d.countRender,S=d.closeIcon,b=d.onChange,w=d.onTransform,C=d.toolbarRender,R=d.imageRender,_=Ae(d,FG),O=iR(l),N=B(O,3),k=N[0],L=N[1],j=N[2],W=zt(0,{value:v}),D=B(W,2),$=D[0],M=D[1],V=(0,aR.useState)(!1),F=B(V,2),z=F[0],U=F[1],H=((r=k[$])===null||r===void 0?void 0:r.data)||{},A=H.src,G=Ae(H,zG),q=zt(!!f,{value:f,onChange:function(de,ve){m?.(de,ve,$)}}),oe=B(q,2),Z=oe[0],X=oe[1],ie=(0,aR.useState)(null),te=B(ie,2),K=te[0],Y=te[1],ne=Ya.useCallback(function(ue,de,ve,ye){var we=j?k.findIndex(function(ce){return ce.data.src===de}):k.findIndex(function(ce){return ce.id===ue});M(we<0?0:we),X(!0),Y({x:ve,y:ye}),U(!0)},[k,j]);Ya.useEffect(function(){Z?z||M(0):U(!1)},[Z]);var Q=function(de,ve){M(de),b?.(de,ve)},J=function(){X(!1),Y(null)},le=Ya.useMemo(function(){return{register:L,onPreview:ne}},[L,ne]);return Ya.createElement(da.Provider,{value:le},i,Ya.createElement(z0,ee({"aria-hidden":!Z,movable:y,visible:Z,prefixCls:n,closeIcon:S,onClose:J,mousePosition:K,imgCommonProps:G,src:A,fallback:u,icons:s,minScale:g,maxScale:p,getContainer:h,current:$,count:k.length,countRender:x,onTransform:w,toolbarRender:C,imageRender:R,onChange:Q},_)))},t3=WG;var hc=E(I());var r3=0;function sR(e,t){var r=hc.useState(function(){return r3+=1,String(r3)}),o=B(r,1),n=o[0],i=hc.useContext(da),a={data:t,canPreview:e};return hc.useEffect(function(){if(i)return i.register(n,a)},[]),hc.useEffect(function(){i&&i.register(n,a)},[e,t]),n}var BG=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],jG=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],o3=function(t){var r=t.src,o=t.alt,n=t.onPreviewClose,i=t.prefixCls,a=i===void 0?"rc-image":i,s=t.previewPrefixCls,l=s===void 0?"".concat(a,"-preview"):s,c=t.placeholder,u=t.fallback,d=t.width,f=t.height,m=t.style,h=t.preview,v=h===void 0?!0:h,y=t.className,g=t.onClick,p=t.onError,x=t.wrapperClassName,S=t.wrapperStyle,b=t.rootClassName,w=Ae(t,BG),C=c&&c!==!0,R=pe(v)==="object"?v:{},_=R.src,O=R.visible,N=O===void 0?void 0:O,k=R.onVisibleChange,L=k===void 0?n:k,j=R.getContainer,W=j===void 0?void 0:j,D=R.mask,$=R.maskClassName,M=R.movable,V=R.icons,F=R.scaleStep,z=R.minScale,U=R.maxScale,H=R.imageRender,A=R.toolbarRender,G=Ae(R,jG),q=_??r,oe=zt(!!N,{value:N,onChange:L}),Z=B(oe,2),X=Z[0],ie=Z[1],te=Bp({src:r,isCustomPlaceholder:C,fallback:u}),K=B(te,3),Y=K[0],ne=K[1],Q=K[2],J=(0,vc.useState)(null),le=B(J,2),ue=le[0],de=le[1],ve=(0,vc.useContext)(da),ye=!!v,we=function(){ie(!1),de(null)},ce=(0,W0.default)(a,x,b,T({},"".concat(a,"-error"),Q==="error")),ae=(0,vc.useMemo)(function(){var Ie={};return jp.forEach(function(Oe){t[Oe]!==void 0&&(Ie[Oe]=t[Oe])}),Ie},jp.map(function(Ie){return t[Ie]})),Re=(0,vc.useMemo)(function(){return P(P({},ae),{},{src:q})},[q,ae]),Me=sR(ye,Re),Be=function(Oe){var be=qF(Oe.target),Ve=be.left,He=be.top;ve?ve.onPreview(Me,q,Ve,He):(de({x:Ve,y:He}),ie(!0)),g?.(Oe)};return Qa.createElement(Qa.Fragment,null,Qa.createElement("div",ee({},w,{className:ce,onClick:ye?Be:g,style:P({width:d,height:f},S)}),Qa.createElement("img",ee({},ae,{className:(0,W0.default)("".concat(a,"-img"),T({},"".concat(a,"-img-placeholder"),c===!0),y),style:P({height:f},m),ref:Y},ne,{width:d,height:f,onError:p})),Q==="loading"&&Qa.createElement("div",{"aria-hidden":"true",className:"".concat(a,"-placeholder")},c),D&&ye&&Qa.createElement("div",{className:(0,W0.default)("".concat(a,"-mask"),$),style:{display:m?.display==="none"?"none":void 0}},D)),!ve&&ye&&Qa.createElement(z0,ee({"aria-hidden":!X,visible:X,prefixCls:l,onClose:we,mousePosition:ue,src:q,alt:o,imageInfo:{width:d,height:f},fallback:u,getContainer:W,icons:V,movable:M,scaleStep:F,minScale:z,maxScale:U,rootClassName:b,imageRender:H,imgCommonProps:ae,toolbarRender:A},G)))};o3.PreviewGroup=t3;var n3=o3;var B0=n3;var en=E(I());var j0=E(I());var VG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},i3=VG;var HG=function(t,r){return j0.createElement(mt,ee({},t,{ref:r,icon:i3}))},UG=j0.forwardRef(HG),a3=UG;var V0=E(I());var GG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},s3=GG;var qG=function(t,r){return V0.createElement(mt,ee({},t,{ref:r,icon:s3}))},KG=V0.forwardRef(qG),l3=KG;var H0=E(I());var XG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},c3=XG;var YG=function(t,r){return H0.createElement(mt,ee({},t,{ref:r,icon:c3}))},QG=H0.forwardRef(YG),lR=QG;var U0=E(I());var ZG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},u3=ZG;var JG=function(t,r){return U0.createElement(mt,ee({},t,{ref:r,icon:u3}))},eq=U0.forwardRef(JG),d3=eq;var G0=E(I());var tq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},f3=tq;var rq=function(t,r){return G0.createElement(mt,ee({},t,{ref:r,icon:f3}))},oq=G0.forwardRef(rq),p3=oq;var m3=E(Ee());var cR=e=>({position:e||"absolute",inset:0}),nq=e=>{let{iconCls:t,motionDurationSlow:r,paddingXXS:o,marginXXS:n,prefixCls:i,colorTextLightSolid:a}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:a,background:new it("#000").setA(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${r}`,[`.${i}-mask-info`]:Object.assign(Object.assign({},Ni),{padding:`0 ${re(o)}`,[t]:{marginInlineEnd:n,svg:{verticalAlign:"baseline"}}})}},iq=e=>{let{previewCls:t,modalMaskBg:r,paddingSM:o,marginXL:n,margin:i,paddingLG:a,previewOperationColorDisabled:s,previewOperationHoverColor:l,motionDurationSlow:c,iconCls:u,colorTextLightSolid:d}=e,f=new it(r).setA(.1),m=f.clone().setA(.2);return{[`${t}-footer`]:{position:"fixed",bottom:n,left:{_skip_check_:!0,value:"50%"},display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor,transform:"translateX(-50%)"},[`${t}-progress`]:{marginBottom:i},[`${t}-close`]:{position:"fixed",top:n,right:{_skip_check_:!0,value:n},display:"flex",color:d,backgroundColor:f.toRgbString(),borderRadius:"50%",padding:o,outline:0,border:0,cursor:"pointer",transition:`all ${c}`,"&:hover":{backgroundColor:m.toRgbString()},[`& > ${u}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${re(a)}`,backgroundColor:f.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:o,padding:o,cursor:"pointer",transition:`all ${c}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${u}`]:{color:l},"&-disabled":{color:s,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${u}`]:{fontSize:e.previewOperationSize}}}}},aq=e=>{let{modalMaskBg:t,iconCls:r,previewOperationColorDisabled:o,previewCls:n,zIndexPopup:i,motionDurationSlow:a}=e,s=new it(t).setA(.1),l=s.clone().setA(.2);return{[`${n}-switch-left, ${n}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:e.calc(i).add(1).equal(),display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:e.calc(e.imagePreviewSwitchSize).mul(-1).div(2).equal(),color:e.previewOperationColor,background:s.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${a}`,userSelect:"none","&:hover":{background:l.toRgbString()},"&-disabled":{"&, &:hover":{color:o,background:"transparent",cursor:"not-allowed",[`> ${r}`]:{cursor:"not-allowed"}}},[`> ${r}`]:{fontSize:e.previewOperationSize}},[`${n}-switch-left`]:{insetInlineStart:e.marginSM},[`${n}-switch-right`]:{insetInlineEnd:e.marginSM}}},sq=e=>{let{motionEaseOut:t,previewCls:r,motionDurationSlow:o,componentCls:n}=e;return[{[`${n}-preview-root`]:{[r]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${r}-body`]:Object.assign(Object.assign({},cR()),{overflow:"hidden"}),[`${r}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${o} ${t} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},cR()),{transition:`transform ${o} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${r}-moving`]:{[`${r}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${n}-preview-root`]:{[`${r}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${n}-preview-operations-wrapper`]:{position:"fixed",zIndex:e.calc(e.zIndexPopup).add(1).equal()},"&":[iq(e),aq(e)]}]},lq=e=>{let{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:Object.assign({},nq(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},cR())}}},cq=e=>{let{previewCls:t}=e;return{[`${t}-root`]:Ql(e,"zoom"),"&":Yl(e,!0)}},uq=e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new it(e.colorTextLightSolid).setA(.65).toRgbString(),previewOperationHoverColor:new it(e.colorTextLightSolid).setA(.85).toRgbString(),previewOperationColorDisabled:new it(e.colorTextLightSolid).setA(.25).toRgbString(),previewOperationSize:e.fontSizeIcon*1.5}),q0=Pt("Image",e=>{let t=`${e.componentCls}-preview`,r=rt(e,{previewCls:t,modalMaskBg:new it("#000").setA(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[lq(r),sq(r),N1(rt(r,{componentCls:t})),cq(r)]},uq);var dq=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{var{previewPrefixCls:t,preview:r}=e,o=dq(e,["previewPrefixCls","preview"]);let{getPrefixCls:n}=en.useContext(at),i=n("image",t),a=`${i}-preview`,s=n(),l=Mo(i),[c,u,d]=q0(i,l),[f]=js("ImagePreview",typeof r=="object"?r.zIndex:void 0),m=en.useMemo(()=>{var h;if(r===!1)return r;let v=typeof r=="object"?r:{},y=(0,m3.default)(u,d,l,(h=v.rootClassName)!==null&&h!==void 0?h:"");return Object.assign(Object.assign({},v),{transitionName:Ji(s,"zoom",v.transitionName),maskTransitionName:Ji(s,"fade",v.maskTransitionName),rootClassName:y,zIndex:f})},[r]);return c(en.createElement(B0.PreviewGroup,Object.assign({preview:m,previewPrefixCls:a,icons:uR},o)))},g3=fq;var h3=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{prefixCls:t,preview:r,className:o,rootClassName:n,style:i}=e,a=h3(e,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:s,getPopupContainer:l,className:c,style:u,preview:d}=Do("image"),[f]=Pi("Image"),m=s("image",t),h=s(),v=Mo(m),[y,g,p]=q0(m,v),x=(0,K0.default)(n,g,p,v),S=(0,K0.default)(o,g,c),[b]=js("ImagePreview",typeof r=="object"?r.zIndex:void 0),w=xd.useMemo(()=>{if(r===!1)return r;let R=typeof r=="object"?r:{},{getContainer:_,closeIcon:O,rootClassName:N}=R,k=h3(R,["getContainer","closeIcon","rootClassName"]);return Object.assign(Object.assign({mask:xd.createElement("div",{className:`${m}-mask-info`},xd.createElement(gd,null),f?.preview),icons:uR},k),{rootClassName:(0,K0.default)(x,N),getContainer:_??l,transitionName:Ji(h,"zoom",R.transitionName),maskTransitionName:Ji(h,"fade",R.maskTransitionName),zIndex:b,closeIcon:O??d?.closeIcon})},[r,f,d?.closeIcon]),C=Object.assign(Object.assign({},u),i);return y(xd.createElement(B0,Object.assign({prefixCls:m,preview:w,rootClassName:x,className:S,style:C},a)))};v3.PreviewGroup=g3;var dR=v3;var fR=E(I()),Vp=E(I()),y3=E(Ee());var pq=e=>{let{getPrefixCls:t,direction:r}=(0,Vp.useContext)(at),{prefixCls:o,className:n}=e,i=t("input-group",o),a=t("input"),[s,l,c]=h0(a),u=(0,y3.default)(i,c,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:r==="rtl"},l,n),d=(0,Vp.useContext)(fo),f=(0,Vp.useMemo)(()=>Object.assign(Object.assign({},d),{isFormItemInput:!1}),[d]);return s(fR.createElement("span",{className:u,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},fR.createElement(fo.Provider,{value:f},e.children)))},x3=pq;var ur=E(I()),C3=E(Ee());var mq=e=>{let{componentCls:t,paddingXS:r}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:r,"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},b3=Pt(["Input","OTP"],e=>{let t=rt(e,Ua(e));return[mq(t)]},Ga);var al=E(I());var gq=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{value:r,onChange:o,onActiveChange:n,index:i,mask:a}=e,s=gq(e,["value","onChange","onActiveChange","index","mask"]),l=r&&typeof a=="string"?a:r,c=h=>{o(i,h.target.value)},u=al.useRef(null);al.useImperativeHandle(t,()=>u.current);let d=()=>{ut(()=>{var h;let v=(h=u.current)===null||h===void 0?void 0:h.input;document.activeElement===v&&v&&v.select()})};return al.createElement(nl,Object.assign({type:a===!0?"password":"text"},s,{ref:u,value:l,onInput:c,onFocus:d,onKeyDown:h=>{let{key:v,ctrlKey:y,metaKey:g}=h;v==="ArrowLeft"?n(i-1):v==="ArrowRight"?n(i+1):v==="z"&&(y||g)&&h.preventDefault(),d()},onKeyUp:h=>{h.key==="Backspace"&&!r&&n(i-1),d()},onMouseDown:d,onMouseUp:d}))}),S3=hq;var vq=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{index:t,prefixCls:r,separator:o}=e,n=typeof o=="function"?o(t):o;return n?ur.createElement("span",{className:`${r}-separator`},n):null},xq=ur.forwardRef((e,t)=>{let{prefixCls:r,length:o=6,size:n,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:d,status:f,autoFocus:m,mask:h,type:v,onInput:y,inputMode:g}=e,p=vq(e,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:x,direction:S}=ur.useContext(at),b=x("otp",r),w=Ao(p,{aria:!0,data:!0,attr:!0}),[C,R,_]=b3(b),O=pn(A=>n??A),N=ur.useContext(fo),k=na(N.status,f),L=ur.useMemo(()=>Object.assign(Object.assign({},N),{status:k,hasFeedback:!1,feedbackIcon:null}),[N,k]),j=ur.useRef(null),W=ur.useRef({});ur.useImperativeHandle(t,()=>({focus:()=>{var A;(A=W.current[0])===null||A===void 0||A.focus()},blur:()=>{var A;for(let G=0;Gl?l(A):A,[$,M]=ur.useState(()=>X0(D(i||"")));ur.useEffect(()=>{a!==void 0&&M(X0(a))},[a]);let V=Rt(A=>{M(A),y&&y(A),s&&A.length===o&&A.every(G=>G)&&A.some((G,q)=>$[q]!==G)&&s(A.join(""))}),F=Rt((A,G)=>{let q=se($);for(let Z=0;Z=0&&!q[Z];Z-=1)q.pop();let oe=D(q.map(Z=>Z||" ").join(""));return q=X0(oe).map((Z,X)=>Z===" "&&!q[X]?q[X]:Z),q}),z=(A,G)=>{var q;let oe=F(A,G),Z=Math.min(A+G.length,o-1);Z!==A&&oe[A]!==void 0&&((q=W.current[Z])===null||q===void 0||q.focus()),V(oe)},U=A=>{var G;(G=W.current[A])===null||G===void 0||G.focus()},H={variant:u,disabled:d,status:k,mask:h,type:v,inputMode:g};return C(ur.createElement("div",Object.assign({},w,{ref:j,className:(0,C3.default)(b,{[`${b}-sm`]:O==="small",[`${b}-lg`]:O==="large",[`${b}-rtl`]:S==="rtl"},_,R)}),ur.createElement(fo.Provider,{value:L},Array.from({length:o}).map((A,G)=>{let q=`otp-${G}`,oe=$[G]||"";return ur.createElement(ur.Fragment,{key:q},ur.createElement(S3,Object.assign({ref:Z=>{W.current[G]=Z},index:G,size:O,htmlSize:1,className:`${b}-input`,onChange:z,value:oe,onActiveChange:U,autoFocus:G===0&&m},H)),Ge?ko.createElement(gd,null):ko.createElement(R3,null),Rq={click:"onClick",hover:"onMouseOver"},Oq=ko.forwardRef((e,t)=>{let{disabled:r,action:o="click",visibilityToggle:n=!0,iconRender:i=Eq}=e,a=ko.useContext(Ur),s=r??a,l=typeof n=="object"&&n.visible!==void 0,[c,u]=(0,Q0.useState)(()=>l?n.visible:!1),d=(0,Q0.useRef)(null);ko.useEffect(()=>{l&&u(n.visible)},[l,n]);let f=Lp(d),m=()=>{var O;if(s)return;c&&f();let N=!c;u(N),typeof n=="object"&&((O=n.onVisibleChange)===null||O===void 0||O.call(n,N))},h=O=>{let N=Rq[o]||"",k=i(c),L={[N]:m,className:`${O}-icon`,key:"passwordIcon",onMouseDown:j=>{j.preventDefault()},onMouseUp:j=>{j.preventDefault()}};return ko.cloneElement(ko.isValidElement(k)?k:ko.createElement("span",null,k),L)},{className:v,prefixCls:y,inputPrefixCls:g,size:p}=e,x=wq(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:S}=ko.useContext(at),b=S("input",g),w=S("input-password",y),C=n&&h(w),R=(0,O3.default)(w,v,{[`${w}-${p}`]:!!p}),_=Object.assign(Object.assign({},Gr(x,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:R,prefixCls:b,suffix:C});return p&&(_.size=p),ko.createElement(nl,Object.assign({ref:Fr(t,d)},_))}),_3=Oq;var Li=E(I());var P3=E(Ee());var _q=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let{prefixCls:r,inputPrefixCls:o,className:n,size:i,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:d,onChange:f,onCompositionStart:m,onCompositionEnd:h}=e,v=_q(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:y,direction:g}=Li.useContext(at),p=Li.useRef(!1),x=y("input-search",r),S=y("input",o),{compactSize:b}=Zn(x,g),w=pn(z=>{var U;return(U=i??b)!==null&&U!==void 0?U:z}),C=Li.useRef(null),R=z=>{z?.target&&z.type==="click"&&d&&d(z.target.value,z,{source:"clear"}),f?.(z)},_=z=>{var U;document.activeElement===((U=C.current)===null||U===void 0?void 0:U.input)&&z.preventDefault()},O=z=>{var U,H;d&&d((H=(U=C.current)===null||U===void 0?void 0:U.input)===null||H===void 0?void 0:H.value,z,{source:"input"})},N=z=>{p.current||c||O(z)},k=typeof s=="boolean"?Li.createElement(t0,null):null,L=`${x}-button`,j,W=s||{},D=W.type&&W.type.__ANT_BUTTON===!0;D||W.type==="button"?j=Qn(W,Object.assign({onMouseDown:_,onClick:z=>{var U,H;(H=(U=W?.props)===null||U===void 0?void 0:U.onClick)===null||H===void 0||H.call(U,z),O(z)},key:"enterButton"},D?{className:L,size:w}:{})):j=Li.createElement(up,{className:L,type:s?"primary":void 0,size:w,disabled:u,key:"enterButton",onMouseDown:_,onClick:O,loading:c,icon:k},s),l&&(j=[j,Qn(l,{key:"addonAfter"})]);let $=(0,P3.default)(x,{[`${x}-rtl`]:g==="rtl",[`${x}-${w}`]:!!w,[`${x}-with-button`]:!!s},n),M=Object.assign(Object.assign({},v),{className:$,prefixCls:S,type:"search"}),V=z=>{p.current=!0,m?.(z)},F=z=>{p.current=!1,h?.(z)};return Li.createElement(nl,Object.assign({ref:Fr(C,t),onPressEnter:N},M,{size:w,onCompositionStart:V,onCompositionEnd:F,addonAfter:j,suffix:a,onChange:R,disabled:u}))}),T3=Pq;var Ln=E(I()),A3=E(I()),Up=E(Ee());var Hp=E(Ee());var Zr=E(I());var N3=E(Ee());var Ro=E(I());var Tq=` + `]:{cursor:"not-allowed !important"}},[`&-tooltip ${r}-tooltip-inner`]:{minWidth:"unset"}})}},KF=(e,t)=>{let{componentCls:r,railSize:n,handleSize:o,dotSize:i,marginFull:a,calc:s}=e,l=t?"paddingBlock":"paddingInline",c=t?"width":"height",u=t?"height":"width",f=t?"insetBlockStart":"insetInlineStart",p=t?"top":"insetInlineStart",g=s(n).mul(3).sub(o).div(2).equal(),h=s(o).sub(n).div(2).equal(),v=t?{borderWidth:`${oe(h)} 0`,transform:`translateY(${oe(s(h).mul(-1).equal())})`}:{borderWidth:`0 ${oe(h)}`,transform:`translateX(${oe(e.calc(h).mul(-1).equal())})`};return{[l]:n,[u]:s(n).mul(3).equal(),[`${r}-rail`]:{[c]:"100%",[u]:n},[`${r}-track,${r}-tracks`]:{[u]:n},[`${r}-track-draggable`]:Object.assign({},v),[`${r}-handle`]:{[f]:g},[`${r}-mark`]:{insetInlineStart:0,top:0,[p]:s(n).mul(3).add(t?0:a).equal(),[c]:"100%"},[`${r}-step`]:{insetInlineStart:0,top:0,[p]:n,[c]:"100%",[u]:n},[`${r}-dot`]:{position:"absolute",[f]:s(n).sub(i).div(2).equal()}}},wU=e=>{let{componentCls:t,marginPartWithMark:r}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},KF(e,!0)),{[`&${t}-with-marks`]:{marginBottom:r}})}},EU=e=>{let{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},KF(e,!1)),{height:"100%"})}},RU=e=>{let r=e.controlHeightLG/4,n=e.controlHeightSM/2,o=e.lineWidth+1,i=e.lineWidth+1*1.5,a=e.colorPrimary,s=new gt(a).setA(.2).toRgbString();return{controlSize:r,railSize:4,handleSize:r,handleSizeHover:n,dotSize:8,handleLineWidth:o,handleLineWidthHover:i,railBg:e.colorFillTertiary,railHoverBg:e.colorFillSecondary,trackBg:e.colorPrimaryBorder,trackHoverBg:e.colorPrimaryBorderHover,handleColor:e.colorPrimaryBorder,handleActiveColor:a,handleActiveOutlineColor:s,handleColorDisabled:new gt(e.colorTextDisabled).onBackground(e.colorBgContainer).toHexString(),dotBorderColor:e.colorBorderSecondary,dotActiveBorderColor:e.colorPrimaryBorder,trackBgDisabled:e.colorBgContainerDisabled}},XF=Gt("Slider",e=>{let t=ut(e,{marginPart:e.calc(e.controlHeight).sub(e.controlSize).div(2).equal(),marginFull:e.calc(e.controlSize).div(2).equal(),marginPartWithMark:e.calc(e.controlHeightLG).sub(e.controlSize).equal()});return[CU(t),wU(t),EU(t)]},RU);var Uu=E($());function fp(){let[e,t]=Uu.useState(!1),r=Uu.useRef(null),n=()=>{dt.cancel(r.current)},o=i=>{n(),i?t(i):r.current=dt(()=>{t(i)})};return Uu.useEffect(()=>n,[]),[e,o]}var OU=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);otypeof r=="number"?r.toString():""}var PU=ra.default.forwardRef((e,t)=>{let{prefixCls:r,range:n,className:o,rootClassName:i,style:a,disabled:s,tooltipPrefixCls:l,tipFormatter:c,tooltipVisible:u,getTooltipPopupContainer:f,tooltipPlacement:p,tooltip:g={},onChangeComplete:h,classNames:v,styles:y}=e,m=OU(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:d}=e,{getPrefixCls:x,direction:b,className:S,style:w,classNames:C,styles:R,getPopupContainer:P}=no("slider"),O=ra.default.useContext(Ur),A=s??O,{handleRender:F,direction:M}=ra.default.useContext(GF),L=(M||b)==="rtl",[N,I]=fp(),[D,U]=fp(),z=Object.assign({},g),{open:W,placement:q,getPopupContainer:j,prefixCls:k,formatter:V}=z,G=W??u,J=(N||D)&&G!==!1,Y=_U(V,c),[X,ae]=fp(),Z=ie=>{h?.(ie),ae(!1)},K=(ie,Re)=>ie||(Re?L?"left":"right":"top"),Q=x("slider",r),[re,ee,ne]=XF(Q),de=(0,qu.default)(o,S,C.root,v?.root,i,{[`${Q}-rtl`]:L,[`${Q}-lock`]:X},ee,ne);L&&!m.vertical&&(m.reverse=!m.reverse),ra.default.useEffect(()=>{let ie=()=>{dt(()=>{U(!1)},1)};return document.addEventListener("mouseup",ie),()=>{document.removeEventListener("mouseup",ie)}},[]);let le=n&&!G,pe=F||((ie,Re)=>{let{index:Le}=Re,Ge=ie.props;function Me(He,ye,se){var xe,_e,he,Je;se&&((_e=(xe=m)[He])===null||_e===void 0||_e.call(xe,ye)),(Je=(he=Ge)[He])===null||Je===void 0||Je.call(he,ye)}let Ie=Object.assign(Object.assign({},Ge),{onMouseEnter:He=>{I(!0),Me("onMouseEnter",He)},onMouseLeave:He=>{I(!1),Me("onMouseLeave",He)},onMouseDown:He=>{U(!0),ae(!0),Me("onMouseDown",He)},onFocus:He=>{var ye;U(!0),(ye=m.onFocus)===null||ye===void 0||ye.call(m,He),Me("onFocus",He,!0)},onBlur:He=>{var ye;U(!1),(ye=m.onBlur)===null||ye===void 0||ye.call(m,He),Me("onBlur",He,!0)}}),je=ra.default.cloneElement(ie,Ie),We=(!!G||J)&&Y!==null;return le?je:ra.default.createElement(xE,Object.assign({},z,{prefixCls:x("tooltip",k??l),title:Y?Y(Re.value):"",value:Re.value,open:We,placement:K(q??p,d),key:Le,classNames:{root:`${Q}-tooltip`},getPopupContainer:j||f||P}),je)}),Oe=le?(ie,Re)=>{let Le=ra.default.cloneElement(ie,{style:Object.assign(Object.assign({},ie.props.style),{visibility:"hidden"})});return ra.default.createElement(xE,Object.assign({},z,{prefixCls:x("tooltip",k??l),title:Y?Y(Re.value):"",open:Y!==null&&J,placement:K(q??p,d),key:"tooltip",classNames:{root:`${Q}-tooltip`},getPopupContainer:j||f||P,draggingDelete:Re.draggingDelete}),Le)}:void 0,Ce=Object.assign(Object.assign(Object.assign(Object.assign({},R.root),w),y?.root),a),De=Object.assign(Object.assign({},R.tracks),y?.tracks),ce=(0,qu.default)(C.tracks,v?.tracks);return re(ra.default.createElement(UF,Object.assign({},m,{classNames:Object.assign({handle:(0,qu.default)(C.handle,v?.handle),rail:(0,qu.default)(C.rail,v?.rail),track:(0,qu.default)(C.track,v?.track)},ce?{tracks:ce}:{}),styles:Object.assign({handle:Object.assign(Object.assign({},R.handle),y?.handle),rail:Object.assign(Object.assign({},R.rail),y?.rail),track:Object.assign(Object.assign({},R.track),y?.track)},Object.keys(De).length?{tracks:De}:{}),step:m.step,range:n,className:de,style:Ce,disabled:A,ref:t,prefixCls:Q,handleRender:pe,activeHandleRender:Oe,onChangeComplete:Z})))}),bE=PU;function SE(e){return["small","middle","large"].includes(e)}var l0=E($()),ZF=E(Ne());var YF=E(Ne()),CE=["wrap","nowrap","wrap-reverse"],wE=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],EE=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],TU=(e,t)=>{let r=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${r}`]:r&&CE.includes(r)}},NU=(e,t)=>{let r={};return EE.forEach(n=>{r[`${e}-align-${n}`]=t.align===n}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r},IU=(e,t)=>{let r={};return wE.forEach(n=>{r[`${e}-justify-${n}`]=t.justify===n}),r};function $U(e,t){return(0,YF.default)(Object.assign(Object.assign(Object.assign({},TU(e,t)),NU(e,t)),IU(e,t)))}var QF=$U;var DU=e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},AU=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},kU=e=>{let{componentCls:t}=e,r={};return CE.forEach(n=>{r[`${t}-wrap-${n}`]={flexWrap:n}}),r},MU=e=>{let{componentCls:t}=e,r={};return EE.forEach(n=>{r[`${t}-align-${n}`]={alignItems:n}}),r},FU=e=>{let{componentCls:t}=e,r={};return wE.forEach(n=>{r[`${t}-justify-${n}`]={justifyContent:n}}),r},LU=()=>({}),JF=Gt("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:n}=e,o=ut(e,{flexGapSM:t,flexGap:r,flexGapLG:n});return[DU(o),AU(o),kU(o),MU(o),FU(o)]},LU,{resetStyle:!1});var zU=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{prefixCls:r,rootClassName:n,className:o,style:i,flex:a,gap:s,children:l,vertical:c=!1,component:u="div"}=e,f=zU(e,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:p,direction:g,getPrefixCls:h}=l0.default.useContext(rt),v=h("flex",r),[y,m,d]=JF(v),x=c??p?.vertical,b=(0,ZF.default)(o,n,p?.className,v,m,d,QF(v,e),{[`${v}-rtl`]:g==="rtl",[`${v}-gap-${s}`]:SE(s),[`${v}-vertical`]:x}),S=Object.assign(Object.assign({},p?.style),i);return a&&(S.flex=a),s&&!SE(s)&&(S.gap=s),y(l0.default.createElement(u,Object.assign({ref:t,className:b,style:S},qr(f,["justify","wrap","align"])),l))}),Wa=WU;var c0=E($());var BU={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},eL=BU;var jU=function(t,r){return c0.createElement(zt,fe({},t,{ref:r,icon:eL}))},VU=c0.forwardRef(jU),u0=VU;var RE=E($()),dp=E($()),tL=E(Ne());var HU=e=>{let{getPrefixCls:t,direction:r}=(0,dp.useContext)(rt),{prefixCls:n,className:o}=e,i=t("input-group",n),a=t("input"),[s,l,c]=Hy(a),u=(0,tL.default)(i,c,{[`${i}-lg`]:e.size==="large",[`${i}-sm`]:e.size==="small",[`${i}-compact`]:e.compact,[`${i}-rtl`]:r==="rtl"},l,o),f=(0,dp.useContext)(fn),p=(0,dp.useMemo)(()=>Object.assign(Object.assign({},f),{isFormItemInput:!1}),[f]);return s(RE.createElement("span",{className:u,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},RE.createElement(fn.Provider,{value:p},e.children)))},rL=HU;var dr=E($()),aL=E(Ne());var UU=e=>{let{componentCls:t,paddingXS:r}=e;return{[t]:{display:"inline-flex",alignItems:"center",flexWrap:"nowrap",columnGap:r,[`${t}-input-wrapper`]:{position:"relative",[`${t}-mask-icon`]:{position:"absolute",zIndex:"1",top:"50%",right:"50%",transform:"translate(50%, -50%)",pointerEvents:"none"},[`${t}-mask-input`]:{color:"transparent",caretColor:"var(--ant-color-text)"},[`${t}-mask-input[type=number]::-webkit-inner-spin-button`]:{"-webkit-appearance":"none",margin:0},[`${t}-mask-input[type=number]`]:{"-moz-appearance":"textfield"}},"&-rtl":{direction:"rtl"},[`${t}-input`]:{textAlign:"center",paddingInline:e.paddingXXS},[`&${t}-sm ${t}-input`]:{paddingInline:e.calc(e.paddingXXS).div(2).equal()},[`&${t}-lg ${t}-input`]:{paddingInline:e.paddingXS}}}},nL=Gt(["Input","OTP"],e=>{let t=ut(e,Ma(e));return[UU(t)]},Fa);var ai=E($()),oL=E(Ne());var qU=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{className:r,value:n,onChange:o,onActiveChange:i,index:a,mask:s}=e,l=qU(e,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:c}=ai.useContext(rt),u=c("otp"),f=typeof s=="string"?s:n,p=ai.useRef(null);ai.useImperativeHandle(t,()=>p.current);let g=m=>{o(a,m.target.value)},h=()=>{dt(()=>{var m;let d=(m=p.current)===null||m===void 0?void 0:m.input;document.activeElement===d&&d&&d.select()})},v=m=>{let{key:d,ctrlKey:x,metaKey:b}=m;d==="ArrowLeft"?i(a-1):d==="ArrowRight"?i(a+1):d==="z"&&(x||b)&&m.preventDefault(),h()},y=m=>{m.key==="Backspace"&&!n&&i(a-1),h()};return ai.createElement("span",{className:`${u}-input-wrapper`,role:"presentation"},s&&n!==""&&n!==void 0&&ai.createElement("span",{className:`${u}-mask-icon`,"aria-hidden":"true"},f),ai.createElement(Gs,Object.assign({"aria-label":`OTP Input ${a+1}`,type:s===!0?"password":"text"},l,{ref:p,value:n,onInput:g,onFocus:h,onKeyDown:v,onKeyUp:y,onMouseDown:h,onMouseUp:h,className:(0,oL.default)(r,{[`${u}-mask-input`]:s})})))}),iL=GU;var KU=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{index:t,prefixCls:r,separator:n}=e,o=typeof n=="function"?n(t):n;return o?dr.createElement("span",{className:`${r}-separator`},o):null},YU=dr.forwardRef((e,t)=>{let{prefixCls:r,length:n=6,size:o,defaultValue:i,value:a,onChange:s,formatter:l,separator:c,variant:u,disabled:f,status:p,autoFocus:g,mask:h,type:v,onInput:y,inputMode:m}=e,d=KU(e,["prefixCls","length","size","defaultValue","value","onChange","formatter","separator","variant","disabled","status","autoFocus","mask","type","onInput","inputMode"]),{getPrefixCls:x,direction:b}=dr.useContext(rt),S=x("otp",r),w=qo(d,{aria:!0,data:!0,attr:!0}),[C,R,P]=nL(S),O=ao(k=>o??k),A=dr.useContext(fn),F=Qi(A.status,p),M=dr.useMemo(()=>Object.assign(Object.assign({},A),{status:F,hasFeedback:!1,feedbackIcon:null}),[A,F]),H=dr.useRef(null),L=dr.useRef({});dr.useImperativeHandle(t,()=>({focus:()=>{var k;(k=L.current[0])===null||k===void 0||k.focus()},blur:()=>{var k;for(let V=0;Vl?l(k):k,[I,D]=dr.useState(()=>f0(N(i||"")));dr.useEffect(()=>{a!==void 0&&D(f0(a))},[a]);let U=wt(k=>{D(k),y&&y(k),s&&k.length===n&&k.every(V=>V)&&k.some((V,G)=>I[G]!==V)&&s(k.join(""))}),z=wt((k,V)=>{let G=te(I);for(let Y=0;Y=0&&!G[Y];Y-=1)G.pop();let J=N(G.map(Y=>Y||" ").join(""));return G=f0(J).map((Y,X)=>Y===" "&&!G[X]?G[X]:Y),G}),W=(k,V)=>{var G;let J=z(k,V),Y=Math.min(k+V.length,n-1);Y!==k&&J[k]!==void 0&&((G=L.current[Y])===null||G===void 0||G.focus()),U(J)},q=k=>{var V;(V=L.current[k])===null||V===void 0||V.focus()},j={variant:u,disabled:f,status:F,mask:h,type:v,inputMode:m};return C(dr.createElement("div",Object.assign({},w,{ref:H,className:(0,aL.default)(S,{[`${S}-sm`]:O==="small",[`${S}-lg`]:O==="large",[`${S}-rtl`]:b==="rtl"},P,R),role:"group"}),dr.createElement(fn.Provider,{value:M},Array.from({length:n}).map((k,V)=>{let G=`otp-${V}`,J=I[V]||"";return dr.createElement(dr.Fragment,{key:G},dr.createElement(iL,Object.assign({ref:Y=>{L.current[V]=Y},index:V,size:O,htmlSize:1,className:`${S}-input`,onChange:W,value:J,onActiveChange:q,autoFocus:V===0&&g},j)),Ve?$n.createElement(u0,null):$n.createElement(cL,null),rq={click:"onClick",hover:"onMouseOver"},nq=$n.forwardRef((e,t)=>{let{disabled:r,action:n="click",visibilityToggle:o=!0,iconRender:i=tq}=e,a=$n.useContext(Ur),s=r??a,l=typeof o=="object"&&o.visible!==void 0,[c,u]=(0,p0.useState)(()=>l?o.visible:!1),f=(0,p0.useRef)(null);$n.useEffect(()=>{l&&u(o.visible)},[l,o]);let p=up(f),g=()=>{var O;if(s)return;c&&p();let A=!c;u(A),typeof o=="object"&&((O=o.onVisibleChange)===null||O===void 0||O.call(o,A))},h=O=>{let A=rq[n]||"",F=i(c),M={[A]:g,className:`${O}-icon`,key:"passwordIcon",onMouseDown:H=>{H.preventDefault()},onMouseUp:H=>{H.preventDefault()}};return $n.cloneElement($n.isValidElement(F)?F:$n.createElement("span",null,F),M)},{className:v,prefixCls:y,inputPrefixCls:m,size:d}=e,x=eq(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:b}=$n.useContext(rt),S=b("input",m),w=b("input-password",y),C=o&&h(w),R=(0,uL.default)(w,v,{[`${w}-${d}`]:!!d}),P=Object.assign(Object.assign({},qr(x,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:R,prefixCls:S,suffix:C});return d&&(P.size=d),$n.createElement(Gs,Object.assign({ref:Lr(t,f)},P))}),fL=nq;var Ii=E($());var dL=E(Ne());var oq=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let{prefixCls:r,inputPrefixCls:n,className:o,size:i,suffix:a,enterButton:s=!1,addonAfter:l,loading:c,disabled:u,onSearch:f,onChange:p,onCompositionStart:g,onCompositionEnd:h,variant:v}=e,y=oq(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant"]),{getPrefixCls:m,direction:d}=Ii.useContext(rt),x=Ii.useRef(!1),b=m("input-search",r),S=m("input",n),{compactSize:w}=Xo(b,d),C=ao(q=>{var j;return(j=i??w)!==null&&j!==void 0?j:q}),R=Ii.useRef(null),P=q=>{q?.target&&q.type==="click"&&f&&f(q.target.value,q,{source:"clear"}),p?.(q)},O=q=>{var j;document.activeElement===((j=R.current)===null||j===void 0?void 0:j.input)&&q.preventDefault()},A=q=>{var j,k;f&&f((k=(j=R.current)===null||j===void 0?void 0:j.input)===null||k===void 0?void 0:k.value,q,{source:"input"})},F=q=>{x.current||c||A(q)},M=typeof s=="boolean"?Ii.createElement(Ny,null):null,H=`${b}-button`,L,N=s||{},I=N.type&&N.type.__ANT_BUTTON===!0;I||N.type==="button"?L=Go(N,Object.assign({onMouseDown:O,onClick:q=>{var j,k;(k=(j=N?.props)===null||j===void 0?void 0:j.onClick)===null||k===void 0||k.call(j,q),A(q)},key:"enterButton"},I?{className:H,size:C}:{})):L=Ii.createElement(Ld,{className:H,color:s?"primary":"default",size:C,disabled:u,key:"enterButton",onMouseDown:O,onClick:A,loading:c,icon:M,variant:v==="borderless"||v==="filled"||v==="underlined"?"text":s?"solid":void 0},s),l&&(L=[L,Go(l,{key:"addonAfter"})]);let D=(0,dL.default)(b,{[`${b}-rtl`]:d==="rtl",[`${b}-${C}`]:!!C,[`${b}-with-button`]:!!s},o),U=q=>{x.current=!0,g?.(q)},z=q=>{x.current=!1,h?.(q)},W=Object.assign(Object.assign({},y),{className:D,prefixCls:S,type:"search",size:C,variant:v,onPressEnter:F,onCompositionStart:U,onCompositionEnd:z,addonAfter:L,suffix:a,onChange:P,disabled:u});return Ii.createElement(Gs,Object.assign({ref:Lr(R,t)},W))}),pL=iq;var To=E($()),yL=E($()),mp=E(Ne());var pp=E(Ne());var Qr=E($());var mL=E(Ne());var Cn=E($());var aq=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -496,31 +494,88 @@ html body { top:0 !important; right:0 !important; pointer-events: none !important; -`,Nq=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],pR={},Mn;function Iq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&pR[r])return pR[r];var o=window.getComputedStyle(e),n=o.getPropertyValue("box-sizing")||o.getPropertyValue("-moz-box-sizing")||o.getPropertyValue("-webkit-box-sizing"),i=parseFloat(o.getPropertyValue("padding-bottom"))+parseFloat(o.getPropertyValue("padding-top")),a=parseFloat(o.getPropertyValue("border-bottom-width"))+parseFloat(o.getPropertyValue("border-top-width")),s=Nq.map(function(c){return"".concat(c,":").concat(o.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:n};return t&&r&&(pR[r]=l),l}function mR(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,o=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Mn||(Mn=document.createElement("textarea"),Mn.setAttribute("tab-index","-1"),Mn.setAttribute("aria-hidden","true"),Mn.setAttribute("name","hiddenTextarea"),document.body.appendChild(Mn)),e.getAttribute("wrap")?Mn.setAttribute("wrap",e.getAttribute("wrap")):Mn.removeAttribute("wrap");var n=Iq(e,t),i=n.paddingSize,a=n.borderSize,s=n.boxSizing,l=n.sizingStyle;Mn.setAttribute("style","".concat(l,";").concat(Tq)),Mn.value=e.value||e.placeholder||"";var c=void 0,u=void 0,d,f=Mn.scrollHeight;if(s==="border-box"?f+=a:s==="content-box"&&(f-=i),r!==null||o!==null){Mn.value=" ";var m=Mn.scrollHeight-i;r!==null&&(c=m*r,s==="border-box"&&(c=c+i+a),f=Math.max(c,f)),o!==null&&(u=m*o,s==="border-box"&&(u=u+i+a),d=f>u?"":"hidden",f=Math.min(u,f))}var h={height:f,overflowY:d,resize:"none"};return c&&(h.minHeight=c),u&&(h.maxHeight=u),h}var $q=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],gR=0,hR=1,vR=2,Dq=Ro.forwardRef(function(e,t){var r=e,o=r.prefixCls,n=r.defaultValue,i=r.value,a=r.autoSize,s=r.onResize,l=r.className,c=r.style,u=r.disabled,d=r.onChange,f=r.onInternalAutoSize,m=Ae(r,$q),h=zt(n,{value:i,postState:function(G){return G??""}}),v=B(h,2),y=v[0],g=v[1],p=function(G){g(G.target.value),d?.(G)},x=Ro.useRef();Ro.useImperativeHandle(t,function(){return{textArea:x.current}});var S=Ro.useMemo(function(){return a&&pe(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),b=B(S,2),w=b[0],C=b[1],R=!!a,_=function(){try{if(document.activeElement===x.current){var G=x.current,q=G.selectionStart,oe=G.selectionEnd,Z=G.scrollTop;x.current.setSelectionRange(q,oe),x.current.scrollTop=Z}}catch{}},O=Ro.useState(vR),N=B(O,2),k=N[0],L=N[1],j=Ro.useState(),W=B(j,2),D=W[0],$=W[1],M=function(){L(gR)};yt(function(){R&&M()},[i,w,C,R]),yt(function(){if(k===gR)L(hR);else if(k===hR){var A=mR(x.current,!1,w,C);L(vR),$(A)}else _()},[k]);var V=Ro.useRef(),F=function(){ut.cancel(V.current)},z=function(G){k===vR&&(s?.(G),a&&(F(),V.current=ut(function(){M()})))};Ro.useEffect(function(){return F},[]);var U=R?D:null,H=P(P({},c),U);return(k===gR||k===hR)&&(H.overflowY="hidden",H.overflowX="hidden"),Ro.createElement(un,{onResize:z,disabled:!(a||s)},Ro.createElement("textarea",ee({},m,{ref:x,style:H,className:(0,N3.default)(o,l,T({},"".concat(o,"-disabled"),u)),disabled:u,value:y,onChange:p})))}),yR=Dq;var Aq=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],Mq=Zr.default.forwardRef(function(e,t){var r,o=e.defaultValue,n=e.value,i=e.onFocus,a=e.onBlur,s=e.onChange,l=e.allowClear,c=e.maxLength,u=e.onCompositionStart,d=e.onCompositionEnd,f=e.suffix,m=e.prefixCls,h=m===void 0?"rc-textarea":m,v=e.showCount,y=e.count,g=e.className,p=e.style,x=e.disabled,S=e.hidden,b=e.classNames,w=e.styles,C=e.onResize,R=e.onClear,_=e.onPressEnter,O=e.readOnly,N=e.autoSize,k=e.onKeyDown,L=Ae(e,Aq),j=zt(o,{value:n,defaultValue:o}),W=B(j,2),D=W[0],$=W[1],M=D==null?"":String(D),V=Zr.default.useState(!1),F=B(V,2),z=F[0],U=F[1],H=Zr.default.useRef(!1),A=Zr.default.useState(null),G=B(A,2),q=G[0],oe=G[1],Z=(0,Zr.useRef)(null),X=(0,Zr.useRef)(null),ie=function(){var fe;return(fe=X.current)===null||fe===void 0?void 0:fe.textArea},te=function(){ie().focus()};(0,Zr.useImperativeHandle)(t,function(){var $e;return{resizableTextArea:X.current,focus:te,blur:function(){ie().blur()},nativeElement:(($e=Z.current)===null||$e===void 0?void 0:$e.nativeElement)||ie()}}),(0,Zr.useEffect)(function(){U(function($e){return!x&&$e})},[x]);var K=Zr.default.useState(null),Y=B(K,2),ne=Y[0],Q=Y[1];Zr.default.useEffect(function(){if(ne){var $e;($e=ie()).setSelectionRange.apply($e,se(ne))}},[ne]);var J=Mp(y,v),le=(r=J.max)!==null&&r!==void 0?r:c,ue=Number(le)>0,de=J.strategy(M),ve=!!le&&de>le,ye=function(fe,me){var ze=me;!H.current&&J.exceedFormatter&&J.max&&J.strategy(me)>J.max&&(ze=J.exceedFormatter(me,{max:J.max}),me!==ze&&Q([ie().selectionStart||0,ie().selectionEnd||0])),$(ze),cd(fe.currentTarget,fe,s,ze)},we=function(fe){H.current=!0,u?.(fe)},ce=function(fe){H.current=!1,ye(fe,fe.currentTarget.value),d?.(fe)},ae=function(fe){ye(fe,fe.target.value)},Re=function(fe){fe.key==="Enter"&&_&&_(fe),k?.(fe)},Me=function(fe){U(!0),i?.(fe)},Be=function(fe){U(!1),a?.(fe)},Ie=function(fe){$(""),te(),cd(ie(),fe,s)},Oe=f,be;J.show&&(J.showFormatter?be=J.showFormatter({value:M,count:de,maxLength:le}):be="".concat(de).concat(ue?" / ".concat(le):""),Oe=Zr.default.createElement(Zr.default.Fragment,null,Oe,Zr.default.createElement("span",{className:(0,Hp.default)("".concat(h,"-data-count"),b?.count),style:w?.count},be)));var Ve=function(fe){var me;C?.(fe),(me=ie())!==null&&me!==void 0&&me.style.height&&oe(!0)},He=!N&&!v&&!l;return Zr.default.createElement(dc,{ref:Z,value:M,allowClear:l,handleReset:Ie,suffix:Oe,prefixCls:h,classNames:P(P({},b),{},{affixWrapper:(0,Hp.default)(b?.affixWrapper,T(T({},"".concat(h,"-show-count"),v),"".concat(h,"-textarea-allow-clear"),l))}),disabled:x,focused:z,className:(0,Hp.default)(g,ve&&"".concat(h,"-out-of-range")),style:P(P({},p),q&&!He?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof be=="string"?be:void 0}},hidden:S,readOnly:O,onClear:R},Zr.default.createElement(yR,ee({},L,{autoSize:N,maxLength:c,onKeyDown:Re,onChange:ae,onFocus:Me,onBlur:Be,onCompositionStart:we,onCompositionEnd:ce,className:(0,Hp.default)(b?.textarea),style:P(P({},w?.textarea),{},{resize:p?.resize}),disabled:x,prefixCls:h,onResize:Ve,ref:X,readOnly:O})))}),I3=Mq;var $3=I3;var Lq=e=>{let{componentCls:t,paddingLG:r}=e,o=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[o]:{position:"relative","&-show-count":{[`> ${t}`]:{height:"100%"},[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[` +`,sq=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],OE={},Po;function lq(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&OE[r])return OE[r];var n=window.getComputedStyle(e),o=n.getPropertyValue("box-sizing")||n.getPropertyValue("-moz-box-sizing")||n.getPropertyValue("-webkit-box-sizing"),i=parseFloat(n.getPropertyValue("padding-bottom"))+parseFloat(n.getPropertyValue("padding-top")),a=parseFloat(n.getPropertyValue("border-bottom-width"))+parseFloat(n.getPropertyValue("border-top-width")),s=sq.map(function(c){return"".concat(c,":").concat(n.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:o};return t&&r&&(OE[r]=l),l}function _E(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Po||(Po=document.createElement("textarea"),Po.setAttribute("tab-index","-1"),Po.setAttribute("aria-hidden","true"),Po.setAttribute("name","hiddenTextarea"),document.body.appendChild(Po)),e.getAttribute("wrap")?Po.setAttribute("wrap",e.getAttribute("wrap")):Po.removeAttribute("wrap");var o=lq(e,t),i=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;Po.setAttribute("style","".concat(l,";").concat(aq)),Po.value=e.value||e.placeholder||"";var c=void 0,u=void 0,f,p=Po.scrollHeight;if(s==="border-box"?p+=a:s==="content-box"&&(p-=i),r!==null||n!==null){Po.value=" ";var g=Po.scrollHeight-i;r!==null&&(c=g*r,s==="border-box"&&(c=c+i+a),p=Math.max(c,p)),n!==null&&(u=g*n,s==="border-box"&&(u=u+i+a),f=p>u?"":"hidden",p=Math.min(u,p))}var h={height:p,overflowY:f,resize:"none"};return c&&(h.minHeight=c),u&&(h.maxHeight=u),h}var cq=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],PE=0,TE=1,NE=2,uq=Cn.forwardRef(function(e,t){var r=e,n=r.prefixCls,o=r.defaultValue,i=r.value,a=r.autoSize,s=r.onResize,l=r.className,c=r.style,u=r.disabled,f=r.onChange,p=r.onInternalAutoSize,g=Ve(r,cq),h=ar(o,{value:i,postState:function(V){return V??""}}),v=B(h,2),y=v[0],m=v[1],d=function(V){m(V.target.value),f?.(V)},x=Cn.useRef();Cn.useImperativeHandle(t,function(){return{textArea:x.current}});var b=Cn.useMemo(function(){return a&&ue(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),S=B(b,2),w=S[0],C=S[1],R=!!a,P=function(){try{if(document.activeElement===x.current){var V=x.current,G=V.selectionStart,J=V.selectionEnd,Y=V.scrollTop;x.current.setSelectionRange(G,J),x.current.scrollTop=Y}}catch{}},O=Cn.useState(NE),A=B(O,2),F=A[0],M=A[1],H=Cn.useState(),L=B(H,2),N=L[0],I=L[1],D=function(){M(PE)};vt(function(){R&&D()},[i,w,C,R]),vt(function(){if(F===PE)M(TE);else if(F===TE){var k=_E(x.current,!1,w,C);M(NE),I(k)}else P()},[F]);var U=Cn.useRef(),z=function(){dt.cancel(U.current)},W=function(V){F===NE&&(s?.(V),a&&(z(),U.current=dt(function(){D()})))};Cn.useEffect(function(){return z},[]);var q=R?N:null,j=T(T({},c),q);return(F===PE||F===TE)&&(j.overflowY="hidden",j.overflowX="hidden"),Cn.createElement(ro,{onResize:W,disabled:!(a||s)},Cn.createElement("textarea",fe({},g,{ref:x,style:j,className:(0,mL.default)(n,l,_({},"".concat(n,"-disabled"),u)),disabled:u,value:y,onChange:d})))}),IE=uq;var fq=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],dq=Qr.default.forwardRef(function(e,t){var r,n=e.defaultValue,o=e.value,i=e.onFocus,a=e.onBlur,s=e.onChange,l=e.allowClear,c=e.maxLength,u=e.onCompositionStart,f=e.onCompositionEnd,p=e.suffix,g=e.prefixCls,h=g===void 0?"rc-textarea":g,v=e.showCount,y=e.count,m=e.className,d=e.style,x=e.disabled,b=e.hidden,S=e.classNames,w=e.styles,C=e.onResize,R=e.onClear,P=e.onPressEnter,O=e.readOnly,A=e.autoSize,F=e.onKeyDown,M=Ve(e,fq),H=ar(n,{value:o,defaultValue:n}),L=B(H,2),N=L[0],I=L[1],D=N==null?"":String(N),U=Qr.default.useState(!1),z=B(U,2),W=z[0],q=z[1],j=Qr.default.useRef(!1),k=Qr.default.useState(null),V=B(k,2),G=V[0],J=V[1],Y=(0,Qr.useRef)(null),X=(0,Qr.useRef)(null),ae=function(){var se;return(se=X.current)===null||se===void 0?void 0:se.textArea},Z=function(){ae().focus()};(0,Qr.useImperativeHandle)(t,function(){var ye;return{resizableTextArea:X.current,focus:Z,blur:function(){ae().blur()},nativeElement:((ye=Y.current)===null||ye===void 0?void 0:ye.nativeElement)||ae()}}),(0,Qr.useEffect)(function(){q(function(ye){return!x&&ye})},[x]);var K=Qr.default.useState(null),Q=B(K,2),re=Q[0],ee=Q[1];Qr.default.useEffect(function(){if(re){var ye;(ye=ae()).setSelectionRange.apply(ye,te(re))}},[re]);var ne=cp(y,v),de=(r=ne.max)!==null&&r!==void 0?r:c,le=Number(de)>0,pe=ne.strategy(D),Oe=!!de&&pe>de,Ce=function(se,xe){var _e=xe;!j.current&&ne.exceedFormatter&&ne.max&&ne.strategy(xe)>ne.max&&(_e=ne.exceedFormatter(xe,{max:ne.max}),xe!==_e&&ee([ae().selectionStart||0,ae().selectionEnd||0])),I(_e),Bu(se.currentTarget,se,s,_e)},De=function(se){j.current=!0,u?.(se)},ce=function(se){j.current=!1,Ce(se,se.currentTarget.value),f?.(se)},ie=function(se){Ce(se,se.target.value)},Re=function(se){se.key==="Enter"&&P&&P(se),F?.(se)},Le=function(se){q(!0),i?.(se)},Ge=function(se){q(!1),a?.(se)},Me=function(se){I(""),Z(),Bu(ae(),se,s)},Ie=p,je;ne.show&&(ne.showFormatter?je=ne.showFormatter({value:D,count:pe,maxLength:de}):je="".concat(pe).concat(le?" / ".concat(de):""),Ie=Qr.default.createElement(Qr.default.Fragment,null,Ie,Qr.default.createElement("span",{className:(0,pp.default)("".concat(h,"-data-count"),S?.count),style:w?.count},je)));var We=function(se){var xe;C?.(se),(xe=ae())!==null&&xe!==void 0&&xe.style.height&&J(!0)},He=!A&&!v&&!l;return Qr.default.createElement(ql,{ref:Y,value:D,allowClear:l,handleReset:Me,suffix:Ie,prefixCls:h,classNames:T(T({},S),{},{affixWrapper:(0,pp.default)(S?.affixWrapper,_(_({},"".concat(h,"-show-count"),v),"".concat(h,"-textarea-allow-clear"),l))}),disabled:x,focused:W,className:(0,pp.default)(m,Oe&&"".concat(h,"-out-of-range")),style:T(T({},d),G&&!He?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof je=="string"?je:void 0}},hidden:b,readOnly:O,onClear:R},Qr.default.createElement(IE,fe({},M,{autoSize:A,maxLength:c,onKeyDown:Re,onChange:ie,onFocus:Le,onBlur:Ge,onCompositionStart:De,onCompositionEnd:ce,className:(0,pp.default)(S?.textarea),style:T(T({},w?.textarea),{},{resize:d?.resize}),disabled:x,prefixCls:h,onResize:We,ref:X,readOnly:O})))}),gL=dq;var hL=gL;var pq=e=>{let{componentCls:t,paddingLG:r}=e,n=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[n]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[` &-allow-clear > ${t}, - &-affix-wrapper${o}-has-feedback ${t} - `]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${o}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},D3=Pt(["Input","TextArea"],e=>{let t=rt(e,Ua(e));return[Lq(t)]},Ga,{resetFont:!1});var kq=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{var r;let{prefixCls:o,bordered:n=!0,size:i,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:d,style:f,styles:m,variant:h,showCount:v,onMouseDown:y,onResize:g}=e,p=kq(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:x,direction:S,allowClear:b,autoComplete:w,className:C,style:R,classNames:_,styles:O}=Do("textArea"),N=Ln.useContext(Ur),k=a??N,{status:L,hasFeedback:j,feedbackIcon:W}=Ln.useContext(fo),D=na(L,s),$=Ln.useRef(null);Ln.useImperativeHandle(t,()=>{var J;return{resizableTextArea:(J=$.current)===null||J===void 0?void 0:J.resizableTextArea,focus:le=>{var ue,de;uc((de=(ue=$.current)===null||ue===void 0?void 0:ue.resizableTextArea)===null||de===void 0?void 0:de.textArea,le)},blur:()=>{var le;return(le=$.current)===null||le===void 0?void 0:le.blur()}}});let M=x("input",o),V=Mo(M),[F,z,U]=g0(M,u),[H]=D3(M,V),{compactSize:A,compactItemClassnames:G}=Zn(M,S),q=pn(J=>{var le;return(le=i??A)!==null&&le!==void 0?le:J}),[oe,Z]=ol("textArea",h,n),X=_0(l??b),[ie,te]=Ln.useState(!1),[K,Y]=Ln.useState(!1),ne=J=>{te(!0),y?.(J);let le=()=>{te(!1),document.removeEventListener("mouseup",le)};document.addEventListener("mouseup",le)},Q=J=>{var le,ue;if(g?.(J),ie&&typeof getComputedStyle=="function"){let de=(ue=(le=$.current)===null||le===void 0?void 0:le.nativeElement)===null||ue===void 0?void 0:ue.querySelector("textarea");de&&getComputedStyle(de).resize==="both"&&Y(!0)}};return F(H(Ln.createElement($3,Object.assign({autoComplete:w},p,{style:Object.assign(Object.assign({},R),f),styles:Object.assign(Object.assign({},O),m),disabled:k,allowClear:X,className:(0,Up.default)(U,V,d,u,G,C,K&&`${M}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),_),{textarea:(0,Up.default)({[`${M}-sm`]:q==="small",[`${M}-lg`]:q==="large"},z,c?.textarea,_.textarea,ie&&`${M}-mouse-active`),variant:(0,Up.default)({[`${M}-${oe}`]:Z},oa(M,D)),affixWrapper:(0,Up.default)(`${M}-textarea-affix-wrapper`,{[`${M}-affix-wrapper-rtl`]:S==="rtl",[`${M}-affix-wrapper-sm`]:q==="small",[`${M}-affix-wrapper-lg`]:q==="large",[`${M}-textarea-show-count`]:v||((r=e.count)===null||r===void 0?void 0:r.show)},z)}),prefixCls:M,suffix:j&&Ln.createElement("span",{className:`${M}-textarea-suffix`},W),showCount:v,ref:$,onResize:Q,onMouseDown:ne}))))}),M3=Fq;var bd=nl;bd.Group=x3;bd.Search=T3;bd.TextArea=M3;bd.Password=_3;bd.OTP=w3;var Gp=bd;var Jr=E(I());var ER=E(Ee());var wd=E(I()),U3=E(Ee());var zq=E(I()),Wq=E(Ee());var qp=E(I()),xR={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},bR=function(){var t=(0,qp.useRef)([]),r=(0,qp.useRef)(null);return(0,qp.useEffect)(function(){var o=Date.now(),n=!1;t.current.forEach(function(i){if(i){n=!0;var a=i.style;a.transitionDuration=".3s, .3s, .3s, .06s",r.current&&o-r.current<100&&(a.transitionDuration="0s, 0s")}}),n&&(r.current=Date.now())}),t.current};var Kp=E(I()),j3=E(Ee());var Z0=E(I());var L3=0,Bq=Yt();function jq(){var e;return Bq?(e=L3,L3+=1):e="TEST_OR_SSR",e}var k3=function(e){var t=Z0.useState(),r=B(t,2),o=r[0],n=r[1];return Z0.useEffect(function(){n("rc_progress_".concat(jq()))},[]),e||o};var ci=E(I()),F3=function(t){var r=t.bg,o=t.children;return ci.createElement("div",{style:{width:"100%",height:"100%",background:r}},o)};function z3(e,t){return Object.keys(e).map(function(r){var o=parseFloat(r),n="".concat(Math.floor(o*t),"%");return"".concat(e[r]," ").concat(n)})}var Vq=ci.forwardRef(function(e,t){var r=e.prefixCls,o=e.color,n=e.gradientId,i=e.radius,a=e.style,s=e.ptg,l=e.strokeLinecap,c=e.strokeWidth,u=e.size,d=e.gapDegree,f=o&&pe(o)==="object",m=f?"#FFF":void 0,h=u/2,v=ci.createElement("circle",{className:"".concat(r,"-circle-path"),r:i,cx:h,cy:h,stroke:m,strokeLinecap:l,strokeWidth:c,opacity:s===0?0:1,style:a,ref:t});if(!f)return v;var y="".concat(n,"-conic"),g=d?"".concat(180+d/2,"deg"):"0deg",p=z3(o,(360-d)/360),x=z3(o,1),S="conic-gradient(from ".concat(g,", ").concat(p.join(", "),")"),b="linear-gradient(to ".concat(d?"bottom":"top",", ").concat(x.join(", "),")");return ci.createElement(ci.Fragment,null,ci.createElement("mask",{id:y},v),ci.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(y,")")},ci.createElement(F3,{bg:b},ci.createElement(F3,{bg:S}))))}),W3=Vq;var Sd=100,J0=function(t,r,o,n,i,a,s,l,c,u){var d=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,f=o/100*360*((360-a)/360),m=a===0?0:{bottom:0,top:180,left:90,right:-90}[s],h=(100-n)/100*r;c==="round"&&n!==100&&(h+=u/2,h>=r&&(h=r-.01));var v=Sd/2;return{stroke:typeof l=="string"?l:void 0,strokeDasharray:"".concat(r,"px ").concat(t),strokeDashoffset:h+d,transform:"rotate(".concat(i+f+m,"deg)"),transformOrigin:"".concat(v,"px ").concat(v,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}};var Hq=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function B3(e){var t=e??[];return Array.isArray(t)?t:[t]}var Uq=function(t){var r=P(P({},xR),t),o=r.id,n=r.prefixCls,i=r.steps,a=r.strokeWidth,s=r.trailWidth,l=r.gapDegree,c=l===void 0?0:l,u=r.gapPosition,d=r.trailColor,f=r.strokeLinecap,m=r.style,h=r.className,v=r.strokeColor,y=r.percent,g=Ae(r,Hq),p=Sd/2,x=k3(o),S="".concat(x,"-gradient"),b=p-a/2,w=Math.PI*2*b,C=c>0?90+c/2:-90,R=w*((360-c)/360),_=pe(i)==="object"?i:{count:i,gap:2},O=_.count,N=_.gap,k=B3(y),L=B3(v),j=L.find(function(z){return z&&pe(z)==="object"}),W=j&&pe(j)==="object",D=W?"butt":f,$=J0(w,R,0,100,C,c,u,d,D,a),M=bR(),V=function(){var U=0;return k.map(function(H,A){var G=L[A]||L[L.length-1],q=J0(w,R,U,H,C,c,u,G,D,a);return U+=H,Kp.createElement(W3,{key:A,color:G,ptg:H,radius:b,prefixCls:n,gradientId:S,style:q,strokeLinecap:D,strokeWidth:a,gapDegree:c,ref:function(Z){M[A]=Z},size:Sd})}).reverse()},F=function(){var U=Math.round(O*(k[0]/100)),H=100/O,A=0;return new Array(O).fill(null).map(function(G,q){var oe=q<=U-1?L[0]:d,Z=oe&&pe(oe)==="object"?"url(#".concat(S,")"):void 0,X=J0(w,R,A,H,C,c,u,oe,"butt",a,N);return A+=(R-X.strokeDashoffset+N)*100/R,Kp.createElement("circle",{key:q,className:"".concat(n,"-circle-path"),r:b,cx:p,cy:p,stroke:Z,strokeWidth:a,opacity:1,style:X,ref:function(te){M[q]=te}})})};return Kp.createElement("svg",ee({className:(0,j3.default)("".concat(n,"-circle"),h),viewBox:"0 0 ".concat(Sd," ").concat(Sd),style:m,id:o,role:"presentation"},g),!O&&Kp.createElement("circle",{className:"".concat(n,"-circle-trail"),r:b,cx:p,cy:p,stroke:d,strokeLinecap:D,strokeWidth:s||a,style:$}),O?F():V())},SR=Uq;function fa(e){return!e||e<0?0:e>100?100:e}function Cd(e){let{success:t,successPercent:r}=e,o=r;return t&&"progress"in t&&(o=t.progress),t&&"percent"in t&&(o=t.percent),o}var V3=e=>{let{percent:t,success:r,successPercent:o}=e,n=fa(Cd({success:r,successPercent:o}));return[n,fa(fa(t)-n)]},H3=e=>{let{success:t={},strokeColor:r}=e,{strokeColor:o}=t;return[o||$a.green,r||null]},sl=(e,t,r)=>{var o,n,i,a;let s=-1,l=-1;if(t==="step"){let c=r.steps,u=r.strokeWidth;typeof e=="string"||typeof e>"u"?(s=e==="small"?2:14,l=u??8):typeof e=="number"?[s,l]=[e,e]:[s=14,l=8]=Array.isArray(e)?e:[e.width,e.height],s*=c}else if(t==="line"){let c=r?.strokeWidth;typeof e=="string"||typeof e>"u"?l=c||(e==="small"?6:8):typeof e=="number"?[s,l]=[e,e]:[s=-1,l=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[s,l]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[s,l]=[e,e]:Array.isArray(e)&&(s=(n=(o=e[0])!==null&&o!==void 0?o:e[1])!==null&&n!==void 0?n:120,l=(a=(i=e[0])!==null&&i!==void 0?i:e[1])!==null&&a!==void 0?a:120));return[s,l]};var Gq=3,qq=e=>Gq/e*100,Kq=e=>{let{prefixCls:t,trailColor:r=null,strokeLinecap:o="round",gapPosition:n,gapDegree:i,width:a=120,type:s,children:l,success:c,size:u=a,steps:d}=e,[f,m]=sl(u,"circle"),{strokeWidth:h}=e;h===void 0&&(h=Math.max(qq(f),6));let v={width:f,height:m,fontSize:f*.15+6},y=wd.useMemo(()=>{if(i||i===0)return i;if(s==="dashboard")return 75},[i,s]),g=V3(e),p=n||s==="dashboard"&&"bottom"||void 0,x=Object.prototype.toString.call(e.strokeColor)==="[object Object]",S=H3({success:c,strokeColor:e.strokeColor}),b=(0,U3.default)(`${t}-inner`,{[`${t}-circle-gradient`]:x}),w=wd.createElement(SR,{steps:d,percent:d?g[1]:g,strokeWidth:h,trailWidth:h,strokeColor:d?S[1]:S,strokeLinecap:o,trailColor:r,prefixCls:t,gapDegree:y,gapPosition:p}),C=f<=20,R=wd.createElement("div",{className:b,style:v},w,!C&&l);return C?wd.createElement(Ha,{title:l},R):R},G3=Kq;var Ed=E(I());var X3=E(Ee());var Xp="--progress-line-stroke-color",CR="--progress-percent",q3=e=>{let t=e?"100%":"-100%";return new xt(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Xq=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},Qt(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${Xp})`]},height:"100%",width:`calc(1 / var(${CR}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${re(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:q3(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:q3(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},Yq=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Qq=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},Zq=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}},Jq=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),K3=Pt("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=rt(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Xq(r),Yq(r),Qq(r),Zq(r)]},Jq);var eK=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{let t=[];return Object.keys(e).forEach(r=>{let o=parseFloat(r.replace(/%/g,""));Number.isNaN(o)||t.push({key:o,value:e[r]})}),t=t.sort((r,o)=>r.key-o.key),t.map(r=>{let{key:o,value:n}=r;return`${n} ${o}%`}).join(", ")},rK=(e,t)=>{let{from:r=$a.blue,to:o=$a.blue,direction:n=t==="rtl"?"to left":"to right"}=e,i=eK(e,["from","to","direction"]);if(Object.keys(i).length!==0){let s=tK(i),l=`linear-gradient(${n}, ${s})`;return{background:l,[Xp]:l}}let a=`linear-gradient(${n}, ${r}, ${o})`;return{background:a,[Xp]:a}},oK=e=>{let{prefixCls:t,direction:r,percent:o,size:n,strokeWidth:i,strokeColor:a,strokeLinecap:s="round",children:l,trailColor:c=null,percentPosition:u,success:d}=e,{align:f,type:m}=u,h=a&&typeof a!="string"?rK(a,r):{[Xp]:a,background:a},v=s==="square"||s==="butt"?0:void 0,y=n??[-1,i||(n==="small"?6:8)],[g,p]=sl(y,"line",{strokeWidth:i}),x={backgroundColor:c||void 0,borderRadius:v},S=Object.assign(Object.assign({width:`${fa(o)}%`,height:p,borderRadius:v},h),{[CR]:fa(o)/100}),b=Cd(e),w={width:`${fa(b)}%`,height:p,borderRadius:v,backgroundColor:d?.strokeColor},C={width:g<0?"100%":g},R=Ed.createElement("div",{className:`${t}-inner`,style:x},Ed.createElement("div",{className:(0,X3.default)(`${t}-bg`,`${t}-bg-${m}`),style:S},m==="inner"&&l),b!==void 0&&Ed.createElement("div",{className:`${t}-success-bg`,style:w})),_=m==="outer"&&f==="start",O=m==="outer"&&f==="end";return m==="outer"&&f==="center"?Ed.createElement("div",{className:`${t}-layout-bottom`},R,l):Ed.createElement("div",{className:`${t}-outer`,style:C},_&&l,R,O&&l)},Y3=oK;var wR=E(I()),Q3=E(Ee());var nK=e=>{let{size:t,steps:r,rounding:o=Math.round,percent:n=0,strokeWidth:i=8,strokeColor:a,trailColor:s=null,prefixCls:l,children:c}=e,u=o(r*(n/100)),f=t??[t==="small"?2:14,i],[m,h]=sl(f,"step",{steps:r,strokeWidth:i}),v=m/r,y=Array.from({length:r});for(let g=0;g{let{prefixCls:r,className:o,rootClassName:n,steps:i,strokeColor:a,percent:s=0,size:l="default",showInfo:c=!0,type:u="line",status:d,format:f,style:m,percentPosition:h={}}=e,v=iK(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:y="end",type:g="outer"}=h,p=Array.isArray(a)?a[0]:a,x=typeof a=="string"||Array.isArray(a)?a:void 0,S=Jr.useMemo(()=>{if(p){let V=typeof p=="string"?p:Object.values(p)[0];return new it(V).isLight()}return!1},[a]),b=Jr.useMemo(()=>{var V,F;let z=Cd(e);return parseInt(z!==void 0?(V=z??0)===null||V===void 0?void 0:V.toString():(F=s??0)===null||F===void 0?void 0:F.toString(),10)},[s,e.success,e.successPercent]),w=Jr.useMemo(()=>!aK.includes(d)&&b>=100?"success":d||"normal",[d,b]),{getPrefixCls:C,direction:R,progress:_}=Jr.useContext(at),O=C("progress",r),[N,k,L]=K3(O),j=u==="line",W=j&&!i,D=Jr.useMemo(()=>{if(!c)return null;let V=Cd(e),F,z=f||(H=>`${H}%`),U=j&&S&&g==="inner";return g==="inner"||f||w!=="exception"&&w!=="success"?F=z(fa(s),fa(V)):w==="exception"?F=j?Jr.createElement(Au,null):Jr.createElement(Fa,null):w==="success"&&(F=j?Jr.createElement(M$,null):Jr.createElement(Qy,null)),Jr.createElement("span",{className:(0,ER.default)(`${O}-text`,{[`${O}-text-bright`]:U,[`${O}-text-${y}`]:W,[`${O}-text-${g}`]:W}),title:typeof F=="string"?F:void 0},F)},[c,s,b,w,u,O,f]),$;u==="line"?$=i?Jr.createElement(Z3,Object.assign({},e,{strokeColor:x,prefixCls:O,steps:typeof i=="object"?i.count:i}),D):Jr.createElement(Y3,Object.assign({},e,{strokeColor:p,prefixCls:O,direction:R,percentPosition:{align:y,type:g}}),D):(u==="circle"||u==="dashboard")&&($=Jr.createElement(G3,Object.assign({},e,{strokeColor:p,prefixCls:O,progressStatus:w}),D));let M=(0,ER.default)(O,`${O}-status-${w}`,{[`${O}-${u==="dashboard"&&"circle"||u}`]:u!=="line",[`${O}-inline-circle`]:u==="circle"&&sl(l,"circle")[0]<=20,[`${O}-line`]:W,[`${O}-line-align-${y}`]:W,[`${O}-line-position-${g}`]:W,[`${O}-steps`]:i,[`${O}-show-info`]:c,[`${O}-${l}`]:typeof l=="string",[`${O}-rtl`]:R==="rtl"},_?.className,o,n,k,L);return N(Jr.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},_?.style),m),className:M,role:"progressbar","aria-valuenow":b,"aria-valuemin":0,"aria-valuemax":100},Gr(v,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),$))}),J3=sK;var e4=J3;var ex=E(I());var lK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},t4=lK;var cK=function(t,r){return ex.createElement(mt,ee({},t,{ref:r,icon:t4}))},uK=ex.forwardRef(cK),r4=uK;var tx=E(I());var dK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},o4=dK;var fK=function(t,r){return tx.createElement(mt,ee({},t,{ref:r,icon:o4}))},pK=tx.forwardRef(fK),n4=pK;var rx=E(I());var mK={icon:function(t,r){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:r}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},i4=mK;var gK=function(t,r){return rx.createElement(mt,ee({},t,{ref:r,icon:i4}))},hK=rx.forwardRef(gK),a4=hK;var ox=E(I());var vK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},s4=vK;var yK=function(t,r){return ox.createElement(mt,ee({},t,{ref:r,icon:s4}))},xK=ox.forwardRef(yK),l4=xK;var nx=E(I());var bK={icon:function(t,r){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:r}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:r}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:r}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},c4=bK;var SK=function(t,r){return nx.createElement(mt,ee({},t,{ref:r,icon:c4}))},CK=nx.forwardRef(SK),u4=CK;var ix=E(I());var wK={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},d4=wK;var EK=function(t,r){return ix.createElement(mt,ee({},t,{ref:r,icon:d4}))},RK=ix.forwardRef(EK),RR=RK;var dx=E(I());var xr=E(I()),NR=E(Si()),cx=E(Ee());var sx=E(I());var m4=E(Ee());var Qp=E(I());var ax=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),o=e.name||"",n=e.type||"",i=n.replace(/\/.*$/,"");return r.some(function(a){var s=a.trim();if(/^\*(\/\*)?$/.test(a))return!0;if(s.charAt(0)==="."){var l=o.toLowerCase(),c=s.toLowerCase(),u=[c];return(c===".jpg"||c===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(function(d){return l.endsWith(d)})}return/\/\*$/.test(s)?i===s.replace(/\/.*$/,""):n===s?!0:/^\w+$/.test(s)?(Vt(!1,"Upload takes an invalidate 'accept' type '".concat(s,"'.Skip for check.")),!0):!1})}return!0};function OK(e,t){var r="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),o=new Error(r);return o.status=t.status,o.method=e.method,o.url=e.action,o}function f4(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function OR(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(i){i.total>0&&(i.percent=i.loaded/i.total*100),e.onProgress(i)});var r=new FormData;e.data&&Object.keys(e.data).forEach(function(n){var i=e.data[n];if(Array.isArray(i)){i.forEach(function(a){r.append("".concat(n,"[]"),a)});return}r.append(n,i)}),e.file instanceof Blob?r.append(e.filename,e.file,e.file.name):r.append(e.filename,e.file),t.onerror=function(i){e.onError(i)},t.onload=function(){return t.status<200||t.status>=300?e.onError(OK(e,t),f4(t)):e.onSuccess(f4(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var o=e.headers||{};return o["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(o).forEach(function(n){o[n]!==null&&t.setRequestHeader(n,o[n])}),t.send(r),{abort:function(){t.abort()}}}var _K=function(){var e=lo(Lt().mark(function t(r,o){var n,i,a,s,l,c,u,d;return Lt().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:c=function(){return c=lo(Lt().mark(function v(y){return Lt().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.abrupt("return",new Promise(function(x){y.file(function(S){o(S)?(y.fullPath&&!S.webkitRelativePath&&(Object.defineProperties(S,{webkitRelativePath:{writable:!0}}),S.webkitRelativePath=y.fullPath.replace(/^\//,""),Object.defineProperties(S,{webkitRelativePath:{writable:!1}})),x(S)):x(null)})}));case 1:case"end":return p.stop()}},v)})),c.apply(this,arguments)},l=function(v){return c.apply(this,arguments)},s=function(){return s=lo(Lt().mark(function v(y){var g,p,x,S,b;return Lt().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:g=y.createReader(),p=[];case 2:return C.next=5,new Promise(function(R){g.readEntries(R,function(){return R([])})});case 5:if(x=C.sent,S=x.length,S){C.next=9;break}return C.abrupt("break",12);case 9:for(b=0;b{let{componentCls:t,iconCls:r}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${re(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${re(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[` + &-affix-wrapper${n}-has-feedback ${t} + `]:{paddingInlineEnd:r},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${n}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},vL=Gt(["Input","TextArea"],e=>{let t=ut(e,Ma(e));return[pq(t)]},Fa,{resetFont:!1});var mq=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{var r;let{prefixCls:n,bordered:o=!0,size:i,disabled:a,status:s,allowClear:l,classNames:c,rootClassName:u,className:f,style:p,styles:g,variant:h,showCount:v,onMouseDown:y,onResize:m}=e,d=mq(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]),{getPrefixCls:x,direction:b,allowClear:S,autoComplete:w,className:C,style:R,classNames:P,styles:O}=no("textArea"),A=To.useContext(Ur),F=a??A,{status:M,hasFeedback:H,feedbackIcon:L}=To.useContext(fn),N=Qi(M,s),I=To.useRef(null);To.useImperativeHandle(t,()=>{var ne;return{resizableTextArea:(ne=I.current)===null||ne===void 0?void 0:ne.resizableTextArea,focus:de=>{var le,pe;Ul((pe=(le=I.current)===null||le===void 0?void 0:le.resizableTextArea)===null||pe===void 0?void 0:pe.textArea,de)},blur:()=>{var de;return(de=I.current)===null||de===void 0?void 0:de.blur()}}});let D=x("input",n),U=Ko(D),[z,W,q]=Vy(D,u),[j]=vL(D,U),{compactSize:k,compactItemClassnames:V}=Xo(D,b),G=ao(ne=>{var de;return(de=i??k)!==null&&de!==void 0?de:ne}),[J,Y]=qs("textArea",h,o),X=t0(l??S),[ae,Z]=To.useState(!1),[K,Q]=To.useState(!1),re=ne=>{Z(!0),y?.(ne);let de=()=>{Z(!1),document.removeEventListener("mouseup",de)};document.addEventListener("mouseup",de)},ee=ne=>{var de,le;if(m?.(ne),ae&&typeof getComputedStyle=="function"){let pe=(le=(de=I.current)===null||de===void 0?void 0:de.nativeElement)===null||le===void 0?void 0:le.querySelector("textarea");pe&&getComputedStyle(pe).resize==="both"&&Q(!0)}};return z(j(To.createElement(hL,Object.assign({autoComplete:w},d,{style:Object.assign(Object.assign({},R),p),styles:Object.assign(Object.assign({},O),g),disabled:F,allowClear:X,className:(0,mp.default)(q,U,f,u,V,C,K&&`${D}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),P),{textarea:(0,mp.default)({[`${D}-sm`]:G==="small",[`${D}-lg`]:G==="large"},W,c?.textarea,P.textarea,ae&&`${D}-mouse-active`),variant:(0,mp.default)({[`${D}-${J}`]:Y},Yi(D,N)),affixWrapper:(0,mp.default)(`${D}-textarea-affix-wrapper`,{[`${D}-affix-wrapper-rtl`]:b==="rtl",[`${D}-affix-wrapper-sm`]:G==="small",[`${D}-affix-wrapper-lg`]:G==="large",[`${D}-textarea-show-count`]:v||((r=e.count)===null||r===void 0?void 0:r.show)},W)}),prefixCls:D,suffix:H&&To.createElement("span",{className:`${D}-textarea-suffix`},L),showCount:v,ref:I,onResize:ee,onMouseDown:re}))))}),xL=gq;var Gu=Gs;Gu.Group=rL;Gu.Search=pL;Gu.TextArea=xL;Gu.Password=fL;Gu.OTP=sL;var gp=Gu;var Jr=E($());var FE=E(Ne());var Yu=E($()),TL=E(Ne());var hq=E($()),vq=E(Ne());var hp=E($()),$E={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},DE=function(){var t=(0,hp.useRef)([]),r=(0,hp.useRef)(null);return(0,hp.useEffect)(function(){var n=Date.now(),o=!1;t.current.forEach(function(i){if(i){o=!0;var a=i.style;a.transitionDuration=".3s, .3s, .3s, .06s",r.current&&n-r.current<100&&(a.transitionDuration="0s, 0s")}}),o&&(r.current=Date.now())}),t.current};var vp=E($()),OL=E(Ne());var m0=E($());var bL=0,yq=Yt();function xq(){var e;return yq?(e=bL,bL+=1):e="TEST_OR_SSR",e}var SL=function(e){var t=m0.useState(),r=B(t,2),n=r[0],o=r[1];return m0.useEffect(function(){o("rc_progress_".concat(xq()))},[]),e||n};var si=E($()),CL=function(t){var r=t.bg,n=t.children;return si.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function wL(e,t){return Object.keys(e).map(function(r){var n=parseFloat(r),o="".concat(Math.floor(n*t),"%");return"".concat(e[r]," ").concat(o)})}var bq=si.forwardRef(function(e,t){var r=e.prefixCls,n=e.color,o=e.gradientId,i=e.radius,a=e.style,s=e.ptg,l=e.strokeLinecap,c=e.strokeWidth,u=e.size,f=e.gapDegree,p=n&&ue(n)==="object",g=p?"#FFF":void 0,h=u/2,v=si.createElement("circle",{className:"".concat(r,"-circle-path"),r:i,cx:h,cy:h,stroke:g,strokeLinecap:l,strokeWidth:c,opacity:s===0?0:1,style:a,ref:t});if(!p)return v;var y="".concat(o,"-conic"),m=f?"".concat(180+f/2,"deg"):"0deg",d=wL(n,(360-f)/360),x=wL(n,1),b="conic-gradient(from ".concat(m,", ").concat(d.join(", "),")"),S="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(x.join(", "),")");return si.createElement(si.Fragment,null,si.createElement("mask",{id:y},v),si.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(y,")")},si.createElement(CL,{bg:S},si.createElement(CL,{bg:b}))))}),EL=bq;var Ku=100,g0=function(t,r,n,o,i,a,s,l,c,u){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,p=n/100*360*((360-a)/360),g=a===0?0:{bottom:0,top:180,left:90,right:-90}[s],h=(100-o)/100*r;c==="round"&&o!==100&&(h+=u/2,h>=r&&(h=r-.01));var v=Ku/2;return{stroke:typeof l=="string"?l:void 0,strokeDasharray:"".concat(r,"px ").concat(t),strokeDashoffset:h+f,transform:"rotate(".concat(i+p+g,"deg)"),transformOrigin:"".concat(v,"px ").concat(v,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}};var Sq=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function RL(e){var t=e??[];return Array.isArray(t)?t:[t]}var Cq=function(t){var r=T(T({},$E),t),n=r.id,o=r.prefixCls,i=r.steps,a=r.strokeWidth,s=r.trailWidth,l=r.gapDegree,c=l===void 0?0:l,u=r.gapPosition,f=r.trailColor,p=r.strokeLinecap,g=r.style,h=r.className,v=r.strokeColor,y=r.percent,m=Ve(r,Sq),d=Ku/2,x=SL(n),b="".concat(x,"-gradient"),S=d-a/2,w=Math.PI*2*S,C=c>0?90+c/2:-90,R=w*((360-c)/360),P=ue(i)==="object"?i:{count:i,gap:2},O=P.count,A=P.gap,F=RL(y),M=RL(v),H=M.find(function(W){return W&&ue(W)==="object"}),L=H&&ue(H)==="object",N=L?"butt":p,I=g0(w,R,0,100,C,c,u,f,N,a),D=DE(),U=function(){var q=0;return F.map(function(j,k){var V=M[k]||M[M.length-1],G=g0(w,R,q,j,C,c,u,V,N,a);return q+=j,vp.createElement(EL,{key:k,color:V,ptg:j,radius:S,prefixCls:o,gradientId:b,style:G,strokeLinecap:N,strokeWidth:a,gapDegree:c,ref:function(Y){D[k]=Y},size:Ku})}).reverse()},z=function(){var q=Math.round(O*(F[0]/100)),j=100/O,k=0;return new Array(O).fill(null).map(function(V,G){var J=G<=q-1?M[0]:f,Y=J&&ue(J)==="object"?"url(#".concat(b,")"):void 0,X=g0(w,R,k,j,C,c,u,J,"butt",a,A);return k+=(R-X.strokeDashoffset+A)*100/R,vp.createElement("circle",{key:G,className:"".concat(o,"-circle-path"),r:S,cx:d,cy:d,stroke:Y,strokeWidth:a,opacity:1,style:X,ref:function(Z){D[G]=Z}})})};return vp.createElement("svg",fe({className:(0,OL.default)("".concat(o,"-circle"),h),viewBox:"0 0 ".concat(Ku," ").concat(Ku),style:g,id:n,role:"presentation"},m),!O&&vp.createElement("circle",{className:"".concat(o,"-circle-trail"),r:S,cx:d,cy:d,stroke:f,strokeLinecap:N,strokeWidth:s||a,style:I}),O?z():U())},AE=Cq;function na(e){return!e||e<0?0:e>100?100:e}function Xu({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}var _L=({percent:e,success:t,successPercent:r})=>{let n=na(Xu({success:t,successPercent:r}));return[n,na(na(e)-n)]},PL=({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||Ea.green,t||null]},Ks=(e,t,r)=>{var n,o,i,a;let s=-1,l=-1;if(t==="step"){let c=r.steps,u=r.strokeWidth;typeof e=="string"||typeof e>"u"?(s=e==="small"?2:14,l=u??8):typeof e=="number"?[s,l]=[e,e]:[s=14,l=8]=Array.isArray(e)?e:[e.width,e.height],s*=c}else if(t==="line"){let c=r?.strokeWidth;typeof e=="string"||typeof e>"u"?l=c||(e==="small"?6:8):typeof e=="number"?[s,l]=[e,e]:[s=-1,l=8]=Array.isArray(e)?e:[e.width,e.height]}else(t==="circle"||t==="dashboard")&&(typeof e=="string"||typeof e>"u"?[s,l]=e==="small"?[60,60]:[120,120]:typeof e=="number"?[s,l]=[e,e]:Array.isArray(e)&&(s=(o=(n=e[0])!==null&&n!==void 0?n:e[1])!==null&&o!==void 0?o:120,l=(a=(i=e[0])!==null&&i!==void 0?i:e[1])!==null&&a!==void 0?a:120));return[s,l]};var wq=3,Eq=e=>wq/e*100,Rq=e=>{let{prefixCls:t,trailColor:r=null,strokeLinecap:n="round",gapPosition:o,gapDegree:i,width:a=120,type:s,children:l,success:c,size:u=a,steps:f}=e,[p,g]=Ks(u,"circle"),{strokeWidth:h}=e;h===void 0&&(h=Math.max(Eq(p),6));let v={width:p,height:g,fontSize:p*.15+6},y=Yu.useMemo(()=>{if(i||i===0)return i;if(s==="dashboard")return 75},[i,s]),m=_L(e),d=o||s==="dashboard"&&"bottom"||void 0,x=Object.prototype.toString.call(e.strokeColor)==="[object Object]",b=PL({success:c,strokeColor:e.strokeColor}),S=(0,TL.default)(`${t}-inner`,{[`${t}-circle-gradient`]:x}),w=Yu.createElement(AE,{steps:f,percent:f?m[1]:m,strokeWidth:h,trailWidth:h,strokeColor:f?b[1]:b,strokeLinecap:n,trailColor:r,prefixCls:t,gapDegree:y,gapPosition:d}),C=p<=20,R=Yu.createElement("div",{className:S,style:v},w,!C&&l);return C?Yu.createElement(ka,{title:l},R):R},NL=Rq;var Qu=E($());var DL=E(Ne());var yp="--progress-line-stroke-color",kE="--progress-percent",IL=e=>{let t=e?"100%":"-100%";return new yt(`antProgress${e?"RTL":"LTR"}Active`,{"0%":{transform:`translateX(${t}) scaleX(0)`,opacity:.1},"20%":{transform:`translateX(${t}) scaleX(0)`,opacity:.5},to:{transform:"translateX(0) scaleX(1)",opacity:0}})},Oq=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:Object.assign(Object.assign({},sr(e)),{display:"inline-block","&-rtl":{direction:"rtl"},"&-line":{position:"relative",width:"100%",fontSize:e.fontSize},[`${t}-outer`]:{display:"inline-flex",alignItems:"center",width:"100%"},[`${t}-inner`]:{position:"relative",display:"inline-block",width:"100%",flex:1,overflow:"hidden",verticalAlign:"middle",backgroundColor:e.remainingColor,borderRadius:e.lineBorderRadius},[`${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.defaultColor}},[`${t}-success-bg, ${t}-bg`]:{position:"relative",background:e.defaultColor,borderRadius:e.lineBorderRadius,transition:`all ${e.motionDurationSlow} ${e.motionEaseInOutCirc}`},[`${t}-layout-bottom`]:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",[`${t}-text`]:{width:"max-content",marginInlineStart:0,marginTop:e.marginXXS}},[`${t}-bg`]:{overflow:"hidden","&::after":{content:'""',background:{_multi_value_:!0,value:["inherit",`var(${yp})`]},height:"100%",width:`calc(1 / var(${kE}) * 100%)`,display:"block"},[`&${t}-bg-inner`]:{minWidth:"max-content","&::after":{content:"none"},[`${t}-text-inner`]:{color:e.colorWhite,[`&${t}-text-bright`]:{color:"rgba(0, 0, 0, 0.45)"}}}},[`${t}-success-bg`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,backgroundColor:e.colorSuccess},[`${t}-text`]:{display:"inline-block",marginInlineStart:e.marginXS,color:e.colorText,lineHeight:1,width:"2em",whiteSpace:"nowrap",textAlign:"start",verticalAlign:"middle",wordBreak:"normal",[r]:{fontSize:e.fontSize},[`&${t}-text-outer`]:{width:"max-content"},[`&${t}-text-outer${t}-text-start`]:{width:"max-content",marginInlineStart:0,marginInlineEnd:e.marginXS}},[`${t}-text-inner`]:{display:"flex",justifyContent:"center",alignItems:"center",width:"100%",height:"100%",marginInlineStart:0,padding:`0 ${oe(e.paddingXXS)}`,[`&${t}-text-start`]:{justifyContent:"start"},[`&${t}-text-end`]:{justifyContent:"end"}},[`&${t}-status-active`]:{[`${t}-bg::before`]:{position:"absolute",inset:0,backgroundColor:e.colorBgContainer,borderRadius:e.lineBorderRadius,opacity:0,animationName:IL(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:IL(!0)}},[`&${t}-status-exception`]:{[`${t}-bg`]:{backgroundColor:e.colorError},[`${t}-text`]:{color:e.colorError}},[`&${t}-status-exception ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorError}},[`&${t}-status-success`]:{[`${t}-bg`]:{backgroundColor:e.colorSuccess},[`${t}-text`]:{color:e.colorSuccess}},[`&${t}-status-success ${t}-inner:not(${t}-circle-gradient)`]:{[`${t}-circle-path`]:{stroke:e.colorSuccess}}})}},_q=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-circle-trail`]:{stroke:e.remainingColor},[`&${t}-circle ${t}-inner`]:{position:"relative",lineHeight:1,backgroundColor:"transparent"},[`&${t}-circle ${t}-text`]:{position:"absolute",insetBlockStart:"50%",insetInlineStart:0,width:"100%",margin:0,padding:0,color:e.circleTextColor,fontSize:e.circleTextFontSize,lineHeight:1,whiteSpace:"normal",textAlign:"center",transform:"translateY(-50%)",[r]:{fontSize:e.circleIconFontSize}},[`${t}-circle&-status-exception`]:{[`${t}-text`]:{color:e.colorError}},[`${t}-circle&-status-success`]:{[`${t}-text`]:{color:e.colorSuccess}}},[`${t}-inline-circle`]:{lineHeight:1,[`${t}-inner`]:{verticalAlign:"bottom"}}}},Pq=e=>{let{componentCls:t}=e;return{[t]:{[`${t}-steps`]:{display:"inline-block","&-outer":{display:"flex",flexDirection:"row",alignItems:"center"},"&-item":{flexShrink:0,minWidth:e.progressStepMinWidth,marginInlineEnd:e.progressStepMarginInlineEnd,backgroundColor:e.remainingColor,transition:`all ${e.motionDurationSlow}`,"&-active":{backgroundColor:e.defaultColor}}}}}},Tq=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}},Nq=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),$L=Gt("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=ut(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Oq(r),_q(r),Pq(r),Tq(r)]},Nq);var Iq=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{let t=[];return Object.keys(e).forEach(r=>{let n=parseFloat(r.replace(/%/g,""));Number.isNaN(n)||t.push({key:n,value:e[r]})}),t=t.sort((r,n)=>r.key-n.key),t.map(({key:r,value:n})=>`${n} ${r}%`).join(", ")},Dq=(e,t)=>{let{from:r=Ea.blue,to:n=Ea.blue,direction:o=t==="rtl"?"to left":"to right"}=e,i=Iq(e,["from","to","direction"]);if(Object.keys(i).length!==0){let s=$q(i),l=`linear-gradient(${o}, ${s})`;return{background:l,[yp]:l}}let a=`linear-gradient(${o}, ${r}, ${n})`;return{background:a,[yp]:a}},Aq=e=>{let{prefixCls:t,direction:r,percent:n,size:o,strokeWidth:i,strokeColor:a,strokeLinecap:s="round",children:l,trailColor:c=null,percentPosition:u,success:f}=e,{align:p,type:g}=u,h=a&&typeof a!="string"?Dq(a,r):{[yp]:a,background:a},v=s==="square"||s==="butt"?0:void 0,y=o??[-1,i||(o==="small"?6:8)],[m,d]=Ks(y,"line",{strokeWidth:i}),x={backgroundColor:c||void 0,borderRadius:v},b=Object.assign(Object.assign({width:`${na(n)}%`,height:d,borderRadius:v},h),{[kE]:na(n)/100}),S=Xu(e),w={width:`${na(S)}%`,height:d,borderRadius:v,backgroundColor:f?.strokeColor},C={width:m<0?"100%":m},R=Qu.createElement("div",{className:`${t}-inner`,style:x},Qu.createElement("div",{className:(0,DL.default)(`${t}-bg`,`${t}-bg-${g}`),style:b},g==="inner"&&l),S!==void 0&&Qu.createElement("div",{className:`${t}-success-bg`,style:w})),P=g==="outer"&&p==="start",O=g==="outer"&&p==="end";return g==="outer"&&p==="center"?Qu.createElement("div",{className:`${t}-layout-bottom`},R,l):Qu.createElement("div",{className:`${t}-outer`,style:C},P&&l,R,O&&l)},AL=Aq;var ME=E($()),kL=E(Ne());var kq=e=>{let{size:t,steps:r,rounding:n=Math.round,percent:o=0,strokeWidth:i=8,strokeColor:a,trailColor:s=null,prefixCls:l,children:c}=e,u=n(r*(o/100)),p=t??[t==="small"?2:14,i],[g,h]=Ks(p,"step",{steps:r,strokeWidth:i}),v=g/r,y=Array.from({length:r});for(let m=0;m{let{prefixCls:r,className:n,rootClassName:o,steps:i,strokeColor:a,percent:s=0,size:l="default",showInfo:c=!0,type:u="line",status:f,format:p,style:g,percentPosition:h={}}=e,v=Mq(e,["prefixCls","className","rootClassName","steps","strokeColor","percent","size","showInfo","type","status","format","style","percentPosition"]),{align:y="end",type:m="outer"}=h,d=Array.isArray(a)?a[0]:a,x=typeof a=="string"||Array.isArray(a)?a:void 0,b=Jr.useMemo(()=>{if(d){let U=typeof d=="string"?d:Object.values(d)[0];return new gt(U).isLight()}return!1},[a]),S=Jr.useMemo(()=>{var U,z;let W=Xu(e);return parseInt(W!==void 0?(U=W??0)===null||U===void 0?void 0:U.toString():(z=s??0)===null||z===void 0?void 0:z.toString(),10)},[s,e.success,e.successPercent]),w=Jr.useMemo(()=>!Fq.includes(f)&&S>=100?"success":f||"normal",[f,S]),{getPrefixCls:C,direction:R,progress:P}=Jr.useContext(rt),O=C("progress",r),[A,F,M]=$L(O),H=u==="line",L=H&&!i,N=Jr.useMemo(()=>{if(!c)return null;let U=Xu(e),z,W=p||(j=>`${j}%`),q=H&&b&&m==="inner";return m==="inner"||p||w!=="exception"&&w!=="success"?z=W(na(s),na(U)):w==="exception"?z=H?Jr.createElement(mu,null):Jr.createElement(gv,null):w==="success"&&(z=H?Jr.createElement(c$,null):Jr.createElement(Oy,null)),Jr.createElement("span",{className:(0,FE.default)(`${O}-text`,{[`${O}-text-bright`]:q,[`${O}-text-${y}`]:L,[`${O}-text-${m}`]:L}),title:typeof z=="string"?z:void 0},z)},[c,s,S,w,u,O,p]),I;u==="line"?I=i?Jr.createElement(ML,Object.assign({},e,{strokeColor:x,prefixCls:O,steps:typeof i=="object"?i.count:i}),N):Jr.createElement(AL,Object.assign({},e,{strokeColor:d,prefixCls:O,direction:R,percentPosition:{align:y,type:m}}),N):(u==="circle"||u==="dashboard")&&(I=Jr.createElement(NL,Object.assign({},e,{strokeColor:d,prefixCls:O,progressStatus:w}),N));let D=(0,FE.default)(O,`${O}-status-${w}`,{[`${O}-${u==="dashboard"&&"circle"||u}`]:u!=="line",[`${O}-inline-circle`]:u==="circle"&&Ks(l,"circle")[0]<=20,[`${O}-line`]:L,[`${O}-line-align-${y}`]:L,[`${O}-line-position-${m}`]:L,[`${O}-steps`]:i,[`${O}-show-info`]:c,[`${O}-${l}`]:typeof l=="string",[`${O}-rtl`]:R==="rtl"},P?.className,n,o,F,M);return A(Jr.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},P?.style),g),className:D,role:"progressbar","aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":100},qr(v,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),I))}),FL=Lq;var LL=FL;var h0=E($());var zq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"},zL=zq;var Wq=function(t,r){return h0.createElement(zt,fe({},t,{ref:r,icon:zL}))},Bq=h0.forwardRef(Wq),WL=Bq;var v0=E($());var jq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},BL=jq;var Vq=function(t,r){return v0.createElement(zt,fe({},t,{ref:r,icon:BL}))},Hq=v0.forwardRef(Vq),jL=Hq;var y0=E($());var Uq={icon:function(t,r){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:r}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},VL=Uq;var qq=function(t,r){return y0.createElement(zt,fe({},t,{ref:r,icon:VL}))},Gq=y0.forwardRef(qq),HL=Gq;var x0=E($());var Kq={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},UL=Kq;var Xq=function(t,r){return x0.createElement(zt,fe({},t,{ref:r,icon:UL}))},Yq=x0.forwardRef(Xq),qL=Yq;var b0=E($());var Qq={icon:function(t,r){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:r}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:r}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:r}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},GL=Qq;var Jq=function(t,r){return b0.createElement(zt,fe({},t,{ref:r,icon:GL}))},Zq=b0.forwardRef(Jq),KL=Zq;var eG={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},XL=eG;var O0=E($());var br=E($()),jE=E(Vi()),E0=E(Ne());var C0=E($());var JL=E(Ne());var bp=E($());var S0=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),n=e.name||"",o=e.type||"",i=o.replace(/\/.*$/,"");return r.some(function(a){var s=a.trim();if(/^\*(\/\*)?$/.test(a))return!0;if(s.charAt(0)==="."){var l=n.toLowerCase(),c=s.toLowerCase(),u=[c];return(c===".jpg"||c===".jpeg")&&(u=[".jpg",".jpeg"]),u.some(function(f){return l.endsWith(f)})}return/\/\*$/.test(s)?i===s.replace(/\/.*$/,""):o===s?!0:/^\w+$/.test(s)?(Vt(!1,"Upload takes an invalidate 'accept' type '".concat(s,"'.Skip for check.")),!0):!1})}return!0};function tG(e,t){var r="cannot ".concat(e.method," ").concat(e.action," ").concat(t.status,"'"),n=new Error(r);return n.status=t.status,n.method=e.method,n.url=e.action,n}function YL(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function LE(e){var t=new XMLHttpRequest;e.onProgress&&t.upload&&(t.upload.onprogress=function(i){i.total>0&&(i.percent=i.loaded/i.total*100),e.onProgress(i)});var r=new FormData;e.data&&Object.keys(e.data).forEach(function(o){var i=e.data[o];if(Array.isArray(i)){i.forEach(function(a){r.append("".concat(o,"[]"),a)});return}r.append(o,i)}),e.file instanceof Blob?r.append(e.filename,e.file,e.file.name):r.append(e.filename,e.file),t.onerror=function(i){e.onError(i)},t.onload=function(){return t.status<200||t.status>=300?e.onError(tG(e,t),YL(t)):e.onSuccess(YL(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var n=e.headers||{};return n["X-Requested-With"]!==null&&t.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(n).forEach(function(o){n[o]!==null&&t.setRequestHeader(o,n[o])}),t.send(r),{abort:function(){t.abort()}}}var rG=function(){var e=ln(kt().mark(function t(r,n){var o,i,a,s,l,c,u,f;return kt().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:c=function(){return c=ln(kt().mark(function v(y){return kt().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:return d.abrupt("return",new Promise(function(x){y.file(function(b){n(b)?(y.fullPath&&!b.webkitRelativePath&&(Object.defineProperties(b,{webkitRelativePath:{writable:!0}}),b.webkitRelativePath=y.fullPath.replace(/^\//,""),Object.defineProperties(b,{webkitRelativePath:{writable:!1}})),x(b)):x(null)})}));case 1:case"end":return d.stop()}},v)})),c.apply(this,arguments)},l=function(v){return c.apply(this,arguments)},s=function(){return s=ln(kt().mark(function v(y){var m,d,x,b,S;return kt().wrap(function(C){for(;;)switch(C.prev=C.next){case 0:m=y.createReader(),d=[];case 2:return C.next=5,new Promise(function(R){m.readEntries(R,function(){return R([])})});case 5:if(x=C.sent,b=x.length,b){C.next=9;break}return C.abrupt("break",12);case 9:for(S=0;S{let{componentCls:t,iconCls:r}=e;return{[`${t}-wrapper`]:{[`${t}-drag`]:{position:"relative",width:"100%",height:"100%",textAlign:"center",background:e.colorFillAlter,border:`${oe(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[t]:{padding:e.padding},[`${t}-btn`]:{display:"table",width:"100%",height:"100%",outline:"none",borderRadius:e.borderRadiusLG,"&:focus-visible":{outline:`${oe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`}},[`${t}-drag-container`]:{display:"table-cell",verticalAlign:"middle"},[` &:not(${t}-disabled):hover, &-hover:not(${t}-disabled) - `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[r]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${re(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${r}, + `]:{borderColor:e.colorPrimaryHover},[`p${t}-drag-icon`]:{marginBottom:e.margin,[r]:{color:e.colorPrimary,fontSize:e.uploadThumbnailSize}},[`p${t}-text`]:{margin:`0 0 ${oe(e.marginXXS)}`,color:e.colorTextHeading,fontSize:e.fontSizeLG},[`p${t}-hint`]:{color:e.colorTextDescription,fontSize:e.fontSize},[`&${t}-disabled`]:{[`p${t}-drag-icon ${r}, p${t}-text, p${t}-hint - `]:{color:e.colorTextDisabled}}}}}},y4=$K;var DK=e=>{let{componentCls:t,iconCls:r,fontSize:o,lineHeight:n,calc:i}=e,a=`${t}-list-item`,s=`${a}-actions`,l=`${a}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},$u()),{lineHeight:e.lineHeight,[a]:{position:"relative",height:i(e.lineHeight).mul(o).equal(),marginTop:e.marginXS,fontSize:o,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${a}-name`]:Object.assign(Object.assign({},Ni),{padding:`0 ${re(e.paddingXS)}`,lineHeight:n,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[s]:{whiteSpace:"nowrap",[l]:{opacity:0},[r]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[` + `]:{color:e.colorTextDisabled}}}}}},r3=sG;var lG=e=>{let{componentCls:t,iconCls:r,fontSize:n,lineHeight:o,calc:i}=e,a=`${t}-list-item`,s=`${a}-actions`,l=`${a}-action`;return{[`${t}-wrapper`]:{[`${t}-list`]:Object.assign(Object.assign({},du()),{lineHeight:e.lineHeight,[a]:{position:"relative",height:i(e.lineHeight).mul(n).equal(),marginTop:e.marginXS,fontSize:n,display:"flex",alignItems:"center",transition:`background-color ${e.motionDurationSlow}`,borderRadius:e.borderRadiusSM,"&:hover":{backgroundColor:e.controlItemBgHover},[`${a}-name`]:Object.assign(Object.assign({},Oa),{padding:`0 ${oe(e.paddingXS)}`,lineHeight:o,flex:"auto",transition:`all ${e.motionDurationSlow}`}),[s]:{whiteSpace:"nowrap",[l]:{opacity:0},[r]:{color:e.actionsColor,transition:`all ${e.motionDurationSlow}`},[` ${l}:focus-visible, &.picture ${l} - `]:{opacity:1}},[`${t}-icon ${r}`]:{color:e.colorTextDescription,fontSize:o},[`${a}-progress`]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:i(o).add(e.paddingXS).equal(),fontSize:o,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${a}:hover ${l}`]:{opacity:1},[`${a}-error`]:{color:e.colorError,[`${a}-name, ${t}-icon ${r}`]:{color:e.colorError},[s]:{[`${r}, ${r}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},x4=DK;var AK=e=>{let{componentCls:t}=e,r=new xt("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),o=new xt("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),n=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${n}-appear, ${n}-enter, ${n}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${n}-appear, ${n}-enter`]:{animationName:r},[`${n}-leave`]:{animationName:o}}},{[`${t}-wrapper`]:Yl(e)},r,o]},b4=AK;var S4=e=>{let{componentCls:t,iconCls:r,uploadThumbnailSize:o,uploadProgressOffset:n,calc:i}=e,a=`${t}-list`,s=`${a}-item`;return{[`${t}-wrapper`]:{[` + `]:{opacity:1}},[`${t}-icon ${r}`]:{color:e.colorIcon,fontSize:n},[`${a}-progress`]:{position:"absolute",bottom:e.calc(e.uploadProgressOffset).mul(-1).equal(),width:"100%",paddingInlineStart:i(n).add(e.paddingXS).equal(),fontSize:n,lineHeight:0,pointerEvents:"none","> div":{margin:0}}},[`${a}:hover ${l}`]:{opacity:1},[`${a}-error`]:{color:e.colorError,[`${a}-name, ${t}-icon ${r}`]:{color:e.colorError},[s]:{[`${r}, ${r}:hover`]:{color:e.colorError},[l]:{opacity:1}}},[`${t}-list-item-container`]:{transition:`opacity ${e.motionDurationSlow}, height ${e.motionDurationSlow}`,"&::before":{display:"table",width:0,height:0,content:'""'}}})}}},n3=lG;var cG=e=>{let{componentCls:t}=e,r=new yt("uploadAnimateInlineIn",{from:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),n=new yt("uploadAnimateInlineOut",{to:{width:0,height:0,padding:0,opacity:0,margin:e.calc(e.marginXS).div(-2).equal()}}),o=`${t}-animate-inline`;return[{[`${t}-wrapper`]:{[`${o}-appear, ${o}-enter, ${o}-leave`]:{animationDuration:e.motionDurationSlow,animationTimingFunction:e.motionEaseInOutCirc,animationFillMode:"forwards"},[`${o}-appear, ${o}-enter`]:{animationName:r},[`${o}-leave`]:{animationName:n}}},{[`${t}-wrapper`]:Tw(e)},r,n]},o3=cG;var i3=e=>{let{componentCls:t,iconCls:r,uploadThumbnailSize:n,uploadProgressOffset:o,calc:i}=e,a=`${t}-list`,s=`${a}-item`;return{[`${t}-wrapper`]:{[` ${a}${a}-picture, ${a}${a}-picture-card, ${a}${a}-picture-circle - `]:{[s]:{position:"relative",height:i(o).add(i(e.lineWidth).mul(2)).add(i(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${re(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${s}-thumbnail`]:Object.assign(Object.assign({},Ni),{width:o,height:o,lineHeight:re(i(o).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[r]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${s}-progress`]:{bottom:n,width:`calc(100% - ${re(i(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:i(o).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${r}`]:{[`svg path[fill='${zs[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${zs.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:"dashed",[`${s}-name`]:{marginBottom:n}}},[`${a}${a}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:"50%"}}}}},C4=e=>{let{componentCls:t,iconCls:r,fontSizeLG:o,colorTextLightSolid:n,calc:i}=e,a=`${t}-list`,s=`${a}-item`,l=e.uploadPicCardSize;return{[` + `]:{[s]:{position:"relative",height:i(n).add(i(e.lineWidth).mul(2)).add(i(e.paddingXS).mul(2)).equal(),padding:e.paddingXS,border:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusLG,"&:hover":{background:"transparent"},[`${s}-thumbnail`]:Object.assign(Object.assign({},Oa),{width:n,height:n,lineHeight:oe(i(n).add(e.paddingSM).equal()),textAlign:"center",flex:"none",[r]:{fontSize:e.fontSizeHeading2,color:e.colorPrimary},img:{display:"block",width:"100%",height:"100%",overflow:"hidden"}}),[`${s}-progress`]:{bottom:o,width:`calc(100% - ${oe(i(e.paddingSM).mul(2).equal())})`,marginTop:0,paddingInlineStart:i(n).add(e.paddingXS).equal()}},[`${s}-error`]:{borderColor:e.colorError,[`${s}-thumbnail ${r}`]:{[`svg path[fill='${Ts[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${Ts.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:"dashed",[`${s}-name`]:{marginBottom:o}}},[`${a}${a}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:"50%"}}}}},a3=e=>{let{componentCls:t,iconCls:r,fontSizeLG:n,colorTextLightSolid:o,calc:i}=e,a=`${t}-list`,s=`${a}-item`,l=e.uploadPicCardSize;return{[` ${t}-wrapper${t}-picture-card-wrapper, ${t}-wrapper${t}-picture-circle-wrapper - `]:Object.assign(Object.assign({},$u()),{display:"block",[`${t}${t}-select`]:{width:l,height:l,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${re(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${a}${a}-picture-card, ${a}${a}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${a}-item-container`]:{display:"inline-block",width:l,height:l,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[s]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${re(i(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${re(i(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${s}:hover`]:{[`&::before, ${s}-actions`]:{opacity:1}},[`${s}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[` + `]:Object.assign(Object.assign({},du()),{display:"block",[`${t}${t}-select`]:{width:l,height:l,textAlign:"center",verticalAlign:"top",backgroundColor:e.colorFillAlter,border:`${oe(e.lineWidth)} dashed ${e.colorBorder}`,borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`border-color ${e.motionDurationSlow}`,[`> ${t}`]:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%",textAlign:"center"},[`&:not(${t}-disabled):hover`]:{borderColor:e.colorPrimary}},[`${a}${a}-picture-card, ${a}${a}-picture-circle`]:{display:"flex",flexWrap:"wrap","@supports not (gap: 1px)":{"& > *":{marginBlockEnd:e.marginXS,marginInlineEnd:e.marginXS}},"@supports (gap: 1px)":{gap:e.marginXS},[`${a}-item-container`]:{display:"inline-block",width:l,height:l,verticalAlign:"top"},"&::after":{display:"none"},"&::before":{display:"none"},[s]:{height:"100%",margin:0,"&::before":{position:"absolute",zIndex:1,width:`calc(100% - ${oe(i(e.paddingXS).mul(2).equal())})`,height:`calc(100% - ${oe(i(e.paddingXS).mul(2).equal())})`,backgroundColor:e.colorBgMask,opacity:0,transition:`all ${e.motionDurationSlow}`,content:'" "'}},[`${s}:hover`]:{[`&::before, ${s}-actions`]:{opacity:1}},[`${s}-actions`]:{position:"absolute",insetInlineStart:0,zIndex:10,width:"100%",whiteSpace:"nowrap",textAlign:"center",opacity:0,transition:`all ${e.motionDurationSlow}`,[` ${r}-eye, ${r}-download, ${r}-delete - `]:{zIndex:10,width:o,margin:`0 ${re(e.marginXXS)}`,fontSize:o,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:n,"&:hover":{color:n},svg:{verticalAlign:"baseline"}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${s}-name`]:{display:"none",textAlign:"center"},[`${s}-file + ${s}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${re(i(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${r}-eye, ${r}-download, ${r}-delete`]:{display:"none"}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${re(i(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}};var MK=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},w4=MK;var LK=e=>{let{componentCls:t,colorTextDisabled:r}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},Qt(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:r,cursor:"not-allowed"}})}},kK=e=>({actionsColor:e.colorTextDescription}),E4=Pt("Upload",e=>{let{fontSizeHeading3:t,fontHeight:r,lineWidth:o,controlHeightLG:n,calc:i}=e,a=rt(e,{uploadThumbnailSize:i(t).mul(2).equal(),uploadProgressOffset:i(i(r).div(2)).add(o).equal(),uploadPicCardSize:i(n).mul(2.55).equal()});return[LK(a),y4(a),S4(a),C4(a),x4(a),b4(a),w4(a),t1(a)]},kK);var qt=E(I());var TR=E(Ee());function Zp(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function Jp(e,t){let r=se(t),o=r.findIndex(n=>{let{uid:i}=n;return i===e.uid});return o===-1?r.push(e):r[o]=e,r}function lx(e,t){let r=e.uid!==void 0?"uid":"name";return t.filter(o=>o[r]===e[r])[0]}function R4(e,t){let r=e.uid!==void 0?"uid":"name",o=t.filter(n=>n[r]!==e[r]);return o.length===t.length?null:o}var FK=function(){let t=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:"").split("/"),o=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(o)||[""])[0]},O4=e=>e.indexOf("image/")===0,_4=e=>{if(e.type&&!e.thumbUrl)return O4(e.type);let t=e.thumbUrl||e.url||"",r=FK(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r)?!0:!(/^data:/.test(t)||r)},ll=200;function P4(e){return new Promise(t=>{if(!e.type||!O4(e.type)){t("");return}let r=document.createElement("canvas");r.width=ll,r.height=ll,r.style.cssText=`position: fixed; left: 0; top: 0; width: ${ll}px; height: ${ll}px; z-index: 9999; display: none;`,document.body.appendChild(r);let o=r.getContext("2d"),n=new Image;if(n.onload=()=>{let{width:i,height:a}=n,s=ll,l=ll,c=0,u=0;i>a?(l=a*(ll/i),u=-(l-s)/2):(s=i*(ll/a),c=-(s-l)/2),o.drawImage(n,c,u,s,l);let d=r.toDataURL();document.body.removeChild(r),window.URL.revokeObjectURL(n.src),t(d)},n.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){let i=new FileReader;i.onload=()=>{i.result&&typeof i.result=="string"&&(n.src=i.result)},i.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){let i=new FileReader;i.onload=()=>{i.result&&t(i.result)},i.readAsDataURL(e)}else n.src=window.URL.createObjectURL(e)})}var Wt=E(I());var cl=E(Ee());var zK=Wt.forwardRef((e,t)=>{let{prefixCls:r,className:o,style:n,locale:i,listType:a,file:s,items:l,progress:c,iconRender:u,actionIconRender:d,itemRender:f,isImgUrl:m,showPreviewIcon:h,showRemoveIcon:v,showDownloadIcon:y,previewIcon:g,removeIcon:p,downloadIcon:x,extra:S,onPreview:b,onDownload:w,onClose:C}=e;var R,_;let{status:O}=s,[N,k]=Wt.useState(O);Wt.useEffect(()=>{O!=="removed"&&k(O)},[O]);let[L,j]=Wt.useState(!1);Wt.useEffect(()=>{let Y=setTimeout(()=>{j(!0)},300);return()=>{clearTimeout(Y)}},[]);let W=u(s),D=Wt.createElement("div",{className:`${r}-icon`},W);if(a==="picture"||a==="picture-card"||a==="picture-circle")if(N==="uploading"||!s.thumbUrl&&!s.url){let Y=(0,cl.default)(`${r}-list-item-thumbnail`,{[`${r}-list-item-file`]:N!=="uploading"});D=Wt.createElement("div",{className:Y},W)}else{let Y=m?.(s)?Wt.createElement("img",{src:s.thumbUrl||s.url,alt:s.name,className:`${r}-list-item-image`,crossOrigin:s.crossOrigin}):W,ne=(0,cl.default)(`${r}-list-item-thumbnail`,{[`${r}-list-item-file`]:m&&!m(s)});D=Wt.createElement("a",{className:ne,onClick:Q=>b(s,Q),href:s.url||s.thumbUrl,target:"_blank",rel:"noopener noreferrer"},Y)}let $=(0,cl.default)(`${r}-list-item`,`${r}-list-item-${N}`),M=typeof s.linkProps=="string"?JSON.parse(s.linkProps):s.linkProps,V=(typeof v=="function"?v(s):v)?d((typeof p=="function"?p(s):p)||Wt.createElement(r4,null),()=>C(s),r,i.removeFile,!0):null,F=(typeof y=="function"?y(s):y)&&N==="done"?d((typeof x=="function"?x(s):x)||Wt.createElement(n4,null),()=>w(s),r,i.downloadFile):null,z=a!=="picture-card"&&a!=="picture-circle"&&Wt.createElement("span",{key:"download-delete",className:(0,cl.default)(`${r}-list-item-actions`,{picture:a==="picture"})},F,V),U=typeof S=="function"?S(s):S,H=U&&Wt.createElement("span",{className:`${r}-list-item-extra`},U),A=(0,cl.default)(`${r}-list-item-name`),G=s.url?Wt.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:A,title:s.name},M,{href:s.url,onClick:Y=>b(s,Y)}),s.name,H):Wt.createElement("span",{key:"view",className:A,onClick:Y=>b(s,Y),title:s.name},s.name,H),q=(typeof h=="function"?h(s):h)&&(s.url||s.thumbUrl)?Wt.createElement("a",{href:s.url||s.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:Y=>b(s,Y),title:i.previewFile},typeof g=="function"?g(s):g||Wt.createElement(gd,null)):null,oe=(a==="picture-card"||a==="picture-circle")&&N!=="uploading"&&Wt.createElement("span",{className:`${r}-list-item-actions`},q,N==="done"&&F,V),{getPrefixCls:Z}=Wt.useContext(at),X=Z(),ie=Wt.createElement("div",{className:$},D,G,z,oe,L&&Wt.createElement(so,{motionName:`${X}-fade`,visible:N==="uploading",motionDeadline:2e3},Y=>{let{className:ne}=Y,Q="percent"in s?Wt.createElement(e4,Object.assign({},c,{type:"line",percent:s.percent,"aria-label":s["aria-label"],"aria-labelledby":s["aria-labelledby"]})):null;return Wt.createElement("div",{className:(0,cl.default)(`${r}-list-item-progress`,ne)},Q)})),te=s.response&&typeof s.response=="string"?s.response:((R=s.error)===null||R===void 0?void 0:R.statusText)||((_=s.error)===null||_===void 0?void 0:_.message)||i.uploadError,K=N==="error"?Wt.createElement(Ha,{title:te,getPopupContainer:Y=>Y.parentNode},ie):ie;return Wt.createElement("div",{className:(0,cl.default)(`${r}-list-item-container`,o),style:n,ref:t},f?f(K,s,l,{download:w.bind(null,s),preview:b.bind(null,s),remove:C.bind(null,s)}):K)}),T4=zK;var WK=(e,t)=>{let{listType:r="text",previewFile:o=P4,onPreview:n,onDownload:i,onRemove:a,locale:s,iconRender:l,isImageUrl:c=_4,prefixCls:u,items:d=[],showPreviewIcon:f=!0,showRemoveIcon:m=!0,showDownloadIcon:h=!1,removeIcon:v,previewIcon:y,downloadIcon:g,extra:p,progress:x={size:[-1,2],showInfo:!1},appendAction:S,appendActionVisible:b=!0,itemRender:w,disabled:C}=e,R=wE(),[_,O]=qt.useState(!1),N=["picture-card","picture-circle"].includes(r);qt.useEffect(()=>{r.startsWith("picture")&&(d||[]).forEach(H=>{!(H.originFileObj instanceof File||H.originFileObj instanceof Blob)||H.thumbUrl!==void 0||(H.thumbUrl="",o?.(H.originFileObj).then(A=>{H.thumbUrl=A||"",R()}))})},[r,d,o]),qt.useEffect(()=>{O(!0)},[]);let k=(H,A)=>{if(n)return A?.preventDefault(),n(H)},L=H=>{typeof i=="function"?i(H):H.url&&window.open(H.url)},j=H=>{a?.(H)},W=H=>{if(l)return l(H,r);let A=H.status==="uploading";if(r.startsWith("picture")){let G=r==="picture"?qt.createElement(Kl,null):s.uploading,q=c?.(H)?qt.createElement(u4,null):qt.createElement(a4,null);return A?G:q}return A?qt.createElement(Kl,null):qt.createElement(l4,null)},D=(H,A,G,q,oe)=>{let Z={type:"text",size:"small",title:q,onClick:X=>{var ie,te;A(),qt.isValidElement(H)&&((te=(ie=H.props).onClick)===null||te===void 0||te.call(ie,X))},className:`${G}-list-item-action`};return oe&&(Z.disabled=C),qt.isValidElement(H)?qt.createElement(up,Object.assign({},Z,{icon:Qn(H,Object.assign(Object.assign({},H.props),{onClick:()=>{}}))})):qt.createElement(up,Object.assign({},Z),qt.createElement("span",null,H))};qt.useImperativeHandle(t,()=>({handlePreview:k,handleDownload:L}));let{getPrefixCls:$}=qt.useContext(at),M=$("upload",u),V=$(),F=(0,TR.default)(`${M}-list`,`${M}-list-${r}`),z=qt.useMemo(()=>Gr(Y$(V),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[V]),U=Object.assign(Object.assign({},N?{}:z),{motionDeadline:2e3,motionName:`${M}-${N?"animate-inline":"animate"}`,keys:se(d.map(H=>({key:H.uid,file:H}))),motionAppear:_});return qt.createElement("div",{className:F},qt.createElement(Aw,Object.assign({},U,{component:!1}),H=>{let{key:A,file:G,className:q,style:oe}=H;return qt.createElement(T4,{key:A,locale:s,prefixCls:M,className:q,style:oe,file:G,items:d,progress:x,listType:r,isImgUrl:c,showPreviewIcon:f,showRemoveIcon:m,showDownloadIcon:h,removeIcon:v,previewIcon:y,downloadIcon:g,extra:p,iconRender:W,actionIconRender:D,itemRender:w,onPreview:k,onDownload:L,onClose:j})}),S&&qt.createElement(so,Object.assign({},U,{visible:b,forceRender:!0}),H=>{let{className:A,style:G}=H;return Qn(S,q=>({className:(0,TR.default)(q.className,A),style:Object.assign(Object.assign(Object.assign({},G),{pointerEvents:A?"none":void 0}),q.style)}))}))},BK=qt.forwardRef(WK),N4=BK;var jK=function(e,t,r,o){function n(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{c(o.next(u))}catch(d){a(d)}}function l(u){try{c(o.throw(u))}catch(d){a(d)}}function c(u){u.done?i(u.value):n(u.value).then(s,l)}c((o=o.apply(e,t||[])).next())})},Rd=`__LIST_IGNORE_${Date.now()}__`,VK=(e,t)=>{let{fileList:r,defaultFileList:o,onRemove:n,showUploadList:i=!0,listType:a="text",onPreview:s,onDownload:l,onChange:c,onDrop:u,previewFile:d,disabled:f,locale:m,iconRender:h,isImageUrl:v,progress:y,prefixCls:g,className:p,type:x="select",children:S,style:b,itemRender:w,maxCount:C,data:R={},multiple:_=!1,hasControlInside:O=!0,action:N="",accept:k="",supportServerRender:L=!0,rootClassName:j}=e,W=xr.useContext(Ur),D=f??W,[$,M]=zt(o||[],{value:r,postState:fe=>fe??[]}),[V,F]=xr.useState("drop"),z=xr.useRef(null),U=xr.useRef(null);xr.useMemo(()=>{let fe=Date.now();(r||[]).forEach((me,ze)=>{!me.uid&&!Object.isFrozen(me)&&(me.uid=`__AUTO__${fe}_${ze}__`)})},[r]);let H=(fe,me,ze)=>{let Ce=se(me),Ue=!1;C===1?Ce=Ce.slice(-1):C&&(Ue=Ce.length>C,Ce=Ce.slice(0,C)),(0,NR.flushSync)(()=>{M(Ce)});let Qe={file:fe,fileList:Ce};ze&&(Qe.event=ze),(!Ue||fe.status==="removed"||Ce.some(gt=>gt.uid===fe.uid))&&(0,NR.flushSync)(()=>{c?.(Qe)})},A=(fe,me)=>jK(void 0,void 0,void 0,function*(){let{beforeUpload:ze,transformFile:Ce}=e,Ue=fe;if(ze){let Qe=yield ze(fe,me);if(Qe===!1)return!1;if(delete fe[Rd],Qe===Rd)return Object.defineProperty(fe,Rd,{value:!0,configurable:!0}),!1;typeof Qe=="object"&&Qe&&(Ue=Qe)}return Ce&&(Ue=yield Ce(Ue)),Ue}),G=fe=>{let me=fe.filter(Ue=>!Ue.file[Rd]);if(!me.length)return;let ze=me.map(Ue=>Zp(Ue.file)),Ce=se($);ze.forEach(Ue=>{Ce=Jp(Ue,Ce)}),ze.forEach((Ue,Qe)=>{let gt=Ue;if(me[Qe].parsedFile)Ue.status="uploading";else{let{originFileObj:Nt}=Ue,ht;try{ht=new File([Nt],Nt.name,{type:Nt.type})}catch{ht=new Blob([Nt],{type:Nt.type}),ht.name=Nt.name,ht.lastModifiedDate=new Date,ht.lastModified=new Date().getTime()}ht.uid=Ue.uid,gt=ht}H(gt,Ce)})},q=(fe,me,ze)=>{try{typeof fe=="string"&&(fe=JSON.parse(fe))}catch{}if(!lx(me,$))return;let Ce=Zp(me);Ce.status="done",Ce.percent=100,Ce.response=fe,Ce.xhr=ze;let Ue=Jp(Ce,$);H(Ce,Ue)},oe=(fe,me)=>{if(!lx(me,$))return;let ze=Zp(me);ze.status="uploading",ze.percent=fe.percent;let Ce=Jp(ze,$);H(ze,Ce,fe)},Z=(fe,me,ze)=>{if(!lx(ze,$))return;let Ce=Zp(ze);Ce.error=fe,Ce.response=me,Ce.status="error";let Ue=Jp(Ce,$);H(Ce,Ue)},X=fe=>{let me;Promise.resolve(typeof n=="function"?n(fe):n).then(ze=>{var Ce;if(ze===!1)return;let Ue=R4(fe,$);Ue&&(me=Object.assign(Object.assign({},fe),{status:"removed"}),$?.forEach(Qe=>{let gt=me.uid!==void 0?"uid":"name";Qe[gt]===me[gt]&&!Object.isFrozen(Qe)&&(Qe.status="removed")}),(Ce=z.current)===null||Ce===void 0||Ce.abort(me),H(me,Ue))})},ie=fe=>{F(fe.type),fe.type==="drop"&&u?.(fe)};xr.useImperativeHandle(t,()=>({onBatchStart:G,onSuccess:q,onProgress:oe,onError:Z,fileList:$,upload:z.current,nativeElement:U.current}));let{getPrefixCls:te,direction:K,upload:Y}=xr.useContext(at),ne=te("upload",g),Q=Object.assign(Object.assign({onBatchStart:G,onError:Z,onProgress:oe,onSuccess:q},e),{data:R,multiple:_,action:N,accept:k,supportServerRender:L,prefixCls:ne,disabled:D,beforeUpload:A,onChange:void 0,hasControlInside:O});delete Q.className,delete Q.style,(!S||D)&&delete Q.id;let J=`${ne}-wrapper`,[le,ue,de]=E4(ne,J),[ve]=Pi("Upload",_i.Upload),{showRemoveIcon:ye,showPreviewIcon:we,showDownloadIcon:ce,removeIcon:ae,previewIcon:Re,downloadIcon:Me,extra:Be}=typeof i=="boolean"?{}:i,Ie=typeof ye>"u"?!D:ye,Oe=(fe,me)=>i?xr.createElement(N4,{prefixCls:ne,listType:a,items:$,previewFile:d,onPreview:s,onDownload:l,onRemove:X,showRemoveIcon:Ie,showPreviewIcon:we,showDownloadIcon:ce,removeIcon:ae,previewIcon:Re,downloadIcon:Me,iconRender:h,extra:Be,locale:Object.assign(Object.assign({},ve),m),isImageUrl:v,progress:y,appendAction:fe,appendActionVisible:me,itemRender:w,disabled:D}):fe,be=(0,cx.default)(J,p,j,ue,de,Y?.className,{[`${ne}-rtl`]:K==="rtl",[`${ne}-picture-card-wrapper`]:a==="picture-card",[`${ne}-picture-circle-wrapper`]:a==="picture-circle"}),Ve=Object.assign(Object.assign({},Y?.style),b);if(x==="drag"){let fe=(0,cx.default)(ue,ne,`${ne}-drag`,{[`${ne}-drag-uploading`]:$.some(me=>me.status==="uploading"),[`${ne}-drag-hover`]:V==="dragover",[`${ne}-disabled`]:D,[`${ne}-rtl`]:K==="rtl"});return le(xr.createElement("span",{className:be,ref:U},xr.createElement("div",{className:fe,style:Ve,onDrop:ie,onDragOver:ie,onDragLeave:ie},xr.createElement(PR,Object.assign({},Q,{ref:z,className:`${ne}-btn`}),xr.createElement("div",{className:`${ne}-drag-container`},S))),Oe()))}let He=(0,cx.default)(ne,`${ne}-select`,{[`${ne}-disabled`]:D,[`${ne}-hidden`]:!S}),$e=xr.createElement("div",{className:He},xr.createElement(PR,Object.assign({},Q,{ref:z})));return le(a==="picture-card"||a==="picture-circle"?xr.createElement("span",{className:be,ref:U},Oe($e,!!S)):xr.createElement("span",{className:be,ref:U},$e,Oe()))},HK=xr.forwardRef(VK),ux=HK;var UK=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n{var{style:r,height:o,hasControlInside:n=!1}=e,i=UK(e,["style","height","hasControlInside"]);return dx.createElement(ux,Object.assign({ref:t,hasControlInside:n},i,{type:"drag",style:Object.assign(Object.assign({},r),{height:o})}))}),I4=GK;var IR=ux;IR.Dragger=I4;IR.LIST_IGNORE=Rd;var $R=IR;var mo=E(Rr(),1),JK=()=>{let[e,t]=(0,M4.useState)(Xe.data.useSliderForNumberWidget),r=()=>{location.href="/sd-ppp-static/sd-ppp_PS.ccx?_="+Date.now()};return(0,mo.jsxs)("div",{className:"settings-container",children:[(0,mo.jsx)("h2",{children:ge("SDPPP Settings/Misc")}),(0,mo.jsxs)("div",{className:"settings-section",children:[(0,mo.jsx)("div",{className:"settings-label",children:(0,mo.jsx)("label",{children:ge("Comfy URL (You can copy it to connect ComfyUI in the plugin):")})}),(0,mo.jsx)("div",{className:"settings-control",children:location.href.split("?")[0].split("#")[0]})]}),(0,mo.jsxs)("div",{className:"settings-section settings-row",children:[(0,mo.jsx)("div",{className:"settings-label",children:(0,mo.jsx)("label",{children:ge("Photoshop plugin")})}),(0,mo.jsx)("div",{className:"settings-control",children:(0,mo.jsx)("button",{onClick:r,className:"download-button",children:ge("Download")})})]}),(0,mo.jsxs)("div",{className:"settings-section settings-row",children:[(0,mo.jsx)("div",{className:"settings-label",children:(0,mo.jsx)("label",{htmlFor:"maxImageSize",children:ge("use slider for number widget:")})}),(0,mo.jsx)("div",{className:"settings-control",children:(0,mo.jsx)($p,{id:"useSliderForNumberWidget",checked:e,onChange:o=>{t(o.target.checked),Xe.setUseSliderForNumberWidget(o.target.checked),ho.storeSetting("sdppp.useSliderForNumberWidget",o.target.checked)}})})]})]})},L4=JK;var q4=E(I(),1);var yc=E(I(),1);var k4=E(I(),1);function px(e){return e=e||12,{flex:`${e} 0 calc(${e/12*100}% - 10px)`,maxWidth:"100%"}}var Fo=E(Rr(),1);function AR({widgetTableStructure:e,widgetTableValue:t,widgetTableErrors:r,onWidgetRender:o,onWidgetChange:n,onTitleRender:i}){let[a,s]=(0,yc.useState)(0),l=(0,yc.useMemo)(()=>e.nodeIndexes.map(f=>{let m=e.nodes[f],h=(p,x,S)=>p.keepRender?x.outputType==="error"?(p.result.push((0,Fo.jsx)("span",{className:"list-error-label",children:t[m.id][S]})),p):(o?.(p,m,x,S),p):p,v=Object.values(e.groups).find(p=>p.nodeIDs.includes(m.id)),y=v?.color||"rgba(127, 127, 127, .4)";if(a&&v?.id!==a)return null;let g=m.uiWeightSum<=8&&m.widgets.length==1&&(m.widgets[0].outputType!=="number"||!e.extraOptions?.useSliderForNumberWidget);return(0,Fo.jsxs)("div",{className:"workflow-edit-field",children:[(0,Fo.jsx)("div",{className:"workflow-edit-field-title",title:m.title,style:{...px(g?4:12),borderColor:y},children:i?i(m.title,m):(0,Fo.jsx)("span",{children:m.title})}),m.widgets.reduce(h,{keepRender:!0,result:[]}).result.map((p,x)=>(0,Fo.jsx)(DR,{children:p},x)),r[m.id]?(0,Fo.jsx)("span",{className:"list-error-label",children:r[m.id]}):""]},m.id)}).filter(Boolean),[e,t,r,o,n,i,a]),[c,u]=(0,yc.useMemo)(()=>[Object.keys(r).filter(f=>e.nodes[parseInt(f)]),Object.keys(r).filter(f=>!e.nodes[parseInt(f)])],[r,e]),d=null;return u.length>0?d=(0,Fo.jsx)("span",{className:"list-error-label",children:r[+u[0]]}):c.length>0&&(d=(0,Fo.jsx)("span",{className:"list-error-label",children:r[+c[0]]})),(0,Fo.jsxs)(Fo.Fragment,{children:[d,Object.keys(e.nodes).length?"":(0,Fo.jsx)("span",{className:"list-error-label",children:ge("no suitable node to control in this workflow")}),(0,Fo.jsx)("div",{className:"workflow-edit-content",children:l})]})}var DR=class extends yc.default.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}componentDidCatch(t,r){this.setState({hasError:!0,error:t})}render(){return this.state.hasError?(0,Fo.jsx)("span",{className:"list-error-label",children:this.state.error?.stack||this.state.error?.message||this.state.error?.toString()}):this.props.children}};var xc=E(I(),1);var F4=E(I(),1);function ul(e){return(0,F4.useMemo)(()=>px(e),[e])}var dl=E(Rr(),1),z4=({inputMin:e,inputMax:t,inputStep:r,name:o,value:n=0,uiWeight:i=1,extraOptions:a,onValueChange:s})=>{let l=ul(i||12),[c,u]=(0,xc.useState)(+n.toFixed(3));(0,xc.useEffect)(()=>{u(+n.toFixed(3))},[n]);let d=(0,xc.useCallback)(h=>{if(h!==null){let v=+h.toFixed(3);u(v)}},[]),f=(0,xc.useCallback)(()=>{s(c)},[c,s]);return!((t-e)/r>1e3)&&i>=1&&a?.useSliderForNumberWidget?(0,dl.jsxs)(Xa,{style:{width:"100%",...l},align:"center",children:[(0,dl.jsx)(YE,{style:{flex:1},min:e,max:t,step:r,value:c,onChange:d,onChangeComplete:f}),(0,dl.jsx)(O0,{style:{width:80},min:e,max:t,step:r,value:c,onChange:d,onBlur:f,controls:!1})]}):(0,dl.jsxs)(Xa,{style:{width:"100%",...l},align:"center",children:[o&&(0,dl.jsx)("span",{style:{flex:1},children:o}),(0,dl.jsx)(O0,{style:{width:"100%",flex:2},min:e,max:t,step:r,value:c,onChange:d,onBlur:f,controls:!1})]})};var em=E(Rr(),1),W4=({onSelectUpdate:e,options:t,value:r,name:o,uiWeight:n})=>{let i=s=>{let l=t.indexOf(s);e(s,l)},a=ul(n||12);return(0,em.jsxs)(Xa,{style:{width:"100%",...a},align:"center",children:[o&&(0,em.jsx)("span",{style:{flex:1},children:o}),(0,em.jsx)(Np,{value:r,options:t.map(s=>({value:s,label:s})),style:{flex:2,minWidth:"100%"},onSelect:i,placeholder:ge("select..."),showSearch:!0,filterOption:(s,l)=>(l?.label??"").toLowerCase().includes(s.toLowerCase())})]})};var j4=E(Rr(),1),B4=({value:e,name:t,onValueChange:r,uiWeight:o})=>{let n=a=>{r(a.target.checked)},i=ul(o||12);return(0,j4.jsx)($p,{checked:!!e,onChange:n,style:{...i},children:t||""})};var MR=E(Rr(),1),{TextArea:eX}=Gp,V4=({value:e="",onValueChange:t,uiWeight:r})=>{let o=ul(r||12);return(0,MR.jsx)("div",{className:"widget-container",style:o,children:(0,MR.jsx)(eX,{value:e,onChange:i=>{t(i.target.value)},autoSize:{minRows:1}})})};var tm=E(I(),1);var mx=E(Rr(),1);function H4({title:e,onTitleChange:t}){let[r,o]=(0,tm.useState)(!1),[n,i]=(0,tm.useState)(e);(0,tm.useEffect)(()=>{i(e)},[e]);let a=()=>{o(!0)};return r?(0,mx.jsx)(Gp,{autoFocus:!0,value:n,onChange:u=>{i(u.target.value)},onBlur:()=>{o(!1),n!==e&&t&&t(n)},onKeyDown:u=>{u.key==="Enter"?(o(!1),n!==e&&t&&t(n)):u.key==="Escape"&&(o(!1),i(e))},size:"small",className:"workflow-edit-field-title-input"}):(0,mx.jsx)(Ha,{title:ge("click to edit"),children:(0,mx.jsx)("span",{onClick:a,style:{cursor:"pointer"},children:n})})}var Za=E(Rr(),1),U4=({value:e,onValueChange:t,options:r})=>{let o=n=>{if(n.file.status==="done"){let i=n.file.response.name;t?.(i)}};return(0,Za.jsxs)(Xa,{gap:5,align:"stretch",vertical:!0,children:[(0,Za.jsxs)(Xa,{gap:5,children:[(0,Za.jsx)(Np,{style:{flex:1},value:e,onChange:n=>{t?.(n)},options:r.map(n=>({label:n.split("/").pop(),value:n}))}),(0,Za.jsx)($R,{action:"./api/upload/image",onChange:o,showUploadList:!1,data:n=>({image:n}),children:(0,Za.jsxs)("button",{type:"button",className:"ant-btn",children:[(0,Za.jsx)(RR,{})," ",ge("upload")]})})]}),e&&(0,Za.jsx)(dR,{src:`./api/view?filename=${e}&type=input&subfolder=&rand=`+Math.random(),width:"100%",style:{aspectRatio:"1/1",objectFit:"contain"}})]})};var pa=E(Rr(),1),G4=window.comfyAPI.api.api,Od=class extends q4.default.Component{state={comfyStatus:{sid:"",ssid:"",progress:0,queueSize:0,lastError:"",executingNodeTitle:""},widgetTableStructure:Xe.data.widgetTableStructure,widgetTableValue:Xe.data.widgetTableValue,widgetTableErrors:Xe.data.widgetTableErrors};eventListeners=[];unsubscribes=[];constructor(t){super(t);let r=(a,s)=>{G4.addEventListener(a,s),this.eventListeners.push({event:a,handler:s})};r("progress",({detail:a})=>{if(!a||isNaN(a.value/a.max))return;let s=Math.round(a.value/a.max*100);this.setState({comfyStatus:{...this.state.comfyStatus,progress:s}})}),r("status",a=>{a.detail?.exec_info&&this.setState({comfyStatus:{...this.state.comfyStatus,queueSize:a.detail.exec_info.queue_remaining}})}),r("execution_error",({detail:a})=>{this.setState({comfyStatus:{...this.state.comfyStatus,lastError:a.exception_message,executingNodeTitle:""}})}),r("execution_start",()=>{this.setState({comfyStatus:{...this.state.comfyStatus,lastError:"",progress:0,executingNodeTitle:""}})}),r("executing",a=>{let s=a.detail,l=app.graph.nodes.find(c=>c.id==s);l&&this.setState({comfyStatus:{...this.state.comfyStatus,executingNodeTitle:l.title}})}),r("execution_success",()=>{this.setState({comfyStatus:{...this.state.comfyStatus,progress:0,executingNodeTitle:""}})}),r("execution_interrupted",()=>{this.setState({comfyStatus:{...this.state.comfyStatus,progress:0,executingNodeTitle:""}})});let o=a=>{this.setState({widgetTableStructure:a})};Xe.subscribe("/widgetTableStructure",o);let n=a=>{this.setState({widgetTableValue:a})};Xe.subscribe("/widgetTableValue",n);let i=a=>{this.setState({widgetTableErrors:a})};Xe.subscribe("/widgetTableErrors",i),this.unsubscribes.push(()=>{Xe.unsubscribe(o),Xe.unsubscribe(n),Xe.unsubscribe(i)})}componentWillUnmount(){this.eventListeners.forEach(({event:t,handler:r})=>{G4.removeEventListener(t,r)}),this.unsubscribes.forEach(t=>t())}render(){let t={widgetTableStructure:this.state.widgetTableStructure,widgetTableValue:this.state.widgetTableValue,widgetTableErrors:this.state.widgetTableErrors,onWidgetChange:async(o,n,i,a)=>{let s=app.graph.nodes.find(l=>l.id==o);s&&_m(s,n,i)},onWidgetRender:(o,n,i,a)=>{if(i.outputType==="number"){let s=i.options?.min??0,l=i.options?.max??100,c=i.options?.step??1;return o.result.push((0,pa.jsx)(z4,{uiWeight:i.uiWeight||12,inputMin:s,inputMax:l,inputStep:c,name:i.name,value:parseFloat(this.state.widgetTableValue[n.id][a]),onValueChange:u=>{t.onWidgetChange(n.id,a,u,n)},extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0}else{if(i.outputType==="combo")return o.result.push((0,pa.jsx)(W4,{uiWeight:i.uiWeight||12,options:i.options?.values||[],name:i.name,onSelectUpdate:s=>{t.onWidgetChange(n.id,a,s,n)},value:this.state.widgetTableValue[n.id][a],extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0;if(i.outputType==="toggle")return o.result.push((0,pa.jsx)(B4,{uiWeight:i.uiWeight||12,name:i.name,value:this.state.widgetTableValue[n.id][a],onValueChange:s=>{t.onWidgetChange(n.id,a,s,n)},extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0;if(i.outputType==="string"||i.outputType==="customtext"||i.outputType==="text")return o.result.push((0,pa.jsx)(V4,{uiWeight:i.uiWeight||12,value:this.state.widgetTableValue[n.id][a],onValueChange:s=>{t.onWidgetChange(n.id,a,s,n)},extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0;if(i.outputType==="PS_LAYER"||i.outputType==="PS_DOCUMENT")return o.result.push((0,pa.jsx)("p",{children:ge("only supported in Photoshop")})),!0;if(i.outputType=="IMAGE_PATH"||i.outputType=="MASK_PATH")return o.result.push((0,pa.jsx)(U4,{uiWeight:i.uiWeight||12,value:this.state.widgetTableValue[n.id][a],options:i.options?.values||[],onValueChange:async s=>{t.onWidgetChange(n.id,a,s,n)},extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0}return!0},onTitleRender:(o,n)=>(0,pa.jsx)(H4,{title:o,onTitleChange:i=>{Uo.instance.setNodeTitle({node_id:n.id,title:i})}})},r=12;return(0,pa.jsx)(ka,{theme:{components:{Input:{fontSize:r,colorBgContainer:"var(--p-form-field-background)",colorText:"var(--p-form-field-color)",colorBorder:"var(--p-form-field-border-color)"},Select:{fontSize:r,colorBgContainer:"var(--p-form-field-background)",colorText:"var(--p-form-field-color)",colorBorder:"var(--p-form-field-border-color)",colorBgElevated:"var(--p-form-field-background)",colorTextDescription:"var(--p-form-field-color)",controlItemBgActive:"var(--p-form-field-background)",controlItemBgHover:"var(--p-form-field-border-color)"},Checkbox:{fontSize:r,colorText:"var(--p-form-field-color)"},Radio:{fontSize:r},Slider:{fontSize:r},Switch:{fontSize:r,colorBgContainer:"var(--p-form-field-background)",colorText:"var(--p-form-field-color)"},InputNumber:{fontSize:r,colorBgContainer:"var(--p-form-field-background)",colorText:"var(--p-form-field-color)",colorBorder:"var(--p-form-field-border-color)"}}},children:(0,pa.jsx)(AR,{...t})})}};var zo=E(Rr(),1),K4=document.createElement("style");K4.innerHTML=bN;document.head.appendChild(K4);function LR({onClose:e,tab:t}){let[r,o]=(0,_d.useState)("1"),[n,i]=(0,_d.useState)(0);return(0,_d.useEffect)(()=>{o(t)},[t]),(0,_d.useEffect)(()=>{let a=document.getElementById("graph-canvas"),s=0,l,c=()=>{if(s++,s%3===0&&a){let u=document.querySelector(".side-bar-panel");u&&u.style.display!=="none"?i(u.clientWidth):i(0)}l=requestAnimationFrame(c)};return l=requestAnimationFrame(c),()=>{cancelAnimationFrame(l)}},[]),(0,zo.jsx)(ka,{theme:{token:{colorText:"var(--fg-color)",colorBgContainer:"var(--comfy-input-bg)",colorBgElevated:"var(--comfy-input-bg)",colorFillSecondary:"var(--comfy-input-bg)",controlItemBgHover:"var(--comfy-input-bg)",colorBgTextHover:"var(--comfy-input-bg)",colorBorder:"var(--p-inputtext-border-color)"}},children:(0,zo.jsxs)("div",{className:"sdppp-menu-container",style:{paddingLeft:n},children:[(0,zo.jsxs)("div",{className:"sdppp-menu-header",children:[(0,zo.jsxs)("div",{className:"sdppp-menu-header-left",children:[(0,zo.jsx)("button",{onClick:()=>o("1"),className:r==="1"?"active":"",children:ge("Simplify Workflow")}),(0,zo.jsx)("button",{onClick:()=>o("2"),className:r==="2"?"active":"",children:ge("Photoshop")})]}),(0,zo.jsx)("span",{children:"Powered by SDPPP"}),(0,zo.jsx)("button",{className:"sdppp-menu-close-button",onClick:e,children:(0,zo.jsx)(Fa,{})})]}),(0,zo.jsxs)("div",{className:"sdppp-menu-content",children:[(0,zo.jsx)("div",{className:"sdppp-menu-workflow-edit-wrap",style:{display:r==="1"?"block":"none"},children:(0,zo.jsx)(Od,{})}),(0,zo.jsx)("div",{className:"sdppp-menu-settings-wrap",style:{display:r==="2"?"block":"none"},children:(0,zo.jsx)(L4,{})})]})]})})}var bc=E(Rr(),1);function kR({onMaximize:e,onPhotoshop:t}){return(0,bc.jsxs)("div",{className:"sdppp-side-container",children:[(0,bc.jsxs)("div",{className:"sdppp-side-header",children:[(0,bc.jsx)("button",{className:"sdppp-photoshop-icon",onClick:t}),(0,bc.jsx)("button",{className:"pi pi-window-maximize",onClick:e})]}),(0,bc.jsx)(Od,{})]})}var X4=null,tX=null,FR=null;async function BR(e){if(!X4){let t=document.createElement("div");t.id="sdppp-popup-root",t.style.display="none",document.getElementById("graph-canvas-container")?.prepend(t),e.extensionManager.registerSidebarTab({id:"sdppp",title:"SD-PPP",tooltip:"SD-PPP Workflow UI",icon:"sdppp-side-icon",type:"custom",render:r=>{tX||(r.style.width="100%",r.style.height="auto",r.style.padding="8px",(0,zR.createRoot)(r).render((0,WR.createElement)(kR,{onMaximize:()=>{o("1")},onPhotoshop:()=>{o("2")}}))),t.style.display="none";function o(n){X4?FR.props.tab=n:(FR=(0,WR.createElement)(LR,{onClose:()=>{t.style.display="none"},tab:n}),(0,zR.createRoot)(t).render(FR)),t.style.display="flex",document.querySelector(".sdppp-side-icon")?.parentElement?.click()}}})}}ho.addEventListener("graphChanged",e=>{let r=(wt.workflowManager||wt.extensionManager.workflow).activeWorkflow;if(e.detail.id!==r.activeState.id)return;let o=Xe.data.widgetTableStructure,n=Pm(wt.graph,r);ez(n,o)&&Xe.setWidgetTableStructure(n),Xe.setWidgetTableValue(Bd(wt.graph))});ho.addEventListener("executed",()=>{Xe.setWidgetTableValue(Bd(wt.graph))});var Y4=0,Q4=!0,Z4="";function J4(){requestAnimationFrame(J4);let e=wt.workflowManager||wt.extensionManager.workflow,t=e.activeWorkflow,r=t?.id||0,o=t?.path||"",n=t?.isPersisted||!0;if(r===Y4&&o===Z4&&n===Q4)return;Y4=r,Z4=o,Q4=n;let i=Pm(wt.graph,t),a=Bd(wt.graph);Xe.setWidgetTableStructure(i),Xe.setWidgetTableValue(a),setTimeout(()=>{if(t!==e.activeWorkflow)return;let s=Pm(wt.graph,t),l=Bd(wt.graph);ez(s,i)&&Xe.setWidgetTableStructure(s),Xe.setWidgetTableValue(l)},800)}requestAnimationFrame(J4);function ez(e,t){return e.nodeIndexes.length!==t.nodeIndexes.length||JSON.stringify(e.nodeIndexes)!==JSON.stringify(t.nodeIndexes)||JSON.stringify(e.groups)!==JSON.stringify(t.groups)||JSON.stringify(e.nodes)!==JSON.stringify(t.nodes)}async function rX(e,t,r){t.addEventListener("progress",({detail:s})=>{if(!s||isNaN(s.value/s.max))return;let l=Math.round(s.value/s.max*100);Xe.setProgress(l)}),t.addEventListener("status",s=>{s.detail?.exec_info&&Xe.setQueueSize(s.detail.exec_info.queue_remaining)}),t.addEventListener("execution_error",({detail:s})=>{if(Xe.setExecutingNodeTitle(""),Xe.setLastError(s.exception_message),s.node_id){let l=e.graph.nodes.find(c=>c.id==s.node_id);Xe.setWidgetTableErrors({[s.node_id]:`[${l?.title||s.node_id}]`+s.exception_message})}});let o=[];t.addEventListener("execution_start",({detail:s})=>{if(Xe.setLastError(""),Xe.setWidgetTableErrors({}),Xe.setProgress(0),Xe.setExecutingNodeTitle(""),o.length){let l=o.shift();l&&n.set(s.prompt_id,l)}}),t.addEventListener("executing",s=>{let l=s.detail,c=graph.nodes.find(u=>u.id==l);c&&Xe.setExecutingNodeTitle(c.title)}),t.addEventListener("execution_success",s=>{Xe.setProgress(0),Xe.setExecutingNodeTitle(""),yl.get(s.detail.prompt_id)&&yl.delete(s.detail.prompt_id)}),t.addEventListener("execution_interrupted",()=>{Xe.setProgress(0),Xe.setExecutingNodeTitle("")});let n=new Map;t.addEventListener("executed",s=>{if(s.detail.output&&Array.isArray(s.detail.output.images)&&s.detail.output.images.length>0){let l=null;if(yl.get(s.detail.prompt_id)?l=yl.get(s.detail.prompt_id):l=location.search.match(/webview_fromsid=([^&]+)/)?.[1]||"",!l)return;e.graph.nodes.filter(c=>c.type=="Send Images To Photoshop").filter(c=>c.mode==0).length||i?.sendImage(l,{document_identify:Xt.getSpecialDocumentForPreview(),layer_identifies:s.detail.output.images.map(()=>Xt.getSpecialLayerForSend()[0]),boundaries:s.detail.output.images.map(()=>""),image_urls:s.detail.output.images.map(c=>location.origin+"/api/view?type="+c.type+"&filename="+c.filename),new_layer_name:Tm(Xe.data.widgetTableStructure.widgetTablePath)})}}),BR(e);var i=new Uo;i.connect(),e.registerExtension({name:"Comfy.SD-PPP",async setup(){},async beforeRegisterNodeDef(s,l,c){try{WO(s,l)}catch(u){rm.push(u.stack||u.message||u)}}})}var rm=[];(async function(){if(!(typeof gradioApp<"u")){try{let e=window.comfyAPI?.app?.app,t=window.comfyAPI?.ui?.$el,r=window.comfyAPI?.api?.api;if(!e||!r||!t)throw new Error("comfyAPI is not initialized, maybe comfyUI is too old");await QR(),await rX(e,r,t),import("./sdppp-custom.js").then(o=>{o.default(ma)})}catch(e){rm.push(e.stack||e.message||e)}await new Promise(e=>setTimeout(e,2e3)),rm.length&&(console.error(rm[0]),alert(`sd-ppp init failed: -`+rm.join(` + `]:{zIndex:10,width:n,margin:`0 ${oe(e.marginXXS)}`,fontSize:n,cursor:"pointer",transition:`all ${e.motionDurationSlow}`,color:o,"&:hover":{color:o},svg:{verticalAlign:"baseline"}}},[`${s}-thumbnail, ${s}-thumbnail img`]:{position:"static",display:"block",width:"100%",height:"100%",objectFit:"contain"},[`${s}-name`]:{display:"none",textAlign:"center"},[`${s}-file + ${s}-name`]:{position:"absolute",bottom:e.margin,display:"block",width:`calc(100% - ${oe(i(e.paddingXS).mul(2).equal())})`},[`${s}-uploading`]:{[`&${s}`]:{backgroundColor:e.colorFillAlter},[`&::before, ${r}-eye, ${r}-download, ${r}-delete`]:{display:"none"}},[`${s}-progress`]:{bottom:e.marginXL,width:`calc(100% - ${oe(i(e.paddingXS).mul(2).equal())})`,paddingInlineStart:0}}}),[`${t}-wrapper${t}-picture-circle-wrapper`]:{[`${t}${t}-select`]:{borderRadius:"50%"}}}};var uG=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},s3=uG;var fG=e=>{let{componentCls:t,colorTextDisabled:r}=e;return{[`${t}-wrapper`]:Object.assign(Object.assign({},sr(e)),{[t]:{outline:0,"input[type='file']":{cursor:"pointer"}},[`${t}-select`]:{display:"inline-block"},[`${t}-hidden`]:{display:"none"},[`${t}-disabled`]:{color:r,cursor:"not-allowed"}})}},dG=e=>({actionsColor:e.colorIcon}),l3=Gt("Upload",e=>{let{fontSizeHeading3:t,fontHeight:r,lineWidth:n,controlHeightLG:o,calc:i}=e,a=ut(e,{uploadThumbnailSize:i(t).mul(2).equal(),uploadProgressOffset:i(i(r).div(2)).add(n).equal(),uploadPicCardSize:i(o).mul(2.55).equal()});return[fG(a),r3(a),i3(a),a3(a),n3(a),o3(a),s3(a),Pw(a)]},dG);var qt=E($());var BE=E(Ne());function Sp(e){return Object.assign(Object.assign({},e),{lastModified:e.lastModified,lastModifiedDate:e.lastModifiedDate,name:e.name,size:e.size,type:e.type,uid:e.uid,percent:0,originFileObj:e})}function Cp(e,t){let r=te(t),n=r.findIndex(({uid:o})=>o===e.uid);return n===-1?r.push(e):r[n]=e,r}function w0(e,t){let r=e.uid!==void 0?"uid":"name";return t.filter(n=>n[r]===e[r])[0]}function c3(e,t){let r=e.uid!==void 0?"uid":"name",n=t.filter(o=>o[r]!==e[r]);return n.length===t.length?null:n}var pG=(e="")=>{let t=e.split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},u3=e=>e.indexOf("image/")===0,f3=e=>{if(e.type&&!e.thumbUrl)return u3(e.type);let t=e.thumbUrl||e.url||"",r=pG(t);return/^data:image\//.test(t)||/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico|heic|heif)$/i.test(r)?!0:!(/^data:/.test(t)||r)},Xs=200;function d3(e){return new Promise(t=>{if(!e.type||!u3(e.type)){t("");return}let r=document.createElement("canvas");r.width=Xs,r.height=Xs,r.style.cssText=`position: fixed; left: 0; top: 0; width: ${Xs}px; height: ${Xs}px; z-index: 9999; display: none;`,document.body.appendChild(r);let n=r.getContext("2d"),o=new Image;if(o.onload=()=>{let{width:i,height:a}=o,s=Xs,l=Xs,c=0,u=0;i>a?(l=a*(Xs/i),u=-(l-s)/2):(s=i*(Xs/a),c=-(s-l)/2),n.drawImage(o,c,u,s,l);let f=r.toDataURL();document.body.removeChild(r),window.URL.revokeObjectURL(o.src),t(f)},o.crossOrigin="anonymous",e.type.startsWith("image/svg+xml")){let i=new FileReader;i.onload=()=>{i.result&&typeof i.result=="string"&&(o.src=i.result)},i.readAsDataURL(e)}else if(e.type.startsWith("image/gif")){let i=new FileReader;i.onload=()=>{i.result&&t(i.result)},i.readAsDataURL(e)}else o.src=window.URL.createObjectURL(e)})}var Bt=E($());var Ys=E(Ne());var mG=Bt.forwardRef(({prefixCls:e,className:t,style:r,locale:n,listType:o,file:i,items:a,progress:s,iconRender:l,actionIconRender:c,itemRender:u,isImgUrl:f,showPreviewIcon:p,showRemoveIcon:g,showDownloadIcon:h,previewIcon:v,removeIcon:y,downloadIcon:m,extra:d,onPreview:x,onDownload:b,onClose:S},w)=>{var C,R;let{status:P}=i,[O,A]=Bt.useState(P);Bt.useEffect(()=>{P!=="removed"&&A(P)},[P]);let[F,M]=Bt.useState(!1);Bt.useEffect(()=>{let K=setTimeout(()=>{M(!0)},300);return()=>{clearTimeout(K)}},[]);let H=l(i),L=Bt.createElement("div",{className:`${e}-icon`},H);if(o==="picture"||o==="picture-card"||o==="picture-circle")if(O==="uploading"||!i.thumbUrl&&!i.url){let K=(0,Ys.default)(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:O!=="uploading"});L=Bt.createElement("div",{className:K},H)}else{let K=f?.(i)?Bt.createElement("img",{src:i.thumbUrl||i.url,alt:i.name,className:`${e}-list-item-image`,crossOrigin:i.crossOrigin}):H,Q=(0,Ys.default)(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:f&&!f(i)});L=Bt.createElement("a",{className:Q,onClick:re=>x(i,re),href:i.url||i.thumbUrl,target:"_blank",rel:"noopener noreferrer"},K)}let N=(0,Ys.default)(`${e}-list-item`,`${e}-list-item-${O}`),I=typeof i.linkProps=="string"?JSON.parse(i.linkProps):i.linkProps,D=(typeof g=="function"?g(i):g)?c((typeof y=="function"?y(i):y)||Bt.createElement(WL,null),()=>S(i),e,n.removeFile,!0):null,U=(typeof h=="function"?h(i):h)&&O==="done"?c((typeof m=="function"?m(i):m)||Bt.createElement(jL,null),()=>b(i),e,n.downloadFile):null,z=o!=="picture-card"&&o!=="picture-circle"&&Bt.createElement("span",{key:"download-delete",className:(0,Ys.default)(`${e}-list-item-actions`,{picture:o==="picture"})},U,D),W=typeof d=="function"?d(i):d,q=W&&Bt.createElement("span",{className:`${e}-list-item-extra`},W),j=(0,Ys.default)(`${e}-list-item-name`),k=i.url?Bt.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:j,title:i.name},I,{href:i.url,onClick:K=>x(i,K)}),i.name,q):Bt.createElement("span",{key:"view",className:j,onClick:K=>x(i,K),title:i.name},i.name,q),V=(typeof p=="function"?p(i):p)&&(i.url||i.thumbUrl)?Bt.createElement("a",{href:i.url||i.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:K=>x(i,K),title:n.previewFile},typeof v=="function"?v(i):v||Bt.createElement(u0,null)):null,G=(o==="picture-card"||o==="picture-circle")&&O!=="uploading"&&Bt.createElement("span",{className:`${e}-list-item-actions`},V,O==="done"&&U,D),{getPrefixCls:J}=Bt.useContext(rt),Y=J(),X=Bt.createElement("div",{className:N},L,k,z,G,F&&Bt.createElement(Uo,{motionName:`${Y}-fade`,visible:O==="uploading",motionDeadline:2e3},({className:K})=>{let Q="percent"in i?Bt.createElement(LL,Object.assign({},s,{type:"line",percent:i.percent,"aria-label":i["aria-label"],"aria-labelledby":i["aria-labelledby"]})):null;return Bt.createElement("div",{className:(0,Ys.default)(`${e}-list-item-progress`,K)},Q)})),ae=i.response&&typeof i.response=="string"?i.response:((C=i.error)===null||C===void 0?void 0:C.statusText)||((R=i.error)===null||R===void 0?void 0:R.message)||n.uploadError,Z=O==="error"?Bt.createElement(ka,{title:ae,getPopupContainer:K=>K.parentNode},X):X;return Bt.createElement("div",{className:(0,Ys.default)(`${e}-list-item-container`,t),style:r,ref:w},u?u(Z,i,a,{download:b.bind(null,i),preview:x.bind(null,i),remove:S.bind(null,i)}):Z)}),p3=mG;var gG=(e,t)=>{let{listType:r="text",previewFile:n=d3,onPreview:o,onDownload:i,onRemove:a,locale:s,iconRender:l,isImageUrl:c=f3,prefixCls:u,items:f=[],showPreviewIcon:p=!0,showRemoveIcon:g=!0,showDownloadIcon:h=!1,removeIcon:v,previewIcon:y,downloadIcon:m,extra:d,progress:x={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:S=!0,itemRender:w,disabled:C}=e,R=q1(),[P,O]=qt.useState(!1),A=["picture-card","picture-circle"].includes(r);qt.useEffect(()=>{r.startsWith("picture")&&(f||[]).forEach(j=>{!(j.originFileObj instanceof File||j.originFileObj instanceof Blob)||j.thumbUrl!==void 0||(j.thumbUrl="",n?.(j.originFileObj).then(k=>{j.thumbUrl=k||"",R()}))})},[r,f,n]),qt.useEffect(()=>{O(!0)},[]);let F=(j,k)=>{if(o)return k?.preventDefault(),o(j)},M=j=>{typeof i=="function"?i(j):j.url&&window.open(j.url)},H=j=>{a?.(j)},L=j=>{if(l)return l(j,r);let k=j.status==="uploading";if(r.startsWith("picture")){let V=r==="picture"?qt.createElement(Al,null):s.uploading,G=c?.(j)?qt.createElement(KL,null):qt.createElement(HL,null);return k?V:G}return k?qt.createElement(Al,null):qt.createElement(qL,null)},N=(j,k,V,G,J)=>{let Y={type:"text",size:"small",title:G,onClick:X=>{var ae,Z;k(),qt.isValidElement(j)&&((Z=(ae=j.props).onClick)===null||Z===void 0||Z.call(ae,X))},className:`${V}-list-item-action`,disabled:J?C:!1};return qt.isValidElement(j)?qt.createElement(Ld,Object.assign({},Y,{icon:Go(j,Object.assign(Object.assign({},j.props),{onClick:()=>{}}))})):qt.createElement(Ld,Object.assign({},Y),qt.createElement("span",null,j))};qt.useImperativeHandle(t,()=>({handlePreview:F,handleDownload:M}));let{getPrefixCls:I}=qt.useContext(rt),D=I("upload",u),U=I(),z=(0,BE.default)(`${D}-list`,`${D}-list-${r}`),W=qt.useMemo(()=>qr(E$(U),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[U]),q=Object.assign(Object.assign({},A?{}:W),{motionDeadline:2e3,motionName:`${D}-${A?"animate-inline":"animate"}`,keys:te(f.map(j=>({key:j.uid,file:j}))),motionAppear:P});return qt.createElement("div",{className:z},qt.createElement(sw,Object.assign({},q,{component:!1}),({key:j,file:k,className:V,style:G})=>qt.createElement(p3,{key:j,locale:s,prefixCls:D,className:V,style:G,file:k,items:f,progress:x,listType:r,isImgUrl:c,showPreviewIcon:p,showRemoveIcon:g,showDownloadIcon:h,removeIcon:v,previewIcon:y,downloadIcon:m,extra:d,iconRender:L,actionIconRender:N,itemRender:w,onPreview:F,onDownload:M,onClose:H})),b&&qt.createElement(Uo,Object.assign({},q,{visible:S,forceRender:!0}),({className:j,style:k})=>Go(b,V=>({className:(0,BE.default)(V.className,j),style:Object.assign(Object.assign(Object.assign({},k),{pointerEvents:j?"none":void 0}),V.style)}))))},hG=qt.forwardRef(gG),m3=hG;var vG=function(e,t,r,n){function o(i){return i instanceof r?i:new r(function(a){a(i)})}return new(r||(r=Promise))(function(i,a){function s(u){try{c(n.next(u))}catch(f){a(f)}}function l(u){try{c(n.throw(u))}catch(f){a(f)}}function c(u){u.done?i(u.value):o(u.value).then(s,l)}c((n=n.apply(e,t||[])).next())})},Ju=`__LIST_IGNORE_${Date.now()}__`,yG=(e,t)=>{let{fileList:r,defaultFileList:n,onRemove:o,showUploadList:i=!0,listType:a="text",onPreview:s,onDownload:l,onChange:c,onDrop:u,previewFile:f,disabled:p,locale:g,iconRender:h,isImageUrl:v,progress:y,prefixCls:m,className:d,type:x="select",children:b,style:S,itemRender:w,maxCount:C,data:R={},multiple:P=!1,hasControlInside:O=!0,action:A="",accept:F="",supportServerRender:M=!0,rootClassName:H}=e,L=br.useContext(Ur),N=p??L,[I,D]=ar(n||[],{value:r,postState:se=>se??[]}),[U,z]=br.useState("drop"),W=br.useRef(null),q=br.useRef(null);br.useMemo(()=>{let se=Date.now();(r||[]).forEach((xe,_e)=>{!xe.uid&&!Object.isFrozen(xe)&&(xe.uid=`__AUTO__${se}_${_e}__`)})},[r]);let j=(se,xe,_e)=>{let he=te(xe),Je=!1;C===1?he=he.slice(-1):C&&(Je=he.length>C,he=he.slice(0,C)),(0,jE.flushSync)(()=>{D(he)});let lt={file:se,fileList:he};_e&&(lt.event=_e),(!Je||se.status==="removed"||he.some(Et=>Et.uid===se.uid))&&(0,jE.flushSync)(()=>{c?.(lt)})},k=(se,xe)=>vG(void 0,void 0,void 0,function*(){let{beforeUpload:_e,transformFile:he}=e,Je=se;if(_e){let lt=yield _e(se,xe);if(lt===!1)return!1;if(delete se[Ju],lt===Ju)return Object.defineProperty(se,Ju,{value:!0,configurable:!0}),!1;typeof lt=="object"&<&&(Je=lt)}return he&&(Je=yield he(Je)),Je}),V=se=>{let xe=se.filter(Je=>!Je.file[Ju]);if(!xe.length)return;let _e=xe.map(Je=>Sp(Je.file)),he=te(I);_e.forEach(Je=>{he=Cp(Je,he)}),_e.forEach((Je,lt)=>{let Et=Je;if(xe[lt].parsedFile)Je.status="uploading";else{let{originFileObj:Pt}=Je,pt;try{pt=new File([Pt],Pt.name,{type:Pt.type})}catch{pt=new Blob([Pt],{type:Pt.type}),pt.name=Pt.name,pt.lastModifiedDate=new Date,pt.lastModified=new Date().getTime()}pt.uid=Je.uid,Et=pt}j(Et,he)})},G=(se,xe,_e)=>{try{typeof se=="string"&&(se=JSON.parse(se))}catch{}if(!w0(xe,I))return;let he=Sp(xe);he.status="done",he.percent=100,he.response=se,he.xhr=_e;let Je=Cp(he,I);j(he,Je)},J=(se,xe)=>{if(!w0(xe,I))return;let _e=Sp(xe);_e.status="uploading",_e.percent=se.percent;let he=Cp(_e,I);j(_e,he,se)},Y=(se,xe,_e)=>{if(!w0(_e,I))return;let he=Sp(_e);he.error=se,he.response=xe,he.status="error";let Je=Cp(he,I);j(he,Je)},X=se=>{let xe;Promise.resolve(typeof o=="function"?o(se):o).then(_e=>{var he;if(_e===!1)return;let Je=c3(se,I);Je&&(xe=Object.assign(Object.assign({},se),{status:"removed"}),I?.forEach(lt=>{let Et=xe.uid!==void 0?"uid":"name";lt[Et]===xe[Et]&&!Object.isFrozen(lt)&&(lt.status="removed")}),(he=W.current)===null||he===void 0||he.abort(xe),j(xe,Je))})},ae=se=>{z(se.type),se.type==="drop"&&u?.(se)};br.useImperativeHandle(t,()=>({onBatchStart:V,onSuccess:G,onProgress:J,onError:Y,fileList:I,upload:W.current,nativeElement:q.current}));let{getPrefixCls:Z,direction:K,upload:Q}=br.useContext(rt),re=Z("upload",m),ee=Object.assign(Object.assign({onBatchStart:V,onError:Y,onProgress:J,onSuccess:G},e),{data:R,multiple:P,action:A,accept:F,supportServerRender:M,prefixCls:re,disabled:N,beforeUpload:k,onChange:void 0,hasControlInside:O});delete ee.className,delete ee.style,(!b||N)&&delete ee.id;let ne=`${re}-wrapper`,[de,le,pe]=l3(re,ne),[Oe]=Ca("Upload",Ei.Upload),{showRemoveIcon:Ce,showPreviewIcon:De,showDownloadIcon:ce,removeIcon:ie,previewIcon:Re,downloadIcon:Le,extra:Ge}=typeof i=="boolean"?{}:i,Me=typeof Ce>"u"?!N:Ce,Ie=(se,xe)=>i?br.createElement(m3,{prefixCls:re,listType:a,items:I,previewFile:f,onPreview:s,onDownload:l,onRemove:X,showRemoveIcon:Me,showPreviewIcon:De,showDownloadIcon:ce,removeIcon:ie,previewIcon:Re,downloadIcon:Le,iconRender:h,extra:Ge,locale:Object.assign(Object.assign({},Oe),g),isImageUrl:v,progress:y,appendAction:se,appendActionVisible:xe,itemRender:w,disabled:N}):se,je=(0,E0.default)(ne,d,H,le,pe,Q?.className,{[`${re}-rtl`]:K==="rtl",[`${re}-picture-card-wrapper`]:a==="picture-card",[`${re}-picture-circle-wrapper`]:a==="picture-circle"}),We=Object.assign(Object.assign({},Q?.style),S);if(x==="drag"){let se=(0,E0.default)(le,re,`${re}-drag`,{[`${re}-drag-uploading`]:I.some(xe=>xe.status==="uploading"),[`${re}-drag-hover`]:U==="dragover",[`${re}-disabled`]:N,[`${re}-rtl`]:K==="rtl"});return de(br.createElement("span",{className:je,ref:q},br.createElement("div",{className:se,style:We,onDrop:ae,onDragOver:ae,onDragLeave:ae},br.createElement(WE,Object.assign({},ee,{ref:W,className:`${re}-btn`}),br.createElement("div",{className:`${re}-drag-container`},b))),Ie()))}let He=(0,E0.default)(re,`${re}-select`,{[`${re}-disabled`]:N,[`${re}-hidden`]:!b}),ye=br.createElement("div",{className:He,style:We},br.createElement(WE,Object.assign({},ee,{ref:W})));return de(a==="picture-card"||a==="picture-circle"?br.createElement("span",{className:je,ref:q},Ie(ye,!!b)):br.createElement("span",{className:je,ref:q},ye,Ie()))},xG=br.forwardRef(yG),R0=xG;var bG=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o{var{style:r,height:n,hasControlInside:o=!1}=e,i=bG(e,["style","height","hasControlInside"]);return O0.createElement(R0,Object.assign({ref:t,hasControlInside:o},i,{type:"drag",style:Object.assign(Object.assign({},r),{height:n})}))}),g3=SG;var VE=R0;VE.Dragger=g3;VE.LIST_IGNORE=Ju;var HE=VE;var dn=E(Or(),1),PG=()=>{let[e,t]=(0,x3.useState)(Xe.data.useSliderForNumberWidget),r=()=>{location.href="/sd-ppp-static/sd-ppp_PS.ccx?_="+Date.now()};return(0,dn.jsxs)("div",{className:"settings-container",children:[(0,dn.jsx)("h2",{children:me("SDPPP Settings/Misc")}),(0,dn.jsxs)("div",{className:"settings-section",children:[(0,dn.jsx)("div",{className:"settings-label",children:(0,dn.jsx)("label",{children:me("Comfy URL (You can copy it to connect ComfyUI in the plugin):")})}),(0,dn.jsx)("div",{className:"settings-control",children:location.href.split("?")[0].split("#")[0]})]}),(0,dn.jsxs)("div",{className:"settings-section settings-row",children:[(0,dn.jsx)("div",{className:"settings-label",children:(0,dn.jsx)("label",{children:me("Photoshop plugin")})}),(0,dn.jsx)("div",{className:"settings-control",children:(0,dn.jsx)("button",{onClick:r,className:"download-button",children:me("Download")})})]}),(0,dn.jsxs)("div",{className:"settings-section settings-row",children:[(0,dn.jsx)("div",{className:"settings-label",children:(0,dn.jsx)("label",{htmlFor:"maxImageSize",children:me("use slider for number widget:")})}),(0,dn.jsx)("div",{className:"settings-control",children:(0,dn.jsx)(ap,{id:"useSliderForNumberWidget",checked:e,onChange:n=>{t(n.target.checked),Xe.setUseSliderForNumberWidget(n.target.checked),nn.storeSetting("sdppp.useSliderForNumberWidget",n.target.checked)}})})]})]})},b3=PG;var O4=E($(),1);var Yl=E($(),1);var S3=E($(),1);function P0(e){return e=e||12,{flex:`${e} 0 calc(${e/12*100}% - 10px)`,maxWidth:"100%"}}var Dn=E(Or(),1);function qE({widgetTableStructure:e,widgetTableValue:t,widgetTableErrors:r,onWidgetRender:n,onWidgetChange:o,onTitleRender:i}){let[a,s]=(0,Yl.useState)(0),l=(0,Yl.useMemo)(()=>e.nodeIndexes.map(p=>{let g=e.nodes[p],h=(d,x,b)=>d.keepRender?x.outputType==="error"?(d.result.push((0,Dn.jsx)("span",{className:"list-error-label",children:t[g.id][b]})),d):(n?.(d,g,x,b),d):d,v=Object.values(e.groups).find(d=>d.nodeIDs.includes(g.id)),y=v?.color||"rgba(127, 127, 127, .4)";if(a&&v?.id!==a)return null;let m=g.uiWeightSum<=8&&g.widgets.length==1&&(g.widgets[0].outputType!=="number"||!e.extraOptions?.useSliderForNumberWidget);return(0,Dn.jsxs)("div",{className:"workflow-edit-field",children:[(0,Dn.jsx)("div",{className:"workflow-edit-field-title",title:g.title,style:{...P0(m?4:12),borderColor:y},children:i?i(g.title,g):(0,Dn.jsx)("span",{children:g.title})}),g.widgets.reduce(h,{keepRender:!0,result:[]}).result.map((d,x)=>(0,Dn.jsx)(UE,{children:d},x)),r[g.id]?(0,Dn.jsx)("span",{className:"list-error-label",children:r[g.id]}):""]},g.id)}).filter(Boolean),[e,t,r,n,o,i,a]),[c,u]=(0,Yl.useMemo)(()=>[Object.keys(r).filter(p=>e.nodes[parseInt(p)]),Object.keys(r).filter(p=>!e.nodes[parseInt(p)])],[r,e]),f=null;return u.length>0?f=(0,Dn.jsx)("span",{className:"list-error-label",children:r[+u[0]]}):c.length>0&&(f=(0,Dn.jsx)("span",{className:"list-error-label",children:r[+c[0]]})),(0,Dn.jsxs)(Dn.Fragment,{children:[f,Object.keys(e.nodes).length?"":(0,Dn.jsx)("span",{className:"list-error-label",children:me("no suitable node to control in this workflow")}),(0,Dn.jsx)("div",{className:"workflow-edit-content",children:l})]})}var UE=class extends Yl.default.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}componentDidCatch(t,r){this.setState({hasError:!0,error:t})}render(){return this.state.hasError?(0,Dn.jsx)("span",{className:"list-error-label",children:this.state.error?.stack||this.state.error?.message||this.state.error?.toString()}):this.props.children}};var Ql=E($(),1);var C3=E($(),1);function Qs(e){return(0,C3.useMemo)(()=>P0(e),[e])}var Js=E(Or(),1),w3=({inputMin:e,inputMax:t,inputStep:r,name:n,value:o=0,uiWeight:i=1,extraOptions:a,onValueChange:s})=>{let l=Qs(i||12),[c,u]=(0,Ql.useState)(+o.toFixed(3));(0,Ql.useEffect)(()=>{u(+o.toFixed(3))},[o]);let f=(0,Ql.useCallback)(h=>{if(h!==null){let v=+h.toFixed(3);u(v)}},[]),p=(0,Ql.useCallback)(()=>{s(c)},[c,s]);return!((t-e)/r>1e3)&&i>=1&&a?.useSliderForNumberWidget?(0,Js.jsxs)(Wa,{style:{width:"100%",...l},align:"center",children:[(0,Js.jsx)(bE,{style:{flex:1},min:e,max:t,step:r,value:c,onChange:f,onChangeComplete:p}),(0,Js.jsx)(e0,{style:{width:80},min:e,max:t,step:r,value:c,onChange:f,onBlur:p,controls:!1})]}):(0,Js.jsxs)(Wa,{style:{width:"100%",...l},align:"center",children:[n&&(0,Js.jsx)("span",{style:{flex:1},children:n}),(0,Js.jsx)(e0,{style:{width:"100%",flex:2},min:e,max:t,step:r,value:c,onChange:f,onBlur:p,controls:!1})]})};var wp=E(Or(),1),E3=({onSelectUpdate:e,options:t,value:r,name:n,uiWeight:o})=>{let i=s=>{let l=t.indexOf(s);e(s,l)},a=Qs(o||12);return(0,wp.jsxs)(Wa,{style:{width:"100%",...a},align:"center",children:[n&&(0,wp.jsx)("span",{style:{flex:1},children:n}),(0,wp.jsx)(op,{value:r,options:t.map(s=>({value:s,label:s})),style:{flex:2,minWidth:"100%"},onSelect:i,placeholder:me("select..."),showSearch:!0,filterOption:(s,l)=>(l?.label??"").toLowerCase().includes(s.toLowerCase())})]})};var O3=E(Or(),1),R3=({value:e,name:t,onValueChange:r,uiWeight:n})=>{let o=a=>{r(a.target.checked)},i=Qs(n||12);return(0,O3.jsx)(ap,{checked:!!e,onChange:o,style:{...i},children:t||""})};var GE=E(Or(),1),{TextArea:TG}=gp,_3=({value:e="",onValueChange:t,uiWeight:r})=>{let n=Qs(r||12);return(0,GE.jsx)("div",{className:"widget-container",style:n,children:(0,GE.jsx)(TG,{value:e,onChange:i=>{t(i.target.value)},autoSize:{minRows:1}})})};var Ep=E($(),1);var T0=E(Or(),1);function P3({title:e,onTitleChange:t}){let[r,n]=(0,Ep.useState)(!1),[o,i]=(0,Ep.useState)(e);(0,Ep.useEffect)(()=>{i(e)},[e]);let a=()=>{n(!0)};return r?(0,T0.jsx)(gp,{autoFocus:!0,value:o,onChange:u=>{i(u.target.value)},onBlur:()=>{n(!1),o!==e&&t&&t(o)},onKeyDown:u=>{u.key==="Enter"?(n(!1),o!==e&&t&&t(o)):u.key==="Escape"&&(n(!1),i(e))},size:"small",className:"workflow-edit-field-title-input"}):(0,T0.jsx)(ka,{title:me("click to edit"),children:(0,T0.jsx)("span",{onClick:a,style:{cursor:"pointer"},children:o})})}var T3=E($()),NG=(0,T3.createContext)({}),N0=NG;var ec=E($()),w4=E(Ne());var N3={aliceblue:"9ehhb",antiquewhite:"9sgk7",aqua:"1ekf",aquamarine:"4zsno",azure:"9eiv3",beige:"9lhp8",bisque:"9zg04",black:"0",blanchedalmond:"9zhe5",blue:"73",blueviolet:"5e31e",brown:"6g016",burlywood:"8ouiv",cadetblue:"3qba8",chartreuse:"4zshs",chocolate:"87k0u",coral:"9yvyo",cornflowerblue:"3xael",cornsilk:"9zjz0",crimson:"8l4xo",cyan:"1ekf",darkblue:"3v",darkcyan:"rkb",darkgoldenrod:"776yz",darkgray:"6mbhl",darkgreen:"jr4",darkgrey:"6mbhl",darkkhaki:"7ehkb",darkmagenta:"5f91n",darkolivegreen:"3bzfz",darkorange:"9yygw",darkorchid:"5z6x8",darkred:"5f8xs",darksalmon:"9441m",darkseagreen:"5lwgf",darkslateblue:"2th1n",darkslategray:"1ugcv",darkslategrey:"1ugcv",darkturquoise:"14up",darkviolet:"5rw7n",deeppink:"9yavn",deepskyblue:"11xb",dimgray:"442g9",dimgrey:"442g9",dodgerblue:"16xof",firebrick:"6y7tu",floralwhite:"9zkds",forestgreen:"1cisi",fuchsia:"9y70f",gainsboro:"8m8kc",ghostwhite:"9pq0v",goldenrod:"8j4f4",gold:"9zda8",gray:"50i2o",green:"pa8",greenyellow:"6senj",grey:"50i2o",honeydew:"9eiuo",hotpink:"9yrp0",indianred:"80gnw",indigo:"2xcoy",ivory:"9zldc",khaki:"9edu4",lavenderblush:"9ziet",lavender:"90c8q",lawngreen:"4vk74",lemonchiffon:"9zkct",lightblue:"6s73a",lightcoral:"9dtog",lightcyan:"8s1rz",lightgoldenrodyellow:"9sjiq",lightgray:"89jo3",lightgreen:"5nkwg",lightgrey:"89jo3",lightpink:"9z6wx",lightsalmon:"9z2ii",lightseagreen:"19xgq",lightskyblue:"5arju",lightslategray:"4nwk9",lightslategrey:"4nwk9",lightsteelblue:"6wau6",lightyellow:"9zlcw",lime:"1edc",limegreen:"1zcxe",linen:"9shk6",magenta:"9y70f",maroon:"4zsow",mediumaquamarine:"40eju",mediumblue:"5p",mediumorchid:"79qkz",mediumpurple:"5r3rv",mediumseagreen:"2d9ip",mediumslateblue:"4tcku",mediumspringgreen:"1di2",mediumturquoise:"2uabw",mediumvioletred:"7rn9h",midnightblue:"z980",mintcream:"9ljp6",mistyrose:"9zg0x",moccasin:"9zfzp",navajowhite:"9zest",navy:"3k",oldlace:"9wq92",olive:"50hz4",olivedrab:"472ub",orange:"9z3eo",orangered:"9ykg0",orchid:"8iu3a",palegoldenrod:"9bl4a",palegreen:"5yw0o",paleturquoise:"6v4ku",palevioletred:"8k8lv",papayawhip:"9zi6t",peachpuff:"9ze0p",peru:"80oqn",pink:"9z8wb",plum:"8nba5",powderblue:"6wgdi",purple:"4zssg",rebeccapurple:"3zk49",red:"9y6tc",rosybrown:"7cv4f",royalblue:"2jvtt",saddlebrown:"5fmkz",salmon:"9rvci",sandybrown:"9jn1c",seagreen:"1tdnb",seashell:"9zje6",sienna:"6973h",silver:"7ir40",skyblue:"5arjf",slateblue:"45e4t",slategray:"4e100",slategrey:"4e100",snow:"9zke2",springgreen:"1egv",steelblue:"2r1kk",tan:"87yx8",teal:"pds",thistle:"8ggk8",tomato:"9yqfb",turquoise:"2j4r4",violet:"9b10u",wheat:"9ld4j",white:"9zldr",whitesmoke:"9lhpx",yellow:"9zl6o",yellowgreen:"61fzm"};var pn=Math.round;function KE(e,t){let r=e.replace(/^[^(]*\((.*)/,"$1").replace(/\).*/,"").match(/\d*\.?\d+%?/g)||[],n=r.map(o=>parseFloat(o));for(let o=0;o<3;o+=1)n[o]=t(n[o]||0,r[o]||"",o);return r[3]?n[3]=r[3].includes("%")?n[3]/100:n[3]:n[3]=1,n}var I3=(e,t,r)=>r===0?e:e/100;function Rp(e,t){let r=t||255;return e>r?r:e<0?0:e}var Jl=class e{isValid=!0;r=0;g=0;b=0;a=1;_h;_s;_l;_v;_max;_min;_brightness;constructor(t){function r(o){return o[0]in t&&o[1]in t&&o[2]in t}if(t)if(typeof t=="string"){let i=function(a){return o.startsWith(a)};var n=i;let o=t.trim();if(/^#?[A-F\d]{3,8}$/i.test(o))this.fromHexString(o);else if(i("rgb"))this.fromRgbString(o);else if(i("hsl"))this.fromHslString(o);else if(i("hsv")||i("hsb"))this.fromHsvString(o);else{let a=N3[o.toLowerCase()];a&&this.fromHexString(parseInt(a,36).toString(16).padStart(6,"0"))}}else if(t instanceof e)this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this._h=t._h,this._s=t._s,this._l=t._l,this._v=t._v;else if(r("rgb"))this.r=Rp(t.r),this.g=Rp(t.g),this.b=Rp(t.b),this.a=typeof t.a=="number"?Rp(t.a,1):1;else if(r("hsl"))this.fromHsl(t);else if(r("hsv"))this.fromHsv(t);else throw new Error("@ant-design/fast-color: unsupported input "+JSON.stringify(t))}setR(t){return this._sc("r",t)}setG(t){return this._sc("g",t)}setB(t){return this._sc("b",t)}setA(t){return this._sc("a",t,1)}setHue(t){let r=this.toHsv();return r.h=t,this._c(r)}getLuminance(){function t(i){let a=i/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}let r=t(this.r),n=t(this.g),o=t(this.b);return .2126*r+.7152*n+.0722*o}getHue(){if(typeof this._h>"u"){let t=this.getMax()-this.getMin();t===0?this._h=0:this._h=pn(60*(this.r===this.getMax()?(this.g-this.b)/t+(this.g"u"){let t=this.getMax()-this.getMin();t===0?this._s=0:this._s=t/this.getMax()}return this._s}getLightness(){return typeof this._l>"u"&&(this._l=(this.getMax()+this.getMin())/510),this._l}getValue(){return typeof this._v>"u"&&(this._v=this.getMax()/255),this._v}getBrightness(){return typeof this._brightness>"u"&&(this._brightness=(this.r*299+this.g*587+this.b*114)/1e3),this._brightness}darken(t=10){let r=this.getHue(),n=this.getSaturation(),o=this.getLightness()-t/100;return o<0&&(o=0),this._c({h:r,s:n,l:o,a:this.a})}lighten(t=10){let r=this.getHue(),n=this.getSaturation(),o=this.getLightness()+t/100;return o>1&&(o=1),this._c({h:r,s:n,l:o,a:this.a})}mix(t,r=50){let n=this._c(t),o=r/100,i=s=>(n[s]-this[s])*o+this[s],a={r:pn(i("r")),g:pn(i("g")),b:pn(i("b")),a:pn(i("a")*100)/100};return this._c(a)}tint(t=10){return this.mix({r:255,g:255,b:255,a:1},t)}shade(t=10){return this.mix({r:0,g:0,b:0,a:1},t)}onBackground(t){let r=this._c(t),n=this.a+r.a*(1-this.a),o=i=>pn((this[i]*this.a+r[i]*r.a*(1-this.a))/n);return this._c({r:o("r"),g:o("g"),b:o("b"),a:n})}isDark(){return this.getBrightness()<128}isLight(){return this.getBrightness()>=128}equals(t){return this.r===t.r&&this.g===t.g&&this.b===t.b&&this.a===t.a}clone(){return this._c(this)}toHexString(){let t="#",r=(this.r||0).toString(16);t+=r.length===2?r:"0"+r;let n=(this.g||0).toString(16);t+=n.length===2?n:"0"+n;let o=(this.b||0).toString(16);if(t+=o.length===2?o:"0"+o,typeof this.a=="number"&&this.a>=0&&this.a<1){let i=pn(this.a*255).toString(16);t+=i.length===2?i:"0"+i}return t}toHsl(){return{h:this.getHue(),s:this.getSaturation(),l:this.getLightness(),a:this.a}}toHslString(){let t=this.getHue(),r=pn(this.getSaturation()*100),n=pn(this.getLightness()*100);return this.a!==1?`hsla(${t},${r}%,${n}%,${this.a})`:`hsl(${t},${r}%,${n}%)`}toHsv(){return{h:this.getHue(),s:this.getSaturation(),v:this.getValue(),a:this.a}}toRgb(){return{r:this.r,g:this.g,b:this.b,a:this.a}}toRgbString(){return this.a!==1?`rgba(${this.r},${this.g},${this.b},${this.a})`:`rgb(${this.r},${this.g},${this.b})`}toString(){return this.toRgbString()}_sc(t,r,n){let o=this.clone();return o[t]=Rp(r,n),o}_c(t){return new this.constructor(t)}getMax(){return typeof this._max>"u"&&(this._max=Math.max(this.r,this.g,this.b)),this._max}getMin(){return typeof this._min>"u"&&(this._min=Math.min(this.r,this.g,this.b)),this._min}fromHexString(t){let r=t.replace("#","");function n(o,i){return parseInt(r[o]+r[i||o],16)}r.length<6?(this.r=n(0),this.g=n(1),this.b=n(2),this.a=r[3]?n(3)/255:1):(this.r=n(0,1),this.g=n(2,3),this.b=n(4,5),this.a=r[6]?n(6,7)/255:1)}fromHsl({h:t,s:r,l:n,a:o}){if(this._h=t%360,this._s=r,this._l=n,this.a=typeof o=="number"?o:1,r<=0){let p=pn(n*255);this.r=p,this.g=p,this.b=p}let i=0,a=0,s=0,l=t/60,c=(1-Math.abs(2*n-1))*r,u=c*(1-Math.abs(l%2-1));l>=0&&l<1?(i=c,a=u):l>=1&&l<2?(i=u,a=c):l>=2&&l<3?(a=c,s=u):l>=3&&l<4?(a=u,s=c):l>=4&&l<5?(i=u,s=c):l>=5&&l<6&&(i=c,s=u);let f=n-c/2;this.r=pn((i+f)*255),this.g=pn((a+f)*255),this.b=pn((s+f)*255)}fromHsv({h:t,s:r,v:n,a:o}){this._h=t%360,this._s=r,this._v=n,this.a=typeof o=="number"?o:1;let i=pn(n*255);if(this.r=i,this.g=i,this.b=i,r<=0)return;let a=t/60,s=Math.floor(a),l=a-s,c=pn(n*(1-r)*255),u=pn(n*(1-r*l)*255),f=pn(n*(1-r*(1-l))*255);switch(s){case 0:this.g=f,this.b=c;break;case 1:this.r=u,this.b=c;break;case 2:this.r=c,this.b=f;break;case 3:this.r=c,this.g=u;break;case 4:this.r=f,this.g=c;break;case 5:default:this.g=c,this.b=u;break}}fromHsvString(t){let r=KE(t,I3);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=KE(t,I3);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){let r=KE(t,(n,o)=>o.includes("%")?pn(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}};var I0=2,$3=.16,IG=.05,$G=.05,DG=.15,M3=5,F3=4,AG=[{index:7,amount:15},{index:6,amount:25},{index:5,amount:30},{index:5,amount:45},{index:5,amount:65},{index:5,amount:85},{index:4,amount:90},{index:3,amount:95},{index:2,amount:97},{index:1,amount:98}];function D3(e,t,r){let n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-I0*t:Math.round(e.h)+I0*t:n=r?Math.round(e.h)+I0*t:Math.round(e.h)-I0*t,n<0?n+=360:n>=360&&(n-=360),n}function A3(e,t,r){if(e.h===0&&e.s===0)return e.s;let n;return r?n=e.s-$3*t:t===F3?n=e.s+$3:n=e.s+IG*t,n>1&&(n=1),r&&t===M3&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function k3(e,t,r){let n;return r?n=e.v+$G*t:n=e.v-DG*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function $0(e,t={}){let r=[],n=new Jl(e),o=n.toHsv();for(let i=M3;i>0;i-=1){let a=new Jl({h:D3(o,i,!0),s:A3(o,i,!0),v:k3(o,i,!0)});r.push(a)}r.push(n);for(let i=1;i<=F3;i+=1){let a=new Jl({h:D3(o,i),s:A3(o,i),v:k3(o,i)});r.push(a)}return t.theme==="dark"?AG.map(({index:i,amount:a})=>new Jl(t.backgroundColor||"#141414").mix(r[i],a).toHexString()):r.map(i=>i.toHexString())}var L3=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];L3.primary=L3[5];var z3=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];z3.primary=z3[5];var W3=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];W3.primary=W3[5];var B3=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];B3.primary=B3[5];var j3=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];j3.primary=j3[5];var V3=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];V3.primary=V3[5];var H3=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];H3.primary=H3[5];var U3=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];U3.primary=U3[5];var D0=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];D0.primary=D0[5];var q3=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];q3.primary=q3[5];var G3=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];G3.primary=G3[5];var K3=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];K3.primary=K3[5];var X3=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];X3.primary=X3[5];var Y3=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Y3.primary=Y3[5];var Q3=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];Q3.primary=Q3[5];var J3=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];J3.primary=J3[5];var Z3=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];Z3.primary=Z3[5];var e4=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];e4.primary=e4[5];var t4=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];t4.primary=t4[5];var r4=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];r4.primary=r4[5];var n4=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];n4.primary=n4[5];var o4=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];o4.primary=o4[5];var i4=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];i4.primary=i4[5];var a4=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];a4.primary=a4[5];var s4=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];s4.primary=s4[5];var l4=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];l4.primary=l4[5];var S4=E($());function XE(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function YE(e,t){if(!e)return!1;if(e.contains)return e.contains(t);let r=t;for(;r;){if(r===e)return!0;r=r.parentNode}return!1}var c4="data-rc-order",u4="data-rc-priority",kG="rc-util-key",QE=new Map;function f4({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:kG}function JE(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function MG(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function ZE(e){return Array.from((QE.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function d4(e,t={}){if(!XE())return null;let{csp:r,prepend:n,priority:o=0}=t,i=MG(n),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(c4,i),a&&o&&s.setAttribute(u4,`${o}`),r?.nonce&&(s.nonce=r?.nonce),s.innerHTML=e;let l=JE(t),{firstChild:c}=l;if(n){if(a){let u=(t.styles||ZE(l)).filter(f=>{if(!["prepend","prependQueue"].includes(f.getAttribute(c4)))return!1;let p=Number(f.getAttribute(u4)||0);return o>=p});if(u.length)return l.insertBefore(s,u[u.length-1].nextSibling),s}l.insertBefore(s,c)}else l.appendChild(s);return s}function FG(e,t={}){let{styles:r}=t;return r||=ZE(JE(t)),r.find(n=>n.getAttribute(f4(t))===e)}function LG(e,t){let r=QE.get(e);if(!r||!YE(document,r)){let n=d4("",t),{parentNode:o}=n;QE.set(e,o),e.removeChild(n)}}function p4(e,t,r={}){let n=JE(r),o=ZE(n),i={...r,styles:o};LG(n,i);let a=FG(t,i);if(a)return i.csp?.nonce&&a.nonce!==i.csp?.nonce&&(a.nonce=i.csp?.nonce),a.innerHTML!==e&&(a.innerHTML=e),a;let s=d4(e,i);return s.setAttribute(f4(i),t),s}function m4(e){return e?.getRootNode?.()}function zG(e){return m4(e)instanceof ShadowRoot}function g4(e){return zG(e)?m4(e):null}var eR={},WG=[],BG=e=>{WG.push(e)};function jG(e,t){}function VG(e,t){}function HG(){eR={}}function h4(e,t,r){!t&&!eR[r]&&(e(!1,r),eR[r]=!0)}function A0(e,t){h4(jG,e,t)}function UG(e,t){h4(VG,e,t)}A0.preMessage=BG;A0.resetWarned=HG;A0.noteOnce=UG;var v4=A0;var Zl=E($());function qG(e){return e.replace(/-(.)/g,(t,r)=>r.toUpperCase())}function x4(e,t){v4(e,`[@ant-design/icons] ${t}`)}function tR(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function y4(e={}){return Object.keys(e).reduce((t,r)=>{let n=e[r];switch(r){case"class":t.className=n,delete t.class;break;default:delete t[r],t[qG(r)]=n}return t},{})}function k0(e,t,r){return r?Zl.default.createElement(e.tag,{key:t,...y4(e.attrs),...r},(e.children||[]).map((n,o)=>k0(n,`${t}-${e.tag}-${o}`))):Zl.default.createElement(e.tag,{key:t,...y4(e.attrs)},(e.children||[]).map((n,o)=>k0(n,`${t}-${e.tag}-${o}`)))}function rR(e){return $0(e)[0]}function M0(e){return e?Array.isArray(e)?e:[e]:[]}var GG=` +.anticon { + display: inline-flex; + align-items: center; + color: inherit; + font-style: normal; + line-height: 0; + text-align: center; + text-transform: none; + vertical-align: -0.125em; + text-rendering: optimizeLegibility; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.anticon > * { + line-height: 1; +} + +.anticon svg { + display: inline-block; +} + +.anticon::before { + display: none; +} + +.anticon .anticon-icon { + display: block; +} + +.anticon[tabindex] { + cursor: pointer; +} + +.anticon-spin::before, +.anticon-spin { + display: inline-block; + -webkit-animation: loadingCircle 1s infinite linear; + animation: loadingCircle 1s infinite linear; +} + +@-webkit-keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} + +@keyframes loadingCircle { + 100% { + -webkit-transform: rotate(360deg); + transform: rotate(360deg); + } +} +`,b4=e=>{let{csp:t,prefixCls:r,layer:n}=(0,Zl.useContext)(N0),o=GG;r&&(o=o.replace(/anticon/g,r)),n&&(o=`@layer ${n} { +${o} +}`),(0,Zl.useEffect)(()=>{let i=e.current,a=g4(i);p4(o,"@ant-design-icons",{prepend:!n,csp:t,attachTo:a})},[])};var Op={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function KG({primaryColor:e,secondaryColor:t}){Op.primaryColor=e,Op.secondaryColor=t||rR(e),Op.calculated=!!t}function XG(){return{...Op}}var F0=e=>{let{icon:t,className:r,onClick:n,style:o,primaryColor:i,secondaryColor:a,...s}=e,l=S4.useRef(),c=Op;if(i&&(c={primaryColor:i,secondaryColor:a||rR(i)}),b4(l),x4(tR(t),`icon should be icon definiton, but got ${t}`),!tR(t))return null;let u=t;return u&&typeof u.icon=="function"&&(u={...u,icon:u.icon(c.primaryColor,c.secondaryColor)}),k0(u.icon,`svg-${u.name}`,{className:r,onClick:n,style:o,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true",...s,ref:l})};F0.displayName="IconReact";F0.getTwoToneColors=XG;F0.setTwoToneColors=KG;var _p=F0;function nR(e){let[t,r]=M0(e);return _p.setTwoToneColors({primaryColor:t,secondaryColor:r})}function C4(){let e=_p.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function oR(){return oR=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:r,icon:n,spin:o,rotate:i,tabIndex:a,onClick:s,twoToneColor:l,...c}=e,{prefixCls:u="anticon",rootClassName:f}=ec.useContext(N0),p=(0,w4.default)(f,u,{[`${u}-${n.name}`]:!!n.name,[`${u}-spin`]:!!o||n.name==="loading"},r),g=a;g===void 0&&s&&(g=-1);let h=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[v,y]=M0(l);return ec.createElement("span",oR({role:"img","aria-label":n.name},c,{ref:t,tabIndex:g,onClick:s,className:p}),ec.createElement(_p,{icon:n,primaryColor:v,secondaryColor:y,style:h}))});L0.displayName="AntdIcon";L0.getTwoToneColor=C4;L0.setTwoToneColor=nR;var z0=L0;var W0=E($());function iR(){return iR=Object.assign?Object.assign.bind():function(e){for(var t=1;tW0.createElement(z0,iR({},e,{ref:t,icon:pv})),QG=W0.forwardRef(YG),aR=QG;var B0=E($());function sR(){return sR=Object.assign?Object.assign.bind():function(e){for(var t=1;tB0.createElement(z0,sR({},e,{ref:t,icon:XL})),ZG=B0.forwardRef(JG),lR=ZG;var Ba=E(Or(),1),E4=({value:e,onValueChange:t,options:r,nodeID:n})=>{let o=a=>{if(a.file.status==="done"){let s=a.file.response.name;t?.(s)}},i=mt.graph.nodes.find(a=>a.id===e);return(0,Ba.jsxs)(Wa,{gap:5,align:"stretch",vertical:!0,children:[(0,Ba.jsxs)(Wa,{gap:5,vertical:!0,children:[(0,Ba.jsx)(op,{style:{flex:1},value:e,onChange:a=>{t?.(a)},options:r.map(a=>({label:a.split("/").pop(),value:a}))}),(0,Ba.jsx)(HE,{action:"./api/upload/image",onChange:o,showUploadList:!1,data:a=>({image:a}),children:(0,Ba.jsxs)("button",{type:"button",className:"ant-btn",children:[(0,Ba.jsx)(lR,{})," ",me("upload")]})})]}),e&&(0,Ba.jsx)("img",{src:`./api/view?filename=${e}&type=input&subfolder=${e.startsWith("clipspace/")?"clipspace/":""}&rand=`+Math.random(),width:"100%",style:{aspectRatio:"1/1",objectFit:"contain",cursor:"pointer"},onClick:a=>{mt.constructor.copyToClipspace(mt.graph.nodes.find(s=>s.id===n)),mt.constructor.clipspace_return_node=mt.graph.nodes.find(s=>s.id===n),mt.constructor.open_maskeditor()}})]})};var oa=E(Or(),1),R4=window.comfyAPI.api.api,Zu=class extends O4.default.Component{state={comfyStatus:{sid:"",ssid:"",progress:0,queueSize:0,lastError:"",executingNodeTitle:""},widgetTableStructure:Xe.data.widgetTableStructure,widgetTableValue:Xe.data.widgetTableValue,widgetTableErrors:Xe.data.widgetTableErrors};eventListeners=[];unsubscribes=[];constructor(t){super(t);let r=(a,s)=>{R4.addEventListener(a,s),this.eventListeners.push({event:a,handler:s})};r("progress",({detail:a})=>{if(!a||isNaN(a.value/a.max))return;let s=Math.round(a.value/a.max*100);this.setState({comfyStatus:{...this.state.comfyStatus,progress:s}})}),r("status",a=>{a.detail?.exec_info&&this.setState({comfyStatus:{...this.state.comfyStatus,queueSize:a.detail.exec_info.queue_remaining}})}),r("execution_error",({detail:a})=>{this.setState({comfyStatus:{...this.state.comfyStatus,lastError:a.exception_message,executingNodeTitle:""}})}),r("execution_start",()=>{this.setState({comfyStatus:{...this.state.comfyStatus,lastError:"",progress:0,executingNodeTitle:""}})}),r("executing",a=>{let s=a.detail,l=app.graph.nodes.find(c=>c.id==s);l&&this.setState({comfyStatus:{...this.state.comfyStatus,executingNodeTitle:l.title}})}),r("execution_success",()=>{this.setState({comfyStatus:{...this.state.comfyStatus,progress:0,executingNodeTitle:""}})}),r("execution_interrupted",()=>{this.setState({comfyStatus:{...this.state.comfyStatus,progress:0,executingNodeTitle:""}})});let n=a=>{this.setState({widgetTableStructure:a})};Xe.subscribe("/widgetTableStructure",n);let o=a=>{this.setState({widgetTableValue:a})};Xe.subscribe("/widgetTableValue",o);let i=a=>{this.setState({widgetTableErrors:a})};Xe.subscribe("/widgetTableErrors",i),this.unsubscribes.push(()=>{Xe.unsubscribe(n),Xe.unsubscribe(o),Xe.unsubscribe(i)})}componentWillUnmount(){this.eventListeners.forEach(({event:t,handler:r})=>{R4.removeEventListener(t,r)}),this.unsubscribes.forEach(t=>t())}render(){let t={widgetTableStructure:this.state.widgetTableStructure,widgetTableValue:this.state.widgetTableValue,widgetTableErrors:this.state.widgetTableErrors,onWidgetChange:async(n,o,i,a)=>{let s=app.graph.nodes.find(l=>l.id==n);s&&Zp(s,o,i)},onWidgetRender:(n,o,i,a)=>{if(i.outputType==="number"){let s=i.options?.min??0,l=i.options?.max??100,c=i.options?.step??1;return n.result.push((0,oa.jsx)(w3,{uiWeight:i.uiWeight||12,inputMin:s,inputMax:l,inputStep:c,name:i.name,value:parseFloat(this.state.widgetTableValue[o.id][a]),onValueChange:u=>{t.onWidgetChange(o.id,a,u,o)},extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0}else{if(i.outputType==="combo")return n.result.push((0,oa.jsx)(E3,{uiWeight:i.uiWeight||12,options:i.options?.values||[],name:i.name,onSelectUpdate:s=>{t.onWidgetChange(o.id,a,s,o)},value:this.state.widgetTableValue[o.id][a],extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0;if(i.outputType==="toggle")return n.result.push((0,oa.jsx)(R3,{uiWeight:i.uiWeight||12,name:i.name,value:this.state.widgetTableValue[o.id][a],onValueChange:s=>{t.onWidgetChange(o.id,a,s,o)},extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0;if(i.outputType==="string"||i.outputType==="customtext"||i.outputType==="text")return n.result.push((0,oa.jsx)(_3,{uiWeight:i.uiWeight||12,value:this.state.widgetTableValue[o.id][a],onValueChange:s=>{t.onWidgetChange(o.id,a,s,o)},extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0;if(i.outputType==="PS_LAYER"||i.outputType==="PS_DOCUMENT")return n.result.push((0,oa.jsx)("p",{children:me("only supported in Photoshop")})),!0;if(i.outputType=="IMAGE_PATH"||i.outputType=="MASK_PATH")return n.result.push((0,oa.jsx)(E4,{uiWeight:i.uiWeight||12,value:this.state.widgetTableValue[o.id][a],options:i.options?.values||[],onValueChange:async s=>{t.onWidgetChange(o.id,a,s,o)},nodeID:o.id,extraOptions:this.state.widgetTableStructure.extraOptions},a)),!0}return!0},onTitleRender:(n,o)=>(0,oa.jsx)(P3,{title:n,onTitleChange:i=>{Bn.instance.setNodeTitle({node_id:o.id,title:i})}})},r=12;return(0,oa.jsx)(Na,{theme:{components:{Input:{fontSize:r,colorBgContainer:"var(--p-form-field-background)",colorText:"var(--p-form-field-color)",colorBorder:"var(--p-form-field-border-color)"},Select:{fontSize:r,colorBgContainer:"var(--p-form-field-background)",colorText:"var(--p-form-field-color)",colorBorder:"var(--p-form-field-border-color)",colorBgElevated:"var(--p-form-field-background)",colorTextDescription:"var(--p-form-field-color)",controlItemBgActive:"var(--p-form-field-background)",controlItemBgHover:"var(--p-form-field-border-color)"},Checkbox:{fontSize:r,colorText:"var(--p-form-field-color)"},Radio:{fontSize:r},Slider:{fontSize:r},Switch:{fontSize:r,colorBgContainer:"var(--p-form-field-background)",colorText:"var(--p-form-field-color)"},InputNumber:{fontSize:r,colorBgContainer:"var(--p-form-field-background)",colorText:"var(--p-form-field-color)",colorBorder:"var(--p-form-field-border-color)"}}},children:(0,oa.jsx)(qE,{...t})})}};var An=E(Or(),1),_4=document.createElement("style");_4.innerHTML=GT;document.head.appendChild(_4);function cR({onClose:e,tab:t}){let[r,n]=(0,ef.useState)("1"),[o,i]=(0,ef.useState)(0);return(0,ef.useEffect)(()=>{n(t)},[t]),(0,ef.useEffect)(()=>{let a=document.getElementById("graph-canvas"),s=0,l,c=()=>{if(s++,s%3===0&&a){let u=document.querySelector(".side-bar-panel");u&&u.style.display!=="none"?i(u.clientWidth):i(0)}l=requestAnimationFrame(c)};return l=requestAnimationFrame(c),()=>{cancelAnimationFrame(l)}},[]),(0,An.jsx)(Na,{theme:{token:{colorText:"var(--fg-color)",colorBgContainer:"var(--comfy-input-bg)",colorBgElevated:"var(--comfy-input-bg)",colorFillSecondary:"var(--comfy-input-bg)",controlItemBgHover:"var(--comfy-input-bg)",colorBgTextHover:"var(--comfy-input-bg)",colorBorder:"var(--p-inputtext-border-color)"}},children:(0,An.jsxs)("div",{className:"sdppp-menu-container",style:{paddingLeft:o},children:[(0,An.jsxs)("div",{className:"sdppp-menu-header",children:[(0,An.jsxs)("div",{className:"sdppp-menu-header-left",children:[(0,An.jsx)("button",{onClick:()=>n("1"),className:r==="1"?"active":"",children:me("Simplify Workflow")}),(0,An.jsx)("button",{onClick:()=>n("2"),className:r==="2"?"active":"",children:me("Photoshop")})]}),(0,An.jsx)("span",{children:"Powered by SDPPP"}),(0,An.jsx)("button",{className:"sdppp-menu-close-button",onClick:e,children:(0,An.jsx)(aR,{})})]}),(0,An.jsxs)("div",{className:"sdppp-menu-content",children:[(0,An.jsx)("div",{className:"sdppp-menu-workflow-edit-wrap",style:{display:r==="1"?"block":"none"},children:(0,An.jsx)(Zu,{})}),(0,An.jsx)("div",{className:"sdppp-menu-settings-wrap",style:{display:r==="2"?"block":"none"},children:(0,An.jsx)(b3,{})})]})]})})}var tc=E(Or(),1);function uR({onMaximize:e,onPhotoshop:t}){return(0,tc.jsxs)("div",{className:"sdppp-side-container",children:[(0,tc.jsxs)("div",{className:"sdppp-side-header",children:[(0,tc.jsx)("button",{className:"sdppp-photoshop-icon",onClick:t}),(0,tc.jsx)("button",{className:"pi pi-window-maximize",onClick:e})]}),(0,tc.jsx)(Zu,{})]})}var P4=null,eK=null,fR=null;async function mR(e){if(!P4){let t=document.createElement("div");t.id="sdppp-popup-root",t.style.display="none",document.getElementById("graph-canvas-container")?.prepend(t),e.extensionManager.registerSidebarTab({id:"sdppp",title:"SD-PPP",tooltip:"SD-PPP Workflow UI",icon:"sdppp-side-icon",type:"custom",render:r=>{eK||(r.style.width="100%",r.style.height="auto",r.style.padding="8px",(0,dR.createRoot)(r).render((0,pR.createElement)(uR,{onMaximize:()=>{n("1")},onPhotoshop:()=>{n("2")}}))),t.style.display="none";function n(o){P4?fR.props.tab=o:(fR=(0,pR.createElement)(cR,{onClose:()=>{t.style.display="none"},tab:o}),(0,dR.createRoot)(t).render(fR)),t.style.display="flex",document.querySelector(".sdppp-side-icon")?.parentElement?.click()}}})}}nn.addEventListener("graphChanged",e=>{let r=(mt.workflowManager||mt.extensionManager.workflow).activeWorkflow;if(e.detail.id!==r.activeState.id)return;let n=Xe.data.widgetTableStructure,o=em(mt.graph,r);D4(o,n)&&Xe.setWidgetTableStructure(o),Xe.setWidgetTableValue(gf(mt.graph))});nn.addEventListener("executed",()=>{Xe.setWidgetTableValue(gf(mt.graph))});var T4=0,N4=!0,I4="";function $4(){requestAnimationFrame($4);let e=mt.workflowManager||mt.extensionManager.workflow,t=e.activeWorkflow,r=t?.id||0,n=t?.path||"",o=t?.isPersisted||!0;if(r===T4&&n===I4&&o===N4)return;T4=r,I4=n,N4=o;let i=em(mt.graph,t),a=gf(mt.graph);Xe.setWidgetTableStructure(i),Xe.setWidgetTableValue(a),setTimeout(()=>{if(t!==e.activeWorkflow)return;let s=em(mt.graph,t),l=gf(mt.graph);D4(s,i)&&Xe.setWidgetTableStructure(s),Xe.setWidgetTableValue(l)},800)}requestAnimationFrame($4);function D4(e,t){return e.nodeIndexes.length!==t.nodeIndexes.length||JSON.stringify(e.nodeIndexes)!==JSON.stringify(t.nodeIndexes)||JSON.stringify(e.groups)!==JSON.stringify(t.groups)||JSON.stringify(e.nodes)!==JSON.stringify(t.nodes)}async function tK(e,t,r){t.addEventListener("progress",({detail:s})=>{if(!s||isNaN(s.value/s.max))return;let l=Math.round(s.value/s.max*100);Xe.setProgress(l)}),t.addEventListener("status",s=>{s.detail?.exec_info&&Xe.setQueueSize(s.detail.exec_info.queue_remaining)}),t.addEventListener("execution_error",({detail:s})=>{if(Xe.setExecutingNodeTitle(""),Xe.setLastError(s.exception_message),s.node_id){let l=e.graph.nodes.find(c=>c.id==s.node_id);Xe.setWidgetTableErrors({[s.node_id]:`[${l?.title||s.node_id}]`+s.exception_message})}});let n=[];t.addEventListener("execution_start",({detail:s})=>{if(Xe.setLastError(""),Xe.setWidgetTableErrors({}),Xe.setProgress(0),Xe.setExecutingNodeTitle(""),n.length){let l=n.shift();l&&o.set(s.prompt_id,l)}}),t.addEventListener("executing",s=>{let l=s.detail,c=graph.nodes.find(u=>u.id==l);c&&Xe.setExecutingNodeTitle(c.title)}),t.addEventListener("execution_success",s=>{Xe.setProgress(0),Xe.setExecutingNodeTitle(""),il.get(s.detail.prompt_id)&&il.delete(s.detail.prompt_id)}),t.addEventListener("execution_interrupted",()=>{Xe.setProgress(0),Xe.setExecutingNodeTitle("")});let o=new Map;t.addEventListener("executed",s=>{if(s.detail.output&&Array.isArray(s.detail.output.images)&&s.detail.output.images.length>0){let l=null;if(il.get(s.detail.prompt_id)?l=il.get(s.detail.prompt_id):l=location.search.match(/webview_fromsid=([^&]+)/)?.[1]||"",!l)return;e.graph.nodes.filter(c=>c.type=="Send Images To Photoshop").filter(c=>c.mode==0).length||i?.sendImage(l,{document_identify:Xt.getSpecialDocumentForPreview(),layer_identifies:s.detail.output.images.map(()=>Xt.getSpecialLayerForSend()[0]),boundaries:s.detail.output.images.map(()=>""),image_urls:s.detail.output.images.map(c=>location.origin+"/api/view?type="+c.type+"&filename="+c.filename),new_layer_name:rm(Xe.data.widgetTableStructure.widgetTablePath)})}}),mR(e);var i=new Bn;i.connect(),e.registerExtension({name:"Comfy.SD-PPP",async setup(){},async beforeRegisterNodeDef(s,l,c){try{pO(s,l)}catch(u){Pp.push(u.stack||u.message||u)}}})}var Pp=[];(async function(){if(!(typeof gradioApp<"u")){try{let e=window.comfyAPI?.app?.app,t=window.comfyAPI?.ui?.$el,r=window.comfyAPI?.api?.api;if(!e||!r||!t)throw new Error("comfyAPI is not initialized, maybe comfyUI is too old");await ER(),await tK(e,r,t),import("./sdppp-custom.js").then(n=>{n.default(ia)})}catch(e){Pp.push(e.stack||e.message||e)}await new Promise(e=>setTimeout(e,2e3)),Pp.length&&(console.error(Pp[0]),alert(`sd-ppp init failed: +`+Pp.join(` `)))}})(); /*! Bundled license information: diff --git a/package.json b/package.json index 56224bb..44f34e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sdppp", - "version": "1.8.3", + "version": "1.8.4", "type": "module", "scripts": { "watch": "nodemon -w typescripts -e mjs,js,jsx,mts,ts,tsx,json,css,html -x node typescripts/src/build/index.build.ts", diff --git a/plugins/photoshop/dist/index.js b/plugins/photoshop/dist/index.js index 6ce83f1..d8a4cd5 100644 --- a/plugins/photoshop/dist/index.js +++ b/plugins/photoshop/dist/index.js @@ -1 +1 @@ -"use strict";(()=>{var Uo=Object.create;var ao=Object.defineProperty;var Ho=Object.getOwnPropertyDescriptor;var Fo=Object.getOwnPropertyNames;var Vo=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty;var Y=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var U=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var J=(o,e,t,a)=>{if(e&&typeof e=="object"||typeof e=="function")for(let l of Fo(e))!Ko.call(o,l)&&l!==t&&ao(o,l,{get:()=>e[l],enumerable:!(a=Ho(e,l))||a.enumerable});return o},lo=(o,e,t)=>(J(o,e,"default"),t&&J(t,e,"default")),n=(o,e,t)=>(t=o!=null?Uo(Vo(o)):{},J(e||!o||!o.__esModule?ao(t,"default",{value:o,enumerable:!0}):t,o));var po=U((ee,co)=>{"use strict";co.exports=window.SDPPPInternal});var u=U((ce,mo)=>{"use strict";mo.exports=window.React});var s=U((de,ho)=>{"use strict";ho.exports=window.ReactJSXRuntime});var _o=U((tt,Eo)=>{"use strict";Eo.exports=window.ReactDOMClient});var i={};lo(i,n(po(),1));var j={"SDPPP Get Document":"SDPPP Get Document","SDPPP Get Layer By ID":"SDPPP Get Layer","SDPPP Get Linked Layers":"SDPPP Get Linked Layers","SDPPP Get Layers In Group":"SDPPP Get Layers In Group","SDPPP Get Text From Layer":"SDPPP Get Text From Layer","SDPPP Parse Layer Info":"SDPPP Parse Layer Info","SDPPP Get Selection":"SDPPP Get Selection","SDPPP Get Image From Photoshop":"SDPPP Get Image From Photoshop","SDPPP Send Images To Photoshop":"SDPPP Send Images To Photoshop","SDPPP Settings":"SDPPP Settings/Misc"};var oo={"### Active Document ###":"### \u5F53\u524D\u6587\u6863 ###","### The Canvas ###":"### \u6574\u4E2A\u753B\u5E03 ###","### New Layer ###":"### \u65B0\u56FE\u5C42 ###","### Selected Layer ###":"### \u6240\u9009\u56FE\u5C42 ###","### Keep Size or Fit Canvas ###":"### \u4FDD\u6301\u5C3A\u5BF8\u6216\u9002\u5E94\u753B\u5E03 ###",_SDPPP_PSD_:"_SDPPP_PSD_","Save and run immediately":"\u4FDD\u5B58\u5E76\u7ACB\u5373\u6267\u884C",Close:"\u5173\u95ED","Select a {0}":"\u9009\u62E9\u4E00\u4E2A {0}","How to use .ccx file":"\u5982\u4F55\u4F7F\u7528 .ccx \u6587\u4EF6","1. If you have installed Adobe Creative Cloud":"1. \u5982\u679C\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 Adobe Creative Cloud","Just double click the .ccx file, it will install the plugin automatically":"\u53CC\u51FB .ccx \u6587\u4EF6\uFF0C\u5B83\u4F1A\u81EA\u52A8\u5B89\u88C5","2. If you don't have Adobe Creative Cloud":"2. \u5982\u679C\u4F60\u6CA1\u6709 Adobe Creative Cloud","Rename .ccx to .zip and extract it into ":"\u5C06 .ccx \u91CD\u547D\u540D\u4E3A .zip \u5E76\u89E3\u538B\u5230",or:"\u6216","Photoshop directory":"Photoshop \u5B89\u88C5\u76EE\u5F55","Cannot connect multiple different document widgets with same value":"\u4E0D\u80FD\u8FDE\u63A5\u591A\u4E2A\u5177\u6709\u76F8\u540C\u503C\u7684\u6587\u6863\u5C0F\u90E8\u4EF6","You can only have one SDPPP Settings node in a workflow":"\u4E00\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2A SDPPP Settings \u8282\u70B9","convert widget {0} failed:":"\u63A7\u4EF6{0}\u8F6C\u6362\u5931\u8D25\uFF1A","hidden webview load failed: {0}, please select a browser page to continue":"\u5185\u7F6E webview \u52A0\u8F7D\u5931\u8D25: {0}\uFF0C\u8BF7\u9009\u62E9\u4E00\u4E2A\u6D4F\u89C8\u5668\u9875\u9762\u7EE7\u7EED","SDPPP Get Document":"SDPPP\u83B7\u53D6\u6587\u6863(GetDocument)","SDPPP Get Layer By ID":"SDPPP\u83B7\u53D6\u56FE\u5C42(GetLayer)","SDPPP Get Linked Layers":"SDPPP\u83B7\u53D6\u94FE\u63A5\u56FE\u5C42(GetLinkedLayers)","SDPPP Get Layers In Group":"SDPPP\u83B7\u53D6\u7EC4\u4E2D\u56FE\u5C42(GetLayersInGroup)","SDPPP Get Text From Layer":"SDPPP\u83B7\u53D6\u56FE\u5C42\u6587\u672C(GetTextFromLayer)","SDPPP Parse Layer Info":"SDPPP\u89E3\u6790\u56FE\u5C42\u4FE1\u606F(ParseLayerInfo)","SDPPP Get Selection":"SDPPP\u83B7\u53D6\u9009\u533A(GetSelection)","SDPPP Get Image From Photoshop":"SDPPP\u4ECEPS\u83B7\u53D6\u56FE\u50CF(GetImageFromPhotoshop)","SDPPP Send Images To Photoshop":"SDPPP\u53D1\u9001\u56FE\u50CF\u5230PS(SendImagesToPhotoshop)","SDPPP Send Text To Layer":"SDPPP\u53D1\u9001\u6587\u672C\u5230\u56FE\u5C42(SendTextToLayer)","SDPPP Run Photoshop Action":"SDPPP\u8FD0\u884CPS Action(RunPhotoshopAction)","download PS plugin (.ccx)":"\u4E0B\u8F7D Photoshop \u63D2\u4EF6 (.ccx)","current ComfyUI pageid: {0}":"\u5F53\u524D ComfyUI \u9875\u9762ID: {0}","current A1111 pageid: {0}":"\u5F53\u524D A1111 \u9875\u9762ID: {0}","document linked":"\u6587\u6863\u53C2\u6570\u5DF2\u94FE\u63A5","layer linked":"\u56FE\u5C42\u53C2\u6570\u5DF2\u94FE\u63A5","bound linked":"\u8303\u56F4\u53C2\u6570\u5DF2\u94FE\u63A5",document:"\u6587\u6863",Document:"\u6587\u6863",DOCUMENT:"\u6587\u6863",document_name:"\u6587\u6863\u540D\u5B57id",layer_nameid:"\u56FE\u5C42\u540D\u5B57id",layer_name:"\u56FE\u5C42\u540D\u5B57",layer_info:"\u56FE\u5C42\u4FE1\u606F",bound_top:"\u8303\u56F4\u4E0A\u8FB9\u8DDD",bound_left:"\u8303\u56F4\u5DE6\u8FB9\u8DDD",bound_width:"\u8303\u56F4\u5BBD\u5EA6",bound_height:"\u8303\u56F4\u9AD8\u5EA6",center_x:"\u4E2D\u5FC3\u70B9x",center_y:"\u4E2D\u5FC3\u70B9y",opacity:"\u900F\u660E\u5EA6",layer:"\u56FE\u5C42",layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",Layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",bound:"\u8303\u56F4",bounds:"\u8303\u56F4","bounds [optional]":"\u8303\u56F4[\u53EF\u9009]",boundary:"\u8303\u56F4",Boundary:"\u8303\u56F4",canvas_boundary:"\u753B\u5E03\u8303\u56F4",canvas_bound:"\u753B\u5E03\u8303\u56F4",layer_boundary:"\u56FE\u5C42\u8303\u56F4",layer_bound:"\u56FE\u5C42\u8303\u56F4","Photoshop Disconnected!":"Photoshop \u672A\u8FDE\u63A5\uFF01",rgb_out:"RGB\u8F93\u51FA",alpha_out:"Alpha\u8F93\u51FA",images:"\u56FE\u50CF",text:"\u6587\u672C",ID_mode:"\u7CBE\u786EID\u6A21\u5F0F",name_mode:"\u540D\u5B57\u5339\u914D\u6A21\u5F0F",select:"\u9009\u62E9","document boundary":"\u6587\u6863\u8303\u56F4","layer boundary":"\u56FE\u5C42\u8303\u56F4","selection boundary":"\u9009\u4E2D\u8303\u56F4","save .psd to this workflow":"\u4FDD\u5B58.psd\u5230\u8FD9\u4E2A\u5DE5\u4F5C\u6D41","extract saved .psd to Photoshop":"\u63D0\u53D6\u4FDD\u5B58\u7684.psd\u5230Photoshop","sample .psd":"\u793A\u4F8B.psd",mask:"\u906E\u7F69",name:"\u540D\u79F0",quality:"\u56FE\u50CF\u8D28\u91CF",Runner:"\u8FD0\u884C\u8F7D\u4F53","PS Webview":"PS \u5185\u7F6E\u7F51\u9875","Browser {0}":"\u6D4F\u89C8\u5668\u9875\u9762 {0}",timeout:"\u8D85\u65F6","Loading...":"\u52A0\u8F7D\u4E2D...","--multi-user Not Login!":"--multi-user\u5DF2\u6FC0\u6D3B\uFF0C\u4F46\u672A\u767B\u5F55\uFF01",Logout:"\u767B\u51FA","User: ":"\u7528\u6237: ",connect:"\u8FDE\u63A5",connected:"\u5DF2\u8FDE\u63A5",disconnect:"\u65AD\u5F00",disconnected:"\u5DF2\u65AD\u5F00\u8FDE\u63A5","reconnecting...":"\u91CD\u8FDE\u4E2D...",connecting:"\u8FDE\u63A5\u4E2D",webpages:"\u7F51\u9875\u5217\u8868",workflows:"\u5DE5\u4F5C\u6D41",workflow:"\u5DE5\u4F5C\u6D41","auto run page [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u9875\u9762 {0}..","auto run workflow [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41 {0}..","auto run workflow after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41..",selection_only:"\u4EC5\u9009\u533A","Queue:":"\u961F\u5217:","Set As:":"\u8BBE\u7F6E\u4E3A:","Error {0}... please contact me via Discord/Github":"\u51FA\u73B0\u9519\u8BEF {0}...\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211","Webview initialize failed. Please report to me via Discord/Github with your ComfyURL, Operate System":"Webview \u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211\u5E76\u9644\u4E0A\u4F60\u7684Comfy\u5730\u5740\u3001\u64CD\u4F5C\u7CFB\u7EDF","ComfyUI with --multi-user is only available for sponsors":'\u5E26"--multi-user"\u7684ComfyUI\u4EC5\u5BF9\u8D5E\u52A9\u8005\u5F00\u653E',"Workflow Runner is loading...":"\u8FD0\u884C\u8F7D\u4F53\u5C1A\u5728\u52A0\u8F7D...","(Page ID: {0})Queue: {1}":"(\u9875\u9762ID: {0}) \u961F\u5217\u957F\u5EA6 {1}","no suitable node to control in this workflow":"\u8FD9\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u6CA1\u6709\u80FD\u63A7\u5236\u7684\u8282\u70B9",Save:"\u4FDD\u5B58",Edit:"\u7F16\u8F91","Edit in ComfyUI":"\u5728 ComfyUI \u4E2D\u7F16\u8F91","using browser page [{0}] for workflow running":"\u6B63\u63A5\u7BA1\u7F51\u9875 [{0}] \u8FD0\u884C\u5DE5\u4F5C\u6D41","workflow running by hidden webview":"\u5DE5\u4F5C\u6D41\u5728\u9690\u85CF\u7684webview\u4E2D\u8FD0\u884C","Lock Image":"\u9501\u5B9A\u56FE\u50CF","Unlock Image":"\u89E3\u9501\u56FE\u50CF","search...":"\u641C\u7D22...","disabled when running in browser page":"\u63A5\u7BA1\u7F51\u9875\u65F6\u4E0D\u53EF\u7528","only supported in Photoshop":"\u4EC5\u5728 Photoshop \u4E2D\u652F\u6301",Login:"\u767B\u5F55","Invitation Code":"\u9080\u8BF7\u7801",Username:"\u7528\u6237\u540D",Password:"\u5BC6\u7801","Please input invitation code":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","Please input username":"\u8BF7\u8F93\u5165\u7528\u6237\u540D","Please input password":"\u8BF7\u8F93\u5165\u5BC6\u7801","Open more ComfyUI pages to see more options here":"\u6253\u5F00\u66F4\u591A ComfyUI \u9875\u9762\u4EE5\u67E5\u770B\u66F4\u591A\u9009\u9879","Comfy multi-user: ":"Comfy \u591A\u7528\u6237: ","Not Login":"\u672A\u767B\u5F55","Comfy API-Key: ":"Comfy API-Key: ","Login/Auth":"\u767B\u5F55/\u8BA4\u8BC1","Logged in by email/password":"\u5DF2\u901A\u8FC7\u90AE\u7BB1/\u5BC6\u7801\u767B\u5F55","Set API Key":"\u8BBE\u7F6E API Key","Please input API key (will reload Runner)":"\u8BF7\u8F93\u5165 API Key (\u4F1A\u91CD\u542F\u8FD0\u884C\u8F7D\u4F53)","### Active Workflow ###":"### \u5F53\u524D\u5DE5\u4F5C\u6D41 ###","### Example SDXL ###":"### \u793A\u4F8BSDXL\u5DE5\u4F5C\u6D41 ###","Open ComfyUI in the browser to see more options":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00 ComfyUI \u4EE5\u5F97\u5230\u66F4\u591A\u9009\u9879","502: Maybe the server is not running":"502: \u670D\u52A1\u5668\u53EF\u80FD\u672A\u8FD0\u884C","404: Maybe SDPPP is not installed or failed to run in ComfyUI":"404: \u53EF\u80FD\u5728ComfyUI\u4E2DSDPPP\u672A\u5B89\u88C5\u6216\u8FD0\u884C\u5931\u8D25","{0}. reconnecting...":"{0}. \u91CD\u8FDE\u4E2D...","disconnected to {0} failed {1}":"\u65AD\u5F00\u8FDE\u63A5 {0} \u9519\u8BEF {1}","version mismatch, please reinstall PS plugin":"\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5 PS \u63D2\u4EF6","instance type not recognized":"\u672A\u8BC6\u522B\u7684\u8F6F\u4EF6\u7C7B\u578B","Error: {0}":"\u9519\u8BEF: {0}","Verification Error":"\u9A8C\u8BC1\u9519\u8BEF","document {0} not found":"\u627E\u4E0D\u5230\u6587\u6863: {0}",'only layer kind "TEXT" is supported, invalid layer: {0}':"\u4E0D\u652F\u6301\u975E\u6587\u672C\u56FE\u5C42: {0}","create layer failed":"\u521B\u5EFA\u56FE\u5C42\u5931\u8D25","layer not found {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","no linked layer for {0}":"\u6CA1\u6709\u94FE\u63A5\u56FE\u5C42: {0}","layer {0} is not a group":"\u56FE\u5C42 {0} \u4E0D\u662F\u4E00\u4E2A\u7EC4","no layer in group {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u56FE\u5C42","layer not found: {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","No upload_name":"\u4E0A\u4F20\u63A5\u53E3\u8FD4\u56DE\u4E86\u5931\u8D25","get pixel of {0} failed":"\u83B7\u53D6\u50CF\u7D20\u5931\u8D25: {0}","merge group failed":"\u5408\u5E76\u7EC4\u5931\u8D25","invalid name: {0}":"\u975E\u6CD5\u7684\u540D\u79F0: {0}","get_layer_info: layer_identify required":"get_layer_info: \u9700\u8981 layer_identify","invalid action: {0}":"\u65E0\u6548\u7684\u64CD\u4F5C: {0}","create document failed":"\u521B\u5EFA\u6587\u6863\u5931\u8D25","create document for preview":"\u521B\u5EFA\u9884\u89C8\u6587\u6863","resize document for preview":"\u8C03\u6574\u9884\u89C8\u6587\u6863\u5C3A\u5BF8","no first related layer in {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u7B2C\u4E00\u4E2A\u76F8\u5173\u56FE\u5C42","imageDataError: data length is not multiple of width * height":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: \u6570\u636E\u957F\u5EA6\u4E0D\u662F\u5BBD\u5EA6 * \u9AD8\u5EA6\u7684\u500D\u6570","imageDataError: originComponents must be 1 or 3":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: originComponents \u5FC5\u987B\u662F 1 \u6216 3","unexpected connection lost, please try to reconnect":"\u610F\u5916\u65AD\u5F00\u8FDE\u63A5\uFF0C\u8BF7\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5","Workflow list is empty, please save a workflow by Comfy's lastest UI":"\u5DE5\u4F5C\u6D41\u5217\u8868\u4E3A\u7A7A\uFF0C\u8BF7\u5728Comfy\u7684\u65B0\u7248UI\u4E2D\u4FDD\u5B58\u4E00\u4E2A\u5DE5\u4F5C\u6D41","No opened ComfyUI pages":"\u6CA1\u6709\u5DF2\u6253\u5F00\u7684ComfyUI\u9875\u9762","comfyAPI is not initialized, maybe comfyUI is too old":"\u65E0\u6CD5\u83B7\u53D6 ComfyAPI\uFF0C\u53EF\u80FD ComfyUI \u7248\u672C\u592A\u65E7","unsupported channel counts: {0}":"\u4E0D\u652F\u6301\u7684\u901A\u9053\u6570: {0}","Timeout, Maybe the URL is wrong":"\u8D85\u65F6\uFF0C\u53EF\u80FD comfy\u5730\u5740 \u586B\u5199\u9519\u8BEF","Workflow list loading failed: {0}":"\u5DE5\u4F5C\u6D41\u5217\u8868\u52A0\u8F7D\u5931\u8D25: {0}","Please register a user in ComfyUI":"\u8BF7\u5728 ComfyUI \u4E2D\u6CE8\u518C\u4E00\u4E2A\u7528\u6237","GetSelection need Photoshop version 25+":"GetSelection \u9700\u8981 Photoshop 25+ \u7248\u672C","Action {0} not found":"Action {0} \u672A\u627E\u5230","Action set {0} not found":"ActionSet {0} \u672A\u627E\u5230","{0} cannot be used in Photoshop Action Node":"{0} \u4E0D\u80FD\u5728 Photoshop Action \u8282\u70B9\u4E2D\u4F7F\u7528","Group layers":"\u56FE\u5C42\u7EC4","Show All Groups":"\u663E\u793A\u6240\u6709\u7EC4","create document for sent images":"\u7ED9\u53D1\u9001\u7684\u56FE\u7247\u521B\u5EFA\u6587\u6863","show sent images":"\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","fallback show sent images":"\u53D6\u6D88\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","get content of layer {0}":"\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","fallback get content of layer {0}":"\u53D6\u6D88\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","get layer info":"\u83B7\u53D6\u56FE\u5C42\u4FE1\u606F","sdppp extract PSD":"sdppp \u5BFC\u5165 PSD","sdppp get PSD":"sdppp \u83B7\u53D6 PSD","set text to layer":"\u8BBE\u7F6E\u56FE\u5C42\u7684\u6587\u672C","run Photoshop Action":"sdppp \u8FD0\u884C Photoshop Action","select layer":"sdppp \u9009\u4E2D\u56FE\u5C42","{0} wants to extract a PSD file to Photoshop, are you sure?":"{0} \u60F3\u8981\u91CA\u653E\u4E00\u4E2A.psd\u6587\u4EF6\u5230Photoshop\uFF0C\u786E\u5B9A\u5417\uFF1F","should sdppp refuse extracting PSD to Photoshop in this session anymore?":"\u662F\u5426\u8981\u8BA9 sdppp \u62D2\u7EDD\u672C\u6B21PS\u4F1A\u8BDD\u518D\u6B21\u63A5\u53D7.psd\u91CA\u653E\u8BF7\u6C42\uFF1F","Wide Mode":"\u5BBD\u5C4F\u6A21\u5F0F","Quick Set":"\u5FEB\u901F\u8BBE\u7F6E","Selected Layer":"\u9009\u4E2D\u56FE\u5C42","Selected Layer (invert)":"\u9009\u4E2D\u56FE\u5C42(\u53CD\u5411)",Canvas:"\u753B\u5E03",Selection:"\u9009\u533A",Manual:"\u624B\u52A8\u6A21\u5F0F",Auto:"\u81EA\u52A8\u6A21\u5F0F","This plugin is based on sd-ppp":"\u672C\u63D2\u4EF6\u57FA\u4E8Esd-ppp\u5F00\u53D1","And follows its open source license:":"\u5E76\u9075\u5FAA\u5176\u5F00\u6E90\u534F\u8BAE\uFF1A",Cloud:"\u4E91\u7AEF\u63A8\u8350",Sponsors:"\u8D5E\u52A9","waiting...":"\u865A\u4F4D\u4EE5\u5F85",Links:"\u53CB\u60C5\u94FE\u63A5",Community:"\u793E\u533A","LICENSE:":"\u8BB8\u53EF\u8BC1\uFF1A","Official Site":"\u5B98\u65B9\u7F51\u7AD9",upload:"\u4E0A\u4F20","Simplify Workflow":"\u7B80\u5316\u5DE5\u4F5C\u6D41",Photoshop:"Photoshop","Photoshop plugin settings":"Photoshop \u63D2\u4EF6\u8BBE\u7F6E","Photoshop plugin":"Photoshop \u63D2\u4EF6","SDPPP Settings/Misc":"SDPPP \u8BBE\u7F6E/\u6742\u9879","Sample .PSD for this workflow:":"\u793A\u4F8B.PSD","Download Example .PSD":"\u4E0B\u8F7D\u793A\u4F8B.PSD","Maximum Image Size (px):":"\u6700\u5927\u56FE\u50CF\u5C3A\u5BF8(px)",Download:"\u4E0B\u8F7D",Upload:"\u4E0A\u4F20",Reset:"\u91CD\u7F6E",Refresh:"\u5237\u65B0","Comfy URL (You can copy it to connect ComfyUI in the plugin):":"Comfy\u5730\u5740(\u4F60\u53EF\u4EE5\u590D\u5236\u5B83\u5230\u63D2\u4EF6\u4E2D\u8FDE\u63A5ComfyUI):","use slider for number widget:":"\u6570\u5B57\u63A7\u4EF6\u4F7F\u7528\u6ED1\u5757","Photoshop is not connected":"Photoshop \u672A\u8FDE\u63A5","select...":"\u8BF7\u9009\u62E9","click to edit":"\u70B9\u51FB\u7F16\u8F91","ComfyManager not found, cannot reboot":"Comfy Manager\u672A\u5B89\u88C5\uFF0C\u65E0\u6CD5\u91CD\u542F","Failed to reboot ComfyUI":"\u91CD\u542FComfyUI\u5931\u8D25"};var uo=typeof Y<"u"?Y:void 0,eo="en";typeof navigator<"u"&&navigator.language?eo=navigator.language=="zh-CN"?"zhcn":"en":uo&&(eo=uo("uxp").host.uiLocale.startsWith("zh")?"zhcn":"en");function h(o,...e){let t=eo=="zhcn"?oo[o]:o in j?j[o]:o;if(!t)throw new Error(`i18n key not found: ${o}`);return t.replace(/{(\d+)}/g,function(a,l){return typeof e[l]<"u"?e[l]:a})}function fo(o){return o in oo}var Po=n(u(),1),wo=n(s(),1),C=class extends Po.default.Component{render(){return(0,wo.jsx)("div",{className:`action-button ${this.props.highlight?"highlight":""}`,onClick:this.props.onClick,children:this.props.children})}};var go=n(u(),1),H=n(s(),1),R=class extends go.default.Component{render(){let e=this.props.size||1;return(0,H.jsx)("div",{slot:"icon",className:"sdppp-icon",onClick:this.props.onClick,children:(0,H.jsx)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,H.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.854 2.146l-2-2a.5.5 0 00-.708 0l-1.5 1.5-8.995 8.995a.499.499 0 00-.143.268L.012 13.39a.495.495 0 00.135.463.5.5 0 00.462.134l2.482-.496a.495.495 0 00.267-.143l8.995-8.995 1.5-1.5a.5.5 0 000-.708zM12 3.293l.793-.793L11.5 1.207 10.707 2 12 3.293zm-2-.586L1.707 11 3 12.293 11.293 4 10 2.707zM1.137 12.863l.17-.849.679.679-.849.17z"})})})}};var vo=n(u(),1),F=n(s(),1),z=class extends vo.default.Component{render(){let e=this.props.size||1;return(0,F.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,F.jsx)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,F.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M6.586 3.504l-1.5-1.5H1v9h12v-7.5H6.586zm.414-1L5.793 1.297a1 1 0 00-.707-.293H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-8.5a.5.5 0 00-.5-.5H7z"})})})}};var yo=n(u(),1),S=n(s(),1),g=class extends yo.default.Component{render(){let e=this.props.size||1;return(0,S.jsx)("div",{slot:"icon",className:"sdppp-icon",onClick:this.props.onClick,children:(0,S.jsxs)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,S.jsx)("path",{fill:"currentColor",d:"M5.5 1A.5.5 0 005 .5H2a.5.5 0 000 1h1.535a6.502 6.502 0 002.383 11.91.5.5 0 10.165-.986A5.502 5.502 0 014.5 2.1V4a.5.5 0 001 0V1.353a.5.5 0 000-.023V1zM7.507 1a.5.5 0 01.576-.41 6.502 6.502 0 012.383 11.91H12a.5.5 0 010 1H9a.5.5 0 01-.5-.5v-3a.5.5 0 011 0v1.9A5.5 5.5 0 007.917 1.576.5.5 0 017.507 1z"}),(0,S.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M6.2 9.08L9.068 7 6.2 4.92v4.16zM5 4.214v5.574a.8.8 0 001.212.686l4.445-2.787a.8.8 0 000-1.372L6.212 3.527A.8.8 0 005 4.213z"})]})})}};var Co=n(u(),1),V=n(s(),1),v=class extends Co.default.Component{render(){let e=this.props.size||1;return(0,V.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,V.jsx)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,V.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M4.2 10.88L10.668 7 4.2 3.12v7.76zM3 2.414v9.174a.8.8 0 001.212.686l7.645-4.587a.8.8 0 000-1.372L4.212 1.727A.8.8 0 003 2.413z"})})})}};var c=n(s(),1),K=.6,M={LIST_ITEM:"client-list-item",LIST_ITEM_LEFT:"client-list-item-left",LIST_ITEM_RIGHT:"client-list-item-right",TIPS_ICON:"tips-icon",CHECKED:"checked"},to=({isChecked:o=!1,children:e,rightContent:t,onClick:a})=>(0,c.jsxs)("li",{className:`${M.LIST_ITEM}${o?` ${M.CHECKED}`:""}`,onClick:a,children:[(0,c.jsx)("sp-label",{className:M.LIST_ITEM_LEFT,children:e}),t&&(0,c.jsx)("div",{className:M.LIST_ITEM_RIGHT,children:t})]}),no=({path:o,dirname:e,onDirectorySet:t})=>(0,c.jsxs)(to,{onClick:()=>{if(o==="../"){let l=e||"",p=l.lastIndexOf("/");t?.(p===-1?"":l.slice(0,p))}else t?.(o)},children:[(0,c.jsx)(z,{size:K}),(0,c.jsx)("div",{style:{marginLeft:3},children:o.slice(0,-1).split("/").pop()})]}),So=({isChecked:o,onEdit:e,onAutoRun:t,onRun:a})=>(0,c.jsxs)(c.Fragment,{children:[(0,c.jsx)("div",{className:M.TIPS_ICON,children:(0,c.jsx)(R,{size:K,onClick:e})}),t&&(0,c.jsx)(C,{highlight:o,onClick:t,children:(0,c.jsx)(g,{size:K})}),(0,c.jsx)(C,{onClick:a,children:(0,c.jsx)(v,{size:K})})]}),ko=({path:o,isChecked:e,workflow:t,onRun:a,setEditorMode:l})=>{let{setAutoRunning:p,workflowAgentSID:P}=(0,i.useSDPPPContext)(),{openWorkflow:m}=(0,i.useSDPPPComfyCaller)(),w=()=>{l(!0),m(P,t.path)};return(0,c.jsx)(to,{isChecked:e,rightContent:(0,c.jsx)(So,{isChecked:e,onEdit:w,onAutoRun:()=>{p(e?null:{type:"workflow",value:o})},onRun:()=>a(t.path)}),onClick:w,children:t.error?t.error.replace("sdppp PS side error:",""):t.path.split("/").pop()})},io=({onRun:o,path:e,title:t,setEditorMode:a})=>{let{openWorkflow:l}=(0,i.useSDPPPComfyCaller)(),{workflowAgentSID:p}=(0,i.useSDPPPContext)(),P=async()=>{e&&await l(p,e),a(!0)};return(0,c.jsx)(to,{rightContent:(0,c.jsx)(So,{onEdit:P,onRun:o}),onClick:P,children:t})};var f=n(s(),1),Oo=({setEditorMode:o})=>{let{autoRunning:e,workflowAgentSID:t}=(0,i.useSDPPPContext)(),{runWorkflow:a,runPage:l}=(0,i.useSDPPPComfyCaller)(),{workflows:p,workflowsError:P,currentViewingDirectory:m,setCurrentViewingDirectory:w,showingList:G}=(0,i.useSDPPPWorkflowList)(),so=null;return P?(0,f.jsx)("div",{className:"workflow-list",children:(0,f.jsx)("sp-label",{children:P})}):(0,f.jsxs)("div",{className:"workflow-list",children:[(0,f.jsxs)("ul",{className:"client-list",children:[m?(0,f.jsx)(no,{path:"../",dirname:m.slice(0,-1),onDirectorySet:B=>{w(B)}},m):null,G.map(B=>{let y=B.path,Go=p[y],Bo=e?.value==y;return B.isDir?(0,f.jsx)(no,{path:y,dirname:m.slice(0,-1),onDirectorySet:Z=>{w(Z)}},y):(0,f.jsx)(ko,{setEditorMode:o,path:y,isChecked:Bo,workflow:Go,onRun:async Z=>{await a(Z)}},y)})]}),(0,f.jsx)("sp-divider",{}),(0,f.jsxs)("ul",{className:"client-list",children:[(0,f.jsx)(io,{setEditorMode:o,path:"",title:h("### Active Workflow ###"),onRun:async()=>{await l(t)}}),(0,f.jsx)(io,{setEditorMode:o,path:"sdppp://Sample_SDXL.json",title:h("### Example SDXL ###"),onRun:async()=>{await l(t)}})]}),e?.type=="workflow"?(0,f.jsx)("sp-label",{class:"autorun-desc",children:h("auto run workflow [{0}] after change..",p[e?.value]?.path)}):""]})},bo=Oo;var A=n(u(),1);var x=n(u(),1);var Io=n(u(),1),O=n(s(),1),N=class extends Io.default.Component{render(){let e=this.props.size||1;return(0,O.jsx)("div",{slot:"icon",className:"sdppp-icon",onClick:this.props.onClick,children:(0,O.jsx)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,O.jsx)("path",{fill:"currentColor",d:"M7.092.5H7a6.5 6.5 0 106.41 7.583.5.5 0 10-.986-.166A5.495 5.495 0 017 12.5a5.5 5.5 0 010-11h.006a5.5 5.5 0 014.894 3H10a.5.5 0 000 1h3a.5.5 0 00.5-.5V2a.5.5 0 00-1 0v1.535A6.495 6.495 0 007.092.5z"})})})}};var Do=n(u(),1),k=n(s(),1),E=class extends Do.default.Component{render(){return(0,k.jsx)("div",{slot:"icon",className:"sdppp-icon",style:{strokeWidth:1},children:(0,k.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,k.jsx)("path",{d:"M11.083 12.25H2.917a1.167 1.167 0 01-1.167-1.167V2.917A1.167 1.167 0 012.917 1.75h6.416l2.917 2.917v6.416a1.167 1.167 0 01-1.167 1.167z"}),(0,k.jsx)("path",{d:"M9.917 12.25V7.583H4.083v4.667M4.083 1.75v2.917H8.75"})]})})}};var Lo=n(u(),1),b=n(s(),1),Q=class extends Lo.default.Component{render(){return(0,b.jsxs)("div",{slot:"icon",className:"sdppp-icon",children:[(0,b.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,b.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M5.2 10.88L11.668 7 5.2 3.12v7.76zM4 2.414v9.174a.8.8 0 001.212.686l7.645-4.587a.8.8 0 000-1.372L5.212 1.727A.8.8 0 004 2.413zM1.5 1.6a.6.6 0 01.6.6v9.6a.6.6 0 11-1.2 0V2.2a.6.6 0 01.6-.6z"}),(0,b.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M.963 1.932a.6.6 0 01.805-.268l1 .5a.6.6 0 01-.536 1.073l-1-.5a.6.6 0 01-.269-.805zM3.037 11.132a.6.6 0 01-.269.805l-1 .5a.6.6 0 01-.536-1.073l1-.5a.6.6 0 01.805.268z"})]}),this.props.count]})}};var xo=n(u(),1),I=n(s(),1),_=class extends xo.default.Component{render(){return(0,I.jsx)("div",{slot:"icon",className:"sdppp-icon",style:{strokeWidth:1},children:(0,I.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,I.jsx)("path",{transform:"scale(0.7)",fillRule:"evenodd",clipRule:"evenodd",d:"M14 7A7 7 0 100 7a7 7 0 0014 0zm-6.535 5.738c-.233.23-.389.262-.465.262-.076 0-.232-.032-.465-.262-.238-.234-.497-.623-.737-1.182-.434-1.012-.738-2.433-.79-4.056h3.984c-.052 1.623-.356 3.043-.79 4.056-.24.56-.5.948-.737 1.182zM8.992 6.5H5.008c.052-1.623.356-3.044.79-4.056.24-.56.5-.948.737-1.182C6.768 1.032 6.924 1 7 1c.076 0 .232.032.465.262.238.234.497.623.737 1.182.434 1.012.738 2.433.79 4.056zm1 1c-.065 2.176-.558 4.078-1.282 5.253A6.005 6.005 0 0012.98 7.5H9.992zm2.987-1H9.992c-.065-2.176-.558-4.078-1.282-5.253A6.005 6.005 0 0112.98 6.5zm-8.971 0c.065-2.176.558-4.078 1.282-5.253A6.005 6.005 0 001.02 6.5h2.988zm-2.987 1a6.005 6.005 0 004.27 5.253C4.565 11.578 4.072 9.676 4.007 7.5H1.02z"}),(0,I.jsx)("path",{transform:"scale(0.5) translate(12, 12)",fillRule:"evenodd",clipRule:"evenodd",d:"M13.854 2.146l-2-2a.5.5 0 00-.708 0l-1.5 1.5-8.995 8.995a.499.499 0 00-.143.268L.012 13.39a.495.495 0 00.135.463.5.5 0 00.462.134l2.482-.496a.495.495 0 00.267-.143l8.995-8.995 1.5-1.5a.5.5 0 000-.708zM12 3.293l.793-.793L11.5 1.207 10.707 2 12 3.293zm-2-.586L1.707 11 3 12.293 11.293 4 10 2.707zM1.137 12.863l.17-.849.679.679-.849.17z"})]})})}};var Ao=n(u(),1),D=n(s(),1),$=class extends Ao.default.Component{render(){return(0,D.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,D.jsxs)("svg",{width:this.props.size||20,height:this.props.size||20,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,D.jsx)("path",{d:"M11.7879 2.2121C12.0732 2.49737 12.0732 2.96723 11.7879 3.2525L3.2525 11.7879C2.96723 12.0732 2.49737 12.0732 2.2121 11.7879C1.92684 11.5026 1.92684 11.0328 2.2121 10.7475L10.7475 2.2121C11.0328 1.92684 11.5026 1.92684 11.7879 2.2121Z",fill:"currentColor"}),(0,D.jsx)("path",{d:"M2.2121 2.2121C2.49737 1.92684 2.96723 1.92684 3.2525 2.2121L11.7879 10.7475C12.0732 11.0328 12.0732 11.5026 11.7879 11.7879C11.5026 12.0732 11.0328 12.0732 10.7475 11.7879L2.2121 3.2525C1.92684 2.96723 1.92684 2.49737 2.2121 2.2121Z",fill:"currentColor"})]})})}};var Ro=n(u(),1),q=n(s(),1),X=class extends Ro.default.Component{render(){return(0,q.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,q.jsx)("svg",{width:this.props.size||20,height:this.props.size||20,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,q.jsx)("path",{d:"M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11z",fill:"currentColor"})})})}};var zo=n(u(),1),L=n(s(),1),W=class extends zo.default.Component{render(){return(0,L.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,L.jsxs)("svg",{width:this.props.size||20,height:this.props.size||20,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,L.jsx)("path",{d:"M2.35 10.95L3.05 11.65L11.65 3.05L10.95 2.35L2.35 10.95Z",fill:"currentColor"}),(0,L.jsx)("path",{d:"M7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7C14 10.866 10.866 14 7 14ZM7 13C10.3137 13 13 10.3137 13 7C13 3.68629 10.3137 1 7 1C3.68629 1 1 3.68629 1 7C1 10.3137 3.68629 13 7 13Z",fill:"currentColor"})]})})}};var r=n(s(),1),Qo=()=>{let{workflowAgentSID:o,autoRunning:e}=(0,i.useSDPPPContext)(),{lastError:t,progress:a,executingNodeTitle:l}=(0,i.useAgentState)(o);return(0,r.jsxs)("div",{className:"workflow-run-status",children:[e?(0,r.jsx)("sp-label",{children:h("auto run workflow after change..")}):"",t?(0,r.jsx)("sp-label",{class:"error-label",children:t}):"",l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("sp-label",{children:`${a}% ${l}...`}),(0,r.jsx)("sp-progressbar",{value:a/100})]}):""]})},$o=()=>{let{workflowAgentSID:o}=(0,i.useSDPPPContext)(),{saveWorkflow:e,reopenWorkflow:t}=(0,i.useSDPPPComfyCaller)(),a=(0,x.useCallback)(async()=>{await e(o)},[e,o]);return(0,r.jsx)("sp-action-button",{onClick:a,children:(0,r.jsx)(E,{})})};var qo=()=>{let{interrupt:o}=(0,i.useSDPPPComfyCaller)(),{clearQueue:e}=(0,i.useSDPPPComfyCaller)(),t=(0,x.useCallback)(async()=>{await e(),await o()},[e,o]);return(0,r.jsx)("sp-action-button",{onClick:t,children:(0,r.jsx)(W,{})})},Xo=()=>{let{workflowAgentSID:o}=(0,i.useSDPPPContext)(),{reopenWorkflow:e}=(0,i.useSDPPPComfyCaller)(),t=(0,x.useCallback)(()=>{e(o)},[e,o]);return(0,r.jsx)("sp-action-button",{onClick:t,children:(0,r.jsx)(N,{})})};var Zo=()=>{let{workflowAgentSID:o,autoRunning:e,setAutoRunning:t}=(0,i.useSDPPPContext)();return(0,r.jsx)("sp-action-button",{class:e?.value==o?"highlight":"",onClick:()=>{e?.value==o?t(null):t({type:"page",value:o})},children:(0,r.jsx)(g,{})})},Jo=()=>{let{workflowAgentSID:o,webviewAgentSID:e,toggleWebviewDialog:t}=(0,i.useSDPPPContext)(),a=o==e;return(0,r.jsx)("sp-action-button",{...a?{}:{disabled:!0},onClick:()=>{t()},title:a?h("Edit in ComfyUI"):h("disabled when running in browser page"),children:(0,r.jsx)(_,{})})},Yo=()=>{let{workflowAgentSID:o}=(0,i.useSDPPPContext)(),{runPage:e}=(0,i.useSDPPPComfyCaller)();return(0,r.jsx)("sp-action-button",{onClick:()=>{e(o)},children:(0,r.jsx)(v,{})})},jo=()=>{let{workflowAgentSID:o}=(0,i.useSDPPPContext)(),{runPage:e}=(0,i.useSDPPPComfyCaller)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"action-button",onClick:()=>{e(o,2)},children:"x2"}),(0,r.jsx)("div",{className:"action-button",onClick:()=>{e(o,5)},children:"x5"}),(0,r.jsx)("div",{className:"action-button",onClick:()=>{e(o,9)},children:"x9"})]})};function Mo({WorkflowEditPhotoshop:o}){let{workflowAgentSID:e}=(0,i.useSDPPPContext)(),{ssid:t,queueSize:a}=(0,i.useAgentState)(e);return(0,x.useMemo)(()=>(0,r.jsxs)("div",{className:"workflow-edit-wrap",children:[(0,r.jsx)("div",{className:"workflow-edit-top",children:(0,r.jsxs)("div",{className:"workflow-edit-controls",children:[(0,r.jsxs)("div",{className:"workflow-edit-controls-left",children:[(0,r.jsxs)("div",{className:"workflow-edit-button-line workflow-edit-button-lineone",children:[(0,r.jsxs)("div",{className:"workflow-edit-button-line-left",children:[(0,r.jsx)($o,{}),(0,r.jsx)(Xo,{})]}),(0,r.jsxs)("div",{className:"workflow-edit-button-line-right",children:[(0,r.jsx)(qo,{}),(0,r.jsx)(Zo,{})]})]}),(0,r.jsxs)("div",{className:"workflow-edit-button-line workflow-edit-controls-linetwo",children:[(0,r.jsx)(Qo,{}),(0,r.jsx)(Jo,{})]})]}),(0,r.jsx)("div",{className:"workflow-edit-controls-center",children:(0,r.jsx)(Yo,{})}),(0,r.jsx)("div",{className:"workflow-edit-controls-right",children:(0,r.jsx)(jo,{})})]})}),(0,r.jsx)("sp-divider",{}),(0,r.jsx)(o,{})]}),[t,a])}var d=n(s(),1);function No({connectState:o,AddressBar:e,WorkflowEditPhotoshop:t}){let[a,l]=(0,A.useState)(!1),{workflowAgentSID:p,webviewAgentSID:P,lastConnectErrorMessage:m}=(0,i.useSDPPPContext)(),w=a?1:0,[G,so]=(0,A.useState)(!1);return(0,A.useEffect)(()=>{p?so(p!=P):G&&l(!1)},[p]),(0,A.useEffect)(()=>{o==="disconnected"&&l(!1)},[o]),(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(i.Promote,{}),(0,d.jsx)("div",{className:"header-container",children:(0,d.jsxs)("div",{className:"connect-box",children:[a?(0,d.jsx)("sp-action-button",{onClick:()=>{l(!1)},children:"\u2190"}):(0,d.jsx)("div",{className:"status-bar "+o,children:(0,d.jsx)("div",{className:"status-icon",title:m?.toString()||h(o),children:"\u2B24"})}),(0,d.jsx)(e,{})]})}),m?(0,d.jsx)("div",{children:(0,d.jsx)("sp-label",{class:"error-label",children:fo(m)?h(m):m})}):"",o==="connected"&&(0,d.jsxs)("div",{className:"panel-body",children:[(0,d.jsx)("div",{className:"editor-card",style:w===0?{}:{display:"none"},children:(0,d.jsx)("div",{className:"comfy-list-wrap",children:(0,d.jsx)(bo,{setEditorMode:l})})}),(0,d.jsx)("div",{className:"editor-card",style:a?{}:{display:"none"},children:a&&p&&(0,d.jsx)(Mo,{WorkflowEditPhotoshop:t})})]})]})}var T=n(s(),1);function ro(){return(0,T.jsx)(i.SDPPPProvider,{loginAppID:"",children:(0,T.jsx)("div",{className:"container",children:(0,T.jsx)(i.SDPPP,{renderContent:(o,e,t)=>(0,T.jsx)(No,{connectState:o,AddressBar:e,WorkflowEditPhotoshop:t})})})})}var Wo=n(_o(),1),To=n(s(),1);globalThis.sdppp=globalThis.sdppp||{};globalThis.sdppp.renderPhotoshopPlugin=o=>{(0,Wo.createRoot)(o).render((0,To.jsx)(ro,{}))};})(); +"use strict";(()=>{var Uo=Object.create;var ao=Object.defineProperty;var Ho=Object.getOwnPropertyDescriptor;var Fo=Object.getOwnPropertyNames;var Vo=Object.getPrototypeOf,Ko=Object.prototype.hasOwnProperty;var j=(o=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(o,{get:(e,t)=>(typeof require<"u"?require:e)[t]}):o)(function(o){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+o+'" is not supported')});var H=(o,e)=>()=>(e||o((e={exports:{}}).exports,e),e.exports);var Y=(o,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Fo(e))!Ko.call(o,a)&&a!==t&&ao(o,a,{get:()=>e[a],enumerable:!(s=Ho(e,a))||s.enumerable});return o},lo=(o,e,t)=>(Y(o,e,"default"),t&&Y(t,e,"default")),n=(o,e,t)=>(t=o!=null?Uo(Vo(o)):{},Y(e||!o||!o.__esModule?ao(t,"default",{value:o,enumerable:!0}):t,o));var po=H((oe,co)=>{"use strict";co.exports=window.SDPPPInternal});var w=H((le,mo)=>{"use strict";mo.exports=window.React});var l=H((ce,ho)=>{"use strict";ho.exports=window.ReactJSXRuntime});var _o=H((et,No)=>{"use strict";No.exports=window.ReactDOMClient});var i={};lo(i,n(po(),1));var oo={"SDPPP Get Document":"Get Document","SDPPP Get Layer By ID":"Get Layer","SDPPP Get Linked Layers":"Get Linked Layers","SDPPP Get Layers In Group":"Get Layers In Group","SDPPP Get Text From Layer":"Get Text From Layer","SDPPP Parse Layer Info":"Parse Layer Info","SDPPP Get Selection":"Get Selection","SDPPP Get Image From Photoshop":"Get Image From Photoshop","SDPPP Send Images To Photoshop":"Send Images To Photoshop","SDPPP Select Layer And Run PS Action":"Select Layer And Run PS Action"};var eo={"### Active Document ###":"### \u5F53\u524D\u6587\u6863 ###","### The Canvas ###":"### \u6574\u4E2A\u753B\u5E03 ###","### New Layer ###":"### \u65B0\u56FE\u5C42 ###","### Selected Layer ###":"### \u6240\u9009\u56FE\u5C42 ###","### Keep Size or Fit Canvas ###":"### \u4FDD\u6301\u5C3A\u5BF8\u6216\u9002\u5E94\u753B\u5E03 ###",_SDPPP_PSD_:"_SDPPP_PSD_","Save and run immediately":"\u4FDD\u5B58\u5E76\u7ACB\u5373\u6267\u884C",Close:"\u5173\u95ED","Select a {0}":"\u9009\u62E9\u4E00\u4E2A {0}","How to use .ccx file":"\u5982\u4F55\u4F7F\u7528 .ccx \u6587\u4EF6","1. If you have installed Adobe Creative Cloud":"1. \u5982\u679C\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 Adobe Creative Cloud","Just double click the .ccx file, it will install the plugin automatically":"\u53CC\u51FB .ccx \u6587\u4EF6\uFF0C\u5B83\u4F1A\u81EA\u52A8\u5B89\u88C5","2. If you don't have Adobe Creative Cloud":"2. \u5982\u679C\u4F60\u6CA1\u6709 Adobe Creative Cloud","Rename .ccx to .zip and extract it into ":"\u5C06 .ccx \u91CD\u547D\u540D\u4E3A .zip \u5E76\u89E3\u538B\u5230",or:"\u6216","Photoshop directory":"Photoshop \u5B89\u88C5\u76EE\u5F55","Cannot connect multiple different document widgets with same value":"\u4E0D\u80FD\u8FDE\u63A5\u591A\u4E2A\u5177\u6709\u76F8\u540C\u503C\u7684\u6587\u6863\u5C0F\u90E8\u4EF6","You can only have one SDPPP Settings node in a workflow":"\u4E00\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2A SDPPP Settings \u8282\u70B9","convert widget {0} failed:":"\u63A7\u4EF6{0}\u8F6C\u6362\u5931\u8D25\uFF1A","hidden webview load failed: {0}, please select a browser page to continue":"\u5185\u7F6E webview \u52A0\u8F7D\u5931\u8D25: {0}\uFF0C\u8BF7\u9009\u62E9\u4E00\u4E2A\u6D4F\u89C8\u5668\u9875\u9762\u7EE7\u7EED","SDPPP Get Document":"\u83B7\u53D6\u6587\u6863(GetDocument)","SDPPP Get Layer By ID":"\u83B7\u53D6\u56FE\u5C42(GetLayer)","SDPPP Get Linked Layers":"\u83B7\u53D6\u94FE\u63A5\u56FE\u5C42(GetLinkedLayers)","SDPPP Get Layers In Group":"\u83B7\u53D6\u7EC4\u4E2D\u56FE\u5C42(GetLayersInGroup)","SDPPP Get Text From Layer":"\u83B7\u53D6\u56FE\u5C42\u6587\u672C(GetTextFromLayer)","SDPPP Parse Layer Info":"\u89E3\u6790\u56FE\u5C42\u4FE1\u606F(ParseLayerInfo)","SDPPP Get Selection":"\u83B7\u53D6\u9009\u533A(GetSelection)","SDPPP Get Image From Photoshop":"\u4ECEPS\u83B7\u53D6\u56FE\u50CF(GetImageFromPhotoshop)","SDPPP Send Images To Photoshop":"\u53D1\u9001\u56FE\u50CF\u5230PS(SendImagesToPhotoshop)","SDPPP Send Text To Layer":"\u53D1\u9001\u6587\u672C\u5230\u56FE\u5C42(SendTextToLayer)","SDPPP Select Layer And Run PS Action":"\u9009\u4E2D\u56FE\u5C42\u5E76\u8FD0\u884CPS Action(RunPhotoshopAction)","download PS plugin (.ccx)":"\u4E0B\u8F7D Photoshop \u63D2\u4EF6 (.ccx)","current ComfyUI pageid: {0}":"\u5F53\u524D ComfyUI \u9875\u9762ID: {0}","current A1111 pageid: {0}":"\u5F53\u524D A1111 \u9875\u9762ID: {0}","document linked":"\u6587\u6863\u53C2\u6570\u5DF2\u94FE\u63A5","layer linked":"\u56FE\u5C42\u53C2\u6570\u5DF2\u94FE\u63A5","bound linked":"\u8303\u56F4\u53C2\u6570\u5DF2\u94FE\u63A5",document:"\u6587\u6863",Document:"\u6587\u6863",DOCUMENT:"\u6587\u6863",document_name:"\u6587\u6863\u540D\u5B57id",layer_nameid:"\u56FE\u5C42\u540D\u5B57id",layer_name:"\u56FE\u5C42\u540D\u5B57",layer_info:"\u56FE\u5C42\u4FE1\u606F",bound_top:"\u8303\u56F4\u4E0A\u8FB9\u8DDD",bound_left:"\u8303\u56F4\u5DE6\u8FB9\u8DDD",bound_width:"\u8303\u56F4\u5BBD\u5EA6",bound_height:"\u8303\u56F4\u9AD8\u5EA6",center_x:"\u4E2D\u5FC3\u70B9x",center_y:"\u4E2D\u5FC3\u70B9y",opacity:"\u900F\u660E\u5EA6",layer:"\u56FE\u5C42",layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",Layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",bound:"\u8303\u56F4",bounds:"\u8303\u56F4","bounds [optional]":"\u8303\u56F4[\u53EF\u9009]",boundary:"\u8303\u56F4",Boundary:"\u8303\u56F4",canvas_boundary:"\u753B\u5E03\u8303\u56F4",canvas_bound:"\u753B\u5E03\u8303\u56F4",layer_boundary:"\u56FE\u5C42\u8303\u56F4",layer_bound:"\u56FE\u5C42\u8303\u56F4","Photoshop Disconnected!":"Photoshop \u672A\u8FDE\u63A5\uFF01",rgb_out:"RGB\u8F93\u51FA",alpha_out:"Alpha\u8F93\u51FA",images:"\u56FE\u50CF",text:"\u6587\u672C",ID_mode:"\u7CBE\u786EID\u6A21\u5F0F",name_mode:"\u540D\u5B57\u5339\u914D\u6A21\u5F0F",select:"\u9009\u62E9","document boundary":"\u6587\u6863\u8303\u56F4","layer boundary":"\u56FE\u5C42\u8303\u56F4","selection boundary":"\u9009\u4E2D\u8303\u56F4","save .psd to this workflow":"\u4FDD\u5B58.psd\u5230\u8FD9\u4E2A\u5DE5\u4F5C\u6D41","extract saved .psd to Photoshop":"\u63D0\u53D6\u4FDD\u5B58\u7684.psd\u5230Photoshop","sample .psd":"\u793A\u4F8B.psd",mask:"\u906E\u7F69",name:"\u540D\u79F0",quality:"\u56FE\u50CF\u8D28\u91CF",action_set:"\u52A8\u4F5C\u7EC4",action:"\u52A8\u4F5C",Runner:"\u8FD0\u884C\u8F7D\u4F53","PS Webview":"PS \u5185\u7F6E\u7F51\u9875","Browser {0}":"\u6D4F\u89C8\u5668\u9875\u9762 {0}",timeout:"\u8D85\u65F6","Loading...":"\u52A0\u8F7D\u4E2D...","--multi-user Not Login!":"--multi-user\u5DF2\u6FC0\u6D3B\uFF0C\u4F46\u672A\u767B\u5F55\uFF01",Logout:"\u767B\u51FA","User: ":"\u7528\u6237: ",connect:"\u8FDE\u63A5",connected:"\u5DF2\u8FDE\u63A5",disconnect:"\u65AD\u5F00",disconnected:"\u5DF2\u65AD\u5F00\u8FDE\u63A5","reconnecting...":"\u91CD\u8FDE\u4E2D...",connecting:"\u8FDE\u63A5\u4E2D",webpages:"\u7F51\u9875\u5217\u8868",workflows:"\u5DE5\u4F5C\u6D41",workflow:"\u5DE5\u4F5C\u6D41","auto run page [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u9875\u9762 {0}..","auto run workflow [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41 {0}..","auto run workflow after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41..",selection_only:"\u4EC5\u9009\u533A","Queue:":"\u961F\u5217:","Set As:":"\u8BBE\u7F6E\u4E3A:","Error {0}... please contact me via Discord/Github":"\u51FA\u73B0\u9519\u8BEF {0}...\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211","Webview initialize failed. Please report to me via Discord/Github with your ComfyURL, Operate System":"Webview \u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211\u5E76\u9644\u4E0A\u4F60\u7684Comfy\u5730\u5740\u3001\u64CD\u4F5C\u7CFB\u7EDF","ComfyUI with --multi-user is only available for sponsors":'\u5E26"--multi-user"\u7684ComfyUI\u4EC5\u5BF9\u8D5E\u52A9\u8005\u5F00\u653E',"Workflow Runner is loading...":"\u8FD0\u884C\u8F7D\u4F53\u5C1A\u5728\u52A0\u8F7D...","(Page ID: {0})Queue: {1}":"(\u9875\u9762ID: {0}) \u961F\u5217\u957F\u5EA6 {1}","no suitable node to control in this workflow":"\u8FD9\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u6CA1\u6709\u80FD\u63A7\u5236\u7684\u8282\u70B9",Save:"\u4FDD\u5B58",Edit:"\u7F16\u8F91","Edit in ComfyUI":"\u5728 ComfyUI \u4E2D\u7F16\u8F91","using browser page [{0}] for workflow running":"\u6B63\u63A5\u7BA1\u7F51\u9875 [{0}] \u8FD0\u884C\u5DE5\u4F5C\u6D41","workflow running by hidden webview":"\u5DE5\u4F5C\u6D41\u5728\u9690\u85CF\u7684webview\u4E2D\u8FD0\u884C","Lock Image":"\u9501\u5B9A\u56FE\u50CF","Unlock Image":"\u89E3\u9501\u56FE\u50CF","search...":"\u641C\u7D22...","disabled when running in browser page":"\u63A5\u7BA1\u7F51\u9875\u65F6\u4E0D\u53EF\u7528","only supported in Photoshop":"\u4EC5\u5728 Photoshop \u4E2D\u652F\u6301",Login:"\u767B\u5F55","Invitation Code":"\u9080\u8BF7\u7801",Username:"\u7528\u6237\u540D",Password:"\u5BC6\u7801","Please input invitation code":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","Please input username":"\u8BF7\u8F93\u5165\u7528\u6237\u540D","Please input password":"\u8BF7\u8F93\u5165\u5BC6\u7801","Open more ComfyUI pages to see more options here":"\u6253\u5F00\u66F4\u591A ComfyUI \u9875\u9762\u4EE5\u67E5\u770B\u66F4\u591A\u9009\u9879","Comfy multi-user: ":"Comfy \u591A\u7528\u6237: ","Not Login":"\u672A\u767B\u5F55","Comfy API-Key: ":"Comfy API-Key: ","Login/Auth":"\u767B\u5F55/\u8BA4\u8BC1","Logged in by email/password":"\u5DF2\u901A\u8FC7\u90AE\u7BB1/\u5BC6\u7801\u767B\u5F55","Set API Key":"\u8BBE\u7F6E API Key","Please input API key (will reload Runner)":"\u8BF7\u8F93\u5165 API Key (\u4F1A\u91CD\u542F\u8FD0\u884C\u8F7D\u4F53)","### Active Workflow ###":"### \u5F53\u524D\u5DE5\u4F5C\u6D41 ###","### Example SDXL ###":"### \u793A\u4F8BSDXL\u5DE5\u4F5C\u6D41 ###","Open ComfyUI in the browser to see more options":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00 ComfyUI \u4EE5\u5F97\u5230\u66F4\u591A\u9009\u9879","Webview load timeout, please switch to a different runner":"Webview \u52A0\u8F7D\u8D85\u65F6\uFF0C\u8BF7\u5207\u6362\u5230\u5176\u4ED6\u8FD0\u884C\u8F7D\u4F53","Save workflow to ComfyUI":"\u4FDD\u5B58\u5DE5\u4F5C\u6D41\u5230 ComfyUI","Reload workflow":"\u91CD\u65B0\u52A0\u8F7D\u5DE5\u4F5C\u6D41","Stop and cancel all":"\u505C\u6B62\u5E76\u53D6\u6D88\u6240\u6709","Start auto running after change":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C","Stop auto run":"\u505C\u6B62\u81EA\u52A8\u8FD0\u884C","Run workflow":"\u8FD0\u884C\u5DE5\u4F5C\u6D41","Run workflow xN":"\u8FD0\u884C\u5DE5\u4F5C\u6D41N\u6B21","502: Maybe the server is not running":"502: \u670D\u52A1\u5668\u53EF\u80FD\u672A\u8FD0\u884C","404: Maybe SDPPP is not installed or failed to run in ComfyUI":"404: \u53EF\u80FD\u5728ComfyUI\u4E2DSDPPP\u672A\u5B89\u88C5\u6216\u8FD0\u884C\u5931\u8D25","{0}. reconnecting...":"{0}. \u91CD\u8FDE\u4E2D...","disconnected to {0} failed {1}":"\u65AD\u5F00\u8FDE\u63A5 {0} \u9519\u8BEF {1}","version mismatch, please reinstall PS plugin":"\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5 PS \u63D2\u4EF6","instance type not recognized":"\u672A\u8BC6\u522B\u7684\u8F6F\u4EF6\u7C7B\u578B","Error: {0}":"\u9519\u8BEF: {0}","Verification Error":"\u9A8C\u8BC1\u9519\u8BEF","document {0} not found":"\u627E\u4E0D\u5230\u6587\u6863: {0}",'only layer kind "TEXT" is supported, invalid layer: {0}':"\u4E0D\u652F\u6301\u975E\u6587\u672C\u56FE\u5C42: {0}","create layer failed":"\u521B\u5EFA\u56FE\u5C42\u5931\u8D25","layer not found {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","no linked layer for {0}":"\u6CA1\u6709\u94FE\u63A5\u56FE\u5C42: {0}","layer {0} is not a group":"\u56FE\u5C42 {0} \u4E0D\u662F\u4E00\u4E2A\u7EC4","no layer in group {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u56FE\u5C42","layer not found: {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","No upload_name":"\u4E0A\u4F20\u63A5\u53E3\u8FD4\u56DE\u4E86\u5931\u8D25","get pixel of {0} failed":"\u83B7\u53D6\u50CF\u7D20\u5931\u8D25: {0}","merge group failed":"\u5408\u5E76\u7EC4\u5931\u8D25","invalid name: {0}":"\u975E\u6CD5\u7684\u540D\u79F0: {0}","get_layer_info: layer_identify required":"get_layer_info: \u9700\u8981 layer_identify","invalid action: {0}":"\u65E0\u6548\u7684\u64CD\u4F5C: {0}","create document failed":"\u521B\u5EFA\u6587\u6863\u5931\u8D25","create document for preview":"\u521B\u5EFA\u9884\u89C8\u6587\u6863","resize document for preview":"\u8C03\u6574\u9884\u89C8\u6587\u6863\u5C3A\u5BF8","no first related layer in {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u7B2C\u4E00\u4E2A\u76F8\u5173\u56FE\u5C42","imageDataError: data length is not multiple of width * height":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: \u6570\u636E\u957F\u5EA6\u4E0D\u662F\u5BBD\u5EA6 * \u9AD8\u5EA6\u7684\u500D\u6570","imageDataError: originComponents must be 1 or 3":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: originComponents \u5FC5\u987B\u662F 1 \u6216 3","unexpected connection lost, please try to reconnect":"\u610F\u5916\u65AD\u5F00\u8FDE\u63A5\uFF0C\u8BF7\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5","Workflow list is empty, please save a workflow by Comfy's lastest UI":"\u5DE5\u4F5C\u6D41\u5217\u8868\u4E3A\u7A7A\uFF0C\u8BF7\u5728Comfy\u7684\u65B0\u7248UI\u4E2D\u4FDD\u5B58\u4E00\u4E2A\u5DE5\u4F5C\u6D41","No opened ComfyUI pages":"\u6CA1\u6709\u5DF2\u6253\u5F00\u7684ComfyUI\u9875\u9762","comfyAPI is not initialized, maybe comfyUI is too old":"\u65E0\u6CD5\u83B7\u53D6 ComfyAPI\uFF0C\u53EF\u80FD ComfyUI \u7248\u672C\u592A\u65E7","unsupported channel counts: {0}":"\u4E0D\u652F\u6301\u7684\u901A\u9053\u6570: {0}","Timeout, Maybe the URL is wrong":"\u8D85\u65F6\uFF0C\u53EF\u80FD comfy\u5730\u5740 \u586B\u5199\u9519\u8BEF","Workflow list loading failed: {0}":"\u5DE5\u4F5C\u6D41\u5217\u8868\u52A0\u8F7D\u5931\u8D25: {0}","Please register a user in ComfyUI":"\u8BF7\u5728 ComfyUI \u4E2D\u6CE8\u518C\u4E00\u4E2A\u7528\u6237","GetSelection need Photoshop version 25+":"GetSelection \u9700\u8981 Photoshop 25+ \u7248\u672C","Action {0} not found":"Action {0} \u672A\u627E\u5230","Action set {0} not found":"ActionSet {0} \u672A\u627E\u5230","{0} cannot be used in Photoshop Action Node":"{0} \u4E0D\u80FD\u5728 Photoshop Action \u8282\u70B9\u4E2D\u4F7F\u7528","Group layers":"\u56FE\u5C42\u7EC4","Show All Groups":"\u663E\u793A\u6240\u6709\u7EC4","create document for sent images":"\u7ED9\u53D1\u9001\u7684\u56FE\u7247\u521B\u5EFA\u6587\u6863","show sent images":"\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","fallback show sent images":"\u53D6\u6D88\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","get content of layer {0}":"\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","fallback get content of layer {0}":"\u53D6\u6D88\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","get layer info":"\u83B7\u53D6\u56FE\u5C42\u4FE1\u606F","sdppp extract PSD":"sdppp \u5BFC\u5165 PSD","sdppp get PSD":"sdppp \u83B7\u53D6 PSD","set text to layer":"\u8BBE\u7F6E\u56FE\u5C42\u7684\u6587\u672C","run Photoshop Action":"sdppp \u8FD0\u884C Photoshop Action","select layer":"sdppp \u9009\u4E2D\u56FE\u5C42","{0} wants to extract a PSD file to Photoshop, are you sure?":"{0} \u60F3\u8981\u91CA\u653E\u4E00\u4E2A.psd\u6587\u4EF6\u5230Photoshop\uFF0C\u786E\u5B9A\u5417\uFF1F","should sdppp refuse extracting PSD to Photoshop in this session anymore?":"\u662F\u5426\u8981\u8BA9 sdppp \u62D2\u7EDD\u672C\u6B21PS\u4F1A\u8BDD\u518D\u6B21\u63A5\u53D7.psd\u91CA\u653E\u8BF7\u6C42\uFF1F","Wide Mode":"\u5BBD\u5C4F\u6A21\u5F0F","Quick Set":"\u5FEB\u901F\u8BBE\u7F6E","Selected Layer":"\u9009\u4E2D\u56FE\u5C42","Selected Layer (invert)":"\u9009\u4E2D\u56FE\u5C42(\u53CD\u5411)",Canvas:"\u753B\u5E03",Selection:"\u9009\u533A",Manual:"\u624B\u52A8\u6A21\u5F0F",Auto:"\u81EA\u52A8\u6A21\u5F0F","This plugin is based on sd-ppp":"\u672C\u63D2\u4EF6\u57FA\u4E8Esd-ppp\u5F00\u53D1","And follows its open source license:":"\u5E76\u9075\u5FAA\u5176\u5F00\u6E90\u534F\u8BAE\uFF1A",Cloud:"\u4E91\u7AEF\u63A8\u8350",Sponsors:"\u8D5E\u52A9","waiting...":"\u865A\u4F4D\u4EE5\u5F85",Links:"\u53CB\u60C5\u94FE\u63A5",Community:"\u793E\u533A","LICENSE:":"\u8BB8\u53EF\u8BC1\uFF1A","Official Site":"\u5B98\u65B9\u7F51\u7AD9",upload:"\u4E0A\u4F20","Simplify Workflow":"\u7B80\u5316\u5DE5\u4F5C\u6D41",Photoshop:"Photoshop","Photoshop plugin settings":"Photoshop \u63D2\u4EF6\u8BBE\u7F6E","Photoshop plugin":"Photoshop \u63D2\u4EF6","SDPPP Settings/Misc":"SDPPP \u8BBE\u7F6E/\u6742\u9879","Sample .PSD for this workflow:":"\u793A\u4F8B.PSD","Download Example .PSD":"\u4E0B\u8F7D\u793A\u4F8B.PSD","Maximum Image Size (px):":"\u6700\u5927\u56FE\u50CF\u5C3A\u5BF8(px)",Download:"\u4E0B\u8F7D",Upload:"\u4E0A\u4F20",Reset:"\u91CD\u7F6E",Refresh:"\u5237\u65B0","Comfy URL (You can copy it to connect ComfyUI in the plugin):":"Comfy\u5730\u5740(\u4F60\u53EF\u4EE5\u590D\u5236\u5B83\u5230\u63D2\u4EF6\u4E2D\u8FDE\u63A5ComfyUI):","use slider for number widget:":"\u6570\u5B57\u63A7\u4EF6\u4F7F\u7528\u6ED1\u5757","Photoshop is not connected":"Photoshop \u672A\u8FDE\u63A5","select...":"\u8BF7\u9009\u62E9","click to edit":"\u70B9\u51FB\u7F16\u8F91","ComfyManager not found, cannot reboot":"Comfy Manager\u672A\u5B89\u88C5\uFF0C\u65E0\u6CD5\u91CD\u542F","Failed to reboot ComfyUI":"\u91CD\u542FComfyUI\u5931\u8D25"};var uo=typeof j<"u"?j:void 0,to="en";typeof navigator<"u"&&navigator.language?to=navigator.language=="zh-CN"?"zhcn":"en":uo&&(to=uo("uxp").host.uiLocale.startsWith("zh")?"zhcn":"en");function d(o,...e){let t=to=="zhcn"?eo[o]:o in oo?oo[o]:o;if(!t)throw new Error(`i18n key not found: ${o}`);return t.replace(/{(\d+)}/g,function(s,a){return typeof e[a]<"u"?e[a]:s})}function fo(o){return o in eo}var wo=n(w(),1),vo=n(l(),1),b=class extends wo.default.Component{render(){return(0,vo.jsx)("div",{className:`action-button ${this.props.highlight?"highlight":""}`,onClick:this.props.onClick,children:this.props.children})}};var go=n(w(),1),F=n(l(),1),z=class extends go.default.Component{render(){let e=this.props.size||1;return(0,F.jsx)("div",{slot:"icon",className:"sdppp-icon",onClick:this.props.onClick,children:(0,F.jsx)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,F.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M13.854 2.146l-2-2a.5.5 0 00-.708 0l-1.5 1.5-8.995 8.995a.499.499 0 00-.143.268L.012 13.39a.495.495 0 00.135.463.5.5 0 00.462.134l2.482-.496a.495.495 0 00.267-.143l8.995-8.995 1.5-1.5a.5.5 0 000-.708zM12 3.293l.793-.793L11.5 1.207 10.707 2 12 3.293zm-2-.586L1.707 11 3 12.293 11.293 4 10 2.707zM1.137 12.863l.17-.849.679.679-.849.17z"})})})}};var Po=n(w(),1),V=n(l(),1),E=class extends Po.default.Component{render(){let e=this.props.size||1;return(0,V.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,V.jsx)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,V.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M6.586 3.504l-1.5-1.5H1v9h12v-7.5H6.586zm.414-1L5.793 1.297a1 1 0 00-.707-.293H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h13a.5.5 0 00.5-.5v-8.5a.5.5 0 00-.5-.5H7z"})})})}};var yo=n(w(),1),k=n(l(),1),y=class extends yo.default.Component{render(){let e=this.props.size||1;return(0,k.jsx)("div",{slot:"icon",className:"sdppp-icon",onClick:this.props.onClick,children:(0,k.jsxs)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,k.jsx)("path",{fill:"currentColor",d:"M5.5 1A.5.5 0 005 .5H2a.5.5 0 000 1h1.535a6.502 6.502 0 002.383 11.91.5.5 0 10.165-.986A5.502 5.502 0 014.5 2.1V4a.5.5 0 001 0V1.353a.5.5 0 000-.023V1zM7.507 1a.5.5 0 01.576-.41 6.502 6.502 0 012.383 11.91H12a.5.5 0 010 1H9a.5.5 0 01-.5-.5v-3a.5.5 0 011 0v1.9A5.5 5.5 0 007.917 1.576.5.5 0 017.507 1z"}),(0,k.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M6.2 9.08L9.068 7 6.2 4.92v4.16zM5 4.214v5.574a.8.8 0 001.212.686l4.445-2.787a.8.8 0 000-1.372L6.212 3.527A.8.8 0 005 4.213z"})]})})}};var Co=n(w(),1),K=n(l(),1),C=class extends Co.default.Component{render(){let e=this.props.size||1;return(0,K.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,K.jsx)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,K.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M4.2 10.88L10.668 7 4.2 3.12v7.76zM3 2.414v9.174a.8.8 0 001.212.686l7.645-4.587a.8.8 0 000-1.372L4.212 1.727A.8.8 0 003 2.413z"})})})}};var p=n(l(),1),O=.6,N={LIST_ITEM:"client-list-item",LIST_ITEM_LEFT:"client-list-item-left",LIST_ITEM_RIGHT:"client-list-item-right",TIPS_ICON:"tips-icon",CHECKED:"checked"},no=({isChecked:o=!1,children:e,rightContent:t,onClick:s})=>(0,p.jsxs)("li",{className:`${N.LIST_ITEM}${o?` ${N.CHECKED}`:""}`,onClick:s,children:[(0,p.jsx)("sp-label",{className:N.LIST_ITEM_LEFT,children:e}),t&&(0,p.jsx)("div",{className:N.LIST_ITEM_RIGHT,children:t})]}),io=({path:o,dirname:e,onDirectorySet:t})=>(0,p.jsxs)(no,{onClick:()=>{if(o==="../"){let a=e||"",c=a.lastIndexOf("/");c===-1||a[c-1]==="/"?t?.(""):t?.(a.slice(0,c))}else t?.(o)},children:[(0,p.jsx)(E,{size:O}),(0,p.jsx)("div",{style:{marginLeft:3},children:o.slice(0,-1).split("/").pop()})]}),So=({isChecked:o,onEdit:e,onAutoRun:t,onRun:s})=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)("div",{className:N.TIPS_ICON,children:(0,p.jsx)(z,{size:O,onClick:e})}),t&&(0,p.jsx)(b,{highlight:o,onClick:t,children:(0,p.jsx)(y,{size:O})}),(0,p.jsx)(b,{onClick:s,children:(0,p.jsx)(C,{size:O})})]}),bo=({isChecked:o,workflow:e,onRun:t,setEditorMode:s})=>{let{setAutoRunning:a,workflowAgentSID:c}=(0,i.useSDPPPContext)(),{openWorkflow:g}=(0,i.useSDPPPComfyCaller)(),m=()=>{s(!0),g(c,e.path)};return(0,p.jsx)(no,{isChecked:o,rightContent:(0,p.jsx)(So,{isChecked:o,onEdit:m,onAutoRun:()=>{a(o?null:{type:"workflow",value:e.path})},onRun:()=>t(e.path)}),onClick:m,children:e.error?e.error.replace("sdppp PS side error:",""):e.path.split("/").pop()})},ro=({onRun:o,path:e,title:t,setEditorMode:s})=>{let{openWorkflow:a}=(0,i.useSDPPPComfyCaller)(),{workflowAgentSID:c}=(0,i.useSDPPPContext)(),g=async()=>{e&&await a(c,e),s(!0)};return(0,p.jsx)(no,{rightContent:(0,p.jsx)(So,{onEdit:g,onRun:o}),onClick:g,children:t})};var v=n(l(),1),Oo=({setEditorMode:o})=>{let{autoRunning:e,workflowAgentSID:t}=(0,i.useSDPPPContext)(),{runWorkflow:s,runPage:a}=(0,i.useSDPPPComfyCaller)(),{workflows:c,workflowsError:g,currentViewingDirectory:m,setCurrentViewingDirectory:h,showingList:f}=(0,i.useSDPPPWorkflowList)(),S=null;return g?(0,v.jsx)("div",{className:"workflow-list",children:(0,v.jsx)("sp-label",{children:g})}):(0,v.jsxs)("div",{className:"workflow-list",children:[(0,v.jsxs)("ul",{className:"client-list",children:[m?(0,v.jsx)(io,{path:"../",dirname:m.slice(0,-1),onDirectorySet:U=>{h(U)}},m):null,f.map(U=>{let x=U.path,To=c[x],Go=e?.value==x;return U.isDir?(0,v.jsx)(io,{path:x,dirname:m.slice(0,-1),onDirectorySet:J=>{h(J)}},x):(0,v.jsx)(bo,{setEditorMode:o,isChecked:Go,workflow:To,onRun:async J=>{await s(J)}},x)})]}),(0,v.jsx)("sp-divider",{}),(0,v.jsxs)("ul",{className:"client-list",children:[(0,v.jsx)(ro,{setEditorMode:o,path:"",title:d("### Active Workflow ###"),onRun:async()=>{await a(t)}}),(0,v.jsx)(ro,{setEditorMode:o,path:"sdppp://Sample_SDXL.json",title:d("### Example SDXL ###"),onRun:async()=>{await a(t)}})]}),e?.type=="workflow"?(0,v.jsx)("sp-label",{class:"autorun-desc",children:d("auto run workflow [{0}] after change..",c[e?.value]?.path)}):""]})},ko=Oo;var A=n(w(),1);var P=n(w(),1);var Io=n(w(),1),Q=n(l(),1),_=class extends Io.default.Component{render(){let e=this.props.size||1;return(0,Q.jsx)("div",{slot:"icon",className:"sdppp-icon",onClick:this.props.onClick,children:(0,Q.jsx)("svg",{width:20*e,height:20*e,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,Q.jsx)("path",{fill:"currentColor",d:"M7.092.5H7a6.5 6.5 0 106.41 7.583.5.5 0 10-.986-.166A5.495 5.495 0 017 12.5a5.5 5.5 0 010-11h.006a5.5 5.5 0 014.894 3H10a.5.5 0 000 1h3a.5.5 0 00.5-.5V2a.5.5 0 00-1 0v1.535A6.495 6.495 0 007.092.5z"})})})}};var Lo=n(w(),1),I=n(l(),1),B=class extends Lo.default.Component{render(){return(0,I.jsx)("div",{slot:"icon",className:"sdppp-icon",style:{strokeWidth:1},children:(0,I.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,I.jsx)("path",{d:"M11.083 12.25H2.917a1.167 1.167 0 01-1.167-1.167V2.917A1.167 1.167 0 012.917 1.75h6.416l2.917 2.917v6.416a1.167 1.167 0 01-1.167 1.167z"}),(0,I.jsx)("path",{d:"M9.917 12.25V7.583H4.083v4.667M4.083 1.75v2.917H8.75"})]})})}};var Do=n(w(),1),L=n(l(),1),$=class extends Do.default.Component{render(){return(0,L.jsxs)("div",{slot:"icon",className:"sdppp-icon",children:[(0,L.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,L.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M5.2 10.88L11.668 7 5.2 3.12v7.76zM4 2.414v9.174a.8.8 0 001.212.686l7.645-4.587a.8.8 0 000-1.372L5.212 1.727A.8.8 0 004 2.413zM1.5 1.6a.6.6 0 01.6.6v9.6a.6.6 0 11-1.2 0V2.2a.6.6 0 01.6-.6z"}),(0,L.jsx)("path",{fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd",d:"M.963 1.932a.6.6 0 01.805-.268l1 .5a.6.6 0 01-.536 1.073l-1-.5a.6.6 0 01-.269-.805zM3.037 11.132a.6.6 0 01-.269.805l-1 .5a.6.6 0 01-.536-1.073l1-.5a.6.6 0 01.805.268z"})]}),this.props.count]})}};var Mo=n(w(),1),D=n(l(),1),W=class extends Mo.default.Component{render(){return(0,D.jsx)("div",{slot:"icon",className:"sdppp-icon",style:{strokeWidth:1},children:(0,D.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,D.jsx)("path",{transform:"scale(0.7)",fillRule:"evenodd",clipRule:"evenodd",d:"M14 7A7 7 0 100 7a7 7 0 0014 0zm-6.535 5.738c-.233.23-.389.262-.465.262-.076 0-.232-.032-.465-.262-.238-.234-.497-.623-.737-1.182-.434-1.012-.738-2.433-.79-4.056h3.984c-.052 1.623-.356 3.043-.79 4.056-.24.56-.5.948-.737 1.182zM8.992 6.5H5.008c.052-1.623.356-3.044.79-4.056.24-.56.5-.948.737-1.182C6.768 1.032 6.924 1 7 1c.076 0 .232.032.465.262.238.234.497.623.737 1.182.434 1.012.738 2.433.79 4.056zm1 1c-.065 2.176-.558 4.078-1.282 5.253A6.005 6.005 0 0012.98 7.5H9.992zm2.987-1H9.992c-.065-2.176-.558-4.078-1.282-5.253A6.005 6.005 0 0112.98 6.5zm-8.971 0c.065-2.176.558-4.078 1.282-5.253A6.005 6.005 0 001.02 6.5h2.988zm-2.987 1a6.005 6.005 0 004.27 5.253C4.565 11.578 4.072 9.676 4.007 7.5H1.02z"}),(0,D.jsx)("path",{transform:"scale(0.5) translate(12, 12)",fillRule:"evenodd",clipRule:"evenodd",d:"M13.854 2.146l-2-2a.5.5 0 00-.708 0l-1.5 1.5-8.995 8.995a.499.499 0 00-.143.268L.012 13.39a.495.495 0 00.135.463.5.5 0 00.462.134l2.482-.496a.495.495 0 00.267-.143l8.995-8.995 1.5-1.5a.5.5 0 000-.708zM12 3.293l.793-.793L11.5 1.207 10.707 2 12 3.293zm-2-.586L1.707 11 3 12.293 11.293 4 10 2.707zM1.137 12.863l.17-.849.679.679-.849.17z"})]})})}};var Ro=n(w(),1),M=n(l(),1),q=class extends Ro.default.Component{render(){return(0,M.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,M.jsxs)("svg",{width:this.props.size||20,height:this.props.size||20,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,M.jsx)("path",{d:"M11.7879 2.2121C12.0732 2.49737 12.0732 2.96723 11.7879 3.2525L3.2525 11.7879C2.96723 12.0732 2.49737 12.0732 2.2121 11.7879C1.92684 11.5026 1.92684 11.0328 2.2121 10.7475L10.7475 2.2121C11.0328 1.92684 11.5026 1.92684 11.7879 2.2121Z",fill:"currentColor"}),(0,M.jsx)("path",{d:"M2.2121 2.2121C2.49737 1.92684 2.96723 1.92684 3.2525 2.2121L11.7879 10.7475C12.0732 11.0328 12.0732 11.5026 11.7879 11.7879C11.5026 12.0732 11.0328 12.0732 10.7475 11.7879L2.2121 3.2525C1.92684 2.96723 1.92684 2.49737 2.2121 2.2121Z",fill:"currentColor"})]})})}};var Ao=n(w(),1),X=n(l(),1),Z=class extends Ao.default.Component{render(){return(0,X.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,X.jsx)("svg",{width:this.props.size||20,height:this.props.size||20,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,X.jsx)("path",{d:"M1 1.504a.5.5 0 01.5-.5h11a.5.5 0 01.5.5v11a.5.5 0 01-.5.5h-11a.5.5 0 01-.5-.5v-11z",fill:"currentColor"})})})}};var xo=n(w(),1),R=n(l(),1),T=class extends xo.default.Component{render(){return(0,R.jsx)("div",{slot:"icon",className:"sdppp-icon",children:(0,R.jsxs)("svg",{width:this.props.size||20,height:this.props.size||20,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,R.jsx)("path",{d:"M2.35 10.95L3.05 11.65L11.65 3.05L10.95 2.35L2.35 10.95Z",fill:"currentColor"}),(0,R.jsx)("path",{d:"M7 14C3.13401 14 0 10.866 0 7C0 3.13401 3.13401 0 7 0C10.866 0 14 3.13401 14 7C14 10.866 10.866 14 7 14ZM7 13C10.3137 13 13 10.3137 13 7C13 3.68629 10.3137 1 7 1C3.68629 1 1 3.68629 1 7C1 10.3137 3.68629 13 7 13Z",fill:"currentColor"})]})})}};var r=n(l(),1);var Qo=({onMouseEnter:o,onMouseLeave:e})=>{let{workflowAgentSID:t}=(0,i.useSDPPPContext)(),{saveWorkflow:s,reopenWorkflow:a}=(0,i.useSDPPPComfyCaller)(),c=(0,P.useCallback)(async()=>{await s(t)},[s,t]);return(0,r.jsx)("sp-action-button",{onClick:c,onMouseEnter:o,onMouseLeave:e,children:(0,r.jsx)(B,{})})};var $o=({onMouseEnter:o,onMouseLeave:e})=>{let{interrupt:t}=(0,i.useSDPPPComfyCaller)(),{clearQueue:s}=(0,i.useSDPPPComfyCaller)(),a=(0,P.useCallback)(async()=>{await s(),await t()},[s,t]);return(0,r.jsx)("sp-action-button",{onClick:a,onMouseEnter:o,onMouseLeave:e,children:(0,r.jsx)(T,{})})},qo=({onMouseEnter:o,onMouseLeave:e})=>{let{workflowAgentSID:t}=(0,i.useSDPPPContext)(),{reopenWorkflow:s}=(0,i.useSDPPPComfyCaller)(),a=(0,P.useCallback)(()=>{s(t)},[s,t]);return(0,r.jsx)("sp-action-button",{onClick:a,onMouseEnter:o,onMouseLeave:e,children:(0,r.jsx)(_,{})})};var Xo=({onMouseEnter:o,onMouseLeave:e})=>{let{workflowAgentSID:t,autoRunning:s,setAutoRunning:a}=(0,i.useSDPPPContext)();return(0,r.jsx)("sp-action-button",{class:s?.value==t?"highlight":"",onClick:()=>{s?.value==t?a(null):a({type:"page",value:t})},onMouseEnter:o,onMouseLeave:e,children:(0,r.jsx)(y,{})})},Zo=({onMouseEnter:o,onMouseLeave:e})=>{let{workflowAgentSID:t,webviewAgentSID:s,toggleWebviewDialog:a}=(0,i.useSDPPPContext)(),c=t==s;return(0,r.jsx)("sp-action-button",{...c?{}:{disabled:!0},onClick:()=>{a()},title:c?d("Edit in ComfyUI"):d("disabled when running in browser page"),onMouseEnter:o,onMouseLeave:e,children:(0,r.jsx)(W,{})})},Jo=({onMouseEnter:o,onMouseLeave:e})=>{let{workflowAgentSID:t}=(0,i.useSDPPPContext)(),{runPage:s}=(0,i.useSDPPPComfyCaller)();return(0,r.jsx)("sp-action-button",{onClick:()=>{s(t)},onMouseEnter:o,onMouseLeave:e,children:(0,r.jsx)(C,{})})},Yo=({onMouseEnter:o,onMouseLeave:e})=>{let{workflowAgentSID:t}=(0,i.useSDPPPContext)(),{runPage:s}=(0,i.useSDPPPComfyCaller)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"action-button",onClick:()=>{s(t,2)},onMouseEnter:o,onMouseLeave:e,children:"x2"}),(0,r.jsx)("div",{className:"action-button",onClick:()=>{s(t,5)},onMouseEnter:o,onMouseLeave:e,children:"x5"}),(0,r.jsx)("div",{className:"action-button",onClick:()=>{s(t,9)},onMouseEnter:o,onMouseLeave:e,children:"x9"})]})};function zo({WorkflowEditPhotoshop:o}){let{workflowAgentSID:e,autoRunning:t}=(0,i.useSDPPPContext)(),{ssid:s,queueSize:a}=(0,i.useAgentState)(e),{lastError:c,progress:g,executingNodeTitle:m}=(0,i.useAgentState)(e),[h,f]=(0,P.useState)(null),S=(0,P.useMemo)(()=>h=="save"?d("Save workflow to ComfyUI"):h=="refresh"?d("Reload workflow"):h=="stopAndCancel"?d("Stop and cancel all"):h=="autoRun"?t?d("Stop auto run"):d("Start auto running after change"):h=="edit"?d("Edit in ComfyUI"):h=="run"?d("Run workflow"):h=="runMulti"?d("Run workflow xN"):"",[h,d]);return(0,P.useMemo)(()=>(0,r.jsxs)("div",{className:"workflow-edit-wrap",children:[(0,r.jsx)("div",{className:"workflow-edit-top",children:(0,r.jsxs)("div",{className:"workflow-edit-controls",children:[(0,r.jsxs)("div",{className:"workflow-edit-controls-left",children:[(0,r.jsxs)("div",{className:"workflow-edit-button-line workflow-edit-button-lineone",children:[(0,r.jsxs)("div",{className:"workflow-edit-button-line-left",children:[(0,r.jsx)(Qo,{onMouseEnter:()=>f("save"),onMouseLeave:()=>f(null)}),(0,r.jsx)(qo,{onMouseEnter:()=>f("refresh"),onMouseLeave:()=>f(null)})]}),(0,r.jsxs)("div",{className:"workflow-edit-button-line-right",children:[(0,r.jsx)($o,{onMouseEnter:()=>f("stopAndCancel"),onMouseLeave:()=>f(null)}),(0,r.jsx)(Xo,{onMouseEnter:()=>f("autoRun"),onMouseLeave:()=>f(null)})]})]}),(0,r.jsxs)("div",{className:"workflow-edit-button-line workflow-edit-controls-linetwo",children:[(0,r.jsxs)("div",{className:"workflow-run-status",children:[c?(0,r.jsx)("sp-label",{class:"error-label",children:c}):"",!c&&!m&&t?(0,r.jsx)("sp-label",{children:d("auto run workflow after change..")}):"",!c&&!m&&S?(0,r.jsx)("sp-label",{children:S}):""]}),(0,r.jsx)(Zo,{onMouseEnter:()=>f("edit"),onMouseLeave:()=>f(null)})]})]}),(0,r.jsx)("div",{className:"workflow-edit-controls-center",children:(0,r.jsx)(Jo,{onMouseEnter:()=>f("run"),onMouseLeave:()=>f(null)})}),(0,r.jsx)("div",{className:"workflow-edit-controls-right",children:(0,r.jsx)(Yo,{onMouseEnter:()=>f("runMulti"),onMouseLeave:()=>f(null)})})]})}),(0,r.jsx)("sp-divider",{}),(0,r.jsx)(o,{})]}),[s,a,h,t,c,g,m,S,o])}var u=n(l(),1);function Eo({connectState:o,AddressBar:e,WorkflowEditPhotoshop:t}){let[s,a]=(0,A.useState)(!1),{workflowAgentSID:c,webviewAgentSID:g,lastConnectErrorMessage:m}=(0,i.useSDPPPContext)(),h=s?1:0,[f,S]=(0,A.useState)(!1);return(0,A.useEffect)(()=>{c?S(c!=g):f&&a(!1)},[c]),(0,A.useEffect)(()=>{o==="disconnected"&&a(!1)},[o]),(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(i.Promote,{}),(0,u.jsx)("div",{className:"header-container",children:(0,u.jsxs)("div",{className:"connect-box",children:[s?(0,u.jsx)("sp-action-button",{onClick:()=>{a(!1)},children:"\u2190"}):(0,u.jsx)("div",{className:"status-bar "+o,children:(0,u.jsx)("div",{className:"status-icon",title:m?.toString()||d(o),children:"\u2B24"})}),(0,u.jsx)(e,{})]})}),m?(0,u.jsx)("div",{children:(0,u.jsx)("sp-label",{class:"error-label",children:fo(m)?d(m):m})}):"",o==="connected"&&(0,u.jsxs)("div",{className:"panel-body",children:[(0,u.jsx)("div",{className:"editor-card",style:h===0?{}:{display:"none"},children:(0,u.jsx)("div",{className:"comfy-list-wrap",children:(0,u.jsx)(ko,{setEditorMode:a})})}),(0,u.jsx)("div",{className:"editor-card",style:s?{}:{display:"none"},children:s&&c&&(0,u.jsx)(zo,{WorkflowEditPhotoshop:t})})]})]})}var G=n(l(),1);function so(){return(0,G.jsx)(i.SDPPPProvider,{loginAppID:"",children:(0,G.jsx)("div",{className:"container",children:(0,G.jsx)(i.SDPPP,{renderContent:(o,e,t)=>(0,G.jsx)(Eo,{connectState:o,AddressBar:e,WorkflowEditPhotoshop:t})})})})}var Bo=n(_o(),1),Wo=n(l(),1);globalThis.sdppp=globalThis.sdppp||{};globalThis.sdppp.renderPhotoshopPlugin=o=>{(0,Bo.createRoot)(o).render((0,Wo.jsx)(so,{}))};})(); diff --git a/plugins/photoshop/dist/index.js.map b/plugins/photoshop/dist/index.js.map index ccb6d1a..d576b1e 100644 --- a/plugins/photoshop/dist/index.js.map +++ b/plugins/photoshop/dist/index.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["external-global-plugin:SDPPPInternal", "external-global-plugin:react", "external-global-plugin:react/jsx-runtime", "external-global-plugin:react-dom/client", "../../../typescripts/modules/photoshop/src/tsx/SDPPPInternalBridge.tsx", "../../../typescripts/src/common/en.mts", "../../../typescripts/src/common/zh-cn.mts", "../../../typescripts/src/common/i18n.mts", "../../../typescripts/modules/photoshop/src/tsx/ActionButton.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/EditIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/FolderIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/LivePaintingIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/PlayIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/WorkflowListItem.tsx", "../../../typescripts/modules/photoshop/src/tsx/WorkflowList.tsx", "../../../typescripts/modules/photoshop/src/tsx/Content.tsx", "../../../typescripts/modules/photoshop/src/tsx/WorkflowEditWrap.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/RefreshIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/SaveIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/PlayMultiIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/WebEditIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/CrossIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/StopIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/icons/CancelIcon.tsx", "../../../typescripts/modules/photoshop/src/tsx/Main.tsx", "../../../typescripts/modules/photoshop/src/entry.tsx"], - "sourcesContent": ["module.exports = window.SDPPPInternal", "module.exports = window.React", "module.exports = window.ReactJSXRuntime", "module.exports = window.ReactDOMClient", "export * from \"SDPPPInternal\";", "export default {\n 'SDPPP Get Document': 'SDPPP Get Document',\n 'SDPPP Get Layer By ID': 'SDPPP Get Layer',\n 'SDPPP Get Linked Layers': 'SDPPP Get Linked Layers',\n 'SDPPP Get Layers In Group': 'SDPPP Get Layers In Group',\n 'SDPPP Get Text From Layer': 'SDPPP Get Text From Layer',\n 'SDPPP Parse Layer Info': 'SDPPP Parse Layer Info',\n 'SDPPP Get Selection': 'SDPPP Get Selection', \n 'SDPPP Get Image From Photoshop': 'SDPPP Get Image From Photoshop',\n 'SDPPP Send Images To Photoshop': 'SDPPP Send Images To Photoshop',\n 'SDPPP Settings': 'SDPPP Settings/Misc',\n}", "export default {\n // speicial document/ layer\n '### Active Document ###': '### \u5F53\u524D\u6587\u6863 ###',\n '### The Canvas ###': '### \u6574\u4E2A\u753B\u5E03 ###',\n '### New Layer ###': '### \u65B0\u56FE\u5C42 ###',\n '### Selected Layer ###': '### \u6240\u9009\u56FE\u5C42 ###',\n '### Keep Size or Fit Canvas ###': '### \u4FDD\u6301\u5C3A\u5BF8\u6216\u9002\u5E94\u753B\u5E03 ###',\n '_SDPPP_PSD_': '_SDPPP_PSD_',\n\n // A1111 UI\n 'Save and run immediately': '\u4FDD\u5B58\u5E76\u7ACB\u5373\u6267\u884C',\n 'Close': '\u5173\u95ED',\n 'Select a {0}': `\u9009\u62E9\u4E00\u4E2A {0}`,\n\n // comfyui dialog\n 'How to use .ccx file': '\u5982\u4F55\u4F7F\u7528 .ccx \u6587\u4EF6',\n '1. If you have installed Adobe Creative Cloud': '1. \u5982\u679C\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 Adobe Creative Cloud', \n 'Just double click the .ccx file, it will install the plugin automatically': '\u53CC\u51FB .ccx \u6587\u4EF6\uFF0C\u5B83\u4F1A\u81EA\u52A8\u5B89\u88C5',\n \"2. If you don't have Adobe Creative Cloud\": '2. \u5982\u679C\u4F60\u6CA1\u6709 Adobe Creative Cloud',\n 'Rename .ccx to .zip and extract it into ': '\u5C06 .ccx \u91CD\u547D\u540D\u4E3A .zip \u5E76\u89E3\u538B\u5230',\n 'or': '\u6216',\n 'Photoshop directory': 'Photoshop \u5B89\u88C5\u76EE\u5F55',\n\n // comfyui error\n 'Cannot connect multiple different document widgets with same value': '\u4E0D\u80FD\u8FDE\u63A5\u591A\u4E2A\u5177\u6709\u76F8\u540C\u503C\u7684\u6587\u6863\u5C0F\u90E8\u4EF6',\n 'You can only have one SDPPP Settings node in a workflow': '\u4E00\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2A SDPPP Settings \u8282\u70B9',\n 'convert widget {0} failed:': '\u63A7\u4EF6{0}\u8F6C\u6362\u5931\u8D25\uFF1A',\n 'hidden webview load failed: {0}, please select a browser page to continue': '\u5185\u7F6E webview \u52A0\u8F7D\u5931\u8D25: {0}\uFF0C\u8BF7\u9009\u62E9\u4E00\u4E2A\u6D4F\u89C8\u5668\u9875\u9762\u7EE7\u7EED',\n \n // comfy node title\n 'SDPPP Get Document': 'SDPPP\u83B7\u53D6\u6587\u6863(GetDocument)',\n 'SDPPP Get Layer By ID': 'SDPPP\u83B7\u53D6\u56FE\u5C42(GetLayer)',\n 'SDPPP Get Linked Layers': 'SDPPP\u83B7\u53D6\u94FE\u63A5\u56FE\u5C42(GetLinkedLayers)',\n 'SDPPP Get Layers In Group': 'SDPPP\u83B7\u53D6\u7EC4\u4E2D\u56FE\u5C42(GetLayersInGroup)',\n 'SDPPP Get Text From Layer': 'SDPPP\u83B7\u53D6\u56FE\u5C42\u6587\u672C(GetTextFromLayer)',\n 'SDPPP Parse Layer Info': 'SDPPP\u89E3\u6790\u56FE\u5C42\u4FE1\u606F(ParseLayerInfo)',\n 'SDPPP Get Selection': 'SDPPP\u83B7\u53D6\u9009\u533A(GetSelection)', \n 'SDPPP Get Image From Photoshop': 'SDPPP\u4ECEPS\u83B7\u53D6\u56FE\u50CF(GetImageFromPhotoshop)',\n 'SDPPP Send Images To Photoshop': 'SDPPP\u53D1\u9001\u56FE\u50CF\u5230PS(SendImagesToPhotoshop)',\n 'SDPPP Send Text To Layer': 'SDPPP\u53D1\u9001\u6587\u672C\u5230\u56FE\u5C42(SendTextToLayer)',\n 'SDPPP Run Photoshop Action': 'SDPPP\u8FD0\u884CPS Action(RunPhotoshopAction)',\n\n// comfy widget/input\n 'download PS plugin (.ccx)': '\u4E0B\u8F7D Photoshop \u63D2\u4EF6 (.ccx)',\n 'current ComfyUI pageid: {0}': '\u5F53\u524D ComfyUI \u9875\u9762ID: {0}',\n 'current A1111 pageid: {0}': '\u5F53\u524D A1111 \u9875\u9762ID: {0}',\n 'document linked': '\u6587\u6863\u53C2\u6570\u5DF2\u94FE\u63A5',\n 'layer linked': '\u56FE\u5C42\u53C2\u6570\u5DF2\u94FE\u63A5',\n 'bound linked': '\u8303\u56F4\u53C2\u6570\u5DF2\u94FE\u63A5',\n 'document': '\u6587\u6863', \n 'Document': '\u6587\u6863', \n 'DOCUMENT': '\u6587\u6863', \n 'document_name': '\u6587\u6863\u540D\u5B57id',\n 'layer_nameid': '\u56FE\u5C42\u540D\u5B57id',\n 'layer_name': '\u56FE\u5C42\u540D\u5B57',\n 'layer_info': '\u56FE\u5C42\u4FE1\u606F',\n 'bound_top': '\u8303\u56F4\u4E0A\u8FB9\u8DDD',\n 'bound_left': '\u8303\u56F4\u5DE6\u8FB9\u8DDD',\n 'bound_width': '\u8303\u56F4\u5BBD\u5EA6',\n 'bound_height': '\u8303\u56F4\u9AD8\u5EA6',\n 'center_x': '\u4E2D\u5FC3\u70B9x',\n 'center_y': '\u4E2D\u5FC3\u70B9y',\n 'opacity': '\u900F\u660E\u5EA6',\n 'layer': '\u56FE\u5C42',\n 'layer_or_group': '\u56FE\u5C42(\u6216\u7EC4)',\n 'Layer_or_group': '\u56FE\u5C42(\u6216\u7EC4)',\n 'bound': '\u8303\u56F4',\n 'bounds': '\u8303\u56F4',\n 'bounds [optional]': '\u8303\u56F4[\u53EF\u9009]',\n 'boundary': '\u8303\u56F4',\n 'Boundary': '\u8303\u56F4',\n 'canvas_boundary': '\u753B\u5E03\u8303\u56F4',\n 'canvas_bound': '\u753B\u5E03\u8303\u56F4',\n 'layer_boundary': '\u56FE\u5C42\u8303\u56F4',\n 'layer_bound': '\u56FE\u5C42\u8303\u56F4',\n \"Photoshop Disconnected!\" : \"Photoshop \u672A\u8FDE\u63A5\uFF01\",\n 'rgb_out': 'RGB\u8F93\u51FA',\n 'alpha_out': 'Alpha\u8F93\u51FA',\n 'images': '\u56FE\u50CF',\n 'text': '\u6587\u672C',\n 'ID_mode': '\u7CBE\u786EID\u6A21\u5F0F',\n 'name_mode': '\u540D\u5B57\u5339\u914D\u6A21\u5F0F',\n 'select': '\u9009\u62E9',\n 'document boundary': '\u6587\u6863\u8303\u56F4',\n 'layer boundary': '\u56FE\u5C42\u8303\u56F4',\n 'selection boundary': '\u9009\u4E2D\u8303\u56F4',\n 'save .psd to this workflow': '\u4FDD\u5B58.psd\u5230\u8FD9\u4E2A\u5DE5\u4F5C\u6D41',\n 'extract saved .psd to Photoshop': '\u63D0\u53D6\u4FDD\u5B58\u7684.psd\u5230Photoshop',\n 'sample .psd': '\u793A\u4F8B.psd',\n 'mask': '\u906E\u7F69',\n 'name': '\u540D\u79F0',\n 'quality': '\u56FE\u50CF\u8D28\u91CF',\n \n // photoshop UI\n 'Runner': '\u8FD0\u884C\u8F7D\u4F53',\n 'PS Webview': 'PS \u5185\u7F6E\u7F51\u9875',\n 'Browser {0}': '\u6D4F\u89C8\u5668\u9875\u9762 {0}',\n 'timeout': '\u8D85\u65F6',\n 'Loading...': '\u52A0\u8F7D\u4E2D...',\n '--multi-user Not Login!': '--multi-user\u5DF2\u6FC0\u6D3B\uFF0C\u4F46\u672A\u767B\u5F55\uFF01',\n 'Logout': '\u767B\u51FA',\n 'User: ': '\u7528\u6237: ',\n 'connect': '\u8FDE\u63A5',\n 'connected': '\u5DF2\u8FDE\u63A5',\n 'disconnect': '\u65AD\u5F00',\n 'disconnected': '\u5DF2\u65AD\u5F00\u8FDE\u63A5',\n 'reconnecting...': '\u91CD\u8FDE\u4E2D...', \n 'connecting': '\u8FDE\u63A5\u4E2D', \n 'webpages': '\u7F51\u9875\u5217\u8868',\n 'workflows': '\u5DE5\u4F5C\u6D41',\n 'workflow': '\u5DE5\u4F5C\u6D41',\n 'auto run page [{0}] after change..': '\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u9875\u9762 {0}..',\n 'auto run workflow [{0}] after change..': '\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41 {0}..',\n 'auto run workflow after change..': '\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41..',\n 'selection_only': '\u4EC5\u9009\u533A',\n 'Queue:': '\u961F\u5217:',\n 'Set As:': '\u8BBE\u7F6E\u4E3A:',\n 'Error {0}... please contact me via Discord/Github': '\u51FA\u73B0\u9519\u8BEF {0}...\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211',\n 'Webview initialize failed. Please report to me via Discord/Github with your ComfyURL, Operate System': 'Webview \u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211\u5E76\u9644\u4E0A\u4F60\u7684Comfy\u5730\u5740\u3001\u64CD\u4F5C\u7CFB\u7EDF',\n 'ComfyUI with --multi-user is only available for sponsors': '\u5E26\"--multi-user\"\u7684ComfyUI\u4EC5\u5BF9\u8D5E\u52A9\u8005\u5F00\u653E',\n 'Workflow Runner is loading...': '\u8FD0\u884C\u8F7D\u4F53\u5C1A\u5728\u52A0\u8F7D...',\n '(Page ID: {0})Queue: {1}': '(\u9875\u9762ID: {0}) \u961F\u5217\u957F\u5EA6 {1}',\n 'no suitable node to control in this workflow': '\u8FD9\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u6CA1\u6709\u80FD\u63A7\u5236\u7684\u8282\u70B9',\n \"Save\": \"\u4FDD\u5B58\",\n \"Edit\": \"\u7F16\u8F91\",\n \"Edit in ComfyUI\": \"\u5728 ComfyUI \u4E2D\u7F16\u8F91\",\n \"using browser page [{0}] for workflow running\": '\u6B63\u63A5\u7BA1\u7F51\u9875 [{0}] \u8FD0\u884C\u5DE5\u4F5C\u6D41',\n 'workflow running by hidden webview': '\u5DE5\u4F5C\u6D41\u5728\u9690\u85CF\u7684webview\u4E2D\u8FD0\u884C',\n 'Lock Image': '\u9501\u5B9A\u56FE\u50CF',\n 'Unlock Image': '\u89E3\u9501\u56FE\u50CF',\n 'search...': '\u641C\u7D22...',\n 'disabled when running in browser page': '\u63A5\u7BA1\u7F51\u9875\u65F6\u4E0D\u53EF\u7528',\n 'only supported in Photoshop': '\u4EC5\u5728 Photoshop \u4E2D\u652F\u6301',\n 'Login': '\u767B\u5F55',\n 'Invitation Code': '\u9080\u8BF7\u7801',\n 'Username': '\u7528\u6237\u540D',\n 'Password': '\u5BC6\u7801',\n 'Please input invitation code': '\u8BF7\u8F93\u5165\u9080\u8BF7\u7801',\n 'Please input username': '\u8BF7\u8F93\u5165\u7528\u6237\u540D',\n 'Please input password': '\u8BF7\u8F93\u5165\u5BC6\u7801',\n 'Open more ComfyUI pages to see more options here': '\u6253\u5F00\u66F4\u591A ComfyUI \u9875\u9762\u4EE5\u67E5\u770B\u66F4\u591A\u9009\u9879',\n 'Comfy multi-user: ': 'Comfy \u591A\u7528\u6237: ',\n 'Not Login': '\u672A\u767B\u5F55',\n 'Comfy API-Key: ': 'Comfy API-Key: ',\n 'Login/Auth': '\u767B\u5F55/\u8BA4\u8BC1',\n 'Logged in by email/password': '\u5DF2\u901A\u8FC7\u90AE\u7BB1/\u5BC6\u7801\u767B\u5F55',\n 'Set API Key': '\u8BBE\u7F6E API Key',\n 'Please input API key (will reload Runner)': '\u8BF7\u8F93\u5165 API Key (\u4F1A\u91CD\u542F\u8FD0\u884C\u8F7D\u4F53)',\n '### Active Workflow ###': '### \u5F53\u524D\u5DE5\u4F5C\u6D41 ###',\n '### Example SDXL ###': '### \u793A\u4F8BSDXL\u5DE5\u4F5C\u6D41 ###',\n 'Open ComfyUI in the browser to see more options': '\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00 ComfyUI \u4EE5\u5F97\u5230\u66F4\u591A\u9009\u9879',\n\n // photoshop connect error\n '502: Maybe the server is not running': '502: \u670D\u52A1\u5668\u53EF\u80FD\u672A\u8FD0\u884C',\n '404: Maybe SDPPP is not installed or failed to run in ComfyUI': '404: \u53EF\u80FD\u5728ComfyUI\u4E2DSDPPP\u672A\u5B89\u88C5\u6216\u8FD0\u884C\u5931\u8D25',\n '{0}. reconnecting...': '{0}. \u91CD\u8FDE\u4E2D...',\n 'disconnected to {0} failed {1}': `\u65AD\u5F00\u8FDE\u63A5 {0} \u9519\u8BEF {1}`,\n 'version mismatch, please reinstall PS plugin': '\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5 PS \u63D2\u4EF6',\n 'instance type not recognized': '\u672A\u8BC6\u522B\u7684\u8F6F\u4EF6\u7C7B\u578B',\n 'Error: {0}': '\u9519\u8BEF: {0}',\n 'Verification Error': '\u9A8C\u8BC1\u9519\u8BEF',\n\n // photoshop event error\n 'document {0} not found': '\u627E\u4E0D\u5230\u6587\u6863: {0}',\n 'only layer kind \"TEXT\" is supported, invalid layer: {0}': '\u4E0D\u652F\u6301\u975E\u6587\u672C\u56FE\u5C42: {0}',\n 'create layer failed': '\u521B\u5EFA\u56FE\u5C42\u5931\u8D25',\n 'layer not found {0}': '\u627E\u4E0D\u5230\u56FE\u5C42: {0}',\n 'no linked layer for {0}': '\u6CA1\u6709\u94FE\u63A5\u56FE\u5C42: {0}',\n 'layer {0} is not a group': '\u56FE\u5C42 {0} \u4E0D\u662F\u4E00\u4E2A\u7EC4',\n 'no layer in group {0}': '\u7EC4 {0} \u4E2D\u6CA1\u6709\u56FE\u5C42',\n 'layer not found: {0}': '\u627E\u4E0D\u5230\u56FE\u5C42: {0}',\n 'No upload_name': '\u4E0A\u4F20\u63A5\u53E3\u8FD4\u56DE\u4E86\u5931\u8D25',\n 'get pixel of {0} failed': '\u83B7\u53D6\u50CF\u7D20\u5931\u8D25: {0}',\n 'merge group failed': '\u5408\u5E76\u7EC4\u5931\u8D25',\n 'invalid name: {0}': '\u975E\u6CD5\u7684\u540D\u79F0: {0}',\n 'get_layer_info: layer_identify required': 'get_layer_info: \u9700\u8981 layer_identify',\n 'invalid action: {0}': '\u65E0\u6548\u7684\u64CD\u4F5C: {0}',\n 'create document failed': '\u521B\u5EFA\u6587\u6863\u5931\u8D25',\n 'create document for preview': '\u521B\u5EFA\u9884\u89C8\u6587\u6863',\n 'resize document for preview': '\u8C03\u6574\u9884\u89C8\u6587\u6863\u5C3A\u5BF8',\n 'no first related layer in {0}': '\u7EC4 {0} \u4E2D\u6CA1\u6709\u7B2C\u4E00\u4E2A\u76F8\u5173\u56FE\u5C42',\n \"imageDataError: data length is not multiple of width * height\": \"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: \u6570\u636E\u957F\u5EA6\u4E0D\u662F\u5BBD\u5EA6 * \u9AD8\u5EA6\u7684\u500D\u6570\",\n \"imageDataError: originComponents must be 1 or 3\": \"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: originComponents \u5FC5\u987B\u662F 1 \u6216 3\",\n 'unexpected connection lost, please try to reconnect': '\u610F\u5916\u65AD\u5F00\u8FDE\u63A5\uFF0C\u8BF7\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5',\n \"Workflow list is empty, please save a workflow by Comfy's lastest UI\": '\u5DE5\u4F5C\u6D41\u5217\u8868\u4E3A\u7A7A\uFF0C\u8BF7\u5728Comfy\u7684\u65B0\u7248UI\u4E2D\u4FDD\u5B58\u4E00\u4E2A\u5DE5\u4F5C\u6D41',\n 'No opened ComfyUI pages': '\u6CA1\u6709\u5DF2\u6253\u5F00\u7684ComfyUI\u9875\u9762',\n 'comfyAPI is not initialized, maybe comfyUI is too old': '\u65E0\u6CD5\u83B7\u53D6 ComfyAPI\uFF0C\u53EF\u80FD ComfyUI \u7248\u672C\u592A\u65E7',\n 'unsupported channel counts: {0}': '\u4E0D\u652F\u6301\u7684\u901A\u9053\u6570: {0}',\n 'Timeout, Maybe the URL is wrong': '\u8D85\u65F6\uFF0C\u53EF\u80FD comfy\u5730\u5740 \u586B\u5199\u9519\u8BEF',\n 'Workflow list loading failed: {0}': '\u5DE5\u4F5C\u6D41\u5217\u8868\u52A0\u8F7D\u5931\u8D25: {0}',\n 'Please register a user in ComfyUI': '\u8BF7\u5728 ComfyUI \u4E2D\u6CE8\u518C\u4E00\u4E2A\u7528\u6237',\n 'GetSelection need Photoshop version 25+': 'GetSelection \u9700\u8981 Photoshop 25+ \u7248\u672C',\n 'Action {0} not found': 'Action {0} \u672A\u627E\u5230',\n 'Action set {0} not found': 'ActionSet {0} \u672A\u627E\u5230',\n '{0} cannot be used in Photoshop Action Node': '{0} \u4E0D\u80FD\u5728 Photoshop Action \u8282\u70B9\u4E2D\u4F7F\u7528',\n 'Group layers': '\u56FE\u5C42\u7EC4',\n 'Show All Groups': '\u663E\u793A\u6240\u6709\u7EC4',\n\n // photoshop modal state\n 'create document for sent images': '\u7ED9\u53D1\u9001\u7684\u56FE\u7247\u521B\u5EFA\u6587\u6863',\n 'show sent images': '\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247',\n 'fallback show sent images': '\u53D6\u6D88\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247',\n \"get content of layer {0}\": \"\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9\",\n 'fallback get content of layer {0}': '\u53D6\u6D88\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9',\n 'get layer info': '\u83B7\u53D6\u56FE\u5C42\u4FE1\u606F',\n 'sdppp extract PSD': 'sdppp \u5BFC\u5165 PSD',\n 'sdppp get PSD': 'sdppp \u83B7\u53D6 PSD', \n 'set text to layer': '\u8BBE\u7F6E\u56FE\u5C42\u7684\u6587\u672C',\n 'run Photoshop Action': 'sdppp \u8FD0\u884C Photoshop Action',\n 'select layer': 'sdppp \u9009\u4E2D\u56FE\u5C42',\n \n // photoshop dialog/widget\n '{0} wants to extract a PSD file to Photoshop, are you sure?': '{0} \u60F3\u8981\u91CA\u653E\u4E00\u4E2A.psd\u6587\u4EF6\u5230Photoshop\uFF0C\u786E\u5B9A\u5417\uFF1F',\n 'should sdppp refuse extracting PSD to Photoshop in this session anymore?': '\u662F\u5426\u8981\u8BA9 sdppp \u62D2\u7EDD\u672C\u6B21PS\u4F1A\u8BDD\u518D\u6B21\u63A5\u53D7.psd\u91CA\u653E\u8BF7\u6C42\uFF1F',\n 'Wide Mode': '\u5BBD\u5C4F\u6A21\u5F0F',\n 'Quick Set': '\u5FEB\u901F\u8BBE\u7F6E',\n 'Selected Layer': '\u9009\u4E2D\u56FE\u5C42',\n 'Selected Layer (invert)': '\u9009\u4E2D\u56FE\u5C42(\u53CD\u5411)',\n 'Canvas': '\u753B\u5E03',\n 'Selection': '\u9009\u533A',\n 'Manual': '\u624B\u52A8\u6A21\u5F0F',\n 'Auto': '\u81EA\u52A8\u6A21\u5F0F',\n\n // about\n 'This plugin is based on sd-ppp': '\u672C\u63D2\u4EF6\u57FA\u4E8Esd-ppp\u5F00\u53D1',\n 'And follows its open source license:': '\u5E76\u9075\u5FAA\u5176\u5F00\u6E90\u534F\u8BAE\uFF1A',\n \"Cloud\": \"\u4E91\u7AEF\u63A8\u8350\",\n \"Sponsors\": \"\u8D5E\u52A9\",\n \"waiting...\": '\u865A\u4F4D\u4EE5\u5F85',\n 'Links': '\u53CB\u60C5\u94FE\u63A5',\n 'Community': '\u793E\u533A',\n 'LICENSE:': '\u8BB8\u53EF\u8BC1\uFF1A',\n 'Official Site': '\u5B98\u65B9\u7F51\u7AD9',\n\n // comfy popup\n \"upload\": \"\u4E0A\u4F20\",\n \"Simplify Workflow\": \"\u7B80\u5316\u5DE5\u4F5C\u6D41\",\n \"Photoshop\": \"Photoshop\",\n \"Photoshop plugin settings\": \"Photoshop \u63D2\u4EF6\u8BBE\u7F6E\",\n \"Photoshop plugin\": \"Photoshop \u63D2\u4EF6\",\n \"SDPPP Settings/Misc\": \"SDPPP \u8BBE\u7F6E/\u6742\u9879\",\n \"Sample .PSD for this workflow:\": \"\u793A\u4F8B.PSD\",\n \"Download Example .PSD\": \"\u4E0B\u8F7D\u793A\u4F8B.PSD\",\n \"Maximum Image Size (px):\": \"\u6700\u5927\u56FE\u50CF\u5C3A\u5BF8(px)\",\n \"Download\": \"\u4E0B\u8F7D\",\n \"Upload\": \"\u4E0A\u4F20\",\n \"Reset\": \"\u91CD\u7F6E\",\n 'Refresh': '\u5237\u65B0',\n 'Comfy URL (You can copy it to connect ComfyUI in the plugin):': 'Comfy\u5730\u5740(\u4F60\u53EF\u4EE5\u590D\u5236\u5B83\u5230\u63D2\u4EF6\u4E2D\u8FDE\u63A5ComfyUI):',\n 'use slider for number widget:': '\u6570\u5B57\u63A7\u4EF6\u4F7F\u7528\u6ED1\u5757',\n 'Photoshop is not connected': 'Photoshop \u672A\u8FDE\u63A5',\n 'select...': '\u8BF7\u9009\u62E9',\n 'click to edit': '\u70B9\u51FB\u7F16\u8F91',\n\n // comfy call error\n 'ComfyManager not found, cannot reboot': 'Comfy Manager\u672A\u5B89\u88C5\uFF0C\u65E0\u6CD5\u91CD\u542F',\n 'Failed to reboot ComfyUI': '\u91CD\u542FComfyUI\u5931\u8D25',\n}\n", "import en from './en.mjs';\nimport zhcn from './zh-cn.mjs';\n//@ts-ignore\nconst require_ = typeof require != 'undefined' ? require : undefined\n\nlet locale = 'en'\nif (typeof navigator !== 'undefined' && navigator.language) {\n locale = navigator.language == \"zh-CN\" ? 'zhcn' : 'en'\n} else if (require_) {\n locale = require_('uxp').host.uiLocale.startsWith(\"zh\") ? 'zhcn' : 'en';\n}\n\nexport type I18nKey = keyof typeof zhcn;\n\nexport default function i18n(key: keyof typeof zhcn, ...args: any[]) {\n const formatStr: string = locale == 'zhcn' ? zhcn[key] : (key in en ? (en as any)[key] : key);\n if (!formatStr) throw new Error(`i18n key not found: ${key}`);\n\n return formatStr.replace(/{(\\d+)}/g, function (match, number) {\n return typeof args[number] != 'undefined' ? args[number] : match\n });\n}\n\nexport function isValidI18nKey(key: string) {\n return key in zhcn;\n}\n\nexport function isI18nOf(key: keyof typeof zhcn, str: string) {\n return key == str || zhcn[key] == str;\n}\n\nexport function getI18nLocale() {\n return locale;\n}\n", "import React from \"react\";\n\nexport default class ActionButton extends React.Component<{\n onClick?: (...args: any[]) => any\n highlight?: boolean\n children?: React.ReactNode\n}> {\n render() {\n return (\n
\n {this.props.children}\n
\n )\n }\n}\n", "import React from \"react\";\n\nexport default class EditIcon extends React.Component<{\n size?: number,\n onClick?: (...args: any[]) => any\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
\n \n \n \n
\n )\n }\n}\n", "import React from \"react\";\n\nexport default class FolderIcon extends React.Component<{\n size?: number\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
\n \n \n \n
\n )\n }\n}\n", "import React from \"react\";\n\nexport default class LivePaintingIcon extends React.Component<{\n size?: number,\n onClick?: (...args: any[]) => any\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
\n \n \n \n \n
\n )\n }\n}", "import React from \"react\";\n\nexport default class PlayIcon extends React.Component<{\n size?: number\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
\n \n \n \n
\n )\n }\n}\n", "import React from \"react\";\nimport ActionButton from \"./ActionButton.js\";\nimport EditIcon from \"./icons/EditIcon.js\";\nimport FolderIcon from \"./icons/FolderIcon.js\";\nimport LivePaintingIcon from \"./icons/LivePaintingIcon.js\";\nimport PlayIcon from \"./icons/PlayIcon.js\";\nimport { useSDPPPContext, useSDPPPComfyCaller } from \"./SDPPPInternalBridge.js\";\nimport i18n from \"../../../../src/common/i18n.mjs\";\n\nconst ICON_SIZE = 0.6;\nconst CLASS_NAMES = {\n LIST_ITEM: \"client-list-item\",\n LIST_ITEM_LEFT: \"client-list-item-left\",\n LIST_ITEM_RIGHT: \"client-list-item-right\",\n TIPS_ICON: \"tips-icon\",\n CHECKED: \"checked\"\n};\n\ninterface BaseListItemProps {\n isChecked?: boolean;\n children: React.ReactNode;\n rightContent?: React.ReactNode;\n onClick?: () => void;\n}\n\nconst BaseListItem: React.FC = ({\n isChecked = false,\n children,\n rightContent,\n onClick\n}) => {\n return (\n
  • \n \n {children}\n \n {rightContent && (\n
    \n {rightContent}\n
    \n )}\n
  • \n );\n};\n\ninterface DirectoryItemProps {\n path: string;\n dirname: string;\n onDirectorySet: (path: string) => void;\n}\n\nconst DirectoryItem: React.FC = ({\n path,\n dirname,\n onDirectorySet\n}) => {\n const handleClick = () => {\n if (path === '../') {\n const directoryWithoutSuffix = dirname || '';\n const lastSlashIndex = directoryWithoutSuffix.lastIndexOf('/');\n if (lastSlashIndex === -1) {\n onDirectorySet?.('');\n } else {\n onDirectorySet?.(directoryWithoutSuffix.slice(0, lastSlashIndex));\n }\n } else {\n onDirectorySet?.(path);\n }\n };\n\n return (\n \n \n
    {path.slice(0, -1).split('/').pop()}
    \n
    \n );\n};\n\ninterface WorkflowItemProps {\n path: string;\n isChecked: boolean;\n workflow: {\n path: string;\n error: string;\n };\n onRun: (path: string) => Promise;\n setEditorMode: (editorMode: boolean) => void;\n}\n\ninterface ActiveWorkflowItemProps {\n path: string | null;\n title: string;\n onRun: () => Promise;\n setEditorMode: (editorMode: boolean) => void;\n}\n\nconst WorkflowActions: React.FC<{\n isChecked?: boolean;\n onEdit: () => void;\n onAutoRun?: () => void;\n onRun: () => void;\n}> = ({ isChecked, onEdit, onAutoRun, onRun }) => {\n return (\n <>\n
    \n \n
    \n {onAutoRun && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst WorkflowItem: React.FC = ({\n path,\n isChecked,\n workflow,\n onRun,\n setEditorMode\n}) => {\n const {\n setAutoRunning,\n workflowAgentSID\n } = useSDPPPContext();\n const {\n openWorkflow\n } = useSDPPPComfyCaller();\n\n const handleEditClick = () => {\n setEditorMode(true);\n openWorkflow(workflowAgentSID, workflow.path);\n };\n\n const handleAutoRunClick = () => {\n if (!isChecked) {\n setAutoRunning({ type: 'workflow', value: path });\n } else {\n setAutoRunning(null);\n }\n };\n\n return (\n onRun(workflow.path)}\n />\n }\n onClick={handleEditClick}\n >\n {workflow.error ? workflow.error.replace('sdppp PS side error:', '') : workflow.path.split('/').pop()}\n \n );\n};\n\nconst SpecialWorkflowItem: React.FC = ({\n onRun,\n path,\n title,\n setEditorMode\n}) => {\n const {\n openWorkflow\n } = useSDPPPComfyCaller();\n const {\n workflowAgentSID\n } = useSDPPPContext();\n\n const handleEditClick = async () => {\n path && await openWorkflow(workflowAgentSID, path);\n setEditorMode(true);\n };\n\n return (\n \n }\n onClick={handleEditClick}\n >\n {title}\n \n );\n};\n\nexport {\n DirectoryItem,\n WorkflowItem,\n SpecialWorkflowItem\n};\n", "import React from \"react\";\nimport i18n from \"../../../../src/common/i18n.mjs\";\nimport { SpecialWorkflowItem, DirectoryItem, WorkflowItem } from \"./WorkflowListItem.js\";\nimport {\n useSDPPPComfyCaller, useAgentState,\n useSDPPPContext, useSDPPPWorkflowList\n} from \"./SDPPPInternalBridge.js\";\n\ninterface WorkflowListProps {\n setEditorMode: (editorMode: boolean) => void\n}\n\nconst WorkflowList: React.FC = ({ setEditorMode }) => {\n const {\n autoRunning,\n workflowAgentSID,\n } = useSDPPPContext();\n\n const {\n runWorkflow,\n runPage\n } = useSDPPPComfyCaller();\n\n const {\n workflows,\n workflowsError,\n currentViewingDirectory,\n setCurrentViewingDirectory,\n showingList\n } = useSDPPPWorkflowList();\n\n let listReplacer = null;\n if (workflowsError)\n return
    \n {workflowsError}\n
    \n\n return (\n
    \n
      \n {\n currentViewingDirectory ?\n {\n setCurrentViewingDirectory(dirname)\n }}\n />\n : null\n }\n {\n showingList.map((item: { path: string, isDir: boolean }) => {\n const path = item.path;\n const workflow = workflows[path]\n const checked = autoRunning?.value == path;\n if (item.isDir) {\n return (\n {\n setCurrentViewingDirectory(dirname)\n }}\n />\n )\n }\n return (\n {\n await runWorkflow(path);\n }}\n />\n )\n })\n }\n\n
    \n \n
      \n {\n await runPage(workflowAgentSID);\n }}\n />\n {\n await runPage(workflowAgentSID);\n }}\n />\n
    \n\n {autoRunning?.type == 'workflow' ? {i18n(`auto run workflow [{0}] after change..`, workflows[autoRunning?.value]?.path)} : ''}\n
    \n );\n};\n\nexport default WorkflowList;", "import { useSDPPPContext, Promote, Auths } from \"./SDPPPInternalBridge.js\";\nimport i18n, { isValidI18nKey } from \"../../../../src/common/i18n.mjs\";\nimport WorkflowList from \"./WorkflowList.js\";\nimport { useEffect, useState } from \"react\";\nimport { WorkflowEditWrap } from \"./WorkflowEditWrap.js\";\nimport type { AddressBarType, WorkflowEditPhotoshopType } from \"./SDPPPInternalBridge.js\";\n\nexport function Content({\n connectState,\n AddressBar,\n WorkflowEditPhotoshop,\n}: {\n connectState: 'connected' | 'disconnected' | 'connecting',\n AddressBar: AddressBarType,\n WorkflowEditPhotoshop: WorkflowEditPhotoshopType,\n}) {\n const [editorMode, setEditorMode] = useState(false);\n\n const {\n workflowAgentSID,\n webviewAgentSID,\n lastConnectErrorMessage,\n\n } = useSDPPPContext();\n\n const editorCardShowingIndex = editorMode ? 1 : 0;\n\n const [prevIsNotWebview, setPrevIsNotWebview] = useState(false);\n\n // when disconnect and the agent is not webview, set editor mode to false\n useEffect(() => {\n if (workflowAgentSID) {\n setPrevIsNotWebview(workflowAgentSID != webviewAgentSID);\n } else {\n if (prevIsNotWebview) {\n setEditorMode(false);\n }\n }\n }, [workflowAgentSID]);\n useEffect(() => {\n if (connectState === 'disconnected') {\n setEditorMode(false);\n }\n }, [connectState]);\n return (\n <>\n \n
    \n
    \n {\n !editorMode ?\n
    \n
    \u2B24
    \n
    \n :\n {\n setEditorMode(false);\n }}\n >\u2190\n }\n \n
    \n
    \n {\n lastConnectErrorMessage ? (\n
    \n \n {isValidI18nKey(lastConnectErrorMessage) ? i18n(lastConnectErrorMessage as any) : lastConnectErrorMessage}\n \n
    \n ) : ''\n }\n\n {/* */} \n\n {\n connectState === \"connected\" &&\n
    \n
    \n
    \n {/* */}\n \n
    \n
    \n
    \n {editorMode && workflowAgentSID && }\n
    \n
    \n }\n \n );\n}\n\n\n", "import { useCallback, useMemo } from \"react\"\nimport i18n from \"../../../../src/common/i18n.mjs\"\nimport LivePaintingIcon from \"./icons/LivePaintingIcon\"\nimport PlayIcon from \"./icons/PlayIcon\"\nimport {\n useSDPPPComfyCaller,\n useSDPPPContext,\n useAgentState,\n} from \"./SDPPPInternalBridge\"\nimport RefreshIcon from \"./icons/RefreshIcon\"\nimport SaveIcon from \"./icons/SaveIcon\"\nimport PlayMultiIcon from \"./icons/PlayMultiIcon\"\nimport WebEditIcon from \"./icons/WebEditIcon\"\nimport CrossIcon from \"./icons/CrossIcon\"\nimport StopIcon from \"./icons/StopIcon\"\nimport CancelIcon from \"./icons/CancelIcon\"\nimport { action } from \"photoshop\";\n\n// \u72B6\u6001\u663E\u793A\u7EC4\u4EF6\nconst WorkflowStatus = () => {\n const { workflowAgentSID, autoRunning } = useSDPPPContext();\n const { lastError, progress, executingNodeTitle } = useAgentState(workflowAgentSID);\n\n return (\n
    \n {autoRunning ? {i18n('auto run workflow after change..')} : ''}\n {lastError ? {lastError} : ''}\n {executingNodeTitle ? <>\n {`${progress}% ${executingNodeTitle}...`}\n \n : ''}\n
    \n );\n};\n\n// \u4FDD\u5B58\u548C\u5237\u65B0\u6309\u94AE\u7EC4\nconst SaveButton = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { saveWorkflow, reopenWorkflow } = useSDPPPComfyCaller();\n\n const onSave = useCallback(async () => {\n await saveWorkflow(workflowAgentSID);\n }, [saveWorkflow, workflowAgentSID]);\n\n return (\n \n \n \n );\n};\nconst ClearButton = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { clearQueue } = useSDPPPComfyCaller();\n const onClear = useCallback(() => {\n clearQueue();\n }, [clearQueue]);\n\n return \n \n \n}\n\nconst RebootButton = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { reboot } = useSDPPPComfyCaller();\n const onReboot = useCallback(() => {\n reboot();\n }, [reboot]);\n\n return \u91CD\u542F\n}\n\nconst StopButton = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { interrupt } = useSDPPPComfyCaller();\n const onInterrupt = useCallback(() => {\n interrupt();\n }, [interrupt]);\n\n return \n \n \n}\nconst StopAndCancelButton = () => {\n const { interrupt } = useSDPPPComfyCaller();\n const { clearQueue } = useSDPPPComfyCaller();\n const onClearAndInterrupt = useCallback(async () => {\n await clearQueue();\n await interrupt();\n }, [clearQueue, interrupt]);\n\n return \n \n \n}\n\nconst RefreshButton = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { reopenWorkflow } = useSDPPPComfyCaller();\n const onReopen = useCallback(() => {\n reopenWorkflow(workflowAgentSID);\n }, [reopenWorkflow, workflowAgentSID]);\n\n return \n \n \n}\n\nconst PlayMultiButtons = () => {\n const { workflowAgentSID, autoRunning } = useSDPPPContext();\n const { runPage } = useSDPPPComfyCaller();\n\n return <>\n {!autoRunning ? { runPage(workflowAgentSID, 10) }}>\n \n : ''}\n {!autoRunning ? { runPage(workflowAgentSID, 3) }}>\n \n : ''}\n \n}\n\n// \u81EA\u52A8\u8FD0\u884C\u6309\u94AE\nconst AutoRunButtons = () => {\n const { workflowAgentSID, autoRunning, setAutoRunning } = useSDPPPContext();\n\n return (\n {\n if (autoRunning?.value == workflowAgentSID) {\n setAutoRunning(null);\n } else {\n setAutoRunning({\n type: 'page',\n value: workflowAgentSID\n });\n }\n }}>\n \n \n );\n};\n\n// \u7F16\u8F91\u6309\u94AE\nconst EditButton = () => {\n const { workflowAgentSID, webviewAgentSID, toggleWebviewDialog } = useSDPPPContext();\n const usingWebview = workflowAgentSID == webviewAgentSID;\n\n return (\n { toggleWebviewDialog() }}\n title={!usingWebview ? i18n('disabled when running in browser page') : i18n('Edit in ComfyUI')}\n >\n \n \n );\n};\n\n// \u8FD0\u884C\u6309\u94AE\nconst RunButton = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { runPage } = useSDPPPComfyCaller();\n\n return (\n { \n runPage(workflowAgentSID);\n }}>\n \n \n );\n};\nconst RunMultiButtons = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { runPage } = useSDPPPComfyCaller();\n\n return (\n <>\n
    { runPage(workflowAgentSID, 2) }}>x2
    \n
    { runPage(workflowAgentSID, 5) }}>x5
    \n
    { runPage(workflowAgentSID, 9) }}>x9
    \n \n )\n}\n\n// const TestButtons = () => {\n// const { interrupt, clearQueue, reboot } = useSDPPPComfyCaller();\n\n// return (\n// { reboot() }}>\n// \n// \n// )\n// }\n\nexport function WorkflowEditWrap({\n WorkflowEditPhotoshop\n}: {\n WorkflowEditPhotoshop: any,\n}) {\n const { workflowAgentSID } = useSDPPPContext();\n const { ssid, queueSize } = useAgentState(workflowAgentSID);\n\n return useMemo(() => {\n return (\n
    \n
    \n {/* {i18n('(Page ID: {0})Queue: {1}', ssid, queueSize)} */}\n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n {/* */}\n
    \n
    \n
    \n \n {/* */}\n \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n \n \n
    \n );\n }, [ssid, queueSize]);\n}\n", "import React from \"react\";\n\nexport default class RefreshIcon extends React.Component<{\n size?: number,\n onClick?: (...args: any[]) => any\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
    \n \n \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class SaveIcon extends React.Component {\n render() {\n return (\n
    \n \n \n \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class PlayMultiIcon extends React.Component<{ count: number }> {\n render() {\n return (\n
    \n \n \n \n {this.props.count}\n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class WebEditIcon extends React.Component {\n render() {\n return (\n
    \n \n \n\n \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class CrossIcon extends React.Component<{\n size?: number,\n hollowStyle?: boolean\n}> {\n render() {\n return (\n
    \n \n \n \n \n
    \n )\n }\n}", "import React from \"react\";\n\nexport default class StopIcon extends React.Component<{\n size?: number,\n hollowStyle?: boolean\n}> {\n render() {\n return (\n
    \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class CancelIcon extends React.Component<{\n size?: number,\n}> {\n render() {\n return (\n
    \n \n {/* Single diagonal line from bottom-left to top-right */}\n \n \n {/* Circle outline */}\n \n \n
    \n )\n }\n}", "import { Content } from \"./Content.js\";\nimport { SDPPP, SDPPPProvider } from \"./SDPPPInternalBridge.js\";\n\nexport default function Main() {\n return (\n \n
    \n {\n return (\n \n )\n }}\n />\n
    \n
    \n )\n}", "import Main from \"./tsx/Main.js\";\nimport { createRoot } from \"react-dom/client\";\n\ndeclare const globalThis: any;\nglobalThis.sdppp = globalThis.sdppp || {};\nglobalThis.sdppp.renderPhotoshopPlugin = (rootElement: HTMLElement) => {\n createRoot(rootElement).render(
    );\n}\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,aAAO,UAAU,OAAO;AAAA;AAAA;;;ACAxB;AAAA;AAAA;AAAA,aAAO,UAAU,OAAO;AAAA;AAAA;;;ACAxB;AAAA;AAAA;AAAA,aAAO,UAAU,OAAO;AAAA;AAAA;;;ACAxB;AAAA;AAAA;AAAA,aAAO,UAAU,OAAO;AAAA;AAAA;;;ACAxB;AAAA,0CAAc;;;ACAd,MAAO,aAAQ;AAAA,IACX,sBAAsB;AAAA,IACtB,yBAAyB;AAAA,IACzB,2BAA2B;AAAA,IAC3B,6BAA6B;AAAA,IAC7B,6BAA6B;AAAA,IAC7B,0BAA0B;AAAA,IAC1B,uBAAuB;AAAA,IACvB,kCAAkC;AAAA,IAClC,kCAAkC;AAAA,IAClC,kBAAkB;AAAA,EACtB;;;ACXA,MAAO,gBAAQ;AAAA;AAAA,IAEX,2BAA2B;AAAA,IAC3B,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,0BAA0B;AAAA,IAC1B,mCAAmC;AAAA,IACnC,eAAe;AAAA;AAAA,IAGf,4BAA4B;AAAA,IAC5B,SAAS;AAAA,IACT,gBAAgB;AAAA;AAAA,IAGhB,wBAAwB;AAAA,IACxB,iDAAiD;AAAA,IACjD,6EAA6E;AAAA,IAC7E,6CAA6C;AAAA,IAC7C,4CAA4C;AAAA,IAC5C,MAAM;AAAA,IACN,uBAAuB;AAAA;AAAA,IAGvB,sEAAsE;AAAA,IACtE,2DAA2D;AAAA,IAC3D,8BAA8B;AAAA,IAC9B,6EAA6E;AAAA;AAAA,IAG7E,sBAAsB;AAAA,IACtB,yBAAyB;AAAA,IACzB,2BAA2B;AAAA,IAC3B,6BAA6B;AAAA,IAC7B,6BAA6B;AAAA,IAC7B,0BAA0B;AAAA,IAC1B,uBAAuB;AAAA,IACvB,kCAAkC;AAAA,IAClC,kCAAkC;AAAA,IAClC,4BAA4B;AAAA,IAC5B,8BAA8B;AAAA;AAAA,IAG9B,6BAA6B;AAAA,IAC7B,+BAA+B;AAAA,IAC/B,6BAA6B;AAAA,IAC7B,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,cAAc;AAAA,IACd,cAAc;AAAA,IACd,aAAa;AAAA,IACb,cAAc;AAAA,IACd,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,SAAS;AAAA,IACT,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,SAAS;AAAA,IACT,UAAU;AAAA,IACV,qBAAqB;AAAA,IACrB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,eAAe;AAAA,IACf,2BAA4B;AAAA,IAC5B,WAAW;AAAA,IACX,aAAa;AAAA,IACb,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,IACb,UAAU;AAAA,IACV,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB,sBAAsB;AAAA,IACtB,8BAA8B;AAAA,IAC9B,mCAAmC;AAAA,IACnC,eAAe;AAAA,IACf,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,WAAW;AAAA;AAAA,IAGX,UAAU;AAAA,IACV,cAAc;AAAA,IACd,eAAe;AAAA,IACf,WAAW;AAAA,IACX,cAAc;AAAA,IACd,2BAA2B;AAAA,IAC3B,UAAU;AAAA,IACV,UAAU;AAAA,IACV,WAAW;AAAA,IACX,aAAa;AAAA,IACb,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,sCAAsC;AAAA,IACtC,0CAA0C;AAAA,IAC1C,oCAAoC;AAAA,IACpC,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV,WAAW;AAAA,IACX,qDAAqD;AAAA,IACrD,wGAAwG;AAAA,IACxG,4DAA4D;AAAA,IAC5D,iCAAiC;AAAA,IACjC,4BAA4B;AAAA,IAC5B,gDAAgD;AAAA,IAChD,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,mBAAmB;AAAA,IACnB,iDAAiD;AAAA,IACjD,sCAAsC;AAAA,IACtC,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,aAAa;AAAA,IACb,yCAAyC;AAAA,IACzC,+BAA+B;AAAA,IAC/B,SAAS;AAAA,IACT,mBAAmB;AAAA,IACnB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,gCAAgC;AAAA,IAChC,yBAAyB;AAAA,IACzB,yBAAyB;AAAA,IACzB,oDAAoD;AAAA,IACpD,sBAAsB;AAAA,IACtB,aAAa;AAAA,IACb,mBAAmB;AAAA,IACnB,cAAc;AAAA,IACd,+BAA+B;AAAA,IAC/B,eAAe;AAAA,IACf,6CAA6C;AAAA,IAC7C,2BAA2B;AAAA,IAC3B,wBAAwB;AAAA,IACxB,mDAAmD;AAAA;AAAA,IAGnD,wCAAwC;AAAA,IACxC,iEAAiE;AAAA,IACjE,wBAAwB;AAAA,IACxB,kCAAkC;AAAA,IAClC,gDAAgD;AAAA,IAChD,gCAAgC;AAAA,IAChC,cAAc;AAAA,IACd,sBAAsB;AAAA;AAAA,IAGtB,0BAA0B;AAAA,IAC1B,2DAA2D;AAAA,IAC3D,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,IAC3B,4BAA4B;AAAA,IAC5B,yBAAyB;AAAA,IACzB,wBAAwB;AAAA,IACxB,kBAAkB;AAAA,IAClB,2BAA2B;AAAA,IAC3B,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,2CAA2C;AAAA,IAC3C,uBAAuB;AAAA,IACvB,0BAA0B;AAAA,IAC1B,+BAA+B;AAAA,IAC/B,+BAA+B;AAAA,IAC/B,iCAAiC;AAAA,IACjC,iEAAiE;AAAA,IACjE,mDAAmD;AAAA,IACnD,uDAAuD;AAAA,IACvD,wEAAwE;AAAA,IACxE,2BAA2B;AAAA,IAC3B,yDAAyD;AAAA,IACzD,mCAAmC;AAAA,IACnC,mCAAmC;AAAA,IACnC,qCAAqC;AAAA,IACrC,qCAAqC;AAAA,IACrC,2CAA2C;AAAA,IAC3C,wBAAwB;AAAA,IACxB,4BAA4B;AAAA,IAC5B,+CAA+C;AAAA,IAC/C,gBAAgB;AAAA,IAChB,mBAAmB;AAAA;AAAA,IAGnB,mCAAmC;AAAA,IACnC,oBAAoB;AAAA,IACpB,6BAA6B;AAAA,IAC7B,4BAA4B;AAAA,IAC5B,qCAAqC;AAAA,IACrC,kBAAkB;AAAA,IAClB,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,wBAAwB;AAAA,IACxB,gBAAgB;AAAA;AAAA,IAGhB,+DAA+D;AAAA,IAC/D,4EAA4E;AAAA,IAC5E,aAAa;AAAA,IACb,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,2BAA2B;AAAA,IAC3B,UAAU;AAAA,IACV,aAAa;AAAA,IACb,UAAU;AAAA,IACV,QAAQ;AAAA;AAAA,IAGR,kCAAkC;AAAA,IAClC,wCAAwC;AAAA,IACxC,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,SAAS;AAAA,IACT,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,iBAAiB;AAAA;AAAA,IAGjB,UAAU;AAAA,IACV,qBAAqB;AAAA,IACrB,aAAa;AAAA,IACb,6BAA6B;AAAA,IAC7B,oBAAoB;AAAA,IACpB,uBAAuB;AAAA,IACvB,kCAAkC;AAAA,IAClC,yBAAyB;AAAA,IACzB,4BAA4B;AAAA,IAC5B,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,WAAW;AAAA,IACX,iEAAiE;AAAA,IACjE,iCAAiC;AAAA,IACjC,8BAA8B;AAAA,IAC9B,aAAa;AAAA,IACb,iBAAiB;AAAA;AAAA,IAGjB,yCAAyC;AAAA,IACzC,4BAA4B;AAAA,EAChC;;;AC9PA,MAAM,WAAW,OAAO,aAAW,cAAc,YAAU;AAE3D,MAAI,SAAS;AACb,MAAI,OAAO,cAAc,eAAe,UAAU,UAAU;AACxD,aAAS,UAAU,YAAY,UAAU,SAAS;AAAA,EACtD,WAAW,UAAU;AACjB,aAAS,SAAS,KAAK,EAAE,KAAK,SAAS,WAAW,IAAI,IAAI,SAAS;AAAA,EACvE;AAIe,WAAR,KAAsB,QAA2B,MAAa;AACjE,UAAM,YAAoB,UAAU,SAAS,cAAK,GAAG,IAAK,OAAO,aAAM,WAAW,GAAG,IAAI;AACzF,QAAI,CAAC,UAAW,OAAM,IAAI,MAAM,uBAAuB,GAAG,EAAE;AAE5D,WAAO,UAAU,QAAQ,YAAY,SAAU,OAAO,QAAQ;AAC1D,aAAO,OAAO,KAAK,MAAM,KAAK,cAAc,KAAK,MAAM,IAAI;AAAA,IAC/D,CAAC;AAAA,EACL;AAEO,WAAS,eAAe,KAAa;AACxC,WAAO,OAAO;AAAA,EAClB;;;ACzBA,qBAAkB;AASN;AAPZ,MAAqB,eAArB,cAA0C,aAAAA,QAAM,UAI7C;AAAA,IACC,SAAS;AACL,aACI,4CAAC,SAAI,WAAW,iBAAiB,KAAK,MAAM,YAAY,cAAc,EAAE,IAAI,SAAS,KAAK,MAAM,SAC3F,eAAK,MAAM,UAChB;AAAA,IAER;AAAA,EACJ;;;ACdA,MAAAC,gBAAkB;AAWE,MAAAC,sBAAA;AATpB,MAAqB,WAArB,cAAsC,cAAAC,QAAM,UAGzC;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cAAa,SAAS,KAAK,MAAM,SACxD,uDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E,uDAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,iVAAgV,GACtZ,GACJ;AAAA,IAER;AAAA,EACJ;;;AChBA,MAAAC,gBAAkB;AAUE,MAAAC,sBAAA;AARpB,MAAqB,aAArB,cAAwC,cAAAC,QAAM,UAE3C;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,uDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E,uDAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,+JAA8J,GACpO,GACJ;AAAA,IAER;AAAA,EACJ;;;ACfA,MAAAC,gBAAkB;AAUF,MAAAC,sBAAA;AARhB,MAAqB,mBAArB,cAA8C,cAAAC,QAAM,UAGjD;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cAAa,SAAS,KAAK,MAAM,SACxD,wDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E;AAAA,qDAAC,UAAK,MAAK,gBAAe,GAAE,gTAAgT;AAAA,QAC5U,6CAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,gIAA+H;AAAA,SACrM,GACJ;AAAA,IAER;AAAA,EACJ;;;ACjBA,MAAAC,gBAAkB;AAUE,MAAAC,sBAAA;AARpB,MAAqB,WAArB,cAAsC,cAAAC,QAAM,UAEzC;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,uDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E,uDAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,kIAAiI,GACvM,GACJ;AAAA,IAER;AAAA,EACJ;;;ACiBQ,MAAAC,sBAAA;AAvBR,MAAM,YAAY;AAClB,MAAM,cAAc;AAAA,IAChB,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,SAAS;AAAA,EACb;AASA,MAAM,eAA4C,CAAC;AAAA,IAC/C,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACJ,MAAM;AACF,WACI,8CAAC,QAAG,WAAW,GAAG,YAAY,SAAS,GAAG,YAAY,IAAI,YAAY,OAAO,KAAK,EAAE,IAAI,SACpF;AAAA,mDAAC,cAAS,WAAW,YAAY,gBAC5B,UACL;AAAA,MACC,gBACG,6CAAC,SAAI,WAAW,YAAY,iBACvB,wBACL;AAAA,OAER;AAAA,EAER;AAQA,MAAM,gBAA8C,CAAC;AAAA,IACjD;AAAA,IACA;AAAA,IACA;AAAA,EACJ,MAAM;AACF,UAAM,cAAc,MAAM;AACtB,UAAI,SAAS,OAAO;AAChB,cAAM,yBAAyB,WAAW;AAC1C,cAAM,iBAAiB,uBAAuB,YAAY,GAAG;AAC7D,YAAI,mBAAmB,IAAI;AACvB,2BAAiB,EAAE;AAAA,QACvB,OAAO;AACH,2BAAiB,uBAAuB,MAAM,GAAG,cAAc,CAAC;AAAA,QACpE;AAAA,MACJ,OAAO;AACH,yBAAiB,IAAI;AAAA,MACzB;AAAA,IACJ;AAEA,WACI,8CAAC,gBAAa,SAAS,aACnB;AAAA,mDAAC,cAAW,MAAM,WAAW;AAAA,MAC7B,6CAAC,SAAI,OAAO,EAAE,YAAY,EAAE,GAAI,eAAK,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,GAAE;AAAA,OACvE;AAAA,EAER;AAoBA,MAAM,kBAKD,CAAC,EAAE,WAAW,QAAQ,WAAW,MAAM,MAAM;AAC9C,WACI,8EACI;AAAA,mDAAC,SAAI,WAAW,YAAY,WACxB,uDAAC,YAAS,MAAM,WAAW,SAAS,QAAQ,GAChD;AAAA,MACC,aACG,6CAAC,gBAAa,WAAW,WAAW,SAAS,WACzC,uDAAC,oBAAiB,MAAM,WAAW,GACvC;AAAA,MAEJ,6CAAC,gBAAa,SAAS,OACnB,uDAAC,YAAS,MAAM,WAAW,GAC/B;AAAA,OACJ;AAAA,EAER;AAEA,MAAM,eAA4C,CAAC;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,MAAM;AACF,UAAM;AAAA,MACF;AAAA,MACA;AAAA,IACJ,QAAI,6CAAgB;AACpB,UAAM;AAAA,MACF;AAAA,IACJ,QAAI,iDAAoB;AAExB,UAAM,kBAAkB,MAAM;AAC1B,oBAAc,IAAI;AAClB,mBAAa,kBAAkB,SAAS,IAAI;AAAA,IAChD;AAEA,UAAM,qBAAqB,MAAM;AAC7B,UAAI,CAAC,WAAW;AACZ,uBAAe,EAAE,MAAM,YAAY,OAAO,KAAK,CAAC;AAAA,MACpD,OAAO;AACH,uBAAe,IAAI;AAAA,MACvB;AAAA,IACJ;AAEA,WACI;AAAA,MAAC;AAAA;AAAA,QACG;AAAA,QACA,cACI;AAAA,UAAC;AAAA;AAAA,YACG;AAAA,YACA,QAAQ;AAAA,YACR,WAAW;AAAA,YACX,OAAO,MAAM,MAAM,SAAS,IAAI;AAAA;AAAA,QACpC;AAAA,QAEJ,SAAS;AAAA,QAER,mBAAS,QAAQ,SAAS,MAAM,QAAQ,wBAAwB,EAAE,IAAI,SAAS,KAAK,MAAM,GAAG,EAAE,IAAI;AAAA;AAAA,IACxG;AAAA,EAER;AAEA,MAAM,sBAAyD,CAAC;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,MAAM;AACF,UAAM;AAAA,MACF;AAAA,IACJ,QAAI,iDAAoB;AACxB,UAAM;AAAA,MACF;AAAA,IACJ,QAAI,6CAAgB;AAEpB,UAAM,kBAAkB,YAAY;AAChC,cAAQ,MAAM,aAAa,kBAAkB,IAAI;AACjD,oBAAc,IAAI;AAAA,IACtB;AAEA,WACI;AAAA,MAAC;AAAA;AAAA,QACG,cACI;AAAA,UAAC;AAAA;AAAA,YACG,QAAQ;AAAA,YACR;AAAA;AAAA,QACJ;AAAA,QAEJ,SAAS;AAAA,QAER;AAAA;AAAA,IACL;AAAA,EAER;;;AClKY,MAAAC,sBAAA;AAtBZ,MAAM,eAA4C,CAAC,EAAE,cAAc,MAAM;AACrE,UAAM;AAAA,MACF;AAAA,MACA;AAAA,IACJ,QAAI,6CAAgB;AAEpB,UAAM;AAAA,MACF;AAAA,MACA;AAAA,IACJ,QAAI,iDAAoB;AAExB,UAAM;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ,QAAI,kDAAqB;AAEzB,QAAI,eAAe;AACnB,QAAI;AACA,aAAO,6CAAC,SAAI,WAAU,iBAClB,uDAAC,cAAU,0BAAe,GAC9B;AAEJ,WACI,8CAAC,SAAI,WAAU,iBACX;AAAA,oDAAC,QAAG,WAAU,eAEN;AAAA,kCACI;AAAA,UAAC;AAAA;AAAA,YAEG,MAAK;AAAA,YACL,SAAS,wBAAwB,MAAM,GAAG,EAAE;AAAA,YAC5C,gBAAgB,CAAC,YAAoB;AACjC,yCAA2B,OAAO;AAAA,YACtC;AAAA;AAAA,UALK;AAAA,QAMT,IACE;AAAA,QAGN,YAAY,IAAI,CAAC,SAA2C;AACxD,gBAAM,OAAO,KAAK;AAClB,gBAAM,WAAW,UAAU,IAAI;AAC/B,gBAAM,UAAU,aAAa,SAAS;AACtC,cAAI,KAAK,OAAO;AACZ,mBACI;AAAA,cAAC;AAAA;AAAA,gBAEG;AAAA,gBACA,SAAS,wBAAwB,MAAM,GAAG,EAAE;AAAA,gBAC5C,gBAAgB,CAAC,YAAoB;AACjC,6CAA2B,OAAO;AAAA,gBACtC;AAAA;AAAA,cALK;AAAA,YAMT;AAAA,UAER;AACA,iBACI;AAAA,YAAC;AAAA;AAAA,cACG;AAAA,cAEA;AAAA,cACA,WAAW;AAAA,cACX;AAAA,cACA,OAAO,OAAOC,UAAiB;AAC3B,sBAAM,YAAYA,KAAI;AAAA,cAC1B;AAAA;AAAA,YANK;AAAA,UAOT;AAAA,QAER,CAAC;AAAA,SAGT;AAAA,MACA,6CAAC,gBAAW;AAAA,MACZ,8CAAC,QAAG,WAAU,eACV;AAAA;AAAA,UAAC;AAAA;AAAA,YACG;AAAA,YACA,MAAM;AAAA,YACN,OAAO,KAAK,yBAAyB;AAAA,YACrC,OAAO,YAAY;AACf,oBAAM,QAAQ,gBAAgB;AAAA,YAClC;AAAA;AAAA,QACJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACG;AAAA,YACA,MAAM;AAAA,YACN,OAAO,KAAK,sBAAsB;AAAA,YAClC,OAAO,YAAY;AACf,oBAAM,QAAQ,gBAAgB;AAAA,YAClC;AAAA;AAAA,QACJ;AAAA,SACJ;AAAA,MAEC,aAAa,QAAQ,aAAa,6CAAC,cAAS,OAAM,gBAAgB,eAAK,0CAA0C,UAAU,aAAa,KAAK,GAAG,IAAI,GAAE,IAAc;AAAA,OACzK;AAAA,EAER;AAEA,MAAO,uBAAQ;;;AC3Gf,MAAAC,iBAAoC;;;ACHpC,MAAAC,iBAAqC;;;ACArC,MAAAC,gBAAkB;AAWE,MAAAC,sBAAA;AATpB,MAAqB,cAArB,cAAyC,cAAAC,QAAM,UAG5C;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cAAa,SAAS,KAAK,MAAM,SACxD,uDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E,uDAAC,UAAK,MAAK,gBAAe,GAAE,yMAAwM,GACxO,GACJ;AAAA,IAER;AAAA,EACJ;;;AChBA,MAAAC,gBAAkB;AAQF,MAAAC,sBAAA;AANhB,MAAqB,WAArB,cAAsC,cAAAC,QAAM,UAAU;AAAA,IAClD,SAAS;AACL,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cAAa,OAAO;AAAA,QAC3C,aAAa;AAAA,MACjB,GACI,wDAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC9D;AAAA,qDAAC,UAAK,GAAE,2IAA0I;AAAA,QAClJ,6CAAC,UAAK,GAAE,wDAAuD;AAAA,SACnE,GACJ;AAAA,IAER;AAAA,EACJ;;;ACfA,MAAAC,gBAAkB;AAMF,MAAAC,uBAAA;AAJhB,MAAqB,gBAArB,cAA2C,cAAAC,QAAM,UAA6B;AAAA,IAC1E,SAAS;AACL,aACI,+CAAC,SAAI,MAAK,QAAO,WAAU,cACvB;AAAA,uDAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC9D;AAAA,wDAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,gMAA+L;AAAA,UACjQ,8CAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,0KAAyK;AAAA,WAC/O;AAAA,QAAO,KAAK,MAAM;AAAA,SACtB;AAAA,IAER;AAAA,EACJ;;;ACbA,MAAAC,gBAAkB;AAQF,MAAAC,uBAAA;AANhB,MAAqB,cAArB,cAAyC,cAAAC,QAAM,UAAU;AAAA,IACrD,SAAS;AACL,aACI,8CAAC,SAAI,MAAK,QAAQ,WAAU,cAAa,OAAO;AAAA,QAC5C,aAAa;AAAA,MACjB,GACI,yDAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC9D;AAAA,sDAAC,UAAK,WAAU,cAAa,UAAS,WAAU,UAAS,WAAU,GAAE,+rBAA8rB;AAAA,QAEnwB,8CAAC,UAAK,WAAU,gCAA+B,UAAS,WAAU,UAAS,WAAU,GAAE,iVAAgV;AAAA,SAC3a,GACJ;AAAA,IAER;AAAA,EACJ;;;AChBA,MAAAC,iBAAkB;AASF,MAAAC,uBAAA;AAPhB,MAAqB,YAArB,cAAuC,eAAAC,QAAM,UAG1C;AAAA,IACC,SAAS;AACL,aACI,8CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,yDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,IAAI,QAAQ,KAAK,MAAM,QAAQ,IAAI,SAAQ,aAAY,MAAK,QAAO,OAAM,8BACpG;AAAA,sDAAC,UAAK,GAAE,8OAA6O,MAAK,gBAAe;AAAA,QACzQ,8CAAC,UAAK,GAAE,6OAA4O,MAAK,gBAAe;AAAA,SAC5Q,GACJ;AAAA,IAER;AAAA,EACJ;;;AChBA,MAAAC,iBAAkB;AASmI,MAAAC,uBAAA;AAPrJ,MAAqB,WAArB,cAAsC,eAAAC,QAAM,UAGzC;AAAA,IACC,SAAS;AACL,aACI,8CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,wDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,IAAI,QAAQ,KAAK,MAAM,QAAQ,IAAI,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAA6B,wDAAC,UAAK,GAAE,uFAAsF,MAAK,gBAAe,GAAO,GAClQ;AAAA,IAER;AAAA,EACJ;;;ACbA,MAAAC,iBAAkB;AAQF,MAAAC,uBAAA;AANhB,MAAqB,aAArB,cAAwC,eAAAC,QAAM,UAE3C;AAAA,IACC,SAAS;AACL,aACI,8CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,yDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,IAAI,QAAQ,KAAK,MAAM,QAAQ,IAAI,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAEpG;AAAA,sDAAC,UAAK,GAAE,4DAA2D,MAAK,gBAAc;AAAA,QAGtF,8CAAC,UAAK,GAAE,wNAAuN,MAAK,gBAAc;AAAA,SACtP,GACJ;AAAA,IAER;AAAA,EACJ;;;APO2B,MAAAC,uBAAA;AAN3B,MAAM,iBAAiB,MAAM;AACzB,UAAM,EAAE,kBAAkB,YAAY,QAAI,6CAAgB;AAC1D,UAAM,EAAE,WAAW,UAAU,mBAAmB,QAAI,2CAAc,gBAAgB;AAElF,WACI,+CAAC,SAAI,WAAU,uBACV;AAAA,oBAAc,8CAAC,cAAU,eAAK,kCAAkC,GAAE,IAAc;AAAA,MAChF,YAAY,8CAAC,cAAS,OAAM,eAAe,qBAAU,IAAc;AAAA,MACnE,qBAAqB,gFAClB;AAAA,sDAAC,cAAU,aAAG,QAAQ,KAAK,kBAAkB,OAAM;AAAA,QACnD,8CAAC,oBAAe,OAAO,WAAW,KAAK;AAAA,SAC3C,IAAM;AAAA,OACV;AAAA,EAER;AAGA,MAAM,aAAa,MAAM;AACrB,UAAM,EAAE,iBAAiB,QAAI,6CAAgB;AAC7C,UAAM,EAAE,cAAc,eAAe,QAAI,iDAAoB;AAE7D,UAAM,aAAS,4BAAY,YAAY;AACnC,YAAM,aAAa,gBAAgB;AAAA,IACvC,GAAG,CAAC,cAAc,gBAAgB,CAAC;AAEnC,WACI,8CAAC,sBAAiB,SAAS,QACvB,wDAAC,YAAS,GACd;AAAA,EAER;AAkCA,MAAM,sBAAsB,MAAM;AAC9B,UAAM,EAAE,UAAU,QAAI,iDAAoB;AAC1C,UAAM,EAAE,WAAW,QAAI,iDAAoB;AAC3C,UAAM,0BAAsB,4BAAY,YAAY;AAChD,YAAM,WAAW;AACjB,YAAM,UAAU;AAAA,IACpB,GAAG,CAAC,YAAY,SAAS,CAAC;AAE1B,WAAO,8CAAC,sBAAiB,SAAS,qBAC9B,wDAAC,cAAW,GAChB;AAAA,EACJ;AAEA,MAAM,gBAAgB,MAAM;AACxB,UAAM,EAAE,iBAAiB,QAAI,6CAAgB;AAC7C,UAAM,EAAE,eAAe,QAAI,iDAAoB;AAC/C,UAAM,eAAW,4BAAY,MAAM;AAC/B,qBAAe,gBAAgB;AAAA,IACnC,GAAG,CAAC,gBAAgB,gBAAgB,CAAC;AAErC,WAAO,8CAAC,sBAAiB,SAAS,UAC9B,wDAAC,eAAY,GACjB;AAAA,EACJ;AAiBA,MAAM,iBAAiB,MAAM;AACzB,UAAM,EAAE,kBAAkB,aAAa,eAAe,QAAI,6CAAgB;AAE1E,WACI,8CAAC,sBAAiB,OAAO,aAAa,SAAS,mBAAmB,cAAc,IAAI,SAAS,MAAM;AAC/F,UAAI,aAAa,SAAS,kBAAkB;AACxC,uBAAe,IAAI;AAAA,MACvB,OAAO;AACH,uBAAe;AAAA,UACX,MAAM;AAAA,UACN,OAAO;AAAA,QACX,CAAC;AAAA,MACL;AAAA,IACJ,GACI,wDAAC,oBAAiB,GACtB;AAAA,EAER;AAGA,MAAM,aAAa,MAAM;AACrB,UAAM,EAAE,kBAAkB,iBAAiB,oBAAoB,QAAI,6CAAgB;AACnF,UAAM,eAAe,oBAAoB;AAEzC,WACI;AAAA,MAAC;AAAA;AAAA,QACI,GAAI,CAAC,eAAe,EAAE,UAAU,KAAK,IAAI,CAAC;AAAA,QAC3C,SAAS,MAAM;AAAE,8BAAoB;AAAA,QAAE;AAAA,QACvC,OAAO,CAAC,eAAe,KAAK,uCAAuC,IAAI,KAAK,iBAAiB;AAAA,QAE7F,wDAAC,eAAY;AAAA;AAAA,IACjB;AAAA,EAER;AAGA,MAAM,YAAY,MAAM;AACpB,UAAM,EAAE,iBAAiB,QAAI,6CAAgB;AAC7C,UAAM,EAAE,QAAQ,QAAI,iDAAoB;AAExC,WACI,8CAAC,sBAAiB,SAAS,MAAM;AAC7B,cAAQ,gBAAgB;AAAA,IAC5B,GACI,wDAAC,YAAS,GACd;AAAA,EAER;AACA,MAAM,kBAAkB,MAAM;AAC1B,UAAM,EAAE,iBAAiB,QAAI,6CAAgB;AAC7C,UAAM,EAAE,QAAQ,QAAI,iDAAoB;AAExC,WACI,gFACI;AAAA,oDAAC,SAAI,WAAU,iBAAgB,SAAS,MAAM;AAAE,gBAAQ,kBAAkB,CAAC;AAAA,MAAE,GAAG,gBAAE;AAAA,MAClF,8CAAC,SAAI,WAAU,iBAAgB,SAAS,MAAM;AAAE,gBAAQ,kBAAkB,CAAC;AAAA,MAAE,GAAG,gBAAE;AAAA,MAClF,8CAAC,SAAI,WAAU,iBAAgB,SAAS,MAAM;AAAE,gBAAQ,kBAAkB,CAAC;AAAA,MAAE,GAAG,gBAAE;AAAA,OACtF;AAAA,EAER;AAYO,WAAS,iBAAiB;AAAA,IAC7B;AAAA,EACJ,GAEG;AACC,UAAM,EAAE,iBAAiB,QAAI,6CAAgB;AAC7C,UAAM,EAAE,MAAM,UAAU,QAAI,2CAAc,gBAAgB;AAE1D,eAAO,wBAAQ,MAAM;AACjB,aACI,+CAAC,SAAI,WAAU,sBACX;AAAA,sDAAC,SAAI,WAAU,qBAEX,yDAAC,SAAI,WAAU,0BACX;AAAA,yDAAC,SAAI,WAAU,+BACX;AAAA,2DAAC,SAAI,WAAU,0DACX;AAAA,6DAAC,SAAI,WAAU,kCACX;AAAA,8DAAC,cAAW;AAAA,gBACZ,8CAAC,iBAAc;AAAA,iBACnB;AAAA,cACA,+CAAC,SAAI,WAAU,mCACX;AAAA,8DAAC,uBAAoB;AAAA,gBACrB,8CAAC,kBAAe;AAAA,iBAEpB;AAAA,eACJ;AAAA,YACA,+CAAC,SAAI,WAAU,4DACX;AAAA,4DAAC,kBAAe;AAAA,cAEhB,8CAAC,cAAW;AAAA,eAChB;AAAA,aACJ;AAAA,UACA,8CAAC,SAAI,WAAU,iCACX,wDAAC,aAAU,GACf;AAAA,UACA,8CAAC,SAAI,WAAU,gCACX,wDAAC,mBAAgB,GACrB;AAAA,WACJ,GACJ;AAAA,QACA,8CAAC,gBAAW;AAAA,QACZ,8CAAC,yBAAsB;AAAA,SAC3B;AAAA,IAER,GAAG,CAAC,MAAM,SAAS,CAAC;AAAA,EACxB;;;ADlMQ,MAAAC,uBAAA;AAtCD,WAAS,QAAQ;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,EACJ,GAIG;AACC,UAAM,CAAC,YAAY,aAAa,QAAI,yBAAS,KAAK;AAElD,UAAM;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,IAEJ,QAAI,6CAAgB;AAEpB,UAAM,yBAAyB,aAAa,IAAI;AAEhD,UAAM,CAAC,kBAAkB,mBAAmB,QAAI,yBAAS,KAAK;AAG9D,kCAAU,MAAM;AACZ,UAAI,kBAAkB;AAClB,4BAAoB,oBAAoB,eAAe;AAAA,MAC3D,OAAO;AACH,YAAI,kBAAkB;AAClB,wBAAc,KAAK;AAAA,QACvB;AAAA,MACJ;AAAA,IACJ,GAAG,CAAC,gBAAgB,CAAC;AACrB,kCAAU,MAAM;AACZ,UAAI,iBAAiB,gBAAgB;AACjC,sBAAc,KAAK;AAAA,MACvB;AAAA,IACJ,GAAG,CAAC,YAAY,CAAC;AACjB,WACI,gFACI;AAAA,oDAAC,uCAAQ;AAAA,MACT,8CAAC,SAAI,WAAU,oBACX,yDAAC,SAAI,WAAU,eAEP;AAAA,SAAC,aACG,8CAAC,SAAI,WAAW,gBAAgB,cAC5B,wDAAC,SAAI,WAAU,eAAc,OAAO,yBAAyB,SAAS,KAAK,KAAK,YAAY,GAAG,oBAAC,GACpG,IAEA;AAAA,UAAC;AAAA;AAAA,YACG,SAAS,MAAM;AACX,4BAAc,KAAK;AAAA,YACvB;AAAA,YACH;AAAA;AAAA,QAAC;AAAA,QAEV,8CAAC,cAAW;AAAA,SAChB,GACJ;AAAA,MAEI,0BACI,8CAAC,SACG,wDAAC,cAAS,OAAM,eACX,yBAAe,uBAAuB,IAAI,KAAK,uBAA8B,IAAI,yBACtF,GACJ,IACA;AAAA,MAMJ,iBAAiB,eACjB,+CAAC,SAAI,WAAU,cACX;AAAA,sDAAC,SAAI,WAAU,eAAc,OAAO,2BAA2B,IAAI,CAAC,IAAI,EAAE,SAAS,OAAO,GACtF,wDAAC,SAAI,WAAU,mBAEX,wDAAC,wBAAa,eAA8B,GAChD,GACJ;AAAA,QACA,8CAAC,SAAI,WAAU,eAAc,OAAO,aAAa,CAAC,IAAI,EAAE,SAAS,OAAO,GACnE,wBAAc,oBAAoB,8CAAC,oBAAiB,uBAA8C,GACvG;AAAA,SACJ;AAAA,OAER;AAAA,EAER;;;AS9E4B,MAAAC,uBAAA;AAXb,WAAR,OAAwB;AAC3B,WACI,8CAAC,6CAAc,YAAY,IACvB,wDAAC,SAAI,WAAU,aACX;AAAA,MAAC;AAAA;AAAA,QACG,eAAe,CACX,cACA,YACA,0BACC;AACD,iBACI;AAAA,YAAC;AAAA;AAAA,cACG;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACJ;AAAA,QAER;AAAA;AAAA,IACJ,GACJ,GACJ;AAAA,EAER;;;ACxBA,sBAA2B;AAKQ,MAAAC,uBAAA;AAFnC,aAAW,QAAQ,WAAW,SAAS,CAAC;AACxC,aAAW,MAAM,wBAAwB,CAAC,gBAA6B;AACnE,kCAAW,WAAW,EAAE,OAAO,8CAAC,QAAK,CAAE;AAAA,EAC3C;", + "sourcesContent": ["module.exports = window.SDPPPInternal", "module.exports = window.React", "module.exports = window.ReactJSXRuntime", "module.exports = window.ReactDOMClient", "export * from \"SDPPPInternal\";", "export default {\n 'SDPPP Get Document': 'Get Document',\n 'SDPPP Get Layer By ID': 'Get Layer',\n 'SDPPP Get Linked Layers': 'Get Linked Layers',\n 'SDPPP Get Layers In Group': 'Get Layers In Group',\n 'SDPPP Get Text From Layer': 'Get Text From Layer',\n 'SDPPP Parse Layer Info': 'Parse Layer Info',\n 'SDPPP Get Selection': 'Get Selection', \n 'SDPPP Get Image From Photoshop': 'Get Image From Photoshop',\n 'SDPPP Send Images To Photoshop': 'Send Images To Photoshop',\n 'SDPPP Select Layer And Run PS Action': 'Select Layer And Run PS Action',\n\n}", "export default {\n // speicial document/ layer\n '### Active Document ###': '### \u5F53\u524D\u6587\u6863 ###',\n '### The Canvas ###': '### \u6574\u4E2A\u753B\u5E03 ###',\n '### New Layer ###': '### \u65B0\u56FE\u5C42 ###',\n '### Selected Layer ###': '### \u6240\u9009\u56FE\u5C42 ###',\n '### Keep Size or Fit Canvas ###': '### \u4FDD\u6301\u5C3A\u5BF8\u6216\u9002\u5E94\u753B\u5E03 ###',\n '_SDPPP_PSD_': '_SDPPP_PSD_',\n\n // A1111 UI\n 'Save and run immediately': '\u4FDD\u5B58\u5E76\u7ACB\u5373\u6267\u884C',\n 'Close': '\u5173\u95ED',\n 'Select a {0}': `\u9009\u62E9\u4E00\u4E2A {0}`,\n\n // comfyui dialog\n 'How to use .ccx file': '\u5982\u4F55\u4F7F\u7528 .ccx \u6587\u4EF6',\n '1. If you have installed Adobe Creative Cloud': '1. \u5982\u679C\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 Adobe Creative Cloud', \n 'Just double click the .ccx file, it will install the plugin automatically': '\u53CC\u51FB .ccx \u6587\u4EF6\uFF0C\u5B83\u4F1A\u81EA\u52A8\u5B89\u88C5',\n \"2. If you don't have Adobe Creative Cloud\": '2. \u5982\u679C\u4F60\u6CA1\u6709 Adobe Creative Cloud',\n 'Rename .ccx to .zip and extract it into ': '\u5C06 .ccx \u91CD\u547D\u540D\u4E3A .zip \u5E76\u89E3\u538B\u5230',\n 'or': '\u6216',\n 'Photoshop directory': 'Photoshop \u5B89\u88C5\u76EE\u5F55',\n\n // comfyui error\n 'Cannot connect multiple different document widgets with same value': '\u4E0D\u80FD\u8FDE\u63A5\u591A\u4E2A\u5177\u6709\u76F8\u540C\u503C\u7684\u6587\u6863\u5C0F\u90E8\u4EF6',\n 'You can only have one SDPPP Settings node in a workflow': '\u4E00\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2A SDPPP Settings \u8282\u70B9',\n 'convert widget {0} failed:': '\u63A7\u4EF6{0}\u8F6C\u6362\u5931\u8D25\uFF1A',\n 'hidden webview load failed: {0}, please select a browser page to continue': '\u5185\u7F6E webview \u52A0\u8F7D\u5931\u8D25: {0}\uFF0C\u8BF7\u9009\u62E9\u4E00\u4E2A\u6D4F\u89C8\u5668\u9875\u9762\u7EE7\u7EED',\n \n // comfy node title\n 'SDPPP Get Document': '\u83B7\u53D6\u6587\u6863(GetDocument)',\n 'SDPPP Get Layer By ID': '\u83B7\u53D6\u56FE\u5C42(GetLayer)',\n 'SDPPP Get Linked Layers': '\u83B7\u53D6\u94FE\u63A5\u56FE\u5C42(GetLinkedLayers)',\n 'SDPPP Get Layers In Group': '\u83B7\u53D6\u7EC4\u4E2D\u56FE\u5C42(GetLayersInGroup)',\n 'SDPPP Get Text From Layer': '\u83B7\u53D6\u56FE\u5C42\u6587\u672C(GetTextFromLayer)',\n 'SDPPP Parse Layer Info': '\u89E3\u6790\u56FE\u5C42\u4FE1\u606F(ParseLayerInfo)',\n 'SDPPP Get Selection': '\u83B7\u53D6\u9009\u533A(GetSelection)', \n 'SDPPP Get Image From Photoshop': '\u4ECEPS\u83B7\u53D6\u56FE\u50CF(GetImageFromPhotoshop)',\n 'SDPPP Send Images To Photoshop': '\u53D1\u9001\u56FE\u50CF\u5230PS(SendImagesToPhotoshop)',\n 'SDPPP Send Text To Layer': '\u53D1\u9001\u6587\u672C\u5230\u56FE\u5C42(SendTextToLayer)',\n 'SDPPP Select Layer And Run PS Action': '\u9009\u4E2D\u56FE\u5C42\u5E76\u8FD0\u884CPS Action(RunPhotoshopAction)',\n\n// comfy widget/input\n 'download PS plugin (.ccx)': '\u4E0B\u8F7D Photoshop \u63D2\u4EF6 (.ccx)',\n 'current ComfyUI pageid: {0}': '\u5F53\u524D ComfyUI \u9875\u9762ID: {0}',\n 'current A1111 pageid: {0}': '\u5F53\u524D A1111 \u9875\u9762ID: {0}',\n 'document linked': '\u6587\u6863\u53C2\u6570\u5DF2\u94FE\u63A5',\n 'layer linked': '\u56FE\u5C42\u53C2\u6570\u5DF2\u94FE\u63A5',\n 'bound linked': '\u8303\u56F4\u53C2\u6570\u5DF2\u94FE\u63A5',\n 'document': '\u6587\u6863', \n 'Document': '\u6587\u6863', \n 'DOCUMENT': '\u6587\u6863', \n 'document_name': '\u6587\u6863\u540D\u5B57id',\n 'layer_nameid': '\u56FE\u5C42\u540D\u5B57id',\n 'layer_name': '\u56FE\u5C42\u540D\u5B57',\n 'layer_info': '\u56FE\u5C42\u4FE1\u606F',\n 'bound_top': '\u8303\u56F4\u4E0A\u8FB9\u8DDD',\n 'bound_left': '\u8303\u56F4\u5DE6\u8FB9\u8DDD',\n 'bound_width': '\u8303\u56F4\u5BBD\u5EA6',\n 'bound_height': '\u8303\u56F4\u9AD8\u5EA6',\n 'center_x': '\u4E2D\u5FC3\u70B9x',\n 'center_y': '\u4E2D\u5FC3\u70B9y',\n 'opacity': '\u900F\u660E\u5EA6',\n 'layer': '\u56FE\u5C42',\n 'layer_or_group': '\u56FE\u5C42(\u6216\u7EC4)',\n 'Layer_or_group': '\u56FE\u5C42(\u6216\u7EC4)',\n 'bound': '\u8303\u56F4',\n 'bounds': '\u8303\u56F4',\n 'bounds [optional]': '\u8303\u56F4[\u53EF\u9009]',\n 'boundary': '\u8303\u56F4',\n 'Boundary': '\u8303\u56F4',\n 'canvas_boundary': '\u753B\u5E03\u8303\u56F4',\n 'canvas_bound': '\u753B\u5E03\u8303\u56F4',\n 'layer_boundary': '\u56FE\u5C42\u8303\u56F4',\n 'layer_bound': '\u56FE\u5C42\u8303\u56F4',\n \"Photoshop Disconnected!\" : \"Photoshop \u672A\u8FDE\u63A5\uFF01\",\n 'rgb_out': 'RGB\u8F93\u51FA',\n 'alpha_out': 'Alpha\u8F93\u51FA',\n 'images': '\u56FE\u50CF',\n 'text': '\u6587\u672C',\n 'ID_mode': '\u7CBE\u786EID\u6A21\u5F0F',\n 'name_mode': '\u540D\u5B57\u5339\u914D\u6A21\u5F0F',\n 'select': '\u9009\u62E9',\n 'document boundary': '\u6587\u6863\u8303\u56F4',\n 'layer boundary': '\u56FE\u5C42\u8303\u56F4',\n 'selection boundary': '\u9009\u4E2D\u8303\u56F4',\n 'save .psd to this workflow': '\u4FDD\u5B58.psd\u5230\u8FD9\u4E2A\u5DE5\u4F5C\u6D41',\n 'extract saved .psd to Photoshop': '\u63D0\u53D6\u4FDD\u5B58\u7684.psd\u5230Photoshop',\n 'sample .psd': '\u793A\u4F8B.psd',\n 'mask': '\u906E\u7F69',\n 'name': '\u540D\u79F0',\n 'quality': '\u56FE\u50CF\u8D28\u91CF',\n 'action_set': '\u52A8\u4F5C\u7EC4',\n 'action': '\u52A8\u4F5C',\n \n // photoshop UI\n 'Runner': '\u8FD0\u884C\u8F7D\u4F53',\n 'PS Webview': 'PS \u5185\u7F6E\u7F51\u9875',\n 'Browser {0}': '\u6D4F\u89C8\u5668\u9875\u9762 {0}',\n 'timeout': '\u8D85\u65F6',\n 'Loading...': '\u52A0\u8F7D\u4E2D...',\n '--multi-user Not Login!': '--multi-user\u5DF2\u6FC0\u6D3B\uFF0C\u4F46\u672A\u767B\u5F55\uFF01',\n 'Logout': '\u767B\u51FA',\n 'User: ': '\u7528\u6237: ',\n 'connect': '\u8FDE\u63A5',\n 'connected': '\u5DF2\u8FDE\u63A5',\n 'disconnect': '\u65AD\u5F00',\n 'disconnected': '\u5DF2\u65AD\u5F00\u8FDE\u63A5',\n 'reconnecting...': '\u91CD\u8FDE\u4E2D...', \n 'connecting': '\u8FDE\u63A5\u4E2D', \n 'webpages': '\u7F51\u9875\u5217\u8868',\n 'workflows': '\u5DE5\u4F5C\u6D41',\n 'workflow': '\u5DE5\u4F5C\u6D41',\n 'auto run page [{0}] after change..': '\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u9875\u9762 {0}..',\n 'auto run workflow [{0}] after change..': '\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41 {0}..',\n 'auto run workflow after change..': '\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41..',\n 'selection_only': '\u4EC5\u9009\u533A',\n 'Queue:': '\u961F\u5217:',\n 'Set As:': '\u8BBE\u7F6E\u4E3A:',\n 'Error {0}... please contact me via Discord/Github': '\u51FA\u73B0\u9519\u8BEF {0}...\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211',\n 'Webview initialize failed. Please report to me via Discord/Github with your ComfyURL, Operate System': 'Webview \u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211\u5E76\u9644\u4E0A\u4F60\u7684Comfy\u5730\u5740\u3001\u64CD\u4F5C\u7CFB\u7EDF',\n 'ComfyUI with --multi-user is only available for sponsors': '\u5E26\"--multi-user\"\u7684ComfyUI\u4EC5\u5BF9\u8D5E\u52A9\u8005\u5F00\u653E',\n 'Workflow Runner is loading...': '\u8FD0\u884C\u8F7D\u4F53\u5C1A\u5728\u52A0\u8F7D...',\n '(Page ID: {0})Queue: {1}': '(\u9875\u9762ID: {0}) \u961F\u5217\u957F\u5EA6 {1}',\n 'no suitable node to control in this workflow': '\u8FD9\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u6CA1\u6709\u80FD\u63A7\u5236\u7684\u8282\u70B9',\n \"Save\": \"\u4FDD\u5B58\",\n \"Edit\": \"\u7F16\u8F91\",\n \"Edit in ComfyUI\": \"\u5728 ComfyUI \u4E2D\u7F16\u8F91\",\n \"using browser page [{0}] for workflow running\": '\u6B63\u63A5\u7BA1\u7F51\u9875 [{0}] \u8FD0\u884C\u5DE5\u4F5C\u6D41',\n 'workflow running by hidden webview': '\u5DE5\u4F5C\u6D41\u5728\u9690\u85CF\u7684webview\u4E2D\u8FD0\u884C',\n 'Lock Image': '\u9501\u5B9A\u56FE\u50CF',\n 'Unlock Image': '\u89E3\u9501\u56FE\u50CF',\n 'search...': '\u641C\u7D22...',\n 'disabled when running in browser page': '\u63A5\u7BA1\u7F51\u9875\u65F6\u4E0D\u53EF\u7528',\n 'only supported in Photoshop': '\u4EC5\u5728 Photoshop \u4E2D\u652F\u6301',\n 'Login': '\u767B\u5F55',\n 'Invitation Code': '\u9080\u8BF7\u7801',\n 'Username': '\u7528\u6237\u540D',\n 'Password': '\u5BC6\u7801',\n 'Please input invitation code': '\u8BF7\u8F93\u5165\u9080\u8BF7\u7801',\n 'Please input username': '\u8BF7\u8F93\u5165\u7528\u6237\u540D',\n 'Please input password': '\u8BF7\u8F93\u5165\u5BC6\u7801',\n 'Open more ComfyUI pages to see more options here': '\u6253\u5F00\u66F4\u591A ComfyUI \u9875\u9762\u4EE5\u67E5\u770B\u66F4\u591A\u9009\u9879',\n 'Comfy multi-user: ': 'Comfy \u591A\u7528\u6237: ',\n 'Not Login': '\u672A\u767B\u5F55',\n 'Comfy API-Key: ': 'Comfy API-Key: ',\n 'Login/Auth': '\u767B\u5F55/\u8BA4\u8BC1',\n 'Logged in by email/password': '\u5DF2\u901A\u8FC7\u90AE\u7BB1/\u5BC6\u7801\u767B\u5F55',\n 'Set API Key': '\u8BBE\u7F6E API Key',\n 'Please input API key (will reload Runner)': '\u8BF7\u8F93\u5165 API Key (\u4F1A\u91CD\u542F\u8FD0\u884C\u8F7D\u4F53)',\n '### Active Workflow ###': '### \u5F53\u524D\u5DE5\u4F5C\u6D41 ###',\n '### Example SDXL ###': '### \u793A\u4F8BSDXL\u5DE5\u4F5C\u6D41 ###',\n 'Open ComfyUI in the browser to see more options': '\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00 ComfyUI \u4EE5\u5F97\u5230\u66F4\u591A\u9009\u9879',\n 'Webview load timeout, please switch to a different runner': 'Webview \u52A0\u8F7D\u8D85\u65F6\uFF0C\u8BF7\u5207\u6362\u5230\u5176\u4ED6\u8FD0\u884C\u8F7D\u4F53',\n 'Save workflow to ComfyUI': '\u4FDD\u5B58\u5DE5\u4F5C\u6D41\u5230 ComfyUI',\n 'Reload workflow': '\u91CD\u65B0\u52A0\u8F7D\u5DE5\u4F5C\u6D41',\n 'Stop and cancel all': '\u505C\u6B62\u5E76\u53D6\u6D88\u6240\u6709',\n 'Start auto running after change': '\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C',\n 'Stop auto run': '\u505C\u6B62\u81EA\u52A8\u8FD0\u884C',\n 'Run workflow': '\u8FD0\u884C\u5DE5\u4F5C\u6D41',\n 'Run workflow xN': '\u8FD0\u884C\u5DE5\u4F5C\u6D41N\u6B21',\n\n // photoshop connect error\n '502: Maybe the server is not running': '502: \u670D\u52A1\u5668\u53EF\u80FD\u672A\u8FD0\u884C',\n '404: Maybe SDPPP is not installed or failed to run in ComfyUI': '404: \u53EF\u80FD\u5728ComfyUI\u4E2DSDPPP\u672A\u5B89\u88C5\u6216\u8FD0\u884C\u5931\u8D25',\n '{0}. reconnecting...': '{0}. \u91CD\u8FDE\u4E2D...',\n 'disconnected to {0} failed {1}': `\u65AD\u5F00\u8FDE\u63A5 {0} \u9519\u8BEF {1}`,\n 'version mismatch, please reinstall PS plugin': '\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5 PS \u63D2\u4EF6',\n 'instance type not recognized': '\u672A\u8BC6\u522B\u7684\u8F6F\u4EF6\u7C7B\u578B',\n 'Error: {0}': '\u9519\u8BEF: {0}',\n 'Verification Error': '\u9A8C\u8BC1\u9519\u8BEF',\n\n // photoshop event error\n 'document {0} not found': '\u627E\u4E0D\u5230\u6587\u6863: {0}',\n 'only layer kind \"TEXT\" is supported, invalid layer: {0}': '\u4E0D\u652F\u6301\u975E\u6587\u672C\u56FE\u5C42: {0}',\n 'create layer failed': '\u521B\u5EFA\u56FE\u5C42\u5931\u8D25',\n 'layer not found {0}': '\u627E\u4E0D\u5230\u56FE\u5C42: {0}',\n 'no linked layer for {0}': '\u6CA1\u6709\u94FE\u63A5\u56FE\u5C42: {0}',\n 'layer {0} is not a group': '\u56FE\u5C42 {0} \u4E0D\u662F\u4E00\u4E2A\u7EC4',\n 'no layer in group {0}': '\u7EC4 {0} \u4E2D\u6CA1\u6709\u56FE\u5C42',\n 'layer not found: {0}': '\u627E\u4E0D\u5230\u56FE\u5C42: {0}',\n 'No upload_name': '\u4E0A\u4F20\u63A5\u53E3\u8FD4\u56DE\u4E86\u5931\u8D25',\n 'get pixel of {0} failed': '\u83B7\u53D6\u50CF\u7D20\u5931\u8D25: {0}',\n 'merge group failed': '\u5408\u5E76\u7EC4\u5931\u8D25',\n 'invalid name: {0}': '\u975E\u6CD5\u7684\u540D\u79F0: {0}',\n 'get_layer_info: layer_identify required': 'get_layer_info: \u9700\u8981 layer_identify',\n 'invalid action: {0}': '\u65E0\u6548\u7684\u64CD\u4F5C: {0}',\n 'create document failed': '\u521B\u5EFA\u6587\u6863\u5931\u8D25',\n 'create document for preview': '\u521B\u5EFA\u9884\u89C8\u6587\u6863',\n 'resize document for preview': '\u8C03\u6574\u9884\u89C8\u6587\u6863\u5C3A\u5BF8',\n 'no first related layer in {0}': '\u7EC4 {0} \u4E2D\u6CA1\u6709\u7B2C\u4E00\u4E2A\u76F8\u5173\u56FE\u5C42',\n \"imageDataError: data length is not multiple of width * height\": \"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: \u6570\u636E\u957F\u5EA6\u4E0D\u662F\u5BBD\u5EA6 * \u9AD8\u5EA6\u7684\u500D\u6570\",\n \"imageDataError: originComponents must be 1 or 3\": \"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: originComponents \u5FC5\u987B\u662F 1 \u6216 3\",\n 'unexpected connection lost, please try to reconnect': '\u610F\u5916\u65AD\u5F00\u8FDE\u63A5\uFF0C\u8BF7\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5',\n \"Workflow list is empty, please save a workflow by Comfy's lastest UI\": '\u5DE5\u4F5C\u6D41\u5217\u8868\u4E3A\u7A7A\uFF0C\u8BF7\u5728Comfy\u7684\u65B0\u7248UI\u4E2D\u4FDD\u5B58\u4E00\u4E2A\u5DE5\u4F5C\u6D41',\n 'No opened ComfyUI pages': '\u6CA1\u6709\u5DF2\u6253\u5F00\u7684ComfyUI\u9875\u9762',\n 'comfyAPI is not initialized, maybe comfyUI is too old': '\u65E0\u6CD5\u83B7\u53D6 ComfyAPI\uFF0C\u53EF\u80FD ComfyUI \u7248\u672C\u592A\u65E7',\n 'unsupported channel counts: {0}': '\u4E0D\u652F\u6301\u7684\u901A\u9053\u6570: {0}',\n 'Timeout, Maybe the URL is wrong': '\u8D85\u65F6\uFF0C\u53EF\u80FD comfy\u5730\u5740 \u586B\u5199\u9519\u8BEF',\n 'Workflow list loading failed: {0}': '\u5DE5\u4F5C\u6D41\u5217\u8868\u52A0\u8F7D\u5931\u8D25: {0}',\n 'Please register a user in ComfyUI': '\u8BF7\u5728 ComfyUI \u4E2D\u6CE8\u518C\u4E00\u4E2A\u7528\u6237',\n 'GetSelection need Photoshop version 25+': 'GetSelection \u9700\u8981 Photoshop 25+ \u7248\u672C',\n 'Action {0} not found': 'Action {0} \u672A\u627E\u5230',\n 'Action set {0} not found': 'ActionSet {0} \u672A\u627E\u5230',\n '{0} cannot be used in Photoshop Action Node': '{0} \u4E0D\u80FD\u5728 Photoshop Action \u8282\u70B9\u4E2D\u4F7F\u7528',\n 'Group layers': '\u56FE\u5C42\u7EC4',\n 'Show All Groups': '\u663E\u793A\u6240\u6709\u7EC4',\n\n // photoshop modal state\n 'create document for sent images': '\u7ED9\u53D1\u9001\u7684\u56FE\u7247\u521B\u5EFA\u6587\u6863',\n 'show sent images': '\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247',\n 'fallback show sent images': '\u53D6\u6D88\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247',\n \"get content of layer {0}\": \"\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9\",\n 'fallback get content of layer {0}': '\u53D6\u6D88\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9',\n 'get layer info': '\u83B7\u53D6\u56FE\u5C42\u4FE1\u606F',\n 'sdppp extract PSD': 'sdppp \u5BFC\u5165 PSD',\n 'sdppp get PSD': 'sdppp \u83B7\u53D6 PSD', \n 'set text to layer': '\u8BBE\u7F6E\u56FE\u5C42\u7684\u6587\u672C',\n 'run Photoshop Action': 'sdppp \u8FD0\u884C Photoshop Action',\n 'select layer': 'sdppp \u9009\u4E2D\u56FE\u5C42',\n \n // photoshop dialog/widget\n '{0} wants to extract a PSD file to Photoshop, are you sure?': '{0} \u60F3\u8981\u91CA\u653E\u4E00\u4E2A.psd\u6587\u4EF6\u5230Photoshop\uFF0C\u786E\u5B9A\u5417\uFF1F',\n 'should sdppp refuse extracting PSD to Photoshop in this session anymore?': '\u662F\u5426\u8981\u8BA9 sdppp \u62D2\u7EDD\u672C\u6B21PS\u4F1A\u8BDD\u518D\u6B21\u63A5\u53D7.psd\u91CA\u653E\u8BF7\u6C42\uFF1F',\n 'Wide Mode': '\u5BBD\u5C4F\u6A21\u5F0F',\n 'Quick Set': '\u5FEB\u901F\u8BBE\u7F6E',\n 'Selected Layer': '\u9009\u4E2D\u56FE\u5C42',\n 'Selected Layer (invert)': '\u9009\u4E2D\u56FE\u5C42(\u53CD\u5411)',\n 'Canvas': '\u753B\u5E03',\n 'Selection': '\u9009\u533A',\n 'Manual': '\u624B\u52A8\u6A21\u5F0F',\n 'Auto': '\u81EA\u52A8\u6A21\u5F0F',\n\n // about\n 'This plugin is based on sd-ppp': '\u672C\u63D2\u4EF6\u57FA\u4E8Esd-ppp\u5F00\u53D1',\n 'And follows its open source license:': '\u5E76\u9075\u5FAA\u5176\u5F00\u6E90\u534F\u8BAE\uFF1A',\n \"Cloud\": \"\u4E91\u7AEF\u63A8\u8350\",\n \"Sponsors\": \"\u8D5E\u52A9\",\n \"waiting...\": '\u865A\u4F4D\u4EE5\u5F85',\n 'Links': '\u53CB\u60C5\u94FE\u63A5',\n 'Community': '\u793E\u533A',\n 'LICENSE:': '\u8BB8\u53EF\u8BC1\uFF1A',\n 'Official Site': '\u5B98\u65B9\u7F51\u7AD9',\n\n // comfy popup\n \"upload\": \"\u4E0A\u4F20\",\n \"Simplify Workflow\": \"\u7B80\u5316\u5DE5\u4F5C\u6D41\",\n \"Photoshop\": \"Photoshop\",\n \"Photoshop plugin settings\": \"Photoshop \u63D2\u4EF6\u8BBE\u7F6E\",\n \"Photoshop plugin\": \"Photoshop \u63D2\u4EF6\",\n \"SDPPP Settings/Misc\": \"SDPPP \u8BBE\u7F6E/\u6742\u9879\",\n \"Sample .PSD for this workflow:\": \"\u793A\u4F8B.PSD\",\n \"Download Example .PSD\": \"\u4E0B\u8F7D\u793A\u4F8B.PSD\",\n \"Maximum Image Size (px):\": \"\u6700\u5927\u56FE\u50CF\u5C3A\u5BF8(px)\",\n \"Download\": \"\u4E0B\u8F7D\",\n \"Upload\": \"\u4E0A\u4F20\",\n \"Reset\": \"\u91CD\u7F6E\",\n 'Refresh': '\u5237\u65B0',\n 'Comfy URL (You can copy it to connect ComfyUI in the plugin):': 'Comfy\u5730\u5740(\u4F60\u53EF\u4EE5\u590D\u5236\u5B83\u5230\u63D2\u4EF6\u4E2D\u8FDE\u63A5ComfyUI):',\n 'use slider for number widget:': '\u6570\u5B57\u63A7\u4EF6\u4F7F\u7528\u6ED1\u5757',\n 'Photoshop is not connected': 'Photoshop \u672A\u8FDE\u63A5',\n 'select...': '\u8BF7\u9009\u62E9',\n 'click to edit': '\u70B9\u51FB\u7F16\u8F91',\n\n // comfy call error\n 'ComfyManager not found, cannot reboot': 'Comfy Manager\u672A\u5B89\u88C5\uFF0C\u65E0\u6CD5\u91CD\u542F',\n 'Failed to reboot ComfyUI': '\u91CD\u542FComfyUI\u5931\u8D25',\n}\n", "import en from './en.mjs';\nimport zhcn from './zh-cn.mjs';\n//@ts-ignore\nconst require_ = typeof require != 'undefined' ? require : undefined\n\nlet locale = 'en'\nif (typeof navigator !== 'undefined' && navigator.language) {\n locale = navigator.language == \"zh-CN\" ? 'zhcn' : 'en'\n} else if (require_) {\n locale = require_('uxp').host.uiLocale.startsWith(\"zh\") ? 'zhcn' : 'en';\n}\n\nexport type I18nKey = keyof typeof zhcn;\n\nexport default function i18n(key: keyof typeof zhcn, ...args: any[]) {\n const formatStr: string = locale == 'zhcn' ? zhcn[key] : (key in en ? (en as any)[key] : key);\n if (!formatStr) throw new Error(`i18n key not found: ${key}`);\n\n return formatStr.replace(/{(\\d+)}/g, function (match, number) {\n return typeof args[number] != 'undefined' ? args[number] : match\n });\n}\n\nexport function isValidI18nKey(key: string) {\n return key in zhcn;\n}\n\nexport function isI18nOf(key: keyof typeof zhcn, str: string) {\n return key == str || zhcn[key] == str;\n}\n\nexport function getI18nLocale() {\n return locale;\n}\n", "import React from \"react\";\n\nexport default class ActionButton extends React.Component<{\n onClick?: (...args: any[]) => any\n highlight?: boolean\n children?: React.ReactNode\n}> {\n render() {\n return (\n
    \n {this.props.children}\n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class EditIcon extends React.Component<{\n size?: number,\n onClick?: (...args: any[]) => any\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
    \n \n \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class FolderIcon extends React.Component<{\n size?: number\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
    \n \n \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class LivePaintingIcon extends React.Component<{\n size?: number,\n onClick?: (...args: any[]) => any\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
    \n \n \n \n \n
    \n )\n }\n}", "import React from \"react\";\n\nexport default class PlayIcon extends React.Component<{\n size?: number\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
    \n \n \n \n
    \n )\n }\n}\n", "import React from \"react\";\nimport ActionButton from \"./ActionButton.js\";\nimport EditIcon from \"./icons/EditIcon.js\";\nimport FolderIcon from \"./icons/FolderIcon.js\";\nimport LivePaintingIcon from \"./icons/LivePaintingIcon.js\";\nimport PlayIcon from \"./icons/PlayIcon.js\";\nimport { useSDPPPContext, useSDPPPComfyCaller } from \"./SDPPPInternalBridge.js\";\nimport i18n from \"../../../../src/common/i18n.mjs\";\n\nconst ICON_SIZE = 0.6;\nconst CLASS_NAMES = {\n LIST_ITEM: \"client-list-item\",\n LIST_ITEM_LEFT: \"client-list-item-left\",\n LIST_ITEM_RIGHT: \"client-list-item-right\",\n TIPS_ICON: \"tips-icon\",\n CHECKED: \"checked\"\n};\n\ninterface BaseListItemProps {\n isChecked?: boolean;\n children: React.ReactNode;\n rightContent?: React.ReactNode;\n onClick?: () => void;\n}\n\nconst BaseListItem: React.FC = ({\n isChecked = false,\n children,\n rightContent,\n onClick\n}) => {\n return (\n
  • \n \n {children}\n \n {rightContent && (\n
    \n {rightContent}\n
    \n )}\n
  • \n );\n};\n\ninterface DirectoryItemProps {\n path: string;\n dirname: string;\n onDirectorySet: (path: string) => void;\n}\n\nconst DirectoryItem: React.FC = ({\n path,\n dirname,\n onDirectorySet\n}) => {\n const handleClick = () => {\n if (path === '../') {\n const directoryWithoutSuffix = dirname || '';\n const lastSlashIndex = directoryWithoutSuffix.lastIndexOf('/');\n // no slash anymore. or meet the protocol name\n if (lastSlashIndex === -1 || directoryWithoutSuffix[lastSlashIndex - 1] === '/') {\n onDirectorySet?.('');\n } else {\n onDirectorySet?.(directoryWithoutSuffix.slice(0, lastSlashIndex));\n }\n } else {\n onDirectorySet?.(path);\n }\n };\n\n return (\n \n \n
    {path.slice(0, -1).split('/').pop()}
    \n
    \n );\n};\n\ninterface WorkflowItemProps {\n isChecked: boolean;\n workflow: {\n path: string;\n error: string;\n };\n onRun: (path: string) => Promise;\n setEditorMode: (editorMode: boolean) => void;\n}\n\ninterface ActiveWorkflowItemProps {\n path: string | null;\n title: string;\n onRun: () => Promise;\n setEditorMode: (editorMode: boolean) => void;\n}\n\nconst WorkflowActions: React.FC<{\n isChecked?: boolean;\n onEdit: () => void;\n onAutoRun?: () => void;\n onRun: () => void;\n}> = ({ isChecked, onEdit, onAutoRun, onRun }) => {\n return (\n <>\n
    \n \n
    \n {onAutoRun && (\n \n \n \n )}\n \n \n \n \n );\n};\n\nconst WorkflowItem: React.FC = ({\n isChecked,\n workflow,\n onRun,\n setEditorMode\n}) => {\n const {\n setAutoRunning,\n workflowAgentSID\n } = useSDPPPContext();\n const {\n openWorkflow\n } = useSDPPPComfyCaller();\n\n const handleEditClick = () => {\n setEditorMode(true);\n openWorkflow(workflowAgentSID, workflow.path);\n };\n\n const handleAutoRunClick = () => {\n if (!isChecked) {\n setAutoRunning({ type: 'workflow', value: workflow.path });\n } else {\n setAutoRunning(null);\n }\n };\n \n return (\n onRun(workflow.path)}\n />\n }\n onClick={handleEditClick}\n >\n {workflow.error ? workflow.error.replace('sdppp PS side error:', '') : workflow.path.split('/').pop()}\n \n );\n};\n\nconst SpecialWorkflowItem: React.FC = ({\n onRun,\n path,\n title,\n setEditorMode\n}) => {\n const {\n openWorkflow\n } = useSDPPPComfyCaller();\n const {\n workflowAgentSID\n } = useSDPPPContext();\n\n const handleEditClick = async () => {\n path && await openWorkflow(workflowAgentSID, path);\n setEditorMode(true);\n };\n\n return (\n \n }\n onClick={handleEditClick}\n >\n {title}\n \n );\n};\n\nexport {\n DirectoryItem,\n WorkflowItem,\n SpecialWorkflowItem\n};\n", "import React from \"react\";\nimport i18n from \"../../../../src/common/i18n.mjs\";\nimport { SpecialWorkflowItem, DirectoryItem, WorkflowItem } from \"./WorkflowListItem.js\";\nimport {\n useSDPPPComfyCaller, useAgentState,\n useSDPPPContext, useSDPPPWorkflowList\n} from \"./SDPPPInternalBridge.js\";\n\ninterface WorkflowListProps {\n setEditorMode: (editorMode: boolean) => void\n}\n\nconst WorkflowList: React.FC = ({ setEditorMode }) => {\n const {\n autoRunning,\n workflowAgentSID,\n } = useSDPPPContext();\n\n const {\n runWorkflow,\n runPage\n } = useSDPPPComfyCaller();\n\n const {\n workflows,\n workflowsError,\n currentViewingDirectory,\n setCurrentViewingDirectory,\n showingList\n } = useSDPPPWorkflowList();\n\n let listReplacer = null;\n if (workflowsError)\n return
    \n {workflowsError}\n
    \n\n return (\n
    \n
      \n {\n currentViewingDirectory ?\n {\n setCurrentViewingDirectory(dirname)\n }}\n />\n : null\n }\n {\n showingList.map((item: { path: string, isDir: boolean }) => {\n const path = item.path;\n const workflow = workflows[path]\n const checked = autoRunning?.value == path;\n if (item.isDir) {\n return (\n {\n setCurrentViewingDirectory(dirname)\n }}\n />\n )\n }\n return (\n {\n await runWorkflow(path);\n }}\n />\n )\n })\n }\n\n
    \n \n
      \n {\n await runPage(workflowAgentSID);\n }}\n />\n {\n await runPage(workflowAgentSID);\n }}\n />\n
    \n\n {autoRunning?.type == 'workflow' ? {i18n(`auto run workflow [{0}] after change..`, workflows[autoRunning?.value]?.path)} : ''}\n
    \n );\n};\n\nexport default WorkflowList;", "import { useSDPPPContext, Promote, Auths } from \"./SDPPPInternalBridge.js\";\nimport i18n, { isValidI18nKey } from \"../../../../src/common/i18n.mjs\";\nimport WorkflowList from \"./WorkflowList.js\";\nimport { useEffect, useState } from \"react\";\nimport { WorkflowEditWrap } from \"./WorkflowEditWrap.js\";\nimport type { AddressBarType, WorkflowEditPhotoshopType } from \"./SDPPPInternalBridge.js\";\n\nexport function Content({\n connectState,\n AddressBar,\n WorkflowEditPhotoshop,\n}: {\n connectState: 'connected' | 'disconnected' | 'connecting',\n AddressBar: AddressBarType,\n WorkflowEditPhotoshop: WorkflowEditPhotoshopType,\n}) {\n const [editorMode, setEditorMode] = useState(false);\n\n const {\n workflowAgentSID,\n webviewAgentSID,\n lastConnectErrorMessage,\n\n } = useSDPPPContext();\n\n const editorCardShowingIndex = editorMode ? 1 : 0;\n\n const [prevIsNotWebview, setPrevIsNotWebview] = useState(false);\n\n // when disconnect and the agent is not webview, set editor mode to false\n useEffect(() => {\n if (workflowAgentSID) {\n setPrevIsNotWebview(workflowAgentSID != webviewAgentSID);\n } else {\n if (prevIsNotWebview) {\n setEditorMode(false);\n }\n }\n }, [workflowAgentSID]);\n useEffect(() => {\n if (connectState === 'disconnected') {\n setEditorMode(false);\n }\n }, [connectState]);\n return (\n <>\n \n
    \n
    \n {\n !editorMode ?\n
    \n
    \u2B24
    \n
    \n :\n {\n setEditorMode(false);\n }}\n >\u2190\n }\n \n
    \n
    \n {\n lastConnectErrorMessage ? (\n
    \n \n {isValidI18nKey(lastConnectErrorMessage) ? i18n(lastConnectErrorMessage as any) : lastConnectErrorMessage}\n \n
    \n ) : ''\n }\n\n {/* */} \n\n {\n connectState === \"connected\" &&\n
    \n
    \n
    \n {/* */}\n \n
    \n
    \n
    \n {editorMode && workflowAgentSID && }\n
    \n
    \n }\n\n \n );\n}\n\n\n", "import { useCallback, useMemo, useState } from \"react\"\nimport i18n from \"../../../../src/common/i18n.mjs\"\nimport LivePaintingIcon from \"./icons/LivePaintingIcon\"\nimport PlayIcon from \"./icons/PlayIcon\"\nimport {\n useSDPPPComfyCaller,\n useSDPPPContext,\n useAgentState,\n} from \"./SDPPPInternalBridge\"\nimport RefreshIcon from \"./icons/RefreshIcon\"\nimport SaveIcon from \"./icons/SaveIcon\"\nimport PlayMultiIcon from \"./icons/PlayMultiIcon\"\nimport WebEditIcon from \"./icons/WebEditIcon\"\nimport CrossIcon from \"./icons/CrossIcon\"\nimport StopIcon from \"./icons/StopIcon\"\nimport CancelIcon from \"./icons/CancelIcon\"\nimport { action } from \"photoshop\";\n\ninterface HoverableButtonProps {\n onMouseEnter: () => void;\n onMouseLeave: () => void;\n}\n\n// \u72B6\u6001\u663E\u793A\u7EC4\u4EF6\nconst WorkflowStatus = () => {\n const { workflowAgentSID, autoRunning } = useSDPPPContext();\n const { lastError, progress, executingNodeTitle } = useAgentState(workflowAgentSID);\n\n return (\n
    \n {autoRunning ? {i18n('auto run workflow after change..')} : ''}\n {lastError ? {lastError} : ''}\n {executingNodeTitle ? <>\n {`${progress}% ${executingNodeTitle}...`}\n \n : ''}\n
    \n );\n};\n\n// \u4FDD\u5B58\u548C\u5237\u65B0\u6309\u94AE\u7EC4\nconst SaveButton = ({\n onMouseEnter,\n onMouseLeave,\n}: HoverableButtonProps) => {\n const { workflowAgentSID } = useSDPPPContext();\n const { saveWorkflow, reopenWorkflow } = useSDPPPComfyCaller();\n\n const onSave = useCallback(async () => {\n await saveWorkflow(workflowAgentSID);\n }, [saveWorkflow, workflowAgentSID]);\n\n return (\n \n \n \n );\n};\nconst ClearButton = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { clearQueue } = useSDPPPComfyCaller();\n const onClear = useCallback(() => {\n clearQueue();\n }, [clearQueue]);\n\n return \n \n \n}\n\nconst RebootButton = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { reboot } = useSDPPPComfyCaller();\n const onReboot = useCallback(() => {\n reboot();\n }, [reboot]);\n\n return \u91CD\u542F\n}\n\nconst StopButton = () => {\n const { workflowAgentSID } = useSDPPPContext();\n const { interrupt } = useSDPPPComfyCaller();\n const onInterrupt = useCallback(() => {\n interrupt();\n }, [interrupt]);\n\n return \n \n \n}\nconst StopAndCancelButton = ({\n onMouseEnter,\n onMouseLeave,\n}: HoverableButtonProps) => {\n const { interrupt } = useSDPPPComfyCaller();\n const { clearQueue } = useSDPPPComfyCaller();\n const onClearAndInterrupt = useCallback(async () => {\n await clearQueue();\n await interrupt();\n }, [clearQueue, interrupt]);\n\n return \n \n \n}\n\nconst RefreshButton = ({\n onMouseEnter,\n onMouseLeave,\n}: HoverableButtonProps) => {\n const { workflowAgentSID } = useSDPPPContext();\n const { reopenWorkflow } = useSDPPPComfyCaller();\n const onReopen = useCallback(() => {\n reopenWorkflow(workflowAgentSID);\n }, [reopenWorkflow, workflowAgentSID]);\n\n return \n \n \n}\n\nconst PlayMultiButtons = () => {\n const { workflowAgentSID, autoRunning } = useSDPPPContext();\n const { runPage } = useSDPPPComfyCaller();\n\n return <>\n {!autoRunning ? { runPage(workflowAgentSID, 10) }}>\n \n : ''}\n {!autoRunning ? { runPage(workflowAgentSID, 3) }}>\n \n : ''}\n \n}\n\n// \u81EA\u52A8\u8FD0\u884C\u6309\u94AE\nconst AutoRunButtons = ({\n onMouseEnter,\n onMouseLeave,\n}: HoverableButtonProps) => {\n const { workflowAgentSID, autoRunning, setAutoRunning } = useSDPPPContext();\n\n return (\n {\n if (autoRunning?.value == workflowAgentSID) {\n setAutoRunning(null);\n } else {\n setAutoRunning({\n type: 'page',\n value: workflowAgentSID\n });\n }\n }} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>\n \n \n );\n};\n\n// \u7F16\u8F91\u6309\u94AE\nconst EditButton = ({\n onMouseEnter,\n onMouseLeave,\n}: HoverableButtonProps) => {\n const { workflowAgentSID, webviewAgentSID, toggleWebviewDialog } = useSDPPPContext();\n const usingWebview = workflowAgentSID == webviewAgentSID;\n\n return (\n { toggleWebviewDialog() }}\n title={!usingWebview ? i18n('disabled when running in browser page') : i18n('Edit in ComfyUI')}\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n >\n \n \n );\n};\n\n// \u8FD0\u884C\u6309\u94AE\nconst RunButton = ({\n onMouseEnter,\n onMouseLeave,\n}: HoverableButtonProps) => {\n const { workflowAgentSID } = useSDPPPContext();\n const { runPage } = useSDPPPComfyCaller();\n\n return (\n {\n runPage(workflowAgentSID);\n }} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>\n \n \n );\n};\nconst RunMultiButtons = ({\n onMouseEnter,\n onMouseLeave,\n}: HoverableButtonProps) => {\n const { workflowAgentSID } = useSDPPPContext();\n const { runPage } = useSDPPPComfyCaller();\n\n return (\n <>\n
    { runPage(workflowAgentSID, 2) }} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>x2
    \n
    { runPage(workflowAgentSID, 5) }} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>x5
    \n
    { runPage(workflowAgentSID, 9) }} onMouseEnter={onMouseEnter} onMouseLeave={onMouseLeave}>x9
    \n \n )\n}\n\n// const TestButtons = () => {\n// const { interrupt, clearQueue, reboot } = useSDPPPComfyCaller();\n\n// return (\n// { reboot() }}>\n// \n// \n// )\n// }\n\nexport function WorkflowEditWrap({\n WorkflowEditPhotoshop\n}: {\n WorkflowEditPhotoshop: any,\n}) {\n const { workflowAgentSID, autoRunning } = useSDPPPContext();\n const { ssid, queueSize } = useAgentState(workflowAgentSID);\n const { lastError, progress, executingNodeTitle } = useAgentState(workflowAgentSID);\n const [hoveringButton, setHoveringButton] = useState(null);\n const tips = useMemo(() => {\n if (hoveringButton == 'save') {\n return i18n('Save workflow to ComfyUI');\n }\n if (hoveringButton == 'refresh') {\n return i18n('Reload workflow');\n }\n if (hoveringButton == 'stopAndCancel') {\n return i18n('Stop and cancel all');\n }\n if (hoveringButton == 'autoRun') {\n return autoRunning ? i18n('Stop auto run') : i18n('Start auto running after change');\n }\n if (hoveringButton == 'edit') {\n return i18n('Edit in ComfyUI');\n }\n if (hoveringButton == 'run') {\n return i18n('Run workflow');\n }\n if (hoveringButton == 'runMulti') {\n return i18n('Run workflow xN');\n }\n return '';\n }, [hoveringButton, i18n]);\n\n\n return useMemo(() => {\n return (\n
    \n
    \n {/* {i18n('(Page ID: {0})Queue: {1}', ssid, queueSize)} */}\n
    \n
    \n
    \n
    \n setHoveringButton('save')}\n onMouseLeave={() => setHoveringButton(null)} />\n setHoveringButton('refresh')}\n onMouseLeave={() => setHoveringButton(null)} />\n
    \n
    \n setHoveringButton('stopAndCancel')}\n onMouseLeave={() => setHoveringButton(null)} />\n setHoveringButton('autoRun')}\n onMouseLeave={() => setHoveringButton(null)} />\n {/* */}\n
    \n
    \n
    \n\n
    \n {lastError ? {lastError} : ''}\n {/* {executingNodeTitle ? <>\n {`${progress}% ${executingNodeTitle}...`}\n \n : ''} */}\n {!lastError && !executingNodeTitle && autoRunning ? {i18n('auto run workflow after change..')} : ''}\n {!lastError && !executingNodeTitle && tips ? {tips} : ''}\n
    \n {/* */}\n setHoveringButton('edit')}\n onMouseLeave={() => setHoveringButton(null)} />\n
    \n
    \n
    \n setHoveringButton('run')}\n onMouseLeave={() => setHoveringButton(null)} />\n
    \n
    \n setHoveringButton('runMulti')}\n onMouseLeave={() => setHoveringButton(null)} />\n
    \n
    \n
    \n \n \n
    \n );\n }, [ssid, queueSize, hoveringButton, autoRunning, lastError, progress, executingNodeTitle, tips, WorkflowEditPhotoshop]);\n}\n", "import React from \"react\";\n\nexport default class RefreshIcon extends React.Component<{\n size?: number,\n onClick?: (...args: any[]) => any\n}> {\n render() {\n const size = this.props.size || 1\n return (\n
    \n \n \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class SaveIcon extends React.Component {\n render() {\n return (\n
    \n \n \n \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class PlayMultiIcon extends React.Component<{ count: number }> {\n render() {\n return (\n
    \n \n \n \n {this.props.count}\n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class WebEditIcon extends React.Component {\n render() {\n return (\n
    \n \n \n\n \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class CrossIcon extends React.Component<{\n size?: number,\n hollowStyle?: boolean\n}> {\n render() {\n return (\n
    \n \n \n \n \n
    \n )\n }\n}", "import React from \"react\";\n\nexport default class StopIcon extends React.Component<{\n size?: number,\n hollowStyle?: boolean\n}> {\n render() {\n return (\n
    \n \n
    \n )\n }\n}\n", "import React from \"react\";\n\nexport default class CancelIcon extends React.Component<{\n size?: number,\n}> {\n render() {\n return (\n
    \n \n {/* Single diagonal line from bottom-left to top-right */}\n \n \n {/* Circle outline */}\n \n \n
    \n )\n }\n}", "import { Content } from \"./Content.js\";\nimport { SDPPP, SDPPPProvider } from \"./SDPPPInternalBridge.js\";\n\nexport default function Main() {\n return (\n \n
    \n {\n return (\n \n )\n }}\n />\n
    \n
    \n )\n}", "import Main from \"./tsx/Main.js\";\nimport { createRoot } from \"react-dom/client\";\n\ndeclare const globalThis: any;\nglobalThis.sdppp = globalThis.sdppp || {};\nglobalThis.sdppp.renderPhotoshopPlugin = (rootElement: HTMLElement) => {\n createRoot(rootElement).render(
    );\n}\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA,aAAO,UAAU,OAAO;AAAA;AAAA;;;ACAxB;AAAA;AAAA;AAAA,aAAO,UAAU,OAAO;AAAA;AAAA;;;ACAxB;AAAA;AAAA;AAAA,aAAO,UAAU,OAAO;AAAA;AAAA;;;ACAxB;AAAA;AAAA;AAAA,aAAO,UAAU,OAAO;AAAA;AAAA;;;ACAxB;AAAA,0CAAc;;;ACAd,MAAO,aAAQ;AAAA,IACX,sBAAsB;AAAA,IACtB,yBAAyB;AAAA,IACzB,2BAA2B;AAAA,IAC3B,6BAA6B;AAAA,IAC7B,6BAA6B;AAAA,IAC7B,0BAA0B;AAAA,IAC1B,uBAAuB;AAAA,IACvB,kCAAkC;AAAA,IAClC,kCAAkC;AAAA,IAClC,wCAAwC;AAAA,EAE5C;;;ACZA,MAAO,gBAAQ;AAAA;AAAA,IAEX,2BAA2B;AAAA,IAC3B,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,0BAA0B;AAAA,IAC1B,mCAAmC;AAAA,IACnC,eAAe;AAAA;AAAA,IAGf,4BAA4B;AAAA,IAC5B,SAAS;AAAA,IACT,gBAAgB;AAAA;AAAA,IAGhB,wBAAwB;AAAA,IACxB,iDAAiD;AAAA,IACjD,6EAA6E;AAAA,IAC7E,6CAA6C;AAAA,IAC7C,4CAA4C;AAAA,IAC5C,MAAM;AAAA,IACN,uBAAuB;AAAA;AAAA,IAGvB,sEAAsE;AAAA,IACtE,2DAA2D;AAAA,IAC3D,8BAA8B;AAAA,IAC9B,6EAA6E;AAAA;AAAA,IAG7E,sBAAsB;AAAA,IACtB,yBAAyB;AAAA,IACzB,2BAA2B;AAAA,IAC3B,6BAA6B;AAAA,IAC7B,6BAA6B;AAAA,IAC7B,0BAA0B;AAAA,IAC1B,uBAAuB;AAAA,IACvB,kCAAkC;AAAA,IAClC,kCAAkC;AAAA,IAClC,4BAA4B;AAAA,IAC5B,wCAAwC;AAAA;AAAA,IAGxC,6BAA6B;AAAA,IAC7B,+BAA+B;AAAA,IAC/B,6BAA6B;AAAA,IAC7B,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,IAChB,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,cAAc;AAAA,IACd,cAAc;AAAA,IACd,aAAa;AAAA,IACb,cAAc;AAAA,IACd,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,WAAW;AAAA,IACX,SAAS;AAAA,IACT,kBAAkB;AAAA,IAClB,kBAAkB;AAAA,IAClB,SAAS;AAAA,IACT,UAAU;AAAA,IACV,qBAAqB;AAAA,IACrB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,IAChB,kBAAkB;AAAA,IAClB,eAAe;AAAA,IACf,2BAA4B;AAAA,IAC5B,WAAW;AAAA,IACX,aAAa;AAAA,IACb,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,aAAa;AAAA,IACb,UAAU;AAAA,IACV,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB,sBAAsB;AAAA,IACtB,8BAA8B;AAAA,IAC9B,mCAAmC;AAAA,IACnC,eAAe;AAAA,IACf,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,WAAW;AAAA,IACX,cAAc;AAAA,IACd,UAAU;AAAA;AAAA,IAGV,UAAU;AAAA,IACV,cAAc;AAAA,IACd,eAAe;AAAA,IACf,WAAW;AAAA,IACX,cAAc;AAAA,IACd,2BAA2B;AAAA,IAC3B,UAAU;AAAA,IACV,UAAU;AAAA,IACV,WAAW;AAAA,IACX,aAAa;AAAA,IACb,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,mBAAmB;AAAA,IACnB,cAAc;AAAA,IACd,YAAY;AAAA,IACZ,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,sCAAsC;AAAA,IACtC,0CAA0C;AAAA,IAC1C,oCAAoC;AAAA,IACpC,kBAAkB;AAAA,IAClB,UAAU;AAAA,IACV,WAAW;AAAA,IACX,qDAAqD;AAAA,IACrD,wGAAwG;AAAA,IACxG,4DAA4D;AAAA,IAC5D,iCAAiC;AAAA,IACjC,4BAA4B;AAAA,IAC5B,gDAAgD;AAAA,IAChD,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,mBAAmB;AAAA,IACnB,iDAAiD;AAAA,IACjD,sCAAsC;AAAA,IACtC,cAAc;AAAA,IACd,gBAAgB;AAAA,IAChB,aAAa;AAAA,IACb,yCAAyC;AAAA,IACzC,+BAA+B;AAAA,IAC/B,SAAS;AAAA,IACT,mBAAmB;AAAA,IACnB,YAAY;AAAA,IACZ,YAAY;AAAA,IACZ,gCAAgC;AAAA,IAChC,yBAAyB;AAAA,IACzB,yBAAyB;AAAA,IACzB,oDAAoD;AAAA,IACpD,sBAAsB;AAAA,IACtB,aAAa;AAAA,IACb,mBAAmB;AAAA,IACnB,cAAc;AAAA,IACd,+BAA+B;AAAA,IAC/B,eAAe;AAAA,IACf,6CAA6C;AAAA,IAC7C,2BAA2B;AAAA,IAC3B,wBAAwB;AAAA,IACxB,mDAAmD;AAAA,IACnD,6DAA6D;AAAA,IAC7D,4BAA4B;AAAA,IAC5B,mBAAmB;AAAA,IACnB,uBAAuB;AAAA,IACvB,mCAAmC;AAAA,IACnC,iBAAiB;AAAA,IACjB,gBAAgB;AAAA,IAChB,mBAAmB;AAAA;AAAA,IAGnB,wCAAwC;AAAA,IACxC,iEAAiE;AAAA,IACjE,wBAAwB;AAAA,IACxB,kCAAkC;AAAA,IAClC,gDAAgD;AAAA,IAChD,gCAAgC;AAAA,IAChC,cAAc;AAAA,IACd,sBAAsB;AAAA;AAAA,IAGtB,0BAA0B;AAAA,IAC1B,2DAA2D;AAAA,IAC3D,uBAAuB;AAAA,IACvB,uBAAuB;AAAA,IACvB,2BAA2B;AAAA,IAC3B,4BAA4B;AAAA,IAC5B,yBAAyB;AAAA,IACzB,wBAAwB;AAAA,IACxB,kBAAkB;AAAA,IAClB,2BAA2B;AAAA,IAC3B,sBAAsB;AAAA,IACtB,qBAAqB;AAAA,IACrB,2CAA2C;AAAA,IAC3C,uBAAuB;AAAA,IACvB,0BAA0B;AAAA,IAC1B,+BAA+B;AAAA,IAC/B,+BAA+B;AAAA,IAC/B,iCAAiC;AAAA,IACjC,iEAAiE;AAAA,IACjE,mDAAmD;AAAA,IACnD,uDAAuD;AAAA,IACvD,wEAAwE;AAAA,IACxE,2BAA2B;AAAA,IAC3B,yDAAyD;AAAA,IACzD,mCAAmC;AAAA,IACnC,mCAAmC;AAAA,IACnC,qCAAqC;AAAA,IACrC,qCAAqC;AAAA,IACrC,2CAA2C;AAAA,IAC3C,wBAAwB;AAAA,IACxB,4BAA4B;AAAA,IAC5B,+CAA+C;AAAA,IAC/C,gBAAgB;AAAA,IAChB,mBAAmB;AAAA;AAAA,IAGnB,mCAAmC;AAAA,IACnC,oBAAoB;AAAA,IACpB,6BAA6B;AAAA,IAC7B,4BAA4B;AAAA,IAC5B,qCAAqC;AAAA,IACrC,kBAAkB;AAAA,IAClB,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,wBAAwB;AAAA,IACxB,gBAAgB;AAAA;AAAA,IAGhB,+DAA+D;AAAA,IAC/D,4EAA4E;AAAA,IAC5E,aAAa;AAAA,IACb,aAAa;AAAA,IACb,kBAAkB;AAAA,IAClB,2BAA2B;AAAA,IAC3B,UAAU;AAAA,IACV,aAAa;AAAA,IACb,UAAU;AAAA,IACV,QAAQ;AAAA;AAAA,IAGR,kCAAkC;AAAA,IAClC,wCAAwC;AAAA,IACxC,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,cAAc;AAAA,IACd,SAAS;AAAA,IACT,aAAa;AAAA,IACb,YAAY;AAAA,IACZ,iBAAiB;AAAA;AAAA,IAGjB,UAAU;AAAA,IACV,qBAAqB;AAAA,IACrB,aAAa;AAAA,IACb,6BAA6B;AAAA,IAC7B,oBAAoB;AAAA,IACpB,uBAAuB;AAAA,IACvB,kCAAkC;AAAA,IAClC,yBAAyB;AAAA,IACzB,4BAA4B;AAAA,IAC5B,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,SAAS;AAAA,IACT,WAAW;AAAA,IACX,iEAAiE;AAAA,IACjE,iCAAiC;AAAA,IACjC,8BAA8B;AAAA,IAC9B,aAAa;AAAA,IACb,iBAAiB;AAAA;AAAA,IAGjB,yCAAyC;AAAA,IACzC,4BAA4B;AAAA,EAChC;;;ACxQA,MAAM,WAAW,OAAO,aAAW,cAAc,YAAU;AAE3D,MAAI,SAAS;AACb,MAAI,OAAO,cAAc,eAAe,UAAU,UAAU;AACxD,aAAS,UAAU,YAAY,UAAU,SAAS;AAAA,EACtD,WAAW,UAAU;AACjB,aAAS,SAAS,KAAK,EAAE,KAAK,SAAS,WAAW,IAAI,IAAI,SAAS;AAAA,EACvE;AAIe,WAAR,KAAsB,QAA2B,MAAa;AACjE,UAAM,YAAoB,UAAU,SAAS,cAAK,GAAG,IAAK,OAAO,aAAM,WAAW,GAAG,IAAI;AACzF,QAAI,CAAC,UAAW,OAAM,IAAI,MAAM,uBAAuB,GAAG,EAAE;AAE5D,WAAO,UAAU,QAAQ,YAAY,SAAU,OAAO,QAAQ;AAC1D,aAAO,OAAO,KAAK,MAAM,KAAK,cAAc,KAAK,MAAM,IAAI;AAAA,IAC/D,CAAC;AAAA,EACL;AAEO,WAAS,eAAe,KAAa;AACxC,WAAO,OAAO;AAAA,EAClB;;;ACzBA,qBAAkB;AASN;AAPZ,MAAqB,eAArB,cAA0C,aAAAA,QAAM,UAI7C;AAAA,IACC,SAAS;AACL,aACI,4CAAC,SAAI,WAAW,iBAAiB,KAAK,MAAM,YAAY,cAAc,EAAE,IAAI,SAAS,KAAK,MAAM,SAC3F,eAAK,MAAM,UAChB;AAAA,IAER;AAAA,EACJ;;;ACdA,MAAAC,gBAAkB;AAWE,MAAAC,sBAAA;AATpB,MAAqB,WAArB,cAAsC,cAAAC,QAAM,UAGzC;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cAAa,SAAS,KAAK,MAAM,SACxD,uDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E,uDAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,iVAAgV,GACtZ,GACJ;AAAA,IAER;AAAA,EACJ;;;AChBA,MAAAC,gBAAkB;AAUE,MAAAC,sBAAA;AARpB,MAAqB,aAArB,cAAwC,cAAAC,QAAM,UAE3C;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,uDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E,uDAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,+JAA8J,GACpO,GACJ;AAAA,IAER;AAAA,EACJ;;;ACfA,MAAAC,gBAAkB;AAUF,MAAAC,sBAAA;AARhB,MAAqB,mBAArB,cAA8C,cAAAC,QAAM,UAGjD;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cAAa,SAAS,KAAK,MAAM,SACxD,wDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E;AAAA,qDAAC,UAAK,MAAK,gBAAe,GAAE,gTAAgT;AAAA,QAC5U,6CAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,gIAA+H;AAAA,SACrM,GACJ;AAAA,IAER;AAAA,EACJ;;;ACjBA,MAAAC,gBAAkB;AAUE,MAAAC,sBAAA;AARpB,MAAqB,WAArB,cAAsC,cAAAC,QAAM,UAEzC;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,uDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E,uDAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,kIAAiI,GACvM,GACJ;AAAA,IAER;AAAA,EACJ;;;ACiBQ,MAAAC,sBAAA;AAvBR,MAAM,YAAY;AAClB,MAAM,cAAc;AAAA,IAChB,WAAW;AAAA,IACX,gBAAgB;AAAA,IAChB,iBAAiB;AAAA,IACjB,WAAW;AAAA,IACX,SAAS;AAAA,EACb;AASA,MAAM,eAA4C,CAAC;AAAA,IAC/C,YAAY;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACJ,MAAM;AACF,WACI,8CAAC,QAAG,WAAW,GAAG,YAAY,SAAS,GAAG,YAAY,IAAI,YAAY,OAAO,KAAK,EAAE,IAAI,SACpF;AAAA,mDAAC,cAAS,WAAW,YAAY,gBAC5B,UACL;AAAA,MACC,gBACG,6CAAC,SAAI,WAAW,YAAY,iBACvB,wBACL;AAAA,OAER;AAAA,EAER;AAQA,MAAM,gBAA8C,CAAC;AAAA,IACjD;AAAA,IACA;AAAA,IACA;AAAA,EACJ,MAAM;AACF,UAAM,cAAc,MAAM;AACtB,UAAI,SAAS,OAAO;AAChB,cAAM,yBAAyB,WAAW;AAC1C,cAAM,iBAAiB,uBAAuB,YAAY,GAAG;AAE7D,YAAI,mBAAmB,MAAM,uBAAuB,iBAAiB,CAAC,MAAM,KAAK;AAC7E,2BAAiB,EAAE;AAAA,QACvB,OAAO;AACH,2BAAiB,uBAAuB,MAAM,GAAG,cAAc,CAAC;AAAA,QACpE;AAAA,MACJ,OAAO;AACH,yBAAiB,IAAI;AAAA,MACzB;AAAA,IACJ;AAEA,WACI,8CAAC,gBAAa,SAAS,aACnB;AAAA,mDAAC,cAAW,MAAM,WAAW;AAAA,MAC7B,6CAAC,SAAI,OAAO,EAAE,YAAY,EAAE,GAAI,eAAK,MAAM,GAAG,EAAE,EAAE,MAAM,GAAG,EAAE,IAAI,GAAE;AAAA,OACvE;AAAA,EAER;AAmBA,MAAM,kBAKD,CAAC,EAAE,WAAW,QAAQ,WAAW,MAAM,MAAM;AAC9C,WACI,8EACI;AAAA,mDAAC,SAAI,WAAW,YAAY,WACxB,uDAAC,YAAS,MAAM,WAAW,SAAS,QAAQ,GAChD;AAAA,MACC,aACG,6CAAC,gBAAa,WAAW,WAAW,SAAS,WACzC,uDAAC,oBAAiB,MAAM,WAAW,GACvC;AAAA,MAEJ,6CAAC,gBAAa,SAAS,OACnB,uDAAC,YAAS,MAAM,WAAW,GAC/B;AAAA,OACJ;AAAA,EAER;AAEA,MAAM,eAA4C,CAAC;AAAA,IAC/C;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,MAAM;AACF,UAAM;AAAA,MACF;AAAA,MACA;AAAA,IACJ,QAAI,6CAAgB;AACpB,UAAM;AAAA,MACF;AAAA,IACJ,QAAI,iDAAoB;AAExB,UAAM,kBAAkB,MAAM;AAC1B,oBAAc,IAAI;AAClB,mBAAa,kBAAkB,SAAS,IAAI;AAAA,IAChD;AAEA,UAAM,qBAAqB,MAAM;AAC7B,UAAI,CAAC,WAAW;AACZ,uBAAe,EAAE,MAAM,YAAY,OAAO,SAAS,KAAK,CAAC;AAAA,MAC7D,OAAO;AACH,uBAAe,IAAI;AAAA,MACvB;AAAA,IACJ;AAEA,WACI;AAAA,MAAC;AAAA;AAAA,QACG;AAAA,QACA,cACI;AAAA,UAAC;AAAA;AAAA,YACG;AAAA,YACA,QAAQ;AAAA,YACR,WAAW;AAAA,YACX,OAAO,MAAM,MAAM,SAAS,IAAI;AAAA;AAAA,QACpC;AAAA,QAEJ,SAAS;AAAA,QAER,mBAAS,QAAQ,SAAS,MAAM,QAAQ,wBAAwB,EAAE,IAAI,SAAS,KAAK,MAAM,GAAG,EAAE,IAAI;AAAA;AAAA,IACxG;AAAA,EAER;AAEA,MAAM,sBAAyD,CAAC;AAAA,IAC5D;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ,MAAM;AACF,UAAM;AAAA,MACF;AAAA,IACJ,QAAI,iDAAoB;AACxB,UAAM;AAAA,MACF;AAAA,IACJ,QAAI,6CAAgB;AAEpB,UAAM,kBAAkB,YAAY;AAChC,cAAQ,MAAM,aAAa,kBAAkB,IAAI;AACjD,oBAAc,IAAI;AAAA,IACtB;AAEA,WACI;AAAA,MAAC;AAAA;AAAA,QACG,cACI;AAAA,UAAC;AAAA;AAAA,YACG,QAAQ;AAAA,YACR;AAAA;AAAA,QACJ;AAAA,QAEJ,SAAS;AAAA,QAER;AAAA;AAAA,IACL;AAAA,EAER;;;ACjKY,MAAAC,sBAAA;AAtBZ,MAAM,eAA4C,CAAC,EAAE,cAAc,MAAM;AACrE,UAAM;AAAA,MACF;AAAA,MACA;AAAA,IACJ,QAAI,6CAAgB;AAEpB,UAAM;AAAA,MACF;AAAA,MACA;AAAA,IACJ,QAAI,iDAAoB;AAExB,UAAM;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ,QAAI,kDAAqB;AAEzB,QAAI,eAAe;AACnB,QAAI;AACA,aAAO,6CAAC,SAAI,WAAU,iBAClB,uDAAC,cAAU,0BAAe,GAC9B;AAEJ,WACI,8CAAC,SAAI,WAAU,iBACX;AAAA,oDAAC,QAAG,WAAU,eAEN;AAAA,kCACI;AAAA,UAAC;AAAA;AAAA,YAEG,MAAK;AAAA,YACL,SAAS,wBAAwB,MAAM,GAAG,EAAE;AAAA,YAC5C,gBAAgB,CAAC,YAAoB;AACjC,yCAA2B,OAAO;AAAA,YACtC;AAAA;AAAA,UALK;AAAA,QAMT,IACE;AAAA,QAGN,YAAY,IAAI,CAAC,SAA2C;AACxD,gBAAM,OAAO,KAAK;AAClB,gBAAM,WAAW,UAAU,IAAI;AAC/B,gBAAM,UAAU,aAAa,SAAS;AACtC,cAAI,KAAK,OAAO;AACZ,mBACI;AAAA,cAAC;AAAA;AAAA,gBAEG;AAAA,gBACA,SAAS,wBAAwB,MAAM,GAAG,EAAE;AAAA,gBAC5C,gBAAgB,CAAC,YAAoB;AACjC,6CAA2B,OAAO;AAAA,gBACtC;AAAA;AAAA,cALK;AAAA,YAMT;AAAA,UAER;AACA,iBACI;AAAA,YAAC;AAAA;AAAA,cACG;AAAA,cAEA,WAAW;AAAA,cACX;AAAA,cACA,OAAO,OAAOC,UAAiB;AAC3B,sBAAM,YAAYA,KAAI;AAAA,cAC1B;AAAA;AAAA,YALK;AAAA,UAMT;AAAA,QAER,CAAC;AAAA,SAGT;AAAA,MACA,6CAAC,gBAAW;AAAA,MACZ,8CAAC,QAAG,WAAU,eACV;AAAA;AAAA,UAAC;AAAA;AAAA,YACG;AAAA,YACA,MAAM;AAAA,YACN,OAAO,KAAK,yBAAyB;AAAA,YACrC,OAAO,YAAY;AACf,oBAAM,QAAQ,gBAAgB;AAAA,YAClC;AAAA;AAAA,QACJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACG;AAAA,YACA,MAAM;AAAA,YACN,OAAO,KAAK,sBAAsB;AAAA,YAClC,OAAO,YAAY;AACf,oBAAM,QAAQ,gBAAgB;AAAA,YAClC;AAAA;AAAA,QACJ;AAAA,SACJ;AAAA,MAEC,aAAa,QAAQ,aAAa,6CAAC,cAAS,OAAM,gBAAgB,eAAK,0CAA0C,UAAU,aAAa,KAAK,GAAG,IAAI,GAAE,IAAc;AAAA,OACzK;AAAA,EAER;AAEA,MAAO,uBAAQ;;;AC1Gf,MAAAC,iBAAoC;;;ACHpC,MAAAC,iBAA+C;;;ACA/C,MAAAC,gBAAkB;AAWE,MAAAC,sBAAA;AATpB,MAAqB,cAArB,cAAyC,cAAAC,QAAM,UAG5C;AAAA,IACC,SAAS;AACL,YAAM,OAAO,KAAK,MAAM,QAAQ;AAChC,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cAAa,SAAS,KAAK,MAAM,SACxD,uDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,KAAK,MAAM,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC5E,uDAAC,UAAK,MAAK,gBAAe,GAAE,yMAAwM,GACxO,GACJ;AAAA,IAER;AAAA,EACJ;;;AChBA,MAAAC,gBAAkB;AAQF,MAAAC,sBAAA;AANhB,MAAqB,WAArB,cAAsC,cAAAC,QAAM,UAAU;AAAA,IAClD,SAAS;AACL,aACI,6CAAC,SAAI,MAAK,QAAO,WAAU,cAAa,OAAO;AAAA,QAC3C,aAAa;AAAA,MACjB,GACI,wDAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC9D;AAAA,qDAAC,UAAK,GAAE,2IAA0I;AAAA,QAClJ,6CAAC,UAAK,GAAE,wDAAuD;AAAA,SACnE,GACJ;AAAA,IAER;AAAA,EACJ;;;ACfA,MAAAC,gBAAkB;AAMF,MAAAC,uBAAA;AAJhB,MAAqB,gBAArB,cAA2C,cAAAC,QAAM,UAA6B;AAAA,IAC1E,SAAS;AACL,aACI,+CAAC,SAAI,MAAK,QAAO,WAAU,cACvB;AAAA,uDAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC9D;AAAA,wDAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,gMAA+L;AAAA,UACjQ,8CAAC,UAAK,MAAK,gBAAe,UAAS,WAAU,UAAS,WAAU,GAAE,0KAAyK;AAAA,WAC/O;AAAA,QAAO,KAAK,MAAM;AAAA,SACtB;AAAA,IAER;AAAA,EACJ;;;ACbA,MAAAC,gBAAkB;AAQF,MAAAC,uBAAA;AANhB,MAAqB,cAArB,cAAyC,cAAAC,QAAM,UAAU;AAAA,IACrD,SAAS;AACL,aACI,8CAAC,SAAI,MAAK,QAAQ,WAAU,cAAa,OAAO;AAAA,QAC5C,aAAa;AAAA,MACjB,GACI,yDAAC,SAAI,OAAM,MAAK,QAAO,MAAK,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAC9D;AAAA,sDAAC,UAAK,WAAU,cAAa,UAAS,WAAU,UAAS,WAAU,GAAE,+rBAA8rB;AAAA,QAEnwB,8CAAC,UAAK,WAAU,gCAA+B,UAAS,WAAU,UAAS,WAAU,GAAE,iVAAgV;AAAA,SAC3a,GACJ;AAAA,IAER;AAAA,EACJ;;;AChBA,MAAAC,iBAAkB;AASF,MAAAC,uBAAA;AAPhB,MAAqB,YAArB,cAAuC,eAAAC,QAAM,UAG1C;AAAA,IACC,SAAS;AACL,aACI,8CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,yDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,IAAI,QAAQ,KAAK,MAAM,QAAQ,IAAI,SAAQ,aAAY,MAAK,QAAO,OAAM,8BACpG;AAAA,sDAAC,UAAK,GAAE,8OAA6O,MAAK,gBAAe;AAAA,QACzQ,8CAAC,UAAK,GAAE,6OAA4O,MAAK,gBAAe;AAAA,SAC5Q,GACJ;AAAA,IAER;AAAA,EACJ;;;AChBA,MAAAC,iBAAkB;AASmI,MAAAC,uBAAA;AAPrJ,MAAqB,WAArB,cAAsC,eAAAC,QAAM,UAGzC;AAAA,IACC,SAAS;AACL,aACI,8CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,wDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,IAAI,QAAQ,KAAK,MAAM,QAAQ,IAAI,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAA6B,wDAAC,UAAK,GAAE,uFAAsF,MAAK,gBAAe,GAAO,GAClQ;AAAA,IAER;AAAA,EACJ;;;ACbA,MAAAC,iBAAkB;AAQF,MAAAC,uBAAA;AANhB,MAAqB,aAArB,cAAwC,eAAAC,QAAM,UAE3C;AAAA,IACC,SAAS;AACL,aACI,8CAAC,SAAI,MAAK,QAAO,WAAU,cACvB,yDAAC,SAAI,OAAO,KAAK,MAAM,QAAQ,IAAI,QAAQ,KAAK,MAAM,QAAQ,IAAI,SAAQ,aAAY,MAAK,QAAO,OAAM,8BAEpG;AAAA,sDAAC,UAAK,GAAE,4DAA2D,MAAK,gBAAc;AAAA,QAGtF,8CAAC,UAAK,GAAE,wNAAuN,MAAK,gBAAc;AAAA,SACtP,GACJ;AAAA,IAER;AAAA,EACJ;;;APY2B,MAAAC,uBAAA;AAW3B,MAAM,aAAa,CAAC;AAAA,IAChB;AAAA,IACA;AAAA,EACJ,MAA4B;AACxB,UAAM,EAAE,iBAAiB,QAAI,6CAAgB;AAC7C,UAAM,EAAE,cAAc,eAAe,QAAI,iDAAoB;AAE7D,UAAM,aAAS,4BAAY,YAAY;AACnC,YAAM,aAAa,gBAAgB;AAAA,IACvC,GAAG,CAAC,cAAc,gBAAgB,CAAC;AAEnC,WACI,8CAAC,sBAAiB,SAAS,QAAQ,cAA4B,cAC3D,wDAAC,YAAS,GACd;AAAA,EAER;AAkCA,MAAM,sBAAsB,CAAC;AAAA,IACzB;AAAA,IACA;AAAA,EACJ,MAA4B;AACxB,UAAM,EAAE,UAAU,QAAI,iDAAoB;AAC1C,UAAM,EAAE,WAAW,QAAI,iDAAoB;AAC3C,UAAM,0BAAsB,4BAAY,YAAY;AAChD,YAAM,WAAW;AACjB,YAAM,UAAU;AAAA,IACpB,GAAG,CAAC,YAAY,SAAS,CAAC;AAE1B,WAAO,8CAAC,sBAAiB,SAAS,qBAAqB,cAA4B,cAC/E,wDAAC,cAAW,GAChB;AAAA,EACJ;AAEA,MAAM,gBAAgB,CAAC;AAAA,IACnB;AAAA,IACA;AAAA,EACJ,MAA4B;AACxB,UAAM,EAAE,iBAAiB,QAAI,6CAAgB;AAC7C,UAAM,EAAE,eAAe,QAAI,iDAAoB;AAC/C,UAAM,eAAW,4BAAY,MAAM;AAC/B,qBAAe,gBAAgB;AAAA,IACnC,GAAG,CAAC,gBAAgB,gBAAgB,CAAC;AAErC,WAAO,8CAAC,sBAAiB,SAAS,UAAU,cAA4B,cACpE,wDAAC,eAAY,GACjB;AAAA,EACJ;AAiBA,MAAM,iBAAiB,CAAC;AAAA,IACpB;AAAA,IACA;AAAA,EACJ,MAA4B;AACxB,UAAM,EAAE,kBAAkB,aAAa,eAAe,QAAI,6CAAgB;AAE1E,WACI,8CAAC,sBAAiB,OAAO,aAAa,SAAS,mBAAmB,cAAc,IAAI,SAAS,MAAM;AAC/F,UAAI,aAAa,SAAS,kBAAkB;AACxC,uBAAe,IAAI;AAAA,MACvB,OAAO;AACH,uBAAe;AAAA,UACX,MAAM;AAAA,UACN,OAAO;AAAA,QACX,CAAC;AAAA,MACL;AAAA,IACJ,GAAG,cAA4B,cAC3B,wDAAC,oBAAiB,GACtB;AAAA,EAER;AAGA,MAAM,aAAa,CAAC;AAAA,IAChB;AAAA,IACA;AAAA,EACJ,MAA4B;AACxB,UAAM,EAAE,kBAAkB,iBAAiB,oBAAoB,QAAI,6CAAgB;AACnF,UAAM,eAAe,oBAAoB;AAEzC,WACI;AAAA,MAAC;AAAA;AAAA,QACI,GAAI,CAAC,eAAe,EAAE,UAAU,KAAK,IAAI,CAAC;AAAA,QAC3C,SAAS,MAAM;AAAE,8BAAoB;AAAA,QAAE;AAAA,QACvC,OAAO,CAAC,eAAe,KAAK,uCAAuC,IAAI,KAAK,iBAAiB;AAAA,QAC7F;AAAA,QACA;AAAA,QAEA,wDAAC,eAAY;AAAA;AAAA,IACjB;AAAA,EAER;AAGA,MAAM,YAAY,CAAC;AAAA,IACf;AAAA,IACA;AAAA,EACJ,MAA4B;AACxB,UAAM,EAAE,iBAAiB,QAAI,6CAAgB;AAC7C,UAAM,EAAE,QAAQ,QAAI,iDAAoB;AAExC,WACI,8CAAC,sBAAiB,SAAS,MAAM;AAC7B,cAAQ,gBAAgB;AAAA,IAC5B,GAAG,cAA4B,cAC3B,wDAAC,YAAS,GACd;AAAA,EAER;AACA,MAAM,kBAAkB,CAAC;AAAA,IACrB;AAAA,IACA;AAAA,EACJ,MAA4B;AACxB,UAAM,EAAE,iBAAiB,QAAI,6CAAgB;AAC7C,UAAM,EAAE,QAAQ,QAAI,iDAAoB;AAExC,WACI,gFACI;AAAA,oDAAC,SAAI,WAAU,iBAAgB,SAAS,MAAM;AAAE,gBAAQ,kBAAkB,CAAC;AAAA,MAAE,GAAG,cAA4B,cAA4B,gBAAE;AAAA,MAC1I,8CAAC,SAAI,WAAU,iBAAgB,SAAS,MAAM;AAAE,gBAAQ,kBAAkB,CAAC;AAAA,MAAE,GAAG,cAA4B,cAA4B,gBAAE;AAAA,MAC1I,8CAAC,SAAI,WAAU,iBAAgB,SAAS,MAAM;AAAE,gBAAQ,kBAAkB,CAAC;AAAA,MAAE,GAAG,cAA4B,cAA4B,gBAAE;AAAA,OAC9I;AAAA,EAER;AAYO,WAAS,iBAAiB;AAAA,IAC7B;AAAA,EACJ,GAEG;AACC,UAAM,EAAE,kBAAkB,YAAY,QAAI,6CAAgB;AAC1D,UAAM,EAAE,MAAM,UAAU,QAAI,2CAAc,gBAAgB;AAC1D,UAAM,EAAE,WAAW,UAAU,mBAAmB,QAAI,2CAAc,gBAAgB;AAClF,UAAM,CAAC,gBAAgB,iBAAiB,QAAI,yBAAwB,IAAI;AACxE,UAAM,WAAO,wBAAQ,MAAM;AACvB,UAAI,kBAAkB,QAAQ;AAC1B,eAAO,KAAK,0BAA0B;AAAA,MAC1C;AACA,UAAI,kBAAkB,WAAW;AAC7B,eAAO,KAAK,iBAAiB;AAAA,MACjC;AACA,UAAI,kBAAkB,iBAAiB;AACnC,eAAO,KAAK,qBAAqB;AAAA,MACrC;AACA,UAAI,kBAAkB,WAAW;AAC7B,eAAO,cAAc,KAAK,eAAe,IAAI,KAAK,iCAAiC;AAAA,MACvF;AACA,UAAI,kBAAkB,QAAQ;AAC1B,eAAO,KAAK,iBAAiB;AAAA,MACjC;AACA,UAAI,kBAAkB,OAAO;AACzB,eAAO,KAAK,cAAc;AAAA,MAC9B;AACA,UAAI,kBAAkB,YAAY;AAC9B,eAAO,KAAK,iBAAiB;AAAA,MACjC;AACA,aAAO;AAAA,IACX,GAAG,CAAC,gBAAgB,IAAI,CAAC;AAGzB,eAAO,wBAAQ,MAAM;AACjB,aACI,+CAAC,SAAI,WAAU,sBACX;AAAA,sDAAC,SAAI,WAAU,qBAEX,yDAAC,SAAI,WAAU,0BACX;AAAA,yDAAC,SAAI,WAAU,+BACX;AAAA,2DAAC,SAAI,WAAU,0DACX;AAAA,6DAAC,SAAI,WAAU,kCACX;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACG,cAAc,MAAM,kBAAkB,MAAM;AAAA,oBAC5C,cAAc,MAAM,kBAAkB,IAAI;AAAA;AAAA,gBAAG;AAAA,gBACjD;AAAA,kBAAC;AAAA;AAAA,oBACG,cAAc,MAAM,kBAAkB,SAAS;AAAA,oBAC/C,cAAc,MAAM,kBAAkB,IAAI;AAAA;AAAA,gBAAG;AAAA,iBACrD;AAAA,cACA,+CAAC,SAAI,WAAU,mCACX;AAAA;AAAA,kBAAC;AAAA;AAAA,oBACG,cAAc,MAAM,kBAAkB,eAAe;AAAA,oBACrD,cAAc,MAAM,kBAAkB,IAAI;AAAA;AAAA,gBAAG;AAAA,gBACjD;AAAA,kBAAC;AAAA;AAAA,oBACG,cAAc,MAAM,kBAAkB,SAAS;AAAA,oBAC/C,cAAc,MAAM,kBAAkB,IAAI;AAAA;AAAA,gBAAG;AAAA,iBAErD;AAAA,eACJ;AAAA,YACA,+CAAC,SAAI,WAAU,4DAEX;AAAA,6DAAC,SAAI,WAAU,uBACV;AAAA,4BAAY,8CAAC,cAAS,OAAM,eAAe,qBAAU,IAAc;AAAA,gBAKnE,CAAC,aAAa,CAAC,sBAAsB,cAAc,8CAAC,cAAU,eAAK,kCAAkC,GAAE,IAAc;AAAA,gBACrH,CAAC,aAAa,CAAC,sBAAsB,OAAO,8CAAC,cAAU,gBAAK,IAAc;AAAA,iBAC/E;AAAA,cAEA;AAAA,gBAAC;AAAA;AAAA,kBACG,cAAc,MAAM,kBAAkB,MAAM;AAAA,kBAC5C,cAAc,MAAM,kBAAkB,IAAI;AAAA;AAAA,cAAG;AAAA,eACrD;AAAA,aACJ;AAAA,UACA,8CAAC,SAAI,WAAU,iCACX;AAAA,YAAC;AAAA;AAAA,cACG,cAAc,MAAM,kBAAkB,KAAK;AAAA,cAC3C,cAAc,MAAM,kBAAkB,IAAI;AAAA;AAAA,UAAG,GACrD;AAAA,UACA,8CAAC,SAAI,WAAU,gCACX;AAAA,YAAC;AAAA;AAAA,cACG,cAAc,MAAM,kBAAkB,UAAU;AAAA,cAChD,cAAc,MAAM,kBAAkB,IAAI;AAAA;AAAA,UAAG,GACrD;AAAA,WACJ,GACJ;AAAA,QACA,8CAAC,gBAAW;AAAA,QACZ,8CAAC,yBAAsB;AAAA,SAC3B;AAAA,IAER,GAAG,CAAC,MAAM,WAAW,gBAAgB,aAAa,WAAW,UAAU,oBAAoB,MAAM,qBAAqB,CAAC;AAAA,EAC3H;;;ADhRQ,MAAAC,uBAAA;AAtCD,WAAS,QAAQ;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,EACJ,GAIG;AACC,UAAM,CAAC,YAAY,aAAa,QAAI,yBAAS,KAAK;AAElD,UAAM;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,IAEJ,QAAI,6CAAgB;AAEpB,UAAM,yBAAyB,aAAa,IAAI;AAEhD,UAAM,CAAC,kBAAkB,mBAAmB,QAAI,yBAAS,KAAK;AAG9D,kCAAU,MAAM;AACZ,UAAI,kBAAkB;AAClB,4BAAoB,oBAAoB,eAAe;AAAA,MAC3D,OAAO;AACH,YAAI,kBAAkB;AAClB,wBAAc,KAAK;AAAA,QACvB;AAAA,MACJ;AAAA,IACJ,GAAG,CAAC,gBAAgB,CAAC;AACrB,kCAAU,MAAM;AACZ,UAAI,iBAAiB,gBAAgB;AACjC,sBAAc,KAAK;AAAA,MACvB;AAAA,IACJ,GAAG,CAAC,YAAY,CAAC;AACjB,WACI,gFACI;AAAA,oDAAC,uCAAQ;AAAA,MACT,8CAAC,SAAI,WAAU,oBACX,yDAAC,SAAI,WAAU,eAEP;AAAA,SAAC,aACG,8CAAC,SAAI,WAAW,gBAAgB,cAC5B,wDAAC,SAAI,WAAU,eAAc,OAAO,yBAAyB,SAAS,KAAK,KAAK,YAAY,GAAG,oBAAC,GACpG,IAEA;AAAA,UAAC;AAAA;AAAA,YACG,SAAS,MAAM;AACX,4BAAc,KAAK;AAAA,YACvB;AAAA,YACH;AAAA;AAAA,QAAC;AAAA,QAEV,8CAAC,cAAW;AAAA,SAChB,GACJ;AAAA,MAEI,0BACI,8CAAC,SACG,wDAAC,cAAS,OAAM,eACX,yBAAe,uBAAuB,IAAI,KAAK,uBAA8B,IAAI,yBACtF,GACJ,IACA;AAAA,MAMJ,iBAAiB,eACjB,+CAAC,SAAI,WAAU,cACX;AAAA,sDAAC,SAAI,WAAU,eAAc,OAAO,2BAA2B,IAAI,CAAC,IAAI,EAAE,SAAS,OAAO,GACtF,wDAAC,SAAI,WAAU,mBAEX,wDAAC,wBAAa,eAA8B,GAChD,GACJ;AAAA,QACA,8CAAC,SAAI,WAAU,eAAc,OAAO,aAAa,CAAC,IAAI,EAAE,SAAS,OAAO,GACnE,wBAAc,oBAAoB,8CAAC,oBAAiB,uBAA8C,GACvG;AAAA,SACJ;AAAA,OAGR;AAAA,EAER;;;AS/E4B,MAAAC,uBAAA;AAXb,WAAR,OAAwB;AAC3B,WACI,8CAAC,6CAAc,YAAY,IACvB,wDAAC,SAAI,WAAU,aACX;AAAA,MAAC;AAAA;AAAA,QACG,eAAe,CACX,cACA,YACA,0BACC;AACD,iBACI;AAAA,YAAC;AAAA;AAAA,cACG;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACJ;AAAA,QAER;AAAA;AAAA,IACJ,GACJ,GACJ;AAAA,EAER;;;ACxBA,sBAA2B;AAKQ,MAAAC,uBAAA;AAFnC,aAAW,QAAQ,WAAW,SAAS,CAAC;AACxC,aAAW,MAAM,wBAAwB,CAAC,gBAA6B;AACnE,kCAAW,WAAW,EAAE,OAAO,8CAAC,QAAK,CAAE;AAAA,EAC3C;", "names": ["React", "import_react", "import_jsx_runtime", "React", "import_react", "import_jsx_runtime", "React", "import_react", "import_jsx_runtime", "React", "import_react", "import_jsx_runtime", "React", "import_jsx_runtime", "import_jsx_runtime", "path", "import_react", "import_react", "import_react", "import_jsx_runtime", "React", "import_react", "import_jsx_runtime", "React", "import_react", "import_jsx_runtime", "React", "import_react", "import_jsx_runtime", "React", "import_react", "import_jsx_runtime", "React", "import_react", "import_jsx_runtime", "React", "import_react", "import_jsx_runtime", "React", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime", "import_jsx_runtime"] } diff --git a/plugins/photoshop/dist/librarys.js b/plugins/photoshop/dist/librarys.js index 14bd9af..cb99a13 100644 --- a/plugins/photoshop/dist/librarys.js +++ b/plugins/photoshop/dist/librarys.js @@ -1,4 +1,4 @@ -"use strict";(()=>{var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to2,from2,except,desc)=>{if(from2&&typeof from2=="object"||typeof from2=="function")for(let key of __getOwnPropNames(from2))!__hasOwnProp.call(to2,key)&&key!==except&&__defProp(to2,key,{get:()=>from2[key],enumerable:!(desc=__getOwnPropDesc(from2,key))||desc.enumerable});return to2};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod));var require_react_development=__commonJS({"node_modules/react/cjs/react.development.js"(exports,module2){"use strict";(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var ReactVersion="18.3.1",REACT_ELEMENT_TYPE=Symbol.for("react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_OFFSCREEN_TYPE=Symbol.for("react.offscreen"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!="object")return null;var maybeIterator=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL];return typeof maybeIterator=="function"?maybeIterator:null}var ReactCurrentDispatcher={current:null},ReactCurrentBatchConfig={transition:null},ReactCurrentActQueue={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},ReactCurrentOwner={current:null},ReactDebugCurrentFrame={},currentExtraStackFrame=null;function setExtraStackFrame(stack){currentExtraStackFrame=stack}ReactDebugCurrentFrame.setExtraStackFrame=function(stack){currentExtraStackFrame=stack},ReactDebugCurrentFrame.getCurrentStack=null,ReactDebugCurrentFrame.getStackAddendum=function(){var stack="";currentExtraStackFrame&&(stack+=currentExtraStackFrame);var impl=ReactDebugCurrentFrame.getCurrentStack;return impl&&(stack+=impl()||""),stack};var enableScopeAPI=!1,enableCacheElement=!1,enableTransitionTracing=!1,enableLegacyHidden=!1,enableDebugTracing=!1,ReactSharedInternals={ReactCurrentDispatcher,ReactCurrentBatchConfig,ReactCurrentOwner};ReactSharedInternals.ReactDebugCurrentFrame=ReactDebugCurrentFrame,ReactSharedInternals.ReactCurrentActQueue=ReactCurrentActQueue;function warn(format){{for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];printWarning("warn",format,args)}}function error(format){{for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];printWarning("error",format,args)}}function printWarning(level,format,args){{var ReactDebugCurrentFrame2=ReactSharedInternals.ReactDebugCurrentFrame,stack=ReactDebugCurrentFrame2.getStackAddendum();stack!==""&&(format+="%s",args=args.concat([stack]));var argsWithFormat=args.map(function(item){return String(item)});argsWithFormat.unshift("Warning: "+format),Function.prototype.apply.call(console[level],console,argsWithFormat)}}var didWarnStateUpdateForUnmountedComponent={};function warnNoop(publicInstance,callerName){{var _constructor=publicInstance.constructor,componentName=_constructor&&(_constructor.displayName||_constructor.name)||"ReactClass",warningKey=componentName+"."+callerName;if(didWarnStateUpdateForUnmountedComponent[warningKey])return;error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",callerName,componentName),didWarnStateUpdateForUnmountedComponent[warningKey]=!0}}var ReactNoopUpdateQueue={isMounted:function(publicInstance){return!1},enqueueForceUpdate:function(publicInstance,callback,callerName){warnNoop(publicInstance,"forceUpdate")},enqueueReplaceState:function(publicInstance,completeState,callback,callerName){warnNoop(publicInstance,"replaceState")},enqueueSetState:function(publicInstance,partialState,callback,callerName){warnNoop(publicInstance,"setState")}},assign=Object.assign,emptyObject={};Object.freeze(emptyObject);function Component(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}Component.prototype.isReactComponent={},Component.prototype.setState=function(partialState,callback){if(typeof partialState!="object"&&typeof partialState!="function"&&partialState!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,partialState,callback,"setState")},Component.prototype.forceUpdate=function(callback){this.updater.enqueueForceUpdate(this,callback,"forceUpdate")};{var deprecatedAPIs={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},defineDeprecationWarning=function(methodName,info){Object.defineProperty(Component.prototype,methodName,{get:function(){warn("%s(...) is deprecated in plain JavaScript React classes. %s",info[0],info[1])}})};for(var fnName in deprecatedAPIs)deprecatedAPIs.hasOwnProperty(fnName)&&defineDeprecationWarning(fnName,deprecatedAPIs[fnName])}function ComponentDummy(){}ComponentDummy.prototype=Component.prototype;function PureComponent(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}var pureComponentPrototype=PureComponent.prototype=new ComponentDummy;pureComponentPrototype.constructor=PureComponent,assign(pureComponentPrototype,Component.prototype),pureComponentPrototype.isPureReactComponent=!0;function createRef(){var refObject={current:null};return Object.seal(refObject),refObject}var isArrayImpl=Array.isArray;function isArray2(a2){return isArrayImpl(a2)}function typeName(value2){{var hasToStringTag=typeof Symbol=="function"&&Symbol.toStringTag,type=hasToStringTag&&value2[Symbol.toStringTag]||value2.constructor.name||"Object";return type}}function willCoercionThrow(value2){try{return testStringCoercion(value2),!1}catch{return!0}}function testStringCoercion(value2){return""+value2}function checkKeyStringCoercion(value2){if(willCoercionThrow(value2))return error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",typeName(value2)),testStringCoercion(value2)}function getWrappedName(outerType,innerType,wrapperName){var displayName=outerType.displayName;if(displayName)return displayName;var functionName=innerType.displayName||innerType.name||"";return functionName!==""?wrapperName+"("+functionName+")":wrapperName}function getContextName(type){return type.displayName||"Context"}function getComponentNameFromType(type){if(type==null)return null;if(typeof type.tag=="number"&&error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof type=="function")return type.displayName||type.name||null;if(typeof type=="string")return type;switch(type){case REACT_FRAGMENT_TYPE:return"Fragment";case REACT_PORTAL_TYPE:return"Portal";case REACT_PROFILER_TYPE:return"Profiler";case REACT_STRICT_MODE_TYPE:return"StrictMode";case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList"}if(typeof type=="object")switch(type.$$typeof){case REACT_CONTEXT_TYPE:var context=type;return getContextName(context)+".Consumer";case REACT_PROVIDER_TYPE:var provider=type;return getContextName(provider._context)+".Provider";case REACT_FORWARD_REF_TYPE:return getWrappedName(type,type.render,"ForwardRef");case REACT_MEMO_TYPE:var outerName=type.displayName||null;return outerName!==null?outerName:getComponentNameFromType(type.type)||"Memo";case REACT_LAZY_TYPE:{var lazyComponent=type,payload=lazyComponent._payload,init2=lazyComponent._init;try{return getComponentNameFromType(init2(payload))}catch{return null}}}return null}var hasOwnProperty=Object.prototype.hasOwnProperty,RESERVED_PROPS={key:!0,ref:!0,__self:!0,__source:!0},specialPropKeyWarningShown,specialPropRefWarningShown,didWarnAboutStringRefs;didWarnAboutStringRefs={};function hasValidRef(config){if(hasOwnProperty.call(config,"ref")){var getter=Object.getOwnPropertyDescriptor(config,"ref").get;if(getter&&getter.isReactWarning)return!1}return config.ref!==void 0}function hasValidKey(config){if(hasOwnProperty.call(config,"key")){var getter=Object.getOwnPropertyDescriptor(config,"key").get;if(getter&&getter.isReactWarning)return!1}return config.key!==void 0}function defineKeyPropWarningGetter(props,displayName){var warnAboutAccessingKey=function(){specialPropKeyWarningShown||(specialPropKeyWarningShown=!0,error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",displayName))};warnAboutAccessingKey.isReactWarning=!0,Object.defineProperty(props,"key",{get:warnAboutAccessingKey,configurable:!0})}function defineRefPropWarningGetter(props,displayName){var warnAboutAccessingRef=function(){specialPropRefWarningShown||(specialPropRefWarningShown=!0,error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",displayName))};warnAboutAccessingRef.isReactWarning=!0,Object.defineProperty(props,"ref",{get:warnAboutAccessingRef,configurable:!0})}function warnIfStringRefCannotBeAutoConverted(config){if(typeof config.ref=="string"&&ReactCurrentOwner.current&&config.__self&&ReactCurrentOwner.current.stateNode!==config.__self){var componentName=getComponentNameFromType(ReactCurrentOwner.current.type);didWarnAboutStringRefs[componentName]||(error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',componentName,config.ref),didWarnAboutStringRefs[componentName]=!0)}}var ReactElement=function(type,key,ref,self2,source,owner,props){var element={$$typeof:REACT_ELEMENT_TYPE,type,key,ref,props,_owner:owner};return element._store={},Object.defineProperty(element._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(element,"_self",{configurable:!1,enumerable:!1,writable:!1,value:self2}),Object.defineProperty(element,"_source",{configurable:!1,enumerable:!1,writable:!1,value:source}),Object.freeze&&(Object.freeze(element.props),Object.freeze(element)),element};function createElement(type,config,children){var propName,props={},key=null,ref=null,self2=null,source=null;if(config!=null){hasValidRef(config)&&(ref=config.ref,warnIfStringRefCannotBeAutoConverted(config)),hasValidKey(config)&&(checkKeyStringCoercion(config.key),key=""+config.key),self2=config.__self===void 0?null:config.__self,source=config.__source===void 0?null:config.__source;for(propName in config)hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)&&(props[propName]=config[propName])}var childrenLength=arguments.length-2;if(childrenLength===1)props.children=children;else if(childrenLength>1){for(var childArray=Array(childrenLength),i2=0;i21){for(var childArray=Array(childrenLength),i2=0;i2 is not supported and will be removed in a future major release. Did you mean to render instead?")),context.Provider},set:function(_Provider){context.Provider=_Provider}},_currentValue:{get:function(){return context._currentValue},set:function(_currentValue){context._currentValue=_currentValue}},_currentValue2:{get:function(){return context._currentValue2},set:function(_currentValue2){context._currentValue2=_currentValue2}},_threadCount:{get:function(){return context._threadCount},set:function(_threadCount){context._threadCount=_threadCount}},Consumer:{get:function(){return hasWarnedAboutUsingNestedContextConsumers||(hasWarnedAboutUsingNestedContextConsumers=!0,error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),context.Consumer}},displayName:{get:function(){return context.displayName},set:function(displayName){hasWarnedAboutDisplayNameOnConsumer||(warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",displayName),hasWarnedAboutDisplayNameOnConsumer=!0)}}}),context.Consumer=Consumer}return context._currentRenderer=null,context._currentRenderer2=null,context}var Uninitialized=-1,Pending=0,Resolved=1,Rejected=2;function lazyInitializer(payload){if(payload._status===Uninitialized){var ctor=payload._result,thenable=ctor();if(thenable.then(function(moduleObject2){if(payload._status===Pending||payload._status===Uninitialized){var resolved=payload;resolved._status=Resolved,resolved._result=moduleObject2}},function(error2){if(payload._status===Pending||payload._status===Uninitialized){var rejected=payload;rejected._status=Rejected,rejected._result=error2}}),payload._status===Uninitialized){var pending=payload;pending._status=Pending,pending._result=thenable}}if(payload._status===Resolved){var moduleObject=payload._result;return moduleObject===void 0&&error(`lazy: Expected the result of a dynamic import() call. Instead received: %s +"use strict";(()=>{var __create=Object.create;var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __getProtoOf=Object.getPrototypeOf,__hasOwnProp=Object.prototype.hasOwnProperty;var __commonJS=(cb,mod)=>function(){return mod||(0,cb[__getOwnPropNames(cb)[0]])((mod={exports:{}}).exports,mod),mod.exports};var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to2,from2,except,desc)=>{if(from2&&typeof from2=="object"||typeof from2=="function")for(let key of __getOwnPropNames(from2))!__hasOwnProp.call(to2,key)&&key!==except&&__defProp(to2,key,{get:()=>from2[key],enumerable:!(desc=__getOwnPropDesc(from2,key))||desc.enumerable});return to2};var __toESM=(mod,isNodeMode,target)=>(target=mod!=null?__create(__getProtoOf(mod)):{},__copyProps(isNodeMode||!mod||!mod.__esModule?__defProp(target,"default",{value:mod,enumerable:!0}):target,mod));var require_react_development=__commonJS({"../../../data/workspace/pnpm/react@18.3.1/node_modules/react/cjs/react.development.js"(exports,module2){"use strict";(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var ReactVersion="18.3.1",REACT_ELEMENT_TYPE=Symbol.for("react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_OFFSCREEN_TYPE=Symbol.for("react.offscreen"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!="object")return null;var maybeIterator=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL];return typeof maybeIterator=="function"?maybeIterator:null}var ReactCurrentDispatcher={current:null},ReactCurrentBatchConfig={transition:null},ReactCurrentActQueue={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},ReactCurrentOwner={current:null},ReactDebugCurrentFrame={},currentExtraStackFrame=null;function setExtraStackFrame(stack){currentExtraStackFrame=stack}ReactDebugCurrentFrame.setExtraStackFrame=function(stack){currentExtraStackFrame=stack},ReactDebugCurrentFrame.getCurrentStack=null,ReactDebugCurrentFrame.getStackAddendum=function(){var stack="";currentExtraStackFrame&&(stack+=currentExtraStackFrame);var impl=ReactDebugCurrentFrame.getCurrentStack;return impl&&(stack+=impl()||""),stack};var enableScopeAPI=!1,enableCacheElement=!1,enableTransitionTracing=!1,enableLegacyHidden=!1,enableDebugTracing=!1,ReactSharedInternals={ReactCurrentDispatcher,ReactCurrentBatchConfig,ReactCurrentOwner};ReactSharedInternals.ReactDebugCurrentFrame=ReactDebugCurrentFrame,ReactSharedInternals.ReactCurrentActQueue=ReactCurrentActQueue;function warn(format){{for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];printWarning("warn",format,args)}}function error(format){{for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];printWarning("error",format,args)}}function printWarning(level,format,args){{var ReactDebugCurrentFrame2=ReactSharedInternals.ReactDebugCurrentFrame,stack=ReactDebugCurrentFrame2.getStackAddendum();stack!==""&&(format+="%s",args=args.concat([stack]));var argsWithFormat=args.map(function(item){return String(item)});argsWithFormat.unshift("Warning: "+format),Function.prototype.apply.call(console[level],console,argsWithFormat)}}var didWarnStateUpdateForUnmountedComponent={};function warnNoop(publicInstance,callerName){{var _constructor=publicInstance.constructor,componentName=_constructor&&(_constructor.displayName||_constructor.name)||"ReactClass",warningKey=componentName+"."+callerName;if(didWarnStateUpdateForUnmountedComponent[warningKey])return;error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",callerName,componentName),didWarnStateUpdateForUnmountedComponent[warningKey]=!0}}var ReactNoopUpdateQueue={isMounted:function(publicInstance){return!1},enqueueForceUpdate:function(publicInstance,callback,callerName){warnNoop(publicInstance,"forceUpdate")},enqueueReplaceState:function(publicInstance,completeState,callback,callerName){warnNoop(publicInstance,"replaceState")},enqueueSetState:function(publicInstance,partialState,callback,callerName){warnNoop(publicInstance,"setState")}},assign=Object.assign,emptyObject={};Object.freeze(emptyObject);function Component(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}Component.prototype.isReactComponent={},Component.prototype.setState=function(partialState,callback){if(typeof partialState!="object"&&typeof partialState!="function"&&partialState!=null)throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,partialState,callback,"setState")},Component.prototype.forceUpdate=function(callback){this.updater.enqueueForceUpdate(this,callback,"forceUpdate")};{var deprecatedAPIs={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]},defineDeprecationWarning=function(methodName,info){Object.defineProperty(Component.prototype,methodName,{get:function(){warn("%s(...) is deprecated in plain JavaScript React classes. %s",info[0],info[1])}})};for(var fnName in deprecatedAPIs)deprecatedAPIs.hasOwnProperty(fnName)&&defineDeprecationWarning(fnName,deprecatedAPIs[fnName])}function ComponentDummy(){}ComponentDummy.prototype=Component.prototype;function PureComponent(props,context,updater){this.props=props,this.context=context,this.refs=emptyObject,this.updater=updater||ReactNoopUpdateQueue}var pureComponentPrototype=PureComponent.prototype=new ComponentDummy;pureComponentPrototype.constructor=PureComponent,assign(pureComponentPrototype,Component.prototype),pureComponentPrototype.isPureReactComponent=!0;function createRef(){var refObject={current:null};return Object.seal(refObject),refObject}var isArrayImpl=Array.isArray;function isArray2(a2){return isArrayImpl(a2)}function typeName(value2){{var hasToStringTag=typeof Symbol=="function"&&Symbol.toStringTag,type=hasToStringTag&&value2[Symbol.toStringTag]||value2.constructor.name||"Object";return type}}function willCoercionThrow(value2){try{return testStringCoercion(value2),!1}catch{return!0}}function testStringCoercion(value2){return""+value2}function checkKeyStringCoercion(value2){if(willCoercionThrow(value2))return error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",typeName(value2)),testStringCoercion(value2)}function getWrappedName(outerType,innerType,wrapperName){var displayName=outerType.displayName;if(displayName)return displayName;var functionName=innerType.displayName||innerType.name||"";return functionName!==""?wrapperName+"("+functionName+")":wrapperName}function getContextName(type){return type.displayName||"Context"}function getComponentNameFromType(type){if(type==null)return null;if(typeof type.tag=="number"&&error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof type=="function")return type.displayName||type.name||null;if(typeof type=="string")return type;switch(type){case REACT_FRAGMENT_TYPE:return"Fragment";case REACT_PORTAL_TYPE:return"Portal";case REACT_PROFILER_TYPE:return"Profiler";case REACT_STRICT_MODE_TYPE:return"StrictMode";case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList"}if(typeof type=="object")switch(type.$$typeof){case REACT_CONTEXT_TYPE:var context=type;return getContextName(context)+".Consumer";case REACT_PROVIDER_TYPE:var provider=type;return getContextName(provider._context)+".Provider";case REACT_FORWARD_REF_TYPE:return getWrappedName(type,type.render,"ForwardRef");case REACT_MEMO_TYPE:var outerName=type.displayName||null;return outerName!==null?outerName:getComponentNameFromType(type.type)||"Memo";case REACT_LAZY_TYPE:{var lazyComponent=type,payload=lazyComponent._payload,init2=lazyComponent._init;try{return getComponentNameFromType(init2(payload))}catch{return null}}}return null}var hasOwnProperty=Object.prototype.hasOwnProperty,RESERVED_PROPS={key:!0,ref:!0,__self:!0,__source:!0},specialPropKeyWarningShown,specialPropRefWarningShown,didWarnAboutStringRefs;didWarnAboutStringRefs={};function hasValidRef(config){if(hasOwnProperty.call(config,"ref")){var getter=Object.getOwnPropertyDescriptor(config,"ref").get;if(getter&&getter.isReactWarning)return!1}return config.ref!==void 0}function hasValidKey(config){if(hasOwnProperty.call(config,"key")){var getter=Object.getOwnPropertyDescriptor(config,"key").get;if(getter&&getter.isReactWarning)return!1}return config.key!==void 0}function defineKeyPropWarningGetter(props,displayName){var warnAboutAccessingKey=function(){specialPropKeyWarningShown||(specialPropKeyWarningShown=!0,error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",displayName))};warnAboutAccessingKey.isReactWarning=!0,Object.defineProperty(props,"key",{get:warnAboutAccessingKey,configurable:!0})}function defineRefPropWarningGetter(props,displayName){var warnAboutAccessingRef=function(){specialPropRefWarningShown||(specialPropRefWarningShown=!0,error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",displayName))};warnAboutAccessingRef.isReactWarning=!0,Object.defineProperty(props,"ref",{get:warnAboutAccessingRef,configurable:!0})}function warnIfStringRefCannotBeAutoConverted(config){if(typeof config.ref=="string"&&ReactCurrentOwner.current&&config.__self&&ReactCurrentOwner.current.stateNode!==config.__self){var componentName=getComponentNameFromType(ReactCurrentOwner.current.type);didWarnAboutStringRefs[componentName]||(error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',componentName,config.ref),didWarnAboutStringRefs[componentName]=!0)}}var ReactElement=function(type,key,ref,self2,source,owner,props){var element={$$typeof:REACT_ELEMENT_TYPE,type,key,ref,props,_owner:owner};return element._store={},Object.defineProperty(element._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(element,"_self",{configurable:!1,enumerable:!1,writable:!1,value:self2}),Object.defineProperty(element,"_source",{configurable:!1,enumerable:!1,writable:!1,value:source}),Object.freeze&&(Object.freeze(element.props),Object.freeze(element)),element};function createElement(type,config,children){var propName,props={},key=null,ref=null,self2=null,source=null;if(config!=null){hasValidRef(config)&&(ref=config.ref,warnIfStringRefCannotBeAutoConverted(config)),hasValidKey(config)&&(checkKeyStringCoercion(config.key),key=""+config.key),self2=config.__self===void 0?null:config.__self,source=config.__source===void 0?null:config.__source;for(propName in config)hasOwnProperty.call(config,propName)&&!RESERVED_PROPS.hasOwnProperty(propName)&&(props[propName]=config[propName])}var childrenLength=arguments.length-2;if(childrenLength===1)props.children=children;else if(childrenLength>1){for(var childArray=Array(childrenLength),i2=0;i21){for(var childArray=Array(childrenLength),i2=0;i2 is not supported and will be removed in a future major release. Did you mean to render instead?")),context.Provider},set:function(_Provider){context.Provider=_Provider}},_currentValue:{get:function(){return context._currentValue},set:function(_currentValue){context._currentValue=_currentValue}},_currentValue2:{get:function(){return context._currentValue2},set:function(_currentValue2){context._currentValue2=_currentValue2}},_threadCount:{get:function(){return context._threadCount},set:function(_threadCount){context._threadCount=_threadCount}},Consumer:{get:function(){return hasWarnedAboutUsingNestedContextConsumers||(hasWarnedAboutUsingNestedContextConsumers=!0,error("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),context.Consumer}},displayName:{get:function(){return context.displayName},set:function(displayName){hasWarnedAboutDisplayNameOnConsumer||(warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",displayName),hasWarnedAboutDisplayNameOnConsumer=!0)}}}),context.Consumer=Consumer}return context._currentRenderer=null,context._currentRenderer2=null,context}var Uninitialized=-1,Pending=0,Resolved=1,Rejected=2;function lazyInitializer(payload){if(payload._status===Uninitialized){var ctor=payload._result,thenable=ctor();if(thenable.then(function(moduleObject2){if(payload._status===Pending||payload._status===Uninitialized){var resolved=payload;resolved._status=Resolved,resolved._result=moduleObject2}},function(error2){if(payload._status===Pending||payload._status===Uninitialized){var rejected=payload;rejected._status=Rejected,rejected._result=error2}}),payload._status===Uninitialized){var pending=payload;pending._status=Pending,pending._result=thenable}}if(payload._status===Resolved){var moduleObject=payload._result;return moduleObject===void 0&&error(`lazy: Expected the result of a dynamic import() call. Instead received: %s Your code should look like: const MyComponent = lazy(() => import('./MyComponent')) @@ -20,7 +20,7 @@ Check the render method of \``+name+"`."}return""}function getSourceInfoErrorAdd Check your code at `+fileName+":"+lineNumber+"."}return""}function getSourceInfoErrorAddendumForProps(elementProps){return elementProps!=null?getSourceInfoErrorAddendum(elementProps.__source):""}var ownerHasKeyUseWarning={};function getCurrentComponentErrorInfo(parentType){var info=getDeclarationErrorAddendum();if(!info){var parentName=typeof parentType=="string"?parentType:parentType.displayName||parentType.name;parentName&&(info=` -Check the top-level render call using <`+parentName+">.")}return info}function validateExplicitKey(element,parentType){if(!(!element._store||element._store.validated||element.key!=null)){element._store.validated=!0;var currentComponentErrorInfo=getCurrentComponentErrorInfo(parentType);if(!ownerHasKeyUseWarning[currentComponentErrorInfo]){ownerHasKeyUseWarning[currentComponentErrorInfo]=!0;var childOwner="";element&&element._owner&&element._owner!==ReactCurrentOwner.current&&(childOwner=" It was passed a child from "+getComponentNameFromType(element._owner.type)+"."),setCurrentlyValidatingElement$1(element),error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',currentComponentErrorInfo,childOwner),setCurrentlyValidatingElement$1(null)}}}function validateChildKeys(node,parentType){if(typeof node=="object"){if(isArray2(node))for(var i2=0;i2",info=" Did you accidentally export a JSX literal instead of a component?"):typeString=typeof type,error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",typeString,info)}var element=createElement.apply(this,arguments);if(element==null)return element;if(validType)for(var i2=2;i210&&warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),currentTransition._updatedFibers.clear()}}}var didWarnAboutMessageChannel=!1,enqueueTaskImpl=null;function enqueueTask(task){if(enqueueTaskImpl===null)try{var requireString=("require"+Math.random()).slice(0,7),nodeRequire=module2&&module2[requireString];enqueueTaskImpl=nodeRequire.call(module2,"timers").setImmediate}catch{enqueueTaskImpl=function(callback){didWarnAboutMessageChannel===!1&&(didWarnAboutMessageChannel=!0,typeof MessageChannel>"u"&&error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var channel=new MessageChannel;channel.port1.onmessage=callback,channel.port2.postMessage(void 0)}}return enqueueTaskImpl(task)}var actScopeDepth=0,didWarnNoAwaitAct=!1;function act(callback){{var prevActScopeDepth=actScopeDepth;actScopeDepth++,ReactCurrentActQueue.current===null&&(ReactCurrentActQueue.current=[]);var prevIsBatchingLegacy=ReactCurrentActQueue.isBatchingLegacy,result;try{if(ReactCurrentActQueue.isBatchingLegacy=!0,result=callback(),!prevIsBatchingLegacy&&ReactCurrentActQueue.didScheduleLegacyUpdate){var queue=ReactCurrentActQueue.current;queue!==null&&(ReactCurrentActQueue.didScheduleLegacyUpdate=!1,flushActQueue(queue))}}catch(error2){throw popActScope(prevActScopeDepth),error2}finally{ReactCurrentActQueue.isBatchingLegacy=prevIsBatchingLegacy}if(result!==null&&typeof result=="object"&&typeof result.then=="function"){var thenableResult=result,wasAwaited=!1,thenable={then:function(resolve3,reject2){wasAwaited=!0,thenableResult.then(function(returnValue2){popActScope(prevActScopeDepth),actScopeDepth===0?recursivelyFlushAsyncActWork(returnValue2,resolve3,reject2):resolve3(returnValue2)},function(error2){popActScope(prevActScopeDepth),reject2(error2)})}};return!didWarnNoAwaitAct&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){wasAwaited||(didWarnNoAwaitAct=!0,error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),thenable}else{var returnValue=result;if(popActScope(prevActScopeDepth),actScopeDepth===0){var _queue=ReactCurrentActQueue.current;_queue!==null&&(flushActQueue(_queue),ReactCurrentActQueue.current=null);var _thenable={then:function(resolve3,reject2){ReactCurrentActQueue.current===null?(ReactCurrentActQueue.current=[],recursivelyFlushAsyncActWork(returnValue,resolve3,reject2)):resolve3(returnValue)}};return _thenable}else{var _thenable2={then:function(resolve3,reject2){resolve3(returnValue)}};return _thenable2}}}}function popActScope(prevActScopeDepth){prevActScopeDepth!==actScopeDepth-1&&error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),actScopeDepth=prevActScopeDepth}function recursivelyFlushAsyncActWork(returnValue,resolve3,reject2){{var queue=ReactCurrentActQueue.current;if(queue!==null)try{flushActQueue(queue),enqueueTask(function(){queue.length===0?(ReactCurrentActQueue.current=null,resolve3(returnValue)):recursivelyFlushAsyncActWork(returnValue,resolve3,reject2)})}catch(error2){reject2(error2)}else resolve3(returnValue)}}var isFlushing=!1;function flushActQueue(queue){if(!isFlushing){isFlushing=!0;var i2=0;try{for(;i20;){var parentIndex=index-1>>>1,parent=heap[parentIndex];if(compare(parent,node)>0)heap[parentIndex]=node,heap[index]=parent,index=parentIndex;else return}}function siftDown(heap,node,i2){for(var index=i2,length=heap.length,halfLength=length>>>1;indexcurrentTime&&(!hasTimeRemaining||shouldYieldToHost()));){var callback=currentTask.callback;if(typeof callback=="function"){currentTask.callback=null,currentPriorityLevel=currentTask.priorityLevel;var didUserCallbackTimeout=currentTask.expirationTime<=currentTime,continuationCallback=callback(didUserCallbackTimeout);currentTime=exports.unstable_now(),typeof continuationCallback=="function"?currentTask.callback=continuationCallback:currentTask===peek(taskQueue)&&pop(taskQueue),advanceTimers(currentTime)}else pop(taskQueue);currentTask=peek(taskQueue)}if(currentTask!==null)return!0;var firstTimer=peek(timerQueue);return firstTimer!==null&&requestHostTimeout(handleTimeout,firstTimer.startTime-currentTime),!1}function unstable_runWithPriority(priorityLevel,eventHandler){switch(priorityLevel){case ImmediatePriority:case UserBlockingPriority:case NormalPriority:case LowPriority:case IdlePriority:break;default:priorityLevel=NormalPriority}var previousPriorityLevel=currentPriorityLevel;currentPriorityLevel=priorityLevel;try{return eventHandler()}finally{currentPriorityLevel=previousPriorityLevel}}function unstable_next(eventHandler){var priorityLevel;switch(currentPriorityLevel){case ImmediatePriority:case UserBlockingPriority:case NormalPriority:priorityLevel=NormalPriority;break;default:priorityLevel=currentPriorityLevel;break}var previousPriorityLevel=currentPriorityLevel;currentPriorityLevel=priorityLevel;try{return eventHandler()}finally{currentPriorityLevel=previousPriorityLevel}}function unstable_wrapCallback(callback){var parentPriorityLevel=currentPriorityLevel;return function(){var previousPriorityLevel=currentPriorityLevel;currentPriorityLevel=parentPriorityLevel;try{return callback.apply(this,arguments)}finally{currentPriorityLevel=previousPriorityLevel}}}function unstable_scheduleCallback(priorityLevel,callback,options){var currentTime=exports.unstable_now(),startTime2;if(typeof options=="object"&&options!==null){var delay=options.delay;typeof delay=="number"&&delay>0?startTime2=currentTime+delay:startTime2=currentTime}else startTime2=currentTime;var timeout;switch(priorityLevel){case ImmediatePriority:timeout=IMMEDIATE_PRIORITY_TIMEOUT;break;case UserBlockingPriority:timeout=USER_BLOCKING_PRIORITY_TIMEOUT;break;case IdlePriority:timeout=IDLE_PRIORITY_TIMEOUT;break;case LowPriority:timeout=LOW_PRIORITY_TIMEOUT;break;case NormalPriority:default:timeout=NORMAL_PRIORITY_TIMEOUT;break}var expirationTime=startTime2+timeout,newTask={id:taskIdCounter++,callback,priorityLevel,startTime:startTime2,expirationTime,sortIndex:-1};return startTime2>currentTime?(newTask.sortIndex=startTime2,push(timerQueue,newTask),peek(taskQueue)===null&&newTask===peek(timerQueue)&&(isHostTimeoutScheduled?cancelHostTimeout():isHostTimeoutScheduled=!0,requestHostTimeout(handleTimeout,startTime2-currentTime))):(newTask.sortIndex=expirationTime,push(taskQueue,newTask),!isHostCallbackScheduled&&!isPerformingWork&&(isHostCallbackScheduled=!0,requestHostCallback(flushWork))),newTask}function unstable_pauseExecution(){}function unstable_continueExecution(){!isHostCallbackScheduled&&!isPerformingWork&&(isHostCallbackScheduled=!0,requestHostCallback(flushWork))}function unstable_getFirstCallbackNode(){return peek(taskQueue)}function unstable_cancelCallback(task){task.callback=null}function unstable_getCurrentPriorityLevel(){return currentPriorityLevel}var isMessageLoopRunning=!1,scheduledHostCallback=null,taskTimeoutID=-1,frameInterval=frameYieldMs,startTime=-1;function shouldYieldToHost(){var timeElapsed=exports.unstable_now()-startTime;return!(timeElapsed125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}fps>0?frameInterval=Math.floor(1e3/fps):frameInterval=frameYieldMs}var performWorkUntilDeadline=function(){if(scheduledHostCallback!==null){var currentTime=exports.unstable_now();startTime=currentTime;var hasTimeRemaining=!0,hasMoreWork=!0;try{hasMoreWork=scheduledHostCallback(hasTimeRemaining,currentTime)}finally{hasMoreWork?schedulePerformWorkUntilDeadline():(isMessageLoopRunning=!1,scheduledHostCallback=null)}}else isMessageLoopRunning=!1},schedulePerformWorkUntilDeadline;if(typeof localSetImmediate=="function")schedulePerformWorkUntilDeadline=function(){localSetImmediate(performWorkUntilDeadline)};else if(typeof MessageChannel<"u"){var channel=new MessageChannel,port=channel.port2;channel.port1.onmessage=performWorkUntilDeadline,schedulePerformWorkUntilDeadline=function(){port.postMessage(null)}}else schedulePerformWorkUntilDeadline=function(){localSetTimeout(performWorkUntilDeadline,0)};function requestHostCallback(callback){scheduledHostCallback=callback,isMessageLoopRunning||(isMessageLoopRunning=!0,schedulePerformWorkUntilDeadline())}function requestHostTimeout(callback,ms){taskTimeoutID=localSetTimeout(function(){callback(exports.unstable_now())},ms)}function cancelHostTimeout(){localClearTimeout(taskTimeoutID),taskTimeoutID=-1}var unstable_requestPaint=requestPaint,unstable_Profiling=null;exports.unstable_IdlePriority=IdlePriority,exports.unstable_ImmediatePriority=ImmediatePriority,exports.unstable_LowPriority=LowPriority,exports.unstable_NormalPriority=NormalPriority,exports.unstable_Profiling=unstable_Profiling,exports.unstable_UserBlockingPriority=UserBlockingPriority,exports.unstable_cancelCallback=unstable_cancelCallback,exports.unstable_continueExecution=unstable_continueExecution,exports.unstable_forceFrameRate=forceFrameRate,exports.unstable_getCurrentPriorityLevel=unstable_getCurrentPriorityLevel,exports.unstable_getFirstCallbackNode=unstable_getFirstCallbackNode,exports.unstable_next=unstable_next,exports.unstable_pauseExecution=unstable_pauseExecution,exports.unstable_requestPaint=unstable_requestPaint,exports.unstable_runWithPriority=unstable_runWithPriority,exports.unstable_scheduleCallback=unstable_scheduleCallback,exports.unstable_shouldYield=shouldYieldToHost,exports.unstable_wrapCallback=unstable_wrapCallback,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()}});var require_scheduler=__commonJS({"node_modules/scheduler/index.js"(exports,module2){"use strict";module2.exports=require_scheduler_development()}});var require_react_dom_development=__commonJS({"node_modules/react-dom/cjs/react-dom.development.js"(exports){"use strict";(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var React2=require_react(),Scheduler=require_scheduler(),ReactSharedInternals=React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,suppressWarning=!1;function setSuppressWarning(newSuppressWarning){suppressWarning=newSuppressWarning}function warn(format){if(!suppressWarning){for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];printWarning("warn",format,args)}}function error(format){if(!suppressWarning){for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];printWarning("error",format,args)}}function printWarning(level,format,args){{var ReactDebugCurrentFrame2=ReactSharedInternals.ReactDebugCurrentFrame,stack=ReactDebugCurrentFrame2.getStackAddendum();stack!==""&&(format+="%s",args=args.concat([stack]));var argsWithFormat=args.map(function(item){return String(item)});argsWithFormat.unshift("Warning: "+format),Function.prototype.apply.call(console[level],console,argsWithFormat)}}var FunctionComponent=0,ClassComponent=1,IndeterminateComponent=2,HostRoot=3,HostPortal=4,HostComponent=5,HostText=6,Fragment=7,Mode=8,ContextConsumer=9,ContextProvider=10,ForwardRef=11,Profiler=12,SuspenseComponent=13,MemoComponent=14,SimpleMemoComponent=15,LazyComponent=16,IncompleteClassComponent=17,DehydratedFragment=18,SuspenseListComponent=19,ScopeComponent=21,OffscreenComponent=22,LegacyHiddenComponent=23,CacheComponent=24,TracingMarkerComponent=25,enableClientRenderFallbackOnTextMismatch=!0,enableNewReconciler=!1,enableLazyContextPropagation=!1,enableLegacyHidden=!1,enableSuspenseAvoidThisFallback=!1,disableCommentsAsDOMContainers=!0,enableCustomElementPropertySupport=!1,warnAboutStringRefs=!0,enableSchedulingProfiler=!0,enableProfilerTimer=!0,enableProfilerCommitHooks=!0,allNativeEvents=new Set,registrationNameDependencies={},possibleRegistrationNames={};function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies),registerDirectEvent(registrationName+"Capture",dependencies)}function registerDirectEvent(registrationName,dependencies){registrationNameDependencies[registrationName]&&error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",registrationName),registrationNameDependencies[registrationName]=dependencies;{var lowerCasedName=registrationName.toLowerCase();possibleRegistrationNames[lowerCasedName]=registrationName,registrationName==="onDoubleClick"&&(possibleRegistrationNames.ondblclick=registrationName)}for(var i2=0;i22&&(name[0]==="o"||name[0]==="O")&&(name[1]==="n"||name[1]==="N")}function shouldRemoveAttributeWithWarning(name,value2,propertyInfo,isCustomComponentTag){if(propertyInfo!==null&&propertyInfo.type===RESERVED)return!1;switch(typeof value2){case"function":case"symbol":return!0;case"boolean":{if(isCustomComponentTag)return!1;if(propertyInfo!==null)return!propertyInfo.acceptsBooleans;var prefix2=name.toLowerCase().slice(0,5);return prefix2!=="data-"&&prefix2!=="aria-"}default:return!1}}function shouldRemoveAttribute(name,value2,propertyInfo,isCustomComponentTag){if(value2===null||typeof value2>"u"||shouldRemoveAttributeWithWarning(name,value2,propertyInfo,isCustomComponentTag))return!0;if(isCustomComponentTag)return!1;if(propertyInfo!==null)switch(propertyInfo.type){case BOOLEAN:return!value2;case OVERLOADED_BOOLEAN:return value2===!1;case NUMERIC:return isNaN(value2);case POSITIVE_NUMERIC:return isNaN(value2)||value2<1}return!1}function getPropertyInfo(name){return properties.hasOwnProperty(name)?properties[name]:null}function PropertyInfoRecord(name,type,mustUseProperty,attributeName,attributeNamespace,sanitizeURL2,removeEmptyString){this.acceptsBooleans=type===BOOLEANISH_STRING||type===BOOLEAN||type===OVERLOADED_BOOLEAN,this.attributeName=attributeName,this.attributeNamespace=attributeNamespace,this.mustUseProperty=mustUseProperty,this.propertyName=name,this.type=type,this.sanitizeURL=sanitizeURL2,this.removeEmptyString=removeEmptyString}var properties={},reservedProps=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];reservedProps.forEach(function(name){properties[name]=new PropertyInfoRecord(name,RESERVED,!1,name,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(_ref){var name=_ref[0],attributeName=_ref[1];properties[name]=new PropertyInfoRecord(name,STRING,!1,attributeName,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEANISH_STRING,!1,name.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEANISH_STRING,!1,name,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"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEAN,!1,name.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEAN,!0,name,null,!1,!1)}),["capture","download"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,OVERLOADED_BOOLEAN,!1,name,null,!1,!1)}),["cols","rows","size","span"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,POSITIVE_NUMERIC,!1,name,null,!1,!1)}),["rowSpan","start"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,NUMERIC,!1,name.toLowerCase(),null,!1,!1)});var CAMELIZE=/[\-\:]([a-z])/g,capitalize=function(token){return token[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"].forEach(function(attributeName){var name=attributeName.replace(CAMELIZE,capitalize);properties[name]=new PropertyInfoRecord(name,STRING,!1,attributeName,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(attributeName){var name=attributeName.replace(CAMELIZE,capitalize);properties[name]=new PropertyInfoRecord(name,STRING,!1,attributeName,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(attributeName){var name=attributeName.replace(CAMELIZE,capitalize);properties[name]=new PropertyInfoRecord(name,STRING,!1,attributeName,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(attributeName){properties[attributeName]=new PropertyInfoRecord(attributeName,STRING,!1,attributeName.toLowerCase(),null,!1,!1)});var xlinkHref="xlinkHref";properties[xlinkHref]=new PropertyInfoRecord("xlinkHref",STRING,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(attributeName){properties[attributeName]=new PropertyInfoRecord(attributeName,STRING,!1,attributeName.toLowerCase(),null,!0,!0)});var isJavaScriptProtocol=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,didWarn=!1;function sanitizeURL(url2){!didWarn&&isJavaScriptProtocol.test(url2)&&(didWarn=!0,error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(url2)))}function getValueForProperty(node,name,expected,propertyInfo){if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName]}else{checkAttributeStringCoercion(expected,name),propertyInfo.sanitizeURL&&sanitizeURL(""+expected);var attributeName=propertyInfo.attributeName,stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value2=node.getAttribute(attributeName);return value2===""?!0:shouldRemoveAttribute(name,expected,propertyInfo,!1)?value2:value2===""+expected?expected:value2}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,!1))return node.getAttribute(attributeName);if(propertyInfo.type===BOOLEAN)return expected;stringValue=node.getAttribute(attributeName)}return shouldRemoveAttribute(name,expected,propertyInfo,!1)?stringValue===null?expected:stringValue:stringValue===""+expected?expected:stringValue}}function getValueForAttribute(node,name,expected,isCustomComponentTag){{if(!isAttributeNameSafe(name))return;if(!node.hasAttribute(name))return expected===void 0?void 0:null;var value2=node.getAttribute(name);return checkAttributeStringCoercion(expected,name),value2===""+expected?expected:value2}}function setValueForProperty(node,name,value2,isCustomComponentTag){var propertyInfo=getPropertyInfo(name);if(!shouldIgnoreAttribute(name,propertyInfo,isCustomComponentTag)){if(shouldRemoveAttribute(name,value2,propertyInfo,isCustomComponentTag)&&(value2=null),isCustomComponentTag||propertyInfo===null){if(isAttributeNameSafe(name)){var _attributeName=name;value2===null?node.removeAttribute(_attributeName):(checkAttributeStringCoercion(value2,name),node.setAttribute(_attributeName,""+value2))}return}var mustUseProperty=propertyInfo.mustUseProperty;if(mustUseProperty){var propertyName=propertyInfo.propertyName;if(value2===null){var type=propertyInfo.type;node[propertyName]=type===BOOLEAN?!1:""}else node[propertyName]=value2;return}var attributeName=propertyInfo.attributeName,attributeNamespace=propertyInfo.attributeNamespace;if(value2===null)node.removeAttribute(attributeName);else{var _type=propertyInfo.type,attributeValue;_type===BOOLEAN||_type===OVERLOADED_BOOLEAN&&value2===!0?attributeValue="":(checkAttributeStringCoercion(value2,attributeName),attributeValue=""+value2,propertyInfo.sanitizeURL&&sanitizeURL(attributeValue.toString())),attributeNamespace?node.setAttributeNS(attributeNamespace,attributeName,attributeValue):node.setAttribute(attributeName,attributeValue)}}}var REACT_ELEMENT_TYPE=Symbol.for("react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_SCOPE_TYPE=Symbol.for("react.scope"),REACT_DEBUG_TRACING_MODE_TYPE=Symbol.for("react.debug_trace_mode"),REACT_OFFSCREEN_TYPE=Symbol.for("react.offscreen"),REACT_LEGACY_HIDDEN_TYPE=Symbol.for("react.legacy_hidden"),REACT_CACHE_TYPE=Symbol.for("react.cache"),REACT_TRACING_MARKER_TYPE=Symbol.for("react.tracing_marker"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!="object")return null;var maybeIterator=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL];return typeof maybeIterator=="function"?maybeIterator:null}var assign=Object.assign,disabledDepth=0,prevLog,prevInfo,prevWarn,prevError,prevGroup,prevGroupCollapsed,prevGroupEnd;function disabledLog(){}disabledLog.__reactDisabledLog=!0;function disableLogs(){{if(disabledDepth===0){prevLog=console.log,prevInfo=console.info,prevWarn=console.warn,prevError=console.error,prevGroup=console.group,prevGroupCollapsed=console.groupCollapsed,prevGroupEnd=console.groupEnd;var props={configurable:!0,enumerable:!0,value:disabledLog,writable:!0};Object.defineProperties(console,{info:props,log:props,warn:props,error:props,group:props,groupCollapsed:props,groupEnd:props})}disabledDepth++}}function reenableLogs(){{if(disabledDepth--,disabledDepth===0){var props={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:assign({},props,{value:prevLog}),info:assign({},props,{value:prevInfo}),warn:assign({},props,{value:prevWarn}),error:assign({},props,{value:prevError}),group:assign({},props,{value:prevGroup}),groupCollapsed:assign({},props,{value:prevGroupCollapsed}),groupEnd:assign({},props,{value:prevGroupEnd})})}disabledDepth<0&&error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ReactCurrentDispatcher=ReactSharedInternals.ReactCurrentDispatcher,prefix;function describeBuiltInComponentFrame(name,source,ownerFn){{if(prefix===void 0)try{throw Error()}catch(x2){var match=x2.stack.trim().match(/\n( *(at )?)/);prefix=match&&match[1]||""}return` +Check the top-level render call using <`+parentName+">.")}return info}function validateExplicitKey(element,parentType){if(!(!element._store||element._store.validated||element.key!=null)){element._store.validated=!0;var currentComponentErrorInfo=getCurrentComponentErrorInfo(parentType);if(!ownerHasKeyUseWarning[currentComponentErrorInfo]){ownerHasKeyUseWarning[currentComponentErrorInfo]=!0;var childOwner="";element&&element._owner&&element._owner!==ReactCurrentOwner.current&&(childOwner=" It was passed a child from "+getComponentNameFromType(element._owner.type)+"."),setCurrentlyValidatingElement$1(element),error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',currentComponentErrorInfo,childOwner),setCurrentlyValidatingElement$1(null)}}}function validateChildKeys(node,parentType){if(typeof node=="object"){if(isArray2(node))for(var i2=0;i2",info=" Did you accidentally export a JSX literal instead of a component?"):typeString=typeof type,error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",typeString,info)}var element=createElement.apply(this,arguments);if(element==null)return element;if(validType)for(var i2=2;i210&&warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),currentTransition._updatedFibers.clear()}}}var didWarnAboutMessageChannel=!1,enqueueTaskImpl=null;function enqueueTask(task){if(enqueueTaskImpl===null)try{var requireString=("require"+Math.random()).slice(0,7),nodeRequire=module2&&module2[requireString];enqueueTaskImpl=nodeRequire.call(module2,"timers").setImmediate}catch{enqueueTaskImpl=function(callback){didWarnAboutMessageChannel===!1&&(didWarnAboutMessageChannel=!0,typeof MessageChannel>"u"&&error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var channel=new MessageChannel;channel.port1.onmessage=callback,channel.port2.postMessage(void 0)}}return enqueueTaskImpl(task)}var actScopeDepth=0,didWarnNoAwaitAct=!1;function act(callback){{var prevActScopeDepth=actScopeDepth;actScopeDepth++,ReactCurrentActQueue.current===null&&(ReactCurrentActQueue.current=[]);var prevIsBatchingLegacy=ReactCurrentActQueue.isBatchingLegacy,result;try{if(ReactCurrentActQueue.isBatchingLegacy=!0,result=callback(),!prevIsBatchingLegacy&&ReactCurrentActQueue.didScheduleLegacyUpdate){var queue=ReactCurrentActQueue.current;queue!==null&&(ReactCurrentActQueue.didScheduleLegacyUpdate=!1,flushActQueue(queue))}}catch(error2){throw popActScope(prevActScopeDepth),error2}finally{ReactCurrentActQueue.isBatchingLegacy=prevIsBatchingLegacy}if(result!==null&&typeof result=="object"&&typeof result.then=="function"){var thenableResult=result,wasAwaited=!1,thenable={then:function(resolve3,reject2){wasAwaited=!0,thenableResult.then(function(returnValue2){popActScope(prevActScopeDepth),actScopeDepth===0?recursivelyFlushAsyncActWork(returnValue2,resolve3,reject2):resolve3(returnValue2)},function(error2){popActScope(prevActScopeDepth),reject2(error2)})}};return!didWarnNoAwaitAct&&typeof Promise<"u"&&Promise.resolve().then(function(){}).then(function(){wasAwaited||(didWarnNoAwaitAct=!0,error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),thenable}else{var returnValue=result;if(popActScope(prevActScopeDepth),actScopeDepth===0){var _queue=ReactCurrentActQueue.current;_queue!==null&&(flushActQueue(_queue),ReactCurrentActQueue.current=null);var _thenable={then:function(resolve3,reject2){ReactCurrentActQueue.current===null?(ReactCurrentActQueue.current=[],recursivelyFlushAsyncActWork(returnValue,resolve3,reject2)):resolve3(returnValue)}};return _thenable}else{var _thenable2={then:function(resolve3,reject2){resolve3(returnValue)}};return _thenable2}}}}function popActScope(prevActScopeDepth){prevActScopeDepth!==actScopeDepth-1&&error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),actScopeDepth=prevActScopeDepth}function recursivelyFlushAsyncActWork(returnValue,resolve3,reject2){{var queue=ReactCurrentActQueue.current;if(queue!==null)try{flushActQueue(queue),enqueueTask(function(){queue.length===0?(ReactCurrentActQueue.current=null,resolve3(returnValue)):recursivelyFlushAsyncActWork(returnValue,resolve3,reject2)})}catch(error2){reject2(error2)}else resolve3(returnValue)}}var isFlushing=!1;function flushActQueue(queue){if(!isFlushing){isFlushing=!0;var i2=0;try{for(;i20;){var parentIndex=index-1>>>1,parent=heap[parentIndex];if(compare(parent,node)>0)heap[parentIndex]=node,heap[index]=parent,index=parentIndex;else return}}function siftDown(heap,node,i2){for(var index=i2,length=heap.length,halfLength=length>>>1;indexcurrentTime&&(!hasTimeRemaining||shouldYieldToHost()));){var callback=currentTask.callback;if(typeof callback=="function"){currentTask.callback=null,currentPriorityLevel=currentTask.priorityLevel;var didUserCallbackTimeout=currentTask.expirationTime<=currentTime,continuationCallback=callback(didUserCallbackTimeout);currentTime=exports.unstable_now(),typeof continuationCallback=="function"?currentTask.callback=continuationCallback:currentTask===peek(taskQueue)&&pop(taskQueue),advanceTimers(currentTime)}else pop(taskQueue);currentTask=peek(taskQueue)}if(currentTask!==null)return!0;var firstTimer=peek(timerQueue);return firstTimer!==null&&requestHostTimeout(handleTimeout,firstTimer.startTime-currentTime),!1}function unstable_runWithPriority(priorityLevel,eventHandler){switch(priorityLevel){case ImmediatePriority:case UserBlockingPriority:case NormalPriority:case LowPriority:case IdlePriority:break;default:priorityLevel=NormalPriority}var previousPriorityLevel=currentPriorityLevel;currentPriorityLevel=priorityLevel;try{return eventHandler()}finally{currentPriorityLevel=previousPriorityLevel}}function unstable_next(eventHandler){var priorityLevel;switch(currentPriorityLevel){case ImmediatePriority:case UserBlockingPriority:case NormalPriority:priorityLevel=NormalPriority;break;default:priorityLevel=currentPriorityLevel;break}var previousPriorityLevel=currentPriorityLevel;currentPriorityLevel=priorityLevel;try{return eventHandler()}finally{currentPriorityLevel=previousPriorityLevel}}function unstable_wrapCallback(callback){var parentPriorityLevel=currentPriorityLevel;return function(){var previousPriorityLevel=currentPriorityLevel;currentPriorityLevel=parentPriorityLevel;try{return callback.apply(this,arguments)}finally{currentPriorityLevel=previousPriorityLevel}}}function unstable_scheduleCallback(priorityLevel,callback,options){var currentTime=exports.unstable_now(),startTime2;if(typeof options=="object"&&options!==null){var delay=options.delay;typeof delay=="number"&&delay>0?startTime2=currentTime+delay:startTime2=currentTime}else startTime2=currentTime;var timeout;switch(priorityLevel){case ImmediatePriority:timeout=IMMEDIATE_PRIORITY_TIMEOUT;break;case UserBlockingPriority:timeout=USER_BLOCKING_PRIORITY_TIMEOUT;break;case IdlePriority:timeout=IDLE_PRIORITY_TIMEOUT;break;case LowPriority:timeout=LOW_PRIORITY_TIMEOUT;break;case NormalPriority:default:timeout=NORMAL_PRIORITY_TIMEOUT;break}var expirationTime=startTime2+timeout,newTask={id:taskIdCounter++,callback,priorityLevel,startTime:startTime2,expirationTime,sortIndex:-1};return startTime2>currentTime?(newTask.sortIndex=startTime2,push(timerQueue,newTask),peek(taskQueue)===null&&newTask===peek(timerQueue)&&(isHostTimeoutScheduled?cancelHostTimeout():isHostTimeoutScheduled=!0,requestHostTimeout(handleTimeout,startTime2-currentTime))):(newTask.sortIndex=expirationTime,push(taskQueue,newTask),!isHostCallbackScheduled&&!isPerformingWork&&(isHostCallbackScheduled=!0,requestHostCallback(flushWork))),newTask}function unstable_pauseExecution(){}function unstable_continueExecution(){!isHostCallbackScheduled&&!isPerformingWork&&(isHostCallbackScheduled=!0,requestHostCallback(flushWork))}function unstable_getFirstCallbackNode(){return peek(taskQueue)}function unstable_cancelCallback(task){task.callback=null}function unstable_getCurrentPriorityLevel(){return currentPriorityLevel}var isMessageLoopRunning=!1,scheduledHostCallback=null,taskTimeoutID=-1,frameInterval=frameYieldMs,startTime=-1;function shouldYieldToHost(){var timeElapsed=exports.unstable_now()-startTime;return!(timeElapsed125){console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");return}fps>0?frameInterval=Math.floor(1e3/fps):frameInterval=frameYieldMs}var performWorkUntilDeadline=function(){if(scheduledHostCallback!==null){var currentTime=exports.unstable_now();startTime=currentTime;var hasTimeRemaining=!0,hasMoreWork=!0;try{hasMoreWork=scheduledHostCallback(hasTimeRemaining,currentTime)}finally{hasMoreWork?schedulePerformWorkUntilDeadline():(isMessageLoopRunning=!1,scheduledHostCallback=null)}}else isMessageLoopRunning=!1},schedulePerformWorkUntilDeadline;if(typeof localSetImmediate=="function")schedulePerformWorkUntilDeadline=function(){localSetImmediate(performWorkUntilDeadline)};else if(typeof MessageChannel<"u"){var channel=new MessageChannel,port=channel.port2;channel.port1.onmessage=performWorkUntilDeadline,schedulePerformWorkUntilDeadline=function(){port.postMessage(null)}}else schedulePerformWorkUntilDeadline=function(){localSetTimeout(performWorkUntilDeadline,0)};function requestHostCallback(callback){scheduledHostCallback=callback,isMessageLoopRunning||(isMessageLoopRunning=!0,schedulePerformWorkUntilDeadline())}function requestHostTimeout(callback,ms){taskTimeoutID=localSetTimeout(function(){callback(exports.unstable_now())},ms)}function cancelHostTimeout(){localClearTimeout(taskTimeoutID),taskTimeoutID=-1}var unstable_requestPaint=requestPaint,unstable_Profiling=null;exports.unstable_IdlePriority=IdlePriority,exports.unstable_ImmediatePriority=ImmediatePriority,exports.unstable_LowPriority=LowPriority,exports.unstable_NormalPriority=NormalPriority,exports.unstable_Profiling=unstable_Profiling,exports.unstable_UserBlockingPriority=UserBlockingPriority,exports.unstable_cancelCallback=unstable_cancelCallback,exports.unstable_continueExecution=unstable_continueExecution,exports.unstable_forceFrameRate=forceFrameRate,exports.unstable_getCurrentPriorityLevel=unstable_getCurrentPriorityLevel,exports.unstable_getFirstCallbackNode=unstable_getFirstCallbackNode,exports.unstable_next=unstable_next,exports.unstable_pauseExecution=unstable_pauseExecution,exports.unstable_requestPaint=unstable_requestPaint,exports.unstable_runWithPriority=unstable_runWithPriority,exports.unstable_scheduleCallback=unstable_scheduleCallback,exports.unstable_shouldYield=shouldYieldToHost,exports.unstable_wrapCallback=unstable_wrapCallback,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()}});var require_scheduler=__commonJS({"../../../data/workspace/pnpm/scheduler@0.23.2/node_modules/scheduler/index.js"(exports,module2){"use strict";module2.exports=require_scheduler_development()}});var require_react_dom_development=__commonJS({"../../../data/workspace/pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js"(exports){"use strict";(function(){"use strict";typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var React2=require_react(),Scheduler=require_scheduler(),ReactSharedInternals=React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,suppressWarning=!1;function setSuppressWarning(newSuppressWarning){suppressWarning=newSuppressWarning}function warn(format){if(!suppressWarning){for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];printWarning("warn",format,args)}}function error(format){if(!suppressWarning){for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];printWarning("error",format,args)}}function printWarning(level,format,args){{var ReactDebugCurrentFrame2=ReactSharedInternals.ReactDebugCurrentFrame,stack=ReactDebugCurrentFrame2.getStackAddendum();stack!==""&&(format+="%s",args=args.concat([stack]));var argsWithFormat=args.map(function(item){return String(item)});argsWithFormat.unshift("Warning: "+format),Function.prototype.apply.call(console[level],console,argsWithFormat)}}var FunctionComponent=0,ClassComponent=1,IndeterminateComponent=2,HostRoot=3,HostPortal=4,HostComponent=5,HostText=6,Fragment=7,Mode=8,ContextConsumer=9,ContextProvider=10,ForwardRef=11,Profiler=12,SuspenseComponent=13,MemoComponent=14,SimpleMemoComponent=15,LazyComponent=16,IncompleteClassComponent=17,DehydratedFragment=18,SuspenseListComponent=19,ScopeComponent=21,OffscreenComponent=22,LegacyHiddenComponent=23,CacheComponent=24,TracingMarkerComponent=25,enableClientRenderFallbackOnTextMismatch=!0,enableNewReconciler=!1,enableLazyContextPropagation=!1,enableLegacyHidden=!1,enableSuspenseAvoidThisFallback=!1,disableCommentsAsDOMContainers=!0,enableCustomElementPropertySupport=!1,warnAboutStringRefs=!0,enableSchedulingProfiler=!0,enableProfilerTimer=!0,enableProfilerCommitHooks=!0,allNativeEvents=new Set,registrationNameDependencies={},possibleRegistrationNames={};function registerTwoPhaseEvent(registrationName,dependencies){registerDirectEvent(registrationName,dependencies),registerDirectEvent(registrationName+"Capture",dependencies)}function registerDirectEvent(registrationName,dependencies){registrationNameDependencies[registrationName]&&error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",registrationName),registrationNameDependencies[registrationName]=dependencies;{var lowerCasedName=registrationName.toLowerCase();possibleRegistrationNames[lowerCasedName]=registrationName,registrationName==="onDoubleClick"&&(possibleRegistrationNames.ondblclick=registrationName)}for(var i2=0;i22&&(name[0]==="o"||name[0]==="O")&&(name[1]==="n"||name[1]==="N")}function shouldRemoveAttributeWithWarning(name,value2,propertyInfo,isCustomComponentTag){if(propertyInfo!==null&&propertyInfo.type===RESERVED)return!1;switch(typeof value2){case"function":case"symbol":return!0;case"boolean":{if(isCustomComponentTag)return!1;if(propertyInfo!==null)return!propertyInfo.acceptsBooleans;var prefix2=name.toLowerCase().slice(0,5);return prefix2!=="data-"&&prefix2!=="aria-"}default:return!1}}function shouldRemoveAttribute(name,value2,propertyInfo,isCustomComponentTag){if(value2===null||typeof value2>"u"||shouldRemoveAttributeWithWarning(name,value2,propertyInfo,isCustomComponentTag))return!0;if(isCustomComponentTag)return!1;if(propertyInfo!==null)switch(propertyInfo.type){case BOOLEAN:return!value2;case OVERLOADED_BOOLEAN:return value2===!1;case NUMERIC:return isNaN(value2);case POSITIVE_NUMERIC:return isNaN(value2)||value2<1}return!1}function getPropertyInfo(name){return properties.hasOwnProperty(name)?properties[name]:null}function PropertyInfoRecord(name,type,mustUseProperty,attributeName,attributeNamespace,sanitizeURL2,removeEmptyString){this.acceptsBooleans=type===BOOLEANISH_STRING||type===BOOLEAN||type===OVERLOADED_BOOLEAN,this.attributeName=attributeName,this.attributeNamespace=attributeNamespace,this.mustUseProperty=mustUseProperty,this.propertyName=name,this.type=type,this.sanitizeURL=sanitizeURL2,this.removeEmptyString=removeEmptyString}var properties={},reservedProps=["children","dangerouslySetInnerHTML","defaultValue","defaultChecked","innerHTML","suppressContentEditableWarning","suppressHydrationWarning","style"];reservedProps.forEach(function(name){properties[name]=new PropertyInfoRecord(name,RESERVED,!1,name,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(_ref){var name=_ref[0],attributeName=_ref[1];properties[name]=new PropertyInfoRecord(name,STRING,!1,attributeName,null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEANISH_STRING,!1,name.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEANISH_STRING,!1,name,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"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEAN,!1,name.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,BOOLEAN,!0,name,null,!1,!1)}),["capture","download"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,OVERLOADED_BOOLEAN,!1,name,null,!1,!1)}),["cols","rows","size","span"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,POSITIVE_NUMERIC,!1,name,null,!1,!1)}),["rowSpan","start"].forEach(function(name){properties[name]=new PropertyInfoRecord(name,NUMERIC,!1,name.toLowerCase(),null,!1,!1)});var CAMELIZE=/[\-\:]([a-z])/g,capitalize=function(token){return token[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"].forEach(function(attributeName){var name=attributeName.replace(CAMELIZE,capitalize);properties[name]=new PropertyInfoRecord(name,STRING,!1,attributeName,null,!1,!1)}),["xlink:actuate","xlink:arcrole","xlink:role","xlink:show","xlink:title","xlink:type"].forEach(function(attributeName){var name=attributeName.replace(CAMELIZE,capitalize);properties[name]=new PropertyInfoRecord(name,STRING,!1,attributeName,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(attributeName){var name=attributeName.replace(CAMELIZE,capitalize);properties[name]=new PropertyInfoRecord(name,STRING,!1,attributeName,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(attributeName){properties[attributeName]=new PropertyInfoRecord(attributeName,STRING,!1,attributeName.toLowerCase(),null,!1,!1)});var xlinkHref="xlinkHref";properties[xlinkHref]=new PropertyInfoRecord("xlinkHref",STRING,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(attributeName){properties[attributeName]=new PropertyInfoRecord(attributeName,STRING,!1,attributeName.toLowerCase(),null,!0,!0)});var isJavaScriptProtocol=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i,didWarn=!1;function sanitizeURL(url2){!didWarn&&isJavaScriptProtocol.test(url2)&&(didWarn=!0,error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",JSON.stringify(url2)))}function getValueForProperty(node,name,expected,propertyInfo){if(propertyInfo.mustUseProperty){var propertyName=propertyInfo.propertyName;return node[propertyName]}else{checkAttributeStringCoercion(expected,name),propertyInfo.sanitizeURL&&sanitizeURL(""+expected);var attributeName=propertyInfo.attributeName,stringValue=null;if(propertyInfo.type===OVERLOADED_BOOLEAN){if(node.hasAttribute(attributeName)){var value2=node.getAttribute(attributeName);return value2===""?!0:shouldRemoveAttribute(name,expected,propertyInfo,!1)?value2:value2===""+expected?expected:value2}}else if(node.hasAttribute(attributeName)){if(shouldRemoveAttribute(name,expected,propertyInfo,!1))return node.getAttribute(attributeName);if(propertyInfo.type===BOOLEAN)return expected;stringValue=node.getAttribute(attributeName)}return shouldRemoveAttribute(name,expected,propertyInfo,!1)?stringValue===null?expected:stringValue:stringValue===""+expected?expected:stringValue}}function getValueForAttribute(node,name,expected,isCustomComponentTag){{if(!isAttributeNameSafe(name))return;if(!node.hasAttribute(name))return expected===void 0?void 0:null;var value2=node.getAttribute(name);return checkAttributeStringCoercion(expected,name),value2===""+expected?expected:value2}}function setValueForProperty(node,name,value2,isCustomComponentTag){var propertyInfo=getPropertyInfo(name);if(!shouldIgnoreAttribute(name,propertyInfo,isCustomComponentTag)){if(shouldRemoveAttribute(name,value2,propertyInfo,isCustomComponentTag)&&(value2=null),isCustomComponentTag||propertyInfo===null){if(isAttributeNameSafe(name)){var _attributeName=name;value2===null?node.removeAttribute(_attributeName):(checkAttributeStringCoercion(value2,name),node.setAttribute(_attributeName,""+value2))}return}var mustUseProperty=propertyInfo.mustUseProperty;if(mustUseProperty){var propertyName=propertyInfo.propertyName;if(value2===null){var type=propertyInfo.type;node[propertyName]=type===BOOLEAN?!1:""}else node[propertyName]=value2;return}var attributeName=propertyInfo.attributeName,attributeNamespace=propertyInfo.attributeNamespace;if(value2===null)node.removeAttribute(attributeName);else{var _type=propertyInfo.type,attributeValue;_type===BOOLEAN||_type===OVERLOADED_BOOLEAN&&value2===!0?attributeValue="":(checkAttributeStringCoercion(value2,attributeName),attributeValue=""+value2,propertyInfo.sanitizeURL&&sanitizeURL(attributeValue.toString())),attributeNamespace?node.setAttributeNS(attributeNamespace,attributeName,attributeValue):node.setAttribute(attributeName,attributeValue)}}}var REACT_ELEMENT_TYPE=Symbol.for("react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_SCOPE_TYPE=Symbol.for("react.scope"),REACT_DEBUG_TRACING_MODE_TYPE=Symbol.for("react.debug_trace_mode"),REACT_OFFSCREEN_TYPE=Symbol.for("react.offscreen"),REACT_LEGACY_HIDDEN_TYPE=Symbol.for("react.legacy_hidden"),REACT_CACHE_TYPE=Symbol.for("react.cache"),REACT_TRACING_MARKER_TYPE=Symbol.for("react.tracing_marker"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!="object")return null;var maybeIterator=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL];return typeof maybeIterator=="function"?maybeIterator:null}var assign=Object.assign,disabledDepth=0,prevLog,prevInfo,prevWarn,prevError,prevGroup,prevGroupCollapsed,prevGroupEnd;function disabledLog(){}disabledLog.__reactDisabledLog=!0;function disableLogs(){{if(disabledDepth===0){prevLog=console.log,prevInfo=console.info,prevWarn=console.warn,prevError=console.error,prevGroup=console.group,prevGroupCollapsed=console.groupCollapsed,prevGroupEnd=console.groupEnd;var props={configurable:!0,enumerable:!0,value:disabledLog,writable:!0};Object.defineProperties(console,{info:props,log:props,warn:props,error:props,group:props,groupCollapsed:props,groupEnd:props})}disabledDepth++}}function reenableLogs(){{if(disabledDepth--,disabledDepth===0){var props={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:assign({},props,{value:prevLog}),info:assign({},props,{value:prevInfo}),warn:assign({},props,{value:prevWarn}),error:assign({},props,{value:prevError}),group:assign({},props,{value:prevGroup}),groupCollapsed:assign({},props,{value:prevGroupCollapsed}),groupEnd:assign({},props,{value:prevGroupEnd})})}disabledDepth<0&&error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ReactCurrentDispatcher=ReactSharedInternals.ReactCurrentDispatcher,prefix;function describeBuiltInComponentFrame(name,source,ownerFn){{if(prefix===void 0)try{throw Error()}catch(x2){var match=x2.stack.trim().match(/\n( *(at )?)/);prefix=match&&match[1]||""}return` `+prefix+name}}var reentry=!1,componentFrameCache;{var PossiblyWeakMap=typeof WeakMap=="function"?WeakMap:Map;componentFrameCache=new PossiblyWeakMap}function describeNativeComponentFrame(fn,construct){if(!fn||reentry)return"";{var frame=componentFrameCache.get(fn);if(frame!==void 0)return frame}var control;reentry=!0;var previousPrepareStackTrace=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var previousDispatcher;previousDispatcher=ReactCurrentDispatcher.current,ReactCurrentDispatcher.current=null,disableLogs();try{if(construct){var Fake=function(){throw Error()};if(Object.defineProperty(Fake.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Fake,[])}catch(x2){control=x2}Reflect.construct(fn,[],Fake)}else{try{Fake.call()}catch(x2){control=x2}fn.call(Fake.prototype)}}else{try{throw Error()}catch(x2){control=x2}fn()}}catch(sample){if(sample&&control&&typeof sample.stack=="string"){for(var sampleLines=sample.stack.split(` `),controlLines=control.stack.split(` `),s2=sampleLines.length-1,c2=controlLines.length-1;s2>=1&&c2>=0&&sampleLines[s2]!==controlLines[c2];)c2--;for(;s2>=1&&c2>=0;s2--,c2--)if(sampleLines[s2]!==controlLines[c2]){if(s2!==1||c2!==1)do if(s2--,c2--,c2<0||sampleLines[s2]!==controlLines[c2]){var _frame=` @@ -142,7 +142,7 @@ Check the render method of %s.`,getComponentNameFromFiber(current)||"Unknown")); let root = createRoot(domContainer); root.render();`),options2.unstable_strictMode===!0&&(isStrictMode=!0),options2.identifierPrefix!==void 0&&(identifierPrefix=options2.identifierPrefix),options2.onRecoverableError!==void 0&&(onRecoverableError=options2.onRecoverableError),options2.transitionCallbacks!==void 0&&(transitionCallbacks=options2.transitionCallbacks));var root2=createContainer(container,ConcurrentRoot,null,isStrictMode,concurrentUpdatesByDefaultOverride,identifierPrefix,onRecoverableError);markContainerAsRoot(root2.current,container);var rootContainerElement=container.nodeType===COMMENT_NODE?container.parentNode:container;return listenToAllSupportedEvents(rootContainerElement),new ReactDOMRoot(root2)}function ReactDOMHydrationRoot(internalRoot){this._internalRoot=internalRoot}function scheduleHydration(target){target&&queueExplicitHydrationTarget(target)}ReactDOMHydrationRoot.prototype.unstable_scheduleHydration=scheduleHydration;function hydrateRoot(container,initialChildren,options2){if(!isValidContainer(container))throw new Error("hydrateRoot(...): Target container is not a DOM element.");warnIfReactDOMContainerInDEV(container),initialChildren===void 0&&error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, )");var hydrationCallbacks=options2??null,mutableSources=options2!=null&&options2.hydratedSources||null,isStrictMode=!1,concurrentUpdatesByDefaultOverride=!1,identifierPrefix="",onRecoverableError=defaultOnRecoverableError;options2!=null&&(options2.unstable_strictMode===!0&&(isStrictMode=!0),options2.identifierPrefix!==void 0&&(identifierPrefix=options2.identifierPrefix),options2.onRecoverableError!==void 0&&(onRecoverableError=options2.onRecoverableError));var root2=createHydrationContainer(initialChildren,null,container,ConcurrentRoot,hydrationCallbacks,isStrictMode,concurrentUpdatesByDefaultOverride,identifierPrefix,onRecoverableError);if(markContainerAsRoot(root2.current,container),listenToAllSupportedEvents(container),mutableSources)for(var i2=0;i22&&arguments[2]!==void 0?arguments[2]:null;if(!isValidContainer(container))throw new Error("Target container is not a DOM element.");return createPortal(children,container,null,key)}function renderSubtreeIntoContainer(parentComponent,element,containerNode,callback){return unstable_renderSubtreeIntoContainer(parentComponent,element,containerNode,callback)}var Internals={usingClientEntryPoint:!1,Events:[getInstanceFromNode,getNodeFromInstance,getFiberCurrentPropsFromNode,enqueueStateRestore,restoreStateIfNeeded,batchedUpdates$1]};function createRoot$1(container,options2){return Internals.usingClientEntryPoint||error('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),createRoot(container,options2)}function hydrateRoot$1(container,initialChildren,options2){return Internals.usingClientEntryPoint||error('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".'),hydrateRoot(container,initialChildren,options2)}function flushSync$1(fn){return isAlreadyRendering()&&error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task."),flushSync(fn)}var foundDevTools=injectIntoDevTools({findFiberByHostInstance:getClosestInstanceFromNode,bundleType:1,version:ReactVersion,rendererPackageName:"react-dom"});if(!foundDevTools&&canUseDOM&&window.top===window.self&&(navigator.userAgent.indexOf("Chrome")>-1&&navigator.userAgent.indexOf("Edge")===-1||navigator.userAgent.indexOf("Firefox")>-1)){var protocol4=window.location.protocol;/^(https?|file):$/.test(protocol4)&&console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools"+(protocol4==="file:"?` -You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Internals,exports.createPortal=createPortal$1,exports.createRoot=createRoot$1,exports.findDOMNode=findDOMNode,exports.flushSync=flushSync$1,exports.hydrate=hydrate,exports.hydrateRoot=hydrateRoot$1,exports.render=render,exports.unmountComponentAtNode=unmountComponentAtNode,exports.unstable_batchedUpdates=batchedUpdates$1,exports.unstable_renderSubtreeIntoContainer=renderSubtreeIntoContainer,exports.version=ReactVersion,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()}});var require_react_dom=__commonJS({"node_modules/react-dom/index.js"(exports,module2){"use strict";module2.exports=require_react_dom_development()}});var require_client=__commonJS({"node_modules/react-dom/client.js"(exports){"use strict";var m=require_react_dom();i2=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,exports.createRoot=function(c2,o2){i2.usingClientEntryPoint=!0;try{return m.createRoot(c2,o2)}finally{i2.usingClientEntryPoint=!1}},exports.hydrateRoot=function(c2,h2,o2){i2.usingClientEntryPoint=!0;try{return m.hydrateRoot(c2,h2,o2)}finally{i2.usingClientEntryPoint=!1}};var i2}});var require_react_jsx_runtime_development=__commonJS({"node_modules/react/cjs/react-jsx-runtime.development.js"(exports){"use strict";(function(){"use strict";var React2=require_react(),REACT_ELEMENT_TYPE=Symbol.for("react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_OFFSCREEN_TYPE=Symbol.for("react.offscreen"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!="object")return null;var maybeIterator=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL];return typeof maybeIterator=="function"?maybeIterator:null}var ReactSharedInternals=React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function error(format){{for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];printWarning("error",format,args)}}function printWarning(level,format,args){{var ReactDebugCurrentFrame2=ReactSharedInternals.ReactDebugCurrentFrame,stack=ReactDebugCurrentFrame2.getStackAddendum();stack!==""&&(format+="%s",args=args.concat([stack]));var argsWithFormat=args.map(function(item){return String(item)});argsWithFormat.unshift("Warning: "+format),Function.prototype.apply.call(console[level],console,argsWithFormat)}}var enableScopeAPI=!1,enableCacheElement=!1,enableTransitionTracing=!1,enableLegacyHidden=!1,enableDebugTracing=!1,REACT_MODULE_REFERENCE;REACT_MODULE_REFERENCE=Symbol.for("react.module.reference");function isValidElementType(type){return!!(typeof type=="string"||typeof type=="function"||type===REACT_FRAGMENT_TYPE||type===REACT_PROFILER_TYPE||enableDebugTracing||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||enableLegacyHidden||type===REACT_OFFSCREEN_TYPE||enableScopeAPI||enableCacheElement||enableTransitionTracing||typeof type=="object"&&type!==null&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_MODULE_REFERENCE||type.getModuleId!==void 0))}function getWrappedName(outerType,innerType,wrapperName){var displayName=outerType.displayName;if(displayName)return displayName;var functionName=innerType.displayName||innerType.name||"";return functionName!==""?wrapperName+"("+functionName+")":wrapperName}function getContextName(type){return type.displayName||"Context"}function getComponentNameFromType(type){if(type==null)return null;if(typeof type.tag=="number"&&error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof type=="function")return type.displayName||type.name||null;if(typeof type=="string")return type;switch(type){case REACT_FRAGMENT_TYPE:return"Fragment";case REACT_PORTAL_TYPE:return"Portal";case REACT_PROFILER_TYPE:return"Profiler";case REACT_STRICT_MODE_TYPE:return"StrictMode";case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList"}if(typeof type=="object")switch(type.$$typeof){case REACT_CONTEXT_TYPE:var context=type;return getContextName(context)+".Consumer";case REACT_PROVIDER_TYPE:var provider=type;return getContextName(provider._context)+".Provider";case REACT_FORWARD_REF_TYPE:return getWrappedName(type,type.render,"ForwardRef");case REACT_MEMO_TYPE:var outerName=type.displayName||null;return outerName!==null?outerName:getComponentNameFromType(type.type)||"Memo";case REACT_LAZY_TYPE:{var lazyComponent=type,payload=lazyComponent._payload,init2=lazyComponent._init;try{return getComponentNameFromType(init2(payload))}catch{return null}}}return null}var assign=Object.assign,disabledDepth=0,prevLog,prevInfo,prevWarn,prevError,prevGroup,prevGroupCollapsed,prevGroupEnd;function disabledLog(){}disabledLog.__reactDisabledLog=!0;function disableLogs(){{if(disabledDepth===0){prevLog=console.log,prevInfo=console.info,prevWarn=console.warn,prevError=console.error,prevGroup=console.group,prevGroupCollapsed=console.groupCollapsed,prevGroupEnd=console.groupEnd;var props={configurable:!0,enumerable:!0,value:disabledLog,writable:!0};Object.defineProperties(console,{info:props,log:props,warn:props,error:props,group:props,groupCollapsed:props,groupEnd:props})}disabledDepth++}}function reenableLogs(){{if(disabledDepth--,disabledDepth===0){var props={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:assign({},props,{value:prevLog}),info:assign({},props,{value:prevInfo}),warn:assign({},props,{value:prevWarn}),error:assign({},props,{value:prevError}),group:assign({},props,{value:prevGroup}),groupCollapsed:assign({},props,{value:prevGroupCollapsed}),groupEnd:assign({},props,{value:prevGroupEnd})})}disabledDepth<0&&error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ReactCurrentDispatcher=ReactSharedInternals.ReactCurrentDispatcher,prefix;function describeBuiltInComponentFrame(name,source,ownerFn){{if(prefix===void 0)try{throw Error()}catch(x2){var match=x2.stack.trim().match(/\n( *(at )?)/);prefix=match&&match[1]||""}return` +You might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq`:""),"font-weight:bold")}exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Internals,exports.createPortal=createPortal$1,exports.createRoot=createRoot$1,exports.findDOMNode=findDOMNode,exports.flushSync=flushSync$1,exports.hydrate=hydrate,exports.hydrateRoot=hydrateRoot$1,exports.render=render,exports.unmountComponentAtNode=unmountComponentAtNode,exports.unstable_batchedUpdates=batchedUpdates$1,exports.unstable_renderSubtreeIntoContainer=renderSubtreeIntoContainer,exports.version=ReactVersion,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)})()}});var require_react_dom=__commonJS({"../../../data/workspace/pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/index.js"(exports,module2){"use strict";module2.exports=require_react_dom_development()}});var require_client=__commonJS({"../../../data/workspace/pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js"(exports){"use strict";var m=require_react_dom();i2=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,exports.createRoot=function(c2,o2){i2.usingClientEntryPoint=!0;try{return m.createRoot(c2,o2)}finally{i2.usingClientEntryPoint=!1}},exports.hydrateRoot=function(c2,h2,o2){i2.usingClientEntryPoint=!0;try{return m.hydrateRoot(c2,h2,o2)}finally{i2.usingClientEntryPoint=!1}};var i2}});var require_react_jsx_runtime_development=__commonJS({"../../../data/workspace/pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js"(exports){"use strict";(function(){"use strict";var React2=require_react(),REACT_ELEMENT_TYPE=Symbol.for("react.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_OFFSCREEN_TYPE=Symbol.for("react.offscreen"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator,FAUX_ITERATOR_SYMBOL="@@iterator";function getIteratorFn(maybeIterable){if(maybeIterable===null||typeof maybeIterable!="object")return null;var maybeIterator=MAYBE_ITERATOR_SYMBOL&&maybeIterable[MAYBE_ITERATOR_SYMBOL]||maybeIterable[FAUX_ITERATOR_SYMBOL];return typeof maybeIterator=="function"?maybeIterator:null}var ReactSharedInternals=React2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function error(format){{for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++)args[_key2-1]=arguments[_key2];printWarning("error",format,args)}}function printWarning(level,format,args){{var ReactDebugCurrentFrame2=ReactSharedInternals.ReactDebugCurrentFrame,stack=ReactDebugCurrentFrame2.getStackAddendum();stack!==""&&(format+="%s",args=args.concat([stack]));var argsWithFormat=args.map(function(item){return String(item)});argsWithFormat.unshift("Warning: "+format),Function.prototype.apply.call(console[level],console,argsWithFormat)}}var enableScopeAPI=!1,enableCacheElement=!1,enableTransitionTracing=!1,enableLegacyHidden=!1,enableDebugTracing=!1,REACT_MODULE_REFERENCE;REACT_MODULE_REFERENCE=Symbol.for("react.module.reference");function isValidElementType(type){return!!(typeof type=="string"||typeof type=="function"||type===REACT_FRAGMENT_TYPE||type===REACT_PROFILER_TYPE||enableDebugTracing||type===REACT_STRICT_MODE_TYPE||type===REACT_SUSPENSE_TYPE||type===REACT_SUSPENSE_LIST_TYPE||enableLegacyHidden||type===REACT_OFFSCREEN_TYPE||enableScopeAPI||enableCacheElement||enableTransitionTracing||typeof type=="object"&&type!==null&&(type.$$typeof===REACT_LAZY_TYPE||type.$$typeof===REACT_MEMO_TYPE||type.$$typeof===REACT_PROVIDER_TYPE||type.$$typeof===REACT_CONTEXT_TYPE||type.$$typeof===REACT_FORWARD_REF_TYPE||type.$$typeof===REACT_MODULE_REFERENCE||type.getModuleId!==void 0))}function getWrappedName(outerType,innerType,wrapperName){var displayName=outerType.displayName;if(displayName)return displayName;var functionName=innerType.displayName||innerType.name||"";return functionName!==""?wrapperName+"("+functionName+")":wrapperName}function getContextName(type){return type.displayName||"Context"}function getComponentNameFromType(type){if(type==null)return null;if(typeof type.tag=="number"&&error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof type=="function")return type.displayName||type.name||null;if(typeof type=="string")return type;switch(type){case REACT_FRAGMENT_TYPE:return"Fragment";case REACT_PORTAL_TYPE:return"Portal";case REACT_PROFILER_TYPE:return"Profiler";case REACT_STRICT_MODE_TYPE:return"StrictMode";case REACT_SUSPENSE_TYPE:return"Suspense";case REACT_SUSPENSE_LIST_TYPE:return"SuspenseList"}if(typeof type=="object")switch(type.$$typeof){case REACT_CONTEXT_TYPE:var context=type;return getContextName(context)+".Consumer";case REACT_PROVIDER_TYPE:var provider=type;return getContextName(provider._context)+".Provider";case REACT_FORWARD_REF_TYPE:return getWrappedName(type,type.render,"ForwardRef");case REACT_MEMO_TYPE:var outerName=type.displayName||null;return outerName!==null?outerName:getComponentNameFromType(type.type)||"Memo";case REACT_LAZY_TYPE:{var lazyComponent=type,payload=lazyComponent._payload,init2=lazyComponent._init;try{return getComponentNameFromType(init2(payload))}catch{return null}}}return null}var assign=Object.assign,disabledDepth=0,prevLog,prevInfo,prevWarn,prevError,prevGroup,prevGroupCollapsed,prevGroupEnd;function disabledLog(){}disabledLog.__reactDisabledLog=!0;function disableLogs(){{if(disabledDepth===0){prevLog=console.log,prevInfo=console.info,prevWarn=console.warn,prevError=console.error,prevGroup=console.group,prevGroupCollapsed=console.groupCollapsed,prevGroupEnd=console.groupEnd;var props={configurable:!0,enumerable:!0,value:disabledLog,writable:!0};Object.defineProperties(console,{info:props,log:props,warn:props,error:props,group:props,groupCollapsed:props,groupEnd:props})}disabledDepth++}}function reenableLogs(){{if(disabledDepth--,disabledDepth===0){var props={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:assign({},props,{value:prevLog}),info:assign({},props,{value:prevInfo}),warn:assign({},props,{value:prevWarn}),error:assign({},props,{value:prevError}),group:assign({},props,{value:prevGroup}),groupCollapsed:assign({},props,{value:prevGroupCollapsed}),groupEnd:assign({},props,{value:prevGroupEnd})})}disabledDepth<0&&error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ReactCurrentDispatcher=ReactSharedInternals.ReactCurrentDispatcher,prefix;function describeBuiltInComponentFrame(name,source,ownerFn){{if(prefix===void 0)try{throw Error()}catch(x2){var match=x2.stack.trim().match(/\n( *(at )?)/);prefix=match&&match[1]||""}return` `+prefix+name}}var reentry=!1,componentFrameCache;{var PossiblyWeakMap=typeof WeakMap=="function"?WeakMap:Map;componentFrameCache=new PossiblyWeakMap}function describeNativeComponentFrame(fn,construct){if(!fn||reentry)return"";{var frame=componentFrameCache.get(fn);if(frame!==void 0)return frame}var control;reentry=!0;var previousPrepareStackTrace=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var previousDispatcher;previousDispatcher=ReactCurrentDispatcher.current,ReactCurrentDispatcher.current=null,disableLogs();try{if(construct){var Fake=function(){throw Error()};if(Object.defineProperty(Fake.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Fake,[])}catch(x2){control=x2}Reflect.construct(fn,[],Fake)}else{try{Fake.call()}catch(x2){control=x2}fn.call(Fake.prototype)}}else{try{throw Error()}catch(x2){control=x2}fn()}}catch(sample){if(sample&&control&&typeof sample.stack=="string"){for(var sampleLines=sample.stack.split(` `),controlLines=control.stack.split(` `),s2=sampleLines.length-1,c2=controlLines.length-1;s2>=1&&c2>=0&&sampleLines[s2]!==controlLines[c2];)c2--;for(;s2>=1&&c2>=0;s2--,c2--)if(sampleLines[s2]!==controlLines[c2]){if(s2!==1||c2!==1)do if(s2--,c2--,c2<0||sampleLines[s2]!==controlLines[c2]){var _frame=` @@ -157,7 +157,7 @@ Check the top-level render call using <`+parentName+">.")}return info}}function <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; - <%s key={someKey} {...props} />`,beforeExample,componentName,afterExample,componentName),didWarnAboutKeySpread[componentName+beforeExample]=!0}}return type===REACT_FRAGMENT_TYPE?validateFragmentProps(element):validatePropTypes(element),element}}function jsxWithValidationStatic(type,props,key){return jsxWithValidation(type,props,key,!0)}function jsxWithValidationDynamic(type,props,key){return jsxWithValidation(type,props,key,!1)}var jsx=jsxWithValidationDynamic,jsxs=jsxWithValidationStatic;exports.Fragment=REACT_FRAGMENT_TYPE,exports.jsx=jsx,exports.jsxs=jsxs})()}});var require_jsx_runtime=__commonJS({"node_modules/react/jsx-runtime.js"(exports,module2){"use strict";module2.exports=require_react_jsx_runtime_development()}});var require_base64_js=__commonJS({"node_modules/base64-js/index.js"(exports){"use strict";exports.byteLength=byteLength3;exports.toByteArray=toByteArray2;exports.fromByteArray=fromByteArray2;var lookup4=[],revLookup2=[],Arr2=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i2=0,len=code.length;i20)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");validLen===-1&&(validLen=len2);var placeHoldersLen=validLen===len2?0:4-validLen%4;return[validLen,placeHoldersLen]}function byteLength3(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1];return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function _byteLength(b64,validLen,placeHoldersLen){return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function toByteArray2(b64){var tmp,lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1],arr=new Arr2(_byteLength(b64,validLen,placeHoldersLen)),curByte=0,len2=placeHoldersLen>0?validLen-4:validLen,i3;for(i3=0;i3>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=tmp&255;return placeHoldersLen===2&&(tmp=revLookup2[b64.charCodeAt(i3)]<<2|revLookup2[b64.charCodeAt(i3+1)]>>4,arr[curByte++]=tmp&255),placeHoldersLen===1&&(tmp=revLookup2[b64.charCodeAt(i3)]<<10|revLookup2[b64.charCodeAt(i3+1)]<<4|revLookup2[b64.charCodeAt(i3+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=tmp&255),arr}function tripletToBase642(num){return lookup4[num>>18&63]+lookup4[num>>12&63]+lookup4[num>>6&63]+lookup4[num&63]}function encodeChunk2(uint8,start,end){for(var tmp,output=[],i3=start;i3len22?len22:i3+maxChunkLength));return extraBytes===1?(tmp=uint8[len2-1],parts2.push(lookup4[tmp>>2]+lookup4[tmp<<4&63]+"==")):extraBytes===2&&(tmp=(uint8[len2-2]<<8)+uint8[len2-1],parts2.push(lookup4[tmp>>10]+lookup4[tmp>>4&63]+lookup4[tmp<<2&63]+"=")),parts2.join("")}}});var require_ieee754=__commonJS({"node_modules/ieee754/index.js"(exports){"use strict";exports.read=function(buffer,offset,isLE,mLen,nBytes){var e4,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i2=isLE?nBytes-1:0,d=isLE?-1:1,s2=buffer[offset+i2];for(i2+=d,e4=s2&(1<<-nBits)-1,s2>>=-nBits,nBits+=eLen;nBits>0;e4=e4*256+buffer[offset+i2],i2+=d,nBits-=8);for(m=e4&(1<<-nBits)-1,e4>>=-nBits,nBits+=mLen;nBits>0;m=m*256+buffer[offset+i2],i2+=d,nBits-=8);if(e4===0)e4=1-eBias;else{if(e4===eMax)return m?NaN:(s2?-1:1)*(1/0);m=m+Math.pow(2,mLen),e4=e4-eBias}return(s2?-1:1)*m*Math.pow(2,e4-mLen)};exports.write=function(buffer,value2,offset,isLE,mLen,nBytes){var e4,m,c2,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i2=isLE?0:nBytes-1,d=isLE?1:-1,s2=value2<0||value2===0&&1/value2<0?1:0;for(value2=Math.abs(value2),isNaN(value2)||value2===1/0?(m=isNaN(value2)?1:0,e4=eMax):(e4=Math.floor(Math.log(value2)/Math.LN2),value2*(c2=Math.pow(2,-e4))<1&&(e4--,c2*=2),e4+eBias>=1?value2+=rt/c2:value2+=rt*Math.pow(2,1-eBias),value2*c2>=2&&(e4++,c2/=2),e4+eBias>=eMax?(m=0,e4=eMax):e4+eBias>=1?(m=(value2*c2-1)*Math.pow(2,mLen),e4=e4+eBias):(m=value2*Math.pow(2,eBias-1)*Math.pow(2,mLen),e4=0));mLen>=8;buffer[offset+i2]=m&255,i2+=d,m/=256,mLen-=8);for(e4=e4<0;buffer[offset+i2]=e4&255,i2+=d,e4/=256,eLen-=8);buffer[offset+i2-d]|=s2*128}}});var require_buffer=__commonJS({"node_modules/buffer/index.js"(exports){"use strict";var base64=require_base64_js(),ieee7542=require_ieee754(),customInspectSymbol=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;exports.Buffer=Buffer4;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;exports.kMaxLength=K_MAX_LENGTH;Buffer4.TYPED_ARRAY_SUPPORT=typedArraySupport();!Buffer4.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function typedArraySupport(){try{let arr=new Uint8Array(1),proto={foo:function(){return 42}};return Object.setPrototypeOf(proto,Uint8Array.prototype),Object.setPrototypeOf(arr,proto),arr.foo()===42}catch{return!1}}Object.defineProperty(Buffer4.prototype,"parent",{enumerable:!0,get:function(){if(Buffer4.isBuffer(this))return this.buffer}});Object.defineProperty(Buffer4.prototype,"offset",{enumerable:!0,get:function(){if(Buffer4.isBuffer(this))return this.byteOffset}});function createBuffer2(length){if(length>K_MAX_LENGTH)throw new RangeError('The value "'+length+'" is invalid for option "size"');let buf=new Uint8Array(length);return Object.setPrototypeOf(buf,Buffer4.prototype),buf}function Buffer4(arg,encodingOrOffset,length){if(typeof arg=="number"){if(typeof encodingOrOffset=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe2(arg)}return from2(arg,encodingOrOffset,length)}Buffer4.poolSize=8192;function from2(value2,encodingOrOffset,length){if(typeof value2=="string")return fromString2(value2,encodingOrOffset);if(ArrayBuffer.isView(value2))return fromArrayView(value2);if(value2==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value2);if(isInstance(value2,ArrayBuffer)||value2&&isInstance(value2.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(isInstance(value2,SharedArrayBuffer)||value2&&isInstance(value2.buffer,SharedArrayBuffer)))return fromArrayBuffer2(value2,encodingOrOffset,length);if(typeof value2=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let valueOf=value2.valueOf&&value2.valueOf();if(valueOf!=null&&valueOf!==value2)return Buffer4.from(valueOf,encodingOrOffset,length);let b2=fromObject2(value2);if(b2)return b2;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof value2[Symbol.toPrimitive]=="function")return Buffer4.from(value2[Symbol.toPrimitive]("string"),encodingOrOffset,length);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value2)}Buffer4.from=function(value2,encodingOrOffset,length){return from2(value2,encodingOrOffset,length)};Object.setPrototypeOf(Buffer4.prototype,Uint8Array.prototype);Object.setPrototypeOf(Buffer4,Uint8Array);function assertSize2(size){if(typeof size!="number")throw new TypeError('"size" argument must be of type number');if(size<0)throw new RangeError('The value "'+size+'" is invalid for option "size"')}function alloc2(size,fill,encoding){return assertSize2(size),size<=0?createBuffer2(size):fill!==void 0?typeof encoding=="string"?createBuffer2(size).fill(fill,encoding):createBuffer2(size).fill(fill):createBuffer2(size)}Buffer4.alloc=function(size,fill,encoding){return alloc2(size,fill,encoding)};function allocUnsafe2(size){return assertSize2(size),createBuffer2(size<0?0:checked2(size)|0)}Buffer4.allocUnsafe=function(size){return allocUnsafe2(size)};Buffer4.allocUnsafeSlow=function(size){return allocUnsafe2(size)};function fromString2(string,encoding){if((typeof encoding!="string"||encoding==="")&&(encoding="utf8"),!Buffer4.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);let length=byteLength3(string,encoding)|0,buf=createBuffer2(length),actual=buf.write(string,encoding);return actual!==length&&(buf=buf.slice(0,actual)),buf}function fromArrayLike2(array){let length=array.length<0?0:checked2(array.length)|0,buf=createBuffer2(length);for(let i2=0;i2=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return length|0}function SlowBuffer(length){return+length!=length&&(length=0),Buffer4.alloc(+length)}Buffer4.isBuffer=function(b2){return b2!=null&&b2._isBuffer===!0&&b2!==Buffer4.prototype};Buffer4.compare=function(a2,b2){if(isInstance(a2,Uint8Array)&&(a2=Buffer4.from(a2,a2.offset,a2.byteLength)),isInstance(b2,Uint8Array)&&(b2=Buffer4.from(b2,b2.offset,b2.byteLength)),!Buffer4.isBuffer(a2)||!Buffer4.isBuffer(b2))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a2===b2)return 0;let x2=a2.length,y2=b2.length;for(let i2=0,len=Math.min(x2,y2);i2buffer.length?(Buffer4.isBuffer(buf)||(buf=Buffer4.from(buf)),buf.copy(buffer,pos)):Uint8Array.prototype.set.call(buffer,buf,pos);else if(Buffer4.isBuffer(buf))buf.copy(buffer,pos);else throw new TypeError('"list" argument must be an Array of Buffers');pos+=buf.length}return buffer};function byteLength3(string,encoding){if(Buffer4.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if(typeof string!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);let len=string.length,mustMatch=arguments.length>2&&arguments[2]===!0;if(!mustMatch&&len===0)return 0;let loweredCase=!1;for(;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes2(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes2(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes2(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}Buffer4.byteLength=byteLength3;function slowToString2(encoding,start,end){let loweredCase=!1;if((start===void 0||start<0)&&(start=0),start>this.length||((end===void 0||end>this.length)&&(end=this.length),end<=0)||(end>>>=0,start>>>=0,end<=start))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice2(this,start,end);case"utf8":case"utf-8":return utf8Slice2(this,start,end);case"ascii":return asciiSlice2(this,start,end);case"latin1":case"binary":return latin1Slice2(this,start,end);case"base64":return base64Slice2(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice2(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}Buffer4.prototype._isBuffer=!0;function swap2(b2,n2,m){let i2=b2[n2];b2[n2]=b2[m],b2[m]=i2}Buffer4.prototype.swap16=function(){let len=this.length;if(len%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i2=0;i2max&&(str+=" ... "),""};customInspectSymbol&&(Buffer4.prototype[customInspectSymbol]=Buffer4.prototype.inspect);Buffer4.prototype.compare=function(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer4.from(target,target.offset,target.byteLength)),!Buffer4.isBuffer(target))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(start===void 0&&(start=0),end===void 0&&(end=target?target.length:0),thisStart===void 0&&(thisStart=0),thisEnd===void 0&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;let x2=thisEnd-thisStart,y2=end-start,len=Math.min(x2,y2),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end);for(let i2=0;i22147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset=+byteOffset,numberIsNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0)if(dir)byteOffset=0;else return-1;if(typeof val=="string"&&(val=Buffer4.from(val,encoding)),Buffer4.isBuffer(val))return val.length===0?-1:arrayIndexOf2(buffer,val,byteOffset,encoding,dir);if(typeof val=="number")return val=val&255,typeof Uint8Array.prototype.indexOf=="function"?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf2(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf2(arr,val,byteOffset,encoding,dir){let indexSize=1,arrLength=arr.length,valLength=val.length;if(encoding!==void 0&&(encoding=String(encoding).toLowerCase(),encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le")){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read2(buf,i3){return indexSize===1?buf[i3]:buf.readUInt16BE(i3*indexSize)}let i2;if(dir){let foundIndex=-1;for(i2=byteOffset;i2arrLength&&(byteOffset=arrLength-valLength),i2=byteOffset;i2>=0;i2--){let found=!0;for(let j=0;jremaining&&(length=remaining)):length=remaining;let strLen=string.length;length>strLen/2&&(length=strLen/2);let i2;for(i2=0;i2>>0,isFinite(length)?(length=length>>>0,encoding===void 0&&(encoding="utf8")):(encoding=length,length=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let remaining=this.length-offset;if((length===void 0||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");let loweredCase=!1;for(;;)switch(encoding){case"hex":return hexWrite2(this,string,offset,length);case"utf8":case"utf-8":return utf8Write2(this,string,offset,length);case"ascii":case"latin1":case"binary":return asciiWrite2(this,string,offset,length);case"base64":return base64Write2(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write2(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}};Buffer4.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice2(buf,start,end){return start===0&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice2(buf,start,end){end=Math.min(buf.length,end);let res=[],i2=start;for(;i2239?4:firstByte>223?3:firstByte>191?2:1;if(i2+bytesPerSequence<=end){let secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:secondByte=buf[i2+1],(secondByte&192)===128&&(tempCodePoint=(firstByte&31)<<6|secondByte&63,tempCodePoint>127&&(codePoint=tempCodePoint));break;case 3:secondByte=buf[i2+1],thirdByte=buf[i2+2],(secondByte&192)===128&&(thirdByte&192)===128&&(tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63,tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint));break;case 4:secondByte=buf[i2+1],thirdByte=buf[i2+2],fourthByte=buf[i2+3],(secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128&&(tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63,tempCodePoint>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint))}}codePoint===null?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|codePoint&1023),res.push(codePoint),i2+=bytesPerSequence}return decodeCodePointsArray2(res)}var MAX_ARGUMENTS_LENGTH2=4096;function decodeCodePointsArray2(codePoints){let len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH2)return String.fromCharCode.apply(String,codePoints);let res="",i2=0;for(;i2len)&&(end=len);let out="";for(let i2=start;i2len&&(start=len),end<0?(end+=len,end<0&&(end=0)):end>len&&(end=len),endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer4.prototype.readUintLE=Buffer4.prototype.readUIntLE=function(offset,byteLength4,noAssert){offset=offset>>>0,byteLength4=byteLength4>>>0,noAssert||checkOffset2(offset,byteLength4,this.length);let val=this[offset],mul=1,i2=0;for(;++i2>>0,byteLength4=byteLength4>>>0,noAssert||checkOffset2(offset,byteLength4,this.length);let val=this[offset+--byteLength4],mul=1;for(;byteLength4>0&&(mul*=256);)val+=this[offset+--byteLength4]*mul;return val};Buffer4.prototype.readUint8=Buffer4.prototype.readUInt8=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,1,this.length),this[offset]};Buffer4.prototype.readUint16LE=Buffer4.prototype.readUInt16LE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,2,this.length),this[offset]|this[offset+1]<<8};Buffer4.prototype.readUint16BE=Buffer4.prototype.readUInt16BE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,2,this.length),this[offset]<<8|this[offset+1]};Buffer4.prototype.readUint32LE=Buffer4.prototype.readUInt32LE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer4.prototype.readUint32BE=Buffer4.prototype.readUInt32BE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer4.prototype.readBigUInt64LE=defineBigIntMethod(function(offset){offset=offset>>>0,validateNumber(offset,"offset");let first=this[offset],last=this[offset+7];(first===void 0||last===void 0)&&boundsError(offset,this.length-8);let lo=first+this[++offset]*2**8+this[++offset]*2**16+this[++offset]*2**24,hi=this[++offset]+this[++offset]*2**8+this[++offset]*2**16+last*2**24;return BigInt(lo)+(BigInt(hi)<>>0,validateNumber(offset,"offset");let first=this[offset],last=this[offset+7];(first===void 0||last===void 0)&&boundsError(offset,this.length-8);let hi=first*2**24+this[++offset]*2**16+this[++offset]*2**8+this[++offset],lo=this[++offset]*2**24+this[++offset]*2**16+this[++offset]*2**8+last;return(BigInt(hi)<>>0,byteLength4=byteLength4>>>0,noAssert||checkOffset2(offset,byteLength4,this.length);let val=this[offset],mul=1,i2=0;for(;++i2=mul&&(val-=Math.pow(2,8*byteLength4)),val};Buffer4.prototype.readIntBE=function(offset,byteLength4,noAssert){offset=offset>>>0,byteLength4=byteLength4>>>0,noAssert||checkOffset2(offset,byteLength4,this.length);let i2=byteLength4,mul=1,val=this[offset+--i2];for(;i2>0&&(mul*=256);)val+=this[offset+--i2]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength4)),val};Buffer4.prototype.readInt8=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,1,this.length),this[offset]&128?(255-this[offset]+1)*-1:this[offset]};Buffer4.prototype.readInt16LE=function(offset,noAssert){offset=offset>>>0,noAssert||checkOffset2(offset,2,this.length);let val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer4.prototype.readInt16BE=function(offset,noAssert){offset=offset>>>0,noAssert||checkOffset2(offset,2,this.length);let val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer4.prototype.readInt32LE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer4.prototype.readInt32BE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer4.prototype.readBigInt64LE=defineBigIntMethod(function(offset){offset=offset>>>0,validateNumber(offset,"offset");let first=this[offset],last=this[offset+7];(first===void 0||last===void 0)&&boundsError(offset,this.length-8);let val=this[offset+4]+this[offset+5]*2**8+this[offset+6]*2**16+(last<<24);return(BigInt(val)<>>0,validateNumber(offset,"offset");let first=this[offset],last=this[offset+7];(first===void 0||last===void 0)&&boundsError(offset,this.length-8);let val=(first<<24)+this[++offset]*2**16+this[++offset]*2**8+this[++offset];return(BigInt(val)<>>0,noAssert||checkOffset2(offset,4,this.length),ieee7542.read(this,offset,!0,23,4)};Buffer4.prototype.readFloatBE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),ieee7542.read(this,offset,!1,23,4)};Buffer4.prototype.readDoubleLE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,8,this.length),ieee7542.read(this,offset,!0,52,8)};Buffer4.prototype.readDoubleBE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,8,this.length),ieee7542.read(this,offset,!1,52,8)};function checkInt2(buf,value2,offset,ext,max,min){if(!Buffer4.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value2>max||value2buf.length)throw new RangeError("Index out of range")}Buffer4.prototype.writeUintLE=Buffer4.prototype.writeUIntLE=function(value2,offset,byteLength4,noAssert){if(value2=+value2,offset=offset>>>0,byteLength4=byteLength4>>>0,!noAssert){let maxBytes=Math.pow(2,8*byteLength4)-1;checkInt2(this,value2,offset,byteLength4,maxBytes,0)}let mul=1,i2=0;for(this[offset]=value2&255;++i2>>0,byteLength4=byteLength4>>>0,!noAssert){let maxBytes=Math.pow(2,8*byteLength4)-1;checkInt2(this,value2,offset,byteLength4,maxBytes,0)}let i2=byteLength4-1,mul=1;for(this[offset+i2]=value2&255;--i2>=0&&(mul*=256);)this[offset+i2]=value2/mul&255;return offset+byteLength4};Buffer4.prototype.writeUint8=Buffer4.prototype.writeUInt8=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,1,255,0),this[offset]=value2&255,offset+1};Buffer4.prototype.writeUint16LE=Buffer4.prototype.writeUInt16LE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,2,65535,0),this[offset]=value2&255,this[offset+1]=value2>>>8,offset+2};Buffer4.prototype.writeUint16BE=Buffer4.prototype.writeUInt16BE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,2,65535,0),this[offset]=value2>>>8,this[offset+1]=value2&255,offset+2};Buffer4.prototype.writeUint32LE=Buffer4.prototype.writeUInt32LE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,4,4294967295,0),this[offset+3]=value2>>>24,this[offset+2]=value2>>>16,this[offset+1]=value2>>>8,this[offset]=value2&255,offset+4};Buffer4.prototype.writeUint32BE=Buffer4.prototype.writeUInt32BE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,4,4294967295,0),this[offset]=value2>>>24,this[offset+1]=value2>>>16,this[offset+2]=value2>>>8,this[offset+3]=value2&255,offset+4};function wrtBigUInt64LE(buf,value2,offset,min,max){checkIntBI(value2,min,max,buf,offset,7);let lo=Number(value2&BigInt(4294967295));buf[offset++]=lo,lo=lo>>8,buf[offset++]=lo,lo=lo>>8,buf[offset++]=lo,lo=lo>>8,buf[offset++]=lo;let hi=Number(value2>>BigInt(32)&BigInt(4294967295));return buf[offset++]=hi,hi=hi>>8,buf[offset++]=hi,hi=hi>>8,buf[offset++]=hi,hi=hi>>8,buf[offset++]=hi,offset}function wrtBigUInt64BE(buf,value2,offset,min,max){checkIntBI(value2,min,max,buf,offset,7);let lo=Number(value2&BigInt(4294967295));buf[offset+7]=lo,lo=lo>>8,buf[offset+6]=lo,lo=lo>>8,buf[offset+5]=lo,lo=lo>>8,buf[offset+4]=lo;let hi=Number(value2>>BigInt(32)&BigInt(4294967295));return buf[offset+3]=hi,hi=hi>>8,buf[offset+2]=hi,hi=hi>>8,buf[offset+1]=hi,hi=hi>>8,buf[offset]=hi,offset+8}Buffer4.prototype.writeBigUInt64LE=defineBigIntMethod(function(value2,offset=0){return wrtBigUInt64LE(this,value2,offset,BigInt(0),BigInt("0xffffffffffffffff"))});Buffer4.prototype.writeBigUInt64BE=defineBigIntMethod(function(value2,offset=0){return wrtBigUInt64BE(this,value2,offset,BigInt(0),BigInt("0xffffffffffffffff"))});Buffer4.prototype.writeIntLE=function(value2,offset,byteLength4,noAssert){if(value2=+value2,offset=offset>>>0,!noAssert){let limit=Math.pow(2,8*byteLength4-1);checkInt2(this,value2,offset,byteLength4,limit-1,-limit)}let i2=0,mul=1,sub=0;for(this[offset]=value2&255;++i2>0)-sub&255;return offset+byteLength4};Buffer4.prototype.writeIntBE=function(value2,offset,byteLength4,noAssert){if(value2=+value2,offset=offset>>>0,!noAssert){let limit=Math.pow(2,8*byteLength4-1);checkInt2(this,value2,offset,byteLength4,limit-1,-limit)}let i2=byteLength4-1,mul=1,sub=0;for(this[offset+i2]=value2&255;--i2>=0&&(mul*=256);)value2<0&&sub===0&&this[offset+i2+1]!==0&&(sub=1),this[offset+i2]=(value2/mul>>0)-sub&255;return offset+byteLength4};Buffer4.prototype.writeInt8=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,1,127,-128),value2<0&&(value2=255+value2+1),this[offset]=value2&255,offset+1};Buffer4.prototype.writeInt16LE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,2,32767,-32768),this[offset]=value2&255,this[offset+1]=value2>>>8,offset+2};Buffer4.prototype.writeInt16BE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,2,32767,-32768),this[offset]=value2>>>8,this[offset+1]=value2&255,offset+2};Buffer4.prototype.writeInt32LE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,4,2147483647,-2147483648),this[offset]=value2&255,this[offset+1]=value2>>>8,this[offset+2]=value2>>>16,this[offset+3]=value2>>>24,offset+4};Buffer4.prototype.writeInt32BE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,4,2147483647,-2147483648),value2<0&&(value2=4294967295+value2+1),this[offset]=value2>>>24,this[offset+1]=value2>>>16,this[offset+2]=value2>>>8,this[offset+3]=value2&255,offset+4};Buffer4.prototype.writeBigInt64LE=defineBigIntMethod(function(value2,offset=0){return wrtBigUInt64LE(this,value2,offset,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Buffer4.prototype.writeBigInt64BE=defineBigIntMethod(function(value2,offset=0){return wrtBigUInt64BE(this,value2,offset,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function checkIEEE7542(buf,value2,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat2(buf,value2,offset,littleEndian,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkIEEE7542(buf,value2,offset,4,34028234663852886e22,-34028234663852886e22),ieee7542.write(buf,value2,offset,littleEndian,23,4),offset+4}Buffer4.prototype.writeFloatLE=function(value2,offset,noAssert){return writeFloat2(this,value2,offset,!0,noAssert)};Buffer4.prototype.writeFloatBE=function(value2,offset,noAssert){return writeFloat2(this,value2,offset,!1,noAssert)};function writeDouble2(buf,value2,offset,littleEndian,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkIEEE7542(buf,value2,offset,8,17976931348623157e292,-17976931348623157e292),ieee7542.write(buf,value2,offset,littleEndian,52,8),offset+8}Buffer4.prototype.writeDoubleLE=function(value2,offset,noAssert){return writeDouble2(this,value2,offset,!0,noAssert)};Buffer4.prototype.writeDoubleBE=function(value2,offset,noAssert){return writeDouble2(this,value2,offset,!1,noAssert)};Buffer4.prototype.copy=function(target,targetStart,start,end){if(!Buffer4.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start||(start=0),!end&&end!==0&&(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart>>0,end=end===void 0?this.length:end>>>0,val||(val=0);let i2;if(typeof val=="number")for(i2=start;i22**32?received=addNumericalSeparator(String(input)):typeof input=="bigint"&&(received=String(input),(input>BigInt(2)**BigInt(32)||input<-(BigInt(2)**BigInt(32)))&&(received=addNumericalSeparator(received)),received+="n"),msg+=` It must be ${range}. Received ${received}`,msg},RangeError);function addNumericalSeparator(val){let res="",i2=val.length,start=val[0]==="-"?1:0;for(;i2>=start+4;i2-=3)res=`_${val.slice(i2-3,i2)}${res}`;return`${val.slice(0,i2)}${res}`}function checkBounds(buf,offset,byteLength4){validateNumber(offset,"offset"),(buf[offset]===void 0||buf[offset+byteLength4]===void 0)&&boundsError(offset,buf.length-(byteLength4+1))}function checkIntBI(value2,min,max,buf,offset,byteLength4){if(value2>max||value23?min===0||min===BigInt(0)?range=`>= 0${n2} and < 2${n2} ** ${(byteLength4+1)*8}${n2}`:range=`>= -(2${n2} ** ${(byteLength4+1)*8-1}${n2}) and < 2 ** ${(byteLength4+1)*8-1}${n2}`:range=`>= ${min}${n2} and <= ${max}${n2}`,new errors.ERR_OUT_OF_RANGE("value",range,value2)}checkBounds(buf,offset,byteLength4)}function validateNumber(value2,name){if(typeof value2!="number")throw new errors.ERR_INVALID_ARG_TYPE(name,"number",value2)}function boundsError(value2,length,type){throw Math.floor(value2)!==value2?(validateNumber(value2,type),new errors.ERR_OUT_OF_RANGE(type||"offset","an integer",value2)):length<0?new errors.ERR_BUFFER_OUT_OF_BOUNDS:new errors.ERR_OUT_OF_RANGE(type||"offset",`>= ${type?1:0} and <= ${length}`,value2)}var INVALID_BASE64_RE2=/[^+/0-9A-Za-z-_]/g;function base64clean2(str){if(str=str.split("=")[0],str=str.trim().replace(INVALID_BASE64_RE2,""),str.length<2)return"";for(;str.length%4!==0;)str=str+"=";return str}function utf8ToBytes2(string,units){units=units||1/0;let codePoint,length=string.length,leadSurrogate=null,bytes=[];for(let i2=0;i255295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}else if(i2+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else throw new Error("Invalid code point")}return bytes}function asciiToBytes2(str){let byteArray=[];for(let i2=0;i2>8,lo=c2%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes2(str){return base64.toByteArray(base64clean2(str))}function blitBuffer2(src2,dst,offset,length){let i2;for(i2=0;i2=dst.length||i2>=src2.length);++i2)dst[i2+offset]=src2[i2];return i2}function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!==obj}var hexSliceLookupTable=function(){let alphabet2="0123456789abcdef",table=new Array(256);for(let i2=0;i2<16;++i2){let i16=i2*16;for(let j=0;j<16;++j)table[i16+j]=alphabet2[i2]+alphabet2[j]}return table}();function defineBigIntMethod(fn){return typeof BigInt>"u"?BufferBigIntNotDefined:fn}function BufferBigIntNotDefined(){throw new Error("BigInt not supported")}}});var browser_exports={};__export(browser_exports,{BlendMode:()=>BlendMode,BmpCompression:()=>BmpCompression,HorizontalAlign:()=>HorizontalAlign,Jimp:()=>Jimp,JimpMime:()=>JimpMime,PNGColorType:()=>PNGColorType,PNGFilterType:()=>PNGFilterType,ResizeStrategy:()=>ResizeStrategy,VerticalAlign:()=>VerticalAlign,colorDiff:()=>colorDiff,compareHashes:()=>compareHashes,cssColorToHex:()=>cssColorToHex,defaultFormats:()=>defaultFormats,defaultPlugins:()=>defaultPlugins,diff:()=>diff,distance:()=>distance,intToRGBA:()=>intToRGBA$1,limit255:()=>limit255,loadFont:()=>loadFont,measureText:()=>measureText,measureTextHeight:()=>measureTextHeight,rgbaToInt:()=>rgbaToInt});var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e4){return e4&&e4.__esModule&&Object.prototype.hasOwnProperty.call(e4,"default")?e4.default:e4}function getAugmentedNamespace(e4){if(e4.__esModule)return e4;var t2=e4.default;if(typeof t2=="function"){var i2=function e5(){return this instanceof e5?Reflect.construct(t2,arguments,this.constructor):t2.apply(this,arguments)};i2.prototype=t2.prototype}else i2={};return Object.defineProperty(i2,"__esModule",{value:!0}),Object.keys(e4).forEach(function(t3){var r2=Object.getOwnPropertyDescriptor(e4,t3);Object.defineProperty(i2,t3,r2.get?r2:{enumerable:!0,get:function(){return e4[t3]}})}),i2}typeof self>"u"&&typeof commonjsGlobal=="object"&&(commonjsGlobal.self=commonjsGlobal);var global$1=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,inited=!1;function init(){inited=!0;for(var e4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t2=0;t2<64;++t2)lookup[t2]=e4[t2],revLookup[e4.charCodeAt(t2)]=t2;revLookup[45]=62,revLookup[95]=63}function toByteArray(e4){var t2,i2,r2,n2,a2,o2;inited||init();var s2=e4.length;if(s2%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a2=e4[s2-2]==="="?2:e4[s2-1]==="="?1:0,o2=new Arr(3*s2/4-a2),r2=a2>0?s2-4:s2;var l2=0;for(t2=0,i2=0;t2>16&255,o2[l2++]=n2>>8&255,o2[l2++]=255&n2;return a2===2?(n2=revLookup[e4.charCodeAt(t2)]<<2|revLookup[e4.charCodeAt(t2+1)]>>4,o2[l2++]=255&n2):a2===1&&(n2=revLookup[e4.charCodeAt(t2)]<<10|revLookup[e4.charCodeAt(t2+1)]<<4|revLookup[e4.charCodeAt(t2+2)]>>2,o2[l2++]=n2>>8&255,o2[l2++]=255&n2),o2}function tripletToBase64(e4){return lookup[e4>>18&63]+lookup[e4>>12&63]+lookup[e4>>6&63]+lookup[63&e4]}function encodeChunk(e4,t2,i2){for(var r2,n2=[],a2=t2;a2l2?l2:s2+o2));return r2===1?(t2=e4[i2-1],n2+=lookup[t2>>2],n2+=lookup[t2<<4&63],n2+="=="):r2===2&&(t2=(e4[i2-2]<<8)+e4[i2-1],n2+=lookup[t2>>10],n2+=lookup[t2>>4&63],n2+=lookup[t2<<2&63],n2+="="),a2.push(n2),a2.join("")}function read(e4,t2,i2,r2,n2){var a2,o2,s2=8*n2-r2-1,l2=(1<>1,h2=-7,c2=i2?n2-1:0,f2=i2?-1:1,d=e4[t2+c2];for(c2+=f2,a2=d&(1<<-h2)-1,d>>=-h2,h2+=s2;h2>0;a2=256*a2+e4[t2+c2],c2+=f2,h2-=8);for(o2=a2&(1<<-h2)-1,a2>>=-h2,h2+=r2;h2>0;o2=256*o2+e4[t2+c2],c2+=f2,h2-=8);if(a2===0)a2=1-u2;else{if(a2===l2)return o2?NaN:1/0*(d?-1:1);o2+=Math.pow(2,r2),a2-=u2}return(d?-1:1)*o2*Math.pow(2,a2-r2)}function write(e4,t2,i2,r2,n2,a2){var o2,s2,l2,u2=8*a2-n2-1,h2=(1<>1,f2=n2===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r2?0:a2-1,p2=r2?1:-1,m=t2<0||t2===0&&1/t2<0?1:0;for(t2=Math.abs(t2),isNaN(t2)||t2===1/0?(s2=isNaN(t2)?1:0,o2=h2):(o2=Math.floor(Math.log(t2)/Math.LN2),t2*(l2=Math.pow(2,-o2))<1&&(o2--,l2*=2),(t2+=o2+c2>=1?f2/l2:f2*Math.pow(2,1-c2))*l2>=2&&(o2++,l2/=2),o2+c2>=h2?(s2=0,o2=h2):o2+c2>=1?(s2=(t2*l2-1)*Math.pow(2,n2),o2+=c2):(s2=t2*Math.pow(2,c2-1)*Math.pow(2,n2),o2=0));n2>=8;e4[i2+d]=255&s2,d+=p2,s2/=256,n2-=8);for(o2=o2<0;e4[i2+d]=255&o2,d+=p2,o2/=256,u2-=8);e4[i2+d-p2]|=128*m}var toString={}.toString,isArray=Array.isArray||function(e4){return toString.call(e4)=="[object Array]"},INSPECT_MAX_BYTES=50;function kMaxLength(){return Buffer2.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e4,t2){if(kMaxLength()=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|e4}function internalIsBuffer(e4){return!(e4==null||!e4._isBuffer)}function byteLength(e4,t2){if(internalIsBuffer(e4))return e4.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e4)||e4 instanceof ArrayBuffer))return e4.byteLength;typeof e4!="string"&&(e4=""+e4);var i2=e4.length;if(i2===0)return 0;for(var r2=!1;;)switch(t2){case"ascii":case"latin1":case"binary":return i2;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e4).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i2;case"hex":return i2>>>1;case"base64":return base64ToBytes(e4).length;default:if(r2)return utf8ToBytes(e4).length;t2=(""+t2).toLowerCase(),r2=!0}}function slowToString(e4,t2,i2){var r2=!1;if((t2===void 0||t2<0)&&(t2=0),t2>this.length||((i2===void 0||i2>this.length)&&(i2=this.length),i2<=0)||(i2>>>=0)<=(t2>>>=0))return"";for(e4||(e4="utf8");;)switch(e4){case"hex":return hexSlice(this,t2,i2);case"utf8":case"utf-8":return utf8Slice(this,t2,i2);case"ascii":return asciiSlice(this,t2,i2);case"latin1":case"binary":return latin1Slice(this,t2,i2);case"base64":return base64Slice(this,t2,i2);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t2,i2);default:if(r2)throw new TypeError("Unknown encoding: "+e4);e4=(e4+"").toLowerCase(),r2=!0}}function swap(e4,t2,i2){var r2=e4[t2];e4[t2]=e4[i2],e4[i2]=r2}function bidirectionalIndexOf(e4,t2,i2,r2,n2){if(e4.length===0)return-1;if(typeof i2=="string"?(r2=i2,i2=0):i2>2147483647?i2=2147483647:i2<-2147483648&&(i2=-2147483648),i2=+i2,isNaN(i2)&&(i2=n2?0:e4.length-1),i2<0&&(i2=e4.length+i2),i2>=e4.length){if(n2)return-1;i2=e4.length-1}else if(i2<0){if(!n2)return-1;i2=0}if(typeof t2=="string"&&(t2=Buffer2.from(t2,r2)),internalIsBuffer(t2))return t2.length===0?-1:arrayIndexOf(e4,t2,i2,r2,n2);if(typeof t2=="number")return t2&=255,Buffer2.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?n2?Uint8Array.prototype.indexOf.call(e4,t2,i2):Uint8Array.prototype.lastIndexOf.call(e4,t2,i2):arrayIndexOf(e4,[t2],i2,r2,n2);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e4,t2,i2,r2,n2){var a2,o2=1,s2=e4.length,l2=t2.length;if(r2!==void 0&&((r2=String(r2).toLowerCase())==="ucs2"||r2==="ucs-2"||r2==="utf16le"||r2==="utf-16le")){if(e4.length<2||t2.length<2)return-1;o2=2,s2/=2,l2/=2,i2/=2}function u2(e5,t3){return o2===1?e5[t3]:e5.readUInt16BE(t3*o2)}if(n2){var h2=-1;for(a2=i2;a2s2&&(i2=s2-l2),a2=i2;a2>=0;a2--){for(var c2=!0,f2=0;f2n2&&(r2=n2):r2=n2;var a2=t2.length;if(a2%2!=0)throw new TypeError("Invalid hex string");r2>a2/2&&(r2=a2/2);for(var o2=0;o2239?4:u2>223?3:u2>191?2:1;if(n2+c2<=i2)switch(c2){case 1:u2<128&&(h2=u2);break;case 2:(192&(a2=e4[n2+1]))==128&&(l2=(31&u2)<<6|63&a2)>127&&(h2=l2);break;case 3:a2=e4[n2+1],o2=e4[n2+2],(192&a2)==128&&(192&o2)==128&&(l2=(15&u2)<<12|(63&a2)<<6|63&o2)>2047&&(l2<55296||l2>57343)&&(h2=l2);break;case 4:a2=e4[n2+1],o2=e4[n2+2],s2=e4[n2+3],(192&a2)==128&&(192&o2)==128&&(192&s2)==128&&(l2=(15&u2)<<18|(63&a2)<<12|(63&o2)<<6|63&s2)>65535&&l2<1114112&&(h2=l2)}h2===null?(h2=65533,c2=1):h2>65535&&(h2-=65536,r2.push(h2>>>10&1023|55296),h2=56320|1023&h2),r2.push(h2),n2+=c2}return decodeCodePointsArray(r2)}Buffer2.TYPED_ARRAY_SUPPORT=global$1.TYPED_ARRAY_SUPPORT===void 0||global$1.TYPED_ARRAY_SUPPORT,kMaxLength(),Buffer2.poolSize=8192,Buffer2._augment=function(e4){return e4.__proto__=Buffer2.prototype,e4},Buffer2.from=function(e4,t2,i2){return from(null,e4,t2,i2)},Buffer2.TYPED_ARRAY_SUPPORT&&(Buffer2.prototype.__proto__=Uint8Array.prototype,Buffer2.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&Buffer2[Symbol.species]),Buffer2.alloc=function(e4,t2,i2){return alloc(null,e4,t2,i2)},Buffer2.allocUnsafe=function(e4){return allocUnsafe(null,e4)},Buffer2.allocUnsafeSlow=function(e4){return allocUnsafe(null,e4)},Buffer2.isBuffer=isBuffer,Buffer2.compare=function(e4,t2){if(!internalIsBuffer(e4)||!internalIsBuffer(t2))throw new TypeError("Arguments must be Buffers");if(e4===t2)return 0;for(var i2=e4.length,r2=t2.length,n2=0,a2=Math.min(i2,r2);n20&&(e4=this.toString("hex",0,t2).match(/.{2}/g).join(" "),this.length>t2&&(e4+=" ... ")),""},Buffer2.prototype.compare=function(e4,t2,i2,r2,n2){if(!internalIsBuffer(e4))throw new TypeError("Argument must be a Buffer");if(t2===void 0&&(t2=0),i2===void 0&&(i2=e4?e4.length:0),r2===void 0&&(r2=0),n2===void 0&&(n2=this.length),t2<0||i2>e4.length||r2<0||n2>this.length)throw new RangeError("out of range index");if(r2>=n2&&t2>=i2)return 0;if(r2>=n2)return-1;if(t2>=i2)return 1;if(this===e4)return 0;for(var a2=(n2>>>=0)-(r2>>>=0),o2=(i2>>>=0)-(t2>>>=0),s2=Math.min(a2,o2),l2=this.slice(r2,n2),u2=e4.slice(t2,i2),h2=0;h2n2)&&(i2=n2),e4.length>0&&(i2<0||t2<0)||t2>this.length)throw new RangeError("Attempt to write outside buffer bounds");r2||(r2="utf8");for(var a2=!1;;)switch(r2){case"hex":return hexWrite(this,e4,t2,i2);case"utf8":case"utf-8":return utf8Write(this,e4,t2,i2);case"ascii":return asciiWrite(this,e4,t2,i2);case"latin1":case"binary":return latin1Write(this,e4,t2,i2);case"base64":return base64Write(this,e4,t2,i2);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e4,t2,i2);default:if(a2)throw new TypeError("Unknown encoding: "+r2);r2=(""+r2).toLowerCase(),a2=!0}},Buffer2.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(e4){var t2=e4.length;if(t2<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e4);for(var i2="",r2=0;r2r2)&&(i2=r2);for(var n2="",a2=t2;a2i2)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e4,t2,i2,r2,n2,a2){if(!internalIsBuffer(e4))throw new TypeError('"buffer" argument must be a Buffer instance');if(t2>n2||t2e4.length)throw new RangeError("Index out of range")}function objectWriteUInt16(e4,t2,i2,r2){t2<0&&(t2=65535+t2+1);for(var n2=0,a2=Math.min(e4.length-i2,2);n2>>8*(r2?n2:1-n2)}function objectWriteUInt32(e4,t2,i2,r2){t2<0&&(t2=4294967295+t2+1);for(var n2=0,a2=Math.min(e4.length-i2,4);n2>>8*(r2?n2:3-n2)&255}function checkIEEE754(e4,t2,i2,r2,n2,a2){if(i2+r2>e4.length)throw new RangeError("Index out of range");if(i2<0)throw new RangeError("Index out of range")}function writeFloat(e4,t2,i2,r2,n2){return n2||checkIEEE754(e4,t2,i2,4),write(e4,t2,i2,r2,23,4),i2+4}function writeDouble(e4,t2,i2,r2,n2){return n2||checkIEEE754(e4,t2,i2,8),write(e4,t2,i2,r2,52,8),i2+8}Buffer2.prototype.slice=function(e4,t2){var i2,r2=this.length;if((e4=~~e4)<0?(e4+=r2)<0&&(e4=0):e4>r2&&(e4=r2),(t2=t2===void 0?r2:~~t2)<0?(t2+=r2)<0&&(t2=0):t2>r2&&(t2=r2),t20&&(n2*=256);)r2+=this[e4+--t2]*n2;return r2},Buffer2.prototype.readUInt8=function(e4,t2){return t2||checkOffset(e4,1,this.length),this[e4]},Buffer2.prototype.readUInt16LE=function(e4,t2){return t2||checkOffset(e4,2,this.length),this[e4]|this[e4+1]<<8},Buffer2.prototype.readUInt16BE=function(e4,t2){return t2||checkOffset(e4,2,this.length),this[e4]<<8|this[e4+1]},Buffer2.prototype.readUInt32LE=function(e4,t2){return t2||checkOffset(e4,4,this.length),(this[e4]|this[e4+1]<<8|this[e4+2]<<16)+16777216*this[e4+3]},Buffer2.prototype.readUInt32BE=function(e4,t2){return t2||checkOffset(e4,4,this.length),16777216*this[e4]+(this[e4+1]<<16|this[e4+2]<<8|this[e4+3])},Buffer2.prototype.readIntLE=function(e4,t2,i2){e4|=0,t2|=0,i2||checkOffset(e4,t2,this.length);for(var r2=this[e4],n2=1,a2=0;++a2=(n2*=128)&&(r2-=Math.pow(2,8*t2)),r2},Buffer2.prototype.readIntBE=function(e4,t2,i2){e4|=0,t2|=0,i2||checkOffset(e4,t2,this.length);for(var r2=t2,n2=1,a2=this[e4+--r2];r2>0&&(n2*=256);)a2+=this[e4+--r2]*n2;return a2>=(n2*=128)&&(a2-=Math.pow(2,8*t2)),a2},Buffer2.prototype.readInt8=function(e4,t2){return t2||checkOffset(e4,1,this.length),128&this[e4]?-1*(255-this[e4]+1):this[e4]},Buffer2.prototype.readInt16LE=function(e4,t2){t2||checkOffset(e4,2,this.length);var i2=this[e4]|this[e4+1]<<8;return 32768&i2?4294901760|i2:i2},Buffer2.prototype.readInt16BE=function(e4,t2){t2||checkOffset(e4,2,this.length);var i2=this[e4+1]|this[e4]<<8;return 32768&i2?4294901760|i2:i2},Buffer2.prototype.readInt32LE=function(e4,t2){return t2||checkOffset(e4,4,this.length),this[e4]|this[e4+1]<<8|this[e4+2]<<16|this[e4+3]<<24},Buffer2.prototype.readInt32BE=function(e4,t2){return t2||checkOffset(e4,4,this.length),this[e4]<<24|this[e4+1]<<16|this[e4+2]<<8|this[e4+3]},Buffer2.prototype.readFloatLE=function(e4,t2){return t2||checkOffset(e4,4,this.length),read(this,e4,!0,23,4)},Buffer2.prototype.readFloatBE=function(e4,t2){return t2||checkOffset(e4,4,this.length),read(this,e4,!1,23,4)},Buffer2.prototype.readDoubleLE=function(e4,t2){return t2||checkOffset(e4,8,this.length),read(this,e4,!0,52,8)},Buffer2.prototype.readDoubleBE=function(e4,t2){return t2||checkOffset(e4,8,this.length),read(this,e4,!1,52,8)},Buffer2.prototype.writeUIntLE=function(e4,t2,i2,r2){e4=+e4,t2|=0,i2|=0,r2||checkInt(this,e4,t2,i2,Math.pow(2,8*i2)-1,0);var n2=1,a2=0;for(this[t2]=255&e4;++a2=0&&(a2*=256);)this[t2+n2]=e4/a2&255;return t2+i2},Buffer2.prototype.writeUInt8=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,1,255,0),Buffer2.TYPED_ARRAY_SUPPORT||(e4=Math.floor(e4)),this[t2]=255&e4,t2+1},Buffer2.prototype.writeUInt16LE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,2,65535,0),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=255&e4,this[t2+1]=e4>>>8):objectWriteUInt16(this,e4,t2,!0),t2+2},Buffer2.prototype.writeUInt16BE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,2,65535,0),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=e4>>>8,this[t2+1]=255&e4):objectWriteUInt16(this,e4,t2,!1),t2+2},Buffer2.prototype.writeUInt32LE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,4,4294967295,0),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2+3]=e4>>>24,this[t2+2]=e4>>>16,this[t2+1]=e4>>>8,this[t2]=255&e4):objectWriteUInt32(this,e4,t2,!0),t2+4},Buffer2.prototype.writeUInt32BE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,4,4294967295,0),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=e4>>>24,this[t2+1]=e4>>>16,this[t2+2]=e4>>>8,this[t2+3]=255&e4):objectWriteUInt32(this,e4,t2,!1),t2+4},Buffer2.prototype.writeIntLE=function(e4,t2,i2,r2){if(e4=+e4,t2|=0,!r2){var n2=Math.pow(2,8*i2-1);checkInt(this,e4,t2,i2,n2-1,-n2)}var a2=0,o2=1,s2=0;for(this[t2]=255&e4;++a2=0&&(o2*=256);)e4<0&&s2===0&&this[t2+a2+1]!==0&&(s2=1),this[t2+a2]=(e4/o2|0)-s2&255;return t2+i2},Buffer2.prototype.writeInt8=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,1,127,-128),Buffer2.TYPED_ARRAY_SUPPORT||(e4=Math.floor(e4)),e4<0&&(e4=255+e4+1),this[t2]=255&e4,t2+1},Buffer2.prototype.writeInt16LE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,2,32767,-32768),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=255&e4,this[t2+1]=e4>>>8):objectWriteUInt16(this,e4,t2,!0),t2+2},Buffer2.prototype.writeInt16BE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,2,32767,-32768),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=e4>>>8,this[t2+1]=255&e4):objectWriteUInt16(this,e4,t2,!1),t2+2},Buffer2.prototype.writeInt32LE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,4,2147483647,-2147483648),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=255&e4,this[t2+1]=e4>>>8,this[t2+2]=e4>>>16,this[t2+3]=e4>>>24):objectWriteUInt32(this,e4,t2,!0),t2+4},Buffer2.prototype.writeInt32BE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,4,2147483647,-2147483648),e4<0&&(e4=4294967295+e4+1),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=e4>>>24,this[t2+1]=e4>>>16,this[t2+2]=e4>>>8,this[t2+3]=255&e4):objectWriteUInt32(this,e4,t2,!1),t2+4},Buffer2.prototype.writeFloatLE=function(e4,t2,i2){return writeFloat(this,e4,t2,!0,i2)},Buffer2.prototype.writeFloatBE=function(e4,t2,i2){return writeFloat(this,e4,t2,!1,i2)},Buffer2.prototype.writeDoubleLE=function(e4,t2,i2){return writeDouble(this,e4,t2,!0,i2)},Buffer2.prototype.writeDoubleBE=function(e4,t2,i2){return writeDouble(this,e4,t2,!1,i2)},Buffer2.prototype.copy=function(e4,t2,i2,r2){if(i2||(i2=0),r2||r2===0||(r2=this.length),t2>=e4.length&&(t2=e4.length),t2||(t2=0),r2>0&&r2=this.length)throw new RangeError("sourceStart out of bounds");if(r2<0)throw new RangeError("sourceEnd out of bounds");r2>this.length&&(r2=this.length),e4.length-t2=0;--n2)e4[n2+t2]=this[n2+i2];else if(a2<1e3||!Buffer2.TYPED_ARRAY_SUPPORT)for(n2=0;n2>>=0,i2=i2===void 0?this.length:i2>>>0,e4||(e4=0),typeof e4=="number")for(a2=t2;a255295&&i2<57344){if(!n2){if(i2>56319){(t2-=3)>-1&&a2.push(239,191,189);continue}if(o2+1===r2){(t2-=3)>-1&&a2.push(239,191,189);continue}n2=i2;continue}if(i2<56320){(t2-=3)>-1&&a2.push(239,191,189),n2=i2;continue}i2=65536+(n2-55296<<10|i2-56320)}else n2&&(t2-=3)>-1&&a2.push(239,191,189);if(n2=null,i2<128){if((t2-=1)<0)break;a2.push(i2)}else if(i2<2048){if((t2-=2)<0)break;a2.push(i2>>6|192,63&i2|128)}else if(i2<65536){if((t2-=3)<0)break;a2.push(i2>>12|224,i2>>6&63|128,63&i2|128)}else{if(!(i2<1114112))throw new Error("Invalid code point");if((t2-=4)<0)break;a2.push(i2>>18|240,i2>>12&63|128,i2>>6&63|128,63&i2|128)}}return a2}function asciiToBytes(e4){for(var t2=[],i2=0;i2>8,n2=i2%256,a2.push(n2),a2.push(r2);return a2}function base64ToBytes(e4){return toByteArray(base64clean(e4))}function blitBuffer(e4,t2,i2,r2){for(var n2=0;n2=t2.length||n2>=e4.length);++n2)t2[n2+i2]=e4[n2];return n2}function isnan(e4){return e4!=e4}function isBuffer(e4){return e4!=null&&(!!e4._isBuffer||isFastBuffer(e4)||isSlowBuffer(e4))}function isFastBuffer(e4){return!!e4.constructor&&typeof e4.constructor.isBuffer=="function"&&e4.constructor.isBuffer(e4)}function isSlowBuffer(e4){return typeof e4.readFloatLE=="function"&&typeof e4.slice=="function"&&isFastBuffer(e4.slice(0,0))}(function(e4){e4[e4.BITMAP_INFO_HEADER=40]="BITMAP_INFO_HEADER",e4[e4.BITMAP_V2_INFO_HEADER=52]="BITMAP_V2_INFO_HEADER",e4[e4.BITMAP_V3_INFO_HEADER=56]="BITMAP_V3_INFO_HEADER",e4[e4.BITMAP_V4_HEADER=108]="BITMAP_V4_HEADER",e4[e4.BITMAP_V5_HEADER=124]="BITMAP_V5_HEADER"})(HeaderTypes||(HeaderTypes={}));var HeaderTypes$1=HeaderTypes,BmpCompression;function maskColor(e4,t2,i2,r2){let n2=1+~e4&e4,a2=1+~t2&t2,o2=1+~i2&i2,s2=1+~r2&r2,l2=e4/n2+1,u2=t2/a2+1,h2=i2/o2+1,c2=r2/s2+1;return{shiftRed:t3=>(t3&e4)/n2*256/l2,shiftGreen:e5=>(e5&t2)/a2*256/u2,shiftBlue:e5=>(e5&i2)/o2*256/h2,shiftAlpha:r2!==0?e5=>(e5&r2)/s2*256/c2:()=>255}}(function(e4){e4[e4.NONE=0]="NONE",e4[e4.BI_RLE8=1]="BI_RLE8",e4[e4.BI_RLE4=2]="BI_RLE4",e4[e4.BI_BIT_FIELDS=3]="BI_BIT_FIELDS",e4[e4.BI_ALPHA_BIT_FIELDS=6]="BI_ALPHA_BIT_FIELDS"})(BmpCompression||(BmpCompression={}));var BmpDecoder=class{flag;fileSize;reserved1;reserved2;offset;headerSize;width;height;planes;bitPP;compression;rawSize;hr;vr;colors;importantColors;palette;data;maskRed;maskGreen;maskBlue;maskAlpha;toRGBA;pos;bottomUp;buffer;locRed;locGreen;locBlue;locAlpha;shiftRed;shiftGreen;shiftBlue;shiftAlpha;constructor(e4,{toRGBA:t2}={toRGBA:!1}){if(this.buffer=e4,this.toRGBA=!!t2,this.pos=0,this.bottomUp=!0,this.flag=this.buffer.toString("utf-8",0,this.pos+=2),this.flag!=="BM")throw new Error("Invalid BMP File");this.locRed=this.toRGBA?0:3,this.locGreen=this.toRGBA?1:2,this.locBlue=this.toRGBA?2:1,this.locAlpha=this.toRGBA?3:0,this.parseHeader(),this.parseRGBA()}parseHeader(){if(this.fileSize=this.readUInt32LE(),this.reserved1=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.reserved2=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.offset=this.readUInt32LE(),this.headerSize=this.readUInt32LE(),!(this.headerSize in HeaderTypes$1))throw new Error(`Unsupported BMP header size ${this.headerSize}`);if(this.width=this.readUInt32LE(),this.height=this.readUInt32LE(),this.height=this.height>2147483647?this.height-4294967296:this.height,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compression=this.readUInt32LE(),this.rawSize=this.readUInt32LE(),this.hr=this.readUInt32LE(),this.vr=this.readUInt32LE(),this.colors=this.readUInt32LE(),this.importantColors=this.readUInt32LE(),this.bitPP===32?(this.maskAlpha=0,this.maskRed=16711680,this.maskGreen=65280,this.maskBlue=255):this.bitPP===16&&(this.maskAlpha=0,this.maskRed=31744,this.maskGreen=992,this.maskBlue=31),(this.headerSize>HeaderTypes$1.BITMAP_INFO_HEADER||this.compression===BmpCompression.BI_BIT_FIELDS||this.compression===BmpCompression.BI_ALPHA_BIT_FIELDS)&&(this.maskRed=this.readUInt32LE(),this.maskGreen=this.readUInt32LE(),this.maskBlue=this.readUInt32LE()),(this.headerSize>HeaderTypes$1.BITMAP_V2_INFO_HEADER||this.compression===BmpCompression.BI_ALPHA_BIT_FIELDS)&&(this.maskAlpha=this.readUInt32LE()),this.headerSize>HeaderTypes$1.BITMAP_V3_INFO_HEADER&&(this.pos+=HeaderTypes$1.BITMAP_V4_HEADER-HeaderTypes$1.BITMAP_V3_INFO_HEADER),this.headerSize>HeaderTypes$1.BITMAP_V4_HEADER&&(this.pos+=HeaderTypes$1.BITMAP_V5_HEADER-HeaderTypes$1.BITMAP_V4_HEADER),this.bitPP<=8||this.colors>0){let e5=this.colors===0?1<{let i3=this.buffer.readUInt8(this.pos++),r2=t3*this.width*4+8*e5*4;for(let t4=0;t4<8&&8*e5+t4>7-t4&1];this.data[r2+t4*this.locAlpha]=0,this.data[r2+4*t4+this.locBlue]=e6.blue,this.data[r2+4*t4+this.locGreen]=e6.green,this.data[r2+4*t4+this.locRed]=e6.red}})}bit4(){if(this.compression===BmpCompression.BI_RLE4){this.data.fill(0);let e4=!1,t2=this.bottomUp?this.height-1:0,i2=0;for(;i2>4),1&r3&&r3+1>1&1)==1&&this.pos++}}else for(let t3=0;t3>4),e4=!e4}}else{let e4=Math.ceil(this.width/2),t2=e4%4,i2=t2!==0?4-t2:0;this.scanImage(i2,e4,(e5,t3)=>{let i3=this.buffer.readUInt8(this.pos++),r2=t3*this.width*4+2*e5*4,n2=i3>>4,a2=this.palette[n2];if(this.data[r2]=0,this.data[r2+1]=a2.blue,this.data[r2+2]=a2.green,this.data[r2+3]=a2.red,2*e5+1>=this.width)return!1;let o2=15&i3;a2=this.palette[o2],this.data[r2+4]=0,this.data[r2+4+1]=a2.blue,this.data[r2+4+2]=a2.green,this.data[r2+4+3]=a2.red})}}bit8(){if(this.compression===BmpCompression.BI_RLE8){this.data.fill(0);let e4=this.bottomUp?this.height-1:0,t2=0;for(;t2{let i2=this.buffer.readUInt8(this.pos++),r2=t3*this.width*4+4*e5;if(i2{let i2=t2*this.width*4+4*e5,r2=this.buffer.readUInt16LE(this.pos);this.pos+=2,this.data[i2+this.locRed]=this.shiftRed(r2),this.data[i2+this.locGreen]=this.shiftGreen(r2),this.data[i2+this.locBlue]=this.shiftBlue(r2),this.data[i2+this.locAlpha]=this.shiftAlpha(r2)})}bit24(){let e4=this.width%4;this.scanImage(e4,this.width,(e5,t2)=>{let i2=t2*this.width*4+4*e5,r2=this.buffer.readUInt8(this.pos++),n2=this.buffer.readUInt8(this.pos++),a2=this.buffer.readUInt8(this.pos++);this.data[i2+this.locRed]=a2,this.data[i2+this.locGreen]=n2,this.data[i2+this.locBlue]=r2,this.data[i2+this.locAlpha]=0})}bit32(){this.scanImage(0,this.width,(e4,t2)=>{let i2=t2*this.width*4+4*e4,r2=this.readUInt32LE();this.data[i2+this.locRed]=this.shiftRed(r2),this.data[i2+this.locGreen]=this.shiftGreen(r2),this.data[i2+this.locBlue]=this.shiftBlue(r2),this.data[i2+this.locAlpha]=this.shiftAlpha(r2)})}scanImage(e4=0,t2=this.width,i2){for(let r2=this.height-1;r2>=0;r2--){let n2=this.bottomUp?r2:this.height-1-r2;for(let e5=0;e5e5<<1|t2,0)}function createColor(e4){return e4.quad<<24|e4.red<<16|e4.green<<8|e4.blue}var BmpEncoder=class{fileSize;reserved1;reserved2;offset;width;flag;height;planes;bitPP;compress;hr;vr;colors;importantColors;rawSize;headerSize;data;palette;extraBytes;buffer;bytesInColor;pos;constructor(e4){switch(this.buffer=e4.data,this.width=e4.width,this.height=e4.height,this.headerSize=HeaderTypes$1.BITMAP_INFO_HEADER,this.flag="BM",this.bitPP=e4.bitPP||24,this.offset=54,this.reserved1=e4.reserved1||0,this.reserved2=e4.reserved2||0,this.planes=1,this.compress=0,this.hr=e4.hr||0,this.vr=e4.vr||0,this.importantColors=e4.importantColors||0,this.colors=Math.min(2**(this.bitPP-1||1),e4.colors||1/0),this.palette=e4.palette||[],this.colors&&this.bitPP<16?this.offset+=4*this.colors:this.colors=0,this.bitPP){case 32:this.bytesInColor=4;break;case 16:this.bytesInColor=2;break;case 8:this.bytesInColor=1;break;case 4:this.bytesInColor=.5;break;case 1:this.bytesInColor=1/8;break;default:this.bytesInColor=3,this.bitPP=24}let t2=this.width*this.bitPP/32,i2=Math.ceil(t2);this.extraBytes=4*(i2-t2),this.rawSize=this.height*i2*4+2,this.fileSize=this.rawSize+this.offset,this.data=Buffer2.alloc(this.fileSize,1),this.pos=0,this.encode()}encode(){switch(this.pos=0,this.writeHeader(),this.bitPP){case 32:this.bit32();break;case 16:this.bit16();break;case 8:this.bit8();break;case 4:this.bit4();break;case 1:this.bit1();break;default:this.bit24()}}writeHeader(){this.data.write(this.flag,this.pos,2),this.pos+=2,this.writeUInt32LE(this.fileSize),this.writeUInt32LE(this.reserved1<<16|this.reserved2),this.writeUInt32LE(this.offset),this.writeUInt32LE(this.headerSize),this.writeUInt32LE(this.width),this.writeUInt32LE(this.height),this.data.writeUInt16LE(this.planes,this.pos),this.pos+=2,this.data.writeUInt16LE(this.bitPP,this.pos),this.pos+=2,this.writeUInt32LE(this.compress),this.writeUInt32LE(this.rawSize),this.writeUInt32LE(this.hr),this.writeUInt32LE(this.vr),this.writeUInt32LE(this.colors),this.writeUInt32LE(this.importantColors)}bit1(){this.palette.length&&this.colors===2?this.initColors(1):(this.writeUInt32LE(16777215),this.writeUInt32LE(0)),this.pos+=1;let e4=[];this.writeImage((t2,i2,r2)=>{let n2=i2;n2++;let a2=this.buffer[n2++],o2=this.buffer[n2++],s2=.2126*this.buffer[n2++]+.7152*o2+.0722*a2;return e4.push(s2>127?0:1),(r2+1)%8==0?(this.data[t2-1]=createInteger(e4),e4=[]):r2===this.width-1&&e4.length>0&&(this.data[t2-1]=createInteger(e4)<<4,e4=[]),n2})}bit4(){let e4=this.initColors(4),t2=[];this.writeImage((i2,r2,n2)=>{let a2=r2,o2=createColor({quad:this.buffer[a2++],blue:this.buffer[a2++],green:this.buffer[a2++],red:this.buffer[a2++]}),s2=e4.findIndex(e5=>e5===o2);return s2!==-1?t2.push(s2):t2.push(0),(n2+1)%2==0&&(this.data[i2]=t2[0]<<4|t2[1],t2=[]),a2})}bit8(){let e4=this.initColors(8);this.writeImage((t2,i2)=>{let r2=i2,n2=createColor({quad:this.buffer[r2++],blue:this.buffer[r2++],green:this.buffer[r2++],red:this.buffer[r2++]}),a2=e4.findIndex(e5=>e5===n2);return this.data[t2]=a2!==-1?a2:0,r2})}bit16(){this.writeImage((e4,t2)=>{let i2=t2+1,r2=this.buffer[i2++]/8,n2=this.buffer[i2++]/8,a2=this.buffer[i2++]/8<<10|n2<<5|r2;return this.data[e4]=255&a2,this.data[e4+1]=(65280&a2)>>8,i2})}bit24(){this.writeImage((e4,t2)=>{let i2=t2+1;return this.data[e4]=this.buffer[i2++],this.data[e4+1]=this.buffer[i2++],this.data[e4+2]=this.buffer[i2++],i2})}bit32(){this.writeImage((e4,t2)=>{let i2=t2;return this.data[e4+3]=this.buffer[i2++],this.data[e4]=this.buffer[i2++],this.data[e4+1]=this.buffer[i2++],this.data[e4+2]=this.buffer[i2++],i2})}writeImage(e4){let t2=this.extraBytes+this.width*this.bytesInColor,i2=0;for(let r2=0;r2.5?l2/(2-a2-o2):l2/(a2+o2),a2){case e4:r2=(t2-i2)/l2+(t21&&(i3-=1),i3<1/6?e5+6*(t3-e5)*i3:i3<.5?t3:i3<2/3?e5+(t3-e5)*(2/3-i3)*6:e5}if(e4=bound01(e4,360),t2=bound01(t2,100),i2=bound01(i2,100),t2===0)r2=n2=a2=i2;else{var s2=i2<.5?i2*(1+t2):i2+t2-i2*t2,l2=2*i2-s2;r2=o2(l2,s2,e4+1/3),n2=o2(l2,s2,e4),a2=o2(l2,s2,e4-1/3)}return{r:255*r2,g:255*n2,b:255*a2}}function rgbToHsv(e4,t2,i2){e4=bound01(e4,255),t2=bound01(t2,255),i2=bound01(i2,255);var r2,n2,a2=Math.max(e4,t2,i2),o2=Math.min(e4,t2,i2),s2=a2,l2=a2-o2;if(n2=a2===0?0:l2/a2,a2==o2)r2=0;else{switch(a2){case e4:r2=(t2-i2)/l2+(t2>1)+720)%360;--t2;)r2.h=(r2.h+n2)%360,a2.push(tinycolor(r2));return a2}function _monochromatic(e4,t2){t2=t2||6;for(var i2=tinycolor(e4).toHsv(),r2=i2.h,n2=i2.s,a2=i2.v,o2=[],s2=1/t2;t2--;)o2.push(tinycolor({h:r2,s:n2,v:a2})),a2=(a2+s2)%1;return o2}tinycolor.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e4=this.toRgb();return(299*e4.r+587*e4.g+114*e4.b)/1e3},getLuminance:function(){var e4,t2,i2,r2=this.toRgb();return e4=r2.r/255,t2=r2.g/255,i2=r2.b/255,.2126*(e4<=.03928?e4/12.92:Math.pow((e4+.055)/1.055,2.4))+.7152*(t2<=.03928?t2/12.92:Math.pow((t2+.055)/1.055,2.4))+.0722*(i2<=.03928?i2/12.92:Math.pow((i2+.055)/1.055,2.4))},setAlpha:function(e4){return this._a=boundAlpha(e4),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e4=rgbToHsv(this._r,this._g,this._b);return{h:360*e4.h,s:e4.s,v:e4.v,a:this._a}},toHsvString:function(){var e4=rgbToHsv(this._r,this._g,this._b),t2=Math.round(360*e4.h),i2=Math.round(100*e4.s),r2=Math.round(100*e4.v);return this._a==1?"hsv("+t2+", "+i2+"%, "+r2+"%)":"hsva("+t2+", "+i2+"%, "+r2+"%, "+this._roundA+")"},toHsl:function(){var e4=rgbToHsl(this._r,this._g,this._b);return{h:360*e4.h,s:e4.s,l:e4.l,a:this._a}},toHslString:function(){var e4=rgbToHsl(this._r,this._g,this._b),t2=Math.round(360*e4.h),i2=Math.round(100*e4.s),r2=Math.round(100*e4.l);return this._a==1?"hsl("+t2+", "+i2+"%, "+r2+"%)":"hsla("+t2+", "+i2+"%, "+r2+"%, "+this._roundA+")"},toHex:function(e4){return rgbToHex(this._r,this._g,this._b,e4)},toHexString:function(e4){return"#"+this.toHex(e4)},toHex8:function(e4){return rgbaToHex(this._r,this._g,this._b,this._a,e4)},toHex8String:function(e4){return"#"+this.toHex8(e4)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*bound01(this._r,255))+"%",g:Math.round(100*bound01(this._g,255))+"%",b:Math.round(100*bound01(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%)":"rgba("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(hexNames[rgbToHex(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e4){var t2="#"+rgbaToArgbHex(this._r,this._g,this._b,this._a),i2=t2,r2=this._gradientType?"GradientType = 1, ":"";if(e4){var n2=tinycolor(e4);i2="#"+rgbaToArgbHex(n2._r,n2._g,n2._b,n2._a)}return"progid:DXImageTransform.Microsoft.gradient("+r2+"startColorstr="+t2+",endColorstr="+i2+")"},toString:function(e4){var t2=!!e4;e4=e4||this._format;var i2=!1,r2=this._a<1&&this._a>=0;return t2||!r2||e4!=="hex"&&e4!=="hex6"&&e4!=="hex3"&&e4!=="hex4"&&e4!=="hex8"&&e4!=="name"?(e4==="rgb"&&(i2=this.toRgbString()),e4==="prgb"&&(i2=this.toPercentageRgbString()),e4!=="hex"&&e4!=="hex6"||(i2=this.toHexString()),e4==="hex3"&&(i2=this.toHexString(!0)),e4==="hex4"&&(i2=this.toHex8String(!0)),e4==="hex8"&&(i2=this.toHex8String()),e4==="name"&&(i2=this.toName()),e4==="hsl"&&(i2=this.toHslString()),e4==="hsv"&&(i2=this.toHsvString()),i2||this.toHexString()):e4==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return tinycolor(this.toString())},_applyModification:function(e4,t2){var i2=e4.apply(null,[this].concat([].slice.call(t2)));return this._r=i2._r,this._g=i2._g,this._b=i2._b,this.setAlpha(i2._a),this},lighten:function(){return this._applyModification(_lighten,arguments)},brighten:function(){return this._applyModification(_brighten,arguments)},darken:function(){return this._applyModification(_darken,arguments)},desaturate:function(){return this._applyModification(_desaturate,arguments)},saturate:function(){return this._applyModification(_saturate,arguments)},greyscale:function(){return this._applyModification(_greyscale,arguments)},spin:function(){return this._applyModification(_spin,arguments)},_applyCombination:function(e4,t2){return e4.apply(null,[this].concat([].slice.call(t2)))},analogous:function(){return this._applyCombination(_analogous,arguments)},complement:function(){return this._applyCombination(_complement,arguments)},monochromatic:function(){return this._applyCombination(_monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(_splitcomplement,arguments)},triad:function(){return this._applyCombination(polyad,[3])},tetrad:function(){return this._applyCombination(polyad,[4])}},tinycolor.fromRatio=function(e4,t2){if(_typeof(e4)=="object"){var i2={};for(var r2 in e4)e4.hasOwnProperty(r2)&&(i2[r2]=r2==="a"?e4[r2]:convertToPercentage(e4[r2]));e4=i2}return tinycolor(e4,t2)},tinycolor.equals=function(e4,t2){return!(!e4||!t2)&&tinycolor(e4).toRgbString()==tinycolor(t2).toRgbString()},tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},tinycolor.mix=function(e4,t2,i2){i2=i2===0?0:i2||50;var r2=tinycolor(e4).toRgb(),n2=tinycolor(t2).toRgb(),a2=i2/100;return tinycolor({r:(n2.r-r2.r)*a2+r2.r,g:(n2.g-r2.g)*a2+r2.g,b:(n2.b-r2.b)*a2+r2.b,a:(n2.a-r2.a)*a2+r2.a})},tinycolor.readability=function(e4,t2){var i2=tinycolor(e4),r2=tinycolor(t2);return(Math.max(i2.getLuminance(),r2.getLuminance())+.05)/(Math.min(i2.getLuminance(),r2.getLuminance())+.05)},tinycolor.isReadable=function(e4,t2,i2){var r2,n2,a2=tinycolor.readability(e4,t2);switch(n2=!1,(r2=validateWCAG2Parms(i2)).level+r2.size){case"AAsmall":case"AAAlarge":n2=a2>=4.5;break;case"AAlarge":n2=a2>=3;break;case"AAAsmall":n2=a2>=7}return n2},tinycolor.mostReadable=function(e4,t2,i2){var r2,n2,a2,o2,s2=null,l2=0;n2=(i2=i2||{}).includeFallbackColors,a2=i2.level,o2=i2.size;for(var u2=0;u2l2&&(l2=r2,s2=tinycolor(t2[u2]));return tinycolor.isReadable(e4,s2,{level:a2,size:o2})||!n2?s2:(i2.includeFallbackColors=!1,tinycolor.mostReadable(e4,["#fff","#000"],i2))};var names$1=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",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",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",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:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hexNames=tinycolor.hexNames=flip(names$1);function flip(e4){var t2={};for(var i2 in e4)e4.hasOwnProperty(i2)&&(t2[e4[i2]]=i2);return t2}function boundAlpha(e4){return e4=parseFloat(e4),(isNaN(e4)||e4<0||e4>1)&&(e4=1),e4}function bound01(e4,t2){isOnePointZero(e4)&&(e4="100%");var i2=isPercentage(e4);return e4=Math.min(t2,Math.max(0,parseFloat(e4))),i2&&(e4=parseInt(e4*t2,10)/100),Math.abs(e4-t2)<1e-6?1:e4%t2/parseFloat(t2)}function clamp01(e4){return Math.min(1,Math.max(0,e4))}function parseIntFromHex(e4){return parseInt(e4,16)}function isOnePointZero(e4){return typeof e4=="string"&&e4.indexOf(".")!=-1&&parseFloat(e4)===1}function isPercentage(e4){return typeof e4=="string"&&e4.indexOf("%")!=-1}function pad2(e4){return e4.length==1?"0"+e4:""+e4}function convertToPercentage(e4){return e4<=1&&(e4=100*e4+"%"),e4}function convertDecimalToHex(e4){return Math.round(255*parseFloat(e4)).toString(16)}function convertHexToDecimal(e4){return parseIntFromHex(e4)/255}var matchers=(CSS_UNIT="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",PERMISSIVE_MATCH3="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?",PERMISSIVE_MATCH4="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?",{CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}),CSS_UNIT,PERMISSIVE_MATCH3,PERMISSIVE_MATCH4;function isValidCSSUnit(e4){return!!matchers.CSS_UNIT.exec(e4)}function stringInputToObject(e4){e4=e4.replace(trimLeft,"").replace(trimRight,"").toLowerCase();var t2,i2=!1;if(names$1[e4])e4=names$1[e4],i2=!0;else if(e4=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(t2=matchers.rgb.exec(e4))?{r:t2[1],g:t2[2],b:t2[3]}:(t2=matchers.rgba.exec(e4))?{r:t2[1],g:t2[2],b:t2[3],a:t2[4]}:(t2=matchers.hsl.exec(e4))?{h:t2[1],s:t2[2],l:t2[3]}:(t2=matchers.hsla.exec(e4))?{h:t2[1],s:t2[2],l:t2[3],a:t2[4]}:(t2=matchers.hsv.exec(e4))?{h:t2[1],s:t2[2],v:t2[3]}:(t2=matchers.hsva.exec(e4))?{h:t2[1],s:t2[2],v:t2[3],a:t2[4]}:(t2=matchers.hex8.exec(e4))?{r:parseIntFromHex(t2[1]),g:parseIntFromHex(t2[2]),b:parseIntFromHex(t2[3]),a:convertHexToDecimal(t2[4]),format:i2?"name":"hex8"}:(t2=matchers.hex6.exec(e4))?{r:parseIntFromHex(t2[1]),g:parseIntFromHex(t2[2]),b:parseIntFromHex(t2[3]),format:i2?"name":"hex"}:(t2=matchers.hex4.exec(e4))?{r:parseIntFromHex(t2[1]+""+t2[1]),g:parseIntFromHex(t2[2]+""+t2[2]),b:parseIntFromHex(t2[3]+""+t2[3]),a:convertHexToDecimal(t2[4]+""+t2[4]),format:i2?"name":"hex8"}:!!(t2=matchers.hex3.exec(e4))&&{r:parseIntFromHex(t2[1]+""+t2[1]),g:parseIntFromHex(t2[2]+""+t2[2]),b:parseIntFromHex(t2[3]+""+t2[3]),format:i2?"name":"hex"}}function validateWCAG2Parms(e4){var t2,i2;return(t2=((e4=e4||{level:"AA",size:"small"}).level||"AA").toUpperCase())!=="AA"&&t2!=="AAA"&&(t2="AA"),(i2=(e4.size||"small").toLowerCase())!=="small"&&i2!=="large"&&(i2="small"),{level:t2,size:i2}}function clone(e4){let t2={width:e4.bitmap.width,height:e4.bitmap.height,data:Buffer2.from(e4.bitmap.data)};return new e4.constructor(t2)}function scan(e4,t2,i2,r2,n2,a2){let o2,s2,l2,u2,h2;if(typeof t2=="function")h2=t2,o2=0,s2=0,l2=e4.bitmap.width,u2=e4.bitmap.height;else{if(o2=t2,typeof i2!="number")throw new Error("y must be a number");if(s2=i2,typeof r2!="number")throw new Error("w must be a number");if(l2=r2,typeof n2!="number")throw new Error("h must be a number");if(u2=n2,typeof a2!="function")throw new Error("cb must be a function");h2=a2}o2=Math.round(o2),s2=Math.round(s2),l2=Math.round(l2),u2=Math.round(u2);let c2=h2.bind(e4);for(let t3=s2;t3255)throw new Error("r must be between 0 and 255");if(t2<0||t2>255)throw new Error("g must be between 0 and 255");if(i2<0||i2>255)throw new Error("b must be between 0 and 255");if(r2<0||r2>255)throw new Error("a must be between 0 and 255");let n2=255&e4;return n2<<=8,n2|=255&t2,n2<<=8,n2|=255&i2,n2<<=8,n2|=255&r2,n2>>>=0,n2}function colorDiff(e4,t2){let i2=e5=>Math.pow(e5,2),{max:r2}=Math,n2="a"in e4?e4.a:255,a2="a"in t2?t2.a:255;return(r2(i2(e4.r-t2.r),i2(e4.r-t2.r-n2+a2))+r2(i2(e4.g-t2.g),i2(e4.g-t2.g-n2+a2))+r2(i2(e4.b-t2.b),i2(e4.b-t2.b-n2+a2)))/195075}function limit255(e4){return e4=Math.max(e4,0),e4=Math.min(e4,255)}function cssColorToHex(e4){return typeof e4=="number"?e4:parseInt(tinycolor(e4).toHex8(),16)}function encode$1(e4,t2={}){return scan({bitmap:e4},0,0,e4.width,e4.height,function(t3,i2,r2){let n2=e4.data[r2+0],a2=e4.data[r2+1],o2=e4.data[r2+2],s2=e4.data[r2+3];e4.data[r2+0]=s2,e4.data[r2+1]=o2,e4.data[r2+2]=a2,e4.data[r2+3]=n2}),encode$2({...e4,...t2}).data}function decode$1(e4,t2){let i2=decode$2(e4,t2);return scan({bitmap:i2},0,0,i2.width,i2.height,function(e5,t3,r2){let n2=i2.data[r2+1],a2=i2.data[r2+2],o2=i2.data[r2+3];i2.data[r2+0]=o2,i2.data[r2+1]=a2,i2.data[r2+2]=n2,i2.data[r2+3]=255}),i2}function msBmp(){return{mime:"image/x-ms-bmp",encode:encode$1,decode:decode$1}}function bmp(){return{mime:"image/bmp",encode:encode$1,decode:decode$1}}var omggif={},GifReader_1,GifWriter_1;function GifWriter(e4,t2,i2,r2){var n2=0,a2=(r2=r2===void 0?{}:r2).loop===void 0?null:r2.loop,o2=r2.palette===void 0?null:r2.palette;if(t2<=0||i2<=0||t2>65535||i2>65535)throw new Error("Width/Height invalid.");function s2(e5){var t3=e5.length;if(t3<2||t3>256||t3&t3-1)throw new Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return t3}e4[n2++]=71,e4[n2++]=73,e4[n2++]=70,e4[n2++]=56,e4[n2++]=57,e4[n2++]=97;var l2=0,u2=0;if(o2!==null){for(var h2=s2(o2);h2>>=1;)++l2;if(h2=1<=h2)throw new Error("Background index out of range.");if(u2===0)throw new Error("Background index explicitly passed as 0.")}}if(e4[n2++]=255&t2,e4[n2++]=t2>>8&255,e4[n2++]=255&i2,e4[n2++]=i2>>8&255,e4[n2++]=(o2!==null?128:0)|l2,e4[n2++]=u2,e4[n2++]=0,o2!==null)for(var c2=0,f2=o2.length;c2>16&255,e4[n2++]=d>>8&255,e4[n2++]=255&d}if(a2!==null){if(a2<0||a2>65535)throw new Error("Loop count invalid.");e4[n2++]=33,e4[n2++]=255,e4[n2++]=11,e4[n2++]=78,e4[n2++]=69,e4[n2++]=84,e4[n2++]=83,e4[n2++]=67,e4[n2++]=65,e4[n2++]=80,e4[n2++]=69,e4[n2++]=50,e4[n2++]=46,e4[n2++]=48,e4[n2++]=3,e4[n2++]=1,e4[n2++]=255&a2,e4[n2++]=a2>>8&255,e4[n2++]=0}var p2=!1;this.addFrame=function(t3,i3,r3,a3,l3,u3){if(p2===!0&&(--n2,p2=!1),u3=u3===void 0?{}:u3,t3<0||i3<0||t3>65535||i3>65535)throw new Error("x/y invalid.");if(r3<=0||a3<=0||r3>65535||a3>65535)throw new Error("Width/Height invalid.");if(l3.length>=1;)++d2;f3=1<3)throw new Error("Disposal out of range.");var g=!1,b2=0;if(u3.transparent!==void 0&&u3.transparent!==null&&(g=!0,(b2=u3.transparent)<0||b2>=f3))throw new Error("Transparent color index.");if((_2!==0||g||m!==0)&&(e4[n2++]=33,e4[n2++]=249,e4[n2++]=4,e4[n2++]=_2<<2|(g===!0?1:0),e4[n2++]=255&m,e4[n2++]=m>>8&255,e4[n2++]=b2,e4[n2++]=0),e4[n2++]=44,e4[n2++]=255&t3,e4[n2++]=t3>>8&255,e4[n2++]=255&i3,e4[n2++]=i3>>8&255,e4[n2++]=255&r3,e4[n2++]=r3>>8&255,e4[n2++]=255&a3,e4[n2++]=a3>>8&255,e4[n2++]=h3===!0?128|d2-1:0,h3===!0)for(var y2=0,w=c3.length;y2>16&255,e4[n2++]=v2>>8&255,e4[n2++]=255&v2}return n2=GifWriterOutputLZWCodeStream(e4,n2,d2<2?2:d2,l3)},this.end=function(){return p2===!1&&(e4[n2++]=59,p2=!0),n2},this.getOutputBuffer=function(){return e4},this.setOutputBuffer=function(t3){e4=t3},this.getOutputBufferPosition=function(){return n2},this.setOutputBufferPosition=function(e5){n2=e5}}function GifWriterOutputLZWCodeStream(e4,t2,i2,r2){e4[t2++]=i2;var n2=t2++,a2=1<=i3;)e4[t2++]=255&c2,c2>>=8,h2-=8,t2===n2+256&&(e4[n2]=255,n2=t2++)}function d(e5){c2|=e5<=8;)e4[t2++]=255&c2,c2>>=8,h2-=8,t2===n2+256&&(e4[n2]=255,n2=t2++);l2===4096?(d(a2),l2=s2+1,u2=i2+1,m={}):(l2>=1<>7,o2=1<<(7&n2)+1;e4[t2++],e4[t2++];var s2=null,l2=null;a2&&(s2=t2,l2=o2,t2+=3*o2);var u2=!0,h2=[],c2=0,f2=null,d=0,p2=null;for(this.width=i2,this.height=r2;u2&&t2=0))throw Error("Invalid block size");if(I===0)break;t2+=I}break;case 249:if(e4[t2++]!==4||e4[t2+4]!==0)throw new Error("Invalid graphics extension block.");var m=e4[t2++];c2=e4[t2++]|e4[t2++]<<8,f2=e4[t2++],1&m||(f2=null),d=m>>2&7,t2++;break;case 254:for(;;){if(!((I=e4[t2++])>=0))throw Error("Invalid block size");if(I===0)break;t2+=I}break;default:throw new Error("Unknown graphic control label: 0x"+e4[t2-1].toString(16))}break;case 44:var _2=e4[t2++]|e4[t2++]<<8,g=e4[t2++]|e4[t2++]<<8,b2=e4[t2++]|e4[t2++]<<8,y2=e4[t2++]|e4[t2++]<<8,w=e4[t2++],v2=w>>6&1,x2=1<<(7&w)+1,E2=s2,k2=l2,S2=!1;w>>7&&(S2=!0,E2=t2,k2=x2,t2+=3*x2);var A2=t2;for(t2++;;){var I;if(!((I=e4[t2++])>=0))throw Error("Invalid block size");if(I===0)break;t2+=I}h2.push({x:_2,y:g,width:b2,height:y2,has_local_palette:S2,palette_offset:E2,palette_size:k2,data_offset:A2,data_length:t2-A2,transparent_index:f2,interlaced:!!v2,delay:c2,disposal:d});break;case 59:u2=!1;break;default:throw new Error("Unknown gif block: 0x"+e4[t2-1].toString(16))}this.numFrames=function(){return h2.length},this.loopCount=function(){return p2},this.frameInfo=function(e5){if(e5<0||e5>=h2.length)throw new Error("Frame index out of range.");return h2[e5]},this.decodeAndBlitFrameBGRA=function(t3,r3){var n3=this.frameInfo(t3),a3=n3.width*n3.height,o3=new Uint8Array(a3);GifReaderLZWOutputIndexStream(e4,n3.data_offset,o3,a3);var s3=n3.palette_offset,l3=n3.transparent_index;l3===null&&(l3=256);var u3=n3.width,h3=i2-u3,c3=u3,f3=4*(n3.y*i2+n3.x),d2=4*((n3.y+n3.height)*i2+n3.x),p3=f3,m2=4*h3;n3.interlaced===!0&&(m2+=4*i2*7);for(var _3=8,g2=0,b3=o3.length;g2=d2&&(m2=4*h3+4*i2*(_3-1),p3=f3+(u3+h3)*(_3<<1),_3>>=1)),y3===l3)p3+=4;else{var w2=e4[s3+3*y3],v3=e4[s3+3*y3+1],x3=e4[s3+3*y3+2];r3[p3++]=x3,r3[p3++]=v3,r3[p3++]=w2,r3[p3++]=255}--c3}},this.decodeAndBlitFrameRGBA=function(t3,r3){var n3=this.frameInfo(t3),a3=n3.width*n3.height,o3=new Uint8Array(a3);GifReaderLZWOutputIndexStream(e4,n3.data_offset,o3,a3);var s3=n3.palette_offset,l3=n3.transparent_index;l3===null&&(l3=256);var u3=n3.width,h3=i2-u3,c3=u3,f3=4*(n3.y*i2+n3.x),d2=4*((n3.y+n3.height)*i2+n3.x),p3=f3,m2=4*h3;n3.interlaced===!0&&(m2+=4*i2*7);for(var _3=8,g2=0,b3=o3.length;g2=d2&&(m2=4*h3+4*i2*(_3-1),p3=f3+(u3+h3)*(_3<<1),_3>>=1)),y3===l3)p3+=4;else{var w2=e4[s3+3*y3],v3=e4[s3+3*y3+1],x3=e4[s3+3*y3+2];r3[p3++]=w2,r3[p3++]=v3,r3[p3++]=x3,r3[p3++]=255}--c3}}}function GifReaderLZWOutputIndexStream(e4,t2,i2,r2){for(var n2=e4[t2++],a2=1<>=l2,h2-=l2,_2!==a2){if(_2===o2)break;for(var g=_2a2;)y2=p2[y2]>>8,++b2;var w=y2;if(f2+b2+(g!==_2?1:0)>r2)return void console.log("Warning, gif stream longer than expected.");i2[f2++]=w;var v2=f2+=b2;for(g!==_2&&(i2[f2++]=w),y2=g;b2--;)y2=p2[y2],i2[--v2]=255&y2,y2>>=8;m!==null&&s2<4096&&(p2[s2++]=m<<8|w,s2>=u2+1&&l2<12&&(++l2,u2=u2<<1|1)),m=_2}else s2=o2+1,u2=(1<<(l2=n2+1))-1,m=null}return f2!==r2&&console.log("Warning, gif stream shorter than expected."),i2}try{GifWriter_1=omggif.GifWriter=GifWriter,GifReader_1=omggif.GifReader=GifReader}catch{}var BitmapImage$2=class e{constructor(...t2){if(t2.length===0)throw new Error("constructor requires parameters");let i2=t2[0];if(i2!==null&&typeof i2=="object")if(i2 instanceof e){let e4=i2.bitmap;this.bitmap={width:e4.width,height:e4.height,data:new Buffer2(e4.width*e4.height*4)},e4.data.copy(this.bitmap.data)}else{if(!(i2.width&&i2.height&&i2.data))throw new Error("unrecognized constructor parameters");this.bitmap=i2}else{if(typeof i2!="number"||typeof t2[1]!="number")throw new Error("unrecognized constructor parameters");{let e4=i2,r2=t2[1],n2=t2[2];this.bitmap={width:e4,height:r2},Buffer2.isBuffer(n2)?this.bitmap.data=n2:(this.bitmap.data=new Buffer2(e4*r2*4),typeof n2=="number"&&this.fillRGBA(n2))}}}blit(e4,t2,i2,r2,n2,a2,o2){if(r2+a2>this.bitmap.width)throw new Error("copy exceeds width of source bitmap");if(t2+a2>e4.bitmap.width)throw new Error("copy exceeds width of target bitmap");if(n2+o2>this.bitmap.height)throw new Error("copy exceeds height of source bitmap");if(i2+o2>e4.bitmap.height)throw new Erro("copy exceeds height of target bitmap");let s2=this.bitmap.data,l2=e4.bitmap.data,u2=4*this.bitmap.width,h2=4*e4.bitmap.width,c2=4*a2,f2=n2*u2+4*r2,d=i2*h2+4*t2;for(;--o2>=0;)s2.copy(l2,d,f2,f2+c2),f2+=u2,d+=h2;return this}fillRGBA(e4){let t2=this.bitmap.data,i2=4*this.bitmap.height,r2=0;for(;r2{let n2=Math.round(.299*e4[r2]+.587*e4[r2+1]+.114*e4[r2+2]);e4[r2]=n2,e4[r2+1]=n2,e4[r2+2]=n2}),this}reframe(t2,i2,r2,n2,a2){let o2=t2<0?0:t2,s2=i2<0?0:i2,l2=r2+o2>this.bitmap.width?this.bitmap.width-o2:r2,u2=n2+s2>this.bitmap.height?this.bitmap.height-s2:n2,h2=t2<0?-t2:0,c2=i2<0?-i2:0,f2;if(a2===void 0){if(o2!==t2||s2!=i2||l2!==r2||u2!==n2)throw new GifError("fillRGBA required for this reframing");f2=new e(r2,n2)}else f2=new e(r2,n2,a2);return this.blit(f2,h2,c2,o2,s2,l2,u2),this.bitmap=f2.bitmap,this}scale(e4){if(e4===1)return;if(!Number.isInteger(e4)||e4<1)throw new Error("the scale must be an integer >= 1");let t2=this.bitmap.width,i2=this.bitmap.height,r2=t2*e4*4,n2=this.bitmap.data,a2=new Buffer2(i2*r2*e4),o2,s2=0,l2=0;for(let u2=0;u2t2 in e4?__defProp$3(e4,t2,{enumerable:!0,configurable:!0,writable:!0,value:i2}):e4[t2]=i2,__markAsModule=e4=>__defProp$3(e4,"__esModule",{value:!0}),__export$1=(e4,t2)=>{for(var i2 in t2)__defProp$3(e4,i2,{get:t2[i2],enumerable:!0})},__reExport=(e4,t2,i2,r2)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let n2 of __getOwnPropNames2(t2))!__hasOwnProp2.call(e4,n2)&&i2&&__defProp$3(e4,n2,{get:()=>t2[n2],enumerable:!(r2=__getOwnPropDesc2(t2,n2))||r2.enumerable});return e4},__toCommonJS=(e4=>(t2,i2)=>e4&&e4.get(t2)||(i2=__reExport(__markAsModule({}),t2,1),e4&&e4.set(t2,i2),i2))(typeof WeakMap<"u"?new WeakMap:0),__publicField$3=(e4,t2,i2)=>(__defNormalProp$3(e4,typeof t2!="symbol"?t2+"":t2,i2),i2),src_exports={};__export$1(src_exports,{applyPalette:()=>applyPalette,applyPaletteSync:()=>applyPaletteSync$1,buildPalette:()=>buildPalette,buildPaletteSync:()=>buildPaletteSync$1,constants:()=>constants_exports$1,conversion:()=>conversion_exports$1,distance:()=>distance_exports$1,image:()=>image_exports$1,palette:()=>palette_exports$1,quality:()=>quality_exports$1,utils:()=>utils_exports$1});var constants_exports$1={};__export$1(constants_exports$1,{bt709:()=>bt709_exports$1});var bt709_exports$1={};__export$1(bt709_exports$1,{Y:()=>Y$1,x:()=>x$2,y:()=>y$2});var Y$1=(e4=>(e4[e4.RED=.2126]="RED",e4[e4.GREEN=.7152]="GREEN",e4[e4.BLUE=.0722]="BLUE",e4[e4.WHITE=1]="WHITE",e4))(Y$1||{}),x$2=(e4=>(e4[e4.RED=.64]="RED",e4[e4.GREEN=.3]="GREEN",e4[e4.BLUE=.15]="BLUE",e4[e4.WHITE=.3127]="WHITE",e4))(x$2||{}),y$2=(e4=>(e4[e4.RED=.33]="RED",e4[e4.GREEN=.6]="GREEN",e4[e4.BLUE=.06]="BLUE",e4[e4.WHITE=.329]="WHITE",e4))(y$2||{}),conversion_exports$1={};function correctGamma$1(e4){return e4>.04045?((e4+.055)/1.055)**2.4:e4/12.92}function rgb2xyz$1(e4,t2,i2){return{x:.4124*(e4=correctGamma$1(e4/255))+.3576*(t2=correctGamma$1(t2/255))+.1805*(i2=correctGamma$1(i2/255)),y:.2126*e4+.7152*t2+.0722*i2,z:.0193*e4+.1192*t2+.9505*i2}}__export$1(conversion_exports$1,{lab2rgb:()=>lab2rgb$1,lab2xyz:()=>lab2xyz$1,rgb2hsl:()=>rgb2hsl$1,rgb2lab:()=>rgb2lab$1,rgb2xyz:()=>rgb2xyz$1,xyz2lab:()=>xyz2lab$1,xyz2rgb:()=>xyz2rgb$1});var arithmetic_exports$1={};function degrees2radians$1(e4){return e4*(Math.PI/180)}function max3$1(e4,t2,i2){let r2=e4;return r2t2&&(r2=t2),r2>i2&&(r2=i2),r2}function intInRange$1(e4,t2,i2){return e4>i2&&(e4=i2),e4255?e4=255:e4<0&&(e4=0),e4}function inRange0to255$1(e4){return e4>255?e4=255:e4<0&&(e4=0),e4}function stableSort$1(e4,t2){let i2=typeof e4[0],r2;if(i2==="number"||i2==="string"){let i3=Object.create(null);for(let t3=0,r3=e4.length;t3t2(e5,r3)||i3[e5]-i3[r3])}else{let i3=e4.slice(0);r2=e4.sort((e5,r3)=>t2(e5,r3)||i3.indexOf(e5)-i3.indexOf(r3))}return r2}function rgb2hsl$1(e4,t2,i2){let r2=min3$1(e4,t2,i2),n2=max3$1(e4,t2,i2),a2=n2-r2,o2=(r2+n2)/510,s2=0;o2>0&&o2<1&&(s2=a2/(o2<.5?n2+r2:510-n2-r2));let l2=0;return a2>0&&(l2=n2===e4?(t2-i2)/a2:n2===t2?2+(i2-e4)/a2:4+(e4-t2)/a2,l2*=60,l2<0&&(l2+=360)),{h:l2,s:s2,l:o2}}__export$1(arithmetic_exports$1,{degrees2radians:()=>degrees2radians$1,inRange0to255:()=>inRange0to255$1,inRange0to255Rounded:()=>inRange0to255Rounded$1,intInRange:()=>intInRange$1,max3:()=>max3$1,min3:()=>min3$1,stableSort:()=>stableSort$1});var refX$1=.95047,refY$1=1,refZ$1=1.08883;function pivot$1(e4){return e4>.008856?e4**(1/3):7.787*e4+16/116}function xyz2lab$1(e4,t2,i2){if(e4=pivot$1(e4/refX$1),t2=pivot$1(t2/refY$1),i2=pivot$1(i2/refZ$1),116*t2-16<0)throw new Error("xxx");return{L:Math.max(0,116*t2-16),a:500*(e4-t2),b:200*(t2-i2)}}function rgb2lab$1(e4,t2,i2){let r2=rgb2xyz$1(e4,t2,i2);return xyz2lab$1(r2.x,r2.y,r2.z)}var refX2$1=.95047,refY2$1=1,refZ2$1=1.08883;function pivot2$1(e4){return e4>.206893034?e4**3:(e4-16/116)/7.787}function lab2xyz$1(e4,t2,i2){let r2=(e4+16)/116,n2=r2-i2/200;return{x:refX2$1*pivot2$1(t2/500+r2),y:refY2$1*pivot2$1(r2),z:refZ2$1*pivot2$1(n2)}}function correctGamma2$1(e4){return e4>.0031308?1.055*e4**(1/2.4)-.055:12.92*e4}function xyz2rgb$1(e4,t2,i2){let r2=correctGamma2$1(3.2406*e4+-1.5372*t2+-.4986*i2),n2=correctGamma2$1(-.9689*e4+1.8758*t2+.0415*i2),a2=correctGamma2$1(.0557*e4+-.204*t2+1.057*i2);return{r:inRange0to255Rounded$1(255*r2),g:inRange0to255Rounded$1(255*n2),b:inRange0to255Rounded$1(255*a2)}}function lab2rgb$1(e4,t2,i2){let r2=lab2xyz$1(e4,t2,i2);return xyz2rgb$1(r2.x,r2.y,r2.z)}var distance_exports$1={};__export$1(distance_exports$1,{AbstractDistanceCalculator:()=>AbstractDistanceCalculator$1,AbstractEuclidean:()=>AbstractEuclidean$1,AbstractManhattan:()=>AbstractManhattan$1,CIE94GraphicArts:()=>CIE94GraphicArts$1,CIE94Textiles:()=>CIE94Textiles$1,CIEDE2000:()=>CIEDE2000$1,CMetric:()=>CMetric$1,Euclidean:()=>Euclidean$1,EuclideanBT709:()=>EuclideanBT709$1,EuclideanBT709NoAlpha:()=>EuclideanBT709NoAlpha$1,Manhattan:()=>Manhattan$1,ManhattanBT709:()=>ManhattanBT709$1,ManhattanNommyde:()=>ManhattanNommyde$1,PNGQuant:()=>PNGQuant$1});var AbstractDistanceCalculator$1=class{constructor(){__publicField$3(this,"_maxDistance"),__publicField$3(this,"_whitePoint"),this._setDefaults(),this.setWhitePoint(255,255,255,255)}setWhitePoint(e4,t2,i2,r2){this._whitePoint={r:e4>0?255/e4:0,g:t2>0?255/t2:0,b:i2>0?255/i2:0,a:r2>0?255/r2:0},this._maxDistance=this.calculateRaw(e4,t2,i2,r2,0,0,0,0)}calculateNormalized(e4,t2){return this.calculateRaw(e4.r,e4.g,e4.b,e4.a,t2.r,t2.g,t2.b,t2.a)/this._maxDistance}},AbstractCIE94$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=rgb2lab$1(inRange0to255$1(e4*this._whitePoint.r),inRange0to255$1(t2*this._whitePoint.g),inRange0to255$1(i2*this._whitePoint.b)),u2=rgb2lab$1(inRange0to255$1(n2*this._whitePoint.r),inRange0to255$1(a2*this._whitePoint.g),inRange0to255$1(o2*this._whitePoint.b)),h2=l2.L-u2.L,c2=l2.a-u2.a,f2=l2.b-u2.b,d=Math.sqrt(l2.a*l2.a+l2.b*l2.b),p2=d-Math.sqrt(u2.a*u2.a+u2.b*u2.b),m=c2*c2+f2*f2-p2*p2;m=m<0?0:Math.sqrt(m);let _2=(s2-r2)*this._whitePoint.a*this._kA;return Math.sqrt((h2/this._Kl)**2+(p2/(1+this._K1*d))**2+(m/(1+this._K2*d))**2+_2**2)}},CIE94Textiles$1=class extends AbstractCIE94$1{_setDefaults(){this._Kl=2,this._K1=.048,this._K2=.014,this._kA=12.5/255}},CIE94GraphicArts$1=class extends AbstractCIE94$1{_setDefaults(){this._Kl=1,this._K1=.045,this._K2=.015,this._kA=25/255}},_CIEDE2000$1=class extends AbstractDistanceCalculator$1{_setDefaults(){}static _calculatehp(e4,t2){let i2=Math.atan2(e4,t2);return i2>=0?i2:i2+_CIEDE2000$1._deg360InRad}static _calculateRT(e4,t2){let i2=t2**7,r2=2*Math.sqrt(i2/(i2+_CIEDE2000$1._pow25to7)),n2=_CIEDE2000$1._deg30InRad*Math.exp(-(((e4-_CIEDE2000$1._deg275InRad)/_CIEDE2000$1._deg25InRad)**2));return-Math.sin(2*n2)*r2}static _calculateT(e4){return 1-.17*Math.cos(e4-_CIEDE2000$1._deg30InRad)+.24*Math.cos(2*e4)+.32*Math.cos(3*e4+_CIEDE2000$1._deg6InRad)-.2*Math.cos(4*e4-_CIEDE2000$1._deg63InRad)}static _calculate_ahp(e4,t2,i2,r2){let n2=i2+r2;return e4===0?n2:t2<=_CIEDE2000$1._deg180InRad?n2/2:n2<_CIEDE2000$1._deg360InRad?(n2+_CIEDE2000$1._deg360InRad)/2:(n2-_CIEDE2000$1._deg360InRad)/2}static _calculate_dHp(e4,t2,i2,r2){let n2;return n2=e4===0?0:t2<=_CIEDE2000$1._deg180InRad?i2-r2:i2<=r2?i2-r2+_CIEDE2000$1._deg360InRad:i2-r2-_CIEDE2000$1._deg360InRad,2*Math.sqrt(e4)*Math.sin(n2/2)}calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=rgb2lab$1(inRange0to255$1(e4*this._whitePoint.r),inRange0to255$1(t2*this._whitePoint.g),inRange0to255$1(i2*this._whitePoint.b)),u2=rgb2lab$1(inRange0to255$1(n2*this._whitePoint.r),inRange0to255$1(a2*this._whitePoint.g),inRange0to255$1(o2*this._whitePoint.b)),h2=(s2-r2)*this._whitePoint.a*_CIEDE2000$1._kA,c2=this.calculateRawInLab(l2,u2);return Math.sqrt(c2+h2*h2)}calculateRawInLab(e4,t2){let i2=e4.L,r2=e4.a,n2=e4.b,a2=t2.L,o2=t2.a,s2=t2.b,l2=((Math.sqrt(r2*r2+n2*n2)+Math.sqrt(o2*o2+s2*s2))/2)**7,u2=.5*(1-Math.sqrt(l2/(l2+_CIEDE2000$1._pow25to7))),h2=(1+u2)*r2,c2=(1+u2)*o2,f2=Math.sqrt(h2*h2+n2*n2),d=Math.sqrt(c2*c2+s2*s2),p2=f2*d,m=_CIEDE2000$1._calculatehp(n2,h2),_2=_CIEDE2000$1._calculatehp(s2,c2),g=Math.abs(m-_2),b2=a2-i2,y2=d-f2,w=_CIEDE2000$1._calculate_dHp(p2,g,_2,m),v2=_CIEDE2000$1._calculate_ahp(p2,g,m,_2),x2=(f2+d)/2,E2=((i2+a2)/2-50)**2,k2=y2/(1+.045*x2),S2=w/(1+.015*_CIEDE2000$1._calculateT(v2)*x2);return(b2/(1+.015*E2/Math.sqrt(20+E2)))**2+k2**2+S2**2+_CIEDE2000$1._calculateRT(v2,x2)*k2*S2}},CIEDE2000$1=_CIEDE2000$1;__publicField$3(CIEDE2000$1,"_kA",25/255),__publicField$3(CIEDE2000$1,"_pow25to7",25**7),__publicField$3(CIEDE2000$1,"_deg360InRad",degrees2radians$1(360)),__publicField$3(CIEDE2000$1,"_deg180InRad",degrees2radians$1(180)),__publicField$3(CIEDE2000$1,"_deg30InRad",degrees2radians$1(30)),__publicField$3(CIEDE2000$1,"_deg6InRad",degrees2radians$1(6)),__publicField$3(CIEDE2000$1,"_deg63InRad",degrees2radians$1(63)),__publicField$3(CIEDE2000$1,"_deg275InRad",degrees2radians$1(275)),__publicField$3(CIEDE2000$1,"_deg25InRad",degrees2radians$1(25));var CMetric$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=(e4+n2)/2*this._whitePoint.r,u2=(e4-n2)*this._whitePoint.r,h2=(t2-a2)*this._whitePoint.g,c2=(i2-o2)*this._whitePoint.b,f2=((512+l2)*u2*u2>>8)+4*h2*h2+((767-l2)*c2*c2>>8),d=(s2-r2)*this._whitePoint.a;return Math.sqrt(f2+d*d)}_setDefaults(){}},AbstractEuclidean$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=n2-e4,u2=a2-t2,h2=o2-i2,c2=s2-r2;return Math.sqrt(this._kR*l2*l2+this._kG*u2*u2+this._kB*h2*h2+this._kA*c2*c2)}},Euclidean$1=class extends AbstractEuclidean$1{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},EuclideanBT709$1=class extends AbstractEuclidean$1{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},EuclideanBT709NoAlpha$1=class extends AbstractEuclidean$1{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=0}},AbstractManhattan$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=n2-e4,u2=a2-t2,h2=o2-i2,c2=s2-r2;return l2<0&&(l2=0-l2),u2<0&&(u2=0-u2),h2<0&&(h2=0-h2),c2<0&&(c2=0-c2),this._kR*l2+this._kG*u2+this._kB*h2+this._kA*c2}},Manhattan$1=class extends AbstractManhattan$1{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},ManhattanNommyde$1=class extends AbstractManhattan$1{_setDefaults(){this._kR=.4984,this._kG=.8625,this._kB=.2979,this._kA=1}},ManhattanBT709$1=class extends AbstractManhattan$1{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},PNGQuant$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=(s2-r2)*this._whitePoint.a;return this._colordifferenceCh(e4*this._whitePoint.r,n2*this._whitePoint.r,l2)+this._colordifferenceCh(t2*this._whitePoint.g,a2*this._whitePoint.g,l2)+this._colordifferenceCh(i2*this._whitePoint.b,o2*this._whitePoint.b,l2)}_colordifferenceCh(e4,t2,i2){let r2=e4-t2,n2=r2+i2;return r2*r2+n2*n2}_setDefaults(){}},palette_exports$1={};__export$1(palette_exports$1,{AbstractPaletteQuantizer:()=>AbstractPaletteQuantizer$1,ColorHistogram:()=>ColorHistogram$1,NeuQuant:()=>NeuQuant$1,NeuQuantFloat:()=>NeuQuantFloat$1,RGBQuant:()=>RGBQuant$1,WuColorCube:()=>WuColorCube$1,WuQuant:()=>WuQuant$1});var AbstractPaletteQuantizer$1=class{quantizeSync(){for(let e4 of this.quantize())if(e4.palette)return e4.palette;throw new Error("unreachable")}},Point$1=class{constructor(){__publicField$3(this,"r"),__publicField$3(this,"g"),__publicField$3(this,"b"),__publicField$3(this,"a"),__publicField$3(this,"uint32"),__publicField$3(this,"rgba"),this.uint32=-1>>>0,this.r=this.g=this.b=this.a=0,this.rgba=new Array(4),this.rgba[0]=0,this.rgba[1]=0,this.rgba[2]=0,this.rgba[3]=0}static createByQuadruplet(e4){let t2=new Point$1;return t2.r=0|e4[0],t2.g=0|e4[1],t2.b=0|e4[2],t2.a=0|e4[3],t2._loadUINT32(),t2._loadQuadruplet(),t2}static createByRGBA(e4,t2,i2,r2){let n2=new Point$1;return n2.r=0|e4,n2.g=0|t2,n2.b=0|i2,n2.a=0|r2,n2._loadUINT32(),n2._loadQuadruplet(),n2}static createByUint32(e4){let t2=new Point$1;return t2.uint32=e4>>>0,t2._loadRGBA(),t2._loadQuadruplet(),t2}from(e4){this.r=e4.r,this.g=e4.g,this.b=e4.b,this.a=e4.a,this.uint32=e4.uint32,this.rgba[0]=e4.r,this.rgba[1]=e4.g,this.rgba[2]=e4.b,this.rgba[3]=e4.a}getLuminosity(e4){let t2=this.r,i2=this.g,r2=this.b;return e4&&(t2=Math.min(255,255-this.a+this.a*t2/255),i2=Math.min(255,255-this.a+this.a*i2/255),r2=Math.min(255,255-this.a+this.a*r2/255)),.2126*t2+.7152*i2+.0722*r2}_loadUINT32(){this.uint32=(this.a<<24|this.b<<16|this.g<<8|this.r)>>>0}_loadRGBA(){this.r=255&this.uint32,this.g=this.uint32>>>8&255,this.b=this.uint32>>>16&255,this.a=this.uint32>>>24&255}_loadQuadruplet(){this.rgba[0]=this.r,this.rgba[1]=this.g,this.rgba[2]=this.b,this.rgba[3]=this.a}},PointContainer$1=class{constructor(){__publicField$3(this,"_pointArray"),__publicField$3(this,"_width"),__publicField$3(this,"_height"),this._width=0,this._height=0,this._pointArray=[]}getWidth(){return this._width}getHeight(){return this._height}setWidth(e4){this._width=e4}setHeight(e4){this._height=e4}getPointArray(){return this._pointArray}clone(){let e4=new PointContainer$1;e4._width=this._width,e4._height=this._height;for(let t2=0,i2=this._pointArray.length;t2=n2&&e4=0;t2--)if(e4.uint32===this._pointArray[t2].uint32)return!0;return!1}getNearestColor(e4,t2){return this._pointArray[0|this._getNearestIndex(e4,t2)]}getPointContainer(){return this._pointContainer}_nearestPointFromCache(e4){return typeof this._i32idx[e4]=="number"?this._i32idx[e4]:-1}_getNearestIndex(e4,t2){let i2=this._nearestPointFromCache(""+t2.uint32);if(i2>=0)return i2;let r2=Number.MAX_VALUE;i2=0;for(let n2=0,a2=this._pointArray.length;n2{let i2=rgb2hsl$1(e4.r,e4.g,e4.b),r2=rgb2hsl$1(t2.r,t2.g,t2.b),n2=e4.r===e4.g&&e4.g===e4.b?0:1+hueGroup$1(i2.h,hueGroups$1),a2=(t2.r===t2.g&&t2.g===t2.b?0:1+hueGroup$1(r2.h,hueGroups$1))-n2;if(a2)return-a2;let o2=e4.getLuminosity(!0),s2=t2.getLuminosity(!0);if(s2-o2!=0)return s2-o2;let l2=(100*r2.s|0)-(100*i2.s|0);return l2?-l2:0})}},utils_exports$1={};__export$1(utils_exports$1,{HueStatistics:()=>HueStatistics$1,Palette:()=>Palette$1,Point:()=>Point$1,PointContainer:()=>PointContainer$1,ProgressTracker:()=>ProgressTracker$1,arithmetic:()=>arithmetic_exports$1});var HueGroup$1=class{constructor(){__publicField$3(this,"num",0),__publicField$3(this,"cols",[])}},HueStatistics$1=class{constructor(e4,t2){__publicField$3(this,"_numGroups"),__publicField$3(this,"_minCols"),__publicField$3(this,"_stats"),__publicField$3(this,"_groupsFull"),this._numGroups=e4,this._minCols=t2,this._stats=[];for(let t3=0;t3<=e4;t3++)this._stats[t3]=new HueGroup$1;this._groupsFull=0}check(e4){this._groupsFull===this._numGroups+1&&(this.check=()=>{});let t2=255&e4,i2=e4>>>8&255,r2=e4>>>16&255,n2=t2===i2&&i2===r2?0:1+hueGroup$1(rgb2hsl$1(t2,i2,r2).h,this._numGroups),a2=this._stats[n2],o2=this._minCols;a2.num++,a2.num>o2||(a2.num===o2&&this._groupsFull++,a2.num<=o2&&this._stats[n2].cols.push(e4))}injectIntoDictionary(e4){for(let t2=0;t2<=this._numGroups;t2++)this._stats[t2].num<=this._minCols&&this._stats[t2].cols.forEach(t3=>{e4[t3]?e4[t3]++:e4[t3]=1})}injectIntoArray(e4){for(let t2=0;t2<=this._numGroups;t2++)this._stats[t2].num<=this._minCols&&this._stats[t2].cols.forEach(t3=>{e4.indexOf(t3)===-1&&e4.push(t3)})}},_ProgressTracker$1=class{constructor(e4,t2){__publicField$3(this,"progress"),__publicField$3(this,"_step"),__publicField$3(this,"_range"),__publicField$3(this,"_last"),__publicField$3(this,"_progressRange"),this._range=e4,this._progressRange=t2,this._step=Math.max(1,this._range/(_ProgressTracker$1.steps+1)|0),this._last=-this._step,this.progress=0}shouldNotify(e4){return e4-this._last>=this._step&&(this._last=e4,this.progress=Math.min(this._progressRange*this._last/this._range,this._progressRange),!0)}},ProgressTracker$1=_ProgressTracker$1;__publicField$3(ProgressTracker$1,"steps",100);var networkBiasShift$1=3,Neuron$1=class{constructor(e4){__publicField$3(this,"r"),__publicField$3(this,"g"),__publicField$3(this,"b"),__publicField$3(this,"a"),this.r=this.g=this.b=this.a=e4}toPoint(){return Point$1.createByRGBA(this.r>>networkBiasShift$1,this.g>>networkBiasShift$1,this.b>>networkBiasShift$1,this.a>>networkBiasShift$1)}subtract(e4,t2,i2,r2){this.r-=0|e4,this.g-=0|t2,this.b-=0|i2,this.a-=0|r2}},_NeuQuant$1=class extends AbstractPaletteQuantizer$1{constructor(e4,t2=256){super(),__publicField$3(this,"_pointArray"),__publicField$3(this,"_networkSize"),__publicField$3(this,"_network"),__publicField$3(this,"_sampleFactor"),__publicField$3(this,"_radPower"),__publicField$3(this,"_freq"),__publicField$3(this,"_bias"),__publicField$3(this,"_distance"),this._distance=e4,this._pointArray=[],this._sampleFactor=1,this._networkSize=t2,this._distance.setWhitePoint(255<>3)*_NeuQuant$1._radiusBias,l2=s2>>_NeuQuant$1._radiusBiasShift;l2<=1&&(l2=0);for(let e5=0;e5>>0;n2=t2<_NeuQuant$1._minpicturebytes?1:t2%_NeuQuant$1._prime1!=0?_NeuQuant$1._prime1:t2%_NeuQuant$1._prime2!=0?_NeuQuant$1._prime2:t2%_NeuQuant$1._prime3!=0?_NeuQuant$1._prime3:_NeuQuant$1._prime4;let u2=new ProgressTracker$1(r2,99);for(let e5=0,h2=0;e5=t2&&(h2-=t2),e5++,a2===0&&(a2=1),e5%a2==0){o2-=o2/i2|0,s2-=s2/_NeuQuant$1._radiusDecrease|0,l2=s2>>_NeuQuant$1._radiusBiasShift,l2<=1&&(l2=0);for(let e6=0;e6>>0}}}_buildPalette(){let e4=new Palette$1;return this._network.forEach(t2=>{e4.add(t2.toPoint())}),e4.sort(),e4}_alterNeighbour(e4,t2,i2,r2,n2,a2){let o2=t2-e4;o2<-1&&(o2=-1);let s2=t2+e4;s2>this._networkSize&&(s2=this._networkSize);let l2=t2+1,u2=t2-1,h2=1;for(;l2o2;){let e5=this._radPower[h2++]/_NeuQuant$1._alphaRadBias;if(l2o2){let t3=this._network[u2--];t3.subtract(e5*(t3.r-n2),e5*(t3.g-r2),e5*(t3.b-i2),e5*(t3.a-a2))}}}_alterSingle(e4,t2,i2,r2,n2,a2){e4/=_NeuQuant$1._initAlpha;let o2=this._network[t2];o2.subtract(e4*(o2.r-n2),e4*(o2.g-r2),e4*(o2.b-i2),e4*(o2.a-a2))}_contest(e4,t2,i2,r2){let n2=1020<>_NeuQuant$1._initialBiasShift-networkBiasShift$1);f2>_NeuQuant$1._betaShift;this._freq[u2]-=d,this._bias[u2]+=d<<_NeuQuant$1._gammaShift}return this._freq[s2]+=_NeuQuant$1._beta,this._bias[s2]-=_NeuQuant$1._betaGamma,l2}},NeuQuant$1=_NeuQuant$1;__publicField$3(NeuQuant$1,"_prime1",499),__publicField$3(NeuQuant$1,"_prime2",491),__publicField$3(NeuQuant$1,"_prime3",487),__publicField$3(NeuQuant$1,"_prime4",503),__publicField$3(NeuQuant$1,"_minpicturebytes",_NeuQuant$1._prime4),__publicField$3(NeuQuant$1,"_nCycles",100),__publicField$3(NeuQuant$1,"_initialBiasShift",16),__publicField$3(NeuQuant$1,"_initialBias",1<<_NeuQuant$1._initialBiasShift),__publicField$3(NeuQuant$1,"_gammaShift",10),__publicField$3(NeuQuant$1,"_betaShift",10),__publicField$3(NeuQuant$1,"_beta",_NeuQuant$1._initialBias>>_NeuQuant$1._betaShift),__publicField$3(NeuQuant$1,"_betaGamma",_NeuQuant$1._initialBias<<_NeuQuant$1._gammaShift-_NeuQuant$1._betaShift),__publicField$3(NeuQuant$1,"_radiusBiasShift",6),__publicField$3(NeuQuant$1,"_radiusBias",1<<_NeuQuant$1._radiusBiasShift),__publicField$3(NeuQuant$1,"_radiusDecrease",30),__publicField$3(NeuQuant$1,"_alphaBiasShift",10),__publicField$3(NeuQuant$1,"_initAlpha",1<<_NeuQuant$1._alphaBiasShift),__publicField$3(NeuQuant$1,"_radBiasShift",8),__publicField$3(NeuQuant$1,"_radBias",1<<_NeuQuant$1._radBiasShift),__publicField$3(NeuQuant$1,"_alphaRadBiasShift",_NeuQuant$1._alphaBiasShift+_NeuQuant$1._radBiasShift),__publicField$3(NeuQuant$1,"_alphaRadBias",1<<_NeuQuant$1._alphaRadBiasShift);var networkBiasShift2$1=3,NeuronFloat$1=class{constructor(e4){__publicField$3(this,"r"),__publicField$3(this,"g"),__publicField$3(this,"b"),__publicField$3(this,"a"),this.r=this.g=this.b=this.a=e4}toPoint(){return Point$1.createByRGBA(this.r>>networkBiasShift2$1,this.g>>networkBiasShift2$1,this.b>>networkBiasShift2$1,this.a>>networkBiasShift2$1)}subtract(e4,t2,i2,r2){this.r-=e4,this.g-=t2,this.b-=i2,this.a-=r2}},_NeuQuantFloat$1=class extends AbstractPaletteQuantizer$1{constructor(e4,t2=256){super(),__publicField$3(this,"_pointArray"),__publicField$3(this,"_networkSize"),__publicField$3(this,"_network"),__publicField$3(this,"_sampleFactor"),__publicField$3(this,"_radPower"),__publicField$3(this,"_freq"),__publicField$3(this,"_bias"),__publicField$3(this,"_distance"),this._distance=e4,this._pointArray=[],this._sampleFactor=1,this._networkSize=t2,this._distance.setWhitePoint(255<>3)*_NeuQuantFloat$1._radiusBias,l2=s2>>_NeuQuantFloat$1._radiusBiasShift;l2<=1&&(l2=0);for(let e5=0;e5=t2&&(h2-=t2),e5++,a2===0&&(a2=1),e5%a2==0){o2-=o2/i2,s2-=s2/_NeuQuantFloat$1._radiusDecrease,l2=s2>>_NeuQuantFloat$1._radiusBiasShift,l2<=1&&(l2=0);for(let e6=0;e6{e4.add(t2.toPoint())}),e4.sort(),e4}_alterNeighbour(e4,t2,i2,r2,n2,a2){let o2=t2-e4;o2<-1&&(o2=-1);let s2=t2+e4;s2>this._networkSize&&(s2=this._networkSize);let l2=t2+1,u2=t2-1,h2=1;for(;l2o2;){let e5=this._radPower[h2++]/_NeuQuantFloat$1._alphaRadBias;if(l2o2){let t3=this._network[u2--];t3.subtract(e5*(t3.r-n2),e5*(t3.g-r2),e5*(t3.b-i2),e5*(t3.a-a2))}}}_alterSingle(e4,t2,i2,r2,n2,a2){e4/=_NeuQuantFloat$1._initAlpha;let o2=this._network[t2];o2.subtract(e4*(o2.r-n2),e4*(o2.g-r2),e4*(o2.b-i2),e4*(o2.a-a2))}_contest(e4,t2,i2,r2){let n2=1020<>_NeuQuantFloat$1._initialBiasShift-networkBiasShift2$1);f2>_NeuQuantFloat$1._betaShift;this._freq[u2]-=d,this._bias[u2]+=d<<_NeuQuantFloat$1._gammaShift}return this._freq[s2]+=_NeuQuantFloat$1._beta,this._bias[s2]-=_NeuQuantFloat$1._betaGamma,l2}},NeuQuantFloat$1=_NeuQuantFloat$1;__publicField$3(NeuQuantFloat$1,"_prime1",499),__publicField$3(NeuQuantFloat$1,"_prime2",491),__publicField$3(NeuQuantFloat$1,"_prime3",487),__publicField$3(NeuQuantFloat$1,"_prime4",503),__publicField$3(NeuQuantFloat$1,"_minpicturebytes",_NeuQuantFloat$1._prime4),__publicField$3(NeuQuantFloat$1,"_nCycles",100),__publicField$3(NeuQuantFloat$1,"_initialBiasShift",16),__publicField$3(NeuQuantFloat$1,"_initialBias",1<<_NeuQuantFloat$1._initialBiasShift),__publicField$3(NeuQuantFloat$1,"_gammaShift",10),__publicField$3(NeuQuantFloat$1,"_betaShift",10),__publicField$3(NeuQuantFloat$1,"_beta",_NeuQuantFloat$1._initialBias>>_NeuQuantFloat$1._betaShift),__publicField$3(NeuQuantFloat$1,"_betaGamma",_NeuQuantFloat$1._initialBias<<_NeuQuantFloat$1._gammaShift-_NeuQuantFloat$1._betaShift),__publicField$3(NeuQuantFloat$1,"_radiusBiasShift",6),__publicField$3(NeuQuantFloat$1,"_radiusBias",1<<_NeuQuantFloat$1._radiusBiasShift),__publicField$3(NeuQuantFloat$1,"_radiusDecrease",30),__publicField$3(NeuQuantFloat$1,"_alphaBiasShift",10),__publicField$3(NeuQuantFloat$1,"_initAlpha",1<<_NeuQuantFloat$1._alphaBiasShift),__publicField$3(NeuQuantFloat$1,"_radBiasShift",8),__publicField$3(NeuQuantFloat$1,"_radBias",1<<_NeuQuantFloat$1._radBiasShift),__publicField$3(NeuQuantFloat$1,"_alphaRadBiasShift",_NeuQuantFloat$1._alphaBiasShift+_NeuQuantFloat$1._radBiasShift),__publicField$3(NeuQuantFloat$1,"_alphaRadBias",1<<_NeuQuantFloat$1._alphaRadBiasShift);var _ColorHistogram$1=class{constructor(e4,t2){__publicField$3(this,"_method"),__publicField$3(this,"_hueStats"),__publicField$3(this,"_histogram"),__publicField$3(this,"_initColors"),__publicField$3(this,"_minHueCols"),this._method=e4,this._minHueCols=t2<<2,this._initColors=t2<<2,this._hueStats=new HueStatistics$1(_ColorHistogram$1._hueGroups,this._minHueCols),this._histogram=Object.create(null)}sample(e4){switch(this._method){case 1:this._colorStats1D(e4);break;case 2:this._colorStats2D(e4)}}getImportanceSortedColorsIDXI32(){let e4=stableSort$1(Object.keys(this._histogram),(e5,t3)=>this._histogram[t3]-this._histogram[e5]);if(e4.length===0)return[];let t2;switch(this._method){case 1:let i2=Math.min(e4.length,this._initColors),r2=e4[i2-1],n2=this._histogram[r2];t2=e4.slice(0,i2);let a2=i2,o2=e4.length;for(;a2+e5)}_colorStats1D(e4){let t2=this._histogram,i2=e4.getPointArray(),r2=i2.length;for(let e5=0;e5{let i3=Math.round(e5.w*e5.h/o2)*_ColorHistogram$1._boxPixels;i3<2&&(i3=2);let n3={};this._iterateBox(e5,t2,e6=>{let t3=r2[e6].uint32;this._hueStats.check(t3),t3 in l2?l2[t3]++:t3 in n3?++n3[t3]>=i3&&(l2[t3]=n3[t3]):n3[t3]=1})}),this._hueStats.injectIntoDictionary(l2)}_iterateBox(e4,t2,i2){let r2=e4,n2=r2.y*t2+r2.x,a2=(r2.y+r2.h-1)*t2+(r2.x+r2.w-1),o2=t2-r2.w+1,s2=0,l2=n2;do i2.call(this,l2),l2+=++s2%r2.w==0?o2:1;while(l2<=a2)}_makeBoxes(e4,t2,i2,r2){let n2=e4%i2,a2=t2%r2,o2=e4-n2,s2=t2-a2,l2=[];for(let u2=0;u2this._colors;){a2.length=0;for(let e5=0;e53*this._colors?this._initialDistance:this._distanceIncrement}if(o2t3.distance-e6.distance);let e5=0;for(;o2=0;e5--)r2[e5]===0&&(e5!==u2-1&&(i2[e5]=i2[u2-1]),--u2);i2.length=u2,t2.sort(),yield{palette:t2,progress:100}}};function createArray1D$1(e4){let t2=[];for(let i2=0;i20){let i2=this._sums[t2],r2=this._reds[t2]/i2,n2=this._greens[t2]/i2,a2=this._blues[t2]/i2,o2=this._alphas[t2]/i2,s2=Point$1.createByRGBA(0|r2,0|n2,0|a2,0|o2);e4.add(s2)}e4.sort(),yield{palette:e4,progress:100}}*_preparePalette(){yield*this._calculateMoments();let e4=0,t2=createArray1D$1(this._colors);for(let i3=1;i31?this._calculateVariance(this._cubes[e4]):0,t2[i3]=this._cubes[i3].volume>1?this._calculateVariance(this._cubes[i3]):0):(t2[e4]=0,i3--),e4=0;let r3=t2[0];for(let n3=1;n3<=i3;++n3)t2[n3]>r3&&(r3=t2[n3],e4=n3);if(r3<=0){this._colors=i3+1;break}}let i2=[],r2=[],n2=[],a2=[];for(let e5=0;e50?(i2[e5]=_WuQuant$1._volume(this._cubes[e5],this._momentsRed)/t3|0,r2[e5]=_WuQuant$1._volume(this._cubes[e5],this._momentsGreen)/t3|0,n2[e5]=_WuQuant$1._volume(this._cubes[e5],this._momentsBlue)/t3|0,a2[e5]=_WuQuant$1._volume(this._cubes[e5],this._momentsAlpha)/t3|0):(i2[e5]=0,r2[e5]=0,n2[e5]=0,a2[e5]=0)}this._reds=createArray1D$1(this._colors+1),this._greens=createArray1D$1(this._colors+1),this._blues=createArray1D$1(this._colors+1),this._alphas=createArray1D$1(this._colors+1),this._sums=createArray1D$1(this._colors+1);for(let e5=0,t3=this._pixels.length;e5>t2),r2=1+(e4.g>>t2),n2=1+(e4.b>>t2),a2=1+(e4.a>>t2);this._weights[a2][i2][r2][n2]++,this._momentsRed[a2][i2][r2][n2]+=e4.r,this._momentsGreen[a2][i2][r2][n2]+=e4.g,this._momentsBlue[a2][i2][r2][n2]+=e4.b,this._momentsAlpha[a2][i2][r2][n2]+=e4.a,this._moments[a2][i2][r2][n2]+=this._table[e4.r]+this._table[e4.g]+this._table[e4.b]+this._table[e4.a]}*_calculateMoments(){let e4=[],t2=[],i2=[],r2=[],n2=[],a2=[],o2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),s2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),l2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),u2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),h2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),c2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),f2=0,d=new ProgressTracker$1(this._alphaMaxSideIndex*this._maxSideIndex,99);for(let p2=1;p2<=this._alphaMaxSideIndex;++p2){fillArray3D$1(o2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(s2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(l2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(u2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(h2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(c2,this._sideSize,this._sideSize,this._sideSize,0);for(let m=1;m<=this._maxSideIndex;++m,++f2){d.shouldNotify(f2)&&(yield{progress:d.progress}),fillArray1D$1(e4,this._sideSize,0),fillArray1D$1(t2,this._sideSize,0),fillArray1D$1(i2,this._sideSize,0),fillArray1D$1(r2,this._sideSize,0),fillArray1D$1(n2,this._sideSize,0),fillArray1D$1(a2,this._sideSize,0);for(let f3=1;f3<=this._maxSideIndex;++f3){let d2=0,_2=0,g=0,b2=0,y2=0,w=0;for(let v2=1;v2<=this._maxSideIndex;++v2)d2+=this._weights[p2][m][f3][v2],_2+=this._momentsRed[p2][m][f3][v2],g+=this._momentsGreen[p2][m][f3][v2],b2+=this._momentsBlue[p2][m][f3][v2],y2+=this._momentsAlpha[p2][m][f3][v2],w+=this._moments[p2][m][f3][v2],e4[v2]+=d2,t2[v2]+=_2,i2[v2]+=g,r2[v2]+=b2,n2[v2]+=y2,a2[v2]+=w,o2[m][f3][v2]=o2[m-1][f3][v2]+e4[v2],s2[m][f3][v2]=s2[m-1][f3][v2]+t2[v2],l2[m][f3][v2]=l2[m-1][f3][v2]+i2[v2],u2[m][f3][v2]=u2[m-1][f3][v2]+r2[v2],h2[m][f3][v2]=h2[m-1][f3][v2]+n2[v2],c2[m][f3][v2]=c2[m-1][f3][v2]+a2[v2],this._weights[p2][m][f3][v2]=this._weights[p2-1][m][f3][v2]+o2[m][f3][v2],this._momentsRed[p2][m][f3][v2]=this._momentsRed[p2-1][m][f3][v2]+s2[m][f3][v2],this._momentsGreen[p2][m][f3][v2]=this._momentsGreen[p2-1][m][f3][v2]+l2[m][f3][v2],this._momentsBlue[p2][m][f3][v2]=this._momentsBlue[p2-1][m][f3][v2]+u2[m][f3][v2],this._momentsAlpha[p2][m][f3][v2]=this._momentsAlpha[p2-1][m][f3][v2]+h2[m][f3][v2],this._moments[p2][m][f3][v2]=this._moments[p2-1][m][f3][v2]+c2[m][f3][v2]}}}}static _volumeFloat(e4,t2){return t2[e4.alphaMaximum][e4.redMaximum][e4.greenMaximum][e4.blueMaximum]-t2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]-t2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]+t2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-t2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMaximum]+t2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]+t2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]-t2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(t2[e4.alphaMaximum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]-t2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]-t2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+t2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]-t2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]+t2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]+t2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]-t2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum])}static _volume(e4,t2){return 0|_WuQuant$1._volumeFloat(e4,t2)}static _top(e4,t2,i2,r2){let n2;switch(t2){case _WuQuant$1._alpha:n2=r2[i2][e4.redMaximum][e4.greenMaximum][e4.blueMaximum]-r2[i2][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]-r2[i2][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]+r2[i2][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(r2[i2][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]-r2[i2][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]-r2[i2][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]+r2[i2][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);break;case _WuQuant$1._red:n2=r2[e4.alphaMaximum][i2][e4.greenMaximum][e4.blueMaximum]-r2[e4.alphaMaximum][i2][e4.greenMinimum][e4.blueMaximum]-r2[e4.alphaMinimum][i2][e4.greenMaximum][e4.blueMaximum]+r2[e4.alphaMinimum][i2][e4.greenMinimum][e4.blueMaximum]-(r2[e4.alphaMaximum][i2][e4.greenMaximum][e4.blueMinimum]-r2[e4.alphaMaximum][i2][e4.greenMinimum][e4.blueMinimum]-r2[e4.alphaMinimum][i2][e4.greenMaximum][e4.blueMinimum]+r2[e4.alphaMinimum][i2][e4.greenMinimum][e4.blueMinimum]);break;case _WuQuant$1._green:n2=r2[e4.alphaMaximum][e4.redMaximum][i2][e4.blueMaximum]-r2[e4.alphaMaximum][e4.redMinimum][i2][e4.blueMaximum]-r2[e4.alphaMinimum][e4.redMaximum][i2][e4.blueMaximum]+r2[e4.alphaMinimum][e4.redMinimum][i2][e4.blueMaximum]-(r2[e4.alphaMaximum][e4.redMaximum][i2][e4.blueMinimum]-r2[e4.alphaMaximum][e4.redMinimum][i2][e4.blueMinimum]-r2[e4.alphaMinimum][e4.redMaximum][i2][e4.blueMinimum]+r2[e4.alphaMinimum][e4.redMinimum][i2][e4.blueMinimum]);break;case _WuQuant$1._blue:n2=r2[e4.alphaMaximum][e4.redMaximum][e4.greenMaximum][i2]-r2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][i2]-r2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][i2]+r2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][i2]-(r2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][i2]-r2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][i2]-r2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][i2]+r2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][i2]);break;default:throw new Error("impossible")}return 0|n2}static _bottom(e4,t2,i2){switch(t2){case _WuQuant$1._alpha:return-i2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMaximum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(-i2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);case _WuQuant$1._red:return-i2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(-i2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);case _WuQuant$1._green:return-i2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(-i2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);case _WuQuant$1._blue:return-i2[e4.alphaMaximum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]+i2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]-i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]-(-i2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);default:return 0}}_calculateVariance(e4){let t2=_WuQuant$1._volume(e4,this._momentsRed),i2=_WuQuant$1._volume(e4,this._momentsGreen),r2=_WuQuant$1._volume(e4,this._momentsBlue),n2=_WuQuant$1._volume(e4,this._momentsAlpha);return _WuQuant$1._volumeFloat(e4,this._moments)-(t2*t2+i2*i2+r2*r2+n2*n2)/_WuQuant$1._volume(e4,this._weights)}_maximize(e4,t2,i2,r2,n2,a2,o2,s2,l2){let u2=0|_WuQuant$1._bottom(e4,t2,this._momentsRed),h2=0|_WuQuant$1._bottom(e4,t2,this._momentsGreen),c2=0|_WuQuant$1._bottom(e4,t2,this._momentsBlue),f2=0|_WuQuant$1._bottom(e4,t2,this._momentsAlpha),d=0|_WuQuant$1._bottom(e4,t2,this._weights),p2=0,m=-1;for(let _2=i2;_2p2&&(p2=t3,m=_2))}}return{max:p2,position:m}}_cut(e4,t2){let i2,r2=_WuQuant$1._volume(e4,this._momentsRed),n2=_WuQuant$1._volume(e4,this._momentsGreen),a2=_WuQuant$1._volume(e4,this._momentsBlue),o2=_WuQuant$1._volume(e4,this._momentsAlpha),s2=_WuQuant$1._volume(e4,this._weights),l2=this._maximize(e4,_WuQuant$1._red,e4.redMinimum+1,e4.redMaximum,r2,n2,a2,o2,s2),u2=this._maximize(e4,_WuQuant$1._green,e4.greenMinimum+1,e4.greenMaximum,r2,n2,a2,o2,s2),h2=this._maximize(e4,_WuQuant$1._blue,e4.blueMinimum+1,e4.blueMaximum,r2,n2,a2,o2,s2),c2=this._maximize(e4,_WuQuant$1._alpha,e4.alphaMinimum+1,e4.alphaMaximum,r2,n2,a2,o2,s2);if(c2.max>=l2.max&&c2.max>=u2.max&&c2.max>=h2.max){if(i2=_WuQuant$1._alpha,c2.position<0)return!1}else i2=l2.max>=c2.max&&l2.max>=u2.max&&l2.max>=h2.max?_WuQuant$1._red:u2.max>=c2.max&&u2.max>=l2.max&&u2.max>=h2.max?_WuQuant$1._green:_WuQuant$1._blue;switch(t2.redMaximum=e4.redMaximum,t2.greenMaximum=e4.greenMaximum,t2.blueMaximum=e4.blueMaximum,t2.alphaMaximum=e4.alphaMaximum,i2){case _WuQuant$1._red:t2.redMinimum=e4.redMaximum=l2.position,t2.greenMinimum=e4.greenMinimum,t2.blueMinimum=e4.blueMinimum,t2.alphaMinimum=e4.alphaMinimum;break;case _WuQuant$1._green:t2.greenMinimum=e4.greenMaximum=u2.position,t2.redMinimum=e4.redMinimum,t2.blueMinimum=e4.blueMinimum,t2.alphaMinimum=e4.alphaMinimum;break;case _WuQuant$1._blue:t2.blueMinimum=e4.blueMaximum=h2.position,t2.redMinimum=e4.redMinimum,t2.greenMinimum=e4.greenMinimum,t2.alphaMinimum=e4.alphaMinimum;break;case _WuQuant$1._alpha:t2.alphaMinimum=e4.alphaMaximum=c2.position,t2.blueMinimum=e4.blueMinimum,t2.redMinimum=e4.redMinimum,t2.greenMinimum=e4.greenMinimum}return e4.volume=(e4.redMaximum-e4.redMinimum)*(e4.greenMaximum-e4.greenMinimum)*(e4.blueMaximum-e4.blueMinimum)*(e4.alphaMaximum-e4.alphaMinimum),t2.volume=(t2.redMaximum-t2.redMinimum)*(t2.greenMaximum-t2.greenMinimum)*(t2.blueMaximum-t2.blueMinimum)*(t2.alphaMaximum-t2.alphaMinimum),!0}_initialize(e4){this._colors=e4,this._cubes=[];for(let t2=0;t2AbstractImageQuantizer$1,ErrorDiffusionArray:()=>ErrorDiffusionArray$1,ErrorDiffusionArrayKernel:()=>ErrorDiffusionArrayKernel$1,ErrorDiffusionRiemersma:()=>ErrorDiffusionRiemersma$1,NearestColor:()=>NearestColor$1});var AbstractImageQuantizer$1=class{quantizeSync(e4,t2){for(let i2 of this.quantize(e4,t2))if(i2.pointContainer)return i2.pointContainer;throw new Error("unreachable")}},NearestColor$1=class extends AbstractImageQuantizer$1{constructor(e4){super(),__publicField$3(this,"_distance"),this._distance=e4}*quantize(e4,t2){let i2=e4.getPointArray(),r2=e4.getWidth(),n2=e4.getHeight(),a2=new ProgressTracker$1(n2,99);for(let e5=0;e5(e4[e4.FloydSteinberg=0]="FloydSteinberg",e4[e4.FalseFloydSteinberg=1]="FalseFloydSteinberg",e4[e4.Stucki=2]="Stucki",e4[e4.Atkinson=3]="Atkinson",e4[e4.Jarvis=4]="Jarvis",e4[e4.Burkes=5]="Burkes",e4[e4.Sierra=6]="Sierra",e4[e4.TwoSierra=7]="TwoSierra",e4[e4.SierraLite=8]="SierraLite",e4))(ErrorDiffusionArrayKernel$1||{}),ErrorDiffusionArray$1=class extends AbstractImageQuantizer$1{constructor(e4,t2,i2=!0,r2=0,n2=!1){super(),__publicField$3(this,"_minColorDistance"),__publicField$3(this,"_serpentine"),__publicField$3(this,"_kernel"),__publicField$3(this,"_calculateErrorLikeGIMP"),__publicField$3(this,"_distance"),this._setKernel(t2),this._distance=e4,this._minColorDistance=r2,this._serpentine=i2,this._calculateErrorLikeGIMP=n2}*quantize(e4,t2){let i2=e4.getPointArray(),r2=new Point$1,n2=e4.getWidth(),a2=e4.getHeight(),o2=[],s2=1,l2=1;for(let e5 of this._kernel){let t3=e5[2]+1;l2=0&&i3+u3=0&&r3+e5t2&&(e4.length=t2);let i2=e4.length;for(let t3=0;t3=0&&e4.x=0&&e4.y{let s2=i2[e5+n3*r2],{r:l2,g:u2,b:h2,a:c2}=s2;for(let e6=0;e6ssim$1});var K1$1=.01,K2$1=.03;function ssim$1(e4,t2){if(e4.getHeight()!==t2.getHeight()||e4.getWidth()!==t2.getWidth())throw new Error("Images have different sizes!");let i2=(255*K1$1)**2,r2=(255*K2$1)**2,n2=0,a2=0;return iterate$1(e4,t2,(e5,t3,o2,s2)=>{let l2=0,u2=0,h2=0;for(let i3=0;i3process.nextTick(e4):e4=>setTimeout(e4,0);function buildPaletteSync$1(e4,{colorDistanceFormula:t2,paletteQuantization:i2,colors:r2}={}){let n2=paletteQuantizationToPaletteQuantizer$1(colorDistanceFormulaToColorDistance$1(t2),i2,r2);return e4.forEach(e5=>n2.sample(e5)),n2.quantizeSync()}async function buildPalette(e4,{colorDistanceFormula:t2,paletteQuantization:i2,colors:r2,onProgress:n2}={}){return new Promise((a2,o2)=>{let s2=paletteQuantizationToPaletteQuantizer$1(colorDistanceFormulaToColorDistance$1(t2),i2,r2),l2;e4.forEach(e5=>s2.sample(e5));let u2=s2.quantize(),h2=()=>{try{let e5=u2.next();e5.done?a2(l2):(e5.value.palette&&(l2=e5.value.palette),n2&&n2(e5.value.progress),setImmediateImpl(h2))}catch(e5){o2(e5)}};setImmediateImpl(h2)})}function applyPaletteSync$1(e4,t2,{colorDistanceFormula:i2,imageQuantization:r2}={}){return imageQuantizationToImageQuantizer$1(colorDistanceFormulaToColorDistance$1(i2),r2).quantizeSync(e4,t2)}async function applyPalette(e4,t2,{colorDistanceFormula:i2,imageQuantization:r2,onProgress:n2}={}){return new Promise((a2,o2)=>{let s2,l2=imageQuantizationToImageQuantizer$1(colorDistanceFormulaToColorDistance$1(i2),r2).quantize(e4,t2),u2=()=>{try{let e5=l2.next();e5.done?a2(s2):(e5.value.pointContainer&&(s2=e5.value.pointContainer),n2&&n2(e5.value.progress),setImmediateImpl(u2))}catch(e5){o2(e5)}};setImmediateImpl(u2)})}function colorDistanceFormulaToColorDistance$1(e4="euclidean-bt709"){switch(e4){case"cie94-graphic-arts":return new CIE94GraphicArts$1;case"cie94-textiles":return new CIE94Textiles$1;case"ciede2000":return new CIEDE2000$1;case"color-metric":return new CMetric$1;case"euclidean":return new Euclidean$1;case"euclidean-bt709":return new EuclideanBT709$1;case"euclidean-bt709-noalpha":return new EuclideanBT709NoAlpha$1;case"manhattan":return new Manhattan$1;case"manhattan-bt709":return new ManhattanBT709$1;case"manhattan-nommyde":return new ManhattanNommyde$1;case"pngquant":return new PNGQuant$1;default:throw new Error(`Unknown colorDistanceFormula ${e4}`)}}function imageQuantizationToImageQuantizer$1(e4,t2="floyd-steinberg"){switch(t2){case"nearest":return new NearestColor$1(e4);case"riemersma":return new ErrorDiffusionRiemersma$1(e4);case"floyd-steinberg":return new ErrorDiffusionArray$1(e4,0);case"false-floyd-steinberg":return new ErrorDiffusionArray$1(e4,1);case"stucki":return new ErrorDiffusionArray$1(e4,2);case"atkinson":return new ErrorDiffusionArray$1(e4,3);case"jarvis":return new ErrorDiffusionArray$1(e4,4);case"burkes":return new ErrorDiffusionArray$1(e4,5);case"sierra":return new ErrorDiffusionArray$1(e4,6);case"two-sierra":return new ErrorDiffusionArray$1(e4,7);case"sierra-lite":return new ErrorDiffusionArray$1(e4,8);default:throw new Error(`Unknown imageQuantization ${t2}`)}}function paletteQuantizationToPaletteQuantizer$1(e4,t2="wuquant",i2=256){switch(t2){case"neuquant":return new NeuQuant$1(e4,i2);case"rgbquant":return new RGBQuant$1(e4,i2);case"wuquant":return new WuQuant$1(e4,i2);case"neuquant-float":return new NeuQuantFloat$1(e4,i2);default:throw new Error(`Unknown paletteQuantization ${t2}`)}}var imageQ=__toCommonJS(src_exports),gifframe={},BitmapImage$1=bitmapimage,GifFrame$1=class e2 extends BitmapImage$1{constructor(...t2){if(super(...t2),t2[0]instanceof e2){let e4=t2[0];this.xOffset=e4.xOffset,this.yOffset=e4.yOffset,this.disposalMethod=e4.disposalMethod,this.delayCentisecs=e4.delayCentisecs,this.interlaced=e4.interlaced}else{let i2=t2[t2.length-1],r2={};typeof i2!="object"||i2 instanceof BitmapImage$1||(r2=i2),this.xOffset=r2.xOffset||0,this.yOffset=r2.yOffset||0,this.disposalMethod=r2.disposalMethod!==void 0?r2.disposalMethod:e2.DisposeToBackgroundColor,this.delayCentisecs=r2.delayCentisecs||8,this.interlaced=r2.interlaced||!1}}getPalette(){let e4=new Set,t2=this.bitmap.data,i2=0,r2=!1;for(;i2>8&16777215;e4.add(r3)}i2+=4}let n2=new Array(e4.size),a2=e4.values();for(i2=0;i2e5-t3);let o2=n2.length;return r2&&++o2,{colors:n2,usesTransparency:r2,indexCount:o2}}},hasRequiredGifutil,hasRequiredGifcodec;function requireGifutil(){return hasRequiredGifutil||(hasRequiredGifutil=1,function(e4){let t2=require$$0,i2=imageQ,r2=bitmapimage,{GifFrame:n2}=gifframe,{GifError:a2}=gif$1,{GifCodec:o2}=requireGifcodec(),s2=[".jpg",".jpeg",".png",".bmp"],l2=new o2;function u2(e5,t3,r3,n3,a3){let o3=Array.isArray(e5)?e5:[e5];if(a3){if(["FloydSteinberg","FalseFloydSteinberg","Stucki","Atkinson","Jarvis","Burkes","Sierra","TwoSierra","SierraLite"].indexOf(a3.ditherAlgorithm)<0)throw new Error(`Invalid ditherAlgorithm '${a3.ditherAlgorithm}'`);a3.serpentine===void 0&&(a3.serpentine=!0),a3.minimumColorDistanceToDither===void 0&&(a3.minimumColorDistanceToDither=0),a3.calculateErrorLikeGIMP===void 0&&(a3.calculateErrorLikeGIMP=!1)}let s3=new i2.distance.Euclidean,l3=new i2.palette[t3](s3,r3,n3),u3;u3=a3?new i2.image.ErrorDiffusionArray(s3,i2.image.ErrorDiffusionArrayKernel[a3.ditherAlgorithm],a3.serpentine,a3.minimumColorDistanceToDither,a3.calculateErrorLikeGIMP):new i2.image.NearestColor(s3);let h2=[];o3.forEach(e6=>{let t4=e6.bitmap.data,r4=new ArrayBuffer(t4.length),n4=new Uint32Array(r4);for(let e7=0,i3=0;e7{t3.push(new n2(e6))}),t3},e4.getColorInfo=function(e5,t3){let i3=!1,r3=[];for(let t4=0;t4256)throw new a2(`Frame ${t4} uses more than 256 color indexes`);r3.push(n4)}if(t3===0)return{usesTransparency:i3,palettes:r3};let n3=new Set;r3.forEach(e6=>{e6.colors.forEach(e7=>{n3.add(e7)})});let o3=n3.size;if(i3&&++o3,t3&&o3>t3)return{usesTransparency:i3,palettes:r3};let s3=new Array(n3.size),l3=n3.values();for(let e6=0;e6e6-t4),{colors:s3,indexCount:o3,usesTransparency:i3,palettes:r3}},e4.copyAsJimp=function(t3,i3){return e4.shareAsJimp(t3,new r2(i3))},e4.getMaxDimensions=function(e5){let t3=0,i3=0;return e5.forEach(e6=>{let r3=e6.xOffset+e6.bitmap.width;r3>t3&&(t3=r3);let n3=e6.yOffset+e6.bitmap.height;n3>i3&&(i3=n3)}),{maxWidth:t3,maxHeight:i3}},e4.quantizeDekker=function(e5,t3,i3){u2(e5,"NeuQuantFloat",t3=t3||256,0,i3)},e4.quantizeSorokin=function(e5,t3,i3,r3){let n3;switch(t3=t3||256,i3=i3||"min-pop"){case"min-pop":n3=2;break;case"top-pop":n3=1;break;default:throw new Error(`Invalid quantizeSorokin histogram '${i3}'`)}u2(e5,"RGBQuant",t3,n3,r3)},e4.quantizeWu=function(e5,t3,i3,r3){if(t3=t3||256,(i3=i3||5)<1||i3>8)throw new Error("Invalid quantization quality");u2(e5,"WuQuant",t3,i3,r3)},e4.read=function(e5,i3){return i3=i3||l2,Buffer2.isBuffer(e5)?i3.decodeGif(e5):function(e6){return new Promise((i4,r3)=>{t2.readFile(e6,(e7,t3)=>e7?r3(e7):i4(t3))})}(e5).then(e6=>i3.decodeGif(e6))},e4.shareAsJimp=function(e5,t3){let i3=new e5(t3.bitmap.width,t3.bitmap.height,0);return i3.bitmap.data=t3.bitmap.data,i3},e4.write=function(e5,i3,r3,n3){n3=n3||l2;let a3=e5.match(/\.[a-zA-Z]+$/);if(a3!==null&&s2.includes(a3[0].toLowerCase()))throw new Error(`GIF '${e5}' has an unexpected suffix`);return n3.encodeGif(i3,r3).then(i4=>function(e6,i5){return new Promise((r4,n4)=>{t2.writeFile(e6,i5,e7=>e7?n4(e7):r4())})}(e5,i4.buffer).then(()=>i4))}}(gifutil)),gifutil}function requireGifcodec(){if(hasRequiredGifcodec)return gifcodec;hasRequiredGifcodec=1;let e4=omggif,{Gif:t2,GifError:i2}=gif$1;function r2(){let e5=requireGifutil();return r2=function(){return e5},e5}let{GifFrame:n2}=gifframe;function a2(e5,t3){let i3=e5.indexOf(t3);return i3===-1?null:i3}function o2(e5,t3){for(var i3,r3=0,n3=e5.length-1;r3<=n3;)if(e5[i3=Math.floor((r3+n3)/2)]>t3)n3=i3-1;else{if(!(e5[i3]r3;)r3<<=1;t3.length=r3,t3.fill(0,i3)}function l2(e5,t3){let i3=e5.bitmap.width*e5.bitmap.height;return i3=Math.ceil(i3*t3/8),i3+=Math.ceil(i3/255),100+i3+768}function u2(e5){let t3=e5.indexCount,i3=0;for(--t3;t3;)++i3,t3>>=1;return i3>0?i3:1}function h2(e5,t3,r3,n3,l3){if(r3.interlaced)throw new i2("writing interlaced GIFs is not supported");let u3=function(e6,t4,r4){let n4=r4.colors,s3=n4.length<=8?a2:o2,l4=t4.bitmap.data,u4=new Buffer2(l4.length/4),h4=n4.length,c2=0,f2=0;for(;c2>8&16777215;u4[f2]=s3(n4,e7)}else u4[f2]=h4;c2+=4,++f2}if(r4.usesTransparency){if(h4===256)throw new i2(`Frame ${e6} already has 256 colorsand so can't use transparency`)}else h4=null;return{buffer:u4,transparentIndex:h4}}(t3,r3,n3),h3={delay:r3.delayCentisecs,disposal:r3.disposalMethod,transparent:u3.transparentIndex};l3&&(s2(n3),h3.palette=n3.colors);try{let t4,i3=e5.getOutputBuffer(),n4=e5.getOutputBufferPosition(),a3=!0;for(;a3;)if(t4=e5.addFrame(r3.xOffset,r3.yOffset,r3.bitmap.width,r3.bitmap.height,u3.buffer,h3),a3=!1,t4>=i3.length-1){let t5=new Buffer2(1.5*i3.length);i3.copy(t5),e5.setOutputBuffer(t5),e5.setOutputBufferPosition(n4),i3=t5,a3=!0}return i3}catch(e6){throw new i2(e6)}}return gifcodec.GifCodec=class{constructor(e5={}){this._transparentRGB=null,typeof e5.transparentRGB=="number"&&e5.transparentRGB!==0&&(this._transparentRGBA=256*e5.transparentRGB),this._testInitialBufferSize=0}decodeGif(r3){try{let n3;try{n3=new e4.GifReader(r3)}catch(e5){throw new i2(e5)}let a3=n3.numFrames(),o3=[],s3={width:n3.width,height:n3.height,loops:n3.loopCount(),usesTransparency:!1};for(let e5=0;e5a3.width)for(let t4=0;t40)return this._testInitialBufferSize;let i3=968,r3=u2(e5);return t3.forEach(e6=>{i3+=l2(e6,r3)}),i3}_getSizeEstimateLocal(e5,t3){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let i3=200;for(let r3=0;r3{let t2=new src.BitmapImage(e4);src.GifUtil.quantizeDekker(t2,256);let i2=new src.GifFrame(e4);return(await new src.GifCodec().encodeGif([i2],{})).buffer},decode:e4=>{let t2=new omggif.GifReader(e4),i2=Buffer2.alloc(t2.width*t2.height*4);return t2.decodeAndBlitFrameRGBA(0,i2),{data:i2,width:t2.width,height:t2.height}}}}var encoder={exports:{}};(function(e4){function t2(e5){var t3,i2,r2,n2,a2,o2=Math.floor,s2=new Array(64),l2=new Array(64),u2=new Array(64),h2=new Array(64),c2=new Array(65535),f2=new Array(65535),d=new Array(64),p2=new Array(64),m=[],_2=0,g=7,b2=new Array(64),y2=new Array(64),w=new Array(64),v2=new Array(256),x2=new Array(2048),E2=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],k2=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S2=[0,1,2,3,4,5,6,7,8,9,10,11],A2=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],I=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],M2=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],T2=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],B2=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function C2(e6,t4){for(var i3=0,r3=0,n3=new Array,a3=1;a3<=16;a3++){for(var o3=1;o3<=e6[a3];o3++)n3[t4[r3]]=[],n3[t4[r3]][0]=i3,n3[t4[r3]][1]=a3,r3++,i3++;i3*=2}return n3}function R2(e6){for(var t4=e6[0],i3=e6[1]-1;i3>=0;)t4&1<>8&255),z2(255&e6)}function N2(e6,t4,i3,r3,n3){for(var a3,o3=n3[0],s3=n3[240],l3=function(e7,t5){var i4,r4,n4,a4,o4,s4,l4,u4,h4,c3,f3=0;for(h4=0;h4<8;++h4){i4=e7[f3],r4=e7[f3+1],n4=e7[f3+2],a4=e7[f3+3],o4=e7[f3+4],s4=e7[f3+5],l4=e7[f3+6];var p3=i4+(u4=e7[f3+7]),m3=i4-u4,_4=r4+l4,g3=r4-l4,b4=n4+s4,y4=n4-s4,w3=a4+o4,v3=a4-o4,x3=p3+w3,E3=p3-w3,k3=_4+b4,S3=_4-b4;e7[f3]=x3+k3,e7[f3+4]=x3-k3;var A3=.707106781*(S3+E3);e7[f3+2]=E3+A3,e7[f3+6]=E3-A3;var I2=.382683433*((x3=v3+y4)-(S3=g3+m3)),M3=.5411961*x3+I2,T3=1.306562965*S3+I2,P2=.707106781*(k3=y4+g3),B3=m3+P2,C3=m3-P2;e7[f3+5]=C3+M3,e7[f3+3]=C3-M3,e7[f3+1]=B3+T3,e7[f3+7]=B3-T3,f3+=8}for(f3=0,h4=0;h4<8;++h4){i4=e7[f3],r4=e7[f3+8],n4=e7[f3+16],a4=e7[f3+24],o4=e7[f3+32],s4=e7[f3+40],l4=e7[f3+48];var R3=i4+(u4=e7[f3+56]),z3=i4-u4,F2=r4+l4,N3=r4-l4,O3=n4+s4,D=n4-s4,$=a4+o4,L2=a4-o4,U=R3+$,Z=R3-$,j=F2+O3,G=F2-O3;e7[f3]=U+j,e7[f3+32]=U-j;var H=.707106781*(G+Z);e7[f3+16]=Z+H,e7[f3+48]=Z-H;var Q=.382683433*((U=L2+D)-(G=N3+z3)),W=.5411961*U+Q,q=1.306562965*G+Q,V=.707106781*(j=D+N3),Y2=z3+V,K=z3-V;e7[f3+40]=K+W,e7[f3+24]=K-W,e7[f3+8]=Y2+q,e7[f3+56]=Y2-q,f3++}for(h4=0;h4<64;++h4)c3=e7[h4]*t5[h4],d[h4]=c3>0?c3+.5|0:c3-.5|0;return d}(e6,t4),u3=0;u3<64;++u3)p2[E2[u3]]=l3[u3];var h3=p2[0]-i3;i3=p2[0],h3==0?R2(r3[0]):(R2(r3[f2[a3=32767+h3]]),R2(c2[a3]));for(var m2=63;m2>0&&p2[m2]==0;m2--);if(m2==0)return R2(o3),i3;for(var _3,g2=1;g2<=m2;){for(var b3=g2;p2[g2]==0&&g2<=m2;++g2);var y3=g2-b3;if(y3>=16){_3=y3>>4;for(var w2=1;w2<=_3;++w2)R2(s3);y3&=15}a3=32767+p2[g2],R2(n3[(y3<<4)+f2[a3]]),R2(c2[a3]),g2++}return m2!=63&&R2(o3),i3}function O2(e6){e6<=0&&(e6=1),e6>100&&(e6=100),a2!=e6&&(function(e7){for(var t4=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],i3=0;i3<64;i3++){var r3=o2((t4[i3]*e7+50)/100);r3<1?r3=1:r3>255&&(r3=255),s2[E2[i3]]=r3}for(var n3=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a3=0;a3<64;a3++){var c3=o2((n3[a3]*e7+50)/100);c3<1?c3=1:c3>255&&(c3=255),l2[E2[a3]]=c3}for(var f3=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],d2=0,p3=0;p3<8;p3++)for(var m2=0;m2<8;m2++)u2[d2]=1/(s2[E2[d2]]*f3[p3]*f3[m2]*8),h2[d2]=1/(l2[E2[d2]]*f3[p3]*f3[m2]*8),d2++}(e6<50?Math.floor(5e3/e6):Math.floor(200-2*e6)),a2=e6)}this.encode=function(e6,a3){var o3;new Date().getTime(),a3&&O2(a3),m=new Array,_2=0,g=7,F(65496),F(65504),F(16),z2(74),z2(70),z2(73),z2(70),z2(0),z2(1),z2(1),z2(0),F(1),F(1),z2(0),z2(0),(o3=e6.comments)!==void 0&&o3.constructor===Array&&o3.forEach(e7=>{if(typeof e7=="string"){F(65534);var t4,i3=e7.length;for(F(i3+2),t4=0;t4>3)*Q+(L2=4*(7&Z)),W+U>=H&&($-=Q*(W+1+U-H)),p3+L2>=Q&&($-=p3+L2-Q+4),v3=j[$++],E3=j[$++],C3=j[$++],b2[Z]=(x2[v3]+x2[E3+256|0]+x2[C3+512|0]>>16)-128,y2[Z]=(x2[v3+768|0]+x2[E3+1024|0]+x2[C3+1280|0]>>16)-128,w[Z]=(x2[v3+1280|0]+x2[E3+1536|0]+x2[C3+1792|0]>>16)-128;c3=N2(b2,u2,c3,t3,r2),f3=N2(y2,h2,f3,i2,n2),d2=N2(w,h2,d2,i2,n2),p3+=32}W+=8}if(g>=0){var q=[];q[1]=g+1,q[0]=(1<0&&!e5[o3-1];)o3--;a3.push({children:[],index:0});var s3,l3=a3[0];for(i3=0;i30;){if(a3.length===0)throw new Error("Could not recreate Huffman Table");l3=a3.pop()}for(l3.index++,a3.push(l3);a3.length<=i3;)a3.push(s3={children:[],index:0}),l3.children[l3.index]=s3.children,l3=s3;n3++}i3+10)return m2--,p3>>m2&1;if((p3=t3[i3++])==255){var e5=t3[i3++];if(e5)throw new Error("unexpected marker: "+(p3<<8|e5).toString(16))}return m2=7,p3>>>7}function g(e5){for(var t4,i4=e5;(t4=_3())!==null;){if(typeof(i4=i4[t4])=="number")return i4;if(typeof i4!="object")throw new Error("invalid huffman sequence")}return null}function b2(e5){for(var t4=0;e5>0;){var i4=_3();if(i4===null)return;t4=t4<<1|i4,e5--}return t4}function y2(e5){var t4=b2(e5);return t4>=1<0)v2--;else for(var r4=o3,n4=s3;r4<=n4;){var a4=g(t4.huffmanTableAC),l4=15&a4,h4=a4>>4;if(l4!==0)i4[e4[r4+=h4]]=y2(l4)*(1<>4,f4===0)a4<15?(v2=b2(a4)+(1<>4;if(s4!==0)i4[e4[a4+=l4]]=y2(s4),a4++;else{if(l4<15)break;a4+=16}}};var C2,R2,z2,F,N2=0;for(R2=B2==1?n3[0].blocksPerLine*n3[0].blocksPerColumn:c3*r3.mcusPerColumn,a3||(a3=R2);N2=65488&&C2<=65495))break;i3+=2}return i3-d2}function f2(e5,u3){var h3,c3,f3=[],d2=u3.blocksPerLine,p3=u3.blocksPerColumn,m2=d2<<3,g=new Int32Array(64),b2=new Uint8Array(64);function y2(e6,h4,c4){var f4,d3,p4,m3,_3,g2,b3,y3,w2,v3,x3=u3.quantizationTable,E3=c4;for(v3=0;v3<64;v3++)E3[v3]=e6[v3]*x3[v3];for(v3=0;v3<8;++v3){var k3=8*v3;E3[1+k3]!=0||E3[2+k3]!=0||E3[3+k3]!=0||E3[4+k3]!=0||E3[5+k3]!=0||E3[6+k3]!=0||E3[7+k3]!=0?(f4=s2*E3[0+k3]+128>>8,d3=s2*E3[4+k3]+128>>8,p4=E3[2+k3],m3=E3[6+k3],_3=l2*(E3[1+k3]-E3[7+k3])+128>>8,y3=l2*(E3[1+k3]+E3[7+k3])+128>>8,g2=E3[3+k3]<<4,b3=E3[5+k3]<<4,w2=f4-d3+1>>1,f4=f4+d3+1>>1,d3=w2,w2=p4*o2+m3*a2+128>>8,p4=p4*a2-m3*o2+128>>8,m3=w2,w2=_3-b3+1>>1,_3=_3+b3+1>>1,b3=w2,w2=y3+g2+1>>1,g2=y3-g2+1>>1,y3=w2,w2=f4-m3+1>>1,f4=f4+m3+1>>1,m3=w2,w2=d3-p4+1>>1,d3=d3+p4+1>>1,p4=w2,w2=_3*n2+y3*r2+2048>>12,_3=_3*r2-y3*n2+2048>>12,y3=w2,w2=g2*i2+b3*t2+2048>>12,g2=g2*t2-b3*i2+2048>>12,b3=w2,E3[0+k3]=f4+y3,E3[7+k3]=f4-y3,E3[1+k3]=d3+b3,E3[6+k3]=d3-b3,E3[2+k3]=p4+g2,E3[5+k3]=p4-g2,E3[3+k3]=m3+_3,E3[4+k3]=m3-_3):(w2=s2*E3[0+k3]+512>>10,E3[0+k3]=w2,E3[1+k3]=w2,E3[2+k3]=w2,E3[3+k3]=w2,E3[4+k3]=w2,E3[5+k3]=w2,E3[6+k3]=w2,E3[7+k3]=w2)}for(v3=0;v3<8;++v3){var S3=v3;E3[8+S3]!=0||E3[16+S3]!=0||E3[24+S3]!=0||E3[32+S3]!=0||E3[40+S3]!=0||E3[48+S3]!=0||E3[56+S3]!=0?(f4=s2*E3[0+S3]+2048>>12,d3=s2*E3[32+S3]+2048>>12,p4=E3[16+S3],m3=E3[48+S3],_3=l2*(E3[8+S3]-E3[56+S3])+2048>>12,y3=l2*(E3[8+S3]+E3[56+S3])+2048>>12,g2=E3[24+S3],b3=E3[40+S3],w2=f4-d3+1>>1,f4=f4+d3+1>>1,d3=w2,w2=p4*o2+m3*a2+2048>>12,p4=p4*a2-m3*o2+2048>>12,m3=w2,w2=_3-b3+1>>1,_3=_3+b3+1>>1,b3=w2,w2=y3+g2+1>>1,g2=y3-g2+1>>1,y3=w2,w2=f4-m3+1>>1,f4=f4+m3+1>>1,m3=w2,w2=d3-p4+1>>1,d3=d3+p4+1>>1,p4=w2,w2=_3*n2+y3*r2+2048>>12,_3=_3*r2-y3*n2+2048>>12,y3=w2,w2=g2*i2+b3*t2+2048>>12,g2=g2*t2-b3*i2+2048>>12,b3=w2,E3[0+S3]=f4+y3,E3[56+S3]=f4-y3,E3[8+S3]=d3+b3,E3[48+S3]=d3-b3,E3[16+S3]=p4+g2,E3[40+S3]=p4-g2,E3[24+S3]=m3+_3,E3[32+S3]=m3-_3):(w2=s2*c4[v3+0]+8192>>14,E3[0+S3]=w2,E3[8+S3]=w2,E3[16+S3]=w2,E3[24+S3]=w2,E3[32+S3]=w2,E3[40+S3]=w2,E3[48+S3]=w2,E3[56+S3]=w2)}for(v3=0;v3<64;++v3){var A2=128+(E3[v3]+8>>4);h4[v3]=A2<0?0:A2>255?255:A2}}_2(m2*p3*8);for(var w=0;w255?255:e5}u2.prototype={load:function(e5){var t3=new XMLHttpRequest;t3.open("GET",e5,!0),t3.responseType="arraybuffer",t3.onload=function(){var e6=new Uint8Array(t3.response||t3.mozResponseArrayBuffer);this.parse(e6),this.onload&&this.onload()}.bind(this),t3.send(null)},parse:function(t3){var i3=1e3*this.opts.maxResolutionInMP*1e3,r3=0;function n3(){var e5=t3[r3]<<8|t3[r3+1];return r3+=2,e5}function a3(e5){var t4,i4,r4=1,n4=1;for(i4 in e5.components)e5.components.hasOwnProperty(i4)&&(r4<(t4=e5.components[i4]).h&&(r4=t4.h),n4>4){if(S2>>4!=1)throw new Error("DQT: invalid table spec");for(q=0;q<64;q++)A2[e4[q]]=n3()}else for(q=0;q<64;q++)A2[e4[q]]=t3[r3++];m2[15&S2]=A2}break;case 65472:case 65473:case 65474:n3(),(o3={}).extended=w===65473,o3.progressive=w===65474,o3.precision=t3[r3++],o3.scanLines=n3(),o3.samplesPerLine=n3(),o3.components={},o3.componentsOrder=[];var I=o3.scanLines*o3.samplesPerLine;if(I>i3){var M2=Math.ceil((I-i3)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${M2}MP`)}var T2,P=t3[r3++];for(Q=0;Q>4,C2=15&t3[r3+1],R2=t3[r3+2];if(B2<=0||C2<=0)throw new Error("Invalid sampling factor, expected values above 0");o3.componentsOrder.push(T2),o3.components[T2]={h:B2,v:C2,quantizationIdx:R2},r3+=3}a3(o3),g.push(o3);break;case 65476:var z2=n3();for(Q=2;Q>4?b2:y2)[15&F]=h2(N2,D)}break;case 65501:n3(),s3=n3();break;case 65500:n3(),n3();break;case 65498:n3();var $=t3[r3++],L2=[];for(Q=0;Q<$;Q++){V=o3.components[t3[r3++]];var U=t3[r3++];V.huffmanTableDC=y2[U>>4],V.huffmanTableAC=b2[15&U],L2.push(V)}var Z=t3[r3++],j=t3[r3++],G=t3[r3++],H=c2(t3,r3,o3,L2,s3,Z,j,G>>4,15&G,this.opts);r3+=H;break;case 65535:t3[r3]!==255&&r3--;break;default:if(t3[r3-3]==255&&t3[r3-2]>=192&&t3[r3-2]<=254){r3-=3;break}if(w===224||w==225){if(v2!==-1)throw new Error(`first unknown JPEG marker at offset ${v2.toString(16)}, second unknown JPEG marker ${w.toString(16)} at offset ${(r3-1).toString(16)}`);v2=r3-1;let e5=n3();if(t3[r3+e5-2]===255){r3+=e5-2;break}}throw new Error("unknown JPEG marker "+w.toString(16))}w=n3()}if(g.length!=1)throw new Error("only single frame JPEGs supported");for(var Q=0;Qm){var i3=Math.ceil((t3-m)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${i3}MB`)}p2=t3}return u2.resetMaxMemoryUsage=function(e5){p2=0,m=e5},u2.getBytesAllocated=function(){return p2},u2.requestMemoryAllocation=_2,u2}(),module.exports=function(e4,t2={}){var i2={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512,...t2},r2=new Uint8Array(e4),n2=new JpegImage;n2.opts=i2,JpegImage.resetMaxMemoryUsage(1024*i2.maxMemoryUsageInMB*1024),n2.parse(r2);var a2=i2.formatAsRGBA?4:3,o2=n2.width*n2.height*a2;try{JpegImage.requestMemoryAllocation(o2);var s2={width:n2.width,height:n2.height,exifBuffer:n2.exifBuffer,data:i2.useTArray?new Uint8Array(o2):Buffer2.alloc(o2)};n2.comments.length>0&&(s2.comments=n2.comments)}catch(e5){throw e5 instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+o2):e5 instanceof ReferenceError&&e5.message==="Buffer is not defined"?new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true"):e5}return n2.copyToImageData(s2,i2.formatAsRGBA),s2};var decoderExports=decoder.exports,encode=encoderExports,decode=decoderExports,jpegJs={encode,decode},JPEG=getDefaultExportFromCjs(jpegJs);function jpeg$2(){return{mime:"image/jpeg",encode:(e4,{quality:t2=100}={})=>JPEG.encode(e4,t2).data,decode:(e4,t2)=>JPEG.decode(e4,t2)}}function commonjsRequire(e4){throw new Error('Could not dynamically require "'+e4+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var browser$1={exports:{}};browser$1.exports=function(){function e4(t2,i2,r2){function n2(o3,s2){if(!i2[o3]){if(!t2[o3]){var l2=typeof commonjsRequire=="function"&&commonjsRequire;if(!s2&&l2)return l2(o3,!0);if(a2)return a2(o3,!0);var u2=new Error("Cannot find module '"+o3+"'");throw u2.code="MODULE_NOT_FOUND",u2}var h2=i2[o3]={exports:{}};t2[o3][0].call(h2.exports,function(e5){return n2(t2[o3][1][e5]||e5)},h2,h2.exports,e4,t2,i2,r2)}return i2[o3].exports}for(var a2=typeof commonjsRequire=="function"&&commonjsRequire,o2=0;o2=t4.length)throw new Error("Ran out of data");let n3=t4[r3];e5[i3]=n3,e5[i3+1]=n3,e5[i3+2]=n3,e5[i3+3]=t4[r3+1]},function(e5,t4,i3,r3){if(r3+2>=t4.length)throw new Error("Ran out of data");e5[i3]=t4[r3],e5[i3+1]=t4[r3+1],e5[i3+2]=t4[r3+2],e5[i3+3]=255},function(e5,t4,i3,r3){if(r3+3>=t4.length)throw new Error("Ran out of data");e5[i3]=t4[r3],e5[i3+1]=t4[r3+1],e5[i3+2]=t4[r3+2],e5[i3+3]=t4[r3+3]}],a2=[function(){},function(e5,t4,i3,r3){let n3=t4[0];e5[i3]=n3,e5[i3+1]=n3,e5[i3+2]=n3,e5[i3+3]=r3},function(e5,t4,i3){let r3=t4[0];e5[i3]=r3,e5[i3+1]=r3,e5[i3+2]=r3,e5[i3+3]=t4[1]},function(e5,t4,i3,r3){e5[i3]=t4[0],e5[i3+1]=t4[1],e5[i3+2]=t4[2],e5[i3+3]=r3},function(e5,t4,i3){e5[i3]=t4[0],e5[i3+1]=t4[1],e5[i3+2]=t4[2],e5[i3+3]=t4[3]}];function o2(e5,t4){let i3=[],r3=0;function n3(){if(r3===e5.length)throw new Error("Ran out of data");let n4,a3,o3,s3,l3,u2,h2,c2,f2=e5[r3];switch(r3++,t4){default:throw new Error("unrecognised depth");case 16:h2=e5[r3],r3++,i3.push((f2<<8)+h2);break;case 4:h2=15&f2,c2=f2>>4,i3.push(c2,h2);break;case 2:l3=3&f2,u2=f2>>2&3,h2=f2>>4&3,c2=f2>>6&3,i3.push(c2,h2,u2,l3);break;case 1:n4=1&f2,a3=f2>>1&1,o3=f2>>2&1,s3=f2>>3&1,l3=f2>>4&1,u2=f2>>5&1,h2=f2>>6&1,c2=f2>>7&1,i3.push(c2,h2,u2,l3,s3,o3,a3,n4)}}return{get:function(e6){for(;i3.length0&&(this._paused=!1,this.emit("drain"))}.bind(this))},o2.prototype.write=function(e5,t3){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let i4;return i4=r2.isBuffer(e5)?e5:r2.from(e5,t3||this._encoding),this._buffers.push(i4),this._buffered+=i4.length,this._process(),this._reads&&this._reads.length===0&&(this._paused=!0),this.writable&&!this._paused},o2.prototype.end=function(e5,t3){e5&&this.write(e5,t3),this.writable=!1,this._buffers&&(this._buffers.length===0?this._end():(this._buffers.push(null),this._process()))},o2.prototype.destroySoon=o2.prototype.end,o2.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()},o2.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},o2.prototype._processReadAllowingLess=function(e5){this._reads.shift();let t3=this._buffers[0];t3.length>e5.length?(this._buffered-=e5.length,this._buffers[0]=t3.slice(e5.length),e5.func.call(this,t3.slice(0,e5.length))):(this._buffered-=t3.length,this._buffers.shift(),e5.func.call(this,t3))},o2.prototype._processRead=function(e5){this._reads.shift();let t3=0,i4=0,n3=r2.alloc(e5.length);for(;t30&&this._buffers.splice(0,i4),this._buffered-=e5.length,e5.func.call(this,n3)},o2.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let e5=this._reads[0];if(e5.allowLess)this._processReadAllowingLess(e5);else{if(!(this._buffered>=e5.length))break;this._processRead(e5)}}this._buffers&&!this.writable&&this._end()}catch(e5){this.emit("error",e5)}}}).call(this)}).call(this,e4("_process"),e4("buffer").Buffer)},{_process:63,buffer:32,stream:65,util:84}],4:[function(e4,t2,i2){t2.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},{}],5:[function(e4,t2,i2){let r2=[];(function(){for(let e5=0;e5<256;e5++){let t3=e5;for(let e6=0;e6<8;e6++)1&t3?t3=3988292384^t3>>>1:t3>>>=1;r2[e5]=t3}})();let n2=t2.exports=function(){this._crc=-1};n2.prototype.write=function(e5){for(let t3=0;t3>>8;return!0},n2.prototype.crc32=function(){return~this._crc},n2.crc32=function(e5){let t3=-1;for(let i3=0;i3>>8;return~t3}},{}],6:[function(e4,t2,i2){(function(i3){(function(){let r2=e4("./paeth-predictor");function n2(e5,t3,i4,r3,n3){for(let a3=0;a3=a3?e5[t3+o3-a3]:0,s3=e5[t3+o3]-i5;r3[n3+o3]=s3}}function s2(e5,t3,i4,r3){let n3=0;for(let a3=0;a3=r3?e5[t3+a3-r3]:0,o3=e5[t3+a3]-i5;n3+=Math.abs(o3)}return n3}function l2(e5,t3,i4,r3,n3){for(let a3=0;a30?e5[t3+a3-i4]:0,s3=e5[t3+a3]-o3;r3[n3+a3]=s3}}function u2(e5,t3,i4){let r3=0,n3=t3+i4;for(let a3=t3;a30?e5[a3-i4]:0,o3=e5[a3]-n4;r3+=Math.abs(o3)}return r3}function h2(e5,t3,i4,r3,n3,a3){for(let o3=0;o3=a3?e5[t3+o3-a3]:0,l3=t3>0?e5[t3+o3-i4]:0,u3=e5[t3+o3]-(s3+l3>>1);r3[n3+o3]=u3}}function c2(e5,t3,i4,r3){let n3=0;for(let a3=0;a3=r3?e5[t3+a3-r3]:0,s3=t3>0?e5[t3+a3-i4]:0,l3=e5[t3+a3]-(o3+s3>>1);n3+=Math.abs(l3)}return n3}function f2(e5,t3,i4,n3,a3,o3){for(let s3=0;s3=o3?e5[t3+s3-o3]:0,u3=t3>0?e5[t3+s3-i4]:0,h3=t3>0&&s3>=o3?e5[t3+s3-(i4+o3)]:0,c3=e5[t3+s3]-r2(l3,u3,h3);n3[a3+s3]=c3}}function d(e5,t3,i4,n3){let a3=0;for(let o3=0;o3=n3?e5[t3+o3-n3]:0,l3=t3>0?e5[t3+o3-i4]:0,u3=t3>0&&o3>=n3?e5[t3+o3-(i4+n3)]:0,h3=e5[t3+o3]-r2(s3,l3,u3);a3+=Math.abs(h3)}return a3}let p2={0:n2,1:o2,2:l2,3:h2,4:f2},m={0:a2,1:s2,2:u2,3:c2,4:d};t2.exports=function(e5,t3,r3,n3,a3){let o3;if("filterType"in n3&&n3.filterType!==-1){if(typeof n3.filterType!="number")throw new Error("unrecognised filter types");o3=[n3.filterType]}else o3=[0,1,2,3,4];n3.bitDepth===16&&(a3*=2);let s3=t3*a3,l3=0,u3=0,h3=i3.alloc((s3+1)*r3),c3=o3[0];for(let t4=0;t41){let t5=1/0;for(let i4=0;i4n3?t3[a3-r3]:0;t3[a3]=i5+o3}},o2.prototype._unFilterType2=function(e5,t3,i4){let r3=this._lastLine;for(let n3=0;n3n3?t3[o3-r3]:0,u2=Math.floor((l2+s2)/2);t3[o3]=i5+u2}},o2.prototype._unFilterType4=function(e5,t3,i4){let r3=this._xComparison,a3=r3-1,o3=this._lastLine;for(let s2=0;s2a3?t3[s2-r3]:0,h2=s2>a3&&o3?o3[s2-r3]:0,c2=n2(u2,l2,h2);t3[s2]=i5+c2}},o2.prototype._reverseFilterLine=function(e5){let t3,r3=e5[0],n3=this._images[this._imageIndex],a3=n3.byteWidth;if(r3===0)t3=e5.slice(1,a3+1);else switch(t3=i3.alloc(a3),r3){case 1:this._unFilterType1(e5,t3,a3);break;case 2:this._unFilterType2(e5,t3,a3);break;case 3:this._unFilterType3(e5,t3,a3);break;case 4:this._unFilterType4(e5,t3,a3);break;default:throw new Error("Unrecognised filter type - "+r3)}this.write(t3),n3.lineIndex++,n3.lineIndex>=n3.height?(this._lastLine=null,this._imageIndex++,n3=this._images[this._imageIndex]):this._lastLine=t3,n3?this.read(n3.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}).call(this)}).call(this,e4("buffer").Buffer)},{"./interlace":11,"./paeth-predictor":15,buffer:32}],10:[function(e4,t2,i2){(function(e5){(function(){function i3(e6,t3,i4,r3,n3){let a2=0;for(let o2=0;o20&&u2>0&&i3.push({width:l2,height:u2,index:e6})}return i3},i2.getInterlaceIterator=function(e5){return function(t3,i3,n2){let a2=t3%r2[n2].x.length,o2=(t3-a2)/r2[n2].x.length*8+r2[n2].x[a2],s2=i3%r2[n2].y.length;return 4*o2+((i3-s2)/r2[n2].y.length*8+r2[n2].y[s2])*e5*4}}},{}],12:[function(e4,t2,i2){(function(i3){(function(){let r2=e4("util"),n2=e4("stream"),a2=e4("./constants"),o2=e4("./packer"),s2=t2.exports=function(e5){n2.call(this);let t3=e5||{};this._packer=new o2(t3),this._deflate=this._packer.createDeflate(),this.readable=!0};r2.inherits(s2,n2),s2.prototype.pack=function(e5,t3,r3,n3){this.emit("data",i3.from(a2.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(t3,r3)),n3&&this.emit("data",this._packer.packGAMA(n3));let o3=this._packer.filterData(e5,t3,r3);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(e6){this.emit("data",this._packer.packIDAT(e6))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(o3)}}).call(this)}).call(this,e4("buffer").Buffer)},{"./constants":4,"./packer":14,buffer:32,stream:65,util:84}],13:[function(e4,t2,i2){(function(i3){(function(){let r2=!0,n2=e4("zlib");n2.deflateSync||(r2=!1);let a2=e4("./constants"),o2=e4("./packer");t2.exports=function(e5,t3){if(!r2)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let s2=new o2(t3||{}),l2=[];l2.push(i3.from(a2.PNG_SIGNATURE)),l2.push(s2.packIHDR(e5.width,e5.height)),e5.gamma&&l2.push(s2.packGAMA(e5.gamma));let u2=s2.filterData(e5.data,e5.width,e5.height),h2=n2.deflateSync(u2,s2.getDeflateOptions());if(u2=null,!h2||!h2.length)throw new Error("bad png - invalid compressed data response");return l2.push(s2.packIDAT(h2)),l2.push(s2.packIEND()),i3.concat(l2)}}).call(this)}).call(this,e4("buffer").Buffer)},{"./constants":4,"./packer":14,buffer:32,zlib:31}],14:[function(e4,t2,i2){(function(i3){(function(){let r2=e4("./constants"),n2=e4("./crc"),a2=e4("./bitpacker"),o2=e4("./filter-pack"),s2=e4("zlib"),l2=t2.exports=function(e5){if(this._options=e5,e5.deflateChunkSize=e5.deflateChunkSize||32768,e5.deflateLevel=e5.deflateLevel!=null?e5.deflateLevel:9,e5.deflateStrategy=e5.deflateStrategy!=null?e5.deflateStrategy:3,e5.inputHasAlpha=e5.inputHasAlpha==null||e5.inputHasAlpha,e5.deflateFactory=e5.deflateFactory||s2.createDeflate,e5.bitDepth=e5.bitDepth||8,e5.colorType=typeof e5.colorType=="number"?e5.colorType:r2.COLORTYPE_COLOR_ALPHA,e5.inputColorType=typeof e5.inputColorType=="number"?e5.inputColorType:r2.COLORTYPE_COLOR_ALPHA,[r2.COLORTYPE_GRAYSCALE,r2.COLORTYPE_COLOR,r2.COLORTYPE_COLOR_ALPHA,r2.COLORTYPE_ALPHA].indexOf(e5.colorType)===-1)throw new Error("option color type:"+e5.colorType+" is not supported at present");if([r2.COLORTYPE_GRAYSCALE,r2.COLORTYPE_COLOR,r2.COLORTYPE_COLOR_ALPHA,r2.COLORTYPE_ALPHA].indexOf(e5.inputColorType)===-1)throw new Error("option input color type:"+e5.inputColorType+" is not supported at present");if(e5.bitDepth!==8&&e5.bitDepth!==16)throw new Error("option bit depth:"+e5.bitDepth+" is not supported at present")};l2.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},l2.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},l2.prototype.filterData=function(e5,t3,i4){let n3=a2(e5,t3,i4,this._options),s3=r2.COLORTYPE_TO_BPP_MAP[this._options.colorType];return o2(n3,t3,i4,this._options,s3)},l2.prototype._packChunk=function(e5,t3){let r3=t3?t3.length:0,a3=i3.alloc(r3+12);return a3.writeUInt32BE(r3,0),a3.writeUInt32BE(e5,4),t3&&t3.copy(a3,8),a3.writeInt32BE(n2.crc32(a3.slice(4,a3.length-4)),a3.length-4),a3},l2.prototype.packGAMA=function(e5){let t3=i3.alloc(4);return t3.writeUInt32BE(Math.floor(e5*r2.GAMMA_DIVISION),0),this._packChunk(r2.TYPE_gAMA,t3)},l2.prototype.packIHDR=function(e5,t3){let n3=i3.alloc(13);return n3.writeUInt32BE(e5,0),n3.writeUInt32BE(t3,4),n3[8]=this._options.bitDepth,n3[9]=this._options.colorType,n3[10]=0,n3[11]=0,n3[12]=0,this._packChunk(r2.TYPE_IHDR,n3)},l2.prototype.packIDAT=function(e5){return this._packChunk(r2.TYPE_IDAT,e5)},l2.prototype.packIEND=function(){return this._packChunk(r2.TYPE_IEND,null)}}).call(this)}).call(this,e4("buffer").Buffer)},{"./bitpacker":2,"./constants":4,"./crc":5,"./filter-pack":6,buffer:32,zlib:31}],15:[function(e4,t2,i2){t2.exports=function(e5,t3,i3){let r2=e5+t3-i3,n2=Math.abs(r2-e5),a2=Math.abs(r2-t3),o2=Math.abs(r2-i3);return n2<=a2&&n2<=o2?e5:a2<=o2?t3:i3}},{}],16:[function(e4,t2,i2){let r2=e4("util"),n2=e4("zlib"),a2=e4("./chunkstream"),o2=e4("./filter-parse-async"),s2=e4("./parser"),l2=e4("./bitmapper"),u2=e4("./format-normaliser"),h2=t2.exports=function(e5){a2.call(this),this._parser=new s2(e5,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=e5,this.writable=!0,this._parser.start()};r2.inherits(h2,a2),h2.prototype._handleError=function(e5){this.emit("error",e5),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},h2.prototype._inflateData=function(e5){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=n2.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let e6=(1+(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3))*this._bitmapInfo.height,t3=Math.max(e6,n2.Z_MIN_CHUNK);this._inflate=n2.createInflate({chunkSize:t3});let i3=e6,r3=this.emit.bind(this,"error");this._inflate.on("error",function(e7){i3&&r3(e7)}),this._filter.on("complete",this._complete.bind(this));let a3=this._filter.write.bind(this._filter);this._inflate.on("data",function(e7){i3&&(e7.length>i3&&(e7=e7.slice(0,i3)),i3-=e7.length,a3(e7))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(e5)},h2.prototype._handleMetaData=function(e5){this._metaData=e5,this._bitmapInfo=Object.create(e5),this._filter=new o2(this._bitmapInfo)},h2.prototype._handleTransColor=function(e5){this._bitmapInfo.transColor=e5},h2.prototype._handlePalette=function(e5){this._bitmapInfo.palette=e5},h2.prototype._simpleTransparency=function(){this._metaData.alpha=!0},h2.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},h2.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},h2.prototype._complete=function(e5){if(this.errord)return;let t3;try{let i3=l2.dataToBitMap(e5,this._bitmapInfo);t3=u2(i3,this._bitmapInfo,this._options.skipRescale),i3=null}catch(e6){return void this._handleError(e6)}this.emit("parsed",t3)}},{"./bitmapper":1,"./chunkstream":3,"./filter-parse-async":7,"./format-normaliser":10,"./parser":18,util:84,zlib:31}],17:[function(e4,t2,i2){(function(i3){(function(){let r2=!0,n2=e4("zlib"),a2=e4("./sync-inflate");n2.deflateSync||(r2=!1);let o2=e4("./sync-reader"),s2=e4("./filter-parse-sync"),l2=e4("./parser"),u2=e4("./bitmapper"),h2=e4("./format-normaliser");t2.exports=function(e5,t3){if(!r2)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let c2,f2,d;function p2(e6){c2=e6}function m(e6){f2=e6}function _2(e6){f2.transColor=e6}function g(e6){f2.palette=e6}function b2(){f2.alpha=!0}function y2(e6){d=e6}let w=[];function v2(e6){w.push(e6)}let x2=new o2(e5);if(new l2(t3,{read:x2.read.bind(x2),error:p2,metadata:m,gamma:y2,palette:g,transColor:_2,inflateData:v2,simpleTransparency:b2}).start(),x2.process(),c2)throw c2;let E2,k2=i3.concat(w);if(w.length=0,f2.interlace)E2=n2.inflateSync(k2);else{let e6=(1+(f2.width*f2.bpp*f2.depth+7>>3))*f2.height;E2=a2(k2,{chunkSize:e6,maxLength:e6})}if(k2=null,!E2||!E2.length)throw new Error("bad png - invalid inflate data response");let S2=s2.process(E2,f2);k2=null;let A2=u2.dataToBitMap(S2,f2);S2=null;let I=h2(A2,f2,t3.skipRescale);return f2.data=I,f2.gamma=d||0,f2}}).call(this)}).call(this,e4("buffer").Buffer)},{"./bitmapper":1,"./filter-parse-sync":8,"./format-normaliser":10,"./parser":18,"./sync-inflate":21,"./sync-reader":22,buffer:32,zlib:31}],18:[function(e4,t2,i2){(function(i3){(function(){let r2=e4("./constants"),n2=e4("./crc"),a2=t2.exports=function(e5,t3){this._options=e5,e5.checkCRC=e5.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[r2.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[r2.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[r2.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[r2.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[r2.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[r2.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t3.read,this.error=t3.error,this.metadata=t3.metadata,this.gamma=t3.gamma,this.transColor=t3.transColor,this.palette=t3.palette,this.parsed=t3.parsed,this.inflateData=t3.inflateData,this.finished=t3.finished,this.simpleTransparency=t3.simpleTransparency,this.headersFinished=t3.headersFinished||function(){}};a2.prototype.start=function(){this.read(r2.PNG_SIGNATURE.length,this._parseSignature.bind(this))},a2.prototype._parseSignature=function(e5){let t3=r2.PNG_SIGNATURE;for(let i4=0;i4this._palette.length)return void this.error(new Error("More transparent colors than palette size"));for(let t3=0;t30?this._handleIDAT(i4):this._handleChunkEnd()},a2.prototype._handleIEND=function(e5){this.read(e5,this._parseIEND.bind(this))},a2.prototype._parseIEND=function(e5){this._crc.write(e5),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}}).call(this)}).call(this,e4("buffer").Buffer)},{"./constants":4,"./crc":5,buffer:32}],19:[function(e4,t2,i2){let r2=e4("./parser-sync"),n2=e4("./packer-sync");i2.read=function(e5,t3){return r2(e5,t3||{})},i2.write=function(e5,t3){return n2(e5,t3)}},{"./packer-sync":13,"./parser-sync":17}],20:[function(e4,t2,i2){(function(t3,r2){(function(){let n2=e4("util"),a2=e4("stream"),o2=e4("./parser-async"),s2=e4("./packer-async"),l2=e4("./png-sync"),u2=i2.PNG=function(e5){a2.call(this),e5=e5||{},this.width=0|e5.width,this.height=0|e5.height,this.data=this.width>0&&this.height>0?r2.alloc(4*this.width*this.height):null,e5.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new o2(e5),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e6){this.data=e6,this.emit("parsed",e6)}.bind(this)),this._packer=new s2(e5),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};n2.inherits(u2,a2),u2.sync=l2,u2.prototype.pack=function(){return this.data&&this.data.length?(t3.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit("error","No data provided"),this)},u2.prototype.parse=function(e5,t4){if(t4){let e6,i3;e6=function(e7){this.removeListener("error",i3),this.data=e7,t4(null,this)}.bind(this),i3=function(i4){this.removeListener("parsed",e6),t4(i4,null)}.bind(this),this.once("parsed",e6),this.once("error",i3)}return this.end(e5),this},u2.prototype.write=function(e5){return this._parser.write(e5),!0},u2.prototype.end=function(e5){this._parser.end(e5)},u2.prototype._metadata=function(e5){this.width=e5.width,this.height=e5.height,this.emit("metadata",e5)},u2.prototype._gamma=function(e5){this.gamma=e5},u2.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},u2.bitblt=function(e5,t4,i3,r3,n3,a3,o3,s3){if(r3|=0,n3|=0,a3|=0,o3|=0,s3|=0,(i3|=0)>e5.width||r3>e5.height||i3+n3>e5.width||r3+a3>e5.height)throw new Error("bitblt reading outside image");if(o3>t4.width||s3>t4.height||o3+n3>t4.width||s3+a3>t4.height)throw new Error("bitblt writing outside image");for(let l3=0;l3=0,"have should not go down"),i4>0){let e7=u3._buffer.slice(u3._offset,u3._offset+i4);if(u3._offset+=i4,e7.length>d&&(e7=e7.slice(0,d)),m.push(e7),_2+=e7.length,d-=e7.length,d===0)return!1}return(t4===0||u3._offset>=u3._chunkSize)&&(f3=u3._chunkSize,u3._offset=0,u3._buffer=n2.allocUnsafe(u3._chunkSize)),t4===0&&(p2+=c3-e6,c3=e6,!0)}this.on("error",function(e6){o3=e6}),r3(this._handle,"zlib binding closed");do l3=this._handle.writeSync(t3,e5,p2,c3,this._buffer,this._offset,f3),l3=l3||this._writeState;while(!this._hadError&&g(l3[0],l3[1]));if(this._hadError)throw o3;if(_2>=s2)throw h2(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+s2.toString(16)+" bytes");let b2=n2.concat(m,_2);return h2(this),b2},o2.inherits(l2,a2.Inflate),t2.exports=i2=f2,i2.Inflate=l2,i2.createInflate=u2,i2.inflateSync=f2}).call(this)}).call(this,e4("_process"),e4("buffer").Buffer)},{_process:63,assert:23,buffer:32,util:84,zlib:31}],22:[function(e4,t2,i2){let r2=t2.exports=function(e5){this._buffer=e5,this._reads=[]};r2.prototype.read=function(e5,t3){this._reads.push({length:Math.abs(e5),allowLess:e5<0,func:t3})},r2.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let e5=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=e5.length||e5.allowLess))break;{this._reads.shift();let t3=this._buffer;this._buffer=t3.slice(e5.length),e5.func.call(this,t3.slice(0,e5.length))}}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}},{}],23:[function(e4,t2,i2){(function(i3){(function(){var r2=e4("object-assign");function n2(e5,t3){if(e5===t3)return 0;for(var i4=e5.length,r3=t3.length,n3=0,a3=Math.min(i4,r3);n3=0;u3--)if(h3[u3]!==c3[u3])return!1;for(u3=h3.length-1;u3>=0;u3--)if(!w(e5[s3=h3[u3]],t3[s3],i4,r3))return!1;return!0}function E2(e5,t3,i4){w(e5,t3,!0)&&b2(e5,t3,i4,"notDeepStrictEqual",E2)}function k2(e5,t3){if(!e5||!t3)return!1;if(Object.prototype.toString.call(t3)=="[object RegExp]")return t3.test(e5);try{if(e5 instanceof t3)return!0}catch{}return!Error.isPrototypeOf(t3)&&t3.call({},e5)===!0}function S2(e5){var t3;try{e5()}catch(e6){t3=e6}return t3}function A2(e5,t3,i4,r3){var n3;if(typeof t3!="function")throw new TypeError('"block" argument must be a function');typeof i4=="string"&&(r3=i4,i4=null),n3=S2(t3),r3=(i4&&i4.name?" ("+i4.name+").":".")+(r3?" "+r3:"."),e5&&!n3&&b2(n3,i4,"Missing expected exception"+r3);var a3=typeof r3=="string",s3=!e5&&n3&&!i4;if((!e5&&o2.isError(n3)&&a3&&k2(n3,i4)||s3)&&b2(n3,i4,"Got unwanted exception"+r3),e5&&n3&&i4&&!k2(n3,i4)||!e5&&n3)throw n3}function I(e5,t3){e5||b2(e5,!0,t3,"==",I)}f2.AssertionError=function(e5){this.name="AssertionError",this.actual=e5.actual,this.expected=e5.expected,this.operator=e5.operator,e5.message?(this.message=e5.message,this.generatedMessage=!1):(this.message=g(this),this.generatedMessage=!0);var t3=e5.stackStartFunction||b2;if(Error.captureStackTrace)Error.captureStackTrace(this,t3);else{var i4=new Error;if(i4.stack){var r3=i4.stack,n3=p2(t3),a3=r3.indexOf(` + <%s key={someKey} {...props} />`,beforeExample,componentName,afterExample,componentName),didWarnAboutKeySpread[componentName+beforeExample]=!0}}return type===REACT_FRAGMENT_TYPE?validateFragmentProps(element):validatePropTypes(element),element}}function jsxWithValidationStatic(type,props,key){return jsxWithValidation(type,props,key,!0)}function jsxWithValidationDynamic(type,props,key){return jsxWithValidation(type,props,key,!1)}var jsx=jsxWithValidationDynamic,jsxs=jsxWithValidationStatic;exports.Fragment=REACT_FRAGMENT_TYPE,exports.jsx=jsx,exports.jsxs=jsxs})()}});var require_jsx_runtime=__commonJS({"../../../data/workspace/pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"(exports,module2){"use strict";module2.exports=require_react_jsx_runtime_development()}});var require_base64_js=__commonJS({"../../../data/workspace/pnpm/base64-js@1.5.1/node_modules/base64-js/index.js"(exports){"use strict";exports.byteLength=byteLength3;exports.toByteArray=toByteArray2;exports.fromByteArray=fromByteArray2;var lookup4=[],revLookup2=[],Arr2=typeof Uint8Array<"u"?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(i2=0,len=code.length;i20)throw new Error("Invalid string. Length must be a multiple of 4");var validLen=b64.indexOf("=");validLen===-1&&(validLen=len2);var placeHoldersLen=validLen===len2?0:4-validLen%4;return[validLen,placeHoldersLen]}function byteLength3(b64){var lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1];return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function _byteLength(b64,validLen,placeHoldersLen){return(validLen+placeHoldersLen)*3/4-placeHoldersLen}function toByteArray2(b64){var tmp,lens=getLens(b64),validLen=lens[0],placeHoldersLen=lens[1],arr=new Arr2(_byteLength(b64,validLen,placeHoldersLen)),curByte=0,len2=placeHoldersLen>0?validLen-4:validLen,i3;for(i3=0;i3>16&255,arr[curByte++]=tmp>>8&255,arr[curByte++]=tmp&255;return placeHoldersLen===2&&(tmp=revLookup2[b64.charCodeAt(i3)]<<2|revLookup2[b64.charCodeAt(i3+1)]>>4,arr[curByte++]=tmp&255),placeHoldersLen===1&&(tmp=revLookup2[b64.charCodeAt(i3)]<<10|revLookup2[b64.charCodeAt(i3+1)]<<4|revLookup2[b64.charCodeAt(i3+2)]>>2,arr[curByte++]=tmp>>8&255,arr[curByte++]=tmp&255),arr}function tripletToBase642(num){return lookup4[num>>18&63]+lookup4[num>>12&63]+lookup4[num>>6&63]+lookup4[num&63]}function encodeChunk2(uint8,start,end){for(var tmp,output=[],i3=start;i3len22?len22:i3+maxChunkLength));return extraBytes===1?(tmp=uint8[len2-1],parts2.push(lookup4[tmp>>2]+lookup4[tmp<<4&63]+"==")):extraBytes===2&&(tmp=(uint8[len2-2]<<8)+uint8[len2-1],parts2.push(lookup4[tmp>>10]+lookup4[tmp>>4&63]+lookup4[tmp<<2&63]+"=")),parts2.join("")}}});var require_ieee754=__commonJS({"../../../data/workspace/pnpm/ieee754@1.2.1/node_modules/ieee754/index.js"(exports){"use strict";exports.read=function(buffer,offset,isLE,mLen,nBytes){var e4,m,eLen=nBytes*8-mLen-1,eMax=(1<>1,nBits=-7,i2=isLE?nBytes-1:0,d=isLE?-1:1,s2=buffer[offset+i2];for(i2+=d,e4=s2&(1<<-nBits)-1,s2>>=-nBits,nBits+=eLen;nBits>0;e4=e4*256+buffer[offset+i2],i2+=d,nBits-=8);for(m=e4&(1<<-nBits)-1,e4>>=-nBits,nBits+=mLen;nBits>0;m=m*256+buffer[offset+i2],i2+=d,nBits-=8);if(e4===0)e4=1-eBias;else{if(e4===eMax)return m?NaN:(s2?-1:1)*(1/0);m=m+Math.pow(2,mLen),e4=e4-eBias}return(s2?-1:1)*m*Math.pow(2,e4-mLen)};exports.write=function(buffer,value2,offset,isLE,mLen,nBytes){var e4,m,c2,eLen=nBytes*8-mLen-1,eMax=(1<>1,rt=mLen===23?Math.pow(2,-24)-Math.pow(2,-77):0,i2=isLE?0:nBytes-1,d=isLE?1:-1,s2=value2<0||value2===0&&1/value2<0?1:0;for(value2=Math.abs(value2),isNaN(value2)||value2===1/0?(m=isNaN(value2)?1:0,e4=eMax):(e4=Math.floor(Math.log(value2)/Math.LN2),value2*(c2=Math.pow(2,-e4))<1&&(e4--,c2*=2),e4+eBias>=1?value2+=rt/c2:value2+=rt*Math.pow(2,1-eBias),value2*c2>=2&&(e4++,c2/=2),e4+eBias>=eMax?(m=0,e4=eMax):e4+eBias>=1?(m=(value2*c2-1)*Math.pow(2,mLen),e4=e4+eBias):(m=value2*Math.pow(2,eBias-1)*Math.pow(2,mLen),e4=0));mLen>=8;buffer[offset+i2]=m&255,i2+=d,m/=256,mLen-=8);for(e4=e4<0;buffer[offset+i2]=e4&255,i2+=d,e4/=256,eLen-=8);buffer[offset+i2-d]|=s2*128}}});var require_buffer=__commonJS({"../../../data/workspace/pnpm/buffer@6.0.3/node_modules/buffer/index.js"(exports){"use strict";var base64=require_base64_js(),ieee7542=require_ieee754(),customInspectSymbol=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;exports.Buffer=Buffer4;exports.SlowBuffer=SlowBuffer;exports.INSPECT_MAX_BYTES=50;var K_MAX_LENGTH=2147483647;exports.kMaxLength=K_MAX_LENGTH;Buffer4.TYPED_ARRAY_SUPPORT=typedArraySupport();!Buffer4.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function typedArraySupport(){try{let arr=new Uint8Array(1),proto={foo:function(){return 42}};return Object.setPrototypeOf(proto,Uint8Array.prototype),Object.setPrototypeOf(arr,proto),arr.foo()===42}catch{return!1}}Object.defineProperty(Buffer4.prototype,"parent",{enumerable:!0,get:function(){if(Buffer4.isBuffer(this))return this.buffer}});Object.defineProperty(Buffer4.prototype,"offset",{enumerable:!0,get:function(){if(Buffer4.isBuffer(this))return this.byteOffset}});function createBuffer2(length){if(length>K_MAX_LENGTH)throw new RangeError('The value "'+length+'" is invalid for option "size"');let buf=new Uint8Array(length);return Object.setPrototypeOf(buf,Buffer4.prototype),buf}function Buffer4(arg,encodingOrOffset,length){if(typeof arg=="number"){if(typeof encodingOrOffset=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return allocUnsafe2(arg)}return from2(arg,encodingOrOffset,length)}Buffer4.poolSize=8192;function from2(value2,encodingOrOffset,length){if(typeof value2=="string")return fromString2(value2,encodingOrOffset);if(ArrayBuffer.isView(value2))return fromArrayView(value2);if(value2==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value2);if(isInstance(value2,ArrayBuffer)||value2&&isInstance(value2.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(isInstance(value2,SharedArrayBuffer)||value2&&isInstance(value2.buffer,SharedArrayBuffer)))return fromArrayBuffer2(value2,encodingOrOffset,length);if(typeof value2=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let valueOf=value2.valueOf&&value2.valueOf();if(valueOf!=null&&valueOf!==value2)return Buffer4.from(valueOf,encodingOrOffset,length);let b2=fromObject2(value2);if(b2)return b2;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof value2[Symbol.toPrimitive]=="function")return Buffer4.from(value2[Symbol.toPrimitive]("string"),encodingOrOffset,length);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof value2)}Buffer4.from=function(value2,encodingOrOffset,length){return from2(value2,encodingOrOffset,length)};Object.setPrototypeOf(Buffer4.prototype,Uint8Array.prototype);Object.setPrototypeOf(Buffer4,Uint8Array);function assertSize2(size){if(typeof size!="number")throw new TypeError('"size" argument must be of type number');if(size<0)throw new RangeError('The value "'+size+'" is invalid for option "size"')}function alloc2(size,fill,encoding){return assertSize2(size),size<=0?createBuffer2(size):fill!==void 0?typeof encoding=="string"?createBuffer2(size).fill(fill,encoding):createBuffer2(size).fill(fill):createBuffer2(size)}Buffer4.alloc=function(size,fill,encoding){return alloc2(size,fill,encoding)};function allocUnsafe2(size){return assertSize2(size),createBuffer2(size<0?0:checked2(size)|0)}Buffer4.allocUnsafe=function(size){return allocUnsafe2(size)};Buffer4.allocUnsafeSlow=function(size){return allocUnsafe2(size)};function fromString2(string,encoding){if((typeof encoding!="string"||encoding==="")&&(encoding="utf8"),!Buffer4.isEncoding(encoding))throw new TypeError("Unknown encoding: "+encoding);let length=byteLength3(string,encoding)|0,buf=createBuffer2(length),actual=buf.write(string,encoding);return actual!==length&&(buf=buf.slice(0,actual)),buf}function fromArrayLike2(array){let length=array.length<0?0:checked2(array.length)|0,buf=createBuffer2(length);for(let i2=0;i2=K_MAX_LENGTH)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K_MAX_LENGTH.toString(16)+" bytes");return length|0}function SlowBuffer(length){return+length!=length&&(length=0),Buffer4.alloc(+length)}Buffer4.isBuffer=function(b2){return b2!=null&&b2._isBuffer===!0&&b2!==Buffer4.prototype};Buffer4.compare=function(a2,b2){if(isInstance(a2,Uint8Array)&&(a2=Buffer4.from(a2,a2.offset,a2.byteLength)),isInstance(b2,Uint8Array)&&(b2=Buffer4.from(b2,b2.offset,b2.byteLength)),!Buffer4.isBuffer(a2)||!Buffer4.isBuffer(b2))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(a2===b2)return 0;let x2=a2.length,y2=b2.length;for(let i2=0,len=Math.min(x2,y2);i2buffer.length?(Buffer4.isBuffer(buf)||(buf=Buffer4.from(buf)),buf.copy(buffer,pos)):Uint8Array.prototype.set.call(buffer,buf,pos);else if(Buffer4.isBuffer(buf))buf.copy(buffer,pos);else throw new TypeError('"list" argument must be an Array of Buffers');pos+=buf.length}return buffer};function byteLength3(string,encoding){if(Buffer4.isBuffer(string))return string.length;if(ArrayBuffer.isView(string)||isInstance(string,ArrayBuffer))return string.byteLength;if(typeof string!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof string);let len=string.length,mustMatch=arguments.length>2&&arguments[2]===!0;if(!mustMatch&&len===0)return 0;let loweredCase=!1;for(;;)switch(encoding){case"ascii":case"latin1":case"binary":return len;case"utf8":case"utf-8":return utf8ToBytes2(string).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return len*2;case"hex":return len>>>1;case"base64":return base64ToBytes2(string).length;default:if(loweredCase)return mustMatch?-1:utf8ToBytes2(string).length;encoding=(""+encoding).toLowerCase(),loweredCase=!0}}Buffer4.byteLength=byteLength3;function slowToString2(encoding,start,end){let loweredCase=!1;if((start===void 0||start<0)&&(start=0),start>this.length||((end===void 0||end>this.length)&&(end=this.length),end<=0)||(end>>>=0,start>>>=0,end<=start))return"";for(encoding||(encoding="utf8");;)switch(encoding){case"hex":return hexSlice2(this,start,end);case"utf8":case"utf-8":return utf8Slice2(this,start,end);case"ascii":return asciiSlice2(this,start,end);case"latin1":case"binary":return latin1Slice2(this,start,end);case"base64":return base64Slice2(this,start,end);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice2(this,start,end);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(encoding+"").toLowerCase(),loweredCase=!0}}Buffer4.prototype._isBuffer=!0;function swap2(b2,n2,m){let i2=b2[n2];b2[n2]=b2[m],b2[m]=i2}Buffer4.prototype.swap16=function(){let len=this.length;if(len%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let i2=0;i2max&&(str+=" ... "),""};customInspectSymbol&&(Buffer4.prototype[customInspectSymbol]=Buffer4.prototype.inspect);Buffer4.prototype.compare=function(target,start,end,thisStart,thisEnd){if(isInstance(target,Uint8Array)&&(target=Buffer4.from(target,target.offset,target.byteLength)),!Buffer4.isBuffer(target))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof target);if(start===void 0&&(start=0),end===void 0&&(end=target?target.length:0),thisStart===void 0&&(thisStart=0),thisEnd===void 0&&(thisEnd=this.length),start<0||end>target.length||thisStart<0||thisEnd>this.length)throw new RangeError("out of range index");if(thisStart>=thisEnd&&start>=end)return 0;if(thisStart>=thisEnd)return-1;if(start>=end)return 1;if(start>>>=0,end>>>=0,thisStart>>>=0,thisEnd>>>=0,this===target)return 0;let x2=thisEnd-thisStart,y2=end-start,len=Math.min(x2,y2),thisCopy=this.slice(thisStart,thisEnd),targetCopy=target.slice(start,end);for(let i2=0;i22147483647?byteOffset=2147483647:byteOffset<-2147483648&&(byteOffset=-2147483648),byteOffset=+byteOffset,numberIsNaN(byteOffset)&&(byteOffset=dir?0:buffer.length-1),byteOffset<0&&(byteOffset=buffer.length+byteOffset),byteOffset>=buffer.length){if(dir)return-1;byteOffset=buffer.length-1}else if(byteOffset<0)if(dir)byteOffset=0;else return-1;if(typeof val=="string"&&(val=Buffer4.from(val,encoding)),Buffer4.isBuffer(val))return val.length===0?-1:arrayIndexOf2(buffer,val,byteOffset,encoding,dir);if(typeof val=="number")return val=val&255,typeof Uint8Array.prototype.indexOf=="function"?dir?Uint8Array.prototype.indexOf.call(buffer,val,byteOffset):Uint8Array.prototype.lastIndexOf.call(buffer,val,byteOffset):arrayIndexOf2(buffer,[val],byteOffset,encoding,dir);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf2(arr,val,byteOffset,encoding,dir){let indexSize=1,arrLength=arr.length,valLength=val.length;if(encoding!==void 0&&(encoding=String(encoding).toLowerCase(),encoding==="ucs2"||encoding==="ucs-2"||encoding==="utf16le"||encoding==="utf-16le")){if(arr.length<2||val.length<2)return-1;indexSize=2,arrLength/=2,valLength/=2,byteOffset/=2}function read2(buf,i3){return indexSize===1?buf[i3]:buf.readUInt16BE(i3*indexSize)}let i2;if(dir){let foundIndex=-1;for(i2=byteOffset;i2arrLength&&(byteOffset=arrLength-valLength),i2=byteOffset;i2>=0;i2--){let found=!0;for(let j=0;jremaining&&(length=remaining)):length=remaining;let strLen=string.length;length>strLen/2&&(length=strLen/2);let i2;for(i2=0;i2>>0,isFinite(length)?(length=length>>>0,encoding===void 0&&(encoding="utf8")):(encoding=length,length=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let remaining=this.length-offset;if((length===void 0||length>remaining)&&(length=remaining),string.length>0&&(length<0||offset<0)||offset>this.length)throw new RangeError("Attempt to write outside buffer bounds");encoding||(encoding="utf8");let loweredCase=!1;for(;;)switch(encoding){case"hex":return hexWrite2(this,string,offset,length);case"utf8":case"utf-8":return utf8Write2(this,string,offset,length);case"ascii":case"latin1":case"binary":return asciiWrite2(this,string,offset,length);case"base64":return base64Write2(this,string,offset,length);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write2(this,string,offset,length);default:if(loweredCase)throw new TypeError("Unknown encoding: "+encoding);encoding=(""+encoding).toLowerCase(),loweredCase=!0}};Buffer4.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function base64Slice2(buf,start,end){return start===0&&end===buf.length?base64.fromByteArray(buf):base64.fromByteArray(buf.slice(start,end))}function utf8Slice2(buf,start,end){end=Math.min(buf.length,end);let res=[],i2=start;for(;i2239?4:firstByte>223?3:firstByte>191?2:1;if(i2+bytesPerSequence<=end){let secondByte,thirdByte,fourthByte,tempCodePoint;switch(bytesPerSequence){case 1:firstByte<128&&(codePoint=firstByte);break;case 2:secondByte=buf[i2+1],(secondByte&192)===128&&(tempCodePoint=(firstByte&31)<<6|secondByte&63,tempCodePoint>127&&(codePoint=tempCodePoint));break;case 3:secondByte=buf[i2+1],thirdByte=buf[i2+2],(secondByte&192)===128&&(thirdByte&192)===128&&(tempCodePoint=(firstByte&15)<<12|(secondByte&63)<<6|thirdByte&63,tempCodePoint>2047&&(tempCodePoint<55296||tempCodePoint>57343)&&(codePoint=tempCodePoint));break;case 4:secondByte=buf[i2+1],thirdByte=buf[i2+2],fourthByte=buf[i2+3],(secondByte&192)===128&&(thirdByte&192)===128&&(fourthByte&192)===128&&(tempCodePoint=(firstByte&15)<<18|(secondByte&63)<<12|(thirdByte&63)<<6|fourthByte&63,tempCodePoint>65535&&tempCodePoint<1114112&&(codePoint=tempCodePoint))}}codePoint===null?(codePoint=65533,bytesPerSequence=1):codePoint>65535&&(codePoint-=65536,res.push(codePoint>>>10&1023|55296),codePoint=56320|codePoint&1023),res.push(codePoint),i2+=bytesPerSequence}return decodeCodePointsArray2(res)}var MAX_ARGUMENTS_LENGTH2=4096;function decodeCodePointsArray2(codePoints){let len=codePoints.length;if(len<=MAX_ARGUMENTS_LENGTH2)return String.fromCharCode.apply(String,codePoints);let res="",i2=0;for(;i2len)&&(end=len);let out="";for(let i2=start;i2len&&(start=len),end<0?(end+=len,end<0&&(end=0)):end>len&&(end=len),endlength)throw new RangeError("Trying to access beyond buffer length")}Buffer4.prototype.readUintLE=Buffer4.prototype.readUIntLE=function(offset,byteLength4,noAssert){offset=offset>>>0,byteLength4=byteLength4>>>0,noAssert||checkOffset2(offset,byteLength4,this.length);let val=this[offset],mul=1,i2=0;for(;++i2>>0,byteLength4=byteLength4>>>0,noAssert||checkOffset2(offset,byteLength4,this.length);let val=this[offset+--byteLength4],mul=1;for(;byteLength4>0&&(mul*=256);)val+=this[offset+--byteLength4]*mul;return val};Buffer4.prototype.readUint8=Buffer4.prototype.readUInt8=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,1,this.length),this[offset]};Buffer4.prototype.readUint16LE=Buffer4.prototype.readUInt16LE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,2,this.length),this[offset]|this[offset+1]<<8};Buffer4.prototype.readUint16BE=Buffer4.prototype.readUInt16BE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,2,this.length),this[offset]<<8|this[offset+1]};Buffer4.prototype.readUint32LE=Buffer4.prototype.readUInt32LE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),(this[offset]|this[offset+1]<<8|this[offset+2]<<16)+this[offset+3]*16777216};Buffer4.prototype.readUint32BE=Buffer4.prototype.readUInt32BE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),this[offset]*16777216+(this[offset+1]<<16|this[offset+2]<<8|this[offset+3])};Buffer4.prototype.readBigUInt64LE=defineBigIntMethod(function(offset){offset=offset>>>0,validateNumber(offset,"offset");let first=this[offset],last=this[offset+7];(first===void 0||last===void 0)&&boundsError(offset,this.length-8);let lo=first+this[++offset]*2**8+this[++offset]*2**16+this[++offset]*2**24,hi=this[++offset]+this[++offset]*2**8+this[++offset]*2**16+last*2**24;return BigInt(lo)+(BigInt(hi)<>>0,validateNumber(offset,"offset");let first=this[offset],last=this[offset+7];(first===void 0||last===void 0)&&boundsError(offset,this.length-8);let hi=first*2**24+this[++offset]*2**16+this[++offset]*2**8+this[++offset],lo=this[++offset]*2**24+this[++offset]*2**16+this[++offset]*2**8+last;return(BigInt(hi)<>>0,byteLength4=byteLength4>>>0,noAssert||checkOffset2(offset,byteLength4,this.length);let val=this[offset],mul=1,i2=0;for(;++i2=mul&&(val-=Math.pow(2,8*byteLength4)),val};Buffer4.prototype.readIntBE=function(offset,byteLength4,noAssert){offset=offset>>>0,byteLength4=byteLength4>>>0,noAssert||checkOffset2(offset,byteLength4,this.length);let i2=byteLength4,mul=1,val=this[offset+--i2];for(;i2>0&&(mul*=256);)val+=this[offset+--i2]*mul;return mul*=128,val>=mul&&(val-=Math.pow(2,8*byteLength4)),val};Buffer4.prototype.readInt8=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,1,this.length),this[offset]&128?(255-this[offset]+1)*-1:this[offset]};Buffer4.prototype.readInt16LE=function(offset,noAssert){offset=offset>>>0,noAssert||checkOffset2(offset,2,this.length);let val=this[offset]|this[offset+1]<<8;return val&32768?val|4294901760:val};Buffer4.prototype.readInt16BE=function(offset,noAssert){offset=offset>>>0,noAssert||checkOffset2(offset,2,this.length);let val=this[offset+1]|this[offset]<<8;return val&32768?val|4294901760:val};Buffer4.prototype.readInt32LE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),this[offset]|this[offset+1]<<8|this[offset+2]<<16|this[offset+3]<<24};Buffer4.prototype.readInt32BE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),this[offset]<<24|this[offset+1]<<16|this[offset+2]<<8|this[offset+3]};Buffer4.prototype.readBigInt64LE=defineBigIntMethod(function(offset){offset=offset>>>0,validateNumber(offset,"offset");let first=this[offset],last=this[offset+7];(first===void 0||last===void 0)&&boundsError(offset,this.length-8);let val=this[offset+4]+this[offset+5]*2**8+this[offset+6]*2**16+(last<<24);return(BigInt(val)<>>0,validateNumber(offset,"offset");let first=this[offset],last=this[offset+7];(first===void 0||last===void 0)&&boundsError(offset,this.length-8);let val=(first<<24)+this[++offset]*2**16+this[++offset]*2**8+this[++offset];return(BigInt(val)<>>0,noAssert||checkOffset2(offset,4,this.length),ieee7542.read(this,offset,!0,23,4)};Buffer4.prototype.readFloatBE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,4,this.length),ieee7542.read(this,offset,!1,23,4)};Buffer4.prototype.readDoubleLE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,8,this.length),ieee7542.read(this,offset,!0,52,8)};Buffer4.prototype.readDoubleBE=function(offset,noAssert){return offset=offset>>>0,noAssert||checkOffset2(offset,8,this.length),ieee7542.read(this,offset,!1,52,8)};function checkInt2(buf,value2,offset,ext,max,min){if(!Buffer4.isBuffer(buf))throw new TypeError('"buffer" argument must be a Buffer instance');if(value2>max||value2buf.length)throw new RangeError("Index out of range")}Buffer4.prototype.writeUintLE=Buffer4.prototype.writeUIntLE=function(value2,offset,byteLength4,noAssert){if(value2=+value2,offset=offset>>>0,byteLength4=byteLength4>>>0,!noAssert){let maxBytes=Math.pow(2,8*byteLength4)-1;checkInt2(this,value2,offset,byteLength4,maxBytes,0)}let mul=1,i2=0;for(this[offset]=value2&255;++i2>>0,byteLength4=byteLength4>>>0,!noAssert){let maxBytes=Math.pow(2,8*byteLength4)-1;checkInt2(this,value2,offset,byteLength4,maxBytes,0)}let i2=byteLength4-1,mul=1;for(this[offset+i2]=value2&255;--i2>=0&&(mul*=256);)this[offset+i2]=value2/mul&255;return offset+byteLength4};Buffer4.prototype.writeUint8=Buffer4.prototype.writeUInt8=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,1,255,0),this[offset]=value2&255,offset+1};Buffer4.prototype.writeUint16LE=Buffer4.prototype.writeUInt16LE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,2,65535,0),this[offset]=value2&255,this[offset+1]=value2>>>8,offset+2};Buffer4.prototype.writeUint16BE=Buffer4.prototype.writeUInt16BE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,2,65535,0),this[offset]=value2>>>8,this[offset+1]=value2&255,offset+2};Buffer4.prototype.writeUint32LE=Buffer4.prototype.writeUInt32LE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,4,4294967295,0),this[offset+3]=value2>>>24,this[offset+2]=value2>>>16,this[offset+1]=value2>>>8,this[offset]=value2&255,offset+4};Buffer4.prototype.writeUint32BE=Buffer4.prototype.writeUInt32BE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,4,4294967295,0),this[offset]=value2>>>24,this[offset+1]=value2>>>16,this[offset+2]=value2>>>8,this[offset+3]=value2&255,offset+4};function wrtBigUInt64LE(buf,value2,offset,min,max){checkIntBI(value2,min,max,buf,offset,7);let lo=Number(value2&BigInt(4294967295));buf[offset++]=lo,lo=lo>>8,buf[offset++]=lo,lo=lo>>8,buf[offset++]=lo,lo=lo>>8,buf[offset++]=lo;let hi=Number(value2>>BigInt(32)&BigInt(4294967295));return buf[offset++]=hi,hi=hi>>8,buf[offset++]=hi,hi=hi>>8,buf[offset++]=hi,hi=hi>>8,buf[offset++]=hi,offset}function wrtBigUInt64BE(buf,value2,offset,min,max){checkIntBI(value2,min,max,buf,offset,7);let lo=Number(value2&BigInt(4294967295));buf[offset+7]=lo,lo=lo>>8,buf[offset+6]=lo,lo=lo>>8,buf[offset+5]=lo,lo=lo>>8,buf[offset+4]=lo;let hi=Number(value2>>BigInt(32)&BigInt(4294967295));return buf[offset+3]=hi,hi=hi>>8,buf[offset+2]=hi,hi=hi>>8,buf[offset+1]=hi,hi=hi>>8,buf[offset]=hi,offset+8}Buffer4.prototype.writeBigUInt64LE=defineBigIntMethod(function(value2,offset=0){return wrtBigUInt64LE(this,value2,offset,BigInt(0),BigInt("0xffffffffffffffff"))});Buffer4.prototype.writeBigUInt64BE=defineBigIntMethod(function(value2,offset=0){return wrtBigUInt64BE(this,value2,offset,BigInt(0),BigInt("0xffffffffffffffff"))});Buffer4.prototype.writeIntLE=function(value2,offset,byteLength4,noAssert){if(value2=+value2,offset=offset>>>0,!noAssert){let limit=Math.pow(2,8*byteLength4-1);checkInt2(this,value2,offset,byteLength4,limit-1,-limit)}let i2=0,mul=1,sub=0;for(this[offset]=value2&255;++i2>0)-sub&255;return offset+byteLength4};Buffer4.prototype.writeIntBE=function(value2,offset,byteLength4,noAssert){if(value2=+value2,offset=offset>>>0,!noAssert){let limit=Math.pow(2,8*byteLength4-1);checkInt2(this,value2,offset,byteLength4,limit-1,-limit)}let i2=byteLength4-1,mul=1,sub=0;for(this[offset+i2]=value2&255;--i2>=0&&(mul*=256);)value2<0&&sub===0&&this[offset+i2+1]!==0&&(sub=1),this[offset+i2]=(value2/mul>>0)-sub&255;return offset+byteLength4};Buffer4.prototype.writeInt8=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,1,127,-128),value2<0&&(value2=255+value2+1),this[offset]=value2&255,offset+1};Buffer4.prototype.writeInt16LE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,2,32767,-32768),this[offset]=value2&255,this[offset+1]=value2>>>8,offset+2};Buffer4.prototype.writeInt16BE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,2,32767,-32768),this[offset]=value2>>>8,this[offset+1]=value2&255,offset+2};Buffer4.prototype.writeInt32LE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,4,2147483647,-2147483648),this[offset]=value2&255,this[offset+1]=value2>>>8,this[offset+2]=value2>>>16,this[offset+3]=value2>>>24,offset+4};Buffer4.prototype.writeInt32BE=function(value2,offset,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkInt2(this,value2,offset,4,2147483647,-2147483648),value2<0&&(value2=4294967295+value2+1),this[offset]=value2>>>24,this[offset+1]=value2>>>16,this[offset+2]=value2>>>8,this[offset+3]=value2&255,offset+4};Buffer4.prototype.writeBigInt64LE=defineBigIntMethod(function(value2,offset=0){return wrtBigUInt64LE(this,value2,offset,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Buffer4.prototype.writeBigInt64BE=defineBigIntMethod(function(value2,offset=0){return wrtBigUInt64BE(this,value2,offset,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function checkIEEE7542(buf,value2,offset,ext,max,min){if(offset+ext>buf.length)throw new RangeError("Index out of range");if(offset<0)throw new RangeError("Index out of range")}function writeFloat2(buf,value2,offset,littleEndian,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkIEEE7542(buf,value2,offset,4,34028234663852886e22,-34028234663852886e22),ieee7542.write(buf,value2,offset,littleEndian,23,4),offset+4}Buffer4.prototype.writeFloatLE=function(value2,offset,noAssert){return writeFloat2(this,value2,offset,!0,noAssert)};Buffer4.prototype.writeFloatBE=function(value2,offset,noAssert){return writeFloat2(this,value2,offset,!1,noAssert)};function writeDouble2(buf,value2,offset,littleEndian,noAssert){return value2=+value2,offset=offset>>>0,noAssert||checkIEEE7542(buf,value2,offset,8,17976931348623157e292,-17976931348623157e292),ieee7542.write(buf,value2,offset,littleEndian,52,8),offset+8}Buffer4.prototype.writeDoubleLE=function(value2,offset,noAssert){return writeDouble2(this,value2,offset,!0,noAssert)};Buffer4.prototype.writeDoubleBE=function(value2,offset,noAssert){return writeDouble2(this,value2,offset,!1,noAssert)};Buffer4.prototype.copy=function(target,targetStart,start,end){if(!Buffer4.isBuffer(target))throw new TypeError("argument should be a Buffer");if(start||(start=0),!end&&end!==0&&(end=this.length),targetStart>=target.length&&(targetStart=target.length),targetStart||(targetStart=0),end>0&&end=this.length)throw new RangeError("Index out of range");if(end<0)throw new RangeError("sourceEnd out of bounds");end>this.length&&(end=this.length),target.length-targetStart>>0,end=end===void 0?this.length:end>>>0,val||(val=0);let i2;if(typeof val=="number")for(i2=start;i22**32?received=addNumericalSeparator(String(input)):typeof input=="bigint"&&(received=String(input),(input>BigInt(2)**BigInt(32)||input<-(BigInt(2)**BigInt(32)))&&(received=addNumericalSeparator(received)),received+="n"),msg+=` It must be ${range}. Received ${received}`,msg},RangeError);function addNumericalSeparator(val){let res="",i2=val.length,start=val[0]==="-"?1:0;for(;i2>=start+4;i2-=3)res=`_${val.slice(i2-3,i2)}${res}`;return`${val.slice(0,i2)}${res}`}function checkBounds(buf,offset,byteLength4){validateNumber(offset,"offset"),(buf[offset]===void 0||buf[offset+byteLength4]===void 0)&&boundsError(offset,buf.length-(byteLength4+1))}function checkIntBI(value2,min,max,buf,offset,byteLength4){if(value2>max||value23?min===0||min===BigInt(0)?range=`>= 0${n2} and < 2${n2} ** ${(byteLength4+1)*8}${n2}`:range=`>= -(2${n2} ** ${(byteLength4+1)*8-1}${n2}) and < 2 ** ${(byteLength4+1)*8-1}${n2}`:range=`>= ${min}${n2} and <= ${max}${n2}`,new errors.ERR_OUT_OF_RANGE("value",range,value2)}checkBounds(buf,offset,byteLength4)}function validateNumber(value2,name){if(typeof value2!="number")throw new errors.ERR_INVALID_ARG_TYPE(name,"number",value2)}function boundsError(value2,length,type){throw Math.floor(value2)!==value2?(validateNumber(value2,type),new errors.ERR_OUT_OF_RANGE(type||"offset","an integer",value2)):length<0?new errors.ERR_BUFFER_OUT_OF_BOUNDS:new errors.ERR_OUT_OF_RANGE(type||"offset",`>= ${type?1:0} and <= ${length}`,value2)}var INVALID_BASE64_RE2=/[^+/0-9A-Za-z-_]/g;function base64clean2(str){if(str=str.split("=")[0],str=str.trim().replace(INVALID_BASE64_RE2,""),str.length<2)return"";for(;str.length%4!==0;)str=str+"=";return str}function utf8ToBytes2(string,units){units=units||1/0;let codePoint,length=string.length,leadSurrogate=null,bytes=[];for(let i2=0;i255295&&codePoint<57344){if(!leadSurrogate){if(codePoint>56319){(units-=3)>-1&&bytes.push(239,191,189);continue}else if(i2+1===length){(units-=3)>-1&&bytes.push(239,191,189);continue}leadSurrogate=codePoint;continue}if(codePoint<56320){(units-=3)>-1&&bytes.push(239,191,189),leadSurrogate=codePoint;continue}codePoint=(leadSurrogate-55296<<10|codePoint-56320)+65536}else leadSurrogate&&(units-=3)>-1&&bytes.push(239,191,189);if(leadSurrogate=null,codePoint<128){if((units-=1)<0)break;bytes.push(codePoint)}else if(codePoint<2048){if((units-=2)<0)break;bytes.push(codePoint>>6|192,codePoint&63|128)}else if(codePoint<65536){if((units-=3)<0)break;bytes.push(codePoint>>12|224,codePoint>>6&63|128,codePoint&63|128)}else if(codePoint<1114112){if((units-=4)<0)break;bytes.push(codePoint>>18|240,codePoint>>12&63|128,codePoint>>6&63|128,codePoint&63|128)}else throw new Error("Invalid code point")}return bytes}function asciiToBytes2(str){let byteArray=[];for(let i2=0;i2>8,lo=c2%256,byteArray.push(lo),byteArray.push(hi);return byteArray}function base64ToBytes2(str){return base64.toByteArray(base64clean2(str))}function blitBuffer2(src2,dst,offset,length){let i2;for(i2=0;i2=dst.length||i2>=src2.length);++i2)dst[i2+offset]=src2[i2];return i2}function isInstance(obj,type){return obj instanceof type||obj!=null&&obj.constructor!=null&&obj.constructor.name!=null&&obj.constructor.name===type.name}function numberIsNaN(obj){return obj!==obj}var hexSliceLookupTable=function(){let alphabet2="0123456789abcdef",table=new Array(256);for(let i2=0;i2<16;++i2){let i16=i2*16;for(let j=0;j<16;++j)table[i16+j]=alphabet2[i2]+alphabet2[j]}return table}();function defineBigIntMethod(fn){return typeof BigInt>"u"?BufferBigIntNotDefined:fn}function BufferBigIntNotDefined(){throw new Error("BigInt not supported")}}});var browser_exports={};__export(browser_exports,{BlendMode:()=>BlendMode,BmpCompression:()=>BmpCompression,HorizontalAlign:()=>HorizontalAlign,Jimp:()=>Jimp,JimpMime:()=>JimpMime,PNGColorType:()=>PNGColorType,PNGFilterType:()=>PNGFilterType,ResizeStrategy:()=>ResizeStrategy,VerticalAlign:()=>VerticalAlign,colorDiff:()=>colorDiff,compareHashes:()=>compareHashes,cssColorToHex:()=>cssColorToHex,defaultFormats:()=>defaultFormats,defaultPlugins:()=>defaultPlugins,diff:()=>diff,distance:()=>distance,intToRGBA:()=>intToRGBA$1,limit255:()=>limit255,loadFont:()=>loadFont,measureText:()=>measureText,measureTextHeight:()=>measureTextHeight,rgbaToInt:()=>rgbaToInt});var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(e4){return e4&&e4.__esModule&&Object.prototype.hasOwnProperty.call(e4,"default")?e4.default:e4}function getAugmentedNamespace(e4){if(e4.__esModule)return e4;var t2=e4.default;if(typeof t2=="function"){var i2=function e5(){return this instanceof e5?Reflect.construct(t2,arguments,this.constructor):t2.apply(this,arguments)};i2.prototype=t2.prototype}else i2={};return Object.defineProperty(i2,"__esModule",{value:!0}),Object.keys(e4).forEach(function(t3){var r2=Object.getOwnPropertyDescriptor(e4,t3);Object.defineProperty(i2,t3,r2.get?r2:{enumerable:!0,get:function(){return e4[t3]}})}),i2}typeof self>"u"&&typeof commonjsGlobal=="object"&&(commonjsGlobal.self=commonjsGlobal);var global$1=typeof global<"u"?global:typeof self<"u"?self:typeof window<"u"?window:{},lookup=[],revLookup=[],Arr=typeof Uint8Array<"u"?Uint8Array:Array,inited=!1;function init(){inited=!0;for(var e4="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t2=0;t2<64;++t2)lookup[t2]=e4[t2],revLookup[e4.charCodeAt(t2)]=t2;revLookup[45]=62,revLookup[95]=63}function toByteArray(e4){var t2,i2,r2,n2,a2,o2;inited||init();var s2=e4.length;if(s2%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a2=e4[s2-2]==="="?2:e4[s2-1]==="="?1:0,o2=new Arr(3*s2/4-a2),r2=a2>0?s2-4:s2;var l2=0;for(t2=0,i2=0;t2>16&255,o2[l2++]=n2>>8&255,o2[l2++]=255&n2;return a2===2?(n2=revLookup[e4.charCodeAt(t2)]<<2|revLookup[e4.charCodeAt(t2+1)]>>4,o2[l2++]=255&n2):a2===1&&(n2=revLookup[e4.charCodeAt(t2)]<<10|revLookup[e4.charCodeAt(t2+1)]<<4|revLookup[e4.charCodeAt(t2+2)]>>2,o2[l2++]=n2>>8&255,o2[l2++]=255&n2),o2}function tripletToBase64(e4){return lookup[e4>>18&63]+lookup[e4>>12&63]+lookup[e4>>6&63]+lookup[63&e4]}function encodeChunk(e4,t2,i2){for(var r2,n2=[],a2=t2;a2l2?l2:s2+o2));return r2===1?(t2=e4[i2-1],n2+=lookup[t2>>2],n2+=lookup[t2<<4&63],n2+="=="):r2===2&&(t2=(e4[i2-2]<<8)+e4[i2-1],n2+=lookup[t2>>10],n2+=lookup[t2>>4&63],n2+=lookup[t2<<2&63],n2+="="),a2.push(n2),a2.join("")}function read(e4,t2,i2,r2,n2){var a2,o2,s2=8*n2-r2-1,l2=(1<>1,h2=-7,c2=i2?n2-1:0,f2=i2?-1:1,d=e4[t2+c2];for(c2+=f2,a2=d&(1<<-h2)-1,d>>=-h2,h2+=s2;h2>0;a2=256*a2+e4[t2+c2],c2+=f2,h2-=8);for(o2=a2&(1<<-h2)-1,a2>>=-h2,h2+=r2;h2>0;o2=256*o2+e4[t2+c2],c2+=f2,h2-=8);if(a2===0)a2=1-u2;else{if(a2===l2)return o2?NaN:1/0*(d?-1:1);o2+=Math.pow(2,r2),a2-=u2}return(d?-1:1)*o2*Math.pow(2,a2-r2)}function write(e4,t2,i2,r2,n2,a2){var o2,s2,l2,u2=8*a2-n2-1,h2=(1<>1,f2=n2===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=r2?0:a2-1,p2=r2?1:-1,m=t2<0||t2===0&&1/t2<0?1:0;for(t2=Math.abs(t2),isNaN(t2)||t2===1/0?(s2=isNaN(t2)?1:0,o2=h2):(o2=Math.floor(Math.log(t2)/Math.LN2),t2*(l2=Math.pow(2,-o2))<1&&(o2--,l2*=2),(t2+=o2+c2>=1?f2/l2:f2*Math.pow(2,1-c2))*l2>=2&&(o2++,l2/=2),o2+c2>=h2?(s2=0,o2=h2):o2+c2>=1?(s2=(t2*l2-1)*Math.pow(2,n2),o2+=c2):(s2=t2*Math.pow(2,c2-1)*Math.pow(2,n2),o2=0));n2>=8;e4[i2+d]=255&s2,d+=p2,s2/=256,n2-=8);for(o2=o2<0;e4[i2+d]=255&o2,d+=p2,o2/=256,u2-=8);e4[i2+d-p2]|=128*m}var toString={}.toString,isArray=Array.isArray||function(e4){return toString.call(e4)=="[object Array]"},INSPECT_MAX_BYTES=50;function kMaxLength(){return Buffer2.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function createBuffer(e4,t2){if(kMaxLength()=kMaxLength())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+kMaxLength().toString(16)+" bytes");return 0|e4}function internalIsBuffer(e4){return!(e4==null||!e4._isBuffer)}function byteLength(e4,t2){if(internalIsBuffer(e4))return e4.length;if(typeof ArrayBuffer<"u"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(e4)||e4 instanceof ArrayBuffer))return e4.byteLength;typeof e4!="string"&&(e4=""+e4);var i2=e4.length;if(i2===0)return 0;for(var r2=!1;;)switch(t2){case"ascii":case"latin1":case"binary":return i2;case"utf8":case"utf-8":case void 0:return utf8ToBytes(e4).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i2;case"hex":return i2>>>1;case"base64":return base64ToBytes(e4).length;default:if(r2)return utf8ToBytes(e4).length;t2=(""+t2).toLowerCase(),r2=!0}}function slowToString(e4,t2,i2){var r2=!1;if((t2===void 0||t2<0)&&(t2=0),t2>this.length||((i2===void 0||i2>this.length)&&(i2=this.length),i2<=0)||(i2>>>=0)<=(t2>>>=0))return"";for(e4||(e4="utf8");;)switch(e4){case"hex":return hexSlice(this,t2,i2);case"utf8":case"utf-8":return utf8Slice(this,t2,i2);case"ascii":return asciiSlice(this,t2,i2);case"latin1":case"binary":return latin1Slice(this,t2,i2);case"base64":return base64Slice(this,t2,i2);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return utf16leSlice(this,t2,i2);default:if(r2)throw new TypeError("Unknown encoding: "+e4);e4=(e4+"").toLowerCase(),r2=!0}}function swap(e4,t2,i2){var r2=e4[t2];e4[t2]=e4[i2],e4[i2]=r2}function bidirectionalIndexOf(e4,t2,i2,r2,n2){if(e4.length===0)return-1;if(typeof i2=="string"?(r2=i2,i2=0):i2>2147483647?i2=2147483647:i2<-2147483648&&(i2=-2147483648),i2=+i2,isNaN(i2)&&(i2=n2?0:e4.length-1),i2<0&&(i2=e4.length+i2),i2>=e4.length){if(n2)return-1;i2=e4.length-1}else if(i2<0){if(!n2)return-1;i2=0}if(typeof t2=="string"&&(t2=Buffer2.from(t2,r2)),internalIsBuffer(t2))return t2.length===0?-1:arrayIndexOf(e4,t2,i2,r2,n2);if(typeof t2=="number")return t2&=255,Buffer2.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?n2?Uint8Array.prototype.indexOf.call(e4,t2,i2):Uint8Array.prototype.lastIndexOf.call(e4,t2,i2):arrayIndexOf(e4,[t2],i2,r2,n2);throw new TypeError("val must be string, number or Buffer")}function arrayIndexOf(e4,t2,i2,r2,n2){var a2,o2=1,s2=e4.length,l2=t2.length;if(r2!==void 0&&((r2=String(r2).toLowerCase())==="ucs2"||r2==="ucs-2"||r2==="utf16le"||r2==="utf-16le")){if(e4.length<2||t2.length<2)return-1;o2=2,s2/=2,l2/=2,i2/=2}function u2(e5,t3){return o2===1?e5[t3]:e5.readUInt16BE(t3*o2)}if(n2){var h2=-1;for(a2=i2;a2s2&&(i2=s2-l2),a2=i2;a2>=0;a2--){for(var c2=!0,f2=0;f2n2&&(r2=n2):r2=n2;var a2=t2.length;if(a2%2!=0)throw new TypeError("Invalid hex string");r2>a2/2&&(r2=a2/2);for(var o2=0;o2239?4:u2>223?3:u2>191?2:1;if(n2+c2<=i2)switch(c2){case 1:u2<128&&(h2=u2);break;case 2:(192&(a2=e4[n2+1]))==128&&(l2=(31&u2)<<6|63&a2)>127&&(h2=l2);break;case 3:a2=e4[n2+1],o2=e4[n2+2],(192&a2)==128&&(192&o2)==128&&(l2=(15&u2)<<12|(63&a2)<<6|63&o2)>2047&&(l2<55296||l2>57343)&&(h2=l2);break;case 4:a2=e4[n2+1],o2=e4[n2+2],s2=e4[n2+3],(192&a2)==128&&(192&o2)==128&&(192&s2)==128&&(l2=(15&u2)<<18|(63&a2)<<12|(63&o2)<<6|63&s2)>65535&&l2<1114112&&(h2=l2)}h2===null?(h2=65533,c2=1):h2>65535&&(h2-=65536,r2.push(h2>>>10&1023|55296),h2=56320|1023&h2),r2.push(h2),n2+=c2}return decodeCodePointsArray(r2)}Buffer2.TYPED_ARRAY_SUPPORT=global$1.TYPED_ARRAY_SUPPORT===void 0||global$1.TYPED_ARRAY_SUPPORT,kMaxLength(),Buffer2.poolSize=8192,Buffer2._augment=function(e4){return e4.__proto__=Buffer2.prototype,e4},Buffer2.from=function(e4,t2,i2){return from(null,e4,t2,i2)},Buffer2.TYPED_ARRAY_SUPPORT&&(Buffer2.prototype.__proto__=Uint8Array.prototype,Buffer2.__proto__=Uint8Array,typeof Symbol<"u"&&Symbol.species&&Buffer2[Symbol.species]),Buffer2.alloc=function(e4,t2,i2){return alloc(null,e4,t2,i2)},Buffer2.allocUnsafe=function(e4){return allocUnsafe(null,e4)},Buffer2.allocUnsafeSlow=function(e4){return allocUnsafe(null,e4)},Buffer2.isBuffer=isBuffer,Buffer2.compare=function(e4,t2){if(!internalIsBuffer(e4)||!internalIsBuffer(t2))throw new TypeError("Arguments must be Buffers");if(e4===t2)return 0;for(var i2=e4.length,r2=t2.length,n2=0,a2=Math.min(i2,r2);n20&&(e4=this.toString("hex",0,t2).match(/.{2}/g).join(" "),this.length>t2&&(e4+=" ... ")),""},Buffer2.prototype.compare=function(e4,t2,i2,r2,n2){if(!internalIsBuffer(e4))throw new TypeError("Argument must be a Buffer");if(t2===void 0&&(t2=0),i2===void 0&&(i2=e4?e4.length:0),r2===void 0&&(r2=0),n2===void 0&&(n2=this.length),t2<0||i2>e4.length||r2<0||n2>this.length)throw new RangeError("out of range index");if(r2>=n2&&t2>=i2)return 0;if(r2>=n2)return-1;if(t2>=i2)return 1;if(this===e4)return 0;for(var a2=(n2>>>=0)-(r2>>>=0),o2=(i2>>>=0)-(t2>>>=0),s2=Math.min(a2,o2),l2=this.slice(r2,n2),u2=e4.slice(t2,i2),h2=0;h2n2)&&(i2=n2),e4.length>0&&(i2<0||t2<0)||t2>this.length)throw new RangeError("Attempt to write outside buffer bounds");r2||(r2="utf8");for(var a2=!1;;)switch(r2){case"hex":return hexWrite(this,e4,t2,i2);case"utf8":case"utf-8":return utf8Write(this,e4,t2,i2);case"ascii":return asciiWrite(this,e4,t2,i2);case"latin1":case"binary":return latin1Write(this,e4,t2,i2);case"base64":return base64Write(this,e4,t2,i2);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ucs2Write(this,e4,t2,i2);default:if(a2)throw new TypeError("Unknown encoding: "+r2);r2=(""+r2).toLowerCase(),a2=!0}},Buffer2.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var MAX_ARGUMENTS_LENGTH=4096;function decodeCodePointsArray(e4){var t2=e4.length;if(t2<=MAX_ARGUMENTS_LENGTH)return String.fromCharCode.apply(String,e4);for(var i2="",r2=0;r2r2)&&(i2=r2);for(var n2="",a2=t2;a2i2)throw new RangeError("Trying to access beyond buffer length")}function checkInt(e4,t2,i2,r2,n2,a2){if(!internalIsBuffer(e4))throw new TypeError('"buffer" argument must be a Buffer instance');if(t2>n2||t2e4.length)throw new RangeError("Index out of range")}function objectWriteUInt16(e4,t2,i2,r2){t2<0&&(t2=65535+t2+1);for(var n2=0,a2=Math.min(e4.length-i2,2);n2>>8*(r2?n2:1-n2)}function objectWriteUInt32(e4,t2,i2,r2){t2<0&&(t2=4294967295+t2+1);for(var n2=0,a2=Math.min(e4.length-i2,4);n2>>8*(r2?n2:3-n2)&255}function checkIEEE754(e4,t2,i2,r2,n2,a2){if(i2+r2>e4.length)throw new RangeError("Index out of range");if(i2<0)throw new RangeError("Index out of range")}function writeFloat(e4,t2,i2,r2,n2){return n2||checkIEEE754(e4,t2,i2,4),write(e4,t2,i2,r2,23,4),i2+4}function writeDouble(e4,t2,i2,r2,n2){return n2||checkIEEE754(e4,t2,i2,8),write(e4,t2,i2,r2,52,8),i2+8}Buffer2.prototype.slice=function(e4,t2){var i2,r2=this.length;if((e4=~~e4)<0?(e4+=r2)<0&&(e4=0):e4>r2&&(e4=r2),(t2=t2===void 0?r2:~~t2)<0?(t2+=r2)<0&&(t2=0):t2>r2&&(t2=r2),t20&&(n2*=256);)r2+=this[e4+--t2]*n2;return r2},Buffer2.prototype.readUInt8=function(e4,t2){return t2||checkOffset(e4,1,this.length),this[e4]},Buffer2.prototype.readUInt16LE=function(e4,t2){return t2||checkOffset(e4,2,this.length),this[e4]|this[e4+1]<<8},Buffer2.prototype.readUInt16BE=function(e4,t2){return t2||checkOffset(e4,2,this.length),this[e4]<<8|this[e4+1]},Buffer2.prototype.readUInt32LE=function(e4,t2){return t2||checkOffset(e4,4,this.length),(this[e4]|this[e4+1]<<8|this[e4+2]<<16)+16777216*this[e4+3]},Buffer2.prototype.readUInt32BE=function(e4,t2){return t2||checkOffset(e4,4,this.length),16777216*this[e4]+(this[e4+1]<<16|this[e4+2]<<8|this[e4+3])},Buffer2.prototype.readIntLE=function(e4,t2,i2){e4|=0,t2|=0,i2||checkOffset(e4,t2,this.length);for(var r2=this[e4],n2=1,a2=0;++a2=(n2*=128)&&(r2-=Math.pow(2,8*t2)),r2},Buffer2.prototype.readIntBE=function(e4,t2,i2){e4|=0,t2|=0,i2||checkOffset(e4,t2,this.length);for(var r2=t2,n2=1,a2=this[e4+--r2];r2>0&&(n2*=256);)a2+=this[e4+--r2]*n2;return a2>=(n2*=128)&&(a2-=Math.pow(2,8*t2)),a2},Buffer2.prototype.readInt8=function(e4,t2){return t2||checkOffset(e4,1,this.length),128&this[e4]?-1*(255-this[e4]+1):this[e4]},Buffer2.prototype.readInt16LE=function(e4,t2){t2||checkOffset(e4,2,this.length);var i2=this[e4]|this[e4+1]<<8;return 32768&i2?4294901760|i2:i2},Buffer2.prototype.readInt16BE=function(e4,t2){t2||checkOffset(e4,2,this.length);var i2=this[e4+1]|this[e4]<<8;return 32768&i2?4294901760|i2:i2},Buffer2.prototype.readInt32LE=function(e4,t2){return t2||checkOffset(e4,4,this.length),this[e4]|this[e4+1]<<8|this[e4+2]<<16|this[e4+3]<<24},Buffer2.prototype.readInt32BE=function(e4,t2){return t2||checkOffset(e4,4,this.length),this[e4]<<24|this[e4+1]<<16|this[e4+2]<<8|this[e4+3]},Buffer2.prototype.readFloatLE=function(e4,t2){return t2||checkOffset(e4,4,this.length),read(this,e4,!0,23,4)},Buffer2.prototype.readFloatBE=function(e4,t2){return t2||checkOffset(e4,4,this.length),read(this,e4,!1,23,4)},Buffer2.prototype.readDoubleLE=function(e4,t2){return t2||checkOffset(e4,8,this.length),read(this,e4,!0,52,8)},Buffer2.prototype.readDoubleBE=function(e4,t2){return t2||checkOffset(e4,8,this.length),read(this,e4,!1,52,8)},Buffer2.prototype.writeUIntLE=function(e4,t2,i2,r2){e4=+e4,t2|=0,i2|=0,r2||checkInt(this,e4,t2,i2,Math.pow(2,8*i2)-1,0);var n2=1,a2=0;for(this[t2]=255&e4;++a2=0&&(a2*=256);)this[t2+n2]=e4/a2&255;return t2+i2},Buffer2.prototype.writeUInt8=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,1,255,0),Buffer2.TYPED_ARRAY_SUPPORT||(e4=Math.floor(e4)),this[t2]=255&e4,t2+1},Buffer2.prototype.writeUInt16LE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,2,65535,0),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=255&e4,this[t2+1]=e4>>>8):objectWriteUInt16(this,e4,t2,!0),t2+2},Buffer2.prototype.writeUInt16BE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,2,65535,0),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=e4>>>8,this[t2+1]=255&e4):objectWriteUInt16(this,e4,t2,!1),t2+2},Buffer2.prototype.writeUInt32LE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,4,4294967295,0),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2+3]=e4>>>24,this[t2+2]=e4>>>16,this[t2+1]=e4>>>8,this[t2]=255&e4):objectWriteUInt32(this,e4,t2,!0),t2+4},Buffer2.prototype.writeUInt32BE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,4,4294967295,0),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=e4>>>24,this[t2+1]=e4>>>16,this[t2+2]=e4>>>8,this[t2+3]=255&e4):objectWriteUInt32(this,e4,t2,!1),t2+4},Buffer2.prototype.writeIntLE=function(e4,t2,i2,r2){if(e4=+e4,t2|=0,!r2){var n2=Math.pow(2,8*i2-1);checkInt(this,e4,t2,i2,n2-1,-n2)}var a2=0,o2=1,s2=0;for(this[t2]=255&e4;++a2=0&&(o2*=256);)e4<0&&s2===0&&this[t2+a2+1]!==0&&(s2=1),this[t2+a2]=(e4/o2|0)-s2&255;return t2+i2},Buffer2.prototype.writeInt8=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,1,127,-128),Buffer2.TYPED_ARRAY_SUPPORT||(e4=Math.floor(e4)),e4<0&&(e4=255+e4+1),this[t2]=255&e4,t2+1},Buffer2.prototype.writeInt16LE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,2,32767,-32768),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=255&e4,this[t2+1]=e4>>>8):objectWriteUInt16(this,e4,t2,!0),t2+2},Buffer2.prototype.writeInt16BE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,2,32767,-32768),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=e4>>>8,this[t2+1]=255&e4):objectWriteUInt16(this,e4,t2,!1),t2+2},Buffer2.prototype.writeInt32LE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,4,2147483647,-2147483648),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=255&e4,this[t2+1]=e4>>>8,this[t2+2]=e4>>>16,this[t2+3]=e4>>>24):objectWriteUInt32(this,e4,t2,!0),t2+4},Buffer2.prototype.writeInt32BE=function(e4,t2,i2){return e4=+e4,t2|=0,i2||checkInt(this,e4,t2,4,2147483647,-2147483648),e4<0&&(e4=4294967295+e4+1),Buffer2.TYPED_ARRAY_SUPPORT?(this[t2]=e4>>>24,this[t2+1]=e4>>>16,this[t2+2]=e4>>>8,this[t2+3]=255&e4):objectWriteUInt32(this,e4,t2,!1),t2+4},Buffer2.prototype.writeFloatLE=function(e4,t2,i2){return writeFloat(this,e4,t2,!0,i2)},Buffer2.prototype.writeFloatBE=function(e4,t2,i2){return writeFloat(this,e4,t2,!1,i2)},Buffer2.prototype.writeDoubleLE=function(e4,t2,i2){return writeDouble(this,e4,t2,!0,i2)},Buffer2.prototype.writeDoubleBE=function(e4,t2,i2){return writeDouble(this,e4,t2,!1,i2)},Buffer2.prototype.copy=function(e4,t2,i2,r2){if(i2||(i2=0),r2||r2===0||(r2=this.length),t2>=e4.length&&(t2=e4.length),t2||(t2=0),r2>0&&r2=this.length)throw new RangeError("sourceStart out of bounds");if(r2<0)throw new RangeError("sourceEnd out of bounds");r2>this.length&&(r2=this.length),e4.length-t2=0;--n2)e4[n2+t2]=this[n2+i2];else if(a2<1e3||!Buffer2.TYPED_ARRAY_SUPPORT)for(n2=0;n2>>=0,i2=i2===void 0?this.length:i2>>>0,e4||(e4=0),typeof e4=="number")for(a2=t2;a255295&&i2<57344){if(!n2){if(i2>56319){(t2-=3)>-1&&a2.push(239,191,189);continue}if(o2+1===r2){(t2-=3)>-1&&a2.push(239,191,189);continue}n2=i2;continue}if(i2<56320){(t2-=3)>-1&&a2.push(239,191,189),n2=i2;continue}i2=65536+(n2-55296<<10|i2-56320)}else n2&&(t2-=3)>-1&&a2.push(239,191,189);if(n2=null,i2<128){if((t2-=1)<0)break;a2.push(i2)}else if(i2<2048){if((t2-=2)<0)break;a2.push(i2>>6|192,63&i2|128)}else if(i2<65536){if((t2-=3)<0)break;a2.push(i2>>12|224,i2>>6&63|128,63&i2|128)}else{if(!(i2<1114112))throw new Error("Invalid code point");if((t2-=4)<0)break;a2.push(i2>>18|240,i2>>12&63|128,i2>>6&63|128,63&i2|128)}}return a2}function asciiToBytes(e4){for(var t2=[],i2=0;i2>8,n2=i2%256,a2.push(n2),a2.push(r2);return a2}function base64ToBytes(e4){return toByteArray(base64clean(e4))}function blitBuffer(e4,t2,i2,r2){for(var n2=0;n2=t2.length||n2>=e4.length);++n2)t2[n2+i2]=e4[n2];return n2}function isnan(e4){return e4!=e4}function isBuffer(e4){return e4!=null&&(!!e4._isBuffer||isFastBuffer(e4)||isSlowBuffer(e4))}function isFastBuffer(e4){return!!e4.constructor&&typeof e4.constructor.isBuffer=="function"&&e4.constructor.isBuffer(e4)}function isSlowBuffer(e4){return typeof e4.readFloatLE=="function"&&typeof e4.slice=="function"&&isFastBuffer(e4.slice(0,0))}(function(e4){e4[e4.BITMAP_INFO_HEADER=40]="BITMAP_INFO_HEADER",e4[e4.BITMAP_V2_INFO_HEADER=52]="BITMAP_V2_INFO_HEADER",e4[e4.BITMAP_V3_INFO_HEADER=56]="BITMAP_V3_INFO_HEADER",e4[e4.BITMAP_V4_HEADER=108]="BITMAP_V4_HEADER",e4[e4.BITMAP_V5_HEADER=124]="BITMAP_V5_HEADER"})(HeaderTypes||(HeaderTypes={}));var HeaderTypes$1=HeaderTypes,BmpCompression;function maskColor(e4,t2,i2,r2){let n2=1+~e4&e4,a2=1+~t2&t2,o2=1+~i2&i2,s2=1+~r2&r2,l2=e4/n2+1,u2=t2/a2+1,h2=i2/o2+1,c2=r2/s2+1;return{shiftRed:t3=>(t3&e4)/n2*256/l2,shiftGreen:e5=>(e5&t2)/a2*256/u2,shiftBlue:e5=>(e5&i2)/o2*256/h2,shiftAlpha:r2!==0?e5=>(e5&r2)/s2*256/c2:()=>255}}(function(e4){e4[e4.NONE=0]="NONE",e4[e4.BI_RLE8=1]="BI_RLE8",e4[e4.BI_RLE4=2]="BI_RLE4",e4[e4.BI_BIT_FIELDS=3]="BI_BIT_FIELDS",e4[e4.BI_ALPHA_BIT_FIELDS=6]="BI_ALPHA_BIT_FIELDS"})(BmpCompression||(BmpCompression={}));var BmpDecoder=class{flag;fileSize;reserved1;reserved2;offset;headerSize;width;height;planes;bitPP;compression;rawSize;hr;vr;colors;importantColors;palette;data;maskRed;maskGreen;maskBlue;maskAlpha;toRGBA;pos;bottomUp;buffer;locRed;locGreen;locBlue;locAlpha;shiftRed;shiftGreen;shiftBlue;shiftAlpha;constructor(e4,{toRGBA:t2}={toRGBA:!1}){if(this.buffer=e4,this.toRGBA=!!t2,this.pos=0,this.bottomUp=!0,this.flag=this.buffer.toString("utf-8",0,this.pos+=2),this.flag!=="BM")throw new Error("Invalid BMP File");this.locRed=this.toRGBA?0:3,this.locGreen=this.toRGBA?1:2,this.locBlue=this.toRGBA?2:1,this.locAlpha=this.toRGBA?3:0,this.parseHeader(),this.parseRGBA()}parseHeader(){if(this.fileSize=this.readUInt32LE(),this.reserved1=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.reserved2=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.offset=this.readUInt32LE(),this.headerSize=this.readUInt32LE(),!(this.headerSize in HeaderTypes$1))throw new Error(`Unsupported BMP header size ${this.headerSize}`);if(this.width=this.readUInt32LE(),this.height=this.readUInt32LE(),this.height=this.height>2147483647?this.height-4294967296:this.height,this.planes=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.bitPP=this.buffer.readUInt16LE(this.pos),this.pos+=2,this.compression=this.readUInt32LE(),this.rawSize=this.readUInt32LE(),this.hr=this.readUInt32LE(),this.vr=this.readUInt32LE(),this.colors=this.readUInt32LE(),this.importantColors=this.readUInt32LE(),this.bitPP===32?(this.maskAlpha=0,this.maskRed=16711680,this.maskGreen=65280,this.maskBlue=255):this.bitPP===16&&(this.maskAlpha=0,this.maskRed=31744,this.maskGreen=992,this.maskBlue=31),(this.headerSize>HeaderTypes$1.BITMAP_INFO_HEADER||this.compression===BmpCompression.BI_BIT_FIELDS||this.compression===BmpCompression.BI_ALPHA_BIT_FIELDS)&&(this.maskRed=this.readUInt32LE(),this.maskGreen=this.readUInt32LE(),this.maskBlue=this.readUInt32LE()),(this.headerSize>HeaderTypes$1.BITMAP_V2_INFO_HEADER||this.compression===BmpCompression.BI_ALPHA_BIT_FIELDS)&&(this.maskAlpha=this.readUInt32LE()),this.headerSize>HeaderTypes$1.BITMAP_V3_INFO_HEADER&&(this.pos+=HeaderTypes$1.BITMAP_V4_HEADER-HeaderTypes$1.BITMAP_V3_INFO_HEADER),this.headerSize>HeaderTypes$1.BITMAP_V4_HEADER&&(this.pos+=HeaderTypes$1.BITMAP_V5_HEADER-HeaderTypes$1.BITMAP_V4_HEADER),this.bitPP<=8||this.colors>0){let e5=this.colors===0?1<{let i3=this.buffer.readUInt8(this.pos++),r2=t3*this.width*4+8*e5*4;for(let t4=0;t4<8&&8*e5+t4>7-t4&1];this.data[r2+t4*this.locAlpha]=0,this.data[r2+4*t4+this.locBlue]=e6.blue,this.data[r2+4*t4+this.locGreen]=e6.green,this.data[r2+4*t4+this.locRed]=e6.red}})}bit4(){if(this.compression===BmpCompression.BI_RLE4){this.data.fill(0);let e4=!1,t2=this.bottomUp?this.height-1:0,i2=0;for(;i2>4),1&r3&&r3+1>1&1)==1&&this.pos++}}else for(let t3=0;t3>4),e4=!e4}}else{let e4=Math.ceil(this.width/2),t2=e4%4,i2=t2!==0?4-t2:0;this.scanImage(i2,e4,(e5,t3)=>{let i3=this.buffer.readUInt8(this.pos++),r2=t3*this.width*4+2*e5*4,n2=i3>>4,a2=this.palette[n2];if(this.data[r2]=0,this.data[r2+1]=a2.blue,this.data[r2+2]=a2.green,this.data[r2+3]=a2.red,2*e5+1>=this.width)return!1;let o2=15&i3;a2=this.palette[o2],this.data[r2+4]=0,this.data[r2+4+1]=a2.blue,this.data[r2+4+2]=a2.green,this.data[r2+4+3]=a2.red})}}bit8(){if(this.compression===BmpCompression.BI_RLE8){this.data.fill(0);let e4=this.bottomUp?this.height-1:0,t2=0;for(;t2{let i2=this.buffer.readUInt8(this.pos++),r2=t3*this.width*4+4*e5;if(i2{let i2=t2*this.width*4+4*e5,r2=this.buffer.readUInt16LE(this.pos);this.pos+=2,this.data[i2+this.locRed]=this.shiftRed(r2),this.data[i2+this.locGreen]=this.shiftGreen(r2),this.data[i2+this.locBlue]=this.shiftBlue(r2),this.data[i2+this.locAlpha]=this.shiftAlpha(r2)})}bit24(){let e4=this.width%4;this.scanImage(e4,this.width,(e5,t2)=>{let i2=t2*this.width*4+4*e5,r2=this.buffer.readUInt8(this.pos++),n2=this.buffer.readUInt8(this.pos++),a2=this.buffer.readUInt8(this.pos++);this.data[i2+this.locRed]=a2,this.data[i2+this.locGreen]=n2,this.data[i2+this.locBlue]=r2,this.data[i2+this.locAlpha]=0})}bit32(){this.scanImage(0,this.width,(e4,t2)=>{let i2=t2*this.width*4+4*e4,r2=this.readUInt32LE();this.data[i2+this.locRed]=this.shiftRed(r2),this.data[i2+this.locGreen]=this.shiftGreen(r2),this.data[i2+this.locBlue]=this.shiftBlue(r2),this.data[i2+this.locAlpha]=this.shiftAlpha(r2)})}scanImage(e4=0,t2=this.width,i2){for(let r2=this.height-1;r2>=0;r2--){let n2=this.bottomUp?r2:this.height-1-r2;for(let e5=0;e5e5<<1|t2,0)}function createColor(e4){return e4.quad<<24|e4.red<<16|e4.green<<8|e4.blue}var BmpEncoder=class{fileSize;reserved1;reserved2;offset;width;flag;height;planes;bitPP;compress;hr;vr;colors;importantColors;rawSize;headerSize;data;palette;extraBytes;buffer;bytesInColor;pos;constructor(e4){switch(this.buffer=e4.data,this.width=e4.width,this.height=e4.height,this.headerSize=HeaderTypes$1.BITMAP_INFO_HEADER,this.flag="BM",this.bitPP=e4.bitPP||24,this.offset=54,this.reserved1=e4.reserved1||0,this.reserved2=e4.reserved2||0,this.planes=1,this.compress=0,this.hr=e4.hr||0,this.vr=e4.vr||0,this.importantColors=e4.importantColors||0,this.colors=Math.min(2**(this.bitPP-1||1),e4.colors||1/0),this.palette=e4.palette||[],this.colors&&this.bitPP<16?this.offset+=4*this.colors:this.colors=0,this.bitPP){case 32:this.bytesInColor=4;break;case 16:this.bytesInColor=2;break;case 8:this.bytesInColor=1;break;case 4:this.bytesInColor=.5;break;case 1:this.bytesInColor=1/8;break;default:this.bytesInColor=3,this.bitPP=24}let t2=this.width*this.bitPP/32,i2=Math.ceil(t2);this.extraBytes=4*(i2-t2),this.rawSize=this.height*i2*4+2,this.fileSize=this.rawSize+this.offset,this.data=Buffer2.alloc(this.fileSize,1),this.pos=0,this.encode()}encode(){switch(this.pos=0,this.writeHeader(),this.bitPP){case 32:this.bit32();break;case 16:this.bit16();break;case 8:this.bit8();break;case 4:this.bit4();break;case 1:this.bit1();break;default:this.bit24()}}writeHeader(){this.data.write(this.flag,this.pos,2),this.pos+=2,this.writeUInt32LE(this.fileSize),this.writeUInt32LE(this.reserved1<<16|this.reserved2),this.writeUInt32LE(this.offset),this.writeUInt32LE(this.headerSize),this.writeUInt32LE(this.width),this.writeUInt32LE(this.height),this.data.writeUInt16LE(this.planes,this.pos),this.pos+=2,this.data.writeUInt16LE(this.bitPP,this.pos),this.pos+=2,this.writeUInt32LE(this.compress),this.writeUInt32LE(this.rawSize),this.writeUInt32LE(this.hr),this.writeUInt32LE(this.vr),this.writeUInt32LE(this.colors),this.writeUInt32LE(this.importantColors)}bit1(){this.palette.length&&this.colors===2?this.initColors(1):(this.writeUInt32LE(16777215),this.writeUInt32LE(0)),this.pos+=1;let e4=[];this.writeImage((t2,i2,r2)=>{let n2=i2;n2++;let a2=this.buffer[n2++],o2=this.buffer[n2++],s2=.2126*this.buffer[n2++]+.7152*o2+.0722*a2;return e4.push(s2>127?0:1),(r2+1)%8==0?(this.data[t2-1]=createInteger(e4),e4=[]):r2===this.width-1&&e4.length>0&&(this.data[t2-1]=createInteger(e4)<<4,e4=[]),n2})}bit4(){let e4=this.initColors(4),t2=[];this.writeImage((i2,r2,n2)=>{let a2=r2,o2=createColor({quad:this.buffer[a2++],blue:this.buffer[a2++],green:this.buffer[a2++],red:this.buffer[a2++]}),s2=e4.findIndex(e5=>e5===o2);return s2!==-1?t2.push(s2):t2.push(0),(n2+1)%2==0&&(this.data[i2]=t2[0]<<4|t2[1],t2=[]),a2})}bit8(){let e4=this.initColors(8);this.writeImage((t2,i2)=>{let r2=i2,n2=createColor({quad:this.buffer[r2++],blue:this.buffer[r2++],green:this.buffer[r2++],red:this.buffer[r2++]}),a2=e4.findIndex(e5=>e5===n2);return this.data[t2]=a2!==-1?a2:0,r2})}bit16(){this.writeImage((e4,t2)=>{let i2=t2+1,r2=this.buffer[i2++]/8,n2=this.buffer[i2++]/8,a2=this.buffer[i2++]/8<<10|n2<<5|r2;return this.data[e4]=255&a2,this.data[e4+1]=(65280&a2)>>8,i2})}bit24(){this.writeImage((e4,t2)=>{let i2=t2+1;return this.data[e4]=this.buffer[i2++],this.data[e4+1]=this.buffer[i2++],this.data[e4+2]=this.buffer[i2++],i2})}bit32(){this.writeImage((e4,t2)=>{let i2=t2;return this.data[e4+3]=this.buffer[i2++],this.data[e4]=this.buffer[i2++],this.data[e4+1]=this.buffer[i2++],this.data[e4+2]=this.buffer[i2++],i2})}writeImage(e4){let t2=this.extraBytes+this.width*this.bytesInColor,i2=0;for(let r2=0;r2.5?l2/(2-a2-o2):l2/(a2+o2),a2){case e4:r2=(t2-i2)/l2+(t21&&(i3-=1),i3<1/6?e5+6*(t3-e5)*i3:i3<.5?t3:i3<2/3?e5+(t3-e5)*(2/3-i3)*6:e5}if(e4=bound01(e4,360),t2=bound01(t2,100),i2=bound01(i2,100),t2===0)r2=n2=a2=i2;else{var s2=i2<.5?i2*(1+t2):i2+t2-i2*t2,l2=2*i2-s2;r2=o2(l2,s2,e4+1/3),n2=o2(l2,s2,e4),a2=o2(l2,s2,e4-1/3)}return{r:255*r2,g:255*n2,b:255*a2}}function rgbToHsv(e4,t2,i2){e4=bound01(e4,255),t2=bound01(t2,255),i2=bound01(i2,255);var r2,n2,a2=Math.max(e4,t2,i2),o2=Math.min(e4,t2,i2),s2=a2,l2=a2-o2;if(n2=a2===0?0:l2/a2,a2==o2)r2=0;else{switch(a2){case e4:r2=(t2-i2)/l2+(t2>1)+720)%360;--t2;)r2.h=(r2.h+n2)%360,a2.push(tinycolor(r2));return a2}function _monochromatic(e4,t2){t2=t2||6;for(var i2=tinycolor(e4).toHsv(),r2=i2.h,n2=i2.s,a2=i2.v,o2=[],s2=1/t2;t2--;)o2.push(tinycolor({h:r2,s:n2,v:a2})),a2=(a2+s2)%1;return o2}tinycolor.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e4=this.toRgb();return(299*e4.r+587*e4.g+114*e4.b)/1e3},getLuminance:function(){var e4,t2,i2,r2=this.toRgb();return e4=r2.r/255,t2=r2.g/255,i2=r2.b/255,.2126*(e4<=.03928?e4/12.92:Math.pow((e4+.055)/1.055,2.4))+.7152*(t2<=.03928?t2/12.92:Math.pow((t2+.055)/1.055,2.4))+.0722*(i2<=.03928?i2/12.92:Math.pow((i2+.055)/1.055,2.4))},setAlpha:function(e4){return this._a=boundAlpha(e4),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e4=rgbToHsv(this._r,this._g,this._b);return{h:360*e4.h,s:e4.s,v:e4.v,a:this._a}},toHsvString:function(){var e4=rgbToHsv(this._r,this._g,this._b),t2=Math.round(360*e4.h),i2=Math.round(100*e4.s),r2=Math.round(100*e4.v);return this._a==1?"hsv("+t2+", "+i2+"%, "+r2+"%)":"hsva("+t2+", "+i2+"%, "+r2+"%, "+this._roundA+")"},toHsl:function(){var e4=rgbToHsl(this._r,this._g,this._b);return{h:360*e4.h,s:e4.s,l:e4.l,a:this._a}},toHslString:function(){var e4=rgbToHsl(this._r,this._g,this._b),t2=Math.round(360*e4.h),i2=Math.round(100*e4.s),r2=Math.round(100*e4.l);return this._a==1?"hsl("+t2+", "+i2+"%, "+r2+"%)":"hsla("+t2+", "+i2+"%, "+r2+"%, "+this._roundA+")"},toHex:function(e4){return rgbToHex(this._r,this._g,this._b,e4)},toHexString:function(e4){return"#"+this.toHex(e4)},toHex8:function(e4){return rgbaToHex(this._r,this._g,this._b,this._a,e4)},toHex8String:function(e4){return"#"+this.toHex8(e4)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return this._a==1?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*bound01(this._r,255))+"%",g:Math.round(100*bound01(this._g,255))+"%",b:Math.round(100*bound01(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%)":"rgba("+Math.round(100*bound01(this._r,255))+"%, "+Math.round(100*bound01(this._g,255))+"%, "+Math.round(100*bound01(this._b,255))+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":!(this._a<1)&&(hexNames[rgbToHex(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e4){var t2="#"+rgbaToArgbHex(this._r,this._g,this._b,this._a),i2=t2,r2=this._gradientType?"GradientType = 1, ":"";if(e4){var n2=tinycolor(e4);i2="#"+rgbaToArgbHex(n2._r,n2._g,n2._b,n2._a)}return"progid:DXImageTransform.Microsoft.gradient("+r2+"startColorstr="+t2+",endColorstr="+i2+")"},toString:function(e4){var t2=!!e4;e4=e4||this._format;var i2=!1,r2=this._a<1&&this._a>=0;return t2||!r2||e4!=="hex"&&e4!=="hex6"&&e4!=="hex3"&&e4!=="hex4"&&e4!=="hex8"&&e4!=="name"?(e4==="rgb"&&(i2=this.toRgbString()),e4==="prgb"&&(i2=this.toPercentageRgbString()),e4!=="hex"&&e4!=="hex6"||(i2=this.toHexString()),e4==="hex3"&&(i2=this.toHexString(!0)),e4==="hex4"&&(i2=this.toHex8String(!0)),e4==="hex8"&&(i2=this.toHex8String()),e4==="name"&&(i2=this.toName()),e4==="hsl"&&(i2=this.toHslString()),e4==="hsv"&&(i2=this.toHsvString()),i2||this.toHexString()):e4==="name"&&this._a===0?this.toName():this.toRgbString()},clone:function(){return tinycolor(this.toString())},_applyModification:function(e4,t2){var i2=e4.apply(null,[this].concat([].slice.call(t2)));return this._r=i2._r,this._g=i2._g,this._b=i2._b,this.setAlpha(i2._a),this},lighten:function(){return this._applyModification(_lighten,arguments)},brighten:function(){return this._applyModification(_brighten,arguments)},darken:function(){return this._applyModification(_darken,arguments)},desaturate:function(){return this._applyModification(_desaturate,arguments)},saturate:function(){return this._applyModification(_saturate,arguments)},greyscale:function(){return this._applyModification(_greyscale,arguments)},spin:function(){return this._applyModification(_spin,arguments)},_applyCombination:function(e4,t2){return e4.apply(null,[this].concat([].slice.call(t2)))},analogous:function(){return this._applyCombination(_analogous,arguments)},complement:function(){return this._applyCombination(_complement,arguments)},monochromatic:function(){return this._applyCombination(_monochromatic,arguments)},splitcomplement:function(){return this._applyCombination(_splitcomplement,arguments)},triad:function(){return this._applyCombination(polyad,[3])},tetrad:function(){return this._applyCombination(polyad,[4])}},tinycolor.fromRatio=function(e4,t2){if(_typeof(e4)=="object"){var i2={};for(var r2 in e4)e4.hasOwnProperty(r2)&&(i2[r2]=r2==="a"?e4[r2]:convertToPercentage(e4[r2]));e4=i2}return tinycolor(e4,t2)},tinycolor.equals=function(e4,t2){return!(!e4||!t2)&&tinycolor(e4).toRgbString()==tinycolor(t2).toRgbString()},tinycolor.random=function(){return tinycolor.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},tinycolor.mix=function(e4,t2,i2){i2=i2===0?0:i2||50;var r2=tinycolor(e4).toRgb(),n2=tinycolor(t2).toRgb(),a2=i2/100;return tinycolor({r:(n2.r-r2.r)*a2+r2.r,g:(n2.g-r2.g)*a2+r2.g,b:(n2.b-r2.b)*a2+r2.b,a:(n2.a-r2.a)*a2+r2.a})},tinycolor.readability=function(e4,t2){var i2=tinycolor(e4),r2=tinycolor(t2);return(Math.max(i2.getLuminance(),r2.getLuminance())+.05)/(Math.min(i2.getLuminance(),r2.getLuminance())+.05)},tinycolor.isReadable=function(e4,t2,i2){var r2,n2,a2=tinycolor.readability(e4,t2);switch(n2=!1,(r2=validateWCAG2Parms(i2)).level+r2.size){case"AAsmall":case"AAAlarge":n2=a2>=4.5;break;case"AAlarge":n2=a2>=3;break;case"AAAsmall":n2=a2>=7}return n2},tinycolor.mostReadable=function(e4,t2,i2){var r2,n2,a2,o2,s2=null,l2=0;n2=(i2=i2||{}).includeFallbackColors,a2=i2.level,o2=i2.size;for(var u2=0;u2l2&&(l2=r2,s2=tinycolor(t2[u2]));return tinycolor.isReadable(e4,s2,{level:a2,size:o2})||!n2?s2:(i2.includeFallbackColors=!1,tinycolor.mostReadable(e4,["#fff","#000"],i2))};var names$1=tinycolor.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",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",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",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:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},hexNames=tinycolor.hexNames=flip(names$1);function flip(e4){var t2={};for(var i2 in e4)e4.hasOwnProperty(i2)&&(t2[e4[i2]]=i2);return t2}function boundAlpha(e4){return e4=parseFloat(e4),(isNaN(e4)||e4<0||e4>1)&&(e4=1),e4}function bound01(e4,t2){isOnePointZero(e4)&&(e4="100%");var i2=isPercentage(e4);return e4=Math.min(t2,Math.max(0,parseFloat(e4))),i2&&(e4=parseInt(e4*t2,10)/100),Math.abs(e4-t2)<1e-6?1:e4%t2/parseFloat(t2)}function clamp01(e4){return Math.min(1,Math.max(0,e4))}function parseIntFromHex(e4){return parseInt(e4,16)}function isOnePointZero(e4){return typeof e4=="string"&&e4.indexOf(".")!=-1&&parseFloat(e4)===1}function isPercentage(e4){return typeof e4=="string"&&e4.indexOf("%")!=-1}function pad2(e4){return e4.length==1?"0"+e4:""+e4}function convertToPercentage(e4){return e4<=1&&(e4=100*e4+"%"),e4}function convertDecimalToHex(e4){return Math.round(255*parseFloat(e4)).toString(16)}function convertHexToDecimal(e4){return parseIntFromHex(e4)/255}var matchers=(CSS_UNIT="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",PERMISSIVE_MATCH3="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?",PERMISSIVE_MATCH4="[\\s|\\(]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")[,|\\s]+("+CSS_UNIT+")\\s*\\)?",{CSS_UNIT:new RegExp(CSS_UNIT),rgb:new RegExp("rgb"+PERMISSIVE_MATCH3),rgba:new RegExp("rgba"+PERMISSIVE_MATCH4),hsl:new RegExp("hsl"+PERMISSIVE_MATCH3),hsla:new RegExp("hsla"+PERMISSIVE_MATCH4),hsv:new RegExp("hsv"+PERMISSIVE_MATCH3),hsva:new RegExp("hsva"+PERMISSIVE_MATCH4),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}),CSS_UNIT,PERMISSIVE_MATCH3,PERMISSIVE_MATCH4;function isValidCSSUnit(e4){return!!matchers.CSS_UNIT.exec(e4)}function stringInputToObject(e4){e4=e4.replace(trimLeft,"").replace(trimRight,"").toLowerCase();var t2,i2=!1;if(names$1[e4])e4=names$1[e4],i2=!0;else if(e4=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};return(t2=matchers.rgb.exec(e4))?{r:t2[1],g:t2[2],b:t2[3]}:(t2=matchers.rgba.exec(e4))?{r:t2[1],g:t2[2],b:t2[3],a:t2[4]}:(t2=matchers.hsl.exec(e4))?{h:t2[1],s:t2[2],l:t2[3]}:(t2=matchers.hsla.exec(e4))?{h:t2[1],s:t2[2],l:t2[3],a:t2[4]}:(t2=matchers.hsv.exec(e4))?{h:t2[1],s:t2[2],v:t2[3]}:(t2=matchers.hsva.exec(e4))?{h:t2[1],s:t2[2],v:t2[3],a:t2[4]}:(t2=matchers.hex8.exec(e4))?{r:parseIntFromHex(t2[1]),g:parseIntFromHex(t2[2]),b:parseIntFromHex(t2[3]),a:convertHexToDecimal(t2[4]),format:i2?"name":"hex8"}:(t2=matchers.hex6.exec(e4))?{r:parseIntFromHex(t2[1]),g:parseIntFromHex(t2[2]),b:parseIntFromHex(t2[3]),format:i2?"name":"hex"}:(t2=matchers.hex4.exec(e4))?{r:parseIntFromHex(t2[1]+""+t2[1]),g:parseIntFromHex(t2[2]+""+t2[2]),b:parseIntFromHex(t2[3]+""+t2[3]),a:convertHexToDecimal(t2[4]+""+t2[4]),format:i2?"name":"hex8"}:!!(t2=matchers.hex3.exec(e4))&&{r:parseIntFromHex(t2[1]+""+t2[1]),g:parseIntFromHex(t2[2]+""+t2[2]),b:parseIntFromHex(t2[3]+""+t2[3]),format:i2?"name":"hex"}}function validateWCAG2Parms(e4){var t2,i2;return(t2=((e4=e4||{level:"AA",size:"small"}).level||"AA").toUpperCase())!=="AA"&&t2!=="AAA"&&(t2="AA"),(i2=(e4.size||"small").toLowerCase())!=="small"&&i2!=="large"&&(i2="small"),{level:t2,size:i2}}function clone(e4){let t2={width:e4.bitmap.width,height:e4.bitmap.height,data:Buffer2.from(e4.bitmap.data)};return new e4.constructor(t2)}function scan(e4,t2,i2,r2,n2,a2){let o2,s2,l2,u2,h2;if(typeof t2=="function")h2=t2,o2=0,s2=0,l2=e4.bitmap.width,u2=e4.bitmap.height;else{if(o2=t2,typeof i2!="number")throw new Error("y must be a number");if(s2=i2,typeof r2!="number")throw new Error("w must be a number");if(l2=r2,typeof n2!="number")throw new Error("h must be a number");if(u2=n2,typeof a2!="function")throw new Error("cb must be a function");h2=a2}o2=Math.round(o2),s2=Math.round(s2),l2=Math.round(l2),u2=Math.round(u2);let c2=h2.bind(e4);for(let t3=s2;t3255)throw new Error("r must be between 0 and 255");if(t2<0||t2>255)throw new Error("g must be between 0 and 255");if(i2<0||i2>255)throw new Error("b must be between 0 and 255");if(r2<0||r2>255)throw new Error("a must be between 0 and 255");let n2=255&e4;return n2<<=8,n2|=255&t2,n2<<=8,n2|=255&i2,n2<<=8,n2|=255&r2,n2>>>=0,n2}function colorDiff(e4,t2){let i2=e5=>Math.pow(e5,2),{max:r2}=Math,n2="a"in e4?e4.a:255,a2="a"in t2?t2.a:255;return(r2(i2(e4.r-t2.r),i2(e4.r-t2.r-n2+a2))+r2(i2(e4.g-t2.g),i2(e4.g-t2.g-n2+a2))+r2(i2(e4.b-t2.b),i2(e4.b-t2.b-n2+a2)))/195075}function limit255(e4){return e4=Math.max(e4,0),e4=Math.min(e4,255)}function cssColorToHex(e4){return typeof e4=="number"?e4:parseInt(tinycolor(e4).toHex8(),16)}function encode$1(e4,t2={}){return scan({bitmap:e4},0,0,e4.width,e4.height,function(t3,i2,r2){let n2=e4.data[r2+0],a2=e4.data[r2+1],o2=e4.data[r2+2],s2=e4.data[r2+3];e4.data[r2+0]=s2,e4.data[r2+1]=o2,e4.data[r2+2]=a2,e4.data[r2+3]=n2}),encode$2({...e4,...t2}).data}function decode$1(e4,t2){let i2=decode$2(e4,t2);return scan({bitmap:i2},0,0,i2.width,i2.height,function(e5,t3,r2){let n2=i2.data[r2+1],a2=i2.data[r2+2],o2=i2.data[r2+3];i2.data[r2+0]=o2,i2.data[r2+1]=a2,i2.data[r2+2]=n2,i2.data[r2+3]=255}),i2}function msBmp(){return{mime:"image/x-ms-bmp",encode:encode$1,decode:decode$1}}function bmp(){return{mime:"image/bmp",encode:encode$1,decode:decode$1}}var omggif={},GifReader_1,GifWriter_1;function GifWriter(e4,t2,i2,r2){var n2=0,a2=(r2=r2===void 0?{}:r2).loop===void 0?null:r2.loop,o2=r2.palette===void 0?null:r2.palette;if(t2<=0||i2<=0||t2>65535||i2>65535)throw new Error("Width/Height invalid.");function s2(e5){var t3=e5.length;if(t3<2||t3>256||t3&t3-1)throw new Error("Invalid code/color length, must be power of 2 and 2 .. 256.");return t3}e4[n2++]=71,e4[n2++]=73,e4[n2++]=70,e4[n2++]=56,e4[n2++]=57,e4[n2++]=97;var l2=0,u2=0;if(o2!==null){for(var h2=s2(o2);h2>>=1;)++l2;if(h2=1<=h2)throw new Error("Background index out of range.");if(u2===0)throw new Error("Background index explicitly passed as 0.")}}if(e4[n2++]=255&t2,e4[n2++]=t2>>8&255,e4[n2++]=255&i2,e4[n2++]=i2>>8&255,e4[n2++]=(o2!==null?128:0)|l2,e4[n2++]=u2,e4[n2++]=0,o2!==null)for(var c2=0,f2=o2.length;c2>16&255,e4[n2++]=d>>8&255,e4[n2++]=255&d}if(a2!==null){if(a2<0||a2>65535)throw new Error("Loop count invalid.");e4[n2++]=33,e4[n2++]=255,e4[n2++]=11,e4[n2++]=78,e4[n2++]=69,e4[n2++]=84,e4[n2++]=83,e4[n2++]=67,e4[n2++]=65,e4[n2++]=80,e4[n2++]=69,e4[n2++]=50,e4[n2++]=46,e4[n2++]=48,e4[n2++]=3,e4[n2++]=1,e4[n2++]=255&a2,e4[n2++]=a2>>8&255,e4[n2++]=0}var p2=!1;this.addFrame=function(t3,i3,r3,a3,l3,u3){if(p2===!0&&(--n2,p2=!1),u3=u3===void 0?{}:u3,t3<0||i3<0||t3>65535||i3>65535)throw new Error("x/y invalid.");if(r3<=0||a3<=0||r3>65535||a3>65535)throw new Error("Width/Height invalid.");if(l3.length>=1;)++d2;f3=1<3)throw new Error("Disposal out of range.");var g=!1,b2=0;if(u3.transparent!==void 0&&u3.transparent!==null&&(g=!0,(b2=u3.transparent)<0||b2>=f3))throw new Error("Transparent color index.");if((_2!==0||g||m!==0)&&(e4[n2++]=33,e4[n2++]=249,e4[n2++]=4,e4[n2++]=_2<<2|(g===!0?1:0),e4[n2++]=255&m,e4[n2++]=m>>8&255,e4[n2++]=b2,e4[n2++]=0),e4[n2++]=44,e4[n2++]=255&t3,e4[n2++]=t3>>8&255,e4[n2++]=255&i3,e4[n2++]=i3>>8&255,e4[n2++]=255&r3,e4[n2++]=r3>>8&255,e4[n2++]=255&a3,e4[n2++]=a3>>8&255,e4[n2++]=h3===!0?128|d2-1:0,h3===!0)for(var y2=0,w=c3.length;y2>16&255,e4[n2++]=v2>>8&255,e4[n2++]=255&v2}return n2=GifWriterOutputLZWCodeStream(e4,n2,d2<2?2:d2,l3)},this.end=function(){return p2===!1&&(e4[n2++]=59,p2=!0),n2},this.getOutputBuffer=function(){return e4},this.setOutputBuffer=function(t3){e4=t3},this.getOutputBufferPosition=function(){return n2},this.setOutputBufferPosition=function(e5){n2=e5}}function GifWriterOutputLZWCodeStream(e4,t2,i2,r2){e4[t2++]=i2;var n2=t2++,a2=1<=i3;)e4[t2++]=255&c2,c2>>=8,h2-=8,t2===n2+256&&(e4[n2]=255,n2=t2++)}function d(e5){c2|=e5<=8;)e4[t2++]=255&c2,c2>>=8,h2-=8,t2===n2+256&&(e4[n2]=255,n2=t2++);l2===4096?(d(a2),l2=s2+1,u2=i2+1,m={}):(l2>=1<>7,o2=1<<(7&n2)+1;e4[t2++],e4[t2++];var s2=null,l2=null;a2&&(s2=t2,l2=o2,t2+=3*o2);var u2=!0,h2=[],c2=0,f2=null,d=0,p2=null;for(this.width=i2,this.height=r2;u2&&t2=0))throw Error("Invalid block size");if(I===0)break;t2+=I}break;case 249:if(e4[t2++]!==4||e4[t2+4]!==0)throw new Error("Invalid graphics extension block.");var m=e4[t2++];c2=e4[t2++]|e4[t2++]<<8,f2=e4[t2++],1&m||(f2=null),d=m>>2&7,t2++;break;case 254:for(;;){if(!((I=e4[t2++])>=0))throw Error("Invalid block size");if(I===0)break;t2+=I}break;default:throw new Error("Unknown graphic control label: 0x"+e4[t2-1].toString(16))}break;case 44:var _2=e4[t2++]|e4[t2++]<<8,g=e4[t2++]|e4[t2++]<<8,b2=e4[t2++]|e4[t2++]<<8,y2=e4[t2++]|e4[t2++]<<8,w=e4[t2++],v2=w>>6&1,x2=1<<(7&w)+1,E2=s2,k2=l2,S2=!1;w>>7&&(S2=!0,E2=t2,k2=x2,t2+=3*x2);var A2=t2;for(t2++;;){var I;if(!((I=e4[t2++])>=0))throw Error("Invalid block size");if(I===0)break;t2+=I}h2.push({x:_2,y:g,width:b2,height:y2,has_local_palette:S2,palette_offset:E2,palette_size:k2,data_offset:A2,data_length:t2-A2,transparent_index:f2,interlaced:!!v2,delay:c2,disposal:d});break;case 59:u2=!1;break;default:throw new Error("Unknown gif block: 0x"+e4[t2-1].toString(16))}this.numFrames=function(){return h2.length},this.loopCount=function(){return p2},this.frameInfo=function(e5){if(e5<0||e5>=h2.length)throw new Error("Frame index out of range.");return h2[e5]},this.decodeAndBlitFrameBGRA=function(t3,r3){var n3=this.frameInfo(t3),a3=n3.width*n3.height,o3=new Uint8Array(a3);GifReaderLZWOutputIndexStream(e4,n3.data_offset,o3,a3);var s3=n3.palette_offset,l3=n3.transparent_index;l3===null&&(l3=256);var u3=n3.width,h3=i2-u3,c3=u3,f3=4*(n3.y*i2+n3.x),d2=4*((n3.y+n3.height)*i2+n3.x),p3=f3,m2=4*h3;n3.interlaced===!0&&(m2+=4*i2*7);for(var _3=8,g2=0,b3=o3.length;g2=d2&&(m2=4*h3+4*i2*(_3-1),p3=f3+(u3+h3)*(_3<<1),_3>>=1)),y3===l3)p3+=4;else{var w2=e4[s3+3*y3],v3=e4[s3+3*y3+1],x3=e4[s3+3*y3+2];r3[p3++]=x3,r3[p3++]=v3,r3[p3++]=w2,r3[p3++]=255}--c3}},this.decodeAndBlitFrameRGBA=function(t3,r3){var n3=this.frameInfo(t3),a3=n3.width*n3.height,o3=new Uint8Array(a3);GifReaderLZWOutputIndexStream(e4,n3.data_offset,o3,a3);var s3=n3.palette_offset,l3=n3.transparent_index;l3===null&&(l3=256);var u3=n3.width,h3=i2-u3,c3=u3,f3=4*(n3.y*i2+n3.x),d2=4*((n3.y+n3.height)*i2+n3.x),p3=f3,m2=4*h3;n3.interlaced===!0&&(m2+=4*i2*7);for(var _3=8,g2=0,b3=o3.length;g2=d2&&(m2=4*h3+4*i2*(_3-1),p3=f3+(u3+h3)*(_3<<1),_3>>=1)),y3===l3)p3+=4;else{var w2=e4[s3+3*y3],v3=e4[s3+3*y3+1],x3=e4[s3+3*y3+2];r3[p3++]=w2,r3[p3++]=v3,r3[p3++]=x3,r3[p3++]=255}--c3}}}function GifReaderLZWOutputIndexStream(e4,t2,i2,r2){for(var n2=e4[t2++],a2=1<>=l2,h2-=l2,_2!==a2){if(_2===o2)break;for(var g=_2a2;)y2=p2[y2]>>8,++b2;var w=y2;if(f2+b2+(g!==_2?1:0)>r2)return void console.log("Warning, gif stream longer than expected.");i2[f2++]=w;var v2=f2+=b2;for(g!==_2&&(i2[f2++]=w),y2=g;b2--;)y2=p2[y2],i2[--v2]=255&y2,y2>>=8;m!==null&&s2<4096&&(p2[s2++]=m<<8|w,s2>=u2+1&&l2<12&&(++l2,u2=u2<<1|1)),m=_2}else s2=o2+1,u2=(1<<(l2=n2+1))-1,m=null}return f2!==r2&&console.log("Warning, gif stream shorter than expected."),i2}try{GifWriter_1=omggif.GifWriter=GifWriter,GifReader_1=omggif.GifReader=GifReader}catch{}var BitmapImage$2=class e{constructor(...t2){if(t2.length===0)throw new Error("constructor requires parameters");let i2=t2[0];if(i2!==null&&typeof i2=="object")if(i2 instanceof e){let e4=i2.bitmap;this.bitmap={width:e4.width,height:e4.height,data:new Buffer2(e4.width*e4.height*4)},e4.data.copy(this.bitmap.data)}else{if(!(i2.width&&i2.height&&i2.data))throw new Error("unrecognized constructor parameters");this.bitmap=i2}else{if(typeof i2!="number"||typeof t2[1]!="number")throw new Error("unrecognized constructor parameters");{let e4=i2,r2=t2[1],n2=t2[2];this.bitmap={width:e4,height:r2},Buffer2.isBuffer(n2)?this.bitmap.data=n2:(this.bitmap.data=new Buffer2(e4*r2*4),typeof n2=="number"&&this.fillRGBA(n2))}}}blit(e4,t2,i2,r2,n2,a2,o2){if(r2+a2>this.bitmap.width)throw new Error("copy exceeds width of source bitmap");if(t2+a2>e4.bitmap.width)throw new Error("copy exceeds width of target bitmap");if(n2+o2>this.bitmap.height)throw new Error("copy exceeds height of source bitmap");if(i2+o2>e4.bitmap.height)throw new Erro("copy exceeds height of target bitmap");let s2=this.bitmap.data,l2=e4.bitmap.data,u2=4*this.bitmap.width,h2=4*e4.bitmap.width,c2=4*a2,f2=n2*u2+4*r2,d=i2*h2+4*t2;for(;--o2>=0;)s2.copy(l2,d,f2,f2+c2),f2+=u2,d+=h2;return this}fillRGBA(e4){let t2=this.bitmap.data,i2=4*this.bitmap.height,r2=0;for(;r2{let n2=Math.round(.299*e4[r2]+.587*e4[r2+1]+.114*e4[r2+2]);e4[r2]=n2,e4[r2+1]=n2,e4[r2+2]=n2}),this}reframe(t2,i2,r2,n2,a2){let o2=t2<0?0:t2,s2=i2<0?0:i2,l2=r2+o2>this.bitmap.width?this.bitmap.width-o2:r2,u2=n2+s2>this.bitmap.height?this.bitmap.height-s2:n2,h2=t2<0?-t2:0,c2=i2<0?-i2:0,f2;if(a2===void 0){if(o2!==t2||s2!=i2||l2!==r2||u2!==n2)throw new GifError("fillRGBA required for this reframing");f2=new e(r2,n2)}else f2=new e(r2,n2,a2);return this.blit(f2,h2,c2,o2,s2,l2,u2),this.bitmap=f2.bitmap,this}scale(e4){if(e4===1)return;if(!Number.isInteger(e4)||e4<1)throw new Error("the scale must be an integer >= 1");let t2=this.bitmap.width,i2=this.bitmap.height,r2=t2*e4*4,n2=this.bitmap.data,a2=new Buffer2(i2*r2*e4),o2,s2=0,l2=0;for(let u2=0;u2t2 in e4?__defProp$3(e4,t2,{enumerable:!0,configurable:!0,writable:!0,value:i2}):e4[t2]=i2,__markAsModule=e4=>__defProp$3(e4,"__esModule",{value:!0}),__export$1=(e4,t2)=>{for(var i2 in t2)__defProp$3(e4,i2,{get:t2[i2],enumerable:!0})},__reExport=(e4,t2,i2,r2)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let n2 of __getOwnPropNames2(t2))!__hasOwnProp2.call(e4,n2)&&i2&&__defProp$3(e4,n2,{get:()=>t2[n2],enumerable:!(r2=__getOwnPropDesc2(t2,n2))||r2.enumerable});return e4},__toCommonJS=(e4=>(t2,i2)=>e4&&e4.get(t2)||(i2=__reExport(__markAsModule({}),t2,1),e4&&e4.set(t2,i2),i2))(typeof WeakMap<"u"?new WeakMap:0),__publicField$3=(e4,t2,i2)=>(__defNormalProp$3(e4,typeof t2!="symbol"?t2+"":t2,i2),i2),src_exports={};__export$1(src_exports,{applyPalette:()=>applyPalette,applyPaletteSync:()=>applyPaletteSync$1,buildPalette:()=>buildPalette,buildPaletteSync:()=>buildPaletteSync$1,constants:()=>constants_exports$1,conversion:()=>conversion_exports$1,distance:()=>distance_exports$1,image:()=>image_exports$1,palette:()=>palette_exports$1,quality:()=>quality_exports$1,utils:()=>utils_exports$1});var constants_exports$1={};__export$1(constants_exports$1,{bt709:()=>bt709_exports$1});var bt709_exports$1={};__export$1(bt709_exports$1,{Y:()=>Y$1,x:()=>x$2,y:()=>y$2});var Y$1=(e4=>(e4[e4.RED=.2126]="RED",e4[e4.GREEN=.7152]="GREEN",e4[e4.BLUE=.0722]="BLUE",e4[e4.WHITE=1]="WHITE",e4))(Y$1||{}),x$2=(e4=>(e4[e4.RED=.64]="RED",e4[e4.GREEN=.3]="GREEN",e4[e4.BLUE=.15]="BLUE",e4[e4.WHITE=.3127]="WHITE",e4))(x$2||{}),y$2=(e4=>(e4[e4.RED=.33]="RED",e4[e4.GREEN=.6]="GREEN",e4[e4.BLUE=.06]="BLUE",e4[e4.WHITE=.329]="WHITE",e4))(y$2||{}),conversion_exports$1={};function correctGamma$1(e4){return e4>.04045?((e4+.055)/1.055)**2.4:e4/12.92}function rgb2xyz$1(e4,t2,i2){return{x:.4124*(e4=correctGamma$1(e4/255))+.3576*(t2=correctGamma$1(t2/255))+.1805*(i2=correctGamma$1(i2/255)),y:.2126*e4+.7152*t2+.0722*i2,z:.0193*e4+.1192*t2+.9505*i2}}__export$1(conversion_exports$1,{lab2rgb:()=>lab2rgb$1,lab2xyz:()=>lab2xyz$1,rgb2hsl:()=>rgb2hsl$1,rgb2lab:()=>rgb2lab$1,rgb2xyz:()=>rgb2xyz$1,xyz2lab:()=>xyz2lab$1,xyz2rgb:()=>xyz2rgb$1});var arithmetic_exports$1={};function degrees2radians$1(e4){return e4*(Math.PI/180)}function max3$1(e4,t2,i2){let r2=e4;return r2t2&&(r2=t2),r2>i2&&(r2=i2),r2}function intInRange$1(e4,t2,i2){return e4>i2&&(e4=i2),e4255?e4=255:e4<0&&(e4=0),e4}function inRange0to255$1(e4){return e4>255?e4=255:e4<0&&(e4=0),e4}function stableSort$1(e4,t2){let i2=typeof e4[0],r2;if(i2==="number"||i2==="string"){let i3=Object.create(null);for(let t3=0,r3=e4.length;t3t2(e5,r3)||i3[e5]-i3[r3])}else{let i3=e4.slice(0);r2=e4.sort((e5,r3)=>t2(e5,r3)||i3.indexOf(e5)-i3.indexOf(r3))}return r2}function rgb2hsl$1(e4,t2,i2){let r2=min3$1(e4,t2,i2),n2=max3$1(e4,t2,i2),a2=n2-r2,o2=(r2+n2)/510,s2=0;o2>0&&o2<1&&(s2=a2/(o2<.5?n2+r2:510-n2-r2));let l2=0;return a2>0&&(l2=n2===e4?(t2-i2)/a2:n2===t2?2+(i2-e4)/a2:4+(e4-t2)/a2,l2*=60,l2<0&&(l2+=360)),{h:l2,s:s2,l:o2}}__export$1(arithmetic_exports$1,{degrees2radians:()=>degrees2radians$1,inRange0to255:()=>inRange0to255$1,inRange0to255Rounded:()=>inRange0to255Rounded$1,intInRange:()=>intInRange$1,max3:()=>max3$1,min3:()=>min3$1,stableSort:()=>stableSort$1});var refX$1=.95047,refY$1=1,refZ$1=1.08883;function pivot$1(e4){return e4>.008856?e4**(1/3):7.787*e4+16/116}function xyz2lab$1(e4,t2,i2){if(e4=pivot$1(e4/refX$1),t2=pivot$1(t2/refY$1),i2=pivot$1(i2/refZ$1),116*t2-16<0)throw new Error("xxx");return{L:Math.max(0,116*t2-16),a:500*(e4-t2),b:200*(t2-i2)}}function rgb2lab$1(e4,t2,i2){let r2=rgb2xyz$1(e4,t2,i2);return xyz2lab$1(r2.x,r2.y,r2.z)}var refX2$1=.95047,refY2$1=1,refZ2$1=1.08883;function pivot2$1(e4){return e4>.206893034?e4**3:(e4-16/116)/7.787}function lab2xyz$1(e4,t2,i2){let r2=(e4+16)/116,n2=r2-i2/200;return{x:refX2$1*pivot2$1(t2/500+r2),y:refY2$1*pivot2$1(r2),z:refZ2$1*pivot2$1(n2)}}function correctGamma2$1(e4){return e4>.0031308?1.055*e4**(1/2.4)-.055:12.92*e4}function xyz2rgb$1(e4,t2,i2){let r2=correctGamma2$1(3.2406*e4+-1.5372*t2+-.4986*i2),n2=correctGamma2$1(-.9689*e4+1.8758*t2+.0415*i2),a2=correctGamma2$1(.0557*e4+-.204*t2+1.057*i2);return{r:inRange0to255Rounded$1(255*r2),g:inRange0to255Rounded$1(255*n2),b:inRange0to255Rounded$1(255*a2)}}function lab2rgb$1(e4,t2,i2){let r2=lab2xyz$1(e4,t2,i2);return xyz2rgb$1(r2.x,r2.y,r2.z)}var distance_exports$1={};__export$1(distance_exports$1,{AbstractDistanceCalculator:()=>AbstractDistanceCalculator$1,AbstractEuclidean:()=>AbstractEuclidean$1,AbstractManhattan:()=>AbstractManhattan$1,CIE94GraphicArts:()=>CIE94GraphicArts$1,CIE94Textiles:()=>CIE94Textiles$1,CIEDE2000:()=>CIEDE2000$1,CMetric:()=>CMetric$1,Euclidean:()=>Euclidean$1,EuclideanBT709:()=>EuclideanBT709$1,EuclideanBT709NoAlpha:()=>EuclideanBT709NoAlpha$1,Manhattan:()=>Manhattan$1,ManhattanBT709:()=>ManhattanBT709$1,ManhattanNommyde:()=>ManhattanNommyde$1,PNGQuant:()=>PNGQuant$1});var AbstractDistanceCalculator$1=class{constructor(){__publicField$3(this,"_maxDistance"),__publicField$3(this,"_whitePoint"),this._setDefaults(),this.setWhitePoint(255,255,255,255)}setWhitePoint(e4,t2,i2,r2){this._whitePoint={r:e4>0?255/e4:0,g:t2>0?255/t2:0,b:i2>0?255/i2:0,a:r2>0?255/r2:0},this._maxDistance=this.calculateRaw(e4,t2,i2,r2,0,0,0,0)}calculateNormalized(e4,t2){return this.calculateRaw(e4.r,e4.g,e4.b,e4.a,t2.r,t2.g,t2.b,t2.a)/this._maxDistance}},AbstractCIE94$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=rgb2lab$1(inRange0to255$1(e4*this._whitePoint.r),inRange0to255$1(t2*this._whitePoint.g),inRange0to255$1(i2*this._whitePoint.b)),u2=rgb2lab$1(inRange0to255$1(n2*this._whitePoint.r),inRange0to255$1(a2*this._whitePoint.g),inRange0to255$1(o2*this._whitePoint.b)),h2=l2.L-u2.L,c2=l2.a-u2.a,f2=l2.b-u2.b,d=Math.sqrt(l2.a*l2.a+l2.b*l2.b),p2=d-Math.sqrt(u2.a*u2.a+u2.b*u2.b),m=c2*c2+f2*f2-p2*p2;m=m<0?0:Math.sqrt(m);let _2=(s2-r2)*this._whitePoint.a*this._kA;return Math.sqrt((h2/this._Kl)**2+(p2/(1+this._K1*d))**2+(m/(1+this._K2*d))**2+_2**2)}},CIE94Textiles$1=class extends AbstractCIE94$1{_setDefaults(){this._Kl=2,this._K1=.048,this._K2=.014,this._kA=12.5/255}},CIE94GraphicArts$1=class extends AbstractCIE94$1{_setDefaults(){this._Kl=1,this._K1=.045,this._K2=.015,this._kA=25/255}},_CIEDE2000$1=class extends AbstractDistanceCalculator$1{_setDefaults(){}static _calculatehp(e4,t2){let i2=Math.atan2(e4,t2);return i2>=0?i2:i2+_CIEDE2000$1._deg360InRad}static _calculateRT(e4,t2){let i2=t2**7,r2=2*Math.sqrt(i2/(i2+_CIEDE2000$1._pow25to7)),n2=_CIEDE2000$1._deg30InRad*Math.exp(-(((e4-_CIEDE2000$1._deg275InRad)/_CIEDE2000$1._deg25InRad)**2));return-Math.sin(2*n2)*r2}static _calculateT(e4){return 1-.17*Math.cos(e4-_CIEDE2000$1._deg30InRad)+.24*Math.cos(2*e4)+.32*Math.cos(3*e4+_CIEDE2000$1._deg6InRad)-.2*Math.cos(4*e4-_CIEDE2000$1._deg63InRad)}static _calculate_ahp(e4,t2,i2,r2){let n2=i2+r2;return e4===0?n2:t2<=_CIEDE2000$1._deg180InRad?n2/2:n2<_CIEDE2000$1._deg360InRad?(n2+_CIEDE2000$1._deg360InRad)/2:(n2-_CIEDE2000$1._deg360InRad)/2}static _calculate_dHp(e4,t2,i2,r2){let n2;return n2=e4===0?0:t2<=_CIEDE2000$1._deg180InRad?i2-r2:i2<=r2?i2-r2+_CIEDE2000$1._deg360InRad:i2-r2-_CIEDE2000$1._deg360InRad,2*Math.sqrt(e4)*Math.sin(n2/2)}calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=rgb2lab$1(inRange0to255$1(e4*this._whitePoint.r),inRange0to255$1(t2*this._whitePoint.g),inRange0to255$1(i2*this._whitePoint.b)),u2=rgb2lab$1(inRange0to255$1(n2*this._whitePoint.r),inRange0to255$1(a2*this._whitePoint.g),inRange0to255$1(o2*this._whitePoint.b)),h2=(s2-r2)*this._whitePoint.a*_CIEDE2000$1._kA,c2=this.calculateRawInLab(l2,u2);return Math.sqrt(c2+h2*h2)}calculateRawInLab(e4,t2){let i2=e4.L,r2=e4.a,n2=e4.b,a2=t2.L,o2=t2.a,s2=t2.b,l2=((Math.sqrt(r2*r2+n2*n2)+Math.sqrt(o2*o2+s2*s2))/2)**7,u2=.5*(1-Math.sqrt(l2/(l2+_CIEDE2000$1._pow25to7))),h2=(1+u2)*r2,c2=(1+u2)*o2,f2=Math.sqrt(h2*h2+n2*n2),d=Math.sqrt(c2*c2+s2*s2),p2=f2*d,m=_CIEDE2000$1._calculatehp(n2,h2),_2=_CIEDE2000$1._calculatehp(s2,c2),g=Math.abs(m-_2),b2=a2-i2,y2=d-f2,w=_CIEDE2000$1._calculate_dHp(p2,g,_2,m),v2=_CIEDE2000$1._calculate_ahp(p2,g,m,_2),x2=(f2+d)/2,E2=((i2+a2)/2-50)**2,k2=y2/(1+.045*x2),S2=w/(1+.015*_CIEDE2000$1._calculateT(v2)*x2);return(b2/(1+.015*E2/Math.sqrt(20+E2)))**2+k2**2+S2**2+_CIEDE2000$1._calculateRT(v2,x2)*k2*S2}},CIEDE2000$1=_CIEDE2000$1;__publicField$3(CIEDE2000$1,"_kA",25/255),__publicField$3(CIEDE2000$1,"_pow25to7",25**7),__publicField$3(CIEDE2000$1,"_deg360InRad",degrees2radians$1(360)),__publicField$3(CIEDE2000$1,"_deg180InRad",degrees2radians$1(180)),__publicField$3(CIEDE2000$1,"_deg30InRad",degrees2radians$1(30)),__publicField$3(CIEDE2000$1,"_deg6InRad",degrees2radians$1(6)),__publicField$3(CIEDE2000$1,"_deg63InRad",degrees2radians$1(63)),__publicField$3(CIEDE2000$1,"_deg275InRad",degrees2radians$1(275)),__publicField$3(CIEDE2000$1,"_deg25InRad",degrees2radians$1(25));var CMetric$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=(e4+n2)/2*this._whitePoint.r,u2=(e4-n2)*this._whitePoint.r,h2=(t2-a2)*this._whitePoint.g,c2=(i2-o2)*this._whitePoint.b,f2=((512+l2)*u2*u2>>8)+4*h2*h2+((767-l2)*c2*c2>>8),d=(s2-r2)*this._whitePoint.a;return Math.sqrt(f2+d*d)}_setDefaults(){}},AbstractEuclidean$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=n2-e4,u2=a2-t2,h2=o2-i2,c2=s2-r2;return Math.sqrt(this._kR*l2*l2+this._kG*u2*u2+this._kB*h2*h2+this._kA*c2*c2)}},Euclidean$1=class extends AbstractEuclidean$1{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},EuclideanBT709$1=class extends AbstractEuclidean$1{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},EuclideanBT709NoAlpha$1=class extends AbstractEuclidean$1{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=0}},AbstractManhattan$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=n2-e4,u2=a2-t2,h2=o2-i2,c2=s2-r2;return l2<0&&(l2=0-l2),u2<0&&(u2=0-u2),h2<0&&(h2=0-h2),c2<0&&(c2=0-c2),this._kR*l2+this._kG*u2+this._kB*h2+this._kA*c2}},Manhattan$1=class extends AbstractManhattan$1{_setDefaults(){this._kR=1,this._kG=1,this._kB=1,this._kA=1}},ManhattanNommyde$1=class extends AbstractManhattan$1{_setDefaults(){this._kR=.4984,this._kG=.8625,this._kB=.2979,this._kA=1}},ManhattanBT709$1=class extends AbstractManhattan$1{_setDefaults(){this._kR=.2126,this._kG=.7152,this._kB=.0722,this._kA=1}},PNGQuant$1=class extends AbstractDistanceCalculator$1{calculateRaw(e4,t2,i2,r2,n2,a2,o2,s2){let l2=(s2-r2)*this._whitePoint.a;return this._colordifferenceCh(e4*this._whitePoint.r,n2*this._whitePoint.r,l2)+this._colordifferenceCh(t2*this._whitePoint.g,a2*this._whitePoint.g,l2)+this._colordifferenceCh(i2*this._whitePoint.b,o2*this._whitePoint.b,l2)}_colordifferenceCh(e4,t2,i2){let r2=e4-t2,n2=r2+i2;return r2*r2+n2*n2}_setDefaults(){}},palette_exports$1={};__export$1(palette_exports$1,{AbstractPaletteQuantizer:()=>AbstractPaletteQuantizer$1,ColorHistogram:()=>ColorHistogram$1,NeuQuant:()=>NeuQuant$1,NeuQuantFloat:()=>NeuQuantFloat$1,RGBQuant:()=>RGBQuant$1,WuColorCube:()=>WuColorCube$1,WuQuant:()=>WuQuant$1});var AbstractPaletteQuantizer$1=class{quantizeSync(){for(let e4 of this.quantize())if(e4.palette)return e4.palette;throw new Error("unreachable")}},Point$1=class{constructor(){__publicField$3(this,"r"),__publicField$3(this,"g"),__publicField$3(this,"b"),__publicField$3(this,"a"),__publicField$3(this,"uint32"),__publicField$3(this,"rgba"),this.uint32=-1>>>0,this.r=this.g=this.b=this.a=0,this.rgba=new Array(4),this.rgba[0]=0,this.rgba[1]=0,this.rgba[2]=0,this.rgba[3]=0}static createByQuadruplet(e4){let t2=new Point$1;return t2.r=0|e4[0],t2.g=0|e4[1],t2.b=0|e4[2],t2.a=0|e4[3],t2._loadUINT32(),t2._loadQuadruplet(),t2}static createByRGBA(e4,t2,i2,r2){let n2=new Point$1;return n2.r=0|e4,n2.g=0|t2,n2.b=0|i2,n2.a=0|r2,n2._loadUINT32(),n2._loadQuadruplet(),n2}static createByUint32(e4){let t2=new Point$1;return t2.uint32=e4>>>0,t2._loadRGBA(),t2._loadQuadruplet(),t2}from(e4){this.r=e4.r,this.g=e4.g,this.b=e4.b,this.a=e4.a,this.uint32=e4.uint32,this.rgba[0]=e4.r,this.rgba[1]=e4.g,this.rgba[2]=e4.b,this.rgba[3]=e4.a}getLuminosity(e4){let t2=this.r,i2=this.g,r2=this.b;return e4&&(t2=Math.min(255,255-this.a+this.a*t2/255),i2=Math.min(255,255-this.a+this.a*i2/255),r2=Math.min(255,255-this.a+this.a*r2/255)),.2126*t2+.7152*i2+.0722*r2}_loadUINT32(){this.uint32=(this.a<<24|this.b<<16|this.g<<8|this.r)>>>0}_loadRGBA(){this.r=255&this.uint32,this.g=this.uint32>>>8&255,this.b=this.uint32>>>16&255,this.a=this.uint32>>>24&255}_loadQuadruplet(){this.rgba[0]=this.r,this.rgba[1]=this.g,this.rgba[2]=this.b,this.rgba[3]=this.a}},PointContainer$1=class{constructor(){__publicField$3(this,"_pointArray"),__publicField$3(this,"_width"),__publicField$3(this,"_height"),this._width=0,this._height=0,this._pointArray=[]}getWidth(){return this._width}getHeight(){return this._height}setWidth(e4){this._width=e4}setHeight(e4){this._height=e4}getPointArray(){return this._pointArray}clone(){let e4=new PointContainer$1;e4._width=this._width,e4._height=this._height;for(let t2=0,i2=this._pointArray.length;t2=n2&&e4=0;t2--)if(e4.uint32===this._pointArray[t2].uint32)return!0;return!1}getNearestColor(e4,t2){return this._pointArray[0|this._getNearestIndex(e4,t2)]}getPointContainer(){return this._pointContainer}_nearestPointFromCache(e4){return typeof this._i32idx[e4]=="number"?this._i32idx[e4]:-1}_getNearestIndex(e4,t2){let i2=this._nearestPointFromCache(""+t2.uint32);if(i2>=0)return i2;let r2=Number.MAX_VALUE;i2=0;for(let n2=0,a2=this._pointArray.length;n2{let i2=rgb2hsl$1(e4.r,e4.g,e4.b),r2=rgb2hsl$1(t2.r,t2.g,t2.b),n2=e4.r===e4.g&&e4.g===e4.b?0:1+hueGroup$1(i2.h,hueGroups$1),a2=(t2.r===t2.g&&t2.g===t2.b?0:1+hueGroup$1(r2.h,hueGroups$1))-n2;if(a2)return-a2;let o2=e4.getLuminosity(!0),s2=t2.getLuminosity(!0);if(s2-o2!=0)return s2-o2;let l2=(100*r2.s|0)-(100*i2.s|0);return l2?-l2:0})}},utils_exports$1={};__export$1(utils_exports$1,{HueStatistics:()=>HueStatistics$1,Palette:()=>Palette$1,Point:()=>Point$1,PointContainer:()=>PointContainer$1,ProgressTracker:()=>ProgressTracker$1,arithmetic:()=>arithmetic_exports$1});var HueGroup$1=class{constructor(){__publicField$3(this,"num",0),__publicField$3(this,"cols",[])}},HueStatistics$1=class{constructor(e4,t2){__publicField$3(this,"_numGroups"),__publicField$3(this,"_minCols"),__publicField$3(this,"_stats"),__publicField$3(this,"_groupsFull"),this._numGroups=e4,this._minCols=t2,this._stats=[];for(let t3=0;t3<=e4;t3++)this._stats[t3]=new HueGroup$1;this._groupsFull=0}check(e4){this._groupsFull===this._numGroups+1&&(this.check=()=>{});let t2=255&e4,i2=e4>>>8&255,r2=e4>>>16&255,n2=t2===i2&&i2===r2?0:1+hueGroup$1(rgb2hsl$1(t2,i2,r2).h,this._numGroups),a2=this._stats[n2],o2=this._minCols;a2.num++,a2.num>o2||(a2.num===o2&&this._groupsFull++,a2.num<=o2&&this._stats[n2].cols.push(e4))}injectIntoDictionary(e4){for(let t2=0;t2<=this._numGroups;t2++)this._stats[t2].num<=this._minCols&&this._stats[t2].cols.forEach(t3=>{e4[t3]?e4[t3]++:e4[t3]=1})}injectIntoArray(e4){for(let t2=0;t2<=this._numGroups;t2++)this._stats[t2].num<=this._minCols&&this._stats[t2].cols.forEach(t3=>{e4.indexOf(t3)===-1&&e4.push(t3)})}},_ProgressTracker$1=class{constructor(e4,t2){__publicField$3(this,"progress"),__publicField$3(this,"_step"),__publicField$3(this,"_range"),__publicField$3(this,"_last"),__publicField$3(this,"_progressRange"),this._range=e4,this._progressRange=t2,this._step=Math.max(1,this._range/(_ProgressTracker$1.steps+1)|0),this._last=-this._step,this.progress=0}shouldNotify(e4){return e4-this._last>=this._step&&(this._last=e4,this.progress=Math.min(this._progressRange*this._last/this._range,this._progressRange),!0)}},ProgressTracker$1=_ProgressTracker$1;__publicField$3(ProgressTracker$1,"steps",100);var networkBiasShift$1=3,Neuron$1=class{constructor(e4){__publicField$3(this,"r"),__publicField$3(this,"g"),__publicField$3(this,"b"),__publicField$3(this,"a"),this.r=this.g=this.b=this.a=e4}toPoint(){return Point$1.createByRGBA(this.r>>networkBiasShift$1,this.g>>networkBiasShift$1,this.b>>networkBiasShift$1,this.a>>networkBiasShift$1)}subtract(e4,t2,i2,r2){this.r-=0|e4,this.g-=0|t2,this.b-=0|i2,this.a-=0|r2}},_NeuQuant$1=class extends AbstractPaletteQuantizer$1{constructor(e4,t2=256){super(),__publicField$3(this,"_pointArray"),__publicField$3(this,"_networkSize"),__publicField$3(this,"_network"),__publicField$3(this,"_sampleFactor"),__publicField$3(this,"_radPower"),__publicField$3(this,"_freq"),__publicField$3(this,"_bias"),__publicField$3(this,"_distance"),this._distance=e4,this._pointArray=[],this._sampleFactor=1,this._networkSize=t2,this._distance.setWhitePoint(255<>3)*_NeuQuant$1._radiusBias,l2=s2>>_NeuQuant$1._radiusBiasShift;l2<=1&&(l2=0);for(let e5=0;e5>>0;n2=t2<_NeuQuant$1._minpicturebytes?1:t2%_NeuQuant$1._prime1!=0?_NeuQuant$1._prime1:t2%_NeuQuant$1._prime2!=0?_NeuQuant$1._prime2:t2%_NeuQuant$1._prime3!=0?_NeuQuant$1._prime3:_NeuQuant$1._prime4;let u2=new ProgressTracker$1(r2,99);for(let e5=0,h2=0;e5=t2&&(h2-=t2),e5++,a2===0&&(a2=1),e5%a2==0){o2-=o2/i2|0,s2-=s2/_NeuQuant$1._radiusDecrease|0,l2=s2>>_NeuQuant$1._radiusBiasShift,l2<=1&&(l2=0);for(let e6=0;e6>>0}}}_buildPalette(){let e4=new Palette$1;return this._network.forEach(t2=>{e4.add(t2.toPoint())}),e4.sort(),e4}_alterNeighbour(e4,t2,i2,r2,n2,a2){let o2=t2-e4;o2<-1&&(o2=-1);let s2=t2+e4;s2>this._networkSize&&(s2=this._networkSize);let l2=t2+1,u2=t2-1,h2=1;for(;l2o2;){let e5=this._radPower[h2++]/_NeuQuant$1._alphaRadBias;if(l2o2){let t3=this._network[u2--];t3.subtract(e5*(t3.r-n2),e5*(t3.g-r2),e5*(t3.b-i2),e5*(t3.a-a2))}}}_alterSingle(e4,t2,i2,r2,n2,a2){e4/=_NeuQuant$1._initAlpha;let o2=this._network[t2];o2.subtract(e4*(o2.r-n2),e4*(o2.g-r2),e4*(o2.b-i2),e4*(o2.a-a2))}_contest(e4,t2,i2,r2){let n2=1020<>_NeuQuant$1._initialBiasShift-networkBiasShift$1);f2>_NeuQuant$1._betaShift;this._freq[u2]-=d,this._bias[u2]+=d<<_NeuQuant$1._gammaShift}return this._freq[s2]+=_NeuQuant$1._beta,this._bias[s2]-=_NeuQuant$1._betaGamma,l2}},NeuQuant$1=_NeuQuant$1;__publicField$3(NeuQuant$1,"_prime1",499),__publicField$3(NeuQuant$1,"_prime2",491),__publicField$3(NeuQuant$1,"_prime3",487),__publicField$3(NeuQuant$1,"_prime4",503),__publicField$3(NeuQuant$1,"_minpicturebytes",_NeuQuant$1._prime4),__publicField$3(NeuQuant$1,"_nCycles",100),__publicField$3(NeuQuant$1,"_initialBiasShift",16),__publicField$3(NeuQuant$1,"_initialBias",1<<_NeuQuant$1._initialBiasShift),__publicField$3(NeuQuant$1,"_gammaShift",10),__publicField$3(NeuQuant$1,"_betaShift",10),__publicField$3(NeuQuant$1,"_beta",_NeuQuant$1._initialBias>>_NeuQuant$1._betaShift),__publicField$3(NeuQuant$1,"_betaGamma",_NeuQuant$1._initialBias<<_NeuQuant$1._gammaShift-_NeuQuant$1._betaShift),__publicField$3(NeuQuant$1,"_radiusBiasShift",6),__publicField$3(NeuQuant$1,"_radiusBias",1<<_NeuQuant$1._radiusBiasShift),__publicField$3(NeuQuant$1,"_radiusDecrease",30),__publicField$3(NeuQuant$1,"_alphaBiasShift",10),__publicField$3(NeuQuant$1,"_initAlpha",1<<_NeuQuant$1._alphaBiasShift),__publicField$3(NeuQuant$1,"_radBiasShift",8),__publicField$3(NeuQuant$1,"_radBias",1<<_NeuQuant$1._radBiasShift),__publicField$3(NeuQuant$1,"_alphaRadBiasShift",_NeuQuant$1._alphaBiasShift+_NeuQuant$1._radBiasShift),__publicField$3(NeuQuant$1,"_alphaRadBias",1<<_NeuQuant$1._alphaRadBiasShift);var networkBiasShift2$1=3,NeuronFloat$1=class{constructor(e4){__publicField$3(this,"r"),__publicField$3(this,"g"),__publicField$3(this,"b"),__publicField$3(this,"a"),this.r=this.g=this.b=this.a=e4}toPoint(){return Point$1.createByRGBA(this.r>>networkBiasShift2$1,this.g>>networkBiasShift2$1,this.b>>networkBiasShift2$1,this.a>>networkBiasShift2$1)}subtract(e4,t2,i2,r2){this.r-=e4,this.g-=t2,this.b-=i2,this.a-=r2}},_NeuQuantFloat$1=class extends AbstractPaletteQuantizer$1{constructor(e4,t2=256){super(),__publicField$3(this,"_pointArray"),__publicField$3(this,"_networkSize"),__publicField$3(this,"_network"),__publicField$3(this,"_sampleFactor"),__publicField$3(this,"_radPower"),__publicField$3(this,"_freq"),__publicField$3(this,"_bias"),__publicField$3(this,"_distance"),this._distance=e4,this._pointArray=[],this._sampleFactor=1,this._networkSize=t2,this._distance.setWhitePoint(255<>3)*_NeuQuantFloat$1._radiusBias,l2=s2>>_NeuQuantFloat$1._radiusBiasShift;l2<=1&&(l2=0);for(let e5=0;e5=t2&&(h2-=t2),e5++,a2===0&&(a2=1),e5%a2==0){o2-=o2/i2,s2-=s2/_NeuQuantFloat$1._radiusDecrease,l2=s2>>_NeuQuantFloat$1._radiusBiasShift,l2<=1&&(l2=0);for(let e6=0;e6{e4.add(t2.toPoint())}),e4.sort(),e4}_alterNeighbour(e4,t2,i2,r2,n2,a2){let o2=t2-e4;o2<-1&&(o2=-1);let s2=t2+e4;s2>this._networkSize&&(s2=this._networkSize);let l2=t2+1,u2=t2-1,h2=1;for(;l2o2;){let e5=this._radPower[h2++]/_NeuQuantFloat$1._alphaRadBias;if(l2o2){let t3=this._network[u2--];t3.subtract(e5*(t3.r-n2),e5*(t3.g-r2),e5*(t3.b-i2),e5*(t3.a-a2))}}}_alterSingle(e4,t2,i2,r2,n2,a2){e4/=_NeuQuantFloat$1._initAlpha;let o2=this._network[t2];o2.subtract(e4*(o2.r-n2),e4*(o2.g-r2),e4*(o2.b-i2),e4*(o2.a-a2))}_contest(e4,t2,i2,r2){let n2=1020<>_NeuQuantFloat$1._initialBiasShift-networkBiasShift2$1);f2>_NeuQuantFloat$1._betaShift;this._freq[u2]-=d,this._bias[u2]+=d<<_NeuQuantFloat$1._gammaShift}return this._freq[s2]+=_NeuQuantFloat$1._beta,this._bias[s2]-=_NeuQuantFloat$1._betaGamma,l2}},NeuQuantFloat$1=_NeuQuantFloat$1;__publicField$3(NeuQuantFloat$1,"_prime1",499),__publicField$3(NeuQuantFloat$1,"_prime2",491),__publicField$3(NeuQuantFloat$1,"_prime3",487),__publicField$3(NeuQuantFloat$1,"_prime4",503),__publicField$3(NeuQuantFloat$1,"_minpicturebytes",_NeuQuantFloat$1._prime4),__publicField$3(NeuQuantFloat$1,"_nCycles",100),__publicField$3(NeuQuantFloat$1,"_initialBiasShift",16),__publicField$3(NeuQuantFloat$1,"_initialBias",1<<_NeuQuantFloat$1._initialBiasShift),__publicField$3(NeuQuantFloat$1,"_gammaShift",10),__publicField$3(NeuQuantFloat$1,"_betaShift",10),__publicField$3(NeuQuantFloat$1,"_beta",_NeuQuantFloat$1._initialBias>>_NeuQuantFloat$1._betaShift),__publicField$3(NeuQuantFloat$1,"_betaGamma",_NeuQuantFloat$1._initialBias<<_NeuQuantFloat$1._gammaShift-_NeuQuantFloat$1._betaShift),__publicField$3(NeuQuantFloat$1,"_radiusBiasShift",6),__publicField$3(NeuQuantFloat$1,"_radiusBias",1<<_NeuQuantFloat$1._radiusBiasShift),__publicField$3(NeuQuantFloat$1,"_radiusDecrease",30),__publicField$3(NeuQuantFloat$1,"_alphaBiasShift",10),__publicField$3(NeuQuantFloat$1,"_initAlpha",1<<_NeuQuantFloat$1._alphaBiasShift),__publicField$3(NeuQuantFloat$1,"_radBiasShift",8),__publicField$3(NeuQuantFloat$1,"_radBias",1<<_NeuQuantFloat$1._radBiasShift),__publicField$3(NeuQuantFloat$1,"_alphaRadBiasShift",_NeuQuantFloat$1._alphaBiasShift+_NeuQuantFloat$1._radBiasShift),__publicField$3(NeuQuantFloat$1,"_alphaRadBias",1<<_NeuQuantFloat$1._alphaRadBiasShift);var _ColorHistogram$1=class{constructor(e4,t2){__publicField$3(this,"_method"),__publicField$3(this,"_hueStats"),__publicField$3(this,"_histogram"),__publicField$3(this,"_initColors"),__publicField$3(this,"_minHueCols"),this._method=e4,this._minHueCols=t2<<2,this._initColors=t2<<2,this._hueStats=new HueStatistics$1(_ColorHistogram$1._hueGroups,this._minHueCols),this._histogram=Object.create(null)}sample(e4){switch(this._method){case 1:this._colorStats1D(e4);break;case 2:this._colorStats2D(e4)}}getImportanceSortedColorsIDXI32(){let e4=stableSort$1(Object.keys(this._histogram),(e5,t3)=>this._histogram[t3]-this._histogram[e5]);if(e4.length===0)return[];let t2;switch(this._method){case 1:let i2=Math.min(e4.length,this._initColors),r2=e4[i2-1],n2=this._histogram[r2];t2=e4.slice(0,i2);let a2=i2,o2=e4.length;for(;a2+e5)}_colorStats1D(e4){let t2=this._histogram,i2=e4.getPointArray(),r2=i2.length;for(let e5=0;e5{let i3=Math.round(e5.w*e5.h/o2)*_ColorHistogram$1._boxPixels;i3<2&&(i3=2);let n3={};this._iterateBox(e5,t2,e6=>{let t3=r2[e6].uint32;this._hueStats.check(t3),t3 in l2?l2[t3]++:t3 in n3?++n3[t3]>=i3&&(l2[t3]=n3[t3]):n3[t3]=1})}),this._hueStats.injectIntoDictionary(l2)}_iterateBox(e4,t2,i2){let r2=e4,n2=r2.y*t2+r2.x,a2=(r2.y+r2.h-1)*t2+(r2.x+r2.w-1),o2=t2-r2.w+1,s2=0,l2=n2;do i2.call(this,l2),l2+=++s2%r2.w==0?o2:1;while(l2<=a2)}_makeBoxes(e4,t2,i2,r2){let n2=e4%i2,a2=t2%r2,o2=e4-n2,s2=t2-a2,l2=[];for(let u2=0;u2this._colors;){a2.length=0;for(let e5=0;e53*this._colors?this._initialDistance:this._distanceIncrement}if(o2t3.distance-e6.distance);let e5=0;for(;o2=0;e5--)r2[e5]===0&&(e5!==u2-1&&(i2[e5]=i2[u2-1]),--u2);i2.length=u2,t2.sort(),yield{palette:t2,progress:100}}};function createArray1D$1(e4){let t2=[];for(let i2=0;i20){let i2=this._sums[t2],r2=this._reds[t2]/i2,n2=this._greens[t2]/i2,a2=this._blues[t2]/i2,o2=this._alphas[t2]/i2,s2=Point$1.createByRGBA(0|r2,0|n2,0|a2,0|o2);e4.add(s2)}e4.sort(),yield{palette:e4,progress:100}}*_preparePalette(){yield*this._calculateMoments();let e4=0,t2=createArray1D$1(this._colors);for(let i3=1;i31?this._calculateVariance(this._cubes[e4]):0,t2[i3]=this._cubes[i3].volume>1?this._calculateVariance(this._cubes[i3]):0):(t2[e4]=0,i3--),e4=0;let r3=t2[0];for(let n3=1;n3<=i3;++n3)t2[n3]>r3&&(r3=t2[n3],e4=n3);if(r3<=0){this._colors=i3+1;break}}let i2=[],r2=[],n2=[],a2=[];for(let e5=0;e50?(i2[e5]=_WuQuant$1._volume(this._cubes[e5],this._momentsRed)/t3|0,r2[e5]=_WuQuant$1._volume(this._cubes[e5],this._momentsGreen)/t3|0,n2[e5]=_WuQuant$1._volume(this._cubes[e5],this._momentsBlue)/t3|0,a2[e5]=_WuQuant$1._volume(this._cubes[e5],this._momentsAlpha)/t3|0):(i2[e5]=0,r2[e5]=0,n2[e5]=0,a2[e5]=0)}this._reds=createArray1D$1(this._colors+1),this._greens=createArray1D$1(this._colors+1),this._blues=createArray1D$1(this._colors+1),this._alphas=createArray1D$1(this._colors+1),this._sums=createArray1D$1(this._colors+1);for(let e5=0,t3=this._pixels.length;e5>t2),r2=1+(e4.g>>t2),n2=1+(e4.b>>t2),a2=1+(e4.a>>t2);this._weights[a2][i2][r2][n2]++,this._momentsRed[a2][i2][r2][n2]+=e4.r,this._momentsGreen[a2][i2][r2][n2]+=e4.g,this._momentsBlue[a2][i2][r2][n2]+=e4.b,this._momentsAlpha[a2][i2][r2][n2]+=e4.a,this._moments[a2][i2][r2][n2]+=this._table[e4.r]+this._table[e4.g]+this._table[e4.b]+this._table[e4.a]}*_calculateMoments(){let e4=[],t2=[],i2=[],r2=[],n2=[],a2=[],o2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),s2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),l2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),u2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),h2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),c2=createArray3D$1(this._sideSize,this._sideSize,this._sideSize),f2=0,d=new ProgressTracker$1(this._alphaMaxSideIndex*this._maxSideIndex,99);for(let p2=1;p2<=this._alphaMaxSideIndex;++p2){fillArray3D$1(o2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(s2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(l2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(u2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(h2,this._sideSize,this._sideSize,this._sideSize,0),fillArray3D$1(c2,this._sideSize,this._sideSize,this._sideSize,0);for(let m=1;m<=this._maxSideIndex;++m,++f2){d.shouldNotify(f2)&&(yield{progress:d.progress}),fillArray1D$1(e4,this._sideSize,0),fillArray1D$1(t2,this._sideSize,0),fillArray1D$1(i2,this._sideSize,0),fillArray1D$1(r2,this._sideSize,0),fillArray1D$1(n2,this._sideSize,0),fillArray1D$1(a2,this._sideSize,0);for(let f3=1;f3<=this._maxSideIndex;++f3){let d2=0,_2=0,g=0,b2=0,y2=0,w=0;for(let v2=1;v2<=this._maxSideIndex;++v2)d2+=this._weights[p2][m][f3][v2],_2+=this._momentsRed[p2][m][f3][v2],g+=this._momentsGreen[p2][m][f3][v2],b2+=this._momentsBlue[p2][m][f3][v2],y2+=this._momentsAlpha[p2][m][f3][v2],w+=this._moments[p2][m][f3][v2],e4[v2]+=d2,t2[v2]+=_2,i2[v2]+=g,r2[v2]+=b2,n2[v2]+=y2,a2[v2]+=w,o2[m][f3][v2]=o2[m-1][f3][v2]+e4[v2],s2[m][f3][v2]=s2[m-1][f3][v2]+t2[v2],l2[m][f3][v2]=l2[m-1][f3][v2]+i2[v2],u2[m][f3][v2]=u2[m-1][f3][v2]+r2[v2],h2[m][f3][v2]=h2[m-1][f3][v2]+n2[v2],c2[m][f3][v2]=c2[m-1][f3][v2]+a2[v2],this._weights[p2][m][f3][v2]=this._weights[p2-1][m][f3][v2]+o2[m][f3][v2],this._momentsRed[p2][m][f3][v2]=this._momentsRed[p2-1][m][f3][v2]+s2[m][f3][v2],this._momentsGreen[p2][m][f3][v2]=this._momentsGreen[p2-1][m][f3][v2]+l2[m][f3][v2],this._momentsBlue[p2][m][f3][v2]=this._momentsBlue[p2-1][m][f3][v2]+u2[m][f3][v2],this._momentsAlpha[p2][m][f3][v2]=this._momentsAlpha[p2-1][m][f3][v2]+h2[m][f3][v2],this._moments[p2][m][f3][v2]=this._moments[p2-1][m][f3][v2]+c2[m][f3][v2]}}}}static _volumeFloat(e4,t2){return t2[e4.alphaMaximum][e4.redMaximum][e4.greenMaximum][e4.blueMaximum]-t2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]-t2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]+t2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-t2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMaximum]+t2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]+t2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]-t2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(t2[e4.alphaMaximum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]-t2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]-t2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+t2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]-t2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]+t2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]+t2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]-t2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum])}static _volume(e4,t2){return 0|_WuQuant$1._volumeFloat(e4,t2)}static _top(e4,t2,i2,r2){let n2;switch(t2){case _WuQuant$1._alpha:n2=r2[i2][e4.redMaximum][e4.greenMaximum][e4.blueMaximum]-r2[i2][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]-r2[i2][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]+r2[i2][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(r2[i2][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]-r2[i2][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]-r2[i2][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]+r2[i2][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);break;case _WuQuant$1._red:n2=r2[e4.alphaMaximum][i2][e4.greenMaximum][e4.blueMaximum]-r2[e4.alphaMaximum][i2][e4.greenMinimum][e4.blueMaximum]-r2[e4.alphaMinimum][i2][e4.greenMaximum][e4.blueMaximum]+r2[e4.alphaMinimum][i2][e4.greenMinimum][e4.blueMaximum]-(r2[e4.alphaMaximum][i2][e4.greenMaximum][e4.blueMinimum]-r2[e4.alphaMaximum][i2][e4.greenMinimum][e4.blueMinimum]-r2[e4.alphaMinimum][i2][e4.greenMaximum][e4.blueMinimum]+r2[e4.alphaMinimum][i2][e4.greenMinimum][e4.blueMinimum]);break;case _WuQuant$1._green:n2=r2[e4.alphaMaximum][e4.redMaximum][i2][e4.blueMaximum]-r2[e4.alphaMaximum][e4.redMinimum][i2][e4.blueMaximum]-r2[e4.alphaMinimum][e4.redMaximum][i2][e4.blueMaximum]+r2[e4.alphaMinimum][e4.redMinimum][i2][e4.blueMaximum]-(r2[e4.alphaMaximum][e4.redMaximum][i2][e4.blueMinimum]-r2[e4.alphaMaximum][e4.redMinimum][i2][e4.blueMinimum]-r2[e4.alphaMinimum][e4.redMaximum][i2][e4.blueMinimum]+r2[e4.alphaMinimum][e4.redMinimum][i2][e4.blueMinimum]);break;case _WuQuant$1._blue:n2=r2[e4.alphaMaximum][e4.redMaximum][e4.greenMaximum][i2]-r2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][i2]-r2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][i2]+r2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][i2]-(r2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][i2]-r2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][i2]-r2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][i2]+r2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][i2]);break;default:throw new Error("impossible")}return 0|n2}static _bottom(e4,t2,i2){switch(t2){case _WuQuant$1._alpha:return-i2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMaximum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(-i2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);case _WuQuant$1._red:return-i2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMaximum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(-i2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);case _WuQuant$1._green:return-i2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMaximum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMaximum]-(-i2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);case _WuQuant$1._blue:return-i2[e4.alphaMaximum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]+i2[e4.alphaMaximum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMaximum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]-i2[e4.alphaMaximum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]-(-i2[e4.alphaMinimum][e4.redMaximum][e4.greenMaximum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMaximum][e4.greenMinimum][e4.blueMinimum]+i2[e4.alphaMinimum][e4.redMinimum][e4.greenMaximum][e4.blueMinimum]-i2[e4.alphaMinimum][e4.redMinimum][e4.greenMinimum][e4.blueMinimum]);default:return 0}}_calculateVariance(e4){let t2=_WuQuant$1._volume(e4,this._momentsRed),i2=_WuQuant$1._volume(e4,this._momentsGreen),r2=_WuQuant$1._volume(e4,this._momentsBlue),n2=_WuQuant$1._volume(e4,this._momentsAlpha);return _WuQuant$1._volumeFloat(e4,this._moments)-(t2*t2+i2*i2+r2*r2+n2*n2)/_WuQuant$1._volume(e4,this._weights)}_maximize(e4,t2,i2,r2,n2,a2,o2,s2,l2){let u2=0|_WuQuant$1._bottom(e4,t2,this._momentsRed),h2=0|_WuQuant$1._bottom(e4,t2,this._momentsGreen),c2=0|_WuQuant$1._bottom(e4,t2,this._momentsBlue),f2=0|_WuQuant$1._bottom(e4,t2,this._momentsAlpha),d=0|_WuQuant$1._bottom(e4,t2,this._weights),p2=0,m=-1;for(let _2=i2;_2p2&&(p2=t3,m=_2))}}return{max:p2,position:m}}_cut(e4,t2){let i2,r2=_WuQuant$1._volume(e4,this._momentsRed),n2=_WuQuant$1._volume(e4,this._momentsGreen),a2=_WuQuant$1._volume(e4,this._momentsBlue),o2=_WuQuant$1._volume(e4,this._momentsAlpha),s2=_WuQuant$1._volume(e4,this._weights),l2=this._maximize(e4,_WuQuant$1._red,e4.redMinimum+1,e4.redMaximum,r2,n2,a2,o2,s2),u2=this._maximize(e4,_WuQuant$1._green,e4.greenMinimum+1,e4.greenMaximum,r2,n2,a2,o2,s2),h2=this._maximize(e4,_WuQuant$1._blue,e4.blueMinimum+1,e4.blueMaximum,r2,n2,a2,o2,s2),c2=this._maximize(e4,_WuQuant$1._alpha,e4.alphaMinimum+1,e4.alphaMaximum,r2,n2,a2,o2,s2);if(c2.max>=l2.max&&c2.max>=u2.max&&c2.max>=h2.max){if(i2=_WuQuant$1._alpha,c2.position<0)return!1}else i2=l2.max>=c2.max&&l2.max>=u2.max&&l2.max>=h2.max?_WuQuant$1._red:u2.max>=c2.max&&u2.max>=l2.max&&u2.max>=h2.max?_WuQuant$1._green:_WuQuant$1._blue;switch(t2.redMaximum=e4.redMaximum,t2.greenMaximum=e4.greenMaximum,t2.blueMaximum=e4.blueMaximum,t2.alphaMaximum=e4.alphaMaximum,i2){case _WuQuant$1._red:t2.redMinimum=e4.redMaximum=l2.position,t2.greenMinimum=e4.greenMinimum,t2.blueMinimum=e4.blueMinimum,t2.alphaMinimum=e4.alphaMinimum;break;case _WuQuant$1._green:t2.greenMinimum=e4.greenMaximum=u2.position,t2.redMinimum=e4.redMinimum,t2.blueMinimum=e4.blueMinimum,t2.alphaMinimum=e4.alphaMinimum;break;case _WuQuant$1._blue:t2.blueMinimum=e4.blueMaximum=h2.position,t2.redMinimum=e4.redMinimum,t2.greenMinimum=e4.greenMinimum,t2.alphaMinimum=e4.alphaMinimum;break;case _WuQuant$1._alpha:t2.alphaMinimum=e4.alphaMaximum=c2.position,t2.blueMinimum=e4.blueMinimum,t2.redMinimum=e4.redMinimum,t2.greenMinimum=e4.greenMinimum}return e4.volume=(e4.redMaximum-e4.redMinimum)*(e4.greenMaximum-e4.greenMinimum)*(e4.blueMaximum-e4.blueMinimum)*(e4.alphaMaximum-e4.alphaMinimum),t2.volume=(t2.redMaximum-t2.redMinimum)*(t2.greenMaximum-t2.greenMinimum)*(t2.blueMaximum-t2.blueMinimum)*(t2.alphaMaximum-t2.alphaMinimum),!0}_initialize(e4){this._colors=e4,this._cubes=[];for(let t2=0;t2AbstractImageQuantizer$1,ErrorDiffusionArray:()=>ErrorDiffusionArray$1,ErrorDiffusionArrayKernel:()=>ErrorDiffusionArrayKernel$1,ErrorDiffusionRiemersma:()=>ErrorDiffusionRiemersma$1,NearestColor:()=>NearestColor$1});var AbstractImageQuantizer$1=class{quantizeSync(e4,t2){for(let i2 of this.quantize(e4,t2))if(i2.pointContainer)return i2.pointContainer;throw new Error("unreachable")}},NearestColor$1=class extends AbstractImageQuantizer$1{constructor(e4){super(),__publicField$3(this,"_distance"),this._distance=e4}*quantize(e4,t2){let i2=e4.getPointArray(),r2=e4.getWidth(),n2=e4.getHeight(),a2=new ProgressTracker$1(n2,99);for(let e5=0;e5(e4[e4.FloydSteinberg=0]="FloydSteinberg",e4[e4.FalseFloydSteinberg=1]="FalseFloydSteinberg",e4[e4.Stucki=2]="Stucki",e4[e4.Atkinson=3]="Atkinson",e4[e4.Jarvis=4]="Jarvis",e4[e4.Burkes=5]="Burkes",e4[e4.Sierra=6]="Sierra",e4[e4.TwoSierra=7]="TwoSierra",e4[e4.SierraLite=8]="SierraLite",e4))(ErrorDiffusionArrayKernel$1||{}),ErrorDiffusionArray$1=class extends AbstractImageQuantizer$1{constructor(e4,t2,i2=!0,r2=0,n2=!1){super(),__publicField$3(this,"_minColorDistance"),__publicField$3(this,"_serpentine"),__publicField$3(this,"_kernel"),__publicField$3(this,"_calculateErrorLikeGIMP"),__publicField$3(this,"_distance"),this._setKernel(t2),this._distance=e4,this._minColorDistance=r2,this._serpentine=i2,this._calculateErrorLikeGIMP=n2}*quantize(e4,t2){let i2=e4.getPointArray(),r2=new Point$1,n2=e4.getWidth(),a2=e4.getHeight(),o2=[],s2=1,l2=1;for(let e5 of this._kernel){let t3=e5[2]+1;l2=0&&i3+u3=0&&r3+e5t2&&(e4.length=t2);let i2=e4.length;for(let t3=0;t3=0&&e4.x=0&&e4.y{let s2=i2[e5+n3*r2],{r:l2,g:u2,b:h2,a:c2}=s2;for(let e6=0;e6ssim$1});var K1$1=.01,K2$1=.03;function ssim$1(e4,t2){if(e4.getHeight()!==t2.getHeight()||e4.getWidth()!==t2.getWidth())throw new Error("Images have different sizes!");let i2=(255*K1$1)**2,r2=(255*K2$1)**2,n2=0,a2=0;return iterate$1(e4,t2,(e5,t3,o2,s2)=>{let l2=0,u2=0,h2=0;for(let i3=0;i3process.nextTick(e4):e4=>setTimeout(e4,0);function buildPaletteSync$1(e4,{colorDistanceFormula:t2,paletteQuantization:i2,colors:r2}={}){let n2=paletteQuantizationToPaletteQuantizer$1(colorDistanceFormulaToColorDistance$1(t2),i2,r2);return e4.forEach(e5=>n2.sample(e5)),n2.quantizeSync()}async function buildPalette(e4,{colorDistanceFormula:t2,paletteQuantization:i2,colors:r2,onProgress:n2}={}){return new Promise((a2,o2)=>{let s2=paletteQuantizationToPaletteQuantizer$1(colorDistanceFormulaToColorDistance$1(t2),i2,r2),l2;e4.forEach(e5=>s2.sample(e5));let u2=s2.quantize(),h2=()=>{try{let e5=u2.next();e5.done?a2(l2):(e5.value.palette&&(l2=e5.value.palette),n2&&n2(e5.value.progress),setImmediateImpl(h2))}catch(e5){o2(e5)}};setImmediateImpl(h2)})}function applyPaletteSync$1(e4,t2,{colorDistanceFormula:i2,imageQuantization:r2}={}){return imageQuantizationToImageQuantizer$1(colorDistanceFormulaToColorDistance$1(i2),r2).quantizeSync(e4,t2)}async function applyPalette(e4,t2,{colorDistanceFormula:i2,imageQuantization:r2,onProgress:n2}={}){return new Promise((a2,o2)=>{let s2,l2=imageQuantizationToImageQuantizer$1(colorDistanceFormulaToColorDistance$1(i2),r2).quantize(e4,t2),u2=()=>{try{let e5=l2.next();e5.done?a2(s2):(e5.value.pointContainer&&(s2=e5.value.pointContainer),n2&&n2(e5.value.progress),setImmediateImpl(u2))}catch(e5){o2(e5)}};setImmediateImpl(u2)})}function colorDistanceFormulaToColorDistance$1(e4="euclidean-bt709"){switch(e4){case"cie94-graphic-arts":return new CIE94GraphicArts$1;case"cie94-textiles":return new CIE94Textiles$1;case"ciede2000":return new CIEDE2000$1;case"color-metric":return new CMetric$1;case"euclidean":return new Euclidean$1;case"euclidean-bt709":return new EuclideanBT709$1;case"euclidean-bt709-noalpha":return new EuclideanBT709NoAlpha$1;case"manhattan":return new Manhattan$1;case"manhattan-bt709":return new ManhattanBT709$1;case"manhattan-nommyde":return new ManhattanNommyde$1;case"pngquant":return new PNGQuant$1;default:throw new Error(`Unknown colorDistanceFormula ${e4}`)}}function imageQuantizationToImageQuantizer$1(e4,t2="floyd-steinberg"){switch(t2){case"nearest":return new NearestColor$1(e4);case"riemersma":return new ErrorDiffusionRiemersma$1(e4);case"floyd-steinberg":return new ErrorDiffusionArray$1(e4,0);case"false-floyd-steinberg":return new ErrorDiffusionArray$1(e4,1);case"stucki":return new ErrorDiffusionArray$1(e4,2);case"atkinson":return new ErrorDiffusionArray$1(e4,3);case"jarvis":return new ErrorDiffusionArray$1(e4,4);case"burkes":return new ErrorDiffusionArray$1(e4,5);case"sierra":return new ErrorDiffusionArray$1(e4,6);case"two-sierra":return new ErrorDiffusionArray$1(e4,7);case"sierra-lite":return new ErrorDiffusionArray$1(e4,8);default:throw new Error(`Unknown imageQuantization ${t2}`)}}function paletteQuantizationToPaletteQuantizer$1(e4,t2="wuquant",i2=256){switch(t2){case"neuquant":return new NeuQuant$1(e4,i2);case"rgbquant":return new RGBQuant$1(e4,i2);case"wuquant":return new WuQuant$1(e4,i2);case"neuquant-float":return new NeuQuantFloat$1(e4,i2);default:throw new Error(`Unknown paletteQuantization ${t2}`)}}var imageQ=__toCommonJS(src_exports),gifframe={},BitmapImage$1=bitmapimage,GifFrame$1=class e2 extends BitmapImage$1{constructor(...t2){if(super(...t2),t2[0]instanceof e2){let e4=t2[0];this.xOffset=e4.xOffset,this.yOffset=e4.yOffset,this.disposalMethod=e4.disposalMethod,this.delayCentisecs=e4.delayCentisecs,this.interlaced=e4.interlaced}else{let i2=t2[t2.length-1],r2={};typeof i2!="object"||i2 instanceof BitmapImage$1||(r2=i2),this.xOffset=r2.xOffset||0,this.yOffset=r2.yOffset||0,this.disposalMethod=r2.disposalMethod!==void 0?r2.disposalMethod:e2.DisposeToBackgroundColor,this.delayCentisecs=r2.delayCentisecs||8,this.interlaced=r2.interlaced||!1}}getPalette(){let e4=new Set,t2=this.bitmap.data,i2=0,r2=!1;for(;i2>8&16777215;e4.add(r3)}i2+=4}let n2=new Array(e4.size),a2=e4.values();for(i2=0;i2e5-t3);let o2=n2.length;return r2&&++o2,{colors:n2,usesTransparency:r2,indexCount:o2}}},hasRequiredGifutil,hasRequiredGifcodec;function requireGifutil(){return hasRequiredGifutil||(hasRequiredGifutil=1,function(e4){let t2=require$$0,i2=imageQ,r2=bitmapimage,{GifFrame:n2}=gifframe,{GifError:a2}=gif$1,{GifCodec:o2}=requireGifcodec(),s2=[".jpg",".jpeg",".png",".bmp"],l2=new o2;function u2(e5,t3,r3,n3,a3){let o3=Array.isArray(e5)?e5:[e5];if(a3){if(["FloydSteinberg","FalseFloydSteinberg","Stucki","Atkinson","Jarvis","Burkes","Sierra","TwoSierra","SierraLite"].indexOf(a3.ditherAlgorithm)<0)throw new Error(`Invalid ditherAlgorithm '${a3.ditherAlgorithm}'`);a3.serpentine===void 0&&(a3.serpentine=!0),a3.minimumColorDistanceToDither===void 0&&(a3.minimumColorDistanceToDither=0),a3.calculateErrorLikeGIMP===void 0&&(a3.calculateErrorLikeGIMP=!1)}let s3=new i2.distance.Euclidean,l3=new i2.palette[t3](s3,r3,n3),u3;u3=a3?new i2.image.ErrorDiffusionArray(s3,i2.image.ErrorDiffusionArrayKernel[a3.ditherAlgorithm],a3.serpentine,a3.minimumColorDistanceToDither,a3.calculateErrorLikeGIMP):new i2.image.NearestColor(s3);let h2=[];o3.forEach(e6=>{let t4=e6.bitmap.data,r4=new ArrayBuffer(t4.length),n4=new Uint32Array(r4);for(let e7=0,i3=0;e7{t3.push(new n2(e6))}),t3},e4.getColorInfo=function(e5,t3){let i3=!1,r3=[];for(let t4=0;t4256)throw new a2(`Frame ${t4} uses more than 256 color indexes`);r3.push(n4)}if(t3===0)return{usesTransparency:i3,palettes:r3};let n3=new Set;r3.forEach(e6=>{e6.colors.forEach(e7=>{n3.add(e7)})});let o3=n3.size;if(i3&&++o3,t3&&o3>t3)return{usesTransparency:i3,palettes:r3};let s3=new Array(n3.size),l3=n3.values();for(let e6=0;e6e6-t4),{colors:s3,indexCount:o3,usesTransparency:i3,palettes:r3}},e4.copyAsJimp=function(t3,i3){return e4.shareAsJimp(t3,new r2(i3))},e4.getMaxDimensions=function(e5){let t3=0,i3=0;return e5.forEach(e6=>{let r3=e6.xOffset+e6.bitmap.width;r3>t3&&(t3=r3);let n3=e6.yOffset+e6.bitmap.height;n3>i3&&(i3=n3)}),{maxWidth:t3,maxHeight:i3}},e4.quantizeDekker=function(e5,t3,i3){u2(e5,"NeuQuantFloat",t3=t3||256,0,i3)},e4.quantizeSorokin=function(e5,t3,i3,r3){let n3;switch(t3=t3||256,i3=i3||"min-pop"){case"min-pop":n3=2;break;case"top-pop":n3=1;break;default:throw new Error(`Invalid quantizeSorokin histogram '${i3}'`)}u2(e5,"RGBQuant",t3,n3,r3)},e4.quantizeWu=function(e5,t3,i3,r3){if(t3=t3||256,(i3=i3||5)<1||i3>8)throw new Error("Invalid quantization quality");u2(e5,"WuQuant",t3,i3,r3)},e4.read=function(e5,i3){return i3=i3||l2,Buffer2.isBuffer(e5)?i3.decodeGif(e5):function(e6){return new Promise((i4,r3)=>{t2.readFile(e6,(e7,t3)=>e7?r3(e7):i4(t3))})}(e5).then(e6=>i3.decodeGif(e6))},e4.shareAsJimp=function(e5,t3){let i3=new e5(t3.bitmap.width,t3.bitmap.height,0);return i3.bitmap.data=t3.bitmap.data,i3},e4.write=function(e5,i3,r3,n3){n3=n3||l2;let a3=e5.match(/\.[a-zA-Z]+$/);if(a3!==null&&s2.includes(a3[0].toLowerCase()))throw new Error(`GIF '${e5}' has an unexpected suffix`);return n3.encodeGif(i3,r3).then(i4=>function(e6,i5){return new Promise((r4,n4)=>{t2.writeFile(e6,i5,e7=>e7?n4(e7):r4())})}(e5,i4.buffer).then(()=>i4))}}(gifutil)),gifutil}function requireGifcodec(){if(hasRequiredGifcodec)return gifcodec;hasRequiredGifcodec=1;let e4=omggif,{Gif:t2,GifError:i2}=gif$1;function r2(){let e5=requireGifutil();return r2=function(){return e5},e5}let{GifFrame:n2}=gifframe;function a2(e5,t3){let i3=e5.indexOf(t3);return i3===-1?null:i3}function o2(e5,t3){for(var i3,r3=0,n3=e5.length-1;r3<=n3;)if(e5[i3=Math.floor((r3+n3)/2)]>t3)n3=i3-1;else{if(!(e5[i3]r3;)r3<<=1;t3.length=r3,t3.fill(0,i3)}function l2(e5,t3){let i3=e5.bitmap.width*e5.bitmap.height;return i3=Math.ceil(i3*t3/8),i3+=Math.ceil(i3/255),100+i3+768}function u2(e5){let t3=e5.indexCount,i3=0;for(--t3;t3;)++i3,t3>>=1;return i3>0?i3:1}function h2(e5,t3,r3,n3,l3){if(r3.interlaced)throw new i2("writing interlaced GIFs is not supported");let u3=function(e6,t4,r4){let n4=r4.colors,s3=n4.length<=8?a2:o2,l4=t4.bitmap.data,u4=new Buffer2(l4.length/4),h4=n4.length,c2=0,f2=0;for(;c2>8&16777215;u4[f2]=s3(n4,e7)}else u4[f2]=h4;c2+=4,++f2}if(r4.usesTransparency){if(h4===256)throw new i2(`Frame ${e6} already has 256 colorsand so can't use transparency`)}else h4=null;return{buffer:u4,transparentIndex:h4}}(t3,r3,n3),h3={delay:r3.delayCentisecs,disposal:r3.disposalMethod,transparent:u3.transparentIndex};l3&&(s2(n3),h3.palette=n3.colors);try{let t4,i3=e5.getOutputBuffer(),n4=e5.getOutputBufferPosition(),a3=!0;for(;a3;)if(t4=e5.addFrame(r3.xOffset,r3.yOffset,r3.bitmap.width,r3.bitmap.height,u3.buffer,h3),a3=!1,t4>=i3.length-1){let t5=new Buffer2(1.5*i3.length);i3.copy(t5),e5.setOutputBuffer(t5),e5.setOutputBufferPosition(n4),i3=t5,a3=!0}return i3}catch(e6){throw new i2(e6)}}return gifcodec.GifCodec=class{constructor(e5={}){this._transparentRGB=null,typeof e5.transparentRGB=="number"&&e5.transparentRGB!==0&&(this._transparentRGBA=256*e5.transparentRGB),this._testInitialBufferSize=0}decodeGif(r3){try{let n3;try{n3=new e4.GifReader(r3)}catch(e5){throw new i2(e5)}let a3=n3.numFrames(),o3=[],s3={width:n3.width,height:n3.height,loops:n3.loopCount(),usesTransparency:!1};for(let e5=0;e5a3.width)for(let t4=0;t40)return this._testInitialBufferSize;let i3=968,r3=u2(e5);return t3.forEach(e6=>{i3+=l2(e6,r3)}),i3}_getSizeEstimateLocal(e5,t3){if(this._testInitialBufferSize>0)return this._testInitialBufferSize;let i3=200;for(let r3=0;r3{let t2=new src.BitmapImage(e4);src.GifUtil.quantizeDekker(t2,256);let i2=new src.GifFrame(e4);return(await new src.GifCodec().encodeGif([i2],{})).buffer},decode:e4=>{let t2=new omggif.GifReader(e4),i2=Buffer2.alloc(t2.width*t2.height*4);return t2.decodeAndBlitFrameRGBA(0,i2),{data:i2,width:t2.width,height:t2.height}}}}var encoder={exports:{}};(function(e4){function t2(e5){var t3,i2,r2,n2,a2,o2=Math.floor,s2=new Array(64),l2=new Array(64),u2=new Array(64),h2=new Array(64),c2=new Array(65535),f2=new Array(65535),d=new Array(64),p2=new Array(64),m=[],_2=0,g=7,b2=new Array(64),y2=new Array(64),w=new Array(64),v2=new Array(256),x2=new Array(2048),E2=[0,1,5,6,14,15,27,28,2,4,7,13,16,26,29,42,3,8,12,17,25,30,41,43,9,11,18,24,31,40,44,53,10,19,23,32,39,45,52,54,20,22,33,38,46,51,55,60,21,34,37,47,50,56,59,61,35,36,48,49,57,58,62,63],k2=[0,0,1,5,1,1,1,1,1,1,0,0,0,0,0,0,0],S2=[0,1,2,3,4,5,6,7,8,9,10,11],A2=[0,0,2,1,3,3,2,4,3,5,5,4,4,0,0,1,125],I=[1,2,3,0,4,17,5,18,33,49,65,6,19,81,97,7,34,113,20,50,129,145,161,8,35,66,177,193,21,82,209,240,36,51,98,114,130,9,10,22,23,24,25,26,37,38,39,40,41,42,52,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,225,226,227,228,229,230,231,232,233,234,241,242,243,244,245,246,247,248,249,250],M2=[0,0,3,1,1,1,1,1,1,1,1,1,0,0,0,0,0],T2=[0,1,2,3,4,5,6,7,8,9,10,11],P=[0,0,2,1,2,4,4,3,4,7,5,4,4,0,1,2,119],B2=[0,1,2,3,17,4,5,33,49,6,18,65,81,7,97,113,19,34,50,129,8,20,66,145,161,177,193,9,35,51,82,240,21,98,114,209,10,22,36,52,225,37,241,23,24,25,26,38,39,40,41,42,53,54,55,56,57,58,67,68,69,70,71,72,73,74,83,84,85,86,87,88,89,90,99,100,101,102,103,104,105,106,115,116,117,118,119,120,121,122,130,131,132,133,134,135,136,137,138,146,147,148,149,150,151,152,153,154,162,163,164,165,166,167,168,169,170,178,179,180,181,182,183,184,185,186,194,195,196,197,198,199,200,201,202,210,211,212,213,214,215,216,217,218,226,227,228,229,230,231,232,233,234,242,243,244,245,246,247,248,249,250];function C2(e6,t4){for(var i3=0,r3=0,n3=new Array,a3=1;a3<=16;a3++){for(var o3=1;o3<=e6[a3];o3++)n3[t4[r3]]=[],n3[t4[r3]][0]=i3,n3[t4[r3]][1]=a3,r3++,i3++;i3*=2}return n3}function R2(e6){for(var t4=e6[0],i3=e6[1]-1;i3>=0;)t4&1<>8&255),z2(255&e6)}function N2(e6,t4,i3,r3,n3){for(var a3,o3=n3[0],s3=n3[240],l3=function(e7,t5){var i4,r4,n4,a4,o4,s4,l4,u4,h4,c3,f3=0;for(h4=0;h4<8;++h4){i4=e7[f3],r4=e7[f3+1],n4=e7[f3+2],a4=e7[f3+3],o4=e7[f3+4],s4=e7[f3+5],l4=e7[f3+6];var p3=i4+(u4=e7[f3+7]),m3=i4-u4,_4=r4+l4,g3=r4-l4,b4=n4+s4,y4=n4-s4,w3=a4+o4,v3=a4-o4,x3=p3+w3,E3=p3-w3,k3=_4+b4,S3=_4-b4;e7[f3]=x3+k3,e7[f3+4]=x3-k3;var A3=.707106781*(S3+E3);e7[f3+2]=E3+A3,e7[f3+6]=E3-A3;var I2=.382683433*((x3=v3+y4)-(S3=g3+m3)),M3=.5411961*x3+I2,T3=1.306562965*S3+I2,P2=.707106781*(k3=y4+g3),B3=m3+P2,C3=m3-P2;e7[f3+5]=C3+M3,e7[f3+3]=C3-M3,e7[f3+1]=B3+T3,e7[f3+7]=B3-T3,f3+=8}for(f3=0,h4=0;h4<8;++h4){i4=e7[f3],r4=e7[f3+8],n4=e7[f3+16],a4=e7[f3+24],o4=e7[f3+32],s4=e7[f3+40],l4=e7[f3+48];var R3=i4+(u4=e7[f3+56]),z3=i4-u4,F2=r4+l4,N3=r4-l4,O3=n4+s4,D=n4-s4,$=a4+o4,L2=a4-o4,U=R3+$,Z=R3-$,j=F2+O3,G=F2-O3;e7[f3]=U+j,e7[f3+32]=U-j;var H=.707106781*(G+Z);e7[f3+16]=Z+H,e7[f3+48]=Z-H;var Q=.382683433*((U=L2+D)-(G=N3+z3)),W=.5411961*U+Q,q=1.306562965*G+Q,V=.707106781*(j=D+N3),Y2=z3+V,K=z3-V;e7[f3+40]=K+W,e7[f3+24]=K-W,e7[f3+8]=Y2+q,e7[f3+56]=Y2-q,f3++}for(h4=0;h4<64;++h4)c3=e7[h4]*t5[h4],d[h4]=c3>0?c3+.5|0:c3-.5|0;return d}(e6,t4),u3=0;u3<64;++u3)p2[E2[u3]]=l3[u3];var h3=p2[0]-i3;i3=p2[0],h3==0?R2(r3[0]):(R2(r3[f2[a3=32767+h3]]),R2(c2[a3]));for(var m2=63;m2>0&&p2[m2]==0;m2--);if(m2==0)return R2(o3),i3;for(var _3,g2=1;g2<=m2;){for(var b3=g2;p2[g2]==0&&g2<=m2;++g2);var y3=g2-b3;if(y3>=16){_3=y3>>4;for(var w2=1;w2<=_3;++w2)R2(s3);y3&=15}a3=32767+p2[g2],R2(n3[(y3<<4)+f2[a3]]),R2(c2[a3]),g2++}return m2!=63&&R2(o3),i3}function O2(e6){e6<=0&&(e6=1),e6>100&&(e6=100),a2!=e6&&(function(e7){for(var t4=[16,11,10,16,24,40,51,61,12,12,14,19,26,58,60,55,14,13,16,24,40,57,69,56,14,17,22,29,51,87,80,62,18,22,37,56,68,109,103,77,24,35,55,64,81,104,113,92,49,64,78,87,103,121,120,101,72,92,95,98,112,100,103,99],i3=0;i3<64;i3++){var r3=o2((t4[i3]*e7+50)/100);r3<1?r3=1:r3>255&&(r3=255),s2[E2[i3]]=r3}for(var n3=[17,18,24,47,99,99,99,99,18,21,26,66,99,99,99,99,24,26,56,99,99,99,99,99,47,66,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99],a3=0;a3<64;a3++){var c3=o2((n3[a3]*e7+50)/100);c3<1?c3=1:c3>255&&(c3=255),l2[E2[a3]]=c3}for(var f3=[1,1.387039845,1.306562965,1.175875602,1,.785694958,.5411961,.275899379],d2=0,p3=0;p3<8;p3++)for(var m2=0;m2<8;m2++)u2[d2]=1/(s2[E2[d2]]*f3[p3]*f3[m2]*8),h2[d2]=1/(l2[E2[d2]]*f3[p3]*f3[m2]*8),d2++}(e6<50?Math.floor(5e3/e6):Math.floor(200-2*e6)),a2=e6)}this.encode=function(e6,a3){var o3;new Date().getTime(),a3&&O2(a3),m=new Array,_2=0,g=7,F(65496),F(65504),F(16),z2(74),z2(70),z2(73),z2(70),z2(0),z2(1),z2(1),z2(0),F(1),F(1),z2(0),z2(0),(o3=e6.comments)!==void 0&&o3.constructor===Array&&o3.forEach(e7=>{if(typeof e7=="string"){F(65534);var t4,i3=e7.length;for(F(i3+2),t4=0;t4>3)*Q+(L2=4*(7&Z)),W+U>=H&&($-=Q*(W+1+U-H)),p3+L2>=Q&&($-=p3+L2-Q+4),v3=j[$++],E3=j[$++],C3=j[$++],b2[Z]=(x2[v3]+x2[E3+256|0]+x2[C3+512|0]>>16)-128,y2[Z]=(x2[v3+768|0]+x2[E3+1024|0]+x2[C3+1280|0]>>16)-128,w[Z]=(x2[v3+1280|0]+x2[E3+1536|0]+x2[C3+1792|0]>>16)-128;c3=N2(b2,u2,c3,t3,r2),f3=N2(y2,h2,f3,i2,n2),d2=N2(w,h2,d2,i2,n2),p3+=32}W+=8}if(g>=0){var q=[];q[1]=g+1,q[0]=(1<0&&!e5[o3-1];)o3--;a3.push({children:[],index:0});var s3,l3=a3[0];for(i3=0;i30;){if(a3.length===0)throw new Error("Could not recreate Huffman Table");l3=a3.pop()}for(l3.index++,a3.push(l3);a3.length<=i3;)a3.push(s3={children:[],index:0}),l3.children[l3.index]=s3.children,l3=s3;n3++}i3+10)return m2--,p3>>m2&1;if((p3=t3[i3++])==255){var e5=t3[i3++];if(e5)throw new Error("unexpected marker: "+(p3<<8|e5).toString(16))}return m2=7,p3>>>7}function g(e5){for(var t4,i4=e5;(t4=_3())!==null;){if(typeof(i4=i4[t4])=="number")return i4;if(typeof i4!="object")throw new Error("invalid huffman sequence")}return null}function b2(e5){for(var t4=0;e5>0;){var i4=_3();if(i4===null)return;t4=t4<<1|i4,e5--}return t4}function y2(e5){var t4=b2(e5);return t4>=1<0)v2--;else for(var r4=o3,n4=s3;r4<=n4;){var a4=g(t4.huffmanTableAC),l4=15&a4,h4=a4>>4;if(l4!==0)i4[e4[r4+=h4]]=y2(l4)*(1<>4,f4===0)a4<15?(v2=b2(a4)+(1<>4;if(s4!==0)i4[e4[a4+=l4]]=y2(s4),a4++;else{if(l4<15)break;a4+=16}}};var C2,R2,z2,F,N2=0;for(R2=B2==1?n3[0].blocksPerLine*n3[0].blocksPerColumn:c3*r3.mcusPerColumn,a3||(a3=R2);N2=65488&&C2<=65495))break;i3+=2}return i3-d2}function f2(e5,u3){var h3,c3,f3=[],d2=u3.blocksPerLine,p3=u3.blocksPerColumn,m2=d2<<3,g=new Int32Array(64),b2=new Uint8Array(64);function y2(e6,h4,c4){var f4,d3,p4,m3,_3,g2,b3,y3,w2,v3,x3=u3.quantizationTable,E3=c4;for(v3=0;v3<64;v3++)E3[v3]=e6[v3]*x3[v3];for(v3=0;v3<8;++v3){var k3=8*v3;E3[1+k3]!=0||E3[2+k3]!=0||E3[3+k3]!=0||E3[4+k3]!=0||E3[5+k3]!=0||E3[6+k3]!=0||E3[7+k3]!=0?(f4=s2*E3[0+k3]+128>>8,d3=s2*E3[4+k3]+128>>8,p4=E3[2+k3],m3=E3[6+k3],_3=l2*(E3[1+k3]-E3[7+k3])+128>>8,y3=l2*(E3[1+k3]+E3[7+k3])+128>>8,g2=E3[3+k3]<<4,b3=E3[5+k3]<<4,w2=f4-d3+1>>1,f4=f4+d3+1>>1,d3=w2,w2=p4*o2+m3*a2+128>>8,p4=p4*a2-m3*o2+128>>8,m3=w2,w2=_3-b3+1>>1,_3=_3+b3+1>>1,b3=w2,w2=y3+g2+1>>1,g2=y3-g2+1>>1,y3=w2,w2=f4-m3+1>>1,f4=f4+m3+1>>1,m3=w2,w2=d3-p4+1>>1,d3=d3+p4+1>>1,p4=w2,w2=_3*n2+y3*r2+2048>>12,_3=_3*r2-y3*n2+2048>>12,y3=w2,w2=g2*i2+b3*t2+2048>>12,g2=g2*t2-b3*i2+2048>>12,b3=w2,E3[0+k3]=f4+y3,E3[7+k3]=f4-y3,E3[1+k3]=d3+b3,E3[6+k3]=d3-b3,E3[2+k3]=p4+g2,E3[5+k3]=p4-g2,E3[3+k3]=m3+_3,E3[4+k3]=m3-_3):(w2=s2*E3[0+k3]+512>>10,E3[0+k3]=w2,E3[1+k3]=w2,E3[2+k3]=w2,E3[3+k3]=w2,E3[4+k3]=w2,E3[5+k3]=w2,E3[6+k3]=w2,E3[7+k3]=w2)}for(v3=0;v3<8;++v3){var S3=v3;E3[8+S3]!=0||E3[16+S3]!=0||E3[24+S3]!=0||E3[32+S3]!=0||E3[40+S3]!=0||E3[48+S3]!=0||E3[56+S3]!=0?(f4=s2*E3[0+S3]+2048>>12,d3=s2*E3[32+S3]+2048>>12,p4=E3[16+S3],m3=E3[48+S3],_3=l2*(E3[8+S3]-E3[56+S3])+2048>>12,y3=l2*(E3[8+S3]+E3[56+S3])+2048>>12,g2=E3[24+S3],b3=E3[40+S3],w2=f4-d3+1>>1,f4=f4+d3+1>>1,d3=w2,w2=p4*o2+m3*a2+2048>>12,p4=p4*a2-m3*o2+2048>>12,m3=w2,w2=_3-b3+1>>1,_3=_3+b3+1>>1,b3=w2,w2=y3+g2+1>>1,g2=y3-g2+1>>1,y3=w2,w2=f4-m3+1>>1,f4=f4+m3+1>>1,m3=w2,w2=d3-p4+1>>1,d3=d3+p4+1>>1,p4=w2,w2=_3*n2+y3*r2+2048>>12,_3=_3*r2-y3*n2+2048>>12,y3=w2,w2=g2*i2+b3*t2+2048>>12,g2=g2*t2-b3*i2+2048>>12,b3=w2,E3[0+S3]=f4+y3,E3[56+S3]=f4-y3,E3[8+S3]=d3+b3,E3[48+S3]=d3-b3,E3[16+S3]=p4+g2,E3[40+S3]=p4-g2,E3[24+S3]=m3+_3,E3[32+S3]=m3-_3):(w2=s2*c4[v3+0]+8192>>14,E3[0+S3]=w2,E3[8+S3]=w2,E3[16+S3]=w2,E3[24+S3]=w2,E3[32+S3]=w2,E3[40+S3]=w2,E3[48+S3]=w2,E3[56+S3]=w2)}for(v3=0;v3<64;++v3){var A2=128+(E3[v3]+8>>4);h4[v3]=A2<0?0:A2>255?255:A2}}_2(m2*p3*8);for(var w=0;w255?255:e5}u2.prototype={load:function(e5){var t3=new XMLHttpRequest;t3.open("GET",e5,!0),t3.responseType="arraybuffer",t3.onload=function(){var e6=new Uint8Array(t3.response||t3.mozResponseArrayBuffer);this.parse(e6),this.onload&&this.onload()}.bind(this),t3.send(null)},parse:function(t3){var i3=1e3*this.opts.maxResolutionInMP*1e3,r3=0;function n3(){var e5=t3[r3]<<8|t3[r3+1];return r3+=2,e5}function a3(e5){var t4,i4,r4=1,n4=1;for(i4 in e5.components)e5.components.hasOwnProperty(i4)&&(r4<(t4=e5.components[i4]).h&&(r4=t4.h),n4>4){if(S2>>4!=1)throw new Error("DQT: invalid table spec");for(q=0;q<64;q++)A2[e4[q]]=n3()}else for(q=0;q<64;q++)A2[e4[q]]=t3[r3++];m2[15&S2]=A2}break;case 65472:case 65473:case 65474:n3(),(o3={}).extended=w===65473,o3.progressive=w===65474,o3.precision=t3[r3++],o3.scanLines=n3(),o3.samplesPerLine=n3(),o3.components={},o3.componentsOrder=[];var I=o3.scanLines*o3.samplesPerLine;if(I>i3){var M2=Math.ceil((I-i3)/1e6);throw new Error(`maxResolutionInMP limit exceeded by ${M2}MP`)}var T2,P=t3[r3++];for(Q=0;Q>4,C2=15&t3[r3+1],R2=t3[r3+2];if(B2<=0||C2<=0)throw new Error("Invalid sampling factor, expected values above 0");o3.componentsOrder.push(T2),o3.components[T2]={h:B2,v:C2,quantizationIdx:R2},r3+=3}a3(o3),g.push(o3);break;case 65476:var z2=n3();for(Q=2;Q>4?b2:y2)[15&F]=h2(N2,D)}break;case 65501:n3(),s3=n3();break;case 65500:n3(),n3();break;case 65498:n3();var $=t3[r3++],L2=[];for(Q=0;Q<$;Q++){V=o3.components[t3[r3++]];var U=t3[r3++];V.huffmanTableDC=y2[U>>4],V.huffmanTableAC=b2[15&U],L2.push(V)}var Z=t3[r3++],j=t3[r3++],G=t3[r3++],H=c2(t3,r3,o3,L2,s3,Z,j,G>>4,15&G,this.opts);r3+=H;break;case 65535:t3[r3]!==255&&r3--;break;default:if(t3[r3-3]==255&&t3[r3-2]>=192&&t3[r3-2]<=254){r3-=3;break}if(w===224||w==225){if(v2!==-1)throw new Error(`first unknown JPEG marker at offset ${v2.toString(16)}, second unknown JPEG marker ${w.toString(16)} at offset ${(r3-1).toString(16)}`);v2=r3-1;let e5=n3();if(t3[r3+e5-2]===255){r3+=e5-2;break}}throw new Error("unknown JPEG marker "+w.toString(16))}w=n3()}if(g.length!=1)throw new Error("only single frame JPEGs supported");for(var Q=0;Qm){var i3=Math.ceil((t3-m)/1024/1024);throw new Error(`maxMemoryUsageInMB limit exceeded by at least ${i3}MB`)}p2=t3}return u2.resetMaxMemoryUsage=function(e5){p2=0,m=e5},u2.getBytesAllocated=function(){return p2},u2.requestMemoryAllocation=_2,u2}(),module.exports=function(e4,t2={}){var i2={colorTransform:void 0,useTArray:!1,formatAsRGBA:!0,tolerantDecoding:!0,maxResolutionInMP:100,maxMemoryUsageInMB:512,...t2},r2=new Uint8Array(e4),n2=new JpegImage;n2.opts=i2,JpegImage.resetMaxMemoryUsage(1024*i2.maxMemoryUsageInMB*1024),n2.parse(r2);var a2=i2.formatAsRGBA?4:3,o2=n2.width*n2.height*a2;try{JpegImage.requestMemoryAllocation(o2);var s2={width:n2.width,height:n2.height,exifBuffer:n2.exifBuffer,data:i2.useTArray?new Uint8Array(o2):Buffer2.alloc(o2)};n2.comments.length>0&&(s2.comments=n2.comments)}catch(e5){throw e5 instanceof RangeError?new Error("Could not allocate enough memory for the image. Required: "+o2):e5 instanceof ReferenceError&&e5.message==="Buffer is not defined"?new Error("Buffer is not globally defined in this environment. Consider setting useTArray to true"):e5}return n2.copyToImageData(s2,i2.formatAsRGBA),s2};var decoderExports=decoder.exports,encode=encoderExports,decode=decoderExports,jpegJs={encode,decode},JPEG=getDefaultExportFromCjs(jpegJs);function jpeg$2(){return{mime:"image/jpeg",encode:(e4,{quality:t2=100}={})=>JPEG.encode(e4,t2).data,decode:(e4,t2)=>JPEG.decode(e4,t2)}}function commonjsRequire(e4){throw new Error('Could not dynamically require "'+e4+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var browser$1={exports:{}};browser$1.exports=function(){function e4(t2,i2,r2){function n2(o3,s2){if(!i2[o3]){if(!t2[o3]){var l2=typeof commonjsRequire=="function"&&commonjsRequire;if(!s2&&l2)return l2(o3,!0);if(a2)return a2(o3,!0);var u2=new Error("Cannot find module '"+o3+"'");throw u2.code="MODULE_NOT_FOUND",u2}var h2=i2[o3]={exports:{}};t2[o3][0].call(h2.exports,function(e5){return n2(t2[o3][1][e5]||e5)},h2,h2.exports,e4,t2,i2,r2)}return i2[o3].exports}for(var a2=typeof commonjsRequire=="function"&&commonjsRequire,o2=0;o2=t4.length)throw new Error("Ran out of data");let n3=t4[r3];e5[i3]=n3,e5[i3+1]=n3,e5[i3+2]=n3,e5[i3+3]=t4[r3+1]},function(e5,t4,i3,r3){if(r3+2>=t4.length)throw new Error("Ran out of data");e5[i3]=t4[r3],e5[i3+1]=t4[r3+1],e5[i3+2]=t4[r3+2],e5[i3+3]=255},function(e5,t4,i3,r3){if(r3+3>=t4.length)throw new Error("Ran out of data");e5[i3]=t4[r3],e5[i3+1]=t4[r3+1],e5[i3+2]=t4[r3+2],e5[i3+3]=t4[r3+3]}],a2=[function(){},function(e5,t4,i3,r3){let n3=t4[0];e5[i3]=n3,e5[i3+1]=n3,e5[i3+2]=n3,e5[i3+3]=r3},function(e5,t4,i3){let r3=t4[0];e5[i3]=r3,e5[i3+1]=r3,e5[i3+2]=r3,e5[i3+3]=t4[1]},function(e5,t4,i3,r3){e5[i3]=t4[0],e5[i3+1]=t4[1],e5[i3+2]=t4[2],e5[i3+3]=r3},function(e5,t4,i3){e5[i3]=t4[0],e5[i3+1]=t4[1],e5[i3+2]=t4[2],e5[i3+3]=t4[3]}];function o2(e5,t4){let i3=[],r3=0;function n3(){if(r3===e5.length)throw new Error("Ran out of data");let n4,a3,o3,s3,l3,u2,h2,c2,f2=e5[r3];switch(r3++,t4){default:throw new Error("unrecognised depth");case 16:h2=e5[r3],r3++,i3.push((f2<<8)+h2);break;case 4:h2=15&f2,c2=f2>>4,i3.push(c2,h2);break;case 2:l3=3&f2,u2=f2>>2&3,h2=f2>>4&3,c2=f2>>6&3,i3.push(c2,h2,u2,l3);break;case 1:n4=1&f2,a3=f2>>1&1,o3=f2>>2&1,s3=f2>>3&1,l3=f2>>4&1,u2=f2>>5&1,h2=f2>>6&1,c2=f2>>7&1,i3.push(c2,h2,u2,l3,s3,o3,a3,n4)}}return{get:function(e6){for(;i3.length0&&(this._paused=!1,this.emit("drain"))}.bind(this))},o2.prototype.write=function(e5,t3){if(!this.writable)return this.emit("error",new Error("Stream not writable")),!1;let i4;return i4=r2.isBuffer(e5)?e5:r2.from(e5,t3||this._encoding),this._buffers.push(i4),this._buffered+=i4.length,this._process(),this._reads&&this._reads.length===0&&(this._paused=!0),this.writable&&!this._paused},o2.prototype.end=function(e5,t3){e5&&this.write(e5,t3),this.writable=!1,this._buffers&&(this._buffers.length===0?this._end():(this._buffers.push(null),this._process()))},o2.prototype.destroySoon=o2.prototype.end,o2.prototype._end=function(){this._reads.length>0&&this.emit("error",new Error("Unexpected end of input")),this.destroy()},o2.prototype.destroy=function(){this._buffers&&(this.writable=!1,this._reads=null,this._buffers=null,this.emit("close"))},o2.prototype._processReadAllowingLess=function(e5){this._reads.shift();let t3=this._buffers[0];t3.length>e5.length?(this._buffered-=e5.length,this._buffers[0]=t3.slice(e5.length),e5.func.call(this,t3.slice(0,e5.length))):(this._buffered-=t3.length,this._buffers.shift(),e5.func.call(this,t3))},o2.prototype._processRead=function(e5){this._reads.shift();let t3=0,i4=0,n3=r2.alloc(e5.length);for(;t30&&this._buffers.splice(0,i4),this._buffered-=e5.length,e5.func.call(this,n3)},o2.prototype._process=function(){try{for(;this._buffered>0&&this._reads&&this._reads.length>0;){let e5=this._reads[0];if(e5.allowLess)this._processReadAllowingLess(e5);else{if(!(this._buffered>=e5.length))break;this._processRead(e5)}}this._buffers&&!this.writable&&this._end()}catch(e5){this.emit("error",e5)}}}).call(this)}).call(this,e4("_process"),e4("buffer").Buffer)},{_process:63,buffer:32,stream:65,util:84}],4:[function(e4,t2,i2){t2.exports={PNG_SIGNATURE:[137,80,78,71,13,10,26,10],TYPE_IHDR:1229472850,TYPE_IEND:1229278788,TYPE_IDAT:1229209940,TYPE_PLTE:1347179589,TYPE_tRNS:1951551059,TYPE_gAMA:1732332865,COLORTYPE_GRAYSCALE:0,COLORTYPE_PALETTE:1,COLORTYPE_COLOR:2,COLORTYPE_ALPHA:4,COLORTYPE_PALETTE_COLOR:3,COLORTYPE_COLOR_ALPHA:6,COLORTYPE_TO_BPP_MAP:{0:1,2:3,3:1,4:2,6:4},GAMMA_DIVISION:1e5}},{}],5:[function(e4,t2,i2){let r2=[];(function(){for(let e5=0;e5<256;e5++){let t3=e5;for(let e6=0;e6<8;e6++)1&t3?t3=3988292384^t3>>>1:t3>>>=1;r2[e5]=t3}})();let n2=t2.exports=function(){this._crc=-1};n2.prototype.write=function(e5){for(let t3=0;t3>>8;return!0},n2.prototype.crc32=function(){return~this._crc},n2.crc32=function(e5){let t3=-1;for(let i3=0;i3>>8;return~t3}},{}],6:[function(e4,t2,i2){(function(i3){(function(){let r2=e4("./paeth-predictor");function n2(e5,t3,i4,r3,n3){for(let a3=0;a3=a3?e5[t3+o3-a3]:0,s3=e5[t3+o3]-i5;r3[n3+o3]=s3}}function s2(e5,t3,i4,r3){let n3=0;for(let a3=0;a3=r3?e5[t3+a3-r3]:0,o3=e5[t3+a3]-i5;n3+=Math.abs(o3)}return n3}function l2(e5,t3,i4,r3,n3){for(let a3=0;a30?e5[t3+a3-i4]:0,s3=e5[t3+a3]-o3;r3[n3+a3]=s3}}function u2(e5,t3,i4){let r3=0,n3=t3+i4;for(let a3=t3;a30?e5[a3-i4]:0,o3=e5[a3]-n4;r3+=Math.abs(o3)}return r3}function h2(e5,t3,i4,r3,n3,a3){for(let o3=0;o3=a3?e5[t3+o3-a3]:0,l3=t3>0?e5[t3+o3-i4]:0,u3=e5[t3+o3]-(s3+l3>>1);r3[n3+o3]=u3}}function c2(e5,t3,i4,r3){let n3=0;for(let a3=0;a3=r3?e5[t3+a3-r3]:0,s3=t3>0?e5[t3+a3-i4]:0,l3=e5[t3+a3]-(o3+s3>>1);n3+=Math.abs(l3)}return n3}function f2(e5,t3,i4,n3,a3,o3){for(let s3=0;s3=o3?e5[t3+s3-o3]:0,u3=t3>0?e5[t3+s3-i4]:0,h3=t3>0&&s3>=o3?e5[t3+s3-(i4+o3)]:0,c3=e5[t3+s3]-r2(l3,u3,h3);n3[a3+s3]=c3}}function d(e5,t3,i4,n3){let a3=0;for(let o3=0;o3=n3?e5[t3+o3-n3]:0,l3=t3>0?e5[t3+o3-i4]:0,u3=t3>0&&o3>=n3?e5[t3+o3-(i4+n3)]:0,h3=e5[t3+o3]-r2(s3,l3,u3);a3+=Math.abs(h3)}return a3}let p2={0:n2,1:o2,2:l2,3:h2,4:f2},m={0:a2,1:s2,2:u2,3:c2,4:d};t2.exports=function(e5,t3,r3,n3,a3){let o3;if("filterType"in n3&&n3.filterType!==-1){if(typeof n3.filterType!="number")throw new Error("unrecognised filter types");o3=[n3.filterType]}else o3=[0,1,2,3,4];n3.bitDepth===16&&(a3*=2);let s3=t3*a3,l3=0,u3=0,h3=i3.alloc((s3+1)*r3),c3=o3[0];for(let t4=0;t41){let t5=1/0;for(let i4=0;i4n3?t3[a3-r3]:0;t3[a3]=i5+o3}},o2.prototype._unFilterType2=function(e5,t3,i4){let r3=this._lastLine;for(let n3=0;n3n3?t3[o3-r3]:0,u2=Math.floor((l2+s2)/2);t3[o3]=i5+u2}},o2.prototype._unFilterType4=function(e5,t3,i4){let r3=this._xComparison,a3=r3-1,o3=this._lastLine;for(let s2=0;s2a3?t3[s2-r3]:0,h2=s2>a3&&o3?o3[s2-r3]:0,c2=n2(u2,l2,h2);t3[s2]=i5+c2}},o2.prototype._reverseFilterLine=function(e5){let t3,r3=e5[0],n3=this._images[this._imageIndex],a3=n3.byteWidth;if(r3===0)t3=e5.slice(1,a3+1);else switch(t3=i3.alloc(a3),r3){case 1:this._unFilterType1(e5,t3,a3);break;case 2:this._unFilterType2(e5,t3,a3);break;case 3:this._unFilterType3(e5,t3,a3);break;case 4:this._unFilterType4(e5,t3,a3);break;default:throw new Error("Unrecognised filter type - "+r3)}this.write(t3),n3.lineIndex++,n3.lineIndex>=n3.height?(this._lastLine=null,this._imageIndex++,n3=this._images[this._imageIndex]):this._lastLine=t3,n3?this.read(n3.byteWidth+1,this._reverseFilterLine.bind(this)):(this._lastLine=null,this.complete())}}).call(this)}).call(this,e4("buffer").Buffer)},{"./interlace":11,"./paeth-predictor":15,buffer:32}],10:[function(e4,t2,i2){(function(e5){(function(){function i3(e6,t3,i4,r3,n3){let a2=0;for(let o2=0;o20&&u2>0&&i3.push({width:l2,height:u2,index:e6})}return i3},i2.getInterlaceIterator=function(e5){return function(t3,i3,n2){let a2=t3%r2[n2].x.length,o2=(t3-a2)/r2[n2].x.length*8+r2[n2].x[a2],s2=i3%r2[n2].y.length;return 4*o2+((i3-s2)/r2[n2].y.length*8+r2[n2].y[s2])*e5*4}}},{}],12:[function(e4,t2,i2){(function(i3){(function(){let r2=e4("util"),n2=e4("stream"),a2=e4("./constants"),o2=e4("./packer"),s2=t2.exports=function(e5){n2.call(this);let t3=e5||{};this._packer=new o2(t3),this._deflate=this._packer.createDeflate(),this.readable=!0};r2.inherits(s2,n2),s2.prototype.pack=function(e5,t3,r3,n3){this.emit("data",i3.from(a2.PNG_SIGNATURE)),this.emit("data",this._packer.packIHDR(t3,r3)),n3&&this.emit("data",this._packer.packGAMA(n3));let o3=this._packer.filterData(e5,t3,r3);this._deflate.on("error",this.emit.bind(this,"error")),this._deflate.on("data",function(e6){this.emit("data",this._packer.packIDAT(e6))}.bind(this)),this._deflate.on("end",function(){this.emit("data",this._packer.packIEND()),this.emit("end")}.bind(this)),this._deflate.end(o3)}}).call(this)}).call(this,e4("buffer").Buffer)},{"./constants":4,"./packer":14,buffer:32,stream:65,util:84}],13:[function(e4,t2,i2){(function(i3){(function(){let r2=!0,n2=e4("zlib");n2.deflateSync||(r2=!1);let a2=e4("./constants"),o2=e4("./packer");t2.exports=function(e5,t3){if(!r2)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let s2=new o2(t3||{}),l2=[];l2.push(i3.from(a2.PNG_SIGNATURE)),l2.push(s2.packIHDR(e5.width,e5.height)),e5.gamma&&l2.push(s2.packGAMA(e5.gamma));let u2=s2.filterData(e5.data,e5.width,e5.height),h2=n2.deflateSync(u2,s2.getDeflateOptions());if(u2=null,!h2||!h2.length)throw new Error("bad png - invalid compressed data response");return l2.push(s2.packIDAT(h2)),l2.push(s2.packIEND()),i3.concat(l2)}}).call(this)}).call(this,e4("buffer").Buffer)},{"./constants":4,"./packer":14,buffer:32,zlib:31}],14:[function(e4,t2,i2){(function(i3){(function(){let r2=e4("./constants"),n2=e4("./crc"),a2=e4("./bitpacker"),o2=e4("./filter-pack"),s2=e4("zlib"),l2=t2.exports=function(e5){if(this._options=e5,e5.deflateChunkSize=e5.deflateChunkSize||32768,e5.deflateLevel=e5.deflateLevel!=null?e5.deflateLevel:9,e5.deflateStrategy=e5.deflateStrategy!=null?e5.deflateStrategy:3,e5.inputHasAlpha=e5.inputHasAlpha==null||e5.inputHasAlpha,e5.deflateFactory=e5.deflateFactory||s2.createDeflate,e5.bitDepth=e5.bitDepth||8,e5.colorType=typeof e5.colorType=="number"?e5.colorType:r2.COLORTYPE_COLOR_ALPHA,e5.inputColorType=typeof e5.inputColorType=="number"?e5.inputColorType:r2.COLORTYPE_COLOR_ALPHA,[r2.COLORTYPE_GRAYSCALE,r2.COLORTYPE_COLOR,r2.COLORTYPE_COLOR_ALPHA,r2.COLORTYPE_ALPHA].indexOf(e5.colorType)===-1)throw new Error("option color type:"+e5.colorType+" is not supported at present");if([r2.COLORTYPE_GRAYSCALE,r2.COLORTYPE_COLOR,r2.COLORTYPE_COLOR_ALPHA,r2.COLORTYPE_ALPHA].indexOf(e5.inputColorType)===-1)throw new Error("option input color type:"+e5.inputColorType+" is not supported at present");if(e5.bitDepth!==8&&e5.bitDepth!==16)throw new Error("option bit depth:"+e5.bitDepth+" is not supported at present")};l2.prototype.getDeflateOptions=function(){return{chunkSize:this._options.deflateChunkSize,level:this._options.deflateLevel,strategy:this._options.deflateStrategy}},l2.prototype.createDeflate=function(){return this._options.deflateFactory(this.getDeflateOptions())},l2.prototype.filterData=function(e5,t3,i4){let n3=a2(e5,t3,i4,this._options),s3=r2.COLORTYPE_TO_BPP_MAP[this._options.colorType];return o2(n3,t3,i4,this._options,s3)},l2.prototype._packChunk=function(e5,t3){let r3=t3?t3.length:0,a3=i3.alloc(r3+12);return a3.writeUInt32BE(r3,0),a3.writeUInt32BE(e5,4),t3&&t3.copy(a3,8),a3.writeInt32BE(n2.crc32(a3.slice(4,a3.length-4)),a3.length-4),a3},l2.prototype.packGAMA=function(e5){let t3=i3.alloc(4);return t3.writeUInt32BE(Math.floor(e5*r2.GAMMA_DIVISION),0),this._packChunk(r2.TYPE_gAMA,t3)},l2.prototype.packIHDR=function(e5,t3){let n3=i3.alloc(13);return n3.writeUInt32BE(e5,0),n3.writeUInt32BE(t3,4),n3[8]=this._options.bitDepth,n3[9]=this._options.colorType,n3[10]=0,n3[11]=0,n3[12]=0,this._packChunk(r2.TYPE_IHDR,n3)},l2.prototype.packIDAT=function(e5){return this._packChunk(r2.TYPE_IDAT,e5)},l2.prototype.packIEND=function(){return this._packChunk(r2.TYPE_IEND,null)}}).call(this)}).call(this,e4("buffer").Buffer)},{"./bitpacker":2,"./constants":4,"./crc":5,"./filter-pack":6,buffer:32,zlib:31}],15:[function(e4,t2,i2){t2.exports=function(e5,t3,i3){let r2=e5+t3-i3,n2=Math.abs(r2-e5),a2=Math.abs(r2-t3),o2=Math.abs(r2-i3);return n2<=a2&&n2<=o2?e5:a2<=o2?t3:i3}},{}],16:[function(e4,t2,i2){let r2=e4("util"),n2=e4("zlib"),a2=e4("./chunkstream"),o2=e4("./filter-parse-async"),s2=e4("./parser"),l2=e4("./bitmapper"),u2=e4("./format-normaliser"),h2=t2.exports=function(e5){a2.call(this),this._parser=new s2(e5,{read:this.read.bind(this),error:this._handleError.bind(this),metadata:this._handleMetaData.bind(this),gamma:this.emit.bind(this,"gamma"),palette:this._handlePalette.bind(this),transColor:this._handleTransColor.bind(this),finished:this._finished.bind(this),inflateData:this._inflateData.bind(this),simpleTransparency:this._simpleTransparency.bind(this),headersFinished:this._headersFinished.bind(this)}),this._options=e5,this.writable=!0,this._parser.start()};r2.inherits(h2,a2),h2.prototype._handleError=function(e5){this.emit("error",e5),this.writable=!1,this.destroy(),this._inflate&&this._inflate.destroy&&this._inflate.destroy(),this._filter&&(this._filter.destroy(),this._filter.on("error",function(){})),this.errord=!0},h2.prototype._inflateData=function(e5){if(!this._inflate)if(this._bitmapInfo.interlace)this._inflate=n2.createInflate(),this._inflate.on("error",this.emit.bind(this,"error")),this._filter.on("complete",this._complete.bind(this)),this._inflate.pipe(this._filter);else{let e6=(1+(this._bitmapInfo.width*this._bitmapInfo.bpp*this._bitmapInfo.depth+7>>3))*this._bitmapInfo.height,t3=Math.max(e6,n2.Z_MIN_CHUNK);this._inflate=n2.createInflate({chunkSize:t3});let i3=e6,r3=this.emit.bind(this,"error");this._inflate.on("error",function(e7){i3&&r3(e7)}),this._filter.on("complete",this._complete.bind(this));let a3=this._filter.write.bind(this._filter);this._inflate.on("data",function(e7){i3&&(e7.length>i3&&(e7=e7.slice(0,i3)),i3-=e7.length,a3(e7))}),this._inflate.on("end",this._filter.end.bind(this._filter))}this._inflate.write(e5)},h2.prototype._handleMetaData=function(e5){this._metaData=e5,this._bitmapInfo=Object.create(e5),this._filter=new o2(this._bitmapInfo)},h2.prototype._handleTransColor=function(e5){this._bitmapInfo.transColor=e5},h2.prototype._handlePalette=function(e5){this._bitmapInfo.palette=e5},h2.prototype._simpleTransparency=function(){this._metaData.alpha=!0},h2.prototype._headersFinished=function(){this.emit("metadata",this._metaData)},h2.prototype._finished=function(){this.errord||(this._inflate?this._inflate.end():this.emit("error","No Inflate block"))},h2.prototype._complete=function(e5){if(this.errord)return;let t3;try{let i3=l2.dataToBitMap(e5,this._bitmapInfo);t3=u2(i3,this._bitmapInfo,this._options.skipRescale),i3=null}catch(e6){return void this._handleError(e6)}this.emit("parsed",t3)}},{"./bitmapper":1,"./chunkstream":3,"./filter-parse-async":7,"./format-normaliser":10,"./parser":18,util:84,zlib:31}],17:[function(e4,t2,i2){(function(i3){(function(){let r2=!0,n2=e4("zlib"),a2=e4("./sync-inflate");n2.deflateSync||(r2=!1);let o2=e4("./sync-reader"),s2=e4("./filter-parse-sync"),l2=e4("./parser"),u2=e4("./bitmapper"),h2=e4("./format-normaliser");t2.exports=function(e5,t3){if(!r2)throw new Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");let c2,f2,d;function p2(e6){c2=e6}function m(e6){f2=e6}function _2(e6){f2.transColor=e6}function g(e6){f2.palette=e6}function b2(){f2.alpha=!0}function y2(e6){d=e6}let w=[];function v2(e6){w.push(e6)}let x2=new o2(e5);if(new l2(t3,{read:x2.read.bind(x2),error:p2,metadata:m,gamma:y2,palette:g,transColor:_2,inflateData:v2,simpleTransparency:b2}).start(),x2.process(),c2)throw c2;let E2,k2=i3.concat(w);if(w.length=0,f2.interlace)E2=n2.inflateSync(k2);else{let e6=(1+(f2.width*f2.bpp*f2.depth+7>>3))*f2.height;E2=a2(k2,{chunkSize:e6,maxLength:e6})}if(k2=null,!E2||!E2.length)throw new Error("bad png - invalid inflate data response");let S2=s2.process(E2,f2);k2=null;let A2=u2.dataToBitMap(S2,f2);S2=null;let I=h2(A2,f2,t3.skipRescale);return f2.data=I,f2.gamma=d||0,f2}}).call(this)}).call(this,e4("buffer").Buffer)},{"./bitmapper":1,"./filter-parse-sync":8,"./format-normaliser":10,"./parser":18,"./sync-inflate":21,"./sync-reader":22,buffer:32,zlib:31}],18:[function(e4,t2,i2){(function(i3){(function(){let r2=e4("./constants"),n2=e4("./crc"),a2=t2.exports=function(e5,t3){this._options=e5,e5.checkCRC=e5.checkCRC!==!1,this._hasIHDR=!1,this._hasIEND=!1,this._emittedHeadersFinished=!1,this._palette=[],this._colorType=0,this._chunks={},this._chunks[r2.TYPE_IHDR]=this._handleIHDR.bind(this),this._chunks[r2.TYPE_IEND]=this._handleIEND.bind(this),this._chunks[r2.TYPE_IDAT]=this._handleIDAT.bind(this),this._chunks[r2.TYPE_PLTE]=this._handlePLTE.bind(this),this._chunks[r2.TYPE_tRNS]=this._handleTRNS.bind(this),this._chunks[r2.TYPE_gAMA]=this._handleGAMA.bind(this),this.read=t3.read,this.error=t3.error,this.metadata=t3.metadata,this.gamma=t3.gamma,this.transColor=t3.transColor,this.palette=t3.palette,this.parsed=t3.parsed,this.inflateData=t3.inflateData,this.finished=t3.finished,this.simpleTransparency=t3.simpleTransparency,this.headersFinished=t3.headersFinished||function(){}};a2.prototype.start=function(){this.read(r2.PNG_SIGNATURE.length,this._parseSignature.bind(this))},a2.prototype._parseSignature=function(e5){let t3=r2.PNG_SIGNATURE;for(let i4=0;i4this._palette.length)return void this.error(new Error("More transparent colors than palette size"));for(let t3=0;t30?this._handleIDAT(i4):this._handleChunkEnd()},a2.prototype._handleIEND=function(e5){this.read(e5,this._parseIEND.bind(this))},a2.prototype._parseIEND=function(e5){this._crc.write(e5),this._hasIEND=!0,this._handleChunkEnd(),this.finished&&this.finished()}}).call(this)}).call(this,e4("buffer").Buffer)},{"./constants":4,"./crc":5,buffer:32}],19:[function(e4,t2,i2){let r2=e4("./parser-sync"),n2=e4("./packer-sync");i2.read=function(e5,t3){return r2(e5,t3||{})},i2.write=function(e5,t3){return n2(e5,t3)}},{"./packer-sync":13,"./parser-sync":17}],20:[function(e4,t2,i2){(function(t3,r2){(function(){let n2=e4("util"),a2=e4("stream"),o2=e4("./parser-async"),s2=e4("./packer-async"),l2=e4("./png-sync"),u2=i2.PNG=function(e5){a2.call(this),e5=e5||{},this.width=0|e5.width,this.height=0|e5.height,this.data=this.width>0&&this.height>0?r2.alloc(4*this.width*this.height):null,e5.fill&&this.data&&this.data.fill(0),this.gamma=0,this.readable=this.writable=!0,this._parser=new o2(e5),this._parser.on("error",this.emit.bind(this,"error")),this._parser.on("close",this._handleClose.bind(this)),this._parser.on("metadata",this._metadata.bind(this)),this._parser.on("gamma",this._gamma.bind(this)),this._parser.on("parsed",function(e6){this.data=e6,this.emit("parsed",e6)}.bind(this)),this._packer=new s2(e5),this._packer.on("data",this.emit.bind(this,"data")),this._packer.on("end",this.emit.bind(this,"end")),this._parser.on("close",this._handleClose.bind(this)),this._packer.on("error",this.emit.bind(this,"error"))};n2.inherits(u2,a2),u2.sync=l2,u2.prototype.pack=function(){return this.data&&this.data.length?(t3.nextTick(function(){this._packer.pack(this.data,this.width,this.height,this.gamma)}.bind(this)),this):(this.emit("error","No data provided"),this)},u2.prototype.parse=function(e5,t4){if(t4){let e6,i3;e6=function(e7){this.removeListener("error",i3),this.data=e7,t4(null,this)}.bind(this),i3=function(i4){this.removeListener("parsed",e6),t4(i4,null)}.bind(this),this.once("parsed",e6),this.once("error",i3)}return this.end(e5),this},u2.prototype.write=function(e5){return this._parser.write(e5),!0},u2.prototype.end=function(e5){this._parser.end(e5)},u2.prototype._metadata=function(e5){this.width=e5.width,this.height=e5.height,this.emit("metadata",e5)},u2.prototype._gamma=function(e5){this.gamma=e5},u2.prototype._handleClose=function(){this._parser.writable||this._packer.readable||this.emit("close")},u2.bitblt=function(e5,t4,i3,r3,n3,a3,o3,s3){if(r3|=0,n3|=0,a3|=0,o3|=0,s3|=0,(i3|=0)>e5.width||r3>e5.height||i3+n3>e5.width||r3+a3>e5.height)throw new Error("bitblt reading outside image");if(o3>t4.width||s3>t4.height||o3+n3>t4.width||s3+a3>t4.height)throw new Error("bitblt writing outside image");for(let l3=0;l3=0,"have should not go down"),i4>0){let e7=u3._buffer.slice(u3._offset,u3._offset+i4);if(u3._offset+=i4,e7.length>d&&(e7=e7.slice(0,d)),m.push(e7),_2+=e7.length,d-=e7.length,d===0)return!1}return(t4===0||u3._offset>=u3._chunkSize)&&(f3=u3._chunkSize,u3._offset=0,u3._buffer=n2.allocUnsafe(u3._chunkSize)),t4===0&&(p2+=c3-e6,c3=e6,!0)}this.on("error",function(e6){o3=e6}),r3(this._handle,"zlib binding closed");do l3=this._handle.writeSync(t3,e5,p2,c3,this._buffer,this._offset,f3),l3=l3||this._writeState;while(!this._hadError&&g(l3[0],l3[1]));if(this._hadError)throw o3;if(_2>=s2)throw h2(this),new RangeError("Cannot create final Buffer. It would be larger than 0x"+s2.toString(16)+" bytes");let b2=n2.concat(m,_2);return h2(this),b2},o2.inherits(l2,a2.Inflate),t2.exports=i2=f2,i2.Inflate=l2,i2.createInflate=u2,i2.inflateSync=f2}).call(this)}).call(this,e4("_process"),e4("buffer").Buffer)},{_process:63,assert:23,buffer:32,util:84,zlib:31}],22:[function(e4,t2,i2){let r2=t2.exports=function(e5){this._buffer=e5,this._reads=[]};r2.prototype.read=function(e5,t3){this._reads.push({length:Math.abs(e5),allowLess:e5<0,func:t3})},r2.prototype.process=function(){for(;this._reads.length>0&&this._buffer.length;){let e5=this._reads[0];if(!this._buffer.length||!(this._buffer.length>=e5.length||e5.allowLess))break;{this._reads.shift();let t3=this._buffer;this._buffer=t3.slice(e5.length),e5.func.call(this,t3.slice(0,e5.length))}}if(this._reads.length>0)throw new Error("There are some read requests waitng on finished stream");if(this._buffer.length>0)throw new Error("unrecognised content at end of stream")}},{}],23:[function(e4,t2,i2){(function(i3){(function(){var r2=e4("object-assign");function n2(e5,t3){if(e5===t3)return 0;for(var i4=e5.length,r3=t3.length,n3=0,a3=Math.min(i4,r3);n3=0;u3--)if(h3[u3]!==c3[u3])return!1;for(u3=h3.length-1;u3>=0;u3--)if(!w(e5[s3=h3[u3]],t3[s3],i4,r3))return!1;return!0}function E2(e5,t3,i4){w(e5,t3,!0)&&b2(e5,t3,i4,"notDeepStrictEqual",E2)}function k2(e5,t3){if(!e5||!t3)return!1;if(Object.prototype.toString.call(t3)=="[object RegExp]")return t3.test(e5);try{if(e5 instanceof t3)return!0}catch{}return!Error.isPrototypeOf(t3)&&t3.call({},e5)===!0}function S2(e5){var t3;try{e5()}catch(e6){t3=e6}return t3}function A2(e5,t3,i4,r3){var n3;if(typeof t3!="function")throw new TypeError('"block" argument must be a function');typeof i4=="string"&&(r3=i4,i4=null),n3=S2(t3),r3=(i4&&i4.name?" ("+i4.name+").":".")+(r3?" "+r3:"."),e5&&!n3&&b2(n3,i4,"Missing expected exception"+r3);var a3=typeof r3=="string",s3=!e5&&n3&&!i4;if((!e5&&o2.isError(n3)&&a3&&k2(n3,i4)||s3)&&b2(n3,i4,"Got unwanted exception"+r3),e5&&n3&&i4&&!k2(n3,i4)||!e5&&n3)throw n3}function I(e5,t3){e5||b2(e5,!0,t3,"==",I)}f2.AssertionError=function(e5){this.name="AssertionError",this.actual=e5.actual,this.expected=e5.expected,this.operator=e5.operator,e5.message?(this.message=e5.message,this.generatedMessage=!1):(this.message=g(this),this.generatedMessage=!0);var t3=e5.stackStartFunction||b2;if(Error.captureStackTrace)Error.captureStackTrace(this,t3);else{var i4=new Error;if(i4.stack){var r3=i4.stack,n3=p2(t3),a3=r3.indexOf(` `+n3);if(a3>=0){var o3=r3.indexOf(` `,a3+1);r3=r3.substring(o3+1)}this.stack=r3}}},o2.inherits(f2.AssertionError,Error),f2.fail=b2,f2.ok=y2,f2.equal=function(e5,t3,i4){e5!=t3&&b2(e5,t3,i4,"==",f2.equal)},f2.notEqual=function(e5,t3,i4){e5==t3&&b2(e5,t3,i4,"!=",f2.notEqual)},f2.deepEqual=function(e5,t3,i4){w(e5,t3,!1)||b2(e5,t3,i4,"deepEqual",f2.deepEqual)},f2.deepStrictEqual=function(e5,t3,i4){w(e5,t3,!0)||b2(e5,t3,i4,"deepStrictEqual",f2.deepStrictEqual)},f2.notDeepEqual=function(e5,t3,i4){w(e5,t3,!1)&&b2(e5,t3,i4,"notDeepEqual",f2.notDeepEqual)},f2.notDeepStrictEqual=E2,f2.strictEqual=function(e5,t3,i4){e5!==t3&&b2(e5,t3,i4,"===",f2.strictEqual)},f2.notStrictEqual=function(e5,t3,i4){e5===t3&&b2(e5,t3,i4,"!==",f2.notStrictEqual)},f2.throws=function(e5,t3,i4){A2(!0,e5,t3,i4)},f2.doesNotThrow=function(e5,t3,i4){A2(!1,e5,t3,i4)},f2.ifError=function(e5){if(e5)throw e5},f2.strict=r2(I,f2,{equal:f2.strictEqual,deepEqual:f2.deepStrictEqual,notEqual:f2.notStrictEqual,notDeepEqual:f2.notDeepStrictEqual}),f2.strict.strict=f2.strict;var M2=Object.keys||function(e5){var t3=[];for(var i4 in e5)s2.call(e5,i4)&&t3.push(i4);return t3}}).call(this)}).call(this,commonjsGlobal!==void 0?commonjsGlobal:typeof self<"u"?self:typeof window<"u"?window:{})},{"object-assign":51,"util/":26}],24:[function(e4,t2,i2){typeof Object.create=="function"?t2.exports=function(e5,t3){e5.super_=t3,e5.prototype=Object.create(t3.prototype,{constructor:{value:e5,enumerable:!1,writable:!0,configurable:!0}})}:t2.exports=function(e5,t3){e5.super_=t3;var i3=function(){};i3.prototype=t3.prototype,e5.prototype=new i3,e5.prototype.constructor=e5}},{}],25:[function(e4,t2,i2){t2.exports=function(e5){return e5&&typeof e5=="object"&&typeof e5.copy=="function"&&typeof e5.fill=="function"&&typeof e5.readUInt8=="function"}},{}],26:[function(e4,t2,i2){(function(t3,r2){(function(){var n2=/%[sdj%]/g;i2.format=function(e5){if(!x2(e5)){for(var t4=[],i3=0;i3=a3)return e6;switch(e6){case"%s":return String(r3[i3++]);case"%d":return Number(r3[i3++]);case"%j":try{return JSON.stringify(r3[i3++])}catch{return"[Circular]"}default:return e6}}),l3=r3[i3];i3=3&&(r3.depth=arguments[2]),arguments.length>=4&&(r3.colors=arguments[3]),b2(t4)?r3.showHidden=t4:t4&&i2._extend(r3,t4),k2(r3.showHidden)&&(r3.showHidden=!1),k2(r3.depth)&&(r3.depth=2),k2(r3.colors)&&(r3.colors=!1),k2(r3.customInspect)&&(r3.customInspect=!0),r3.colors&&(r3.stylize=l2),c2(r3,e5,r3.depth)}function l2(e5,t4){var i3=s2.styles[t4];return i3?"\x1B["+s2.colors[i3][0]+"m"+e5+"\x1B["+s2.colors[i3][1]+"m":e5}function u2(e5,t4){return e5}function h2(e5){var t4={};return e5.forEach(function(e6,i3){t4[e6]=!0}),t4}function c2(e5,t4,r3){if(e5.customInspect&&t4&&T2(t4.inspect)&&t4.inspect!==i2.inspect&&(!t4.constructor||t4.constructor.prototype!==t4)){var n3=t4.inspect(r3,e5);return x2(n3)||(n3=c2(e5,n3,r3)),n3}var a3=f2(e5,t4);if(a3)return a3;var o3=Object.keys(t4),s3=h2(o3);if(e5.showHidden&&(o3=Object.getOwnPropertyNames(t4)),M2(t4)&&(o3.indexOf("message")>=0||o3.indexOf("description")>=0))return d(t4);if(o3.length===0){if(T2(t4)){var l3=t4.name?": "+t4.name:"";return e5.stylize("[Function"+l3+"]","special")}if(S2(t4))return e5.stylize(RegExp.prototype.toString.call(t4),"regexp");if(I(t4))return e5.stylize(Date.prototype.toString.call(t4),"date");if(M2(t4))return d(t4)}var u3,b3="",y3=!1,w2=["{","}"];return g(t4)&&(y3=!0,w2=["[","]"]),T2(t4)&&(b3=" [Function"+(t4.name?": "+t4.name:"")+"]"),S2(t4)&&(b3=" "+RegExp.prototype.toString.call(t4)),I(t4)&&(b3=" "+Date.prototype.toUTCString.call(t4)),M2(t4)&&(b3=" "+d(t4)),o3.length!==0||y3&&t4.length!=0?r3<0?S2(t4)?e5.stylize(RegExp.prototype.toString.call(t4),"regexp"):e5.stylize("[Object]","special"):(e5.seen.push(t4),u3=y3?p2(e5,t4,r3,s3,o3):o3.map(function(i3){return m(e5,t4,r3,s3,i3,y3)}),e5.seen.pop(),_2(u3,b3,w2)):w2[0]+b3+w2[1]}function f2(e5,t4){if(k2(t4))return e5.stylize("undefined","undefined");if(x2(t4)){var i3="'"+JSON.stringify(t4).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e5.stylize(i3,"string")}return v2(t4)?e5.stylize(""+t4,"number"):b2(t4)?e5.stylize(""+t4,"boolean"):y2(t4)?e5.stylize("null","null"):void 0}function d(e5){return"["+Error.prototype.toString.call(e5)+"]"}function p2(e5,t4,i3,r3,n3){for(var a3=[],o3=0,s3=t4.length;o3-1&&(s3=a3?s3.split(` diff --git a/plugins/photoshop/dist/photoshop-internal.js b/plugins/photoshop/dist/photoshop-internal.js index e90f5af..1db80c8 100644 --- a/plugins/photoshop/dist/photoshop-internal.js +++ b/plugins/photoshop/dist/photoshop-internal.js @@ -1,6 +1,6 @@ -"use strict";(()=>{var Fi=Object.create;var Kt=Object.defineProperty;var xo=Object.getOwnPropertyDescriptor;var Bi=Object.getOwnPropertyNames;var Vi=Object.getPrototypeOf,qi=Object.prototype.hasOwnProperty;var R=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vr=(e,t)=>{for(var r in t)Kt(e,r,{get:t[r],enumerable:!0})},Qi=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Bi(t))!qi.call(e,n)&&n!==r&&Kt(e,n,{get:()=>t[n],enumerable:!(o=xo(t,n))||o.enumerable});return e};var P=(e,t,r)=>(r=e!=null?Fi(Vi(e)):{},Qi(t||!e||!e.__esModule?Kt(r,"default",{value:e,enumerable:!0}):r,e));var x=(e,t,r,o)=>{for(var n=o>1?void 0:o?xo(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Kt(t,r,n),n};var I=Ye((Va,qo)=>{"use strict";qo.exports=window.React});var $o=Ye((ec,jo)=>{"use strict";var ut=1e3,lt=ut*60,dt=lt*60,tt=dt*24,us=tt*7,ls=tt*365.25;jo.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ds(e);if(r==="number"&&isFinite(e))return t.long?ms(e):fs(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ds(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*ls;case"weeks":case"week":case"w":return r*us;case"days":case"day":case"d":return r*tt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*dt;case"minutes":case"minute":case"mins":case"min":case"m":return r*lt;case"seconds":case"second":case"secs":case"sec":case"s":return r*ut;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function fs(e){var t=Math.abs(e);return t>=tt?Math.round(e/tt)+"d":t>=dt?Math.round(e/dt)+"h":t>=lt?Math.round(e/lt)+"m":t>=ut?Math.round(e/ut)+"s":e+"ms"}function ms(e){var t=Math.abs(e);return t>=tt?nr(e,t,tt,"day"):t>=dt?nr(e,t,dt,"hour"):t>=lt?nr(e,t,lt,"minute"):t>=ut?nr(e,t,ut,"second"):e+" ms"}function nr(e,t,r,o){var n=t>=r*1.5;return Math.round(e/r)+" "+o+(n?"s":"")}});var Xo=Ye((tc,Jo)=>{"use strict";function ps(e){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=n,r.enabled=a,r.humanize=$o(),r.destroy=p,Object.keys(e).forEach(l=>{r[l]=e[l]}),r.names=[],r.skips=[],r.formatters={};function t(l){let d=0;for(let m=0;m{if(ge==="%%")return"%";A++;let k=r.formatters[te];if(typeof k=="function"){let Q=y[A];ge=k.call(b,Q),y.splice(A,1),A--}return ge}),r.formatArgs.call(b,y),(b.log||r.log).apply(b,y)}return g.namespace=l,g.useColors=r.useColors(),g.color=r.selectColor(l),g.extend=o,g.destroy=r.destroy,Object.defineProperty(g,"enabled",{enumerable:!0,configurable:!1,get:()=>m!==null?m:(u!==r.namespaces&&(u=r.namespaces,f=r.enabled(l)),f),set:y=>{m=y}}),typeof r.init=="function"&&r.init(g),g}function o(l,d){let m=r(this.namespace+(typeof d>"u"?":":d)+l);return m.log=this.log,m}function n(l){r.save(l),r.namespaces=l,r.names=[],r.skips=[];let d=(typeof l=="string"?l:"").trim().replace(" ",",").split(",").filter(Boolean);for(let m of d)m[0]==="-"?r.skips.push(m.slice(1)):r.names.push(m)}function i(l,d){let m=0,u=0,f=-1,g=0;for(;m"-"+d)].join(",");return r.enable(""),l}function a(l){for(let d of r.skips)if(i(l,d))return!1;for(let d of r.names)if(i(l,d))return!0;return!1}function c(l){return l instanceof Error?l.stack||l.message:l}function p(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Jo.exports=ps});var sr=Ye((re,ir)=>{"use strict";re.formatArgs=gs;re.save=ys;re.load=ws;re.useColors=hs;re.storage=Ps();re.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();re.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function hs(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function gs(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+ir.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),e.splice(o,0,t)}re.log=console.debug||console.log||(()=>{});function ys(e){try{e?re.storage.setItem("debug",e):re.storage.removeItem("debug")}catch{}}function ws(){let e;try{e=re.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Ps(){try{return localStorage}catch{}}ir.exports=Xo()(re);var{formatters:bs}=ir.exports;bs.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var v=Ye((oc,tn)=>{"use strict";tn.exports=window.ReactJSXRuntime});var cn=Ye((ac,an)=>{"use strict";an.exports=window.socketIO});var xt=Ye((Cc,hn)=>{"use strict";hn.exports=window.Jimp});var ko={};Vr(ko,{Auths:()=>Ni,Promote:()=>Mi,SDPPP:()=>Ti,SDPPPProvider:()=>ni,useAgentState:()=>Ar,useSDPPPComfyCaller:()=>ee,useSDPPPContext:()=>Ne,useSDPPPWebpageList:()=>Er,useSDPPPWorkflowList:()=>ii});var O=R("photoshop");var Ce=R("photoshop"),Ki=R("uxp");var qr={"SDPPP Get Document":"SDPPP Get Document","SDPPP Get Layer By ID":"SDPPP Get Layer","SDPPP Get Linked Layers":"SDPPP Get Linked Layers","SDPPP Get Layers In Group":"SDPPP Get Layers In Group","SDPPP Get Text From Layer":"SDPPP Get Text From Layer","SDPPP Parse Layer Info":"SDPPP Parse Layer Info","SDPPP Get Selection":"SDPPP Get Selection","SDPPP Get Image From Photoshop":"SDPPP Get Image From Photoshop","SDPPP Send Images To Photoshop":"SDPPP Send Images To Photoshop","SDPPP Settings":"SDPPP Settings/Misc"};var Qr={"### Active Document ###":"### \u5F53\u524D\u6587\u6863 ###","### The Canvas ###":"### \u6574\u4E2A\u753B\u5E03 ###","### New Layer ###":"### \u65B0\u56FE\u5C42 ###","### Selected Layer ###":"### \u6240\u9009\u56FE\u5C42 ###","### Keep Size or Fit Canvas ###":"### \u4FDD\u6301\u5C3A\u5BF8\u6216\u9002\u5E94\u753B\u5E03 ###",_SDPPP_PSD_:"_SDPPP_PSD_","Save and run immediately":"\u4FDD\u5B58\u5E76\u7ACB\u5373\u6267\u884C",Close:"\u5173\u95ED","Select a {0}":"\u9009\u62E9\u4E00\u4E2A {0}","How to use .ccx file":"\u5982\u4F55\u4F7F\u7528 .ccx \u6587\u4EF6","1. If you have installed Adobe Creative Cloud":"1. \u5982\u679C\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 Adobe Creative Cloud","Just double click the .ccx file, it will install the plugin automatically":"\u53CC\u51FB .ccx \u6587\u4EF6\uFF0C\u5B83\u4F1A\u81EA\u52A8\u5B89\u88C5","2. If you don't have Adobe Creative Cloud":"2. \u5982\u679C\u4F60\u6CA1\u6709 Adobe Creative Cloud","Rename .ccx to .zip and extract it into ":"\u5C06 .ccx \u91CD\u547D\u540D\u4E3A .zip \u5E76\u89E3\u538B\u5230",or:"\u6216","Photoshop directory":"Photoshop \u5B89\u88C5\u76EE\u5F55","Cannot connect multiple different document widgets with same value":"\u4E0D\u80FD\u8FDE\u63A5\u591A\u4E2A\u5177\u6709\u76F8\u540C\u503C\u7684\u6587\u6863\u5C0F\u90E8\u4EF6","You can only have one SDPPP Settings node in a workflow":"\u4E00\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2A SDPPP Settings \u8282\u70B9","convert widget {0} failed:":"\u63A7\u4EF6{0}\u8F6C\u6362\u5931\u8D25\uFF1A","hidden webview load failed: {0}, please select a browser page to continue":"\u5185\u7F6E webview \u52A0\u8F7D\u5931\u8D25: {0}\uFF0C\u8BF7\u9009\u62E9\u4E00\u4E2A\u6D4F\u89C8\u5668\u9875\u9762\u7EE7\u7EED","SDPPP Get Document":"SDPPP\u83B7\u53D6\u6587\u6863(GetDocument)","SDPPP Get Layer By ID":"SDPPP\u83B7\u53D6\u56FE\u5C42(GetLayer)","SDPPP Get Linked Layers":"SDPPP\u83B7\u53D6\u94FE\u63A5\u56FE\u5C42(GetLinkedLayers)","SDPPP Get Layers In Group":"SDPPP\u83B7\u53D6\u7EC4\u4E2D\u56FE\u5C42(GetLayersInGroup)","SDPPP Get Text From Layer":"SDPPP\u83B7\u53D6\u56FE\u5C42\u6587\u672C(GetTextFromLayer)","SDPPP Parse Layer Info":"SDPPP\u89E3\u6790\u56FE\u5C42\u4FE1\u606F(ParseLayerInfo)","SDPPP Get Selection":"SDPPP\u83B7\u53D6\u9009\u533A(GetSelection)","SDPPP Get Image From Photoshop":"SDPPP\u4ECEPS\u83B7\u53D6\u56FE\u50CF(GetImageFromPhotoshop)","SDPPP Send Images To Photoshop":"SDPPP\u53D1\u9001\u56FE\u50CF\u5230PS(SendImagesToPhotoshop)","SDPPP Send Text To Layer":"SDPPP\u53D1\u9001\u6587\u672C\u5230\u56FE\u5C42(SendTextToLayer)","SDPPP Run Photoshop Action":"SDPPP\u8FD0\u884CPS Action(RunPhotoshopAction)","download PS plugin (.ccx)":"\u4E0B\u8F7D Photoshop \u63D2\u4EF6 (.ccx)","current ComfyUI pageid: {0}":"\u5F53\u524D ComfyUI \u9875\u9762ID: {0}","current A1111 pageid: {0}":"\u5F53\u524D A1111 \u9875\u9762ID: {0}","document linked":"\u6587\u6863\u53C2\u6570\u5DF2\u94FE\u63A5","layer linked":"\u56FE\u5C42\u53C2\u6570\u5DF2\u94FE\u63A5","bound linked":"\u8303\u56F4\u53C2\u6570\u5DF2\u94FE\u63A5",document:"\u6587\u6863",Document:"\u6587\u6863",DOCUMENT:"\u6587\u6863",document_name:"\u6587\u6863\u540D\u5B57id",layer_nameid:"\u56FE\u5C42\u540D\u5B57id",layer_name:"\u56FE\u5C42\u540D\u5B57",layer_info:"\u56FE\u5C42\u4FE1\u606F",bound_top:"\u8303\u56F4\u4E0A\u8FB9\u8DDD",bound_left:"\u8303\u56F4\u5DE6\u8FB9\u8DDD",bound_width:"\u8303\u56F4\u5BBD\u5EA6",bound_height:"\u8303\u56F4\u9AD8\u5EA6",center_x:"\u4E2D\u5FC3\u70B9x",center_y:"\u4E2D\u5FC3\u70B9y",opacity:"\u900F\u660E\u5EA6",layer:"\u56FE\u5C42",layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",Layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",bound:"\u8303\u56F4",bounds:"\u8303\u56F4","bounds [optional]":"\u8303\u56F4[\u53EF\u9009]",boundary:"\u8303\u56F4",Boundary:"\u8303\u56F4",canvas_boundary:"\u753B\u5E03\u8303\u56F4",canvas_bound:"\u753B\u5E03\u8303\u56F4",layer_boundary:"\u56FE\u5C42\u8303\u56F4",layer_bound:"\u56FE\u5C42\u8303\u56F4","Photoshop Disconnected!":"Photoshop \u672A\u8FDE\u63A5\uFF01",rgb_out:"RGB\u8F93\u51FA",alpha_out:"Alpha\u8F93\u51FA",images:"\u56FE\u50CF",text:"\u6587\u672C",ID_mode:"\u7CBE\u786EID\u6A21\u5F0F",name_mode:"\u540D\u5B57\u5339\u914D\u6A21\u5F0F",select:"\u9009\u62E9","document boundary":"\u6587\u6863\u8303\u56F4","layer boundary":"\u56FE\u5C42\u8303\u56F4","selection boundary":"\u9009\u4E2D\u8303\u56F4","save .psd to this workflow":"\u4FDD\u5B58.psd\u5230\u8FD9\u4E2A\u5DE5\u4F5C\u6D41","extract saved .psd to Photoshop":"\u63D0\u53D6\u4FDD\u5B58\u7684.psd\u5230Photoshop","sample .psd":"\u793A\u4F8B.psd",mask:"\u906E\u7F69",name:"\u540D\u79F0",quality:"\u56FE\u50CF\u8D28\u91CF",Runner:"\u8FD0\u884C\u8F7D\u4F53","PS Webview":"PS \u5185\u7F6E\u7F51\u9875","Browser {0}":"\u6D4F\u89C8\u5668\u9875\u9762 {0}",timeout:"\u8D85\u65F6","Loading...":"\u52A0\u8F7D\u4E2D...","--multi-user Not Login!":"--multi-user\u5DF2\u6FC0\u6D3B\uFF0C\u4F46\u672A\u767B\u5F55\uFF01",Logout:"\u767B\u51FA","User: ":"\u7528\u6237: ",connect:"\u8FDE\u63A5",connected:"\u5DF2\u8FDE\u63A5",disconnect:"\u65AD\u5F00",disconnected:"\u5DF2\u65AD\u5F00\u8FDE\u63A5","reconnecting...":"\u91CD\u8FDE\u4E2D...",connecting:"\u8FDE\u63A5\u4E2D",webpages:"\u7F51\u9875\u5217\u8868",workflows:"\u5DE5\u4F5C\u6D41",workflow:"\u5DE5\u4F5C\u6D41","auto run page [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u9875\u9762 {0}..","auto run workflow [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41 {0}..","auto run workflow after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41..",selection_only:"\u4EC5\u9009\u533A","Queue:":"\u961F\u5217:","Set As:":"\u8BBE\u7F6E\u4E3A:","Error {0}... please contact me via Discord/Github":"\u51FA\u73B0\u9519\u8BEF {0}...\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211","Webview initialize failed. Please report to me via Discord/Github with your ComfyURL, Operate System":"Webview \u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211\u5E76\u9644\u4E0A\u4F60\u7684Comfy\u5730\u5740\u3001\u64CD\u4F5C\u7CFB\u7EDF","ComfyUI with --multi-user is only available for sponsors":'\u5E26"--multi-user"\u7684ComfyUI\u4EC5\u5BF9\u8D5E\u52A9\u8005\u5F00\u653E',"Workflow Runner is loading...":"\u8FD0\u884C\u8F7D\u4F53\u5C1A\u5728\u52A0\u8F7D...","(Page ID: {0})Queue: {1}":"(\u9875\u9762ID: {0}) \u961F\u5217\u957F\u5EA6 {1}","no suitable node to control in this workflow":"\u8FD9\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u6CA1\u6709\u80FD\u63A7\u5236\u7684\u8282\u70B9",Save:"\u4FDD\u5B58",Edit:"\u7F16\u8F91","Edit in ComfyUI":"\u5728 ComfyUI \u4E2D\u7F16\u8F91","using browser page [{0}] for workflow running":"\u6B63\u63A5\u7BA1\u7F51\u9875 [{0}] \u8FD0\u884C\u5DE5\u4F5C\u6D41","workflow running by hidden webview":"\u5DE5\u4F5C\u6D41\u5728\u9690\u85CF\u7684webview\u4E2D\u8FD0\u884C","Lock Image":"\u9501\u5B9A\u56FE\u50CF","Unlock Image":"\u89E3\u9501\u56FE\u50CF","search...":"\u641C\u7D22...","disabled when running in browser page":"\u63A5\u7BA1\u7F51\u9875\u65F6\u4E0D\u53EF\u7528","only supported in Photoshop":"\u4EC5\u5728 Photoshop \u4E2D\u652F\u6301",Login:"\u767B\u5F55","Invitation Code":"\u9080\u8BF7\u7801",Username:"\u7528\u6237\u540D",Password:"\u5BC6\u7801","Please input invitation code":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","Please input username":"\u8BF7\u8F93\u5165\u7528\u6237\u540D","Please input password":"\u8BF7\u8F93\u5165\u5BC6\u7801","Open more ComfyUI pages to see more options here":"\u6253\u5F00\u66F4\u591A ComfyUI \u9875\u9762\u4EE5\u67E5\u770B\u66F4\u591A\u9009\u9879","Comfy multi-user: ":"Comfy \u591A\u7528\u6237: ","Not Login":"\u672A\u767B\u5F55","Comfy API-Key: ":"Comfy API-Key: ","Login/Auth":"\u767B\u5F55/\u8BA4\u8BC1","Logged in by email/password":"\u5DF2\u901A\u8FC7\u90AE\u7BB1/\u5BC6\u7801\u767B\u5F55","Set API Key":"\u8BBE\u7F6E API Key","Please input API key (will reload Runner)":"\u8BF7\u8F93\u5165 API Key (\u4F1A\u91CD\u542F\u8FD0\u884C\u8F7D\u4F53)","### Active Workflow ###":"### \u5F53\u524D\u5DE5\u4F5C\u6D41 ###","### Example SDXL ###":"### \u793A\u4F8BSDXL\u5DE5\u4F5C\u6D41 ###","Open ComfyUI in the browser to see more options":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00 ComfyUI \u4EE5\u5F97\u5230\u66F4\u591A\u9009\u9879","502: Maybe the server is not running":"502: \u670D\u52A1\u5668\u53EF\u80FD\u672A\u8FD0\u884C","404: Maybe SDPPP is not installed or failed to run in ComfyUI":"404: \u53EF\u80FD\u5728ComfyUI\u4E2DSDPPP\u672A\u5B89\u88C5\u6216\u8FD0\u884C\u5931\u8D25","{0}. reconnecting...":"{0}. \u91CD\u8FDE\u4E2D...","disconnected to {0} failed {1}":"\u65AD\u5F00\u8FDE\u63A5 {0} \u9519\u8BEF {1}","version mismatch, please reinstall PS plugin":"\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5 PS \u63D2\u4EF6","instance type not recognized":"\u672A\u8BC6\u522B\u7684\u8F6F\u4EF6\u7C7B\u578B","Error: {0}":"\u9519\u8BEF: {0}","Verification Error":"\u9A8C\u8BC1\u9519\u8BEF","document {0} not found":"\u627E\u4E0D\u5230\u6587\u6863: {0}",'only layer kind "TEXT" is supported, invalid layer: {0}':"\u4E0D\u652F\u6301\u975E\u6587\u672C\u56FE\u5C42: {0}","create layer failed":"\u521B\u5EFA\u56FE\u5C42\u5931\u8D25","layer not found {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","no linked layer for {0}":"\u6CA1\u6709\u94FE\u63A5\u56FE\u5C42: {0}","layer {0} is not a group":"\u56FE\u5C42 {0} \u4E0D\u662F\u4E00\u4E2A\u7EC4","no layer in group {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u56FE\u5C42","layer not found: {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","No upload_name":"\u4E0A\u4F20\u63A5\u53E3\u8FD4\u56DE\u4E86\u5931\u8D25","get pixel of {0} failed":"\u83B7\u53D6\u50CF\u7D20\u5931\u8D25: {0}","merge group failed":"\u5408\u5E76\u7EC4\u5931\u8D25","invalid name: {0}":"\u975E\u6CD5\u7684\u540D\u79F0: {0}","get_layer_info: layer_identify required":"get_layer_info: \u9700\u8981 layer_identify","invalid action: {0}":"\u65E0\u6548\u7684\u64CD\u4F5C: {0}","create document failed":"\u521B\u5EFA\u6587\u6863\u5931\u8D25","create document for preview":"\u521B\u5EFA\u9884\u89C8\u6587\u6863","resize document for preview":"\u8C03\u6574\u9884\u89C8\u6587\u6863\u5C3A\u5BF8","no first related layer in {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u7B2C\u4E00\u4E2A\u76F8\u5173\u56FE\u5C42","imageDataError: data length is not multiple of width * height":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: \u6570\u636E\u957F\u5EA6\u4E0D\u662F\u5BBD\u5EA6 * \u9AD8\u5EA6\u7684\u500D\u6570","imageDataError: originComponents must be 1 or 3":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: originComponents \u5FC5\u987B\u662F 1 \u6216 3","unexpected connection lost, please try to reconnect":"\u610F\u5916\u65AD\u5F00\u8FDE\u63A5\uFF0C\u8BF7\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5","Workflow list is empty, please save a workflow by Comfy's lastest UI":"\u5DE5\u4F5C\u6D41\u5217\u8868\u4E3A\u7A7A\uFF0C\u8BF7\u5728Comfy\u7684\u65B0\u7248UI\u4E2D\u4FDD\u5B58\u4E00\u4E2A\u5DE5\u4F5C\u6D41","No opened ComfyUI pages":"\u6CA1\u6709\u5DF2\u6253\u5F00\u7684ComfyUI\u9875\u9762","comfyAPI is not initialized, maybe comfyUI is too old":"\u65E0\u6CD5\u83B7\u53D6 ComfyAPI\uFF0C\u53EF\u80FD ComfyUI \u7248\u672C\u592A\u65E7","unsupported channel counts: {0}":"\u4E0D\u652F\u6301\u7684\u901A\u9053\u6570: {0}","Timeout, Maybe the URL is wrong":"\u8D85\u65F6\uFF0C\u53EF\u80FD comfy\u5730\u5740 \u586B\u5199\u9519\u8BEF","Workflow list loading failed: {0}":"\u5DE5\u4F5C\u6D41\u5217\u8868\u52A0\u8F7D\u5931\u8D25: {0}","Please register a user in ComfyUI":"\u8BF7\u5728 ComfyUI \u4E2D\u6CE8\u518C\u4E00\u4E2A\u7528\u6237","GetSelection need Photoshop version 25+":"GetSelection \u9700\u8981 Photoshop 25+ \u7248\u672C","Action {0} not found":"Action {0} \u672A\u627E\u5230","Action set {0} not found":"ActionSet {0} \u672A\u627E\u5230","{0} cannot be used in Photoshop Action Node":"{0} \u4E0D\u80FD\u5728 Photoshop Action \u8282\u70B9\u4E2D\u4F7F\u7528","Group layers":"\u56FE\u5C42\u7EC4","Show All Groups":"\u663E\u793A\u6240\u6709\u7EC4","create document for sent images":"\u7ED9\u53D1\u9001\u7684\u56FE\u7247\u521B\u5EFA\u6587\u6863","show sent images":"\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","fallback show sent images":"\u53D6\u6D88\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","get content of layer {0}":"\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","fallback get content of layer {0}":"\u53D6\u6D88\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","get layer info":"\u83B7\u53D6\u56FE\u5C42\u4FE1\u606F","sdppp extract PSD":"sdppp \u5BFC\u5165 PSD","sdppp get PSD":"sdppp \u83B7\u53D6 PSD","set text to layer":"\u8BBE\u7F6E\u56FE\u5C42\u7684\u6587\u672C","run Photoshop Action":"sdppp \u8FD0\u884C Photoshop Action","select layer":"sdppp \u9009\u4E2D\u56FE\u5C42","{0} wants to extract a PSD file to Photoshop, are you sure?":"{0} \u60F3\u8981\u91CA\u653E\u4E00\u4E2A.psd\u6587\u4EF6\u5230Photoshop\uFF0C\u786E\u5B9A\u5417\uFF1F","should sdppp refuse extracting PSD to Photoshop in this session anymore?":"\u662F\u5426\u8981\u8BA9 sdppp \u62D2\u7EDD\u672C\u6B21PS\u4F1A\u8BDD\u518D\u6B21\u63A5\u53D7.psd\u91CA\u653E\u8BF7\u6C42\uFF1F","Wide Mode":"\u5BBD\u5C4F\u6A21\u5F0F","Quick Set":"\u5FEB\u901F\u8BBE\u7F6E","Selected Layer":"\u9009\u4E2D\u56FE\u5C42","Selected Layer (invert)":"\u9009\u4E2D\u56FE\u5C42(\u53CD\u5411)",Canvas:"\u753B\u5E03",Selection:"\u9009\u533A",Manual:"\u624B\u52A8\u6A21\u5F0F",Auto:"\u81EA\u52A8\u6A21\u5F0F","This plugin is based on sd-ppp":"\u672C\u63D2\u4EF6\u57FA\u4E8Esd-ppp\u5F00\u53D1","And follows its open source license:":"\u5E76\u9075\u5FAA\u5176\u5F00\u6E90\u534F\u8BAE\uFF1A",Cloud:"\u4E91\u7AEF\u63A8\u8350",Sponsors:"\u8D5E\u52A9","waiting...":"\u865A\u4F4D\u4EE5\u5F85",Links:"\u53CB\u60C5\u94FE\u63A5",Community:"\u793E\u533A","LICENSE:":"\u8BB8\u53EF\u8BC1\uFF1A","Official Site":"\u5B98\u65B9\u7F51\u7AD9",upload:"\u4E0A\u4F20","Simplify Workflow":"\u7B80\u5316\u5DE5\u4F5C\u6D41",Photoshop:"Photoshop","Photoshop plugin settings":"Photoshop \u63D2\u4EF6\u8BBE\u7F6E","Photoshop plugin":"Photoshop \u63D2\u4EF6","SDPPP Settings/Misc":"SDPPP \u8BBE\u7F6E/\u6742\u9879","Sample .PSD for this workflow:":"\u793A\u4F8B.PSD","Download Example .PSD":"\u4E0B\u8F7D\u793A\u4F8B.PSD","Maximum Image Size (px):":"\u6700\u5927\u56FE\u50CF\u5C3A\u5BF8(px)",Download:"\u4E0B\u8F7D",Upload:"\u4E0A\u4F20",Reset:"\u91CD\u7F6E",Refresh:"\u5237\u65B0","Comfy URL (You can copy it to connect ComfyUI in the plugin):":"Comfy\u5730\u5740(\u4F60\u53EF\u4EE5\u590D\u5236\u5B83\u5230\u63D2\u4EF6\u4E2D\u8FDE\u63A5ComfyUI):","use slider for number widget:":"\u6570\u5B57\u63A7\u4EF6\u4F7F\u7528\u6ED1\u5757","Photoshop is not connected":"Photoshop \u672A\u8FDE\u63A5","select...":"\u8BF7\u9009\u62E9","click to edit":"\u70B9\u51FB\u7F16\u8F91","ComfyManager not found, cannot reboot":"Comfy Manager\u672A\u5B89\u88C5\uFF0C\u65E0\u6CD5\u91CD\u542F","Failed to reboot ComfyUI":"\u91CD\u542FComfyUI\u5931\u8D25"};var To=typeof R<"u"?R:void 0,Ht="en";typeof navigator<"u"&&navigator.language?Ht=navigator.language=="zh-CN"?"zhcn":"en":To&&(Ht=To("uxp").host.uiLocale.startsWith("zh")?"zhcn":"en");function h(e,...t){let r=Ht=="zhcn"?Qr[e]:e in qr?qr[e]:e;if(!r)throw new Error(`i18n key not found: ${e}`);return r.replace(/{(\d+)}/g,function(o,n){return typeof t[n]<"u"?t[n]:o})}function je(e,t){return e==t||Qr[e]==t}function $e(){return Ht}var C=class e{static SPECIAL_DOCUMENT_CURRENT="### Active Document ###";static is_SPECIAL_DOCUMENT_CURRENT(t){return je(this.SPECIAL_DOCUMENT_CURRENT,t)}static get_SPECIAL_DOCUMENT_CURRENT(){return h(this.SPECIAL_DOCUMENT_CURRENT)}static SPECIAL_LAYER_KEEP_SIZE="### Keep Size or Fit Canvas ###";static is_SPECIAL_LAYER_FIT(t){return je(this.SPECIAL_LAYER_KEEP_SIZE,t)}static get_SPECIAL_LAYER_FIT(){return h(this.SPECIAL_LAYER_KEEP_SIZE)}static SPECIAL_LAYER_USE_CANVAS="### The Canvas ###";static is_SPECIAL_LAYER_USE_CANVAS(t){return je(this.SPECIAL_LAYER_USE_CANVAS,t)}static get_SPECIAL_LAYER_USE_CANVAS(){return h(this.SPECIAL_LAYER_USE_CANVAS)}static SPECIAL_LAYER_NEW_LAYER="### New Layer ###";static is_SPECIAL_LAYER_NEW_LAYER(t){return je(this.SPECIAL_LAYER_NEW_LAYER,t)}static get_SPECIAL_LAYER_NEW_LAYER(){return h(this.SPECIAL_LAYER_NEW_LAYER)}static SPECIAL_LAYER_SELECTED_LAYER="### Selected Layer ###";static is_SPECIAL_LAYER_SELECTED_LAYER(t){return je(this.SPECIAL_LAYER_SELECTED_LAYER,t)}static get_SPECIAL_LAYER_SELECTED_LAYER(){return h(this.SPECIAL_LAYER_SELECTED_LAYER)}static SPECIAL_LAYER_PREVIEW_DOCUMENT="_SDPPP_PSD_";static is_SPECIAL_LAYER_PREVIEW_DOCUMENT(t){return je(this.SPECIAL_LAYER_PREVIEW_DOCUMENT,t)}static get_SPECIAL_LAYER_PREVIEW_DOCUMENT(){return h(this.SPECIAL_LAYER_PREVIEW_DOCUMENT)}static getSpecialDocumentCurrent(){return h(e.SPECIAL_DOCUMENT_CURRENT)}static getSpecialLayerForGet(){return[h(e.SPECIAL_LAYER_USE_CANVAS),h(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialLayerForSend(){return[h(e.SPECIAL_LAYER_NEW_LAYER),h(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialDocumentForPreview(){return h(e.SPECIAL_LAYER_PREVIEW_DOCUMENT)}static fixI18n(t){return this.is_SPECIAL_DOCUMENT_CURRENT(t)?this.SPECIAL_DOCUMENT_CURRENT:this.is_SPECIAL_LAYER_NEW_LAYER(t)?this.SPECIAL_LAYER_NEW_LAYER:this.is_SPECIAL_LAYER_PREVIEW_DOCUMENT(t)?this.SPECIAL_LAYER_PREVIEW_DOCUMENT:this.is_SPECIAL_LAYER_USE_CANVAS(t)?this.SPECIAL_LAYER_USE_CANVAS:this.is_SPECIAL_LAYER_SELECTED_LAYER(t)?this.SPECIAL_LAYER_SELECTED_LAYER:t}};function ve(e,t,r=0){return"-".repeat(r)+`${t} (id:${e})`}function De(e,t){return`${t} (id:${e})`}function Gi(e){let t=e.split(" (id:");return{name:t[0],id:parseInt(t[1].slice(0,-1))}}function Ro(e){return Gi(e)}function Je(){let e=Ce.app.activeDocument?.activeLayers?.[0];return e?ve(e.id,e.name):C.get_SPECIAL_LAYER_USE_CANVAS()}function No(e,t,r,o,n){let i=r.left,s=r.top,a=r.right,c=r.bottom,p=a-i,l=c-s,d=o.left,m=o.top,u=o.right,f=o.bottom,g=u-d,y=f-m,b=Math.max(i,d),w=Math.max(s,m),S=Math.min(a,u),A=Math.min(c,f),he=S-b,ge=A-w,te=g*y*n;if(t.length!==te)throw new Error(`toImageDataArray.length(${t.length}) !== toLength(${te})`);let k=he*ge*n;if(e.length!==k)throw new Error(`fromImageDataArray.length(${e.length}) !== fromLength(${k})`);for(let Q=0;Q=i&&ze=s&&Qt0?e.activeLayers[0].id:0:C.is_SPECIAL_LAYER_NEW_LAYER(t)?-2:Oo(t)}function Gr(e,t=0,r=""){return e?.layers?e.layers.reduce((o,n)=>{let i=t==0?`/${n.name}`:`${r}/${n.name}`;return o.push({layer:n,path:i,level:t}),o.concat(Gr(n,t+1,i))},[]):[]}function ce(e,t){if(!e.layers)return null;for(let r=0;rt.id==Hi(e)))||null}function Wo(e,t){return{name:t.name,opacity:t.opacity/100,boundary:{left:t.bounds?.left||0,top:t.bounds?.top||0,right:e.width-(t.bounds?.right||0),bottom:e.height-(t.bounds?.bottom||0),width:t.bounds?.width||0,height:t.bounds?.height||0},isGroup:t.kind==Ce.constants.LayerKind.GROUP}}function Mo(){let e=localStorage.getItem("sdppp_uid");return(!e||e.length!=3)&&(e=Ct(3),localStorage.setItem("sdppp_uid",e)),e}function Ct(e){let t="",r="abcdefghijklmnopqrstuvwxyz0123456789",o=r.length,n=0;for(;n{o[i]=r.bind(this,i),n.subscribe(t,o[i])})}unsubscribe(t){this.subscribers=this.subscribers.filter(([o,n])=>n!=t);let r=this.subscribersWithoutKey.get(t);r&&this.storeMap.forEach((o,n)=>{o.unsubscribe(r[n])})}addStore(t,r,o){let n=this.createStore(r,o);this.storeMap.set(t,n),this.subscribers.forEach(([i,s])=>{let a=this.subscribersWithoutKey.get(s);a||(a={},this.subscribersWithoutKey.set(s,a)),a[t]=s.bind(this,t),n.subscribe(i,a[t]),i=="/"&&s(t,r,null)})}removeStore(t){let r=this.storeMap.get(t);r&&(this.subscribers.forEach(([o,n])=>{let i=this.subscribersWithoutKey.get(n);i&&(r.unsubscribe(i[t]),o=="/"&&n(t,null,r.data))}),this.storeMap.delete(t))}sync(t){if(t instanceof Array){let r=Array.from(this.storeMap.keys()),o=t.filter(i=>!r.includes(i)),n=r.filter(i=>!t.includes(i));o.forEach(i=>this.addStore(i,{},0)),n.forEach(i=>this.removeStore(i))}else{Array.from(this.storeMap.keys()).filter(o=>!Object.keys(t).includes(o)).forEach(o=>this.removeStore(o));for(let o in t){let{data:n,version:i}=t[o];this.storeMap.has(o)?this.storeMap.get(o)?.sync(n,i):this.addStore(o,n,i)}}}};var Kr={};Vr(Kr,{JsonPatchError:()=>M,_areEquals:()=>At,applyOperation:()=>Xe,applyPatch:()=>at,applyReducer:()=>Xi,deepClone:()=>$i,getValueByPointer:()=>Ze,validate:()=>Fo,validator:()=>Zt});var Yi=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),ji=Object.prototype.hasOwnProperty;function $t(e,t){return ji.call(e,t)}function Jt(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r=48&&o<=57){t++;continue}return!1}return!0}function Se(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function It(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function jt(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t0&&c[l-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&m===void 0&&(p[u]===void 0?m=c.slice(0,l).join("/"):l==d-1&&(m=t.path),m!==void 0&&f(t,0,e,m)),l++,Array.isArray(p)){if(u==="-")u=p.length;else{if(r&&!Xt(u))throw new M("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",i,t,e);Xt(u)&&(u=~~u)}if(l>=d){if(r&&t.op==="add"&&u>p.length)throw new M("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);var s=Ji[t.op].call(t,p,u,e);if(s.test===!1)throw new M("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return s}}else if(l>=d){var s=st[t.op].call(t,p,u,e);if(s.test===!1)throw new M("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return s}if(p=p[u],r&&l0)throw new M('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new M("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new M("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&jt(e.value))throw new M("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r){if(e.op=="add"){var n=e.path.split("/").length,i=o.split("/").length;if(n!==i+1&&n!==i)throw new M("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==o)throw new M("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},a=Fo([s],r);if(a&&a.name==="OPERATION_PATH_UNRESOLVABLE")throw new M("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new M("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function Fo(e,t,r){try{if(!Array.isArray(e))throw new M("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)at(W(t),W(e),r||!0);else{r=r||Zt;for(var o=0;oer,generate:()=>Hr,observe:()=>is,unobserve:()=>ns});var zr=new WeakMap,Zi=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),es=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function ts(e){return zr.get(e)}function rs(e,t){return e.observers.get(t)}function os(e,t){e.observers.delete(t.callback)}function ns(e,t){t.unobserve()}function is(e,t){var r=[],o,n=ts(e);if(!n)n=new Zi(e),zr.set(e,n);else{var i=rs(n,t);o=i&&i.observer}if(o)return o;if(o={},n.value=W(e),t){o.callback=t,o.next=null;var s=function(){Hr(o)},a=function(){clearTimeout(o.next),o.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return o.patches=r,o.object=e,o.unobserve=function(){Hr(o),clearTimeout(o.next),os(n,o),typeof window<"u"&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},n.observers.set(t,new es(t,o)),o}function Hr(e,t){t===void 0&&(t=!1);var r=zr.get(e.object);Yr(r.value,e.object,e.patches,"",t),e.patches.length&&at(r.value,e.patches);var o=e.patches;return o.length>0&&(e.patches=[],e.callback&&e.callback(o)),o}function Yr(e,t,r,o,n){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var i=Jt(t),s=Jt(e),a=!1,c=!1,p=s.length-1;p>=0;p--){var l=s[p],d=e[l];if($t(t,l)&&!(t[l]===void 0&&d!==void 0&&Array.isArray(t)===!1)){var m=t[l];typeof d=="object"&&d!=null&&typeof m=="object"&&m!=null&&Array.isArray(d)===Array.isArray(m)?Yr(d,m,r,o+"/"+Se(l),n):d!==m&&(a=!0,n&&r.push({op:"test",path:o+"/"+Se(l),value:W(d)}),r.push({op:"replace",path:o+"/"+Se(l),value:W(m)}))}else Array.isArray(e)===Array.isArray(t)?(n&&r.push({op:"test",path:o+"/"+Se(l),value:W(d)}),r.push({op:"remove",path:o+"/"+Se(l)}),c=!0):(n&&r.push({op:"test",path:o,value:e}),r.push({op:"replace",path:o,value:t}),a=!0)}if(!(!c&&i.length==s.length))for(var p=0;po!=t)}dispatch(t,r){let o=new Map;t.forEach(n=>{this.subscribers.forEach(([i,s])=>{n.path.startsWith(i)&&!o.has(i)&&o.set(i,JSON.stringify(i==="/"?r:Ze(r,i)))})}),o.forEach((n,i)=>{let s=i==="/"?this._data:Ze(this._data,i);n!==JSON.stringify(s)&&this.subscribers.filter(([a,c])=>a===i).forEach(([a,c])=>{let p={};try{p=c(s,JSON.parse(n||{}))}catch(l){console.error(l.stack||l.message||l)}p instanceof Promise&&p.catch(l=>{console.error(l.stack||l.message||l)})})})}};function T(e,t,r){return e.constructor[tr]||(e.constructor[tr]=[]),e.constructor[tr].push(t),{value:function(...o){let n=W(this._data);r.value.apply(this,o);let i=er(n,this._data);i.length!=0&&(this._mutationRecords.push(...i),this._version+=i.length,this.dispatch(i,n))}}}var et=class extends $r{constructor(t){super(Object.assign({sid:"",ssid:""},t||{}))}setSID(t){this._data.sid=t,this._data.ssid=t.slice(0,4)}};x([T],et.prototype,"setSID",1);var ye=class extends et{constructor(t,r){super(t||{uname:"",comfyUserToken:"",isLocal:!1,activeDocumentID:0,documents:{},canvasStateID:0,selectionStateID:"",historyStateID:0}),this._version=r||0}setIsLocal(t){this._data.isLocal=t}setUName(t){this._data.uname="PS_"+t}setDocument(t,r){this._data.activeDocumentID=t,this._data.documents=r}setCanvasStateID(t){this._data.canvasStateID=t}setSelectionStateID(t){this._data.selectionStateID=t}setHistoryStateID(t){this._data.historyStateID=t}setComfyUserToken(t){this._data.comfyUserToken=t}};x([T],ye.prototype,"setIsLocal",1),x([T],ye.prototype,"setUName",1),x([T],ye.prototype,"setDocument",1),x([T],ye.prototype,"setCanvasStateID",1),x([T],ye.prototype,"setSelectionStateID",1),x([T],ye.prototype,"setHistoryStateID",1),x([T],ye.prototype,"setComfyUserToken",1);var G=class extends et{constructor(t,r){super(t||{title:"",webviewFromSid:location.search.match(/webview_fromsid=([^&]+)/)?.[1]||"",progress:0,lastError:"",queueSize:0,executingNodeTitle:"",widgetTableStructure:{widgetTablePath:"",widgetTablePersisted:!1,widgetTableID:"",nodes:{},groups:{},nodeIndexes:[],extraOptions:{}},widgetTableValue:{},widgetTableErrors:{},useSliderForNumberWidget:!1,hasPSDNodes:!1,comfyUserToken:"",comfyOrgLoggedIn:!1,comfyOrgAPIKey:""}),this._version=r||0}setWebviewFromSid(t){this._data.webviewFromSid=t}setTitle(t){this._data.title=t}setProgress(t){this._data.progress=t}setLastError(t){this._data.lastError=t}setQueueSize(t){this._data.queueSize=t}setExecutingNodeTitle(t){this._data.executingNodeTitle=t}setWidgetTableStructure(t){this._data.widgetTableStructure=JSON.parse(JSON.stringify(t))}setWidgetTableValue(t){this._data.widgetTableValue=JSON.parse(JSON.stringify(t))}setWidgetTableErrors(t){this._data.widgetTableErrors=JSON.parse(JSON.stringify(t))}setHasPSDNodes(t){this._data.hasPSDNodes=t}setComfyUserToken(t){this._data.comfyUserToken=t}setComfyOrgLoggedIn(t){this._data.comfyOrgLoggedIn=t}setComfyOrgAPIKey(t){this._data.comfyOrgAPIKey=t}setUseSliderForNumberWidget(t){this._data.useSliderForNumberWidget=t}};x([T],G.prototype,"setWebviewFromSid",1),x([T],G.prototype,"setTitle",1),x([T],G.prototype,"setProgress",1),x([T],G.prototype,"setLastError",1),x([T],G.prototype,"setQueueSize",1),x([T],G.prototype,"setExecutingNodeTitle",1),x([T],G.prototype,"setWidgetTableStructure",1),x([T],G.prototype,"setWidgetTableValue",1),x([T],G.prototype,"setWidgetTableErrors",1),x([T],G.prototype,"setHasPSDNodes",1),x([T],G.prototype,"setComfyUserToken",1),x([T],G.prototype,"setComfyOrgLoggedIn",1),x([T],G.prototype,"setComfyOrgAPIKey",1),x([T],G.prototype,"setUseSliderForNumberWidget",1);var Jr=class extends Yt{createStore(t,r){return new G(t,r)}},N=new Jr,D=new ye;var Bo=e=>{let t,r=new Set,o=(p,l)=>{let d=typeof p=="function"?p(t):p;if(!Object.is(d,t)){let m=t;t=l??(typeof d!="object"||d===null)?d:Object.assign({},t,d),r.forEach(u=>u(t,m))}},n=()=>t,a={setState:o,getState:n,getInitialState:()=>c,subscribe:p=>(r.add(p),()=>r.delete(p))},c=t=e(o,n,a);return a},Vo=e=>e?Bo(e):Bo;var Xr=P(I(),1);var ss=e=>e;function as(e,t=ss){let r=Xr.default.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return Xr.default.useDebugValue(r),r}var Qo=e=>{let t=Vo(e),r=o=>as(t,o);return Object.assign(r,t),r},Go=e=>e?Qo(e):Qo;var Ie=R("photoshop");var K=Go((e,t)=>({canvasDirtyID:0,selectionDirtyID:0,layerDirtyIDs:new Map,documentCache:{},incrementCanvasDirtyID:()=>{e(r=>({canvasDirtyID:r.canvasDirtyID+1})),Zr()},incrementLayerDirtyID:r=>{e(o=>{let n=o.layerDirtyIDs.get(r)||0,i=new Map(o.layerDirtyIDs);return i.set(r,n+1),{layerDirtyIDs:i}}),Zr()},incrementSelectionDirtyID:()=>{e(r=>({selectionDirtyID:r.selectionDirtyID+1})),Zr()},setDocuments:r=>{e({documentCache:r}),Ie.app.activeDocument&&D.setDocument(Ie.app.activeDocument.id,JSON.parse(JSON.stringify(r)))},clearCanvasDirtyID:()=>{e({canvasDirtyID:0})},clearLayerDirtyIDs:()=>{e({layerDirtyIDs:new Map})},clearSelectionDirtyID:()=>{e({selectionDirtyID:0})}}));function Zr(){if(!Ie.app.activeDocument)return;let e=K.getState().documentCache[Ie.app.activeDocument.id];if(e){let t={...e,dirtyID:K.getState().canvasDirtyID,layers:e.layers.map(r=>{let o=K.getState().layerDirtyIDs.get(r.id);return o!==void 0?{...r,dirtyID:o}:r})};K.setState(r=>({documentCache:{...r.documentCache,[Ie.app.activeDocument.id]:t}})),D.setDocument(Ie.app.activeDocument.id,K.getState().documentCache)}}function ct(){try{if(!Ie.app.activeDocument)return;let e=Ie.app.documents.reduce((t,r)=>{let o=Gr(r).map(n=>{let i=n.layer.id;return{level:n.level,id:i,name:n.layer.name,identify:ve(i,n.layer.name,n.level),fullPath:n.path,dirtyID:K.getState().layerDirtyIDs.get(i)||0}});return t[r.id]={name:r.name,id:r.id,identify:De(r.id,r.name),layers:o,canvasDirtyID:K.getState().canvasDirtyID,selectionDirtyID:K.getState().selectionDirtyID},t},{});K.getState().setDocuments(e)}catch(e){console.error(e)}}function rr(){K.getState().incrementCanvasDirtyID()}function xe(e){Array.isArray(e)?e.forEach(t=>{K.getState().incrementLayerDirtyID(t)}):K.getState().incrementLayerDirtyID(e)}function Ko(){K.getState().clearCanvasDirtyID(),K.getState().clearLayerDirtyIDs(),ct()}function eo(){K.getState().incrementSelectionDirtyID()}(async()=>{D.setUName(Mo()),ct()})().catch(console.error);O.action.addNotificationListener(["historyStateChanged"],e=>{cs(),(e.commandID==5004||e.commandID==5002)&&(_t(),xe(O.app.activeDocument?.activeLayers.map(t=>t.id)))});O.action.addNotificationListener(["toolModalStateChanged"],(e,t,...r)=>{t.state._value=="exit"&&t.kind._value=="paint"&&(_t(),xe(O.app.activeDocument?.activeLayers.map(o=>o.id)))});O.action.addNotificationListener(["modalStateChanged"],(e,t)=>{t.state._value=="exit"&&(_t(),xe(O.app.activeDocument?.activeLayers.map(r=>r.id)))});O.action.addNotificationListener(["show","hide","transform","fill","crop"],()=>{_t(),xe(O.app.activeDocument?.activeLayers.map(e=>e.id))});O.action.addNotificationListener(["delete","move","copyToLayer"],()=>{ct(),_t(),xe(O.app.activeDocument?.activeLayers.map(e=>e.id))});O.action.addNotificationListener(["newDocument","open","close","make","modalJavaScriptScopeExit"],()=>ct());function _t(){let e=O.app.activeDocument?.historyStates;e&&D.setCanvasStateID(e[e.length-1].id),rr()}function cs(){let e=O.app.activeDocument?.historyStates;e&&D.setHistoryStateID(e[e.length-1].id)}function Ho(){D.setSelectionStateID(zo+"_"+Lt+"_"+or)}var Lt=O.app.activeDocument?.id,or=O.app.activeDocument?.activeLayers.map(e=>e.id).join(","),zo=0;O.action.addNotificationListener(["set"],(e,t)=>{t._target[0]._property=="selection"&&(zo++,Ho(),eo())});function Yo(){let e=O.app.activeDocument?.activeLayers.map(t=>t.id).join(",");Lt!=O.app.activeDocument?.id&&Ko(),Lt!=O.app.activeDocument?.id||or!=e?(Lt=O.app.activeDocument?.id,or=e,Ho(),eo()):(Lt=O.app.activeDocument?.id,or=e),requestAnimationFrame(Yo)}requestAnimationFrame(Yo);setInterval(()=>ct(),5e3);globalThis.sdpppX=globalThis.sdpppX||{};var Ee=globalThis.sdpppX;var Zo=P(sr(),1),en=[];Ee.getLogs=()=>en;localStorage.setItem("debug","sdppp:*");Zo.debug.log=(...e)=>{en.push(e.join(" "))};var wt=P(I(),1);var U=P(I(),1);var _=P(I(),1);var sn=P(v(),1),on=(0,_.createContext)(null);function nn({children:e}){let t=vs();return(0,_.useEffect)(()=>{window.addEventListener("message",o=>{o.data.action==="webview-connect"&&o.source?.postMessage({action:"webview-connect",payload:{webviewFromSid:D.data.sid}})});let r="";N.subscribe("/",(o,n,i)=>{n?.webviewFromSid==D.data.sid&&(t.setWebviewAgentSID(n?.sid),r||(r=n?.sid)),!n&&i.webviewFromSid==D.data.sid&&t.setWebviewAgentSID(r)})},[]),(0,sn.jsx)(on.Provider,{value:{webviewAgentSID:t.webviewAgentSID,prevWebviewAgentSID:t.prevWebviewAgentSID,setWebviewAgentSID:t.setWebviewAgentSID,toggleWebviewDialog:t.toggleWebviewDialog,setSrc:t.setSrc,resetWebview:t.resetWebview,timeoutError:t.timeoutError,loadError:t.loadError},children:e})}function ue(){let e=(0,_.useContext)(on);if(!e)throw new Error("useSDPPPWebview must be used within a SDPPPWebviewProvider");return e}function vs(){let[e,t]=(0,_.useState)(null),[r,o]=(0,_.useState)(null),[n,i]=(0,_.useState)(null),[s,a]=(0,_.useState)(!1),[c,p]=(0,_.useState)(""),[l,d]=(0,_.useState)(""),[m,u]=(0,_.useState)(""),[f,g]=(0,_.useState)(!1),[y,b]=(0,_.useState)(!1),w=(0,_.useRef)(null),[S,A]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let Q=()=>{a(!1),d(m),te()};return n?.addEventListener("close",Q),()=>{n?.removeEventListener("close",Q)}},[n,m,d,a]),(0,_.useEffect)(()=>{u(l)},[l]),(0,_.useEffect)(()=>{Ss(i,o);let Q=rn();return t(Q),w.current&&clearTimeout(w.current),g(!1),b(!1),w.current=setTimeout(()=>{g(!0)},5e3),Q.addEventListener("loadstop",()=>{b(!0)}),Q.addEventListener("loaderror",()=>{A(!0)}),()=>{w.current&&clearTimeout(w.current),n?.parentElement?.removeChild(n)}},[]);let[he,ge]=(0,_.useState)("");(0,_.useEffect)(()=>{c&&(ge(c),he===c?te():(e?.setAttribute("src",c),r?.setAttribute("src",c)))},[c]);let te=(0,_.useCallback)(()=>{e?.parentElement?.removeChild(e),a(!1),n?.close();let Q=rn();t(Q);let ze=c;p(""),ge(""),setTimeout(()=>{p(ze)},300)},[e,c]),k=(0,_.useCallback)(()=>{s?(n?.close(),a(!1)):(n?.show(),a(!0))},[n,s]);return{dialogShowing:s,toggleWebviewDialog:k,setSrc:p,webviewAgentSID:l,setWebviewAgentSID:d,prevWebviewAgentSID:m,setPrevWebviewAgentSID:u,resetWebview:te,anyWebviewLoaded:y,timeoutError:(0,_.useMemo)(()=>f&&!y,[f,y]),loadError:S}}function Ss(e,t){let r=document.createElement("dialog");r.className="sdppp-webview",r.style.padding="0",r.style.margin="0",r.style.width="1024px",r.style.height="768px",document.body.appendChild(r),e(r);let o=document.createElement("webview");return o.style.position="relative",o.style.width="1024px",o.style.height="768px",r.appendChild(o),t(o),r}var Ae=null;function rn(){Ae||(Ae=document.createElement("div"),Ae.style.position="absolute",Ae.style.width="100px",Ae.style.height="100px",Ae.style.right="0",Ae.style.bottom="-10000px",document.body.appendChild(Ae));let e=document.createElement("webview");return e.style.width="100px",e.style.height="100px",Ae?.appendChild(e),e}var dn=P(cn(),1);var un=`504 -`;var ln=un.trim();var to=class{socket;constructor(t){let r="/"+[t.split("/").slice(3).filter(o=>o).join("/"),"sd-ppp/"].filter(o=>o).join("/");t=t.split("/").slice(0,3).join("/"),this.socket=(0,dn.io)(t,{transports:["websocket"],path:r,query:{api_level:ln},rejectUnauthorized:!1,autoConnect:!1}),this.socket.on("connect",()=>{this.socket.io.engine.binaryType="blob"})}get id(){return this.socket.id}connect(){this.socket.connect()}close(){this.socket.close()}};function fn(...e){return e.reduce((t,r)=>r(t),to)}var ar=class{flushing=Promise.resolve();newFlushPending=!1;constructor(t){this.doFlush=t,this.pause()}doFlush;runFlush(){this.newFlushPending||(this.newFlushPending=!0,this.flushing=this.flushing.then(async()=>{await new Promise(t=>requestAnimationFrame(t)),this.newFlushPending=!1,await this.doFlush()}))}pause(){this.flushing=this.flushing.then(t=>new Promise(r=>{this.resume=r})).then(()=>{this.resume=()=>{}})}resume=()=>{}};function mn(e,t){return function(r){return class extends r{constructor(o){super(o),this.socket.on("store_request",(i,s)=>{s({data:e.data,version:e.version})});let n=new ar(async()=>{let{operations:i,fromVersion:s,toVersion:a}=e.flush();await new Promise(c=>{let p=!1;setTimeout(()=>{p||(console.warn("flush timeout"),c())},5e3),this.socket.emit("store_flush",{operations:i,fromVersion:s},l=>{p=!0,c(),l?.error?console.error("flush error",l.error):e.flushDone(a)})})});e.subscribe("/",()=>{n.runFlush()}),this.socket.on("disconnect",()=>{n.pause()}),this.socket.on("connect",()=>{e.setSID(this.socket.id||""),requestAnimationFrame(()=>{this.socket.emit("sdppp_init",{type:t,data:e.data,version:e.version})})}),this.socket.on("sdppp_inited",i=>{n.resume()})}}}}function pn(e,t){return function(r){return class extends r{constructor(o){super(o),this.socket.on("store_flush",n=>{if(n.type!==t)return;let i=e.getStore(n.sid);if(i)i.patchVersionAcceptable(n.fromVersion)?i.patchData(n.operations):(console.warn("patch version not acceptable from",n.fromVersion,"current version is",i.version),this.socket.emit("store_request",{type:t},s=>{e.sync(s)}));else return this.socket.emit("store_request",{sid:n.sid},s=>{e.addStore(s.sid,s.data,s.version)})}),this.socket.on("store_remove",n=>{e.removeStore(n.sid)}),this.socket.on("sdppp_inited",n=>{this.socket.emit("store_request",{type:t},i=>{e.sync(i)})})}}}}async function ro(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=r.selection,n=o&&o.bounds?{left:o.bounds.left,top:o.bounds.top,right:r.width-o.bounds.right,bottom:r.height-o.bounds.bottom,width:o.bounds.width,height:o.bounds.height}:null,i={left:0,top:0,right:0,bottom:0,width:r.width,height:r.height};return{document_boundary:i,selection_boundary:n||i}}var Tt=R("photoshop");var Le=R("photoshop"),oo=class{promise;restore;constructor(){this.restore=()=>{},this.promise=new Promise(t=>{this.restore=t})}add(t){this.promise.then(t)}};Le.core.setExecutionMode({enableErrorStacktraces:!0});var kt=Promise.resolve();async function B(e,t){let r=t.dontRecoverSelection||!1,o=new oo,n=!1,i=[],s=[],a=t.commandName;r||(Le.app.activeDocument.activeLayers.forEach(d=>i.push(d)),t.document&&Le.app.activeDocument.id!=t.document.id&&t.document.activeLayers.forEach(d=>i.push(d)),s=i.map(d=>d.visible),o.add(()=>{i.forEach(d=>{d.selected||(d.selected=!0,n=!0)}),t.document==Le.app.activeDocument&&i.forEach((d,m)=>{d.visible=s[m]})}));let c=null;kt=kt.catch(d=>d).then(()=>new Promise(d=>{m();function m(){Le.core.isModal()?requestAnimationFrame(m):d()}})).then(()=>Le.core.executeAsModal(async function(d,...m){c=t.document?await d.hostControl.suspendHistory({documentID:t.document.id,name:a}):null,o.add(async()=>{await new Promise(requestAnimationFrame),n||c&&d.hostControl.resumeHistory(c)});try{let u=await e(o,d,...m);return o.restore(!0),u}catch(u){throw o.restore(!1),u}},{commandName:a,interactive:!0}));let p=null,l=null;try{await kt}catch(d){l=d}if(n&&(kt=Le.core.executeAsModal(async d=>{i.forEach((m,u)=>{m.visible=s[u]}),c&&d.hostControl.resumeHistory(c)},{commandName:a,interactive:!0}),await kt),l)throw l;return p}var ft=P(xt(),1),gn=P(sr(),1),Cs=(0,gn.default)("sdppp:getImage");function Is(e,t){for(let r=0,o=e.length/4;r{i.dispose()}),{dataFromAPI:s,width:i.width,height:i.height}}async function Ls(e,t,r){if(!t)return null;let o={documentID:e.id,sourceBounds:r,layerID:t.id},n=null;try{n=await Tt.imaging.getLayerMask(o)}catch(a){return console.warn(a),null}let i=n.imageData;if(!i)return null;let s=await i.getData({});return Promise.resolve().then(()=>{i.dispose()}),{dataFromAPI:s,width:i.width,height:i.height}}async function yn(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=e.layer_identify,n=X(r,o);if(Cs("getJimpImage",o),e.boundary&&e.boundary.right+e.boundary.left+e.boundary.bottom+e.boundary.top+e.boundary.width+e.boundary.height!=r.width+r.height)throw new Error("The boundary is not for this document");let i=e.boundary?{left:e.boundary.left,top:e.boundary.top,right:r.width-e.boundary.right,bottom:r.height-e.boundary.bottom,width:e.boundary.width,height:e.boundary.height}:{left:0,top:0,right:r.width,bottom:r.height,width:r.width,height:r.height},s={pixelData:null,width:0,height:0},a=null,c,p,l={left:0,top:0,right:r.width,bottom:r.height},d=!1;if(await B(async f=>{let[g,y]=await zt(r,n);y&&(a=g),a!=null&&f.add(()=>{a.delete()}),[c,p]=await Promise.all([As(r,g,i),Ls(r,g,i)]),l=g?.bounds??l,d=!1,g?d=g.transparentPixelsLocked:C.is_SPECIAL_LAYER_USE_CANVAS(o)&&(d=r.layers.every(b=>b.transparentPixelsLocked))},{commandName:h("get content of layer {0}",o),document:r}),!c)throw new Error(h("get pixel of {0} failed",o));c=cr(c),d&&(c=Es(c)),s.pixelData=ur(c,l,i);let m=null;return p&&(p=cr(p),m=ur(p,l,i,1)),s.pixelData=Is(s.pixelData,m),s.width=i.width,s.height=i.height,new ft.Jimp({data:Buffer.from(s.pixelData),width:i.width,height:i.height})}async function wn(e){let t=await yn(e),r=t.bitmap.width,o=t.bitmap.height,n=new Uint8Array(r*o);for(let a=0;a{let i=null,s=e.layer_identify,a=!1;if(e.layer_identify){s=e.layer_identify;let c=X(r,s);if(C.is_SPECIAL_LAYER_USE_CANVAS(s))return o={name:"",opacity:1,boundary:{left:0,right:0,top:0,bottom:0,width:r.width,height:r.height},isGroup:!0,identify:s},o;[i,a]=await zt(r,c),n.add(()=>{i&&a&&i.delete()})}if(!i)throw new Error(h("layer not found: {0}",e.layer_identify));o=Object.assign({isGroup:a,identify:s||""},Wo(r,i))},{commandName:h("get layer info"),document:r}),o}var dr=R("photoshop");async function no(e,t,r){let o=e.select||"all",n=e.document_identify,i=F(n);if(!i)throw new Error(h("document {0} not found",n));let s=e.layer_identifies,a=await Promise.all(s.map(async p=>{let l=X(i,p);if(C.is_SPECIAL_LAYER_USE_CANVAS(p))throw new Error(h("layer not found: {0}",p));let d=ce(i,l);if(!d)throw new Error(h("layer not found {0}",p));r(d);let m=t(d);if(o==="first"&&m.length===0)throw new Error(h("no first related layer in {0}",p));let u=m.filter((f,g)=>o==="first"?g===0:o==="text"?f.kind===dr.constants.LayerKind.TEXT:o==="image"?f.kind===dr.constants.LayerKind.NORMAL:!0).map(f=>ve(f.id,f.name));return{layer_identifies:u,layer_infos:await Promise.all(u.map(f=>Rt({document_identify:n,layer_identify:f})))}})),c={layer_identifies:[],layer_boundaries:[],layer_infos:[]};return a.forEach(({layer_identifies:p,layer_infos:l})=>{c.layer_identifies.push(...p),c.layer_boundaries.push(...l.map(d=>d.boundary)),c.layer_infos.push(...l)}),c}async function io(e){return no(e,t=>t.layers||[],t=>{if(t.kind!=dr.constants.LayerKind.GROUP)throw new Error(h("layer {0} is not a group",t.name));if(!t.layers)throw new Error(h("layer {0} is not a group",t.name))})}async function so(e){return no(e,t=>t.linkedLayers||[],t=>{if(!t.linkedLayers)throw new Error(h("no linked layer for {0}",t.name))})}var Pn=R("photoshop"),bn=R("uxp");async function _s(e,t){let r={documentID:e.id,sourceBounds:t},n=(await Pn.imaging.getSelection(r)).imageData,i=await n.getData({});return Promise.resolve().then(()=>{n.dispose()}),{dataFromAPI:i,width:n.width,height:n.height}}async function Nt(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=parseInt(bn.host.version.split(".")[0]);if(!isNaN(o)&&o<25)throw new Error(h("GetSelection need Photoshop version 25+"));let n=e.boundary?{left:e.boundary.left,top:e.boundary.top,right:r.width-e.boundary.right,bottom:r.height-e.boundary.bottom,width:e.boundary.width,height:e.boundary.height}:{left:0,top:0,right:r.width,bottom:r.height,width:r.width,height:r.height};if(!r.selection?.bounds){let s=new Uint8Array(n.width*n.height);return s.fill(255),{blob:s,width:n.width,height:n.height}}let i=null;return await B(async s=>{let a=await _s(r,n);a=cr(a);let c=r.selection.bounds||{left:0,top:0,right:r.width,bottom:r.height};i=a&&ur(a,c,n,1)},{document:r,commandName:"SDPPP getSelection"}),{blob:i,width:n.width,height:n.height}}var le=R("photoshop");async function ao(e){let{identifier:t}=e;if(C.is_SPECIAL_DOCUMENT_CURRENT(t)){if(!le.app.activeDocument){if(e.width&&e.height){let r=await ks(e.width,e.height);if(r)return{value:De(r.id,r.name)}}throw new Error(h("document {0} not found",t))}return{value:De(le.app.activeDocument.id,le.app.activeDocument.name)}}else if(C.is_SPECIAL_LAYER_SELECTED_LAYER(t)){if(!le.app.activeDocument)return{error:h("document {0} not found","current")};let r=le.app.activeDocument.activeLayers[0];return r?{value:ve(r.id,r.name)}:{error:h("layer not found {0}",t)}}}async function ks(e,t){if(le.app.activeDocument)return le.app.activeDocument;let r=null;return await B(async()=>{r=await le.app.createDocument({width:e,height:t,resolution:72,mode:le.constants.NewDocumentMode.RGB,fill:le.constants.DocumentFill.TRANSPARENT})},{document:null,commandName:h("create document for sent images")}),r}var vn=R("photoshop");async function co(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=e.layer_identify,n=X(r,o),i={text:""},s=ce(r,n);if(!s||s.kind!=vn.constants.LayerKind.TEXT)throw new Error(h('only layer kind "TEXT" is supported, invalid layer: {0}',o));return i.text=s.textItem.contents,{text:i.text}}var oe=R("photoshop"),mt=R("uxp");var fr=0,Sn=0,xs=5e3;async function uo(e){let t=e.document_identify,r=t?F(t):null;if(e.action==="get"){let o;return await B(async function(n){if(r||(r=await Ts()),!r)throw new Error(h("create document failed"));r=await r.duplicate(),n.add(async()=>{r?.close()});let s=await(await mt.storage.localFileSystem.getTemporaryFolder()).createEntry("sdppp.psd",{overwrite:!0});await r.saveAs.psd(s,{maximizeCompatibility:!1,typename:"PhotoshopSaveOptions"}),o=await s.read({format:mt.storage.formats.binary})},{commandName:h("sdppp get PSD"),document:r}),o?{data:o}:{error:"save Document failed"}}else if(e.action==="extract"){if(Date.now()-Sn2||!confirm(h("{0} wants to extract a PSD file to Photoshop, are you sure?",e.fromSSID))){fr++,fr==3&&(confirm(h("should sdppp refuse extracting PSD to Photoshop in this session anymore?"))||fr--);return}Sn=Date.now();let o=e.data;await B(async function(){if(r||(r=await oe.app.createDocument({width:512,height:512,resolution:72,mode:oe.constants.NewDocumentMode.RGB,fill:oe.constants.DocumentFill.TRANSPARENT})),!r)throw new Error(h("document {0} not found",t));oe.app.activeDocument=r,r.selection?.deselect();let n=await o.arrayBuffer(),s=await(await mt.storage.localFileSystem.getTemporaryFolder()).createEntry("sdppp.psd",{overwrite:!0});await s.write(n,{format:mt.storage.formats.binary});let a=mt.storage.localFileSystem.createSessionToken(s),c=await r.createLayer(oe.constants.LayerKind.NORMAL,{name:"sdppp"});if(!c)throw new Error(h("create layer failed"));c.move(r.layers[0],oe.constants.ElementPlacement.PLACEBEFORE),await oe.action.batchPlay([{_obj:"placeEvent",null:{_kind:"local",_path:a},freeTransformCenterState:{_enum:"quadCenterState",_value:"QCSAverage"},offset:{_obj:"offset",horizontal:{_unit:"pixelsUnit",_value:0},vertical:{_unit:"pixelsUnit",_value:0}}},{_obj:"placedLayerConvertToLayers"},{_obj:"ungroupLayersEvent",_target:[{_enum:"ordinal",_ref:"layer"}]}],{synchronousExecution:!0})},{commandName:h("sdppp extract PSD"),document:r,dontRecoverSelection:!0})}else throw new Error(h("invalid action: {0}",e.action))}async function Ts(){return await oe.app.createDocument({width:512,height:512,resolution:72,mode:oe.constants.NewDocumentMode.RGB,fill:oe.constants.DocumentFill.TRANSPARENT})}var mr=R("photoshop");async function lo(e){let{action_set:t,action:r}=e,{document_identify:o,layer_identify:n}=e,i=mr.app.actionTree.find(d=>d.name===t);if(!i)throw new Error(h("Action set {0} not found",t));let s=i.actions.find(d=>d.name===r);if(!s)throw new Error(h("Action {0} not found",r));let a=F(o);if(!a)throw new Error(h("document {0} not found",o));let c=a,p=X(c,e.layer_identify),l=ce(c,p);return l&&await B(async()=>{c.activeLayers.forEach(d=>{d.selected=!1}),l.selected=!0},{commandName:h("select layer"),dontRecoverSelection:!0,document:mr.app.activeDocument}),await B(async()=>{await s.play()},{commandName:h("run Photoshop Action"),document:mr.app.activeDocument}),{result:{success:!0}}}var pr=P(xt(),1),ne=R("photoshop");async function Rs(e,t){let r=ne.app.documents.find(o=>o.name==C.getSpecialDocumentForPreview());if(r)return(r.width{await r.resizeCanvas(Math.max(r.width,e),Math.max(r.height,t))},{document:null,commandName:h("resize document for preview")}),r;{let o=null;return await B(async()=>{o=await ne.app.createDocument({width:e,height:t,resolution:72,mode:ne.constants.NewDocumentMode.RGB,fill:ne.constants.DocumentFill.TRANSPARENT,name:C.getSpecialDocumentForPreview()})},{document:null,commandName:h("create document for preview")}),o}}var Dn=0;async function fo(e){Dn++;let t=e.image_blobs?.length?e.image_blobs:null,r=e.image_urls?.length?e.image_urls:null,o=e.document_identify,n=e.layer_identifies,i=(await Promise.all((r||t||[]).map(async(u,f)=>{if(r)return await pr.Jimp.read(r[f]);if(t){if("pngData"in t[f])return await pr.Jimp.read(await t[f].pngData.arrayBuffer());{let g=t[f].buffer,y=g instanceof Blob?await g.arrayBuffer():g;return new pr.Jimp({data:Buffer.from(y),width:t[f].width,height:t[f].height})}}}))).filter(u=>u),s=F(o);if(C.is_SPECIAL_LAYER_PREVIEW_DOCUMENT(o)&&(s=await Rs(i[0].bitmap.width,i[0].bitmap.height)),!s)throw new Error(h("document {0} not found",o));let a=s,c=i.map((u,f)=>{if(e.boundaries&&e.boundaries[f])return{width:e.boundaries[f].width,height:e.boundaries[f].height,top:e.boundaries[f].top,left:e.boundaries[f].left};let g=1;return(u.bitmap.height>a.height||u.bitmap.width>a.width)&&(g=Math.min(a.height/u.bitmap.height,a.width/u.bitmap.width)),{width:u.bitmap.width*g,height:u.bitmap.height*g,top:(a.height-u.bitmap.height*g)/2,left:(a.width-u.bitmap.width*g)/2,bottom:(a.height-u.bitmap.height*g)/2,right:(a.width-u.bitmap.width*g)/2}});i.forEach((u,f)=>{let g=c[f];if(u.bitmap.width!=g.width||u.bitmap.height!=g.height){let y={w:g.width,h:g.height};u.resize(y)}});let p=await Promise.all(i.map(async u=>{let f=u.bitmap.data;if(a.bitsPerChannel=="bitDepth16"){let y=new Uint16Array(f.length);for(let b=0;b{let f=null;d=await Promise.all(i.map(async(g,y)=>{let b=n.length==1?n[0]:n[y];if(!C.is_SPECIAL_LAYER_NEW_LAYER(b)){let w=X(a,b);f=ce(a,w)}if(f&&f.kind!=ne.constants.LayerKind.GROUP)return f;{let w=e.new_layer_name||"SDPPP Images";typeof Ee.handleSendLayerName=="function"&&(w=await Ee.handleSendLayerName(w));let S=await a.createLayer(ne.constants.LayerKind.NORMAL,{name:`${w} ${Dn}${i.length>1?`_${y+1}`:""}`});if(!S)throw new Error(h("create layer failed"));return l.push(S),f?S.move(f,ne.constants.ElementPlacement.PLACEINSIDE):S.move(a.layers[0],ne.constants.ElementPlacement.PLACEBEFORE),S}})),l.length&&u.add(g=>{g?l.forEach((y,b)=>{y.selected=!1}):l.forEach(y=>y.delete())}),await Promise.all(d.map(async(g,y)=>{await ne.imaging.putPixels({documentID:a.id,layerID:g.id,replace:!1,imageData:p[y],targetBounds:c[y]})})),xe(d.map(g=>g.id)),rr()},{commandName:h("show sent images"),document:a});let m=K.getState();return{layers:d.map(u=>({identify:ve(u.id,u.name),dirtyID:m.layerDirtyIDs.get(u.id)||0}))}}var Cn=R("photoshop");async function mo(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=e.layer_identify,n=X(r,o),i=ce(r,n);if(!i||i.kind!=Cn.constants.LayerKind.TEXT)throw new Error(h('only layer kind "TEXT" is supported, invalid layer: {0}',o));let s=!1;return await B(async()=>{console.log(e.text),i.textItem.contents=e.text,s=!0},{document:r,commandName:h("set text to layer")}),{success:s}}function In(e){return class extends e{constructor(t){super(t),this.socket.on("B_photoshop",async(r,o)=>{let{action:n,params:i}=r,s;try{console.log("B_photoshop start",n);let a=Date.now();n==="psd"?s=await uo(i):n==="getImage"?s=await lr(i):n==="sendImages"?s=await fo(i):n==="getSelection"?s=await Nt(i):n==="getText"?s=await co(i):n==="sendText"?s=await mo(i):n==="getLayerInfo"?s=await Rt(i):n==="getDocumentInfo"?s=await ro(i):n==="getLinkedLayers"?s=await so(i):n==="getLayersInGroup"?s=await io(i):n==="runPhotoshopActionOnLayer"?s=await lo(i):n==="getSpecialIdentifierValue"&&(s=await ao(i));let c=Date.now();console.log("B_photoshop end",n,c-a)}catch(a){console.error(a),o({error:a.stack||a.message||a});return}o(s)})}async callForPSDExtract(t,r){return new Promise((o,n)=>{this.socket.emit("F_photoshop",{action:"extractPSD",sid:t,params:{from_sid:r.from_sid}},i=>{if(i.error)return n(new Error(i.error));o(i)})})}async uploadImage(t,r){return new Promise((o,n)=>{this.socket.emit("F_photoshop",{action:"uploadImage",sid:t,params:r},i=>{if(i.error)return n(new Error(i.error));o(i)})})}}}function En(e){return class extends e{constructor(t){super(t),this.socket.on("B_workflow",(r,o)=>{if(r.action=="getStoredWidgetValue"){let{widgetTableID:n,widgetTablePath:i,widgetTablePersisted:s}=r.params,a=`${n}_${i}_${s}`,c=Ns(a),p=[];c&&Object.keys(c||{}).forEach(l=>{Object.keys(c[l]||{}).forEach(d=>{p.push({nodeID:l,widgetIndex:d,value:c[l][d].value,outputType:c[l][d].outputType})})}),o({values:p})}})}async setNodeTitle(t,r,o){await new Promise((n,i)=>{this.socket.emit("F_workflow",{action:"setNodeTitle",sid:t,params:{node_id:r,title:o}},s=>{if(s?.error)return i(new Error(s.error));n(s)})})}async pageInstanceRun(t,r,o=1){await new Promise((n,i)=>{this.socket.emit("F_workflow",{action:"run",sid:t,params:{size:o,from_sid:r}},s=>{if(s?.error)return i(new Error(s.error));n(s)})})}async setWidgetValue(t,r){t&&await new Promise((o,n)=>{this.socket.emit("F_workflow",{action:"setWidgetValue",sid:t.data.sid,params:r},i=>{if(i?.error)return n(new Error(i.error));o(i)})})}async openWorkflow(t,r){t&&await new Promise((o,n)=>{this.socket.emit("F_workflow",{action:"open",sid:t.data.sid,params:r},i=>{if(i?.error)return n(new Error(i.error));o(i)})})}async saveWorkflow(t,r){t&&await new Promise((o,n)=>{this.socket.emit("F_workflow",{action:"save",sid:t.data.sid,params:r},i=>{if(i?.error)return n(new Error(i.error));o(i)})})}async listWorkflows(t){return t?await new Promise((r,o)=>{this.socket.emit("F_workflow",{action:"list",sid:t.data.sid},n=>{r(n)})}):[]}async logout(t){t&&await new Promise((r,o)=>{this.socket.emit("F_workflow",{action:"logout",sid:t.data.sid},n=>{if(n?.error)return o(new Error(n.error));r(n)})})}async interrupt(t){await new Promise((r,o)=>{this.socket.emit("F_workflow",{action:"interrupt",sid:t},n=>{r(n)})})}async clearQueue(t){await new Promise((r,o)=>{this.socket.emit("F_workflow",{action:"clearQueue",sid:t},n=>{r(n)})})}async reboot(t){return await new Promise((r,o)=>{this.socket.emit("F_workflow",{action:"reboot",sid:t},n=>{r(n)})})}async setComfyOrgAPIKey(t,r){return await new Promise((o,n)=>{this.socket.emit("F_workflow",{action:"setComfyOrgAPIKey",sid:t,params:{api_key:r}},i=>{o(i)})})}}}function Ns(e){let t=localStorage.getItem(`widgetValue_${e}`);return t?JSON.parse(t):null}var hr=class extends fn(mn(D,"photoshop"),pn(N,"comfy"),En,In){constructor(t,{setConnectState:r,setLastErrorMessage:o,setBackendURL:n,setComfyMultiUser:i}){super(t);let s=()=>{this.socket.active&&this.socket.connected?r("connected"):this.socket.active?r("connecting"):r("disconnected"),requestAnimationFrame(s)};requestAnimationFrame(s),this.socket.on("connect_error",async a=>{if(this.socket.active){let c=a.message;try{let p=new AbortController,l=setTimeout(()=>p.abort(),1500),d=await fetch((t+this.socket._opts.path).replace(/(?{n(t),a.multi_user&&i(a.multi_user)}),this.socket.on("disconnect",(...a)=>{i(!1),D.setComfyUserToken("")})}};var An=P(sr(),1),kn=P(v(),1),Os=(0,An.debug)("sdppp:internal"),gr="http://127.0.0.1:8188",Ln=(0,U.createContext)(null);function _n({children:e}){let{setSrc:t,webviewAgentSID:r,prevWebviewAgentSID:o}=ue(),[n,i]=(0,U.useState)("disconnected"),[s,a]=(0,U.useState)(""),[c,p]=(0,U.useState)(localStorage.getItem("backendURL")||gr),[l,d]=(0,U.useState)(null),[m,u]=(0,U.useState)(""),[f,g]=(0,U.useState)(!1),[y,b]=(0,U.useState)(null),[w,S]=(0,U.useState)([]);function A(k){p(k.split("?")[0].split("#")[0].trim())}(0,U.useEffect)(()=>{localStorage.setItem("backendURL",c)},[c]),(0,U.useEffect)(()=>{if(n==="connected"){a(""),t(`${c}`);let k=!!(c.includes("localhost")||c.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/));Os("setBackendURL:",c,"src:",k),D.setIsLocal(!0)}else t(""),u("")},[n]);function he(){if(n==="connected"||n==="connecting")y&&(y.close(),b(null));else try{let k=y;y||(k=new hr(c||gr,{setConnectState:i,setLastErrorMessage:a,setBackendURL:A,setComfyMultiUser:g}),b(k)),k.connect()}catch(k){a(k.stack||k.message||k)}}(0,U.useEffect)(()=>{let k=(Q,ze,Qt)=>{m&&(!ze&&Q==m||!(m in N.getAllStore()))&&u("")};return N.subscribe("/",k),()=>{N.unsubscribe(k)}},[m]),(0,U.useEffect)(()=>{!m&&r&&u(r)},[m,r]),(0,U.useEffect)(()=>{r&&(!m||m==o)&&u(r)},[r,o,m,u]);let[ge,te]=(0,U.useState)(null);return(0,U.useEffect)(()=>{te(m?N.getAllStore()[m]:null)},[m]),(0,kn.jsx)(Ln.Provider,{value:{socket:y,backendURL:c,setBackendURL:A,connectState:n,doConnectOrDisconnect:he,lastErrorMessage:s,setLastErrorMessage:a,autoRunning:l,setAutoRunning:d,comfyMultiUser:f,setComfyMultiUser:g,workflowAgent:ge,workflowAgentSID:m,setWorkflowAgentSID:u,beforeWorkflowRunHooks:w,setBeforeWorkflowRunHooks:S},children:e})}function E(){let e=(0,U.useContext)(Ln);if(!e)throw new Error("useSDPPPInternalContext must be used within a SDPPPInternalContextProvider");return e}var xn=P(I(),1);var Tn=P(v(),1),rt=class extends xn.default.Component{state={hasError:!1,errorMessage:""};constructor(t){super(t)}static getDerivedStateFromError(t){return{hasError:!0,errorMessage:t.toString()}}componentDidCatch(t,r){console.log(t,r)}render(){return this.state.hasError?(0,Tn.jsx)("p",{className:"list-error-label",children:h("Error {0}... please contact me via Discord/Github",this.state.errorMessage)}):this.props.children}};var Te=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var Re=typeof window>"u"||"Deno"in globalThis;function Z(){}function On(e,t){return typeof e=="function"?e(t):e}function Wn(e){return typeof e=="number"&&e>=0&&e!==1/0}function Mn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ho(e,t){return typeof e=="function"?e(t):e}function Un(e,t){return typeof e=="function"?e(t):e}function go(e,t){let{type:r="all",exact:o,fetchStatus:n,predicate:i,queryKey:s,stale:a}=e;if(s){if(o){if(t.queryHash!==Ot(s,t.options))return!1}else if(!ht(t.queryKey,s))return!1}if(r!=="all"){let c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||n&&n!==t.state.fetchStatus||i&&!i(t))}function yo(e,t){let{exact:r,status:o,predicate:n,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(pt(t.options.mutationKey)!==pt(i))return!1}else if(!ht(t.options.mutationKey,i))return!1}return!(o&&t.state.status!==o||n&&!n(t))}function Ot(e,t){return(t?.queryKeyHashFn||pt)(e)}function pt(e){return JSON.stringify(e,(t,r)=>po(r)?Object.keys(r).sort().reduce((o,n)=>(o[n]=r[n],o),{}):r)}function ht(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ht(e[r],t[r])):!1}function Fn(e,t){if(e===t)return e;let r=Rn(e)&&Rn(t);if(r||po(e)&&po(t)){let o=r?e:Object.keys(e),n=o.length,i=r?t:Object.keys(t),s=i.length,a=r?[]:{},c=0;for(let p=0;p{setTimeout(t,e)})}function Vn(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Fn(e,t):t}function qn(e,t,r=0){let o=[...e,t];return r&&o.length>r?o.slice(1):o}function Qn(e,t,r=0){let o=[t,...e];return r&&o.length>r?o.slice(0,-1):o}var Wt=Symbol();function yr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wt?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Ws=class extends Te{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!Re&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},wr=new Ws;var Ms=class extends Te{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!Re&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},gt=new Ms;function Gn(){let e,t,r=new Promise((n,i)=>{e=n,t=i});r.status="pending",r.catch(()=>{});function o(n){Object.assign(r,n),delete r.resolve,delete r.reject}return r.resolve=n=>{o({status:"fulfilled",value:n}),e(n)},r.reject=n=>{o({status:"rejected",reason:n}),t(n)},r}function Us(e){return Math.min(1e3*2**e,3e4)}function wo(e){return(e??"online")==="online"?gt.isOnline():!0}var Kn=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Pr(e){return e instanceof Kn}function br(e){let t=!1,r=0,o=!1,n,i=Gn(),s=g=>{o||(m(new Kn(g)),e.abort?.())},a=()=>{t=!0},c=()=>{t=!1},p=()=>wr.isFocused()&&(e.networkMode==="always"||gt.isOnline())&&e.canRun(),l=()=>wo(e.networkMode)&&e.canRun(),d=g=>{o||(o=!0,e.onSuccess?.(g),n?.(),i.resolve(g))},m=g=>{o||(o=!0,e.onError?.(g),n?.(),i.reject(g))},u=()=>new Promise(g=>{n=y=>{(o||p())&&g(y)},e.onPause?.()}).then(()=>{n=void 0,o||e.onContinue?.()}),f=()=>{if(o)return;let g,y=r===0?e.initialPromise:void 0;try{g=y??e.fn()}catch(b){g=Promise.reject(b)}Promise.resolve(g).then(d).catch(b=>{if(o)return;let w=e.retry??(Re?0:3),S=e.retryDelay??Us,A=typeof S=="function"?S(r,b):S,he=w===!0||typeof w=="number"&&rp()?void 0:u()).then(()=>{t?m(b):f()})})};return{promise:i,cancel:s,continue:()=>(n?.(),i),cancelRetry:a,continueRetry:c,canStart:l,start:()=>(l()?f():u().then(f),i)}}var Fs=e=>setTimeout(e,0);function Bs(){let e=[],t=0,r=a=>{a()},o=a=>{a()},n=Fs,i=a=>{t?e.push(a):n(()=>{r(a)})},s=()=>{let a=e;e=[],a.length&&n(()=>{o(()=>{a.forEach(c=>{r(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||s()}return c},batchCalls:a=>(...c)=>{i(()=>{a(...c)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{o=a},setScheduler:a=>{n=a}}}var V=Bs();var vr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Wn(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Re?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}};var Hn=class extends vr{#e;#t;#r;#n;#o;#s;#a;constructor(e){super(),this.#a=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#n=e.client,this.#r=this.#n.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=qs(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#o?.promise}setOptions(e){this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){let r=Vn(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(Z).catch(Z):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Un(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wt||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Mn(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#o&&(this.#a?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){let a=this.observers.find(c=>c.options.queryFn);a&&this.setOptions(a.options)}let r=new AbortController,o=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},n=()=>{let a=yr(this.options,t),c={client:this.#n,queryKey:this.queryKey,meta:this.meta};return o(c),this.#a=!1,this.options.persister?this.options.persister(a,c,this):a(c)},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:n};o(i),this.options.behavior?.onFetch(i,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#i({type:"fetch",meta:i.fetchOptions?.meta});let s=a=>{Pr(a)&&a.silent||this.#i({type:"error",error:a}),Pr(a)||(this.#r.config.onError?.(a,this),this.#r.config.onSettled?.(this.state.data,a,this)),this.scheduleGc()};return this.#o=br({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:a=>{if(a===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(a)}catch(c){s(c);return}this.#r.config.onSuccess?.(a,this),this.#r.config.onSettled?.(a,this.state.error,this),this.scheduleGc()},onError:s,onFail:(a,c)=>{this.#i({type:"failed",failureCount:a,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#o.start()}#i(e){let t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Vs(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let o=e.error;return Pr(o)&&o.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),V.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Vs(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wo(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function qs(e){let t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,o=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var zn=class extends Te{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let o=t.queryKey,n=t.queryHash??Ot(o,t),i=this.get(n);return i||(i=new Hn({client:e,queryKey:o,queryHash:n,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){V.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(r=>go(t,r))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(r=>go(e,r)):t}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};var Yn=class extends vr{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||Qs(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#n({type:"continue"})};this.#r=br({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(n,i)=>{this.#n({type:"failed",failureCount:n,error:i})},onPause:()=>{this.#n({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});let r=this.state.status==="pending",o=!this.#r.canStart();try{if(r)t();else{this.#n({type:"pending",variables:e,isPaused:o}),await this.#t.config.onMutate?.(e,this);let i=await this.options.onMutate?.(e);i!==this.state.context&&this.#n({type:"pending",context:i,variables:e,isPaused:o})}let n=await this.#r.start();return await this.#t.config.onSuccess?.(n,e,this.state.context,this),await this.options.onSuccess?.(n,e,this.state.context),await this.#t.config.onSettled?.(n,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(n,null,e,this.state.context),this.#n({type:"success",data:n}),n}catch(n){try{throw await this.#t.config.onError?.(n,e,this.state.context,this),await this.options.onError?.(n,e,this.state.context),await this.#t.config.onSettled?.(void 0,n,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,n,e,this.state.context),n}finally{this.#n({type:"error",error:n})}}finally{this.#t.runNext(this)}}#n(e){let t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),V.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Qs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var jn=class extends Te{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#r=0}#e;#t;#r;build(e,t,r){let o=new Yn({mutationCache:this,mutationId:++this.#r,options:e.defaultMutationOptions(t),state:r});return this.add(o),o}add(e){this.#e.add(e);let t=Sr(e);if(typeof t=="string"){let r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){let t=Sr(e);if(typeof t=="string"){let r=this.#t.get(t);if(r)if(r.length>1){let o=r.indexOf(e);o!==-1&&r.splice(o,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=Sr(e);if(typeof t=="string"){let o=this.#t.get(t)?.find(n=>n.state.status==="pending");return!o||o===e}else return!0}runNext(e){let t=Sr(e);return typeof t=="string"?this.#t.get(t)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){V.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(r=>yo(t,r))}findAll(e={}){return this.getAll().filter(t=>yo(e,t))}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(t=>t.state.isPaused);return V.batch(()=>Promise.all(e.map(t=>t.continue().catch(Z))))}};function Sr(e){return e.options.scope?.id}function Po(e){return{onFetch:(t,r)=>{let o=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],s=t.state.data?.pageParams||[],a={pages:[],pageParams:[]},c=0,p=async()=>{let l=!1,d=f=>{Object.defineProperty(f,"signal",{enumerable:!0,get:()=>(t.signal.aborted?l=!0:t.signal.addEventListener("abort",()=>{l=!0}),t.signal)})},m=yr(t.options,t.fetchOptions),u=async(f,g,y)=>{if(l)return Promise.reject();if(g==null&&f.pages.length)return Promise.resolve(f);let b={client:t.client,queryKey:t.queryKey,pageParam:g,direction:y?"backward":"forward",meta:t.options.meta};d(b);let w=await m(b),{maxPages:S}=t.options,A=y?Qn:qn;return{pages:A(f.pages,w,S),pageParams:A(f.pageParams,g,S)}};if(n&&i.length){let f=n==="backward",g=f?Gs:$n,y={pages:i,pageParams:s},b=g(o,y);a=await u(y,b,f)}else{let f=e??i.length;do{let g=c===0?s[0]??o.initialPageParam:$n(o,a);if(c>0&&g==null)break;a=await u(a,g),c++}while(ct.options.persister?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=p}}}function $n(e,{pages:t,pageParams:r}){let o=t.length-1;return t.length>0?e.getNextPageParam(t[o],t,r[o],r):void 0}function Gs(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var bo=class{#e;#t;#r;#n;#o;#s;#a;#i;constructor(e={}){this.#e=e.queryCache||new zn,this.#t=e.mutationCache||new jn,this.#r=e.defaultOptions||{},this.#n=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=wr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=gt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#e.build(this,t),o=r.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ho(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{let o=r.data;return[t,o]})}setQueryData(e,t,r){let o=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(o.queryHash)?.state.data,s=On(t,i);if(s!==void 0)return this.#e.build(this,o).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return V.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;V.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){let r=this.#e;return V.batch(()=>(r.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t},o=V.batch(()=>this.#e.findAll(e).map(n=>n.cancel(r)));return Promise.all(o).then(Z).catch(Z)}invalidateQueries(e,t={}){return V.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0},o=V.batch(()=>this.#e.findAll(e).filter(n=>!n.isDisabled()).map(n=>{let i=n.fetch(void 0,r);return r.throwOnError||(i=i.catch(Z)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(o).then(Z)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=this.#e.build(this,t);return r.isStaleByTime(ho(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Z).catch(Z)}fetchInfiniteQuery(e){return e.behavior=Po(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Z).catch(Z)}ensureInfiniteQueryData(e){return e.behavior=Po(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(pt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#n.values()],r={};return t.forEach(o=>{ht(e,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(e,t){this.#o.set(pt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#o.values()],r={};return t.forEach(o=>{ht(e,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ot(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Wt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};var Mt=P(I(),1),Jn=P(v(),1),Xn=Mt.createContext(void 0);var vo=({client:e,children:t})=>(Mt.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Jn.jsx)(Xn.Provider,{value:e,children:t}));var Oe=P(I(),1);var j=P(I(),1);var Dr=P(I(),1);function Zn(){let{workflowAgent:e,socket:t}=E();return{setWidgetValue:(0,Dr.useCallback)(async(o,n,i)=>{if(!e)throw new Error("workflowAgent not found");await t?.setWidgetValue(e,{values:[{nodeID:o,widgetIndex:n,value:i}]});let s=e.data.widgetTableStructure.widgetTableID,a=e.data.widgetTableStructure.widgetTablePath,c=e.data.widgetTableStructure.widgetTablePersisted,p=`${s}_${a}_${c}`,l=e.data.widgetTableStructure.nodes[o].widgets[n].outputType;Ks(p,o,n,i,l)},[e,t])}}function yt(){let{beforeWorkflowRunHooks:e,setBeforeWorkflowRunHooks:t}=E(),r=(0,Dr.useCallback)(n=>(t(i=>[...i,n]),()=>{t(i=>i.filter(a=>a!==n))}),[t]),o=(0,Dr.useCallback)(async()=>{for(let n=0;n{await e?.setComfyOrgAPIKey(t,b)},[e,t]),n=(0,j.useCallback)(async(b,w)=>{let S=N.getStore(b);if(!S)throw new Error("workflowAgent not found");try{await e?.openWorkflow(S,{workflow_path:w,from_sid:D.data.sid,reset:!0})}catch(A){console.error(A)}},[e]),i=(0,j.useCallback)(async b=>{let w=N.getStore(b);if(!w||!w.data.widgetTableStructure.widgetTablePath)throw new Error("workflow not found");if(!w.data.widgetTableStructure.widgetTablePersisted)throw new Error("workflow is not savable");await n(b,w.data.widgetTableStructure.widgetTablePath)},[n]),s=(0,j.useCallback)((b,w=1)=>{e?.pageInstanceRun(b,D.data.sid,w)},[e]),a=(0,j.useCallback)(async b=>{let w=N.getStore(b);if(!w)throw new Error("workflowAgent not found");if(!w.data.widgetTableStructure.widgetTablePath)throw new Error("workflow not found");w.data.widgetTableStructure.widgetTablePath.indexOf("://")===-1&&await e?.saveWorkflow(w,{workflow_path:w.data.widgetTableStructure.widgetTablePath,from_sid:D.data.sid})},[e]),c=(0,j.useCallback)(async b=>{await e?.callForPSDExtract(b,{from_sid:D.data.sid})},[e]),p=(0,j.useCallback)(async b=>{let w=N.getStore(b);if(!w)throw new Error("workflowAgent not found");await e?.logout(w)},[e]),l=(0,j.useCallback)(async(b,w)=>await e?.uploadImage(D.data.sid,{image:b,filename:w,overwrite:!0}),[e]);globalThis.sdppp_action_run=async(b,{workflowPath:w})=>{w?u(w):m()};let d=(0,j.useCallback)(async(b,w=1)=>{!b&&!t||(await r(),await s(b||t,w))},[s,t,r]),m=(0,j.useCallback)(async(b,w=1)=>{await d(b||t,w),So.action.recordAction?.({name:"sdppp_run",methodName:"sdppp_action_run"},{})},[d]),u=(0,j.useCallback)(async(b,w,S=1)=>{!w&&!t||(await n(w||t,b),d(w||t,S),So.action.recordAction?.({name:"sdppp_run_"+b,methodName:"sdppp_action_run"},{workflowPath:b}))},[n,m,t]),f=(0,j.useCallback)(async()=>{t&&await e?.interrupt(t)},[e,t]),g=(0,j.useCallback)(async()=>{t&&await e?.clearQueue(t)},[e,t]),y=(0,j.useCallback)(async()=>{if(t)return await e?.reboot(t)},[e,t]);return{openWorkflow:n,reopenWorkflow:i,saveWorkflow:a,runPage:m,runWorkflow:u,callForPSDExtract:c,logout:p,uploadImage:l,interrupt:f,clearQueue:g,reboot:y,setComfyOrgAPIKey:o}}function Cr(){let[e,t]=(0,Oe.useState)(!1),[r,o]=(0,Oe.useState)(!1),n=(0,Oe.useRef)(null),{autoRunning:i,workflowAgent:s}=E(),{runWorkflow:a,runPage:c}=ee();return(0,Oe.useEffect)(()=>{if(i&&e&&!r){if(t(!1),i.type=="workflow")s&&!s.data.executingNodeTitle&&(a(i.value,s.data.sid,1),n.current=setTimeout(()=>{o(!1)},1e3));else if(i.type=="page"){let p=N.getStore(i.value);p&&!p.data.executingNodeTitle&&(o(!0),c(i.value),n.current=setTimeout(()=>{o(!1)},1e3))}}},[e,r,i,s,a,c]),(0,Oe.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{setShouldTriggerLivePainting:t}}var de=P(I(),1);var ri=P(v(),1),Hs=15e3,ei=(0,de.createContext)({});function ti({children:e,loginAppID:t,loginStyle:r,loginBannerTop:o,loginBannerBottom:n}){let[i,s]=(0,de.useState)(!t),a=(0,de.useCallback)(async(m,u="sdppp123456")=>{try{let f=await fetch("https://api.authing.cn/api/v3/signin",{method:"POST",headers:{"Content-Type":"application/json","x-authing-app-id":t,"x-authing-sdk-version":"web:3.0.0"},body:JSON.stringify({connection:"PASSWORD",passwordPayload:{username:m,password:u}})}),g=await f.json();if(f.ok){if(g.statusCode===200)return{success:!0,token:g.data.access_token};if(g.statusCode===403)return{success:!1,message:h("Verification Error")}}else return{success:!1,message:JSON.stringify(g)}}catch(f){return{success:!1,message:f.toString()}}return{success:!1,message:"\u767B\u5F55\u5931\u8D25"}},[]),c=(0,de.useCallback)(async m=>{if(!m)throw new Error("Token is required");let u="access_token",f="https://api.authing.cn/oidc/token/introspection",g=`token=${encodeURIComponent(m)}&token_type_hint=${encodeURIComponent(u)}&client_id=${encodeURIComponent(t)}`;try{let y=await fetch(f,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:g});if(!y.ok)throw new Error(`Verification failed with status: ${y.status}`);return await y.json()}catch(y){throw console.error("Token verification error:",y),y}},[]),p=(0,de.useCallback)(async m=>{try{let f=await(await fetch("https://api.authing.cn/api/v3/get-profile",{method:"GET",headers:{Authorization:`Bearer ${m}`,"x-authing-app-id":t}})).json();return f.statusCode===200?{data:f.data,success:!0}:{message:f.message,success:!1}}catch(u){return{success:!1,message:u}}},[]);async function l(m,u="sdppp123456"){let f=await a(m,u);if(f.success){let g=await p(f.token);g.success&&(localStorage.setItem("token",f.token),localStorage.setItem("lastLogin",new Date(g.data.lastLogin).getTime().toString()),s(!0))}return f}async function d(m){if(!localStorage.getItem("lastLogin"))return!1;if((await c(m)).active){let f=await p(m);if(f.success){let g=new Date(f.data.lastLogin).getTime().toString(),y=localStorage.getItem("lastLogin");return g===y}else return!1}return!1}return(0,de.useEffect)(()=>{if(i){if(t){let m=setInterval(()=>{let u=localStorage.getItem("token");u&&d(u).then(f=>{f||s(!1)})},Hs);return()=>{clearInterval(m)}}}else{let m=localStorage.getItem("token");if(!m)return;d(m).then(u=>{u&&s(!0)})}},[i]),(0,ri.jsx)(ei.Provider,{value:{loginStyle:r||"none",loginBannerBottom:n||null,loginBannerTop:o||null,isLogin:i,logout:()=>{localStorage.removeItem("token"),s(!1)},login:l},children:e})}function We(){let e=(0,de.useContext)(ei);if(!e)throw new Error("useSDPPPLogin must be used within a SDPPPLoginProvider");return e}var Me=P(v(),1),oi=(0,wt.createContext)({});function ni({children:e,loginAppID:t,loginStyle:r,loginBannerTop:o,loginBannerBottom:n}){let i=new bo;return(0,Me.jsx)(vo,{client:i,children:(0,Me.jsx)(rt,{children:(0,Me.jsx)(nn,{children:(0,Me.jsx)(ti,{loginAppID:t,loginStyle:r,loginBannerTop:o,loginBannerBottom:n,children:(0,Me.jsx)(_n,{children:(0,Me.jsx)(zs,{children:e})})})})})})}function Ne(){let e=(0,wt.useContext)(oi);if(!e)throw new Error("SDPPPExternalContext not found");return e}function zs({children:e}){let t=ue(),r=E(),{logout:o,isLogin:n}=We();Ee.registerTestCase&&(globalThis.sdppp_debugPhotoshopInternalContext=r,globalThis.sdppp_debugPhotoshopWebviewContext=t);let{toggleWebviewDialog:i,webviewAgentSID:s}=t,{autoRunning:a,setAutoRunning:c,workflowAgent:p,setWorkflowAgentSID:l,doConnectOrDisconnect:d,lastErrorMessage:m}=r,{setShouldTriggerLivePainting:u}=Cr();return(0,wt.useEffect)(()=>{let f=()=>{u(!0)};return D.subscribe("/canvasStateID",f),()=>{D.unsubscribe(f)}},[u]),(0,Me.jsx)(oi.Provider,{value:{logout:o,isLogin:n,connectOrDisconnect:d,lastConnectErrorMessage:m,setAutoRunning:c,autoRunning:a,photoshopSID:D.data.sid,webviewAgentSID:s,workflowAgentSID:p?.data.sid||"",setWorkflowAgentSID:l,toggleWebviewDialog:i},children:e})}var Ir=P(I(),1);var Pt=P(I(),1);function fe(e,t){let[r,o]=(0,Pt.useState)(e?{...e.data}:null),[n,i]=(0,Pt.useState)(e?{...e.data}:null),s=Array.isArray(t)?t:[t];return(0,Pt.useEffect)(()=>{e&&o({...e.data})},[e]),(0,Pt.useEffect)(()=>{if(!e)return;let a=s.map(c=>{let p=()=>{i(r),o(e.data)};return e.subscribe(c,p),p});return()=>{a.forEach(c=>{e.unsubscribe(c)})}},[e,t]),{state:r||null,prevState:n||null}}function Er(){let[e,t]=(0,Ir.useState)({}),{state:r}=fe(D,"/comfyUserToken"),o=r?.comfyUserToken;return(0,Ir.useEffect)(()=>{let n=!1,i=(s,a,c)=>{n||t(p=>{let l={...p};return a==null?delete l[s]:l[s]=a,l})};return N.subscribe("/",i),()=>{n=!0,N.unsubscribe(i)}},[]),{pageInstances:Object.entries(e).map(([n,i])=>({sid:n,ssid:n.slice(0,4),title:i.title,lastError:i.lastError,isWebview:!!i.webviewFromSid,isCurrentUser:!i.comfyUserToken||i.comfyUserToken==o})).filter(n=>!n.isWebview&&(!o||n.isCurrentUser))}}var me=P(I(),1);function Ys(e){let{state:t}=fe(D,["/comfyUserToken"]),{socket:r,workflowAgentSID:o}=E(),[n,i]=(0,me.useState)({}),[s,a]=(0,me.useState)(!1),[c,p]=(0,me.useState)(null),l=(0,me.useCallback)(async d=>{if(!d&&!o){i({});return}a(!0);let m=N.getStore(d||o);try{let u=await r?.listWorkflows(m||null)||[];if("error"in u){p(new Error(u.error)),a(!1);return}a(!1),p(null),i(u.reduce((f,g)=>(f[g]={path:g,content:null,error:""},f),{}))}catch(u){a(!1),p(u)}},[r,o]);return(0,me.useEffect)(()=>{e&&l()},[e]),(0,me.useEffect)(()=>{t?.comfyUserToken&&l()},[t]),{data:n,isLoading:s,error:c,refetch:l}}function ii(){let{backendURL:e,comfyMultiUser:t}=E(),{workflowAgentSID:r}=Ne(),[o,n]=(0,me.useState)(!0),[i,s]=(0,me.useState)(""),{data:a,isLoading:c,error:p,refetch:l}=Ys(e);(0,me.useEffect)(()=>{if(r)l(),n(!1);else{n(!0);let u=setTimeout(()=>{n(!1)},4e3);return()=>clearTimeout(u)}},[r]);let d=[];!c&&!p&&a&&(Object.keys(a).forEach(u=>{if(u.startsWith(i)){let f=u.slice(i.length).split("://").pop();f&&(f.indexOf("/")==-1?d.push({path:u,isDir:!1}):d.unshift({path:u.slice(0,u.lastIndexOf("/")+1),isDir:!0}))}}),d=d.filter((u,f,g)=>g.findIndex(y=>y.path==u.path)===f));let m="";return p&&(m=p.message),d.length||(m=h("Workflow list is empty, please save a workflow by Comfy's lastest UI")),p&&(m=h("Workflow list loading failed: {0}",p.message)),c&&(m="Loading"),r||(m=h("Workflow Runner is loading...")),{workflows:a,isLoadingWorkflows:c,workflowsError:m,refetchWorkflows:l,afterPropsUpdate4s:o,currentViewingDirectory:i,setCurrentViewingDirectory:s,showingList:d}}function Ar(e){let t=e?N.getStore(e):null,{state:r}=fe(t||null,["/"]);return!r||!e?{sid:"",ssid:"",title:"",lastError:"",isWebview:!1,progress:0,executingNodeTitle:"",queueSize:0}:{sid:e,ssid:r.ssid,title:r.title,lastError:r.lastError,isWebview:!!r.webviewFromSid,progress:r.progress,executingNodeTitle:r.executingNodeTitle,queueSize:r.queueSize}}var li=P(I(),1);var Ue=P(I(),1),Do={LICENSE:{name:"BSD3-Clause",url:{en:"https://github.com/zombieyang/sd-ppp/blob/main/LICENSE",zhcn:"https://gitee.com/zombieyang/sd-ppp/blob/main/LICENSE"}},sponsors:[{name:"\u56DB\u559CAI",url:"https://v.douyin.com/hD2X7S717uw/"},{name:"\u6C90\u6C90AI",url:"https://v.douyin.com/k6yKDEcVgP8/"}],links:[{name:"\u732B\u54AA\u8001\u5E08Reimagined",url:"https://www.xiaohongshu.com/user/profile/59f1fcc411be101aba7f048f"},{name:"\u6765\u771F\u7684",url:"https://space.bilibili.com/590784254"},{name:"\u54D1\u72D7Egao",url:"https://space.bilibili.com/284721975"}],community:{en:[{name:"Github",url:"https://github.com/zombieyang/sd-ppp"},{name:"Discord",url:"https://discord.gg/9HeGjDvEmn"},{name:"Youtube",url:"https://www.youtube.com/@Github-Zombeeyang/videos"}],zhcn:[{name:"Github",url:"https://github.com/zombieyang/sd-ppp"},{name:"QQ\u9891\u9053",url:"https://pd.qq.com/s/5m42umo28"},{name:"Bilibili",url:"https://space.bilibili.com/44908313"}]},cloud:{en:[],zhcn:[{name:"\u6668\u7FBD\u667A\u4E91",url:"https://www.chenyu.cn/console/login?invitationCode=BUD913",icon:"icons/chenyu.ico",color:"var(--uxp-host-text-color-secondary)"},{name:"Cephalon",url:"https://cephalon.cloud/share/register-landing?invite_id=m95SDj",icon:"icons/cephalon.ico",color:"var(--uxp-host-text-color-secondary)"}]}},ui="sponsorData",si={GITEE:"https://gitee.com/zombieyang/sd-ppp/raw/main/sponsors.json",GITHUB:"https://raw.githubusercontent.com/zombieyang/sd-ppp/refs/heads/main/sponsors.json"},js=5e3;function Co(){try{let e=localStorage.getItem(ui);if(e)return JSON.parse(e)}catch(e){console.warn("Failed to parse sponsor data from localStorage:",e)}return null}function ai(e){try{localStorage.setItem(ui,JSON.stringify(e))}catch(t){console.warn("Failed to save sponsor data to localStorage:",t)}}function _r(e){try{if(!e||typeof e!="object")return console.warn("Invalid sponsor data: not an object"),!1;if(!e.LICENSE||typeof e.LICENSE!="object")return console.warn("Invalid sponsor data: LICENSE is not an object"),!1;if(!e.LICENSE.name)return console.warn("Invalid sponsor data: LICENSE.name is missing"),!1;if(!e.LICENSE.url||typeof e.LICENSE.url!="object")return console.warn("Invalid sponsor data: LICENSE.url is not an object"),!1;if(!e.LICENSE.url.en)return console.warn("Invalid sponsor data: LICENSE.url.en is missing"),!1;if(!e.LICENSE.url.zhcn)return console.warn("Invalid sponsor data: LICENSE.url.zhcn is missing"),!1;if(!Array.isArray(e.sponsors))return console.warn("Invalid sponsor data: sponsors is not an array"),!1;if(!Array.isArray(e.links))return console.warn("Invalid sponsor data: links is not an array"),!1;if(!e.community||typeof e.community!="object")return console.warn("Invalid sponsor data: community is not an object"),!1;if(!Array.isArray(e.community.en)||!Array.isArray(e.community.zhcn))return console.warn("Invalid sponsor data: community.en or community.zhcn is not an array"),!1;if(!e.cloud||typeof e.cloud!="object")return console.warn("Invalid sponsor data: cloud is not an object"),!1;if(!Array.isArray(e.cloud.en)||!Array.isArray(e.cloud.zhcn))return console.warn("Invalid sponsor data: cloud.en or cloud.zhcn is not an array"),!1;for(let t of e.cloud.zhcn)if(!t.name||!t.url||!t.icon||!t.color)return console.warn("Invalid sponsor data: cloud.zhcn item missing required properties"),!1;return!0}catch(t){return console.warn("Error validating sponsor data:",t),!1}}async function ci(e){try{let t=await fetch(e);if(!t.ok)throw new Error(`Fetch failed with status: ${t.status}`);let r=await t.json();return _r(r)?r:null}catch(t){return console.warn(`Failed to fetch from ${e}:`,t),null}}var Lr=null;function kr(){let[e,t]=Ue.default.useState(!0);if(!Lr){let s=Co();Lr=new Promise(a=>{let c=!1;ci(si.GITEE).then(p=>{!c&&p&&(c=!0,ai(p),a(p),t(!1))}),ci(si.GITHUB).then(p=>{!c&&p&&(c=!0,ai(p),a(p),t(!1))}),setTimeout(()=>{c||(c=!0,s&&_r(s)?(a(s),t(!1)):(console.warn("Using default data as fallback"),a(Do),t(!1)))},js)})}let[r,o]=Ue.default.useState(()=>{let s=Co();return s&&_r(s)?s:Do});Ue.default.useEffect(()=>{Lr&&Lr.then(s=>{o(s)}).catch(s=>{console.error("Error in useSponsor:",s);let a=Co();o(a&&_r(a)?a:Do)})},[]);let[n,i]=(0,Ue.useState)(!0);return(0,Ue.useEffect)(()=>{n&&!e&&i(e)},[e]),{data:r,isLoading:n}}var L=P(v(),1);function di(){let{loginStyle:e}=We(),{data:t}=kr(),r=(0,li.useMemo)(()=>t.community[$e()=="zhcn"?"zhcn":"en"],[t]);return(0,L.jsxs)("div",{className:"about-card",style:{position:"relative"},children:[e==="none"?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:"about-card-sections about-card-title",children:(0,L.jsxs)("a",{href:t.LICENSE.url[$e()=="zhcn"?"zhcn":"en"],children:[h("LICENSE:")," ",t.LICENSE.name]})}),(0,L.jsx)("sp-divider",{}),(0,L.jsx)("h2",{children:h("Sponsors")}),(0,L.jsx)("div",{className:"about-card-sections about-card-sponsors",children:t.sponsors.map(o=>(0,L.jsx)("a",{href:o.url,children:o.name},o.name))}),(0,L.jsx)("sp-divider",{}),(0,L.jsx)("h2",{children:h("Links")}),(0,L.jsx)("div",{className:"about-card-sections about-card-friends-links",children:t.links.map(o=>(0,L.jsx)("a",{href:o.url,children:o.name},o.name))}),(0,L.jsx)("sp-divider",{}),(0,L.jsxs)("h2",{children:["SD-PPP ",h("Community")]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:"about-card-sections about-card-title",children:(0,L.jsx)("h4",{children:h("This plugin is based on sd-ppp")})}),(0,L.jsx)("div",{className:"about-card-sections about-card-title",children:(0,L.jsx)("h6",{children:h("And follows its open source license:")})}),(0,L.jsx)("div",{className:"about-card-sections about-card-title",children:(0,L.jsx)("a",{href:"https://github.com/zombieyang/sd-ppp/blob/main/LICENSE",children:"LICENSE: BSD3-Clause"})})]}),(0,L.jsx)("div",{className:"about-card-sections about-card-links",children:r.map(o=>(0,L.jsx)("a",{href:o.url,children:o.name},o.name))}),(0,L.jsx)("sp-divider",{}),t.site&&(0,L.jsx)("h1",{children:(0,L.jsx)("a",{href:t.site[$e()=="zhcn"?"zhcn":"en"].url,children:t.site[$e()=="zhcn"?"zhcn":"en"].name})})]})}var Pe=P(I(),1);var fi=P(I(),1),bt=P(v(),1),Ut=class extends fi.default.Component{render(){let t=this.props.size||1;return(0,bt.jsx)("div",{slot:"icon",className:"sdppp-icon",onClick:this.props.onClick,children:(0,bt.jsxs)("svg",{width:20*t,height:20*t,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,bt.jsx)("path",{d:"M5.586 5.586A2 2 0 018.862 7.73a.5.5 0 10.931.365 3 3 0 10-1.697 1.697.5.5 0 10-.365-.93 2 2 0 01-2.145-3.277z",fill:"currentColor"}),(0,bt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.939 6.527c.127.128.19.297.185.464a.635.635 0 01-.185.465L0 8.395a7.099 7.099 0 001.067 2.572h1.32c.182 0 .345.076.46.197a.635.635 0 01.198.46v1.317A7.097 7.097 0 005.602 14l.94-.94a.634.634 0 01.45-.186H7.021c.163 0 .326.061.45.186l.939.938a7.098 7.098 0 002.547-1.057V11.61c0-.181.075-.344.197-.46a.634.634 0 01.46-.197h1.33c.507-.76.871-1.622 1.056-2.55l-.946-.946a.635.635 0 01-.186-.465.635.635 0 01.186-.464l.943-.944a7.099 7.099 0 00-1.044-2.522h-1.34a.635.635 0 01-.46-.197.635.635 0 01-.196-.46V1.057A7.096 7.096 0 008.413.002l-.942.942a.634.634 0 01-.45.186H6.992a.634.634 0 01-.45-.186L5.598 0a7.097 7.097 0 00-2.553 1.058v1.33c0 .182-.076.345-.197.46a.635.635 0 01-.46.198h-1.33A7.098 7.098 0 00.003 5.591l.936.936zm.707 1.636c.324-.324.482-.752.479-1.172a1.634 1.634 0 00-.48-1.171l-.538-.539c.126-.433.299-.847.513-1.235h.768c.459 0 .873-.19 1.167-.49.3-.295.49-.708.49-1.167v-.77c.39-.215.807-.388 1.243-.515l.547.547c.32.32.742.48 1.157.48l.015-.001h.014c.415 0 .836-.158 1.157-.479l.545-.544c.433.126.846.299 1.234.512v.784c0 .46.19.874.49 1.168.294.3.708.49 1.167.49h.776c.209.382.378.788.502 1.213l-.545.546a1.635 1.635 0 00-.48 1.17c-.003.421.155.849.48 1.173l.549.55c-.126.434-.3.85-.513 1.239h-.77c-.458 0-.872.19-1.166.49-.3.294-.49.708-.49 1.167v.77a6.09 6.09 0 01-1.238.514l-.54-.54a1.636 1.636 0 00-1.158-.48H6.992c-.415 0-.837.159-1.157.48l-.543.543a6.091 6.091 0 01-1.247-.516v-.756c0-.459-.19-.873-.49-1.167-.294-.3-.708-.49-1.167-.49h-.761a6.094 6.094 0 01-.523-1.262l.542-.542z",fill:"currentColor"})]})})}};var xr=P(I(),1);var _e=P(v(),1);function Tr(e){let{state:t}=fe(D,["/comfyUserToken"]),{logout:r}=ee(),{workflowAgentSID:o,workflowAgent:n,comfyMultiUser:i}=E(),{resetWebview:s}=ue(),[a,c]=(0,xr.useState)(!1);if((0,xr.useEffect)(()=>{if(!n){D.setComfyUserToken("");return}let d=(m,u)=>{let f=t?.comfyUserToken;D.setComfyUserToken(m),f==""&&a&&(s(),c(!1))};return n.subscribe("/comfyUserToken",d),d(n.data.comfyUserToken,""),()=>{n&&n.unsubscribe(d)}},[n,a,s]),!i)return null;if(!Ee.enableMU&&i)return(0,_e.jsxs)("div",{className:"login-block",children:[(0,_e.jsx)("div",{className:"login-title",children:h("Comfy multi-user: ")}),(0,_e.jsx)("div",{children:h("ComfyUI with --multi-user is only available for sponsors")})]});let p=n&&t?.comfyUserToken,l=t?.comfyUserToken?.split("_")[0]||"";return(0,_e.jsxs)("div",{className:"login-block",children:[(0,_e.jsx)("div",{className:`login-title${p?"":" login-title-secondary"}`,children:h("Comfy multi-user: ")+(p?l:"")}),p?(0,_e.jsx)("div",{className:"logout-btn action-button",onClick:()=>{r(o),c(!1)},children:h("Logout")}):(0,_e.jsx)("div",{className:"logout-btn action-button",onClick:()=>{c(!0),e.onRequestLogin?.()},children:h("Not Login")})]})}var Fe=P(v(),1);function Rr(){let{workflowAgent:e}=E(),{state:t}=fe(e,["/comfyOrgAPIKey","/comfyOrgLoggedIn"]),{setComfyOrgAPIKey:r}=ee();return t?t.comfyOrgLoggedIn&&!t.comfyOrgAPIKey?(0,Fe.jsxs)("div",{className:"login-block",children:[(0,Fe.jsx)("div",{className:"api-key-title",children:"ComfyOrg API Key"}),(0,Fe.jsx)("div",{children:h("Logged in by email/password")})]}):(0,Fe.jsxs)("div",{className:"login-block",children:[(0,Fe.jsx)("div",{className:"api-key-title",children:"ComfyOrg API Key"}),(0,Fe.jsx)("div",{className:"logout-btn action-button",onClick:()=>{let o=prompt(h("Please input API key (will reload Runner)"));o&&r(o)},children:h("Set API Key")})]}):null}var Nr=P(v(),1),$s=({pageInstance:e})=>{let{autoRunning:t,workflowAgentSID:r,setWorkflowAgentSID:o}=E(),n=r==e.sid,i=t?.value==e.sid;return(0,Nr.jsx)("div",{className:`agent-list-item${n?" selected":""}${n||i?" checked":""}`,onClick:()=>o(n?"":e.sid),children:(0,Nr.jsxs)("span",{children:["\u25CF [",e.ssid,"] ",e.title]})})},mi=$s;var we=P(v(),1),pi=()=>{let{workflowAgentSID:e,setWorkflowAgentSID:t,backendURL:r}=E(),{webviewAgentSID:o}=ue(),{pageInstances:n}=Er();return(0,we.jsxs)(we.Fragment,{children:[(0,we.jsxs)("div",{className:"client-panel-title",children:[h("Runner")," (",r,")"]}),(0,we.jsx)("sp-label",{children:h("Open ComfyUI in the browser to see more options")}),(0,we.jsxs)("div",{className:"agent-list",children:[(0,we.jsx)("div",{className:`agent-list-item${e==o?" selected":""}`,onClick:()=>t(o),children:(0,we.jsxs)("span",{children:["\u25CF ",h("PS Webview")]})}),n.map(i=>(0,we.jsx)(mi,{pageInstance:i},i.sid))]})]})};var Be=P(v(),1);function hi({onRequestLogin:e}){return(0,Be.jsxs)("div",{className:"client-panel",children:[(0,Be.jsx)(pi,{}),(0,Be.jsxs)("div",{className:"app-login-container",children:[(0,Be.jsx)("div",{className:"client-panel-title",children:h("Login/Auth")}),(0,Be.jsx)(Tr,{onRequestLogin:e}),(0,Be.jsx)(Rr,{})]})]})}var H=P(v(),1);function gi(){let{backendURL:e,setBackendURL:t,connectState:r,doConnectOrDisconnect:o}=E(),n=r==="connected"||r==="connecting"?{disabled:!0}:{};(0,Pe.useEffect)(()=>{e&&r==="disconnected"&&setTimeout(()=>{o()},1e3)},[]);let i=(0,Pe.useRef)(!1);return(0,Pe.useEffect)(()=>()=>{i.current=!0},[]),(0,Pe.useEffect)(()=>()=>{r==="connected"&&i.current&&o()},[r]),(0,H.jsxs)(H.Fragment,{children:[r==="connected"?(0,H.jsx)(Js,{}):(0,H.jsx)("sp-textfield",{id:"url-bar",label:"backendURL",onInput:s=>{t(s.currentTarget.value)},...n,value:e||"",placeholder:gr}),(0,H.jsx)("sp-action-button",{id:"connect-btn",onClick:()=>{o()},children:r!=="disconnected"?"\u2297":"\u2192"})]})}function Js(){let[e,t]=(0,Pe.useState)(""),[r,o]=(0,Pe.useState)(""),{workflowAgentSID:n}=Ne(),{comfyMultiUser:i}=E(),{webviewAgentSID:s,timeoutError:a,loadError:c,toggleWebviewDialog:p}=ue(),l=(0,Pe.useRef)(null),{ssid:d,lastError:m,progress:u,executingNodeTitle:f,queueSize:g}=Ar(n),y=n&&g?`(${g})`:"";(0,Pe.useEffect)(()=>{n?n&&(u?t(`(${u}% - ${f}...)`):(t(""),o(""))):i&&!D.data.comfyUserToken?t(h("--multi-user Not Login!")):(a||c)&&o(h("Error: {0}",c||h("timeout")))},[n,m,u,f,a,c,i]);let b="";return s==n?b=h("PS Webview"):n&&d?b=h("Browser {0}",d):b=h("Loading..."),(0,H.jsxs)("div",{className:"connect-configuration",onClick:()=>{l.current?.show()},children:[(0,H.jsx)("dialog",{ref:l,style:{margin:"0",width:"480px",height:"540px",padding:"8px"},onClick:w=>{w.stopPropagation()},children:(0,H.jsx)(hi,{onRequestLogin:async()=>{l.current?.close(),await new Promise(w=>setTimeout(w,300)),p()}})}),(0,H.jsxs)("div",{className:"connect-config-content",children:[(0,H.jsxs)("span",{children:["\u23F5 ",h("Runner"),": ",b," ",y]}),r&&(0,H.jsx)("span",{className:"connect-config-error",children:r}),!r&&e&&(0,H.jsx)("span",{className:"connect-config-message",children:e})]}),(0,H.jsx)("div",{className:"connect-config-actions",children:(0,H.jsx)(Ut,{size:.8})})]})}var Pi=P(I(),1);var Ve=class{static makeDocumentDataOptions(t){let r=t.data,o=[`${C.getSpecialDocumentCurrent()}`];return Object.keys(r.documents).forEach(n=>{let i=r.documents[n];o.push(i.identify)}),o}static findDocumentData(t,r){let o=C.is_SPECIAL_DOCUMENT_CURRENT(r)?t.data.activeDocumentID:Ro(r).id;return t.data.documents[o]}static makeLayerOptions(t,r){return r.concat(t.layers.map(n=>n.identify))}static getLayerDirtyID(t,r){return t.layers.find(n=>n.identify===r)?.dirtyID||0}static getCanvasDirtyID(t){return t.canvasDirtyID||0}static getSelectionDirtyID(t){return t.selectionDirtyID||0}};var wi=P(I(),1);var yi=P(I(),1);function be(e){return e=e||12,{flex:`${e} 0 calc(${e/12*100}% - 10px)`,maxWidth:"100%"}}var vt=class extends wi.Component{computeUIWeightCSS(t){return be(t)}};var ot=P(v(),1),qe=class extends vt{state={filter:""};handleSelectUpdate=(t,r)=>{this.props.onSelectUpdate(t,r),this.setState({filter:""})};render(){let{options:t,value:r,name:o}=this.props;return(0,ot.jsxs)("div",{style:{display:"flex",alignItems:"center",...this.computeUIWeightCSS(this.props.uiWeight)},children:[o&&(0,ot.jsx)("sp-label",{style:{flex:1},children:o}),(0,ot.jsx)("sp-picker",{class:"sdppp-dropdown-widget",size:"s",style:this.props.name?{flex:2}:{width:"100%"},children:(0,ot.jsx)("sp-menu",{slot:"options",children:t.map((n,i)=>this.state.filter&&!n.includes(this.state.filter)?"":(0,ot.jsx)("sp-menu-item",{...Or(n)===Or(r)?{selected:!0}:{},onClick:()=>this.handleSelectUpdate(n,i),children:Or(n)},Or(n)))})})]})}};function Or(e){return typeof e=="string"?e:e.content}var bi=P(v(),1),Wr=class e extends Pi.default.Component{state={options:Ve.makeDocumentDataOptions(D)};constructor(t){super(t),D.subscribe("/documents",this.updateOptions)}updateOptions=()=>{let t=Ve.makeDocumentDataOptions(D);this.setState({options:t})};componentwillUnmount(){D.unsubscribe(this.updateOptions)}static getValueIfIsValidOptionOrCurrent(t,r){return!r||r.includes(t)?t:C.getSpecialDocumentCurrent()}static getDerivedStateFromProps(t,r){let o=t.value;if(o){let n=o.split("/"),i=e.getValueIfIsValidOptionOrCurrent(n.slice(1).join("/"),r.options);return C.is_SPECIAL_DOCUMENT_CURRENT(i)?o=C.getSpecialDocumentCurrent():o=i,n[0]!=D.data.uname&&t.onSelectUpdate(D.data.uname+"/"+o,0),Object.assign(r,{value:o})}return null}render(){let t=e.getValueIfIsValidOptionOrCurrent(this.props.value,this.state.options);return(0,bi.jsx)(qe,{uiWeight:this.props.uiWeight,options:this.state.options,onSelectUpdate:(r,o)=>{this.props.onSelectUpdate(D.data.uname+"/"+r,o)},value:t})}};var Si=P(I(),1);var vi=P(v(),1);function pe(e){return(0,vi.jsx)("a",{onClick:e.onClick,children:e.label})}var ke=P(v(),1),Qe=class extends Si.default.Component{state={options:[]};constructor(t){super(t),D.subscribe("/documents",this.updataOptionsAfterDocumentChange)}componentwillUnmount(){D.unsubscribe(this.updataOptionsAfterDocumentChange)}componentDidMount(){this.updateOptions(this.props.documentValue||C.getSpecialDocumentCurrent())}shouldComponentUpdate(t,r){return t.documentValue!=this.props.documentValue&&t.documentValue&&this.updateOptions(t.documentValue),!0}updataOptionsAfterDocumentChange=()=>{this.updateOptions(this.props.documentValue||C.getSpecialDocumentCurrent())};updateOptions=t=>{t=t||this.props.documentValue||C.getSpecialDocumentCurrent();let r=Ve.findDocumentData(D,t);if(!r){this.setState({options:[]});return}let o=Ve.makeLayerOptions(r,C.getSpecialLayerForGet());this.setState({options:o})};render(){let t=this.props.value;if(t)try{t=h(t)}catch{}return(0,ke.jsxs)("div",{className:"sdppp-layer-widget",style:be(this.props.uiWeight),children:[(0,ke.jsx)("div",{className:"sdppp-layer-widget-dropdown",children:(0,ke.jsx)(qe,{uiWeight:12,options:this.state.options,onSelectUpdate:this.props.onSelectUpdate,value:t})}),(0,ke.jsxs)("div",{className:"sdppp-layer-widget-quick-set",children:[(0,ke.jsxs)("sp-label",{children:[h("Quick Set"),":"]}),(0,ke.jsx)(pe,{onClick:async()=>{let r=Je();this.props.onSelectUpdate(r,this.state.options.indexOf(r))},label:h("Selected Layer")}),(0,ke.jsx)(pe,{onClick:async()=>{this.props.onSelectUpdate(C.get_SPECIAL_LAYER_USE_CANVAS(),this.state.options.indexOf(C.get_SPECIAL_LAYER_USE_CANVAS()))},label:h("Canvas")})]})]})}};var Vt=P(xt(),1),St=R("photoshop"),ae=P(I(),1);var Io=P(xt(),1),Mr=R("photoshop"),se=P(I(),1);var Ft=P(v(),1);function Bt({mode:e,setMode:t}){let r=o=>{t(o)};return(0,Ft.jsxs)("div",{className:"widget-mode-selection",children:[(0,Ft.jsx)("button",{className:`widget-mode-selection-button ${e==="manual"?"selected":""}`,onClick:()=>r("manual"),children:h("Manual")}),(0,Ft.jsx)("button",{className:`widget-mode-selection-button ${e==="auto"?"selected":""}`,onClick:()=>r("auto"),children:h("Auto")})]})}var ie=P(v(),1);function Di(e){let[t,r]=(0,se.useState)(""),[o,n]=(0,se.useState)(""),[i,s]=(0,se.useState)("manual"),[a,c]=(0,se.useState)(!1),[p,l]=(0,se.useState)(null),{backendURL:d}=E(),{uploadImage:m}=ee(),{addBeforeWorkflowRunHook:u}=yt(),f=(0,se.useRef)(null),g=(0,se.useCallback)(async()=>{if(i==="manual"&&!a&&p){await e.onValueChange(p);return}try{if(i==="auto"&&await b(t),f.current){let w=await f.current.getBuffer(Io.JimpMime.jpeg),S=await m(w,Ct(6)+".jpeg");S?.name&&(l(S.subfolder+"/"+S.name),c(!1),await e.onValueChange(S.subfolder+"/"+S.name))}}catch(w){console.error(w)}},[i,a,p,e.onValueChange]);(0,se.useEffect)(()=>{let S=u(g);return()=>{S()}},[g]);let y=o;if(!y&&(p||e.value)){let w=p||e.value,S=w.split("/").slice(0,-1).join("/");y=d+(d.endsWith("/")?"":"/")+`api/view?filename=${w}&type=input&subfolder=${S}&rand=`+Math.random()}let b=(0,se.useCallback)(async w=>{let S=await Eo(w);if(!S)return;f.current=S;let A=await Xs(S);r(w),n(A),c(!0)},[]);return(0,ie.jsxs)("div",{className:"image-widget",children:[(0,ie.jsx)("div",{className:"image-widget-left",children:(0,ie.jsx)("img",{src:y,className:"image-widget-image"+(y?"":" image-widget-image-empty")})}),(0,ie.jsxs)("div",{className:"image-widget-right",children:[(0,ie.jsx)(Bt,{mode:i,setMode:s}),i==="manual"&&(0,ie.jsxs)("div",{className:"image-widget-more-quickset",children:[(0,ie.jsx)("sp-label",{children:h("Set As:")}),(0,ie.jsx)(pe,{onClick:()=>{b(Je())},label:h("Selected Layer")}),(0,ie.jsx)(pe,{onClick:()=>{b(C.get_SPECIAL_LAYER_USE_CANVAS())},label:h("Canvas")})]}),i=="auto"&&(0,ie.jsx)("div",{className:"image-widget-layer-widget-container",children:(0,ie.jsx)(Qe,{onSelectUpdate:b,uiWeight:10,value:t})})]})]})}async function Eo(e){if(!Mr.app.activeDocument)return null;try{return await lr.getJimpImage({document_identify:De(Mr.app.activeDocument.id,Mr.app.activeDocument.name),layer_identify:e})}catch(t){throw console.error(t),t}}async function Xs(e){let t=100/Math.max(e.width,e.height);return e=e.clone(),e.scale(t),await e.getBase64(Io.JimpMime.jpeg)}var $=P(v(),1);function Ii(e){let[t,r]=(0,ae.useState)(""),[o,n]=(0,ae.useState)(""),[i,s]=(0,ae.useState)("manual"),[a,c]=(0,ae.useState)(!1),[p,l]=(0,ae.useState)(null),{backendURL:d}=E(),{uploadImage:m}=ee(),{addBeforeWorkflowRunHook:u}=yt(),f=(0,ae.useRef)(null),g=(0,ae.useCallback)(async()=>{if(i==="manual"&&!a&&p){await e.onValueChange(p);return}try{if(i==="auto"&&await b(t),f.current){let w=await f.current.getBuffer(Vt.JimpMime.png),S=await m(w,Ct(6)+".png");S?.name&&(l(S.subfolder+"/"+S.name),c(!1),await e.onValueChange(S.subfolder+"/"+S.name))}}catch(w){console.error(w)}},[i,a,p,e.onValueChange]);(0,ae.useEffect)(()=>{let w=u(g);return()=>{w()}},[g]);let y=o;if(!y&&(p||e.value)){let w=p||e.value,S=w.split("/").slice(0,-1).join("/");y=d+(d.endsWith("/")?"":"/")+`api/view?filename=${w}&type=input&subfolder=${S}&rand=`+Math.random()}let b=(0,ae.useCallback)(async(w,S=!1)=>{let A=await Eo(w);if(!A)return;S&&A.scan(0,0,A.bitmap.width,A.bitmap.height,function(ge,te,k){A.bitmap.data[k+3]=255-A.bitmap.data[k+3]}),f.current=A;let he=await Ci(A);r(w),n(he),c(!0)},[]);return(0,$.jsxs)("div",{className:"image-widget",children:[(0,$.jsx)("div",{className:"image-widget-left",children:(0,$.jsx)("img",{src:y,className:"image-widget-image"+(y?"":" image-widget-image-empty")})}),(0,$.jsxs)("div",{className:"image-widget-right",children:[(0,$.jsx)(Bt,{mode:i,setMode:w=>{s(w)}}),i==="manual"&&(0,$.jsxs)("div",{className:"image-widget-more-quickset",children:[(0,$.jsx)("sp-label",{children:h("Set As:")}),(0,$.jsx)(pe,{onClick:()=>{b(Je(),!1)},label:h("Selected Layer")}),(0,$.jsx)(pe,{onClick:async()=>{b(Je(),!0)},label:h("Selected Layer (invert)")}),(0,$.jsx)(pe,{onClick:()=>{b(C.get_SPECIAL_LAYER_USE_CANVAS())},label:h("Canvas")}),(0,$.jsx)(pe,{onClick:async()=>{let w=await Zs();if(!w)return;f.current=w;let S=await Ci(w);r(""),n(S),c(!0)},label:h("Selection")})]}),i==="auto"&&(0,$.jsx)("div",{className:"image-widget-layer-widget-container",children:(0,$.jsx)(Qe,{onSelectUpdate:w=>{b(w,!1)},uiWeight:12,value:t})})]})]})}async function Zs(){if(!St.app.activeDocument)return null;try{let e=await Nt({document_identify:De(St.app.activeDocument.id,St.app.activeDocument.name),boundary:{left:0,top:0,right:0,bottom:0,width:St.app.activeDocument.width,height:St.app.activeDocument.height}});if(!e?.blob)return null;let t=e.blob,r=new Uint8Array(t.length*4);for(let o=0;oe.nodeIndexes.map(m=>{let u=e.nodes[m],f=(w,S,A)=>w.keepRender?S.outputType==="error"?(w.result.push((0,Y.jsx)("span",{className:"list-error-label",children:t[u.id][A]})),w):(o?.(w,u,S,A),w):w,g=Object.values(e.groups).find(w=>w.nodeIDs.includes(u.id)),y=g?.color||"rgba(127, 127, 127, .4)";if(s&&g?.id!==s)return null;let b=u.uiWeightSum<=8&&u.widgets.length==1&&(u.widgets[0].outputType!=="number"||!e.extraOptions?.useSliderForNumberWidget);return(0,Y.jsxs)("div",{className:"workflow-edit-field",children:[(0,Y.jsx)("div",{className:"workflow-edit-field-title",title:u.title,style:{...be(b?4:12),borderColor:y},children:i?i(u.title,u):(0,Y.jsx)("span",{children:u.title})}),u.widgets.reduce(f,{keepRender:!0,result:[]}).result.map((w,S)=>(0,Y.jsx)(Ao,{children:w},S)),r[u.id]?(0,Y.jsx)("span",{className:"list-error-label",children:r[u.id]}):""]},u.id)}).filter(Boolean),[e,t,r,o,n,i,s]),[p,l]=(0,nt.useMemo)(()=>[Object.keys(r).filter(m=>e.nodes[parseInt(m)]),Object.keys(r).filter(m=>!e.nodes[parseInt(m)])],[r,e]),d=null;return l.length>0?d=(0,Y.jsx)("span",{className:"list-error-label",children:r[+l[0]]}):p.length>0&&(d=(0,Y.jsx)("span",{className:"list-error-label",children:r[+p[0]]})),(0,Y.jsxs)(Y.Fragment,{children:[d,Object.keys(e.nodes).length?"":(0,Y.jsx)("span",{className:"list-error-label",children:h("no suitable node to control in this workflow")}),(0,Y.jsx)("div",{className:"workflow-edit-content",children:c})]})}var Ao=class extends nt.default.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}componentDidCatch(t,r){this.setState({hasError:!0,error:t})}render(){return this.state.hasError?(0,Y.jsx)("span",{className:"list-error-label",children:this.state.error?.stack||this.state.error?.message||this.state.error?.toString()}):this.props.children}};var Ke=P(I(),1);var Ge=P(v(),1),Ei=e=>{let{inputMin:t,inputMax:r,inputStep:o,value:n=0,onValueChange:i,name:s,uiWeight:a,extraOptions:c}=e,[p,l]=(0,Ke.useState)(+n.toFixed(3));(0,Ke.useEffect)(()=>{l(+n.toFixed(3))},[n]);let d=(0,Ke.useCallback)(g=>{let y=+g.target.value;l(+y.toFixed(3))},[]),m=(0,Ke.useCallback)(()=>{i(p)},[p,i]),u=(0,Ke.useCallback)(g=>{let y=+g.target.value;l(+y.toFixed(3)),i(+y.toFixed(3))},[p,i]);return!((r-t)/o>1e3)&&a&&a>=1&&c?.useSliderForNumberWidget?(0,Ge.jsxs)("div",{style:{...be(a),display:"flex",alignItems:"center"},children:[(0,Ge.jsx)("sp-slider",{style:{width:"60%"},min:t,max:r,step:o,value:p,onInput:u,"show-value":"false",class:"sdppp-slider"}),(0,Ge.jsx)("sp-textfield",{style:{width:"40%"},onInput:d,onBlur:m,value:p})]}):(0,Ge.jsxs)("div",{style:{...be(a),display:"flex",alignItems:"center"},children:[s&&(0,Ge.jsx)("sp-label",{style:{flex:"1"},children:s}),(0,Ge.jsx)("sp-textfield",{style:s?{flex:"2"}:{width:"100%"},onInput:d,onBlur:m,value:p})]})};var z=P(I(),1);var Dt=P(v(),1);function Ai(e){let t=z.default.useRef(null),[r,o]=(0,z.useState)(0),[n,i]=(0,z.useState)(e.value??""),[s,a]=(0,z.useState)(!1);return(0,z.useEffect)(()=>{s||i(e.value??"")},[e.value]),(0,z.useEffect)(()=>{let c=setInterval(()=>{if(t.current){let p=t.current.offsetHeight;p!==r&&o(p)}},16);return()=>clearInterval(c)},[r]),(0,Dt.jsxs)("div",{className:"widget-container",style:{...be(e.uiWeight),position:"relative",height:Math.max(55,r)},children:[(0,Dt.jsx)(ea,{textAreaValue:n,setTextAreaValue:i,editing:s,setEditing:a,onValueChange:e.onValueChange,hiddenDivHeight:r}),(0,Dt.jsx)("p",{ref:t,style:{fontSize:14,visibility:"hidden",whiteSpace:"pre-line"},children:n})]})}function ea({textAreaValue:e,onValueChange:t,editing:r,setEditing:o,setTextAreaValue:n,hiddenDivHeight:i}){let[s,a]=(0,z.useState)(0),c=(0,z.useCallback)(u=>{let f=u.target.value;t(f),n(f)},[t,n]),p=(0,z.useCallback)(()=>{o(!0)},[o]),l=(0,z.useCallback)(()=>{let u={textfieldRerender:s,editing:!1};s==2&&(u.textfieldRerender=1),a(u.textfieldRerender),o(u.editing)},[s,a,o]),[d,m]=(0,z.useState)(i);return(0,z.useEffect)(()=>{i!=d&&(a(r?2:1),m(i))},[i]),(0,z.useEffect)(()=>{s==1&&Promise.resolve().then(async()=>{await new Promise(requestAnimationFrame),a(0)})},[s]),s==1?"":(0,Dt.jsx)("sp-textarea",{style:{position:"absolute",height:"100%",width:"100%",top:0,left:0},value:e,onInput:c,onFocus:p,onBlur:l})}var Li=P(v(),1),Ur=class extends vt{onInput=t=>{let r=!!t.target.value;this.setState({value:r}),this.props.onValueChange(r)};render(){let t=this.props.value?{checked:!0}:{};return(0,Li.jsx)("sp-checkbox",{label:this.props.name||"",style:{...this.computeUIWeightCSS(this.props.uiWeight)},onInput:r=>{this.props.onValueChange(r.target.checked)},...t,children:this.props.name||""})}};function _i(e){return e.replace(/^workflows\//,"").replace(/\.json$/,"")}var J=P(v(),1);function ki(){let{callForPSDExtract:e}=ee(),{workflowAgent:t}=E(),{setWidgetValue:r}=Zn(),{setShouldTriggerLivePainting:o}=Cr(),{state:n}=fe(t,["/widgetTableValue","/widgetTableStructure","/widgetTableErrors"]),i=!!t?.data.hasPSDNodes,s=(0,_o.useCallback)(async(d,m,u,f)=>{await r(d,m,u),o(!0)},[r,o]),a=n?.widgetTableStructure,c=n?.widgetTableValue,p=n?.widgetTableErrors,l=(0,_o.useCallback)((d,m,u,f)=>{if(u.outputType=="PS_DOCUMENT")return d.result.push((0,J.jsx)(Wr,{uiWeight:u.uiWeight||12,value:c?.[m.id]?.[f]||"",onSelectUpdate:g=>{s(m.id,f,g,m)},extraOptions:a?.extraOptions},f)),!0;if(u.outputType=="PS_LAYER"){let g=u.options?.documentNodeID||0,y=c?.[g]?.[0]||"";return d.result.push((0,J.jsx)(Qe,{uiWeight:u.uiWeight||12,value:c?.[m.id]?.[f]||"",documentValue:y?y.split("/").pop():"",onSelectUpdate:b=>{s(m.id,f,b,m)},extraOptions:a?.extraOptions},f)),!0}else{if(u.outputType=="IMAGE_PATH")return d.result.push((0,J.jsx)(Di,{uiWeight:u.uiWeight||12,value:c?.[m.id]?.[f]||"",onValueChange:async g=>{await s(m.id,f,g,m)},extraOptions:a?.extraOptions},f)),!0;if(u.outputType=="MASK_PATH")return d.result.push((0,J.jsx)(Ii,{uiWeight:u.uiWeight||12,value:c?.[m.id]?.[f]||"",onValueChange:async g=>{await s(m.id,f,g,m)},extraOptions:a?.extraOptions},f)),!0;if(u.outputType==="number"){let g=u.options?.min??0,y=u.options?.max??100,b=u.options?.step??1;d.result.push((0,J.jsx)(Ei,{uiWeight:u.uiWeight||12,name:u.name,inputMin:g,inputMax:y,inputStep:b,value:parseFloat(c?.[m.id]?.[f]||"0"),onValueChange:w=>{s(m.id,f,w,m)},extraOptions:a?.extraOptions},f))}else if(u.outputType==="combo")d.result.push((0,J.jsx)(qe,{uiWeight:u.uiWeight||12,name:u.name,options:u.options?.values||[],onSelectUpdate:g=>{s(m.id,f,g,m)},value:c?.[m.id]?.[f]||"",extraOptions:a?.extraOptions},f));else if(u.outputType==="toggle")d.result.push((0,J.jsx)(Ur,{uiWeight:u.uiWeight||12,name:u.name,value:c?.[m.id]?.[f]||"",onValueChange:g=>{s(m.id,f,g,m)},extraOptions:a?.extraOptions},f));else{let g=c?.[m.id]?.[f]||"";d.result.push((0,J.jsx)(Ai,{uiWeight:u.uiWeight||12,value:typeof g=="string"?g:JSON.stringify(g),onValueChange:y=>{s(m.id,f,y,m)},extraOptions:a?.extraOptions},f))}}return!1},[r,c]);return a?(0,J.jsxs)("div",{className:"workflow-edit",children:[(0,J.jsxs)("div",{className:"workflow-edit-title",children:[a.widgetTablePath&&(0,J.jsx)("sp-label",{style:{fontWeight:"bold"},children:_i(a.widgetTablePath)}),i?(0,J.jsx)("a",{onClick:()=>{e(t?.data.sid||"").catch(d=>{alert(d.message)})},children:">"+h("sample .psd")}):""]}),(0,J.jsx)(Lo,{widgetTableStructure:a,widgetTableValue:c||{},widgetTableErrors:p||{},onWidgetChange:s,onWidgetRender:l})]}):null}var Fr=P(I(),1);var q=P(v(),1);function xi(){let{login:e,loginStyle:t,loginBannerTop:r,loginBannerBottom:o}=We(),[n,i]=(0,Fr.useState)(localStorage.getItem("last-username")||""),[s,a]=(0,Fr.useState)(""),[c,p]=(0,Fr.useState)("");return(0,q.jsxs)("div",{className:"login-container",children:[r,(0,q.jsx)("div",{className:"login-container-login",children:(0,q.jsxs)("div",{className:"login-form",children:[t==="invitation"?(0,q.jsxs)("div",{className:"login-form-item",children:[(0,q.jsx)("label",{htmlFor:"username",children:h("Invitation Code")}),(0,q.jsx)("sp-textfield",{type:"text",id:"username",placeholder:h("Please input invitation code"),value:n,onInput:l=>i(l.target.value)})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("div",{className:"login-form-item",children:[(0,q.jsx)("label",{htmlFor:"username",children:h("Username")}),(0,q.jsx)("sp-textfield",{type:"text",id:"username",placeholder:h("Please input username"),value:n,onInput:l=>i(l.target.value)})]}),(0,q.jsxs)("div",{className:"login-form-item",children:[(0,q.jsx)("label",{htmlFor:"password",children:h("Password")}),(0,q.jsx)("sp-textfield",{type:"password",id:"password",placeholder:h("Please input password"),value:s,onInput:l=>a(l.target.value)})]})]}),(0,q.jsx)("div",{className:"login-error-message",children:c}),(0,q.jsx)("button",{className:"login-button",onClick:async()=>{let l=await e(n,s);l.success?(p(""),localStorage.setItem("last-username",n)):p(l.message)},children:h("Login")})]})}),o]})}var He=P(v(),1);function Ti({renderContent:e}){let{connectState:t}=E(),{isLogin:r}=We();return(0,He.jsxs)(He.Fragment,{children:[(0,He.jsx)(rt,{children:r?e(t,gi,ki):(0,He.jsx)(xi,{})}),t!="connected"&&(0,He.jsx)(di,{})]})}var Ri=P(I(),1);var it=P(v(),1);function Ni(){let e=E(),{toggleWebviewDialog:t}=ue(),r=(0,Ri.useCallback)(()=>{t()},[t]);return(0,it.jsx)("div",{className:"auths-bar",children:(0,it.jsx)("div",{className:"identifier-bar",children:(0,it.jsxs)("div",{className:"identifier-bar-left",children:[(0,it.jsx)(Rr,{}),e.comfyMultiUser&&(0,it.jsx)(Tr,{onRequestLogin:r})]})})})}var qt=P(I(),1),Oi=P(I(),1),Wi=R("uxp"),Br=P(v(),1);function Mi(){let e=document.getElementById("color_computer")?.style.color||"#777",{data:t,isLoading:r}=kr(),o=(0,qt.useRef)(null),[n,i]=(0,qt.useState)(!1),[s,a]=(0,qt.useState)(!1);if((0,Oi.useEffect)(()=>{o.current&&(r||s||(a(!0),o.current.addEventListener("loadstop",l=>{l.target.postMessage({action:"init",payload:{color:e,cloud:p}})}),o.current.addEventListener("loaderror",l=>{i(!0)}),o.current.addEventListener("message",l=>{let d=l.message;if(!d)return;let m=JSON.parse(d);m.action==="open"&&Wi.shell.openExternal(m.payload.url)})))},[o,r]),r||n)return(0,Br.jsx)("div",{style:{height:"8px"}});let c="./promote.html?color="+e,p=t.cloud[$e()=="zhcn"?"zhcn":"en"];return p.length?(0,Br.jsx)("webview",{ref:o,className:"promote-webview",style:{width:"100%",height:"24px"},src:c}):(0,Br.jsx)("div",{style:{height:"8px"}})}Object.assign(globalThis,{SDPPPInternal:ko});})(); +"use strict";(()=>{var qi=Object.create;var Ht=Object.defineProperty;var Ro=Object.getOwnPropertyDescriptor;var Qi=Object.getOwnPropertyNames;var Gi=Object.getPrototypeOf,Ki=Object.prototype.hasOwnProperty;var N=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Ye=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Vr=(e,t)=>{for(var r in t)Ht(e,r,{get:t[r],enumerable:!0})},Hi=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Qi(t))!Ki.call(e,n)&&n!==r&&Ht(e,n,{get:()=>t[n],enumerable:!(o=Ro(t,n))||o.enumerable});return e};var b=(e,t,r)=>(r=e!=null?qi(Gi(e)):{},Hi(t||!e||!e.__esModule?Ht(r,"default",{value:e,enumerable:!0}):r,e));var k=(e,t,r,o)=>{for(var n=o>1?void 0:o?Ro(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(n=(o?s(t,r,n):s(n))||n);return o&&n&&Ht(t,r,n),n};var E=Ye((Ka,Go)=>{"use strict";Go.exports=window.React});var Xo=Ye((nc,Jo)=>{"use strict";var ut=1e3,lt=ut*60,dt=lt*60,tt=dt*24,fs=tt*7,ps=tt*365.25;Jo.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ms(e);if(r==="number"&&isFinite(e))return t.long?gs(e):hs(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ms(e){if(e=String(e),!(e.length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),o=(t[2]||"ms").toLowerCase();switch(o){case"years":case"year":case"yrs":case"yr":case"y":return r*ps;case"weeks":case"week":case"w":return r*fs;case"days":case"day":case"d":return r*tt;case"hours":case"hour":case"hrs":case"hr":case"h":return r*dt;case"minutes":case"minute":case"mins":case"min":case"m":return r*lt;case"seconds":case"second":case"secs":case"sec":case"s":return r*ut;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function hs(e){var t=Math.abs(e);return t>=tt?Math.round(e/tt)+"d":t>=dt?Math.round(e/dt)+"h":t>=lt?Math.round(e/lt)+"m":t>=ut?Math.round(e/ut)+"s":e+"ms"}function gs(e){var t=Math.abs(e);return t>=tt?ir(e,t,tt,"day"):t>=dt?ir(e,t,dt,"hour"):t>=lt?ir(e,t,lt,"minute"):t>=ut?ir(e,t,ut,"second"):e+" ms"}function ir(e,t,r,o){var n=t>=r*1.5;return Math.round(e/r)+" "+o+(n?"s":"")}});var en=Ye((ic,Zo)=>{"use strict";function ys(e){r.debug=r,r.default=r,r.coerce=c,r.disable=s,r.enable=n,r.enabled=a,r.humanize=Xo(),r.destroy=f,Object.keys(e).forEach(d=>{r[d]=e[d]}),r.names=[],r.skips=[],r.formatters={};function t(d){let u=0;for(let g=0;g{if(be==="%%")return"%";I++;let x=r.formatters[ie];if(typeof x=="function"){let G=y[I];be=x.call(v,G),y.splice(I,1),I--}return be}),r.formatArgs.call(v,y),(v.log||r.log).apply(v,y)}return m.namespace=d,m.useColors=r.useColors(),m.color=r.selectColor(d),m.extend=o,m.destroy=r.destroy,Object.defineProperty(m,"enabled",{enumerable:!0,configurable:!1,get:()=>g!==null?g:(l!==r.namespaces&&(l=r.namespaces,p=r.enabled(d)),p),set:y=>{g=y}}),typeof r.init=="function"&&r.init(m),m}function o(d,u){let g=r(this.namespace+(typeof u>"u"?":":u)+d);return g.log=this.log,g}function n(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let u=(typeof d=="string"?d:"").trim().replace(" ",",").split(",").filter(Boolean);for(let g of u)g[0]==="-"?r.skips.push(g.slice(1)):r.names.push(g)}function i(d,u){let g=0,l=0,p=-1,m=0;for(;g"-"+u)].join(",");return r.enable(""),d}function a(d){for(let u of r.skips)if(i(d,u))return!1;for(let u of r.names)if(i(d,u))return!0;return!1}function c(d){return d instanceof Error?d.stack||d.message:d}function f(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Zo.exports=ys});var ar=Ye((se,sr)=>{"use strict";se.formatArgs=vs;se.save=bs;se.load=Ss;se.useColors=ws;se.storage=Ps();se.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();se.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function ws(){if(typeof window<"u"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function vs(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+sr.exports.humanize(this.diff),!this.useColors)return;let t="color: "+this.color;e.splice(1,0,t,"color: inherit");let r=0,o=0;e[0].replace(/%[a-zA-Z%]/g,n=>{n!=="%%"&&(r++,n==="%c"&&(o=r))}),e.splice(o,0,t)}se.log=console.debug||console.log||(()=>{});function bs(e){try{e?se.storage.setItem("debug",e):se.storage.removeItem("debug")}catch{}}function Ss(){let e;try{e=se.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function Ps(){try{return localStorage}catch{}}sr.exports=en()(se);var{formatters:Ds}=sr.exports;Ds.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var S=Ye((ac,on)=>{"use strict";on.exports=window.ReactJSXRuntime});var ln=Ye((dc,un)=>{"use strict";un.exports=window.socketIO});var xt=Ye((Lc,yn)=>{"use strict";yn.exports=window.Jimp});var To={};Vr(To,{Auths:()=>Mi,Promote:()=>Bi,SDPPP:()=>Oi,SDPPPProvider:()=>si,useAgentState:()=>Lr,useSDPPPComfyCaller:()=>oe,useSDPPPContext:()=>We,useSDPPPWebpageList:()=>Ar,useSDPPPWorkflowList:()=>ai});var R=N("photoshop");var Ee=N("photoshop"),Yi=N("uxp");var qr={"SDPPP Get Document":"Get Document","SDPPP Get Layer By ID":"Get Layer","SDPPP Get Linked Layers":"Get Linked Layers","SDPPP Get Layers In Group":"Get Layers In Group","SDPPP Get Text From Layer":"Get Text From Layer","SDPPP Parse Layer Info":"Parse Layer Info","SDPPP Get Selection":"Get Selection","SDPPP Get Image From Photoshop":"Get Image From Photoshop","SDPPP Send Images To Photoshop":"Send Images To Photoshop","SDPPP Select Layer And Run PS Action":"Select Layer And Run PS Action"};var Qr={"### Active Document ###":"### \u5F53\u524D\u6587\u6863 ###","### The Canvas ###":"### \u6574\u4E2A\u753B\u5E03 ###","### New Layer ###":"### \u65B0\u56FE\u5C42 ###","### Selected Layer ###":"### \u6240\u9009\u56FE\u5C42 ###","### Keep Size or Fit Canvas ###":"### \u4FDD\u6301\u5C3A\u5BF8\u6216\u9002\u5E94\u753B\u5E03 ###",_SDPPP_PSD_:"_SDPPP_PSD_","Save and run immediately":"\u4FDD\u5B58\u5E76\u7ACB\u5373\u6267\u884C",Close:"\u5173\u95ED","Select a {0}":"\u9009\u62E9\u4E00\u4E2A {0}","How to use .ccx file":"\u5982\u4F55\u4F7F\u7528 .ccx \u6587\u4EF6","1. If you have installed Adobe Creative Cloud":"1. \u5982\u679C\u4F60\u5DF2\u7ECF\u5B89\u88C5\u4E86 Adobe Creative Cloud","Just double click the .ccx file, it will install the plugin automatically":"\u53CC\u51FB .ccx \u6587\u4EF6\uFF0C\u5B83\u4F1A\u81EA\u52A8\u5B89\u88C5","2. If you don't have Adobe Creative Cloud":"2. \u5982\u679C\u4F60\u6CA1\u6709 Adobe Creative Cloud","Rename .ccx to .zip and extract it into ":"\u5C06 .ccx \u91CD\u547D\u540D\u4E3A .zip \u5E76\u89E3\u538B\u5230",or:"\u6216","Photoshop directory":"Photoshop \u5B89\u88C5\u76EE\u5F55","Cannot connect multiple different document widgets with same value":"\u4E0D\u80FD\u8FDE\u63A5\u591A\u4E2A\u5177\u6709\u76F8\u540C\u503C\u7684\u6587\u6863\u5C0F\u90E8\u4EF6","You can only have one SDPPP Settings node in a workflow":"\u4E00\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u53EA\u80FD\u6709\u4E00\u4E2A SDPPP Settings \u8282\u70B9","convert widget {0} failed:":"\u63A7\u4EF6{0}\u8F6C\u6362\u5931\u8D25\uFF1A","hidden webview load failed: {0}, please select a browser page to continue":"\u5185\u7F6E webview \u52A0\u8F7D\u5931\u8D25: {0}\uFF0C\u8BF7\u9009\u62E9\u4E00\u4E2A\u6D4F\u89C8\u5668\u9875\u9762\u7EE7\u7EED","SDPPP Get Document":"\u83B7\u53D6\u6587\u6863(GetDocument)","SDPPP Get Layer By ID":"\u83B7\u53D6\u56FE\u5C42(GetLayer)","SDPPP Get Linked Layers":"\u83B7\u53D6\u94FE\u63A5\u56FE\u5C42(GetLinkedLayers)","SDPPP Get Layers In Group":"\u83B7\u53D6\u7EC4\u4E2D\u56FE\u5C42(GetLayersInGroup)","SDPPP Get Text From Layer":"\u83B7\u53D6\u56FE\u5C42\u6587\u672C(GetTextFromLayer)","SDPPP Parse Layer Info":"\u89E3\u6790\u56FE\u5C42\u4FE1\u606F(ParseLayerInfo)","SDPPP Get Selection":"\u83B7\u53D6\u9009\u533A(GetSelection)","SDPPP Get Image From Photoshop":"\u4ECEPS\u83B7\u53D6\u56FE\u50CF(GetImageFromPhotoshop)","SDPPP Send Images To Photoshop":"\u53D1\u9001\u56FE\u50CF\u5230PS(SendImagesToPhotoshop)","SDPPP Send Text To Layer":"\u53D1\u9001\u6587\u672C\u5230\u56FE\u5C42(SendTextToLayer)","SDPPP Select Layer And Run PS Action":"\u9009\u4E2D\u56FE\u5C42\u5E76\u8FD0\u884CPS Action(RunPhotoshopAction)","download PS plugin (.ccx)":"\u4E0B\u8F7D Photoshop \u63D2\u4EF6 (.ccx)","current ComfyUI pageid: {0}":"\u5F53\u524D ComfyUI \u9875\u9762ID: {0}","current A1111 pageid: {0}":"\u5F53\u524D A1111 \u9875\u9762ID: {0}","document linked":"\u6587\u6863\u53C2\u6570\u5DF2\u94FE\u63A5","layer linked":"\u56FE\u5C42\u53C2\u6570\u5DF2\u94FE\u63A5","bound linked":"\u8303\u56F4\u53C2\u6570\u5DF2\u94FE\u63A5",document:"\u6587\u6863",Document:"\u6587\u6863",DOCUMENT:"\u6587\u6863",document_name:"\u6587\u6863\u540D\u5B57id",layer_nameid:"\u56FE\u5C42\u540D\u5B57id",layer_name:"\u56FE\u5C42\u540D\u5B57",layer_info:"\u56FE\u5C42\u4FE1\u606F",bound_top:"\u8303\u56F4\u4E0A\u8FB9\u8DDD",bound_left:"\u8303\u56F4\u5DE6\u8FB9\u8DDD",bound_width:"\u8303\u56F4\u5BBD\u5EA6",bound_height:"\u8303\u56F4\u9AD8\u5EA6",center_x:"\u4E2D\u5FC3\u70B9x",center_y:"\u4E2D\u5FC3\u70B9y",opacity:"\u900F\u660E\u5EA6",layer:"\u56FE\u5C42",layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",Layer_or_group:"\u56FE\u5C42(\u6216\u7EC4)",bound:"\u8303\u56F4",bounds:"\u8303\u56F4","bounds [optional]":"\u8303\u56F4[\u53EF\u9009]",boundary:"\u8303\u56F4",Boundary:"\u8303\u56F4",canvas_boundary:"\u753B\u5E03\u8303\u56F4",canvas_bound:"\u753B\u5E03\u8303\u56F4",layer_boundary:"\u56FE\u5C42\u8303\u56F4",layer_bound:"\u56FE\u5C42\u8303\u56F4","Photoshop Disconnected!":"Photoshop \u672A\u8FDE\u63A5\uFF01",rgb_out:"RGB\u8F93\u51FA",alpha_out:"Alpha\u8F93\u51FA",images:"\u56FE\u50CF",text:"\u6587\u672C",ID_mode:"\u7CBE\u786EID\u6A21\u5F0F",name_mode:"\u540D\u5B57\u5339\u914D\u6A21\u5F0F",select:"\u9009\u62E9","document boundary":"\u6587\u6863\u8303\u56F4","layer boundary":"\u56FE\u5C42\u8303\u56F4","selection boundary":"\u9009\u4E2D\u8303\u56F4","save .psd to this workflow":"\u4FDD\u5B58.psd\u5230\u8FD9\u4E2A\u5DE5\u4F5C\u6D41","extract saved .psd to Photoshop":"\u63D0\u53D6\u4FDD\u5B58\u7684.psd\u5230Photoshop","sample .psd":"\u793A\u4F8B.psd",mask:"\u906E\u7F69",name:"\u540D\u79F0",quality:"\u56FE\u50CF\u8D28\u91CF",action_set:"\u52A8\u4F5C\u7EC4",action:"\u52A8\u4F5C",Runner:"\u8FD0\u884C\u8F7D\u4F53","PS Webview":"PS \u5185\u7F6E\u7F51\u9875","Browser {0}":"\u6D4F\u89C8\u5668\u9875\u9762 {0}",timeout:"\u8D85\u65F6","Loading...":"\u52A0\u8F7D\u4E2D...","--multi-user Not Login!":"--multi-user\u5DF2\u6FC0\u6D3B\uFF0C\u4F46\u672A\u767B\u5F55\uFF01",Logout:"\u767B\u51FA","User: ":"\u7528\u6237: ",connect:"\u8FDE\u63A5",connected:"\u5DF2\u8FDE\u63A5",disconnect:"\u65AD\u5F00",disconnected:"\u5DF2\u65AD\u5F00\u8FDE\u63A5","reconnecting...":"\u91CD\u8FDE\u4E2D...",connecting:"\u8FDE\u63A5\u4E2D",webpages:"\u7F51\u9875\u5217\u8868",workflows:"\u5DE5\u4F5C\u6D41",workflow:"\u5DE5\u4F5C\u6D41","auto run page [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u9875\u9762 {0}..","auto run workflow [{0}] after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41 {0}..","auto run workflow after change..":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C\u5DE5\u4F5C\u6D41..",selection_only:"\u4EC5\u9009\u533A","Queue:":"\u961F\u5217:","Set As:":"\u8BBE\u7F6E\u4E3A:","Error {0}... please contact me via Discord/Github":"\u51FA\u73B0\u9519\u8BEF {0}...\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211","Webview initialize failed. Please report to me via Discord/Github with your ComfyURL, Operate System":"Webview \u521D\u59CB\u5316\u5931\u8D25\uFF0C\u8BF7\u901A\u8FC7 QQ/Github \u8054\u7CFB\u6211\u5E76\u9644\u4E0A\u4F60\u7684Comfy\u5730\u5740\u3001\u64CD\u4F5C\u7CFB\u7EDF","ComfyUI with --multi-user is only available for sponsors":'\u5E26"--multi-user"\u7684ComfyUI\u4EC5\u5BF9\u8D5E\u52A9\u8005\u5F00\u653E',"Workflow Runner is loading...":"\u8FD0\u884C\u8F7D\u4F53\u5C1A\u5728\u52A0\u8F7D...","(Page ID: {0})Queue: {1}":"(\u9875\u9762ID: {0}) \u961F\u5217\u957F\u5EA6 {1}","no suitable node to control in this workflow":"\u8FD9\u4E2A\u5DE5\u4F5C\u6D41\u4E2D\u6CA1\u6709\u80FD\u63A7\u5236\u7684\u8282\u70B9",Save:"\u4FDD\u5B58",Edit:"\u7F16\u8F91","Edit in ComfyUI":"\u5728 ComfyUI \u4E2D\u7F16\u8F91","using browser page [{0}] for workflow running":"\u6B63\u63A5\u7BA1\u7F51\u9875 [{0}] \u8FD0\u884C\u5DE5\u4F5C\u6D41","workflow running by hidden webview":"\u5DE5\u4F5C\u6D41\u5728\u9690\u85CF\u7684webview\u4E2D\u8FD0\u884C","Lock Image":"\u9501\u5B9A\u56FE\u50CF","Unlock Image":"\u89E3\u9501\u56FE\u50CF","search...":"\u641C\u7D22...","disabled when running in browser page":"\u63A5\u7BA1\u7F51\u9875\u65F6\u4E0D\u53EF\u7528","only supported in Photoshop":"\u4EC5\u5728 Photoshop \u4E2D\u652F\u6301",Login:"\u767B\u5F55","Invitation Code":"\u9080\u8BF7\u7801",Username:"\u7528\u6237\u540D",Password:"\u5BC6\u7801","Please input invitation code":"\u8BF7\u8F93\u5165\u9080\u8BF7\u7801","Please input username":"\u8BF7\u8F93\u5165\u7528\u6237\u540D","Please input password":"\u8BF7\u8F93\u5165\u5BC6\u7801","Open more ComfyUI pages to see more options here":"\u6253\u5F00\u66F4\u591A ComfyUI \u9875\u9762\u4EE5\u67E5\u770B\u66F4\u591A\u9009\u9879","Comfy multi-user: ":"Comfy \u591A\u7528\u6237: ","Not Login":"\u672A\u767B\u5F55","Comfy API-Key: ":"Comfy API-Key: ","Login/Auth":"\u767B\u5F55/\u8BA4\u8BC1","Logged in by email/password":"\u5DF2\u901A\u8FC7\u90AE\u7BB1/\u5BC6\u7801\u767B\u5F55","Set API Key":"\u8BBE\u7F6E API Key","Please input API key (will reload Runner)":"\u8BF7\u8F93\u5165 API Key (\u4F1A\u91CD\u542F\u8FD0\u884C\u8F7D\u4F53)","### Active Workflow ###":"### \u5F53\u524D\u5DE5\u4F5C\u6D41 ###","### Example SDXL ###":"### \u793A\u4F8BSDXL\u5DE5\u4F5C\u6D41 ###","Open ComfyUI in the browser to see more options":"\u5728\u6D4F\u89C8\u5668\u4E2D\u6253\u5F00 ComfyUI \u4EE5\u5F97\u5230\u66F4\u591A\u9009\u9879","Webview load timeout, please switch to a different runner":"Webview \u52A0\u8F7D\u8D85\u65F6\uFF0C\u8BF7\u5207\u6362\u5230\u5176\u4ED6\u8FD0\u884C\u8F7D\u4F53","Save workflow to ComfyUI":"\u4FDD\u5B58\u5DE5\u4F5C\u6D41\u5230 ComfyUI","Reload workflow":"\u91CD\u65B0\u52A0\u8F7D\u5DE5\u4F5C\u6D41","Stop and cancel all":"\u505C\u6B62\u5E76\u53D6\u6D88\u6240\u6709","Start auto running after change":"\u66F4\u6539\u540E\u81EA\u52A8\u8FD0\u884C","Stop auto run":"\u505C\u6B62\u81EA\u52A8\u8FD0\u884C","Run workflow":"\u8FD0\u884C\u5DE5\u4F5C\u6D41","Run workflow xN":"\u8FD0\u884C\u5DE5\u4F5C\u6D41N\u6B21","502: Maybe the server is not running":"502: \u670D\u52A1\u5668\u53EF\u80FD\u672A\u8FD0\u884C","404: Maybe SDPPP is not installed or failed to run in ComfyUI":"404: \u53EF\u80FD\u5728ComfyUI\u4E2DSDPPP\u672A\u5B89\u88C5\u6216\u8FD0\u884C\u5931\u8D25","{0}. reconnecting...":"{0}. \u91CD\u8FDE\u4E2D...","disconnected to {0} failed {1}":"\u65AD\u5F00\u8FDE\u63A5 {0} \u9519\u8BEF {1}","version mismatch, please reinstall PS plugin":"\u7248\u672C\u4E0D\u5339\u914D\uFF0C\u8BF7\u91CD\u65B0\u5B89\u88C5 PS \u63D2\u4EF6","instance type not recognized":"\u672A\u8BC6\u522B\u7684\u8F6F\u4EF6\u7C7B\u578B","Error: {0}":"\u9519\u8BEF: {0}","Verification Error":"\u9A8C\u8BC1\u9519\u8BEF","document {0} not found":"\u627E\u4E0D\u5230\u6587\u6863: {0}",'only layer kind "TEXT" is supported, invalid layer: {0}':"\u4E0D\u652F\u6301\u975E\u6587\u672C\u56FE\u5C42: {0}","create layer failed":"\u521B\u5EFA\u56FE\u5C42\u5931\u8D25","layer not found {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","no linked layer for {0}":"\u6CA1\u6709\u94FE\u63A5\u56FE\u5C42: {0}","layer {0} is not a group":"\u56FE\u5C42 {0} \u4E0D\u662F\u4E00\u4E2A\u7EC4","no layer in group {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u56FE\u5C42","layer not found: {0}":"\u627E\u4E0D\u5230\u56FE\u5C42: {0}","No upload_name":"\u4E0A\u4F20\u63A5\u53E3\u8FD4\u56DE\u4E86\u5931\u8D25","get pixel of {0} failed":"\u83B7\u53D6\u50CF\u7D20\u5931\u8D25: {0}","merge group failed":"\u5408\u5E76\u7EC4\u5931\u8D25","invalid name: {0}":"\u975E\u6CD5\u7684\u540D\u79F0: {0}","get_layer_info: layer_identify required":"get_layer_info: \u9700\u8981 layer_identify","invalid action: {0}":"\u65E0\u6548\u7684\u64CD\u4F5C: {0}","create document failed":"\u521B\u5EFA\u6587\u6863\u5931\u8D25","create document for preview":"\u521B\u5EFA\u9884\u89C8\u6587\u6863","resize document for preview":"\u8C03\u6574\u9884\u89C8\u6587\u6863\u5C3A\u5BF8","no first related layer in {0}":"\u7EC4 {0} \u4E2D\u6CA1\u6709\u7B2C\u4E00\u4E2A\u76F8\u5173\u56FE\u5C42","imageDataError: data length is not multiple of width * height":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: \u6570\u636E\u957F\u5EA6\u4E0D\u662F\u5BBD\u5EA6 * \u9AD8\u5EA6\u7684\u500D\u6570","imageDataError: originComponents must be 1 or 3":"\u56FE\u50CF\u6570\u636E\u6709\u8BEF: originComponents \u5FC5\u987B\u662F 1 \u6216 3","unexpected connection lost, please try to reconnect":"\u610F\u5916\u65AD\u5F00\u8FDE\u63A5\uFF0C\u8BF7\u5C1D\u8BD5\u91CD\u65B0\u8FDE\u63A5","Workflow list is empty, please save a workflow by Comfy's lastest UI":"\u5DE5\u4F5C\u6D41\u5217\u8868\u4E3A\u7A7A\uFF0C\u8BF7\u5728Comfy\u7684\u65B0\u7248UI\u4E2D\u4FDD\u5B58\u4E00\u4E2A\u5DE5\u4F5C\u6D41","No opened ComfyUI pages":"\u6CA1\u6709\u5DF2\u6253\u5F00\u7684ComfyUI\u9875\u9762","comfyAPI is not initialized, maybe comfyUI is too old":"\u65E0\u6CD5\u83B7\u53D6 ComfyAPI\uFF0C\u53EF\u80FD ComfyUI \u7248\u672C\u592A\u65E7","unsupported channel counts: {0}":"\u4E0D\u652F\u6301\u7684\u901A\u9053\u6570: {0}","Timeout, Maybe the URL is wrong":"\u8D85\u65F6\uFF0C\u53EF\u80FD comfy\u5730\u5740 \u586B\u5199\u9519\u8BEF","Workflow list loading failed: {0}":"\u5DE5\u4F5C\u6D41\u5217\u8868\u52A0\u8F7D\u5931\u8D25: {0}","Please register a user in ComfyUI":"\u8BF7\u5728 ComfyUI \u4E2D\u6CE8\u518C\u4E00\u4E2A\u7528\u6237","GetSelection need Photoshop version 25+":"GetSelection \u9700\u8981 Photoshop 25+ \u7248\u672C","Action {0} not found":"Action {0} \u672A\u627E\u5230","Action set {0} not found":"ActionSet {0} \u672A\u627E\u5230","{0} cannot be used in Photoshop Action Node":"{0} \u4E0D\u80FD\u5728 Photoshop Action \u8282\u70B9\u4E2D\u4F7F\u7528","Group layers":"\u56FE\u5C42\u7EC4","Show All Groups":"\u663E\u793A\u6240\u6709\u7EC4","create document for sent images":"\u7ED9\u53D1\u9001\u7684\u56FE\u7247\u521B\u5EFA\u6587\u6863","show sent images":"\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","fallback show sent images":"\u53D6\u6D88\u663E\u793A\u53D1\u9001\u7684\u56FE\u7247","get content of layer {0}":"\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","fallback get content of layer {0}":"\u53D6\u6D88\u83B7\u53D6\u56FE\u5C42 {0} \u7684\u5185\u5BB9","get layer info":"\u83B7\u53D6\u56FE\u5C42\u4FE1\u606F","sdppp extract PSD":"sdppp \u5BFC\u5165 PSD","sdppp get PSD":"sdppp \u83B7\u53D6 PSD","set text to layer":"\u8BBE\u7F6E\u56FE\u5C42\u7684\u6587\u672C","run Photoshop Action":"sdppp \u8FD0\u884C Photoshop Action","select layer":"sdppp \u9009\u4E2D\u56FE\u5C42","{0} wants to extract a PSD file to Photoshop, are you sure?":"{0} \u60F3\u8981\u91CA\u653E\u4E00\u4E2A.psd\u6587\u4EF6\u5230Photoshop\uFF0C\u786E\u5B9A\u5417\uFF1F","should sdppp refuse extracting PSD to Photoshop in this session anymore?":"\u662F\u5426\u8981\u8BA9 sdppp \u62D2\u7EDD\u672C\u6B21PS\u4F1A\u8BDD\u518D\u6B21\u63A5\u53D7.psd\u91CA\u653E\u8BF7\u6C42\uFF1F","Wide Mode":"\u5BBD\u5C4F\u6A21\u5F0F","Quick Set":"\u5FEB\u901F\u8BBE\u7F6E","Selected Layer":"\u9009\u4E2D\u56FE\u5C42","Selected Layer (invert)":"\u9009\u4E2D\u56FE\u5C42(\u53CD\u5411)",Canvas:"\u753B\u5E03",Selection:"\u9009\u533A",Manual:"\u624B\u52A8\u6A21\u5F0F",Auto:"\u81EA\u52A8\u6A21\u5F0F","This plugin is based on sd-ppp":"\u672C\u63D2\u4EF6\u57FA\u4E8Esd-ppp\u5F00\u53D1","And follows its open source license:":"\u5E76\u9075\u5FAA\u5176\u5F00\u6E90\u534F\u8BAE\uFF1A",Cloud:"\u4E91\u7AEF\u63A8\u8350",Sponsors:"\u8D5E\u52A9","waiting...":"\u865A\u4F4D\u4EE5\u5F85",Links:"\u53CB\u60C5\u94FE\u63A5",Community:"\u793E\u533A","LICENSE:":"\u8BB8\u53EF\u8BC1\uFF1A","Official Site":"\u5B98\u65B9\u7F51\u7AD9",upload:"\u4E0A\u4F20","Simplify Workflow":"\u7B80\u5316\u5DE5\u4F5C\u6D41",Photoshop:"Photoshop","Photoshop plugin settings":"Photoshop \u63D2\u4EF6\u8BBE\u7F6E","Photoshop plugin":"Photoshop \u63D2\u4EF6","SDPPP Settings/Misc":"SDPPP \u8BBE\u7F6E/\u6742\u9879","Sample .PSD for this workflow:":"\u793A\u4F8B.PSD","Download Example .PSD":"\u4E0B\u8F7D\u793A\u4F8B.PSD","Maximum Image Size (px):":"\u6700\u5927\u56FE\u50CF\u5C3A\u5BF8(px)",Download:"\u4E0B\u8F7D",Upload:"\u4E0A\u4F20",Reset:"\u91CD\u7F6E",Refresh:"\u5237\u65B0","Comfy URL (You can copy it to connect ComfyUI in the plugin):":"Comfy\u5730\u5740(\u4F60\u53EF\u4EE5\u590D\u5236\u5B83\u5230\u63D2\u4EF6\u4E2D\u8FDE\u63A5ComfyUI):","use slider for number widget:":"\u6570\u5B57\u63A7\u4EF6\u4F7F\u7528\u6ED1\u5757","Photoshop is not connected":"Photoshop \u672A\u8FDE\u63A5","select...":"\u8BF7\u9009\u62E9","click to edit":"\u70B9\u51FB\u7F16\u8F91","ComfyManager not found, cannot reboot":"Comfy Manager\u672A\u5B89\u88C5\uFF0C\u65E0\u6CD5\u91CD\u542F","Failed to reboot ComfyUI":"\u91CD\u542FComfyUI\u5931\u8D25"};var No=typeof N<"u"?N:void 0,zt="en";typeof navigator<"u"&&navigator.language?zt=navigator.language=="zh-CN"?"zhcn":"en":No&&(zt=No("uxp").host.uiLocale.startsWith("zh")?"zhcn":"en");function h(e,...t){let r=zt=="zhcn"?Qr[e]:e in qr?qr[e]:e;if(!r)throw new Error(`i18n key not found: ${e}`);return r.replace(/{(\d+)}/g,function(o,n){return typeof t[n]<"u"?t[n]:o})}function $e(e,t){return e==t||Qr[e]==t}function je(){return zt}var C=class e{static SPECIAL_DOCUMENT_CURRENT="### Active Document ###";static is_SPECIAL_DOCUMENT_CURRENT(t){return $e(this.SPECIAL_DOCUMENT_CURRENT,t)}static get_SPECIAL_DOCUMENT_CURRENT(){return h(this.SPECIAL_DOCUMENT_CURRENT)}static SPECIAL_LAYER_KEEP_SIZE="### Keep Size or Fit Canvas ###";static is_SPECIAL_LAYER_FIT(t){return $e(this.SPECIAL_LAYER_KEEP_SIZE,t)}static get_SPECIAL_LAYER_FIT(){return h(this.SPECIAL_LAYER_KEEP_SIZE)}static SPECIAL_LAYER_USE_CANVAS="### The Canvas ###";static is_SPECIAL_LAYER_USE_CANVAS(t){return $e(this.SPECIAL_LAYER_USE_CANVAS,t)}static get_SPECIAL_LAYER_USE_CANVAS(){return h(this.SPECIAL_LAYER_USE_CANVAS)}static SPECIAL_LAYER_NEW_LAYER="### New Layer ###";static is_SPECIAL_LAYER_NEW_LAYER(t){return $e(this.SPECIAL_LAYER_NEW_LAYER,t)}static get_SPECIAL_LAYER_NEW_LAYER(){return h(this.SPECIAL_LAYER_NEW_LAYER)}static SPECIAL_LAYER_SELECTED_LAYER="### Selected Layer ###";static is_SPECIAL_LAYER_SELECTED_LAYER(t){return $e(this.SPECIAL_LAYER_SELECTED_LAYER,t)}static get_SPECIAL_LAYER_SELECTED_LAYER(){return h(this.SPECIAL_LAYER_SELECTED_LAYER)}static SPECIAL_LAYER_PREVIEW_DOCUMENT="_SDPPP_PSD_";static is_SPECIAL_LAYER_PREVIEW_DOCUMENT(t){return $e(this.SPECIAL_LAYER_PREVIEW_DOCUMENT,t)}static get_SPECIAL_LAYER_PREVIEW_DOCUMENT(){return h(this.SPECIAL_LAYER_PREVIEW_DOCUMENT)}static getSpecialDocumentCurrent(){return h(e.SPECIAL_DOCUMENT_CURRENT)}static getSpecialLayerForGet(){return[h(e.SPECIAL_LAYER_USE_CANVAS),h(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialLayerForSend(){return[h(e.SPECIAL_LAYER_NEW_LAYER),h(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialDocumentForPreview(){return h(e.SPECIAL_LAYER_PREVIEW_DOCUMENT)}static fixI18n(t){return this.is_SPECIAL_DOCUMENT_CURRENT(t)?this.SPECIAL_DOCUMENT_CURRENT:this.is_SPECIAL_LAYER_NEW_LAYER(t)?this.SPECIAL_LAYER_NEW_LAYER:this.is_SPECIAL_LAYER_PREVIEW_DOCUMENT(t)?this.SPECIAL_LAYER_PREVIEW_DOCUMENT:this.is_SPECIAL_LAYER_USE_CANVAS(t)?this.SPECIAL_LAYER_USE_CANVAS:this.is_SPECIAL_LAYER_SELECTED_LAYER(t)?this.SPECIAL_LAYER_SELECTED_LAYER:t}};function De(e,t,r=0){return"-".repeat(r)+`${t} (id:${e})`}function Ie(e,t){return`${t} (id:${e})`}function zi(e){let t=e.split(" (id:");return{name:t[0],id:parseInt(t[1].slice(0,-1))}}function Oo(e){return zi(e)}function Je(){let e=Ee.app.activeDocument?.activeLayers?.[0];return e?De(e.id,e.name):C.get_SPECIAL_LAYER_USE_CANVAS()}function Wo(e,t,r,o,n){let i=r.left,s=r.top,a=r.right,c=r.bottom,f=a-i,d=c-s,u=o.left,g=o.top,l=o.right,p=o.bottom,m=l-u,y=p-g,v=Math.max(i,u),w=Math.max(s,g),P=Math.min(a,l),I=Math.min(c,p),j=P-v,be=I-w,ie=m*y*n;if(t.length!==ie)throw new Error(`toImageDataArray.length(${t.length}) !== toLength(${ie})`);let x=j*be*n;if(e.length!==x)throw new Error(`fromImageDataArray.length(${e.length}) !== fromLength(${x})`);for(let G=0;G=i&&ze=s&&Gt0?e.activeLayers[0].id:0:C.is_SPECIAL_LAYER_NEW_LAYER(t)?-2:Mo(t)}function Gr(e,t=0,r=""){return e?.layers?e.layers.reduce((o,n)=>{let i=t==0?`/${n.name}`:`${r}/${n.name}`;return o.push({layer:n,path:i,level:t}),o.concat(Gr(n,t+1,i))},[]):[]}function pe(e,t){if(!e.layers)return null;for(let r=0;rt.id==$i(e)))||null}function Uo(e,t){return{name:t.name,opacity:t.opacity/100,boundary:{left:t.bounds?.left||0,top:t.bounds?.top||0,right:e.width-(t.bounds?.right||0),bottom:e.height-(t.bounds?.bottom||0),width:t.bounds?.width||0,height:t.bounds?.height||0},isGroup:t.kind==Ee.constants.LayerKind.GROUP}}function Fo(){let e=localStorage.getItem("sdppp_uid");return(!e||e.length!=3)&&(e=Ct(3),localStorage.setItem("sdppp_uid",e)),e}function Ct(e){let t="",r="abcdefghijklmnopqrstuvwxyz0123456789",o=r.length,n=0;for(;n{o[i]=r.bind(this,i),n.subscribe(t,o[i])})}unsubscribe(t){this.subscribers=this.subscribers.filter(([o,n])=>n!=t);let r=this.subscribersWithoutKey.get(t);r&&this.storeMap.forEach((o,n)=>{o.unsubscribe(r[n])})}addStore(t,r,o){let n=this.createStore(r,o);this.storeMap.set(t,n),this.subscribers.forEach(([i,s])=>{let a=this.subscribersWithoutKey.get(s);a||(a={},this.subscribersWithoutKey.set(s,a)),a[t]=s.bind(this,t),n.subscribe(i,a[t]),i=="/"&&s(t,r,null)})}removeStore(t){let r=this.storeMap.get(t);r&&(this.subscribers.forEach(([o,n])=>{let i=this.subscribersWithoutKey.get(n);i&&(r.unsubscribe(i[t]),o=="/"&&n(t,null,r.data))}),this.storeMap.delete(t))}sync(t){if(t instanceof Array){let r=Array.from(this.storeMap.keys()),o=t.filter(i=>!r.includes(i)),n=r.filter(i=>!t.includes(i));o.forEach(i=>this.addStore(i,{},0)),n.forEach(i=>this.removeStore(i))}else{Array.from(this.storeMap.keys()).filter(o=>!Object.keys(t).includes(o)).forEach(o=>this.removeStore(o));for(let o in t){let{data:n,version:i}=t[o];this.storeMap.has(o)?this.storeMap.get(o)?.sync(n,i):this.addStore(o,n,i)}}}};var Kr={};Vr(Kr,{JsonPatchError:()=>M,_areEquals:()=>At,applyOperation:()=>Xe,applyPatch:()=>at,applyReducer:()=>ts,deepClone:()=>Zi,getValueByPointer:()=>Ze,validate:()=>Vo,validator:()=>er});var Ji=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,n){o.__proto__=n}||function(o,n){for(var i in n)n.hasOwnProperty(i)&&(o[i]=n[i])},e(t,r)};return function(t,r){e(t,r);function o(){this.constructor=t}t.prototype=r===null?Object.create(r):(o.prototype=r.prototype,new o)}}(),Xi=Object.prototype.hasOwnProperty;function Jt(e,t){return Xi.call(e,t)}function Xt(e){if(Array.isArray(e)){for(var t=new Array(e.length),r=0;r=48&&o<=57){t++;continue}return!1}return!0}function Ce(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function It(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function jt(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,r=e.length;t0&&c[d-1]=="constructor"))throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(r&&g===void 0&&(f[l]===void 0?g=c.slice(0,d).join("/"):d==u-1&&(g=t.path),g!==void 0&&p(t,0,e,g)),d++,Array.isArray(f)){if(l==="-")l=f.length;else{if(r&&!Zt(l))throw new M("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index","OPERATION_PATH_ILLEGAL_ARRAY_INDEX",i,t,e);Zt(l)&&(l=~~l)}if(d>=u){if(r&&t.op==="add"&&l>f.length)throw new M("The specified index MUST NOT be greater than the number of elements in the array","OPERATION_VALUE_OUT_OF_BOUNDS",i,t,e);var s=es[t.op].call(t,f,l,e);if(s.test===!1)throw new M("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return s}}else if(d>=u){var s=st[t.op].call(t,f,l,e);if(s.test===!1)throw new M("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return s}if(f=f[l],r&&d0)throw new M('Operation `path` property must start with "/"',"OPERATION_PATH_INVALID",t,e,r);if((e.op==="move"||e.op==="copy")&&typeof e.from!="string")throw new M("Operation `from` property is not present (applicable in `move` and `copy` operations)","OPERATION_FROM_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&e.value===void 0)throw new M("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_REQUIRED",t,e,r);if((e.op==="add"||e.op==="replace"||e.op==="test")&&jt(e.value))throw new M("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)","OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",t,e,r);if(r){if(e.op=="add"){var n=e.path.split("/").length,i=o.split("/").length;if(n!==i+1&&n!==i)throw new M("Cannot perform an `add` operation at the desired path","OPERATION_PATH_CANNOT_ADD",t,e,r)}else if(e.op==="replace"||e.op==="remove"||e.op==="_get"){if(e.path!==o)throw new M("Cannot perform the operation at a path that does not exist","OPERATION_PATH_UNRESOLVABLE",t,e,r)}else if(e.op==="move"||e.op==="copy"){var s={op:"_get",path:e.from,value:void 0},a=Vo([s],r);if(a&&a.name==="OPERATION_PATH_UNRESOLVABLE")throw new M("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new M("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function Vo(e,t,r){try{if(!Array.isArray(e))throw new M("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)at(W(t),W(e),r||!0);else{r=r||er;for(var o=0;otr,generate:()=>Hr,observe:()=>cs,unobserve:()=>as});var zr=new WeakMap,rs=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),os=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function ns(e){return zr.get(e)}function is(e,t){return e.observers.get(t)}function ss(e,t){e.observers.delete(t.callback)}function as(e,t){t.unobserve()}function cs(e,t){var r=[],o,n=ns(e);if(!n)n=new rs(e),zr.set(e,n);else{var i=is(n,t);o=i&&i.observer}if(o)return o;if(o={},n.value=W(e),t){o.callback=t,o.next=null;var s=function(){Hr(o)},a=function(){clearTimeout(o.next),o.next=setTimeout(s)};typeof window<"u"&&(window.addEventListener("mouseup",a),window.addEventListener("keyup",a),window.addEventListener("mousedown",a),window.addEventListener("keydown",a),window.addEventListener("change",a))}return o.patches=r,o.object=e,o.unobserve=function(){Hr(o),clearTimeout(o.next),ss(n,o),typeof window<"u"&&(window.removeEventListener("mouseup",a),window.removeEventListener("keyup",a),window.removeEventListener("mousedown",a),window.removeEventListener("keydown",a),window.removeEventListener("change",a))},n.observers.set(t,new os(t,o)),o}function Hr(e,t){t===void 0&&(t=!1);var r=zr.get(e.object);Yr(r.value,e.object,e.patches,"",t),e.patches.length&&at(r.value,e.patches);var o=e.patches;return o.length>0&&(e.patches=[],e.callback&&e.callback(o)),o}function Yr(e,t,r,o,n){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var i=Xt(t),s=Xt(e),a=!1,c=!1,f=s.length-1;f>=0;f--){var d=s[f],u=e[d];if(Jt(t,d)&&!(t[d]===void 0&&u!==void 0&&Array.isArray(t)===!1)){var g=t[d];typeof u=="object"&&u!=null&&typeof g=="object"&&g!=null&&Array.isArray(u)===Array.isArray(g)?Yr(u,g,r,o+"/"+Ce(d),n):u!==g&&(a=!0,n&&r.push({op:"test",path:o+"/"+Ce(d),value:W(u)}),r.push({op:"replace",path:o+"/"+Ce(d),value:W(g)}))}else Array.isArray(e)===Array.isArray(t)?(n&&r.push({op:"test",path:o+"/"+Ce(d),value:W(u)}),r.push({op:"remove",path:o+"/"+Ce(d)}),c=!0):(n&&r.push({op:"test",path:o,value:e}),r.push({op:"replace",path:o,value:t}),a=!0)}if(!(!c&&i.length==s.length))for(var f=0;fo!=t)}dispatch(t,r){let o=new Map;t.forEach(n=>{this.subscribers.forEach(([i,s])=>{n.path.startsWith(i)&&!o.has(i)&&o.set(i,JSON.stringify(i==="/"?r:Ze(r,i)))})}),o.forEach((n,i)=>{let s=i==="/"?this._data:Ze(this._data,i);n!==JSON.stringify(s)&&this.subscribers.filter(([a,c])=>a===i).forEach(([a,c])=>{let f={};try{f=c(s,JSON.parse(n||{}))}catch(d){console.error(d.stack||d.message||d)}f instanceof Promise&&f.catch(d=>{console.error(d.stack||d.message||d)})})})}};function T(e,t,r){return e.constructor[rr]||(e.constructor[rr]=[]),e.constructor[rr].push(t),{value:function(...o){let n=W(this._data);r.value.apply(this,o);let i=tr(n,this._data);i.length!=0&&(this._mutationRecords.push(...i),this._version+=i.length,this.dispatch(i,n))}}}var et=class extends jr{constructor(t){super(Object.assign({sid:"",ssid:""},t||{}))}setSID(t){this._data.sid=t,this._data.ssid=t.slice(0,4)}};k([T],et.prototype,"setSID",1);var me=class extends et{constructor(t,r){super(t||{uname:"",comfyUserToken:"",isLocal:!1,activeDocumentID:0,documents:{},actions:[],canvasStateID:0,selectionStateID:"",historyStateID:0}),this._version=r||0}setIsLocal(t){this._data.isLocal=t}setUName(t){this._data.uname="PS_"+t}setDocument(t,r){this._data.activeDocumentID=t,this._data.documents=r}setCanvasStateID(t){this._data.canvasStateID=t}setSelectionStateID(t){this._data.selectionStateID=t}setHistoryStateID(t){this._data.historyStateID=t}setComfyUserToken(t){this._data.comfyUserToken=t}setActions(t){this._data.actions=t}};k([T],me.prototype,"setIsLocal",1),k([T],me.prototype,"setUName",1),k([T],me.prototype,"setDocument",1),k([T],me.prototype,"setCanvasStateID",1),k([T],me.prototype,"setSelectionStateID",1),k([T],me.prototype,"setHistoryStateID",1),k([T],me.prototype,"setComfyUserToken",1),k([T],me.prototype,"setActions",1);var K=class extends et{constructor(t,r){super(t||{title:"",webviewFromSid:location.search.match(/webview_fromsid=([^&]+)/)?.[1]||"",progress:0,lastError:"",queueSize:0,executingNodeTitle:"",widgetTableStructure:{widgetTablePath:"",widgetTablePersisted:!1,widgetTableID:"",nodes:{},groups:{},nodeIndexes:[],extraOptions:{}},widgetTableValue:{},widgetTableErrors:{},useSliderForNumberWidget:!1,hasPSDNodes:!1,comfyUserToken:"",comfyOrgLoggedIn:!1,comfyOrgAPIKey:""}),this._version=r||0}setWebviewFromSid(t){this._data.webviewFromSid=t}setTitle(t){this._data.title=t}setProgress(t){this._data.progress=t}setLastError(t){this._data.lastError=t}setQueueSize(t){this._data.queueSize=t}setExecutingNodeTitle(t){this._data.executingNodeTitle=t}setWidgetTableStructure(t){this._data.widgetTableStructure=JSON.parse(JSON.stringify(t))}setWidgetTableValue(t){this._data.widgetTableValue=JSON.parse(JSON.stringify(t))}setWidgetTableErrors(t){this._data.widgetTableErrors=JSON.parse(JSON.stringify(t))}setHasPSDNodes(t){this._data.hasPSDNodes=t}setComfyUserToken(t){this._data.comfyUserToken=t}setComfyOrgLoggedIn(t){this._data.comfyOrgLoggedIn=t}setComfyOrgAPIKey(t){this._data.comfyOrgAPIKey=t}setUseSliderForNumberWidget(t){this._data.useSliderForNumberWidget=t}};k([T],K.prototype,"setWebviewFromSid",1),k([T],K.prototype,"setTitle",1),k([T],K.prototype,"setProgress",1),k([T],K.prototype,"setLastError",1),k([T],K.prototype,"setQueueSize",1),k([T],K.prototype,"setExecutingNodeTitle",1),k([T],K.prototype,"setWidgetTableStructure",1),k([T],K.prototype,"setWidgetTableValue",1),k([T],K.prototype,"setWidgetTableErrors",1),k([T],K.prototype,"setHasPSDNodes",1),k([T],K.prototype,"setComfyUserToken",1),k([T],K.prototype,"setComfyOrgLoggedIn",1),k([T],K.prototype,"setComfyOrgAPIKey",1),k([T],K.prototype,"setUseSliderForNumberWidget",1);var Jr=class extends $t{createStore(t,r){return new K(t,r)}},O=new Jr,D=new me;var qo=e=>{let t,r=new Set,o=(f,d)=>{let u=typeof f=="function"?f(t):f;if(!Object.is(u,t)){let g=t;t=d??(typeof u!="object"||u===null)?u:Object.assign({},t,u),r.forEach(l=>l(t,g))}},n=()=>t,a={setState:o,getState:n,getInitialState:()=>c,subscribe:f=>(r.add(f),()=>r.delete(f))},c=t=e(o,n,a);return a},Qo=e=>e?qo(e):qo;var Xr=b(E(),1);var us=e=>e;function ls(e,t=us){let r=Xr.default.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return Xr.default.useDebugValue(r),r}var Ko=e=>{let t=Qo(e),r=o=>ls(t,o);return Object.assign(r,t),r},Ho=e=>e?Ko(e):Ko;var Ae=N("photoshop");var z=Ho((e,t)=>({canvasDirtyID:0,selectionDirtyID:0,layerDirtyIDs:new Map,documentCache:{},incrementCanvasDirtyID:()=>{e(r=>({canvasDirtyID:r.canvasDirtyID+1})),Zr()},incrementLayerDirtyID:r=>{e(o=>{let n=o.layerDirtyIDs.get(r)||0,i=new Map(o.layerDirtyIDs);return i.set(r,n+1),{layerDirtyIDs:i}}),Zr()},incrementSelectionDirtyID:()=>{e(r=>({selectionDirtyID:r.selectionDirtyID+1})),Zr()},setDocuments:r=>{e({documentCache:r}),Ae.app.activeDocument&&D.setDocument(Ae.app.activeDocument.id,JSON.parse(JSON.stringify(r)))},clearCanvasDirtyID:()=>{e({canvasDirtyID:0})},clearLayerDirtyIDs:()=>{e({layerDirtyIDs:new Map})},clearSelectionDirtyID:()=>{e({selectionDirtyID:0})}}));function Zr(){if(!Ae.app.activeDocument)return;let e=z.getState().documentCache[Ae.app.activeDocument.id];if(e){let t={...e,dirtyID:z.getState().canvasDirtyID,layers:e.layers.map(r=>{let o=z.getState().layerDirtyIDs.get(r.id);return o!==void 0?{...r,dirtyID:o}:r})};z.setState(r=>({documentCache:{...r.documentCache,[Ae.app.activeDocument.id]:t}})),D.setDocument(Ae.app.activeDocument.id,z.getState().documentCache)}}function ct(){try{if(!Ae.app.activeDocument)return;let e=Ae.app.documents.reduce((t,r)=>{let o=Gr(r).map(n=>{let i=n.layer.id;return{level:n.level,id:i,name:n.layer.name,identify:De(i,n.layer.name,n.level),fullPath:n.path,dirtyID:z.getState().layerDirtyIDs.get(i)||0}});return t[r.id]={name:r.name,id:r.id,identify:Ie(r.id,r.name),layers:o,canvasDirtyID:z.getState().canvasDirtyID,selectionDirtyID:z.getState().selectionDirtyID},t},{});z.getState().setDocuments(e)}catch(e){console.error(e)}}function or(){z.getState().incrementCanvasDirtyID()}function Re(e){Array.isArray(e)?e.forEach(t=>{z.getState().incrementLayerDirtyID(t)}):z.getState().incrementLayerDirtyID(e)}function zo(){z.getState().clearCanvasDirtyID(),z.getState().clearLayerDirtyIDs(),ct()}function eo(){z.getState().incrementSelectionDirtyID()}(async()=>{D.setUName(Fo()),ct()})().catch(console.error);R.action.addNotificationListener(["historyStateChanged"],e=>{ds(),(e.commandID==5004||e.commandID==5002)&&(_t(),Re(R.app.activeDocument?.activeLayers.map(t=>t.id)))});R.action.addNotificationListener(["toolModalStateChanged"],(e,t,...r)=>{t.state._value=="exit"&&t.kind._value=="paint"&&(_t(),Re(R.app.activeDocument?.activeLayers.map(o=>o.id)))});R.action.addNotificationListener(["modalStateChanged"],(e,t)=>{t.state._value=="exit"&&(_t(),Re(R.app.activeDocument?.activeLayers.map(r=>r.id)))});R.action.addNotificationListener(["show","hide","transform","fill","crop"],()=>{_t(),Re(R.app.activeDocument?.activeLayers.map(e=>e.id))});R.action.addNotificationListener(["delete","move","copyToLayer"],()=>{ct(),_t(),Re(R.app.activeDocument?.activeLayers.map(e=>e.id))});R.action.addNotificationListener(["newDocument","open","close","make","modalJavaScriptScopeExit"],()=>ct());function _t(){let e=R.app.activeDocument?.historyStates;e&&D.setCanvasStateID(e[e.length-1].id),or()}function ds(){let e=R.app.activeDocument?.historyStates;e&&D.setHistoryStateID(e[e.length-1].id)}function Yo(){D.setSelectionStateID($o+"_"+Lt+"_"+nr)}var Lt=R.app.activeDocument?.id,nr=R.app.activeDocument?.activeLayers.map(e=>e.id).join(","),$o=0;R.action.addNotificationListener(["set"],(e,t)=>{t._target[0]._property=="selection"&&($o++,Yo(),eo())});function jo(){let e=R.app.activeDocument?.activeLayers.map(r=>r.id).join(",");Lt!=R.app.activeDocument?.id&&zo();let t=[];R.app.actionTree.forEach(r=>{r.actions.forEach(o=>{t.push(r.name+"/"+o.name)})}),(D.data.actions.length!=t.length||D.data.actions.some((r,o)=>r!=t[o]))&&D.setActions(t),Lt!=R.app.activeDocument?.id||nr!=e?(Lt=R.app.activeDocument?.id,nr=e,Yo(),eo()):(Lt=R.app.activeDocument?.id,nr=e),requestAnimationFrame(jo)}requestAnimationFrame(jo);setInterval(()=>ct(),5e3);globalThis.sdpppX=globalThis.sdpppX||{};var H=globalThis.sdpppX;var tn=b(ar(),1),rn=[];H.getLogs=()=>rn;localStorage.setItem("debug","sdppp:*");tn.debug.log=(...e)=>{rn.push(e.join(" "))};var wt=b(E(),1);var U=b(E(),1);var _=b(E(),1);var cn=b(S(),1),sn=(0,_.createContext)(null);function an({children:e}){let t=Cs();return(0,_.useEffect)(()=>{window.addEventListener("message",o=>{o.data.action==="webview-connect"&&o.source?.postMessage({action:"webview-connect",payload:{webviewFromSid:D.data.sid}})});let r="";O.subscribe("/",(o,n,i)=>{n?.webviewFromSid==D.data.sid&&(t.setWebviewAgentSID(n?.sid),r||(r=n?.sid)),!n&&i.webviewFromSid==D.data.sid&&t.setWebviewAgentSID(r)})},[]),(0,cn.jsx)(sn.Provider,{value:{webviewAgentSID:t.webviewAgentSID,prevWebviewAgentSID:t.prevWebviewAgentSID,setWebviewAgentSID:t.setWebviewAgentSID,toggleWebviewDialog:t.toggleWebviewDialog,setSrc:t.setSrc,resetWebview:t.resetWebview,timeoutError:t.timeoutError,loadError:t.loadError},children:e})}function J(){let e=(0,_.useContext)(sn);if(!e)throw new Error("useSDPPPWebview must be used within a SDPPPWebviewProvider");return e}function Cs(){let[e,t]=(0,_.useState)(null),[r,o]=(0,_.useState)(null),[n,i]=(0,_.useState)(null),[s,a]=(0,_.useState)(!1),[c,f]=(0,_.useState)(""),[d,u]=(0,_.useState)(""),[g,l]=(0,_.useState)(""),[p,m]=(0,_.useState)(!1),[y,v]=(0,_.useState)(!1),w=(0,_.useRef)(null),[P,I]=(0,_.useState)(!1);(0,_.useEffect)(()=>{let G=()=>{a(!1),u(g),ie()};return n?.addEventListener("close",G),()=>{n?.removeEventListener("close",G)}},[n,g,u,a]),(0,_.useEffect)(()=>{l(d)},[d]),(0,_.useEffect)(()=>{Is(i,o);let G=nn();return t(G),w.current&&clearTimeout(w.current),m(!1),v(!1),w.current=setTimeout(()=>{m(!0)},5e3),G.addEventListener("loadstop",()=>{v(!0)}),G.addEventListener("loaderror",()=>{I(!0)}),()=>{w.current&&clearTimeout(w.current),n?.parentElement?.removeChild(n)}},[]);let[j,be]=(0,_.useState)("");(0,_.useEffect)(()=>{c&&(be(c),j===c?ie():(e?.setAttribute("src",c),r?.setAttribute("src",c)))},[c]);let ie=(0,_.useCallback)(()=>{e?.parentElement?.removeChild(e),a(!1),n?.close();let G=nn();t(G);let ze=c;f(""),be(""),setTimeout(()=>{f(ze)},300)},[e,c]),x=(0,_.useCallback)(()=>{s?(n?.close(),a(!1)):(n?.show(),a(!0))},[n,s]);return{dialogShowing:s,toggleWebviewDialog:x,setSrc:f,webviewAgentSID:d,setWebviewAgentSID:u,prevWebviewAgentSID:g,setPrevWebviewAgentSID:l,resetWebview:ie,anyWebviewLoaded:y,timeoutError:(0,_.useMemo)(()=>p&&!y,[p,y]),loadError:P}}function Is(e,t){let r=document.createElement("dialog");r.className="sdppp-webview",r.style.padding="0",r.style.margin="0",r.style.width="1024px",r.style.height="768px",document.body.appendChild(r),e(r);let o=document.createElement("webview");return o.style.position="relative",o.style.width="1024px",o.style.height="768px",r.appendChild(o),t(o),r}var Le=null;function nn(){Le||(Le=document.createElement("div"),Le.style.position="absolute",Le.style.width="100px",Le.style.height="100px",Le.style.right="0",Le.style.bottom="-10000px",document.body.appendChild(Le));let e=document.createElement("webview");return e.style.width="100px",e.style.height="100px",Le?.appendChild(e),e}var pn=b(ln(),1);var dn=`504 +`;var fn=dn.trim();var to=class{socket;constructor(t){let r="/"+[t.split("/").slice(3).filter(o=>o).join("/"),"sd-ppp/"].filter(o=>o).join("/");t=t.split("/").slice(0,3).join("/"),this.socket=(0,pn.io)(t,{transports:["websocket"],path:r,query:{api_level:fn},rejectUnauthorized:!1,autoConnect:!1}),this.socket.on("connect",()=>{this.socket.io.engine.binaryType="blob"})}get id(){return this.socket.id}connect(){this.socket.connect()}close(){this.socket.close()}};function mn(...e){return e.reduce((t,r)=>r(t),to)}var cr=class{flushing=Promise.resolve();newFlushPending=!1;constructor(t){this.doFlush=t,this.pause()}doFlush;runFlush(){this.newFlushPending||(this.newFlushPending=!0,this.flushing=this.flushing.then(async()=>{await new Promise(t=>requestAnimationFrame(t)),this.newFlushPending=!1,await this.doFlush()}))}pause(){this.flushing=this.flushing.then(t=>new Promise(r=>{this.resume=r})).then(()=>{this.resume=()=>{}})}resume=()=>{}};function hn(e,t){return function(r){return class extends r{constructor(o){super(o),this.socket.on("store_request",(i,s)=>{s({data:e.data,version:e.version})});let n=new cr(async()=>{let{operations:i,fromVersion:s,toVersion:a}=e.flush();await new Promise(c=>{let f=!1;setTimeout(()=>{f||(console.warn("flush timeout"),c())},5e3),this.socket.emit("store_flush",{operations:i,fromVersion:s},d=>{f=!0,c(),d?.error?console.error("flush error",d.error):e.flushDone(a)})})});e.subscribe("/",()=>{n.runFlush()}),this.socket.on("disconnect",()=>{n.pause()}),this.socket.on("connect",()=>{e.setSID(this.socket.id||""),requestAnimationFrame(()=>{this.socket.emit("sdppp_init",{type:t,data:e.data,version:e.version})})}),this.socket.on("sdppp_inited",i=>{n.resume()})}}}}function gn(e,t){return function(r){return class extends r{constructor(o){super(o),this.socket.on("store_flush",n=>{if(n.type!==t)return;let i=e.getStore(n.sid);if(i)i.patchVersionAcceptable(n.fromVersion)?i.patchData(n.operations):(console.warn("patch version not acceptable from",n.fromVersion,"current version is",i.version),this.socket.emit("store_request",{type:t},s=>{e.sync(s)}));else return this.socket.emit("store_request",{sid:n.sid},s=>{e.addStore(s.sid,s.data,s.version)})}),this.socket.on("store_remove",n=>{e.removeStore(n.sid)}),this.socket.on("sdppp_inited",n=>{this.socket.emit("store_request",{type:t},i=>{e.sync(i)})})}}}}async function ro(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=r.selection,n=o&&o.bounds?{left:o.bounds.left,top:o.bounds.top,right:r.width-o.bounds.right,bottom:r.height-o.bounds.bottom,width:o.bounds.width,height:o.bounds.height}:null,i={left:0,top:0,right:0,bottom:0,width:r.width,height:r.height};return{document_boundary:i,selection_boundary:n||i}}var Tt=N("photoshop");var _e=N("photoshop"),oo=class{promise;restore;constructor(){this.restore=()=>{},this.promise=new Promise(t=>{this.restore=t})}add(t){this.promise.then(t)}};_e.core.setExecutionMode({enableErrorStacktraces:!0});var kt=Promise.resolve();async function B(e,t){let r=t.dontRecoverSelection||!1,o=new oo,n=!1,i=[],s=[],a=t.commandName;r||(_e.app.activeDocument.activeLayers.forEach(u=>i.push(u)),t.document&&_e.app.activeDocument.id!=t.document.id&&t.document.activeLayers.forEach(u=>i.push(u)),s=i.map(u=>u.visible),o.add(()=>{i.forEach(u=>{u.selected||(u.selected=!0,n=!0)}),t.document==_e.app.activeDocument&&i.forEach((u,g)=>{u.visible=s[g]})}));let c=null;kt=kt.catch(u=>u).then(()=>new Promise(u=>{g();function g(){_e.core.isModal()?requestAnimationFrame(g):u()}})).then(()=>_e.core.executeAsModal(async function(u,...g){c=t.document?await u.hostControl.suspendHistory({documentID:t.document.id,name:a}):null,o.add(async()=>{await new Promise(requestAnimationFrame),n||c&&u.hostControl.resumeHistory(c)});try{let l=await e(o,u,...g);return o.restore(!0),l}catch(l){throw o.restore(!1),l}},{commandName:a,interactive:!0}));let f=null,d=null;try{await kt}catch(u){d=u}if(n&&(kt=_e.core.executeAsModal(async u=>{i.forEach((g,l)=>{g.visible=s[l]}),c&&u.hostControl.resumeHistory(c)},{commandName:a,interactive:!0}),await kt),d)throw d;return f}var ft=b(xt(),1),wn=b(ar(),1),As=(0,wn.default)("sdppp:getImage");function Ls(e,t){for(let r=0,o=e.length/4;r{i.dispose()}),{dataFromAPI:s,width:i.width,height:i.height}}async function xs(e,t,r){if(!t)return null;let o={documentID:e.id,sourceBounds:r,layerID:t.id},n=null;try{n=await Tt.imaging.getLayerMask(o)}catch(a){return console.warn(a),null}let i=n.imageData;if(!i)return null;let s=await i.getData({});return Promise.resolve().then(()=>{i.dispose()}),{dataFromAPI:s,width:i.width,height:i.height}}async function vn(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=e.layer_identify,n=te(r,o);if(As("getJimpImage",o),e.boundary&&e.boundary.right+e.boundary.left+e.boundary.bottom+e.boundary.top+e.boundary.width+e.boundary.height!=r.width+r.height)throw new Error("The boundary is not for this document");let i=e.boundary?{left:e.boundary.left,top:e.boundary.top,right:r.width-e.boundary.right,bottom:r.height-e.boundary.bottom,width:e.boundary.width,height:e.boundary.height}:{left:0,top:0,right:r.width,bottom:r.height,width:r.width,height:r.height},s={pixelData:null,width:0,height:0},a=null,c,f,d={left:0,top:0,right:r.width,bottom:r.height},u=!1;if(await B(async p=>{let[m,y]=await Yt(r,n);y&&(a=m),a!=null&&p.add(()=>{a.delete()}),[c,f]=await Promise.all([ks(r,m,i),xs(r,m,i)]),d=m?.bounds??d,u=!1,m?u=m.transparentPixelsLocked:C.is_SPECIAL_LAYER_USE_CANVAS(o)&&(u=r.layers.every(v=>v.transparentPixelsLocked))},{commandName:h("get content of layer {0}",o),document:r}),!c)throw new Error(h("get pixel of {0} failed",o));c=ur(c),u&&(c=_s(c)),s.pixelData=lr(c,d,i);let g=null;return f&&(f=ur(f),g=lr(f,d,i,1)),s.pixelData=Ls(s.pixelData,g),s.width=i.width,s.height=i.height,new ft.Jimp({data:Buffer.from(s.pixelData),width:i.width,height:i.height})}async function bn(e){let t=await vn(e),r=t.bitmap.width,o=t.bitmap.height,n=new Uint8Array(r*o);for(let a=0;a{let i=null,s=e.layer_identify,a=!1;if(e.layer_identify){s=e.layer_identify;let c=te(r,s);if(C.is_SPECIAL_LAYER_USE_CANVAS(s))return o={name:"",opacity:1,boundary:{left:0,right:0,top:0,bottom:0,width:r.width,height:r.height},isGroup:!0,identify:s},o;[i,a]=await Yt(r,c),n.add(()=>{i&&a&&i.delete()})}if(!i)throw new Error(h("layer not found: {0}",e.layer_identify));o=Object.assign({isGroup:a,identify:s||""},Uo(r,i))},{commandName:h("get layer info"),document:r}),o}var fr=N("photoshop");async function no(e,t,r){let o=e.select||"all",n=e.document_identify,i=F(n);if(!i)throw new Error(h("document {0} not found",n));let s=e.layer_identifies,a=await Promise.all(s.map(async f=>{let d=te(i,f);if(C.is_SPECIAL_LAYER_USE_CANVAS(f))throw new Error(h("layer not found: {0}",f));let u=pe(i,d);if(!u)throw new Error(h("layer not found {0}",f));r(u);let g=t(u);if(o==="first"&&g.length===0)throw new Error(h("no first related layer in {0}",f));let l=g.filter((p,m)=>o==="first"?m===0:o==="text"?p.kind===fr.constants.LayerKind.TEXT:o==="image"?p.kind===fr.constants.LayerKind.NORMAL:!0).map(p=>De(p.id,p.name));return{layer_identifies:l,layer_infos:await Promise.all(l.map(p=>Rt({document_identify:n,layer_identify:p})))}})),c={layer_identifies:[],layer_boundaries:[],layer_infos:[]};return a.forEach(({layer_identifies:f,layer_infos:d})=>{c.layer_identifies.push(...f),c.layer_boundaries.push(...d.map(u=>u.boundary)),c.layer_infos.push(...d)}),c}async function io(e){return no(e,t=>t.layers||[],t=>{if(t.kind!=fr.constants.LayerKind.GROUP)throw new Error(h("layer {0} is not a group",t.name));if(!t.layers)throw new Error(h("layer {0} is not a group",t.name))})}async function so(e){return no(e,t=>t.linkedLayers||[],t=>{if(!t.linkedLayers)throw new Error(h("no linked layer for {0}",t.name))})}var Sn=N("photoshop"),Pn=N("uxp");async function Ts(e,t){let r={documentID:e.id,sourceBounds:t},n=(await Sn.imaging.getSelection(r)).imageData,i=await n.getData({});return Promise.resolve().then(()=>{n.dispose()}),{dataFromAPI:i,width:n.width,height:n.height}}async function Nt(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=parseInt(Pn.host.version.split(".")[0]);if(!isNaN(o)&&o<25)throw new Error(h("GetSelection need Photoshop version 25+"));let n=e.boundary?{left:e.boundary.left,top:e.boundary.top,right:r.width-e.boundary.right,bottom:r.height-e.boundary.bottom,width:e.boundary.width,height:e.boundary.height}:{left:0,top:0,right:r.width,bottom:r.height,width:r.width,height:r.height};if(!r.selection?.bounds){let s=new Uint8Array(n.width*n.height);return s.fill(255),{blob:s,width:n.width,height:n.height}}let i=null;return await B(async s=>{let a=await Ts(r,n);a=ur(a);let c=r.selection.bounds||{left:0,top:0,right:r.width,bottom:r.height};i=a&&lr(a,c,n,1)},{document:r,commandName:"SDPPP getSelection"}),{blob:i,width:n.width,height:n.height}}var he=N("photoshop");async function ao(e){let{identifier:t}=e;if(C.is_SPECIAL_DOCUMENT_CURRENT(t)){if(!he.app.activeDocument){if(e.width&&e.height){let r=await Rs(e.width,e.height);if(r)return{value:Ie(r.id,r.name)}}throw new Error(h("document {0} not found",t))}return{value:Ie(he.app.activeDocument.id,he.app.activeDocument.name)}}else if(C.is_SPECIAL_LAYER_SELECTED_LAYER(t)){if(!he.app.activeDocument)return{error:h("document {0} not found","current")};let r=he.app.activeDocument.activeLayers[0];return r?{value:De(r.id,r.name)}:{error:h("layer not found {0}",t)}}}async function Rs(e,t){if(he.app.activeDocument)return he.app.activeDocument;let r=null;return await B(async()=>{r=await he.app.createDocument({width:e,height:t,resolution:72,mode:he.constants.NewDocumentMode.RGB,fill:he.constants.DocumentFill.TRANSPARENT})},{document:null,commandName:h("create document for sent images")}),r}var Dn=N("photoshop");async function co(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=e.layer_identify,n=te(r,o),i={text:""},s=pe(r,n);if(!s||s.kind!=Dn.constants.LayerKind.TEXT)throw new Error(h('only layer kind "TEXT" is supported, invalid layer: {0}',o));return i.text=s.textItem.contents,{text:i.text}}var ae=N("photoshop"),pt=N("uxp");var pr=0,Cn=0,Ns=5e3;async function uo(e){let t=e.document_identify,r=t?F(t):null;if(e.action==="get"){let o;return await B(async function(n){if(r||(r=await Os()),!r)throw new Error(h("create document failed"));r=await r.duplicate(),n.add(async()=>{r?.close()});let s=await(await pt.storage.localFileSystem.getTemporaryFolder()).createEntry("sdppp.psd",{overwrite:!0});await r.saveAs.psd(s,{maximizeCompatibility:!1,typename:"PhotoshopSaveOptions"}),o=await s.read({format:pt.storage.formats.binary})},{commandName:h("sdppp get PSD"),document:r}),o?{data:o}:{error:"save Document failed"}}else if(e.action==="extract"){if(Date.now()-Cn2||!confirm(h("{0} wants to extract a PSD file to Photoshop, are you sure?",e.fromSSID))){pr++,pr==3&&(confirm(h("should sdppp refuse extracting PSD to Photoshop in this session anymore?"))||pr--);return}Cn=Date.now();let o=e.data;await B(async function(){if(r||(r=await ae.app.createDocument({width:512,height:512,resolution:72,mode:ae.constants.NewDocumentMode.RGB,fill:ae.constants.DocumentFill.TRANSPARENT})),!r)throw new Error(h("document {0} not found",t));ae.app.activeDocument=r,r.selection?.deselect();let n=await o.arrayBuffer(),s=await(await pt.storage.localFileSystem.getTemporaryFolder()).createEntry("sdppp.psd",{overwrite:!0});await s.write(n,{format:pt.storage.formats.binary});let a=pt.storage.localFileSystem.createSessionToken(s),c=await r.createLayer(ae.constants.LayerKind.NORMAL,{name:"sdppp"});if(!c)throw new Error(h("create layer failed"));c.move(r.layers[0],ae.constants.ElementPlacement.PLACEBEFORE),await ae.action.batchPlay([{_obj:"placeEvent",null:{_kind:"local",_path:a},freeTransformCenterState:{_enum:"quadCenterState",_value:"QCSAverage"},offset:{_obj:"offset",horizontal:{_unit:"pixelsUnit",_value:0},vertical:{_unit:"pixelsUnit",_value:0}}},{_obj:"placedLayerConvertToLayers"},{_obj:"ungroupLayersEvent",_target:[{_enum:"ordinal",_ref:"layer"}]}],{synchronousExecution:!0})},{commandName:h("sdppp extract PSD"),document:r,dontRecoverSelection:!0})}else throw new Error(h("invalid action: {0}",e.action))}async function Os(){return await ae.app.createDocument({width:512,height:512,resolution:72,mode:ae.constants.NewDocumentMode.RGB,fill:ae.constants.DocumentFill.TRANSPARENT})}var mr=N("photoshop");async function lo(e){let{action:t}=e,{document_identify:r,layer_identify:o}=e,[n,i]=t.split("/")||[],s=mr.app.actionTree.find(g=>g.name===n);if(!s)throw new Error(h("Action set {0} not found",n));let a=s.actions.find(g=>g.name===i);if(!a)throw new Error(h("Action {0} not found",i));let c=F(r);if(!c)throw new Error(h("document {0} not found",r));let f=c,d=te(f,o),u=pe(f,d);return u&&await B(async()=>{f.activeLayers.forEach(g=>{g.selected=!1}),u.selected=!0},{commandName:h("select layer"),dontRecoverSelection:!0,document:mr.app.activeDocument}),await B(async()=>{await a.play()},{commandName:h("run Photoshop Action"),document:mr.app.activeDocument}),{result:{success:!0}}}var hr=b(xt(),1),ce=N("photoshop");async function Ws(e,t){let r=ce.app.documents.find(o=>o.name==C.getSpecialDocumentForPreview());if(r)return(r.width{await r.resizeCanvas(Math.max(r.width,e),Math.max(r.height,t))},{document:null,commandName:h("resize document for preview")}),r;{let o=null;return await B(async()=>{o=await ce.app.createDocument({width:e,height:t,resolution:72,mode:ce.constants.NewDocumentMode.RGB,fill:ce.constants.DocumentFill.TRANSPARENT,name:C.getSpecialDocumentForPreview()})},{document:null,commandName:h("create document for preview")}),o}}var In=0;async function fo(e){In++;let t=e.image_blobs?.length?e.image_blobs:null,r=e.image_urls?.length?e.image_urls:null,o=e.document_identify,n=e.layer_identifies,i=(await Promise.all((r||t||[]).map(async(l,p)=>{if(r)return await hr.Jimp.read(r[p]);if(t){if("pngData"in t[p])return await hr.Jimp.read(await t[p].pngData.arrayBuffer());{let m=t[p].buffer,y=m instanceof Blob?await m.arrayBuffer():m;return new hr.Jimp({data:Buffer.from(y),width:t[p].width,height:t[p].height})}}}))).filter(l=>l),s=F(o);if(C.is_SPECIAL_LAYER_PREVIEW_DOCUMENT(o)&&(s=await Ws(i[0].bitmap.width,i[0].bitmap.height)),!s)throw new Error(h("document {0} not found",o));let a=s,c=i.map((l,p)=>{if(e.boundaries&&e.boundaries[p])return{width:e.boundaries[p].width,height:e.boundaries[p].height,top:e.boundaries[p].top,left:e.boundaries[p].left};let m=1;return(l.bitmap.height>a.height||l.bitmap.width>a.width)&&(m=Math.min(a.height/l.bitmap.height,a.width/l.bitmap.width)),{width:l.bitmap.width*m,height:l.bitmap.height*m,top:(a.height-l.bitmap.height*m)/2,left:(a.width-l.bitmap.width*m)/2,bottom:(a.height-l.bitmap.height*m)/2,right:(a.width-l.bitmap.width*m)/2}});i.forEach((l,p)=>{let m=c[p];if(l.bitmap.width!=m.width||l.bitmap.height!=m.height){let y={w:m.width,h:m.height};l.resize(y)}});let f=await Promise.all(i.map(async l=>{let p=l.bitmap.data;if(a.bitsPerChannel=="bitDepth16"){let y=new Uint16Array(p.length);for(let v=0;v{let p=null;u=await Promise.all(i.map(async(m,y)=>{let v=n.length==1?n[0]:n[y];if(!C.is_SPECIAL_LAYER_NEW_LAYER(v)){let w=te(a,v);p=pe(a,w)}if(p&&p.kind!=ce.constants.LayerKind.GROUP)return p;{let w=e.new_layer_name||"SDPPP Images";typeof H.handleSendLayerName=="function"&&(w=await H.handleSendLayerName(w));let P=await a.createLayer(ce.constants.LayerKind.NORMAL,{name:`${w} ${In}${i.length>1?`_${y+1}`:""}`});if(!P)throw new Error(h("create layer failed"));return d.push(P),p?P.move(p,ce.constants.ElementPlacement.PLACEINSIDE):P.move(a.layers[0],ce.constants.ElementPlacement.PLACEBEFORE),P}})),d.length&&l.add(m=>{m?d.forEach((y,v)=>{y.selected=!1}):d.forEach(y=>y.delete())}),await Promise.all(u.map(async(m,y)=>{await ce.imaging.putPixels({documentID:a.id,layerID:m.id,replace:!1,imageData:f[y],targetBounds:c[y]})})),Re(u.map(m=>m.id)),or()},{commandName:h("show sent images"),document:a});let g=z.getState();return{layers:u.map(l=>({identify:De(l.id,l.name),dirtyID:g.layerDirtyIDs.get(l.id)||0}))}}var En=N("photoshop");async function po(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(h("document {0} not found",t));let o=e.layer_identify,n=te(r,o),i=pe(r,n);if(!i||i.kind!=En.constants.LayerKind.TEXT)throw new Error(h('only layer kind "TEXT" is supported, invalid layer: {0}',o));let s=!1;return await B(async()=>{console.log(e.text),i.textItem.contents=e.text,s=!0},{document:r,commandName:h("set text to layer")}),{success:s}}function An(e){return class extends e{constructor(t){super(t),this.socket.on("B_photoshop",async(r,o)=>{let{action:n,params:i}=r,s;try{console.log("B_photoshop start",n);let a=Date.now();n==="psd"?s=await uo(i):n==="getImage"?s=await dr(i):n==="sendImages"?s=await fo(i):n==="getSelection"?s=await Nt(i):n==="getText"?s=await co(i):n==="sendText"?s=await po(i):n==="getLayerInfo"?s=await Rt(i):n==="getDocumentInfo"?s=await ro(i):n==="getLinkedLayers"?s=await so(i):n==="getLayersInGroup"?s=await io(i):n==="runPhotoshopActionOnLayer"?s=await lo(i):n==="getSpecialIdentifierValue"&&(s=await ao(i));let c=Date.now();console.log("B_photoshop end",n,c-a)}catch(a){console.error(a),o({error:a.stack||a.message||a});return}o(s)})}async callForPSDExtract(t,r){return new Promise((o,n)=>{this.socket.emit("F_photoshop",{action:"extractPSD",sid:t,params:{from_sid:r.from_sid}},i=>{if(i.error)return n(new Error(i.error));o(i)})})}async uploadImage(t,r){return new Promise((o,n)=>{this.socket.emit("F_photoshop",{action:"uploadImage",sid:t,params:r},i=>{if(i.error)return n(new Error(i.error));o(i)})})}}}function Ln(e){return class extends e{constructor(t){super(t),this.socket.on("B_workflow",(r,o)=>{if(r.action=="getStoredWidgetValue"){let{widgetTableID:n,widgetTablePath:i,widgetTablePersisted:s}=r.params,a=`${n}_${i}_${s}`,c=Ms(a),f=[];c&&Object.keys(c||{}).forEach(d=>{Object.keys(c[d]||{}).forEach(u=>{f.push({nodeID:d,widgetIndex:u,value:c[d][u].value,outputType:c[d][u].outputType})})}),o({values:f})}})}async setNodeTitle(t,r,o){await new Promise((n,i)=>{this.socket.emit("F_workflow",{action:"setNodeTitle",sid:t,params:{node_id:r,title:o}},s=>{if(s?.error)return i(new Error(s.error));n(s)})})}async pageInstanceRun(t,r,o=1){await new Promise((n,i)=>{this.socket.emit("F_workflow",{action:"run",sid:t,params:{size:o,from_sid:r}},s=>{if(s?.error)return i(new Error(s.error));n(s)})})}async setWidgetValue(t,r){t&&await new Promise((o,n)=>{this.socket.emit("F_workflow",{action:"setWidgetValue",sid:t.data.sid,params:r},i=>{if(i?.error)return n(new Error(i.error));o(i)})})}async openWorkflow(t,r){t&&await new Promise((o,n)=>{this.socket.emit("F_workflow",{action:"open",sid:t.data.sid,params:r},i=>{if(i?.error)return n(new Error(i.error));o(i)})})}async saveWorkflow(t,r){t&&await new Promise((o,n)=>{this.socket.emit("F_workflow",{action:"save",sid:t.data.sid,params:r},i=>{if(i?.error)return n(new Error(i.error));o(i)})})}async listWorkflows(t,r){return t?await new Promise((o,n)=>{this.socket.emit("F_workflow",{action:"list",sid:t.data.sid,params:r},i=>{o(i)})}):{workflows:[],error:"Workflow agent not found"}}async logout(t){t&&await new Promise((r,o)=>{this.socket.emit("F_workflow",{action:"logout",sid:t.data.sid},n=>{if(n?.error)return o(new Error(n.error));r(n)})})}async interrupt(t){await new Promise((r,o)=>{this.socket.emit("F_workflow",{action:"interrupt",sid:t},n=>{r(n)})})}async clearQueue(t){await new Promise((r,o)=>{this.socket.emit("F_workflow",{action:"clearQueue",sid:t},n=>{r(n)})})}async reboot(t){return await new Promise((r,o)=>{this.socket.emit("F_workflow",{action:"reboot",sid:t},n=>{r(n)})})}async setComfyOrgAPIKey(t,r){return await new Promise((o,n)=>{this.socket.emit("F_workflow",{action:"setComfyOrgAPIKey",sid:t,params:{api_key:r}},i=>{o(i)})})}}}function Ms(e){let t=localStorage.getItem(`widgetValue_${e}`);return t?JSON.parse(t):null}var gr=class extends mn(hn(D,"photoshop"),gn(O,"comfy"),Ln,An){constructor(t,{setConnectState:r,setLastErrorMessage:o,setBackendURL:n,setComfyMultiUser:i}){super(t);let s=()=>{this.socket.active&&this.socket.connected?r("connected"):this.socket.active?r("connecting"):r("disconnected"),requestAnimationFrame(s)};requestAnimationFrame(s),this.socket.on("connect_error",async a=>{if(this.socket.active){let c=a.message;try{let f=new AbortController,d=setTimeout(()=>f.abort(),1500),u=await fetch((t+this.socket._opts.path).replace(/(?{n(t),a.multi_user&&i(a.multi_user)}),this.socket.on("disconnect",(...a)=>{i(!1),D.setComfyUserToken("")})}};var _n=b(ar(),1),Tn=b(S(),1),Us=(0,_n.debug)("sdppp:internal"),yr="http://127.0.0.1:8188",kn=(0,U.createContext)(null);function xn({children:e}){let{setSrc:t,webviewAgentSID:r,prevWebviewAgentSID:o}=J(),[n,i]=(0,U.useState)("disconnected"),[s,a]=(0,U.useState)(""),[c,f]=(0,U.useState)(localStorage.getItem("backendURL")||yr),[d,u]=(0,U.useState)(null),[g,l]=(0,U.useState)(""),[p,m]=(0,U.useState)(!1),[y,v]=(0,U.useState)(null),[w,P]=(0,U.useState)([]);function I(x){f(x.split("?")[0].split("#")[0].trim())}(0,U.useEffect)(()=>{localStorage.setItem("backendURL",c)},[c]),(0,U.useEffect)(()=>{if(n==="connected"){a(""),t(`${c}`);let x=!!(c.includes("localhost")||c.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/));Us("setBackendURL:",c,"src:",x),D.setIsLocal(!0)}else t(""),l("")},[n]);function j(){if(n==="connected"||n==="connecting")y&&(y.close(),v(null));else try{let x=y;y||(x=new gr(c||yr,{setConnectState:i,setLastErrorMessage:a,setBackendURL:I,setComfyMultiUser:m}),v(x)),x.connect()}catch(x){a(x.stack||x.message||x)}}(0,U.useEffect)(()=>{let x=(G,ze,Gt)=>{g&&(!ze&&G==g||!(g in O.getAllStore()))&&l("")};return O.subscribe("/",x),()=>{O.unsubscribe(x)}},[g]),(0,U.useEffect)(()=>{!g&&r&&l(r)},[g,r]),(0,U.useEffect)(()=>{r&&(!g||g==o)&&l(r)},[r,o,g,l]);let[be,ie]=(0,U.useState)(null);return(0,U.useEffect)(()=>{ie(g?O.getAllStore()[g]:null)},[g]),(0,Tn.jsx)(kn.Provider,{value:{socket:y,backendURL:c,setBackendURL:I,connectState:n,doConnectOrDisconnect:j,lastErrorMessage:s,setLastErrorMessage:a,autoRunning:d,setAutoRunning:u,comfyMultiUser:p,setComfyMultiUser:m,workflowAgent:be,workflowAgentSID:g,setWorkflowAgentSID:l,beforeWorkflowRunHooks:w,setBeforeWorkflowRunHooks:P},children:e})}function A(){let e=(0,U.useContext)(kn);if(!e)throw new Error("useSDPPPInternalContext must be used within a SDPPPInternalContextProvider");return e}var Rn=b(E(),1);var Nn=b(S(),1),rt=class extends Rn.default.Component{state={hasError:!1,errorMessage:""};constructor(t){super(t)}static getDerivedStateFromError(t){return{hasError:!0,errorMessage:t.toString()}}componentDidCatch(t,r){console.log(t,r)}render(){return this.state.hasError?(0,Nn.jsx)("p",{className:"list-error-label",children:h("Error {0}... please contact me via Discord/Github",this.state.errorMessage)}):this.props.children}};var Ne=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}};var Oe=typeof window>"u"||"Deno"in globalThis;function re(){}function Mn(e,t){return typeof e=="function"?e(t):e}function Un(e){return typeof e=="number"&&e>=0&&e!==1/0}function Fn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ho(e,t){return typeof e=="function"?e(t):e}function Bn(e,t){return typeof e=="function"?e(t):e}function go(e,t){let{type:r="all",exact:o,fetchStatus:n,predicate:i,queryKey:s,stale:a}=e;if(s){if(o){if(t.queryHash!==Ot(s,t.options))return!1}else if(!ht(t.queryKey,s))return!1}if(r!=="all"){let c=t.isActive();if(r==="active"&&!c||r==="inactive"&&c)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||n&&n!==t.state.fetchStatus||i&&!i(t))}function yo(e,t){let{exact:r,status:o,predicate:n,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(mt(t.options.mutationKey)!==mt(i))return!1}else if(!ht(t.options.mutationKey,i))return!1}return!(o&&t.state.status!==o||n&&!n(t))}function Ot(e,t){return(t?.queryKeyHashFn||mt)(e)}function mt(e){return JSON.stringify(e,(t,r)=>mo(r)?Object.keys(r).sort().reduce((o,n)=>(o[n]=r[n],o),{}):r)}function ht(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>ht(e[r],t[r])):!1}function Vn(e,t){if(e===t)return e;let r=On(e)&&On(t);if(r||mo(e)&&mo(t)){let o=r?e:Object.keys(e),n=o.length,i=r?t:Object.keys(t),s=i.length,a=r?[]:{},c=0;for(let f=0;f{setTimeout(t,e)})}function Qn(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Vn(e,t):t}function Gn(e,t,r=0){let o=[...e,t];return r&&o.length>r?o.slice(1):o}function Kn(e,t,r=0){let o=[t,...e];return r&&o.length>r?o.slice(0,-1):o}var Wt=Symbol();function wr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wt?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Fs=class extends Ne{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!Oe&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},vr=new Fs;var Bs=class extends Ne{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!Oe&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(r=>{r(e)}))}isOnline(){return this.#e}},gt=new Bs;function Hn(){let e,t,r=new Promise((n,i)=>{e=n,t=i});r.status="pending",r.catch(()=>{});function o(n){Object.assign(r,n),delete r.resolve,delete r.reject}return r.resolve=n=>{o({status:"fulfilled",value:n}),e(n)},r.reject=n=>{o({status:"rejected",reason:n}),t(n)},r}function Vs(e){return Math.min(1e3*2**e,3e4)}function wo(e){return(e??"online")==="online"?gt.isOnline():!0}var zn=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function br(e){return e instanceof zn}function Sr(e){let t=!1,r=0,o=!1,n,i=Hn(),s=m=>{o||(g(new zn(m)),e.abort?.())},a=()=>{t=!0},c=()=>{t=!1},f=()=>vr.isFocused()&&(e.networkMode==="always"||gt.isOnline())&&e.canRun(),d=()=>wo(e.networkMode)&&e.canRun(),u=m=>{o||(o=!0,e.onSuccess?.(m),n?.(),i.resolve(m))},g=m=>{o||(o=!0,e.onError?.(m),n?.(),i.reject(m))},l=()=>new Promise(m=>{n=y=>{(o||f())&&m(y)},e.onPause?.()}).then(()=>{n=void 0,o||e.onContinue?.()}),p=()=>{if(o)return;let m,y=r===0?e.initialPromise:void 0;try{m=y??e.fn()}catch(v){m=Promise.reject(v)}Promise.resolve(m).then(u).catch(v=>{if(o)return;let w=e.retry??(Oe?0:3),P=e.retryDelay??Vs,I=typeof P=="function"?P(r,v):P,j=w===!0||typeof w=="number"&&rf()?void 0:l()).then(()=>{t?g(v):p()})})};return{promise:i,cancel:s,continue:()=>(n?.(),i),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?p():l().then(p),i)}}var qs=e=>setTimeout(e,0);function Qs(){let e=[],t=0,r=a=>{a()},o=a=>{a()},n=qs,i=a=>{t?e.push(a):n(()=>{r(a)})},s=()=>{let a=e;e=[],a.length&&n(()=>{o(()=>{a.forEach(c=>{r(c)})})})};return{batch:a=>{let c;t++;try{c=a()}finally{t--,t||s()}return c},batchCalls:a=>(...c)=>{i(()=>{a(...c)})},schedule:i,setNotifyFunction:a=>{r=a},setBatchNotifyFunction:a=>{o=a},setScheduler:a=>{n=a}}}var V=Qs();var Pr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Un(this.gcTime)&&(this.#e=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Oe?1/0:5*60*1e3))}clearGcTimeout(){this.#e&&(clearTimeout(this.#e),this.#e=void 0)}};var Yn=class extends Pr{#e;#t;#r;#n;#o;#s;#a;constructor(e){super(),this.#a=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#n=e.client,this.#r=this.#n.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=Ks(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#o?.promise}setOptions(e){this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#r.remove(this)}setData(e,t){let r=Qn(this.state.data,e,this.options);return this.#i({data:r,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),r}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#o?.promise;return this.#o?.cancel(e),t?t.then(re).catch(re):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Bn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Wt||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!Fn(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#o?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#o?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#o&&(this.#a?this.#o.cancel({revert:!0}):this.#o.cancelRetry()),this.scheduleGc()),this.#r.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}fetch(e,t){if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#o)return this.#o.continueRetry(),this.#o.promise}if(e&&this.setOptions(e),!this.options.queryFn){let a=this.observers.find(c=>c.options.queryFn);a&&this.setOptions(a.options)}let r=new AbortController,o=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#a=!0,r.signal)})},n=()=>{let a=wr(this.options,t),c={client:this.#n,queryKey:this.queryKey,meta:this.meta};return o(c),this.#a=!1,this.options.persister?this.options.persister(a,c,this):a(c)},i={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#n,state:this.state,fetchFn:n};o(i),this.options.behavior?.onFetch(i,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==i.fetchOptions?.meta)&&this.#i({type:"fetch",meta:i.fetchOptions?.meta});let s=a=>{br(a)&&a.silent||this.#i({type:"error",error:a}),br(a)||(this.#r.config.onError?.(a,this),this.#r.config.onSettled?.(this.state.data,a,this)),this.scheduleGc()};return this.#o=Sr({initialPromise:t?.initialPromise,fn:i.fetchFn,abort:r.abort.bind(r),onSuccess:a=>{if(a===void 0){s(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(a)}catch(c){s(c);return}this.#r.config.onSuccess?.(a,this),this.#r.config.onSettled?.(a,this.state.error,this),this.scheduleGc()},onError:s,onFail:(a,c)=>{this.#i({type:"failed",failureCount:a,error:c})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:i.options.retry,retryDelay:i.options.retryDelay,networkMode:i.options.networkMode,canRun:()=>!0}),this.#o.start()}#i(e){let t=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Gs(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let o=e.error;return br(o)&&o.revert&&this.#t?{...this.#t,fetchStatus:"idle"}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...e.state}}};this.state=t(this.state),V.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),this.#r.notify({query:this,type:"updated",action:e})})}};function Gs(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:wo(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ks(e){let t=typeof e.initialData=="function"?e.initialData():e.initialData,r=t!==void 0,o=r?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?o??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var $n=class extends Ne{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let o=t.queryKey,n=t.queryHash??Ot(o,t),i=this.get(n);return i||(i=new Yn({client:e,queryKey:o,queryHash:n,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(o)}),this.add(i)),i}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){V.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(r=>go(t,r))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(r=>go(e,r)):t}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){V.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){V.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}};var jn=class extends Pr{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||Hs(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#e.includes(e)||(this.#e.push(e),this.clearGcTimeout(),this.#t.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#e=this.#e.filter(t=>t!==e),this.scheduleGc(),this.#t.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#e.length||(this.state.status==="pending"?this.scheduleGc():this.#t.remove(this))}continue(){return this.#r?.continue()??this.execute(this.state.variables)}async execute(e){this.#r=Sr({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(o,n)=>{this.#n({type:"failed",failureCount:o,error:n})},onPause:()=>{this.#n({type:"pause"})},onContinue:()=>{this.#n({type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#t.canRun(this)});let t=this.state.status==="pending",r=!this.#r.canStart();try{if(!t){this.#n({type:"pending",variables:e,isPaused:r}),await this.#t.config.onMutate?.(e,this);let n=await this.options.onMutate?.(e);n!==this.state.context&&this.#n({type:"pending",context:n,variables:e,isPaused:r})}let o=await this.#r.start();return await this.#t.config.onSuccess?.(o,e,this.state.context,this),await this.options.onSuccess?.(o,e,this.state.context),await this.#t.config.onSettled?.(o,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(o,null,e,this.state.context),this.#n({type:"success",data:o}),o}catch(o){try{throw await this.#t.config.onError?.(o,e,this.state.context,this),await this.options.onError?.(o,e,this.state.context),await this.#t.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,o,e,this.state.context),o}finally{this.#n({type:"error",error:o})}}finally{this.#t.runNext(this)}}#n(e){let t=r=>{switch(e.type){case"failed":return{...r,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...r,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:e.error,failureCount:r.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),V.batch(()=>{this.#e.forEach(r=>{r.onMutationUpdate(e)}),this.#t.notify({mutation:this,type:"updated",action:e})})}};function Hs(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Jn=class extends Ne{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#r=0}#e;#t;#r;build(e,t,r){let o=new jn({mutationCache:this,mutationId:++this.#r,options:e.defaultMutationOptions(t),state:r});return this.add(o),o}add(e){this.#e.add(e);let t=Dr(e);if(typeof t=="string"){let r=this.#t.get(t);r?r.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){let t=Dr(e);if(typeof t=="string"){let r=this.#t.get(t);if(r)if(r.length>1){let o=r.indexOf(e);o!==-1&&r.splice(o,1)}else r[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=Dr(e);if(typeof t=="string"){let o=this.#t.get(t)?.find(n=>n.state.status==="pending");return!o||o===e}else return!0}runNext(e){let t=Dr(e);return typeof t=="string"?this.#t.get(t)?.find(o=>o!==e&&o.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){V.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(r=>yo(t,r))}findAll(e={}){return this.getAll().filter(t=>yo(e,t))}notify(e){V.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(t=>t.state.isPaused);return V.batch(()=>Promise.all(e.map(t=>t.continue().catch(re))))}};function Dr(e){return e.options.scope?.id}function vo(e){return{onFetch:(t,r)=>{let o=t.options,n=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],s=t.state.data?.pageParams||[],a={pages:[],pageParams:[]},c=0,f=async()=>{let d=!1,u=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},g=wr(t.options,t.fetchOptions),l=async(p,m,y)=>{if(d)return Promise.reject();if(m==null&&p.pages.length)return Promise.resolve(p);let v={client:t.client,queryKey:t.queryKey,pageParam:m,direction:y?"backward":"forward",meta:t.options.meta};u(v);let w=await g(v),{maxPages:P}=t.options,I=y?Kn:Gn;return{pages:I(p.pages,w,P),pageParams:I(p.pageParams,m,P)}};if(n&&i.length){let p=n==="backward",m=p?zs:Xn,y={pages:i,pageParams:s},v=m(o,y);a=await l(y,v,p)}else{let p=e??i.length;do{let m=c===0?s[0]??o.initialPageParam:Xn(o,a);if(c>0&&m==null)break;a=await l(a,m),c++}while(ct.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=f}}}function Xn(e,{pages:t,pageParams:r}){let o=t.length-1;return t.length>0?e.getNextPageParam(t[o],t,r[o],r):void 0}function zs(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var bo=class{#e;#t;#r;#n;#o;#s;#a;#i;constructor(e={}){this.#e=e.queryCache||new $n,this.#t=e.mutationCache||new Jn,this.#r=e.defaultOptions||{},this.#n=new Map,this.#o=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#a=vr.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=gt.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#a?.(),this.#a=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#e.build(this,t),o=r.state.data;return o===void 0?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(ho(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(o))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:r})=>{let o=r.data;return[t,o]})}setQueryData(e,t,r){let o=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(o.queryHash)?.state.data,s=Mn(t,i);if(s!==void 0)return this.#e.build(this,o).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return V.batch(()=>this.#e.findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;V.batch(()=>{t.findAll(e).forEach(r=>{t.remove(r)})})}resetQueries(e,t){let r=this.#e;return V.batch(()=>(r.findAll(e).forEach(o=>{o.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t},o=V.batch(()=>this.#e.findAll(e).map(n=>n.cancel(r)));return Promise.all(o).then(re).catch(re)}invalidateQueries(e,t={}){return V.batch(()=>(this.#e.findAll(e).forEach(r=>{r.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0},o=V.batch(()=>this.#e.findAll(e).filter(n=>!n.isDisabled()).map(n=>{let i=n.fetch(void 0,r);return r.throwOnError||(i=i.catch(re)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(o).then(re)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=this.#e.build(this,t);return r.isStaleByTime(ho(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(re).catch(re)}fetchInfiniteQuery(e){return e.behavior=vo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(re).catch(re)}ensureInfiniteQueryData(e){return e.behavior=vo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return gt.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#n.set(mt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#n.values()],r={};return t.forEach(o=>{ht(e,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(e,t){this.#o.set(mt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#o.values()],r={};return t.forEach(o=>{ht(e,o.mutationKey)&&Object.assign(r,o.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ot(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Wt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};var Mt=b(E(),1),Zn=b(S(),1),ei=Mt.createContext(void 0);var So=({client:e,children:t})=>(Mt.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Zn.jsx)(ei.Provider,{value:e,children:t}));var Me=b(E(),1);var X=b(E(),1);var Cr=b(E(),1);function ti(){let{workflowAgent:e,socket:t}=A();return{setWidgetValue:(0,Cr.useCallback)(async(o,n,i)=>{if(!e)throw new Error("workflowAgent not found");await t?.setWidgetValue(e,{values:[{nodeID:o,widgetIndex:n,value:i}]});let s=e.data.widgetTableStructure.widgetTableID,a=e.data.widgetTableStructure.widgetTablePath,c=e.data.widgetTableStructure.widgetTablePersisted,f=`${s}_${a}_${c}`,d=e.data.widgetTableStructure.nodes[o].widgets[n].outputType;Ys(f,o,n,i,d)},[e,t])}}function yt(){let{beforeWorkflowRunHooks:e,setBeforeWorkflowRunHooks:t}=A(),r=(0,Cr.useCallback)(n=>(t(i=>[...i,n]),()=>{t(i=>i.filter(a=>a!==n))}),[t]),o=(0,Cr.useCallback)(async()=>{for(let n=0;n{await e?.setComfyOrgAPIKey(t,v)},[e,t]),n=(0,X.useCallback)(async(v,w)=>{let P=O.getStore(v);if(!P)throw new Error("workflowAgent not found");try{await e?.openWorkflow(P,{workflow_path:w,sdpppID:H.sdpppID,sdpppToken:localStorage.getItem("token")||"",from_sid:D.data.sid,reset:!0})}catch(I){console.error(I)}},[e]),i=(0,X.useCallback)(async v=>{let w=O.getStore(v);if(!w||!w.data.widgetTableStructure.widgetTablePath)throw new Error("workflow not found");if(!w.data.widgetTableStructure.widgetTablePersisted)throw new Error("workflow is not savable");await n(v,w.data.widgetTableStructure.widgetTablePath)},[n]),s=(0,X.useCallback)((v,w=1)=>{e?.pageInstanceRun(v,D.data.sid,w)},[e]),a=(0,X.useCallback)(async v=>{let w=O.getStore(v);if(!w)throw new Error("workflowAgent not found");if(!w.data.widgetTableStructure.widgetTablePath)throw new Error("workflow not found");w.data.widgetTableStructure.widgetTablePath.indexOf("://")===-1&&await e?.saveWorkflow(w,{workflow_path:w.data.widgetTableStructure.widgetTablePath,from_sid:D.data.sid})},[e]),c=(0,X.useCallback)(async v=>{await e?.callForPSDExtract(v,{from_sid:D.data.sid})},[e]),f=(0,X.useCallback)(async v=>{let w=O.getStore(v);if(!w)throw new Error("workflowAgent not found");await e?.logout(w)},[e]),d=(0,X.useCallback)(async(v,w)=>await e?.uploadImage(D.data.sid,{image:v,filename:w,overwrite:!0}),[e]);globalThis.sdppp_action_run=async(v,{workflowPath:w})=>{w?l(w):g()};let u=(0,X.useCallback)(async(v,w=1)=>{!v&&!t||(await r(),await s(v||t,w))},[s,t,r]),g=(0,X.useCallback)(async(v,w=1)=>{await u(v||t,w),Po.action.recordAction?.({name:"sdppp_run",methodName:"sdppp_action_run"},{})},[u]),l=(0,X.useCallback)(async(v,w,P=1)=>{!w&&!t||(await n(w||t,v),u(w||t,P),Po.action.recordAction?.({name:"sdppp_run_"+v,methodName:"sdppp_action_run"},{workflowPath:v}))},[n,g,t]),p=(0,X.useCallback)(async()=>{t&&await e?.interrupt(t)},[e,t]),m=(0,X.useCallback)(async()=>{t&&await e?.clearQueue(t)},[e,t]),y=(0,X.useCallback)(async()=>{if(t)return await e?.reboot(t)},[e,t]);return{openWorkflow:n,reopenWorkflow:i,saveWorkflow:a,runPage:g,runWorkflow:l,callForPSDExtract:c,logout:f,uploadImage:d,interrupt:p,clearQueue:m,reboot:y,setComfyOrgAPIKey:o}}function Ir(){let[e,t]=(0,Me.useState)(!1),[r,o]=(0,Me.useState)(!1),n=(0,Me.useRef)(null),{autoRunning:i,workflowAgent:s}=A(),{runWorkflow:a,runPage:c}=oe();return(0,Me.useEffect)(()=>{if(i&&e&&!r){if(t(!1),i.type=="workflow")s&&!s.data.executingNodeTitle&&(a(i.value,s.data.sid,1),n.current=setTimeout(()=>{o(!1)},1e3));else if(i.type=="page"){let f=O.getStore(i.value);f&&!f.data.executingNodeTitle&&(o(!0),c(i.value),n.current=setTimeout(()=>{o(!1)},1e3))}}},[e,r,i,s,a,c]),(0,Me.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),{setShouldTriggerLivePainting:t}}var ue=b(E(),1);var ni=b(S(),1),$s=15e3,ri=(0,ue.createContext)({});function oi({children:e,loginAppID:t,loginStyle:r,loginBannerTop:o,loginBannerBottom:n}){let[i,s]=(0,ue.useState)(!t),[a,c]=(0,ue.useState)(!1),f=(0,ue.useCallback)(async(p,m="sdppp123456")=>{try{let y=await fetch("https://api.authing.cn/api/v3/signin",{method:"POST",headers:{"Content-Type":"application/json","x-authing-app-id":t,"x-authing-sdk-version":"web:3.0.0"},body:JSON.stringify({connection:"PASSWORD",passwordPayload:{username:p,password:m}})}),v=await y.json();if(y.ok){if(v.statusCode===200)return{success:!0,token:v.data.access_token};if(v.statusCode===403)return{success:!1,message:h("Verification Error")}}else return{success:!1,message:JSON.stringify(v)}}catch(y){return{success:!1,message:y.toString()}}return{success:!1,message:"\u767B\u5F55\u5931\u8D25"}},[]),d=(0,ue.useCallback)(async p=>{if(!p)throw new Error("Token is required");let m="access_token",y="https://api.authing.cn/oidc/token/introspection",v=`token=${encodeURIComponent(p)}&token_type_hint=${encodeURIComponent(m)}&client_id=${encodeURIComponent(t)}`;try{let w=await fetch(y,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:v});if(!w.ok)throw new Error(`Verification failed with status: ${w.status}`);return await w.json()}catch(w){throw console.error("Token verification error:",w),w}},[]),u=(0,ue.useCallback)(async p=>{try{let y=await(await fetch("https://api.authing.cn/api/v3/get-profile",{method:"GET",headers:{Authorization:`Bearer ${p}`,"x-authing-app-id":t}})).json();return y.statusCode===200?{data:y.data,success:!0}:{message:y.message,success:!1}}catch(m){return{success:!1,message:m}}},[]);async function g(p,m="sdppp123456"){let y=await f(p,m);if(y.success){let v=await u(y.token);v.success&&(localStorage.setItem("token",y.token),localStorage.setItem("lastLogin",new Date(v.data.lastLogin).getTime().toString()),s(!0))}return y}async function l(p){if(!localStorage.getItem("lastLogin"))return!1;if((await d(p)).active){let y=await u(p);if(y.success){let v=new Date(y.data.lastLogin).getTime().toString(),w=localStorage.getItem("lastLogin");return v===w}else return!1}return!1}return(0,ue.useEffect)(()=>{if(i){if(t){let p=setInterval(()=>{let m=localStorage.getItem("token");m&&l(m).then(y=>{y||s(!1)})},$s);return()=>{clearInterval(p)}}}else{let p=localStorage.getItem("token");if(!p)return;l(p).then(m=>{m&&s(!0)})}},[i]),(0,ni.jsx)(ri.Provider,{value:{hasAuthingLogin:!!t,loginStyle:r||"none",loginBannerBottom:n||null,loginBannerTop:o||null,isLogin:i,loggedInUsername:i&&localStorage.getItem("last-username")||"",logout:()=>{localStorage.removeItem("token"),s(!1),c(!1)},login:g,setIsTrialing:c,isTrialing:a},children:e})}function ne(){let e=(0,ue.useContext)(ri);if(!e)throw new Error("useSDPPPLogin must be used within a SDPPPLoginProvider");return e}var Ue=b(S(),1),ii=(0,wt.createContext)({});function si({children:e,loginAppID:t,loginStyle:r,loginBannerTop:o,loginBannerBottom:n}){let i=new bo;return(0,Ue.jsx)(So,{client:i,children:(0,Ue.jsx)(rt,{children:(0,Ue.jsx)(an,{children:(0,Ue.jsx)(oi,{loginAppID:t,loginStyle:r,loginBannerTop:o,loginBannerBottom:n,children:(0,Ue.jsx)(xn,{children:(0,Ue.jsx)(js,{children:e})})})})})})}function We(){let e=(0,wt.useContext)(ii);if(!e)throw new Error("SDPPPExternalContext not found");return e}function js({children:e}){let t=J(),r=A(),{logout:o,isLogin:n}=ne();H.registerTestCase&&(globalThis.sdppp_debugPhotoshopInternalContext=r,globalThis.sdppp_debugPhotoshopWebviewContext=t);let{toggleWebviewDialog:i,webviewAgentSID:s}=t,{autoRunning:a,setAutoRunning:c,workflowAgent:f,setWorkflowAgentSID:d,doConnectOrDisconnect:u,lastErrorMessage:g}=r,{setShouldTriggerLivePainting:l}=Ir();return(0,wt.useEffect)(()=>{let p=()=>{l(!0)};return D.subscribe("/canvasStateID",p),()=>{D.unsubscribe(p)}},[l]),(0,Ue.jsx)(ii.Provider,{value:{logout:o,isLogin:n,connectOrDisconnect:u,lastConnectErrorMessage:g,setAutoRunning:c,autoRunning:a,photoshopSID:D.data.sid,webviewAgentSID:s,workflowAgentSID:f?.data.sid||"",setWorkflowAgentSID:d,toggleWebviewDialog:i},children:e})}var Er=b(E(),1);var vt=b(E(),1);function ge(e,t){let[r,o]=(0,vt.useState)(e?{...e.data}:null),[n,i]=(0,vt.useState)(e?{...e.data}:null),s=Array.isArray(t)?t:[t];return(0,vt.useEffect)(()=>{e&&o({...e.data})},[e]),(0,vt.useEffect)(()=>{if(!e)return;let a=s.map(c=>{let f=()=>{i(r),o(e.data)};return e.subscribe(c,f),f});return()=>{a.forEach(c=>{e.unsubscribe(c)})}},[e,t]),{state:r||null,prevState:n||null}}function Ar(){let[e,t]=(0,Er.useState)({}),{state:r}=ge(D,"/comfyUserToken"),o=r?.comfyUserToken;return(0,Er.useEffect)(()=>{let n=!1,i=(s,a,c)=>{n||t(f=>{let d={...f};return a==null?delete d[s]:d[s]=a,d})};return O.subscribe("/",i),()=>{n=!0,O.unsubscribe(i)}},[]),{pageInstances:Object.entries(e).map(([n,i])=>({sid:n,ssid:n.slice(0,4),title:i.title,lastError:i.lastError,isWebview:!!i.webviewFromSid,isCurrentUser:!i.comfyUserToken||i.comfyUserToken==o})).filter(n=>!n.isWebview&&(!o||n.isCurrentUser))}}var ye=b(E(),1);function Js(e){let{state:t}=ge(D,["/comfyUserToken"]),{socket:r,workflowAgentSID:o}=A(),[n,i]=(0,ye.useState)({}),[s,a]=(0,ye.useState)(!1),[c,f]=(0,ye.useState)(null),d=(0,ye.useCallback)(async u=>{if(!u&&!o){i({});return}a(!0);let g=O.getStore(u||o);try{let l=await r?.listWorkflows(g||null,{listMode:H.listMode,sdpppID:H.sdpppID,sdpppToken:localStorage.getItem("token")||""})||{workflows:[],error:"Empty workflow list"};if(l.error){f(new Error(l.error)),a(!1);return}a(!1),f(null),i(l.workflows.reduce((p,m)=>(p[m]={path:m,content:null,error:""},p),{}))}catch(l){a(!1),f(l)}},[r,o]);return(0,ye.useEffect)(()=>{e&&d()},[e]),(0,ye.useEffect)(()=>{t?.comfyUserToken&&d()},[t]),{data:n,isLoading:s,error:c,refetch:d}}function ai(){let{backendURL:e,comfyMultiUser:t}=A(),{workflowAgentSID:r}=We(),[o,n]=(0,ye.useState)(!0),[i,s]=(0,ye.useState)(""),{data:a,isLoading:c,error:f,refetch:d}=Js(e);(0,ye.useEffect)(()=>{if(r)d(),n(!1);else{n(!0);let l=setTimeout(()=>{n(!1)},4e3);return()=>clearTimeout(l)}},[r]);let u=[];if(!c&&!f&&a){let l=[],p=[];Object.keys(a).forEach(m=>{if(m.startsWith(i)){let y=m.slice(i.length).split("://").pop();y&&(y.indexOf("/")==-1?l.push(m):p.push(m.slice(0,m.lastIndexOf("/")+1)))}}),u=[...p.sort((m,y)=>m.localeCompare(y)).map(m=>({path:m,isDir:!0})),...l.map(m=>({path:m,isDir:!1}))].filter((m,y,v)=>v.findIndex(w=>w.path==m.path)===y)}let g="";return f&&(g=f.message),u.length||(g=h("Workflow list is empty, please save a workflow by Comfy's lastest UI")),f&&(g=h("Workflow list loading failed: {0}",f.message)),c&&(g="Loading"),r||(g=h("Workflow Runner is loading...")),{workflows:a,isLoadingWorkflows:c,workflowsError:g,refetchWorkflows:d,afterPropsUpdate4s:o,currentViewingDirectory:i,setCurrentViewingDirectory:s,showingList:u}}function Lr(e){let t=e?O.getStore(e):null,{state:r}=ge(t||null,["/"]);return!r||!e?{sid:"",ssid:"",title:"",lastError:"",isWebview:!1,progress:0,executingNodeTitle:"",queueSize:0}:{sid:e,ssid:r.ssid,title:r.title,lastError:r.lastError,isWebview:!!r.webviewFromSid,progress:r.progress,executingNodeTitle:r.executingNodeTitle,queueSize:r.queueSize}}var pi=b(E(),1);var Fe=b(E(),1);var ci={LICENSE:{name:"BSD3-Clause",url:{en:"https://github.com/zombieyang/sd-ppp/blob/main/LICENSE",zhcn:"https://gitee.com/zombieyang/sd-ppp/blob/main/LICENSE"}},sponsors:[{name:"\u56DB\u559CAI",url:"https://v.douyin.com/hD2X7S717uw/"},{name:"\u82BD\u9EA6AI&\u5218\u9510",url:"https://v.douyin.com/cw4ba7Vn5-w/"},{name:"\u6C90\u6C90AI",url:"https://v.douyin.com/k6yKDEcVgP8/"},{name:"\u68A8\u68A8AI",url:"https://v.douyin.com/55KuUbZVGCM/"}],links:[{name:"\u732B\u54AA\u8001\u5E08Reimagined",url:"https://www.xiaohongshu.com/user/profile/59f1fcc411be101aba7f048f"},{name:"\u6765\u771F\u7684",url:"https://space.bilibili.com/590784254"},{name:"\u54D1\u72D7Egao",url:"https://space.bilibili.com/284721975"}],community:{en:[{name:"Github",url:"https://github.com/zombieyang/sd-ppp"},{name:"Discord",url:"https://discord.gg/9HeGjDvEmn"},{name:"Youtube",url:"https://www.youtube.com/@Github-Zombeeyang/videos"}],zhcn:[{name:"Github",url:"https://github.com/zombieyang/sd-ppp"},{name:"QQ\u9891\u9053",url:"https://pd.qq.com/s/5m42umo28"},{name:"Bilibili",url:"https://space.bilibili.com/44908313"}]},cloud:{en:[],zhcn:[{name:"\u6668\u7FBD\u667A\u4E91",url:"https://www.chenyu.cn/console/login?invitationCode=BUD913",icon:"icons/chenyu.ico",color:"var(--uxp-host-text-color-secondary)"},{name:"\u4ED9\u5BAB\u4E91",url:"https://www.xiangongyun.com/register/NWF5AH",icon:"https://www.xiangongyun.com/favicon.ico",color:"var(--uxp-host-text-color-secondary)"},{name:"Cephalon",url:"https://cephalon.cloud/share/register-landing?invite_id=m95SDj",icon:"icons/cephalon.ico",color:"var(--uxp-host-text-color-secondary)"}]}};var Do=ci,fi="sponsorData",ui={GITEE:"https://gitee.com/zombieyang/sd-ppp/raw/main/sponsors.json",GITHUB:"https://raw.githubusercontent.com/zombieyang/sd-ppp/refs/heads/main/sponsors.json"},Zs=5e3;function Co(){try{let e=localStorage.getItem(fi);if(e)return JSON.parse(e)}catch(e){console.warn("Failed to parse sponsor data from localStorage:",e)}return null}function li(e){try{localStorage.setItem(fi,JSON.stringify(e))}catch(t){console.warn("Failed to save sponsor data to localStorage:",t)}}function kr(e){try{if(!e||typeof e!="object")return console.warn("Invalid sponsor data: not an object"),!1;if(!e.LICENSE||typeof e.LICENSE!="object")return console.warn("Invalid sponsor data: LICENSE is not an object"),!1;if(!e.LICENSE.name)return console.warn("Invalid sponsor data: LICENSE.name is missing"),!1;if(!e.LICENSE.url||typeof e.LICENSE.url!="object")return console.warn("Invalid sponsor data: LICENSE.url is not an object"),!1;if(!e.LICENSE.url.en)return console.warn("Invalid sponsor data: LICENSE.url.en is missing"),!1;if(!e.LICENSE.url.zhcn)return console.warn("Invalid sponsor data: LICENSE.url.zhcn is missing"),!1;if(!Array.isArray(e.sponsors))return console.warn("Invalid sponsor data: sponsors is not an array"),!1;if(!Array.isArray(e.links))return console.warn("Invalid sponsor data: links is not an array"),!1;if(!e.community||typeof e.community!="object")return console.warn("Invalid sponsor data: community is not an object"),!1;if(!Array.isArray(e.community.en)||!Array.isArray(e.community.zhcn))return console.warn("Invalid sponsor data: community.en or community.zhcn is not an array"),!1;if(!e.cloud||typeof e.cloud!="object")return console.warn("Invalid sponsor data: cloud is not an object"),!1;if(!Array.isArray(e.cloud.en)||!Array.isArray(e.cloud.zhcn))return console.warn("Invalid sponsor data: cloud.en or cloud.zhcn is not an array"),!1;for(let t of e.cloud.zhcn)if(!t.name||!t.url||!t.icon||!t.color)return console.warn("Invalid sponsor data: cloud.zhcn item missing required properties"),!1;return!0}catch(t){return console.warn("Error validating sponsor data:",t),!1}}async function di(e){try{let t=await fetch(e);if(!t.ok)throw new Error(`Fetch failed with status: ${t.status}`);let r=await t.json();return kr(r)?r:null}catch(t){return console.warn(`Failed to fetch from ${e}:`,t),null}}var _r=null;function xr(){let[e,t]=Fe.default.useState(!0);if(!_r){let s=Co();_r=new Promise(a=>{let c=!1;di(ui.GITEE).then(f=>{!c&&f&&(c=!0,li(f),a(f),t(!1))}),di(ui.GITHUB).then(f=>{!c&&f&&(c=!0,li(f),a(f),t(!1))}),setTimeout(()=>{c||(c=!0,s&&kr(s)?(a(s),t(!1)):(console.warn("Using default data as fallback"),a(Do),t(!1)))},Zs)})}let[r,o]=Fe.default.useState(()=>{let s=Co();return s&&kr(s)?s:Do});Fe.default.useEffect(()=>{_r&&_r.then(s=>{o(s)}).catch(s=>{console.error("Error in useSponsor:",s);let a=Co();o(a&&kr(a)?a:Do)})},[]);let[n,i]=(0,Fe.useState)(!0);return(0,Fe.useEffect)(()=>{n&&!e&&i(e)},[e]),{data:r,isLoading:n}}var L=b(S(),1);function mi(){let{loginStyle:e}=ne(),{data:t}=xr(),r=(0,pi.useMemo)(()=>t.community[je()=="zhcn"?"zhcn":"en"],[t]);return(0,L.jsxs)("div",{className:"about-card",style:{position:"relative"},children:[e==="none"?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:"about-card-sections about-card-title",children:(0,L.jsxs)("a",{href:t.LICENSE.url[je()=="zhcn"?"zhcn":"en"],children:[h("LICENSE:")," ",t.LICENSE.name]})}),(0,L.jsx)("sp-divider",{}),(0,L.jsx)("h2",{children:h("Sponsors")}),(0,L.jsx)("div",{className:"about-card-sections about-card-sponsors",children:t.sponsors.map(o=>(0,L.jsx)("a",{href:o.url,children:o.name},o.name))}),(0,L.jsx)("sp-divider",{}),(0,L.jsx)("h2",{children:h("Links")}),(0,L.jsx)("div",{className:"about-card-sections about-card-friends-links",children:t.links.map(o=>(0,L.jsx)("a",{href:o.url,children:o.name},o.name))}),(0,L.jsx)("sp-divider",{}),(0,L.jsxs)("h2",{children:["SD-PPP ",h("Community")]})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:"about-card-sections about-card-title",children:(0,L.jsx)("h4",{children:h("This plugin is based on sd-ppp")})}),(0,L.jsx)("div",{className:"about-card-sections about-card-title",children:(0,L.jsx)("h6",{children:h("And follows its open source license:")})}),(0,L.jsx)("div",{className:"about-card-sections about-card-title",children:(0,L.jsx)("a",{href:"https://github.com/zombieyang/sd-ppp/blob/main/LICENSE",children:"LICENSE: BSD3-Clause"})})]}),(0,L.jsx)("div",{className:"about-card-sections about-card-links",children:r.map(o=>(0,L.jsx)("a",{href:o.url,children:o.name},o.name))}),(0,L.jsx)("sp-divider",{}),t.site&&(0,L.jsx)("h1",{children:(0,L.jsx)("a",{href:t.site[je()=="zhcn"?"zhcn":"en"].url,children:t.site[je()=="zhcn"?"zhcn":"en"].name})})]})}var Se=b(E(),1);var hi=b(E(),1),bt=b(S(),1),Ut=class extends hi.default.Component{render(){let t=this.props.size||1;return(0,bt.jsx)("div",{slot:"icon",className:"sdppp-icon",onClick:this.props.onClick,children:(0,bt.jsxs)("svg",{width:20*t,height:20*t,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,bt.jsx)("path",{d:"M5.586 5.586A2 2 0 018.862 7.73a.5.5 0 10.931.365 3 3 0 10-1.697 1.697.5.5 0 10-.365-.93 2 2 0 01-2.145-3.277z",fill:"currentColor"}),(0,bt.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M.939 6.527c.127.128.19.297.185.464a.635.635 0 01-.185.465L0 8.395a7.099 7.099 0 001.067 2.572h1.32c.182 0 .345.076.46.197a.635.635 0 01.198.46v1.317A7.097 7.097 0 005.602 14l.94-.94a.634.634 0 01.45-.186H7.021c.163 0 .326.061.45.186l.939.938a7.098 7.098 0 002.547-1.057V11.61c0-.181.075-.344.197-.46a.634.634 0 01.46-.197h1.33c.507-.76.871-1.622 1.056-2.55l-.946-.946a.635.635 0 01-.186-.465.635.635 0 01.186-.464l.943-.944a7.099 7.099 0 00-1.044-2.522h-1.34a.635.635 0 01-.46-.197.635.635 0 01-.196-.46V1.057A7.096 7.096 0 008.413.002l-.942.942a.634.634 0 01-.45.186H6.992a.634.634 0 01-.45-.186L5.598 0a7.097 7.097 0 00-2.553 1.058v1.33c0 .182-.076.345-.197.46a.635.635 0 01-.46.198h-1.33A7.098 7.098 0 00.003 5.591l.936.936zm.707 1.636c.324-.324.482-.752.479-1.172a1.634 1.634 0 00-.48-1.171l-.538-.539c.126-.433.299-.847.513-1.235h.768c.459 0 .873-.19 1.167-.49.3-.295.49-.708.49-1.167v-.77c.39-.215.807-.388 1.243-.515l.547.547c.32.32.742.48 1.157.48l.015-.001h.014c.415 0 .836-.158 1.157-.479l.545-.544c.433.126.846.299 1.234.512v.784c0 .46.19.874.49 1.168.294.3.708.49 1.167.49h.776c.209.382.378.788.502 1.213l-.545.546a1.635 1.635 0 00-.48 1.17c-.003.421.155.849.48 1.173l.549.55c-.126.434-.3.85-.513 1.239h-.77c-.458 0-.872.19-1.166.49-.3.294-.49.708-.49 1.167v.77a6.09 6.09 0 01-1.238.514l-.54-.54a1.636 1.636 0 00-1.158-.48H6.992c-.415 0-.837.159-1.157.48l-.543.543a6.091 6.091 0 01-1.247-.516v-.756c0-.459-.19-.873-.49-1.167-.294-.3-.708-.49-1.167-.49h-.761a6.094 6.094 0 01-.523-1.262l.542-.542z",fill:"currentColor"})]})})}};var Ft=b(S(),1);function gi(){let{loggedInUsername:e,logout:t}=ne();return(0,Ft.jsxs)("div",{className:"login-block",children:[(0,Ft.jsxs)("div",{className:"api-key-title",children:[H.\u63D2\u4EF6\u540D\u5B57," ID: ",e||"\u672A\u767B\u5F55"]}),(0,Ft.jsx)("div",{className:"logout-btn action-button",onClick:()=>{t()},children:e?h("Logout"):h("Login")})]})}var Tr=b(E(),1);var ke=b(S(),1);function Rr(e){let{state:t}=ge(D,["/comfyUserToken"]),{logout:r}=oe(),{workflowAgentSID:o,workflowAgent:n,comfyMultiUser:i}=A(),{resetWebview:s}=J(),[a,c]=(0,Tr.useState)(!1);if((0,Tr.useEffect)(()=>{if(!n){D.setComfyUserToken("");return}let u=(g,l)=>{let p=t?.comfyUserToken;D.setComfyUserToken(g),p==""&&a&&(s(),c(!1))};return n.subscribe("/comfyUserToken",u),u(n.data.comfyUserToken,""),()=>{n&&n.unsubscribe(u)}},[n,a,s]),!i)return null;if(!H.enableMU&&i)return(0,ke.jsxs)("div",{className:"login-block",children:[(0,ke.jsx)("div",{className:"login-title",children:h("Comfy multi-user: ")}),(0,ke.jsx)("div",{children:h("ComfyUI with --multi-user is only available for sponsors")})]});let f=n&&t?.comfyUserToken,d=t?.comfyUserToken?.split("_")[0]||"";return(0,ke.jsxs)("div",{className:"login-block",children:[(0,ke.jsx)("div",{className:`login-title${f?"":" login-title-secondary"}`,children:h("Comfy multi-user: ")+(f?d:"")}),f?(0,ke.jsx)("div",{className:"logout-btn action-button",onClick:()=>{r(o),c(!1)},children:h("Logout")}):(0,ke.jsx)("div",{className:"logout-btn action-button",onClick:()=>{c(!0),e.onRequestLogin?.()},children:h("Not Login")})]})}var Be=b(S(),1);function Nr(){let{workflowAgent:e}=A(),{state:t}=ge(e,["/comfyOrgAPIKey","/comfyOrgLoggedIn"]),{setComfyOrgAPIKey:r}=oe();return t?t.comfyOrgLoggedIn&&!t.comfyOrgAPIKey?(0,Be.jsxs)("div",{className:"login-block",children:[(0,Be.jsx)("div",{className:"api-key-title",children:"ComfyOrg API Key"}),(0,Be.jsx)("div",{children:h("Logged in by email/password")})]}):(0,Be.jsxs)("div",{className:"login-block",children:[(0,Be.jsx)("div",{className:"api-key-title",children:"ComfyOrg API Key"}),(0,Be.jsx)("div",{className:"logout-btn action-button",onClick:()=>{let o=prompt(h("Please input API key (will reload Runner)"));o&&r(o)},children:h("Set API Key")})]}):null}var Or=b(S(),1),ea=({pageInstance:e})=>{let{autoRunning:t,workflowAgentSID:r,setWorkflowAgentSID:o}=A(),n=r==e.sid,i=t?.value==e.sid;return(0,Or.jsx)("div",{className:`agent-list-item${n?" selected":""}${n||i?" checked":""}`,onClick:()=>o(n?"":e.sid),children:(0,Or.jsxs)("span",{children:["\u25CF [",e.ssid,"] ",e.title]})})},yi=ea;var we=b(S(),1),wi=()=>{let{workflowAgentSID:e,setWorkflowAgentSID:t,backendURL:r}=A(),{webviewAgentSID:o}=J(),{pageInstances:n}=Ar(),{timeoutError:i}=J();return(0,we.jsxs)(we.Fragment,{children:[i?(0,we.jsx)("div",{className:"client-panel-title",children:h("Webview load timeout, please switch to a different runner")}):(0,we.jsxs)("div",{className:"client-panel-title",children:[h("Runner")," (",r,")"]}),(0,we.jsx)("sp-label",{children:h("Open ComfyUI in the browser to see more options")}),(0,we.jsxs)("div",{className:"agent-list",children:[(0,we.jsx)("div",{className:`agent-list-item${e==o?" selected":""}`,onClick:()=>t(o),children:(0,we.jsxs)("span",{children:["\u25CF ",h("PS Webview")]})}),n.map(s=>(0,we.jsx)(yi,{pageInstance:s},s.sid))]})]})};var xe=b(S(),1);function vi({onRequestLogin:e}){let{timeoutError:t}=J(),{hasAuthingLogin:r}=ne();return(0,xe.jsxs)("div",{className:"client-panel",children:[(!r||t)&&(0,xe.jsx)(wi,{}),(0,xe.jsxs)("div",{className:"app-login-container",children:[(0,xe.jsx)("div",{className:"client-panel-title",children:h("Login/Auth")}),r&&(0,xe.jsx)(gi,{}),(0,xe.jsx)(Rr,{onRequestLogin:e}),(0,xe.jsx)(Nr,{})]})]})}var Q=b(S(),1);function bi(){let{backendURL:e,setBackendURL:t,connectState:r,doConnectOrDisconnect:o}=A(),n=r==="connected"||r==="connecting"?{disabled:!0}:{};(0,Se.useEffect)(()=>{e&&r==="disconnected"&&setTimeout(()=>{o()},1e3)},[]);let i=(0,Se.useRef)(!1);return(0,Se.useEffect)(()=>()=>{i.current=!0},[]),(0,Se.useEffect)(()=>()=>{r==="connected"&&i.current&&o()},[r]),(0,Q.jsxs)(Q.Fragment,{children:[r==="connected"?(0,Q.jsx)(ta,{}):(0,Q.jsx)("sp-textfield",{id:"url-bar",label:"backendURL",onInput:s=>{t(s.currentTarget.value)},...n,value:e||"",placeholder:yr}),(0,Q.jsx)("sp-action-button",{id:"connect-btn",onClick:()=>{o()},children:r!=="disconnected"?"\u2297":"\u2192"})]})}function ta(){let[e,t]=(0,Se.useState)(""),[r,o]=(0,Se.useState)(""),{workflowAgentSID:n}=We(),{comfyMultiUser:i}=A(),{webviewAgentSID:s,timeoutError:a,loadError:c,toggleWebviewDialog:f}=J(),d=(0,Se.useRef)(null),{ssid:u,lastError:g,progress:l,executingNodeTitle:p,queueSize:m}=Lr(n),{loggedInUsername:y,hasAuthingLogin:v,isLogin:w}=ne(),P=n&&m?`(${m})`:"";(0,Se.useEffect)(()=>{n?n&&(l?t(`(${l}% - ${p}...)`):(t(""),o(""))):i&&!D.data.comfyUserToken?t(h("--multi-user Not Login!")):(a||c)&&o(h("Error: {0}",c||h("timeout")))},[n,g,l,p,a,c,i]);let I="";return s==n?I=h("PS Webview"):n&&u?I=h("Browser {0}",u):I=h("Loading..."),(0,Q.jsxs)("div",{className:"connect-configuration",onClick:()=>{d.current?.show()},children:[(0,Q.jsx)("dialog",{ref:d,style:{margin:"0",width:"480px",height:"540px",padding:"8px"},onClick:j=>{j.stopPropagation()},children:(0,Q.jsx)(vi,{onRequestLogin:async()=>{d.current?.close(),await new Promise(j=>setTimeout(j,300)),f()}})}),(0,Q.jsxs)("div",{className:"connect-config-content",children:[v?(0,Q.jsxs)("span",{children:["\u7528\u6237\u540D\uFF1A",w?y:"\u672A\u767B\u5F55"]}):(0,Q.jsxs)("span",{children:["\u23F5 ",h("Runner"),": ",I," ",P]}),r&&(0,Q.jsx)("span",{className:"connect-config-error",children:r}),!r&&e&&(0,Q.jsx)("span",{className:"connect-config-message",children:e})]}),(0,Q.jsx)("div",{className:"connect-config-actions",children:(0,Q.jsx)(Ut,{size:.8})}),l?(0,Q.jsx)("div",{className:"connect-config-progress",style:{width:`${l}%`}}):""]})}var Di=b(E(),1);var Ve=class{static makeDocumentDataOptions(t){let r=t.data,o=[`${C.getSpecialDocumentCurrent()}`];return Object.keys(r.documents).forEach(n=>{let i=r.documents[n];o.push(i.identify)}),o}static findDocumentData(t,r){let o=C.is_SPECIAL_DOCUMENT_CURRENT(r)?t.data.activeDocumentID:Oo(r).id;return t.data.documents[o]}static makeLayerOptions(t,r){return r.concat(t.layers.map(n=>n.identify))}static getLayerDirtyID(t,r){return t.layers.find(n=>n.identify===r)?.dirtyID||0}static getCanvasDirtyID(t){return t.canvasDirtyID||0}static getSelectionDirtyID(t){return t.selectionDirtyID||0}};var Pi=b(E(),1);var Si=b(E(),1);function Pe(e){return e=e||12,{flex:`${e} 0 calc(${e/12*100}% - 10px)`,maxWidth:"100%"}}var St=class extends Pi.Component{computeUIWeightCSS(t){return Pe(t)}};var ot=b(S(),1),qe=class extends St{state={filter:""};handleSelectUpdate=(t,r)=>{this.props.onSelectUpdate(t,r),this.setState({filter:""})};render(){let{options:t,value:r,name:o}=this.props;return(0,ot.jsxs)("div",{style:{display:"flex",alignItems:"center",...this.computeUIWeightCSS(this.props.uiWeight)},children:[o&&(0,ot.jsx)("sp-label",{style:{flex:1},children:o}),(0,ot.jsx)("sp-picker",{class:"sdppp-dropdown-widget",size:"s",style:this.props.name?{flex:2}:{width:"100%"},children:(0,ot.jsx)("sp-menu",{slot:"options",children:t.map((n,i)=>this.state.filter&&!n.includes(this.state.filter)?"":(0,ot.jsx)("sp-menu-item",{...Wr(n)===Wr(r)?{selected:!0}:{},onClick:()=>this.handleSelectUpdate(n,i),children:Wr(n)},Wr(n)))})})]})}};function Wr(e){return typeof e=="string"?e:e.content}var Ci=b(S(),1),Mr=class e extends Di.default.Component{state={options:Ve.makeDocumentDataOptions(D)};constructor(t){super(t),D.subscribe("/documents",this.updateOptions)}updateOptions=()=>{let t=Ve.makeDocumentDataOptions(D);this.setState({options:t})};componentwillUnmount(){D.unsubscribe(this.updateOptions)}static getValueIfIsValidOptionOrCurrent(t,r){return!r||r.includes(t)?t:C.getSpecialDocumentCurrent()}static getDerivedStateFromProps(t,r){let o=t.value;if(o){let n=o.split("/"),i=e.getValueIfIsValidOptionOrCurrent(n.slice(1).join("/"),r.options);return C.is_SPECIAL_DOCUMENT_CURRENT(i)?o=C.getSpecialDocumentCurrent():o=i,n[0]!=D.data.uname&&t.onSelectUpdate(D.data.uname+"/"+o,0),Object.assign(r,{value:o})}return null}render(){let t=e.getValueIfIsValidOptionOrCurrent(this.props.value,this.state.options);return(0,Ci.jsx)(qe,{uiWeight:this.props.uiWeight,options:this.state.options,onSelectUpdate:(r,o)=>{this.props.onSelectUpdate(D.data.uname+"/"+r,o)},value:t})}};var Ei=b(E(),1);var Ii=b(S(),1);function ve(e){return(0,Ii.jsx)("a",{onClick:e.onClick,children:e.label})}var Te=b(S(),1),Qe=class extends Ei.default.Component{state={options:[]};constructor(t){super(t),D.subscribe("/documents",this.updataOptionsAfterDocumentChange)}componentwillUnmount(){D.unsubscribe(this.updataOptionsAfterDocumentChange)}componentDidMount(){this.updateOptions(this.props.documentValue||C.getSpecialDocumentCurrent())}shouldComponentUpdate(t,r){return t.documentValue!=this.props.documentValue&&t.documentValue&&this.updateOptions(t.documentValue),!0}updataOptionsAfterDocumentChange=()=>{this.updateOptions(this.props.documentValue||C.getSpecialDocumentCurrent())};updateOptions=t=>{t=t||this.props.documentValue||C.getSpecialDocumentCurrent();let r=Ve.findDocumentData(D,t);if(!r){this.setState({options:[]});return}let o=Ve.makeLayerOptions(r,C.getSpecialLayerForGet());this.setState({options:o})};render(){let t=this.props.value;if(t)try{t=h(t)}catch{}return(0,Te.jsxs)("div",{className:"sdppp-layer-widget",style:Pe(this.props.uiWeight),children:[(0,Te.jsx)("div",{className:"sdppp-layer-widget-dropdown",children:(0,Te.jsx)(qe,{uiWeight:12,options:this.state.options,onSelectUpdate:this.props.onSelectUpdate,value:t})}),(0,Te.jsxs)("div",{className:"sdppp-layer-widget-quick-set",children:[(0,Te.jsxs)("sp-label",{children:[h("Quick Set"),":"]}),(0,Te.jsx)(ve,{onClick:async()=>{let r=Je();this.props.onSelectUpdate(r,this.state.options.indexOf(r))},label:h("Selected Layer")}),(0,Te.jsx)(ve,{onClick:async()=>{this.props.onSelectUpdate(C.get_SPECIAL_LAYER_USE_CANVAS(),this.state.options.indexOf(C.get_SPECIAL_LAYER_USE_CANVAS()))},label:h("Canvas")})]})]})}};var qt=b(xt(),1),Pt=N("photoshop"),fe=b(E(),1);var Io=b(xt(),1),Ur=N("photoshop"),de=b(E(),1);var Bt=b(S(),1);function Vt({mode:e,setMode:t}){let r=o=>{t(o)};return(0,Bt.jsxs)("div",{className:"widget-mode-selection",children:[(0,Bt.jsx)("button",{className:`widget-mode-selection-button ${e==="manual"?"selected":""}`,onClick:()=>r("manual"),children:h("Manual")}),(0,Bt.jsx)("button",{className:`widget-mode-selection-button ${e==="auto"?"selected":""}`,onClick:()=>r("auto"),children:h("Auto")})]})}var le=b(S(),1);function Ai(e){let[t,r]=(0,de.useState)(""),[o,n]=(0,de.useState)(""),[i,s]=(0,de.useState)("manual"),[a,c]=(0,de.useState)(!1),[f,d]=(0,de.useState)(null),{backendURL:u}=A(),{uploadImage:g}=oe(),{addBeforeWorkflowRunHook:l}=yt(),p=(0,de.useRef)(null),m=(0,de.useCallback)(async()=>{if(i==="manual"&&!a&&f){await e.onValueChange(f);return}try{if(i==="auto"&&await v(t),p.current){let w=await p.current.getBuffer(Io.JimpMime.jpeg),P=await g(w,Ct(6)+".jpeg");P?.name&&(d(P.subfolder+"/"+P.name),c(!1),await e.onValueChange(P.subfolder+"/"+P.name))}}catch(w){console.error(w)}},[i,a,f,e.onValueChange]);(0,de.useEffect)(()=>{let P=l(m);return()=>{P()}},[m]);let y=o;if(!y&&(f||e.value)){let w=f||e.value,P=w.split("/").slice(0,-1).join("/");y=u+(u.endsWith("/")?"":"/")+`api/view?filename=${w}&type=input&subfolder=${P}&rand=`+Math.random()}let v=(0,de.useCallback)(async w=>{let P=await Eo(w);if(!P)return;p.current=P;let I=await ra(P);r(w),n(I),c(!0)},[]);return(0,le.jsxs)("div",{className:"image-widget",children:[(0,le.jsx)("div",{className:"image-widget-left",children:(0,le.jsx)("img",{src:y,className:"image-widget-image"+(y?"":" image-widget-image-empty")})}),(0,le.jsxs)("div",{className:"image-widget-right",children:[(0,le.jsx)(Vt,{mode:i,setMode:s}),i==="manual"&&(0,le.jsxs)("div",{className:"image-widget-more-quickset",children:[(0,le.jsx)("sp-label",{children:h("Set As:")}),(0,le.jsx)(ve,{onClick:()=>{v(Je())},label:h("Selected Layer")}),(0,le.jsx)(ve,{onClick:()=>{v(C.get_SPECIAL_LAYER_USE_CANVAS())},label:h("Canvas")})]}),i=="auto"&&(0,le.jsx)("div",{className:"image-widget-layer-widget-container",children:(0,le.jsx)(Qe,{onSelectUpdate:v,uiWeight:10,value:t})})]})]})}async function Eo(e){if(!Ur.app.activeDocument)return null;try{return await dr.getJimpImage({document_identify:Ie(Ur.app.activeDocument.id,Ur.app.activeDocument.name),layer_identify:e})}catch(t){throw console.error(t),t}}async function ra(e){let t=100/Math.max(e.width,e.height);return e=e.clone(),e.scale(t),await e.getBase64(Io.JimpMime.jpeg)}var Z=b(S(),1);function _i(e){let[t,r]=(0,fe.useState)(""),[o,n]=(0,fe.useState)(""),[i,s]=(0,fe.useState)("manual"),[a,c]=(0,fe.useState)(!1),[f,d]=(0,fe.useState)(null),{backendURL:u}=A(),{uploadImage:g}=oe(),{addBeforeWorkflowRunHook:l}=yt(),p=(0,fe.useRef)(null),m=(0,fe.useCallback)(async()=>{if(i==="manual"&&!a&&f){await e.onValueChange(f);return}try{if(i==="auto"&&await v(t),p.current){let w=await p.current.getBuffer(qt.JimpMime.png),P=await g(w,Ct(6)+".png");P?.name&&(d(P.subfolder+"/"+P.name),c(!1),await e.onValueChange(P.subfolder+"/"+P.name))}}catch(w){console.error(w)}},[i,a,f,e.onValueChange]);(0,fe.useEffect)(()=>{let w=l(m);return()=>{w()}},[m]);let y=o;if(!y&&(f||e.value)){let w=f||e.value,P=w.split("/").slice(0,-1).join("/");y=u+(u.endsWith("/")?"":"/")+`api/view?filename=${w}&type=input&subfolder=${P}&rand=`+Math.random()}let v=(0,fe.useCallback)(async(w,P=!1)=>{let I=await Eo(w);if(!I)return;P&&I.scan(0,0,I.bitmap.width,I.bitmap.height,function(be,ie,x){I.bitmap.data[x+3]=255-I.bitmap.data[x+3]}),p.current=I;let j=await Li(I);r(w),n(j),c(!0)},[]);return(0,Z.jsxs)("div",{className:"image-widget",children:[(0,Z.jsx)("div",{className:"image-widget-left",children:(0,Z.jsx)("img",{src:y,className:"image-widget-image"+(y?"":" image-widget-image-empty")})}),(0,Z.jsxs)("div",{className:"image-widget-right",children:[(0,Z.jsx)(Vt,{mode:i,setMode:w=>{s(w)}}),i==="manual"&&(0,Z.jsxs)("div",{className:"image-widget-more-quickset",children:[(0,Z.jsx)("sp-label",{children:h("Set As:")}),(0,Z.jsx)(ve,{onClick:()=>{v(Je(),!1)},label:h("Selected Layer")}),(0,Z.jsx)(ve,{onClick:async()=>{v(Je(),!0)},label:h("Selected Layer (invert)")}),(0,Z.jsx)(ve,{onClick:()=>{v(C.get_SPECIAL_LAYER_USE_CANVAS())},label:h("Canvas")}),(0,Z.jsx)(ve,{onClick:async()=>{let w=await oa();if(!w)return;p.current=w;let P=await Li(w);r(""),n(P),c(!0)},label:h("Selection")})]}),i==="auto"&&(0,Z.jsx)("div",{className:"image-widget-layer-widget-container",children:(0,Z.jsx)(Qe,{onSelectUpdate:w=>{v(w,!1)},uiWeight:12,value:t})})]})]})}async function oa(){if(!Pt.app.activeDocument)return null;try{let e=await Nt({document_identify:Ie(Pt.app.activeDocument.id,Pt.app.activeDocument.name),boundary:{left:0,top:0,right:0,bottom:0,width:Pt.app.activeDocument.width,height:Pt.app.activeDocument.height}});if(!e?.blob)return null;let t=e.blob,r=new Uint8Array(t.length*4);for(let o=0;oe.nodeIndexes.map(g=>{let l=e.nodes[g],p=(w,P,I)=>w.keepRender?P.outputType==="error"?(w.result.push((0,$.jsx)("span",{className:"list-error-label",children:t[l.id][I]})),w):(o?.(w,l,P,I),w):w,m=Object.values(e.groups).find(w=>w.nodeIDs.includes(l.id)),y=m?.color||"rgba(127, 127, 127, .4)";if(s&&m?.id!==s)return null;let v=l.uiWeightSum<=8&&l.widgets.length==1&&(l.widgets[0].outputType!=="number"||!e.extraOptions?.useSliderForNumberWidget);return(0,$.jsxs)("div",{className:"workflow-edit-field",children:[(0,$.jsx)("div",{className:"workflow-edit-field-title",title:l.title,style:{...Pe(v?4:12),borderColor:y},children:i?i(l.title,l):(0,$.jsx)("span",{children:l.title})}),l.widgets.reduce(p,{keepRender:!0,result:[]}).result.map((w,P)=>(0,$.jsx)(Ao,{children:w},P)),r[l.id]?(0,$.jsx)("span",{className:"list-error-label",children:r[l.id]}):""]},l.id)}).filter(Boolean),[e,t,r,o,n,i,s]),[f,d]=(0,nt.useMemo)(()=>[Object.keys(r).filter(g=>e.nodes[parseInt(g)]),Object.keys(r).filter(g=>!e.nodes[parseInt(g)])],[r,e]),u=null;return d.length>0?u=(0,$.jsx)("span",{className:"list-error-label",children:r[+d[0]]}):f.length>0&&(u=(0,$.jsx)("span",{className:"list-error-label",children:r[+f[0]]})),(0,$.jsxs)($.Fragment,{children:[u,Object.keys(e.nodes).length?"":(0,$.jsx)("span",{className:"list-error-label",children:h("no suitable node to control in this workflow")}),(0,$.jsx)("div",{className:"workflow-edit-content",children:c})]})}var Ao=class extends nt.default.Component{constructor(t){super(t),this.state={hasError:!1,error:null}}componentDidCatch(t,r){this.setState({hasError:!0,error:t})}render(){return this.state.hasError?(0,$.jsx)("span",{className:"list-error-label",children:this.state.error?.stack||this.state.error?.message||this.state.error?.toString()}):this.props.children}};var Ke=b(E(),1);var Ge=b(S(),1),ki=e=>{let{inputMin:t,inputMax:r,inputStep:o,value:n=0,onValueChange:i,name:s,uiWeight:a,extraOptions:c}=e,[f,d]=(0,Ke.useState)(+n.toFixed(3));(0,Ke.useEffect)(()=>{d(+n.toFixed(3))},[n]);let u=(0,Ke.useCallback)(m=>{let y=+m.target.value;d(+y.toFixed(3))},[]),g=(0,Ke.useCallback)(()=>{i(f)},[f,i]),l=(0,Ke.useCallback)(m=>{let y=+m.target.value;d(+y.toFixed(3)),i(+y.toFixed(3))},[f,i]);return!((r-t)/o>1e3)&&a&&a>=1&&c?.useSliderForNumberWidget?(0,Ge.jsxs)("div",{style:{...Pe(a),display:"flex",alignItems:"center"},children:[(0,Ge.jsx)("sp-slider",{style:{width:"60%"},min:t,max:r,step:o,value:f,onInput:l,"show-value":"false",class:"sdppp-slider"}),(0,Ge.jsx)("sp-textfield",{style:{width:"40%"},onInput:u,onBlur:g,value:f})]}):(0,Ge.jsxs)("div",{style:{...Pe(a),display:"flex",alignItems:"center"},children:[s&&(0,Ge.jsx)("sp-label",{style:{flex:"1"},children:s}),(0,Ge.jsx)("sp-textfield",{style:s?{flex:"2"}:{width:"100%"},onInput:u,onBlur:g,value:f})]})};var Y=b(E(),1);var Dt=b(S(),1);function xi(e){let t=Y.default.useRef(null),[r,o]=(0,Y.useState)(0),[n,i]=(0,Y.useState)(e.value??""),[s,a]=(0,Y.useState)(!1);return(0,Y.useEffect)(()=>{s||i(e.value??"")},[e.value]),(0,Y.useEffect)(()=>{let c=setInterval(()=>{if(t.current){let f=t.current.offsetHeight;f!==r&&o(f)}},16);return()=>clearInterval(c)},[r]),(0,Dt.jsxs)("div",{className:"widget-container",style:{...Pe(e.uiWeight),position:"relative",height:Math.max(55,r)},children:[(0,Dt.jsx)(na,{textAreaValue:n,setTextAreaValue:i,editing:s,setEditing:a,onValueChange:e.onValueChange,hiddenDivHeight:r}),(0,Dt.jsx)("p",{ref:t,style:{fontSize:14,visibility:"hidden",whiteSpace:"pre-line"},children:n})]})}function na({textAreaValue:e,onValueChange:t,editing:r,setEditing:o,setTextAreaValue:n,hiddenDivHeight:i}){let[s,a]=(0,Y.useState)(0),c=(0,Y.useCallback)(l=>{let p=l.target.value;t(p),n(p)},[t,n]),f=(0,Y.useCallback)(()=>{o(!0)},[o]),d=(0,Y.useCallback)(()=>{let l={textfieldRerender:s,editing:!1};s==2&&(l.textfieldRerender=1),a(l.textfieldRerender),o(l.editing)},[s,a,o]),[u,g]=(0,Y.useState)(i);return(0,Y.useEffect)(()=>{i!=u&&(a(r?2:1),g(i))},[i]),(0,Y.useEffect)(()=>{s==1&&Promise.resolve().then(async()=>{await new Promise(requestAnimationFrame),a(0)})},[s]),s==1?"":(0,Dt.jsx)("sp-textarea",{style:{position:"absolute",height:"100%",width:"100%",top:0,left:0},value:e,onInput:c,onFocus:f,onBlur:d})}var _o=b(S(),1),Fr=class extends St{onInput=t=>{let r=!!t.target.value;this.setState({value:r}),this.props.onValueChange(r)};render(){let t=this.props.value?{checked:!0}:{};return H.checkboxStyle==="div"?(0,_o.jsx)("div",{style:{...this.computeUIWeightCSS(this.props.uiWeight)},className:(t.checked?"active":"")+" sdppp-checkbox",onClick:r=>{this.props.onValueChange(!this.props.value)},children:this.props.name||""}):(0,_o.jsx)("sp-checkbox",{label:this.props.name||"",style:{...this.computeUIWeightCSS(this.props.uiWeight)},onInput:r=>{this.props.onValueChange(r.target.checked)},...t,children:this.props.name||""})}};function Ti(e){return e.replace(/^workflows\//,"").replace(/\.json$/,"").split("://").pop()}var ee=b(S(),1);function Ri(){let{callForPSDExtract:e}=oe(),{workflowAgent:t}=A(),{setWidgetValue:r}=ti(),{setShouldTriggerLivePainting:o}=Ir(),{state:n}=ge(t,["/widgetTableValue","/widgetTableStructure","/widgetTableErrors"]),i=!!t?.data.hasPSDNodes,s=(0,ko.useCallback)(async(u,g,l,p)=>{await r(u,g,l),o(!0)},[r,o]),a=n?.widgetTableStructure,c=n?.widgetTableValue,f=n?.widgetTableErrors,d=(0,ko.useCallback)((u,g,l,p)=>{if(l.outputType=="PS_DOCUMENT")return u.result.push((0,ee.jsx)(Mr,{uiWeight:l.uiWeight||12,value:c?.[g.id]?.[p]||"",onSelectUpdate:m=>{s(g.id,p,m,g)},extraOptions:a?.extraOptions},p)),!0;if(l.outputType=="PS_LAYER"){let m=l.options?.documentNodeID||0,y=c?.[m]?.[0]||"";return u.result.push((0,ee.jsx)(Qe,{uiWeight:l.uiWeight||12,value:c?.[g.id]?.[p]||"",documentValue:y?y.split("/").pop():"",onSelectUpdate:v=>{s(g.id,p,v,g)},extraOptions:a?.extraOptions},p)),!0}else{if(l.outputType=="IMAGE_PATH")return u.result.push((0,ee.jsx)(Ai,{uiWeight:l.uiWeight||12,value:c?.[g.id]?.[p]||"",onValueChange:async m=>{await s(g.id,p,m,g)},extraOptions:a?.extraOptions},p)),!0;if(l.outputType=="MASK_PATH")return u.result.push((0,ee.jsx)(_i,{uiWeight:l.uiWeight||12,value:c?.[g.id]?.[p]||"",onValueChange:async m=>{await s(g.id,p,m,g)},extraOptions:a?.extraOptions},p)),!0;if(l.outputType==="number"){let m=l.options?.min??0,y=l.options?.max??100,v=l.options?.step??1;u.result.push((0,ee.jsx)(ki,{uiWeight:l.uiWeight||12,name:l.name,inputMin:m,inputMax:y,inputStep:v,value:parseFloat(c?.[g.id]?.[p]||"0"),onValueChange:w=>{s(g.id,p,w,g)},extraOptions:a?.extraOptions},p))}else if(l.outputType==="combo")u.result.push((0,ee.jsx)(qe,{uiWeight:l.uiWeight||12,name:l.name,options:l.options?.values||[],onSelectUpdate:m=>{s(g.id,p,m,g)},value:c?.[g.id]?.[p]||"",extraOptions:a?.extraOptions},p));else if(l.outputType==="toggle")u.result.push((0,ee.jsx)(Fr,{uiWeight:l.uiWeight||12,name:l.name,value:c?.[g.id]?.[p]||"",onValueChange:m=>{s(g.id,p,m,g)},extraOptions:a?.extraOptions},p));else{let m=c?.[g.id]?.[p]||"";u.result.push((0,ee.jsx)(xi,{uiWeight:l.uiWeight||12,value:typeof m=="string"?m:JSON.stringify(m),onValueChange:y=>{s(g.id,p,y,g)},extraOptions:a?.extraOptions},p))}}return!1},[r,c]);return a?(0,ee.jsxs)("div",{className:"workflow-edit",children:[(0,ee.jsxs)("div",{className:"workflow-edit-title",children:[a.widgetTablePath&&(0,ee.jsx)("sp-label",{style:{fontWeight:"bold"},children:Ti(a.widgetTablePath)}),i?(0,ee.jsx)("a",{onClick:()=>{e(t?.data.sid||"").catch(u=>{alert(u.message)})},children:">"+h("sample .psd")}):""]}),(0,ee.jsx)(Lo,{widgetTableStructure:a,widgetTableValue:c||{},widgetTableErrors:f||{},onWidgetChange:s,onWidgetRender:d})]}):null}var Br=b(E(),1);var q=b(S(),1);function Ni(){let{login:e,loginStyle:t,loginBannerTop:r,loginBannerBottom:o,setIsTrialing:n}=ne(),[i,s]=(0,Br.useState)(localStorage.getItem("last-username")||""),[a,c]=(0,Br.useState)(""),[f,d]=(0,Br.useState)("");return(0,q.jsxs)("div",{className:"login-container",children:[r,(0,q.jsx)("div",{className:"login-container-login",children:(0,q.jsxs)("div",{className:"login-form",children:[t==="invitation"?(0,q.jsxs)("div",{className:"login-form-item",children:[(0,q.jsx)("label",{htmlFor:"username",children:h("Invitation Code")}),(0,q.jsx)("sp-textfield",{type:"text",id:"username",placeholder:h("Please input invitation code"),value:i,onInput:u=>s(u.target.value)})]}):(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("div",{className:"login-form-item",children:[(0,q.jsx)("label",{htmlFor:"username",children:h("Username")}),(0,q.jsx)("sp-textfield",{type:"text",id:"username",placeholder:h("Please input username"),value:i,onInput:u=>s(u.target.value)})]}),(0,q.jsxs)("div",{className:"login-form-item",children:[(0,q.jsx)("label",{htmlFor:"password",children:h("Password")}),(0,q.jsx)("sp-textfield",{type:"password",id:"password",placeholder:h("Please input password"),value:a,onInput:u=>c(u.target.value)})]})]}),(0,q.jsx)("div",{className:"login-error-message",children:f}),(0,q.jsx)("button",{className:"login-button",onClick:async()=>{let u=await e(i,a);u.success?(d(""),localStorage.setItem("last-username",i)):d(u.message)},children:h("Login")}),t==="trialable-password"&&(0,q.jsx)("a",{className:"trial-button",onClick:()=>n(!0),children:"\u6E38\u5BA2\u8BD5\u7528"})]})}),o]})}var He=b(S(),1);function Oi({renderContent:e}){let{connectState:t}=A(),{isLogin:r,isTrialing:o}=ne();return(0,He.jsxs)("div",{className:"sdppp-container",style:t!=="connected"?{height:"100vh"}:{},children:[(0,He.jsx)(rt,{children:r||o?e(t,bi,Ri):(0,He.jsx)(Ni,{})}),t!="connected"&&(0,He.jsx)(mi,{}),o&&(0,He.jsx)("div",{className:"sdppp-trial-tips",children:(0,He.jsx)("span",{children:"\u6E38\u5BA2\u8BD5\u7528\u4E2D\uFF0C\u767B\u9646\u89E3\u9501\u66F4\u591A\u529F\u80FD"})})]})}var Wi=b(E(),1);var it=b(S(),1);function Mi(){let e=A(),{toggleWebviewDialog:t}=J(),r=(0,Wi.useCallback)(()=>{t()},[t]);return(0,it.jsx)("div",{className:"auths-bar",children:(0,it.jsx)("div",{className:"identifier-bar",children:(0,it.jsxs)("div",{className:"identifier-bar-left",children:[(0,it.jsx)(Nr,{}),e.comfyMultiUser&&(0,it.jsx)(Rr,{onRequestLogin:r})]})})})}var Qt=b(E(),1),Ui=b(E(),1),Fi=N("uxp"),xo=b(S(),1);function Bi(){let e=document.getElementById("color_computer")?.style.color||"#777",{data:t,isLoading:r}=xr(),o=(0,Qt.useRef)(null),[n,i]=(0,Qt.useState)(!1),[s,a]=(0,Qt.useState)(!1);if((0,Ui.useEffect)(()=>{o.current&&(r||s||(a(!0),o.current.addEventListener("loadstop",d=>{d.target.postMessage({action:"init",payload:{color:e,cloud:f}})}),o.current.addEventListener("loaderror",d=>{i(!0)}),o.current.addEventListener("message",d=>{let u=d.message;if(!u)return;let g=JSON.parse(u);g.action==="open"&&Fi.shell.openExternal(g.payload.url)})))},[o,r]),r||n)return(0,xo.jsx)("div",{style:{height:"8px"}});let c="./promote.html?color="+e,f=t.cloud[je()=="zhcn"?"zhcn":"en"];return f.length==0?null:(0,xo.jsx)("webview",{ref:o,className:"promote-webview",style:{width:"100%",height:"24px"},src:c})}Object.assign(globalThis,{SDPPPInternal:To});})(); /*! Bundled license information: fast-json-patch/module/helpers.mjs: diff --git a/plugins/photoshop/manifest.json b/plugins/photoshop/manifest.json index 20697f5..1b2aef5 100644 --- a/plugins/photoshop/manifest.json +++ b/plugins/photoshop/manifest.json @@ -1,7 +1,7 @@ { "id": "sd-ppp", "name": "SD-PPP", - "version": "1.8.3", + "version": "1.8.4", "main": "index.html", "manifestVersion": 5, "host": { @@ -38,7 +38,7 @@ "type": "panel", "id": "sdppp-connect", "label": { - "default": "SD-PPP 1.8.3" + "default": "SD-PPP 1.8.4" }, "minimumSize": { "width": 300, diff --git a/pyproject.toml b/pyproject.toml index 2afe13f..39c553a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "sd-ppp" description = "getting/sending picture from/to Photoshop with a simple connection. Make Photoshop become the workspace of your ComfyUI." -version = "1.8.3" +version = "1.8.4" license = { file = "LICENSE" } [project.urls] diff --git a/static/sd-ppp_PS.ccx b/static/sd-ppp_PS.ccx index ac7fbd2..a9bb26c 100644 Binary files a/static/sd-ppp_PS.ccx and b/static/sd-ppp_PS.ccx differ