diff --git a/changelog.md b/changelog.md index e62aa1f..11e92b3 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ +## [1.9.2] - 2025-08-21 +* Update the 2.x beta plugin to beta.5. + ## [1.9.2] - 2025-07-23 * Update the 2.x beta plugin to preview.3. diff --git a/javascript/sdppp-comfy.js b/javascript/sdppp-comfy.js index 4be55fd..af3128e 100644 --- a/javascript/sdppp-comfy.js +++ b/javascript/sdppp-comfy.js @@ -1,20 +1,20 @@ -var j5=Object.create;var Mp=Object.defineProperty;var ER=Object.getOwnPropertyDescriptor;var V5=Object.getOwnPropertyNames;var H5=Object.getPrototypeOf,U5=Object.prototype.hasOwnProperty;var Y0=(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 $o=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Q0=(e,t)=>{for(var r in t)Mp(e,r,{get:t[r],enumerable:!0})},q5=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of V5(t))!U5.call(e,o)&&o!==r&&Mp(e,o,{get:()=>t[o],enumerable:!(n=ER(t,o))||n.enumerable});return e};var E=(e,t,r)=>(r=e!=null?j5(H5(e)):{},q5(t||!e||!e.__esModule?Mp(r,"default",{value:e,enumerable:!0}):r,e));var Qt=(e,t,r,n)=>{for(var o=n>1?void 0:n?ER(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&&Mp(t,r,o),o};var IO=$o(Ct=>{"use strict";var Sf=Symbol.for("react.element"),I4=Symbol.for("react.portal"),D4=Symbol.for("react.fragment"),$4=Symbol.for("react.strict_mode"),A4=Symbol.for("react.profiler"),k4=Symbol.for("react.provider"),M4=Symbol.for("react.context"),F4=Symbol.for("react.forward_ref"),L4=Symbol.for("react.suspense"),z4=Symbol.for("react.memo"),W4=Symbol.for("react.lazy"),bO=Symbol.iterator;function B4(e){return e===null||typeof e!="object"?null:(e=bO&&e[bO]||e["@@iterator"],typeof e=="function"?e:null)}var wO={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},EO=Object.assign,RO={};function yc(e,t,r){this.props=e,this.context=t,this.refs=RO,this.updater=r||wO}yc.prototype.isReactComponent={};yc.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")};yc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function OO(){}OO.prototype=yc.prototype;function Nx(e,t,r){this.props=e,this.context=t,this.refs=RO,this.updater=r||wO}var Ix=Nx.prototype=new OO;Ix.constructor=Nx;EO(Ix,yc.prototype);Ix.isPureReactComponent=!0;var SO=Array.isArray,_O=Object.prototype.hasOwnProperty,Dx={current:null},PO={key:!0,ref:!0,__self:!0,__source:!0};function TO(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)_O.call(t,n)&&!PO.hasOwnProperty(n)&&(o[n]=t[n]);var s=arguments.length-2;if(s===1)o.children=r;else if(1{"use strict";DO.exports=IO()});var jO=$o(Zt=>{"use strict";function Fx(e,t){var r=e.length;e.push(t);e:for(;0>>1,o=e[n];if(0>>1;nwm(s,r))lwm(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[a]=r,n=a);else if(lwm(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function wm(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()}):(Ax=Date,AO=Ax.now(),Zt.unstable_now=function(){return Ax.now()-AO});var $O,Ax,AO,Li=[],Ja=[],q4=1,Mo=null,Rn=3,Om=!1,sl=!1,wf=!1,FO=typeof setTimeout=="function"?setTimeout:null,LO=typeof clearTimeout=="function"?clearTimeout:null,kO=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function Lx(e){for(var t=fi(Ja);t!==null;){if(t.callback===null)Rm(Ja);else if(t.startTime<=e)Rm(Ja),t.sortIndex=t.expirationTime,Fx(Li,t);else break;t=fi(Ja)}}function zx(e){if(wf=!1,Lx(e),!sl)if(fi(Li)!==null)sl=!0,Bx(Wx);else{var t=fi(Ja);t!==null&&jx(zx,t.startTime-e)}}function Wx(e,t){sl=!1,wf&&(wf=!1,LO(Ef),Ef=-1),Om=!0;var r=Rn;try{for(Lx(t),Mo=fi(Li);Mo!==null&&(!(Mo.expirationTime>t)||e&&!BO());){var n=Mo.callback;if(typeof n=="function"){Mo.callback=null,Rn=Mo.priorityLevel;var o=n(Mo.expirationTime<=t);t=Zt.unstable_now(),typeof o=="function"?Mo.callback=o:Mo===fi(Li)&&Rm(Li),Lx(t)}else Rm(Li);Mo=fi(Li)}if(Mo!==null)var i=!0;else{var a=fi(Ja);a!==null&&jx(zx,a.startTime-t),i=!1}return i}finally{Mo=null,Rn=r,Om=!1}}var _m=!1,Em=null,Ef=-1,zO=5,WO=-1;function BO(){return!(Zt.unstable_now()-WOe||125n?(e.sortIndex=r,Fx(Ja,e),fi(Li)===null&&e===fi(Ja)&&(wf?(LO(Ef),Ef=-1):wf=!0,jx(zx,r-n))):(e.sortIndex=o,Fx(Li,e),sl||Om||(sl=!0,Bx(Wx))),e};Zt.unstable_shouldYield=BO;Zt.unstable_wrapCallback=function(e){var t=Rn;return function(){var r=Rn;Rn=t;try{return e.apply(this,arguments)}finally{Rn=r}}}});var HO=$o(($J,VO)=>{"use strict";VO.exports=jO()});var KT=$o(So=>{"use strict";var G4=N(),xo=HO();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"),fb=Object.prototype.hasOwnProperty,K4=/^[: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]*$/,UO={},qO={};function X4(e){return fb.call(qO,e)?!0:fb.call(UO,e)?!1:K4.test(e)?qO[e]=!0:(UO[e]=!0,!1)}function Y4(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 Q4(e,t,r,n){if(t===null||typeof t>"u"||Y4(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 qn(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 yn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){yn[e]=new qn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];yn[t]=new qn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){yn[e]=new qn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){yn[e]=new qn(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){yn[e]=new qn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){yn[e]=new qn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){yn[e]=new qn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){yn[e]=new qn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){yn[e]=new qn(e,5,!1,e.toLowerCase(),null,!1,!1)});var nS=/[\-:]([a-z])/g;function oS(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(nS,oS);yn[t]=new qn(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(nS,oS);yn[t]=new qn(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(nS,oS);yn[t]=new qn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){yn[e]=new qn(e,1,!1,e.toLowerCase(),null,!1,!1)});yn.xlinkHref=new qn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){yn[e]=new qn(e,1,!1,e.toLowerCase(),null,!0,!0)});function iS(e,t,r,n){var o=yn.hasOwnProperty(t)?yn[t]:null;(o!==null?o.type!==0:n||!(2typeof 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 Do=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),q0=(e,t)=>{for(var r in t)kp(e,r,{get:t[r],enumerable:!0})},z5=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of M5(t))!L5.call(e,o)&&o!==r&&kp(e,o,{get:()=>t[o],enumerable:!(n=yR(t,o))||n.enumerable});return e};var E=(e,t,r)=>(r=e!=null?A5(F5(e)):{},z5(t||!e||!e.__esModule?kp(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&&kp(t,r,o),o};var RO=Do(Ct=>{"use strict";var bf=Symbol.for("react.element"),E4=Symbol.for("react.portal"),R4=Symbol.for("react.fragment"),O4=Symbol.for("react.strict_mode"),_4=Symbol.for("react.profiler"),P4=Symbol.for("react.provider"),T4=Symbol.for("react.context"),N4=Symbol.for("react.forward_ref"),I4=Symbol.for("react.suspense"),D4=Symbol.for("react.memo"),$4=Symbol.for("react.lazy"),mO=Symbol.iterator;function k4(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 yc(e,t,r){this.props=e,this.context=t,this.refs=xO,this.updater=r||vO}yc.prototype.isReactComponent={};yc.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")};yc.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function bO(){}bO.prototype=yc.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,yc.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=Do(Zt=>{"use strict";function Dx(e,t){var r=e.length;e.push(t);e:for(;0>>1,o=e[n];if(0>>1;nSm(s,r))lSm(c,s)?(e[n]=c,e[l]=r,n=l):(e[n]=s,e[a]=r,n=a);else if(lSm(c,r))e[n]=c,e[l]=r,n=l;else break e}}return t}function Sm(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=[],Ja=[],z4=1,Ao=null,En=3,Em=!1,sl=!1,Cf=!1,IO=typeof setTimeout=="function"?setTimeout:null,DO=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 $x(e){for(var t=ui(Ja);t!==null;){if(t.callback===null)wm(Ja);else if(t.startTime<=e)wm(Ja),t.sortIndex=t.expirationTime,Dx(Fi,t);else break;t=ui(Ja)}}function kx(e){if(Cf=!1,$x(e),!sl)if(ui(Fi)!==null)sl=!0,Mx(Ax);else{var t=ui(Ja);t!==null&&Fx(kx,t.startTime-e)}}function Ax(e,t){sl=!1,Cf&&(Cf=!1,DO(wf),wf=-1),Em=!0;var r=En;try{for($x(t),Ao=ui(Fi);Ao!==null&&(!(Ao.expirationTime>t)||e&&!AO());){var n=Ao.callback;if(typeof n=="function"){Ao.callback=null,En=Ao.priorityLevel;var o=n(Ao.expirationTime<=t);t=Zt.unstable_now(),typeof o=="function"?Ao.callback=o:Ao===ui(Fi)&&wm(Fi),$x(t)}else wm(Fi);Ao=ui(Fi)}if(Ao!==null)var i=!0;else{var a=ui(Ja);a!==null&&Fx(kx,a.startTime-t),i=!1}return i}finally{Ao=null,En=r,Em=!1}}var Rm=!1,Cm=null,wf=-1,$O=5,kO=-1;function AO(){return!(Zt.unstable_now()-kO<$O)}function Nx(){if(Cm!==null){var e=Zt.unstable_now();kO=e;var t=!0;try{t=Cm(!0,e)}finally{t?Sf():(Rm=!1,Cm=null)}}else Rm=!1}var Sf;typeof TO=="function"?Sf=function(){TO(Nx)}:typeof MessageChannel<"u"?(Ix=new MessageChannel,NO=Ix.port2,Ix.port1.onmessage=Nx,Sf=function(){NO.postMessage(null)}):Sf=function(){IO(Nx,0)};var Ix,NO;function Mx(e){Cm=e,Rm||(Rm=!0,Sf())}function Fx(e,t){wf=IO(function(){e(Zt.unstable_now())},t)}Zt.unstable_IdlePriority=5;Zt.unstable_ImmediatePriority=1;Zt.unstable_LowPriority=4;Zt.unstable_NormalPriority=3;Zt.unstable_Profiling=null;Zt.unstable_UserBlockingPriority=2;Zt.unstable_cancelCallback=function(e){e.callback=null};Zt.unstable_continueExecution=function(){sl||Em||(sl=!0,Mx(Ax))};Zt.unstable_forceFrameRate=function(e){0>e||125n?(e.sortIndex=r,Dx(Ja,e),ui(Fi)===null&&e===ui(Ja)&&(Cf?(DO(wf),wf=-1):Cf=!0,Fx(kx,r-n))):(e.sortIndex=o,Dx(Fi,e),sl||Em||(sl=!0,Mx(Ax))),e};Zt.unstable_shouldYield=AO;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=Do((OJ,FO)=>{"use strict";FO.exports=MO()});var jT=Do(bo=>{"use strict";var W4=D(),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,B4=/^[: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 j4(e){return ab.call(WO,e)?!0:ab.call(zO,e)?!1:B4.test(e)?WO[e]=!0:(zO[e]=!0,!1)}function V4(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 H4(e,t,r,n){if(t===null||typeof t>"u"||V4(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{Hx=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?$f(e):""}function J4(e){switch(e.tag){case 5:return $f(e.type);case 16:return $f("Lazy");case 13:return $f("Suspense");case 19:return $f("SuspenseList");case 0:case 2:case 15:return e=Ux(e.type,!1),e;case 11:return e=Ux(e.type.render,!1),e;case 1:return e=Ux(e.type,!0),e;default:return""}}function gb(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 Cc:return"Fragment";case Sc:return"Portal";case db:return"Profiler";case aS:return"StrictMode";case pb:return"Suspense";case mb:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Z_:return(e.displayName||"Context")+".Consumer";case J_:return(e._context.displayName||"Context")+".Provider";case sS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case lS:return t=e.displayName||null,t!==null?t:gb(e.type)||"Memo";case es:t=e._payload,e=e._init;try{return gb(e(t))}catch{}}return null}function Z4(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 gb(t);case 8:return t===aS?"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 ms(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tP(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function e6(e){var t=tP(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 Tm(e){e._valueTracker||(e._valueTracker=e6(e))}function rP(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),n="";return e&&(n=tP(e)?e.checked?"true":"false":e.value),e=n,e!==r?(t.setValue(e),!0):!1}function ng(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 hb(e,t){var r=t.checked;return Er({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function KO(e,t){var r=t.defaultValue==null?"":t.defaultValue,n=t.checked!=null?t.checked:t.defaultChecked;r=ms(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 nP(e,t){t=t.checked,t!=null&&iS(e,"checked",t,!1)}function vb(e,t){nP(e,t);var r=ms(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")?yb(e,t.type,r):t.hasOwnProperty("defaultValue")&&yb(e,t.type,ms(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function XO(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 yb(e,t,r){(t!=="number"||ng(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Af=Array.isArray;function $c(e,t,r,n){if(e=e.options,t){t={};for(var o=0;o"+t.valueOf().toString()+"",t=Nm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Gf(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Ff={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},t6=["Webkit","ms","Moz","O"];Object.keys(Ff).forEach(function(e){t6.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Ff[t]=Ff[e]})});function sP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Ff.hasOwnProperty(e)&&Ff[e]?(""+t).trim():t+"px"}function lP(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var n=r.indexOf("--")===0,o=sP(r,t[r],n);r==="float"&&(r="cssFloat"),n?e.setProperty(r,o):e[r]=o}}var r6=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 Sb(e,t){if(t){if(r6[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 Cb(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 wb=null;function cS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Eb=null,Ac=null,kc=null;function JO(e){if(e=fd(e)){if(typeof Eb!="function")throw Error(ge(280));var t=e.stateNode;t&&(t=Ig(t),Eb(e.stateNode,e.type,t))}}function cP(e){Ac?kc?kc.push(e):kc=[e]:Ac=e}function uP(){if(Ac){var e=Ac,t=kc;if(kc=Ac=null,JO(e),t)for(e=0;e>>=0,e===0?32:31-(p6(e)/m6|0)|0}var Im=64,Dm=4194304;function kf(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 sg(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=kf(s):(i&=a,i!==0&&(n=kf(i)))}else a=r&~o,a!==0?n=kf(a):i!==0&&(n=kf(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 cd(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-hi(t),e[t]=r}function y6(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=zf),s_=" ",l_=!1;function NP(e,t){switch(e){case"keyup":return q6.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function IP(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wc=!1;function K6(e,t){switch(e){case"compositionend":return IP(t);case"keypress":return t.which!==32?null:(l_=!0,s_);case"textInput":return e=t.data,e===s_&&l_?null:e;default:return null}}function X6(e,t){if(wc)return e==="compositionend"||!vS&&NP(e,t)?(e=PP(),Km=mS=os=null,wc=!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=f_(r)}}function kP(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kP(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function MP(){for(var e=window,t=ng();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ng(e.document)}return t}function yS(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 oz(e){var t=MP(),r=e.focusedElem,n=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&kP(r.ownerDocument.documentElement,r)){if(n!==null&&yS(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=d_(r,i);var a=d_(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,Ec=null,Nb=null,Bf=null,Ib=!1;function p_(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ib||Ec==null||Ec!==ng(n)||(n=Ec,"selectionStart"in n&&yS(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}),Bf&&Zf(Bf,n)||(Bf=n,n=ug(Nb,"onSelect"),0_c||(e.current=Fb[_c],Fb[_c]=null,_c--)}function er(e,t){_c++,Fb[_c]=e.current,e.current=t}var gs={},Tn=vs(gs),eo=vs(!1),gl=gs;function Wc(e,t){var r=e.type.contextTypes;if(!r)return gs;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 to(e){return e=e.childContextTypes,e!=null}function dg(){ir(eo),ir(Tn)}function C_(e,t,r){if(Tn.current!==gs)throw Error(ge(168));er(Tn,t),er(eo,r)}function UP(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,Z4(e)||"Unknown",o));return Er({},r,n)}function pg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||gs,gl=Tn.current,er(Tn,e),er(eo,eo.current),!0}function w_(e,t,r){var n=e.stateNode;if(!n)throw Error(ge(169));r?(e=UP(e,t,gl),n.__reactInternalMemoizedMergedChildContext=e,ir(eo),ir(Tn),er(Tn,e)):ir(eo),er(eo,r)}var da=null,Dg=!1,rb=!1;function qP(e){da===null?da=[e]:da.push(e)}function mz(e){Dg=!0,qP(e)}function ys(){if(!rb&&da!==null){rb=!0;var e=0,t=jt;try{var r=da;for(jt=1;e>=a,o-=a,pa=1<<32-hi(t)+o|r<R?(P=C,C=null):P=C.sibling;var O=d(g,C,x[R],b);if(O===null){C===null&&(C=P);break}e&&C&&O.alternate===null&&t(g,C),p=i(O,p,R),w===null?S=O:w.sibling=O,w=O,C=P}if(R===x.length)return r(g,C),yr&&ll(g,R),S;if(C===null){for(;RR?(P=C,C=null):P=C.sibling;var I=d(g,C,O.value,b);if(I===null){C===null&&(C=P);break}e&&C&&I.alternate===null&&t(g,C),p=i(I,p,R),w===null?S=I:w.sibling=I,w=I,C=P}if(O.done)return r(g,C),yr&&ll(g,R),S;if(C===null){for(;!O.done;R++,O=x.next())O=f(g,O.value,b),O!==null&&(p=i(O,p,R),w===null?S=O:w.sibling=O,w=O);return yr&&ll(g,R),S}for(C=n(g,C);!O.done;R++,O=x.next())O=m(C,g,R,O.value,b),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?R:O.key),p=i(O,p,R),w===null?S=O:w.sibling=O,w=O);return e&&C.forEach(function(D){return t(g,D)}),yr&&ll(g,R),S}function y(g,p,x,b){if(typeof x=="object"&&x!==null&&x.type===Cc&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Pm:e:{for(var S=x.key,w=p;w!==null;){if(w.key===S){if(S=x.type,S===Cc){if(w.tag===7){r(g,w.sibling),p=o(w,x.props.children),p.return=g,g=p;break e}}else if(w.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===es&&O_(S)===w.type){r(g,w.sibling),p=o(w,x.props),p.ref=Tf(g,w,x),p.return=g,g=p;break e}r(g,w);break}else t(g,w);w=w.sibling}x.type===Cc?(p=ml(x.props.children,g.mode,b,x.key),p.return=g,g=p):(b=rg(x.type,x.key,x.props,null,g.mode,b),b.ref=Tf(g,p,x),b.return=g,g=b)}return a(g);case Sc: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=o(p,x.children||[]),p.return=g,g=p;break e}else{r(g,p);break}else t(g,p);p=p.sibling}p=ub(x,g.mode,b),p.return=g,g=p}return a(g);case es:return w=x._init,y(g,p,w(x._payload),b)}if(Af(x))return h(g,p,x,b);if(Rf(x))return v(g,p,x,b);Vm(g,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,p!==null&&p.tag===6?(r(g,p.sibling),p=o(p,x),p.return=g,g=p):(r(g,p),p=cb(x,g.mode,b),p.return=g,g=p),a(g)):r(g,p)}return y}var jc=YP(!0),QP=YP(!1),hg=vs(null),vg=null,Nc=null,CS=null;function wS(){CS=Nc=vg=null}function ES(e){var t=hg.current;ir(hg),e._currentValue=t}function Wb(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 Fc(e,t){vg=e,CS=Nc=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Zn=!0),e.firstContext=null)}function Bo(e){var t=e._currentValue;if(CS!==e)if(e={context:e,memoizedValue:t,next:null},Nc===null){if(vg===null)throw Error(ge(308));Nc=e,vg.dependencies={lanes:0,firstContext:e}}else Nc=Nc.next=e;return t}var fl=null;function RS(e){fl===null?fl=[e]:fl.push(e)}function JP(e,t,r,n){var o=t.interleaved;return o===null?(r.next=r,RS(t)):(r.next=o.next,o.next=r),t.interleaved=r,ya(e,n)}function ya(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 ts=!1;function OS(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function ZP(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 ga(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function us(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,ya(e,r)}return o=n.interleaved,o===null?(t.next=t,RS(n)):(t.next=o.next,o.next=t),n.interleaved=t,ya(e,r)}function Ym(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,fS(e,r)}}function __(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 yg(e,t,r,n){var o=e.updateQueue;ts=!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 d=s.lane,m=s.eventTime;if((n&d)===d){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(d=t,m=r,v.tag){case 1:if(h=v.payload,typeof h=="function"){f=h.call(m,f,d);break e}f=h;break e;case 3:h.flags=h.flags&-65537|128;case 0:if(h=v.payload,d=typeof h=="function"?h.call(m,f,d):h,d==null)break e;f=Er({},f,d);break e;case 2:ts=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,d=o.effects,d===null?o.effects=[s]:d.push(s))}else m={eventTime:m,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(c=u=m,l=f):u=u.next=m,a|=d;if(s=s.next,s===null){if(s=o.shared.pending,s===null)break;d=s,s=d.next,d.next=null,o.lastBaseUpdate=d,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);yl|=a,e.lanes=a,e.memoizedState=f}}function P_(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;tr?r:4,e(!0);var n=ob.transition;ob.transition={};try{e(!1),t()}finally{jt=r,ob.transition=n}}function hT(){return jo().memoizedState}function yz(e,t,r){var n=ds(e);if(r={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null},vT(e))yT(t,r);else if(r=JP(e,t,r,n),r!==null){var o=Un();vi(r,e,n,o),xT(r,t,n)}}function xz(e,t,r){var n=ds(e),o={lane:n,action:r,hasEagerState:!1,eagerState:null,next:null};if(vT(e))yT(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,yi(s,a)){var l=t.interleaved;l===null?(o.next=o,RS(t)):(o.next=l.next,l.next=o),t.interleaved=o;return}}catch{}finally{}r=JP(e,t,o,n),r!==null&&(o=Un(),vi(r,e,n,o),xT(r,t,n))}}function vT(e){var t=e.alternate;return e===wr||t!==null&&t===wr}function yT(e,t){jf=bg=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function xT(e,t,r){if((r&4194240)!==0){var n=t.lanes;n&=e.pendingLanes,r|=n,t.lanes=r,fS(e,r)}}var Sg={readContext:Bo,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},bz={readContext:Bo,useCallback:function(e,t){return Wi().memoizedState=[e,t===void 0?null:t],e},useContext:Bo,useEffect:N_,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Jm(4194308,4,fT.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Jm(4194308,4,e,t)},useInsertionEffect:function(e,t){return Jm(4,2,e,t)},useMemo:function(e,t){var r=Wi();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var n=Wi();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=yz.bind(null,wr,e),[n.memoizedState,e]},useRef:function(e){var t=Wi();return e={current:e},t.memoizedState=e},useState:T_,useDebugValue:AS,useDeferredValue:function(e){return Wi().memoizedState=e},useTransition:function(){var e=T_(!1),t=e[0];return e=vz.bind(null,e[1]),Wi().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var n=wr,o=Wi();if(yr){if(r===void 0)throw Error(ge(407));r=r()}else{if(r=t(),ln===null)throw Error(ge(349));(vl&30)!==0||nT(n,t,r)}o.memoizedState=r;var i={value:r,getSnapshot:t};return o.queue=i,N_(iT.bind(null,n,i,e),[e]),n.flags|=2048,sd(9,oT.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=Wi(),t=ln.identifierPrefix;if(yr){var r=ma,n=pa;r=(n&~(1<<32-hi(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=id++,0")&&(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:"")?Df(e):""}function U4(e){switch(e.tag){case 5:return Df(e.type);case 16:return Df("Lazy");case 13:return Df("Suspense");case 19:return Df("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 Cc:return"Fragment";case Sc: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 es:t=e._payload,e=e._init;try{return ub(e(t))}catch{}}return null}function q4(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 ms(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 G4(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 _m(e){e._valueTracker||(e._valueTracker=G4(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 tg(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=ms(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=ms(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,ms(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"||tg(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=Pm.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function qf(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Mf={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},K4=["Webkit","ms","Moz","O"];Object.keys(Mf).forEach(function(e){K4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Mf[t]=Mf[e]})});function tP(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Mf.hasOwnProperty(e)&&Mf[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 X4=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(X4[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,kc=null,Ac=null;function qO(e){if(e=ud(e)){if(typeof xb!="function")throw Error(ge(280));var t=e.stateNode;t&&(t=Tg(t),xb(e.stateNode,e.type,t))}}function nP(e){kc?Ac?Ac.push(e):Ac=[e]:kc=e}function oP(){if(kc){var e=kc,t=Ac;if(Ac=kc=null,qO(e),t)for(e=0;e>>=0,e===0?32:31-(a6(e)/s6|0)|0}var Tm=64,Nm=4194304;function kf(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 n=0,o=e.suspendedLanes,i=e.pingedLanes,a=r&268435455;if(a!==0){var s=a&~o;s!==0?n=kf(s):(i&=a,i!==0&&(n=kf(i)))}else a=r&~o,a!==0?n=kf(a):i!==0&&(n=kf(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 ld(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 f6(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=Lf),t_=" ",r_=!1;function EP(e,t){switch(e){case"keyup":return z6.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 wc=!1;function B6(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 j6(e,t){if(wc)return e==="compositionend"||!dS&&EP(e,t)?(e=CP(),qm=cS=os=null,wc=!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=tg();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=tg(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 Q6(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,Ec=null,Rb=null,Wf=null,Ob=!1;function s_(e,t,r){var n=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Ob||Ec==null||Ec!==tg(n)||(n=Ec,"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}),Wf&&Jf(Wf,n)||(Wf=n,n=lg(Rb,"onSelect"),0_c||(e.current=Db[_c],Db[_c]=null,_c--)}function er(e,t){_c++,Db[_c]=e.current,e.current=t}var gs={},Pn=vs(gs),Zn=vs(!1),gl=gs;function Wc(e,t){var r=e.type.contextTypes;if(!r)return gs;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 ug(){ir(Zn),ir(Pn)}function h_(e,t,r){if(Pn.current!==gs)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,q4(e)||"Unknown",o));return Er({},r,n)}function fg(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||gs,gl=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,gl),n.__reactInternalMemoizedMergedChildContext=e,ir(Zn),ir(Pn),er(Pn,e)):ir(Zn),er(Zn,r)}var fa=null,Ng=!1,Qx=!1;function WP(e){fa===null?fa=[e]:fa.push(e)}function sz(e){Ng=!0,WP(e)}function ys(){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&&ll(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&&ll(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&&ll(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(M){return t(m,M)}),yr&&ll(m,R),S}function y(m,d,x,b){if(typeof x=="object"&&x!==null&&x.type===Cc&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Om:e:{for(var S=x.key,w=d;w!==null;){if(w.key===S){if(S=x.type,S===Cc){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===es&&b_(S)===w.type){r(m,w.sibling),d=o(w,x.props),d.ref=Pf(m,w,x),d.return=m,m=d;break e}r(m,w);break}else t(m,w);w=w.sibling}x.type===Cc?(d=ml(x.props.children,m.mode,b,x.key),d.return=m,m=d):(b=eg(x.type,x.key,x.props,null,m.mode,b),b.ref=Pf(m,d,x),b.return=m,m=b)}return a(m);case Sc: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 es:return w=x._init,y(m,d,w(x._payload),b)}if($f(x))return h(m,d,x,b);if(Ef(x))return v(m,d,x,b);Bm(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 jc=HP(!0),UP=HP(!1),mg=vs(null),gg=null,Nc=null,vS=null;function yS(){vS=Nc=gg=null}function xS(e){var t=mg.current;ir(mg),e._currentValue=t}function Ab(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 Fc(e,t){gg=e,vS=Nc=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},Nc===null){if(gg===null)throw Error(ge(308));Nc=e,gg.dependencies={lanes:0,firstContext:e}}else Nc=Nc.next=e;return t}var fl=null;function bS(e){fl===null?fl=[e]:fl.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 ts=!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 us(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 Km(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 hg(e,t,r,n){var o=e.updateQueue;ts=!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:ts=!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);yl|=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 fz(e,t,r){var n=ds(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 dz(e,t,r){var n=ds(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){Bf=yg=!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 xg={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},pz={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,Ym(4194308,4,iT.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ym(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ym(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=fz.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=uz.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(),ln===null)throw Error(ge(349));(vl&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,ad(9,JP.bind(null,n,i,r,t),void 0,null),r},useId:function(){var e=zi(),t=ln.identifierPrefix;if(yr){var r=pa,n=da;r=(n&~(1<<32-gi(n)-1)).toString(32)+r,t=":"+t+"R"+r,r=od++,0<\/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[Bi]=t,e[rd]=n,TT(e,t,!1,!1),t.stateNode=e;e:{switch(a=Cb(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;oUc&&(t.flags|=128,n=!0,Nf(i,!1),t.lanes=4194304)}else{if(!n)if(e=xg(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Nf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!yr)return _n(t),null}else 2*Lr()-i.renderingStartTime>Uc&&r!==1073741824&&(t.flags|=128,n=!0,Nf(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=Lr(),t.sibling=null,r=Cr.current,er(Cr,n?r&1|2:r&1),t):(_n(t),null);case 22:case 23:return WS(),n=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==n&&(t.flags|=8192),n&&(t.mode&1)!==0?(ho&1073741824)!==0&&(_n(t),t.subtreeFlags&6&&(t.flags|=8192)):_n(t),null;case 24:return null;case 25:return null}throw Error(ge(156,t.tag))}function Pz(e,t){switch(bS(t),t.tag){case 1:return to(t.type)&&dg(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vc(),ir(eo),ir(Tn),TS(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return PS(t),null;case 13:if(ir(Cr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(ge(340));Bc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ir(Cr),null;case 4:return Vc(),null;case 10:return ES(t.type._context),null;case 22:case 23:return WS(),null;case 24:return null;default:return null}}var Um=!1,Pn=!1,Tz=typeof WeakSet=="function"?WeakSet:Set,qe=null;function Ic(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ir(e,t,n)}else r.current=null}function Xb(e,t,r){try{r()}catch(n){Ir(e,t,n)}}var B_=!1;function Nz(e,t){if(Db=lg,e=MP(),yS(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,d=null;t:for(;;){for(var m;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),(m=f.firstChild)!==null;)d=f,f=m;for(;;){if(f===e)break t;if(d===r&&++c===o&&(s=a),d===i&&++u===n&&(l=a),(m=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=m}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for($b={focusedElem:e,selectionRange:r},lg=!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:pi(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(ge(163))}}catch(b){Ir(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,qe=e;break}qe=t.return}return h=B_,B_=!1,h}function Vf(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&&Xb(t,r,i)}o=o.next}while(o!==n)}}function kg(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 Yb(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 DT(e){var t=e.alternate;t!==null&&(e.alternate=null,DT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Bi],delete t[rd],delete t[Mb],delete t[dz],delete t[pz])),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 j_(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=fg));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 Jb(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(Jb(e,t,r),e=e.sibling;e!==null;)Jb(e,t,r),e=e.sibling}var hn=null,mi=!1;function Za(e,t,r){for(r=r.child;r!==null;)AT(e,t,r),r=r.sibling}function AT(e,t,r){if(ji&&typeof ji.onCommitFiberUnmount=="function")try{ji.onCommitFiberUnmount(_g,r)}catch{}switch(r.tag){case 5:Pn||Ic(r,t);case 6:var n=hn,o=mi;hn=null,Za(e,t,r),hn=n,mi=o,hn!==null&&(mi?(e=hn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):hn.removeChild(r.stateNode));break;case 18:hn!==null&&(mi?(e=hn,r=r.stateNode,e.nodeType===8?tb(e.parentNode,r):e.nodeType===1&&tb(e,r),Qf(e)):tb(hn,r.stateNode));break;case 4:n=hn,o=mi,hn=r.stateNode.containerInfo,mi=!0,Za(e,t,r),hn=n,mi=o;break;case 0:case 11:case 14:case 15:if(!Pn&&(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)&&Xb(r,t,a),o=o.next}while(o!==n)}Za(e,t,r);break;case 1:if(!Pn&&(Ic(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ir(r,t,s)}Za(e,t,r);break;case 21:Za(e,t,r);break;case 22:r.mode&1?(Pn=(n=Pn)||r.memoizedState!==null,Za(e,t,r),Pn=n):Za(e,t,r);break;default:Za(e,t,r)}}function V_(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Tz),t.forEach(function(n){var o=zz.bind(null,e,n);r.has(n)||(r.add(n),n.then(o,o))})}}function di(e,t){var r=t.deletions;if(r!==null)for(var n=0;no&&(o=a),n&=~i}if(n=o,n=Lr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Dz(n/1960))-n,10e?16:e,is===null)var n=!1;else{if(e=is,is=null,Eg=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;lLr()-LS?pl(e,0):FS|=r),ro(e,t)}function jT(e,t){t===0&&((e.mode&1)===0?t=1:(t=Dm,Dm<<=1,(Dm&130023424)===0&&(Dm=4194304)));var r=Un();e=ya(e,t),e!==null&&(cd(e,t,r),ro(e,r))}function Lz(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),jT(e,r)}function zz(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),jT(e,r)}var VT;VT=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||eo.current)Zn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Zn=!1,Oz(e,t,r);Zn=(e.flags&131072)!==0}else Zn=!1,yr&&(t.flags&1048576)!==0&&GP(t,gg,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Zm(e,t),e=t.pendingProps;var o=Wc(t,Tn.current);Fc(t,r),o=IS(null,t,n,e,o,r);var i=DS();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,to(n)?(i=!0,pg(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,OS(t),o.updater=Ag,t.stateNode=o,o._reactInternals=t,jb(t,n,e,r),t=Ub(null,t,n,!0,i,r)):(t.tag=0,yr&&i&&xS(t),Hn(null,t,o,r),t=t.child),t;case 16:n=t.elementType;e:{switch(Zm(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=Bz(n),e=pi(n,e),o){case 0:t=Hb(null,t,n,e,r);break e;case 1:t=L_(null,t,n,e,r);break e;case 11:t=M_(null,t,n,e,r);break e;case 14:t=F_(null,t,n,pi(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:pi(n,o),Hb(e,t,n,o,r);case 1:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:pi(n,o),L_(e,t,n,o,r);case 3:e:{if(OT(t),e===null)throw Error(ge(387));n=t.pendingProps,i=t.memoizedState,o=i.element,ZP(e,t),yg(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=Hc(Error(ge(423)),t),t=z_(e,t,n,r,o);break e}else if(n!==o){o=Hc(Error(ge(424)),t),t=z_(e,t,n,r,o);break e}else for(vo=cs(t.stateNode.containerInfo.firstChild),yo=t,yr=!0,gi=null,r=QP(t,null,n,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Bc(),n===o){t=xa(e,t,r);break e}Hn(e,t,n,r)}t=t.child}return t;case 5:return eT(t),e===null&&zb(t),n=t.type,o=t.pendingProps,i=e!==null?e.memoizedProps:null,a=o.children,Ab(n,o)?a=null:i!==null&&Ab(n,i)&&(t.flags|=32),RT(e,t),Hn(e,t,a,r),t.child;case 6:return e===null&&zb(t),null;case 13:return _T(e,t,r);case 4:return _S(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=jc(t,null,n,r):Hn(e,t,n,r),t.child;case 11:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:pi(n,o),M_(e,t,n,o,r);case 7:return Hn(e,t,t.pendingProps,r),t.child;case 8:return Hn(e,t,t.pendingProps.children,r),t.child;case 12:return Hn(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(hg,n._currentValue),n._currentValue=a,i!==null)if(yi(i.value,a)){if(i.children===o.children&&!eo.current){t=xa(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=ga(-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),Wb(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),Wb(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}Hn(e,t,o.children,r),t=t.child}return t;case 9:return o=t.type,n=t.pendingProps.children,Fc(t,r),o=Bo(o),n=n(o),t.flags|=1,Hn(e,t,n,r),t.child;case 14:return n=t.type,o=pi(n,t.pendingProps),o=pi(n.type,o),F_(e,t,n,o,r);case 15:return wT(e,t,t.type,t.pendingProps,r);case 17:return n=t.type,o=t.pendingProps,o=t.elementType===n?o:pi(n,o),Zm(e,t),t.tag=1,to(n)?(e=!0,pg(t)):e=!1,Fc(t,r),bT(t,n,o),jb(t,n,o,r),Ub(null,t,n,!0,e,r);case 19:return PT(e,t,r);case 22:return ET(e,t,r)}throw Error(ge(156,t.tag))};function HT(e,t){return vP(e,t)}function Wz(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 zo(e,t,r,n){return new Wz(e,t,r,n)}function jS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bz(e){if(typeof e=="function")return jS(e)?1:0;if(e!=null){if(e=e.$$typeof,e===sS)return 11;if(e===lS)return 14}return 2}function ps(e,t){var r=e.alternate;return r===null?(r=zo(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 rg(e,t,r,n,o,i){var a=2;if(n=e,typeof e=="function")jS(e)&&(a=1);else if(typeof e=="string")a=5;else e:switch(e){case Cc:return ml(r.children,o,i,t);case aS:a=8,o|=8;break;case db:return e=zo(12,r,t,o|2),e.elementType=db,e.lanes=i,e;case pb:return e=zo(13,r,t,o),e.elementType=pb,e.lanes=i,e;case mb:return e=zo(19,r,t,o),e.elementType=mb,e.lanes=i,e;case eP:return Fg(r,o,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case J_:a=10;break e;case Z_:a=9;break e;case sS:a=11;break e;case lS:a=14;break e;case es:a=16,n=null;break e}throw Error(ge(130,e==null?e:typeof e,""))}return t=zo(a,r,t,o),t.elementType=e,t.type=n,t.lanes=i,t}function ml(e,t,r,n){return e=zo(7,e,n,t),e.lanes=r,e}function Fg(e,t,r,n){return e=zo(22,e,n,t),e.elementType=eP,e.lanes=r,e.stateNode={isHidden:!1},e}function cb(e,t,r){return e=zo(6,e,null,t),e.lanes=r,e}function ub(e,t,r){return t=zo(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jz(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=Gx(0),this.expirationTimes=Gx(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Gx(0),this.identifierPrefix=n,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function VS(e,t,r,n,o,i,a,s,l){return e=new jz(e,t,r,s,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=zo(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:n,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},OS(i),e}function Vz(e,t,r){var n=3{"use strict";function XT(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(XT)}catch(e){console.error(e)}}XT(),YT.exports=KT()});var JT=$o(GS=>{"use strict";var QT=Hi();GS.createRoot=QT.createRoot,GS.hydrateRoot=QT.hydrateRoot;var MJ});var Ne=$o((zJ,jg)=>{"use strict";(function(){"use strict";var e={}.hasOwnProperty;function t(){for(var o="",i=0;i{"use strict";var YS=Symbol.for("react.element"),QS=Symbol.for("react.portal"),Ug=Symbol.for("react.fragment"),qg=Symbol.for("react.strict_mode"),Gg=Symbol.for("react.profiler"),Kg=Symbol.for("react.provider"),Xg=Symbol.for("react.context"),rW=Symbol.for("react.server_context"),Yg=Symbol.for("react.forward_ref"),Qg=Symbol.for("react.suspense"),Jg=Symbol.for("react.suspense_list"),Zg=Symbol.for("react.memo"),eh=Symbol.for("react.lazy"),nW=Symbol.for("react.offscreen"),sN;sN=Symbol.for("react.module.reference");function Vo(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case YS:switch(e=e.type,e){case Ug:case Gg:case qg:case Qg:case Jg:return e;default:switch(e=e&&e.$$typeof,e){case rW:case Xg:case Yg:case eh:case Zg:case Kg:return e;default:return t}}case QS:return t}}}Ht.ContextConsumer=Xg;Ht.ContextProvider=Kg;Ht.Element=YS;Ht.ForwardRef=Yg;Ht.Fragment=Ug;Ht.Lazy=eh;Ht.Memo=Zg;Ht.Portal=QS;Ht.Profiler=Gg;Ht.StrictMode=qg;Ht.Suspense=Qg;Ht.SuspenseList=Jg;Ht.isAsyncMode=function(){return!1};Ht.isConcurrentMode=function(){return!1};Ht.isContextConsumer=function(e){return Vo(e)===Xg};Ht.isContextProvider=function(e){return Vo(e)===Kg};Ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===YS};Ht.isForwardRef=function(e){return Vo(e)===Yg};Ht.isFragment=function(e){return Vo(e)===Ug};Ht.isLazy=function(e){return Vo(e)===eh};Ht.isMemo=function(e){return Vo(e)===Zg};Ht.isPortal=function(e){return Vo(e)===QS};Ht.isProfiler=function(e){return Vo(e)===Gg};Ht.isStrictMode=function(e){return Vo(e)===qg};Ht.isSuspense=function(e){return Vo(e)===Qg};Ht.isSuspenseList=function(e){return Vo(e)===Jg};Ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Ug||e===Gg||e===qg||e===Qg||e===Jg||e===nW||typeof e=="object"&&e!==null&&(e.$$typeof===eh||e.$$typeof===Zg||e.$$typeof===Kg||e.$$typeof===Xg||e.$$typeof===Yg||e.$$typeof===sN||e.getModuleId!==void 0)};Ht.typeOf=Vo});var uN=$o((iZ,cN)=>{"use strict";cN.exports=lN()});var R3=$o(D0=>{"use strict";var NG=N(),IG=Symbol.for("react.element"),DG=Symbol.for("react.fragment"),$G=Object.prototype.hasOwnProperty,AG=NG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,kG={key:!0,ref:!0,__self:!0,__source:!0};function E3(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)$G.call(t,n)&&!kG.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:IG,type:e,key:i,ref:a,props:o,_owner:AG.current}}D0.Fragment=DG;D0.jsx=E3;D0.jsxs=E3});var Or=$o((RMe,O3)=>{"use strict";O3.exports=R3()});var J0={"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 Z0={"### 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","Back to workflow list":"\u8FD4\u56DE\u5DE5\u4F5C\u6D41\u5217\u8868","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 RR=typeof Y0<"u"?Y0:void 0,ex="en";typeof navigator<"u"&&navigator.language?ex=navigator.language=="zh-CN"?"zhcn":"en":RR&&(ex=RR("uxp").host.uiLocale.startsWith("zh")?"zhcn":"en");function me(e,...t){let r=ex=="zhcn"?Z0[e]:e in J0?J0[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 el(e,t){return e==t||Z0[e]==t}var Xt=class e{static SPECIAL_DOCUMENT_CURRENT="### Active Document ###";static is_SPECIAL_DOCUMENT_CURRENT(t){return el(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 el(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 el(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 el(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 el(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 el(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 tx={};Q0(tx,{JsonPatchError:()=>Nr,_areEquals:()=>af,applyOperation:()=>tl,applyPatch:()=>lc,applyReducer:()=>Q5,deepClone:()=>X5,getValueByPointer:()=>rl,validate:()=>_R,validator:()=>Bp});var G5=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)}}(),K5=Object.prototype.hasOwnProperty;function Lp(e,t){return K5.call(e,t)}function zp(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 ki(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function nf(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function Fp(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&&d===void 0&&(c[m]===void 0?d=l.slice(0,u).join("/"):u==f-1&&(d=t.path),d!==void 0&&h(t,0,e,d)),u++,Array.isArray(c)){if(m==="-")m=c.length;else{if(r&&!Wp(m))throw new Nr("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);Wp(m)&&(m=~~m)}if(u>=f){if(r&&t.op==="add"&&m>c.length)throw new Nr("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=Y5[t.op].call(t,c,m,e);if(a.test===!1)throw new Nr("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}}else if(u>=f){var a=sc[t.op].call(t,c,m,e);if(a.test===!1)throw new Nr("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}if(c=c[m],r&&u0)throw new Nr('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 Nr("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 Nr("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")&&Fp(e.value))throw new Nr("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 Nr("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 Nr("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=_R([a],r);if(s&&s.name==="OPERATION_PATH_UNRESOLVABLE")throw new Nr("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new Nr("Operation `op` property is not one of operations defined in RFC-6902","OPERATION_OP_INVALID",t,e,r)}function _R(e,t,r){try{if(!Array.isArray(e))throw new Nr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)lc(Tr(t),Tr(e),r||!0);else{r=r||Bp;for(var n=0;njp,generate:()=>rx,observe:()=>o4,unobserve:()=>n4});var nx=new WeakMap,J5=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),Z5=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function e4(e){return nx.get(e)}function t4(e,t){return e.observers.get(t)}function r4(e,t){e.observers.delete(t.callback)}function n4(e,t){t.unobserve()}function o4(e,t){var r=[],n,o=e4(e);if(!o)o=new J5(e),nx.set(e,o);else{var i=t4(o,t);n=i&&i.observer}if(n)return n;if(n={},o.value=Tr(e),t){n.callback=t,n.next=null;var a=function(){rx(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(){rx(n),clearTimeout(n.next),r4(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 Z5(t,n)),n}function rx(e,t){t===void 0&&(t=!1);var r=nx.get(e.object);ox(r.value,e.object,e.patches,"",t),e.patches.length&&lc(r.value,e.patches);var n=e.patches;return n.length>0&&(e.patches=[],e.callback&&e.callback(n)),n}function ox(e,t,r,n,o){if(t!==e){typeof t.toJSON=="function"&&(t=t.toJSON());for(var i=zp(t),a=zp(e),s=!1,l=!1,c=a.length-1;c>=0;c--){var u=a[c],f=e[u];if(Lp(t,u)&&!(t[u]===void 0&&f!==void 0&&Array.isArray(t)===!1)){var d=t[u];typeof f=="object"&&f!=null&&typeof d=="object"&&d!=null&&Array.isArray(f)===Array.isArray(d)?ox(f,d,r,n+"/"+ki(u),o):f!==d&&(s=!0,o&&r.push({op:"test",path:n+"/"+ki(u),value:Tr(f)}),r.push({op:"replace",path:n+"/"+ki(u),value:Tr(d)}))}else Array.isArray(e)===Array.isArray(t)?(o&&r.push({op:"test",path:n+"/"+ki(u),value:Tr(f)}),r.push({op:"remove",path:n+"/"+ki(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:rl(r,i)))})}),n.forEach((o,i)=>{let a=i==="/"?this._data:rl(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[Vp]||(e.constructor[Vp]=[]),e.constructor[Vp].push(t),{value:function(...n){let o=Tr(this._data);r.value.apply(this,n);let i=jp(o,this._data);i.length!=0&&(this._mutationRecords.push(...i),this._version+=i.length,this.dispatch(i,o))}}}var nl=class extends ax{constructor(t){super(Object.assign({sid:"",ssid:""},t||{}))}setSID(t){this._data.sid=t,this._data.ssid=t.slice(0,4)}};Qt([nr],nl.prototype,"setSID",1);var on=class extends nl{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],on.prototype,"setWebviewFromSid",1),Qt([nr],on.prototype,"setTitle",1),Qt([nr],on.prototype,"setProgress",1),Qt([nr],on.prototype,"setLastError",1),Qt([nr],on.prototype,"setQueueSize",1),Qt([nr],on.prototype,"setExecutingNodeTitle",1),Qt([nr],on.prototype,"setWidgetTableStructure",1),Qt([nr],on.prototype,"setWidgetTableValue",1),Qt([nr],on.prototype,"setWidgetTableErrors",1),Qt([nr],on.prototype,"setHasPSDNodes",1),Qt([nr],on.prototype,"setComfyUserToken",1),Qt([nr],on.prototype,"setComfyOrgLoggedIn",1),Qt([nr],on.prototype,"setComfyOrgAPIKey",1),Qt([nr],on.prototype,"setUseSliderForNumberWidget",1);var Ao=class extends nl{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],Ao.prototype,"setIsLocal",1),Qt([nr],Ao.prototype,"setUName",1),Qt([nr],Ao.prototype,"setDocument",1),Qt([nr],Ao.prototype,"setCanvasStateID",1),Qt([nr],Ao.prototype,"setSelectionStateID",1),Qt([nr],Ao.prototype,"setHistoryStateID",1),Qt([nr],Ao.prototype,"setComfyUserToken",1),Qt([nr],Ao.prototype,"setActions",1);var Hp=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,WK=window.comfyAPI.ui.$el,an=window.comfyAPI.api.api;var sx=class extends Hp{createStore(t,r){return new Ao(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}},Wn=new sx,Xe=new on;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 TR(){document.title!==Xe.data.title&&Xe.setTitle(document.title),"user"in mt.extensionManager&&Xe.setComfyOrgLoggedIn(mt.extensionManager.user.isLoggedIn),requestAnimationFrame(TR)}requestAnimationFrame(TR);var PR=!1;async function NR(){if(PR)return Promise.resolve();an.user&&Xe.setComfyUserToken(an.user);let e=await an.getSetting("sdppp.useSliderForNumberWidget");e&&Xe.setUseSliderForNumberWidget(e),PR=!0}function i4(e){let t=e.split(" (id:");return{name:t[0],id:parseInt(t[1].slice(0,-1))}}function Up(e){return i4(e)}globalThis.sdpppX=globalThis.sdpppX||{};var aa=globalThis.sdpppX;var Mi=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:Up(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 lx(){let e=Wn.getAllStore(),t=[];return Object.values(e).forEach(r=>{if(an.user&&an.user!=r.data.comfyUserToken)return;let n=Mi.makeDocumentDataOptions(r).map(o=>cx(o,r.data.uname));t.push(...n)}),t}function IR(e,t){let r=[""],n=cc(e);if(!n)return[];let o=Mi.makeLayerOptions(n.documentData,t);return r.push(...o),r}function DR(){return an.user?Object.values(Wn.getAllStore()).filter(e=>an.user==e.data.comfyUserToken).length>0:Wn.storeCount()}function cx(e,t){return`${t}/${e}`}function cc(e){if(!e||!e.split||e.indexOf("/")==-1)return null;let t=Wn.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:Up(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 a4=function(e){let t=mt.graph.links;return Array.isArray(t)?t.find(n=>n&&n.origin_id==e):t.get(e)};function ux(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=a4(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}}aa.findDocumentNodeRecursive=ux;var qp=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 qp(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 AR(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 ui=Object.create(null);ui.open="0";ui.close="1";ui.ping="2";ui.pong="3";ui.message="4";ui.upgrade="5";ui.noop="6";var sf=Object.create(null);Object.keys(ui).forEach(e=>{sf[ui[e]]=e});var lf={type:"error",data:"parser error"};var FR=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",LR=typeof ArrayBuffer=="function",zR=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,cf=({type:e,data:t},r,n)=>FR&&t instanceof Blob?r?n(t):kR(t,n):LR&&(t instanceof ArrayBuffer||zR(t))?r?n(t):kR(new Blob([t]),n):n(ui[e]+(t||"")),kR=(e,t)=>{let r=new FileReader;return r.onload=function(){let n=r.result.split(",")[1];t("b"+(n||""))},r.readAsDataURL(e)};function MR(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}var fx;function WR(e,t){if(FR&&e.data instanceof Blob)return e.data.arrayBuffer().then(MR).then(t);if(LR&&(e.data instanceof ArrayBuffer||zR(e.data)))return t(MR(e.data));cf(e,!1,r=>{fx||(fx=new TextEncoder),t(fx.encode(r))})}var BR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",uf=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 s4=typeof ArrayBuffer=="function",ff=(e,t)=>{if(typeof e!="string")return{type:"message",data:VR(e,t)};let r=e.charAt(0);return r==="b"?{type:"message",data:l4(e.substring(1),t)}:sf[r]?e.length>1?{type:sf[r],data:e.substring(1)}:{type:sf[r]}:lf},l4=(e,t)=>{if(s4){let r=jR(e);return VR(r,t)}else return{base64:!0,data:e}},VR=(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 HR="",UR=(e,t)=>{let r=e.length,n=new Array(r),o=0;e.forEach((i,a)=>{cf(i,!1,s=>{n[a]=s,++o===r&&t(n.join(HR))})})},qR=(e,t)=>{let r=e.split(HR),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 dx;function Gp(e){return e.reduce((t,r)=>t+r.length,0)}function Kp(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(lf);break}o=u*Math.pow(2,32)+c.getUint32(4),n=3}else{if(Gp(r)e){s.enqueue(lf);break}}}})}var px=4;function Jt(e){if(e)return c4(e)}function c4(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),Bn=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),XR="arraybuffer";function Xp(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}var u4=Bn.setTimeout,f4=Bn.clearTimeout;function la(e,t){t.useNativeTimers?(e.setTimeoutFn=u4.bind(Bn),e.clearTimeoutFn=f4.bind(Bn)):(e.setTimeoutFn=Bn.setTimeout.bind(Bn),e.clearTimeoutFn=Bn.clearTimeout.bind(Bn))}var d4=1.33;function YR(e){return typeof e=="string"?p4(e):Math.ceil((e.byteLength||e.size)*d4)}function p4(e){let t=0,r=0;for(let n=0,o=e.length;n=57344?r+=3:(n++,r+=4);return r}function Yp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function QR(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}function JR(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)};qR(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,UR(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]=Yp()),!this.supportsBinary&&!r.sid&&(r.b64=1),this.createUri(t,r)}};var ZR=!1;try{ZR=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}var eO=ZR;function m4(){}var mx=class extends df{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}},Ga=class e extends Jt{constructor(t,r,n){super(),this.createRequest=t,la(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=Xp(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=m4,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()}};Ga.requestsCount=0;Ga.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",tO);else if(typeof addEventListener=="function"){let e="onpagehide"in Bn?"pagehide":"unload";addEventListener(e,tO,!1)}}function tO(){for(let e in Ga.requests)Ga.requests.hasOwnProperty(e)&&Ga.requests[e].abort()}var g4=function(){let e=rO({xdomain:!1});return e&&e.responseType!==null}(),Ka=class extends mx{constructor(t){super(t);let r=t&&t.forceBase64;this.supportsBinary=g4&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ga(rO,this.uri(),t)}};function rO(e){let t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||eO))return new XMLHttpRequest}catch{}if(!t)try{return new Bn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}var nO=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",hx=class extends ca{get name(){return"websocket"}doOpen(){let t=this.uri(),r=this.opts.protocols,n=nO?{}:Xp(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&&sa(()=>{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]=Yp()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}},gx=Bn.WebSocket||Bn.MozWebSocket,Xa=class extends hx{createSocket(t,r,n){return nO?new gx(t,r,n):r?new gx(t,r):new gx(t)}doWrite(t,r){this.ws.send(r)}};var uc=class extends ca{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=KR(Number.MAX_SAFE_INTEGER,this.socket.binaryType),n=t.readable.pipeThrough(r).getReader(),o=GR();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&&sa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}};var vx={websocket:Xa,webtransport:uc,polling:Ka};var h4=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,v4=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function fc(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=h4.exec(e||""),i={},a=14;for(;a--;)i[v4[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=y4(i,i.path),i.queryKey=x4(i,i.query),i}function y4(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 x4(e,t){let r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(n,o,i){o&&(r[o]=i)}),r}var yx=typeof addEventListener=="function"&&typeof removeEventListener=="function",Jp=[];yx&&addEventListener("offline",()=>{Jp.forEach(e=>e())},!1);var ol=class e extends Jt{constructor(t,r){if(super(),this.binaryType=XR,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=fc(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=fc(r.host).host);la(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=JR(this.opts.query)),yx&&(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"})},Jp.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let r=Object.assign({},this.opts.query);r.EIO=px,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,sa(()=>{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(),yx&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let n=Jp.indexOf(this._offlineEventListener);n!==-1&&Jp.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}};ol.protocol=px;var Zp=class extends ol{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;ol.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 d=new Error("probe error");d.transport=r.name,this.emitReserved("upgradeError",d)}}))};function i(){n||(n=!0,u(),r.close(),r=null)}let a=f=>{let d=new Error("probe error: "+f);d.transport=r.name,i(),this.emitReserved("upgradeError",d)};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;nvx[o]).filter(o=>!!o)),super(t,n)}};var vY=dc.protocol;function oO(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=fc(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 Ex={};Q0(Ex,{Decoder:()=>Cx,Encoder:()=>Sx,PacketType:()=>Ot,protocol:()=>cO});var S4=typeof ArrayBuffer=="function",C4=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,iO=Object.prototype.toString,w4=typeof Blob=="function"||typeof Blob<"u"&&iO.call(Blob)==="[object BlobConstructor]",E4=typeof File=="function"||typeof File<"u"&&iO.call(File)==="[object FileConstructor]";function mf(e){return S4&&(e instanceof ArrayBuffer||C4(e))||w4&&e instanceof Blob||E4&&e instanceof File}function pf(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: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(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 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 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:Ot.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: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 n=0;n0&&e.jitter<=1?e.jitter:0,this.attempts=0}il.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};il.prototype.reset=function(){this.attempts=0};il.prototype.setMin=function(e){this.ms=e};il.prototype.setMax=function(e){this.max=e};il.prototype.setJitter=function(e){this.jitter=e};var mc=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,la(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 il({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||Ex;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 dc(this.uri,this.opts);let r=this.engine,n=this;this._readyState="opening",this.skipReconnect=!1;let o=go(r,"open",function(){n.onopen(),t&&t()}),i=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},a=go(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(go(t,"ping",this.onping.bind(this)),go(t,"data",this.ondata.bind(this)),go(t,"error",this.onerror.bind(this)),go(t,"close",this.onclose.bind(this)),go(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){sa(()=>{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 pc(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 gf={};function hf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};let r=oO(e,t.path||"/socket.io"),n=r.source,o=r.id,i=r.path,a=gf[o]&&i in gf[o].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a,l;return s?l=new mc(n,t):(gf[o]||(gf[o]=new mc(n,t)),l=gf[o]),r.query&&!t.query&&(t.query=r.queryKey),l.socket(r.path,t)}Object.assign(hf,{Manager:mc,Socket:pc,io:hf,connect:hf});var uO="507";var em=uO.trim();var Rx=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=hf(t,{transports:["websocket"],path:r,query:{api_level:em},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 fO(...e){return e.reduce((t,r)=>r(t),Rx)}function dO(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 pO={last_node_id:0,last_link_id:0,nodes:[],links:[],groups:[],config:{},extra:{},version:.4};var Ya=[];aa.widgetable=aa.widgetable||{};aa.widgetable.add=function(e,t){typeof t=="function"?Ya.push([e,{formatter:t,setter:null}]):Ya.push([e,t])};function rm(e,t,r){let n=Ya.find(([s])=>s=="__DEFAULT__"),o=Ya.find(([s])=>Ox(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 vf(e){let t={},r=Ya.find(([n])=>n=="__DEFAULT__");return e.nodes.forEach(n=>{if(!n.widgets||n.widgets.length==0)return;let o=Ya.find(([i])=>Ox(i,n.type))||r;if(o)try{let i=o[1].formatter(n);i&&(t[n.id]=i.widgets.map(a=>a.value))}catch{t[n.id]=[]}}),t}function nm(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=tm(o);if(!i||i.startsWith(".")||!o.widgets||o.widgets.length==0)return;let a=Ya.find(([u])=>Ox(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,d)=>f+(d.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=Ya.find(([u])=>u=="__DEFAULT__");if(l){let u=l[1].formatter(o);if(u)return Object.assign(u,{uiWeightSum:u.widgets.reduce((f,d)=>f+(d.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=tm(o),s=tm(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 Ox(e,t){let r=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${r}$`).test(t)}function tm(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}aa.getNodeTitle=tm;var P4=new Map,al=P4;function gO(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){_x||T4();let r=t.size,n=!1,o="",i={};try{om=[];let s=await mt.queuePrompt(1,r);om.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;al.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(d=>d.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||rm(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(pO):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: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 mO(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 _x=!1,om=[];function T4(){if(_x)return;let e=an.queuePrompt;an.queuePrompt=async(...t)=>{try{let r=await e.call(an,...t);return om.push({error:null,result:r}),r}catch(r){throw om.push({error:r,result:null}),r}},_x=!0}var jn=class e extends fO($R(Xe,"comfy"),AR(Wn,"photoshop"),dO,gO){static instance;constructor(){super(location.href.split("?")[0].split("#")[0]),e.instance=this}};function im(e){return e.replace(/^workflows\//,"").replace(/\.json$/,"").split("://").pop()}var am=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)}},sm=class extends am{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}}},Qa=class e extends sm{getPSStore(){if(!this.widget.value||this.widget.value.indexOf("/")==-1)return null;let[t]=this.widget.value.split("/");return Wn.getStoreByName(t)?.data||null}static create(t,r){let n=lx(),o=t.size.slice(0),i=t.addWidget("combo",r,n[0]||"",()=>{},{forceInput:!0,values:lx});return i.serializeValue=async()=>{let a=cc(i.value);if(!a)return JSON.stringify({instance_id:me("document {0} not found",i.value),identify:"",canvasDirtyID:0,selectionDirtyID:0});if(i.type=="button")return JSON.stringify({instance_id:"",identify:"",canvasDirtyID:0,selectionDirtyID:0});let s=a.identify;return Xt.is_SPECIAL_DOCUMENT_CURRENT(s)&&(s=(await jn.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(){vO(this.widget,this.widget.options.values,!0)}selectConcreteDocument(){if(Xt.is_SPECIAL_DOCUMENT_CURRENT(this.widget.value)){let[t]=this.widget.value.split("/"),r=Wn.getStoreByName(t);if(!r)return console.warn(`store ${t} not found`);this.widget.value=cx(r.data.documents[r.data.activeDocumentID].identify,t)}}},gc=class e extends sm{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()=>{if(r.type=="button")return JSON.stringify({identify:r.value,dirtyID:0});let o=this.documentWidgetByLinked;if(!o)return JSON.stringify({identify:r.value,dirtyID:0});let i=cc(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 jn.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=Mi.getCanvasDirtyID(i.documentData):s=Mi.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=cc(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})}},N4={extraOptions:[],documentWidgetInNode:null},yf=class e extends gc{documentWidgetInNode;constructor(t,r,n=N4){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=cc(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 jn.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=Mi.getCanvasDirtyID(i.documentData):s=Mi.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=IR(t.widget.value,this.extraOptions),vO(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})}},hO=0,hc=class extends am{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:t.properties.sdppp_send_prefix||im(Xe.data.widgetTableStructure.widgetTablePath)},i=ux(t);if(i?.widgets[0]){let a=await i.widgets[0].serializeValue();try{o.document=JSON.parse(a),o.isLocal=Wn.getStore(o.document.instance_id)?.data.isLocal||!1}catch{return""}}return JSON.stringify(o)}}super(t,r),this.onChange(()=>{Wn.storeCount()==0&&Date.now()-hO>3e3&&(hO=Date.now(),location.href="/sd-ppp-static/sd-ppp_PS.ccx?_="+Date.now(),setTimeout(()=>{app.ui.dialog.show(`

<\/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[td]=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;oUc&&(t.flags|=128,n=!0,Tf(i,!1),t.lanes=4194304)}else{if(!n)if(e=vg(a),e!==null){if(t.flags|=128,n=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Tf(i,!0),i.tail===null&&i.tailMode==="hidden"&&!a.alternate&&!yr)return On(t),null}else 2*Lr()-i.renderingStartTime>Uc&&r!==1073741824&&(t.flags|=128,n=!0,Tf(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=Lr(),t.sibling=null,r=Cr.current,er(Cr,n?r&1|2:r&1),t):(On(t),null);case 22:case 23:return AS(),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 Sz(e,t){switch(gS(t),t.tag){case 1:return eo(t.type)&&ug(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vc(),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));Bc()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ir(Cr),null;case 4:return Vc(),null;case 10:return xS(t.type._context),null;case 22:case 23:return AS(),null;case 24:return null;default:return null}}var Vm=!1,_n=!1,Cz=typeof WeakSet=="function"?WeakSet:Set,qe=null;function Ic(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(n){Ir(e,t,n)}else r.current=null}function Hb(e,t,r){try{r()}catch(n){Ir(e,t,n)}}var A_=!1;function wz(e,t){if(_b=ag,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},ag=!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){Ir(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,qe=e;break}qe=t.return}return h=A_,A_=!1,h}function jf(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[td],delete t[Ib],delete t[iz],delete t[az])),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=cg));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 Za(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(Rg,r)}catch{}switch(r.tag){case 5:_n||Ic(r,t);case 6:var n=gn,o=pi;gn=null,Za(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),Yf(e)):Yx(gn,r.stateNode));break;case 4:n=gn,o=pi,gn=r.stateNode.containerInfo,pi=!0,Za(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)}Za(e,t,r);break;case 1:if(!_n&&(Ic(r,t),n=r.stateNode,typeof n.componentWillUnmount=="function"))try{n.props=r.memoizedProps,n.state=r.memoizedState,n.componentWillUnmount()}catch(s){Ir(r,t,s)}Za(e,t,r);break;case 21:Za(e,t,r);break;case 22:r.mode&1?(_n=(n=_n)||r.memoizedState!==null,Za(e,t,r),_n=n):Za(e,t,r);break;default:Za(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 Cz),t.forEach(function(n){var o=Dz.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=Lr()-n,n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Rz(n/1960))-n,10e?16:e,is===null)var n=!1;else{if(e=is,is=null,Cg=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;lLr()-$S?pl(e,0):DS|=r),to(e,t)}function MT(e,t){t===0&&((e.mode&1)===0?t=1:(t=Nm,Nm<<=1,(Nm&130023424)===0&&(Nm=4194304)));var r=Hn();e=va(e,t),e!==null&&(ld(e,t,r),to(e,r))}function Iz(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),MT(e,r)}function Dz(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,xz(e,t,r);Jn=(e.flags&131072)!==0}else Jn=!1,yr&&(t.flags&1048576)!==0&&BP(t,pg,t.index);switch(t.lanes=0,t.tag){case 2:var n=t.type;Qm(e,t),e=t.pendingProps;var o=Wc(t,Pn.current);Fc(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,fg(t)):i=!1,t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,SS(t),o.updater=Dg,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(Qm(e,t),e=t.pendingProps,o=n._init,n=o(n._payload),t.type=n,o=t.tag=kz(n),e=di(n,e),o){case 0:t=zb(null,t,n,e,r);break e;case 1:t=D_(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),D_(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),hg(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=Hc(Error(ge(423)),t),t=$_(e,t,n,r,o);break e}else if(n!==o){o=Hc(Error(ge(424)),t),t=$_(e,t,n,r,o);break e}else for(ho=cs(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(Bc(),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&&kb(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&&kb(t),null;case 13:return ST(e,t,r);case 4:return CS(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=jc(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(mg,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),Ab(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),Ab(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,Fc(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),Qm(e,t),t.tag=1,eo(n)?(e=!0,fg(t)):e=!1,Fc(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 kz(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 ps(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 eg(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 Cc:return ml(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 es: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 ml(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 Mz(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=Do(jS=>{"use strict";var UT=Vi();jS.createRoot=UT.createRoot,jS.hydrateRoot=UT.hydrateRoot;var TJ});var Ne=Do((DJ,Wg)=>{"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"),Vg=Symbol.for("react.fragment"),Hg=Symbol.for("react.strict_mode"),Ug=Symbol.for("react.profiler"),qg=Symbol.for("react.provider"),Gg=Symbol.for("react.context"),Xz=Symbol.for("react.server_context"),Kg=Symbol.for("react.forward_ref"),Xg=Symbol.for("react.suspense"),Yg=Symbol.for("react.suspense_list"),Qg=Symbol.for("react.memo"),Jg=Symbol.for("react.lazy"),Yz=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 Vg:case Ug:case Hg:case Xg:case Yg:return e;default:switch(e=e&&e.$$typeof,e){case Xz:case Gg:case Kg:case Jg:case Qg:case qg:return e;default:return t}}case qS:return t}}}Ht.ContextConsumer=Gg;Ht.ContextProvider=qg;Ht.Element=US;Ht.ForwardRef=Kg;Ht.Fragment=Vg;Ht.Lazy=Jg;Ht.Memo=Qg;Ht.Portal=qS;Ht.Profiler=Ug;Ht.StrictMode=Hg;Ht.Suspense=Xg;Ht.SuspenseList=Yg;Ht.isAsyncMode=function(){return!1};Ht.isConcurrentMode=function(){return!1};Ht.isContextConsumer=function(e){return jo(e)===Gg};Ht.isContextProvider=function(e){return jo(e)===qg};Ht.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===US};Ht.isForwardRef=function(e){return jo(e)===Kg};Ht.isFragment=function(e){return jo(e)===Vg};Ht.isLazy=function(e){return jo(e)===Jg};Ht.isMemo=function(e){return jo(e)===Qg};Ht.isPortal=function(e){return jo(e)===qS};Ht.isProfiler=function(e){return jo(e)===Ug};Ht.isStrictMode=function(e){return jo(e)===Hg};Ht.isSuspense=function(e){return jo(e)===Xg};Ht.isSuspenseList=function(e){return jo(e)===Yg};Ht.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Vg||e===Ug||e===Hg||e===Xg||e===Yg||e===Yz||typeof e=="object"&&e!==null&&(e.$$typeof===Jg||e.$$typeof===Qg||e.$$typeof===qg||e.$$typeof===Gg||e.$$typeof===Kg||e.$$typeof===tN||e.getModuleId!==void 0)};Ht.typeOf=jo});var oN=Do((JJ,nN)=>{"use strict";nN.exports=rN()});var y3=Do(_0=>{"use strict";var wG=D(),EG=Symbol.for("react.element"),RG=Symbol.for("react.fragment"),OG=Object.prototype.hasOwnProperty,_G=wG.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,PG={key:!0,ref:!0,__self:!0,__source:!0};function v3(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)OG.call(t,n)&&!PG.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:EG,type:e,key:i,ref:a,props:o,_owner:_G.current}}_0.Fragment=RG;_0.jsx=v3;_0.jsxs=v3});var Or=Do((QAe,x3)=>{"use strict";x3.exports=y3()});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","Back to workflow list":"\u8FD4\u56DE\u5DE5\u4F5C\u6D41\u5217\u8868","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 el(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 el(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 el(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 el(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 el(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 el(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 el(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:()=>Nr,_areEquals:()=>of,applyOperation:()=>tl,applyPatch:()=>lc,applyReducer:()=>H5,deepClone:()=>j5,getValueByPointer:()=>rl,validate:()=>SR,validator:()=>zp});var W5=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)}}(),B5=Object.prototype.hasOwnProperty;function Mp(e,t){return B5.call(e,t)}function Fp(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 ki(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function rf(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&&!Lp(g))throw new Nr("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);Lp(g)&&(g=~~g)}if(u>=f){if(r&&t.op==="add"&&g>c.length)throw new Nr("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=V5[t.op].call(t,c,g,e);if(a.test===!1)throw new Nr("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}}else if(u>=f){var a=sc[t.op].call(t,c,g,e);if(a.test===!1)throw new Nr("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return a}if(c=c[g],r&&u0)throw new Nr('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 Nr("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 Nr("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 Nr("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 Nr("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 Nr("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 Nr("Cannot perform the operation from a path that does not exist","OPERATION_FROM_UNRESOLVABLE",t,e,r)}}}else throw new Nr("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 Nr("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)lc(Tr(t),Tr(e),r||!0);else{r=r||zp;for(var n=0;nWp,generate:()=>Q0,observe:()=>Q5,unobserve:()=>Y5});var J0=new WeakMap,U5=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),q5=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function G5(e){return J0.get(e)}function K5(e,t){return e.observers.get(t)}function X5(e,t){e.observers.delete(t.callback)}function Y5(e,t){t.unobserve()}function Q5(e,t){var r=[],n,o=G5(e);if(!o)o=new U5(e),J0.set(e,o);else{var i=K5(o,t);n=i&&i.observer}if(n)return n;if(n={},o.value=Tr(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),X5(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 q5(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&&lc(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=Fp(t),a=Fp(e),s=!1,l=!1,c=a.length-1;c>=0;c--){var u=a[c],f=e[u];if(Mp(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+"/"+ki(u),o):f!==p&&(s=!0,o&&r.push({op:"test",path:n+"/"+ki(u),value:Tr(f)}),r.push({op:"replace",path:n+"/"+ki(u),value:Tr(p)}))}else Array.isArray(e)===Array.isArray(t)?(o&&r.push({op:"test",path:n+"/"+ki(u),value:Tr(f)}),r.push({op:"remove",path:n+"/"+ki(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:rl(r,i)))})}),n.forEach((o,i)=>{let a=i==="/"?this._data:rl(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[Bp]||(e.constructor[Bp]=[]),e.constructor[Bp].push(t),{value:function(...n){let o=Tr(this._data);r.value.apply(this,n);let i=Wp(o,this._data);i.length!=0&&(this._mutationRecords.push(...i),this._version+=i.length,this.dispatch(i,o))}}}var nl=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],nl.prototype,"setSID",1);var on=class extends nl{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],on.prototype,"setWebviewFromSid",1),Qt([nr],on.prototype,"setTitle",1),Qt([nr],on.prototype,"setProgress",1),Qt([nr],on.prototype,"setLastError",1),Qt([nr],on.prototype,"setQueueSize",1),Qt([nr],on.prototype,"setExecutingNodeTitle",1),Qt([nr],on.prototype,"setWidgetTableStructure",1),Qt([nr],on.prototype,"setWidgetTableValue",1),Qt([nr],on.prototype,"setWidgetTableErrors",1),Qt([nr],on.prototype,"setHasPSDNodes",1),Qt([nr],on.prototype,"setComfyUserToken",1),Qt([nr],on.prototype,"setComfyOrgLoggedIn",1),Qt([nr],on.prototype,"setComfyOrgAPIKey",1),Qt([nr],on.prototype,"setUseSliderForNumberWidget",1);var $o=class extends nl{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],$o.prototype,"setIsLocal",1),Qt([nr],$o.prototype,"setUName",1),Qt([nr],$o.prototype,"setDocument",1),Qt([nr],$o.prototype,"setCanvasStateID",1),Qt([nr],$o.prototype,"setSelectionStateID",1),Qt([nr],$o.prototype,"setHistoryStateID",1),Qt([nr],$o.prototype,"setComfyUserToken",1),Qt([nr],$o.prototype,"setActions",1);var jp=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,an=window.comfyAPI.api.api;var rx=class extends jp{createStore(t,r){return new $o(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 on;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();an.user&&Xe.setComfyUserToken(an.user);let e=await an.getSetting("sdppp.useSliderForNumberWidget");e&&Xe.setUseSliderForNumberWidget(e),CR=!0}function J5(e){let t=e.split(" (id:");return{name:t[0],id:parseInt(t[1].slice(0,-1))}}function Vp(e){return J5(e)}globalThis.sdpppX=globalThis.sdpppX||{};var ia=globalThis.sdpppX;var Ai=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:Vp(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(an.user&&an.user!=r.data.comfyUserToken)return;let n=Ai.makeDocumentDataOptions(r).map(o=>ox(o,r.data.uname));t.push(...n)}),t}function RR(e,t){let r=[""],n=cc(e);if(!n)return[];let o=Ai.makeLayerOptions(n.documentData,t);return r.push(...o),r}function OR(){return an.user?Object.values(zn.getAllStore()).filter(e=>an.user==e.data.comfyUserToken).length>0:zn.storeCount()}function ox(e,t){return`${t}/${e}`}function cc(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:Vp(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 Z5=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=Z5(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 Hp=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 Hp(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 af=Object.create(null);Object.keys(ci).forEach(e=>{af[ci[e]]=e});var sf={type:"error",data:"parser error"};var IR=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",DR=typeof ArrayBuffer=="function",$R=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,lf=({type:e,data:t},r,n)=>IR&&t instanceof Blob?r?n(t):TR(t,n):DR&&(t instanceof ArrayBuffer||$R(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 kR(e,t){if(IR&&e.data instanceof Blob)return e.data.arrayBuffer().then(NR).then(t);if(DR&&(e.data instanceof ArrayBuffer||$R(e.data)))return t(NR(e.data));lf(e,!1,r=>{ax||(ax=new TextEncoder),t(ax.encode(r))})}var AR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",cf=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 e4=typeof ArrayBuffer=="function",uf=(e,t)=>{if(typeof e!="string")return{type:"message",data:FR(e,t)};let r=e.charAt(0);return r==="b"?{type:"message",data:t4(e.substring(1),t)}:af[r]?e.length>1?{type:af[r],data:e.substring(1)}:{type:af[r]}:sf},t4=(e,t)=>{if(e4){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)=>{lf(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 Up(e){return e.reduce((t,r)=>t+r.length,0)}function qp(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(sf);break}o=u*Math.pow(2,32)+c.getUint32(4),n=3}else{if(Up(r)e){s.enqueue(sf);break}}}})}var lx=4;function Jt(e){if(e)return r4(e)}function r4(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 Gp(e,...t){return t.reduce((r,n)=>(e.hasOwnProperty(n)&&(r[n]=e[n]),r),{})}var n4=Wn.setTimeout,o4=Wn.clearTimeout;function sa(e,t){t.useNativeTimers?(e.setTimeoutFn=n4.bind(Wn),e.clearTimeoutFn=o4.bind(Wn)):(e.setTimeoutFn=Wn.setTimeout.bind(Wn),e.clearTimeoutFn=Wn.clearTimeout.bind(Wn))}var i4=1.33;function HR(e){return typeof e=="string"?a4(e):Math.ceil((e.byteLength||e.size)*i4)}function a4(e){let t=0,r=0;for(let n=0,o=e.length;n=57344?r+=3:(n++,r+=4);return r}function Kp(){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]=Kp()),!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 s4(){}var cx=class extends ff{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}},Ga=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=Gp(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=s4,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()}};Ga.requestsCount=0;Ga.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 Ga.requests)Ga.requests.hasOwnProperty(e)&&Ga.requests[e].abort()}var l4=function(){let e=YR({xdomain:!1});return e&&e.responseType!==null}(),Ka=class extends cx{constructor(t){super(t);let r=t&&t.forceBase64;this.supportsBinary=l4&&!r}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Ga(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?{}:Gp(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]=Kp()),this.supportsBinary||(r.b64=1),this.createUri(t,r)}},ux=Wn.WebSocket||Wn.MozWebSocket,Xa=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 uc=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:Xa,webtransport:uc,polling:Ka};var c4=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,u4=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function fc(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=c4.exec(e||""),i={},a=14;for(;a--;)i[u4[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=f4(i,i.path),i.queryKey=d4(i,i.query),i}function f4(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 d4(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",Yp=[];px&&addEventListener("offline",()=>{Yp.forEach(e=>e())},!1);var ol=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=fc(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=fc(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"})},Yp.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=Yp.indexOf(this._offlineEventListener);n!==-1&&Yp.splice(n,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,r),this.writeBuffer=[],this._prevBufferLen=0}}};ol.protocol=lx;var Qp=class extends ol{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;ol.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 uY=dc.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=fc(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 m4=typeof ArrayBuffer=="function",g4=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ZR=Object.prototype.toString,h4=typeof Blob=="function"||typeof Blob<"u"&&ZR.call(Blob)==="[object BlobConstructor]",v4=typeof File=="function"||typeof File<"u"&&ZR.call(File)==="[object FileConstructor]";function pf(e){return m4&&(e instanceof ArrayBuffer||g4(e))||h4&&e instanceof Blob||v4&&e instanceof File}function df(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}il.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};il.prototype.reset=function(){this.attempts=0};il.prototype.setMin=function(e){this.ms=e};il.prototype.setMax=function(e){this.max=e};il.prototype.setJitter=function(e){this.jitter=e};var mc=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 il({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 dc(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 pc(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 mf={};function gf(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=mf[o]&&i in mf[o].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||a,l;return s?l=new mc(n,t):(mf[o]||(mf[o]=new mc(n,t)),l=mf[o]),r.query&&!t.query&&(t.query=r.queryKey),l.socket(r.path,t)}Object.assign(gf,{Manager:mc,Socket:pc,io:gf,connect:gf});var oO="507";var Jp=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=gf(t,{transports:["websocket"],path:r,query:{api_level:Jp},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 Ya=[];ia.widgetable=ia.widgetable||{};ia.widgetable.add=function(e,t){typeof t=="function"?Ya.push([e,{formatter:t,setter:null}]):Ya.push([e,t])};function em(e,t,r){let n=Ya.find(([s])=>s=="__DEFAULT__"),o=Ya.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 hf(e){let t={},r=Ya.find(([n])=>n=="__DEFAULT__");return e.nodes.forEach(n=>{if(!n.widgets||n.widgets.length==0)return;let o=Ya.find(([i])=>Sx(i,n.type))||r;if(o)try{let i=o[1].formatter(n);i&&(t[n.id]=i.widgets.map(a=>a.value))}catch{t[n.id]=[]}}),t}function tm(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=Zp(o);if(!i||i.startsWith(".")||!o.widgets||o.widgets.length==0)return;let a=Ya.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=Ya.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=Zp(o),s=Zp(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 Zp(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=Zp;var S4=new Map,al=S4;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||C4();let r=t.size,n=!1,o="",i={};try{rm=[];let s=await mt.queuePrompt(1,r);rm.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;al.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||em(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,rm=[];function C4(){if(Cx)return;let e=an.queuePrompt;an.queuePrompt=async(...t)=>{try{let r=await e.call(an,...t);return rm.push({error:null,result:r}),r}catch(r){throw rm.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 nm(e){return e.replace(/^workflows\//,"").replace(/\.json$/,"").split("://").pop()}var om=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)}},im=class extends om{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}}},Qa=class e extends im{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=cc(i.value);if(!a)return JSON.stringify({instance_id:me("document {0} not found",i.value),identify:"",canvasDirtyID:0,selectionDirtyID:0});if(i.type=="button")return JSON.stringify({instance_id:"",identify:"",canvasDirtyID:0,selectionDirtyID: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)}}},gc=class e extends im{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()=>{if(r.type=="button")return JSON.stringify({identify:r.value,dirtyID:0});let o=this.documentWidgetByLinked;if(!o)return JSON.stringify({identify:r.value,dirtyID:0});let i=cc(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=Ai.getCanvasDirtyID(i.documentData):s=Ai.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=cc(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})}},w4={extraOptions:[],documentWidgetInNode:null},vf=class e extends gc{documentWidgetInNode;constructor(t,r,n=w4){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=cc(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=Ai.getCanvasDirtyID(i.documentData):s=Ai.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,hc=class extends om{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:t.properties.sdppp_send_prefix||nm(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=Wn.storeCount()>0&&jn.instance.id?me("current ComfyUI pageid: {0}",jn.instance.id.slice(0,4)):me("download PS plugin (.ccx)")}documentWidgetByLinked=null;linkDocumentWidget(t){this.documentWidgetByLinked=t}};function vO(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 ua=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",em)}};var Fi=class extends ua{downloadWidget;constructor(t){super(t),this.downloadWidget||(this.downloadWidget=new hc(this.node))}onConfigure(t){super.onConfigure(t)}onDrawForeground(t){this.node.flags.collapsed||DR()||(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 lm=class{node;inputIndex;get index(){return this.inputIndex}constructor(t,r){this.node=t,this.inputIndex=r}update(){}connected=!1},xf=class extends lm{get documentWidget(){return yO(this.node,this.node.inputs[this.inputIndex])?.documentWidget||null}},bf=class extends lm{get documentWidget(){return yO(this.node,this.node.inputs[this.inputIndex])?.documentWidget||null}};function yO(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 ua.nodeMap.get(n)}var ko=class extends Fi{get documentWidget(){let t=this.inputs.find(r=>r.connected&&(r instanceof xf||r instanceof bf));return t?t.documentWidget:this.sdpppWidgets.find(r=>r instanceof Qa)}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 gc||i instanceof hc)&&i.linkDocumentWidget(o)})}})}};var cm=class extends ko{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))}},vc=class extends ko{async update(){super.update(),this.node.inputs.forEach(t=>t.label=me(t.name)),this.node.outputs.forEach(t=>t.label=me(t.name))}},um=class extends ko{async update(){super.update(),this.node.inputs.forEach(t=>t.label=me(t.name)),this.node.outputs.forEach(t=>t.label=me(t.name))}},fm=class extends ko{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)}},dm=class extends ko{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)}},pm=class extends Fi{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))}},mm=class extends Fi{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))}},gm=class extends ko{get documentWidget(){return this.sdpppWidgets[0]}psdWidget;extractPSD(t,r){this.node.properties.psd&&jn.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=Wn.getAllPhotoshopDocumentData(),[n,o]=this.documentWidget.widget.value.split("/");this.node.properties.psd?this.extractPSD(r[n].sid,o):jn.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"))}},hm=class extends ko{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 vm=class extends Fi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}documentWidget;layerWidget;constructor(t){let r=Qa.create(t,"document"),n=yf.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(xm["SDPPP Get Selection"],{pos:this.node.pos});new vc(r),this.node.outputs[0].links?.length?comfyAPI.app.app.addNodeOnGraph(xm.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)}},ym=class extends Fi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}documentWidget;layerWidget;constructor(t){let r=Qa.create(t,"document"),n=yf.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)}onConfigure(t){"sdppp_send_prefix"in t.properties||this.node.setProperty("sdppp_send_prefix",""),super.onConfigure(t)}};var Px={"Get Image From Photoshop Layer":vm,"Send Images To Photoshop":ym,"SDPPP Send Text To Layer":pm,"SDPPP Get Text From Layer":mm,"SDPPP Parse Layer Info":um,"SDPPP Get Linked Layers":dm,"SDPPP Get Layers In Group":fm,"SDPPP Get Layer By ID":cm,"SDPPP Get Document":gm,"SDPPP Get Selection":vc,"SDPPP Select Layer And Run PS Action":hm},xm={};function xO(e,t){let r=e.comfyClass||t.name;if(xm[r]=t,r in Px)e.title=me(t.display_name),t.display_name=me(t.display_name),ua.registerNodeType(e,t,Px[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 Px&&(o=!0)}),o&&ua.registerNodeType(e,t,ko)}else return}var yR=E(JT(),1),xR=E(N(),1);var ZT=`#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",Jp)}};var Mi=class extends ca{downloadWidget;constructor(t){super(t),this.downloadWidget||(this.downloadWidget=new hc(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 am=class{node;inputIndex;get index(){return this.inputIndex}constructor(t,r){this.node=t,this.inputIndex=r}update(){}connected=!1},yf=class extends am{get documentWidget(){return dO(this.node,this.node.inputs[this.inputIndex])?.documentWidget||null}},xf=class extends am{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 ko=class extends Mi{get documentWidget(){let t=this.inputs.find(r=>r.connected&&(r instanceof yf||r instanceof xf));return t?t.documentWidget:this.sdpppWidgets.find(r=>r instanceof Qa)}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 gc||i instanceof hc)&&i.linkDocumentWidget(o)})}})}};var sm=class extends ko{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))}},vc=class extends ko{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 ko{async update(){super.update(),this.node.inputs.forEach(t=>t.label=me(t.name)),this.node.outputs.forEach(t=>t.label=me(t.name))}},cm=class extends ko{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 ko{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)}},fm=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))}},dm=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))}},pm=class extends ko{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"))}},mm=class extends ko{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 gm=class extends Mi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}documentWidget;layerWidget;constructor(t){let r=Qa.create(t,"document"),n=vf.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(vm["SDPPP Get Selection"],{pos:this.node.pos});new vc(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,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)}},hm=class extends Mi{static prehandleNodeType(t){t.input.optional.document&&delete t.input.optional.document}documentWidget;layerWidget;constructor(t){let r=Qa.create(t,"document"),n=vf.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)}onConfigure(t){"sdppp_send_prefix"in t.properties||this.node.setProperty("sdppp_send_prefix",""),super.onConfigure(t)}};var wx={"Get Image From Photoshop Layer":gm,"Send Images To Photoshop":hm,"SDPPP Send Text To Layer":fm,"SDPPP Get Text From Layer":dm,"SDPPP Parse Layer Info":lm,"SDPPP Get Linked Layers":um,"SDPPP Get Layers In Group":cm,"SDPPP Get Layer By ID":sm,"SDPPP Get Document":pm,"SDPPP Get Selection":vc,"SDPPP Select Layer And Run PS Action":mm},vm={};function pO(e,t){let r=e.comfyClass||t.name;if(vm[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,ko)}else return}var dR=E(qT(),1),pR=E(D(),1);var GT=`#sdppp-popup-root { width: 100%; height: 100%; position: absolute; @@ -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 rf=E(N(),1);var _3=E(N(),1);function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:{},r=[];return eN.default.Children.forEach(e,function(n){n==null&&!t.keepEmpty||(Array.isArray(n)?r=r.concat(xi(n)):pd(n)&&n.props?r=r.concat(xi(n.props.children,t)):r.push(n))}),r}var KS={},Jz=[],Zz=function(t){Jz.push(t)};function md(e,t){if(0)var r}function eW(e,t){if(0)var r}function tN(){KS={}}function rN(e,t,r){!t&&!KS[r]&&(e(!1,r),KS[r]=!0)}function Vg(e,t){rN(md,e,t)}function nN(e,t){rN(eW,e,t)}Vg.preMessage=Zz;Vg.resetWarned=tN;Vg.noteOnce=nN;var Vt=Vg;function oN(e,t){if(fe(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(fe(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Hg(e){var t=oN(e,"string");return fe(t)=="symbol"?t:t+""}function _(e,t,r){return(t=Hg(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iN(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,gd.isMemo)(t)?t.type.type:t.type;return!(typeof o=="function"&&!((r=o.prototype)!==null&&r!==void 0&&r.render)&&o.$$typeof!==gd.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==gd.ForwardRef)};function dN(e){return(0,th.isValidElement)(e)&&!pd(e)}var xs=function(t){if(t&&dN(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null};var Wr=E(N());var Ci=E(N()),rh=Ci.createContext(null);function pN(e){var t=e.children,r=e.onBatchResize,n=Ci.useRef(0),o=Ci.useRef([]),i=Ci.useContext(rh),a=Ci.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 Ci.createElement(rh.Provider,{value:a},t)}var gN=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(){!JS||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),uW?(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(){!JS||!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=cW.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}(),hN=function(e,t){for(var r=0,n=Object.keys(t);r"u"||!(Element instanceof Object))){if(!(t instanceof Kc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new xW(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 Kc(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 bW(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}(),yN=typeof WeakMap<"u"?new WeakMap:new gN,xN=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=fW.getInstance(),n=new SW(t,r,this);yN.set(this,n)}return e}();["observe","unobserve","disconnect"].forEach(function(e){xN.prototype[e]=function(){var t;return(t=yN.get(this))[e].apply(t,arguments)}});var CW=function(){return typeof nh.ResizeObserver<"u"?nh.ResizeObserver:xN}(),bN=CW;var bs=new Map;function wW(e){e.forEach(function(t){var r,n=t.target;(r=bs.get(n))===null||r===void 0||r.forEach(function(o){return o(n)})})}var SN=new bN(wW);function CN(e,t){bs.has(e)||(bs.set(e,new Set),SN.observe(e)),bs.get(e).add(t)}function wN(e,t){bs.has(e)&&(bs.get(e).delete(t),bs.get(e).size||(SN.unobserve(e),bs.delete(e)))}function it(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function EN(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;DN+=1;var n=DN;function o(i){if(i===0)kN(n),t();else{var a=$N(function(){o(i-1)});ZS.set(n,a)}}return o(r),n};MN.cancel=function(e){var t=ZS.get(e);return kN(e),AN(t)};var dt=MN;var lr=E(N());function lh(e){if(Array.isArray(e))return e}function FN(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 ch(){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 M(e,t){return lh(e)||FN(e,t)||Xc(e,t)||ch()}function PW(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 Cs=PW;function Yt(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function eC(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 LN="data-rc-order",zN="data-rc-priority",TW="rc-util-key",tC=new Map;function WN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):TW}function uh(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function NW(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function rC(e){return Array.from((tC.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function BN(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=NW(n),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(LN,a),s&&i&&l.setAttribute(zN,"".concat(i)),r!=null&&r.nonce&&(l.nonce=r?.nonce),l.innerHTML=e;var c=uh(t),u=c.firstChild;if(n){if(s){var f=(t.styles||rC(c)).filter(function(d){if(!["prepend","prependQueue"].includes(d.getAttribute(LN)))return!1;var m=Number(d.getAttribute(zN)||0);return i>=m});if(f.length)return c.insertBefore(l,f[f.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function jN(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=uh(t);return(t.styles||rC(r)).find(function(n){return n.getAttribute(WN(t))===e})}function qi(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=jN(e,t);if(r){var n=uh(t);n.removeChild(r)}}function IW(e,t){var r=tC.get(e);if(!r||!eC(document,r)){var n=BN("",t),o=n.parentNode;tC.set(e,o),e.removeChild(n)}}function xn(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=uh(r),o=rC(n),i=T(T({},r),{},{styles:o});IW(n,i);var a=jN(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=BN(e,i);return u.setAttribute(WN(i),t),u}var tI=E(N());function VN(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=VN(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=M(c,2),d=f[1];return o.internalGet(u)[1]0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),qN+=1}return at(e,[{key:"getDerivativeToken",value:function(r){return this.derivatives.reduce(function(n,o){return o(r,n)},void 0)}}]),e}();var nC=new xd;function Es(e){var t=Array.isArray(e)?e:[e];return nC.has(t)||nC.set(t,new Yc(t)),nC.get(t)}var WW=new WeakMap,oC={};function KN(e,t){for(var r=WW,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,Gi,t),_(n,Nn,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 Jc=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()},BW=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=M(o,2),a=i[0],s=i[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},ph=function(t,r,n){var o={},i={};return Object.entries(t).forEach(function(a){var s,l,c=M(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 d,m=Jc(u,n?.prefix);o[m]=typeof f=="number"&&!(n!=null&&(d=n.unitless)!==null&&d!==void 0&&d[u])?"".concat(f,"px"):String(f),i[u]="var(".concat(m,")")}}),[i,BW(o,r,{scope:n?.scope})]};var mh=E(N());var Zc=E(N());var XN=Yt()?Zc.useLayoutEffect:Zc.useEffect,YN=function(t,r){var n=Zc.useRef(!0);XN(function(){return t(n.current)},r),XN(function(){return n.current=!1,function(){n.current=!0}},[])},Rl=function(t,r){YN(function(n){if(!n)return t()},r)},vt=YN;var aC=E(N()),jW=T({},aC),QN=jW.useInsertionEffect,VW=function(t,r,n){aC.useMemo(t,n),vt(function(){return r(!0)},n)},HW=QN?function(e,t,r){return QN(function(){return e(),t()},r)}:VW,JN=HW;var sC=E(N()),UW=T({},sC),qW=UW.useInsertionEffect,GW=function(t){var r=[],n=!1;function o(i){n||r.push(i)}return sC.useEffect(function(){return n=!1,function(){n=!0,r.length&&r.forEach(function(i){return i()})}},t),o},KW=function(){return function(t){t()}},XW=typeof qW<"u"?GW:KW,ZN=XW;function YW(){return!1}var eI=YW;function Ol(e,t,r,n,o){var i=mh.useContext(Ei),a=i.cache,s=[e].concat(ee(t)),l=fh(s),c=ZN([l]),u=eI(),f=function(v){a.opUpdate(l,function(y){var g=y||[void 0,void 0],p=M(g,2),x=p[0],b=x===void 0?0:x,S=p[1],w=S,C=w||r(),R=[b,C];return v?v(R):R})};mh.useMemo(function(){f()},[l]);var d=a.opGet(l),m=d[1];return JN(function(){o?.(m)},function(h){return f(function(v){var y=M(v,2),g=y[0],p=y[1];return h&&g===0&&o?.(m),[g+1,p]}),function(){a.opUpdate(l,function(v){var y=v||[],g=M(y,2),p=g[0],x=p===void 0?0:p,b=g[1],S=x-1;return S===0?(c(function(){(h||!a.opGet(l))&&n?.(b,!1)}),null):[x-1,b]})}},[l]),m}var QW={},JW="css",_l=new Map;function ZW(e){_l.set(e,(_l.get(e)||0)+1)}function eB(e,t){if(typeof document<"u"){var r=document.querySelectorAll("style[".concat(Gi,'="').concat(e,'"]'));r.forEach(function(n){if(n[wi]===t){var o;(o=n.parentNode)===null||o===void 0||o.removeChild(n)}})}}var tB=0;function rB(e,t){_l.set(e,(_l.get(e)||0)-1);var r=Array.from(_l.keys()),n=r.filter(function(o){var i=_l.get(o)||0;return i<=0});r.length-n.length>tB&&n.forEach(function(o){eB(o,t),_l.delete(o)})}var rI=function(t,r,n,o){var i=n.getDerivativeToken(t),a=T(T({},i),r);return o&&(a=o(a)),a},lC="token";function gh(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},n=(0,tI.useContext)(Ei),o=n.cache.instanceId,i=n.container,a=r.salt,s=a===void 0?"":a,l=r.override,c=l===void 0?QW:l,u=r.formatToken,f=r.getComputedToken,d=r.cssVar,m=KN(function(){return Object.assign.apply(Object,[{}].concat(ee(t)))},t),h=Qc(m),v=Qc(c),y=d?Qc(d):"",g=Ol(lC,[s,e.id,h,v,y],function(){var p,x=f?f(m,c,e):rI(m,c,e,u),b=T({},x),S="";if(d){var w=ph(x,d.key,{prefix:d.prefix,ignore:d.ignore,unitless:d.unitless,preserve:d.preserve}),C=M(w,2);x=C[0],S=C[1]}var R=iC(x,s);x._tokenKey=R,b._tokenKey=iC(b,s);var P=(p=d?.key)!==null&&p!==void 0?p:R;x._themeKey=P,ZW(P);var O="".concat(JW,"-").concat(Cs(R));return x._hashId=O,[x,O,b,S,d?.key||""]},function(p){rB(p[0]._themeKey,o)},function(p){var x=M(p,4),b=x[0],S=x[3];if(d&&S){var w=xn(S,Cs("css-variables-".concat(b._themeKey)),{mark:Nn,prepend:"queue",attachTo:i,priority:-999});w[wi]=o,w.setAttribute(Gi,b._themeKey)}});return g}var nI=function(t,r,n){var o=M(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,d={"data-rc-order":"prependQueue","data-rc-priority":"".concat(f)},m=Rs(a,s,u,d,c);return[f,u,m]};var TI=E(N());var Ps=E(N());var nB={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},cC=nB;var hh="comm",vh="rule",yh="decl";var oI="@import";var iI="@namespace",aI="@keyframes";var sI="@layer";var uC=Math.abs,Sd=String.fromCharCode;function xh(e){return e.trim()}function Cd(e,t,r){return e.replace(t,r)}function lI(e,t,r){return e.indexOf(t,r)}function Os(e,t){return e.charCodeAt(t)|0}function _s(e,t,r){return e.slice(t,r)}function Co(e){return e.length}function cI(e){return e.length}function eu(e,t){return t.push(e),e}var bh=1,tu=1,uI=0,Ho=0,Ur=0,nu="";function Sh(e,t,r,n,o,i,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:bh,column:tu,length:a,return:"",siblings:s}}function fI(){return Ur}function dI(){return Ur=Ho>0?Os(nu,--Ho):0,tu--,Ur===10&&(tu=1,bh--),Ur}function Uo(){return Ur=Ho2||ru(Ur)>3?"":" "}function hI(e,t){for(;--t&&Uo()&&!(Ur<48||Ur>102||Ur>57&&Ur<65||Ur>70&&Ur<97););return Ch(e,wd()+(t<6&&Sa()==32&&Uo()==32))}function fC(e){for(;Uo();)switch(Ur){case e:return Ho;case 34:case 39:e!==34&&e!==39&&fC(Ur);break;case 40:e===41&&fC(e);break;case 92:Uo();break}return Ho}function vI(e,t){for(;Uo()&&e+Ur!==57;)if(e+Ur===84&&Sa()===47)break;return"/*"+Ch(t,Ho-1)+"*"+Sd(e===47?e:Uo())}function yI(e){for(;!ru(Sa());)Uo();return Ch(e,Ho)}function SI(e){return mI(Eh("",null,null,null,[""],e=pI(e),0,[0],e))}function Eh(e,t,r,n,o,i,a,s,l){for(var c=0,u=0,f=a,d=0,m=0,h=0,v=1,y=1,g=1,p=0,x="",b=o,S=i,w=n,C=x;y;)switch(h=p,p=Uo()){case 40:if(h!=108&&Os(C,f-1)==58){lI(C+=Cd(wh(p),"&","&\f"),"&\f",uC(c?s[c-1]:0))!=-1&&(g=-1);break}case 34:case 39:case 91:C+=wh(p);break;case 9:case 10:case 13:case 32:C+=gI(h);break;case 92:C+=hI(wd()-1,7);continue;case 47:switch(Sa()){case 42:case 47:eu(oB(vI(Uo(),wd()),t,r,l),l),(ru(h||1)==5||ru(Sa()||1)==5)&&Co(C)&&_s(C,-1,void 0)!==" "&&(C+=" ");break;default:C+="/"}break;case 123*v:s[c++]=Co(C)*g;case 125*v:case 59:case 0:switch(p){case 0:case 125:y=0;case 59+u:g==-1&&(C=Cd(C,/\f/g,"")),m>0&&(Co(C)-f||v===0&&h===47)&&eu(m>32?bI(C+";",n,r,f-1,l):bI(Cd(C," ","")+";",n,r,f-2,l),l);break;case 59:C+=";";default:if(eu(w=xI(C,t,r,c,u,o,s,x,b=[],S=[],f,i),i),p===123)if(u===0)Eh(C,t,w,w,b,i,f,s,S);else{switch(d){case 99:if(Os(C,3)===110)break;case 108:if(Os(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Eh(e,w,w,n&&eu(xI(e,w,w,0,0,o,s,x,o,b=[],f,S),S),o,S,f,s,n?b:S):Eh(C,w,w,w,[""],S,0,s,S)}}c=u=m=0,v=g=1,x=C="",f=a;break;case 58:f=1+Co(C),m=h;default:if(v<1){if(p==123)--v;else if(p==125&&v++==0&&dI()==125)continue}switch(C+=Sd(p),p*v){case 38:g=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(Co(C)-1)*g,g=1;break;case 64:Sa()===45&&(C+=wh(Uo())),d=Sa(),u=f=Co(x=C+=yI(wd())),p++;break;case 45:h===45&&Co(C)==2&&(v=0)}}return i}function xI(e,t,r,n,o,i,a,s,l,c,u,f){for(var d=o-1,m=o===0?i:[""],h=cI(m),v=0,y=0,g=0;v0?m[p]+" "+x:Cd(x,/&\f/g,m[p])))&&(l[g++]=b);return Sh(e,t,r,o===0?vh:s,l,c,u,f)}function oB(e,t,r,n){return Sh(e,t,r,hh,Sd(fI()),_s(e,2,-2),0,n)}function bI(e,t,r,n,o){return Sh(e,t,r,yh,_s(e,0,n),_s(e,n+1,-1),n,o)}function Rh(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,d=f===void 0?[]:f,m=r.linters,h=m===void 0?[]:m,v="",y={};function g(b){var S=b.getName(s);if(!y[S]){var w=e(b.style,r,{root:!1,parentSelectors:a}),C=M(w,1),R=C[0];y[S]="@keyframes ".concat(b.getName(s)).concat(R)}}function p(b){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return b.forEach(function(w){Array.isArray(w)?p(w,S):w&&S.push(w)}),S}var x=p(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)g(S);else{var w=d.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(fe(R)==="object"&&R&&(C!=="animationName"||!R._keyframe)&&!fB(R)){var P=!1,O=C.trim(),I=!1;(o||i)&&s?O.startsWith("@")?P=!0:O==="&"?O=OI("",s,u):O=OI(C,s,u):o&&!s&&(O==="&"||O==="")&&(O="",I=!0);var D=e(R,r,{root:I,injectHash:P,parentSelectors:[].concat(ee(a),[O])}),$=M(D,2),F=$[0],k=$[1];y=T(T({},y),k),v+="".concat(O).concat(F)}else{let G=function(V,H){var K=V.replace(/[A-Z]/g,function(A){return"-".concat(A.toLowerCase())}),W=H;!cC[V]&&typeof W=="number"&&W!==0&&(W="".concat(W,"px")),V==="animationName"&&H!==null&&H!==void 0&&H._keyframe&&(g(H),W=H.getName(s)),v+="".concat(K,":").concat(W,";")};var j=G,z,B=(z=R?.value)!==null&&z!==void 0?z:R;fe(R)==="object"&&R!==null&&R!==void 0&&R[_I]&&Array.isArray(B)?B.forEach(function(V){G(C,V)}):G(C,B)}})}}),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 mC(e,t){return Cs("".concat(e.join("%")).concat(t))}function pB(){return null}var gC="style";function Ts(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=Ps.useContext(Ei),f=u.autoClear,d=u.mock,m=u.defaultCache,h=u.hashPriority,v=u.container,y=u.ssrInline,g=u.transformers,p=u.linters,x=u.cache,b=u.layer,S=r._tokenKey,w=[S];b&&w.push("layer"),w.push.apply(w,ee(n));var C=bd,R=Ol(gC,w,function(){var $=w.join("|");if(EI($)){var F=RI($),k=M(F,2),z=k[0],B=k[1];if(z)return[z,S,B,{},s,c]}var j=t(),G=dB(j,{hashId:o,hashPriority:h,layer:b?i:void 0,path:n.join("-"),transformers:g,linters:p}),V=M(G,2),H=V[0],K=V[1],W=Oh(H),A=mC(w,W);return[W,S,A,K,s,c]},function($,F){var k=M($,3),z=k[2];(F||f)&&bd&&qi(z,{mark:Nn})},function($){var F=M($,4),k=F[0],z=F[1],B=F[2],j=F[3];if(C&&k!==pC){var G={mark:Nn,prepend:b?!1:"queue",attachTo:v,priority:c},V=typeof a=="function"?a():a;V&&(G.csp={nonce:V});var H=[],K=[];Object.keys(j).forEach(function(A){A.startsWith("@layer")?H.push(A):K.push(A)}),H.forEach(function(A){xn(Oh(j[A]),"_layer-".concat(A),T(T({},G),{},{prepend:!0}))});var W=xn(k,B,G);W[wi]=x.instanceId,W.setAttribute(Gi,S),K.forEach(function(A){xn(Oh(j[A]),"_effect-".concat(A),G)})}}),P=M(R,3),O=P[0],I=P[1],D=P[2];return function($){var F;if(!y||C||!m)F=Ps.createElement(pB,null);else{var k;F=Ps.createElement("style",ue({},(k={},_(k,Gi,I),_(k,Nn,D),k),{dangerouslySetInnerHTML:{__html:O}}))}return Ps.createElement(Ps.Fragment,null,F,$)}}var PI=function(t,r,n){var o=M(t,6),i=o[0],a=o[1],s=o[2],l=o[3],c=o[4],u=o[5],f=n||{},d=f.plain;if(c)return null;var m=i,h={"data-rc-order":"prependQueue","data-rc-priority":"".concat(u)};return m=Rs(i,a,s,h,d),l&&Object.keys(l).forEach(function(v){if(!r[v]){r[v]=!0;var y=Oh(l[v]),g=Rs(y,a,"_effect-".concat(v),h,d);v.startsWith("@layer")?m=g+m:m+=g}}),[u,s,m]};var hC="cssVar",mB=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,TI.useContext)(Ei),f=u.cache.instanceId,d=u.container,m=s._tokenKey,h=[].concat(ee(t.path),[n,c,m]),v=Ol(hC,h,function(){var y=r(),g=ph(y,n,{prefix:o,unitless:i,ignore:a,scope:c}),p=M(g,2),x=p[0],b=p[1],S=mC(h,b);return[x,b,S,n]},function(y){var g=M(y,3),p=g[2];bd&&qi(p,{mark:Nn})},function(y){var g=M(y,3),p=g[1],x=g[2];if(p){var b=xn(p,x,{mark:Nn,prepend:"queue",attachTo:d,priority:-999});b[wi]=f,b.setAttribute(Gi,n)}});return v},NI=function(t,r,n){var o=M(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)},d=Rs(i,s,a,f,c);return[u,a,d]},vC=mB;var Rd,Bne=(Rd={},_(Rd,gC,PI),_(Rd,lC,nI),_(Rd,hC,NI),Rd);var gB=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=gB;function ou(e){return e.notSplit=!0,e}var Kne={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:ou(["borderTop","borderBottom"]),borderBlockStart:ou(["borderTop"]),borderBlockEnd:ou(["borderBottom"]),borderInline:ou(["borderLeft","borderRight"]),borderInlineStart:ou(["borderLeft"]),borderInlineEnd:ou(["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 II=E(N()),hB=(0,II.createContext)({}),iu=hB;function _h(e){return lh(e)||sh(e)||Xc(e)||ch()}function bn(e,t){for(var r=e,n=0;n3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&n&&r===void 0&&!bn(e,t.slice(0,-1))?e:$I(e,t,r,n)}function vB(e){return fe(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function DI(e){return Array.isArray(e)?[]:{}}var yB=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function Ca(){for(var e=arguments.length,t=new Array(e),r=0;r{let e=()=>{};return e.deprecated=xB,e};var kI=E(N()),MI=(0,kI.createContext)(void 0);var su=E(N());var bB={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"},FI=bB;var LI={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};var SB=T(T({},LI),{},{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"}),zI=SB;var CB={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},Th=CB;var wB={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"]},zI),timePickerLocale:Object.assign({},Th)},Nh=wB;var WI=Nh;var wo="${label} is not a valid ${type}",EB={locale:"en",Pagination:FI,DatePicker:Nh,TimePicker:Th,Calendar:WI,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:wo,method:wo,array:wo,object:wo,number:wo,date:wo,boolean:wo,integer:wo,float:wo,regexp:wo,email:wo,url:wo,hex:wo},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"}},Ri=EB;var xC=Object.assign({},Ri.Modal),Ih=[],BI=()=>Ih.reduce((e,t)=>Object.assign(Object.assign({},e),t),Ri.Modal);function jI(e){if(e){let t=Object.assign({},e);return Ih.push(t),xC=BI(),()=>{Ih=Ih.filter(r=>r!==t),xC=BI()}}xC=Object.assign({},Ri.Modal)}var VI=E(N()),RB=(0,VI.createContext)(void 0),au=RB;var Od=E(N());var OB=(e,t)=>{let r=Od.useContext(au),n=Od.useMemo(()=>{var i;let a=t||Ri[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=Od.useMemo(()=>{let i=r?.locale;return r?.exist&&!i?Ri.locale:i},[r]);return[n,o]},wa=OB;var HI="internalMark",_B=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e;su.useEffect(()=>jI(t?.Modal),[t]);let o=su.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return su.createElement(au.Provider,{value:o},r)},UI=_B;var v2=E(N());var bC={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"},PB=Object.assign(Object.assign({},bC),{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 tf=E(D(),1);var b3=E(D(),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)):dd(n)&&n.props?r=r.concat(yi(n.props.children,t)):r.push(n))}),r}var VS={},Uz=[],qz=function(t){Uz.push(t)};function pd(e,t){if(0)var r}function Gz(e,t){if(0)var r}function XT(){VS={}}function YT(e,t,r){!t&&!VS[r]&&(e(!1,r),VS[r]=!0)}function Bg(e,t){YT(pd,e,t)}function QT(e,t){YT(Gz,e,t)}Bg.preMessage=qz;Bg.resetWarned=XT;Bg.noteOnce=QT;var Vt=Bg;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 jg(e){var t=JT(e,"string");return ue(t)=="symbol"?t:t+""}function _(e,t,r){return(t=jg(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,md.isMemo)(t)?t.type.type:t.type;return!(typeof o=="function"&&!((r=o.prototype)!==null&&r!==void 0&&r.render)&&o.$$typeof!==md.ForwardRef||typeof t=="function"&&!((n=t.prototype)!==null&&n!==void 0&&n.render)&&t.$$typeof!==md.ForwardRef)};function aN(e){return(0,Zg.isValidElement)(e)&&!dd(e)}var xs=function(t){if(t&&aN(t)){var r=t;return r.props.propertyIsEnumerable("ref")?r.props.ref:r.ref}return null};var Wr=E(D());var Si=E(D()),eh=Si.createContext(null);function sN(e){var t=e.children,r=e.onBatchResize,n=Si.useRef(0),o=Si.useRef([]),i=Si.useContext(eh),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(eh.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),nW?(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=rW.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 Kc(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var r=this.observations_;r.has(t)||(r.set(t,new dW(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 Kc(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 pW(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=oW.getInstance(),n=new mW(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 gW=function(){return typeof th.ResizeObserver<"u"?th.ResizeObserver:pN}(),mN=gW;var bs=new Map;function hW(e){e.forEach(function(t){var r,n=t.target;(r=bs.get(n))===null||r===void 0||r.forEach(function(o){return o(n)})})}var gN=new mN(hW);function hN(e,t){bs.has(e)||(bs.set(e,new Set),gN.observe(e)),bs.get(e).add(t)}function vN(e,t){bs.has(e)&&(bs.get(e).delete(t),bs.get(e).size||(gN.unobserve(e),bs.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(D());function ah(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 sh(){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 V(e,t){return ah(e)||IN(e,t)||Xc(e,t)||sh()}function SW(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 Cs=SW;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 DN="data-rc-order",$N="data-rc-priority",CW="rc-util-key",YS=new Map;function kN(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):CW}function lh(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function wW(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 AN(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=wW(n),s=a==="prependQueue",l=document.createElement("style");l.setAttribute(DN,a),s&&i&&l.setAttribute($N,"".concat(i)),r!=null&&r.nonce&&(l.nonce=r?.nonce),l.innerHTML=e;var c=lh(t),u=c.firstChild;if(n){if(s){var f=(t.styles||QS(c)).filter(function(p){if(!["prepend","prependQueue"].includes(p.getAttribute(DN)))return!1;var g=Number(p.getAttribute($N)||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=lh(t);return(t.styles||QS(r)).find(function(n){return n.getAttribute(kN(t))===e})}function Ui(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=MN(e,t);if(r){var n=lh(t);n.removeChild(r)}}function EW(e,t){var r=YS.get(e);if(!r||!XS(document,r)){var n=AN("",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=lh(r),o=QS(n),i=T(T({},r),{},{styles:o});EW(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=AN(e,i);return u.setAttribute(kN(i),t),u}var XN=E(D());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=V(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 yd;function Es(e){var t=Array.isArray(e)?e:[e];return JS.has(t)||JS.set(t,new Yc(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 Jc=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()},kW=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=V(o,2),a=i[0],s=i[1];return"".concat(a,":").concat(s,";")}).join(""),"}"):""},fh=function(t,r,n){var o={},i={};return Object.entries(t).forEach(function(a){var s,l,c=V(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=Jc(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,kW(o,r,{scope:n?.scope})]};var dh=E(D());var Zc=E(D());var VN=Yt()?Zc.useLayoutEffect:Zc.useEffect,HN=function(t,r){var n=Zc.useRef(!0);VN(function(){return t(n.current)},r),VN(function(){return n.current=!1,function(){n.current=!0}},[])},Rl=function(t,r){HN(function(n){if(!n)return t()},r)},vt=HN;var tC=E(D()),AW=T({},tC),UN=AW.useInsertionEffect,MW=function(t,r,n){tC.useMemo(t,n),vt(function(){return r(!0)},n)},FW=UN?function(e,t,r){return UN(function(){return e(),t()},r)}:MW,qN=FW;var rC=E(D()),LW=T({},rC),zW=LW.useInsertionEffect,WW=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},BW=function(){return function(t){t()}},jW=typeof zW<"u"?WW:BW,GN=jW;function VW(){return!1}var KN=VW;function Ol(e,t,r,n,o){var i=dh.useContext(wi),a=i.cache,s=[e].concat(te(t)),l=ch(s),c=GN([l]),u=KN(),f=function(v){a.opUpdate(l,function(y){var m=y||[void 0,void 0],d=V(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})};dh.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=V(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=V(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 HW={},UW="css",_l=new Map;function qW(e){_l.set(e,(_l.get(e)||0)+1)}function GW(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 KW=0;function XW(e,t){_l.set(e,(_l.get(e)||0)-1);var r=Array.from(_l.keys()),n=r.filter(function(o){var i=_l.get(o)||0;return i<=0});r.length-n.length>KW&&n.forEach(function(o){GW(o,t),_l.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 ph(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?HW:l,u=r.formatToken,f=r.getComputedToken,p=r.cssVar,g=jN(function(){return Object.assign.apply(Object,[{}].concat(te(t)))},t),h=Qc(g),v=Qc(c),y=p?Qc(p):"",m=Ol(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=fh(x,p.key,{prefix:p.prefix,ignore:p.ignore,unitless:p.unitless,preserve:p.preserve}),C=V(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,qW(P);var O="".concat(UW,"-").concat(Cs(R));return x._hashId=O,[x,O,b,S,p?.key||""]},function(d){XW(d[0]._themeKey,o)},function(d){var x=V(d,4),b=x[0],S=x[3];if(p&&S){var w=yn(S,Cs("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=V(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=Rs(a,s,u,p,c);return[f,u,g]};var wI=E(D());var Ps=E(D());var YW={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=YW;var mh="comm",gh="rule",hh="decl";var JN="@import";var ZN="@namespace",eI="@keyframes";var tI="@layer";var iC=Math.abs,bd=String.fromCharCode;function vh(e){return e.trim()}function Sd(e,t,r){return e.replace(t,r)}function rI(e,t,r){return e.indexOf(t,r)}function Os(e,t){return e.charCodeAt(t)|0}function _s(e,t,r){return e.slice(t,r)}function So(e){return e.length}function nI(e){return e.length}function eu(e,t){return t.push(e),e}var yh=1,tu=1,oI=0,Vo=0,Ur=0,nu="";function xh(e,t,r,n,o,i,a,s){return{value:e,root:t,parent:r,type:n,props:o,children:i,line:yh,column:tu,length:a,return:"",siblings:s}}function iI(){return Ur}function aI(){return Ur=Vo>0?Os(nu,--Vo):0,tu--,Ur===10&&(tu=1,yh--),Ur}function Ho(){return Ur=Vo2||ru(Ur)>3?"":" "}function uI(e,t){for(;--t&&Ho()&&!(Ur<48||Ur>102||Ur>57&&Ur<65||Ur>70&&Ur<97););return bh(e,Cd()+(t<6&&ba()==32&&Ho()==32))}function aC(e){for(;Ho();)switch(Ur){case e:return Vo;case 34:case 39:e!==34&&e!==39&&aC(Ur);break;case 40:e===41&&aC(e);break;case 92:Ho();break}return Vo}function fI(e,t){for(;Ho()&&e+Ur!==57;)if(e+Ur===84&&ba()===47)break;return"/*"+bh(t,Vo-1)+"*"+bd(e===47?e:Ho())}function dI(e){for(;!ru(ba());)Ho();return bh(e,Vo)}function gI(e){return lI(Ch("",null,null,null,[""],e=sI(e),0,[0],e))}function Ch(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&&Os(C,f-1)==58){rI(C+=Sd(Sh(d),"&","&\f"),"&\f",iC(c?s[c-1]:0))!=-1&&(m=-1);break}case 34:case 39:case 91:C+=Sh(d);break;case 9:case 10:case 13:case 32:C+=cI(h);break;case 92:C+=uI(Cd()-1,7);continue;case 47:switch(ba()){case 42:case 47:eu(QW(fI(Ho(),Cd()),t,r,l),l),(ru(h||1)==5||ru(ba()||1)==5)&&So(C)&&_s(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=Sd(C,/\f/g,"")),g>0&&(So(C)-f||v===0&&h===47)&&eu(g>32?mI(C+";",n,r,f-1,l):mI(Sd(C," ","")+";",n,r,f-2,l),l);break;case 59:C+=";";default:if(eu(w=pI(C,t,r,c,u,o,s,x,b=[],S=[],f,i),i),d===123)if(u===0)Ch(C,t,w,w,b,i,f,s,S);else{switch(p){case 99:if(Os(C,3)===110)break;case 108:if(Os(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?Ch(e,w,w,n&&eu(pI(e,w,w,0,0,o,s,x,o,b=[],f,S),S),o,S,f,s,n?b:S):Ch(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+=bd(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+=Sh(Ho())),p=ba(),u=f=So(x=C+=dI(Cd())),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:Sd(x,/&\f/g,g[d])))&&(l[m++]=b);return xh(e,t,r,o===0?gh:s,l,c,u,f)}function QW(e,t,r,n){return xh(e,t,r,mh,bd(iI()),_s(e,2,-2),0,n)}function mI(e,t,r,n,o){return xh(e,t,r,hh,_s(e,0,n),_s(e,n+1,-1),n,o)}function wh(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=V(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)&&!oB(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 M=e(R,r,{root:A,injectHash:P,parentSelectors:[].concat(te(a),[O])}),F=V(M,2),H=F[0],j=F[1];y=T(T({},y),j),v+="".concat(O).concat(H)}else{let U=function(W,B){var q=W.replace(/[A-Z]/g,function(k){return"-".concat(k.toLowerCase())}),L=B;!oC[W]&&typeof L=="number"&&L!==0&&(L="".concat(L,"px")),W==="animationName"&&B!==null&&B!==void 0&&B._keyframe&&(m(B),L=B.getName(s)),v+="".concat(q,":").concat(L,";")};var $=U,I,N=(I=R?.value)!==null&&I!==void 0?I:R;ue(R)==="object"&&R!==null&&R!==void 0&&R[SI]&&Array.isArray(N)?N.forEach(function(W){U(C,W)}):U(C,N)}})}}),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 Cs("".concat(e.join("%")).concat(t))}function aB(){return null}var uC="style";function Ts(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=Ps.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=xd,R=Ol(uC,w,function(){var F=w.join("|");if(yI(F)){var H=xI(F),j=V(H,2),I=j[0],N=j[1];if(I)return[I,S,N,{},s,c]}var $=t(),U=iB($,{hashId:o,hashPriority:h,layer:b?i:void 0,path:n.join("-"),transformers:m,linters:d}),W=V(U,2),B=W[0],q=W[1],L=Eh(B),k=cC(w,L);return[L,S,k,q,s,c]},function(F,H){var j=V(F,3),I=j[2];(H||f)&&xd&&Ui(I,{mark:Tn})},function(F){var H=V(F,4),j=H[0],I=H[1],N=H[2],$=H[3];if(C&&j!==lC){var U={mark:Tn,prepend:b?!1:"queue",attachTo:v,priority:c},W=typeof a=="function"?a():a;W&&(U.csp={nonce:W});var B=[],q=[];Object.keys($).forEach(function(k){k.startsWith("@layer")?B.push(k):q.push(k)}),B.forEach(function(k){yn(Eh($[k]),"_layer-".concat(k),T(T({},U),{},{prepend:!0}))});var L=yn(j,N,U);L[Ci]=x.instanceId,L.setAttribute(qi,S),q.forEach(function(k){yn(Eh($[k]),"_effect-".concat(k),U)})}}),P=V(R,3),O=P[0],A=P[1],M=P[2];return function(F){var H;if(!y||C||!g)H=Ps.createElement(aB,null);else{var j;H=Ps.createElement("style",fe({},(j={},_(j,qi,A),_(j,Tn,M),j),{dangerouslySetInnerHTML:{__html:O}}))}return Ps.createElement(Ps.Fragment,null,H,F)}}var CI=function(t,r,n){var o=V(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=Rs(i,a,s,h,p),l&&Object.keys(l).forEach(function(v){if(!r[v]){r[v]=!0;var y=Eh(l[v]),m=Rs(y,a,"_effect-".concat(v),h,p);v.startsWith("@layer")?g=m+g:g+=m}}),[u,s,g]};var fC="cssVar",sB=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=Ol(fC,h,function(){var y=r(),m=fh(y,n,{prefix:o,unitless:i,ignore:a,scope:c}),d=V(m,2),x=d[0],b=d[1],S=cC(h,b);return[x,b,S,n]},function(y){var m=V(y,3),d=m[2];xd&&Ui(d,{mark:Tn})},function(y){var m=V(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=V(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=Rs(i,s,a,f,c);return[u,a,p]},dC=sB;var Ed,kne=(Ed={},_(Ed,uC,CI),_(Ed,nC,QN),_(Ed,fC,EI),Ed);var lB=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=lB;function ou(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:ou(["borderTop","borderBottom"]),borderBlockStart:ou(["borderTop"]),borderBlockEnd:ou(["borderBottom"]),borderInline:ou(["borderLeft","borderRight"]),borderInlineStart:ou(["borderLeft"]),borderInlineEnd:ou(["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(D()),cB=(0,RI.createContext)({}),iu=cB;function Rh(e){return ah(e)||ih(e)||Xc(e)||sh()}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 uB(e){return ue(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function OI(e){return Array.isArray(e)?[]:{}}var fB=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=dB,e};var TI=E(D()),NI=(0,TI.createContext)(void 0);var su=E(D());var pB={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=pB;var DI={yearFormat:"YYYY",dayFormat:"D",cellMeridiemFormat:"A",monthBeforeYear:!0};var mB=T(T({},DI),{},{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"}),$I=mB;var gB={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},_h=gB;var hB={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"]},$I),timePickerLocale:Object.assign({},_h)},Ph=hB;var kI=Ph;var Co="${label} is not a valid ${type}",vB={locale:"en",Pagination:II,DatePicker:Ph,TimePicker:_h,Calendar:kI,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=vB;var mC=Object.assign({},Ei.Modal),Th=[],AI=()=>Th.reduce((e,t)=>Object.assign(Object.assign({},e),t),Ei.Modal);function MI(e){if(e){let t=Object.assign({},e);return Th.push(t),mC=AI(),()=>{Th=Th.filter(r=>r!==t),mC=AI()}}mC=Object.assign({},Ei.Modal)}var FI=E(D()),yB=(0,FI.createContext)(void 0),au=yB;var Rd=E(D());var xB=(e,t)=>{let r=Rd.useContext(au),n=Rd.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=Rd.useMemo(()=>{let i=r?.locale;return r?.exist&&!i?Ei.locale:i},[r]);return[n,o]},Ca=xB;var LI="internalMark",bB=e=>{let{locale:t={},children:r,_ANT_MARK__:n}=e;su.useEffect(()=>MI(t?.Modal),[t]);let o=su.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return su.createElement(au.Provider,{value:o},r)},zI=bB;var f2=E(D());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"},SB=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}),Ea=PB;var cn=Math.round;function SC(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 qI=(e,t,r)=>r===0?e:e/100;function _d(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=_d(t.r),this.g=_d(t.g),this.b=_d(t.b),this.a=typeof t.a=="number"?_d(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=cn(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:cn(i("r")),g:cn(i("g")),b:cn(i("b")),a:cn(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=>cn((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=cn(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=cn(this.getSaturation()*100),n=cn(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]=_d(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 d=cn(n*255);this.r=d,this.g=d,this.b=d}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=cn((i+f)*255),this.g=cn((a+f)*255),this.b=cn((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=cn(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=cn(n*(1-r)*255),u=cn(n*(1-r*l)*255),f=cn(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=SC(t,qI);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=SC(t,qI);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){let r=SC(t,(n,o)=>o.includes("%")?cn(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}};var Dh=2,GI=.16,TB=.05,NB=.05,IB=.15,QI=5,JI=4,DB=[{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 KI(e,t,r){var n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-Dh*t:Math.round(e.h)+Dh*t:n=r?Math.round(e.h)+Dh*t:Math.round(e.h)-Dh*t,n<0?n+=360:n>=360&&(n-=360),n}function XI(e,t,r){if(e.h===0&&e.s===0)return e.s;var n;return r?n=e.s-GI*t:t===JI?n=e.s+GI:n=e.s+TB*t,n>1&&(n=1),r&&t===QI&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function YI(e,t,r){var n;return r?n=e.v+NB*t:n=e.v-IB*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function Oi(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=[],n=new gt(e),o=n.toHsv(),i=QI;i>0;i-=1){var a=new gt({h:KI(o,i,!0),s:XI(o,i,!0),v:YI(o,i,!0)});r.push(a)}r.push(n);for(var s=1;s<=JI;s+=1){var l=new gt({h:KI(o,s),s:XI(o,s),v:YI(o,s)});r.push(l)}return t.theme==="dark"?DB.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 Ra={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"},CC=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];CC.primary=CC[5];var wC=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];wC.primary=wC[5];var EC=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];EC.primary=EC[5];var RC=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];RC.primary=RC[5];var OC=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];OC.primary=OC[5];var _C=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];_C.primary=_C[5];var PC=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];PC.primary=PC[5];var TC=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];TC.primary=TC[5];var Ns=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ns.primary=Ns[5];var NC=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];NC.primary=NC[5];var IC=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];IC.primary=IC[5];var DC=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];DC.primary=DC[5];var $C=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];$C.primary=$C[5];var $h={red:CC,volcano:wC,orange:EC,gold:RC,yellow:OC,lime:_C,green:PC,cyan:TC,blue:Ns,geekblue:NC,purple:IC,magenta:DC,grey:$C},ZI=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];ZI.primary=ZI[5];var e2=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];e2.primary=e2[5];var t2=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];t2.primary=t2[5];var r2=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];r2.primary=r2[5];var n2=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];n2.primary=n2[5];var o2=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];o2.primary=o2[5];var i2=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];i2.primary=i2[5];var a2=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];a2.primary=a2[5];var s2=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];s2.primary=s2[5];var l2=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];l2.primary=l2[5];var c2=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];c2.primary=c2[5];var u2=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];u2.primary=u2[5];var f2=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];f2.primary=f2[5];function AC(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),d=t(o),m=t(i),h=t(a),v=r(l,c),y=e.colorLink||e.colorInfo,g=t(y),p=new gt(m[1]).mix(new gt(m[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:m[1],colorErrorBgHover:m[2],colorErrorBgFilledHover:p,colorErrorBgActive:m[3],colorErrorBorder:m[3],colorErrorBorderHover:m[4],colorErrorHover:m[5],colorError:m[6],colorErrorActive:m[7],colorErrorTextHover:m[8],colorErrorText:m[9],colorErrorTextActive:m[10],colorWarningBg:d[1],colorWarningBgHover:d[2],colorWarningBorder:d[3],colorWarningBorderHover:d[4],colorWarningHover:d[4],colorWarning:d[6],colorWarningActive:d[7],colorWarningTextHover:d[8],colorWarningText:d[9],colorWarningTextActive:d[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:g[4],colorLink:g[6],colorLinkActive:g[7],colorBgMask:new gt("#000").setA(.45).toRgbString(),colorWhite:"#fff"})}var $B=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}},d2=$B;function kC(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},d2(n))}var AB=e=>{let{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},p2=AB;function lu(e){return(e+8)/e}function MC(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:lu(r)}))}var kB=e=>{let t=MC(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]}},m2=kB;function FC(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 Eo=(e,t)=>new gt(e).setA(t).toRgbString(),cu=(e,t)=>new gt(e).darken(t).toHexString();var g2=e=>{let t=Oi(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]}},h2=(e,t)=>{let r=e||"#fff",n=t||"#000";return{colorBgBase:r,colorTextBase:n,colorText:Eo(n,.88),colorTextSecondary:Eo(n,.65),colorTextTertiary:Eo(n,.45),colorTextQuaternary:Eo(n,.25),colorFill:Eo(n,.15),colorFillSecondary:Eo(n,.06),colorFillTertiary:Eo(n,.04),colorFillQuaternary:Eo(n,.02),colorBgSolid:Eo(n,1),colorBgSolidHover:Eo(n,.75),colorBgSolidActive:Eo(n,.95),colorBgLayout:cu(r,4),colorBgContainer:cu(r,0),colorBgElevated:cu(r,0),colorBgSpotlight:Eo(n,.85),colorBgBlur:"transparent",colorBorder:cu(r,15),colorBorderSecondary:cu(r,6)}};function LC(e){Ra.pink=Ra.magenta,$h.pink=$h.magenta;let t=Object.keys(bC).map(r=>{let n=e[r]===Ra[r]?$h[r]:Oi(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),AC(e,{generateColorPalettes:g2,generateNeutralColorPalettes:h2})),m2(e.fontSize)),FC(e)),p2(e)),kC(e))}var MB=Es(LC),Pd=MB;var Td={token:Ea,override:{override:Ea},hashed:!0},Nd=v2.default.createContext(Td);var Ah=E(N()),Is="ant",Id="anticon",zC=["outlined","borderless","filled","underlined"],FB=(e,t)=>t||(e?`${Is}-${e}`:Is),rt=Ah.createContext({getPrefixCls:FB,iconPrefixCls:Id}),{Consumer:LB}=rt,y2={};function oo(e){let t=Ah.useContext(rt),{getPrefixCls:r,direction:n,getPopupContainer:o}=t,i=t[e];return Object.assign(Object.assign({classNames:y2,styles:y2},i),{getPrefixCls:r,direction:n,getPopupContainer:o})}var zB=`-ant-${Date.now()}-${Math.random()}`;function WB(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=Oi(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=Oi(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"),` +'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=SB;var cn=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 Od(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=Od(t.r),this.g=Od(t.g),this.b=Od(t.b),this.a=typeof t.a=="number"?Od(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=cn(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:cn(i("r")),g:cn(i("g")),b:cn(i("b")),a:cn(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=>cn((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=cn(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=cn(this.getSaturation()*100),n=cn(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]=Od(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=cn(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=cn((i+f)*255),this.g=cn((a+f)*255),this.b=cn((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=cn(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=cn(n*(1-r)*255),u=cn(n*(1-r*l)*255),f=cn(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("%")?cn(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}};var Nh=2,BI=.16,CB=.05,wB=.05,EB=.15,UI=5,qI=4,RB=[{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)-Nh*t:Math.round(e.h)+Nh*t:n=r?Math.round(e.h)+Nh*t:Math.round(e.h)-Nh*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+CB*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+wB*t:n=e.v-EB*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"?RB.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 Ns=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];Ns.primary=Ns[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 Ih={red:vC,volcano:yC,orange:xC,gold:bC,yellow:SC,lime:CC,green:wC,cyan:EC,blue:Ns,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 OB=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=OB;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 _B=e=>{let{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},s2=_B;function lu(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:lu(r)}))}var PB=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=PB;function DC(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(),cu=(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:cu(r,4),colorBgContainer:cu(r,0),colorBgElevated:cu(r,0),colorBgSpotlight:wo(n,.85),colorBgBlur:"transparent",colorBorder:cu(r,15),colorBorderSecondary:cu(r,6)}};function $C(e){Ea.pink=Ea.magenta,Ih.pink=Ih.magenta;let t=Object.keys(gC).map(r=>{let n=e[r]===Ea[r]?Ih[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)),DC(e)),s2(e)),NC(e))}var TB=Es($C),_d=TB;var Pd={token:wa,override:{override:wa},hashed:!0},Td=f2.default.createContext(Pd);var Dh=E(D()),Is="ant",Nd="anticon",kC=["outlined","borderless","filled","underlined"],NB=(e,t)=>t||(e?`${Is}-${e}`:Is),rt=Dh.createContext({getPrefixCls:NB,iconPrefixCls:Nd}),{Consumer:IB}=rt,d2={};function no(e){let t=Dh.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 DB=`-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 x2(e,t){let r=WB(e,t);Yt()&&xn(r,`${zB}-dynamic-theme`)}var uu=E(N()),WC=uu.createContext(!1),b2=({children:e,disabled:t})=>{let r=uu.useContext(WC);return uu.createElement(WC.Provider,{value:t??r},e)},qr=WC;var jC=E(N());var fu=E(N()),BC=fu.createContext(void 0),S2=({children:e,size:t})=>{let r=fu.useContext(BC);return fu.createElement(BC.Provider,{value:t||r},e)},Tl=BC;function BB(){let e=(0,jC.useContext)(qr),t=(0,jC.useContext)(Tl);return{componentDisabled:e,componentSize:t}}var C2=BB;var Wh=E(N());var jB=at(function e(){it(this,e)}),kh=jB;var w2="CALC_UNIT",VB=new RegExp(w2,"g");function VC(e){return typeof e=="number"?"".concat(e).concat(w2):e}var E2=function(e){Dr(r,e);var t=$r(r);function r(n,o){var i;it(this,r),i=t.call(this),_(Ye(i),"result",""),_(Ye(i),"unitlessCssVar",void 0),_(Ye(i),"lowPriority",void 0);var a=fe(n);return i.unitlessCssVar=o,n instanceof r?i.result="(".concat(n.result,")"):a==="number"?i.result=VC(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(VC(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(VC(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(VB,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r}(kh);var HB=function(e){Dr(r,e);var t=$r(r);function r(n){var o;return it(this,r),o=t.call(this),_(Ye(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}(kh),R2=HB;var UB=function(t,r){var n=t==="css"?E2:R2;return function(o){return new n(o,r)}},Mh=UB;var qB=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("-"))},HC=qB;var Fh=E(N());function wt(e){var t=Fh.useRef();t.current=e;var r=Fh.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>JB&&(r.map.delete(i),r.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),P2=new ZB;function ej(e,t){return T2.default.useMemo(function(){var r=P2.get(t);if(r)return r;var n=e();return P2.set(t,n),n},t)}var N2=ej;var tj=function(){return{}},I2=tj;function rj(e){var t=e.useCSP,r=t===void 0?I2:t,n=e.useToken,o=e.usePrefix,i=e.getResetStyles,a=e.getCommonStyle,s=e.getCompUnitless;function l(d,m,h,v){var y=Array.isArray(d)?d[0]:d;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(d):{},b=T(T({},x),{},_({},g("zIndexPopup"),!0));Object.keys(p).forEach(function(R){b[g(R)]=p[R]});var S=T(T({},v),{},{unitless:b,prefixToken:g}),w=u(d,m,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),I=M(O,2),D=I[1],$=C(P),F=M($,2),k=F[0],z=F[1];return[k,D,z]}}function c(d,m,h){var v=h.unitless,y=h.injectStyle,g=y===void 0?!0:y,p=h.prefixToken,x=h.ignore,b=function(C){var R=C.rootCls,P=C.cssVar,O=P===void 0?{}:P,I=n(),D=I.realToken;return vC({path:[d],prefix:O.prefix,key:O.key,unitless:v,ignore:x,token:D,scope:R},function(){var $=KC(d,D,m),F=qC(d,D,$,{deprecatedTokens:h?.deprecatedTokens});return Object.keys($).forEach(function(k){F[p(k)]=F[k],delete F[k]}),F}),null},S=function(C){var R=n(),P=R.cssVar;return[function(O){return g&&P?Wh.default.createElement(Wh.default.Fragment,null,Wh.default.createElement(b,{rootCls:C,cssVar:P,component:d}),O):O},P?.key]};return S}function u(d,m,h){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=Array.isArray(d)?d:[d,d],g=M(y,1),p=g[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,I=C.token,D=C.cssVar,$=o(),F=$.rootPrefixCls,k=$.iconPrefixCls,z=r(),B=D?"css":"js",j=N2(function(){var A=new Set;return D&&Object.keys(v.unitless||{}).forEach(function(L){A.add(Jc(L,D.prefix)),A.add(Jc(L,HC(p,D.prefix)))}),Mh(B,A)},[B,p,D?.prefix]),G=_2(B),V=G.max,H=G.min,K={theme:R,token:I,hashId:O,nonce:function(){return z.nonce},clientOnly:v.clientOnly,layer:b,order:v.order||-999};typeof i=="function"&&Ts(T(T({},K),{},{clientOnly:!1,path:["Shared",F]}),function(){return i(I,{prefix:{rootPrefixCls:F,iconPrefixCls:k},csp:z})});var W=Ts(T(T({},K),{},{path:[x,S,k]}),function(){if(v.injectStyle===!1)return[];var A=zh(I),L=A.token,q=A.flush,ne=KC(p,P,h),Y=".".concat(S),X=qC(p,P,ne,{deprecatedTokens:v.deprecatedTokens});D&&ne&&fe(ne)==="object"&&Object.keys(ne).forEach(function(Q){ne[Q]="var(".concat(Jc(Q,HC(p,D.prefix)),")")});var ae=ut(L,{componentCls:Y,prefixCls:S,iconCls:".".concat(k),antCls:".".concat(F),calc:j,max:V,min:H},D?ne:X),J=m(ae,{hashId:O,prefixCls:S,rootPrefixCls:F,iconPrefixCls:k});q(p,X);var U=typeof a=="function"?a(ae,S,w,v.resetFont):null;return[v.resetStyle===!1?null:U,J]});return[W,O]}}function f(d,m,h){var v=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},y=u(d,m,h,T({resetStyle:!1,order:-998},v)),g=function(x){var b=x.prefixCls,S=x.rootCls,w=S===void 0?b:S;return y(b,w),null};return g}return{genStyleHooks:l,genSubStyleComponent:f,genComponentStyleHook:u}}var XC=rj;var Ro=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var k2=E(N());var D2="5.25.4";var $2=D2;function YC(e){return e>=0&&e<=255}function nj(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),d=Math.round((o-l*(1-c))/c);if(YC(u)&&YC(f)&&YC(d))return new gt({r:u,g:f,b:d,a:Math.round(c*100)/100}).toRgbString()}return new gt({r,g:n,b:o,a:1}).toRgbString()}var Nl=nj;var oj=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[d]});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 d="0s";o.motionDurationFast=d,o.motionDurationMid=d,o.motionDurationSlow=d}return Object.assign(Object.assign(Object.assign({},o),{colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:Nl(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:Nl(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Nl(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:Nl(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:` + `.trim()}function p2(e,t){let r=$B(e,t);Yt()&&yn(r,`${DB}-dynamic-theme`)}var uu=E(D()),AC=uu.createContext(!1),m2=({children:e,disabled:t})=>{let r=uu.useContext(AC);return uu.createElement(AC.Provider,{value:t??r},e)},qr=AC;var FC=E(D());var fu=E(D()),MC=fu.createContext(void 0),g2=({children:e,size:t})=>{let r=fu.useContext(MC);return fu.createElement(MC.Provider,{value:t||r},e)},Tl=MC;function kB(){let e=(0,FC.useContext)(qr),t=(0,FC.useContext)(Tl);return{componentDisabled:e,componentSize:t}}var h2=kB;var Lh=E(D());var AB=at(function e(){it(this,e)}),$h=AB;var v2="CALC_UNIT",MB=new RegExp(v2,"g");function LC(e){return typeof e=="number"?"".concat(e).concat(v2):e}var y2=function(e){Dr(r,e);var t=$r(r);function r(n,o){var i;it(this,r),i=t.call(this),_(Ye(i),"result",""),_(Ye(i),"unitlessCssVar",void 0),_(Ye(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(MB,l?"px":""),typeof this.lowPriority<"u"?"calc(".concat(this.result,")"):this.result}}]),r}($h);var FB=function(e){Dr(r,e);var t=$r(r);function r(n){var o;return it(this,r),o=t.call(this),_(Ye(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=FB;var LB=function(t,r){var n=t==="css"?y2:x2;return function(o){return new n(o,r)}},kh=LB;var zB=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=zB;var Ah=E(D());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>UB&&(r.map.delete(i),r.lastAccessBeat.delete(i))}),this.accessBeat=0}}}]),e}(),C2=new qB;function GB(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=GB;var KB=function(){return{}},R2=KB;function XB(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=V(O,2),M=A[1],F=C(P),H=V(F,2),j=H[0],I=H[1];return[j,M,I]}}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(),M=A.realToken;return dC({path:[p],prefix:O.prefix,key:O.key,unitless:v,ignore:x,token:M,scope:R},function(){var F=VC(p,M,g),H=BC(p,M,F,{deprecatedTokens:h?.deprecatedTokens});return Object.keys(F).forEach(function(j){H[d(j)]=H[j],delete H[j]}),H}),null},S=function(C){var R=n(),P=R.cssVar;return[function(O){return m&&P?Lh.default.createElement(Lh.default.Fragment,null,Lh.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=V(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,M=C.cssVar,F=o(),H=F.rootPrefixCls,j=F.iconPrefixCls,I=r(),N=M?"css":"js",$=E2(function(){var k=new Set;return M&&Object.keys(v.unitless||{}).forEach(function(z){k.add(Jc(z,M.prefix)),k.add(Jc(z,zC(d,M.prefix)))}),kh(N,k)},[N,d,M?.prefix]),U=S2(N),W=U.max,B=U.min,q={theme:R,token:A,hashId:O,nonce:function(){return I.nonce},clientOnly:v.clientOnly,layer:b,order:v.order||-999};typeof i=="function"&&Ts(T(T({},q),{},{clientOnly:!1,path:["Shared",H]}),function(){return i(A,{prefix:{rootPrefixCls:H,iconPrefixCls:j},csp:I})});var L=Ts(T(T({},q),{},{path:[x,S,j]}),function(){if(v.injectStyle===!1)return[];var k=Fh(A),z=k.token,G=k.flush,J=VC(d,P,h),Y=".".concat(S),X=BC(d,P,J,{deprecatedTokens:v.deprecatedTokens});M&&J&&ue(J)==="object"&&Object.keys(J).forEach(function(Q){J[Q]="var(".concat(Jc(Q,zC(d,M.prefix)),")")});var ae=ut(z,{componentCls:Y,prefixCls:S,iconCls:".".concat(j),antCls:".".concat(H),calc:$,max:W,min:B},M?J:X),Z=g(ae,{hashId:O,prefixCls:S,rootPrefixCls:H,iconPrefixCls:j});G(d,X);var K=typeof a=="function"?a(ae,S,w,v.resetFont):null;return[v.resetStyle===!1?null:K,Z]});return[L,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=XB;var Eo=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var T2=E(D());var O2="5.26.0";var _2=O2;function UC(e){return e>=0&&e<=255}function YB(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 Nl=YB;var QB=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:Nl(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:Nl(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:Nl(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:Nl(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) @@ -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)"}),n)}var A2=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=A2(t,["override"]),a=Object.assign(Object.assign({},n),{override:o});return a=Bh(a),i&&Object.entries(i).forEach(([s,l])=>{let{theme:c}=l,u=A2(l,["theme"]),f=u;c&&(f=M2(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}=k2.default.useContext(Nd),i=`${$2}-${t||""}`,a=r||Pd,[s,l,c]=gh(a,[Ea,e],{salt:i,override:n,getComputedToken:M2,formatToken:Bh,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:QC,ignore:ij,preserve:aj}});return[a,c,t?l:"",s,o]}var ZC=E(N());var _a={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}),Pa=()=>({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"}}),pu=()=>({"&::before":{display:"table",content:'""'},"&::after":{display:"table",clear:"both",content:'""'}}),F2=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"}}}),L2=(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})}},JC=(e,t)=>({outline:`${oe(e.lineWidthFocus)} solid ${e.colorPrimaryBorder}`,outlineOffset:t??1,transition:"outline-offset 0s, outline 0s"}),z2=(e,t)=>({"&:focus-visible":Object.assign({},JC(e,t))}),jh=e=>({[`.${e}`]:Object.assign(Object.assign({},Pa()),{[`.${e} .${e}-icon`]:{display:"block"}})});var{genStyleHooks:Gt,genComponentStyleHook:ew,genSubStyleComponent:tw}=XC({usePrefix:()=>{let{getPrefixCls:e,iconPrefixCls:t}=(0,ZC.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,ZC.useContext)(rt);return e??{}},getResetStyles:(e,t)=>{var r;let n=F2(e);return[n,{"&":n},jh((r=t?.prefix.iconPrefixCls)!==null&&r!==void 0?r:Id)]},getCommonStyle:L2,getCompUnitless:()=>QC});function Vh(e,t){return Ro.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 sj=(e,t)=>{let[r,n]=xr();return Ts({theme:r,token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>[jh(e)])},Hh=sj;var lj=E(N()),cj=Object.assign({},lj),{useId:W2}=cj,uj=()=>"",fj=typeof W2>"u"?uj:W2,B2=fj;function rw(e,t,r){var n,o;let i=Ph("ConfigProvider"),a=e||{},s=a.inherit===!1||!t?Object.assign(Object.assign({},Td),{hashed:(n=t?.hashed)!==null&&n!==void 0?n:Td.hashed,cssVar:t?.cssVar}):t,l=B2();return Ui(()=>{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 d=`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)||d});return Object.assign(Object.assign(Object.assign({},s),a),{token:Object.assign(Object.assign({},s.token),a.token),components:f,cssVar:m})},[a,s],(c,u)=>c.some((f,d)=>{let m=u[d];return!ws(f,m,!0)}))}var cv=E(N());var nD=E(Ne());var ao=E(N()),fw=E(N());var Uh=E(N()),dj=["children"],nw=Uh.createContext({});function qh(e){var t=e.children,r=Ve(e,dj);return Uh.createElement(nw.Provider,{value:r},t)}var j2=E(N()),pj=function(e){Dr(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}(j2.Component),V2=pj;var Gh=E(N());function ow(e){var t=Gh.useReducer(function(s){return s+1},0),r=M(t,2),n=r[1],o=Gh.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 rv=E(N()),Na=E(N());var Ki="none",Dd="appear",$d="enter",Ad="leave",iw="none",io="prepare",Ta="start",Ds="active",Kh="end",Xh="prepared";var Y2=E(N()),Q2=E(N());function H2(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 mj(e,t){var r={animationend:H2("Animation","AnimationEnd"),transitionend:H2("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete r.animationend.animation,"TransitionEvent"in t||delete r.transitionend.transition),r}var gj=mj(Yt(),typeof window<"u"?window:{}),q2={};Yt()&&(U2=document.createElement("div"),q2=U2.style);var U2,Yh={};function G2(e){if(Yh[e])return Yh[e];var t=gj[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 ev.useEffect(function(){return function(){t()}},[]),[r,t]};var vj=[io,Ta,Ds,Kh],yj=[io,Xh],cw=!1,tD=!0;function tv(e){return e===Ds||e===Kh}var rD=function(e,t,r){var n=Oa(iw),o=M(n,2),i=o[0],a=o[1],s=Z2(),l=M(s,2),c=l[0],u=l[1];function f(){a(io,!0)}var d=t?yj:vj;return Zh(function(){if(i!==iw&&i!==Kh){var m=d.indexOf(i),h=d[m+1],v=r(i);v===cw?a(h,!0):h&&c(function(y){function g(){y.isCanceled()||a(h,!0)}v===!0?g():Promise.resolve(v).then(g)})}},[e,i]),eD.useEffect(function(){return function(){u()}},[]),[f,i]};function uw(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,d=n.onAppearPrepare,m=n.onEnterPrepare,h=n.onLeavePrepare,v=n.onAppearStart,y=n.onEnterStart,g=n.onLeaveStart,p=n.onAppearActive,x=n.onEnterActive,b=n.onLeaveActive,S=n.onAppearEnd,w=n.onEnterEnd,C=n.onLeaveEnd,R=n.onVisibleChanged,P=Oa(),O=M(P,2),I=O[0],D=O[1],$=ow(Ki),F=M($,2),k=F[0],z=F[1],B=Oa(null),j=M(B,2),G=j[0],V=j[1],H=k(),K=(0,Na.useRef)(!1),W=(0,Na.useRef)(null);function A(){return r()}var L=(0,Na.useRef)(!1);function q(){z(Ki),V(null,!0)}var ne=wt(function(Ce){var $e=k();if($e!==Ki){var ce=A();if(!(Ce&&!Ce.deadline&&Ce.target!==ce)){var ie=L.current,Re;$e===Dd&&ie?Re=S?.(ce,Ce):$e===$d&&ie?Re=w?.(ce,Ce):$e===Ad&&ie&&(Re=C?.(ce,Ce)),ie&&Re!==!1&&q()}}}),Y=J2(ne),X=M(Y,1),ae=X[0],J=function($e){switch($e){case Dd:return _(_(_({},io,d),Ta,v),Ds,p);case $d:return _(_(_({},io,m),Ta,y),Ds,x);case Ad:return _(_(_({},io,h),Ta,g),Ds,b);default:return{}}},U=rv.useMemo(function(){return J(H)},[H]),Q=rD(H,!e,function(Ce){if(Ce===io){var $e=U[io];return $e?$e(A()):cw}if(re in U){var ce;V(((ce=U[re])===null||ce===void 0?void 0:ce.call(U,A(),null))||null)}return re===Ds&&H!==Ki&&(ae(A()),u>0&&(clearTimeout(W.current),W.current=setTimeout(function(){ne({deadline:!0})},u))),re===Xh&&q(),tD}),te=M(Q,2),Z=te[0],re=te[1],de=tv(re);L.current=de;var le=(0,Na.useRef)(null);Zh(function(){if(!(K.current&&le.current===t)){D(t);var Ce=K.current;K.current=!0;var $e;!Ce&&t&&s&&($e=Dd),Ce&&t&&i&&($e=$d),(Ce&&!t&&c||!Ce&&f&&!t&&c)&&($e=Ad);var ce=J($e);$e&&(e||ce[io])?(z($e),Z()):z(Ki),le.current=t}},[t]),(0,Na.useEffect)(function(){(H===Dd&&!s||H===$d&&!i||H===Ad&&!c)&&z(Ki)},[s,i,c]),(0,Na.useEffect)(function(){return function(){K.current=!1,clearTimeout(W.current)}},[]);var pe=rv.useRef(!1);(0,Na.useEffect)(function(){I&&(pe.current=!0),I!==void 0&&H===Ki&&((pe.current||I)&&R?.(I),pe.current=!0)},[I,H]);var Oe=G;return U[io]&&re===Ta&&(Oe=T({transition:"none"},Oe)),[H,re,Oe,I??t]}function xj(e){var t=e;fe(e)==="object"&&(t=e.transitionSupport);function r(o,i){return!!(o.motionName&&t&&i!==!1)}var n=ao.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,d=o.motionName,m=o.leavedClassName,h=o.eventProps,v=ao.useContext(nw),y=v.motion,g=r(o,y),p=(0,fw.useRef)(),x=(0,fw.useRef)();function b(){try{return p.current instanceof HTMLElement?p.current:wl(x.current)}catch{return null}}var S=uw(g,s,b,o),w=M(S,4),C=w[0],R=w[1],P=w[2],O=w[3],I=ao.useRef(O);O&&(I.current=!0);var D=ao.useCallback(function(j){p.current=j,hd(i,j)},[i]),$,F=T(T({},h),{},{visible:s});if(!f)$=null;else if(C===Ki)O?$=f(T({},F),D):!c&&I.current&&m?$=f(T(T({},F),{},{className:m}),D):u||!c&&!m?$=f(T(T({},F),{},{style:{display:"none"}}),D):$=null;else{var k;R===io?k="prepare":tv(R)?k="active":R===Ta&&(k="start");var z=lw(d,"".concat(C,"-").concat(k));$=f(T(T({},F),{},{className:(0,nD.default)(lw(d,C),_(_({},z,z&&k),d,typeof d=="string")),style:P}),D)}if(ao.isValidElement($)&&Si($)){var B=xs($);B||($=ao.cloneElement($,{ref:D}))}return ao.createElement(V2,{ref:x},$)});return n.displayName="CSSMotion",n}var nv=xj(Qh);var Il=E(N());var ov="add",iv="keep",av="remove",lv="removed";function bj(e){var t;return e&&fe(e)==="object"&&"key"in e?t=e:t={key:e},T(T({},t),{},{key:String(t.key)})}function sv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(bj)}function oD(){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=sv(e),a=sv(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,d=u.status;return f!==c||d!==av}),r.forEach(function(u){u.key===c&&(u.status=iv)})}),r}var Sj=["component","children","onVisibleChanged","onAllRemoved"],Cj=["status"],wj=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function Ej(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:nv,r=function(n){Dr(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 Oj=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 $j=e=>{let{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:o}=e;t!==void 0&&(aD=t),r!==void 0&&(Pj=r),"holderRender"in e&&(Nj=o),n&&(Dj(n)?x2(Ij(),n):Tj=n)};var Aj=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:d,dropdownMatchSelectWidth:m,popupMatchSelectWidth:h,popupOverflow:v,legacyLocale:y,parentContext:g,iconPrefixCls:p,theme:x,componentDisabled:b,segmented:S,statistic:w,spin:C,calendar:R,carousel:P,cascader:O,collapse:I,typography:D,checkbox:$,descriptions:F,divider:k,drawer:z,skeleton:B,steps:j,image:G,layout:V,list:H,mentions:K,modal:W,progress:A,result:L,slider:q,breadcrumb:ne,menu:Y,pagination:X,input:ae,textArea:J,empty:U,badge:Q,radio:te,rate:Z,switch:re,transfer:de,avatar:le,message:pe,tag:Oe,table:Ce,card:$e,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:Ze,popconfirm:lt,floatButtonGroup:Rt,variant:Tt,inputNumber:pt,treeSelect:Ae}=e,we=lr.useCallback((ze,tt)=>{let{prefixCls:kt}=e;if(tt)return tt;let Nt=kt||g.getPrefixCls("");return ze?`${Nt}-${ze}`:Nt},[g.getPrefixCls,e.prefixCls]),et=p||g.iconPrefixCls||Id,Pe=r||g.csp;Hh(et,Pe);let De=rw(x,g.theme,{prefixCls:we("")}),Ee={csp:Pe,autoInsertSpaceInButton:n,alert:o,anchor:i,locale:s||y,direction:c,space:u,splitter:f,virtual:d,popupMatchSelectWidth:h??m,popupOverflow:v,getPrefixCls:we,iconPrefixCls:et,theme:De,segmented:S,statistic:w,spin:C,calendar:R,carousel:P,cascader:O,collapse:I,typography:D,checkbox:$,descriptions:F,divider:k,drawer:z,skeleton:B,steps:j,image:G,input:ae,textArea:J,layout:V,list:H,mentions:K,modal:W,progress:A,result:L,slider:q,breadcrumb:ne,menu:Y,pagination:X,empty:U,badge:Q,radio:te,rate:Z,switch:re,transfer:de,avatar:le,message:pe,tag:Oe,table:Ce,card:$e,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:Ze,popconfirm:lt,floatButtonGroup:Rt,variant:Tt,inputNumber:pt,treeSelect:Ae},be=Object.assign({},g);Object.keys(Ee).forEach(ze=>{Ee[ze]!==void 0&&(be[ze]=Ee[ze])}),_j.forEach(ze=>{let tt=e[ze];tt&&(be[ze]=tt)}),typeof n<"u"&&(be.button=Object.assign({autoInsertSpace:n},be.button));let ht=Ui(()=>be,be,(ze,tt)=>{let kt=Object.keys(ze),Nt=Object.keys(tt);return kt.length!==Nt.length||kt.some(tr=>ze[tr]!==tt[tr])}),{layer:Mt}=lr.useContext(Ei),Fe=lr.useMemo(()=>({prefixCls:et,csp:Pe,layer:Mt?"antd":void 0}),[et,Pe,Mt]),Se=lr.createElement(lr.Fragment,null,lr.createElement(iD,{dropdownMatchSelectWidth:m}),t),Ke=lr.useMemo(()=>{var ze,tt,kt,Nt;return Ca(((ze=Ri.Form)===null||ze===void 0?void 0:ze.defaultValidateMessages)||{},((kt=(tt=ht.locale)===null||tt===void 0?void 0:tt.Form)===null||kt===void 0?void 0:kt.defaultValidateMessages)||{},((Nt=ht.form)===null||Nt===void 0?void 0:Nt.validateMessages)||{},a?.validateMessages||{})},[ht,a?.validateMessages]);Object.keys(Ke).length>0&&(Se=lr.createElement(MI.Provider,{value:Ke},Se)),s&&(Se=lr.createElement(UI,{locale:s,_ANT_MARK__:HI},Se)),(et||Pe)&&(Se=lr.createElement(iu.Provider,{value:Fe},Se)),l&&(Se=lr.createElement(S2,{size:l},Se)),Se=lr.createElement(pw,null,Se);let Be=lr.useMemo(()=>{let ze=De||{},{algorithm:tt,token:kt,components:Nt,cssVar:tr}=ze,Ft=Oj(ze,["algorithm","token","components","cssVar"]),rr=tt&&(!Array.isArray(tt)||tt.length>0)?Es(tt):Pd,pr={};Object.entries(Nt||{}).forEach(([Mn,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=Es(Lt.algorithm)),delete Lt.algorithm),pr[Mn]=Lt});let mr=Object.assign(Object.assign({},Ea),kt);return Object.assign(Object.assign({},Ft),{theme:rr,token:mr,components:pr,override:Object.assign({override:mr},pr),cssVar:tr})},[De]);return x&&(Se=lr.createElement(Nd.Provider,{value:Be},Se)),ht.warning&&(Se=lr.createElement(AI.Provider,{value:ht.warning},Se)),b!==void 0&&(Se=lr.createElement(b2,{disabled:b},Se)),lr.createElement(rt.Provider,{value:ht},Se)},mu=e=>{let t=lr.useContext(rt),r=lr.useContext(au);return lr.createElement(Aj,Object.assign({parentContext:t,legacyLocale:r},e))};mu.ConfigContext=rt;mu.SizeContext=Tl;mu.config=$j;mu.useConfig=C2;Object.defineProperty(mu,"SizeContext",{get:()=>Tl});var Ia=mu;var mv=E(N());var kj={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"},sD=kj;var Al=E(N()),mD=E(Ne());var dD=E(N());function lD(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function Mj(e){return lD(e)instanceof ShadowRoot}function Dl(e){return Mj(e)?lD(e):null}var $l=E(N());function Fj(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function uD(e,t){Vt(e,"[@ant-design/icons] ".concat(t))}function mw(e){return fe(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(fe(e.icon)==="object"||typeof e.icon=="function")}function cD(){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[Fj(r)]=n}return t},{})}function uv(e,t,r){return r?$l.default.createElement(e.tag,T(T({key:t},cD(e.attrs)),r),(e.children||[]).map(function(n,o){return uv(n,"".concat(t,"-").concat(e.tag,"-").concat(o))})):$l.default.createElement(e.tag,T({key:t},cD(e.attrs)),(e.children||[]).map(function(n,o){return uv(n,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function gw(e){return Oi(e)[0]}function fv(e){return e?Array.isArray(e)?e:[e]:[]}var Lj=` + `,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=zh(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(Td),i=`${_2}-${t||""}`,a=r||_d,[s,l,c]=ph(a,[wa,e],{salt:i,override:n,getComputedToken:N2,formatToken:zh,cssVar:o&&{prefix:o.prefix,key:o.key,unitless:qC,ignore:JB,preserve:ZB}});return[a,c,t?l:"",s,o]}var KC=E(D());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"}}),pu=()=>({"&::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"}}}),D2=(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"}),$2=(e,t)=>({"&:focus-visible":Object.assign({},GC(e,t))}),Wh=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},Wh((r=t?.prefix.iconPrefixCls)!==null&&r!==void 0?r:Nd)]},getCommonStyle:D2,getCompUnitless:()=>qC});function Bh(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 ej=(e,t)=>{let[r,n]=xr();return Ts({theme:r,token:n,hashId:"",path:["ant-design-icons",e],nonce:()=>t?.nonce,layer:{name:"antd"}},()=>[Wh(e)])},jh=ej;var tj=E(D()),rj=Object.assign({},tj),{useId:k2}=rj,nj=()=>"",oj=typeof k2>"u"?nj:k2,A2=oj;function QC(e,t,r){var n,o;let i=Oh("ConfigProvider"),a=e||{},s=a.inherit===!1||!t?Object.assign(Object.assign({},Pd),{hashed:(n=t?.hashed)!==null&&n!==void 0?n:Pd.hashed,cssVar:t?.cssVar}):t,l=A2();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!ws(f,g,!0)}))}var Na=E(D());var Q2=E(Ne());var io=E(D()),aw=E(D());var Vh=E(D()),ij=["children"],JC=Vh.createContext({});function Hh(e){var t=e.children,r=Ve(e,ij);return Vh.createElement(JC.Provider,{value:r},t)}var M2=E(D()),aj=function(e){Dr(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=aj;var Uh=E(D());function ZC(e){var t=Uh.useReducer(function(s){return s+1},0),r=V(t,2),n=r[1],o=Uh.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 ev=E(D()),Ta=E(D());var Gi="none",Id="appear",Dd="enter",$d="leave",ew="none",oo="prepare",Pa="start",Ds="active",qh="end",Gh="prepared";var H2=E(D()),U2=E(D());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 sj(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 lj=sj(Yt(),typeof window<"u"?window:{}),W2={};Yt()&&(z2=document.createElement("div"),W2=z2.style);var z2,Kh={};function B2(e){if(Kh[e])return Kh[e];var t=lj[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 Jh.useEffect(function(){return function(){t()}},[]),[r,t]};var uj=[oo,Pa,Ds,qh],fj=[oo,Gh],ow=!1,X2=!0;function Zh(e){return e===Ds||e===qh}var Y2=function(e,t,r){var n=Ra(ew),o=V(n,2),i=o[0],a=o[1],s=G2(),l=V(s,2),c=l[0],u=l[1];function f(){a(oo,!0)}var p=t?fj:uj;return Qh(function(){if(i!==ew&&i!==qh){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=V(P,2),A=O[0],M=O[1],F=ZC(Gi),H=V(F,2),j=H[0],I=H[1],N=Ra(null),$=V(N,2),U=$[0],W=$[1],B=j(),q=(0,Ta.useRef)(!1),L=(0,Ta.useRef)(null);function k(){return r()}var z=(0,Ta.useRef)(!1);function G(){I(Gi),W(null,!0)}var J=wt(function(Ce){var $e=j();if($e!==Gi){var ce=k();if(!(Ce&&!Ce.deadline&&Ce.target!==ce)){var ie=z.current,Re;$e===Id&&ie?Re=S?.(ce,Ce):$e===Dd&&ie?Re=w?.(ce,Ce):$e===$d&&ie&&(Re=C?.(ce,Ce)),ie&&Re!==!1&&G()}}}),Y=q2(J),X=V(Y,1),ae=X[0],Z=function($e){switch($e){case Id:return _(_(_({},oo,p),Pa,v),Ds,d);case Dd:return _(_(_({},oo,g),Pa,y),Ds,x);case $d:return _(_(_({},oo,h),Pa,m),Ds,b);default:return{}}},K=ev.useMemo(function(){return Z(B)},[B]),Q=Y2(B,!e,function(Ce){if(Ce===oo){var $e=K[oo];return $e?$e(k()):ow}if(ne in K){var ce;W(((ce=K[ne])===null||ce===void 0?void 0:ce.call(K,k(),null))||null)}return ne===Ds&&B!==Gi&&(ae(k()),u>0&&(clearTimeout(L.current),L.current=setTimeout(function(){J({deadline:!0})},u))),ne===Gh&&G(),X2}),re=V(Q,2),ee=re[0],ne=re[1],de=Zh(ne);z.current=de;var le=(0,Ta.useRef)(null);Qh(function(){if(!(q.current&&le.current===t)){M(t);var Ce=q.current;q.current=!0;var $e;!Ce&&t&&s&&($e=Id),Ce&&t&&i&&($e=Dd),(Ce&&!t&&c||!Ce&&f&&!t&&c)&&($e=$d);var ce=Z($e);$e&&(e||ce[oo])?(I($e),ee()):I(Gi),le.current=t}},[t]),(0,Ta.useEffect)(function(){(B===Id&&!s||B===Dd&&!i||B===$d&&!c)&&I(Gi)},[s,i,c]),(0,Ta.useEffect)(function(){return function(){q.current=!1,clearTimeout(L.current)}},[]);var pe=ev.useRef(!1);(0,Ta.useEffect)(function(){A&&(pe.current=!0),A!==void 0&&B===Gi&&((pe.current||A)&&R?.(A),pe.current=!0)},[A,B]);var Oe=U;return K[oo]&&ne===Pa&&(Oe=T({transition:"none"},Oe)),[B,ne,Oe,A??t]}function dj(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:wl(x.current)}catch{return null}}var S=iw(m,s,b,o),w=V(S,4),C=w[0],R=w[1],P=w[2],O=w[3],A=io.useRef(O);O&&(A.current=!0);var M=io.useCallback(function($){d.current=$,gd(i,$)},[i]),F,H=T(T({},h),{},{visible:s});if(!f)F=null;else if(C===Gi)O?F=f(T({},H),M):!c&&A.current&&g?F=f(T(T({},H),{},{className:g}),M):u||!c&&!g?F=f(T(T({},H),{},{style:{display:"none"}}),M):F=null;else{var j;R===oo?j="prepare":Zh(R)?j="active":R===Pa&&(j="start");var I=nw(p,"".concat(C,"-").concat(j));F=f(T(T({},H),{},{className:(0,Q2.default)(nw(p,C),_(_({},I,I&&j),p,typeof p=="string")),style:P}),M)}if(io.isValidElement(F)&&bi(F)){var N=xs(F);N||(F=io.cloneElement(F,{ref:M}))}return io.createElement(F2,{ref:x},F)});return n.displayName="CSSMotion",n}var tv=dj(Xh);var Il=E(D());var rv="add",nv="keep",ov="remove",av="removed";function pj(e){var t;return e&&ue(e)==="object"&&"key"in e?t=e:t={key:e},T(T({},t),{},{key:String(t.key)})}function iv(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(pj)}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=iv(e),a=iv(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!==ov}),r.forEach(function(u){u.key===c&&(u.status=nv)})}),r}var mj=["component","children","onVisibleChanged","onAllRemoved"],gj=["status"],hj=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearPrepare","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function vj(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:tv,r=function(n){Dr(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 xj=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 Oj=e=>{let{prefixCls:t,iconPrefixCls:r,theme:n,holderRender:o}=e;t!==void 0&&(tD=t),r!==void 0&&(Sj=r),"holderRender"in e&&(wj=o),n&&(Rj(n)?p2(Ej(),n):Cj=n)};var _j=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:M,checkbox:F,descriptions:H,divider:j,drawer:I,skeleton:N,steps:$,image:U,layout:W,list:B,mentions:q,modal:L,progress:k,result:z,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:$e,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:Ze,popconfirm:lt,floatButtonGroup:Et,variant:Tt,inputNumber:pt,treeSelect:ke}=e,we=lr.useCallback((ze,tt)=>{let{prefixCls:At}=e;if(tt)return tt;let Nt=At||m.getPrefixCls("");return ze?`${Nt}-${ze}`:Nt},[m.getPrefixCls,e.prefixCls]),et=d||m.iconPrefixCls||Nd,Pe=r||m.csp;jh(et,Pe);let De=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:De,segmented:S,statistic:w,spin:C,calendar:R,carousel:P,cascader:O,collapse:A,typography:M,checkbox:F,descriptions:H,divider:j,drawer:I,skeleton:N,steps:$,image:U,input:ae,textArea:Z,layout:W,list:B,mentions:q,modal:L,progress:k,result:z,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:$e,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:Ze,popconfirm:lt,floatButtonGroup:Et,variant:Tt,inputNumber:pt,treeSelect:ke},be=Object.assign({},m);Object.keys(Ee).forEach(ze=>{Ee[ze]!==void 0&&(be[ze]=Ee[ze])}),bj.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),Nt=Object.keys(tt);return At.length!==Nt.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(eD,{dropdownMatchSelectWidth:g}),t),Ke=lr.useMemo(()=>{var ze,tt,At,Nt;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)||{},((Nt=ht.form)===null||Nt===void 0?void 0:Nt.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(iu.Provider,{value:Fe},Se)),l&&(Se=lr.createElement(g2,{size:l},Se)),Se=lr.createElement(lw,null,Se);let Be=lr.useMemo(()=>{let ze=De||{},{algorithm:tt,token:At,components:Nt,cssVar:tr}=ze,Ft=xj(ze,["algorithm","token","components","cssVar"]),rr=tt&&(!Array.isArray(tt)||tt.length>0)?Es(tt):_d,pr={};Object.entries(Nt||{}).forEach(([An,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=Es(Lt.algorithm)),delete Lt.algorithm),pr[An]=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})},[De]);return x&&(Se=lr.createElement(Td.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)},mu=e=>{let t=lr.useContext(rt),r=lr.useContext(au);return lr.createElement(_j,Object.assign({parentContext:t,legacyLocale:r},e))};mu.ConfigContext=rt;mu.SizeContext=Tl;mu.config=Oj;mu.useConfig=h2;Object.defineProperty(mu,"SizeContext",{get:()=>Tl});var Ia=mu;var fv=E(D());var Pj={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"},rD=Pj;var kl=E(D()),cD=E(Ne());var sD=E(D());function nD(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}function Tj(e){return nD(e)instanceof ShadowRoot}function Dl(e){return Tj(e)?nD(e):null}var $l=E(D());function Nj(e){return e.replace(/-(.)/g,function(t,r){return r.toUpperCase()})}function iD(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 oD(){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[Nj(r)]=n}return t},{})}function sv(e,t,r){return r?$l.default.createElement(e.tag,T(T({key:t},oD(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},oD(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 Ij=` .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); } } -`,fD=function(t){var r=(0,$l.useContext)(iu),n=r.csp,o=r.prefixCls,i=r.layer,a=Lj;o&&(a=a.replace(/anticon/g,o)),i&&(a="@layer ".concat(i,` { +`,aD=function(t){var r=(0,$l.useContext)(iu),n=r.csp,o=r.prefixCls,i=r.layer,a=Ij;o&&(a=a.replace(/anticon/g,o)),i&&(a="@layer ".concat(i,` { `).concat(a,` -}`)),(0,$l.useEffect)(function(){var s=t.current,l=Dl(s);xn(a,"@ant-design-icons",{prepend:!i,csp:n,attachTo:l})},[])};var zj=["icon","className","onClick","style","primaryColor","secondaryColor"],kd={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function Wj(e){var t=e.primaryColor,r=e.secondaryColor;kd.primaryColor=t,kd.secondaryColor=r||gw(t),kd.calculated=!!r}function Bj(){return T({},kd)}var dv=function(t){var r=t.icon,n=t.className,o=t.onClick,i=t.style,a=t.primaryColor,s=t.secondaryColor,l=Ve(t,zj),c=dD.useRef(),u=kd;if(a&&(u={primaryColor:a,secondaryColor:s||gw(a)}),fD(c),uD(mw(r),"icon should be icon definiton, but got ".concat(r)),!mw(r))return null;var f=r;return f&&typeof f.icon=="function"&&(f=T(T({},f),{},{icon:f.icon(u.primaryColor,u.secondaryColor)})),uv(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}))};dv.displayName="IconReact";dv.getTwoToneColors=Bj;dv.setTwoToneColors=Wj;var Md=dv;function hw(e){var t=fv(e),r=M(t,2),n=r[0],o=r[1];return Md.setTwoToneColors({primaryColor:n,secondaryColor:o})}function pD(){var e=Md.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var jj=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];hw(Ns.primary);var pv=Al.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,jj),u=Al.useContext(iu),f=u.prefixCls,d=f===void 0?"anticon":f,m=u.rootClassName,h=(0,mD.default)(m,d,_(_({},"".concat(d,"-").concat(n.name),!!n.name),"".concat(d,"-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,g=fv(l),p=M(g,2),x=p[0],b=p[1];return Al.createElement("span",ue({role:"img","aria-label":n.name},c,{ref:t,tabIndex:v,onClick:s,className:h}),Al.createElement(Md,{icon:n,primaryColor:x,secondaryColor:b,style:y}))});pv.displayName="AntdIcon";pv.getTwoToneColor=pD;pv.setTwoToneColor=hw;var zt=pv;var Vj=function(t,r){return mv.createElement(zt,ue({},t,{ref:r,icon:sD}))},Hj=mv.forwardRef(Vj),gD=Hj;var gv=E(N());var Uj={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"},hD=Uj;var qj=function(t,r){return gv.createElement(zt,ue({},t,{ref:r,icon:hD}))},Gj=gv.forwardRef(qj),gu=Gj;var vv=E(N());var Kj={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"},hv=Kj;var Xj=function(t,r){return vv.createElement(zt,ue({},t,{ref:r,icon:hv}))},Yj=vv.forwardRef(Xj),yv=Yj;var Qj=`accept acceptCharset accessKey action allowFullScreen allowTransparency +}`)),(0,$l.useEffect)(function(){var s=t.current,l=Dl(s);yn(a,"@ant-design-icons",{prepend:!i,csp:n,attachTo:l})},[])};var Dj=["icon","className","onClick","style","primaryColor","secondaryColor"],kd={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function $j(e){var t=e.primaryColor,r=e.secondaryColor;kd.primaryColor=t,kd.secondaryColor=r||uw(t),kd.calculated=!!r}function kj(){return T({},kd)}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,Dj),c=sD.useRef(),u=kd;if(a&&(u={primaryColor:a,secondaryColor:s||uw(a)}),aD(c),iD(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=kj;cv.setTwoToneColors=$j;var Ad=cv;function fw(e){var t=lv(e),r=V(t,2),n=r[0],o=r[1];return Ad.setTwoToneColors({primaryColor:n,secondaryColor:o})}function lD(){var e=Ad.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Aj=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];fw(Ns.primary);var uv=kl.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=kl.useContext(iu),f=u.prefixCls,p=f===void 0?"anticon":f,g=u.rootClassName,h=(0,cD.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=V(m,2),x=d[0],b=d[1];return kl.createElement("span",fe({role:"img","aria-label":n.name},c,{ref:t,tabIndex:v,onClick:s,className:h}),kl.createElement(Ad,{icon:n,primaryColor:x,secondaryColor:b,style:y}))});uv.displayName="AntdIcon";uv.getTwoToneColor=lD;uv.setTwoToneColor=fw;var zt=uv;var Mj=function(t,r){return fv.createElement(zt,fe({},t,{ref:r,icon:rD}))},Fj=fv.forwardRef(Mj),uD=Fj;var dv=E(D());var Lj={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"},fD=Lj;var zj=function(t,r){return dv.createElement(zt,fe({},t,{ref:r,icon:fD}))},Wj=dv.forwardRef(zj),gu=Wj;var mv=E(D());var Bj={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=Bj;var jj=function(t,r){return mv.createElement(zt,fe({},t,{ref:r,icon:pv}))},Vj=mv.forwardRef(jj),gv=Vj;var Hj=`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,69 +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`,Jj=`onCopy onCut onPaste onCompositionEnd onCompositionStart onCompositionUpdate onKeyDown + summary tabIndex target title type useMap value width wmode wrap`,Uj=`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`,Zj="".concat(Qj," ").concat(Jj).split(/[\s\n]+/),e8="aria-",t8="data-";function vD(e,t){return e.indexOf(t)===0}function Go(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"||vD(o,e8))||r.data&&vD(o,t8)||r.attr&&Zj.includes(o))&&(n[o]=e[o])}),n}var Fd=E(N());function xv(e){return e&&Fd.default.isValidElement(e)&&e.type===Fd.default.Fragment}var r8=(e,t,r)=>Fd.default.isValidElement(e)?Fd.default.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function Ko(e,t){return r8(e,e,t)}var n8=e=>{let[,,,,t]=xr();return t?`${e}-css-var`:""},Xo=n8;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}}},Qe=st;var bv=E(N());var o8={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"},yD=o8;var i8=function(t,r){return bv.createElement(zt,ue({},t,{ref:r,icon:yD}))},a8=bv.forwardRef(i8),kl=a8;var bD=E(N());var xD=E(N()),s8=xD.default.createContext(void 0),Sv=s8;var Da=100,l8=10,c8=Da*l8,gfe=c8+Da,SD={Modal:Da,Drawer:Da,Popover:Da,Popconfirm:Da,Tooltip:Da,Tour:Da,FloatButton:Da},u8={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function f8(e){return e in SD}var Cv=(e,t)=>{let[,r]=xr(),n=bD.default.useContext(Sv),o=f8(e),i;if(t!==void 0)i=[t,t];else{let a=n??0;o?a+=(n?0:r.zIndexPopupBase)+SD[e]:a+=u8[e],i=[n===void 0?t:a,a]}return i};var x8=E(N()),qfe=E(Hi());function wv(e,t){this.v=e,this.k=t}function un(e,t,r,n){var o=Object.defineProperty;try{o({},"",{})}catch{o=0}un=function(a,s,l,c){if(s)o?o(a,s,{value:l,enumerable:!c,configurable:!c,writable:!c}):a[s]=l;else{var u=function(d,m){un(a,d,function(h){return this._invoke(d,m,h)})};u("next",0),u("throw",1),u("return",2)}},un(e,t,r,n)}function Ld(){var e,t,r=typeof Symbol=="function"?Symbol:{},n=r.iterator||"@@iterator",o=r.toStringTag||"@@toStringTag";function i(m,h,v,y){var g=h&&h.prototype instanceof s?h:s,p=Object.create(g.prototype);return un(p,"_invoke",function(x,b,S){var w,C,R,P=0,O=S||[],I=!1,D={p:0,n:0,v:e,a:$,f:$.bind(e,4),d:function(k,z){return w=k,C=0,R=e,D.n=z,a}};function $(F,k){for(C=F,R=k,t=0;!I&&P&&!z&&t3?(z=G===k)&&(R=B[(C=B[4])?5:(C=3,3)],B[4]=B[5]=e):B[0]<=j&&((z=F<2&&jk||k>G)&&(B[4]=F,B[5]=k,D.n=G,C=0))}if(z||F>1)return a;throw I=!0,k}return function(F,k,z){if(P>1)throw TypeError("Generator is already running");for(I&&k===1&&$(k,z),C=k,R=z;(t=C<2?e:R)||!I;){w||(C?C<3?(C>1&&(D.n=-1),$(C,R)):D.n=R:D.v=R);try{if(P=2,w){if(C||(F="next"),t=w[F]){if(!(t=t.call(w,R)))throw TypeError("iterator result is not an object");if(!t.done)return t;R=t.value,C<2&&(C=0)}else C===1&&(t=w.return)&&t.call(w),C<2&&(R=TypeError("The iterator does not provide a '"+F+"' method"),C=1);w=e}else if((t=(I=D.n<0)?R:x.call(b,D))!==a)break}catch(B){w=e,C=1,R=B}finally{P=1}}return{value:t,done:I}}}(m,v,y),!0),p}var a={};function s(){}function l(){}function c(){}t=Object.getPrototypeOf;var u=[][n]?t(t([][n]())):(un(t={},n,function(){return this}),t),f=c.prototype=s.prototype=Object.create(u);function d(m){return Object.setPrototypeOf?Object.setPrototypeOf(m,c):(m.__proto__=c,un(m,o,"GeneratorFunction")),m.prototype=Object.create(f),m}return l.prototype=c,un(f,"constructor",c),un(c,"constructor",l),l.displayName="GeneratorFunction",un(c,o,"GeneratorFunction"),un(f),un(f,o,"Generator"),un(f,n,function(){return this}),un(f,"toString",function(){return"[object Generator]"}),(Ld=function(){return{w:i,m:d}})()}function hu(e,t){function r(o,i,a,s){try{var l=e[o](i),c=l.value;return c instanceof wv?t.resolve(c.v).then(function(u){r("next",u,a,s)},function(u){r("throw",u,a,s)}):t.resolve(c).then(function(u){l.value=u,a(l)},function(u){return r("throw",u,a,s)})}catch(u){s(u)}}var n;this.next||(un(hu.prototype),un(hu.prototype,typeof Symbol=="function"&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),un(this,"_invoke",function(o,i,a){function s(){return new t(function(l,c){r(o,a,l,c)})}return n=n?n.then(s,s):s()},!0)}function Ev(e,t,r,n,o){return new hu(Ld().w(e,t,r,n),o||Promise)}function CD(e,t,r,n,o){var i=Ev(e,t,r,n,o);return i.next().then(function(a){return a.done?a.value:i.next()})}function wD(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function o(){for(;r.length;)if((n=r.pop())in t)return o.value=n,o.done=!1,o;return o.done=!0,o}}function vw(e){if(e!=null){var t=e[typeof Symbol=="function"&&Symbol.iterator||"@@iterator"],r=0;if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length))return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}}}throw new TypeError(fe(e)+" is not iterable")}function Et(){"use strict";var e=Ld(),t=e.m(Et),r=(Object.getPrototypeOf?Object.getPrototypeOf(t):t.__proto__).constructor;function n(a){var s=typeof a=="function"&&a.constructor;return!!s&&(s===r||(s.displayName||s.name)==="GeneratorFunction")}var o={throw:1,return:2,break:3,continue:3};function i(a){var s,l;return function(c){s||(s={stop:function(){return l(c.a,2)},catch:function(){return c.v},abrupt:function(f,d){return l(c.a,o[f],d)},delegateYield:function(f,d,m){return s.resultName=d,l(c.d,vw(f),m)},finish:function(f){return l(c.f,f)}},l=function(f,d,m){c.p=s.prev,c.n=s.next;try{return f(d,m)}finally{s.next=c.n}}),s.resultName&&(s[s.resultName]=c.v,s.resultName=void 0),s.sent=c.v,s.next=c.n;try{return a.call(this,s)}finally{c.p=s.prev,c.n=s.next}}}return(Et=function(){return{wrap:function(l,c,u,f){return e.w(i(l),c,u,f&&f.reverse())},isGeneratorFunction:n,mark:e.m,awrap:function(l,c){return new wv(l,c)},AsyncIterator:hu,async:function(l,c,u,f,d){return(n(c)?Ev:CD)(i(l),c,u,f,d)},keys:wD,values:vw}})()}function ED(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 Gr(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(l){ED(i,n,o,a,s,"next",l)}function s(l){ED(i,n,o,a,s,"throw",l)}a(void 0)})}}var d8=E(Hi()),zd=T({},d8),p8=zd.version,yw=zd.render,m8=zd.unmountComponentAtNode,Ov;try{RD=Number((p8||"").split(".")[0]),RD>=18&&(Ov=zd.createRoot)}catch{}var RD;function OD(e){var t=zd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&fe(t)==="object"&&(t.usingClientEntryPoint=e)}var Rv="__rc_react_root__";function g8(e,t){OD(!0);var r=t[Rv]||Ov(t);OD(!1),r.render(e),t[Rv]=r}function h8(e,t){yw?.(e,t)}function _D(e,t){if(Ov){g8(e,t);return}h8(e,t)}function v8(e){return xw.apply(this,arguments)}function xw(){return xw=Gr(Et().mark(function e(t){return Et().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",Promise.resolve().then(function(){var o;(o=t[Rv])===null||o===void 0||o.unmount(),delete t[Rv]}));case 1:case"end":return n.stop()}},e)})),xw.apply(this,arguments)}function y8(e){m8(e)}function PD(e){return bw.apply(this,arguments)}function bw(){return bw=Gr(Et().mark(function e(t){return Et().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Ov===void 0){n.next=2;break}return n.abrupt("return",v8(t));case 2:y8(t);case 3:case"end":return n.stop()}},e)})),bw.apply(this,arguments)}var b8=(e,t)=>(_D(e,t),()=>PD(t)),TD=b8;function ND(e){return e&&(TD=e),TD}var Sw=()=>({height:0,opacity:0}),ID=e=>{let{scrollHeight:t}=e;return{height:t,opacity:1}},S8=e=>({height:e?e.offsetHeight:0}),Cw=(e,t)=>t?.deadline===!0||t.propertyName==="height",C8=(e=Is)=>({motionName:`${e}-motion-collapse`,onAppearStart:Sw,onEnterStart:Sw,onAppearActive:ID,onEnterActive:ID,onLeaveStart:S8,onLeaveActive:Sw,onAppearEnd:Cw,onEnterEnd:Cw,onLeaveEnd:Cw,motionDeadline:500});var _v=(e,t,r)=>r!==void 0?r:`${e}-${t}`;var DD=C8;var Wt=E(N()),Kv=E(Ne());function Kr(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}var Ml=E(N()),LD=E(Ne());var Pv=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 w8=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(",")}}}}},$D=ew("Wave",e=>[w8(e)]);var Tv=E(N());var vu=`${Is}-wave-target`;var fn=E(N()),kD=E(Ne());function ww(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 AD(e){let{borderTopColor:t,borderColor:r,backgroundColor:n}=getComputedStyle(e);return ww(t)?t:ww(r)?r:ww(n)?n:null}function Ew(e){return Number.isNaN(e)?0:e}var E8=e=>{let{className:t,target:r,component:n,registerUnmount:o}=e,i=fn.useRef(null),a=fn.useRef(null);fn.useEffect(()=>{a.current=o()},[]);let[s,l]=fn.useState(null),[c,u]=fn.useState([]),[f,d]=fn.useState(0),[m,h]=fn.useState(0),[v,y]=fn.useState(0),[g,p]=fn.useState(0),[x,b]=fn.useState(!1),S={left:f,top:m,width:v,height:g,borderRadius:c.map(R=>`${R}px`).join(" ")};s&&(S["--wave-color"]=s);function w(){let R=getComputedStyle(r);l(AD(r));let P=R.position==="static",{borderLeftWidth:O,borderTopWidth:I}=R;d(P?r.offsetLeft:Ew(-parseFloat(O))),h(P?r.offsetTop:Ew(-parseFloat(I))),y(r.offsetWidth),p(r.offsetHeight);let{borderTopLeftRadius:D,borderTopRightRadius:$,borderBottomLeftRadius:F,borderBottomRightRadius:k}=R;u([D,$,k,F].map(z=>Ew(parseFloat(z))))}if(fn.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(vu);return fn.createElement(qo,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(R,P)=>{var O,I;if(P.deadline||P.propertyName==="opacity"){let D=(O=i.current)===null||O===void 0?void 0:O.parentElement;(I=a.current)===null||I===void 0||I.call(a).then(()=>{D?.remove()})}return!1}},({className:R},P)=>fn.createElement("div",{ref:zr(i,P),className:(0,kD.default)(t,R,{"wave-quick":C}),style:S}))},R8=(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=ND(),a=null;function s(){return a}a=i(fn.createElement(E8,Object.assign({},t,{target:e,registerUnmount:s})),o)},MD=R8;var O8=(e,t,r)=>{let{wave:n}=Tv.useContext(rt),[,o,i]=xr(),a=wt(c=>{let u=e.current;if(n?.disabled||!u)return;let f=u.querySelector(`.${vu}`)||u,{showEffect:d}=n||{};(d||MD)(f,{className:t,token:o,component:r,event:c,hashId:i})}),s=Tv.useRef(null);return c=>{dt.cancel(s.current),s.current=dt(()=>{a(c)})}},FD=O8;var _8=e=>{let{children:t,disabled:r,component:n}=e,{getPrefixCls:o}=(0,Ml.useContext)(rt),i=(0,Ml.useRef)(null),a=o("wave"),[,s]=$D(a),l=FD(i,(0,LD.default)(a,s),n);if(Ml.default.useEffect(()=>{let u=i.current;if(!u||u.nodeType!==1||r)return;let f=d=>{!Pv(d.target)||!u.getAttribute||u.getAttribute("disabled")||u.disabled||u.className.includes("disabled")||u.className.includes("-leave")||l(d)};return u.addEventListener("click",f,!0),()=>{u.removeEventListener("click",f,!0)}},[r]),!Ml.default.isValidElement(t))return t??null;let c=Si(t)?zr(xs(t),i):i;return Ko(t,{ref:c})},Nv=_8;var Rw=E(N());var P8=e=>{let t=Rw.default.useContext(Tl);return Rw.default.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},so=P8;var $s=E(N()),zD=E(Ne());var WD=$s.createContext(null),Yo=(e,t)=>{let r=$s.useContext(WD),n=$s.useMemo(()=>{if(!r)return"";let{compactDirection:o,isFirstItem:i,isLastItem:a}=r,s=o==="vertical"?"-vertical-":"-";return(0,zD.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}},BD=e=>{let{children:t}=e;return $s.createElement(WD.Provider,{value:null},t)};var $a=E(N()),jD=E(Ne());var T8=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=T8(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,jD.default)(s,{[`${s}-${c}`]:c,[`${s}-rtl`]:r==="rtl"},i,l);return $a.createElement(Ow.Provider,{value:o},$a.createElement("div",Object.assign({},a,{className:u})))},VD=N8;var yu=E(N());var HD=/^[\u4E00-\u9FA5]{2}$/,Iv=HD.test.bind(HD);function UD(e){return typeof e=="string"}function Dv(e){return e==="text"||e==="link"}function I8(e,t){if(e==null)return;let r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&UD(e.type)&&Iv(e.props.children)?Ko(e,{children:e.props.children.split("").join(r)}):UD(e)?Iv(e)?yu.default.createElement("span",null,e.split("").join(r)):yu.default.createElement("span",null,e):xv(e)?yu.default.createElement("span",null,e):e}function qD(e,t){let r=!1,n=[];return yu.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}),yu.default.Children.map(n,o=>I8(o,t))}var kde=["default","primary","danger"].concat(ee(Ro));var As=E(N());var Tw=E(Ne());var $v=E(N()),GD=E(Ne()),D8=(0,$v.forwardRef)((e,t)=>{let{className:r,style:n,children:o,prefixCls:i}=e,a=(0,GD.default)(`${i}-icon`,r);return $v.default.createElement("span",{ref:t,className:a,style:n},o)}),Wd=D8;var KD=(0,As.forwardRef)((e,t)=>{let{prefixCls:r,className:n,style:o,iconClassName:i}=e,a=(0,Tw.default)(`${r}-loading-icon`,n);return As.default.createElement(Wd,{prefixCls:r,className:a,style:o,ref:t},As.default.createElement(kl,{className:i}))}),_w=()=>({width:0,opacity:0,transform:"scale(0)"}),Pw=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),$8=e=>{let{prefixCls:t,loading:r,existIcon:n,className:o,style:i,mount:a}=e,s=!!r;return n?As.default.createElement(KD,{prefixCls:t,className:o,style:i}):As.default.createElement(qo,{visible:s,motionName:`${t}-loading-icon-motion`,motionAppear:!a,motionEnter:!a,motionLeave:!a,removeOnLeave:!0,onAppearStart:_w,onAppearActive:Pw,onEnterStart:_w,onEnterActive:Pw,onLeaveStart:Pw,onLeaveActive:_w},({className:l,style:c},u)=>{let f=Object.assign(Object.assign({},i),c);return As.default.createElement(KD,{prefixCls:t,className:(0,Tw.default)(o,l),style:f,ref:u})})},XD=$8;var YD=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),A8=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}},YD(`${t}-primary`,o),YD(`${t}-danger`,i)]}},QD=A8;var $w=E(N());var k8=["b"],M8=["v"],Nw=function(t){return Math.round(Number(t||0))},F8=function(t){if(t instanceof gt)return t;if(t&&fe(t)==="object"&&"h"in t&&"b"in t){var r=t,n=r.b,o=Ve(r,k8);return T(T({},o),{},{v:n})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},Qo=function(e){Dr(r,e);var t=$r(r);function r(n){return it(this,r),t.call(this,F8(n))}return at(r,[{key:"toHsbString",value:function(){var o=this.toHsb(),i=Nw(o.s*100),a=Nw(o.b*100),s=Nw(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,M8);return T(T({},a),{},{b:i,a:this.a})}}]),r}(gt);var Iw=function(t){return t instanceof Qo?t:new Qo(t)},L8=Iw("#1677ff");var Z8=E(Ne());var z8=E(Ne()),W8=E(N());var ZD=E(N());var Dw=E(N());var B8=E(Ne()),j8=E(N());var V8=E(N());var JD=E(N());var Y8=E(N());var J8=E(N());var t$=E(N());var Q8=E(Ne());var e$=E(N());var eV=(e,t)=>e?.replace(/[^\w/]/g,"").slice(0,t?8:6)||"",tV=(e,t)=>e?eV(e,t):"",n$=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 Qo(this.colors[0].color.metaColor)):this.metaColor=new Qo(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 tV(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 P$=E(N());var lV=E(Ne());var rV=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`,qj="".concat(Hj," ").concat(Uj).split(/[\s\n]+/),Gj="aria-",Kj="data-";function dD(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"||dD(o,Gj))||r.data&&dD(o,Kj)||r.attr&&qj.includes(o))&&(n[o]=e[o])}),n}var Md=E(D());function hv(e){return e&&Md.default.isValidElement(e)&&e.type===Md.default.Fragment}var Xj=(e,t,r)=>Md.default.isValidElement(e)?Md.default.cloneElement(e,typeof r=="function"?r(e.props||{}):r):t;function Go(e,t){return Xj(e,e,t)}var Yj=e=>{let[,,,,t]=xr();return t?`${e}-css-var`:""},Ko=Yj;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}}},Qe=st;var vv=E(D());var Qj={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"},pD=Qj;var Jj=function(t,r){return vv.createElement(zt,fe({},t,{ref:r,icon:pD}))},Zj=vv.forwardRef(Jj),Al=Zj;var gD=E(D());var mD=E(D()),e8=mD.default.createContext(void 0),yv=e8;var Da=100,t8=10,r8=Da*t8,lfe=r8+Da,hD={Modal:Da,Drawer:Da,Popover:Da,Popconfirm:Da,Tooltip:Da,Tour:Da,FloatButton:Da},n8={SelectLike:50,Dropdown:50,DatePicker:50,Menu:50,ImagePreview:1};function o8(e){return e in hD}var xv=(e,t)=>{let[,r]=xr(),n=gD.default.useContext(yv),o=o8(e),i;if(t!==void 0)i=[t,t];else{let a=n??0;o?a+=(n?0:r.zIndexPopupBase)+hD[e]:a+=n8[e],i=[n===void 0?t:a,a]}return i};var d8=E(D()),yfe=E(Vi());function Ot(){"use strict";Ot=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(I,N,$){I[N]=$.value},i=typeof Symbol=="function"?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(I,N,$){return Object.defineProperty(I,N,{value:$,enumerable:!0,configurable:!0,writable:!0}),I[N]}try{c({},"")}catch{c=function($,U,W){return $[U]=W}}function u(I,N,$,U){var W=N&&N.prototype instanceof m?N:m,B=Object.create(W.prototype),q=new H(U||[]);return o(B,"_invoke",{value:O(I,$,q)}),B}function f(I,N,$){try{return{type:"normal",arg:I.call(N,$)}}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(j([])));w&&w!==r&&n.call(w,a)&&(b=w);var C=x.prototype=m.prototype=Object.create(b);function R(I){["next","throw","return"].forEach(function(N){c(I,N,function($){return this._invoke(N,$)})})}function P(I,N){function $(W,B,q,L){var k=f(I[W],I,B);if(k.type!=="throw"){var z=k.arg,G=z.value;return G&&ue(G)=="object"&&n.call(G,"__await")?N.resolve(G.__await).then(function(J){$("next",J,q,L)},function(J){$("throw",J,q,L)}):N.resolve(G).then(function(J){z.value=J,q(z)},function(J){return $("throw",J,q,L)})}L(k.arg)}var U;o(this,"_invoke",{value:function(B,q){function L(){return new N(function(k,z){$(B,q,k,z)})}return U=U?U.then(L,L):L()}})}function O(I,N,$){var U=p;return function(W,B){if(U===h)throw Error("Generator is already running");if(U===v){if(W==="throw")throw B;return{value:e,done:!0}}for($.method=W,$.arg=B;;){var q=$.delegate;if(q){var L=A(q,$);if(L){if(L===y)continue;return L}}if($.method==="next")$.sent=$._sent=$.arg;else if($.method==="throw"){if(U===p)throw U=v,$.arg;$.dispatchException($.arg)}else $.method==="return"&&$.abrupt("return",$.arg);U=h;var k=f(I,N,$);if(k.type==="normal"){if(U=$.done?v:g,k.arg===y)continue;return{value:k.arg,done:$.done}}k.type==="throw"&&(U=v,$.method="throw",$.arg=k.arg)}}}function A(I,N){var $=N.method,U=I.iterator[$];if(U===e)return N.delegate=null,$==="throw"&&I.iterator.return&&(N.method="return",N.arg=e,A(I,N),N.method==="throw")||$!=="return"&&(N.method="throw",N.arg=new TypeError("The iterator does not provide a '"+$+"' method")),y;var W=f(U,I.iterator,N.arg);if(W.type==="throw")return N.method="throw",N.arg=W.arg,N.delegate=null,y;var B=W.arg;return B?B.done?(N[I.resultName]=B.value,N.next=I.nextLoc,N.method!=="return"&&(N.method="next",N.arg=e),N.delegate=null,y):B:(N.method="throw",N.arg=new TypeError("iterator result is not an object"),N.delegate=null,y)}function M(I){var N={tryLoc:I[0]};1 in I&&(N.catchLoc=I[1]),2 in I&&(N.finallyLoc=I[2],N.afterLoc=I[3]),this.tryEntries.push(N)}function F(I){var N=I.completion||{};N.type="normal",delete N.arg,I.completion=N}function H(I){this.tryEntries=[{tryLoc:"root"}],I.forEach(M,this),this.reset(!0)}function j(I){if(I||I===""){var N=I[a];if(N)return N.call(I);if(typeof I.next=="function")return I;if(!isNaN(I.length)){var $=-1,U=function W(){for(;++$=0;--W){var B=this.tryEntries[W],q=B.completion;if(B.tryLoc==="root")return U("end");if(B.tryLoc<=this.prev){var L=n.call(B,"catchLoc"),k=n.call(B,"finallyLoc");if(L&&k){if(this.prev=0;--U){var W=this.tryEntries[U];if(W.tryLoc<=this.prev&&n.call(W,"finallyLoc")&&this.prev=0;--$){var U=this.tryEntries[$];if(U.finallyLoc===N)return this.complete(U.completion,U.afterLoc),F(U),y}},catch:function(N){for(var $=this.tryEntries.length-1;$>=0;--$){var U=this.tryEntries[$];if(U.tryLoc===N){var W=U.completion;if(W.type==="throw"){var B=W.arg;F(U)}return B}}throw Error("illegal catch attempt")},delegateYield:function(N,$,U){return this.delegate={iterator:j(N),resultName:$,nextLoc:U},this.method==="next"&&(this.arg=e),y}},t}function vD(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 Gr(e){return function(){var t=this,r=arguments;return new Promise(function(n,o){var i=e.apply(t,r);function a(l){vD(i,n,o,a,s,"next",l)}function s(l){vD(i,n,o,a,s,"throw",l)}a(void 0)})}}var i8=E(Vi()),Fd=T({},i8),a8=Fd.version,dw=Fd.render,s8=Fd.unmountComponentAtNode,Sv;try{yD=Number((a8||"").split(".")[0]),yD>=18&&(Sv=Fd.createRoot)}catch{}var yD;function xD(e){var t=Fd.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&ue(t)==="object"&&(t.usingClientEntryPoint=e)}var bv="__rc_react_root__";function l8(e,t){xD(!0);var r=t[bv]||Sv(t);xD(!1),r.render(e),t[bv]=r}function c8(e,t){dw?.(e,t)}function bD(e,t){if(Sv){l8(e,t);return}c8(e,t)}function u8(e){return pw.apply(this,arguments)}function pw(){return pw=Gr(Ot().mark(function e(t){return Ot().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 f8(e){s8(e)}function SD(e){return mw.apply(this,arguments)}function mw(){return mw=Gr(Ot().mark(function e(t){return Ot().wrap(function(n){for(;;)switch(n.prev=n.next){case 0:if(Sv===void 0){n.next=2;break}return n.abrupt("return",u8(t));case 2:f8(t);case 3:case"end":return n.stop()}},e)})),mw.apply(this,arguments)}var p8=(e,t)=>(bD(e,t),()=>SD(t)),CD=p8;function wD(e){return e&&(CD=e),CD}var gw=()=>({height:0,opacity:0}),ED=e=>{let{scrollHeight:t}=e;return{height:t,opacity:1}},m8=e=>({height:e?e.offsetHeight:0}),hw=(e,t)=>t?.deadline===!0||t.propertyName==="height",g8=(e=Is)=>({motionName:`${e}-motion-collapse`,onAppearStart:gw,onEnterStart:gw,onAppearActive:ED,onEnterActive:ED,onLeaveStart:m8,onLeaveActive:gw,onAppearEnd:hw,onEnterEnd:hw,onLeaveEnd:hw,motionDeadline:500});var Cv=(e,t,r)=>r!==void 0?r:`${e}-${t}`;var RD=g8;var Wt=E(D()),Vv=E(Ne());function Kr(e,t){var r=Object.assign({},e);return Array.isArray(t)&&t.forEach(function(n){delete r[n]}),r}var Ml=E(D()),ID=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 h8=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(",")}}}}},OD=XC("Wave",e=>[h8(e)]);var Ev=E(D());var hu=`${Is}-wave-target`;var un=E(D()),PD=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 _D(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 v8=e=>{let{className:t,target:r,component:n,registerUnmount:o}=e,i=un.useRef(null),a=un.useRef(null);un.useEffect(()=>{a.current=o()},[]);let[s,l]=un.useState(null),[c,u]=un.useState([]),[f,p]=un.useState(0),[g,h]=un.useState(0),[v,y]=un.useState(0),[m,d]=un.useState(0),[x,b]=un.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(_D(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:M,borderTopRightRadius:F,borderBottomLeftRadius:H,borderBottomRightRadius:j}=R;u([M,F,j,H].map(I=>yw(parseFloat(I))))}if(un.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(hu);return un.createElement(Uo,{visible:!0,motionAppear:!0,motionName:"wave-motion",motionDeadline:5e3,onAppearEnd:(R,P)=>{var O,A;if(P.deadline||P.propertyName==="opacity"){let M=(O=i.current)===null||O===void 0?void 0:O.parentElement;(A=a.current)===null||A===void 0||A.call(a).then(()=>{M?.remove()})}return!1}},({className:R},P)=>un.createElement("div",{ref:zr(i,P),className:(0,PD.default)(t,R,{"wave-quick":C}),style:S}))},y8=(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=wD(),a=null;function s(){return a}a=i(un.createElement(v8,Object.assign({},t,{target:e,registerUnmount:s})),o)},TD=y8;var x8=(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(`.${hu}`)||u,{showEffect:p}=n||{};(p||TD)(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)})}},ND=x8;var b8=e=>{let{children:t,disabled:r,component:n}=e,{getPrefixCls:o}=(0,Ml.useContext)(rt),i=(0,Ml.useRef)(null),a=o("wave"),[,s]=OD(a),l=ND(i,(0,ID.default)(a,s),n);if(Ml.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]),!Ml.default.isValidElement(t))return t??null;let c=bi(t)?zr(xs(t),i):i;return Go(t,{ref:c})},Rv=b8;var xw=E(D());var S8=e=>{let t=xw.default.useContext(Tl);return xw.default.useMemo(()=>e?typeof e=="string"?e??t:typeof e=="function"?e(t):t:t,[e,t])},ao=S8;var $s=E(D()),DD=E(Ne());var $D=$s.createContext(null),Xo=(e,t)=>{let r=$s.useContext($D),n=$s.useMemo(()=>{if(!r)return"";let{compactDirection:o,isFirstItem:i,isLastItem:a}=r,s=o==="vertical"?"-vertical-":"-";return(0,DD.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}},kD=e=>{let{children:t}=e;return $s.createElement($D.Provider,{value:null},t)};var $a=E(D()),AD=E(Ne());var C8=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=C8(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,AD.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})))},MD=w8;var vu=E(D());var FD=/^[\u4E00-\u9FA5]{2}$/,Ov=FD.test.bind(FD);function LD(e){return typeof e=="string"}function _v(e){return e==="text"||e==="link"}function E8(e,t){if(e==null)return;let r=t?" ":"";return typeof e!="string"&&typeof e!="number"&&LD(e.type)&&Ov(e.props.children)?Go(e,{children:e.props.children.split("").join(r)}):LD(e)?Ov(e)?vu.default.createElement("span",null,e.split("").join(r)):vu.default.createElement("span",null,e):hv(e)?vu.default.createElement("span",null,e):e}function zD(e,t){let r=!1,n=[];return vu.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}),vu.default.Children.map(n,o=>E8(o,t))}var sde=["default","primary","danger"].concat(te(Eo));var ks=E(D());var ww=E(Ne());var Pv=E(D()),WD=E(Ne()),R8=(0,Pv.forwardRef)((e,t)=>{let{className:r,style:n,children:o,prefixCls:i}=e,a=(0,WD.default)(`${i}-icon`,r);return Pv.default.createElement("span",{ref:t,className:a,style:n},o)}),Ld=R8;var BD=(0,ks.forwardRef)((e,t)=>{let{prefixCls:r,className:n,style:o,iconClassName:i}=e,a=(0,ww.default)(`${r}-loading-icon`,n);return ks.default.createElement(Ld,{prefixCls:r,className:a,style:o,ref:t},ks.default.createElement(Al,{className:i}))}),Sw=()=>({width:0,opacity:0,transform:"scale(0)"}),Cw=e=>({width:e.scrollWidth,opacity:1,transform:"scale(1)"}),O8=e=>{let{prefixCls:t,loading:r,existIcon:n,className:o,style:i,mount:a}=e,s=!!r;return n?ks.default.createElement(BD,{prefixCls:t,className:o,style:i}):ks.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 ks.default.createElement(BD,{prefixCls:t,className:(0,ww.default)(o,l),style:f,ref:u})})},jD=O8;var VD=(e,t)=>({[`> span, > ${e}`]:{"&:not(:last-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineEndColor:t}}},"&:not(:first-child)":{[`&, & > ${e}`]:{"&:not(:disabled)":{borderInlineStartColor:t}}}}}),_8=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}},VD(`${t}-primary`,o),VD(`${t}-danger`,i)]}},HD=_8;var _w=E(D());var P8=["b"],T8=["v"],Ew=function(t){return Math.round(Number(t||0))},N8=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,P8);return T(T({},o),{},{v:n})}return typeof t=="string"&&/hsb/.test(t)?t.replace(/hsb/,"hsv"):t},Yo=function(e){Dr(r,e);var t=$r(r);function r(n){return it(this,r),t.call(this,N8(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,T8);return T(T({},a),{},{b:i,a:this.a})}}]),r}(gt);var Rw=function(t){return t instanceof Yo?t:new Yo(t)},I8=Rw("#1677ff");var q8=E(Ne());var D8=E(Ne()),$8=E(D());var qD=E(D());var Ow=E(D());var k8=E(Ne()),A8=E(D());var M8=E(D());var UD=E(D());var V8=E(D());var U8=E(D());var KD=E(D());var H8=E(Ne());var GD=E(D());var G8=(e,t)=>e?.replace(/[^\w/]/g,"").slice(0,t?8:6)||"",K8=(e,t)=>e?G8(e,t):"",YD=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 K8(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 S$=E(D());var tV=E(Ne());var X8=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`}}}),Aw=rV;var nV=e=>({animationDuration:e,animationFillMode:"both"}),oV=e=>({animationDuration:e,animationFillMode:"both"}),ks=(e,t,r,n,o=!1)=>{let i=o?"&":"";return{[` + opacity ${e.motionDurationMid} ${e.motionEaseInOut} !important`}}}),Pw=X8;var Y8=e=>({animationDuration:e,animationFillMode:"both"}),Q8=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({},nV(n)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:Object.assign(Object.assign({},oV(n)),{animationPlayState:"paused"}),[` + `]:Object.assign(Object.assign({},Y8(n)),{animationPlayState:"paused"}),[`${i}${e}-leave`]:Object.assign(Object.assign({},Q8(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 o$=new yt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),i$=new yt("antFadeOut",{"0%":{opacity:1},"100%":{opacity:0}}),kw=(e,t=!1)=>{let{antCls:r}=e,n=`${r}-fade`,o=t?"&":"";return[ks(n,o$,i$,e.motionDurationMid,t),{[` + `]:{animationName:t,animationPlayState:"running"},[`${i}${e}-leave${e}-leave-active`]:{animationName:r,animationPlayState:"running",pointerEvents:"none"}}};var QD=new yt("antFadeIn",{"0%":{opacity:0},"100%":{opacity:1}}),JD=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,QD,JD,e.motionDurationMid,t),{[` ${o}${n}-enter, ${o}${n}-appear - `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${n}-leave`]:{animationTimingFunction:"linear"}}]};var a$=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}}),s$=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}}),l$=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}}),c$=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}}),u$=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}}),f$=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}}),d$=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}}),p$=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}}),iV={"move-up":{inKeyframes:d$,outKeyframes:p$},"move-down":{inKeyframes:a$,outKeyframes:s$},"move-left":{inKeyframes:l$,outKeyframes:c$},"move-right":{inKeyframes:u$,outKeyframes:f$}},Av=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:i}=iV[t];return[ks(n,o,i,e.motionDurationMid),{[` + `]:{opacity:0,animationTimingFunction:"linear"},[`${o}${n}-leave`]:{animationTimingFunction:"linear"}}]};var ZD=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}}),e$=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}}),t$=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}}),r$=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}}),n$=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}}),o$=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}}),i$=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}}),a$=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}}),J8={"move-up":{inKeyframes:i$,outKeyframes:a$},"move-down":{inKeyframes:ZD,outKeyframes:e$},"move-left":{inKeyframes:t$,outKeyframes:r$},"move-right":{inKeyframes:n$,outKeyframes:o$}},Tv=(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 - `]:{opacity:0,animationTimingFunction:e.motionEaseOutCirc},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var kv=new yt("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),Mv=new yt("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),Fv=new yt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),Lv=new yt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),m$=new yt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),g$=new yt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),h$=new yt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),v$=new yt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),aV={"slide-up":{inKeyframes:kv,outKeyframes:Mv},"slide-down":{inKeyframes:Fv,outKeyframes:Lv},"slide-left":{inKeyframes:m$,outKeyframes:g$},"slide-right":{inKeyframes:h$,outKeyframes:v$}},zv=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:i}=aV[t];return[ks(n,o,i,e.motionDurationMid),{[` + `]:{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}}),Dv=new yt("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),$v=new yt("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),s$=new yt("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),l$=new yt("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),c$=new yt("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),u$=new yt("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),Z8={"slide-up":{inKeyframes:Nv,outKeyframes:Iv},"slide-down":{inKeyframes:Dv,outKeyframes:$v},"slide-left":{inKeyframes:s$,outKeyframes:l$},"slide-right":{inKeyframes:c$,outKeyframes:u$}},kv=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:i}=Z8[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 y$=new yt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),x$=new yt("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),Mw=new yt("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),Fw=new yt("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),b$=new yt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),S$=new yt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),C$=new yt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),w$=new yt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),E$=new yt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),R$=new yt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),O$=new yt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),_$=new yt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),sV={zoom:{inKeyframes:y$,outKeyframes:x$},"zoom-big":{inKeyframes:Mw,outKeyframes:Fw},"zoom-big-fast":{inKeyframes:Mw,outKeyframes:Fw},"zoom-left":{inKeyframes:C$,outKeyframes:w$},"zoom-right":{inKeyframes:E$,outKeyframes:R$},"zoom-up":{inKeyframes:b$,outKeyframes:S$},"zoom-down":{inKeyframes:O$,outKeyframes:_$}},Lw=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:i}=sV[t];return[ks(n,o,i,t==="zoom-big-fast"?e.motionDurationFast:e.motionDurationMid),{[` + `]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:e.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInQuint}}]};var f$=new yt("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),d$=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}}),p$=new yt("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),m$=new yt("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),g$=new yt("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),h$=new yt("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),v$=new yt("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),y$=new yt("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),x$=new yt("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),b$=new yt("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),eV={zoom:{inKeyframes:f$,outKeyframes:d$},"zoom-big":{inKeyframes:Nw,outKeyframes:Iw},"zoom-big-fast":{inKeyframes:Nw,outKeyframes:Iw},"zoom-left":{inKeyframes:g$,outKeyframes:h$},"zoom-right":{inKeyframes:v$,outKeyframes:y$},"zoom-up":{inKeyframes:p$,outKeyframes:m$},"zoom-down":{inKeyframes:x$,outKeyframes:b$}},Dw=(e,t)=>{let{antCls:r}=e,n=`${r}-${t}`,{inKeyframes:o,outKeyframes:i}=eV[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 T$=(e,t)=>{let{r,g:n,b:o,a:i}=e.toRgb(),a=new Qo(e.toRgbString()).onBackground(t).toHsv();return i<=.5?a.v>.5:r*.299+n*.587+o*.114>192};var Wv=e=>{let{paddingInline:t,onlyIconSize:r}=e;return ut(e,{buttonPaddingHorizontal:t,buttonPaddingVertical:0,buttonIconOnlyFontSize:r})},Bv=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:lu(s),f=(i=e.contentLineHeightSM)!==null&&i!==void 0?i:lu(l),d=(a=e.contentLineHeightLG)!==null&&a!==void 0?a:lu(c),m=T$(new n$(e.colorBgSolid),"#fff")?"#000":"#fff",h=Ro.reduce((v,y)=>Object.assign(Object.assign({},v),{[`${y}ShadowColor`]:`0 ${oe(e.controlOutlineWidth)} 0 ${Nl(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:f,contentLineHeightLG:d,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*d)/2-e.lineWidth,0)})};var cV=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`]:Pa(),"> a":{color:"currentColor"},"&:not(:disabled)":z2(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()}}}}}},N$=(e,t,r)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":r}}),uV=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),fV=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),dV=e=>({cursor:"not-allowed",borderColor:e.borderColorDisabled,color:e.colorTextDisabled,background:e.colorBgContainerDisabled,boxShadow:"none"}),jv=(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"},N$(e,Object.assign({background:t},a),Object.assign({background:t},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),pV=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},dV(e))}),mV=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Vv=(e,t,r,n)=>{let i=n&&["link","text"].includes(n)?mV:pV;return Object.assign(Object.assign({},i(e)),N$(e.componentCls,t,r))},Hv=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-solid`]:Object.assign({color:t,background:r},Vv(e,n,o))}),Uv=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-outlined, &${e.componentCls}-variant-dashed`]:Object.assign({borderColor:t,background:r},Vv(e,n,o))}),qv=e=>({[`&${e.componentCls}-variant-dashed`]:{borderStyle:"dashed"}}),Gv=(e,t,r,n)=>({[`&${e.componentCls}-variant-filled`]:Object.assign({boxShadow:"none",background:t},Vv(e,r,n))}),Xi=(e,t,r,n,o)=>({[`&${e.componentCls}-variant-${r}`]:Object.assign({color:t,boxShadow:"none"},Vv(e,n,o,r))}),gV=e=>{let{componentCls:t}=e;return Ro.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`]},Hv(e,e.colorTextLightSolid,o,{background:a},{background:c})),Uv(e,o,e.colorBgContainer,{color:a,borderColor:a,background:e.colorBgContainer},{color:c,borderColor:c,background:e.colorBgContainer})),qv(e)),Gv(e,i,{background:s},{background:l})),Xi(e,o,"link",{color:a},{color:c})),Xi(e,o,"text",{color:a,background:i},{color:c,background:l}))})},{})},hV=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.defaultColor,boxShadow:e.defaultShadow},Hv(e,e.solidTextColor,e.colorBgSolid,{color:e.solidTextColor,background:e.colorBgSolidHover},{color:e.solidTextColor,background:e.colorBgSolidActive})),qv(e)),Gv(e,e.colorFillTertiary,{background:e.colorFillSecondary},{background:e.colorFill})),jv(e.componentCls,e.ghostBg,e.defaultGhostColor,e.defaultGhostBorderColor,e.colorTextDisabled,e.colorBorder)),Xi(e,e.textTextColor,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),vV=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorPrimary,boxShadow:e.primaryShadow},Uv(e,e.colorPrimary,e.colorBgContainer,{color:e.colorPrimaryTextHover,borderColor:e.colorPrimaryHover,background:e.colorBgContainer},{color:e.colorPrimaryTextActive,borderColor:e.colorPrimaryActive,background:e.colorBgContainer})),qv(e)),Gv(e,e.colorPrimaryBg,{background:e.colorPrimaryBgHover},{background:e.colorPrimaryBorder})),Xi(e,e.colorPrimaryText,"text",{color:e.colorPrimaryTextHover,background:e.colorPrimaryBg},{color:e.colorPrimaryTextActive,background:e.colorPrimaryBorder})),Xi(e,e.colorPrimaryText,"link",{color:e.colorPrimaryTextHover,background:e.linkHoverBg},{color:e.colorPrimaryTextActive})),jv(e.componentCls,e.ghostBg,e.colorPrimary,e.colorPrimary,e.colorTextDisabled,e.colorBorder,{color:e.colorPrimaryHover,borderColor:e.colorPrimaryHover},{color:e.colorPrimaryActive,borderColor:e.colorPrimaryActive})),yV=e=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:e.colorError,boxShadow:e.dangerShadow},Hv(e,e.dangerColor,e.colorError,{background:e.colorErrorHover},{background:e.colorErrorActive})),Uv(e,e.colorError,e.colorBgContainer,{color:e.colorErrorHover,borderColor:e.colorErrorBorderHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),qv(e)),Gv(e,e.colorErrorBg,{background:e.colorErrorBgFilledHover},{background:e.colorErrorBgActive})),Xi(e,e.colorError,"text",{color:e.colorErrorHover,background:e.colorErrorBg},{color:e.colorErrorHover,background:e.colorErrorBgActive})),Xi(e,e.colorError,"link",{color:e.colorErrorHover},{color:e.colorErrorActive})),jv(e.componentCls,e.ghostBg,e.colorError,e.colorError,e.colorTextDisabled,e.colorBorder,{color:e.colorErrorHover,borderColor:e.colorErrorHover},{color:e.colorErrorActive,borderColor:e.colorErrorActive})),xV=e=>Object.assign(Object.assign({},Xi(e,e.colorLink,"link",{color:e.colorLinkHover},{color:e.colorLinkActive})),jv(e.componentCls,e.ghostBg,e.colorInfo,e.colorInfo,e.colorTextDisabled,e.colorBorder,{color:e.colorInfoHover,borderColor:e.colorInfoHover},{color:e.colorInfoActive,borderColor:e.colorInfoActive})),bV=e=>{let{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:hV(e),[`${t}-color-primary`]:vV(e),[`${t}-color-dangerous`]:yV(e),[`${t}-color-link`]:xV(e)},gV(e))},SV=e=>Object.assign(Object.assign(Object.assign(Object.assign({},Uv(e,e.defaultBorderColor,e.defaultBg,{color:e.defaultHoverColor,borderColor:e.defaultHoverBorderColor,background:e.defaultHoverBg},{color:e.defaultActiveColor,borderColor:e.defaultActiveBorderColor,background:e.defaultActiveBg})),Xi(e,e.textTextColor,"text",{color:e.textTextHoverColor,background:e.textHoverBg},{color:e.textTextActiveColor,background:e.colorBgTextActive})),Hv(e,e.primaryColor,e.colorPrimary,{background:e.colorPrimaryHover,color:e.primaryColor},{background:e.colorPrimaryActive,color:e.primaryColor})),Xi(e,e.colorLink,"link",{color:e.colorLinkHover,background:e.linkHoverBg},{color:e.colorLinkActive})),zw=(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}`]:uV(e)},{[`${r}${r}-round${t}`]:fV(e)}]},CV=e=>{let t=ut(e,{fontSize:e.contentFontSize});return zw(t,e.componentCls)},wV=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 zw(t,`${e.componentCls}-sm`)},EV=e=>{let t=ut(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return zw(t,`${e.componentCls}-lg`)},RV=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},I$=Gt("Button",e=>{let t=Wv(e);return[cV(t),CV(t),wV(t),EV(t),RV(t),bV(t),SV(t),QD(t)]},Bv,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function OV(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 _V(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 Ms(e,t={focus:!0}){let{componentCls:r}=e,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},OV(e,n,t)),_V(r,n,t))}}function PV(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 TV(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 D$(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},PV(e,t)),TV(e.componentCls,t))}}var NV=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))},$$=tw(["Button","compact"],e=>{let t=Wv(e);return[Ms(t),D$(t),NV(t)]},Bv);var IV=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:d,disabled:m,className:h,rootClassName:v,children:y,icon:g,iconPosition:p="start",ghost:x=!1,block:b=!1,htmlType:S="button",classNames:w,style:C={},autoInsertSpace:R,autoFocus:P}=e,O=IV(e,["loading","prefixCls","color","variant","type","danger","shape","size","styles","disabled","className","rootClassName","children","icon","iconPosition","ghost","block","htmlType","classNames","style","autoInsertSpace","autoFocus"]),I=l||"default",{button:D}=Wt.default.useContext(rt),[$,F]=(0,Wt.useMemo)(()=>{if(a&&s)return[a,s];if(l||c){let _e=$V[I]||[];return c?["danger",_e[1]]:_e}return D?.color&&D?.variant?[D.color,D.variant]:["default","outlined"]},[l,a,s,c,D?.variant,D?.color]),z=$==="danger"?"dangerous":$,{getPrefixCls:B,direction:j,autoInsertSpace:G,className:V,style:H,classNames:K,styles:W}=oo("button"),A=(r=R??G)!==null&&r!==void 0?r:!0,L=B("btn",i),[q,ne,Y]=I$(L),X=(0,Wt.useContext)(qr),ae=m??X,J=(0,Wt.useContext)(Ow),U=(0,Wt.useMemo)(()=>DV(o),[o]),[Q,te]=(0,Wt.useState)(U.loading),[Z,re]=(0,Wt.useState)(!1),de=(0,Wt.useRef)(null),le=bi(t,de),pe=Wt.Children.count(y)===1&&!g&&!Dv(F),Oe=(0,Wt.useRef)(!0);Wt.default.useEffect(()=>(Oe.current=!1,()=>{Oe.current=!0}),[]),(0,Wt.useEffect)(()=>{let _e=null;U.delay>0?_e=setTimeout(()=>{_e=null,te(!0)},U.delay):te(U.loading);function he(){_e&&(clearTimeout(_e),_e=null)}return he},[U]),(0,Wt.useEffect)(()=>{if(!de.current||!A)return;let _e=de.current.textContent||"";pe&&Iv(_e)?Z||re(!0):Z&&re(!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:$e,compactItemClassnames:ce}=Yo(L,j),ie={large:"lg",small:"sm",middle:void 0},Re=so(_e=>{var he,Ze;return(Ze=(he=f??$e)!==null&&he!==void 0?he:J)!==null&&Ze!==void 0?Ze:_e}),Le=Re&&(n=ie[Re])!==null&&n!==void 0?n:"",Ge=Q?"loading":g,Me=Kr(O,["navigate"]),Ie=(0,Kv.default)(L,ne,Y,{[`${L}-${u}`]:u!=="default"&&u,[`${L}-${I}`]:I,[`${L}-dangerous`]:c,[`${L}-color-${z}`]:z,[`${L}-variant-${F}`]:F,[`${L}-${Le}`]:Le,[`${L}-icon-only`]:!y&&y!==0&&!!Ge,[`${L}-background-ghost`]:x&&!Dv(F),[`${L}-loading`]:Q,[`${L}-two-chinese-chars`]:Z&&A&&!Q,[`${L}-block`]:b,[`${L}-rtl`]:j==="rtl",[`${L}-icon-end`]:p==="end"},ce,h,v,V),je=Object.assign(Object.assign({},H),C),We=(0,Kv.default)(w?.icon,K.icon),He=Object.assign(Object.assign({},d?.icon||{}),W.icon||{}),ye=g&&!Q?Wt.default.createElement(Wd,{prefixCls:L,className:We,style:He},g):o&&typeof o=="object"&&o.icon?Wt.default.createElement(Wd,{prefixCls:L,className:We,style:He},o.icon):Wt.default.createElement(XD,{existIcon:!!g,prefixCls:L,loading:Q,mount:Oe.current}),se=y||y===0?qD(y,pe&&A):null;if(Me.href!==void 0)return q(Wt.default.createElement("a",Object.assign({},Me,{className:(0,Kv.default)(Ie,{[`${L}-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($$,{prefixCls:L}));return Dv(F)||(xe=Wt.default.createElement(Nv,{component:"Button",disabled:Q},xe)),q(xe)}),Ww=AV;Ww.Group=VD;Ww.__ANT_BUTTON=!0;var A$=Ww;var Bd=A$;var Jo=E(N()),V$=E(Hi());var k$=E(N()),kV=k$.createContext(null),Xv=kV;var Fl=E(N());var M$=[];function Bw(e,t){var r=Fl.useState(function(){if(!Yt())return null;var h=document.createElement("div");return h}),n=M(r,1),o=n[0],i=Fl.useRef(!1),a=Fl.useContext(Xv),s=Fl.useState(M$),l=M(s,2),c=l[0],u=l[1],f=a||(i.current?void 0:function(h){u(function(v){var y=[h].concat(ee(v));return y})});function d(){o.parentElement||document.body.appendChild(o),i.current=!0}function m(){var h;(h=o.parentElement)===null||h===void 0||h.removeChild(o),i.current=!1}return vt(function(){return e?a?a(d):d():m(),m},[e]),vt(function(){c.length&&(c.forEach(function(h){return h()}),u(M$))},[c]),[o,f]}var W$=E(N());function MV(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,";"):"";xn(` + `]:{transform:"scale(0)",opacity:0,animationTimingFunction:e.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${n}-leave`]:{animationTimingFunction:e.motionEaseInOutCirc}}]};var C$=(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 Av=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:lu(s),f=(i=e.contentLineHeightSM)!==null&&i!==void 0?i:lu(l),p=(a=e.contentLineHeightLG)!==null&&a!==void 0?a:lu(c),g=C$(new YD(e.colorBgSolid),"#fff")?"#000":"#fff",h=Eo.reduce((v,y)=>Object.assign(Object.assign({},v),{[`${y}ShadowColor`]:`0 ${oe(e.controlOutlineWidth)} 0 ${Nl(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 rV=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)":$2(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()}}}}}},w$=(e,t,r)=>({[`&:not(:disabled):not(${e}-disabled)`]:{"&:hover":t,"&:active":r}}),nV=e=>({minWidth:e.controlHeight,paddingInlineStart:0,paddingInlineEnd:0,borderRadius:"50%"}),oV=e=>({borderRadius:e.controlHeight,paddingInlineStart:e.calc(e.controlHeight).div(2).equal(),paddingInlineEnd:e.calc(e.controlHeight).div(2).equal()}),iV=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"},w$(e,Object.assign({background:t},a),Object.assign({background:t},s))),{"&:disabled":{cursor:"not-allowed",color:o||void 0,borderColor:i||void 0}})}),aV=e=>({[`&:disabled, &${e.componentCls}-disabled`]:Object.assign({},iV(e))}),sV=e=>({[`&:disabled, &${e.componentCls}-disabled`]:{cursor:"not-allowed",color:e.colorTextDisabled}}),Lv=(e,t,r,n)=>{let i=n&&["link","text"].includes(n)?sV:aV;return Object.assign(Object.assign({},i(e)),w$(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))}),lV=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}))})},{})},cV=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})),uV=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})),fV=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})),dV=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})),pV=e=>{let{componentCls:t}=e;return Object.assign({[`${t}-color-default`]:cV(e),[`${t}-color-primary`]:uV(e),[`${t}-color-dangerous`]:fV(e),[`${t}-color-link`]:dV(e)},lV(e))},mV=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})),$w=(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}`]:nV(e)},{[`${r}${r}-round${t}`]:oV(e)}]},gV=e=>{let t=ut(e,{fontSize:e.contentFontSize});return $w(t,e.componentCls)},hV=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 $w(t,`${e.componentCls}-sm`)},vV=e=>{let t=ut(e,{controlHeight:e.controlHeightLG,fontSize:e.contentFontSizeLG,buttonPaddingHorizontal:e.paddingInlineLG,buttonPaddingVertical:0,borderRadius:e.borderRadiusLG,buttonIconOnlyFontSize:e.onlyIconSizeLG});return $w(t,`${e.componentCls}-lg`)},yV=e=>{let{componentCls:t}=e;return{[t]:{[`&${t}-block`]:{width:"100%"}}}},E$=Gt("Button",e=>{let t=Av(e);return[rV(t),gV(t),hV(t),vV(t),yV(t),pV(t),mV(t),HD(t)]},Mv,{unitless:{fontWeight:!0,contentLineHeight:!0,contentLineHeightSM:!0,contentLineHeightLG:!0}});function xV(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 bV(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 Ms(e,t={focus:!0}){let{componentCls:r}=e,n=`${r}-compact`;return{[n]:Object.assign(Object.assign({},xV(e,n,t)),bV(r,n,t))}}function SV(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 CV(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 R$(e){let t=`${e.componentCls}-compact-vertical`;return{[t]:Object.assign(Object.assign({},SV(e,t)),CV(e.componentCls,t))}}var wV=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))},O$=YC(["Button","compact"],e=>{let t=Av(e);return[Ms(t),R$(t),wV(t)]},Mv);var EV=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=EV(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:M}=Wt.default.useContext(rt),[F,H]=(0,Wt.useMemo)(()=>{if(a&&s)return[a,s];if(l||c){let _e=OV[A]||[];return c?["danger",_e[1]]:_e}return M?.color&&M?.variant?[M.color,M.variant]:["default","outlined"]},[l,a,s,c,M?.variant,M?.color]),I=F==="danger"?"dangerous":F,{getPrefixCls:N,direction:$,autoInsertSpace:U,className:W,style:B,classNames:q,styles:L}=no("button"),k=(r=R??U)!==null&&r!==void 0?r:!0,z=N("btn",i),[G,J,Y]=E$(z),X=(0,Wt.useContext)(qr),ae=g??X,Z=(0,Wt.useContext)(bw),K=(0,Wt.useMemo)(()=>RV(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:$e,compactItemClassnames:ce}=Xo(z,$),ie={large:"lg",small:"sm",middle:void 0},Re=ao(_e=>{var he,Ze;return(Ze=(he=f??$e)!==null&&he!==void 0?he:Z)!==null&&Ze!==void 0?Ze:_e}),Le=Re&&(n=ie[Re])!==null&&n!==void 0?n:"",Ge=Q?"loading":m,Me=Kr(O,["navigate"]),Ie=(0,Vv.default)(z,J,Y,{[`${z}-${u}`]:u!=="default"&&u,[`${z}-${A}`]:A,[`${z}-dangerous`]:c,[`${z}-color-${I}`]:I,[`${z}-variant-${H}`]:H,[`${z}-${Le}`]:Le,[`${z}-icon-only`]:!y&&y!==0&&!!Ge,[`${z}-background-ghost`]:x&&!_v(H),[`${z}-loading`]:Q,[`${z}-two-chinese-chars`]:ee&&k&&!Q,[`${z}-block`]:b,[`${z}-rtl`]:$==="rtl",[`${z}-icon-end`]:d==="end"},ce,h,v,W),je=Object.assign(Object.assign({},B),C),We=(0,Vv.default)(w?.icon,q.icon),He=Object.assign(Object.assign({},p?.icon||{}),L.icon||{}),ye=m&&!Q?Wt.default.createElement(Ld,{prefixCls:z,className:We,style:He},m):o&&typeof o=="object"&&o.icon?Wt.default.createElement(Ld,{prefixCls:z,className:We,style:He},o.icon):Wt.default.createElement(jD,{existIcon:!!m,prefixCls:z,loading:Q,mount:Oe.current}),se=y||y===0?zD(y,pe&&k):null;if(Me.href!==void 0)return G(Wt.default.createElement("a",Object.assign({},Me,{className:(0,Vv.default)(Ie,{[`${z}-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(O$,{prefixCls:z}));return _v(H)||(xe=Wt.default.createElement(Rv,{component:"Button",disabled:Q},xe)),G(xe)}),kw=_V;kw.Group=MD;kw.__ANT_BUTTON=!0;var _$=kw;var zd=_$;var Qo=E(D()),M$=E(Vi());var P$=E(D()),PV=P$.createContext(null),Hv=PV;var Fl=E(D());var T$=[];function Aw(e,t){var r=Fl.useState(function(){if(!Yt())return null;var h=document.createElement("div");return h}),n=V(r,1),o=n[0],i=Fl.useRef(!1),a=Fl.useContext(Hv),s=Fl.useState(T$),l=V(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(T$))},[c]),[o,f]}var $$=E(D());function TV(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(f,` -}`),t)}catch(h){console.error(h),o=l,i=c}}document.body.appendChild(r);var d=e&&o&&!isNaN(o)?o:r.offsetWidth-r.clientWidth,m=e&&i&&!isNaN(i)?i:r.offsetHeight-r.clientHeight;return document.body.removeChild(r),qi(t),{width:d,height:m}}function F$(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:MV(e)}function L$(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var FV="rc-util-locker-".concat(Date.now()),z$=0;function jw(e){var t=!!e,r=W$.useState(function(){return z$+=1,"".concat(FV,"_").concat(z$)}),n=M(r,1),o=n[0];vt(function(){if(t){var i=F$(document.body).width,a=L$();xn(` +}`),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 N$(e){return typeof document>"u"||!e||!(e instanceof Element)?{width:0,height:0}:TV(e)}function I$(){return document.body.scrollHeight>(window.innerHeight||document.documentElement.clientHeight)&&window.innerWidth>document.body.offsetWidth}var NV="rc-util-locker-".concat(Date.now()),D$=0;function Mw(e){var t=!!e,r=$$.useState(function(){return D$+=1,"".concat(NV,"_").concat(D$)}),n=V(r,1),o=n[0];vt(function(){if(t){var i=N$(document.body).width,a=I$();yn(` html body { overflow-y: hidden; `.concat(a?"width: calc(100% - ".concat(i,"px);"):"",` -}`),o)}else qi(o);return function(){qi(o)}},[t,o])}var B$=!1;function Vw(e){return typeof e=="boolean"&&(B$=e),B$}var j$=function(t){return t===!1?!1:!Yt()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},LV=Jo.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=Jo.useState(r),u=M(c,2),f=u[0],d=u[1],m=f||r;Jo.useEffect(function(){(s||r)&&d(r)},[r,s]);var h=Jo.useState(function(){return j$(o)}),v=M(h,2),y=v[0],g=v[1];Jo.useEffect(function(){var D=j$(o);g(D??null)});var p=Bw(m&&!y,i),x=M(p,2),b=x[0],S=x[1],w=y??b;jw(n&&r&&Yt()&&(w===b||w===document.body));var C=null;if(l&&Si(l)&&t){var R=l;C=R.ref}var P=bi(C,t);if(!m||!Yt()||y===void 0)return null;var O=w===!1||Vw(),I=l;return t&&(I=Jo.cloneElement(l,{ref:P})),Jo.createElement(Xv.Provider,{value:S},O?I:(0,V$.createPortal)(I,w))}),H$=LV;var Hw=H$;var jd=E(N());function zV(){var e=T({},jd);return e.useId}var U$=0;var q$=zV(),Yv=q$?function(t){var r=q$();return t||r}:function(t){var r=jd.useState("ssr-id"),n=M(r,2),o=n[0],i=n[1];return jd.useEffect(function(){var a=U$;U$+=1,i("rc_unique_".concat(a))},[]),t||o};var i1=E(N());var Aa=E(N());var MA=E(N());var Kn=E(N());var G$=E(N()),_i="RC_FORM_INTERNAL_HOOKS",Kt=function(){Vt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},WV=G$.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}}}),Pi=WV;var K$=E(N()),BV=K$.createContext(null),Fs=BV;function Vd(e){return e==null?[]:Array.isArray(e)?e:[e]}function X$(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 Jv=Qv();function Y$(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Q$(e,t,r){if(vd())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&Ss(o,r.prototype),o}function Zv(e){var t=typeof Map=="function"?new Map:void 0;return Zv=function(n){if(n===null||!Y$(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 Q$(n,arguments,El(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Ss(o,n)},Zv(e)}var jV=/%[sdj%]/g,eA=function(){};typeof process<"u"&&process.env;function ey(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 Xr(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 VV(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function At(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||VV(t)&&typeof e=="string"&&!e)}function HV(e,t,r){var n=[],o=0,i=e.length;function a(s){n.push.apply(n,ee(s||[])),o++,o===i&&r(n)}e.forEach(function(s){t(s,a)})}function J$(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(Xr(i.messages[f].max,t.fullField,t.max)):s&&l&&(ut.max)&&o.push(Xr(i.messages[f].range,t.fullField,t.min,t.max))},oA=YV;var QV=function(t,r,n,o,i,a){t.required&&(!n.hasOwnProperty(t.field)||At(r,a||t.type))&&o.push(Xr(i.messages.required,t.fullField))},ty=QV;var ry,iA=function(){if(ry)return ry;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]+:)?//)",d="(?:\\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"]*)?',b="(?:".concat(f,"|www\\.)").concat(d,"(?:localhost|").concat(m,"|").concat(h,"|").concat(v).concat(y).concat(g,")").concat(p).concat(x);return ry=new RegExp("(?:^".concat(b,"$)"),"i"),ry};var aA={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},Hd={integer:function(t){return Hd.number(t)&&parseInt(t,10)===t},float:function(t){return Hd.number(t)&&!Hd.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 fe(t)==="object"&&!Hd.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(aA.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(iA())},hex:function(t){return typeof t=="string"&&!!t.match(aA.hex)}},JV=function(t,r,n,o,i){if(t.required&&r===void 0){ty(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?Hd[s](r)||o.push(Xr(i.messages.types[s],t.fullField,t.type)):s&&fe(r)!==t.type&&o.push(Xr(i.messages.types[s],t.fullField,t.type))},sA=JV;var ZV=function(t,r,n,o,i){(/^\s+$/.test(r)||r==="")&&o.push(Xr(i.messages.whitespace,t.fullField))},lA=ZV;var ot={required:ty,whitespace:lA,type:sA,range:oA,enum:rA,pattern:nA};var eH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(r)&&!t.required)return n();ot.required(t,r,o,a,i)}n(a)},cA=eH;var tH=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)},uA=tH;var rH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot.type(t,r,o,a,i)}n(a)},fA=rH;var nH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(r,"date")&&!t.required)return n();if(ot.required(t,r,o,a,i),!At(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)},dA=nH;var oH="enum",iH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot[oH](t,r,o,a,i)}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(At(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)},mA=aH;var sH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(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)},gA=sH;var lH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot.type(t,r,o,a,i)}n(a)},hA=lH;var cH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(r===""&&(r=void 0),At(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)},vA=cH;var uH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot.type(t,r,o,a,i)}n(a)},yA=uH;var fH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(r,"string")&&!t.required)return n();ot.required(t,r,o,a,i),At(r,"string")||ot.pattern(t,r,o,a,i)}n(a)},xA=fH;var dH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(r)&&!t.required)return n();ot.required(t,r,o,a,i),At(r)||ot.type(t,r,o,a,i)}n(a)},bA=dH;var pH=function(t,r,n,o,i){var a=[],s=Array.isArray(r)?"array":fe(r);ot.required(t,r,o,a,i,s),n(a)},SA=pH;var mH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(At(r,"string")&&!t.required)return n();ot.required(t,r,o,a,i,"string"),At(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)},CA=mH;var gH=function(t,r,n,o,i){var a=t.type,s=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(At(r,a)&&!t.required)return n();ot.required(t,r,o,s,i,a),At(r,a)||ot.type(t,r,o,s,i)}n(s)},ny=gH;var bu={string:CA,method:hA,number:vA,boolean:fA,regexp:bA,integer:gA,float:mA,array:uA,object:yA,enum:pA,pattern:xA,date:dA,url:ny,hex:ny,email:ny,required:SA,any:cA};var Ud=function(){function e(t){it(this,e),_(this,"rules",null),_(this,"_messages",Jv),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(fe(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=qw(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 g(x){if(Array.isArray(x)){var b;v=(b=v).concat.apply(b,ee(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 P=R.map(Uw(y,a));if(s.first&&P.length)return m[y.field]=1,v(P);if(!g)v(P);else{if(y.required&&!h.value)return y.message!==void 0?P=[].concat(y.message).map(Uw(y,a)):s.error&&(P=[s.error(y,Xr(s.messages.required,y.field))]),v(P);var O={};y.defaultField&&Object.keys(h.value).map(function($){O[$]=y.defaultField}),O=T(T({},O),h.rule.fields);var I={};Object.keys(O).forEach(function($){var F=O[$],k=Array.isArray(F)?F:[F];I[$]=k.map(p.bind(null,$))});var D=new e(I);D.messages(s.messages),h.rule.options&&(h.rule.options.messages=s.messages,h.rule.options.error=s.error),D.validate(h.value,h.rule.options||s,function($){var F=[];P&&P.length&&F.push.apply(F,ee(P)),$&&$.length&&F.push.apply(F,ee($)),v(F.length?F: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&&!bu.hasOwnProperty(r.type))throw new Error(Xr("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"?bu.required:bu[this.getType(r)]||void 0}}]),e}();_(Ud,"register",function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");bu[t]=r});_(Ud,"warning",eA);_(Ud,"messages",Jv);_(Ud,"validators",bu);var wA=Ud;var iy=E(N());var Oo="'${name}' is not a valid ${type}",oy={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:Oo,method:Oo,array:Oo,object:Oo,number:Oo,date:Oo,boolean:Oo,integer:Oo,float:Oo,regexp:Oo,email:Oo,url:Oo,hex:Oo},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 EA=wA;function hH(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 RA="CODE_LOGIC_ERROR";function Gw(e,t,r,n,o){return Kw.apply(this,arguments)}function Kw(){return Kw=Gr(Et().mark(function e(t,r,n,o,i){var a,s,l,c,u,f,d,m,h;return Et().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return a=T({},n),delete a.ruleIndex,EA.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(RA)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new EA(_({},t,[a])),u=Ca(oy,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(g,p){var x=g.message,b=x===RA?u.default:x;return iy.isValidElement(b)?iy.cloneElement(b,{key:"error_".concat(p)}):b}));case 18:if(!(!f.length&&l)){y.next=23;break}return y.next=21,Promise.all(r.map(function(g,p){return Gw("".concat(t,".").concat(p),g,l,o,i)}));case 21:return d=y.sent,y.abrupt("return",d.reduce(function(g,p){return[].concat(ee(g),ee(p))},[]));case 23:return m=T(T({},n),{},{name:t,enum:(n.enum||[]).join(", ")},i),h=f.map(function(g){return typeof g=="string"?hH(g,m):g}),y.abrupt("return",h);case 26:case"end":return y.stop()}},e,null,[[10,15]])})),Kw.apply(this,arguments)}function OA(e,t,r,n,o,i){var a=e.join("."),s=r.map(function(u,f){var d=u.validator,m=T(T({},u),{},{ruleIndex:f});return d&&(m.validator=function(h,v,y){var g=!1,p=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 Jw(t,n,r)})}function Jw(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 _A(e,t){if(e===t)return!0;if(!e&&t||e&&!t||!e||!t||fe(e)!=="object"||fe(t)!=="object")return!1;var r=Object.keys(e),n=Object.keys(t),o=new Set([].concat(r,n));return ee(o).every(function(i){var a=e[i],s=t[i];return typeof a=="function"&&typeof s=="function"?!0:a===s})}function PA(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&fe(t.target)==="object"&&e in t.target?t.target[e]:t}function Zw(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(ee(e.slice(0,r)),[o],ee(e.slice(r,t)),ee(e.slice(t+1,n))):i<0?[].concat(ee(e.slice(0,t)),ee(e.slice(t+1,r+1)),[o],ee(e.slice(r+1,n))):e}var xH=["name"],Zo=[];function e1(e,t,r,n,o,i){return typeof e=="function"?e(t,r,"source"in i?{source:i.source}:{}):n!==o}var t1=function(e){Dr(r,e);var t=$r(r);function r(n){var o;if(it(this,r),o=t.call(this,n),_(Ye(o),"state",{resetCount:0}),_(Ye(o),"cancelRegisterFunc",null),_(Ye(o),"mounted",!1),_(Ye(o),"touched",!1),_(Ye(o),"dirty",!1),_(Ye(o),"validatePromise",void 0),_(Ye(o),"prevValidating",void 0),_(Ye(o),"errors",Zo),_(Ye(o),"warnings",Zo),_(Ye(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}),_(Ye(o),"getNamePath",function(){var l=o.props,c=l.name,u=l.fieldContext,f=u.prefixName,d=f===void 0?[]:f;return c!==void 0?[].concat(ee(d),ee(c)):[]}),_(Ye(o),"getRules",function(){var l=o.props,c=l.rules,u=c===void 0?[]:c,f=l.fieldContext;return u.map(function(d){return typeof d=="function"?d(f):d})}),_(Ye(o),"refresh",function(){o.mounted&&o.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),_(Ye(o),"metaCache",null),_(Ye(o),"triggerMetaEvent",function(l){var c=o.props.onMetaChange;if(c){var u=T(T({},o.getMeta()),{},{destroy:l});ws(o.metaCache,u)||c(u),o.metaCache=u}else o.metaCache=null}),_(Ye(o),"onStoreChange",function(l,c,u){var f=o.props,d=f.shouldUpdate,m=f.dependencies,h=m===void 0?[]:m,v=f.onReset,y=u.store,g=o.getNamePath(),p=o.getValue(l),x=o.getValue(y),b=c&&Ls(c,g);switch(u.type==="valueUpdate"&&u.source==="external"&&!ws(p,x)&&(o.touched=!0,o.dirty=!0,o.validatePromise=null,o.errors=Zo,o.warnings=Zo,o.triggerMetaEvent()),u.type){case"reset":if(!c||b){o.touched=!1,o.dirty=!1,o.validatePromise=void 0,o.errors=Zo,o.warnings=Zo,o.triggerMetaEvent(),v?.(),o.refresh();return}break;case"remove":{if(d&&e1(d,l,y,p,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||Zo),"warnings"in S&&(o.warnings=S.warnings||Zo),o.dirty=!0,o.triggerMetaEvent(),o.reRender();return}else if("value"in S&&Ls(c,g,!0)){o.reRender();return}if(d&&!g.length&&e1(d,l,y,p,x,u)){o.reRender();return}break}case"dependenciesUpdate":{var w=h.map(cr);if(w.some(function(C){return Ls(u.relatedFields,C)})){o.reRender();return}break}default:if(b||(!h.length||g.length||d)&&e1(d,l,y,p,x,u)){o.reRender();return}break}d===!0&&o.reRender()}),_(Ye(o),"validateRules",function(l){var c=o.getNamePath(),u=o.getValue(),f=l||{},d=f.triggerName,m=f.validateOnly,h=m===void 0?!1:m,v=Promise.resolve().then(Gr(Et().mark(function y(){var g,p,x,b,S,w,C;return Et().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(g=o.props,p=g.validateFirst,x=p===void 0?!1:p,b=g.messageVariables,S=g.validateDebounce,w=o.getRules(),d&&(w=w.filter(function(O){return O}).filter(function(O){var I=O.validateTrigger;if(!I)return!0;var D=Vd(I);return D.includes(d)})),!(S&&d)){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=OA(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]:Zo;if(o.validatePromise===v){var I;o.validatePromise=null;var D=[],$=[];(I=O.forEach)===null||I===void 0||I.call(O,function(F){var k=F.rule.warningOnly,z=F.errors,B=z===void 0?Zo:z;k?$.push.apply($,ee(B)):D.push.apply(D,ee(B))}),o.errors=D,o.warnings=$,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=Zo,o.warnings=Zo,o.triggerMetaEvent(),o.reRender()),v}),_(Ye(o),"isFieldValidating",function(){return!!o.validatePromise}),_(Ye(o),"isFieldTouched",function(){return o.touched}),_(Ye(o),"isFieldDirty",function(){if(o.dirty||o.props.initialValue!==void 0)return!0;var l=o.props.fieldContext,c=l.getInternalHooks(_i),u=c.getInitialValue;return u(o.getNamePath())!==void 0}),_(Ye(o),"getErrors",function(){return o.errors}),_(Ye(o),"getWarnings",function(){return o.warnings}),_(Ye(o),"isListField",function(){return o.props.isListField}),_(Ye(o),"isList",function(){return o.props.isList}),_(Ye(o),"isPreserve",function(){return o.props.preserve}),_(Ye(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}),_(Ye(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=xi(l);return u.length!==1||!Kn.isValidElement(u[0])?{child:u,isFunction:!1}:{child:u[0],isFunction:!1}}),_(Ye(o),"getValue",function(l){var c=o.props.fieldContext.getFieldsValue,u=o.getNamePath();return bn(l||c(!0),u)}),_(Ye(o),"getControlled",function(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},c=o.props,u=c.name,f=c.trigger,d=c.validateTrigger,m=c.getValueFromEvent,h=c.normalize,v=c.valuePropName,y=c.getValueProps,g=c.fieldContext,p=d!==void 0?d:g.validateTrigger,x=o.getNamePath(),b=g.getInternalHooks,S=g.getFieldsValue,w=b(_i),C=w.dispatch,R=o.getValue(),P=y||function(F){return _({},v,F)},O=l[f],I=u!==void 0?P(R):{},D=T(T({},l),I);D[f]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var F,k=arguments.length,z=new Array(k),B=0;B=0&&O<=I.length?(u.keys=[].concat(ee(u.keys.slice(0,O)),[u.id],ee(u.keys.slice(O))),x([].concat(ee(I.slice(0,O)),[P],ee(I.slice(O))))):(u.keys=[].concat(ee(u.keys),[u.id]),x([].concat(ee(I),[P]))),u.id+=1},remove:function(P){var O=S(),I=new Set(Array.isArray(P)?P:[P]);I.size<=0||(u.keys=u.keys.filter(function(D,$){return!I.has($)}),x(O.filter(function(D,$){return!I.has($)})))},move:function(P,O){if(P!==O){var I=S();P<0||P>=I.length||O<0||O>=I.length||(u.keys=Zw(u.keys,P,O),x(Zw(I,P,O)))}}},C=p||[];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 TA=SH;var sy=E(N());function NA(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 IA="__@field_split__";function r1(e){return e.map(function(t){return"".concat(fe(t),":").concat(t)}).join(IA)}var CH=function(){function e(){it(this,e),_(this,"kvs",new Map)}return at(e,[{key:"set",value:function(r,n){this.kvs.set(r1(r),n)}},{key:"get",value:function(r){return this.kvs.get(r1(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(r1(r))}},{key:"map",value:function(r){return ee(this.kvs.entries()).map(function(n){var o=M(n,2),i=o[0],a=o[1],s=i.split(IA);return r({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=M(c,3),f=u[1],d=u[2];return f==="number"?Number(d):d}),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}(),Ll=CH;var wH=["name"],EH=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===_i?(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=Ca(n,r.store);(i=r.prevWithoutPreserves)===null||i===void 0||i.map(function(s){var l=s.key;a=Gn(a,l,bn(n,l))}),r.prevWithoutPreserves=null,r.updateStore(a)}}),_(this,"destroyForm",function(n){if(n)r.updateStore({});else{var o=new Ll;r.getFieldEntities(!0).forEach(function(i){r.isMergedPreserve(i.isPreserve())||o.set(i.getNamePath(),!0)}),r.prevWithoutPreserves=o}}),_(this,"getInitialValue",function(n){var o=bn(r.initialValues,n);return n.length?Ca(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 Ll;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&&fe(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,d,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&&(f=(d=u).isListField)!==null&&f!==void 0&&f.call(d))return;if(!a)c.push(m);else{var y="getMeta"in u?u.getMeta():null;a(y)&&c.push(m)}}),Qw(r.store,c.map(cr))}),_(this,"getFieldValue",function(n){r.warningUnhooked();var o=cr(n);return bn(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 Ll,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 d=u.getNamePath(),m=r.getInitialValue(d);if(m!==void 0)Vt(!1,"Form already set 'initialValues' with path '".concat(d.join("."),"'. Field can not overwrite it."));else{var h=o.get(d);if(h&&h.size>1)Vt(!1,"Multiple Field with path '".concat(d.join("."),"' set 'initialValue'. Can not decide which one to pick."));else if(h){var v=r.getFieldValue(d),y=u.isListField();!y&&(!n.skipExist||v===void 0)&&r.updateStore(Gn(r.store,d,ee(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,ee(ee(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(Ca(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(Gn(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,wH),c=cr(s);i.push(c),"value"in l&&r.updateStore(Gn(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=bn(r.store,i);a===void 0&&r.updateStore(Gn(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!Jw(f.getNamePath(),o)})){var u=r.store;r.updateStore(Gn(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(ee(i))}),i}),_(this,"updateValue",function(n,o){var i=cr(n),a=r.store;r.updateStore(Gn(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=Qw(r.store,[i]);l(c,r.getFieldsValue())}r.triggerOnFieldsChange([i].concat(ee(s)))}),_(this,"setFieldsValue",function(n){r.warningUnhooked();var o=r.store;if(n){var i=Ca(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 Ll;r.getFieldEntities().forEach(function(l){var c=l.props.dependencies;(c||[]).forEach(function(u){var f=cr(u);a.update(f,function(){var d=arguments.length>0&&arguments[0]!==void 0?arguments[0]:new Set;return d.add(l),d})})});var s=function l(c){var u=a.get(c)||new Set;u.forEach(function(f){if(!o.has(f)){o.add(f);var d=f.getNamePath();f.isFieldDirty()&&d.length&&(i.push(d),l(d))}})};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 Ll;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 Ls(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,d=a||{},m=d.recursive,h=d.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(f.add(x.join(u)),!s||Ls(l,x,m)){var b=p.validateRules(T({validateMessages:T(T({},oy),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,I=P.errors;O?R.push.apply(R,ee(I)):C.push.apply(C,ee(I))}),C.length?Promise.reject({name:x,errors:C,warnings:R}):{name:x,errors:C,warnings:R}}))}}});var v=NA(c);r.lastValidatePromise=v,v.catch(function(p){return p}).then(function(p){var x=p.map(function(b){var S=b.name;return S});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(b){return b&&b.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 f.has(p.join(u))});return r.triggerOnFieldsChange(g),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 RH(e){var t=sy.useRef(),r=sy.useState({}),n=M(r,2),o=n[1];if(!t.current)if(e)t.current=e;else{var i=function(){o({})},a=new EH(i);t.current=a.getForm()}return[t.current]}var ly=RH;var dn=E(N());var zs=E(N()),n1=zs.createContext({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),o1=function(t){var r=t.validateMessages,n=t.onFormChange,o=t.onFormFinish,i=t.children,a=zs.useContext(n1),s=zs.useRef({});return zs.createElement(n1.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 DA=n1;var OH=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],_H=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,d=t.validateTrigger,m=d===void 0?"onChange":d,h=t.onValuesChange,v=t.onFieldsChange,y=t.onFinish,g=t.onFinishFailed,p=t.clearOnDestroy,x=Ve(t,OH),b=dn.useRef(null),S=dn.useContext(DA),w=ly(a),C=M(w,1),R=C[0],P=R.getInternalHooks(_i),O=P.useSubscribe,I=P.setInitialValues,D=P.setCallbacks,$=P.setValidateMessages,F=P.setPreserve,k=P.destroyForm;dn.useImperativeHandle(r,function(){return T(T({},R),{},{nativeElement:b.current})}),dn.useEffect(function(){return S.registerForm(n,R),function(){S.unregisterForm(n)}},[S,R,n]),$(T(T({},S.validateMessages),f)),D({onValuesChange:h,onFieldsChange:function(A){if(S.triggerFormChange(n,A),v){for(var L=arguments.length,q=new Array(L>1?L-1:0),ne=1;ne{let n=Aa.useContext(pn),o=Aa.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 Aa.createElement(pn.Provider,{value:o},e)},LA=Aa.createContext(void 0);var IH=e=>{let{space:t,form:r,children:n}=e;if(n==null)return null;let o=n;return r&&(o=i1.default.createElement(FA,{override:!0,status:!0},o)),t&&(o=i1.default.createElement(BD,null,o)),o},Ws=IH;var lo=E(N());function DH(e){return t=>lo.createElement(Ia,{theme:{token:{motion:!1,zIndexPopupBase:0}}},lo.createElement(e,Object.assign({},t)))}var $H=(e,t,r,n,o)=>DH(a=>{let{prefixCls:s,style:l}=a,c=lo.useRef(null),[u,f]=lo.useState(0),[d,m]=lo.useState(0),[h,v]=ar(!1,{value:a.open}),{getPrefixCls:y}=lo.useContext(rt),g=y(n||"select",s);lo.useEffect(()=>{if(v(!0),typeof ResizeObserver<"u"){let b=new ResizeObserver(w=>{let C=w[0].target;f(C.offsetHeight+8),m(C.offsetWidth)}),S=setInterval(()=>{var w;let C=o?`.${o(g)}`:`.${g}-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 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}}}),lo.createElement("div",{ref:c,style:{paddingBottom:u,position:"relative",minWidth:d}},lo.createElement(e,Object.assign({},p)))}),zA=$H;var oi=E(N()),Q1=E(Ne());var fr=E(N());var R1=E(Ne());var Su=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(N());var a1=E(N()),WA=E(Ne()),AH=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 a1.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:a1.createElement("span",{className:(0,WA.default)(r.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},Bs=AH;var cy=E(N()),BA=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=cy.default.useMemo(function(){if(fe(o)==="object")return o.clearIcon;if(i)return i},[o,i]),u=cy.default.useMemo(function(){return!!(!a&&o&&(n.length||s)&&!(l==="combobox"&&s===""))},[o,a,n.length,s,l]);return{allowClear:u,clearIcon:cy.default.createElement(Bs,{className:"".concat(t,"-clear"),onMouseDown:r,customizeIcon:c},"\xD7")}};var uy=E(N()),s1=uy.createContext(null);function fy(){return uy.useContext(s1)}var Cu=E(N());function l1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=Cu.useState(!1),r=M(t,2),n=r[0],o=r[1],i=Cu.useRef(null),a=function(){window.clearTimeout(i.current)};Cu.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 Gd=E(N());function Kd(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=Gd.useRef(null),r=Gd.useRef(null);Gd.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 dy=E(N());function c1(e,t,r,n){var o=dy.useRef(null);o.current={open:t,triggerOpen:r,customizedTrigger:n},dy.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 ka=E(N()),vy=E(N());function jA(e){return e&&![Qe.ESC,Qe.SHIFT,Qe.BACKSPACE,Qe.TAB,Qe.WIN_KEY,Qe.ALT,Qe.META,Qe.WIN_KEY_RIGHT,Qe.CTRL,Qe.SEMICOLON,Qe.EQUALS,Qe.CAPS_LOCK,Qe.CONTEXT_MENU,Qe.F1,Qe.F2,Qe.F3,Qe.F4,Qe.F5,Qe.F6,Qe.F7,Qe.F8,Qe.F9,Qe.F10,Qe.F11,Qe.F12].includes(e)}var Po=E(N()),d1=E(N()),ck=E(Ne());var ei=E(N()),Yi=E(N()),QA=E(Ne());var zl=E(N()),VA=E(Ne());var kH=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],wu=void 0;function MH(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,d=e.children,m=e.display,h=e.order,v=e.component,y=v===void 0?"div":v,g=Ve(e,kH),p=a&&!m;function x(R){l(c,R)}zl.useEffect(function(){return function(){x(null)}},[]);var b=i&&o!==wu?i(o,{index:h}):d,S;n||(S={opacity:p?0:1,height:p?0:wu,overflowY:p?"hidden":wu,order:a?h:wu,pointerEvents:p?"none":wu,position:p?"absolute":wu});var w={};p&&(w["aria-hidden"]=!0);var C=zl.createElement(y,ue({className:(0,VA.default)(!n&&r,u),style:T(T({},S),f)},w,g,{ref:t}),b);return a&&(C=zl.createElement(no,{onResize:function(P){var O=P.offsetWidth;x(O)},disabled:s},C)),C}var HA=zl.forwardRef(MH);HA.displayName="Item";var Eu=HA;var py=E(N()),UA=E(Hi());function u1(e){if(typeof MessageChannel>"u")dt(e);else{var t=new MessageChannel;t.port1.onmessage=function(){return e()},t.port2.postMessage(void 0)}}function qA(){var e=py.useRef(null),t=function(n){e.current||(e.current=[],u1(function(){(0,UA.unstable_batchedUpdates)(function(){e.current.forEach(function(o){o()}),e.current=null})})),e.current.push(n)};return t}function Wl(e,t){var r=py.useState(t),n=M(r,2),o=n[0],i=n[1],a=wt(function(s){e(function(){i(s)})});return[o,a]}var js=E(N()),KA=E(Ne());var GA=E(N()),Bl=GA.default.createContext(null);var FH=["component"],LH=["className"],zH=["className"],WH=function(t,r){var n=js.useContext(Bl);if(!n){var o=t.component,i=o===void 0?"div":o,a=Ve(t,FH);return js.createElement(i,ue({},a,{ref:r}))}var s=n.className,l=Ve(n,LH),c=t.className,u=Ve(t,zH);return js.createElement(Bl.Provider,{value:null},js.createElement(Eu,ue({ref:r,className:(0,KA.default)(s,c)},l,u)))},XA=js.forwardRef(WH);XA.displayName="RawItem";var YA=XA;var BH=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],JA="responsive",ZA="invalidate";function jH(e){return"+ ".concat(e.length," ...")}function VH(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,d=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,b=e.itemComponent,S=e.onVisibleChange,w=Ve(e,BH),C=f==="full",R=qA(),P=Wl(R,null),O=M(P,2),I=O[0],D=O[1],$=I||0,F=Wl(R,new Map),k=M(F,2),z=k[0],B=k[1],j=Wl(R,0),G=M(j,2),V=G[0],H=G[1],K=Wl(R,0),W=M(K,2),A=W[0],L=W[1],q=Wl(R,0),ne=M(q,2),Y=ne[0],X=ne[1],ae=(0,Yi.useState)(null),J=M(ae,2),U=J[0],Q=J[1],te=(0,Yi.useState)(null),Z=M(te,2),re=Z[0],de=Z[1],le=ei.useMemo(function(){return re===null&&C?Number.MAX_SAFE_INTEGER:re||0},[re,I]),pe=(0,Yi.useState)(!1),Oe=M(pe,2),Ce=Oe[0],$e=Oe[1],ce="".concat(n,"-item"),ie=Math.max(V,A),Re=h===JA,Le=i.length&&Re,Ge=h===ZA,Me=Le||typeof h=="number"&&i.length>h,Ie=(0,Yi.useMemo)(function(){var De=i;return Le?I===null&&C?De=i:De=i.slice(0,Math.min(i.length,$/u)):typeof h=="number"&&(De=i.slice(0,h)),De},[i,u,I,h,Le]),je=(0,Yi.useMemo)(function(){return Le?i.slice(le+1):i.slice(Ie.length)},[i,Ie,Le,le]),We=(0,Yi.useCallback)(function(De,Ee){var be;return typeof l=="function"?l(De):(be=l&&De?.[l])!==null&&be!==void 0?be:Ee},[l]),He=(0,Yi.useCallback)(a||function(De){return De},[a]);function ye(De,Ee,be){re===De&&(Ee===void 0||Ee===U)||(de(De),be||($e(De$){ye(ht-1,De-Mt-Y+A);break}}g&&Ze(0)+Y>$&&Q(null)}},[$,z,A,Y,We,Ie]);var lt=Ce&&!!je.length,Rt={};U!==null&&Le&&(Rt={position:"absolute",left:U,top:0});var Tt={prefixCls:ce,responsive:Le,component:b,invalidate:Ge},pt=s?function(De,Ee){var be=We(De,Ee);return ei.createElement(Bl.Provider,{key:be,value:T(T({},Tt),{},{order:Ee,item:De,itemKey:be,registerSize:xe,display:Ee<=le})},s(De,Ee))}:function(De,Ee){var be=We(De,Ee);return ei.createElement(Eu,ue({},Tt,{order:Ee,key:be,item:De,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||jH,et=y?ei.createElement(Bl.Provider,{value:T(T({},Tt),Ae)},y(je)):ei.createElement(Eu,ue({},Tt,Ae),typeof we=="function"?we(je):we),Pe=ei.createElement(x,ue({className:(0,QA.default)(!Ge&&n,m),style:d,ref:t},w),Ie.map(pt),Me?et:null,g&&ei.createElement(Eu,ue({},Tt,{responsive:Re,responsiveDisabled:!Le,order:le,className:"".concat(ce,"-suffix"),registerSize:he,display:!0,style:Rt}),g));return Re?ei.createElement(no,{onResize:se,disabled:!Le},Pe):Pe}var Xd=ei.forwardRef(VH);Xd.displayName="Overflow";Xd.Item=YA;Xd.RESPONSIVE=JA;Xd.INVALIDATE=ZA;var ek=Xd;var tk=ek;var Ru=E(N()),nk=E(Ne());function HH(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 $e=function(ie){ie&&ie.stopPropagation(),R(Z)};return typeof w=="function"?X(le,Oe,re,pe,$e):Y(Z,Oe,re,pe,$e)},J=function(Z){if(!o.length)return null;var re=typeof S=="function"?S(Z):S;return typeof w=="function"?X(void 0,re,!1,!1,void 0,!0):Y({title:re},re,!1)},U=Po.createElement("div",{className:"".concat(L,"-search"),style:{width:G},onFocus:function(){A(!0)},onBlur:function(){A(!1)}},Po.createElement(my,{ref:l,open:i,prefixCls:n,id:r,inputElement:null,disabled:u,autoFocus:m,autoComplete:h,editable:ne,activeDescendantId:v,value:q,onKeyDown:I,onMouseDown:D,onChange:P,onPaste:O,onCompositionStart:$,onCompositionEnd:F,onBlur:k,tabIndex:y,attrs:Go(t,!0)}),Po.createElement("span",{ref:z,className:"".concat(L,"-search-mirror"),"aria-hidden":!0},q,"\xA0")),Q=Po.createElement(tk,{prefixCls:"".concat(L,"-overflow"),data:o,renderItem:ae,renderRest:J,suffix:U,itemKey:XH,maxCount:p});return Po.createElement("span",{className:"".concat(L,"-wrap")},Q,!o.length&&!q&&Po.createElement("span",{className:"".concat(L,"-placeholder")},c))},uk=YH;var ti=E(N());var QH=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,d=t.values,m=t.placeholder,h=t.tabIndex,v=t.showSearch,y=t.searchValue,g=t.activeValue,p=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,I=ti.useState(!1),D=M(I,2),$=D[0],F=D[1],k=u==="combobox",z=k||v,B=d[0],j=y||"";k&&g&&!$&&(j=g),ti.useEffect(function(){k&&F(!1)},[k,g]);var G=u!=="combobox"&&!f&&!v?!1:!!j,V=O===void 0?gy(B):O,H=ti.useMemo(function(){return B?null:ti.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:G?{visibility:"hidden"}:void 0},m)},[B,G,m,n]);return ti.createElement("span",{className:"".concat(n,"-selection-wrap")},ti.createElement("span",{className:"".concat(n,"-selection-search")},ti.createElement(my,{ref:i,prefixCls:n,id:o,open:f,inputElement:r,disabled:a,autoFocus:s,autoComplete:l,editable:z,activeDescendantId:c,value:j,onKeyDown:x,onMouseDown:b,onChange:function(W){F(!0),S(W)},onPaste:w,onCompositionStart:C,onCompositionEnd:R,onBlur:P,tabIndex:h,attrs:Go(t,!0),maxLength:k?p:void 0})),!k&&B?ti.createElement("span",{className:"".concat(n,"-selection-item"),title:V,style:G?{visibility:"hidden"}:void 0},B.label):null,H)},fk=QH;var JH=function(t,r){var n=(0,vy.useRef)(null),o=(0,vy.useRef)(!1),i=t.prefixCls,a=t.open,s=t.mode,l=t.showSearch,c=t.tokenWithEnter,u=t.disabled,f=t.prefix,d=t.autoClearSearchValue,m=t.onSearch,h=t.onSearchSubmit,v=t.onToggleOpen,y=t.onInputKeyDown,g=t.onInputBlur,p=t.domRef;ka.useImperativeHandle(r,function(){return{focus:function(V){n.current.focus(V)},blur:function(){n.current.blur()}}});var x=Kd(0),b=M(x,2),S=b[0],w=b[1],C=function(V){var H=V.which,K=n.current instanceof HTMLTextAreaElement;!K&&a&&(H===Qe.UP||H===Qe.DOWN)&&V.preventDefault(),y&&y(V),H===Qe.ENTER&&s==="tags"&&!o.current&&!a&&h?.(V.target.value),!(K&&!a&&~[Qe.UP,Qe.DOWN,Qe.LEFT,Qe.RIGHT].indexOf(H))&&jA(H)&&v(!0)},R=function(){w(!0)},P=(0,vy.useRef)(null),O=function(V){m(V,!0,o.current)!==!1&&v(!0)},I=function(){o.current=!0},D=function(V){o.current=!1,s!=="combobox"&&O(V.target.value)},$=function(V){var H=V.target.value;if(c&&P.current&&/[\r\n]/.test(P.current)){var K=P.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");H=H.replace(K,P.current)}P.current=null,O(H)},F=function(V){var H=V.clipboardData,K=H?.getData("text");P.current=K||""},k=function(V){var H=V.target;if(H!==n.current){var K=document.body.style.msTouchAction!==void 0;K?setTimeout(function(){n.current.focus()}):n.current.focus()}},z=function(V){var H=S();V.target!==n.current&&!H&&!(s==="combobox"&&u)&&V.preventDefault(),(s!=="combobox"&&(!l||!H)||!a)&&(a&&d!==!1&&m("",!0,!1),v())},B={inputRef:n,onInputKeyDown:C,onInputMouseDown:R,onInputChange:$,onInputPaste:F,onInputCompositionStart:I,onInputCompositionEnd:D,onInputBlur:g},j=s==="multiple"||s==="tags"?ka.createElement(uk,ue({},t,B)):ka.createElement(fk,ue({},t,B));return ka.createElement("div",{ref:p,className:"".concat(i,"-selector"),onClick:k,onMouseDown:z},f&&ka.createElement("div",{className:"".concat(i,"-prefix")},f),j)},ZH=ka.forwardRef(JH),dk=ZH;var xy=E(Ne());var xt=E(N());var vk=E(Ne());var ri=E(N());var pk=E(Ne()),yy=E(N());function p1(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,d=yy.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=f: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 yy.createElement("div",{ref:d,className:(0,pk.default)("".concat(t,"-arrow"),a),style:m},s)}var mk=E(Ne());var m1=E(N());function g1(e){var t=e.prefixCls,r=e.open,n=e.zIndex,o=e.mask,i=e.motion;return o?m1.createElement(qo,ue({},i,{motionAppear:!0,visible:r,removeOnLeave:!0}),function(a){var s=a.className;return m1.createElement("div",{style:{zIndex:n},className:(0,mk.default)("".concat(t,"-mask"),s)})}):null}var gk=E(N()),e9=gk.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),hk=e9;var t9=ri.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,d=e.mask,m=e.arrow,h=e.arrowPos,v=e.align,y=e.motion,g=e.maskMotion,p=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,I=e.ready,D=e.offsetX,$=e.offsetY,F=e.offsetR,k=e.offsetB,z=e.onAlign,B=e.onPrepare,j=e.stretch,G=e.targetWidth,V=e.targetHeight,H=typeof r=="function"?r():r,K=l||c,W=x?.length>0,A=ri.useState(!x||!W),L=M(A,2),q=L[0],ne=L[1];if(vt(function(){!q&&W&&a&&ne(!0)},[q,W,a]),!q)return null;var Y="auto",X={left:"-1000vw",top:"-1000vh",right:Y,bottom:Y};if(I||!l){var ae,J=v.points,U=v.dynamicInset||((ae=v._experimental)===null||ae===void 0?void 0:ae.dynamicInset),Q=U&&J[0][1]==="r",te=U&&J[0][0]==="b";Q?(X.right=F,X.left=Y):(X.left=D,X.right=Y),te?(X.bottom=k,X.top=Y):(X.top=$,X.bottom=Y)}var Z={};return j&&(j.includes("height")&&V?Z.height=V:j.includes("minHeight")&&V&&(Z.minHeight=V),j.includes("width")&&G?Z.width=G:j.includes("minWidth")&&G&&(Z.minWidth=G)),l||(Z.pointerEvents="none"),ri.createElement(S,{open:p||K,getContainer:x&&function(){return x(a)},autoDestroy:b},ri.createElement(g1,{prefixCls:o,open:l,zIndex:w,mask:d,motion:g}),ri.createElement(no,{onResize:z,disabled:!l},function(re){return ri.createElement(qo,ue({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:p,leavedClassName:"".concat(o,"-hidden")},y,{onAppearPrepare:B,onEnterPrepare:B,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,vk.default)(o,pe,n);return ri.createElement("div",{ref:zr(re,t,le),className:Ce,style:T(T(T(T({"--arrow-x":"".concat(h.x||0,"px"),"--arrow-y":"".concat(h.y||0,"px")},X),Z),Oe),{},{boxSizing:"border-box",zIndex:w},i),onMouseEnter:C,onMouseLeave:R,onPointerEnter:P,onClick:f,onPointerDownCapture:O},m&&ri.createElement(p1,{prefixCls:o,arrow:m,arrowPos:h,align:v}),ri.createElement(hk,{cache:!l&&!u},H))})}))}),yk=t9;var Ou=E(N()),r9=Ou.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,o=Si(r),i=Ou.useCallback(function(s){hd(t,n?n(s):s)},[n]),a=bi(i,xs(r));return o?Ou.cloneElement(r,{ref:a}):r}),xk=r9;var bk=E(N()),n9=bk.createContext(null),h1=n9;var Ck=E(N());function Sk(e){return e?Array.isArray(e)?e:[e]:[]}function v1(e,t,r,n){return Ck.useMemo(function(){var o=Sk(r??t),i=Sk(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 jl=E(N());function o9(){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 wk(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 Qd(e){return _u(parseFloat(e),0)}function x1(e,t){var r=T({},e);return(t||[]).forEach(function(n){if(!(n instanceof HTMLBodyElement||n instanceof HTMLHtmlElement)){var o=Vs(n).getComputedStyle(n),i=o.overflow,a=o.overflowClipMargin,s=o.borderTopWidth,l=o.borderBottomWidth,c=o.borderLeftWidth,u=o.borderRightWidth,f=n.getBoundingClientRect(),d=n.offsetHeight,m=n.clientHeight,h=n.offsetWidth,v=n.clientWidth,y=Qd(s),g=Qd(l),p=Qd(c),x=Qd(u),b=_u(Math.round(f.width/h*1e3)/1e3),S=_u(Math.round(f.height/d*1e3)/1e3),w=(h-v-p-x)*b,C=(d-m-y-g)*S,R=y*S,P=g*S,O=p*b,I=x*b,D=0,$=0;if(i==="clip"){var F=Qd(a);D=F*b,$=F*S}var k=f.x+O-D,z=f.y+R-$,B=k+f.width+2*D-O-I-w,j=z+f.height+2*$-R-P-C;r.left=Math.max(r.left,k),r.top=Math.max(r.top,z),r.right=Math.min(r.right,B),r.bottom=Math.min(r.bottom,j)}}),r}function Ek(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 Rk(e,t){var r=t||[],n=M(r,2),o=n[0],i=n[1];return[Ek(e.width,o),Ek(e.height,i)]}function Ok(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function Pu(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 Hs(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 b1(e,t,r,n,o,i,a){var s=jl.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[n]||{}}),l=M(s,2),c=l[0],u=l[1],f=jl.useRef(0),d=jl.useMemo(function(){return t?Jd(t):[]},[t]),m=jl.useRef({}),h=function(){m.current={}};e||h();var v=wt(function(){if(t&&r&&e){let zn=function(ic,qa){var ac=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ie,Dp=A.x+ic,$p=A.y+qa,K0=Dp+Q,Je=$p+U,ct=Math.max(Dp,ac.left),hr=Math.max($p,ac.top),Fr=Math.min(K0,ac.right),vr=Math.min(Je,ac.bottom);return Math.max(0,(Fr-ct)*(vr-hr))},oc=function(){rr=A.y+be,pr=rr+U,mr=A.x+Ee,Mn=mr+Q};var SR=zn,CR=oc,p,x,b,S,w=t,C=w.ownerDocument,R=Vs(w),P=R.getComputedStyle(w),O=P.width,I=P.height,D=P.position,$=w.style.left,F=w.style.top,k=w.style.right,z=w.style.bottom,B=w.style.overflow,j=T(T({},o[n]),i),G=C.createElement("div");(p=w.parentElement)===null||p===void 0||p.appendChild(G),G.style.left="".concat(w.offsetLeft,"px"),G.style.top="".concat(w.offsetTop,"px"),G.style.position=D,G.style.height="".concat(w.offsetHeight,"px"),G.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 V;if(Array.isArray(r))V={x:r[0],y:r[1],width:0,height:0};else{var H,K,W=r.getBoundingClientRect();W.x=(H=W.x)!==null&&H!==void 0?H:W.left,W.y=(K=W.y)!==null&&K!==void 0?K:W.top,V={x:W.x,y:W.y,width:W.width,height:W.height}}var A=w.getBoundingClientRect();A.x=(x=A.x)!==null&&x!==void 0?x:A.left,A.y=(b=A.y)!==null&&b!==void 0?b:A.top;var L=C.documentElement,q=L.clientWidth,ne=L.clientHeight,Y=L.scrollWidth,X=L.scrollHeight,ae=L.scrollTop,J=L.scrollLeft,U=A.height,Q=A.width,te=V.height,Z=V.width,re={left:0,top:0,right:q,bottom:ne},de={left:-J,top:-ae,right:Y-J,bottom:X-ae},le=j.htmlRegion,pe="visible",Oe="visibleFirst";le!=="scroll"&&le!==Oe&&(le=pe);var Ce=le===Oe,$e=x1(de,d),ce=x1(re,d),ie=le===pe?ce:$e,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=$,w.style.top=F,w.style.right=k,w.style.bottom=z,w.style.overflow=B,(S=w.parentElement)===null||S===void 0||S.removeChild(G);var Ge=_u(Math.round(Q/parseFloat(O)*1e3)/1e3),Me=_u(Math.round(U/parseFloat(I)*1e3)/1e3);if(Ge===0||Me===0||Cl(r)&&!Pv(r))return;var Ie=j.offset,je=j.targetOffset,We=Rk(A,Ie),He=M(We,2),ye=He[0],se=He[1],xe=Rk(V,je),_e=M(xe,2),he=_e[0],Ze=_e[1];V.x-=he,V.y-=Ze;var lt=j.points||[],Rt=M(lt,2),Tt=Rt[0],pt=Rt[1],Ae=Ok(pt),we=Ok(Tt),et=Pu(V,Ae),Pe=Pu(A,we),De=T({},j),Ee=et.x-Pe.x+ye,be=et.y-Pe.y+se,ht=zn(Ee,be),Mt=zn(Ee,be,ce),Fe=Pu(V,["t","l"]),Se=Pu(A,["t","l"]),Ke=Pu(V,["b","r"]),Be=Pu(A,["b","r"]),ze=j.overflow||{},tt=ze.adjustX,kt=ze.adjustY,Nt=ze.shiftX,tr=ze.shiftY,Ft=function(qa){return typeof qa=="boolean"?qa:qa>=0},rr,pr,mr,Mn;oc();var gr=Ft(kt),Lt=we[0]===Ae[0];if(gr&&we[0]==="t"&&(pr>Re.bottom||m.current.bt)){var Te=be;Lt?Te-=U-te:Te=Fe.y-Be.y-se;var Ue=zn(Ee,Te),ke=zn(Ee,Te,ce);Ue>ht||Ue===ht&&(!Ce||ke>=Mt)?(m.current.bt=!0,be=Te,se=-se,De.points=[Hs(we,0),Hs(Ae,0)]):m.current.bt=!1}if(gr&&we[0]==="b"&&(rrht||nt===ht&&(!Ce||It>=Mt)?(m.current.tb=!0,be=ve,se=-se,De.points=[Hs(we,0),Hs(Ae,0)]):m.current.tb=!1}var Dt=Ft(tt),gn=we[1]===Ae[1];if(Dt&&we[1]==="l"&&(Mn>Re.right||m.current.rl)){var kr=Ee;gn?kr-=Q-Z:kr=Fe.x-Be.x-ye;var jr=zn(kr,be),Pr=zn(kr,be,ce);jr>ht||jr===ht&&(!Ce||Pr>=Mt)?(m.current.rl=!0,Ee=kr,ye=-ye,De.points=[Hs(we,1),Hs(Ae,1)]):m.current.rl=!1}if(Dt&&we[1]==="r"&&(mrht||Yn===ht&&(!Ce||Fn>=Mt)?(m.current.lr=!0,Ee=Vr,ye=-ye,De.points=[Hs(we,1),Hs(Ae,1)]):m.current.lr=!1}oc();var tn=Nt===!0?0:Nt;typeof tn=="number"&&(mrce.right&&(Ee-=Mn-ce.right-ye,V.x>ce.right-tn&&(Ee+=V.x-ce.right+tn)));var En=tr===!0?0:tr;typeof En=="number"&&(rrce.bottom&&(be-=pr-ce.bottom-se,V.y>ce.bottom-En&&(be+=V.y-ce.bottom+En)));var Va=A.x+Ee,Ha=Va+Q,Io=A.y+be,nc=Io+U,Ua=V.x,St=Ua+Z,ft=V.y,rn=ft+te,nn=Math.max(Va,Ua),Sr=Math.min(Ha,St),Mr=(nn+Sr)/2,mo=Mr-Va,Qn=Math.max(Io,ft),Do=Math.min(nc,rn),$i=(Qn+Do)/2,ci=$i-Io;a?.(t,De);var Ai=Le.right-A.x-(Ee+A.width),Ln=Le.bottom-A.y-(be+A.height);Ge===1&&(Ee=Math.round(Ee),Ai=Math.round(Ai)),Me===1&&(be=Math.round(be),Ln=Math.round(Ln));var G0={ready:!0,offsetX:Ee/Ge,offsetY:be/Me,offsetR:Ai/Ge,offsetB:Ln/Me,arrowX:mo/Ge,arrowY:ci/Me,scaleX:Ge,scaleY:Me,align:De};u(G0)}}),y=function(){f.current+=1;var x=f.current;Promise.resolve().then(function(){f.current===x&&v()})},g=function(){u(function(x){return T(T({},x),{},{ready:!1})})};return vt(g,[n]),vt(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 S1(e,t,r,n,o){vt(function(){if(e&&t&&r){let d=function(){n(),o()};var f=d,i=t,a=r,s=Jd(i),l=Jd(a),c=Vs(a),u=new Set([c].concat(ee(s),ee(l)));return u.forEach(function(m){m.addEventListener("scroll",d,{passive:!0})}),c.addEventListener("resize",d,{passive:!0}),n(),function(){u.forEach(function(m){m.removeEventListener("scroll",d),c.removeEventListener("resize",d)})}}},[e,t,r])}var Zd=E(N());function C1(e,t,r,n,o,i,a,s){var l=Zd.useRef(e);l.current=e;var c=Zd.useRef(!1);Zd.useEffect(function(){if(t&&n&&(!o||i)){var f=function(){c.current=!1},d=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)},m=Vs(n);m.addEventListener("pointerdown",f,!0),m.addEventListener("mousedown",d,!0),m.addEventListener("contextmenu",d,!0);var h=Dl(r);if(h&&(h.addEventListener("mousedown",d,!0),h.addEventListener("contextmenu",d,!0)),0)var v,y,g,p;return function(){m.removeEventListener("pointerdown",f,!0),m.removeEventListener("mousedown",d,!0),m.removeEventListener("contextmenu",d,!0),h&&(h.removeEventListener("mousedown",d,!0),h.removeEventListener("contextmenu",d,!0))}}},[t,r,n,o,i]);function u(){c.current=!0}return u}var i9=["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 a9(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Hw,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,d=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,b=r.mask,S=r.maskClosable,w=S===void 0?!0:S,C=r.getPopupContainer,R=r.forceRender,P=r.autoDestroy,O=r.destroyPopupOnHide,I=r.popup,D=r.popupClassName,$=r.popupStyle,F=r.popupPlacement,k=r.builtinPlacements,z=k===void 0?{}:k,B=r.popupAlign,j=r.zIndex,G=r.stretch,V=r.getPopupClassNameFromAlign,H=r.fresh,K=r.alignPoint,W=r.onPopupClick,A=r.onPopupAlign,L=r.arrow,q=r.popupMotion,ne=r.maskMotion,Y=r.popupTransitionName,X=r.popupAnimation,ae=r.maskTransitionName,J=r.maskAnimation,U=r.className,Q=r.getTriggerDOMNode,te=Ve(r,i9),Z=P||O||!1,re=xt.useState(!1),de=M(re,2),le=de[0],pe=de[1];vt(function(){pe(Su())},[]);var Oe=xt.useRef({}),Ce=xt.useContext(h1),$e=xt.useMemo(function(){return{registerSubPopup:function(ct,hr){Oe.current[ct]=hr,Ce?.registerSubPopup(ct,hr)}}},[Ce]),ce=Yv(),ie=xt.useState(null),Re=M(ie,2),Le=Re[0],Ge=Re[1],Me=xt.useRef(null),Ie=wt(function(Je){Me.current=Je,Cl(Je)&&Le!==Je&&Ge(Je),Ce?.registerSubPopup(ce,Je)}),je=xt.useState(null),We=M(je,2),He=We[0],ye=We[1],se=xt.useRef(null),xe=wt(function(Je){Cl(Je)&&He!==Je&&(ye(Je),se.current=Je)}),_e=xt.Children.only(a),he=_e?.props||{},Ze={},lt=wt(function(Je){var ct,hr,Fr=He;return Fr?.contains(Je)||((ct=Dl(Fr))===null||ct===void 0?void 0:ct.host)===Je||Je===Fr||Le?.contains(Je)||((hr=Dl(Le))===null||hr===void 0?void 0:hr.host)===Je||Je===Le||Object.values(Oe.current).some(function(vr){return vr?.contains(Je)||Je===vr})}),Rt=y1(i,q,X,Y),Tt=y1(i,ne,J,ae),pt=xt.useState(d||!1),Ae=M(pt,2),we=Ae[0],et=Ae[1],Pe=f??we,De=wt(function(Je){f===void 0&&et(Je)});vt(function(){et(f||!1)},[f]);var Ee=xt.useRef(Pe);Ee.current=Pe;var be=xt.useRef([]);be.current=[];var ht=wt(function(Je){var ct;De(Je),((ct=be.current[be.current.length-1])!==null&&ct!==void 0?ct:Pe)!==Je&&(be.current.push(Je),m?.(Je))}),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=M(Ke,2),ze=Be[0],tt=Be[1];vt(function(Je){(!Je||Pe)&&tt(!0)},[Pe]);var kt=xt.useState(null),Nt=M(kt,2),tr=Nt[0],Ft=Nt[1],rr=xt.useState(null),pr=M(rr,2),mr=pr[0],Mn=pr[1],gr=function(ct){Mn([ct.clientX,ct.clientY])},Lt=b1(Pe,Le,K&&mr!==null?mr:He,F,z,B,A),Te=M(Lt,11),Ue=Te[0],ke=Te[1],ve=Te[2],nt=Te[3],It=Te[4],Dt=Te[5],gn=Te[6],kr=Te[7],jr=Te[8],Pr=Te[9],Vr=Te[10],Yn=v1(le,l,c,u),Fn=M(Yn,2),tn=Fn[0],En=Fn[1],Va=tn.has("click"),Ha=En.has("click")||En.has("contextMenu"),Io=wt(function(){ze||Vr()}),nc=function(){Ee.current&&K&&Ha&&Se(!1)};S1(Pe,He,Le,Io,nc),vt(function(){Io()},[mr,F]),vt(function(){Pe&&!(z!=null&&z[F])&&Io()},[JSON.stringify(B)]);var Ua=xt.useMemo(function(){var Je=wk(z,i,Pr,K);return(0,xy.default)(Je,V?.(Pr))},[Pr,V,z,i,K]);xt.useImperativeHandle(n,function(){return{nativeElement:se.current,popupElement:Me.current,forceAlign:Io}});var St=xt.useState(0),ft=M(St,2),rn=ft[0],nn=ft[1],Sr=xt.useState(0),Mr=M(Sr,2),mo=Mr[0],Qn=Mr[1],Do=function(){if(G&&He){var ct=He.getBoundingClientRect();nn(ct.width),Qn(ct.height)}},$i=function(){Do(),Io()},ci=function(ct){tt(!1),Vr(),h?.(ct)},Ai=function(){return new Promise(function(ct){Do(),Ft(function(){return ct})})};vt(function(){tr&&(Vr(),tr(),Ft(null))},[tr]);function Ln(Je,ct,hr,Fr){Ze[Je]=function(vr){var Ap;Fr?.(vr),Se(ct,hr);for(var X0=arguments.length,wR=new Array(X0>1?X0-1:0),kp=1;kp1?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=w1(r,!1),a=i.label,s=i.value,l=i.options,c=i.groupLabel;function u(f,d){Array.isArray(f)&&f.forEach(function(m){if(d||!(l in m)){var h=m[s];o.push({key:Tk(m,o.length),groupOption:d,data:m,label:m[a],value:h})}else{var v=m[c];v===void 0&&n&&(v=m.label),o.push({key:Tk(m,o.length),group:!0,data:m,label:v}),u(m[l],!0)}})}return u(e,!1),o}function tp(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 Ik=function(t,r,n){if(!r||!r.length)return null;var o=!1,i=function s(l,c){var u=_h(c),f=u[0],d=u.slice(1);if(!f)return[l];var m=l.split(f);return o=o||m.length>1,m.reduce(function(h,v){return[].concat(ee(h),ee(s(v,d)))},[]).filter(Boolean)},a=i(t,r);return o?typeof n<"u"?a.slice(0,n):a:null};var Dk=E(N()),f9=Dk.createContext(null),Tu=f9;var $k=E(N());function E1(e){var t=e.visible,r=e.values;if(!t)return null;var n=50;return $k.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(fe(i))?i:a}).join(", ")),r.length>n?", ...":null)}var d9=["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"],p9=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],rp=function(t){return t==="tags"||t==="multiple"},m9=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,d=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,b=e.getRawInputElement,S=e.open,w=e.defaultOpen,C=e.onDropdownVisibleChange,R=e.activeValue,P=e.onActiveValueChange,O=e.activeDescendantId,I=e.searchValue,D=e.autoClearSearchValue,$=e.onSearch,F=e.onSearchSplit,k=e.tokenSeparators,z=e.allowClear,B=e.prefix,j=e.suffixIcon,G=e.clearIcon,V=e.OptionList,H=e.animation,K=e.transitionName,W=e.dropdownStyle,A=e.dropdownClassName,L=e.dropdownMatchSelectWidth,q=e.dropdownRender,ne=e.dropdownAlign,Y=e.placement,X=e.builtinPlacements,ae=e.getPopupContainer,J=e.showAction,U=J===void 0?[]:J,Q=e.onFocus,te=e.onBlur,Z=e.onKeyUp,re=e.onKeyDown,de=e.onMouseDown,le=Ve(e,d9),pe=rp(y),Oe=(a!==void 0?a:pe)||y==="combobox",Ce=T({},le);p9.forEach(function(St){delete Ce[St]}),c?.forEach(function(St){delete Ce[St]});var $e=bt.useState(!1),ce=M($e,2),ie=ce[0],Re=ce[1];bt.useEffect(function(){Re(Su())},[]);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=l1(),ye=M(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(nn){var Sr;return(Sr=je.current)===null||Sr===void 0?void 0:Sr.scrollTo(nn)},nativeElement:Le.current||Ge.current}});var he=bt.useMemo(function(){var St;if(y!=="combobox")return I;var ft=(St=u[0])===null||St===void 0?void 0:St.value;return typeof ft=="string"||typeof ft=="number"?String(ft):""},[I,y,u]),Ze=y==="combobox"&&typeof x=="function"&&x()||null,lt=typeof b=="function"&&b(),Rt=bi(Ge,lt==null||(r=lt.props)===null||r===void 0?void 0:r.ref),Tt=bt.useState(!1),pt=M(Tt,2),Ae=pt[0],we=pt[1];vt(function(){we(!0)},[]);var et=ar(!1,{defaultValue:w,value:S}),Pe=M(et,2),De=Pe[0],Ee=Pe[1],be=Ae?De:!1,ht=!h&&d;(g||ht&&be&&y==="combobox")&&(be=!1);var Mt=ht?!1:be,Fe=bt.useCallback(function(St){var ft=St!==void 0?St:!be;g||(Ee(ft),be!==ft&&C?.(ft))},[g,be,Ee,C]),Se=bt.useMemo(function(){return(k||[]).some(function(St){return[` +}`),o)}else Ui(o);return function(){Ui(o)}},[t,o])}var k$=!1;function Fw(e){return typeof e=="boolean"&&(k$=e),k$}var A$=function(t){return t===!1?!1:!Yt()||!t?null:typeof t=="string"?document.querySelector(t):typeof t=="function"?t():t},IV=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=V(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 A$(o)}),v=V(h,2),y=v[0],m=v[1];Qo.useEffect(function(){var M=A$(o);m(M??null)});var d=Aw(g&&!y,i),x=V(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,M$.createPortal)(A,w))}),F$=IV;var Lw=F$;var Wd=E(D());function DV(){var e=T({},Wd);return e.useId}var L$=0;var z$=DV(),Uv=z$?function(t){var r=z$();return t||r}:function(t){var r=Wd.useState("ssr-id"),n=V(r,2),o=n[0],i=n[1];return Wd.useEffect(function(){var a=L$;L$+=1,i("rc_unique_".concat(a))},[]),t||o};var Zw=E(D());var ka=E(D());var Tk=E(D());var Gn=E(D());var W$=E(D()),Oi="RC_FORM_INTERNAL_HOOKS",Kt=function(){Vt(!1,"Can not find FormContext. Please make sure you wrap Field under Form.")},$V=W$.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 B$=E(D()),kV=B$.createContext(null),Fs=kV;function Bd(e){return e==null?[]:Array.isArray(e)?e:[e]}function j$(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 V$(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function H$(e,t,r){if(hd())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&Ss(o,r.prototype),o}function Kv(e){var t=typeof Map=="function"?new Map:void 0;return Kv=function(n){if(n===null||!V$(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 H$(n,arguments,El(this).constructor)}return o.prototype=Object.create(n.prototype,{constructor:{value:o,enumerable:!1,writable:!0,configurable:!0}}),Ss(o,n)},Kv(e)}var AV=/%[sdj%]/g,G$=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 Xr(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 MV(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function kt(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||MV(t)&&typeof e=="string"&&!e)}function FV(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 U$(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(Xr(i.messages[f].max,t.fullField,t.max)):s&&l&&(ut.max)&&o.push(Xr(i.messages[f].range,t.fullField,t.min,t.max))},Q$=VV;var HV=function(t,r,n,o,i,a){t.required&&(!n.hasOwnProperty(t.field)||kt(r,a||t.type))&&o.push(Xr(i.messages.required,t.fullField))},Yv=HV;var Qv,J$=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 Z$={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},jd={integer:function(t){return jd.number(t)&&parseInt(t,10)===t},float:function(t){return jd.number(t)&&!jd.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"&&!jd.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&t.length<=320&&!!t.match(Z$.email)},url:function(t){return typeof t=="string"&&t.length<=2048&&!!t.match(J$())},hex:function(t){return typeof t=="string"&&!!t.match(Z$.hex)}},UV=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?jd[s](r)||o.push(Xr(i.messages.types[s],t.fullField,t.type)):s&&ue(r)!==t.type&&o.push(Xr(i.messages.types[s],t.fullField,t.type))},ek=UV;var qV=function(t,r,n,o,i){(/^\s+$/.test(r)||r==="")&&o.push(Xr(i.messages.whitespace,t.fullField))},tk=qV;var ot={required:Yv,whitespace:tk,type:ek,range:Q$,enum:X$,pattern:Y$};var GV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(r)&&!t.required)return n();ot.required(t,r,o,a,i)}n(a)},rk=GV;var KV=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)},nk=KV;var XV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot.type(t,r,o,a,i)}n(a)},ok=XV;var YV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(r,"date")&&!t.required)return n();if(ot.required(t,r,o,a,i),!kt(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)},ik=YV;var QV="enum",JV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot[QV](t,r,o,a,i)}n(a)},ak=JV;var ZV=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(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)},sk=ZV;var eH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(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)},lk=eH;var tH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot.type(t,r,o,a,i)}n(a)},ck=tH;var rH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(r===""&&(r=void 0),kt(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)},uk=rH;var nH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(r)&&!t.required)return n();ot.required(t,r,o,a,i),r!==void 0&&ot.type(t,r,o,a,i)}n(a)},fk=nH;var oH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(r,"string")&&!t.required)return n();ot.required(t,r,o,a,i),kt(r,"string")||ot.pattern(t,r,o,a,i)}n(a)},dk=oH;var iH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(r)&&!t.required)return n();ot.required(t,r,o,a,i),kt(r)||ot.type(t,r,o,a,i)}n(a)},pk=iH;var aH=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)},mk=aH;var sH=function(t,r,n,o,i){var a=[],s=t.required||!t.required&&o.hasOwnProperty(t.field);if(s){if(kt(r,"string")&&!t.required)return n();ot.required(t,r,o,a,i,"string"),kt(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)},gk=sH;var lH=function(t,r,n,o,i){var a=t.type,s=[],l=t.required||!t.required&&o.hasOwnProperty(t.field);if(l){if(kt(r,a)&&!t.required)return n();ot.required(t,r,o,s,i,a),kt(r,a)||ot.type(t,r,o,s,i)}n(s)},Jv=lH;var xu={string:gk,method:ck,number:uk,boolean:ok,regexp:pk,integer:lk,float:sk,array:nk,object:fk,enum:ak,pattern:dk,date:ik,url:Jv,hex:Jv,email:Jv,required:mk,any:rk};var Vd=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,Xr(s.messages.required,y.field))]),v(P);var O={};y.defaultField&&Object.keys(h.value).map(function(F){O[F]=y.defaultField}),O=T(T({},O),h.rule.fields);var A={};Object.keys(O).forEach(function(F){var H=O[F],j=Array.isArray(H)?H:[H];A[F]=j.map(d.bind(null,F))});var M=new e(A);M.messages(s.messages),h.rule.options&&(h.rule.options.messages=s.messages,h.rule.options.error=s.error),M.validate(h.value,h.rule.options||s,function(F){var H=[];P&&P.length&&H.push.apply(H,te(P)),F&&F.length&&H.push.apply(H,te(F)),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&&!xu.hasOwnProperty(r.type))throw new Error(Xr("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"?xu.required:xu[this.getType(r)]||void 0}}]),e}();_(Vd,"register",function(t,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");xu[t]=r});_(Vd,"warning",G$);_(Vd,"messages",Gv);_(Vd,"validators",xu);var hk=Vd;var ey=E(D());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 vk=hk;function cH(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 yk="CODE_LOGIC_ERROR";function Bw(e,t,r,n,o){return jw.apply(this,arguments)}function jw(){return jw=Gr(Ot().mark(function e(t,r,n,o,i){var a,s,l,c,u,f,p,g,h;return Ot().wrap(function(y){for(;;)switch(y.prev=y.next){case 0:return a=T({},n),delete a.ruleIndex,vk.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(yk)}}),l=null,a&&a.type==="array"&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new vk(_({},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===yk?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"?cH(m,g):m}),y.abrupt("return",h);case 26:case"end":return y.stop()}},e,null,[[10,15]])})),jw.apply(this,arguments)}function xk(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 bk(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 Sk(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 dH=["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){Dr(r,e);var t=$r(r);function r(n){var o;if(it(this,r),o=t.call(this,n),_(Ye(o),"state",{resetCount:0}),_(Ye(o),"cancelRegisterFunc",null),_(Ye(o),"mounted",!1),_(Ye(o),"touched",!1),_(Ye(o),"dirty",!1),_(Ye(o),"validatePromise",void 0),_(Ye(o),"prevValidating",void 0),_(Ye(o),"errors",Jo),_(Ye(o),"warnings",Jo),_(Ye(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}),_(Ye(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)):[]}),_(Ye(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})}),_(Ye(o),"refresh",function(){o.mounted&&o.setState(function(l){var c=l.resetCount;return{resetCount:c+1}})}),_(Ye(o),"metaCache",null),_(Ye(o),"triggerMetaEvent",function(l){var c=o.props.onMetaChange;if(c){var u=T(T({},o.getMeta()),{},{destroy:l});ws(o.metaCache,u)||c(u),o.metaCache=u}else o.metaCache=null}),_(Ye(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&&Ls(c,m);switch(u.type==="valueUpdate"&&u.source==="external"&&!ws(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&&Ls(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 Ls(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()}),_(Ye(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(Gr(Ot().mark(function y(){var m,d,x,b,S,w,C;return Ot().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 M=Bd(A);return M.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=xk(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 M=[],F=[];(A=O.forEach)===null||A===void 0||A.call(O,function(H){var j=H.rule.warningOnly,I=H.errors,N=I===void 0?Jo:I;j?F.push.apply(F,te(N)):M.push.apply(M,te(N))}),o.errors=M,o.warnings=F,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}),_(Ye(o),"isFieldValidating",function(){return!!o.validatePromise}),_(Ye(o),"isFieldTouched",function(){return o.touched}),_(Ye(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}),_(Ye(o),"getErrors",function(){return o.errors}),_(Ye(o),"getWarnings",function(){return o.warnings}),_(Ye(o),"isListField",function(){return o.props.isListField}),_(Ye(o),"isList",function(){return o.props.isList}),_(Ye(o),"isPreserve",function(){return o.props.preserve}),_(Ye(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}),_(Ye(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}}),_(Ye(o),"getValue",function(l){var c=o.props.fieldContext.getFieldsValue,u=o.getNamePath();return xn(l||c(!0),u)}),_(Ye(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):{},M=T(T({},l),A);M[f]=function(){o.touched=!0,o.dirty=!0,o.triggerMetaEvent();for(var H,j=arguments.length,I=new Array(j),N=0;N=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(M,F){return!A.has(F)}),x(O.filter(function(M,F){return!A.has(F)})))},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 Ck=mH;var ry=E(D());function wk(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 Ek="__@field_split__";function Yw(e){return e.map(function(t){return"".concat(ue(t),":").concat(t)}).join(Ek)}var gH=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=V(n,2),i=o[0],a=o[1],s=i.split(Ek);return r({key:s.map(function(l){var c=l.match(/^([^:]*):(.*)$/),u=V(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}(),Ll=gH;var hH=["name"],vH=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 Ll;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 Ll;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 Ll,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,hH),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 Ll;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 Ll;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 Ls(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||Ls(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=wk(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 yH(e){var t=ry.useRef(),r=ry.useState({}),n=V(r,2),o=n[1];if(!t.current)if(e)t.current=e;else{var i=function(){o({})},a=new vH(i);t.current=a.getForm()}return[t.current]}var ny=yH;var fn=E(D());var zs=E(D()),Qw=zs.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=zs.useContext(Qw),s=zs.useRef({});return zs.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 Rk=Qw;var xH=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed","clearOnDestroy"],bH=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,xH),b=fn.useRef(null),S=fn.useContext(Rk),w=ny(a),C=V(w,1),R=C[0],P=R.getInternalHooks(Oi),O=P.useSubscribe,A=P.setInitialValues,M=P.setCallbacks,F=P.setValidateMessages,H=P.setPreserve,j=P.destroyForm;fn.useImperativeHandle(r,function(){return T(T({},R),{},{nativeElement:b.current})}),fn.useEffect(function(){return S.registerForm(n,R),function(){S.unregisterForm(n)}},[S,R,n]),F(T(T({},S.validateMessages),f)),M({onValuesChange:h,onFieldsChange:function(k){if(S.triggerFormChange(n,k),v){for(var z=arguments.length,G=new Array(z>1?z-1:0),J=1;J{let n=ka.useContext(dn),o=ka.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 ka.createElement(dn.Provider,{value:o},e)},Ik=ka.createContext(void 0);var EH=e=>{let{space:t,form:r,children:n}=e;if(n==null)return null;let o=n;return r&&(o=Zw.default.createElement(Nk,{override:!0,status:!0},o)),t&&(o=Zw.default.createElement(kD,null,o)),o},Ws=EH;var so=E(D());function RH(e){return t=>so.createElement(Ia,{theme:{token:{motion:!1,zIndexPopupBase:0}}},so.createElement(e,Object.assign({},t)))}var OH=(e,t,r,n,o)=>RH(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)))}),Dk=OH;var ni=E(D()),U1=E(Ne());var fr=E(D());var x1=E(Ne());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 bt=E(D());var e1=E(D()),$k=E(Ne()),_H=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,$k.default)(r.split(/\s+/).map(function(c){return"".concat(c,"-icon")}))},i))},Bs=_H;var oy=E(D()),kk=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(Bs,{className:"".concat(t,"-clear"),onMouseDown:r,customizeIcon:c},"\xD7")}};var iy=E(D()),t1=iy.createContext(null);function ay(){return iy.useContext(t1)}var Su=E(D());function r1(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,t=Su.useState(!1),r=V(t,2),n=r[0],o=r[1],i=Su.useRef(null),a=function(){window.clearTimeout(i.current)};Su.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 Ud=E(D());function qd(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,t=Ud.useRef(null),r=Ud.useRef(null);Ud.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(D());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(D()),dy=E(D());function Ak(e){return e&&![Qe.ESC,Qe.SHIFT,Qe.BACKSPACE,Qe.TAB,Qe.WIN_KEY,Qe.ALT,Qe.META,Qe.WIN_KEY_RIGHT,Qe.CTRL,Qe.SEMICOLON,Qe.EQUALS,Qe.CAPS_LOCK,Qe.CONTEXT_MENU,Qe.F1,Qe.F2,Qe.F3,Qe.F4,Qe.F5,Qe.F6,Qe.F7,Qe.F8,Qe.F9,Qe.F10,Qe.F11,Qe.F12].includes(e)}var _o=E(D()),a1=E(D()),rA=E(Ne());var Zo=E(D()),Xi=E(D()),Hk=E(Ne());var zl=E(D()),Mk=E(Ne());var PH=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],Cu=void 0;function TH(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,PH),d=a&&!g;function x(R){l(c,R)}zl.useEffect(function(){return function(){x(null)}},[]);var b=i&&o!==Cu?i(o,{index:h}):p,S;n||(S={opacity:d?0:1,height:d?0:Cu,overflowY:d?"hidden":Cu,order:a?h:Cu,pointerEvents:d?"none":Cu,position:d?"absolute":Cu});var w={};d&&(w["aria-hidden"]=!0);var C=zl.createElement(y,fe({className:(0,Mk.default)(!n&&r,u),style:T(T({},S),f)},w,m,{ref:t}),b);return a&&(C=zl.createElement(ro,{onResize:function(P){var O=P.offsetWidth;x(O)},disabled:s},C)),C}var Fk=zl.forwardRef(TH);Fk.displayName="Item";var wu=Fk;var ly=E(D()),Lk=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 zk(){var e=ly.useRef(null),t=function(n){e.current||(e.current=[],o1(function(){(0,Lk.unstable_batchedUpdates)(function(){e.current.forEach(function(o){o()}),e.current=null})})),e.current.push(n)};return t}function Wl(e,t){var r=ly.useState(t),n=V(r,2),o=n[0],i=n[1],a=wt(function(s){e(function(){i(s)})});return[o,a]}var js=E(D()),Bk=E(Ne());var Wk=E(D()),Bl=Wk.default.createContext(null);var NH=["component"],IH=["className"],DH=["className"],$H=function(t,r){var n=js.useContext(Bl);if(!n){var o=t.component,i=o===void 0?"div":o,a=Ve(t,NH);return js.createElement(i,fe({},a,{ref:r}))}var s=n.className,l=Ve(n,IH),c=t.className,u=Ve(t,DH);return js.createElement(Bl.Provider,{value:null},js.createElement(wu,fe({ref:r,className:(0,Bk.default)(s,c)},l,u)))},jk=js.forwardRef($H);jk.displayName="RawItem";var Vk=jk;var kH=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Uk="responsive",qk="invalidate";function AH(e){return"+ ".concat(e.length," ...")}function MH(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,kH),C=f==="full",R=zk(),P=Wl(R,null),O=V(P,2),A=O[0],M=O[1],F=A||0,H=Wl(R,new Map),j=V(H,2),I=j[0],N=j[1],$=Wl(R,0),U=V($,2),W=U[0],B=U[1],q=Wl(R,0),L=V(q,2),k=L[0],z=L[1],G=Wl(R,0),J=V(G,2),Y=J[0],X=J[1],ae=(0,Xi.useState)(null),Z=V(ae,2),K=Z[0],Q=Z[1],re=(0,Xi.useState)(null),ee=V(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=V(pe,2),Ce=Oe[0],$e=Oe[1],ce="".concat(n,"-item"),ie=Math.max(W,k),Re=h===Uk,Le=i.length&&Re,Ge=h===qk,Me=Le||typeof h=="number"&&i.length>h,Ie=(0,Xi.useMemo)(function(){var De=i;return Le?A===null&&C?De=i:De=i.slice(0,Math.min(i.length,F/u)):typeof h=="number"&&(De=i.slice(0,h)),De},[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(De,Ee){var be;return typeof l=="function"?l(De):(be=l&&De?.[l])!==null&&be!==void 0?be:Ee},[l]),He=(0,Xi.useCallback)(a||function(De){return De},[a]);function ye(De,Ee,be){ne===De&&(Ee===void 0||Ee===K)||(de(De),be||($e(DeF){ye(ht-1,De-Mt-Y+k);break}}m&&Ze(0)+Y>F&&Q(null)}},[F,I,k,Y,We,Ie]);var lt=Ce&&!!je.length,Et={};K!==null&&Le&&(Et={position:"absolute",left:K,top:0});var Tt={prefixCls:ce,responsive:Le,component:b,invalidate:Ge},pt=s?function(De,Ee){var be=We(De,Ee);return Zo.createElement(Bl.Provider,{key:be,value:T(T({},Tt),{},{order:Ee,item:De,itemKey:be,registerSize:xe,display:Ee<=le})},s(De,Ee))}:function(De,Ee){var be=We(De,Ee);return Zo.createElement(wu,fe({},Tt,{order:Ee,key:be,item:De,renderItem:He,itemKey:be,registerSize:xe,display:Ee<=le}))},ke={order:lt?le:Number.MAX_SAFE_INTEGER,className:"".concat(ce,"-rest"),registerSize:_e,display:lt},we=v||AH,et=y?Zo.createElement(Bl.Provider,{value:T(T({},Tt),ke)},y(je)):Zo.createElement(wu,fe({},Tt,ke),typeof we=="function"?we(je):we),Pe=Zo.createElement(x,fe({className:(0,Hk.default)(!Ge&&n,g),style:p,ref:t},w),Ie.map(pt),Me?et:null,m&&Zo.createElement(wu,fe({},Tt,{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 Gd=Zo.forwardRef(MH);Gd.displayName="Overflow";Gd.Item=Vk;Gd.RESPONSIVE=Uk;Gd.INVALIDATE=qk;var Gk=Gd;var Kk=Gk;var Eu=E(D()),Yk=E(Ne());function FH(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 $e=function(ie){ie&&ie.stopPropagation(),R(ee)};return typeof w=="function"?X(le,Oe,ne,pe,$e):Y(ee,Oe,ne,pe,$e)},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(z,"-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:M,onChange:P,onPaste:O,onCompositionStart:F,onCompositionEnd:H,onBlur:j,tabIndex:y,attrs:qo(t,!0)}),_o.createElement("span",{ref:I,className:"".concat(z,"-search-mirror"),"aria-hidden":!0},G,"\xA0")),Q=_o.createElement(Kk,{prefixCls:"".concat(z,"-overflow"),data:o,renderItem:ae,renderRest:Z,suffix:K,itemKey:jH,maxCount:d});return _o.createElement("span",{className:"".concat(z,"-wrap")},Q,!o.length&&!G&&_o.createElement("span",{className:"".concat(z,"-placeholder")},c))},nA=VH;var ei=E(D());var HH=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),M=V(A,2),F=M[0],H=M[1],j=u==="combobox",I=j||v,N=p[0],$=y||"";j&&m&&!F&&($=m),ei.useEffect(function(){j&&H(!1)},[j,m]);var U=u!=="combobox"&&!f&&!v?!1:!!$,W=O===void 0?uy(N):O,B=ei.useMemo(function(){return N?null:ei.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:U?{visibility:"hidden"}:void 0},g)},[N,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:I,activeDescendantId:c,value:$,onKeyDown:x,onMouseDown:b,onChange:function(L){H(!0),S(L)},onPaste:w,onCompositionStart:C,onCompositionEnd:R,onBlur:P,tabIndex:h,attrs:qo(t,!0),maxLength:j?d:void 0})),!j&&N?ei.createElement("span",{className:"".concat(n,"-selection-item"),title:W,style:U?{visibility:"hidden"}:void 0},N.label):null,B)},oA=HH;var UH=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(W){n.current.focus(W)},blur:function(){n.current.blur()}}});var x=qd(0),b=V(x,2),S=b[0],w=b[1],C=function(W){var B=W.which,q=n.current instanceof HTMLTextAreaElement;!q&&a&&(B===Qe.UP||B===Qe.DOWN)&&W.preventDefault(),y&&y(W),B===Qe.ENTER&&s==="tags"&&!o.current&&!a&&h?.(W.target.value),!(q&&!a&&~[Qe.UP,Qe.DOWN,Qe.LEFT,Qe.RIGHT].indexOf(B))&&Ak(B)&&v(!0)},R=function(){w(!0)},P=(0,dy.useRef)(null),O=function(W){g(W,!0,o.current)!==!1&&v(!0)},A=function(){o.current=!0},M=function(W){o.current=!1,s!=="combobox"&&O(W.target.value)},F=function(W){var B=W.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," ");B=B.replace(q,P.current)}P.current=null,O(B)},H=function(W){var B=W.clipboardData,q=B?.getData("text");P.current=q||""},j=function(W){var B=W.target;if(B!==n.current){var q=document.body.style.msTouchAction!==void 0;q?setTimeout(function(){n.current.focus()}):n.current.focus()}},I=function(W){var B=S();W.target!==n.current&&!B&&!(s==="combobox"&&u)&&W.preventDefault(),(s!=="combobox"&&(!l||!B)||!a)&&(a&&p!==!1&&g("",!0,!1),v())},N={inputRef:n,onInputKeyDown:C,onInputMouseDown:R,onInputChange:F,onInputPaste:H,onInputCompositionStart:A,onInputCompositionEnd:M,onInputBlur:m},$=s==="multiple"||s==="tags"?Aa.createElement(nA,fe({},t,N)):Aa.createElement(oA,fe({},t,N));return Aa.createElement("div",{ref:d,className:"".concat(i,"-selector"),onClick:j,onMouseDown:I},f&&Aa.createElement("div",{className:"".concat(i,"-prefix")},f),$)},qH=Aa.forwardRef(UH),iA=qH;var my=E(Ne());var xt=E(D());var uA=E(Ne());var ti=E(D());var aA=E(Ne()),py=E(D());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,aA.default)("".concat(t,"-arrow"),a),style:g},s)}var sA=E(Ne());var l1=E(D());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,sA.default)("".concat(t,"-mask"),s)})}):null}var lA=E(D()),GH=lA.memo(function(e){var t=e.children;return t},function(e,t){return t.cache}),cA=GH;var KH=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,M=e.offsetX,F=e.offsetY,H=e.offsetR,j=e.offsetB,I=e.onAlign,N=e.onPrepare,$=e.stretch,U=e.targetWidth,W=e.targetHeight,B=typeof r=="function"?r():r,q=l||c,L=x?.length>0,k=ti.useState(!x||!L),z=V(k,2),G=z[0],J=z[1];if(vt(function(){!G&&L&&a&&J(!0)},[G,L,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=M,X.right=Y),re?(X.bottom=j,X.top=Y):(X.top=F,X.bottom=Y)}var ee={};return $&&($.includes("height")&&W?ee.height=W:$.includes("minHeight")&&W&&(ee.minHeight=W),$.includes("width")&&U?ee.width=U:$.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:I,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:N,onEnterPrepare:N,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,uA.default)(o,pe,n);return ti.createElement("div",{ref:zr(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(cA,{cache:!l&&!u},B))})}))}),fA=KH;var Ru=E(D()),XH=Ru.forwardRef(function(e,t){var r=e.children,n=e.getTriggerDOMNode,o=bi(r),i=Ru.useCallback(function(s){gd(t,n?n(s):s)},[n]),a=xi(i,xs(r));return o?Ru.cloneElement(r,{ref:a}):r}),dA=XH;var pA=E(D()),YH=pA.createContext(null),u1=YH;var gA=E(D());function mA(e){return e?Array.isArray(e)?e:[e]:[]}function f1(e,t,r,n){return gA.useMemo(function(){var o=mA(r??t),i=mA(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 jl=E(D());function QH(){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 hA(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 Xd(e){return Ou(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=Vs(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=Xd(s),m=Xd(l),d=Xd(c),x=Xd(u),b=Ou(Math.round(f.width/h*1e3)/1e3),S=Ou(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,M=0,F=0;if(i==="clip"){var H=Xd(a);M=H*b,F=H*S}var j=f.x+O-M,I=f.y+R-F,N=j+f.width+2*M-O-A-w,$=I+f.height+2*F-R-P-C;r.left=Math.max(r.left,j),r.top=Math.max(r.top,I),r.right=Math.min(r.right,N),r.bottom=Math.min(r.bottom,$)}}),r}function vA(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 yA(e,t){var r=t||[],n=V(r,2),o=n[0],i=n[1];return[vA(e.width,o),vA(e.height,i)]}function xA(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[e[0],e[1]]}function _u(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 Hs(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=jl.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:o[n]||{}}),l=V(s,2),c=l[0],u=l[1],f=jl.useRef(0),p=jl.useMemo(function(){return t?Yd(t):[]},[t]),g=jl.useRef({}),h=function(){g.current={}};e||h();var v=wt(function(){if(t&&r&&e){let Ln=function(ic,qa){var ac=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ie,Np=k.x+ic,Ip=k.y+qa,V0=Np+Q,Je=Ip+K,ct=Math.max(Np,ac.left),hr=Math.max(Ip,ac.top),Fr=Math.min(V0,ac.right),vr=Math.min(Je,ac.bottom);return Math.max(0,(Fr-ct)*(vr-hr))},oc=function(){rr=k.y+be,pr=rr+K,mr=k.x+Ee,An=mr+Q};var gR=Ln,hR=oc,d,x,b,S,w=t,C=w.ownerDocument,R=Vs(w),P=R.getComputedStyle(w),O=P.width,A=P.height,M=P.position,F=w.style.left,H=w.style.top,j=w.style.right,I=w.style.bottom,N=w.style.overflow,$=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=M,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 W;if(Array.isArray(r))W={x:r[0],y:r[1],width:0,height:0};else{var B,q,L=r.getBoundingClientRect();L.x=(B=L.x)!==null&&B!==void 0?B:L.left,L.y=(q=L.y)!==null&&q!==void 0?q:L.top,W={x:L.x,y:L.y,width:L.width,height:L.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 z=C.documentElement,G=z.clientWidth,J=z.clientHeight,Y=z.scrollWidth,X=z.scrollHeight,ae=z.scrollTop,Z=z.scrollLeft,K=k.height,Q=k.width,re=W.height,ee=W.width,ne={left:0,top:0,right:G,bottom:J},de={left:-Z,top:-ae,right:Y-Z,bottom:X-ae},le=$.htmlRegion,pe="visible",Oe="visibleFirst";le!=="scroll"&&le!==Oe&&(le=pe);var Ce=le===Oe,$e=p1(de,p),ce=p1(ne,p),ie=le===pe?ce:$e,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=F,w.style.top=H,w.style.right=j,w.style.bottom=I,w.style.overflow=N,(S=w.parentElement)===null||S===void 0||S.removeChild(U);var Ge=Ou(Math.round(Q/parseFloat(O)*1e3)/1e3),Me=Ou(Math.round(K/parseFloat(A)*1e3)/1e3);if(Ge===0||Me===0||Cl(r)&&!wv(r))return;var Ie=$.offset,je=$.targetOffset,We=yA(k,Ie),He=V(We,2),ye=He[0],se=He[1],xe=yA(W,je),_e=V(xe,2),he=_e[0],Ze=_e[1];W.x-=he,W.y-=Ze;var lt=$.points||[],Et=V(lt,2),Tt=Et[0],pt=Et[1],ke=xA(pt),we=xA(Tt),et=_u(W,ke),Pe=_u(k,we),De=T({},$),Ee=et.x-Pe.x+ye,be=et.y-Pe.y+se,ht=Ln(Ee,be),Mt=Ln(Ee,be,ce),Fe=_u(W,["t","l"]),Se=_u(k,["t","l"]),Ke=_u(W,["b","r"]),Be=_u(k,["b","r"]),ze=$.overflow||{},tt=ze.adjustX,At=ze.adjustY,Nt=ze.shiftX,tr=ze.shiftY,Ft=function(qa){return typeof qa=="boolean"?qa:qa>=0},rr,pr,mr,An;oc();var gr=Ft(At),Lt=we[0]===ke[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),Ae=Ln(Ee,Te,ce);Ue>ht||Ue===ht&&(!Ce||Ae>=Mt)?(g.current.bt=!0,be=Te,se=-se,De.points=[Hs(we,0),Hs(ke,0)]):g.current.bt=!1}if(gr&&we[0]==="b"&&(rrht||nt===ht&&(!Ce||It>=Mt)?(g.current.tb=!0,be=ve,se=-se,De.points=[Hs(we,0),Hs(ke,0)]):g.current.tb=!1}var Dt=Ft(tt),mn=we[1]===ke[1];if(Dt&&we[1]==="l"&&(An>Re.right||g.current.rl)){var Ar=Ee;mn?Ar-=Q-ee:Ar=Fe.x-Be.x-ye;var jr=Ln(Ar,be),Pr=Ln(Ar,be,ce);jr>ht||jr===ht&&(!Ce||Pr>=Mt)?(g.current.rl=!0,Ee=Ar,ye=-ye,De.points=[Hs(we,1),Hs(ke,1)]):g.current.rl=!1}if(Dt&&we[1]==="r"&&(mrht||Xn===ht&&(!Ce||Mn>=Mt)?(g.current.lr=!0,Ee=Vr,ye=-ye,De.points=[Hs(we,1),Hs(ke,1)]):g.current.lr=!1}oc();var tn=Nt===!0?0:Nt;typeof tn=="number"&&(mrce.right&&(Ee-=An-ce.right-ye,W.x>ce.right-tn&&(Ee+=W.x-ce.right+tn)));var wn=tr===!0?0:tr;typeof wn=="number"&&(rrce.bottom&&(be-=pr-ce.bottom-se,W.y>ce.bottom-wn&&(be+=W.y-ce.bottom+wn)));var Va=k.x+Ee,Ha=Va+Q,No=k.y+be,nc=No+K,Ua=W.x,St=Ua+ee,ft=W.y,rn=ft+re,nn=Math.max(Va,Ua),Sr=Math.min(Ha,St),Mr=(nn+Sr)/2,po=Mr-Va,Yn=Math.max(No,ft),Io=Math.min(nc,rn),Di=(Yn+Io)/2,li=Di-No;a?.(t,De);var $i=Le.right-k.x-(Ee+k.width),Fn=Le.bottom-k.y-(be+k.height);Ge===1&&(Ee=Math.round(Ee),$i=Math.round($i)),Me===1&&(be=Math.round(be),Fn=Math.round(Fn));var j0={ready:!0,offsetX:Ee/Ge,offsetY:be/Me,offsetR:$i/Ge,offsetB:Fn/Me,arrowX:po/Ge,arrowY:li/Me,scaleX:Ge,scaleY:Me,align:De};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=Yd(i),l=Yd(a),c=Vs(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 Qd=E(D());function h1(e,t,r,n,o,i,a,s){var l=Qd.useRef(e);l.current=e;var c=Qd.useRef(!1);Qd.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=Vs(n);g.addEventListener("pointerdown",f,!0),g.addEventListener("mousedown",p,!0),g.addEventListener("contextmenu",p,!0);var h=Dl(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 JH=["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 ZH(){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,M=r.popupClassName,F=r.popupStyle,H=r.popupPlacement,j=r.builtinPlacements,I=j===void 0?{}:j,N=r.popupAlign,$=r.zIndex,U=r.stretch,W=r.getPopupClassNameFromAlign,B=r.fresh,q=r.alignPoint,L=r.onPopupClick,k=r.onPopupAlign,z=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,JH),ee=P||O||!1,ne=xt.useState(!1),de=V(ne,2),le=de[0],pe=de[1];vt(function(){pe(bu())},[]);var Oe=xt.useRef({}),Ce=xt.useContext(u1),$e=xt.useMemo(function(){return{registerSubPopup:function(ct,hr){Oe.current[ct]=hr,Ce?.registerSubPopup(ct,hr)}}},[Ce]),ce=Uv(),ie=xt.useState(null),Re=V(ie,2),Le=Re[0],Ge=Re[1],Me=xt.useRef(null),Ie=wt(function(Je){Me.current=Je,Cl(Je)&&Le!==Je&&Ge(Je),Ce?.registerSubPopup(ce,Je)}),je=xt.useState(null),We=V(je,2),He=We[0],ye=We[1],se=xt.useRef(null),xe=wt(function(Je){Cl(Je)&&He!==Je&&(ye(Je),se.current=Je)}),_e=xt.Children.only(a),he=_e?.props||{},Ze={},lt=wt(function(Je){var ct,hr,Fr=He;return Fr?.contains(Je)||((ct=Dl(Fr))===null||ct===void 0?void 0:ct.host)===Je||Je===Fr||Le?.contains(Je)||((hr=Dl(Le))===null||hr===void 0?void 0:hr.host)===Je||Je===Le||Object.values(Oe.current).some(function(vr){return vr?.contains(Je)||Je===vr})}),Et=d1(i,G,X,Y),Tt=d1(i,J,Z,ae),pt=xt.useState(p||!1),ke=V(pt,2),we=ke[0],et=ke[1],Pe=f??we,De=wt(function(Je){f===void 0&&et(Je)});vt(function(){et(f||!1)},[f]);var Ee=xt.useRef(Pe);Ee.current=Pe;var be=xt.useRef([]);be.current=[];var ht=wt(function(Je){var ct;De(Je),((ct=be.current[be.current.length-1])!==null&&ct!==void 0?ct:Pe)!==Je&&(be.current.push(Je),g?.(Je))}),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=V(Ke,2),ze=Be[0],tt=Be[1];vt(function(Je){(!Je||Pe)&&tt(!0)},[Pe]);var At=xt.useState(null),Nt=V(At,2),tr=Nt[0],Ft=Nt[1],rr=xt.useState(null),pr=V(rr,2),mr=pr[0],An=pr[1],gr=function(ct){An([ct.clientX,ct.clientY])},Lt=m1(Pe,Le,q&&mr!==null?mr:He,H,I,N,k),Te=V(Lt,11),Ue=Te[0],Ae=Te[1],ve=Te[2],nt=Te[3],It=Te[4],Dt=Te[5],mn=Te[6],Ar=Te[7],jr=Te[8],Pr=Te[9],Vr=Te[10],Xn=f1(le,l,c,u),Mn=V(Xn,2),tn=Mn[0],wn=Mn[1],Va=tn.has("click"),Ha=wn.has("click")||wn.has("contextMenu"),No=wt(function(){ze||Vr()}),nc=function(){Ee.current&&q&&Ha&&Se(!1)};g1(Pe,He,Le,No,nc),vt(function(){No()},[mr,H]),vt(function(){Pe&&!(I!=null&&I[H])&&No()},[JSON.stringify(N)]);var Ua=xt.useMemo(function(){var Je=hA(I,i,Pr,q);return(0,my.default)(Je,W?.(Pr))},[Pr,W,I,i,q]);xt.useImperativeHandle(n,function(){return{nativeElement:se.current,popupElement:Me.current,forceAlign:No}});var St=xt.useState(0),ft=V(St,2),rn=ft[0],nn=ft[1],Sr=xt.useState(0),Mr=V(Sr,2),po=Mr[0],Yn=Mr[1],Io=function(){if(U&&He){var ct=He.getBoundingClientRect();nn(ct.width),Yn(ct.height)}},Di=function(){Io(),No()},li=function(ct){tt(!1),Vr(),h?.(ct)},$i=function(){return new Promise(function(ct){Io(),Ft(function(){return ct})})};vt(function(){tr&&(Vr(),tr(),Ft(null))},[tr]);function Fn(Je,ct,hr,Fr){Ze[Je]=function(vr){var Dp;Fr?.(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:CA(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:CA(g,o.length),group:!0,data:g,label:v}),u(g[l],!0)}})}return u(e,!1),o}function Zd(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 EA=function(t,r,n){if(!r||!r.length)return null;var o=!1,i=function s(l,c){var u=Rh(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 RA=E(D()),o9=RA.createContext(null),Pu=o9;var OA=E(D());function y1(e){var t=e.visible,r=e.values;if(!t)return null;var n=50;return OA.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 i9=["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"],a9=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],ep=function(t){return t==="tags"||t==="multiple"},s9=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,M=e.autoClearSearchValue,F=e.onSearch,H=e.onSearchSplit,j=e.tokenSeparators,I=e.allowClear,N=e.prefix,$=e.suffixIcon,U=e.clearIcon,W=e.OptionList,B=e.animation,q=e.transitionName,L=e.dropdownStyle,k=e.dropdownClassName,z=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,i9),pe=ep(y),Oe=(a!==void 0?a:pe)||y==="combobox",Ce=T({},le);a9.forEach(function(St){delete Ce[St]}),c?.forEach(function(St){delete Ce[St]});var $e=bt.useState(!1),ce=V($e,2),ie=ce[0],Re=ce[1];bt.useEffect(function(){Re(bu())},[]);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=V(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(nn){var Sr;return(Sr=je.current)===null||Sr===void 0?void 0:Sr.scrollTo(nn)},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]),Ze=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),Tt=bt.useState(!1),pt=V(Tt,2),ke=pt[0],we=pt[1];vt(function(){we(!0)},[]);var et=ar(!1,{defaultValue:w,value:S}),Pe=V(et,2),De=Pe[0],Ee=Pe[1],be=ke?De:!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(j||[]).some(function(St){return[` `,`\r -`].includes(St)})},[k]),Ke=bt.useContext(Tu)||{},Be=Ke.maxCount,ze=Ke.rawValues,tt=function(ft,rn,nn){if(!(pe&&ep(Be)&&ze?.size>=Be)){var Sr=!0,Mr=ft;P?.(null);var mo=Ik(ft,k,ep(Be)?Be-ze.size:void 0),Qn=nn?null:mo;return y!=="combobox"&&Qn&&(Mr="",F?.(Qn),Fe(!1),Sr=!1),$&&he!==Mr&&$(Mr,{source:rn?"typing":"effect"}),Sr}},kt=function(ft){!ft||!ft.trim()||$(ft,{source:"submit"})};bt.useEffect(function(){!be&&!pe&&y!=="combobox"&&tt("",!1,!1)},[be]),bt.useEffect(function(){De&&g&&Ee(!1),g&&!We.current&&xe(!1)},[g]);var Nt=Kd(),tr=M(Nt,2),Ft=tr[0],rr=tr[1],pr=bt.useRef(!1),mr=function(ft){var rn=Ft(),nn=ft.key,Sr=nn==="Enter";if(Sr&&(y!=="combobox"&&ft.preventDefault(),be||Fe(!0)),rr(!!he),nn==="Backspace"&&!rn&&pe&&!he&&u.length){for(var Mr=ee(u),mo=null,Qn=Mr.length-1;Qn>=0;Qn-=1){var Do=Mr[Qn];if(!Do.disabled){Mr.splice(Qn,1),mo=Do;break}}mo&&f(Mr,{type:"remove",values:[mo]})}for(var $i=arguments.length,ci=new Array($i>1?$i-1:0),Ai=1;Ai<$i;Ai++)ci[Ai-1]=arguments[Ai];if(be&&(!Sr||!pr.current)){var Ln;Sr&&(pr.current=!0),(Ln=je.current)===null||Ln===void 0||Ln.onKeyDown.apply(Ln,[ft].concat(ci))}re?.apply(void 0,[ft].concat(ci))},Mn=function(ft){for(var rn=arguments.length,nn=new Array(rn>1?rn-1:0),Sr=1;Sr1?mo-1:0),Do=1;Do"u"?"undefined":fe(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),T1=g9;var Cy=E(N()),wy=function(e,t,r,n){var o=(0,Cy.useRef)(!1),i=(0,Cy.useRef)(null);function a(){clearTimeout(i.current),o.current=!0,i.current=setTimeout(function(){o.current=!1},50)}var s=(0,Cy.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 N1(e,t,r,n,o,i,a){var s=(0,Vl.useRef)(0),l=(0,Vl.useRef)(null),c=(0,Vl.useRef)(null),u=(0,Vl.useRef)(!1),f=wy(t,r,n,o);function d(p,x){if(dt.cancel(l.current),!f(!1,x)){var b=p;if(!b._virtualHandled)b._virtualHandled=!0;else return;s.current+=x,c.current=x,T1||b.preventDefault(),l.current=dt(function(){var S=u.current?10:1;a(s.current*S,!1),s.current=0})}}function m(p,x){a(x,!0),T1||p.preventDefault()}var h=(0,Vl.useRef)(null),v=(0,Vl.useRef)(null);function y(p){if(e){dt.cancel(v.current),v.current=dt(function(){h.current=null},2);var x=p.deltaX,b=p.deltaY,S=p.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"?d(p,C):m(p,w)}}function g(p){e&&(u.current=p.detail===c.current)}return[y,g]}var jk=E(N());function Vk(e,t,r,n){var o=jk.useMemo(function(){return[new Map,[]]},[e,r.id,n]),i=M(o,2),a=i[0],s=i[1],l=function(u){var f=arguments.length>1&&arguments[1]!==void 0?arguments[1]:u,d=a.get(u),m=a.get(f);if(d===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 b=p.offsetHeight,S=getComputedStyle(p),w=S.marginTop,C=S.marginBottom,R=Uk(w),P=Uk(C),O=b+R+P;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 d(m,h){var v=e(m),y=s.current.get(v);h?(s.current.set(v,h),f()):s.current.delete(v),!y!=!h&&(h?t?.(m):r?.(m))}return(0,Iu.useEffect)(function(){return u},[]),[d,f,l.current,i]}var Du=E(N()),Gk=14/15;function D1(e,t,r){var n=(0,Du.useRef)(!1),o=(0,Du.useRef)(0),i=(0,Du.useRef)(0),a=(0,Du.useRef)(null),s=(0,Du.useRef)(null),l,c=function(m){if(n.current){var h=Math.ceil(m.touches[0].pageX),v=Math.ceil(m.touches[0].pageY),y=o.current-h,g=i.current-v,p=Math.abs(y)>Math.abs(g);p?o.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*=Gk:g*=Gk;var b=Math.floor(p?y:g);(!r(p,b,!0)||Math.abs(b)<=.1)&&clearInterval(s.current)},16))}},u=function(){n.current=!1,l()},f=function(m){l(),m.touches.length===1&&!n.current&&(n.current=!0,o.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))},vt(function(){return e&&t.current.addEventListener("touchstart",f,{passive:!0}),function(){var d;(d=t.current)===null||d===void 0||d.removeEventListener("touchstart",f),l(),clearInterval(s.current)}},[e])}var Xk=E(N());function Kk(e){return Math.floor(Math.pow(e,.5))}function Ey(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){Xk.useEffect(function(){var n=t.current;if(e&&n){var o=!1,i,a,s=function(){dt.cancel(i)},l=function d(){s(),i=dt(function(){r(a),d()})},c=function(m){if(!(m.target.draggable||m.button!==0)){var h=m;h._virtualHandled||(h._virtualHandled=!0,o=!0)}},u=function(){o=!1,s()},f=function(m){if(o){var h=Ey(m,!1),v=n.getBoundingClientRect(),y=v.top,g=v.bottom;if(h<=y){var p=y-h;a=-Kk(p),l()}else if(h>=g){var x=h-g;a=Kk(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 Ry=E(N());var v9=10;function A1(e,t,r,n,o,i,a,s){var l=Ry.useRef(),c=Ry.useState(null),u=M(c,2),f=u[0],d=u[1];return vt(function(){if(f&&f.times=0;F-=1){var k=o(t[F]),z=r.get(k);if(z===void 0){p=!0;break}if($-=z,$<=0)break}switch(S){case"top":b=C-y;break;case"bottom":b=R-g+y;break;default:{var B=e.current.scrollTop,j=B+g;Cj&&(x="bottom")}}b!==null&&a(b),b!==f.lastTop&&(p=!0)}p&&d(T(T({},f),{},{times:f.times+1,targetAlign:x,lastTop:b}))}},[f,e.current]),function(m){if(m==null){s();return}if(dt.cancel(l.current),typeof m=="number")a(m);else if(m&&fe(m)==="object"){var h,v=m.align;"index"in m?h=m.index:h=t.findIndex(function(p){return o(p)===m.key});var y=m.offset,g=y===void 0?0:y;d({times:0,index:h,offset:g,originAlign:v})}}}var k1=E(Ne());var ur=E(N());var y9=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,d=e.style,m=e.thumbStyle,h=e.showScrollBar,v=ur.useState(!1),y=M(v,2),g=y[0],p=y[1],x=ur.useState(null),b=M(x,2),S=b[0],w=b[1],C=ur.useState(null),R=M(C,2),P=R[0],O=R[1],I=!n,D=ur.useRef(),$=ur.useRef(),F=ur.useState(h),k=M(F,2),z=k[0],B=k[1],j=ur.useRef(),G=function(){h===!0||h===!1||(clearTimeout(j.current),B(!0),j.current=setTimeout(function(){B(!1)},3e3))},V=i-f||0,H=f-u||0,K=ur.useMemo(function(){if(o===0||V===0)return 0;var J=o/V;return J*H},[o,V,H]),W=function(U){U.stopPropagation(),U.preventDefault()},A=ur.useRef({top:K,dragging:g,pageY:S,startTop:P});A.current={top:K,dragging:g,pageY:S,startTop:P};var L=function(U){p(!0),w(Ey(U,c)),O(A.current.top),a(),U.stopPropagation(),U.preventDefault()};ur.useEffect(function(){var J=function(Z){Z.preventDefault()},U=D.current,Q=$.current;return U.addEventListener("touchstart",J,{passive:!1}),Q.addEventListener("touchstart",L,{passive:!1}),function(){U.removeEventListener("touchstart",J),Q.removeEventListener("touchstart",L)}},[]);var q=ur.useRef();q.current=V;var ne=ur.useRef();ne.current=H,ur.useEffect(function(){if(g){var J,U=function(Z){var re=A.current,de=re.dragging,le=re.pageY,pe=re.startTop;dt.cancel(J);var Oe=D.current.getBoundingClientRect(),Ce=f/(c?Oe.width:Oe.height);if(de){var $e=(Ey(Z,c)-le)*Ce,ce=pe;!I&&c?ce-=$e:ce+=$e;var ie=q.current,Re=ne.current,Le=Re?ce/Re:0,Ge=Math.ceil(Le*ie);Ge=Math.max(Ge,0),Ge=Math.min(Ge,ie),J=dt(function(){l(Ge,c)})}},Q=function(){p(!1),s()};return window.addEventListener("mousemove",U,{passive:!0}),window.addEventListener("touchmove",U,{passive:!0}),window.addEventListener("mouseup",Q,{passive:!0}),window.addEventListener("touchend",Q,{passive:!0}),function(){window.removeEventListener("mousemove",U),window.removeEventListener("touchmove",U),window.removeEventListener("mouseup",Q),window.removeEventListener("touchend",Q),dt.cancel(J)}}},[g]),ur.useEffect(function(){return G(),function(){clearTimeout(j.current)}},[o]),ur.useImperativeHandle(t,function(){return{delayHidden:G}});var Y="".concat(r,"-scrollbar"),X={position:"absolute",visibility:z?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,I?ae.left=K:ae.right=K):(X.width=8,X.top=0,X.bottom=0,I?X.right=0:X.left=0,ae.width="100%",ae.height=u,ae.top=K),ur.createElement("div",{ref:D,className:(0,k1.default)(Y,_(_(_({},"".concat(Y,"-horizontal"),c),"".concat(Y,"-vertical"),!c),"".concat(Y,"-visible"),z)),style:T(T({},X),d),onMouseDown:W,onMouseMove:G},ur.createElement("div",{ref:$,className:(0,k1.default)("".concat(Y,"-thumb"),_({},"".concat(Y,"-thumb-moving"),g)),style:T(T({},ae),m),onMouseDown:L}))}),M1=y9;var x9=20;function F1(){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,x9),Math.floor(r)}var b9=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],S9=[],C9={overflowY:"auto",overflowAnchor:"none"};function w9(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,d=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,b=e.onVisibleChange,S=e.innerProps,w=e.extraRender,C=e.styles,R=e.showScrollBar,P=R===void 0?"optional":R,O=Ve(e,b9),I=Ar.useCallback(function(Te){return typeof d=="function"?d(Te):Te?.[d]},[d]),D=I1(I,null,null),$=M(D,4),F=$[0],k=$[1],z=$[2],B=$[3],j=!!(m!==!1&&i&&a),G=Ar.useMemo(function(){return Object.values(z.maps).reduce(function(Te,Ue){return Te+Ue},0)},[z.id,z.maps]),V=j&&u&&(Math.max(a*u.length,G)>i||!!v),H=h==="rtl",K=(0,Yk.default)(n,_({},"".concat(n,"-rtl"),H),o),W=u||S9,A=(0,co.useRef)(),L=(0,co.useRef)(),q=(0,co.useRef)(),ne=(0,co.useState)(0),Y=M(ne,2),X=Y[0],ae=Y[1],J=(0,co.useState)(0),U=M(J,2),Q=U[0],te=U[1],Z=(0,co.useState)(!1),re=M(Z,2),de=re[0],le=re[1],pe=function(){le(!0)},Oe=function(){le(!1)},Ce={getKey:I};function $e(Te){ae(function(Ue){var ke;typeof Te=="function"?ke=Te(Ue):ke=Te;var ve=we(ke);return A.current.scrollTop=ve,ve})}var ce=(0,co.useRef)({start:0,end:W.length}),ie=(0,co.useRef)(),Re=P1(W,I),Le=M(Re,1),Ge=Le[0];ie.current=Ge;var Me=Ar.useMemo(function(){if(!j)return{scrollHeight:void 0,start:0,end:W.length-1,offset:void 0};if(!V){var Te;return{scrollHeight:((Te=L.current)===null||Te===void 0?void 0:Te.offsetHeight)||0,start:0,end:W.length-1,offset:void 0}}for(var Ue=0,ke,ve,nt,It=W.length,Dt=0;Dt=X&&ke===void 0&&(ke=Dt,ve=Ue),Pr>X+i&&nt===void 0&&(nt=Dt),Ue=Pr}return ke===void 0&&(ke=0,ve=0,nt=Math.ceil(i/a)),nt===void 0&&(nt=W.length-1),nt=Math.min(nt+1,W.length-1),{scrollHeight:Ue,start:ke,end:nt,offset:ve}},[V,j,X,W,B,i]),Ie=Me.scrollHeight,je=Me.start,We=Me.end,He=Me.offset;ce.current.start=je,ce.current.end=We,Ar.useLayoutEffect(function(){var Te=z.getRecord();if(Te.size===1){var Ue=Array.from(Te)[0],ke=W[je];if(ke){var ve=I(ke);if(ve===Ue){var nt=z.get(Ue),It=nt-a;$e(function(Dt){return Dt+It})}}}z.resetRecord()},[Ie]);var ye=Ar.useState({width:0,height:i}),se=M(ye,2),xe=se[0],_e=se[1],he=function(Ue){_e({width:Ue.offsetWidth,height:Ue.offsetHeight})},Ze=(0,co.useRef)(),lt=(0,co.useRef)(),Rt=Ar.useMemo(function(){return F1(xe.width,v)},[xe.width,v]),Tt=Ar.useMemo(function(){return F1(xe.height,Ie)},[xe.height,Ie]),pt=Ie-i,Ae=(0,co.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,De=Q<=0,Ee=Q>=v,be=wy(et,Pe,De,Ee),ht=function(){return{x:H?-Q:Q,y:X}},Mt=(0,co.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,L1.flushSync)(function(){te(ke)}),Fe()):$e(ke)}function Ke(Te){var Ue=Te.currentTarget.scrollTop;Ue!==X&&$e(Ue),p?.(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,L1.flushSync)(function(){te(function(ke){var ve=ke+(H?-Te:Te);return Be(ve)})}),Fe()):$e(function(ke){var ve=ke+Te;return ve})}),tt=N1(j,et,Pe,De,Ee,!!v,ze),kt=M(tt,2),Nt=kt[0],tr=kt[1];D1(j,A,function(Te,Ue,ke,ve){var nt=ve;return be(Te,Ue,ke)?!1:!nt||!nt._virtualHandled?(nt&&(nt._virtualHandled=!0),Nt({preventDefault:function(){},deltaX:Te?Ue:0,deltaY:Te?0:Ue}),!0):!1}),$1(V,A,function(Te){$e(function(Ue){return Ue+Te})}),vt(function(){function Te(ke){var ve=et&&ke.detail<0,nt=Pe&&ke.detail>0;j&&!ve&&!nt&&ke.preventDefault()}var Ue=A.current;return Ue.addEventListener("wheel",Nt,{passive:!1}),Ue.addEventListener("DOMMouseScroll",tr,{passive:!0}),Ue.addEventListener("MozMousePixelScroll",Te,{passive:!1}),function(){Ue.removeEventListener("wheel",Nt),Ue.removeEventListener("DOMMouseScroll",tr),Ue.removeEventListener("MozMousePixelScroll",Te)}},[j,et,Pe]),vt(function(){if(v){var Te=Be(Q);te(Te),Fe({x:Te})}},[xe.width,v]);var Ft=function(){var Ue,ke;(Ue=Ze.current)===null||Ue===void 0||Ue.delayHidden(),(ke=lt.current)===null||ke===void 0||ke.delayHidden()},rr=A1(A,W,z,a,I,function(){return k(!0)},$e,Ft);Ar.useImperativeHandle(t,function(){return{nativeElement:q.current,getScrollInfo:ht,scrollTo:function(Ue){function ke(ve){return ve&&fe(ve)==="object"&&("left"in ve||"top"in ve)}ke(Ue)?(Ue.left!==void 0&&te(Be(Ue.left)),rr(Ue.top)):rr(Ue)}}}),vt(function(){if(b){var Te=W.slice(je,We+1);b(Te,W)}},[je,We,W]);var pr=Vk(W,I,z,a),mr=w?.({start:je,end:We,virtual:V,offsetX:Q,offsetY:He,rtl:H,getSize:pr}),Mn=_1(W,je,We,v,Q,F,f,Ce),gr=null;i&&(gr=T(_({},l?"height":"maxHeight",i),C9),j&&(gr.overflowY="hidden",v&&(gr.overflowX="hidden"),de&&(gr.pointerEvents="none")));var Lt={};return H&&(Lt.dir="rtl"),Ar.createElement("div",ue({ref:q,style:T(T({},c),{},{position:"relative"}),className:K},Lt,O),Ar.createElement(no,{onResize:he},Ar.createElement(g,{className:"".concat(n,"-holder"),style:gr,ref:A,onScroll:Ke,onMouseEnter:Ft},Ar.createElement(Lk,{prefixCls:n,height:Ie,offsetX:Q,offsetY:He,scrollWidth:v,onInnerResize:k,ref:L,innerProps:S,rtl:H,extra:mr},Mn))),V&&Ie>i&&Ar.createElement(M1,{ref:Ze,prefixCls:n,scrollOffset:X,scrollRange:Ie,rtl:H,onScroll:Se,onStartMove:pe,onStopMove:Oe,spinSize:Tt,containerSize:xe.height,style:C?.verticalScrollBar,thumbStyle:C?.verticalScrollBarThumb,showScrollBar:P}),V&&v>xe.width&&Ar.createElement(M1,{ref:lt,prefixCls:n,scrollOffset:Q,scrollRange:v,rtl:H,onScroll:Se,onStartMove:pe,onStopMove:Oe,spinSize:Rt,containerSize:xe.width,horizontal:!0,style:C?.horizontalScrollBar,thumbStyle:C?.horizontalScrollBarThumb,showScrollBar:P}))}var Qk=Ar.forwardRef(w9);Qk.displayName="List";var Jk=Qk;var Zk=Jk;var Ut=E(N()),W1=E(N());function eM(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var E9=["disabled","title","children","style","className"];function tM(e){return typeof e=="string"||typeof e=="number"}var R9=function(t,r){var n=fy(),o=n.prefixCls,i=n.id,a=n.open,s=n.multiple,l=n.mode,c=n.searchValue,u=n.toggleOpen,f=n.notFoundContent,d=n.onPopupScroll,m=Ut.useContext(Tu),h=m.maxCount,v=m.flattenOptions,y=m.onActiveValue,g=m.defaultActiveFirstOption,p=m.onSelect,x=m.menuItemSelectedIcon,b=m.rawValues,S=m.fieldNames,w=m.virtual,C=m.direction,R=m.listHeight,P=m.listItemHeight,O=m.optionRender,I="".concat(o,"-item"),D=Ui(function(){return v},[a,v],function(J,U){return U[0]&&J[1]!==U[1]}),$=Ut.useRef(null),F=Ut.useMemo(function(){return s&&ep(h)&&b?.size>=h},[s,h,b?.size]),k=function(U){U.preventDefault()},z=function(U){var Q;(Q=$.current)===null||Q===void 0||Q.scrollTo(typeof U=="number"?{index:U}:U)},B=Ut.useCallback(function(J){return l==="combobox"?!1:b.has(J)},[l,ee(b).toString(),b.size]),j=function(U){for(var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,te=D.length,Z=0;Z1&&arguments[1]!==void 0?arguments[1]:!1;K(U);var te={source:Q?"keyboard":"mouse"},Z=D[U];if(!Z){y(null,-1,te);return}y(Z.value,U,te)};(0,W1.useEffect)(function(){W(g!==!1?j(0):-1)},[D.length,c]);var A=Ut.useCallback(function(J){return l==="combobox"?String(J).toLowerCase()===c.toLowerCase():b.has(J)},[l,c,ee(b).toString(),b.size]);(0,W1.useEffect)(function(){var J=setTimeout(function(){if(!s&&a&&b.size===1){var Q=Array.from(b)[0],te=D.findIndex(function(Z){var re=Z.data;return c?String(re.value).startsWith(c):re.value===Q});te!==-1&&(W(te),z(te))}});if(a){var U;(U=$.current)===null||U===void 0||U.scrollTo(void 0)}return function(){return clearTimeout(J)}},[a,c]);var L=function(U){U!==void 0&&p(U,{selected:!b.has(U)}),s||u(!1)};if(Ut.useImperativeHandle(r,function(){return{onKeyDown:function(U){var Q=U.which,te=U.ctrlKey;switch(Q){case Qe.N:case Qe.P:case Qe.UP:case Qe.DOWN:{var Z=0;if(Q===Qe.UP?Z=-1:Q===Qe.DOWN?Z=1:eM()&&te&&(Q===Qe.N?Z=1:Q===Qe.P&&(Z=-1)),Z!==0){var re=j(H+Z,Z);z(re),W(re,!0)}break}case Qe.TAB:case Qe.ENTER:{var de,le=D[H];le&&!(le!=null&&(de=le.data)!==null&&de!==void 0&&de.disabled)&&!F?L(le.value):L(void 0),a&&U.preventDefault();break}case Qe.ESC:u(!1),a&&U.stopPropagation()}},onKeyUp:function(){},scrollTo:function(U){z(U)}}}),D.length===0)return Ut.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(I,"-empty"),onMouseDown:k},f);var q=Object.keys(S).map(function(J){return S[J]}),ne=function(U){return U.label};function Y(J,U){var Q=J.group;return{role:Q?"presentation":"option",id:"".concat(i,"_list_").concat(U)}}var X=function(U){var Q=D[U];if(!Q)return null;var te=Q.data||{},Z=te.value,re=Q.group,de=Go(te,!0),le=ne(Q);return Q?Ut.createElement("div",ue({"aria-label":typeof le=="string"&&!re?le:null},de,{key:U},Y(Q,U),{"aria-selected":A(Z)}),Z):null},ae={role:"listbox",id:"".concat(i,"_list")};return Ut.createElement(Ut.Fragment,null,w&&Ut.createElement("div",ue({},ae,{style:{height:0,width:0,overflow:"hidden"}}),X(H-1),X(H),X(H+1)),Ut.createElement(Zk,{itemKey:"key",ref:$,data:D,height:R,itemHeight:P,fullHeight:!1,onMouseDown:k,onScroll:d,virtual:w,direction:C,innerProps:w?null:ae},function(J,U){var Q=J.group,te=J.groupOption,Z=J.data,re=J.label,de=J.value,le=Z.key;if(Q){var pe,Oe=(pe=Z.title)!==null&&pe!==void 0?pe:tM(re)?re.toString():void 0;return Ut.createElement("div",{className:(0,z1.default)(I,"".concat(I,"-group"),Z.className),title:Oe},re!==void 0?re:le)}var Ce=Z.disabled,$e=Z.title,ce=Z.children,ie=Z.style,Re=Z.className,Le=Ve(Z,E9),Ge=Kr(Le,q),Me=B(de),Ie=Ce||!Me&&F,je="".concat(I,"-option"),We=(0,z1.default)(I,je,Re,_(_(_(_({},"".concat(je,"-grouped"),te),"".concat(je,"-active"),H===U&&!Ie),"".concat(je,"-disabled"),Ie),"".concat(je,"-selected"),Me)),He=ne(J),ye=!x||typeof x=="function"||Me,se=typeof He=="number"?He:He||de,xe=tM(se)?se.toString():void 0;return $e!==void 0&&(xe=$e),Ut.createElement("div",ue({},Go(Ge),w?{}:Y(J,U),{"aria-selected":A(de),className:We,title:xe,onMouseMove:function(){H===U||Ie||W(U)},onClick:function(){Ie||L(de)},style:ie}),Ut.createElement("div",{className:"".concat(je,"-content")},typeof O=="function"?O(J,{index:U}):se),Ut.isValidElement(x)||Me,ye&&Ut.createElement(Bs,{className:"".concat(I,"-option-state"),customizeIcon:x,customizeIconProps:{value:de,disabled:Ie,isSelected:Me}},Me?"\u2713":null))}))},O9=Ut.forwardRef(R9),rM=O9;var $u=E(N()),nM=function(e,t){var r=$u.useRef({values:new Map,options:new Map}),n=$u.useMemo(function(){var i=r.current,a=i.values,s=i.options,l=e.map(function(f){if(f.label===void 0){var d;return T(T({},f),{},{label:(d=a.get(f.value))===null||d===void 0?void 0:d.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=$u.useCallback(function(i){return t.get(i)||r.current.options.get(i)},[t]);return[n,o]};var oM=E(N());function B1(e,t){return Yd(e).join("").toUpperCase().includes(t)}var iM=function(e,t,r,n,o){return oM.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(m,h){return o?B1(h[o],u):h[i]?B1(h[a!=="children"?a:"label"],u):B1(h[s],u)},d=c?function(m){return tp(m)}:function(m){return m};return e.forEach(function(m){if(m[i]){var h=f(r,d(m));if(h)l.push(m);else{var v=m[i].filter(function(y){return f(r,d(y))});v.length&&l.push(T(T({},m),{},_({},i,v)))}return}f(r,d(m))&&l.push(m)}),l},[e,n,o,r,t])};var Oy=E(N());var aM=0,_9=Yt();function P9(){var e;return _9?(e=aM,aM+=1):e="TEST_OR_SSR",e}function j1(e){var t=Oy.useState(),r=M(t,2),n=r[0],o=r[1];return Oy.useEffect(function(){o("rc_select_".concat(P9()))},[]),e||n}var lM=E(N());var sM=E(N());var T9=["children","value"],N9=["children"];function I9(e){var t=e,r=t.key,n=t.props,o=n.children,i=n.value,a=Ve(n,T9);return T({key:r,value:i!==void 0?i:r,children:o},a)}function _y(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return xi(e).map(function(r,n){if(!sM.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,N9);return t||!i?I9(r):T(T({key:"__RC_SELECT_GRP__".concat(a===null?n:a,"__"),label:a},c),{},{options:_y(l)})}).filter(function(r){return r})}var D9=function(t,r,n,o,i){return lM.useMemo(function(){var a=t,s=!t;s&&(a=_y(r));var l=new Map,c=new Map,u=function(m,h,v){v&&typeof v=="string"&&m.set(h[v],h)},f=function d(m){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 p?He(We):We},[We,p,ae]),se=fr.useMemo(function(){return Nk(ye,{fieldNames:ne,childrenAsData:L})},[ye,ne,L]),xe=function(Se){var Ke=re(Se);if(Oe(Ke),V&&(Ke.length!==ie.length||Ke.some(function(tt,kt){var Nt;return((Nt=ie[kt])===null||Nt===void 0?void 0:Nt.value)!==tt?.value}))){var Be=G?Ke:Ke.map(function(tt){return tt.value}),ze=Ke.map(function(tt){return tp(Re(tt.value))});V(A?Be:Be[0],A?ze:ze[0])}},_e=fr.useState(null),he=M(_e,2),Ze=he[0],lt=he[1],Rt=fr.useState(0),Tt=M(Rt,2),pt=Tt[0],Ae=Tt[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[G?{label:Lt?.[ne.label],value:Se,key:(gr=Lt?.key)!==null&&gr!==void 0?gr:Se}:Se,tp(Lt)]};if(Ke&&m){var tt=ze(),kt=M(tt,2),Nt=kt[0],tr=kt[1];m(Nt,tr)}else if(!Ke&&h&&Be!=="clear"){var Ft=ze(),rr=M(Ft,2),pr=rr[0],mr=rr[1];h(pr,mr)}},De=Ty(function(Fe,Se){var Ke,Be=A?Se.selected:!0;Be?Ke=A?[].concat(ee(ie),[Fe]):[Fe]:Ke=ie.filter(function(ze){return ze.value!==Fe}),xe(Ke),Pe(Fe,Be),n==="combobox"?lt(""):(!rp||d)&&(J(""),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(J(Se),lt(null),Ke.source==="submit"){var Be=(Se||"").trim();if(Be){var ze=Array.from(new Set([].concat(ee(Ge),[Be])));xe(ze),Pe(Be,!0),J("")}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=te.get(ze);return tt?.value}).filter(function(ze){return ze!==void 0}));var Be=Array.from(new Set([].concat(ee(Ge),ee(Ke))));xe(Be),Be.forEach(function(ze){Pe(ze,!0)})},Mt=fr.useMemo(function(){var Fe=O!==!1&&y!==!1;return T(T({},U),{},{flattenOptions:se,onActiveValue:et,defaultActiveFirstOption:we,onSelect:De,menuItemSelectedIcon:P,rawValues:Ge,fieldNames:ne,virtual:Fe,direction:I,listHeight:$,listItemHeight:k,childrenAsData:L,maxCount:H,optionRender:w})},[H,U,se,et,we,De,P,Ge,ne,O,y,I,$,k,L,w]);return fr.createElement(Tu.Provider,{value:Mt},fr.createElement(O1,ue({},K,{id:W,prefixCls:i,ref:t,omitDomProps:k9,mode:n,displayValues:Le,onDisplayValuesChange:Ee,direction:I,searchValue:ae,onSearch:be,autoClearSearchValue:d,onSearchSplit:ht,dropdownMatchSelectWidth:y,OptionList:rM,emptyOptions:!se.length,activeValue:Ze,activeDescendantId:"".concat(W,"_list_").concat(pt)})))}),V1=F9;V1.Option=op;V1.OptGroup=np;var uM=V1;var fM=uM;var dM=E(Ne());function Qi(e,t,r){return(0,dM.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 Ji=(e,t)=>t||e;var ku=E(N());var qs=E(N()),ap=E(Ne());var uo=E(N());var L9=()=>{let[,e]=xr(),[t]=wa("Empty"),n=new gt(e.colorBgBase).toHsl().l<.5?{opacity:.65}:{};return uo.createElement("svg",{style:n,width:"184",height:"152",viewBox:"0 0 184 152",xmlns:"http://www.w3.org/2000/svg"},uo.createElement("title",null,t?.description||"Empty"),uo.createElement("g",{fill:"none",fillRule:"evenodd"},uo.createElement("g",{transform:"translate(24 31.67)"},uo.createElement("ellipse",{fillOpacity:".8",fill:"#F5F5F7",cx:"67.797",cy:"106.89",rx:"67.797",ry:"12.668"}),uo.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"}),uo.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)"}),uo.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"}),uo.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"})),uo.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"}),uo.createElement("g",{transform:"translate(149.65 15.383)",fill:"#FFF"},uo.createElement("ellipse",{cx:"20.654",cy:"3.167",rx:"2.849",ry:"2.815"}),uo.createElement("path",{d:"M5.698 5.63H0L2.898.704zM9.259.704h4.985V5.63H9.259z"}))))},pM=L9;var Us=E(N()),mM=E(N());var z9=()=>{let[,e]=xr(),[t]=wa("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:s,contentColor:l}=(0,mM.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 Us.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Us.createElement("title",null,t?.description||"Empty"),Us.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Us.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),Us.createElement("g",{fillRule:"nonzero",stroke:a},Us.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"}),Us.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}))))},gM=z9;var W9=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}}}}},hM=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[W9(o)]});var B9=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=vM,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=e,f=B9(e,["className","rootClassName","prefixCls","image","description","children","imageStyle","style","classNames","styles"]),{getPrefixCls:d,direction:m,className:h,style:v,classNames:y,styles:g}=oo("empty"),p=d("empty",n),[x,b,S]=hM(p),[w]=wa("Empty"),C=typeof i<"u"?i:w?.description,R=typeof C=="string"?C:"empty",P=null;return typeof o=="string"?P=qs.createElement("img",{alt:R,src:o}):P=o,x(qs.createElement("div",Object.assign({className:(0,ap.default)(b,S,p,h,{[`${p}-normal`]:o===yM,[`${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)},f),qs.createElement("div",{className:(0,ap.default)(`${p}-image`,y.image,c?.image),style:Object.assign(Object.assign(Object.assign({},s),g.image),u?.image)},P),C&&qs.createElement("div",{className:(0,ap.default)(`${p}-description`,y.description,c?.description),style:Object.assign(Object.assign({},g.description),u?.description)},C),a&&qs.createElement("div",{className:(0,ap.default)(`${p}-footer`,y.footer,c?.footer),style:Object.assign(Object.assign({},g.footer),u?.footer)},a)))};H1.PRESENTED_IMAGE_DEFAULT=vM;H1.PRESENTED_IMAGE_SIMPLE=yM;var Au=H1;var j9=e=>{let{componentName:t}=e,{getPrefixCls:r}=(0,ku.useContext)(rt),n=r("empty");switch(t){case"Table":case"List":return ku.default.createElement(Au,{image:Au.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ku.default.createElement(Au,{image:Au.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return ku.default.createElement(Au,null)}},xM=j9;var U1=E(N());var V9=(e,t,r=void 0)=>{var n,o;let{variant:i,[e]:a}=U1.useContext(rt),s=U1.useContext(LA),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=zC.includes(c);return[c,u]},Gs=V9;var H9=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 U9(e,t){return e||H9(t)}var bM=U9;var SM=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"}},q9=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,[` +`].includes(St)})},[j]),Ke=bt.useContext(Pu)||{},Be=Ke.maxCount,ze=Ke.rawValues,tt=function(ft,rn,nn){if(!(pe&&Jd(Be)&&ze?.size>=Be)){var Sr=!0,Mr=ft;P?.(null);var po=EA(ft,j,Jd(Be)?Be-ze.size:void 0),Yn=nn?null:po;return y!=="combobox"&&Yn&&(Mr="",H?.(Yn),Fe(!1),Sr=!1),F&&he!==Mr&&F(Mr,{source:rn?"typing":"effect"}),Sr}},At=function(ft){!ft||!ft.trim()||F(ft,{source:"submit"})};bt.useEffect(function(){!be&&!pe&&y!=="combobox"&&tt("",!1,!1)},[be]),bt.useEffect(function(){De&&m&&Ee(!1),m&&!We.current&&xe(!1)},[m]);var Nt=qd(),tr=V(Nt,2),Ft=tr[0],rr=tr[1],pr=bt.useRef(!1),mr=function(ft){var rn=Ft(),nn=ft.key,Sr=nn==="Enter";if(Sr&&(y!=="combobox"&&ft.preventDefault(),be||Fe(!0)),rr(!!he),nn==="Backspace"&&!rn&&pe&&!he&&u.length){for(var Mr=te(u),po=null,Yn=Mr.length-1;Yn>=0;Yn-=1){var Io=Mr[Yn];if(!Io.disabled){Mr.splice(Yn,1),po=Io;break}}po&&f(Mr,{type:"remove",values:[po]})}for(var Di=arguments.length,li=new Array(Di>1?Di-1:0),$i=1;$i1?rn-1:0),Sr=1;Sr1?po-1:0),Io=1;Io"u"?"undefined":ue(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),w1=l9;var vy=E(D()),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,Vl.useRef)(0),l=(0,Vl.useRef)(null),c=(0,Vl.useRef)(null),u=(0,Vl.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,Vl.useRef)(null),v=(0,Vl.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 AA=E(D());function MA(e,t,r,n){var o=AA.useMemo(function(){return[new Map,[]]},[e,r.id,n]),i=V(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=LA(w),P=LA(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,Nu.useEffect)(function(){return u},[]),[p,f,l.current,i]}var Iu=E(D()),WA=14/15;function O1(e,t,r){var n=(0,Iu.useRef)(!1),o=(0,Iu.useRef)(0),i=(0,Iu.useRef)(0),a=(0,Iu.useRef)(null),s=(0,Iu.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*=WA:m*=WA;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 jA=E(D());function BA(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){jA.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=-BA(d),l()}else if(h>=m){var x=h-m;a=BA(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(D());var u9=10;function P1(e,t,r,n,o,i,a,s){var l=by.useRef(),c=by.useState(null),u=V(c,2),f=u[0],p=u[1];return vt(function(){if(f&&f.times=0;H-=1){var j=o(t[H]),I=r.get(j);if(I===void 0){d=!0;break}if(F-=I,F<=0)break}switch(S){case"top":b=C-y;break;case"bottom":b=R-m+y;break;default:{var N=e.current.scrollTop,$=N+m;C$&&(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(D());var f9=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=V(v,2),m=y[0],d=y[1],x=ur.useState(null),b=V(x,2),S=b[0],w=b[1],C=ur.useState(null),R=V(C,2),P=R[0],O=R[1],A=!n,M=ur.useRef(),F=ur.useRef(),H=ur.useState(h),j=V(H,2),I=j[0],N=j[1],$=ur.useRef(),U=function(){h===!0||h===!1||(clearTimeout($.current),N(!0),$.current=setTimeout(function(){N(!1)},3e3))},W=i-f||0,B=f-u||0,q=ur.useMemo(function(){if(o===0||W===0)return 0;var Z=o/W;return Z*B},[o,W,B]),L=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 z=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=M.current,Q=F.current;return K.addEventListener("touchstart",Z,{passive:!1}),Q.addEventListener("touchstart",z,{passive:!1}),function(){K.removeEventListener("touchstart",Z),Q.removeEventListener("touchstart",z)}},[]);var G=ur.useRef();G.current=W;var J=ur.useRef();J.current=B,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=M.current.getBoundingClientRect(),Ce=f/(c?Oe.width:Oe.height);if(de){var $e=(xy(ee,c)-le)*Ce,ce=pe;!A&&c?ce-=$e:ce+=$e;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($.current)}},[o]),ur.useImperativeHandle(t,function(){return{delayHidden:U}});var Y="".concat(r,"-scrollbar"),X={position:"absolute",visibility:I?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:M,className:(0,T1.default)(Y,_(_(_({},"".concat(Y,"-horizontal"),c),"".concat(Y,"-vertical"),!c),"".concat(Y,"-visible"),I)),style:T(T({},X),p),onMouseDown:L,onMouseMove:U},ur.createElement("div",{ref:F,className:(0,T1.default)("".concat(Y,"-thumb"),_({},"".concat(Y,"-thumb-moving"),m)),style:T(T({},ae),g),onMouseDown:z}))}),N1=f9;var d9=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,d9),Math.floor(r)}var p9=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],m9=[],g9={overflowY:"auto",overflowAnchor:"none"};function h9(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,p9),A=kr.useCallback(function(Te){return typeof p=="function"?p(Te):Te?.[p]},[p]),M=R1(A,null,null),F=V(M,4),H=F[0],j=F[1],I=F[2],N=F[3],$=!!(g!==!1&&i&&a),U=kr.useMemo(function(){return Object.values(I.maps).reduce(function(Te,Ue){return Te+Ue},0)},[I.id,I.maps]),W=$&&u&&(Math.max(a*u.length,U)>i||!!v),B=h==="rtl",q=(0,VA.default)(n,_({},"".concat(n,"-rtl"),B),o),L=u||m9,k=(0,lo.useRef)(),z=(0,lo.useRef)(),G=(0,lo.useRef)(),J=(0,lo.useState)(0),Y=V(J,2),X=Y[0],ae=Y[1],Z=(0,lo.useState)(0),K=V(Z,2),Q=K[0],re=K[1],ee=(0,lo.useState)(!1),ne=V(ee,2),de=ne[0],le=ne[1],pe=function(){le(!0)},Oe=function(){le(!1)},Ce={getKey:A};function $e(Te){ae(function(Ue){var Ae;typeof Te=="function"?Ae=Te(Ue):Ae=Te;var ve=we(Ae);return k.current.scrollTop=ve,ve})}var ce=(0,lo.useRef)({start:0,end:L.length}),ie=(0,lo.useRef)(),Re=C1(L,A),Le=V(Re,1),Ge=Le[0];ie.current=Ge;var Me=kr.useMemo(function(){if(!$)return{scrollHeight:void 0,start:0,end:L.length-1,offset:void 0};if(!W){var Te;return{scrollHeight:((Te=z.current)===null||Te===void 0?void 0:Te.offsetHeight)||0,start:0,end:L.length-1,offset:void 0}}for(var Ue=0,Ae,ve,nt,It=L.length,Dt=0;Dt=X&&Ae===void 0&&(Ae=Dt,ve=Ue),Pr>X+i&&nt===void 0&&(nt=Dt),Ue=Pr}return Ae===void 0&&(Ae=0,ve=0,nt=Math.ceil(i/a)),nt===void 0&&(nt=L.length-1),nt=Math.min(nt+1,L.length-1),{scrollHeight:Ue,start:Ae,end:nt,offset:ve}},[W,$,X,L,N,i]),Ie=Me.scrollHeight,je=Me.start,We=Me.end,He=Me.offset;ce.current.start=je,ce.current.end=We,kr.useLayoutEffect(function(){var Te=I.getRecord();if(Te.size===1){var Ue=Array.from(Te)[0],Ae=L[je];if(Ae){var ve=A(Ae);if(ve===Ue){var nt=I.get(Ue),It=nt-a;$e(function(Dt){return Dt+It})}}}I.resetRecord()},[Ie]);var ye=kr.useState({width:0,height:i}),se=V(ye,2),xe=se[0],_e=se[1],he=function(Ue){_e({width:Ue.offsetWidth,height:Ue.offsetHeight})},Ze=(0,lo.useRef)(),lt=(0,lo.useRef)(),Et=kr.useMemo(function(){return I1(xe.width,v)},[xe.width,v]),Tt=kr.useMemo(function(){return I1(xe.height,Ie)},[xe.height,Ie]),pt=Ie-i,ke=(0,lo.useRef)(pt);ke.current=pt;function we(Te){var Ue=Te;return Number.isNaN(ke.current)||(Ue=Math.min(Ue,ke.current)),Ue=Math.max(Ue,0),Ue}var et=X<=0,Pe=X>=pt,De=Q<=0,Ee=Q>=v,be=yy(et,Pe,De,Ee),ht=function(){return{x:B?-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 Ae=Te;Ue?((0,D1.flushSync)(function(){re(Ae)}),Fe()):$e(Ae)}function Ke(Te){var Ue=Te.currentTarget.scrollTop;Ue!==X&&$e(Ue),d?.(Te),Fe()}var Be=function(Ue){var Ae=Ue,ve=v?v-xe.width:0;return Ae=Math.max(Ae,0),Ae=Math.min(Ae,ve),Ae},ze=wt(function(Te,Ue){Ue?((0,D1.flushSync)(function(){re(function(Ae){var ve=Ae+(B?-Te:Te);return Be(ve)})}),Fe()):$e(function(Ae){var ve=Ae+Te;return ve})}),tt=E1($,et,Pe,De,Ee,!!v,ze),At=V(tt,2),Nt=At[0],tr=At[1];O1($,k,function(Te,Ue,Ae,ve){var nt=ve;return be(Te,Ue,Ae)?!1:!nt||!nt._virtualHandled?(nt&&(nt._virtualHandled=!0),Nt({preventDefault:function(){},deltaX:Te?Ue:0,deltaY:Te?0:Ue}),!0):!1}),_1(W,k,function(Te){$e(function(Ue){return Ue+Te})}),vt(function(){function Te(Ae){var ve=et&&Ae.detail<0,nt=Pe&&Ae.detail>0;$&&!ve&&!nt&&Ae.preventDefault()}var Ue=k.current;return Ue.addEventListener("wheel",Nt,{passive:!1}),Ue.addEventListener("DOMMouseScroll",tr,{passive:!0}),Ue.addEventListener("MozMousePixelScroll",Te,{passive:!1}),function(){Ue.removeEventListener("wheel",Nt),Ue.removeEventListener("DOMMouseScroll",tr),Ue.removeEventListener("MozMousePixelScroll",Te)}},[$,et,Pe]),vt(function(){if(v){var Te=Be(Q);re(Te),Fe({x:Te})}},[xe.width,v]);var Ft=function(){var Ue,Ae;(Ue=Ze.current)===null||Ue===void 0||Ue.delayHidden(),(Ae=lt.current)===null||Ae===void 0||Ae.delayHidden()},rr=P1(k,L,I,a,A,function(){return j(!0)},$e,Ft);kr.useImperativeHandle(t,function(){return{nativeElement:G.current,getScrollInfo:ht,scrollTo:function(Ue){function Ae(ve){return ve&&ue(ve)==="object"&&("left"in ve||"top"in ve)}Ae(Ue)?(Ue.left!==void 0&&re(Be(Ue.left)),rr(Ue.top)):rr(Ue)}}}),vt(function(){if(b){var Te=L.slice(je,We+1);b(Te,L)}},[je,We,L]);var pr=MA(L,A,I,a),mr=w?.({start:je,end:We,virtual:W,offsetX:Q,offsetY:He,rtl:B,getSize:pr}),An=S1(L,je,We,v,Q,H,f,Ce),gr=null;i&&(gr=T(_({},l?"height":"maxHeight",i),g9),$&&(gr.overflowY="hidden",v&&(gr.overflowX="hidden"),de&&(gr.pointerEvents="none")));var Lt={};return B&&(Lt.dir="rtl"),kr.createElement("div",fe({ref:G,style:T(T({},c),{},{position:"relative"}),className:q},Lt,O),kr.createElement(ro,{onResize:he},kr.createElement(m,{className:"".concat(n,"-holder"),style:gr,ref:k,onScroll:Ke,onMouseEnter:Ft},kr.createElement(IA,{prefixCls:n,height:Ie,offsetX:Q,offsetY:He,scrollWidth:v,onInnerResize:j,ref:z,innerProps:S,rtl:B,extra:mr},An))),W&&Ie>i&&kr.createElement(N1,{ref:Ze,prefixCls:n,scrollOffset:X,scrollRange:Ie,rtl:B,onScroll:Se,onStartMove:pe,onStopMove:Oe,spinSize:Tt,containerSize:xe.height,style:C?.verticalScrollBar,thumbStyle:C?.verticalScrollBarThumb,showScrollBar:P}),W&&v>xe.width&&kr.createElement(N1,{ref:lt,prefixCls:n,scrollOffset:Q,scrollRange:v,rtl:B,onScroll:Se,onStartMove:pe,onStopMove:Oe,spinSize:Et,containerSize:xe.width,horizontal:!0,style:C?.horizontalScrollBar,thumbStyle:C?.horizontalScrollBarThumb,showScrollBar:P}))}var HA=kr.forwardRef(h9);HA.displayName="List";var UA=HA;var qA=UA;var Ut=E(D()),k1=E(D());function GA(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var v9=["disabled","title","children","style","className"];function KA(e){return typeof e=="string"||typeof e=="number"}var y9=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(Pu),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"),M=Hi(function(){return v},[a,v],function(Z,K){return K[0]&&Z[1]!==K[1]}),F=Ut.useRef(null),H=Ut.useMemo(function(){return s&&Jd(h)&&b?.size>=h},[s,h,b?.size]),j=function(K){K.preventDefault()},I=function(K){var Q;(Q=F.current)===null||Q===void 0||Q.scrollTo(typeof K=="number"?{index:K}:K)},N=Ut.useCallback(function(Z){return l==="combobox"?!1:b.has(Z)},[l,te(b).toString(),b.size]),$=function(K){for(var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,re=M.length,ee=0;ee1&&arguments[1]!==void 0?arguments[1]:!1;q(K);var re={source:Q?"keyboard":"mouse"},ee=M[K];if(!ee){y(null,-1,re);return}y(ee.value,K,re)};(0,k1.useEffect)(function(){L(m!==!1?$(0):-1)},[M.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,k1.useEffect)(function(){var Z=setTimeout(function(){if(!s&&a&&b.size===1){var Q=Array.from(b)[0],re=M.findIndex(function(ee){var ne=ee.data;return c?String(ne.value).startsWith(c):ne.value===Q});re!==-1&&(L(re),I(re))}});if(a){var K;(K=F.current)===null||K===void 0||K.scrollTo(void 0)}return function(){return clearTimeout(Z)}},[a,c]);var z=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 Qe.N:case Qe.P:case Qe.UP:case Qe.DOWN:{var ee=0;if(Q===Qe.UP?ee=-1:Q===Qe.DOWN?ee=1:GA()&&re&&(Q===Qe.N?ee=1:Q===Qe.P&&(ee=-1)),ee!==0){var ne=$(B+ee,ee);I(ne),L(ne,!0)}break}case Qe.TAB:case Qe.ENTER:{var de,le=M[B];le&&!(le!=null&&(de=le.data)!==null&&de!==void 0&&de.disabled)&&!H?z(le.value):z(void 0),a&&K.preventDefault();break}case Qe.ESC:u(!1),a&&K.stopPropagation()}},onKeyUp:function(){},scrollTo:function(K){I(K)}}}),M.length===0)return Ut.createElement("div",{role:"listbox",id:"".concat(i,"_list"),className:"".concat(A,"-empty"),onMouseDown:j},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=M[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(B-1),X(B),X(B+1)),Ut.createElement(qA,{itemKey:"key",ref:F,data:M,height:R,itemHeight:P,fullHeight:!1,onMouseDown:j,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:KA(ne)?ne.toString():void 0;return Ut.createElement("div",{className:(0,$1.default)(A,"".concat(A,"-group"),ee.className),title:Oe},ne!==void 0?ne:le)}var Ce=ee.disabled,$e=ee.title,ce=ee.children,ie=ee.style,Re=ee.className,Le=Ve(ee,v9),Ge=Kr(Le,G),Me=N(de),Ie=Ce||!Me&&H,je="".concat(A,"-option"),We=(0,$1.default)(A,je,Re,_(_(_(_({},"".concat(je,"-grouped"),re),"".concat(je,"-active"),B===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=KA(se)?se.toString():void 0;return $e!==void 0&&(xe=$e),Ut.createElement("div",fe({},qo(Ge),w?{}:Y(Z,K),{"aria-selected":k(de),className:We,title:xe,onMouseMove:function(){B===K||Ie||L(K)},onClick:function(){Ie||z(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(Bs,{className:"".concat(A,"-option-state"),customizeIcon:x,customizeIconProps:{value:de,disabled:Ie,isSelected:Me}},Me?"\u2713":null))}))},x9=Ut.forwardRef(y9),XA=x9;var Du=E(D()),YA=function(e,t){var r=Du.useRef({values:new Map,options:new Map}),n=Du.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=Du.useCallback(function(i){return t.get(i)||r.current.options.get(i)},[t]);return[n,o]};var QA=E(D());function A1(e,t){return Kd(e).join("").toUpperCase().includes(t)}var JA=function(e,t,r,n,o){return QA.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?A1(h[o],u):h[i]?A1(h[a!=="children"?a:"label"],u):A1(h[s],u)},p=c?function(g){return Zd(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(D());var ZA=0,b9=Yt();function S9(){var e;return b9?(e=ZA,ZA+=1):e="TEST_OR_SSR",e}function M1(e){var t=Sy.useState(),r=V(t,2),n=r[0],o=r[1];return Sy.useEffect(function(){o("rc_select_".concat(S9()))},[]),e||n}var tM=E(D());var eM=E(D());var C9=["children","value"],w9=["children"];function E9(e){var t=e,r=t.key,n=t.props,o=n.children,i=n.value,a=Ve(n,C9);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(!eM.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,w9);return t||!i?E9(r):T(T({key:"__RC_SELECT_GRP__".concat(a===null?n:a,"__"),label:a},c),{},{options:Cy(l)})}).filter(function(r){return r})}var R9=function(t,r,n,o,i){return tM.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 wA(ye,{fieldNames:J,childrenAsData:z})},[ye,J,z]),xe=function(Se){var Ke=ne(Se);if(Oe(Ke),W&&(Ke.length!==ie.length||Ke.some(function(tt,At){var Nt;return((Nt=ie[At])===null||Nt===void 0?void 0:Nt.value)!==tt?.value}))){var Be=U?Ke:Ke.map(function(tt){return tt.value}),ze=Ke.map(function(tt){return Zd(Re(tt.value))});W(k?Be:Be[0],k?ze:ze[0])}},_e=fr.useState(null),he=V(_e,2),Ze=he[0],lt=he[1],Et=fr.useState(0),Tt=V(Et,2),pt=Tt[0],ke=Tt[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;ke(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,Zd(Lt)]};if(Ke&&g){var tt=ze(),At=V(tt,2),Nt=At[0],tr=At[1];g(Nt,tr)}else if(!Ke&&h&&Be!=="clear"){var Ft=ze(),rr=V(Ft,2),pr=rr[0],mr=rr[1];h(pr,mr)}},De=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(""):(!ep||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:De,menuItemSelectedIcon:P,rawValues:Ge,fieldNames:J,virtual:Fe,direction:A,listHeight:F,listItemHeight:j,childrenAsData:z,maxCount:B,optionRender:w})},[B,K,se,et,we,De,P,Ge,J,O,y,A,F,j,z,w]);return fr.createElement(Pu.Provider,{value:Mt},fr.createElement(b1,fe({},q,{id:L,prefixCls:i,ref:t,omitDomProps:P9,mode:n,displayValues:Le,onDisplayValuesChange:Ee,direction:A,searchValue:ae,onSearch:be,autoClearSearchValue:p,onSearchSplit:ht,dropdownMatchSelectWidth:y,OptionList:XA,emptyOptions:!se.length,activeValue:Ze,activeDescendantId:"".concat(L,"_list_").concat(pt)})))}),F1=N9;F1.Option=rp;F1.OptGroup=tp;var nM=F1;var oM=nM;var iM=E(Ne());function Yi(e,t,r){return(0,iM.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 ku=E(D());var qs=E(D()),op=E(Ne());var co=E(D());var I9=()=>{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"}))))},aM=I9;var Us=E(D()),sM=E(D());var D9=()=>{let[,e]=xr(),[t]=Ca("Empty"),{colorFill:r,colorFillTertiary:n,colorFillQuaternary:o,colorBgContainer:i}=e,{borderColor:a,shadowColor:s,contentColor:l}=(0,sM.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 Us.createElement("svg",{width:"64",height:"41",viewBox:"0 0 64 41",xmlns:"http://www.w3.org/2000/svg"},Us.createElement("title",null,t?.description||"Empty"),Us.createElement("g",{transform:"translate(0 1)",fill:"none",fillRule:"evenodd"},Us.createElement("ellipse",{fill:s,cx:"32",cy:"33",rx:"32",ry:"7"}),Us.createElement("g",{fillRule:"nonzero",stroke:a},Us.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"}),Us.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}))))},lM=D9;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}}}}},cM=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 k9=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=uM,description:i,children:a,imageStyle:s,style:l,classNames:c,styles:u}=e,f=k9(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]=cM(d),[w]=Ca("Empty"),C=typeof i<"u"?i:w?.description,R=typeof C=="string"?C:"empty",P=null;return typeof o=="string"?P=qs.createElement("img",{alt:R,src:o}):P=o,x(qs.createElement("div",Object.assign({className:(0,op.default)(b,S,d,h,{[`${d}-normal`]:o===fM,[`${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),qs.createElement("div",{className:(0,op.default)(`${d}-image`,y.image,c?.image),style:Object.assign(Object.assign(Object.assign({},s),m.image),u?.image)},P),C&&qs.createElement("div",{className:(0,op.default)(`${d}-description`,y.description,c?.description),style:Object.assign(Object.assign({},m.description),u?.description)},C),a&&qs.createElement("div",{className:(0,op.default)(`${d}-footer`,y.footer,c?.footer),style:Object.assign(Object.assign({},m.footer),u?.footer)},a)))};L1.PRESENTED_IMAGE_DEFAULT=uM;L1.PRESENTED_IMAGE_SIMPLE=fM;var $u=L1;var A9=e=>{let{componentName:t}=e,{getPrefixCls:r}=(0,ku.useContext)(rt),n=r("empty");switch(t){case"Table":case"List":return ku.default.createElement($u,{image:$u.PRESENTED_IMAGE_SIMPLE});case"Select":case"TreeSelect":case"Cascader":case"Transfer":case"Mentions":return ku.default.createElement($u,{image:$u.PRESENTED_IMAGE_SIMPLE,className:`${n}-small`});case"Table.filter":return null;default:return ku.default.createElement($u,null)}},dM=A9;var z1=E(D());var M9=(e,t,r=void 0)=>{var n,o;let{variant:i,[e]:a}=z1.useContext(rt),s=z1.useContext(Ik),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=kC.includes(c);return[c,u]},Gs=M9;var F9=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 L9(e,t){return e||F9(t)}var pM=L9;var mM=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"}},z9=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:kv},[` + `]:{animationName:Nv},[` ${o}${s}topLeft, ${i}${s}topLeft, ${o}${s}topRight, ${i}${s}topRight - `]:{animationName:Fv},[`${a}${s}bottomLeft`]:{animationName:Mv},[` + `]:{animationName:Dv},[`${a}${s}bottomLeft`]:{animationName:Iv},[` ${a}${s}topLeft, ${a}${s}topRight - `]:{animationName:Lv},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},SM(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"},_a),"&-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({},SM(e)),{color:e.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},zv(e,"slide-up"),zv(e,"slide-down"),Av(e,"move-up"),Av(e,"move-down")]},CM=q9;var G9=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())}},K9=e=>{let{multipleSelectItemHeight:t,selectHeight:r,lineWidth:n}=e;return e.calc(r).sub(t).div(2).sub(n).equal()},X9=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({},Pa()),{display:"inline-flex",alignItems:"center",color:l,fontWeight:"bold",fontSize:10,lineHeight:"inherit",cursor:"pointer",[`> ${r}`]:{verticalAlign:"-0.2em"},"&:hover":{color:c}})}}}},Y9=(e,t)=>{let{componentCls:r,INTERNAL_FIXED_ITEM_MARGIN:n}=e,o=`${r}-selection-overflow`,i=e.multipleSelectItemHeight,a=K9(e),s=t?`${r}-${t}`:"",l=G9(e);return{[`${r}-multiple${s}`]:Object.assign(Object.assign({},X9(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, + `]:{animationName:$v},"&-hidden":{display:"none"},[n]:Object.assign(Object.assign({},mM(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({},mM(e)),{color:e.colorTextDisabled})}),[`${l}:has(+ ${l})`]:{borderEndStartRadius:0,borderEndEndRadius:0,[`& + ${l}`]:{borderStartStartRadius:0,borderStartEndRadius:0}},"&-rtl":{direction:"rtl"}})},kv(e,"slide-up"),kv(e,"slide-down"),Tv(e,"move-up"),Tv(e,"move-down")]},gM=z9;var W9=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())}},B9=e=>{let{multipleSelectItemHeight:t,selectHeight:r,lineWidth:n}=e;return e.calc(r).sub(t).div(2).sub(n).equal()},j9=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}})}}}},V9=(e,t)=>{let{componentCls:r,INTERNAL_FIXED_ITEM_MARGIN:n}=e,o=`${r}-selection-overflow`,i=e.multipleSelectItemHeight,a=B9(e),s=t?`${r}-${t}`:"",l=W9(e);return{[`${r}-multiple${s}`]:Object.assign(Object.assign({},j9(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}},[`${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 q1(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}-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[Y9(e,t),o]}var Q9=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[q1(e),q1(r,"sm"),{[`${t}-multiple${t}-sm`]:{[`${t}-selection-placeholder`]:{insetInline:e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal()},[`${t}-selection-search`]:{marginInlineStart:2}}},q1(n,"lg")]},wM=Q9;function G1(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"}},[` + `]:{paddingInlineEnd:e.calc(e.fontSizeIcon).add(e.controlPaddingHorizontal).equal()}}};return[V9(e,t),o]}var H9=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")]},hM=H9;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: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 ${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 K1(e){let{componentCls:t}=e,r=e.calc(e.controlPaddingHorizontalSM).sub(e.lineWidth).equal();return[G1(e),G1(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()},[` + `]:{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()}}}},G1(ut(e,{controlHeight:e.singleItemHeightLG,fontSize:e.fontSizeLG,borderRadius:e.borderRadiusLG}),"lg")]}var EM=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:d,controlItemBgHover:m,colorBgContainer:h,colorFillSecondary:v,colorBgContainerDisabled:y,colorTextDisabled:g,colorPrimaryHover:p,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:d,optionActiveBg:m,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:g,multipleItemBorderColorDisabled:"transparent",showArrowPaddingInlineEnd:Math.ceil(e.fontSize*1.25),hoverBorderColor:p,activeBorderColor:x,activeOutlineColor:b,selectAffixPadding:s}};var PM=(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}}}},RM=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},PM(e,t))}),J9=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},PM(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),RM(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),RM(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}`}})}),TM=(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}}}},OM=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},TM(e,t))}),Z9=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},TM(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),OM(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),OM(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}`}})}),e7=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}}}}),NM=(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}}}},_M=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},NM(e,t))}),t7=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},NM(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),_M(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),_M(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}`}})}),r7=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},J9(e)),Z9(e)),e7(e)),t7(e))}),IM=r7;var n7=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"}}}},o7=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"}}}},i7=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({},n7(e)),o7(e)),[`${r}-selection-item`]:Object.assign(Object.assign({flex:1,fontWeight:"normal",position:"relative",userSelect:"none"},_a),{[`> ${t}-typography`]:{display:"inline"}}),[`${r}-selection-placeholder`]:Object.assign(Object.assign({},_a),{flex:1,color:e.colorTextPlaceholder,pointerEvents:"none"}),[`${r}-arrow`]:Object.assign(Object.assign({},Pa()),{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()}}}}}},a7=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},i7(e),K1(e),wM(e),CM(e),{[`${t}-rtl`]:{direction:"rtl"}},Ms(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},DM=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[a7(r),IM(r)]},EM,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Zi=E(N());var Ny=E(N());var s7={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"},$M=s7;var l7=function(t,r){return Ny.createElement(zt,ue({},t,{ref:r,icon:$M}))},c7=Ny.forwardRef(l7),Iy=c7;var Dy=E(N());var u7={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"},AM=u7;var f7=function(t,r){return Dy.createElement(zt,ue({},t,{ref:r,icon:AM}))},d7=Dy.forwardRef(f7),$y=d7;var Ay=E(N());var p7={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"},kM=p7;var m7=function(t,r){return Ay.createElement(zt,ue({},t,{ref:r,icon:kM}))},g7=Ay.forwardRef(m7),ky=g7;function X1({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 d=t??Zi.createElement(gu,null),m=g=>e===null&&!a&&!u?null:Zi.createElement(Zi.Fragment,null,l!==!1&&g,a&&c),h=null;if(e!==void 0)h=m(e);else if(o)h=m(Zi.createElement(kl,{spin:!0}));else{let g=`${s}-suffix`;h=({open:p,showSearch:x})=>m(p&&x?Zi.createElement(ky,{className:g}):Zi.createElement($y,{className:g}))}let v=null;r!==void 0?v=r:i?v=Zi.createElement(Iy,null):v=null;let y=null;return n!==void 0?y=n:y=Zi.createElement(yv,null),{clearIcon:d,suffixIcon:h,itemIcon:v,removeIcon:y}}function Y1(e,t){return t!==void 0?t:e!==null}var h7=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:d,dropdownClassName:m,listHeight:h=256,placement:v,listItemHeight:y,size:g,disabled:p,notFoundContent:x,status:b,builtinPlacements:S,dropdownMatchSelectWidth:w,popupMatchSelectWidth:C,direction:R,style:P,allowClear:O,variant:I,dropdownStyle:D,transitionName:$,tagRender:F,maxCount:k,prefix:z,dropdownRender:B,popupRender:j,onDropdownVisibleChange:G,onOpenChange:V,styles:H,classNames:K}=e,W=h7(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:A,getPrefixCls:L,renderEmpty:q,direction:ne,virtual:Y,popupMatchSelectWidth:X,popupOverflow:ae}=oi.useContext(rt),{showSearch:J,style:U,styles:Q,className:te,classNames:Z}=oo("select"),[,re]=xr(),de=y??re?.controlHeight,le=L("select",s),pe=L(),Oe=R??ne,{compactSize:Ce,compactItemClassnames:$e}=Yo(le,Oe),[ce,ie]=Gs("select",I,l),Re=Xo(le),[Le,Ge,Me]=DM(le,Re),Ie=oi.useMemo(()=>{let{mode:Be}=e;if(Be!=="combobox")return Be===MM?"combobox":Be},[e.mode]),je=Ie==="multiple"||Ie==="tags",We=Y1(e.suffixIcon,e.showArrow),He=(r=C??w)!==null&&r!==void 0?r:X,ye=((n=H?.popup)===null||n===void 0?void 0:n.root)||((o=Q.popup)===null||o===void 0?void 0:o.root)||D,se=j||B,xe=V||G,{status:_e,hasFeedback:he,isFormItemInput:Ze,feedbackIcon:lt}=oi.useContext(pn),Rt=Ji(_e,b),Tt;x!==void 0?Tt=x:Ie==="combobox"?Tt=null:Tt=q?.("Select")||oi.createElement(xM,{componentName:"Select"});let{suffixIcon:pt,itemIcon:Ae,removeIcon:we,clearIcon:et}=X1(Object.assign(Object.assign({},W),{multiple:je,hasFeedback:he,feedbackIcon:lt,showSuffixIcon:We,prefixCls:le,componentName:"Select"})),Pe=O===!0?{clearIcon:et}:O,De=Kr(W,["suffixIcon","itemIcon"]),Ee=(0,Q1.default)(((i=K?.popup)===null||i===void 0?void 0:i.root)||((a=Z?.popup)===null||a===void 0?void 0:a.root)||d||m,{[`${le}-dropdown-${Oe}`]:Oe==="rtl"},u,Z.root,K?.root,Me,Re,Ge),be=so(Be=>{var ze;return(ze=g??Ce)!==null&&ze!==void 0?ze:Be}),ht=oi.useContext(qr),Mt=p??ht,Fe=(0,Q1.default)({[`${le}-lg`]:be==="large",[`${le}-sm`]:be==="small",[`${le}-rtl`]:Oe==="rtl",[`${le}-${ce}`]:ie,[`${le}-in-form-item`]:Ze},Qi(le,Rt,he),$e,te,c,Z.root,K?.root,u,Me,Re,Ge),Se=oi.useMemo(()=>v!==void 0?v:Oe==="rtl"?"bottomRight":"bottomLeft",[v,Oe]),[Ke]=Cv("SelectLike",ye?.zIndex);return Le(oi.createElement(fM,Object.assign({ref:t,virtual:Y,showSearch:J},De,{style:Object.assign(Object.assign(Object.assign(Object.assign({},Q.root),H?.root),U),P),dropdownMatchSelectWidth:He,transitionName:_v(pe,"slide-up",$),builtinPlacements:bM(S,ae),listHeight:h,listItemHeight:de,mode:Ie,prefixCls:le,placement:Se,direction:Oe,prefix:z,suffixIcon:pt,menuItemSelectedIcon:Ae,removeIcon:we,allowClear:Pe,notFoundContent:Tt,className:Fe,getPopupContainer:f||A,dropdownClassName:Ee,disabled:Mt,dropdownStyle:Object.assign(Object.assign({},ye),{zIndex:Ke}),maxCount:je?k:void 0,tagRender:je?F:void 0,dropdownRender:se,onDropdownVisibleChange:xe})))},Mu=oi.forwardRef(v7),y7=zA(Mu,"dropdownAlign");Mu.SECRET_COMBOBOX_MODE_DO_NOT_USE=MM;Mu.Option=op;Mu.OptGroup=np;Mu._InternalPanelDoNotUseOrYouWillBeFired=y7;var sp=Mu;var FM=E(N());function J1(){let[,e]=FM.useReducer(t=>t+1,0);return e}var Sn=E(N()),Wy=E(Ne());var Z1=E(Ne()),eE=E(N());function Fu(e){var t=e.children,r=e.prefixCls,n=e.id,o=e.overlayInnerStyle,i=e.bodyClassName,a=e.className,s=e.style;return eE.createElement("div",{className:(0,Z1.default)("".concat(r,"-content"),a),style:s},eE.createElement("div",{className:(0,Z1.default)("".concat(r,"-inner"),i),id:n,role:"tooltip",style:o},typeof t=="function"?t():t))}var zM=E(Ne()),Hl=E(N()),Wu=E(N());var Lu={shiftX:64,adjustY:1},zu={adjustX:1,shiftY:!0},ii=[0,0],LM={left:{points:["cr","cl"],overflow:zu,offset:[-4,0],targetOffset:ii},right:{points:["cl","cr"],overflow:zu,offset:[4,0],targetOffset:ii},top:{points:["bc","tc"],overflow:Lu,offset:[0,-4],targetOffset:ii},bottom:{points:["tc","bc"],overflow:Lu,offset:[0,4],targetOffset:ii},topLeft:{points:["bl","tl"],overflow:Lu,offset:[0,-4],targetOffset:ii},leftTop:{points:["tr","tl"],overflow:zu,offset:[-4,0],targetOffset:ii},topRight:{points:["br","tr"],overflow:Lu,offset:[0,-4],targetOffset:ii},rightTop:{points:["tl","tr"],overflow:zu,offset:[4,0],targetOffset:ii},bottomRight:{points:["tr","br"],overflow:Lu,offset:[0,4],targetOffset:ii},rightBottom:{points:["bl","br"],overflow:zu,offset:[4,0],targetOffset:ii},bottomLeft:{points:["tl","bl"],overflow:Lu,offset:[0,4],targetOffset:ii},leftBottom:{points:["br","bl"],overflow:zu,offset:[-4,0],targetOffset:ii}};var x7=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],b7=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,d=f===void 0?"rc-tooltip":f,m=t.children,h=t.onVisibleChange,v=t.afterVisibleChange,y=t.transitionName,g=t.animation,p=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,I=t.overlayInnerStyle,D=t.arrowContent,$=t.overlay,F=t.id,k=t.showArrow,z=k===void 0?!0:k,B=t.classNames,j=t.styles,G=Ve(t,x7),V=Yv(F),H=(0,Wu.useRef)(null);(0,Wu.useImperativeHandle)(r,function(){return H.current});var K=T({},G);"visible"in t&&(K.popupVisible=t.visible);var W=function(){return Hl.createElement(Fu,{key:"content",prefixCls:d,id:V,bodyClassName:B?.body,overlayInnerStyle:T(T({},I),j?.body)},$)},A=function(){var q=Hl.Children.only(m),ne=q?.props||{},Y=T(T({},ne),{},{"aria-describedby":$?V:null});return Hl.cloneElement(m,Y)};return Hl.createElement(by,ue({popupClassName:(0,zM.default)(n,B?.root),prefixCls:d,popup:W,action:i,builtinPlacements:LM,popupPlacement:b,ref:H,popupAlign:w,getPopupContainer:O,onPopupVisibleChange:h,afterPopupVisibleChange:v,popupTransitionName:y,popupAnimation:g,popupMotion:p,defaultPopupVisible:P,autoDestroy:R,mouseLeaveDelay:c,popupStyle:T(T({},u),j?.root),mouseEnterDelay:s,arrow:z},K),A())},WM=(0,Wu.forwardRef)(b7);var BM=WM;function jM(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,d=u,m=2*o-s,h=l,v=2*o-i,y=a,g=o*Math.sqrt(2)+n*(Math.sqrt(2)-2),p=n*(Math.sqrt(2)-1),x=`polygon(${p}px 100%, 50% ${p}px, ${2*o-p}px 100%, ${p}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} ${d} L ${m} ${h} A ${n} ${n} 0 0 0 ${v} ${y} Z')`;return{arrowShadowWidth:g,arrowPath:b,arrowPolygon:x}}var VM=(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 tE=8;function Fy(e){let{contentRadius:t,limitVerticalRadius:r}=e,n=t>12?t+2:12;return{arrowOffsetHorizontal:n,arrowOffsetVertical:r?tE:n}}function My(e,t){return e?t:{}}function rE(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"},VM(e,t,o)),{"&:before":{background:t}})]},My(!!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}}}})),My(!!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}}}})),My(!!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}})),My(!!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 S7(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 HM={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"]}},C7={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"]}},w7=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function nE(e){let{arrowWidth:t,autoAdjustOverflow:r,arrowPointAtCenter:n,offset:o,borderRadius:i,visibleFirst:a}=e,s=t/2,l={};return Object.keys(HM).forEach(c=>{let u=n&&C7[c]||HM[c],f=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=f,w7.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 d=Fy({contentRadius:i,limitVerticalRadius:!0});if(n)switch(c){case"topLeft":case"bottomLeft":f.offset[0]=-d.arrowOffsetHorizontal-s;break;case"topRight":case"bottomRight":f.offset[0]=d.arrowOffsetHorizontal+s;break;case"leftTop":case"rightTop":f.offset[1]=-d.arrowOffsetHorizontal*2+s;break;case"leftBottom":case"rightBottom":f.offset[1]=d.arrowOffsetHorizontal*2-s;break}f.overflow=S7(c,d,t,r),a&&(f.htmlRegion="visibleFirst")}),l}var Bu=E(N()),GM=E(Ne());var E7=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:d,sizePopupArrow:m}=e,h=t(a).add(m).add(d).equal(),v=t(a).mul(2).add(m).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,tE)}},[`${r}-content`]:{position:"relative"}}),Vh(e,(y,{darkColor:g})=>({[`&${r}-${y}`]:{[`${r}-inner`]:{backgroundColor:g},[`${r}-arrow`]:{"--antd-arrow-background-color":g}}}))),{"&-rtl":{direction:"rtl"}})},rE(e,"var(--antd-arrow-background-color)"),{[`${r}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow}}]},R7=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Fy({contentRadius:e.borderRadius,limitVerticalRadius:!0})),jM(ut(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),Ly=(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[E7(s),Lw(n,"zoom-big-fast")]},R7,{resetStyle:!1,injectStyle:t})(e);var qM=E(Ne());var O7=Ro.map(e=>`${e}-inverse`);function UM(e,t=!0){return t?[].concat(ee(O7),ee(Ro)).includes(e):Ro.includes(e)}function zy(e,t){let r=UM(t),n=(0,qM.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 _7=e=>{let{prefixCls:t,className:r,placement:n="top",title:o,color:i,overlayInnerStyle:a}=e,{getPrefixCls:s}=Bu.useContext(rt),l=s("tooltip",t),[c,u,f]=Ly(l),d=zy(l,i),m=d.arrowStyle,h=Object.assign(Object.assign({},a),d.overlayStyle),v=(0,GM.default)(u,f,l,`${l}-pure`,`${l}-placement-${n}`,r,d.className);return c(Bu.createElement("div",{className:v,style:m},Bu.createElement("div",{className:`${l}-arrow`}),Bu.createElement(Fu,Object.assign({},e,{className:u,prefixCls:l,overlayInnerStyle:h}),o)))},KM=_7;var P7=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:d,destroyOnHidden:m,arrow:h=!0,title:v,overlay:y,builtinPlacements:g,arrowPointAtCenter:p=!1,autoAdjustOverflow:x=!0,motion:b,getPopupContainer:S,placement:w="top",mouseEnterDelay:C=.1,mouseLeaveDelay:R=.1,overlayStyle:P,rootClassName:O,overlayClassName:I,styles:D,classNames:$}=e,F=P7(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"]),k=!!h,[,z]=xr(),{getPopupContainer:B,getPrefixCls:j,direction:G,className:V,style:H,classNames:K,styles:W}=oo("tooltip"),A=Ph("Tooltip"),L=Sn.useRef(null),q=()=>{var We;(We=L.current)===null||We===void 0||We.forceAlign()};Sn.useImperativeHandle(t,()=>{var We,He;return{forceAlign:q,forcePopupAlign:()=>{A.deprecated(!1,"forcePopupAlign","forceAlign"),q()},nativeElement:(We=L.current)===null||We===void 0?void 0:We.nativeElement,popupElement:(He=L.current)===null||He===void 0?void 0:He.popupElement}});let[ne,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))},J=Sn.useMemo(()=>{var We,He;let ye=p;return typeof h=="object"&&(ye=(He=(We=h.pointAtCenter)!==null&&We!==void 0?We:h.arrowPointAtCenter)!==null&&He!==void 0?He:p),g||nE({arrowPointAtCenter:ye,autoAdjustOverflow:x,arrowWidth:k?z.sizePopupArrow:0,borderRadius:z.borderRadius,offset:z.marginXXS,visibleFirst:!0})},[p,h,g,z]),U=Sn.useMemo(()=>v===0?v:y||v||"",[y,v]),Q=Sn.createElement(Ws,{space:!0},typeof U=="function"?U():U),te=j("tooltip",o),Z=j(),re=e["data-popover-inject"],de=ne;!("open"in e)&&!("visible"in e)&&X&&(de=!1);let le=Sn.isValidElement(c)&&!xv(c)?c:Sn.createElement("span",null,c),pe=le.props,Oe=!pe.className||typeof pe.className=="string"?(0,Wy.default)(pe.className,i||`${te}-open`):pe.className,[Ce,$e,ce]=Ly(te,!re),ie=zy(te,s),Re=ie.arrowStyle,Le=(0,Wy.default)(I,{[`${te}-rtl`]:G==="rtl"},ie.className,O,$e,ce,V,K.root,$?.root),Ge=(0,Wy.default)(K.body,$?.body),[Me,Ie]=Cv("Tooltip",F.zIndex),je=Sn.createElement(BM,Object.assign({},F,{zIndex:Me,showArrow:k,placement:w,mouseEnterDelay:C,mouseLeaveDelay:R,prefixCls:te,classNames:{root:Le,body:Ge},styles:{root:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Re),W.root),H),P),D?.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},W.body),l),D?.body),ie.overlayStyle)},getTooltipContainer:S||a||B,ref:L,builtinPlacements:J,overlay:Q,visible:de,onVisibleChange:ae,afterVisibleChange:u??f,arrowContent:Sn.createElement("span",{className:`${te}-arrow-content`}),motion:{motionName:_v(Z,"zoom-big-fast",e.transitionName),motionDeadline:1e3},destroyTooltipOnHide:m??!!d}),de?Ko(le,{className:Oe}):le);return Ce(Sn.createElement(Sv.Provider,{value:Ie},je))}),XM=T7;XM._InternalPanelDoNotUseOrYouWillBeFired=KM;var Ma=XM;var YM=E(Ne());var By=E(N()),Ul=E(N()),N7=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],I7=(0,Ul.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,d=e.title,m=e.onChange,h=Ve(e,N7),v=(0,Ul.useRef)(null),y=(0,Ul.useRef)(null),g=ar(c,{value:a}),p=M(g,2),x=p[0],b=p[1];(0,Ul.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,YM.default)(n,o,_(_({},"".concat(n,"-checked"),x),"".concat(n,"-disabled"),s)),w=function(R){s||("checked"in e||b(R.target.checked),m?.({target:T(T({},e),{},{type:f,checked:R.target.checked}),stopPropagation:function(){R.stopPropagation()},preventDefault:function(){R.preventDefault()},nativeEvent:R.nativeEvent}))};return By.createElement("span",{className:S,title:d,style:i,ref:y},By.createElement("input",ue({},h,{className:"".concat(n,"-input"),ref:v,onChange:w,disabled:s,checked:!!x,type:f})),By.createElement("span",{className:"".concat(n,"-inner")}))}),QM=I7;var JM=E(N());function oE(e){let t=JM.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 Fa(e){return ut(e,{inputAffixPadding:e.paddingXXS})}var La=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:d,colorPrimaryHover:m,colorPrimary:h,controlOutlineWidth:v,controlOutline:y,colorErrorOutline:g,colorWarningOutline:p,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,I=Math.round((i-R*n)/2*10)/10-o,D=Math.ceil((a-P*l)/2*10)/10-o;return{paddingBlock:Math.max(O,0),paddingBlockSM:Math.max(I,0),paddingBlockLG:Math.max(D,0),paddingInline:c-o,paddingInlineSM:u-o,paddingInlineLG:f-o,addonBg:d,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:P,inputFontSizeSM:R}};var D7=e=>({borderColor:e.hoverBorderColor,backgroundColor:e.hoverBg}),iE=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({},D7(ut(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),oF=(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}}),ZM=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},oF(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}}),[`&${e.componentCls}-status-${t.status}${e.componentCls}-disabled`]:{borderColor:t.borderColor}}),jy=(e,t)=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},oF(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},iE(e))}),ZM(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),ZM(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),eF=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{borderColor:t.addonBorderColor,color:t.addonColor}}}),Vy=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}}},eF(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),eF(e,{status:"warning",addonBorderColor:e.colorWarning,addonColor:e.colorWarningText})),{[`&${e.componentCls}-group-wrapper-disabled`]:{[`${e.componentCls}-group-addon`]:Object.assign({},iE(e))}})}),Hy=(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)}},iF=(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}}},tF=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},iF(e,t)),{[`${e.componentCls}-prefix, ${e.componentCls}-suffix`]:{color:t.affixColor}})}),Uy=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},iF(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},iE(e))}),tF(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),tF(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),rF=(e,t)=>({[`&${e.componentCls}-group-wrapper-status-${t.status}`]:{[`${e.componentCls}-group-addon`]:{background:t.addonBg,color:t.addonColor}}}),qy=e=>({"&-filled":Object.assign(Object.assign(Object.assign({[`${e.componentCls}-group-addon`]:{background:e.colorFillTertiary,"&:last-child":{position:"static"}}},rF(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),rF(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}`}}}})}),aF=(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}}),nF=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},aF(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`}}),Gy=(e,t)=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},aF(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"}}),nF(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),nF(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)});var aE=e=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:e,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}});var sF=e=>{let{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:o}=e;return{padding:`${oe(t)} ${oe(o)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},lF=e=>({padding:`${oe(e.paddingBlockSM)} ${oe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),lp=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}`},aE(e.colorTextPlaceholder)),{"&-lg":Object.assign({},sF(e)),"&-sm":Object.assign({},lF(e)),"&-rtl, &-textarea-rtl":{direction:"rtl"}}),sE=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({},sF(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},lF(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"},pu()),{[`${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 vM=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 SM=(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}}}},yM=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},SM(e,t))}),U9=e=>({"&-outlined":Object.assign(Object.assign(Object.assign(Object.assign({},SM(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),yM(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),yM(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}`}})}),CM=(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}}}},xM=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},CM(e,t))}),q9=e=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign({},CM(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor,color:e.colorText})),xM(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,color:e.colorError})),xM(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}`}})}),G9=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}}}}),wM=(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}}}},bM=(e,t)=>({[`&${e.componentCls}-status-${t.status}`]:Object.assign({},wM(e,t))}),K9=e=>({"&-underlined":Object.assign(Object.assign(Object.assign(Object.assign({},wM(e,{borderColor:e.colorBorder,hoverBorderHover:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeOutlineColor:e.activeOutlineColor,color:e.colorText})),bM(e,{status:"error",borderColor:e.colorError,hoverBorderHover:e.colorErrorHover,activeBorderColor:e.colorError,activeOutlineColor:e.colorErrorOutline,color:e.colorError})),bM(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}`}})}),X9=e=>({[e.componentCls]:Object.assign(Object.assign(Object.assign(Object.assign({},U9(e)),q9(e)),G9(e)),K9(e))}),EM=X9;var Y9=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"}}}},Q9=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"}}}},J9=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({},Y9(e)),Q9(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()}}}}}},Z9=e=>{let{componentCls:t}=e;return[{[t]:{[`&${t}-in-form-item`]:{width:"100%"}}},J9(e),j1(e),hM(e),gM(e),{[`${t}-rtl`]:{direction:"rtl"}},Ms(e,{borderElCls:`${t}-selector`,focusElCls:`${t}-focused`})]},RM=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[Z9(r),EM(r)]},vM,{unitless:{optionLineHeight:!0,optionSelectedFontWeight:!0}});var Ji=E(D());var Ry=E(D());var e7={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"},OM=e7;var t7=function(t,r){return Ry.createElement(zt,fe({},t,{ref:r,icon:OM}))},r7=Ry.forwardRef(t7),Oy=r7;var _y=E(D());var n7={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"},_M=n7;var o7=function(t,r){return _y.createElement(zt,fe({},t,{ref:r,icon:_M}))},i7=_y.forwardRef(o7),Py=i7;var Ty=E(D());var a7={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"},PM=a7;var s7=function(t,r){return Ty.createElement(zt,fe({},t,{ref:r,icon:PM}))},l7=Ty.forwardRef(s7),Ny=l7;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(gu,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 c7=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:M,transitionName:F,tagRender:H,maxCount:j,prefix:I,dropdownRender:N,popupRender:$,onDropdownVisibleChange:U,onOpenChange:W,styles:B,classNames:q}=e,L=c7(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:z,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=z("select",s),pe=z(),Oe=R??J,{compactSize:Ce,compactItemClassnames:$e}=Xo(le,Oe),[ce,ie]=Gs("select",A,l),Re=Ko(le),[Le,Ge,Me]=RM(le,Re),Ie=ni.useMemo(()=>{let{mode:Be}=e;if(Be!=="combobox")return Be===TM?"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=B?.popup)===null||n===void 0?void 0:n.root)||((o=Q.popup)===null||o===void 0?void 0:o.root)||M,se=$||N,xe=W||U,{status:_e,hasFeedback:he,isFormItemInput:Ze,feedbackIcon:lt}=ni.useContext(dn),Et=Qi(_e,b),Tt;x!==void 0?Tt=x:Ie==="combobox"?Tt=null:Tt=G?.("Select")||ni.createElement(dM,{componentName:"Select"});let{suffixIcon:pt,itemIcon:ke,removeIcon:we,clearIcon:et}=V1(Object.assign(Object.assign({},L),{multiple:je,hasFeedback:he,feedbackIcon:lt,showSuffixIcon:We,prefixCls:le,componentName:"Select"})),Pe=O===!0?{clearIcon:et}:O,De=Kr(L,["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(qr),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`]:Ze},Yi(le,Et,he),$e,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(oM,Object.assign({ref:t,virtual:Y,showSearch:Z},De,{style:Object.assign(Object.assign(Object.assign(Object.assign({},Q.root),B?.root),K),P),dropdownMatchSelectWidth:He,transitionName:Cv(pe,"slide-up",F),builtinPlacements:pM(S,ae),listHeight:h,listItemHeight:de,mode:Ie,prefixCls:le,placement:Se,direction:Oe,prefix:I,suffixIcon:pt,menuItemSelectedIcon:ke,removeIcon:we,allowClear:Pe,notFoundContent:Tt,className:Fe,getPopupContainer:f||k,dropdownClassName:Ee,disabled:Mt,dropdownStyle:Object.assign(Object.assign({},ye),{zIndex:Ke}),maxCount:je?j:void 0,tagRender:je?H:void 0,dropdownRender:se,onDropdownVisibleChange:xe})))},Au=ni.forwardRef(u7),f7=Dk(Au,"dropdownAlign");Au.SECRET_COMBOBOX_MODE_DO_NOT_USE=TM;Au.Option=rp;Au.OptGroup=tp;Au._InternalPanelDoNotUseOrYouWillBeFired=f7;var ip=Au;var NM=E(D());function q1(){let[,e]=NM.useReducer(t=>t+1,0);return e}var bn=E(D()),Ay=E(Ne());var G1=E(Ne()),K1=E(D());function Mu(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 DM=E(Ne()),Hl=E(D()),zu=E(D());var Fu={shiftX:64,adjustY:1},Lu={adjustX:1,shiftY:!0},oi=[0,0],IM={left:{points:["cr","cl"],overflow:Lu,offset:[-4,0],targetOffset:oi},right:{points:["cl","cr"],overflow:Lu,offset:[4,0],targetOffset:oi},top:{points:["bc","tc"],overflow:Fu,offset:[0,-4],targetOffset:oi},bottom:{points:["tc","bc"],overflow:Fu,offset:[0,4],targetOffset:oi},topLeft:{points:["bl","tl"],overflow:Fu,offset:[0,-4],targetOffset:oi},leftTop:{points:["tr","tl"],overflow:Lu,offset:[-4,0],targetOffset:oi},topRight:{points:["br","tr"],overflow:Fu,offset:[0,-4],targetOffset:oi},rightTop:{points:["tl","tr"],overflow:Lu,offset:[4,0],targetOffset:oi},bottomRight:{points:["tr","br"],overflow:Fu,offset:[0,4],targetOffset:oi},rightBottom:{points:["bl","br"],overflow:Lu,offset:[4,0],targetOffset:oi},bottomLeft:{points:["tl","bl"],overflow:Fu,offset:[0,4],targetOffset:oi},leftBottom:{points:["br","bl"],overflow:Lu,offset:[-4,0],targetOffset:oi}};var d7=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],p7=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,M=t.arrowContent,F=t.overlay,H=t.id,j=t.showArrow,I=j===void 0?!0:j,N=t.classNames,$=t.styles,U=Ve(t,d7),W=Uv(H),B=(0,zu.useRef)(null);(0,zu.useImperativeHandle)(r,function(){return B.current});var q=T({},U);"visible"in t&&(q.popupVisible=t.visible);var L=function(){return Hl.createElement(Mu,{key:"content",prefixCls:p,id:W,bodyClassName:N?.body,overlayInnerStyle:T(T({},A),$?.body)},F)},k=function(){var G=Hl.Children.only(g),J=G?.props||{},Y=T(T({},J),{},{"aria-describedby":F?W:null});return Hl.cloneElement(g,Y)};return Hl.createElement(gy,fe({popupClassName:(0,DM.default)(n,N?.root),prefixCls:p,popup:L,action:i,builtinPlacements:IM,popupPlacement:b,ref:B,popupAlign:w,getPopupContainer:O,onPopupVisibleChange:h,afterPopupVisibleChange:v,popupTransitionName:y,popupAnimation:m,popupMotion:d,defaultPopupVisible:P,autoDestroy:R,mouseLeaveDelay:c,popupStyle:T(T({},u),$?.root),mouseEnterDelay:s,arrow:I},q),k())},$M=(0,zu.forwardRef)(p7);var kM=$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 MM=(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 Dy(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"},MM(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 m7(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 FM={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"]}},g7={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"]}},h7=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(FM).forEach(c=>{let u=n&&g7[c]||FM[c],f=Object.assign(Object.assign({},u),{offset:[0,0],dynamicInset:!0});switch(l[c]=f,h7.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=Dy({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=m7(c,p,t,r),a&&(f.htmlRegion="visibleFirst")}),l}var Wu=E(D()),WM=E(Ne());var v7=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"}}),Bh(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}}]},y7=e=>Object.assign(Object.assign({zIndexPopup:e.zIndexPopupBase+70},Dy({contentRadius:e.borderRadius,limitVerticalRadius:!0})),AM(ut(e,{borderRadiusOuter:Math.min(e.borderRadiusOuter,4)}))),$y=(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[v7(s),Dw(n,"zoom-big-fast")]},y7,{resetStyle:!1,injectStyle:t})(e);var zM=E(Ne());var x7=Eo.map(e=>`${e}-inverse`);function LM(e,t=!0){return t?[].concat(te(x7),te(Eo)).includes(e):Eo.includes(e)}function ky(e,t){let r=LM(t),n=(0,zM.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 b7=e=>{let{prefixCls:t,className:r,placement:n="top",title:o,color:i,overlayInnerStyle:a}=e,{getPrefixCls:s}=Wu.useContext(rt),l=s("tooltip",t),[c,u,f]=$y(l),p=ky(l,i),g=p.arrowStyle,h=Object.assign(Object.assign({},a),p.overlayStyle),v=(0,WM.default)(u,f,l,`${l}-pure`,`${l}-placement-${n}`,r,p.className);return c(Wu.createElement("div",{className:v,style:g},Wu.createElement("div",{className:`${l}-arrow`}),Wu.createElement(Mu,Object.assign({},e,{className:u,prefixCls:l,overlayInnerStyle:h}),o)))},BM=b7;var S7=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:M,classNames:F}=e,H=S7(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"]),j=!!h,[,I]=xr(),{getPopupContainer:N,getPrefixCls:$,direction:U,className:W,style:B,classNames:q,styles:L}=no("tooltip"),k=Oh("Tooltip"),z=bn.useRef(null),G=()=>{var We;(We=z.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=z.current)===null||We===void 0?void 0:We.nativeElement,popupElement:(He=z.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:j?I.sizePopupArrow:0,borderRadius:I.borderRadius,offset:I.marginXXS,visibleFirst:!0})},[d,h,m,I]),K=bn.useMemo(()=>v===0?v:y||v||"",[y,v]),Q=bn.createElement(Ws,{space:!0},typeof K=="function"?K():K),re=$("tooltip",o),ee=$(),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,Ay.default)(pe.className,i||`${re}-open`):pe.className,[Ce,$e,ce]=$y(re,!ne),ie=ky(re,s),Re=ie.arrowStyle,Le=(0,Ay.default)(A,{[`${re}-rtl`]:U==="rtl"},ie.className,O,$e,ce,W,q.root,F?.root),Ge=(0,Ay.default)(q.body,F?.body),[Me,Ie]=xv("Tooltip",H.zIndex),je=bn.createElement(kM,Object.assign({},H,{zIndex:Me,showArrow:j,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),L.root),B),P),M?.root),body:Object.assign(Object.assign(Object.assign(Object.assign({},L.body),l),M?.body),ie.overlayStyle)},getTooltipContainer:S||a||N,ref:z,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))}),jM=C7;jM._InternalPanelDoNotUseOrYouWillBeFired=BM;var Ma=jM;var VM=E(Ne());var My=E(D()),Ul=E(D()),w7=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],E7=(0,Ul.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,w7),v=(0,Ul.useRef)(null),y=(0,Ul.useRef)(null),m=ar(c,{value:a}),d=V(m,2),x=d[0],b=d[1];(0,Ul.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,VM.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")}))}),HM=E7;var UM=E(D());function J1(e){let t=UM.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 Fa(e){return ut(e,{inputAffixPadding:e.paddingXXS})}var La=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,M=Math.ceil((a-P*l)/2*10)/10-o;return{paddingBlock:Math.max(O,0),paddingBlockSM:Math.max(A,0),paddingBlockLG:Math.max(M,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 R7=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({},R7(ut(e,{hoverBorderColor:e.colorBorder,hoverBg:e.colorBgContainerDisabled})))}),QM=(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}}),qM=(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}}),[`&${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({},QM(e,{borderColor:e.colorBorder,hoverBorderColor:e.hoverBorderColor,activeBorderColor:e.activeBorderColor,activeShadow:e.activeShadow})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Z1(e))}),qM(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),qM(e,{status:"warning",borderColor:e.colorWarning,hoverBorderColor:e.colorWarningBorderHover,activeBorderColor:e.colorWarning,activeShadow:e.warningActiveShadow,affixColor:e.colorWarning})),t)}),GM=(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}}},GM(e,{status:"error",addonBorderColor:e.colorError,addonColor:e.colorErrorText})),GM(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)}},JM=(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}}},KM=(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}})}),Wy=(e,t)=>({"&-filled":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},JM(e,{bg:e.colorFillTertiary,hoverBg:e.colorFillSecondary,activeBorderColor:e.activeBorderColor})),{[`&${e.componentCls}-disabled, &[disabled]`]:Object.assign({},Z1(e))}),KM(e,{status:"error",bg:e.colorErrorBg,hoverBg:e.colorErrorBgHover,activeBorderColor:e.colorError,inputColor:e.colorErrorText,affixColor:e.colorError})),KM(e,{status:"warning",bg:e.colorWarningBg,hoverBg:e.colorWarningBgHover,activeBorderColor:e.colorWarning,inputColor:e.colorWarningText,affixColor:e.colorWarning})),t)}),XM=(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"}}},XM(e,{status:"error",addonBg:e.colorErrorBg,addonColor:e.colorErrorText})),XM(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}`}}}})}),ZM=(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}}),YM=(e,t)=>({[`&${e.componentCls}-status-${t.status}:not(${e.componentCls}-disabled)`]:Object.assign(Object.assign({},ZM(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({},ZM(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"}}),YM(e,{status:"error",borderColor:e.colorError,hoverBorderColor:e.colorErrorBorderHover,activeBorderColor:e.colorError,activeShadow:e.errorActiveShadow,affixColor:e.colorError})),YM(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 eF=e=>{let{paddingBlockLG:t,lineHeightLG:r,borderRadiusLG:n,paddingInlineLG:o}=e;return{padding:`${oe(t)} ${oe(o)}`,fontSize:e.inputFontSizeLG,lineHeight:r,borderRadius:n}},tF=e=>({padding:`${oe(e.paddingBlockSM)} ${oe(e.paddingInlineSM)}`,fontSize:e.inputFontSizeSM,borderRadius:e.borderRadiusSM}),ap=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({},eF(e)),"&-sm":Object.assign({},tF(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({},eF(e)),[`&-sm ${t}, &-sm > ${t}-group-addon`]:Object.assign({},tF(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"},pu()),{[`${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 @@ -451,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}}}})}},$7=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)),lp(e)),jy(e)),Uy(e)),Hy(e)),Gy(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"}})}},A7=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)}`}}}},k7=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({},lp(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}}}),A7(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}}}}},M7=e=>{let{componentCls:t,borderRadiusLG:r,borderRadiusSM:n}=e;return{[`${t}-group`]:Object.assign(Object.assign(Object.assign({},sr(e)),sE(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}}},Vy(e)),qy(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}}})})}},F7=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, + & > ${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}}}})}},O7=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)),ap(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"}})}},_7=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)}`}}}},P7=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({},ap(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}}}),_7(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}}}}},T7=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}}})})}},N7=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}}}}},L7=e=>{let{componentCls:t}=e;return{[`${t}-out-of-range`]:{[`&, & input, & textarea, ${t}-show-count-suffix, ${t}-data-count`]:{color:e.colorError}}}},Ky=Gt(["Input","Shared"],e=>{let t=ut(e,Fa(e));return[$7(t),k7(t)]},La,{resetFont:!1}),Xy=Gt(["Input","Component"],e=>{let t=ut(e,Fa(e));return[M7(t),F7(t),L7(t),Ms(t)]},La,{resetFont:!1});var z7=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({},JC(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}})},{[` + ${t}-affix-wrapper`]:{"&:hover, &:focus, &:active":{zIndex:2}},[`> ${t}-affix-wrapper-focused`]:{zIndex:2}}}}},I7=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,Fa(e));return[O7(t),P7(t)]},La,{resetFont:!1}),Hy=Gt(["Input","Component"],e=>{let t=ut(e,Fa(e));return[T7(t),N7(t),I7(t),Ms(t)]},La,{resetFont:!1});var D7=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}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${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 W7(e,t){let r=ut(t,{checkboxCls:`.${e}`,checkboxSize:t.controlInteractiveSize});return[z7(r)]}var Yy=Gt("Checkbox",(e,{prefixCls:t})=>[W7(t,e)]);var Jr=E(N()),lE=E(Ne());var cF=E(N()),B7=cF.default.createContext(null),Qy=B7;var j7=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:d}=e,m=j7(e,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:h,direction:v,checkbox:y}=Jr.useContext(rt),g=Jr.useContext(Qy),{isFormItemInput:p}=Jr.useContext(pn),x=Jr.useContext(qr),b=(r=g?.disabled||d)!==null&&r!==void 0?r:x,S=Jr.useRef(m.value),w=Jr.useRef(null),C=zr(t,w);Jr.useEffect(()=>{g?.registerValue(m.value)},[]),Jr.useEffect(()=>{if(!f)return m.value!==S.current&&(g?.cancelValue(S.current),g?.registerValue(m.value),S.current=m.value),()=>g?.cancelValue(m.value)},[m.value]),Jr.useEffect(()=>{var j;!((j=w.current)===null||j===void 0)&&j.input&&(w.current.input.indeterminate=s)},[s]);let R=h("checkbox",n),P=Xo(R),[O,I,D]=Yy(R,P),$=Object.assign({},m);g&&!f&&($.onChange=(...j)=>{m.onChange&&m.onChange.apply(m,j),g.toggleOption&&g.toggleOption({label:a,value:m.value})},$.name=g.name,$.checked=g.value.includes(m.value));let F=(0,lE.default)(`${R}-wrapper`,{[`${R}-rtl`]:v==="rtl",[`${R}-wrapper-checked`]:$.checked,[`${R}-wrapper-disabled`]:b,[`${R}-wrapper-in-form-item`]:p},y?.className,o,i,D,P,I),k=(0,lE.default)({[`${R}-indeterminate`]:s},vu,I),[z,B]=oE($.onClick);return O(Jr.createElement(Nv,{component:"Checkbox",disabled:b},Jr.createElement("label",{className:F,style:Object.assign(Object.assign({},y?.style),l),onMouseEnter:c,onMouseLeave:u,onClick:z},Jr.createElement(QM,Object.assign({},$,{onClick:B,prefixCls:R,className:k,disabled:b,ref:C})),a!=null&&Jr.createElement("span",{className:`${R}-label`},a))))},H7=Jr.forwardRef(V7),Jy=H7;var In=E(N()),cE=E(Ne());var U7=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=U7(e,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:f,direction:d}=In.useContext(rt),[m,h]=In.useState(u.value||r||[]),[v,y]=In.useState([]);In.useEffect(()=>{"value"in u&&h(u.value||[])},[u.value]);let g=In.useMemo(()=>o.map(k=>typeof k=="string"||typeof k=="number"?{label:k,value:k}:k),[o]),p=k=>{y(z=>z.filter(B=>B!==k))},x=k=>{y(z=>[].concat(ee(z),[k]))},b=k=>{let z=m.indexOf(k.value),B=ee(m);z===-1?B.push(k.value):B.splice(z,1),"value"in u||h(B),c?.(B.filter(j=>v.includes(j)).sort((j,G)=>{let V=g.findIndex(K=>K.value===j),H=g.findIndex(K=>K.value===G);return V-H}))},S=f("checkbox",i),w=`${S}-group`,C=Xo(S),[R,P,O]=Yy(S,C),I=Kr(u,["value","disabled"]),D=o.length?g.map(k=>In.createElement(Jy,{prefixCls:S,key:k.value.toString(),disabled:"disabled"in k?k.disabled:u.disabled,value:k.value,checked:m.includes(k.value),onChange:k.onChange,className:(0,cE.default)(`${w}-item`,k.className),style:k.style,title:k.title,id:k.id,required:k.required},k.label)):n,$=In.useMemo(()=>({toggleOption:b,value:m,disabled:u.disabled,name:u.name,registerValue:x,cancelValue:p}),[b,m,u.disabled,u.name,x,p]),F=(0,cE.default)(w,{[`${w}-rtl`]:d==="rtl"},a,s,O,C,P);return R(In.createElement("div",Object.assign({className:F,style:l},I,{ref:t}),In.createElement(Qy.Provider,{value:$},D)))});var uF=q7;var uE=Jy;uE.Group=uF;uE.__ANT_CHECKBOX=!0;var cp=uE;var Rr=E(N());var Zy=E(N());var G7={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"},fF=G7;var K7=function(t,r){return Zy.createElement(zt,ue({},t,{ref:r,icon:fF}))},X7=Zy.forwardRef(K7),dF=X7;var Kl=E(Ne());function up(){return typeof BigInt=="function"}function e0(e){return!e&&e!==0&&!Number.isNaN(e)||!String(e).trim()}function Ni(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 t0(e){var t=String(e);return!Number.isNaN(Number(t))&&t.includes("e")}function ea(e){var t=String(e);if(t0(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(".")&&ju(t)?t.length-t.indexOf(".")-1:0}function za(e){var t=String(e);if(t0(e)){if(e>Number.MAX_SAFE_INTEGER)return String(up()?BigInt(e).toString():Number.MAX_SAFE_INTEGER);if(e0&&arguments[0]!==void 0?arguments[0]:!0;return r?this.isInvalidate()?"":Ni("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),e}();var mF=function(){function e(t){if(it(this,e),_(this,"origin",""),_(this,"number",void 0),_(this,"empty",void 0),e0(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()?"":za(this.number):this.origin}}]),e}();function r0(e){return up()?new pF(e):new mF(e)}function fp(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e==="")return"";var o=Ni(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=r0(e).add("".concat(i,"0.").concat("0".repeat(r)).concat(10-u));return fp(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 Ii=r0;var _F=E(Ne());var Wa=E(Ne()),Cn=E(N());function hF(e){return!!(e.addonBefore||e.addonAfter)}function vF(e){return!!(e.prefix||e.suffix||e.allowClear)}function gF(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 Vu(e,t,r,n){if(r){var o=t;if(t.type==="click"){o=gF(t,e,""),r(o);return}if(e.type!=="file"&&n!==void 0){o=gF(t,e,n),r(o);return}r(o)}}function ql(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 Y7=Cn.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,d=e.className,m=e.style,h=e.disabled,v=e.readOnly,y=e.focused,g=e.triggerFocus,p=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,I=e.onClear,D=a??i,$=O?.affixWrapper||"span",F=O?.groupWrapper||"span",k=O?.wrapper||"span",z=O?.groupAddon||"span",B=(0,Cn.useRef)(null),j=function(Z){var re;(re=B.current)!==null&&re!==void 0&&re.contains(Z.target)&&g?.()},G=vF(e),V=(0,Cn.cloneElement)(D,{value:x,className:(0,Wa.default)((r=D.props)===null||r===void 0?void 0:r.className,!G&&C?.variant)||null}),H=(0,Cn.useRef)(null);if(Cn.default.useImperativeHandle(t,function(){return{nativeElement:H.current||B.current}}),G){var K=null;if(p){var W=!h&&!v&&x,A="".concat(s,"-clear-icon"),L=fe(p)==="object"&&p!==null&&p!==void 0&&p.clearIcon?p.clearIcon:"\u2716";K=Cn.default.createElement("button",{type:"button",tabIndex:-1,onClick:function(Z){b?.(Z),I?.()},onMouseDown:function(Z){return Z.preventDefault()},className:(0,Wa.default)(A,_(_({},"".concat(A,"-hidden"),!W),"".concat(A,"-has-suffix"),!!c))},L)}var q="".concat(s,"-affix-wrapper"),ne=(0,Wa.default)(q,_(_(_(_(_({},"".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),Y=(c||p)&&Cn.default.createElement("span",{className:(0,Wa.default)("".concat(s,"-suffix"),C?.suffix),style:P?.suffix},K,c);V=Cn.default.createElement($,ue({className:ne,style:P?.affixWrapper,onClick:j},R?.affixWrapper,{ref:B}),l&&Cn.default.createElement("span",{className:(0,Wa.default)("".concat(s,"-prefix"),C?.prefix),style:P?.prefix},l),V,Y)}if(hF(e)){var X="".concat(s,"-group"),ae="".concat(X,"-addon"),J="".concat(X,"-wrapper"),U=(0,Wa.default)("".concat(s,"-wrapper"),X,w?.wrapper,C?.wrapper),Q=(0,Wa.default)(J,_({},"".concat(J,"-disabled"),h),w?.group,C?.groupWrapper);V=Cn.default.createElement(F,{className:Q,ref:H},Cn.default.createElement(k,{className:U},u&&Cn.default.createElement(z,{className:ae},u),V,f&&Cn.default.createElement(z,{className:ae},f)))}return Cn.default.cloneElement(V,{className:(0,Wa.default)((n=V.props)===null||n===void 0?void 0:n.className,d)||null,style:T(T({},(o=V.props)===null||o===void 0?void 0:o.style),m),hidden:S})}),Gl=Y7;var n0=E(Ne());var Br=E(N());var yF=E(N()),Q7=["show"];function dp(e,t){return yF.useMemo(function(){var r={};t&&(r.show=fe(t)==="object"&&t.formatter?t.formatter:!!t),r=T(T({},r),e);var n=r,o=n.show,i=Ve(n,Q7);return T(T({},i),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:i.strategy||function(a){return a.length}})},[e,t])}var J7=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],Z7=(0,Br.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,d=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,b=e.classes,S=e.classNames,w=e.styles,C=e.onCompositionStart,R=e.onCompositionEnd,P=Ve(e,J7),O=(0,Br.useState)(!1),I=M(O,2),D=I[0],$=I[1],F=(0,Br.useRef)(!1),k=(0,Br.useRef)(!1),z=(0,Br.useRef)(null),B=(0,Br.useRef)(null),j=function(ie){z.current&&ql(z.current,ie)},G=ar(e.defaultValue,{value:e.value}),V=M(G,2),H=V[0],K=V[1],W=H==null?"":String(H),A=(0,Br.useState)(null),L=M(A,2),q=L[0],ne=L[1],Y=dp(g,y),X=Y.max||h,ae=Y.strategy(W),J=!!X&&ae>X;(0,Br.useImperativeHandle)(t,function(){var ce;return{focus:j,blur:function(){var Re;(Re=z.current)===null||Re===void 0||Re.blur()},setSelectionRange:function(Re,Le,Ge){var Me;(Me=z.current)===null||Me===void 0||Me.setSelectionRange(Re,Le,Ge)},select:function(){var Re;(Re=z.current)===null||Re===void 0||Re.select()},input:z.current,nativeElement:((ce=B.current)===null||ce===void 0?void 0:ce.nativeElement)||z.current}}),(0,Br.useEffect)(function(){k.current&&(k.current=!1),$(function(ce){return ce&&f?!1:ce})},[f]);var U=function(ie,Re,Le){var Ge=Re;if(!F.current&&Y.exceedFormatter&&Y.max&&Y.strategy(Re)>Y.max){if(Ge=Y.exceedFormatter(Re,{max:Y.max}),Re!==Ge){var Me,Ie;ne([((Me=z.current)===null||Me===void 0?void 0:Me.selectionStart)||0,((Ie=z.current)===null||Ie===void 0?void 0:Ie.selectionEnd)||0])}}else if(Le.source==="compositionEnd")return;K(Ge),z.current&&Vu(z.current,ie,n,Ge)};(0,Br.useEffect)(function(){if(q){var ce;(ce=z.current)===null||ce===void 0||ce.setSelectionRange.apply(ce,ee(q))}},[q]);var Q=function(ie){U(ie,ie.target.value,{source:"change"})},te=function(ie){F.current=!1,U(ie,ie.currentTarget.value,{source:"compositionEnd"}),R?.(ie)},Z=function(ie){a&&ie.key==="Enter"&&!k.current&&(k.current=!0,a(ie)),s?.(ie)},re=function(ie){ie.key==="Enter"&&(k.current=!1),l?.(ie)},de=function(ie){$(!0),o?.(ie)},le=function(ie){k.current&&(k.current=!1),$(!1),i?.(ie)},pe=function(ie){K(""),j(),z.current&&Vu(z.current,ie,n)},Oe=J&&"".concat(u,"-out-of-range"),Ce=function(){var ie=Kr(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Br.default.createElement("input",ue({autoComplete:r},ie,{onChange:Q,onFocus:de,onBlur:le,onKeyDown:Z,onKeyUp:re,className:(0,n0.default)(u,_({},"".concat(u,"-disabled"),f),S?.input),style:w?.input,ref:z,size:d,type:x,onCompositionStart:function(Le){F.current=!0,C?.(Le)},onCompositionEnd:te}))},$e=function(){var ie=Number(X)>0;if(v||Y.show){var Re=Y.showFormatter?Y.showFormatter({value:W,count:ae,maxLength:X}):"".concat(ae).concat(ie?" / ".concat(X):"");return Br.default.createElement(Br.default.Fragment,null,Y.show&&Br.default.createElement("span",{className:(0,n0.default)("".concat(u,"-show-count-suffix"),_({},"".concat(u,"-show-count-has-suffix"),!!v),S?.count),style:T({},w?.count)},Re),v)}return null};return Br.default.createElement(Gl,ue({},P,{prefixCls:u,className:(0,n0.default)(m,Oe),handleReset:pe,value:W,focused:D,triggerFocus:j,suffix:$e(),disabled:f,classes:b,classNames:S,styles:w,ref:B}),Ce())}),xF=Z7;var bF=xF;function fE(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 _t=E(N());var SF=E(N());function dE(e,t){var r=(0,SF.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],d=i.indexOf(f,c-1);d!==-1&&(u=d+1)}e.setSelectionRange(u,u)}catch(m){Vt(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(m.message))}}return[n,o]}var ai=E(N()),pE=E(Ne());var CF=E(N());var eU=function(){var t=(0,CF.useState)(!1),r=M(t,2),n=r[0],o=r[1];return vt(function(){o(Su())},[]),n},wF=eU;var tU=200,rU=600;function mE(e){var t=e.prefixCls,r=e.upNode,n=e.downNode,o=e.upDisabled,i=e.downDisabled,a=e.onStep,s=ai.useRef(),l=ai.useRef([]),c=ai.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,tU)}s.current=setTimeout(S,rU)};ai.useEffect(function(){return function(){u(),l.current.forEach(function(p){return dt.cancel(p)})}},[]);var d=wF();if(d)return null;var m="".concat(t,"-handler"),h=(0,pE.default)(m,"".concat(m,"-up"),_({},"".concat(m,"-up-disabled"),o)),v=(0,pE.default)(m,"".concat(m,"-down"),_({},"".concat(m,"-down-disabled"),i)),y=function(){return l.current.push(dt(u))},g={unselectable:"on",role:"button",onMouseUp:y,onMouseLeave:y};return ai.createElement("div",{className:"".concat(m,"-wrap")},ai.createElement("span",ue({},g,{onMouseDown:function(x){f(x,!0)},"aria-label":"Increase Value","aria-disabled":o,className:h}),r||ai.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-up-inner")})),ai.createElement("span",ue({},g,{onMouseDown:function(x){f(x,!1)},"aria-label":"Decrease Value","aria-disabled":i,className:v}),n||ai.createElement("span",{unselectable:"on",className:"".concat(t,"-handler-down-inner")})))}function gE(e){var t=typeof e=="number"?za(e):Ni(e).fullStr,r=t.includes(".");return r?Ni(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var o0=E(N());var EF=function(){var e=(0,o0.useRef)(0),t=function(){dt.cancel(e.current)};return(0,o0.useEffect)(function(){return t},[]),function(r){t(),e.current=dt(function(){r()})}};var nU=["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"],oU=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],RF=function(t,r){return t||r.isEmpty()?r.toString():r.toNumber()},OF=function(t){var r=Ii(t);return r.isInvalidate()?null:r},iU=_t.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,d=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,b=e.classNames,S=e.stringMode,w=e.parser,C=e.formatter,R=e.precision,P=e.decimalSeparator,O=e.onChange,I=e.onInput,D=e.onPressEnter,$=e.onStep,F=e.changeOnBlur,k=F===void 0?!0:F,z=e.domRef,B=Ve(e,nU),j="".concat(r,"-input"),G=_t.useRef(null),V=_t.useState(!1),H=M(V,2),K=H[0],W=H[1],A=_t.useRef(!1),L=_t.useRef(!1),q=_t.useRef(!1),ne=_t.useState(function(){return Ii(u??c)}),Y=M(ne,2),X=Y[0],ae=Y[1];function J(Ae){u===void 0&&ae(Ae)}var U=_t.useCallback(function(Ae,we){if(!we)return R>=0?R:Math.max(ea(Ae),ea(l))},[R,l]),Q=_t.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]),te=_t.useRef(""),Z=_t.useCallback(function(Ae,we){if(C)return C(Ae,{userTyping:we,input:String(te.current)});var et=typeof Ae=="number"?za(Ae):Ae;if(!we){var Pe=U(et,we);if(ju(et)&&(P||Pe>=0)){var De=P||".";et=fp(et,De,Pe)}}return et},[C,U,P]),re=_t.useState(function(){var Ae=c??u;return X.isInvalidate()&&["string","number"].includes(fe(Ae))?Number.isNaN(Ae)?"":Ae:Z(X.toString(),!1)}),de=M(re,2),le=de[0],pe=de[1];te.current=le;function Oe(Ae,we){pe(Z(Ae.isInvalidate()?Ae.toString(!1):Ae.toString(!we),we))}var Ce=_t.useMemo(function(){return OF(a)},[a,R]),$e=_t.useMemo(function(){return OF(i)},[i,R]),ce=_t.useMemo(function(){return!Ce||!X||X.isInvalidate()?!1:Ce.lessEquals(X)},[Ce,X]),ie=_t.useMemo(function(){return!$e||!X||X.isInvalidate()?!1:X.lessEquals($e)},[$e,X]),Re=dE(G.current,K),Le=M(Re,2),Ge=Le[0],Me=Le[1],Ie=function(we){return Ce&&!we.lessEquals(Ce)?Ce:$e&&!$e.lessEquals(we)?$e:null},je=function(we){return!Ie(we)},We=function(we,et){var Pe=we,De=je(Pe)||Pe.isEmpty();if(!Pe.isEmpty()&&!et&&(Pe=Ie(Pe)||Pe,De=!0),!d&&!f&&De){var Ee=Pe.toString(),be=U(Ee,et);return be>=0&&(Pe=Ii(fp(Ee,".",be)),je(Pe)||(Pe=Ii(fp(Ee,".",be,!0)))),Pe.equals(X)||(J(Pe),O?.(Pe.isEmpty()?null:RF(S,Pe)),u===void 0&&Oe(Pe,et)),Pe}return X},He=EF(),ye=function Ae(we){if(Ge(),te.current=we,pe(we),!L.current){var et=Q(we),Pe=Ii(et);Pe.isNaN()||We(Pe,!0)}I?.(we),He(function(){var De=we;w||(De=we.replace(/。/g,".")),De!==we&&Ae(De)})},se=function(){L.current=!0},xe=function(){L.current=!1,ye(G.current.value)},_e=function(we){ye(we.target.value)},he=function(we){var et;if(!(we&&ce||!we&&ie)){A.current=!1;var Pe=Ii(q.current?gE(l):l);we||(Pe=Pe.negate());var De=(X||Ii(0)).add(Pe.toString()),Ee=We(De,!1);$?.(RF(S,Ee),{offset:q.current?gE(l):l,type:we?"up":"down"}),(et=G.current)===null||et===void 0||et.focus()}},Ze=function(we){var et=Ii(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(){A.current=!0},Rt=function(we){var et=we.key,Pe=we.shiftKey;A.current=!0,q.current=Pe,et==="Enter"&&(L.current||(A.current=!1),Ze(!1),D?.(we)),v!==!1&&!L.current&&["Up","ArrowUp","Down","ArrowDown"].includes(et)&&(he(et==="Up"||et==="ArrowUp"),we.preventDefault())},Tt=function(){A.current=!1,q.current=!1};_t.useEffect(function(){if(g&&K){var Ae=function(Pe){he(Pe.deltaY<0),Pe.preventDefault()},we=G.current;if(we)return we.addEventListener("wheel",Ae,{passive:!1}),function(){return we.removeEventListener("wheel",Ae)}}});var pt=function(){k&&Ze(!1),W(!1),A.current=!1};return Rl(function(){X.isInvalidate()||Oe(X,!1)},[R,C]),Rl(function(){var Ae=Ii(u);ae(Ae);var we=Ii(Q(le));(!Ae.equals(we)||!A.current||C)&&Oe(Ae,A.current)},[u]),Rl(function(){C&&Me()},[le]),_t.createElement("div",{ref:z,className:(0,_F.default)(r,n,_(_(_(_(_({},"".concat(r,"-focused"),K),"".concat(r,"-disabled"),f),"".concat(r,"-readonly"),d),"".concat(r,"-not-a-number"),X.isNaN()),"".concat(r,"-out-of-range"),!X.isInvalidate()&&!je(X))),style:o,onFocus:function(){W(!0)},onBlur:pt,onKeyDown:Rt,onKeyUp:Tt,onCompositionStart:se,onCompositionEnd:xe,onBeforeInput:lt},x&&_t.createElement(mE,{prefixCls:r,upNode:m,downNode:h,upDisabled:ce,downDisabled:ie,onStep:he}),_t.createElement("div",{className:"".concat(j,"-wrap")},_t.createElement("input",ue({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":X.isInvalidate()?null:X.toString(),step:l},B,{ref:zr(G,t),className:j,value:le,onChange:_e,disabled:f,readOnly:d}))))}),aU=_t.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,d=e.classNames,m=Ve(e,oU),h=_t.useRef(null),v=_t.useRef(null),y=_t.useRef(null),g=function(x){y.current&&ql(y.current,x)};return _t.useImperativeHandle(t,function(){return fE(y.current,{focus:g,nativeElement:h.current.nativeElement||v.current})}),_t.createElement(Gl,{className:f,triggerFocus:g,prefixCls:i,value:a,disabled:r,style:n,prefix:s,suffix:l,addonAfter:u,addonBefore:c,classNames:d,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"},ref:h},_t.createElement(iU,ue({prefixCls:i,disabled:r,ref:y,domRef:v,className:d?.input},m)))}),PF=aU;var TF=PF;var NF=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({},La(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 IF=({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}}}},sU=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:d,paddingInlineLG:m,colorIcon:h,motionDurationMid:v,handleHoverColor:y,handleOpacity:g,paddingInline:p,paddingBlock:x,handleBg:b,handleActiveBg:S,colorTextDisabled:w,borderRadiusSM:C,borderRadiusLG:R,controlWidth:P,handleBorderColor:O,filledHandleBg:I,lineHeightLG:D,calc:$}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},sr(e)),lp(e)),{display:"inline-block",width:P,margin:0,padding:0,borderRadius:o}),jy(e,{[`${t}-handler-wrap`]:{background:b,[`${t}-handler-down`]:{borderBlockStart:`${oe(r)} ${n} ${O}`}}})),Uy(e,{[`${t}-handler-wrap`]:{background:I,[`${t}-handler-down`]:{borderBlockStart:`${oe(r)} ${n} ${O}`}},"&:focus-within":{[`${t}-handler-wrap`]:{background:b}}})),Gy(e,{[`${t}-handler-wrap`]:{background:b,[`${t}-handler-down`]:{borderBlockStart:`${oe(r)} ${n} ${O}`}}})),Hy(e)),{"&-rtl":{direction:"rtl",[`${t}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:a,lineHeight:D,borderRadius:R,[`input${t}-input`]:{height:$(s).sub($(r).mul(2)).equal(),padding:`${oe(d)} ${oe(m)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:C,[`input${t}-input`]:{height:$(l).sub($(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)),sE(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}}},Vy(e)),qy(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(p)}`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:o,outline:0,transition:`all ${v} linear`,appearance:"textfield",fontSize:"inherit"}),aE(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: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%",[` + `]:{[`&:hover ${t}-inner`]:{backgroundColor:e.colorPrimaryHover,borderColor:"transparent"}}},{[t]:{"&-indeterminate":{"&":{[`${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorBorder}`,"&:after":{top:"50%",insetInlineStart:"50%",width:e.calc(e.fontSizeLG).div(2).equal(),height:e.calc(e.fontSizeLG).div(2).equal(),backgroundColor:e.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}},[`&:hover ${t}-inner`]:{backgroundColor:`${e.colorBgContainer}`,borderColor:`${e.colorPrimary}`}}}}},{[`${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[D7(r)]}var Uy=Gt("Checkbox",(e,{prefixCls:t})=>[$7(t,e)]);var Jr=E(D()),rE=E(Ne());var rF=E(D()),k7=rF.default.createContext(null),qy=k7;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}=Jr.useContext(rt),m=Jr.useContext(qy),{isFormItemInput:d}=Jr.useContext(dn),x=Jr.useContext(qr),b=(r=m?.disabled||p)!==null&&r!==void 0?r:x,S=Jr.useRef(g.value),w=Jr.useRef(null),C=zr(t,w);Jr.useEffect(()=>{m?.registerValue(g.value)},[]),Jr.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]),Jr.useEffect(()=>{var $;!(($=w.current)===null||$===void 0)&&$.input&&(w.current.input.indeterminate=s)},[s]);let R=h("checkbox",n),P=Ko(R),[O,A,M]=Uy(R,P),F=Object.assign({},g);m&&!f&&(F.onChange=(...$)=>{g.onChange&&g.onChange.apply(g,$),m.toggleOption&&m.toggleOption({label:a,value:g.value})},F.name=m.name,F.checked=m.value.includes(g.value));let H=(0,rE.default)(`${R}-wrapper`,{[`${R}-rtl`]:v==="rtl",[`${R}-wrapper-checked`]:F.checked,[`${R}-wrapper-disabled`]:b,[`${R}-wrapper-in-form-item`]:d},y?.className,o,i,M,P,A),j=(0,rE.default)({[`${R}-indeterminate`]:s},hu,A),[I,N]=J1(F.onClick);return O(Jr.createElement(Rv,{component:"Checkbox",disabled:b},Jr.createElement("label",{className:H,style:Object.assign(Object.assign({},y?.style),l),onMouseEnter:c,onMouseLeave:u,onClick:I},Jr.createElement(HM,Object.assign({},F,{onClick:N,prefixCls:R,className:j,disabled:b,ref:C})),a!=null&&Jr.createElement("span",{className:`${R}-label`},a))))},F7=Jr.forwardRef(M7),Gy=F7;var Nn=E(D()),nE=E(Ne());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{let{defaultValue:r,children:n,options:o=[],prefixCls:i,className:a,rootClassName:s,style:l,onChange:c}=e,u=L7(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(j=>typeof j=="string"||typeof j=="number"?{label:j,value:j}:j),[o]),d=j=>{y(I=>I.filter(N=>N!==j))},x=j=>{y(I=>[].concat(te(I),[j]))},b=j=>{let I=g.indexOf(j.value),N=te(g);I===-1?N.push(j.value):N.splice(I,1),"value"in u||h(N),c?.(N.filter($=>v.includes($)).sort(($,U)=>{let W=m.findIndex(q=>q.value===$),B=m.findIndex(q=>q.value===U);return W-B}))},S=f("checkbox",i),w=`${S}-group`,C=Ko(S),[R,P,O]=Uy(S,C),A=Kr(u,["value","disabled"]),M=o.length?m.map(j=>Nn.createElement(Gy,{prefixCls:S,key:j.value.toString(),disabled:"disabled"in j?j.disabled:u.disabled,value:j.value,checked:g.includes(j.value),onChange:j.onChange,className:(0,nE.default)(`${w}-item`,j.className),style:j.style,title:j.title,id:j.id,required:j.required},j.label)):n,F=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:F},M)))});var nF=z7;var oE=Gy;oE.Group=nF;oE.__ANT_CHECKBOX=!0;var sp=oE;var Rr=E(D());var Ky=E(D());var W7={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"},oF=W7;var B7=function(t,r){return Ky.createElement(zt,fe({},t,{ref:r,icon:oF}))},j7=Ky.forwardRef(B7),iF=j7;var Kl=E(Ne());function lp(){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(".")&&Bu(t)?t.length-t.indexOf(".")-1:0}function za(e){var t=String(e);if(Yy(e)){if(e>Number.MAX_SAFE_INTEGER)return String(lp()?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 sF=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()?"":za(this.number):this.origin}}]),e}();function Qy(e){return lp()?new aF(e):new sF(e)}function cp(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 cp(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 bF=E(Ne());var Wa=E(Ne()),Sn=E(D());function cF(e){return!!(e.addonBefore||e.addonAfter)}function uF(e){return!!(e.prefix||e.suffix||e.allowClear)}function lF(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 ju(e,t,r,n){if(r){var o=t;if(t.type==="click"){o=lF(t,e,""),r(o);return}if(e.type!=="file"&&n!==void 0){o=lF(t,e,n),r(o);return}r(o)}}function ql(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 V7=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,M=a??i,F=O?.affixWrapper||"span",H=O?.groupWrapper||"span",j=O?.wrapper||"span",I=O?.groupAddon||"span",N=(0,Sn.useRef)(null),$=function(ee){var ne;(ne=N.current)!==null&&ne!==void 0&&ne.contains(ee.target)&&m?.()},U=uF(e),W=(0,Sn.cloneElement)(M,{value:x,className:(0,Wa.default)((r=M.props)===null||r===void 0?void 0:r.className,!U&&C?.variant)||null}),B=(0,Sn.useRef)(null);if(Sn.default.useImperativeHandle(t,function(){return{nativeElement:B.current||N.current}}),U){var q=null;if(d){var L=!h&&!v&&x,k="".concat(s,"-clear-icon"),z=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,Wa.default)(k,_(_({},"".concat(k,"-hidden"),!L),"".concat(k,"-has-suffix"),!!c))},z)}var G="".concat(s,"-affix-wrapper"),J=(0,Wa.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,Wa.default)("".concat(s,"-suffix"),C?.suffix),style:P?.suffix},q,c);W=Sn.default.createElement(F,fe({className:J,style:P?.affixWrapper,onClick:$},R?.affixWrapper,{ref:N}),l&&Sn.default.createElement("span",{className:(0,Wa.default)("".concat(s,"-prefix"),C?.prefix),style:P?.prefix},l),W,Y)}if(cF(e)){var X="".concat(s,"-group"),ae="".concat(X,"-addon"),Z="".concat(X,"-wrapper"),K=(0,Wa.default)("".concat(s,"-wrapper"),X,w?.wrapper,C?.wrapper),Q=(0,Wa.default)(Z,_({},"".concat(Z,"-disabled"),h),w?.group,C?.groupWrapper);W=Sn.default.createElement(H,{className:Q,ref:B},Sn.default.createElement(j,{className:K},u&&Sn.default.createElement(I,{className:ae},u),W,f&&Sn.default.createElement(I,{className:ae},f)))}return Sn.default.cloneElement(W,{className:(0,Wa.default)((n=W.props)===null||n===void 0?void 0:n.className,p)||null,style:T(T({},(o=W.props)===null||o===void 0?void 0:o.style),g),hidden:S})}),Gl=V7;var Jy=E(Ne());var Br=E(D());var fF=E(D()),H7=["show"];function up(e,t){return fF.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,H7);return T(T({},i),{},{show:!!o,showFormatter:typeof o=="function"?o:void 0,strategy:i.strategy||function(a){return a.length}})},[e,t])}var U7=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],q7=(0,Br.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,U7),O=(0,Br.useState)(!1),A=V(O,2),M=A[0],F=A[1],H=(0,Br.useRef)(!1),j=(0,Br.useRef)(!1),I=(0,Br.useRef)(null),N=(0,Br.useRef)(null),$=function(ie){I.current&&ql(I.current,ie)},U=ar(e.defaultValue,{value:e.value}),W=V(U,2),B=W[0],q=W[1],L=B==null?"":String(B),k=(0,Br.useState)(null),z=V(k,2),G=z[0],J=z[1],Y=up(m,y),X=Y.max||h,ae=Y.strategy(L),Z=!!X&&ae>X;(0,Br.useImperativeHandle)(t,function(){var ce;return{focus:$,blur:function(){var Re;(Re=I.current)===null||Re===void 0||Re.blur()},setSelectionRange:function(Re,Le,Ge){var Me;(Me=I.current)===null||Me===void 0||Me.setSelectionRange(Re,Le,Ge)},select:function(){var Re;(Re=I.current)===null||Re===void 0||Re.select()},input:I.current,nativeElement:((ce=N.current)===null||ce===void 0?void 0:ce.nativeElement)||I.current}}),(0,Br.useEffect)(function(){j.current&&(j.current=!1),F(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=I.current)===null||Me===void 0?void 0:Me.selectionStart)||0,((Ie=I.current)===null||Ie===void 0?void 0:Ie.selectionEnd)||0])}}else if(Le.source==="compositionEnd")return;q(Ge),I.current&&ju(I.current,ie,n,Ge)};(0,Br.useEffect)(function(){if(G){var ce;(ce=I.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"&&!j.current&&(j.current=!0,a(ie)),s?.(ie)},ne=function(ie){ie.key==="Enter"&&(j.current=!1),l?.(ie)},de=function(ie){F(!0),o?.(ie)},le=function(ie){j.current&&(j.current=!1),F(!1),i?.(ie)},pe=function(ie){q(""),$(),I.current&&ju(I.current,ie,n)},Oe=Z&&"".concat(u,"-out-of-range"),Ce=function(){var ie=Kr(e,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return Br.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:I,size:p,type:x,onCompositionStart:function(Le){H.current=!0,C?.(Le)},onCompositionEnd:re}))},$e=function(){var ie=Number(X)>0;if(v||Y.show){var Re=Y.showFormatter?Y.showFormatter({value:L,count:ae,maxLength:X}):"".concat(ae).concat(ie?" / ".concat(X):"");return Br.default.createElement(Br.default.Fragment,null,Y.show&&Br.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 Br.default.createElement(Gl,fe({},P,{prefixCls:u,className:(0,Jy.default)(g,Oe),handleReset:pe,value:L,focused:M,triggerFocus:$,suffix:$e(),disabled:f,classes:b,classNames:S,styles:w,ref:N}),Ce())}),dF=q7;var pF=dF;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 _t=E(D());var mF=E(D());function aE(e,t){var r=(0,mF.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(D()),sE=E(Ne());var gF=E(D());var G7=function(){var t=(0,gF.useState)(!1),r=V(t,2),n=r[0],o=r[1];return vt(function(){o(bu())},[]),n},hF=G7;var K7=200,X7=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,K7)}s.current=setTimeout(S,X7)};ii.useEffect(function(){return function(){u(),l.current.forEach(function(d){return dt.cancel(d)})}},[]);var p=hF();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"?za(e):Ti(e).fullStr,r=t.includes(".");return r?Ti(t.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:e+"0"}var Zy=E(D());var vF=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 Y7=["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"],Q7=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","className","classNames"],yF=function(t,r){return t||r.isEmpty()?r.toString():r.toNumber()},xF=function(t){var r=Ni(t);return r.isInvalidate()?null:r},J7=_t.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,M=e.onPressEnter,F=e.onStep,H=e.changeOnBlur,j=H===void 0?!0:H,I=e.domRef,N=Ve(e,Y7),$="".concat(r,"-input"),U=_t.useRef(null),W=_t.useState(!1),B=V(W,2),q=B[0],L=B[1],k=_t.useRef(!1),z=_t.useRef(!1),G=_t.useRef(!1),J=_t.useState(function(){return Ni(u??c)}),Y=V(J,2),X=Y[0],ae=Y[1];function Z(ke){u===void 0&&ae(ke)}var K=_t.useCallback(function(ke,we){if(!we)return R>=0?R:Math.max(Zi(ke),Zi(l))},[R,l]),Q=_t.useCallback(function(ke){var we=String(ke);if(w)return w(we);var et=we;return P&&(et=et.replace(P,".")),et.replace(/[^\w.-]+/g,"")},[w,P]),re=_t.useRef(""),ee=_t.useCallback(function(ke,we){if(C)return C(ke,{userTyping:we,input:String(re.current)});var et=typeof ke=="number"?za(ke):ke;if(!we){var Pe=K(et,we);if(Bu(et)&&(P||Pe>=0)){var De=P||".";et=cp(et,De,Pe)}}return et},[C,K,P]),ne=_t.useState(function(){var ke=c??u;return X.isInvalidate()&&["string","number"].includes(ue(ke))?Number.isNaN(ke)?"":ke:ee(X.toString(),!1)}),de=V(ne,2),le=de[0],pe=de[1];re.current=le;function Oe(ke,we){pe(ee(ke.isInvalidate()?ke.toString(!1):ke.toString(!we),we))}var Ce=_t.useMemo(function(){return xF(a)},[a,R]),$e=_t.useMemo(function(){return xF(i)},[i,R]),ce=_t.useMemo(function(){return!Ce||!X||X.isInvalidate()?!1:Ce.lessEquals(X)},[Ce,X]),ie=_t.useMemo(function(){return!$e||!X||X.isInvalidate()?!1:X.lessEquals($e)},[$e,X]),Re=aE(U.current,q),Le=V(Re,2),Ge=Le[0],Me=Le[1],Ie=function(we){return Ce&&!we.lessEquals(Ce)?Ce:$e&&!$e.lessEquals(we)?$e:null},je=function(we){return!Ie(we)},We=function(we,et){var Pe=we,De=je(Pe)||Pe.isEmpty();if(!Pe.isEmpty()&&!et&&(Pe=Ie(Pe)||Pe,De=!0),!p&&!f&&De){var Ee=Pe.toString(),be=K(Ee,et);return be>=0&&(Pe=Ni(cp(Ee,".",be)),je(Pe)||(Pe=Ni(cp(Ee,".",be,!0)))),Pe.equals(X)||(Z(Pe),O?.(Pe.isEmpty()?null:yF(S,Pe)),u===void 0&&Oe(Pe,et)),Pe}return X},He=vF(),ye=function ke(we){if(Ge(),re.current=we,pe(we),!z.current){var et=Q(we),Pe=Ni(et);Pe.isNaN()||We(Pe,!0)}A?.(we),He(function(){var De=we;w||(De=we.replace(/。/g,".")),De!==we&&ke(De)})},se=function(){z.current=!0},xe=function(){z.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 De=(X||Ni(0)).add(Pe.toString()),Ee=We(De,!1);F?.(yF(S,Ee),{offset:G.current?cE(l):l,type:we?"up":"down"}),(et=U.current)===null||et===void 0||et.focus()}},Ze=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"&&(z.current||(k.current=!1),Ze(!1),M?.(we)),v!==!1&&!z.current&&["Up","ArrowUp","Down","ArrowDown"].includes(et)&&(he(et==="Up"||et==="ArrowUp"),we.preventDefault())},Tt=function(){k.current=!1,G.current=!1};_t.useEffect(function(){if(m&&q){var ke=function(Pe){he(Pe.deltaY<0),Pe.preventDefault()},we=U.current;if(we)return we.addEventListener("wheel",ke,{passive:!1}),function(){return we.removeEventListener("wheel",ke)}}});var pt=function(){j&&Ze(!1),L(!1),k.current=!1};return Rl(function(){X.isInvalidate()||Oe(X,!1)},[R,C]),Rl(function(){var ke=Ni(u);ae(ke);var we=Ni(Q(le));(!ke.equals(we)||!k.current||C)&&Oe(ke,k.current)},[u]),Rl(function(){C&&Me()},[le]),_t.createElement("div",{ref:I,className:(0,bF.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(){L(!0)},onBlur:pt,onKeyDown:Et,onKeyUp:Tt,onCompositionStart:se,onCompositionEnd:xe,onBeforeInput:lt},x&&_t.createElement(lE,{prefixCls:r,upNode:g,downNode:h,upDisabled:ce,downDisabled:ie,onStep:he}),_t.createElement("div",{className:"".concat($,"-wrap")},_t.createElement("input",fe({autoComplete:"off",role:"spinbutton","aria-valuemin":i,"aria-valuemax":a,"aria-valuenow":X.isInvalidate()?null:X.toString(),step:l},N,{ref:zr(U,t),className:$,value:le,onChange:_e,disabled:f,readOnly:p}))))}),Z7=_t.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,Q7),h=_t.useRef(null),v=_t.useRef(null),y=_t.useRef(null),m=function(x){y.current&&ql(y.current,x)};return _t.useImperativeHandle(t,function(){return iE(y.current,{focus:m,nativeElement:h.current.nativeElement||v.current})}),_t.createElement(Gl,{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},_t.createElement(J7,fe({prefixCls:i,disabled:r,ref:y,domRef:v,className:p?.input},g)))}),SF=Z7;var CF=SF;var wF=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({},La(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 EF=({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}}}},eU=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:M,calc:F}=e;return[{[t]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},sr(e)),ap(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:M,borderRadius:R,[`input${t}-input`]:{height:F(s).sub(F(r).mul(2)).equal(),padding:`${oe(p)} ${oe(g)}`}},"&-sm":{padding:0,fontSize:i,borderRadius:C,[`input${t}-input`]:{height:F(l).sub(F(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:`${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({},Pa()),{color:h,transition:`all ${v} linear`,userSelect:"none"})},[`${t}-handler-up`]:{borderStartEndRadius:o},[`${t}-handler-down`]:{borderEndEndRadius:o}},IF(e,"lg")),IF(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}},EF(e,"lg")),EF(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}})}]},lU=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:d}=e;return{[`${t}-affix-wrapper`]:Object.assign(Object.assign({[`input${t}-input`]:{padding:`${oe(r)} 0`}},lp(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 ${d}`}},[`&: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()}})}},DF=Gt("InputNumber",e=>{let t=ut(e,Fa(e));return[sU(t),lU(t),Ms(t)]},NF,{unitless:{handleOpacity:!0}});var cU=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:d,suffix:m,bordered:h,readOnly:v,status:y,controls:g,variant:p}=e,x=cU(e,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","suffix","bordered","readOnly","status","controls","variant"]),b=r("input-number",c),S=Xo(b),[w,C,R]=DF(b,S),{compactSize:P,compactItemClassnames:O}=Yo(b,n),I=Rr.createElement(dF,{className:`${b}-handler-up-inner`}),D=Rr.createElement($y,{className:`${b}-handler-down-inner`}),$=typeof g=="boolean"?g:void 0;typeof g=="object"&&(I=typeof g.upIcon>"u"?I:Rr.createElement("span",{className:`${b}-handler-up-inner`},g.upIcon),D=typeof g.downIcon>"u"?D:Rr.createElement("span",{className:`${b}-handler-down-inner`},g.downIcon));let{hasFeedback:F,status:k,isFormItemInput:z,feedbackIcon:B}=Rr.useContext(pn),j=Ji(k,y),G=so(Y=>{var X;return(X=s??P)!==null&&X!==void 0?X:Y}),V=Rr.useContext(qr),H=l??V,[K,W]=Gs("inputNumber",p,h),A=F&&Rr.createElement(Rr.Fragment,null,B),L=(0,Kl.default)({[`${b}-lg`]:G==="large",[`${b}-sm`]:G==="small",[`${b}-rtl`]:n==="rtl",[`${b}-in-form-item`]:z},C),q=`${b}-group`,ne=Rr.createElement(TF,Object.assign({ref:o,disabled:H,className:(0,Kl.default)(R,S,i,a,O),upHandler:I,downHandler:D,prefixCls:b,readOnly:v,controls:$,prefix:d,suffix:A||m,addonBefore:u&&Rr.createElement(Ws,{form:!0,space:!0},u),addonAfter:f&&Rr.createElement(Ws,{form:!0,space:!0},f),classNames:{input:L,variant:(0,Kl.default)({[`${b}-${K}`]:W},Qi(b,j,F)),affixWrapper:(0,Kl.default)({[`${b}-affix-wrapper-sm`]:G==="small",[`${b}-affix-wrapper-lg`]:G==="large",[`${b}-affix-wrapper-rtl`]:n==="rtl",[`${b}-affix-wrapper-without-controls`]:g===!1||H},C),wrapper:(0,Kl.default)({[`${q}-rtl`]:n==="rtl"},C),groupWrapper:(0,Kl.default)({[`${b}-group-wrapper-sm`]:G==="small",[`${b}-group-wrapper-lg`]:G==="large",[`${b}-group-wrapper-rtl`]:n==="rtl",[`${b}-group-wrapper-${K}`]:W},Qi(`${b}-group-wrapper`,j,F),C)}},x));return w(ne)}),AF=$F,uU=e=>Rr.createElement(Ia,{theme:{components:{InputNumber:{handleVisible:!0}}}},Rr.createElement($F,Object.assign({},e)));AF._InternalPanelDoNotUseOrYouWillBeFired=uU;var i0=AF;var fo=E(N()),Xl=E(Ne());var kF=E(N());var fU=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:kF.default.createElement(gu,null)}),t},a0=fU;var s0=E(N());function pp(e,t){let r=(0,s0.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,s0.useEffect)(()=>(t&&n(),()=>r.current.forEach(o=>{o&&clearTimeout(o)})),[]),n}function MF(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var dU=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:d,className:m,style:h,styles:v,rootClassName:y,onChange:g,classNames:p,variant:x}=e,b=dU(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:I,styles:D}=oo("input"),$=S("input",r),F=(0,fo.useRef)(null),k=Xo($),[z,B,j]=Ky($,y),[G]=Xy($,k),{compactSize:V,compactItemClassnames:H}=Yo($,w),K=so(pe=>{var Oe;return(Oe=i??V)!==null&&Oe!==void 0?Oe:pe}),W=fo.default.useContext(qr),A=a??W,{status:L,hasFeedback:q,feedbackIcon:ne}=(0,fo.useContext)(pn),Y=Ji(L,o),X=MF(e)||!!q,ae=(0,fo.useRef)(X),J=pp(F,!0),U=pe=>{J(),s?.(pe)},Q=pe=>{J(),l?.(pe)},te=pe=>{J(),g?.(pe)},Z=(q||c)&&fo.default.createElement(fo.default.Fragment,null,c,q&&ne),re=a0(u??C),[de,le]=Gs("input",x,n);return z(G(fo.default.createElement(bF,Object.assign({ref:zr(t,F),prefixCls:$,autoComplete:R},b,{disabled:A,onBlur:U,onFocus:Q,style:Object.assign(Object.assign({},O),h),styles:Object.assign(Object.assign({},D),v),suffix:Z,allowClear:re,className:(0,Xl.default)(m,y,j,k,H,P),onChange:te,addonBefore:d&&fo.default.createElement(Ws,{form:!0,space:!0},d),addonAfter:f&&fo.default.createElement(Ws,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},p),I),{input:(0,Xl.default)({[`${$}-sm`]:K==="small",[`${$}-lg`]:K==="large",[`${$}-rtl`]:w==="rtl"},p?.input,I.input,B),variant:(0,Xl.default)({[`${$}-${de}`]:le},Qi($,Y)),affixWrapper:(0,Xl.default)({[`${$}-affix-wrapper-sm`]:K==="small",[`${$}-affix-wrapper-lg`]:K==="large",[`${$}-affix-wrapper-rtl`]:w==="rtl"},B),wrapper:(0,Xl.default)({[`${$}-group-rtl`]:w==="rtl"},B),groupWrapper:(0,Xl.default)({[`${$}-group-wrapper-sm`]:K==="small",[`${$}-group-wrapper-lg`]:K==="large",[`${$}-group-wrapper-rtl`]:w==="rtl",[`${$}-group-wrapper-${de}`]:le},Qi(`${$}-group-wrapper`,Y,q),B)})}))))}),Ks=pU;var wE=E(Ne());var Pt=E(N());var Xn=E(N()),LF=E(Hi());function l0(e,t,r){return(e-t)/(r-t)}function Hu(e,t,r,n){var o=l0(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 ta(e,t){return Array.isArray(e)?e[t]:e}var FF=E(Ne());var Uu=E(N());var hE=E(N()),mU=hE.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),po=mU,vE=hE.createContext({});var gU=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],hU=Uu.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,d=e.onChangeComplete,m=e.onFocus,h=e.onMouseEnter,v=Ve(e,gU),y=Uu.useContext(po),g=y.min,p=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,I=y.ariaValueTextFormatterForHandle,D=y.styles,$=y.classNames,F="".concat(r,"-handle"),k=function(L){b||i(L,o)},z=function(L){m?.(L,o)},B=function(L){h(L,o)},j=function(L){if(!b&&S){var q=null;switch(L.which||L.keyCode){case Qe.LEFT:q=x==="ltr"||x==="btt"?-1:1;break;case Qe.RIGHT:q=x==="ltr"||x==="btt"?1:-1;break;case Qe.UP:q=x!=="ttb"?1:-1;break;case Qe.DOWN:q=x!=="ttb"?-1:1;break;case Qe.HOME:q="min";break;case Qe.END:q="max";break;case Qe.PAGE_UP:q=2;break;case Qe.PAGE_DOWN:q=-2;break;case Qe.BACKSPACE:case Qe.DELETE:a(o);break}q!==null&&(L.preventDefault(),f(q,o))}},G=function(L){switch(L.which||L.keyCode){case Qe.LEFT:case Qe.RIGHT:case Qe.UP:case Qe.DOWN:case Qe.HOME:case Qe.END:case Qe.PAGE_UP:case Qe.PAGE_DOWN:d?.();break}},V=Hu(x,n,g,p),H={};if(o!==null){var K;H={tabIndex:b?null:ta(C,o),role:"slider","aria-valuemin":g,"aria-valuemax":p,"aria-valuenow":n,"aria-disabled":b,"aria-label":ta(R,o),"aria-labelledby":ta(P,o),"aria-required":ta(O,o),"aria-valuetext":(K=ta(I,o))===null||K===void 0?void 0:K(n),"aria-orientation":x==="ltr"||x==="rtl"?"horizontal":"vertical",onMouseDown:k,onTouchStart:k,onFocus:z,onMouseEnter:B,onKeyDown:j,onKeyUp:G}}var W=Uu.createElement("div",ue({ref:t,className:(0,FF.default)(F,_(_(_({},"".concat(F,"-").concat(o+1),o!==null&&w),"".concat(F,"-dragging"),c),"".concat(F,"-dragging-delete"),u),$.handle),style:T(T(T({},V),s),D.handle)},H,v));return l&&(W=l(W,{index:o,prefixCls:r,value:n,dragging:c,draggingDelete:u})),W}),yE=hU;var vU=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],yU=Xn.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,d=Ve(e,vU),m=Xn.useRef({}),h=Xn.useState(!1),v=M(h,2),y=v[0],g=v[1],p=Xn.useState(-1),x=M(p,2),b=x[0],S=x[1],w=function(I){S(I),g(!0)},C=function(I,D){w(D),f?.(I)},R=function(I,D){w(D)};Xn.useImperativeHandle(t,function(){return{focus:function(I){var D;(D=m.current[I])===null||D===void 0||D.focus()},hideHelp:function(){(0,LF.flushSync)(function(){g(!1)})}}});var P=T({prefixCls:r,onStartMove:o,onOffsetChange:i,render:s,onFocus:C,onMouseEnter:R},d);return Xn.createElement(Xn.Fragment,null,a.map(function(O,I){var D=c===I;return Xn.createElement(yE,ue({ref:function(F){F?m.current[I]=F:delete m.current[I]},dragging:D,draggingDelete:D&&u,style:ta(n,I),key:I,value:O,valueIndex:I},P))}),l&&y&&Xn.createElement(yE,ue({key:"a11y"},P,{value:a[b],valueIndex:null,dragging:c!==-1,draggingDelete:u,render:l,style:{pointerEvents:"none"},tabIndex:null,"aria-hidden":!0})))}),zF=yU;var xE=E(N());var WF=E(Ne()),c0=E(N());var xU=function(t){var r=t.prefixCls,n=t.style,o=t.children,i=t.value,a=t.onClick,s=c0.useContext(po),l=s.min,c=s.max,u=s.direction,f=s.includedStart,d=s.includedEnd,m=s.included,h="".concat(r,"-text"),v=Hu(u,i,l,c);return c0.createElement("span",{className:(0,WF.default)(h,_({},"".concat(h,"-active"),m&&f<=i&&i<=d)),style:T(T({},v),n),onMouseDown:function(g){g.stopPropagation()},onClick:function(){a(i)}},o)},BF=xU;var bU=function(t){var r=t.prefixCls,n=t.marks,o=t.onClick,i="".concat(r,"-mark");return n.length?xE.createElement("div",{className:i},n.map(function(a){var s=a.value,l=a.style,c=a.label;return xE.createElement(BF,{key:s,prefixCls:i,style:l,value:s,onClick:o},c)})):null},jF=bU;var Yl=E(N());var VF=E(Ne()),u0=E(N());var SU=function(t){var r=t.prefixCls,n=t.value,o=t.style,i=t.activeStyle,a=u0.useContext(po),s=a.min,l=a.max,c=a.direction,u=a.included,f=a.includedStart,d=a.includedEnd,m="".concat(r,"-dot"),h=u&&f<=n&&n<=d,v=T(T({},Hu(c,n,s,l)),typeof o=="function"?o(n):o);return h&&(v=T(T({},v),typeof i=="function"?i(n):i)),u0.createElement("span",{className:(0,VF.default)(m,_({},"".concat(m,"-active"),h)),style:v})},HF=SU;var CU=function(t){var r=t.prefixCls,n=t.marks,o=t.dots,i=t.style,a=t.activeStyle,s=Yl.useContext(po),l=s.min,c=s.max,u=s.step,f=Yl.useMemo(function(){var d=new Set;if(n.forEach(function(h){d.add(h.value)}),o&&u!==null)for(var m=l;m<=c;)d.add(m),m+=u;return Array.from(d)},[l,c,u,o,n]);return Yl.createElement("div",{className:"".concat(r,"-step")},f.map(function(d){return Yl.createElement(HF,{prefixCls:r,key:d,value:d,style:i,activeStyle:a})}))},UF=CU;var GF=E(Ne()),ra=E(N());var qF=E(Ne()),f0=E(N());var wU=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=f0.useContext(po),u=c.direction,f=c.min,d=c.max,m=c.disabled,h=c.range,v=c.classNames,y="".concat(r,"-track"),g=l0(o,f,d),p=l0(i,f,d),x=function(C){!m&&s&&s(C,-1)},b={};switch(u){case"rtl":b.right="".concat(g*100,"%"),b.width="".concat(p*100-g*100,"%");break;case"btt":b.bottom="".concat(g*100,"%"),b.height="".concat(p*100-g*100,"%");break;case"ttb":b.top="".concat(g*100,"%"),b.height="".concat(p*100-g*100,"%");break;default:b.left="".concat(g*100,"%"),b.width="".concat(p*100-g*100,"%")}var S=l||(0,qF.default)(y,_(_({},"".concat(y,"-").concat(a+1),a!==null&&h),"".concat(r,"-track-draggable"),s),v.track);return f0.createElement("div",{className:S,style:T(T({},b),n),onMouseDown:x,onTouchStart:x})},bE=wU;var EU=function(t){var r=t.prefixCls,n=t.style,o=t.values,i=t.startPoint,a=t.onStartMove,s=ra.useContext(po),l=s.included,c=s.range,u=s.min,f=s.styles,d=s.classNames,m=ra.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 g=[],p=0;pRU&&u3&&arguments[3]!==void 0?arguments[3]:"unit";if(typeof v=="number"){var p,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;g==="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}),g==="unit"&&(S=S.filter(function(O){return O!==x}));var C=g==="unit"?x:b;p=S[0];var R=Math.abs(p-C);if(S.forEach(function(O){var I=Math.abs(O-C);I1){var P=ee(h);return P[y]=p,m(P,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}},f=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],b=c(p,v,y,g);if(p[y]=b,o===!1){var S=i||0;y>0&&p[y-1]!==x&&(p[y]=Math.max(p[y],p[y-1]+S)),y0;P-=1)for(var O=!0;f(p[P]-p[P-1])&&O;){var I=u(p,-1,P-1);p[P-1]=I.value,O=I.changed}for(var D=p.length-1;D>0;D-=1)for(var $=!0;f(p[D]-p[D-1])&&$;){var F=u(p,-1,D-1);p[D-1]=F.value,$=F.changed}for(var k=0;k=0?B:!1},[B,We]),ye=Pt.useMemo(function(){return Object.keys(Y||{}).map(function(ke){var ve=Y[ke],nt={value:Number(ke)};return ve&&fe(ve)==="object"&&!Pt.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=SE(Ie,je,We,ye,k,He),xe=M(se,2),_e=xe[0],he=xe[1],Ze=ar(C,{value:w}),lt=M(Ze,2),Rt=lt[0],Tt=lt[1],pt=Pt.useMemo(function(){var ke=Rt==null?[]:Array.isArray(Rt)?Rt:[Rt],ve=M(ke,1),nt=ve[0],It=nt===void 0?Ie:nt,Dt=Rt===null?[]:[It];if(ie){if(Dt=ee(ke),P||Rt===void 0){var gn=P>=0?P+1:2;for(Dt=Dt.slice(0,gn);Dt.length=0&&pe.current.focus(ke)}Nt(null)},[kt]);var Ft=Pt.useMemo(function(){return Le&&We===null?!1:Le},[Le,We]),rr=wt(function(ke,ve){Se(ke,ve),I?.(Ae(pt))}),pr=be!==-1;Pt.useEffect(function(){if(!pr){var ke=pt.lastIndexOf(ht);pe.current.focus(ke)}},[pr]);var mr=Pt.useMemo(function(){return ee(Fe).sort(function(ke,ve){return ke-ve})},[Fe]),Mn=Pt.useMemo(function(){return ie?[mr[0],mr[mr.length-1]]:[Ie,mr[0]]},[mr,ie,Ie]),gr=M(Mn,2),Lt=gr[0],Te=gr[1];Pt.useImperativeHandle(t,function(){return{focus:function(){pe.current.focus(0)},blur:function(){var ve,nt=document,It=nt.activeElement;(ve=Oe.current)!==null&&ve!==void 0&&ve.contains(It)&&It?.blur()}}}),Pt.useEffect(function(){m&&pe.current.focus(0)},[]);var Ue=Pt.useMemo(function(){return{min:Ie,max:je,direction:Ce,disabled:u,keyboard:d,step:We,included:H,includedStart:Lt,includedEnd:Te,range:ie,tabIndex:te,ariaLabelForHandle:Z,ariaLabelledByForHandle:re,ariaRequired:de,ariaValueTextFormatterForHandle:le,styles:s||{},classNames:a||{}}},[Ie,je,Ce,u,d,We,H,Lt,Te,ie,te,Z,re,de,le,s,a]);return Pt.createElement(po.Provider,{value:Ue},Pt.createElement("div",{ref:Oe,className:(0,wE.default)(n,o,_(_(_(_({},"".concat(n,"-disabled"),u),"".concat(n,"-vertical"),G),"".concat(n,"-horizontal"),!G),"".concat(n,"-with-marks"),ye.length)),style:i,onMouseDown:Be,id:l},Pt.createElement("div",{className:(0,wE.default)("".concat(n,"-rail"),a?.rail),style:T(T({},L),s?.rail)}),U!==!1&&Pt.createElement(KF,{prefixCls:n,style:W,values:pt,startPoint:K,onStartMove:Ft?rr:void 0}),Pt.createElement(UF,{prefixCls:n,marks:ye,dots:X,style:q,activeStyle:ne}),Pt.createElement(zF,{ref:pe,prefixCls:n,style:A,values:Fe,draggingIndex:be,draggingDelete:Mt,onStartMove:rr,onOffsetChange:tr,onFocus:h,onBlur:v,handleRender:ae,activeHandleRender:J,onChangeComplete:et,onDelete:Re?Pe:void 0}),Pt.createElement(jF,{prefixCls:n,marks:ye,onClick:Ke})))}),JF=_U;var ZF=JF;var na=E(N()),Ku=E(Ne());var eL=E(N()),PU=(0,eL.createContext)({}),tL=PU;var qu=E(N()),EE=E(N());var TU=qu.forwardRef((e,t)=>{let{open:r,draggingDelete:n,value:o}=e,i=(0,EE.useRef)(null),a=r&&!n,s=(0,EE.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 qu.useEffect(()=>(a?c():l(),l),[a,e.title,o]),qu.createElement(Ma,Object.assign({ref:zr(i,t)},e,{open:a}))}),RE=TU;var NU=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:d,handleActiveOutlineColor:m,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:` + `]:{color:w}})}]},tU=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`}},ap(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()}})}},RF=Gt("InputNumber",e=>{let t=ut(e,Fa(e));return[eU(t),tU(t),Ms(t)]},wF,{unitless:{handleOpacity:!0}});var rU=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=rU(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]=RF(b,S),{compactSize:P,compactItemClassnames:O}=Xo(b,n),A=Rr.createElement(iF,{className:`${b}-handler-up-inner`}),M=Rr.createElement(Py,{className:`${b}-handler-down-inner`}),F=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),M=typeof m.downIcon>"u"?M:Rr.createElement("span",{className:`${b}-handler-down-inner`},m.downIcon));let{hasFeedback:H,status:j,isFormItemInput:I,feedbackIcon:N}=Rr.useContext(dn),$=Qi(j,y),U=ao(Y=>{var X;return(X=s??P)!==null&&X!==void 0?X:Y}),W=Rr.useContext(qr),B=l??W,[q,L]=Gs("inputNumber",d,h),k=H&&Rr.createElement(Rr.Fragment,null,N),z=(0,Kl.default)({[`${b}-lg`]:U==="large",[`${b}-sm`]:U==="small",[`${b}-rtl`]:n==="rtl",[`${b}-in-form-item`]:I},C),G=`${b}-group`,J=Rr.createElement(CF,Object.assign({ref:o,disabled:B,className:(0,Kl.default)(R,S,i,a,O),upHandler:A,downHandler:M,prefixCls:b,readOnly:v,controls:F,prefix:p,suffix:k||g,addonBefore:u&&Rr.createElement(Ws,{form:!0,space:!0},u),addonAfter:f&&Rr.createElement(Ws,{form:!0,space:!0},f),classNames:{input:z,variant:(0,Kl.default)({[`${b}-${q}`]:L},Yi(b,$,H)),affixWrapper:(0,Kl.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||B},C),wrapper:(0,Kl.default)({[`${G}-rtl`]:n==="rtl"},C),groupWrapper:(0,Kl.default)({[`${b}-group-wrapper-sm`]:U==="small",[`${b}-group-wrapper-lg`]:U==="large",[`${b}-group-wrapper-rtl`]:n==="rtl",[`${b}-group-wrapper-${q}`]:L},Yi(`${b}-group-wrapper`,$,H),C)}},x));return w(J)}),_F=OF,nU=e=>Rr.createElement(Ia,{theme:{components:{InputNumber:{handleVisible:!0}}}},Rr.createElement(OF,Object.assign({},e)));_F._InternalPanelDoNotUseOrYouWillBeFired=nU;var e0=_F;var uo=E(D()),Xl=E(Ne());var PF=E(D());var oU=e=>{let t;return typeof e=="object"&&e?.clearIcon?t=e:e&&(t={clearIcon:PF.default.createElement(gu,null)}),t},t0=oU;var r0=E(D());function fp(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 TF(e){return!!(e.prefix||e.suffix||e.allowClear||e.showCount)}var iU=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=iU(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:M}=no("input"),F=S("input",r),H=(0,uo.useRef)(null),j=Ko(F),[I,N,$]=Vy(F,y),[U]=Hy(F,j),{compactSize:W,compactItemClassnames:B}=Xo(F,w),q=ao(pe=>{var Oe;return(Oe=i??W)!==null&&Oe!==void 0?Oe:pe}),L=uo.default.useContext(qr),k=a??L,{status:z,hasFeedback:G,feedbackIcon:J}=(0,uo.useContext)(dn),Y=Qi(z,o),X=TF(e)||!!G,ae=(0,uo.useRef)(X),Z=fp(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]=Gs("input",x,n);return I(U(uo.default.createElement(pF,Object.assign({ref:zr(t,H),prefixCls:F,autoComplete:R},b,{disabled:k,onBlur:K,onFocus:Q,style:Object.assign(Object.assign({},O),h),styles:Object.assign(Object.assign({},M),v),suffix:ee,allowClear:ne,className:(0,Xl.default)(g,y,$,j,B,P),onChange:re,addonBefore:p&&uo.default.createElement(Ws,{form:!0,space:!0},p),addonAfter:f&&uo.default.createElement(Ws,{form:!0,space:!0},f),classNames:Object.assign(Object.assign(Object.assign({},d),A),{input:(0,Xl.default)({[`${F}-sm`]:q==="small",[`${F}-lg`]:q==="large",[`${F}-rtl`]:w==="rtl"},d?.input,A.input,N),variant:(0,Xl.default)({[`${F}-${de}`]:le},Yi(F,Y)),affixWrapper:(0,Xl.default)({[`${F}-affix-wrapper-sm`]:q==="small",[`${F}-affix-wrapper-lg`]:q==="large",[`${F}-affix-wrapper-rtl`]:w==="rtl"},N),wrapper:(0,Xl.default)({[`${F}-group-rtl`]:w==="rtl"},N),groupWrapper:(0,Xl.default)({[`${F}-group-wrapper-sm`]:q==="small",[`${F}-group-wrapper-lg`]:q==="large",[`${F}-group-wrapper-rtl`]:w==="rtl",[`${F}-group-wrapper-${de}`]:le},Yi(`${F}-group-wrapper`,Y,G),N)})}))))}),Ks=aU;var vE=E(Ne());var Pt=E(D());var Kn=E(D()),IF=E(Vi());function n0(e,t,r){return(e-t)/(r-t)}function Vu(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 NF=E(Ne());var Hu=E(D());var uE=E(D()),sU=uE.createContext({min:0,max:0,direction:"ltr",step:1,includedStart:0,includedEnd:0,tabIndex:0,keyboard:!0,styles:{},classNames:{}}),fo=sU,fE=uE.createContext({});var lU=["prefixCls","value","valueIndex","onStartMove","onDelete","style","render","dragging","draggingDelete","onOffsetChange","onChangeComplete","onFocus","onMouseEnter"],cU=Hu.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,lU),y=Hu.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,M=y.styles,F=y.classNames,H="".concat(r,"-handle"),j=function(z){b||i(z,o)},I=function(z){g?.(z,o)},N=function(z){h(z,o)},$=function(z){if(!b&&S){var G=null;switch(z.which||z.keyCode){case Qe.LEFT:G=x==="ltr"||x==="btt"?-1:1;break;case Qe.RIGHT:G=x==="ltr"||x==="btt"?1:-1;break;case Qe.UP:G=x!=="ttb"?1:-1;break;case Qe.DOWN:G=x!=="ttb"?-1:1;break;case Qe.HOME:G="min";break;case Qe.END:G="max";break;case Qe.PAGE_UP:G=2;break;case Qe.PAGE_DOWN:G=-2;break;case Qe.BACKSPACE:case Qe.DELETE:a(o);break}G!==null&&(z.preventDefault(),f(G,o))}},U=function(z){switch(z.which||z.keyCode){case Qe.LEFT:case Qe.RIGHT:case Qe.UP:case Qe.DOWN:case Qe.HOME:case Qe.END:case Qe.PAGE_UP:case Qe.PAGE_DOWN:p?.();break}},W=Vu(x,n,m,d),B={};if(o!==null){var q;B={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:j,onTouchStart:j,onFocus:I,onMouseEnter:N,onKeyDown:$,onKeyUp:U}}var L=Hu.createElement("div",fe({ref:t,className:(0,NF.default)(H,_(_(_({},"".concat(H,"-").concat(o+1),o!==null&&w),"".concat(H,"-dragging"),c),"".concat(H,"-dragging-delete"),u),F.handle),style:T(T(T({},W),s),M.handle)},B,v));return l&&(L=l(L,{index:o,prefixCls:r,value:n,dragging:c,draggingDelete:u})),L}),dE=cU;var uU=["prefixCls","style","onStartMove","onOffsetChange","values","handleRender","activeHandleRender","draggingIndex","draggingDelete","onFocus"],fU=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,uU),g=Kn.useRef({}),h=Kn.useState(!1),v=V(h,2),y=v[0],m=v[1],d=Kn.useState(-1),x=V(d,2),b=x[0],S=x[1],w=function(A){S(A),m(!0)},C=function(A,M){w(M),f?.(A)},R=function(A,M){w(M)};Kn.useImperativeHandle(t,function(){return{focus:function(A){var M;(M=g.current[A])===null||M===void 0||M.focus()},hideHelp:function(){(0,IF.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 M=c===A;return Kn.createElement(dE,fe({ref:function(H){H?g.current[A]=H:delete g.current[A]},dragging:M,draggingDelete:M&&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})))}),DF=fU;var pE=E(D());var $F=E(Ne()),o0=E(D());var dU=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=Vu(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)},kF=dU;var pU=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(kF,{key:s,prefixCls:i,style:l,value:s,onClick:o},c)})):null},AF=pU;var Yl=E(D());var MF=E(Ne()),i0=E(D());var mU=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({},Vu(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,MF.default)(g,_({},"".concat(g,"-active"),h)),style:v})},FF=mU;var gU=function(t){var r=t.prefixCls,n=t.marks,o=t.dots,i=t.style,a=t.activeStyle,s=Yl.useContext(fo),l=s.min,c=s.max,u=s.step,f=Yl.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 Yl.createElement("div",{className:"".concat(r,"-step")},f.map(function(p){return Yl.createElement(FF,{prefixCls:r,key:p,value:p,style:i,activeStyle:a})}))},LF=gU;var WF=E(Ne()),ta=E(D());var zF=E(Ne()),a0=E(D());var hU=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,zF.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=hU;var vU=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;dyU&&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 M=d.length-1;M>0;M-=1)for(var F=!0;f(d[M]-d[M-1])&&F;){var H=u(d,-1,M-1);d[M-1]=H.value,F=H.changed}for(var j=0;j=0?N:!1},[N,We]),ye=Pt.useMemo(function(){return Object.keys(Y||{}).map(function(Ae){var ve=Y[Ae],nt={value:Number(Ae)};return ve&&ue(ve)==="object"&&!Pt.isValidElement(ve)&&("label"in ve||"style"in ve)?(nt.style=ve.style,nt.label=ve.label):nt.label=ve,nt}).filter(function(Ae){var ve=Ae.label;return ve||typeof ve=="number"}).sort(function(Ae,ve){return Ae.value-ve.value})},[Y]),se=gE(Ie,je,We,ye,j,He),xe=V(se,2),_e=xe[0],he=xe[1],Ze=ar(C,{value:w}),lt=V(Ze,2),Et=lt[0],Tt=lt[1],pt=Pt.useMemo(function(){var Ae=Et==null?[]:Array.isArray(Et)?Et:[Et],ve=V(Ae,1),nt=ve[0],It=nt===void 0?Ie:nt,Dt=Et===null?[]:[It];if(ie){if(Dt=te(Ae),P||Et===void 0){var mn=P>=0?P+1:2;for(Dt=Dt.slice(0,mn);Dt.length=0&&pe.current.focus(Ae)}Nt(null)},[At]);var Ft=Pt.useMemo(function(){return Le&&We===null?!1:Le},[Le,We]),rr=wt(function(Ae,ve){Se(Ae,ve),A?.(ke(pt))}),pr=be!==-1;Pt.useEffect(function(){if(!pr){var Ae=pt.lastIndexOf(ht);pe.current.focus(Ae)}},[pr]);var mr=Pt.useMemo(function(){return te(Fe).sort(function(Ae,ve){return Ae-ve})},[Fe]),An=Pt.useMemo(function(){return ie?[mr[0],mr[mr.length-1]]:[Ie,mr[0]]},[mr,ie,Ie]),gr=V(An,2),Lt=gr[0],Te=gr[1];Pt.useImperativeHandle(t,function(){return{focus:function(){pe.current.focus(0)},blur:function(){var ve,nt=document,It=nt.activeElement;(ve=Oe.current)!==null&&ve!==void 0&&ve.contains(It)&&It?.blur()}}}),Pt.useEffect(function(){g&&pe.current.focus(0)},[]);var Ue=Pt.useMemo(function(){return{min:Ie,max:je,direction:Ce,disabled:u,keyboard:p,step:We,included:B,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,B,Lt,Te,ie,re,ee,ne,de,le,s,a]);return Pt.createElement(fo.Provider,{value:Ue},Pt.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},Pt.createElement("div",{className:(0,vE.default)("".concat(n,"-rail"),a?.rail),style:T(T({},z),s?.rail)}),K!==!1&&Pt.createElement(BF,{prefixCls:n,style:L,values:pt,startPoint:q,onStartMove:Ft?rr:void 0}),Pt.createElement(LF,{prefixCls:n,marks:ye,dots:X,style:G,activeStyle:J}),Pt.createElement(DF,{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}),Pt.createElement(AF,{prefixCls:n,marks:ye,onClick:Ke})))}),UF=bU;var qF=UF;var ra=E(D()),Gu=E(Ne());var GF=E(D()),SU=(0,GF.createContext)({}),KF=SU;var Uu=E(D()),yE=E(D());var CU=Uu.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 Uu.useEffect(()=>(a?c():l(),l),[a,e.title,o]),Uu.createElement(Ma,Object.assign({ref:zr(i,t)},e,{open:a}))}),xE=CU;var wU=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(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)} ${d}`,outline:`6px solid ${m}`,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`},[` + `},"&: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 ${oe(h)} ${l}`,insetInlineStart:0,insetBlockStart:0},[` ${t}-mark-text, ${t}-dot - `]:{cursor:"not-allowed !important"}},[`&-tooltip ${r}-tooltip-inner`]:{minWidth:"unset"}})}},rL=(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",d=t?"top":"insetInlineStart",m=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]:m},[`${r}-mark`]:{insetInlineStart:0,top:0,[d]:s(n).mul(3).add(t?0:a).equal(),[c]:"100%"},[`${r}-step`]:{insetInlineStart:0,top:0,[d]:n,[c]:"100%",[u]:n},[`${r}-dot`]:{position:"absolute",[f]:s(n).sub(i).div(2).equal()}}},IU=e=>{let{componentCls:t,marginPartWithMark:r}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},rL(e,!0)),{[`&${t}-with-marks`]:{marginBottom:r}})}},DU=e=>{let{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},rL(e,!1)),{height:"100%"})}},$U=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}},nL=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[NU(t),IU(t),DU(t)]},$U);var Gu=E(N());function mp(){let[e,t]=Gu.useState(!1),r=Gu.useRef(null),n=()=>{dt.cancel(r.current)},o=i=>{n(),i?t(i):r.current=dt(()=>{t(i)})};return Gu.useEffect(()=>n,[]),[e,o]}var AU=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 MU=na.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:d,tooltip:m={},onChangeComplete:h,classNames:v,styles:y}=e,g=AU(e,["prefixCls","range","className","rootClassName","style","disabled","tooltipPrefixCls","tipFormatter","tooltipVisible","getTooltipPopupContainer","tooltipPlacement","tooltip","onChangeComplete","classNames","styles"]),{vertical:p}=e,{getPrefixCls:x,direction:b,className:S,style:w,classNames:C,styles:R,getPopupContainer:P}=oo("slider"),O=na.default.useContext(qr),I=s??O,{handleRender:D,direction:$}=na.default.useContext(tL),k=($||b)==="rtl",[z,B]=mp(),[j,G]=mp(),V=Object.assign({},m),{open:H,placement:K,getPopupContainer:W,prefixCls:A,formatter:L}=V,q=H??u,ne=(z||j)&&q!==!1,Y=kU(L,c),[X,ae]=mp(),J=ie=>{h?.(ie),ae(!1)},U=(ie,Re)=>ie||(Re?k?"left":"right":"top"),Q=x("slider",r),[te,Z,re]=nL(Q),de=(0,Ku.default)(o,S,C.root,v?.root,i,{[`${Q}-rtl`]:k,[`${Q}-lock`]:X},Z,re);k&&!g.vertical&&(g.reverse=!g.reverse),na.default.useEffect(()=>{let ie=()=>{dt(()=>{G(!1)},1)};return document.addEventListener("mouseup",ie),()=>{document.removeEventListener("mouseup",ie)}},[]);let le=n&&!q,pe=D||((ie,Re)=>{let{index:Le}=Re,Ge=ie.props;function Me(He,ye,se){var xe,_e,he,Ze;se&&((_e=(xe=g)[He])===null||_e===void 0||_e.call(xe,ye)),(Ze=(he=Ge)[He])===null||Ze===void 0||Ze.call(he,ye)}let Ie=Object.assign(Object.assign({},Ge),{onMouseEnter:He=>{B(!0),Me("onMouseEnter",He)},onMouseLeave:He=>{B(!1),Me("onMouseLeave",He)},onMouseDown:He=>{G(!0),ae(!0),Me("onMouseDown",He)},onFocus:He=>{var ye;G(!0),(ye=g.onFocus)===null||ye===void 0||ye.call(g,He),Me("onFocus",He,!0)},onBlur:He=>{var ye;G(!1),(ye=g.onBlur)===null||ye===void 0||ye.call(g,He),Me("onBlur",He,!0)}}),je=na.default.cloneElement(ie,Ie),We=(!!q||ne)&&Y!==null;return le?je:na.default.createElement(RE,Object.assign({},V,{prefixCls:x("tooltip",A??l),title:Y?Y(Re.value):"",value:Re.value,open:We,placement:U(K??d,p),key:Le,classNames:{root:`${Q}-tooltip`},getPopupContainer:W||f||P}),je)}),Oe=le?(ie,Re)=>{let Le=na.default.cloneElement(ie,{style:Object.assign(Object.assign({},ie.props.style),{visibility:"hidden"})});return na.default.createElement(RE,Object.assign({},V,{prefixCls:x("tooltip",A??l),title:Y?Y(Re.value):"",open:Y!==null&&ne,placement:U(K??d,p),key:"tooltip",classNames:{root:`${Q}-tooltip`},getPopupContainer:W||f||P,draggingDelete:Re.draggingDelete}),Le)}:void 0,Ce=Object.assign(Object.assign(Object.assign(Object.assign({},R.root),w),y?.root),a),$e=Object.assign(Object.assign({},R.tracks),y?.tracks),ce=(0,Ku.default)(C.tracks,v?.tracks);return te(na.default.createElement(ZF,Object.assign({},g,{classNames:Object.assign({handle:(0,Ku.default)(C.handle,v?.handle),rail:(0,Ku.default)(C.rail,v?.rail),track:(0,Ku.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($e).length?{tracks:$e}:{}),step:g.step,range:n,className:de,style:Ce,disabled:I,ref:t,prefixCls:Q,handleRender:pe,activeHandleRender:Oe,onChangeComplete:J})))}),OE=MU;function _E(e){return["small","middle","large"].includes(e)}var p0=E(N()),sL=E(Ne());var oL=E(Ne()),PE=["wrap","nowrap","wrap-reverse"],TE=["flex-start","flex-end","start","end","center","space-between","space-around","space-evenly","stretch","normal","left","right"],NE=["center","start","end","flex-start","flex-end","self-start","self-end","baseline","normal","stretch"],FU=(e,t)=>{let r=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${r}`]:r&&PE.includes(r)}},LU=(e,t)=>{let r={};return NE.forEach(n=>{r[`${e}-align-${n}`]=t.align===n}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r},zU=(e,t)=>{let r={};return TE.forEach(n=>{r[`${e}-justify-${n}`]=t.justify===n}),r};function WU(e,t){return(0,oL.default)(Object.assign(Object.assign(Object.assign({},FU(e,t)),LU(e,t)),zU(e,t)))}var iL=WU;var BU=e=>{let{componentCls:t}=e;return{[t]:{display:"flex",margin:0,padding:0,"&-vertical":{flexDirection:"column"},"&-rtl":{direction:"rtl"},"&:empty":{display:"none"}}}},jU=e=>{let{componentCls:t}=e;return{[t]:{"&-gap-small":{gap:e.flexGapSM},"&-gap-middle":{gap:e.flexGap},"&-gap-large":{gap:e.flexGapLG}}}},VU=e=>{let{componentCls:t}=e,r={};return PE.forEach(n=>{r[`${t}-wrap-${n}`]={flexWrap:n}}),r},HU=e=>{let{componentCls:t}=e,r={};return NE.forEach(n=>{r[`${t}-align-${n}`]={alignItems:n}}),r},UU=e=>{let{componentCls:t}=e,r={};return TE.forEach(n=>{r[`${t}-justify-${n}`]={justifyContent:n}}),r},qU=()=>({}),aL=Gt("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:n}=e,o=ut(e,{flexGapSM:t,flexGap:r,flexGapLG:n});return[BU(o),jU(o),VU(o),HU(o),UU(o)]},qU,{resetStyle:!1});var GU=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=GU(e,["prefixCls","rootClassName","className","style","flex","gap","children","vertical","component"]),{flex:d,direction:m,getPrefixCls:h}=p0.default.useContext(rt),v=h("flex",r),[y,g,p]=aL(v),x=c??d?.vertical,b=(0,sL.default)(o,n,d?.className,v,g,p,iL(v,e),{[`${v}-rtl`]:m==="rtl",[`${v}-gap-${s}`]:_E(s),[`${v}-vertical`]:x}),S=Object.assign(Object.assign({},d?.style),i);return a&&(S.flex=a),s&&!_E(s)&&(S.gap=s),y(p0.default.createElement(u,Object.assign({ref:t,className:b,style:S},Kr(f,["justify","wrap","align"])),l))}),Ba=KU;var m0=E(N());var XU={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"},lL=XU;var YU=function(t,r){return m0.createElement(zt,ue({},t,{ref:r,icon:lL}))},QU=m0.forwardRef(YU),g0=QU;var IE=E(N()),gp=E(N()),cL=E(Ne());var JU=e=>{let{getPrefixCls:t,direction:r}=(0,gp.useContext)(rt),{prefixCls:n,className:o}=e,i=t("input-group",n),a=t("input"),[s,l,c]=Xy(a),u=(0,cL.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,gp.useContext)(pn),d=(0,gp.useMemo)(()=>Object.assign(Object.assign({},f),{isFormItemInput:!1}),[f]);return s(IE.createElement("span",{className:u,style:e.style,onMouseEnter:e.onMouseEnter,onMouseLeave:e.onMouseLeave,onFocus:e.onFocus,onBlur:e.onBlur},IE.createElement(pn.Provider,{value:d},e.children)))},uL=JU;var dr=E(N()),mL=E(Ne());var ZU=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}}}},fL=Gt(["Input","OTP"],e=>{let t=ut(e,Fa(e));return[ZU(t)]},La);var si=E(N()),dL=E(Ne());var eq=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=eq(e,["className","value","onChange","onActiveChange","index","mask"]),{getPrefixCls:c}=si.useContext(rt),u=c("otp"),f=typeof s=="string"?s:n,d=si.useRef(null);si.useImperativeHandle(t,()=>d.current);let m=g=>{o(a,g.target.value)},h=()=>{dt(()=>{var g;let p=(g=d.current)===null||g===void 0?void 0:g.input;document.activeElement===p&&p&&p.select()})},v=g=>{let{key:p,ctrlKey:x,metaKey:b}=g;p==="ArrowLeft"?i(a-1):p==="ArrowRight"?i(a+1):p==="z"&&(x||b)&&g.preventDefault(),h()},y=g=>{g.key==="Backspace"&&!n&&i(a-1),h()};return si.createElement("span",{className:`${u}-input-wrapper`,role:"presentation"},s&&n!==""&&n!==void 0&&si.createElement("span",{className:`${u}-mask-icon`,"aria-hidden":"true"},f),si.createElement(Ks,Object.assign({"aria-label":`OTP Input ${a+1}`,type:s===!0?"password":"text"},l,{ref:d,value:n,onInput:m,onFocus:h,onKeyDown:v,onKeyUp:y,onMouseDown:h,onMouseUp:h,className:(0,dL.default)(r,{[`${u}-mask-input`]:s})})))}),pL=tq;var rq=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},oq=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:d,autoFocus:m,mask:h,type:v,onInput:y,inputMode:g}=e,p=rq(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=Go(p,{aria:!0,data:!0,attr:!0}),[C,R,P]=fL(S),O=so(A=>o??A),I=dr.useContext(pn),D=Ji(I.status,d),$=dr.useMemo(()=>Object.assign(Object.assign({},I),{status:D,hasFeedback:!1,feedbackIcon:null}),[I,D]),F=dr.useRef(null),k=dr.useRef({});dr.useImperativeHandle(t,()=>({focus:()=>{var A;(A=k.current[0])===null||A===void 0||A.focus()},blur:()=>{var A;for(let L=0;Ll?l(A):A,[B,j]=dr.useState(()=>h0(z(i||"")));dr.useEffect(()=>{a!==void 0&&j(h0(a))},[a]);let G=wt(A=>{j(A),y&&y(A),s&&A.length===n&&A.every(L=>L)&&A.some((L,q)=>B[q]!==L)&&s(A.join(""))}),V=wt((A,L)=>{let q=ee(B);for(let Y=0;Y=0&&!q[Y];Y-=1)q.pop();let ne=z(q.map(Y=>Y||" ").join(""));return q=h0(ne).map((Y,X)=>Y===" "&&!q[X]?q[X]:Y),q}),H=(A,L)=>{var q;let ne=V(A,L),Y=Math.min(A+L.length,n-1);Y!==A&&ne[A]!==void 0&&((q=k.current[Y])===null||q===void 0||q.focus()),G(ne)},K=A=>{var L;(L=k.current[A])===null||L===void 0||L.focus()},W={variant:u,disabled:f,status:D,mask:h,type:v,inputMode:g};return C(dr.createElement("div",Object.assign({},w,{ref:F,className:(0,mL.default)(S,{[`${S}-sm`]:O==="small",[`${S}-lg`]:O==="large",[`${S}-rtl`]:b==="rtl"},P,R),role:"group"}),dr.createElement(pn.Provider,{value:$},Array.from({length:n}).map((A,L)=>{let q=`otp-${L}`,ne=B[L]||"";return dr.createElement(dr.Fragment,{key:q},dr.createElement(pL,Object.assign({ref:Y=>{k.current[L]=Y},index:L,size:O,htmlSize:1,className:`${S}-input`,onChange:H,value:ne,onActiveChange:K,autoFocus:L===0&&m},W)),Le?$n.createElement(g0,null):$n.createElement(vL,null),uq={click:"onClick",hover:"onMouseOver"},fq=$n.forwardRef((e,t)=>{let{disabled:r,action:n="click",visibilityToggle:o=!0,iconRender:i=cq}=e,a=$n.useContext(qr),s=r??a,l=typeof o=="object"&&o.visible!==void 0,[c,u]=(0,y0.useState)(()=>l?o.visible:!1),f=(0,y0.useRef)(null);$n.useEffect(()=>{l&&u(o.visible)},[l,o]);let d=pp(f),m=()=>{var O;if(s)return;c&&d();let I=!c;u(I),typeof o=="object"&&((O=o.onVisibleChange)===null||O===void 0||O.call(o,I))},h=O=>{let I=uq[n]||"",D=i(c),$={[I]:m,className:`${O}-icon`,key:"passwordIcon",onMouseDown:F=>{F.preventDefault()},onMouseUp:F=>{F.preventDefault()}};return $n.cloneElement($n.isValidElement(D)?D:$n.createElement("span",null,D),$)},{className:v,prefixCls:y,inputPrefixCls:g,size:p}=e,x=lq(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:b}=$n.useContext(rt),S=b("input",g),w=b("input-password",y),C=o&&h(w),R=(0,yL.default)(w,v,{[`${w}-${p}`]:!!p}),P=Object.assign(Object.assign({},Kr(x,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:R,prefixCls:S,suffix:C});return p&&(P.size=p),$n.createElement(Ks,Object.assign({ref:zr(t,f)},P))}),xL=fq;var Di=E(N());var bL=E(Ne());var dq=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:d,onCompositionStart:m,onCompositionEnd:h,variant:v,onPressEnter:y}=e,g=dq(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter"]),{getPrefixCls:p,direction:x}=Di.useContext(rt),b=Di.useRef(!1),S=p("input-search",r),w=p("input",n),{compactSize:C}=Yo(S,x),R=so(W=>{var A;return(A=i??C)!==null&&A!==void 0?A:W}),P=Di.useRef(null),O=W=>{W?.target&&W.type==="click"&&f&&f(W.target.value,W,{source:"clear"}),d?.(W)},I=W=>{var A;document.activeElement===((A=P.current)===null||A===void 0?void 0:A.input)&&W.preventDefault()},D=W=>{var A,L;f&&f((L=(A=P.current)===null||A===void 0?void 0:A.input)===null||L===void 0?void 0:L.value,W,{source:"input"})},$=W=>{b.current||c||(y?.(W),D(W))},F=typeof s=="boolean"?Di.createElement(ky,null):null,k=`${S}-button`,z,B=s||{},j=B.type&&B.type.__ANT_BUTTON===!0;j||B.type==="button"?z=Ko(B,Object.assign({onMouseDown:I,onClick:W=>{var A,L;(L=(A=B?.props)===null||A===void 0?void 0:A.onClick)===null||L===void 0||L.call(A,W),D(W)},key:"enterButton"},j?{className:k,size:R}:{})):z=Di.createElement(Bd,{className:k,color:s?"primary":"default",size:R,disabled:u,key:"enterButton",onMouseDown:I,onClick:D,loading:c,icon:F,variant:v==="borderless"||v==="filled"||v==="underlined"?"text":s?"solid":void 0},s),l&&(z=[z,Ko(l,{key:"addonAfter"})]);let G=(0,bL.default)(S,{[`${S}-rtl`]:x==="rtl",[`${S}-${R}`]:!!R,[`${S}-with-button`]:!!s},o),V=W=>{b.current=!0,m?.(W)},H=W=>{b.current=!1,h?.(W)},K=Object.assign(Object.assign({},g),{className:G,prefixCls:w,type:"search",size:R,variant:v,onPressEnter:$,onCompositionStart:V,onCompositionEnd:H,addonAfter:z,suffix:a,onChange:O,disabled:u});return Di.createElement(Ks,Object.assign({ref:zr(P,t)},K))}),SL=pq;var No=E(N()),OL=E(N()),vp=E(Ne());var hp=E(Ne());var Zr=E(N());var CL=E(Ne());var wn=E(N());var mq=` + `]:{cursor:"not-allowed !important"}},[`&-tooltip ${r}-tooltip-inner`]:{minWidth:"unset"}})}},XF=(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()}}},EU=e=>{let{componentCls:t,marginPartWithMark:r}=e;return{[`${t}-horizontal`]:Object.assign(Object.assign({},XF(e,!0)),{[`&${t}-with-marks`]:{marginBottom:r}})}},RU=e=>{let{componentCls:t}=e;return{[`${t}-vertical`]:Object.assign(Object.assign({},XF(e,!1)),{height:"100%"})}},OU=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}},YF=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[wU(t),EU(t),RU(t)]},OU);var qu=E(D());function dp(){let[e,t]=qu.useState(!1),r=qu.useRef(null),n=()=>{dt.cancel(r.current)},o=i=>{n(),i?t(i):r.current=dt(()=>{t(i)})};return qu.useEffect(()=>n,[]),[e,o]}var _U=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 TU=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=_U(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(qr),A=s??O,{handleRender:M,direction:F}=ra.default.useContext(KF),j=(F||b)==="rtl",[I,N]=dp(),[$,U]=dp(),W=Object.assign({},g),{open:B,placement:q,getPopupContainer:L,prefixCls:k,formatter:z}=W,G=B??u,J=(I||$)&&G!==!1,Y=PU(z,c),[X,ae]=dp(),Z=ie=>{h?.(ie),ae(!1)},K=(ie,Re)=>ie||(Re?j?"left":"right":"top"),Q=x("slider",r),[re,ee,ne]=YF(Q),de=(0,Gu.default)(o,S,C.root,v?.root,i,{[`${Q}-rtl`]:j,[`${Q}-lock`]:X},ee,ne);j&&!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=M||((ie,Re)=>{let{index:Le}=Re,Ge=ie.props;function Me(He,ye,se){var xe,_e,he,Ze;se&&((_e=(xe=m)[He])===null||_e===void 0||_e.call(xe,ye)),(Ze=(he=Ge)[He])===null||Ze===void 0||Ze.call(he,ye)}let Ie=Object.assign(Object.assign({},Ge),{onMouseEnter:He=>{N(!0),Me("onMouseEnter",He)},onMouseLeave:He=>{N(!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({},W,{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:L||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({},W,{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:L||f||P,draggingDelete:Re.draggingDelete}),Le)}:void 0,Ce=Object.assign(Object.assign(Object.assign(Object.assign({},R.root),w),y?.root),a),$e=Object.assign(Object.assign({},R.tracks),y?.tracks),ce=(0,Gu.default)(C.tracks,v?.tracks);return re(ra.default.createElement(qF,Object.assign({},m,{classNames:Object.assign({handle:(0,Gu.default)(C.handle,v?.handle),rail:(0,Gu.default)(C.rail,v?.rail),track:(0,Gu.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($e).length?{tracks:$e}:{}),step:m.step,range:n,className:de,style:Ce,disabled:A,ref:t,prefixCls:Q,handleRender:pe,activeHandleRender:Oe,onChangeComplete:Z})))}),bE=TU;function SE(e){return["small","middle","large"].includes(e)}var l0=E(D()),eL=E(Ne());var QF=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"],NU=(e,t)=>{let r=t.wrap===!0?"wrap":t.wrap;return{[`${e}-wrap-${r}`]:r&&CE.includes(r)}},IU=(e,t)=>{let r={};return EE.forEach(n=>{r[`${e}-align-${n}`]=t.align===n}),r[`${e}-align-stretch`]=!t.align&&!!t.vertical,r},DU=(e,t)=>{let r={};return wE.forEach(n=>{r[`${e}-justify-${n}`]=t.justify===n}),r};function $U(e,t){return(0,QF.default)(Object.assign(Object.assign(Object.assign({},NU(e,t)),IU(e,t)),DU(e,t)))}var JF=$U;var kU=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}}}},MU=e=>{let{componentCls:t}=e,r={};return CE.forEach(n=>{r[`${t}-wrap-${n}`]={flexWrap:n}}),r},FU=e=>{let{componentCls:t}=e,r={};return EE.forEach(n=>{r[`${t}-align-${n}`]={alignItems:n}}),r},LU=e=>{let{componentCls:t}=e,r={};return wE.forEach(n=>{r[`${t}-justify-${n}`]={justifyContent:n}}),r},zU=()=>({}),ZF=Gt("Flex",e=>{let{paddingXS:t,padding:r,paddingLG:n}=e,o=ut(e,{flexGapSM:t,flexGap:r,flexGapLG:n});return[kU(o),AU(o),MU(o),FU(o),LU(o)]},zU,{resetStyle:!1});var WU=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=WU(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]=ZF(v),x=c??p?.vertical,b=(0,eL.default)(o,n,p?.className,v,m,d,JF(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},Kr(f,["justify","wrap","align"])),l))}),Ba=BU;var c0=E(D());var jU={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"},tL=jU;var VU=function(t,r){return c0.createElement(zt,fe({},t,{ref:r,icon:tL}))},HU=c0.forwardRef(VU),u0=HU;var RE=E(D()),pp=E(D()),rL=E(Ne());var UU=e=>{let{getPrefixCls:t,direction:r}=(0,pp.useContext)(rt),{prefixCls:n,className:o}=e,i=t("input-group",n),a=t("input"),[s,l,c]=Hy(a),u=(0,rL.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,pp.useContext)(dn),p=(0,pp.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(dn.Provider,{value:p},e.children)))},nL=UU;var dr=E(D()),sL=E(Ne());var qU=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}}}},oL=Gt(["Input","OTP"],e=>{let t=ut(e,Fa(e));return[qU(t)]},La);var ai=E(D()),iL=E(Ne());var GU=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=GU(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(Ks,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,iL.default)(r,{[`${u}-mask-input`]:s})})))}),aL=KU;var XU=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},QU=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=XU(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]=oL(S),O=ao(k=>o??k),A=dr.useContext(dn),M=Qi(A.status,p),F=dr.useMemo(()=>Object.assign(Object.assign({},A),{status:M,hasFeedback:!1,feedbackIcon:null}),[A,M]),H=dr.useRef(null),j=dr.useRef({});dr.useImperativeHandle(t,()=>({focus:()=>{var k;(k=j.current[0])===null||k===void 0||k.focus()},blur:()=>{var k;for(let z=0;zl?l(k):k,[N,$]=dr.useState(()=>f0(I(i||"")));dr.useEffect(()=>{a!==void 0&&$(f0(a))},[a]);let U=wt(k=>{$(k),y&&y(k),s&&k.length===n&&k.every(z=>z)&&k.some((z,G)=>N[G]!==z)&&s(k.join(""))}),W=wt((k,z)=>{let G=te(N);for(let Y=0;Y=0&&!G[Y];Y-=1)G.pop();let J=I(G.map(Y=>Y||" ").join(""));return G=f0(J).map((Y,X)=>Y===" "&&!G[X]?G[X]:Y),G}),B=(k,z)=>{var G;let J=W(k,z),Y=Math.min(k+z.length,n-1);Y!==k&&J[k]!==void 0&&((G=j.current[Y])===null||G===void 0||G.focus()),U(J)},q=k=>{var z;(z=j.current[k])===null||z===void 0||z.focus()},L={variant:u,disabled:f,status:M,mask:h,type:v,inputMode:m};return C(dr.createElement("div",Object.assign({},w,{ref:H,className:(0,sL.default)(S,{[`${S}-sm`]:O==="small",[`${S}-lg`]:O==="large",[`${S}-rtl`]:b==="rtl"},P,R),role:"group"}),dr.createElement(dn.Provider,{value:F},Array.from({length:n}).map((k,z)=>{let G=`otp-${z}`,J=N[z]||"";return dr.createElement(dr.Fragment,{key:G},dr.createElement(aL,Object.assign({ref:Y=>{j.current[z]=Y},index:z,size:O,htmlSize:1,className:`${S}-input`,onChange:B,value:J,onActiveChange:q,autoFocus:z===0&&g},L)),ze?Dn.createElement(u0,null):Dn.createElement(uL,null),nq={click:"onClick",hover:"onMouseOver"},oq=Dn.forwardRef((e,t)=>{let{disabled:r,action:n="click",visibilityToggle:o=!0,iconRender:i=rq}=e,a=Dn.useContext(qr),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);Dn.useEffect(()=>{l&&u(o.visible)},[l,o]);let p=fp(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=nq[n]||"",M=i(c),F={[A]:g,className:`${O}-icon`,key:"passwordIcon",onMouseDown:H=>{H.preventDefault()},onMouseUp:H=>{H.preventDefault()}};return Dn.cloneElement(Dn.isValidElement(M)?M:Dn.createElement("span",null,M),F)},{className:v,prefixCls:y,inputPrefixCls:m,size:d}=e,x=tq(e,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:b}=Dn.useContext(rt),S=b("input",m),w=b("input-password",y),C=o&&h(w),R=(0,fL.default)(w,v,{[`${w}-${d}`]:!!d}),P=Object.assign(Object.assign({},Kr(x,["suffix","iconRender","visibilityToggle"])),{type:c?"text":"password",className:R,prefixCls:S,suffix:C});return d&&(P.size=d),Dn.createElement(Ks,Object.assign({ref:zr(t,f)},P))}),dL=oq;var Ii=E(D());var pL=E(Ne());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{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,onPressEnter:y}=e,m=iq(e,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd","variant","onPressEnter"]),{getPrefixCls:d,direction:x}=Ii.useContext(rt),b=Ii.useRef(!1),S=d("input-search",r),w=d("input",n),{compactSize:C}=Xo(S,x),R=ao(L=>{var k;return(k=i??C)!==null&&k!==void 0?k:L}),P=Ii.useRef(null),O=L=>{L?.target&&L.type==="click"&&f&&f(L.target.value,L,{source:"clear"}),p?.(L)},A=L=>{var k;document.activeElement===((k=P.current)===null||k===void 0?void 0:k.input)&&L.preventDefault()},M=L=>{var k,z;f&&f((z=(k=P.current)===null||k===void 0?void 0:k.input)===null||z===void 0?void 0:z.value,L,{source:"input"})},F=L=>{b.current||c||(y?.(L),M(L))},H=typeof s=="boolean"?Ii.createElement(Ny,null):null,j=`${S}-button`,I,N=s||{},$=N.type&&N.type.__ANT_BUTTON===!0;$||N.type==="button"?I=Go(N,Object.assign({onMouseDown:A,onClick:L=>{var k,z;(z=(k=N?.props)===null||k===void 0?void 0:k.onClick)===null||z===void 0||z.call(k,L),M(L)},key:"enterButton"},$?{className:j,size:R}:{})):I=Ii.createElement(zd,{className:j,color:s?"primary":"default",size:R,disabled:u,key:"enterButton",onMouseDown:A,onClick:M,loading:c,icon:H,variant:v==="borderless"||v==="filled"||v==="underlined"?"text":s?"solid":void 0},s),l&&(I=[I,Go(l,{key:"addonAfter"})]);let U=(0,pL.default)(S,{[`${S}-rtl`]:x==="rtl",[`${S}-${R}`]:!!R,[`${S}-with-button`]:!!s},o),W=L=>{b.current=!0,g?.(L)},B=L=>{b.current=!1,h?.(L)},q=Object.assign(Object.assign({},m),{className:U,prefixCls:w,type:"search",size:R,variant:v,onPressEnter:F,onCompositionStart:W,onCompositionEnd:B,addonAfter:I,suffix:a,onChange:O,disabled:u});return Ii.createElement(Ks,Object.assign({ref:zr(P,t)},q))}),mL=aq;var To=E(D()),xL=E(D()),gp=E(Ne());var mp=E(Ne());var Zr=E(D());var gL=E(Ne());var Cn=E(D());var sq=` min-height:0 !important; max-height:none !important; height:0 !important; @@ -494,30 +494,30 @@ html body { top:0 !important; right:0 !important; pointer-events: none !important; -`,gq=["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"],DE={},To;function hq(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&&DE[r])return DE[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=gq.map(function(c){return"".concat(c,":").concat(n.getPropertyValue(c))}).join(";"),l={sizingStyle:s,paddingSize:i,borderSize:a,boxSizing:o};return t&&r&&(DE[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;To||(To=document.createElement("textarea"),To.setAttribute("tab-index","-1"),To.setAttribute("aria-hidden","true"),To.setAttribute("name","hiddenTextarea"),document.body.appendChild(To)),e.getAttribute("wrap")?To.setAttribute("wrap",e.getAttribute("wrap")):To.removeAttribute("wrap");var o=hq(e,t),i=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;To.setAttribute("style","".concat(l,";").concat(mq)),To.value=e.value||e.placeholder||"";var c=void 0,u=void 0,f,d=To.scrollHeight;if(s==="border-box"?d+=a:s==="content-box"&&(d-=i),r!==null||n!==null){To.value=" ";var m=To.scrollHeight-i;r!==null&&(c=m*r,s==="border-box"&&(c=c+i+a),d=Math.max(c,d)),n!==null&&(u=m*n,s==="border-box"&&(u=u+i+a),f=d>u?"":"hidden",d=Math.min(u,d))}var h={height:d,overflowY:f,resize:"none"};return c&&(h.minHeight=c),u&&(h.maxHeight=u),h}var vq=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],AE=0,kE=1,ME=2,yq=wn.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,d=r.onInternalAutoSize,m=Ve(r,vq),h=ar(o,{value:i,postState:function(L){return L??""}}),v=M(h,2),y=v[0],g=v[1],p=function(L){g(L.target.value),f?.(L)},x=wn.useRef();wn.useImperativeHandle(t,function(){return{textArea:x.current}});var b=wn.useMemo(function(){return a&&fe(a)==="object"?[a.minRows,a.maxRows]:[]},[a]),S=M(b,2),w=S[0],C=S[1],R=!!a,P=function(){try{if(document.activeElement===x.current){var L=x.current,q=L.selectionStart,ne=L.selectionEnd,Y=L.scrollTop;x.current.setSelectionRange(q,ne),x.current.scrollTop=Y}}catch{}},O=wn.useState(ME),I=M(O,2),D=I[0],$=I[1],F=wn.useState(),k=M(F,2),z=k[0],B=k[1],j=function(){$(AE)};vt(function(){R&&j()},[i,w,C,R]),vt(function(){if(D===AE)$(kE);else if(D===kE){var A=$E(x.current,!1,w,C);$(ME),B(A)}else P()},[D]);var G=wn.useRef(),V=function(){dt.cancel(G.current)},H=function(L){D===ME&&(s?.(L),a&&(V(),G.current=dt(function(){j()})))};wn.useEffect(function(){return V},[]);var K=R?z:null,W=T(T({},c),K);return(D===AE||D===kE)&&(W.overflowY="hidden",W.overflowX="hidden"),wn.createElement(no,{onResize:H,disabled:!(a||s)},wn.createElement("textarea",ue({},m,{ref:x,style:W,className:(0,CL.default)(n,l,_({},"".concat(n,"-disabled"),u)),disabled:u,value:y,onChange:p})))}),FE=yq;var xq=["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"],bq=Zr.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,d=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,b=e.hidden,S=e.classNames,w=e.styles,C=e.onResize,R=e.onClear,P=e.onPressEnter,O=e.readOnly,I=e.autoSize,D=e.onKeyDown,$=Ve(e,xq),F=ar(n,{value:o,defaultValue:n}),k=M(F,2),z=k[0],B=k[1],j=z==null?"":String(z),G=Zr.default.useState(!1),V=M(G,2),H=V[0],K=V[1],W=Zr.default.useRef(!1),A=Zr.default.useState(null),L=M(A,2),q=L[0],ne=L[1],Y=(0,Zr.useRef)(null),X=(0,Zr.useRef)(null),ae=function(){var se;return(se=X.current)===null||se===void 0?void 0:se.textArea},J=function(){ae().focus()};(0,Zr.useImperativeHandle)(t,function(){var ye;return{resizableTextArea:X.current,focus:J,blur:function(){ae().blur()},nativeElement:((ye=Y.current)===null||ye===void 0?void 0:ye.nativeElement)||ae()}}),(0,Zr.useEffect)(function(){K(function(ye){return!x&&ye})},[x]);var U=Zr.default.useState(null),Q=M(U,2),te=Q[0],Z=Q[1];Zr.default.useEffect(function(){if(te){var ye;(ye=ae()).setSelectionRange.apply(ye,ee(te))}},[te]);var re=dp(y,v),de=(r=re.max)!==null&&r!==void 0?r:c,le=Number(de)>0,pe=re.strategy(j),Oe=!!de&&pe>de,Ce=function(se,xe){var _e=xe;!W.current&&re.exceedFormatter&&re.max&&re.strategy(xe)>re.max&&(_e=re.exceedFormatter(xe,{max:re.max}),xe!==_e&&Z([ae().selectionStart||0,ae().selectionEnd||0])),B(_e),Vu(se.currentTarget,se,s,_e)},$e=function(se){W.current=!0,u?.(se)},ce=function(se){W.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),D?.(se)},Le=function(se){K(!0),i?.(se)},Ge=function(se){K(!1),a?.(se)},Me=function(se){B(""),J(),Vu(ae(),se,s)},Ie=d,je;re.show&&(re.showFormatter?je=re.showFormatter({value:j,count:pe,maxLength:de}):je="".concat(pe).concat(le?" / ".concat(de):""),Ie=Zr.default.createElement(Zr.default.Fragment,null,Ie,Zr.default.createElement("span",{className:(0,hp.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&&ne(!0)},He=!I&&!v&&!l;return Zr.default.createElement(Gl,{ref:Y,value:j,allowClear:l,handleReset:Me,suffix:Ie,prefixCls:h,classNames:T(T({},S),{},{affixWrapper:(0,hp.default)(S?.affixWrapper,_(_({},"".concat(h,"-show-count"),v),"".concat(h,"-textarea-allow-clear"),l))}),disabled:x,focused:H,className:(0,hp.default)(g,Oe&&"".concat(h,"-out-of-range")),style:T(T({},p),q&&!He?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof je=="string"?je:void 0}},hidden:b,readOnly:O,onClear:R},Zr.default.createElement(FE,ue({},$,{autoSize:I,maxLength:c,onKeyDown:Re,onChange:ie,onFocus:Le,onBlur:Ge,onCompositionStart:$e,onCompositionEnd:ce,className:(0,hp.default)(S?.textarea),style:T(T({},w?.textarea),{},{resize:p?.resize}),disabled:x,prefixCls:h,onResize:We,ref:X,readOnly:O})))}),wL=bq;var EL=wL;var Sq=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"}},[` +`,lq=["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 cq(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=lq.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=cq(e,t),i=o.paddingSize,a=o.borderSize,s=o.boxSizing,l=o.sizingStyle;Po.setAttribute("style","".concat(l,";").concat(sq)),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 uq=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],PE=0,TE=1,NE=2,fq=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,uq),h=ar(o,{value:i,postState:function(z){return z??""}}),v=V(h,2),y=v[0],m=v[1],d=function(z){m(z.target.value),f?.(z)},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=V(b,2),w=S[0],C=S[1],R=!!a,P=function(){try{if(document.activeElement===x.current){var z=x.current,G=z.selectionStart,J=z.selectionEnd,Y=z.scrollTop;x.current.setSelectionRange(G,J),x.current.scrollTop=Y}}catch{}},O=Cn.useState(NE),A=V(O,2),M=A[0],F=A[1],H=Cn.useState(),j=V(H,2),I=j[0],N=j[1],$=function(){F(PE)};vt(function(){R&&$()},[i,w,C,R]),vt(function(){if(M===PE)F(TE);else if(M===TE){var k=_E(x.current,!1,w,C);F(NE),N(k)}else P()},[M]);var U=Cn.useRef(),W=function(){dt.cancel(U.current)},B=function(z){M===NE&&(s?.(z),a&&(W(),U.current=dt(function(){$()})))};Cn.useEffect(function(){return W},[]);var q=R?I:null,L=T(T({},c),q);return(M===PE||M===TE)&&(L.overflowY="hidden",L.overflowX="hidden"),Cn.createElement(ro,{onResize:B,disabled:!(a||s)},Cn.createElement("textarea",fe({},g,{ref:x,style:L,className:(0,gL.default)(n,l,_({},"".concat(n,"-disabled"),u)),disabled:u,value:y,onChange:d})))}),IE=fq;var dq=["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"],pq=Zr.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,M=e.onKeyDown,F=Ve(e,dq),H=ar(n,{value:o,defaultValue:n}),j=V(H,2),I=j[0],N=j[1],$=I==null?"":String(I),U=Zr.default.useState(!1),W=V(U,2),B=W[0],q=W[1],L=Zr.default.useRef(!1),k=Zr.default.useState(null),z=V(k,2),G=z[0],J=z[1],Y=(0,Zr.useRef)(null),X=(0,Zr.useRef)(null),ae=function(){var se;return(se=X.current)===null||se===void 0?void 0:se.textArea},Z=function(){ae().focus()};(0,Zr.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,Zr.useEffect)(function(){q(function(ye){return!x&&ye})},[x]);var K=Zr.default.useState(null),Q=V(K,2),re=Q[0],ee=Q[1];Zr.default.useEffect(function(){if(re){var ye;(ye=ae()).setSelectionRange.apply(ye,te(re))}},[re]);var ne=up(y,v),de=(r=ne.max)!==null&&r!==void 0?r:c,le=Number(de)>0,pe=ne.strategy($),Oe=!!de&&pe>de,Ce=function(se,xe){var _e=xe;!L.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])),N(_e),ju(se.currentTarget,se,s,_e)},$e=function(se){L.current=!0,u?.(se)},ce=function(se){L.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),M?.(se)},Le=function(se){q(!0),i?.(se)},Ge=function(se){q(!1),a?.(se)},Me=function(se){N(""),Z(),ju(ae(),se,s)},Ie=p,je;ne.show&&(ne.showFormatter?je=ne.showFormatter({value:$,count:pe,maxLength:de}):je="".concat(pe).concat(le?" / ".concat(de):""),Ie=Zr.default.createElement(Zr.default.Fragment,null,Ie,Zr.default.createElement("span",{className:(0,mp.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 Zr.default.createElement(Gl,{ref:Y,value:$,allowClear:l,handleReset:Me,suffix:Ie,prefixCls:h,classNames:T(T({},S),{},{affixWrapper:(0,mp.default)(S?.affixWrapper,_(_({},"".concat(h,"-show-count"),v),"".concat(h,"-textarea-allow-clear"),l))}),disabled:x,focused:B,className:(0,mp.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},Zr.default.createElement(IE,fe({},F,{autoSize:A,maxLength:c,onKeyDown:Re,onChange:ie,onFocus:Le,onBlur:Ge,onCompositionStart:$e,onCompositionEnd:ce,className:(0,mp.default)(S?.textarea),style:T(T({},w?.textarea),{},{resize:d?.resize}),disabled:x,prefixCls:h,onResize:We,ref:X,readOnly:O})))}),hL=pq;var vL=hL;var mq=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${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}}}}}},RL=Gt(["Input","TextArea"],e=>{let t=ut(e,Fa(e));return[Sq(t)]},La,{resetFont:!1});var Cq=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:d,styles:m,variant:h,showCount:v,onMouseDown:y,onResize:g}=e,p=Cq(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}=oo("textArea"),I=No.useContext(qr),D=a??I,{status:$,hasFeedback:F,feedbackIcon:k}=No.useContext(pn),z=Ji($,s),B=No.useRef(null);No.useImperativeHandle(t,()=>{var re;return{resizableTextArea:(re=B.current)===null||re===void 0?void 0:re.resizableTextArea,focus:de=>{var le,pe;ql((pe=(le=B.current)===null||le===void 0?void 0:le.resizableTextArea)===null||pe===void 0?void 0:pe.textArea,de)},blur:()=>{var de;return(de=B.current)===null||de===void 0?void 0:de.blur()}}});let j=x("input",n),G=Xo(j),[V,H,K]=Ky(j,u),[W]=RL(j,G),{compactSize:A,compactItemClassnames:L}=Yo(j,b),q=so(re=>{var de;return(de=i??A)!==null&&de!==void 0?de:re}),[ne,Y]=Gs("textArea",h,o),X=a0(l??S),[ae,J]=No.useState(!1),[U,Q]=No.useState(!1),te=re=>{J(!0),y?.(re);let de=()=>{J(!1),document.removeEventListener("mouseup",de)};document.addEventListener("mouseup",de)},Z=re=>{var de,le;if(g?.(re),ae&&typeof getComputedStyle=="function"){let pe=(le=(de=B.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 V(W(No.createElement(EL,Object.assign({autoComplete:w},p,{style:Object.assign(Object.assign({},R),d),styles:Object.assign(Object.assign({},O),m),disabled:D,allowClear:X,className:(0,vp.default)(K,G,f,u,L,C,U&&`${j}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),P),{textarea:(0,vp.default)({[`${j}-sm`]:q==="small",[`${j}-lg`]:q==="large"},H,c?.textarea,P.textarea,ae&&`${j}-mouse-active`),variant:(0,vp.default)({[`${j}-${ne}`]:Y},Qi(j,z)),affixWrapper:(0,vp.default)(`${j}-textarea-affix-wrapper`,{[`${j}-affix-wrapper-rtl`]:b==="rtl",[`${j}-affix-wrapper-sm`]:q==="small",[`${j}-affix-wrapper-lg`]:q==="large",[`${j}-textarea-show-count`]:v||((r=e.count)===null||r===void 0?void 0:r.show)},H)}),prefixCls:j,suffix:F&&No.createElement("span",{className:`${j}-textarea-suffix`},k),showCount:v,ref:B,onResize:Z,onMouseDown:te}))))}),_L=wq;var Xu=Ks;Xu.Group=uL;Xu.Search=SL;Xu.TextArea=_L;Xu.Password=xL;Xu.OTP=gL;var yp=Xu;var en=E(N());var VE=E(Ne());var Ju=E(N()),FL=E(Ne());var Eq=E(N()),Rq=E(Ne());var xp=E(N()),LE={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},zE=function(){var t=(0,xp.useRef)([]),r=(0,xp.useRef)(null);return(0,xp.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 bp=E(N()),AL=E(Ne());var x0=E(N());var PL=0,Oq=Yt();function _q(){var e;return Oq?(e=PL,PL+=1):e="TEST_OR_SSR",e}var TL=function(e){var t=x0.useState(),r=M(t,2),n=r[0],o=r[1];return x0.useEffect(function(){o("rc_progress_".concat(_q()))},[]),e||n};var li=E(N()),NL=function(t){var r=t.bg,n=t.children;return li.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function IL(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 Pq=li.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,d=n&&fe(n)==="object",m=d?"#FFF":void 0,h=u/2,v=li.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(!d)return v;var y="".concat(o,"-conic"),g=f?"".concat(180+f/2,"deg"):"0deg",p=IL(n,(360-f)/360),x=IL(n,1),b="conic-gradient(from ".concat(g,", ").concat(p.join(", "),")"),S="linear-gradient(to ".concat(f?"bottom":"top",", ").concat(x.join(", "),")");return li.createElement(li.Fragment,null,li.createElement("mask",{id:y},v),li.createElement("foreignObject",{x:0,y:0,width:u,height:u,mask:"url(#".concat(y,")")},li.createElement(NL,{bg:S},li.createElement(NL,{bg:b}))))}),DL=Pq;var Yu=100,b0=function(t,r,n,o,i,a,s,l,c,u){var f=arguments.length>10&&arguments[10]!==void 0?arguments[10]:0,d=n/100*360*((360-a)/360),m=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=Yu/2;return{stroke:typeof l=="string"?l:void 0,strokeDasharray:"".concat(r,"px ").concat(t),strokeDashoffset:h+f,transform:"rotate(".concat(i+d+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 Tq=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function $L(e){var t=e??[];return Array.isArray(t)?t:[t]}var Nq=function(t){var r=T(T({},LE),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,d=r.strokeLinecap,m=r.style,h=r.className,v=r.strokeColor,y=r.percent,g=Ve(r,Tq),p=Yu/2,x=TL(n),b="".concat(x,"-gradient"),S=p-a/2,w=Math.PI*2*S,C=c>0?90+c/2:-90,R=w*((360-c)/360),P=fe(i)==="object"?i:{count:i,gap:2},O=P.count,I=P.gap,D=$L(y),$=$L(v),F=$.find(function(H){return H&&fe(H)==="object"}),k=F&&fe(F)==="object",z=k?"butt":d,B=b0(w,R,0,100,C,c,u,f,z,a),j=zE(),G=function(){var K=0;return D.map(function(W,A){var L=$[A]||$[$.length-1],q=b0(w,R,K,W,C,c,u,L,z,a);return K+=W,bp.createElement(DL,{key:A,color:L,ptg:W,radius:S,prefixCls:o,gradientId:b,style:q,strokeLinecap:z,strokeWidth:a,gapDegree:c,ref:function(Y){j[A]=Y},size:Yu})}).reverse()},V=function(){var K=Math.round(O*(D[0]/100)),W=100/O,A=0;return new Array(O).fill(null).map(function(L,q){var ne=q<=K-1?$[0]:f,Y=ne&&fe(ne)==="object"?"url(#".concat(b,")"):void 0,X=b0(w,R,A,W,C,c,u,ne,"butt",a,I);return A+=(R-X.strokeDashoffset+I)*100/R,bp.createElement("circle",{key:q,className:"".concat(o,"-circle-path"),r:S,cx:p,cy:p,stroke:Y,strokeWidth:a,opacity:1,style:X,ref:function(J){j[q]=J}})})};return bp.createElement("svg",ue({className:(0,AL.default)("".concat(o,"-circle"),h),viewBox:"0 0 ".concat(Yu," ").concat(Yu),style:m,id:n,role:"presentation"},g),!O&&bp.createElement("circle",{className:"".concat(o,"-circle-trail"),r:S,cx:p,cy:p,stroke:f,strokeLinecap:z,strokeWidth:s||a,style:B}),O?V():G())},WE=Nq;function oa(e){return!e||e<0?0:e>100?100:e}function Qu({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}var kL=({percent:e,success:t,successPercent:r})=>{let n=oa(Qu({success:t,successPercent:r}));return[n,oa(oa(e)-n)]},ML=({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||Ra.green,t||null]},Xs=(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 Iq=3,Dq=e=>Iq/e*100,$q=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,[d,m]=Xs(u,"circle"),{strokeWidth:h}=e;h===void 0&&(h=Math.max(Dq(d),6));let v={width:d,height:m,fontSize:d*.15+6},y=Ju.useMemo(()=>{if(i||i===0)return i;if(s==="dashboard")return 75},[i,s]),g=kL(e),p=o||s==="dashboard"&&"bottom"||void 0,x=Object.prototype.toString.call(e.strokeColor)==="[object Object]",b=ML({success:c,strokeColor:e.strokeColor}),S=(0,FL.default)(`${t}-inner`,{[`${t}-circle-gradient`]:x}),w=Ju.createElement(WE,{steps:f,percent:f?g[1]:g,strokeWidth:h,trailWidth:h,strokeColor:f?b[1]:b,strokeLinecap:n,trailColor:r,prefixCls:t,gapDegree:y,gapPosition:p}),C=d<=20,R=Ju.createElement("div",{className:S,style:v},w,!C&&l);return C?Ju.createElement(Ma,{title:l},R):R},LL=$q;var Zu=E(N());var BL=E(Ne());var Sp="--progress-line-stroke-color",BE="--progress-percent",zL=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}})},Aq=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(${Sp})`]},height:"100%",width:`calc(1 / var(${BE}) * 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:zL(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:zL(!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}}})}},kq=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"}}}},Mq=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}}}}}},Fq=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}},Lq=e=>({circleTextColor:e.colorText,defaultColor:e.colorInfo,remainingColor:e.colorFillSecondary,lineBorderRadius:100,circleTextFontSize:"1em",circleIconFontSize:`${e.fontSize/e.fontSizeSM}em`}),WL=Gt("Progress",e=>{let t=e.calc(e.marginXXS).div(2).equal(),r=ut(e,{progressStepMarginInlineEnd:t,progressStepMinWidth:t,progressActiveMotionDuration:"2.4s"});return[Aq(r),kq(r),Mq(r),Fq(r)]},Lq);var zq=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(", ")},Bq=(e,t)=>{let{from:r=Ra.blue,to:n=Ra.blue,direction:o=t==="rtl"?"to left":"to right"}=e,i=zq(e,["from","to","direction"]);if(Object.keys(i).length!==0){let s=Wq(i),l=`linear-gradient(${o}, ${s})`;return{background:l,[Sp]:l}}let a=`linear-gradient(${o}, ${r}, ${n})`;return{background:a,[Sp]:a}},jq=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:d,type:m}=u,h=a&&typeof a!="string"?Bq(a,r):{[Sp]:a,background:a},v=s==="square"||s==="butt"?0:void 0,y=o??[-1,i||(o==="small"?6:8)],[g,p]=Xs(y,"line",{strokeWidth:i}),x={backgroundColor:c||void 0,borderRadius:v},b=Object.assign(Object.assign({width:`${oa(n)}%`,height:p,borderRadius:v},h),{[BE]:oa(n)/100}),S=Qu(e),w={width:`${oa(S)}%`,height:p,borderRadius:v,backgroundColor:f?.strokeColor},C={width:g<0?"100%":g},R=Zu.createElement("div",{className:`${t}-inner`,style:x},Zu.createElement("div",{className:(0,BL.default)(`${t}-bg`,`${t}-bg-${m}`),style:b},m==="inner"&&l),S!==void 0&&Zu.createElement("div",{className:`${t}-success-bg`,style:w})),P=m==="outer"&&d==="start",O=m==="outer"&&d==="end";return m==="outer"&&d==="center"?Zu.createElement("div",{className:`${t}-layout-bottom`},R,l):Zu.createElement("div",{className:`${t}-outer`,style:C},P&&l,R,O&&l)},jL=jq;var jE=E(N()),VL=E(Ne());var Vq=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)),d=t??[t==="small"?2:14,i],[m,h]=Xs(d,"step",{steps:r,strokeWidth:i}),v=m/r,y=Array.from({length:r});for(let g=0;g{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:d,style:m,percentPosition:h={}}=e,v=Hq(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,b=en.useMemo(()=>{if(p){let G=typeof p=="string"?p:Object.values(p)[0];return new gt(G).isLight()}return!1},[a]),S=en.useMemo(()=>{var G,V;let H=Qu(e);return parseInt(H!==void 0?(G=H??0)===null||G===void 0?void 0:G.toString():(V=s??0)===null||V===void 0?void 0:V.toString(),10)},[s,e.success,e.successPercent]),w=en.useMemo(()=>!Uq.includes(f)&&S>=100?"success":f||"normal",[f,S]),{getPrefixCls:C,direction:R,progress:P}=en.useContext(rt),O=C("progress",r),[I,D,$]=WL(O),F=u==="line",k=F&&!i,z=en.useMemo(()=>{if(!c)return null;let G=Qu(e),V,H=d||(W=>`${W}%`),K=F&&b&&g==="inner";return g==="inner"||d||w!=="exception"&&w!=="success"?V=H(oa(s),oa(G)):w==="exception"?V=F?en.createElement(gu,null):en.createElement(yv,null):w==="success"&&(V=F?en.createElement(gD,null):en.createElement(Iy,null)),en.createElement("span",{className:(0,VE.default)(`${O}-text`,{[`${O}-text-bright`]:K,[`${O}-text-${y}`]:k,[`${O}-text-${g}`]:k}),title:typeof V=="string"?V:void 0},V)},[c,s,S,w,u,O,d]),B;u==="line"?B=i?en.createElement(HL,Object.assign({},e,{strokeColor:x,prefixCls:O,steps:typeof i=="object"?i.count:i}),z):en.createElement(jL,Object.assign({},e,{strokeColor:p,prefixCls:O,direction:R,percentPosition:{align:y,type:g}}),z):(u==="circle"||u==="dashboard")&&(B=en.createElement(LL,Object.assign({},e,{strokeColor:p,prefixCls:O,progressStatus:w}),z));let j=(0,VE.default)(O,`${O}-status-${w}`,{[`${O}-${u==="dashboard"&&"circle"||u}`]:u!=="line",[`${O}-inline-circle`]:u==="circle"&&Xs(l,"circle")[0]<=20,[`${O}-line`]:k,[`${O}-line-align-${y}`]:k,[`${O}-line-position-${g}`]:k,[`${O}-steps`]:i,[`${O}-show-info`]:c,[`${O}-${l}`]:typeof l=="string",[`${O}-rtl`]:R==="rtl"},P?.className,n,o,D,$);return I(en.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},P?.style),m),className:j,role:"progressbar","aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":100},Kr(v,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),B))}),UL=qq;var qL=UL;var S0=E(N());var Gq={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"},GL=Gq;var Kq=function(t,r){return S0.createElement(zt,ue({},t,{ref:r,icon:GL}))},Xq=S0.forwardRef(Kq),KL=Xq;var C0=E(N());var Yq={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"},XL=Yq;var Qq=function(t,r){return C0.createElement(zt,ue({},t,{ref:r,icon:XL}))},Jq=C0.forwardRef(Qq),YL=Jq;var w0=E(N());var Zq={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"},QL=Zq;var eG=function(t,r){return w0.createElement(zt,ue({},t,{ref:r,icon:QL}))},tG=w0.forwardRef(eG),JL=tG;var E0=E(N());var rG={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"},ZL=rG;var nG=function(t,r){return E0.createElement(zt,ue({},t,{ref:r,icon:ZL}))},oG=E0.forwardRef(nG),e3=oG;var R0=E(N());var iG={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"},t3=iG;var aG=function(t,r){return R0.createElement(zt,ue({},t,{ref:r,icon:t3}))},sG=R0.forwardRef(aG),r3=sG;var lG={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"},n3=lG;var I0=E(N());var br=E(N()),KE=E(Hi()),T0=E(Ne());var _0=E(N());var a3=E(Ne());var wp=E(N());var O0=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 cG(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 o3(e){var t=e.responseText||e.response;if(!t)return t;try{return JSON.parse(t)}catch{return t}}function HE(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(cG(e,t),o3(t)):e.onSuccess(o3(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 uG=function(){var e=Gr(Et().mark(function t(r,n){var o,i,a,s,l,c,u,f;return Et().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:c=function(){return c=Gr(Et().mark(function v(y){return Et().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.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 p.stop()}},v)})),c.apply(this,arguments)},l=function(v){return c.apply(this,arguments)},s=function(){return s=Gr(Et().mark(function v(y){var g,p,x,b,S;return Et().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,b=x.length,b){C.next=9;break}return C.abrupt("break",12);case 9:for(S=0;S0||v.some(function(b){return b.kind==="file"}))&&u?.(),!h){x.next=11;break}return x.next=7,i3(Array.prototype.slice.call(v),function(b){return O0(b,n.props.accept)});case 7:y=x.sent,n.uploadFiles(y),x.next=14;break;case 11:g=ee(y).filter(function(b){return O0(b,m)}),d===!1&&(g=y.slice(0,1)),n.uploadFiles(g);case 14:case"end":return x.stop()}},l)}));return function(l,c){return s.apply(this,arguments)}}()),_(Ye(n),"onFilePaste",function(){var s=Gr(Et().mark(function l(c){var u,f;return Et().wrap(function(m){for(;;)switch(m.prev=m.next){case 0:if(u=n.props.pastable,u){m.next=3;break}return m.abrupt("return");case 3:if(c.type!=="paste"){m.next=6;break}return f=c.clipboardData,m.abrupt("return",n.onDataTransferFiles(f,function(){c.preventDefault()}));case 6:case"end":return m.stop()}},l)}));return function(l){return s.apply(this,arguments)}}()),_(Ye(n),"onFileDragOver",function(s){s.preventDefault()}),_(Ye(n),"onFileDrop",function(){var s=Gr(Et().mark(function l(c){var u;return Et().wrap(function(d){for(;;)switch(d.prev=d.next){case 0:if(c.preventDefault(),c.type!=="drop"){d.next=4;break}return u=c.dataTransfer,d.abrupt("return",n.onDataTransferFiles(u));case 4:case"end":return d.stop()}},l)}));return function(l){return s.apply(this,arguments)}}()),_(Ye(n),"uploadFiles",function(s){var l=ee(s),c=l.map(function(u){return u.uid=Cp(),n.processFile(u,l)});Promise.all(c).then(function(u){var f=n.props.onBatchStart;f?.(u.map(function(d){var m=d.origin,h=d.parsedFile;return{file:m,parsedFile:h}})),u.filter(function(d){return d.parsedFile!==null}).forEach(function(d){n.post(d)})})}),_(Ye(n),"processFile",function(){var s=Gr(Et().mark(function l(c,u){var f,d,m,h,v,y,g,p,x;return Et().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(f=n.props.beforeUpload,d=c,!f){S.next=14;break}return S.prev=3,S.next=6,f(c,u);case 6:d=S.sent,S.next=12;break;case 9:S.prev=9,S.t0=S.catch(3),d=!1;case 12:if(d!==!1){S.next=14;break}return S.abrupt("return",{origin:c,parsedFile:null,action:null,data:null});case 14:if(m=n.props.action,typeof m!="function"){S.next=21;break}return S.next=18,m(c);case 18:h=S.sent,S.next=22;break;case 21:h=m;case 22:if(v=n.props.data,typeof v!="function"){S.next=29;break}return S.next=26,v(c);case 26:y=S.sent,S.next=30;break;case 29:y=v;case 30:return g=(fe(d)==="object"||typeof d=="string")&&d?d:c,g instanceof File?p=g:p=new File([g],c.name,{type:c.type}),x=p,x.uid=c.uid,S.abrupt("return",{origin:c,data:y,parsedFile:x,action:h});case 35:case"end":return S.stop()}},l,null,[[3,9]])}));return function(l,c){return s.apply(this,arguments)}}()),_(Ye(n),"saveFileInput",function(s){n.fileInput=s}),n}return at(r,[{key:"componentDidMount",value:function(){this._isMounted=!0;var o=this.props.pastable;o&&document.addEventListener("paste",this.onFilePaste)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort(),document.removeEventListener("paste",this.onFilePaste)}},{key:"componentDidUpdate",value:function(o){var i=this.props.pastable;i&&!o.pastable?document.addEventListener("paste",this.onFilePaste):!i&&o.pastable&&document.removeEventListener("paste",this.onFilePaste)}},{key:"post",value:function(o){var i=this,a=o.data,s=o.origin,l=o.action,c=o.parsedFile;if(this._isMounted){var u=this.props,f=u.onStart,d=u.customRequest,m=u.name,h=u.headers,v=u.withCredentials,y=u.method,g=s.uid,p=d||HE,x={action:l,filename:m,data:a,file:c,headers:h,withCredentials:v,method:y||"post",onProgress:function(S){var w=i.props.onProgress;w?.(S,c)},onSuccess:function(S,w){var C=i.props.onSuccess;C?.(S,c,w),delete i.reqs[g]},onError:function(S,w){var C=i.props.onError;C?.(S,w,c),delete i.reqs[g]}};f(s),this.reqs[g]=p(x)}}},{key:"reset",value:function(){this.setState({uid:Cp()})}},{key:"abort",value:function(o){var i=this.reqs;if(o){var a=o.uid?o.uid:o;i[a]&&i[a].abort&&i[a].abort(),delete i[a]}else Object.keys(i).forEach(function(s){i[s]&&i[s].abort&&i[s].abort(),delete i[s]})}},{key:"render",value:function(){var o=this.props,i=o.component,a=o.prefixCls,s=o.className,l=o.classNames,c=l===void 0?{}:l,u=o.disabled,f=o.id,d=o.name,m=o.style,h=o.styles,v=h===void 0?{}:h,y=o.multiple,g=o.accept,p=o.capture,x=o.children,b=o.directory,S=o.openFileDialogOnClick,w=o.onMouseEnter,C=o.onMouseLeave,R=o.hasControlInside,P=Ve(o,pG),O=(0,a3.default)(_(_(_({},a,!0),"".concat(a,"-disabled"),u),s,s)),I=b?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},D=u?{}:{onClick:S?this.onClick:function(){},onKeyDown:S?this.onKeyDown:function(){},onMouseEnter:w,onMouseLeave:C,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:R?void 0:"0"};return wp.default.createElement(i,ue({},D,{className:O,role:R?void 0:"button",style:m}),wp.default.createElement("input",ue({},Go(P,{aria:!0,data:!0}),{id:f,name:d,disabled:u,type:"file",ref:this.saveFileInput,onClick:function(F){return F.stopPropagation()},key:this.state.uid,style:T({display:"none"},v.input),className:c.input,accept:g},I,{multiple:y,onChange:this.onChange},p!=null?{capture:p}:{})),x)}}]),r}(wp.Component),s3=mG;function UE(){}var l3=function(e){Dr(r,e);var t=$r(r);function r(){var n;it(this,r);for(var o=arguments.length,i=new Array(o),a=0;a{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"},[` + `]:{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}}}}}},yL=Gt(["Input","TextArea"],e=>{let t=ut(e,Fa(e));return[mq(t)]},La,{resetFont:!1});var gq=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=gq(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(qr),M=a??A,{status:F,hasFeedback:H,feedbackIcon:j}=To.useContext(dn),I=Qi(F,s),N=To.useRef(null);To.useImperativeHandle(t,()=>{var ne;return{resizableTextArea:(ne=N.current)===null||ne===void 0?void 0:ne.resizableTextArea,focus:de=>{var le,pe;ql((pe=(le=N.current)===null||le===void 0?void 0:le.resizableTextArea)===null||pe===void 0?void 0:pe.textArea,de)},blur:()=>{var de;return(de=N.current)===null||de===void 0?void 0:de.blur()}}});let $=x("input",n),U=Ko($),[W,B,q]=Vy($,u),[L]=yL($,U),{compactSize:k,compactItemClassnames:z}=Xo($,b),G=ao(ne=>{var de;return(de=i??k)!==null&&de!==void 0?de:ne}),[J,Y]=Gs("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=N.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 W(L(To.createElement(vL,Object.assign({autoComplete:w},d,{style:Object.assign(Object.assign({},R),p),styles:Object.assign(Object.assign({},O),g),disabled:M,allowClear:X,className:(0,gp.default)(q,U,f,u,z,C,K&&`${$}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},c),P),{textarea:(0,gp.default)({[`${$}-sm`]:G==="small",[`${$}-lg`]:G==="large"},B,c?.textarea,P.textarea,ae&&`${$}-mouse-active`),variant:(0,gp.default)({[`${$}-${J}`]:Y},Yi($,I)),affixWrapper:(0,gp.default)(`${$}-textarea-affix-wrapper`,{[`${$}-affix-wrapper-rtl`]:b==="rtl",[`${$}-affix-wrapper-sm`]:G==="small",[`${$}-affix-wrapper-lg`]:G==="large",[`${$}-textarea-show-count`]:v||((r=e.count)===null||r===void 0?void 0:r.show)},B)}),prefixCls:$,suffix:H&&To.createElement("span",{className:`${$}-textarea-suffix`},j),showCount:v,ref:N,onResize:ee,onMouseDown:re}))))}),bL=hq;var Ku=Ks;Ku.Group=nL;Ku.Search=mL;Ku.TextArea=bL;Ku.Password=dL;Ku.OTP=lL;var hp=Ku;var en=E(D());var FE=E(Ne());var Qu=E(D()),NL=E(Ne());var vq=E(D()),yq=E(Ne());var vp=E(D()),DE={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},$E=function(){var t=(0,vp.useRef)([]),r=(0,vp.useRef)(null);return(0,vp.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 yp=E(D()),_L=E(Ne());var m0=E(D());var SL=0,xq=Yt();function bq(){var e;return xq?(e=SL,SL+=1):e="TEST_OR_SSR",e}var CL=function(e){var t=m0.useState(),r=V(t,2),n=r[0],o=r[1];return m0.useEffect(function(){o("rc_progress_".concat(bq()))},[]),e||n};var si=E(D()),wL=function(t){var r=t.bg,n=t.children;return si.createElement("div",{style:{width:"100%",height:"100%",background:r}},n)};function EL(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 Sq=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=EL(n,(360-f)/360),x=EL(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(wL,{bg:S},si.createElement(wL,{bg:b}))))}),RL=Sq;var Xu=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=Xu/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 Cq=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function OL(e){var t=e??[];return Array.isArray(t)?t:[t]}var wq=function(t){var r=T(T({},DE),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,Cq),d=Xu/2,x=CL(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,M=OL(y),F=OL(v),H=F.find(function(B){return B&&ue(B)==="object"}),j=H&&ue(H)==="object",I=j?"butt":p,N=g0(w,R,0,100,C,c,u,f,I,a),$=$E(),U=function(){var q=0;return M.map(function(L,k){var z=F[k]||F[F.length-1],G=g0(w,R,q,L,C,c,u,z,I,a);return q+=L,yp.createElement(RL,{key:k,color:z,ptg:L,radius:S,prefixCls:o,gradientId:b,style:G,strokeLinecap:I,strokeWidth:a,gapDegree:c,ref:function(Y){$[k]=Y},size:Xu})}).reverse()},W=function(){var q=Math.round(O*(M[0]/100)),L=100/O,k=0;return new Array(O).fill(null).map(function(z,G){var J=G<=q-1?F[0]:f,Y=J&&ue(J)==="object"?"url(#".concat(b,")"):void 0,X=g0(w,R,k,L,C,c,u,J,"butt",a,A);return k+=(R-X.strokeDashoffset+A)*100/R,yp.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){$[G]=Z}})})};return yp.createElement("svg",fe({className:(0,_L.default)("".concat(o,"-circle"),h),viewBox:"0 0 ".concat(Xu," ").concat(Xu),style:g,id:n,role:"presentation"},m),!O&&yp.createElement("circle",{className:"".concat(o,"-circle-trail"),r:S,cx:d,cy:d,stroke:f,strokeLinecap:I,strokeWidth:s||a,style:N}),O?W():U())},kE=wq;function na(e){return!e||e<0?0:e>100?100:e}function Yu({success:e,successPercent:t}){let r=t;return e&&"progress"in e&&(r=e.progress),e&&"percent"in e&&(r=e.percent),r}var PL=({percent:e,success:t,successPercent:r})=>{let n=na(Yu({success:t,successPercent:r}));return[n,na(na(e)-n)]},TL=({success:e={},strokeColor:t})=>{let{strokeColor:r}=e;return[r||Ea.green,t||null]},Xs=(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 Eq=3,Rq=e=>Eq/e*100,Oq=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]=Xs(u,"circle"),{strokeWidth:h}=e;h===void 0&&(h=Math.max(Rq(p),6));let v={width:p,height:g,fontSize:p*.15+6},y=Qu.useMemo(()=>{if(i||i===0)return i;if(s==="dashboard")return 75},[i,s]),m=PL(e),d=o||s==="dashboard"&&"bottom"||void 0,x=Object.prototype.toString.call(e.strokeColor)==="[object Object]",b=TL({success:c,strokeColor:e.strokeColor}),S=(0,NL.default)(`${t}-inner`,{[`${t}-circle-gradient`]:x}),w=Qu.createElement(kE,{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=Qu.createElement("div",{className:S,style:v},w,!C&&l);return C?Qu.createElement(Ma,{title:l},R):R},IL=Oq;var Ju=E(D());var kL=E(Ne());var xp="--progress-line-stroke-color",AE="--progress-percent",DL=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}})},_q=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(${xp})`]},height:"100%",width:`calc(1 / var(${AE}) * 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:DL(),animationDuration:e.progressActiveMotionDuration,animationTimingFunction:e.motionEaseOutQuint,animationIterationCount:"infinite",content:'""'}},[`&${t}-rtl${t}-status-active`]:{[`${t}-bg::before`]:{animationName:DL(!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}}})}},Pq=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"}}}},Tq=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}}}}}},Nq=e=>{let{componentCls:t,iconCls:r}=e;return{[t]:{[`${t}-small&-line, ${t}-small&-line ${t}-text ${r}`]:{fontSize:e.fontSizeSM}}}},Iq=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[_q(r),Pq(r),Tq(r),Nq(r)]},Iq);var Dq=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(", ")},kq=(e,t)=>{let{from:r=Ea.blue,to:n=Ea.blue,direction:o=t==="rtl"?"to left":"to right"}=e,i=Dq(e,["from","to","direction"]);if(Object.keys(i).length!==0){let s=$q(i),l=`linear-gradient(${o}, ${s})`;return{background:l,[xp]:l}}let a=`linear-gradient(${o}, ${r}, ${n})`;return{background:a,[xp]: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"?kq(a,r):{[xp]:a,background:a},v=s==="square"||s==="butt"?0:void 0,y=o??[-1,i||(o==="small"?6:8)],[m,d]=Xs(y,"line",{strokeWidth:i}),x={backgroundColor:c||void 0,borderRadius:v},b=Object.assign(Object.assign({width:`${na(n)}%`,height:d,borderRadius:v},h),{[AE]:na(n)/100}),S=Yu(e),w={width:`${na(S)}%`,height:d,borderRadius:v,backgroundColor:f?.strokeColor},C={width:m<0?"100%":m},R=Ju.createElement("div",{className:`${t}-inner`,style:x},Ju.createElement("div",{className:(0,kL.default)(`${t}-bg`,`${t}-bg-${g}`),style:b},g==="inner"&&l),S!==void 0&&Ju.createElement("div",{className:`${t}-success-bg`,style:w})),P=g==="outer"&&p==="start",O=g==="outer"&&p==="end";return g==="outer"&&p==="center"?Ju.createElement("div",{className:`${t}-layout-bottom`},R,l):Ju.createElement("div",{className:`${t}-outer`,style:C},P&&l,R,O&&l)},AL=Aq;var ME=E(D()),ML=E(Ne());var Mq=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]=Xs(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=Fq(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=en.useMemo(()=>{if(d){let U=typeof d=="string"?d:Object.values(d)[0];return new gt(U).isLight()}return!1},[a]),S=en.useMemo(()=>{var U,W;let B=Yu(e);return parseInt(B!==void 0?(U=B??0)===null||U===void 0?void 0:U.toString():(W=s??0)===null||W===void 0?void 0:W.toString(),10)},[s,e.success,e.successPercent]),w=en.useMemo(()=>!Lq.includes(f)&&S>=100?"success":f||"normal",[f,S]),{getPrefixCls:C,direction:R,progress:P}=en.useContext(rt),O=C("progress",r),[A,M,F]=$L(O),H=u==="line",j=H&&!i,I=en.useMemo(()=>{if(!c)return null;let U=Yu(e),W,B=p||(L=>`${L}%`),q=H&&b&&m==="inner";return m==="inner"||p||w!=="exception"&&w!=="success"?W=B(na(s),na(U)):w==="exception"?W=H?en.createElement(gu,null):en.createElement(gv,null):w==="success"&&(W=H?en.createElement(uD,null):en.createElement(Oy,null)),en.createElement("span",{className:(0,FE.default)(`${O}-text`,{[`${O}-text-bright`]:q,[`${O}-text-${y}`]:j,[`${O}-text-${m}`]:j}),title:typeof W=="string"?W:void 0},W)},[c,s,S,w,u,O,p]),N;u==="line"?N=i?en.createElement(FL,Object.assign({},e,{strokeColor:x,prefixCls:O,steps:typeof i=="object"?i.count:i}),I):en.createElement(AL,Object.assign({},e,{strokeColor:d,prefixCls:O,direction:R,percentPosition:{align:y,type:m}}),I):(u==="circle"||u==="dashboard")&&(N=en.createElement(IL,Object.assign({},e,{strokeColor:d,prefixCls:O,progressStatus:w}),I));let $=(0,FE.default)(O,`${O}-status-${w}`,{[`${O}-${u==="dashboard"&&"circle"||u}`]:u!=="line",[`${O}-inline-circle`]:u==="circle"&&Xs(l,"circle")[0]<=20,[`${O}-line`]:j,[`${O}-line-align-${y}`]:j,[`${O}-line-position-${m}`]:j,[`${O}-steps`]:i,[`${O}-show-info`]:c,[`${O}-${l}`]:typeof l=="string",[`${O}-rtl`]:R==="rtl"},P?.className,n,o,M,F);return A(en.createElement("div",Object.assign({ref:t,style:Object.assign(Object.assign({},P?.style),g),className:$,role:"progressbar","aria-valuenow":S,"aria-valuemin":0,"aria-valuemax":100},Kr(v,["trailColor","strokeWidth","width","gapDegree","gapPosition","strokeLinecap","success","successPercent"])),N))}),LL=zq;var zL=LL;var h0=E(D());var Wq={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"},WL=Wq;var Bq=function(t,r){return h0.createElement(zt,fe({},t,{ref:r,icon:WL}))},jq=h0.forwardRef(Bq),BL=jq;var v0=E(D());var Vq={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"},jL=Vq;var Hq=function(t,r){return v0.createElement(zt,fe({},t,{ref:r,icon:jL}))},Uq=v0.forwardRef(Hq),VL=Uq;var y0=E(D());var qq={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"},HL=qq;var Gq=function(t,r){return y0.createElement(zt,fe({},t,{ref:r,icon:HL}))},Kq=y0.forwardRef(Gq),UL=Kq;var x0=E(D());var Xq={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"},qL=Xq;var Yq=function(t,r){return x0.createElement(zt,fe({},t,{ref:r,icon:qL}))},Qq=x0.forwardRef(Yq),GL=Qq;var b0=E(D());var Jq={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"},KL=Jq;var Zq=function(t,r){return b0.createElement(zt,fe({},t,{ref:r,icon:KL}))},eG=b0.forwardRef(Zq),XL=eG;var tG={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"},YL=tG;var O0=E(D());var br=E(D()),jE=E(Vi()),E0=E(Ne());var C0=E(D());var ZL=E(Ne());var Sp=E(D());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 rG(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 QL(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(rG(e,t),QL(t)):e.onSuccess(QL(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 nG=function(){var e=Gr(Ot().mark(function t(r,n){var o,i,a,s,l,c,u,f;return Ot().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:c=function(){return c=Gr(Ot().mark(function v(y){return Ot().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=Gr(Ot().mark(function v(y){var m,d,x,b,S;return Ot().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;S0||v.some(function(b){return b.kind==="file"}))&&u?.(),!h){x.next=11;break}return x.next=7,JL(Array.prototype.slice.call(v),function(b){return S0(b,n.props.accept)});case 7:y=x.sent,n.uploadFiles(y),x.next=14;break;case 11:m=te(y).filter(function(b){return S0(b,g)}),p===!1&&(m=y.slice(0,1)),n.uploadFiles(m);case 14:case"end":return x.stop()}},l)}));return function(l,c){return s.apply(this,arguments)}}()),_(Ye(n),"onFilePaste",function(){var s=Gr(Ot().mark(function l(c){var u,f;return Ot().wrap(function(g){for(;;)switch(g.prev=g.next){case 0:if(u=n.props.pastable,u){g.next=3;break}return g.abrupt("return");case 3:if(c.type!=="paste"){g.next=6;break}return f=c.clipboardData,g.abrupt("return",n.onDataTransferFiles(f,function(){c.preventDefault()}));case 6:case"end":return g.stop()}},l)}));return function(l){return s.apply(this,arguments)}}()),_(Ye(n),"onFileDragOver",function(s){s.preventDefault()}),_(Ye(n),"onFileDrop",function(){var s=Gr(Ot().mark(function l(c){var u;return Ot().wrap(function(p){for(;;)switch(p.prev=p.next){case 0:if(c.preventDefault(),c.type!=="drop"){p.next=4;break}return u=c.dataTransfer,p.abrupt("return",n.onDataTransferFiles(u));case 4:case"end":return p.stop()}},l)}));return function(l){return s.apply(this,arguments)}}()),_(Ye(n),"uploadFiles",function(s){var l=te(s),c=l.map(function(u){return u.uid=bp(),n.processFile(u,l)});Promise.all(c).then(function(u){var f=n.props.onBatchStart;f?.(u.map(function(p){var g=p.origin,h=p.parsedFile;return{file:g,parsedFile:h}})),u.filter(function(p){return p.parsedFile!==null}).forEach(function(p){n.post(p)})})}),_(Ye(n),"processFile",function(){var s=Gr(Ot().mark(function l(c,u){var f,p,g,h,v,y,m,d,x;return Ot().wrap(function(S){for(;;)switch(S.prev=S.next){case 0:if(f=n.props.beforeUpload,p=c,!f){S.next=14;break}return S.prev=3,S.next=6,f(c,u);case 6:p=S.sent,S.next=12;break;case 9:S.prev=9,S.t0=S.catch(3),p=!1;case 12:if(p!==!1){S.next=14;break}return S.abrupt("return",{origin:c,parsedFile:null,action:null,data:null});case 14:if(g=n.props.action,typeof g!="function"){S.next=21;break}return S.next=18,g(c);case 18:h=S.sent,S.next=22;break;case 21:h=g;case 22:if(v=n.props.data,typeof v!="function"){S.next=29;break}return S.next=26,v(c);case 26:y=S.sent,S.next=30;break;case 29:y=v;case 30:return m=(ue(p)==="object"||typeof p=="string")&&p?p:c,m instanceof File?d=m:d=new File([m],c.name,{type:c.type}),x=d,x.uid=c.uid,S.abrupt("return",{origin:c,data:y,parsedFile:x,action:h});case 35:case"end":return S.stop()}},l,null,[[3,9]])}));return function(l,c){return s.apply(this,arguments)}}()),_(Ye(n),"saveFileInput",function(s){n.fileInput=s}),n}return at(r,[{key:"componentDidMount",value:function(){this._isMounted=!0;var o=this.props.pastable;o&&document.addEventListener("paste",this.onFilePaste)}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort(),document.removeEventListener("paste",this.onFilePaste)}},{key:"componentDidUpdate",value:function(o){var i=this.props.pastable;i&&!o.pastable?document.addEventListener("paste",this.onFilePaste):!i&&o.pastable&&document.removeEventListener("paste",this.onFilePaste)}},{key:"post",value:function(o){var i=this,a=o.data,s=o.origin,l=o.action,c=o.parsedFile;if(this._isMounted){var u=this.props,f=u.onStart,p=u.customRequest,g=u.name,h=u.headers,v=u.withCredentials,y=u.method,m=s.uid,d=p||LE,x={action:l,filename:g,data:a,file:c,headers:h,withCredentials:v,method:y||"post",onProgress:function(S){var w=i.props.onProgress;w?.(S,c)},onSuccess:function(S,w){var C=i.props.onSuccess;C?.(S,c,w),delete i.reqs[m]},onError:function(S,w){var C=i.props.onError;C?.(S,w,c),delete i.reqs[m]}};f(s),this.reqs[m]=d(x)}}},{key:"reset",value:function(){this.setState({uid:bp()})}},{key:"abort",value:function(o){var i=this.reqs;if(o){var a=o.uid?o.uid:o;i[a]&&i[a].abort&&i[a].abort(),delete i[a]}else Object.keys(i).forEach(function(s){i[s]&&i[s].abort&&i[s].abort(),delete i[s]})}},{key:"render",value:function(){var o=this.props,i=o.component,a=o.prefixCls,s=o.className,l=o.classNames,c=l===void 0?{}:l,u=o.disabled,f=o.id,p=o.name,g=o.style,h=o.styles,v=h===void 0?{}:h,y=o.multiple,m=o.accept,d=o.capture,x=o.children,b=o.directory,S=o.openFileDialogOnClick,w=o.onMouseEnter,C=o.onMouseLeave,R=o.hasControlInside,P=Ve(o,aG),O=(0,ZL.default)(_(_(_({},a,!0),"".concat(a,"-disabled"),u),s,s)),A=b?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},M=u?{}:{onClick:S?this.onClick:function(){},onKeyDown:S?this.onKeyDown:function(){},onMouseEnter:w,onMouseLeave:C,onDrop:this.onFileDrop,onDragOver:this.onFileDragOver,tabIndex:R?void 0:"0"};return Sp.default.createElement(i,fe({},M,{className:O,role:R?void 0:"button",style:g}),Sp.default.createElement("input",fe({},qo(P,{aria:!0,data:!0}),{id:f,name:p,disabled:u,type:"file",ref:this.saveFileInput,onClick:function(H){return H.stopPropagation()},key:this.state.uid,style:T({display:"none"},v.input),className:c.input,accept:m},A,{multiple:y,onChange:this.onChange},d!=null?{capture:d}:{})),x)}}]),r}(Sp.Component),e3=sG;function zE(){}var t3=function(e){Dr(r,e);var t=$r(r);function r(){var n;it(this,r);for(var o=arguments.length,i=new Array(o),a=0;a{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 ${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}}}}}},u3=gG;var hG=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({},pu()),{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({},_a),{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}`},[` + `]:{color:e.colorTextDisabled}}}}}},n3=lG;var cG=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({},pu()),{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.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:'""'}}})}}},f3=hG;var vG=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`]:kw(e)},r,n]},d3=vG;var p3=e=>{let{componentCls:t,iconCls:r,uploadThumbnailSize:n,uploadProgressOffset:o,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:'""'}}})}}},o3=cG;var uG=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]},i3=uG;var a3=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(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({},_a),{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='${Ns[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${Ns.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:"dashed",[`${s}-name`]:{marginBottom:o}}},[`${a}${a}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:"50%"}}}}},m3=e=>{let{componentCls:t,iconCls:r,fontSizeLG:n,colorTextLightSolid:o,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='${Ns[0]}']`]:{fill:e.colorErrorBg},[`svg path[fill='${Ns.primary}']`]:{fill:e.colorError}}},[`${s}-uploading`]:{borderStyle:"dashed",[`${s}-name`]:{marginBottom:o}}},[`${a}${a}-picture-circle ${s}`]:{[`&, &::before, ${s}-thumbnail`]:{borderRadius:"50%"}}}}},s3=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({},pu()),{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: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 yG=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},g3=yG;var xG=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"}})}},bG=e=>({actionsColor:e.colorIcon}),h3=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[xG(a),u3(a),p3(a),m3(a),f3(a),d3(a),g3(a),Aw(a)]},bG);var qt=E(N());var GE=E(Ne());function Ep(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 Rp(e,t){let r=ee(t),n=r.findIndex(({uid:o})=>o===e.uid);return n===-1?r.push(e):r[n]=e,r}function P0(e,t){let r=e.uid!==void 0?"uid":"name";return t.filter(n=>n[r]===e[r])[0]}function v3(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 SG=(e="")=>{let t=e.split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},y3=e=>e.indexOf("image/")===0,x3=e=>{if(e.type&&!e.thumbUrl)return y3(e.type);let t=e.thumbUrl||e.url||"",r=SG(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)},Ys=200;function b3(e){return new Promise(t=>{if(!e.type||!y3(e.type)){t("");return}let r=document.createElement("canvas");r.width=Ys,r.height=Ys,r.style.cssText=`position: fixed; left: 0; top: 0; width: ${Ys}px; height: ${Ys}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=Ys,l=Ys,c=0,u=0;i>a?(l=a*(Ys/i),u=-(l-s)/2):(s=i*(Ys/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(N());var Qs=E(Ne());var CG=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:d,showRemoveIcon:m,showDownloadIcon:h,previewIcon:v,removeIcon:y,downloadIcon:g,extra:p,onPreview:x,onDownload:b,onClose:S},w)=>{var C,R;let{status:P}=i,[O,I]=Bt.useState(P);Bt.useEffect(()=>{P!=="removed"&&I(P)},[P]);let[D,$]=Bt.useState(!1);Bt.useEffect(()=>{let U=setTimeout(()=>{$(!0)},300);return()=>{clearTimeout(U)}},[]);let F=l(i),k=Bt.createElement("div",{className:`${e}-icon`},F);if(o==="picture"||o==="picture-card"||o==="picture-circle")if(O==="uploading"||!i.thumbUrl&&!i.url){let U=(0,Qs.default)(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:O!=="uploading"});k=Bt.createElement("div",{className:U},F)}else{let U=f?.(i)?Bt.createElement("img",{src:i.thumbUrl||i.url,alt:i.name,className:`${e}-list-item-image`,crossOrigin:i.crossOrigin}):F,Q=(0,Qs.default)(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:f&&!f(i)});k=Bt.createElement("a",{className:Q,onClick:te=>x(i,te),href:i.url||i.thumbUrl,target:"_blank",rel:"noopener noreferrer"},U)}let z=(0,Qs.default)(`${e}-list-item`,`${e}-list-item-${O}`),B=typeof i.linkProps=="string"?JSON.parse(i.linkProps):i.linkProps,j=(typeof m=="function"?m(i):m)?c((typeof y=="function"?y(i):y)||Bt.createElement(KL,null),()=>S(i),e,n.removeFile,!0):null,G=(typeof h=="function"?h(i):h)&&O==="done"?c((typeof g=="function"?g(i):g)||Bt.createElement(YL,null),()=>b(i),e,n.downloadFile):null,V=o!=="picture-card"&&o!=="picture-circle"&&Bt.createElement("span",{key:"download-delete",className:(0,Qs.default)(`${e}-list-item-actions`,{picture:o==="picture"})},G,j),H=typeof p=="function"?p(i):p,K=H&&Bt.createElement("span",{className:`${e}-list-item-extra`},H),W=(0,Qs.default)(`${e}-list-item-name`),A=i.url?Bt.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:W,title:i.name},B,{href:i.url,onClick:U=>x(i,U)}),i.name,K):Bt.createElement("span",{key:"view",className:W,onClick:U=>x(i,U),title:i.name},i.name,K),L=(typeof d=="function"?d(i):d)&&(i.url||i.thumbUrl)?Bt.createElement("a",{href:i.url||i.thumbUrl,target:"_blank",rel:"noopener noreferrer",onClick:U=>x(i,U),title:n.previewFile},typeof v=="function"?v(i):v||Bt.createElement(g0,null)):null,q=(o==="picture-card"||o==="picture-circle")&&O!=="uploading"&&Bt.createElement("span",{className:`${e}-list-item-actions`},L,O==="done"&&G,j),{getPrefixCls:ne}=Bt.useContext(rt),Y=ne(),X=Bt.createElement("div",{className:z},k,A,V,q,D&&Bt.createElement(qo,{motionName:`${Y}-fade`,visible:O==="uploading",motionDeadline:2e3},({className:U})=>{let Q="percent"in i?Bt.createElement(qL,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,Qs.default)(`${e}-list-item-progress`,U)},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,J=O==="error"?Bt.createElement(Ma,{title:ae,getPopupContainer:U=>U.parentNode},X):X;return Bt.createElement("div",{className:(0,Qs.default)(`${e}-list-item-container`,t),style:r,ref:w},u?u(J,i,a,{download:b.bind(null,i),preview:x.bind(null,i),remove:S.bind(null,i)}):J)}),S3=CG;var wG=(e,t)=>{let{listType:r="text",previewFile:n=b3,onPreview:o,onDownload:i,onRemove:a,locale:s,iconRender:l,isImageUrl:c=x3,prefixCls:u,items:f=[],showPreviewIcon:d=!0,showRemoveIcon:m=!0,showDownloadIcon:h=!1,removeIcon:v,previewIcon:y,downloadIcon:g,extra:p,progress:x={size:[-1,2],showInfo:!1},appendAction:b,appendActionVisible:S=!0,itemRender:w,disabled:C}=e,R=J1(),[P,O]=qt.useState(!1),I=["picture-card","picture-circle"].includes(r);qt.useEffect(()=>{r.startsWith("picture")&&(f||[]).forEach(W=>{!(W.originFileObj instanceof File||W.originFileObj instanceof Blob)||W.thumbUrl!==void 0||(W.thumbUrl="",n?.(W.originFileObj).then(A=>{W.thumbUrl=A||"",R()}))})},[r,f,n]),qt.useEffect(()=>{O(!0)},[]);let D=(W,A)=>{if(o)return A?.preventDefault(),o(W)},$=W=>{typeof i=="function"?i(W):W.url&&window.open(W.url)},F=W=>{a?.(W)},k=W=>{if(l)return l(W,r);let A=W.status==="uploading";if(r.startsWith("picture")){let L=r==="picture"?qt.createElement(kl,null):s.uploading,q=c?.(W)?qt.createElement(r3,null):qt.createElement(JL,null);return A?L:q}return A?qt.createElement(kl,null):qt.createElement(e3,null)},z=(W,A,L,q,ne)=>{let Y={type:"text",size:"small",title:q,onClick:X=>{var ae,J;A(),qt.isValidElement(W)&&((J=(ae=W.props).onClick)===null||J===void 0||J.call(ae,X))},className:`${L}-list-item-action`,disabled:ne?C:!1};return qt.isValidElement(W)?qt.createElement(Bd,Object.assign({},Y,{icon:Ko(W,Object.assign(Object.assign({},W.props),{onClick:()=>{}}))})):qt.createElement(Bd,Object.assign({},Y),qt.createElement("span",null,W))};qt.useImperativeHandle(t,()=>({handlePreview:D,handleDownload:$}));let{getPrefixCls:B}=qt.useContext(rt),j=B("upload",u),G=B(),V=(0,GE.default)(`${j}-list`,`${j}-list-${r}`),H=qt.useMemo(()=>Kr(DD(G),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[G]),K=Object.assign(Object.assign({},I?{}:H),{motionDeadline:2e3,motionName:`${j}-${I?"animate-inline":"animate"}`,keys:ee(f.map(W=>({key:W.uid,file:W}))),motionAppear:P});return qt.createElement("div",{className:V},qt.createElement(dw,Object.assign({},K,{component:!1}),({key:W,file:A,className:L,style:q})=>qt.createElement(S3,{key:W,locale:s,prefixCls:j,className:L,style:q,file:A,items:f,progress:x,listType:r,isImgUrl:c,showPreviewIcon:d,showRemoveIcon:m,showDownloadIcon:h,removeIcon:v,previewIcon:y,downloadIcon:g,extra:p,iconRender:k,actionIconRender:z,itemRender:w,onPreview:D,onDownload:$,onClose:F})),b&&qt.createElement(qo,Object.assign({},K,{visible:S,forceRender:!0}),({className:W,style:A})=>Ko(b,L=>({className:(0,GE.default)(L.className,W),style:Object.assign(Object.assign(Object.assign({},A),{pointerEvents:W?"none":void 0}),L.style)}))))},EG=qt.forwardRef(wG),C3=EG;var RG=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())})},ef=`__LIST_IGNORE_${Date.now()}__`,OG=(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:d,locale:m,iconRender:h,isImageUrl:v,progress:y,prefixCls:g,className:p,type:x="select",children:b,style:S,itemRender:w,maxCount:C,data:R={},multiple:P=!1,hasControlInside:O=!0,action:I="",accept:D="",supportServerRender:$=!0,rootClassName:F}=e,k=br.useContext(qr),z=d??k,[B,j]=ar(n||[],{value:r,postState:se=>se??[]}),[G,V]=br.useState("drop"),H=br.useRef(null),K=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 W=(se,xe,_e)=>{let he=ee(xe),Ze=!1;C===1?he=he.slice(-1):C&&(Ze=he.length>C,he=he.slice(0,C)),(0,KE.flushSync)(()=>{j(he)});let lt={file:se,fileList:he};_e&&(lt.event=_e),(!Ze||se.status==="removed"||he.some(Rt=>Rt.uid===se.uid))&&(0,KE.flushSync)(()=>{c?.(lt)})},A=(se,xe)=>RG(void 0,void 0,void 0,function*(){let{beforeUpload:_e,transformFile:he}=e,Ze=se;if(_e){let lt=yield _e(se,xe);if(lt===!1)return!1;if(delete se[ef],lt===ef)return Object.defineProperty(se,ef,{value:!0,configurable:!0}),!1;typeof lt=="object"&<&&(Ze=lt)}return he&&(Ze=yield he(Ze)),Ze}),L=se=>{let xe=se.filter(Ze=>!Ze.file[ef]);if(!xe.length)return;let _e=xe.map(Ze=>Ep(Ze.file)),he=ee(B);_e.forEach(Ze=>{he=Rp(Ze,he)}),_e.forEach((Ze,lt)=>{let Rt=Ze;if(xe[lt].parsedFile)Ze.status="uploading";else{let{originFileObj:Tt}=Ze,pt;try{pt=new File([Tt],Tt.name,{type:Tt.type})}catch{pt=new Blob([Tt],{type:Tt.type}),pt.name=Tt.name,pt.lastModifiedDate=new Date,pt.lastModified=new Date().getTime()}pt.uid=Ze.uid,Rt=pt}W(Rt,he)})},q=(se,xe,_e)=>{try{typeof se=="string"&&(se=JSON.parse(se))}catch{}if(!P0(xe,B))return;let he=Ep(xe);he.status="done",he.percent=100,he.response=se,he.xhr=_e;let Ze=Rp(he,B);W(he,Ze)},ne=(se,xe)=>{if(!P0(xe,B))return;let _e=Ep(xe);_e.status="uploading",_e.percent=se.percent;let he=Rp(_e,B);W(_e,he,se)},Y=(se,xe,_e)=>{if(!P0(_e,B))return;let he=Ep(_e);he.error=se,he.response=xe,he.status="error";let Ze=Rp(he,B);W(he,Ze)},X=se=>{let xe;Promise.resolve(typeof o=="function"?o(se):o).then(_e=>{var he;if(_e===!1)return;let Ze=v3(se,B);Ze&&(xe=Object.assign(Object.assign({},se),{status:"removed"}),B?.forEach(lt=>{let Rt=xe.uid!==void 0?"uid":"name";lt[Rt]===xe[Rt]&&!Object.isFrozen(lt)&&(lt.status="removed")}),(he=H.current)===null||he===void 0||he.abort(xe),W(xe,Ze))})},ae=se=>{V(se.type),se.type==="drop"&&u?.(se)};br.useImperativeHandle(t,()=>({onBatchStart:L,onSuccess:q,onProgress:ne,onError:Y,fileList:B,upload:H.current,nativeElement:K.current}));let{getPrefixCls:J,direction:U,upload:Q}=br.useContext(rt),te=J("upload",g),Z=Object.assign(Object.assign({onBatchStart:L,onError:Y,onProgress:ne,onSuccess:q},e),{data:R,multiple:P,action:I,accept:D,supportServerRender:$,prefixCls:te,disabled:z,beforeUpload:A,onChange:void 0,hasControlInside:O});delete Z.className,delete Z.style,(!b||z)&&delete Z.id;let re=`${te}-wrapper`,[de,le,pe]=h3(te,re),[Oe]=wa("Upload",Ri.Upload),{showRemoveIcon:Ce,showPreviewIcon:$e,showDownloadIcon:ce,removeIcon:ie,previewIcon:Re,downloadIcon:Le,extra:Ge}=typeof i=="boolean"?{}:i,Me=typeof Ce>"u"?!z:Ce,Ie=(se,xe)=>i?br.createElement(C3,{prefixCls:te,listType:a,items:B,previewFile:f,onPreview:s,onDownload:l,onRemove:X,showRemoveIcon:Me,showPreviewIcon:$e,showDownloadIcon:ce,removeIcon:ie,previewIcon:Re,downloadIcon:Le,iconRender:h,extra:Ge,locale:Object.assign(Object.assign({},Oe),m),isImageUrl:v,progress:y,appendAction:se,appendActionVisible:xe,itemRender:w,disabled:z}):se,je=(0,T0.default)(re,p,F,le,pe,Q?.className,{[`${te}-rtl`]:U==="rtl",[`${te}-picture-card-wrapper`]:a==="picture-card",[`${te}-picture-circle-wrapper`]:a==="picture-circle"}),We=Object.assign(Object.assign({},Q?.style),S);if(x==="drag"){let se=(0,T0.default)(le,te,`${te}-drag`,{[`${te}-drag-uploading`]:B.some(xe=>xe.status==="uploading"),[`${te}-drag-hover`]:G==="dragover",[`${te}-disabled`]:z,[`${te}-rtl`]:U==="rtl"});return de(br.createElement("span",{className:je,ref:K},br.createElement("div",{className:se,style:We,onDrop:ae,onDragOver:ae,onDragLeave:ae},br.createElement(qE,Object.assign({},Z,{ref:H,className:`${te}-btn`}),br.createElement("div",{className:`${te}-drag-container`},b))),Ie()))}let He=(0,T0.default)(te,`${te}-select`,{[`${te}-disabled`]:z,[`${te}-hidden`]:!b}),ye=br.createElement("div",{className:He,style:We},br.createElement(qE,Object.assign({},Z,{ref:H})));return de(a==="picture-card"||a==="picture-circle"?br.createElement("span",{className:je,ref:K},Ie(ye,!!b)):br.createElement("span",{className:je,ref:K},ye,Ie()))},_G=br.forwardRef(OG),N0=_G;var PG=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=PG(e,["style","height","hasControlInside"]);return I0.createElement(N0,Object.assign({ref:t,hasControlInside:o},i,{type:"drag",style:Object.assign(Object.assign({},r),{height:n})}))}),w3=TG;var XE=N0;XE.Dragger=w3;XE.LIST_IGNORE=ef;var YE=XE;var _r=E(Or(),1),MG=()=>{let[e,t]=(0,_3.useState)(Xe.data.useSliderForNumberWidget),r=()=>{location.href="/sd-ppp-static/sd-ppp_PS.ccx?_="+Date.now()},n=()=>{location.href="https://gitee.com/zombieyang/sd-ppp/raw/main/static/sd-ppp2_PS.ccx?_="+Date.now()};return(0,_r.jsxs)("div",{className:"settings-container",children:[(0,_r.jsx)("h2",{children:me("SDPPP Settings/Misc")}),(0,_r.jsxs)("div",{className:"settings-section",children:[(0,_r.jsx)("div",{className:"settings-label",children:(0,_r.jsx)("label",{children:me("Comfy URL (You can copy it to connect ComfyUI in the plugin):")})}),(0,_r.jsx)("div",{className:"settings-control",children:location.href.split("?")[0].split("#")[0]})]}),(0,_r.jsxs)("div",{className:"settings-section settings-row",children:[(0,_r.jsx)("div",{className:"settings-label",children:(0,_r.jsx)("label",{children:me("Photoshop plugin")})}),(0,_r.jsx)("div",{className:"settings-control",children:(0,_r.jsx)("button",{onClick:r,className:"download-button",children:me("Download")})})]}),(0,_r.jsxs)("div",{className:"settings-section settings-row",children:[(0,_r.jsx)("div",{className:"settings-label",children:(0,_r.jsxs)("label",{children:[me("Photoshop plugin")," 2.0 Beta(CHN only)"]})}),(0,_r.jsx)("div",{className:"settings-control",children:(0,_r.jsx)("button",{onClick:n,className:"download-button",children:me("Download")})})]}),(0,_r.jsxs)("div",{className:"settings-section settings-row",children:[(0,_r.jsx)("div",{className:"settings-label",children:(0,_r.jsx)("label",{htmlFor:"maxImageSize",children:me("use slider for number widget:")})}),(0,_r.jsx)("div",{className:"settings-control",children:(0,_r.jsx)(cp,{id:"useSliderForNumberWidget",checked:e,onChange:o=>{t(o.target.checked),Xe.setUseSliderForNumberWidget(o.target.checked),an.storeSetting("sdppp.useSliderForNumberWidget",o.target.checked)}})})]})]})},P3=MG;var A5=E(N(),1);var Ql=E(N(),1);var T3=E(N(),1);function $0(e){return e=e||12,{flex:`${e} 0 calc(${e/12*100}% - 10px)`,maxWidth:"100%"}}var An=E(Or(),1);function JE({widgetTableStructure:e,widgetTableValue:t,widgetTableErrors:r,onWidgetRender:n,onWidgetChange:o,onTitleRender:i}){let[a,s]=(0,Ql.useState)(0),l=(0,Ql.useMemo)(()=>e.nodeIndexes.map(d=>{let m=e.nodes[d],h=(p,x,b)=>p.keepRender?x.outputType==="error"?(p.result.push((0,An.jsx)("span",{className:"list-error-label",children:t[m.id][b]})),p):(n?.(p,m,x,b),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,An.jsxs)("div",{className:"workflow-edit-field",children:[(0,An.jsx)("div",{className:"workflow-edit-field-title",title:m.title,style:{...$0(g?4:12),borderColor:y},children:i?i(m.title,m):(0,An.jsx)("span",{children:m.title})}),m.widgets.reduce(h,{keepRender:!0,result:[]}).result.map((p,x)=>(0,An.jsx)(QE,{children:p},x)),r[m.id]?(0,An.jsx)("span",{className:"list-error-label",children:r[m.id]}):""]},m.id)}).filter(Boolean),[e,t,r,n,o,i,a]),[c,u]=(0,Ql.useMemo)(()=>[Object.keys(r).filter(d=>e.nodes[parseInt(d)]),Object.keys(r).filter(d=>!e.nodes[parseInt(d)])],[r,e]),f=null;return u.length>0?f=(0,An.jsx)("span",{className:"list-error-label",children:r[+u[0]]}):c.length>0&&(f=(0,An.jsx)("span",{className:"list-error-label",children:r[+c[0]]})),(0,An.jsxs)(An.Fragment,{children:[f,Object.keys(e.nodes).length?"":(0,An.jsx)("span",{className:"list-error-label",children:me("no suitable node to control in this workflow")}),(0,An.jsx)("div",{className:"workflow-edit-content",children:l})]})}var QE=class extends Ql.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,An.jsx)("span",{className:"list-error-label",children:this.state.error?.stack||this.state.error?.message||this.state.error?.toString()}):this.props.children}};var Jl=E(N(),1);var N3=E(N(),1);function Js(e){return(0,N3.useMemo)(()=>$0(e),[e])}var Zs=E(Or(),1),I3=({inputMin:e,inputMax:t,inputStep:r,name:n,value:o=0,uiWeight:i=1,extraOptions:a,onValueChange:s})=>{let l=Js(i||12),[c,u]=(0,Jl.useState)(+o.toFixed(3));(0,Jl.useEffect)(()=>{u(+o.toFixed(3))},[o]);let f=(0,Jl.useCallback)(h=>{if(h!==null){let v=+h.toFixed(3);u(v)}},[]),d=(0,Jl.useCallback)(()=>{s(c)},[c,s]);return!((t-e)/r>1e3)&&i>=1&&a?.useSliderForNumberWidget?(0,Zs.jsxs)(Ba,{style:{width:"100%",...l},align:"center",children:[(0,Zs.jsx)(OE,{style:{flex:1},min:e,max:t,step:r,value:c,onChange:f,onChangeComplete:d}),(0,Zs.jsx)(i0,{style:{width:80},min:e,max:t,step:r,value:c,onChange:f,onBlur:d,controls:!1})]}):(0,Zs.jsxs)(Ba,{style:{width:"100%",...l},align:"center",children:[n&&(0,Zs.jsx)("span",{style:{flex:1},children:n}),(0,Zs.jsx)(i0,{style:{width:"100%",flex:2},min:e,max:t,step:r,value:c,onChange:f,onBlur:d,controls:!1})]})};var Op=E(Or(),1),D3=({onSelectUpdate:e,options:t,value:r,name:n,uiWeight:o})=>{let i=s=>{let l=t.indexOf(s);e(s,l)},a=Js(o||12);return(0,Op.jsxs)(Ba,{style:{width:"100%",...a},align:"center",children:[n&&(0,Op.jsx)("span",{style:{flex:1},children:n}),(0,Op.jsx)(sp,{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 A3=E(Or(),1),$3=({value:e,name:t,onValueChange:r,uiWeight:n})=>{let o=a=>{r(a.target.checked)},i=Js(n||12);return(0,A3.jsx)(cp,{checked:!!e,onChange:o,style:{...i},children:t||""})};var ZE=E(Or(),1),{TextArea:FG}=yp,k3=({value:e="",onValueChange:t,uiWeight:r})=>{let n=Js(r||12);return(0,ZE.jsx)("div",{className:"widget-container",style:n,children:(0,ZE.jsx)(FG,{value:e,onChange:i=>{t(i.target.value)},autoSize:{minRows:1}})})};var _p=E(N(),1);var A0=E(Or(),1);function M3({title:e,onTitleChange:t}){let[r,n]=(0,_p.useState)(!1),[o,i]=(0,_p.useState)(e);(0,_p.useEffect)(()=>{i(e)},[e]);let a=()=>{n(!0)};return r?(0,A0.jsx)(yp,{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,A0.jsx)(Ma,{title:me("click to edit"),children:(0,A0.jsx)("span",{onClick:a,style:{cursor:"pointer"},children:o})})}var F3=E(N()),LG=(0,F3.createContext)({}),k0=LG;var tc=E(N()),I5=E(Ne());var L3={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 mn=Math.round;function eR(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 z3=(e,t,r)=>r===0?e:e/100;function Pp(e,t){let r=t||255;return e>r?r:e<0?0:e}var Zl=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=L3[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=Pp(t.r),this.g=Pp(t.g),this.b=Pp(t.b),this.a=typeof t.a=="number"?Pp(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=mn(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:mn(i("r")),g:mn(i("g")),b:mn(i("b")),a:mn(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=>mn((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=mn(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=mn(this.getSaturation()*100),n=mn(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]=Pp(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 d=mn(n*255);this.r=d,this.g=d,this.b=d}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=mn((i+f)*255),this.g=mn((a+f)*255),this.b=mn((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=mn(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=mn(n*(1-r)*255),u=mn(n*(1-r*l)*255),f=mn(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=eR(t,z3);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=eR(t,z3);this.fromHsl({h:r[0],s:r[1],l:r[2],a:r[3]})}fromRgbString(t){let r=eR(t,(n,o)=>o.includes("%")?mn(n/100*255):n);this.r=r[0],this.g=r[1],this.b=r[2],this.a=r[3]}};var M0=2,W3=.16,zG=.05,WG=.05,BG=.15,H3=5,U3=4,jG=[{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 B3(e,t,r){let n;return Math.round(e.h)>=60&&Math.round(e.h)<=240?n=r?Math.round(e.h)-M0*t:Math.round(e.h)+M0*t:n=r?Math.round(e.h)+M0*t:Math.round(e.h)-M0*t,n<0?n+=360:n>=360&&(n-=360),n}function j3(e,t,r){if(e.h===0&&e.s===0)return e.s;let n;return r?n=e.s-W3*t:t===U3?n=e.s+W3:n=e.s+zG*t,n>1&&(n=1),r&&t===H3&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function V3(e,t,r){let n;return r?n=e.v+WG*t:n=e.v-BG*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function F0(e,t={}){let r=[],n=new Zl(e),o=n.toHsv();for(let i=H3;i>0;i-=1){let a=new Zl({h:B3(o,i,!0),s:j3(o,i,!0),v:V3(o,i,!0)});r.push(a)}r.push(n);for(let i=1;i<=U3;i+=1){let a=new Zl({h:B3(o,i),s:j3(o,i),v:V3(o,i)});r.push(a)}return t.theme==="dark"?jG.map(({index:i,amount:a})=>new Zl(t.backgroundColor||"#141414").mix(r[i],a).toHexString()):r.map(i=>i.toHexString())}var q3=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];q3.primary=q3[5];var G3=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];G3.primary=G3[5];var K3=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];K3.primary=K3[5];var X3=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];X3.primary=X3[5];var Y3=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];Y3.primary=Y3[5];var Q3=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];Q3.primary=Q3[5];var J3=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];J3.primary=J3[5];var Z3=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];Z3.primary=Z3[5];var L0=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];L0.primary=L0[5];var e5=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];e5.primary=e5[5];var t5=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];t5.primary=t5[5];var r5=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];r5.primary=r5[5];var n5=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];n5.primary=n5[5];var o5=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];o5.primary=o5[5];var i5=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];i5.primary=i5[5];var a5=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];a5.primary=a5[5];var s5=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];s5.primary=s5[5];var l5=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];l5.primary=l5[5];var c5=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];c5.primary=c5[5];var u5=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];u5.primary=u5[5];var f5=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];f5.primary=f5[5];var d5=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];d5.primary=d5[5];var p5=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];p5.primary=p5[5];var m5=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];m5.primary=m5[5];var g5=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];g5.primary=g5[5];var h5=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];h5.primary=h5[5];var T5=E(N());function tR(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function rR(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 v5="data-rc-order",y5="data-rc-priority",VG="rc-util-key",nR=new Map;function x5({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:VG}function oR(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function HG(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function iR(e){return Array.from((nR.get(e)||e).children).filter(t=>t.tagName==="STYLE")}function b5(e,t={}){if(!tR())return null;let{csp:r,prepend:n,priority:o=0}=t,i=HG(n),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(v5,i),a&&o&&s.setAttribute(y5,`${o}`),r?.nonce&&(s.nonce=r?.nonce),s.innerHTML=e;let l=oR(t),{firstChild:c}=l;if(n){if(a){let u=(t.styles||iR(l)).filter(f=>{if(!["prepend","prependQueue"].includes(f.getAttribute(v5)))return!1;let d=Number(f.getAttribute(y5)||0);return o>=d});if(u.length)return l.insertBefore(s,u[u.length-1].nextSibling),s}l.insertBefore(s,c)}else l.appendChild(s);return s}function UG(e,t={}){let{styles:r}=t;return r||=iR(oR(t)),r.find(n=>n.getAttribute(x5(t))===e)}function qG(e,t){let r=nR.get(e);if(!r||!rR(document,r)){let n=b5("",t),{parentNode:o}=n;nR.set(e,o),e.removeChild(n)}}function S5(e,t,r={}){let n=oR(r),o=iR(n),i={...r,styles:o};qG(n,i);let a=UG(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=b5(e,i);return s.setAttribute(x5(i),t),s}function C5(e){return e?.getRootNode?.()}function GG(e){return C5(e)instanceof ShadowRoot}function w5(e){return GG(e)?C5(e):null}var aR={},KG=[],XG=e=>{KG.push(e)};function YG(e,t){}function QG(e,t){}function JG(){aR={}}function E5(e,t,r){!t&&!aR[r]&&(e(!1,r),aR[r]=!0)}function z0(e,t){E5(YG,e,t)}function ZG(e,t){E5(QG,e,t)}z0.preMessage=XG;z0.resetWarned=JG;z0.noteOnce=ZG;var R5=z0;var ec=E(N());function eK(e){return e.replace(/-(.)/g,(t,r)=>r.toUpperCase())}function _5(e,t){R5(e,`[@ant-design/icons] ${t}`)}function sR(e){return typeof e=="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(typeof e.icon=="object"||typeof e.icon=="function")}function O5(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[eK(r)]=n}return t},{})}function W0(e,t,r){return r?ec.default.createElement(e.tag,{key:t,...O5(e.attrs),...r},(e.children||[]).map((n,o)=>W0(n,`${t}-${e.tag}-${o}`))):ec.default.createElement(e.tag,{key:t,...O5(e.attrs)},(e.children||[]).map((n,o)=>W0(n,`${t}-${e.tag}-${o}`)))}function lR(e){return F0(e)[0]}function B0(e){return e?Array.isArray(e)?e:[e]:[]}var tK=` + `]:{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 fG=e=>{let{componentCls:t}=e;return{[`${t}-rtl`]:{direction:"rtl"}}},l3=fG;var dG=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"}})}},pG=e=>({actionsColor:e.colorIcon}),c3=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[dG(a),n3(a),a3(a),s3(a),o3(a),i3(a),l3(a),Pw(a)]},pG);var qt=E(D());var BE=E(Ne());function Cp(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 wp(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 u3(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 mG=(e="")=>{let t=e.split("/"),n=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(n)||[""])[0]},f3=e=>e.indexOf("image/")===0,d3=e=>{if(e.type&&!e.thumbUrl)return f3(e.type);let t=e.thumbUrl||e.url||"",r=mG(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)},Ys=200;function p3(e){return new Promise(t=>{if(!e.type||!f3(e.type)){t("");return}let r=document.createElement("canvas");r.width=Ys,r.height=Ys,r.style.cssText=`position: fixed; left: 0; top: 0; width: ${Ys}px; height: ${Ys}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=Ys,l=Ys,c=0,u=0;i>a?(l=a*(Ys/i),u=-(l-s)/2):(s=i*(Ys/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(D());var Qs=E(Ne());var gG=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[M,F]=Bt.useState(!1);Bt.useEffect(()=>{let K=setTimeout(()=>{F(!0)},300);return()=>{clearTimeout(K)}},[]);let H=l(i),j=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,Qs.default)(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:O!=="uploading"});j=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,Qs.default)(`${e}-list-item-thumbnail`,{[`${e}-list-item-file`]:f&&!f(i)});j=Bt.createElement("a",{className:Q,onClick:re=>x(i,re),href:i.url||i.thumbUrl,target:"_blank",rel:"noopener noreferrer"},K)}let I=(0,Qs.default)(`${e}-list-item`,`${e}-list-item-${O}`),N=typeof i.linkProps=="string"?JSON.parse(i.linkProps):i.linkProps,$=(typeof g=="function"?g(i):g)?c((typeof y=="function"?y(i):y)||Bt.createElement(BL,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(VL,null),()=>b(i),e,n.downloadFile):null,W=o!=="picture-card"&&o!=="picture-circle"&&Bt.createElement("span",{key:"download-delete",className:(0,Qs.default)(`${e}-list-item-actions`,{picture:o==="picture"})},U,$),B=typeof d=="function"?d(i):d,q=B&&Bt.createElement("span",{className:`${e}-list-item-extra`},B),L=(0,Qs.default)(`${e}-list-item-name`),k=i.url?Bt.createElement("a",Object.assign({key:"view",target:"_blank",rel:"noopener noreferrer",className:L,title:i.name},N,{href:i.url,onClick:K=>x(i,K)}),i.name,q):Bt.createElement("span",{key:"view",className:L,onClick:K=>x(i,K),title:i.name},i.name,q),z=(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`},z,O==="done"&&U,$),{getPrefixCls:J}=Bt.useContext(rt),Y=J(),X=Bt.createElement("div",{className:I},j,k,W,G,M&&Bt.createElement(Uo,{motionName:`${Y}-fade`,visible:O==="uploading",motionDeadline:2e3},({className:K})=>{let Q="percent"in i?Bt.createElement(zL,Object.assign({type:"line",percent:i.percent,"aria-label":i["aria-label"],"aria-labelledby":i["aria-labelledby"]},s)):null;return Bt.createElement("div",{className:(0,Qs.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(Ma,{title:ae,getPopupContainer:K=>K.parentNode},X):X;return Bt.createElement("div",{className:(0,Qs.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)}),m3=gG;var hG=(e,t)=>{let{listType:r="text",previewFile:n=p3,onPreview:o,onDownload:i,onRemove:a,locale:s,iconRender:l,isImageUrl:c=d3,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(L=>{!(L.originFileObj instanceof File||L.originFileObj instanceof Blob)||L.thumbUrl!==void 0||(L.thumbUrl="",n?.(L.originFileObj).then(k=>{L.thumbUrl=k||"",R()}))})},[r,f,n]),qt.useEffect(()=>{O(!0)},[]);let M=(L,k)=>{if(o)return k?.preventDefault(),o(L)},F=L=>{typeof i=="function"?i(L):L.url&&window.open(L.url)},H=L=>{a?.(L)},j=L=>{if(l)return l(L,r);let k=L.status==="uploading";if(r.startsWith("picture")){let z=r==="picture"?qt.createElement(Al,null):s.uploading,G=c?.(L)?qt.createElement(XL,null):qt.createElement(UL,null);return k?z:G}return k?qt.createElement(Al,null):qt.createElement(GL,null)},I=(L,k,z,G,J)=>{let Y={type:"text",size:"small",title:G,onClick:X=>{var ae,Z;k(),qt.isValidElement(L)&&((Z=(ae=L.props).onClick)===null||Z===void 0||Z.call(ae,X))},className:`${z}-list-item-action`,disabled:J?C:!1};return qt.isValidElement(L)?qt.createElement(zd,Object.assign({},Y,{icon:Go(L,Object.assign(Object.assign({},L.props),{onClick:()=>{}}))})):qt.createElement(zd,Object.assign({},Y),qt.createElement("span",null,L))};qt.useImperativeHandle(t,()=>({handlePreview:M,handleDownload:F}));let{getPrefixCls:N}=qt.useContext(rt),$=N("upload",u),U=N(),W=(0,BE.default)(`${$}-list`,`${$}-list-${r}`),B=qt.useMemo(()=>Kr(RD(U),["onAppearEnd","onEnterEnd","onLeaveEnd"]),[U]),q=Object.assign(Object.assign({},A?{}:B),{motionDeadline:2e3,motionName:`${$}-${A?"animate-inline":"animate"}`,keys:te(f.map(L=>({key:L.uid,file:L}))),motionAppear:P});return qt.createElement("div",{className:W},qt.createElement(sw,Object.assign({},q,{component:!1}),({key:L,file:k,className:z,style:G})=>qt.createElement(m3,{key:L,locale:s,prefixCls:$,className:z,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:j,actionIconRender:I,itemRender:w,onPreview:M,onDownload:F,onClose:H})),b&&qt.createElement(Uo,Object.assign({},q,{visible:S,forceRender:!0}),({className:L,style:k})=>Go(b,z=>({className:(0,BE.default)(z.className,L),style:Object.assign(Object.assign(Object.assign({},k),{pointerEvents:L?"none":void 0}),z.style)}))))},vG=qt.forwardRef(hG),g3=vG;var yG=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())})},Zu=`__LIST_IGNORE_${Date.now()}__`,xG=(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:M="",supportServerRender:F=!0,rootClassName:H}=e,j=br.useContext(qr),I=p??j,[N,$]=ar(n||[],{value:r,postState:se=>se??[]}),[U,W]=br.useState("drop"),B=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 L=(se,xe,_e)=>{let he=te(xe),Ze=!1;C===1?he=he.slice(-1):C&&(Ze=he.length>C,he=he.slice(0,C)),(0,jE.flushSync)(()=>{$(he)});let lt={file:se,fileList:he};_e&&(lt.event=_e),(!Ze||se.status==="removed"||he.some(Et=>Et.uid===se.uid))&&(0,jE.flushSync)(()=>{c?.(lt)})},k=(se,xe)=>yG(void 0,void 0,void 0,function*(){let{beforeUpload:_e,transformFile:he}=e,Ze=se;if(_e){let lt=yield _e(se,xe);if(lt===!1)return!1;if(delete se[Zu],lt===Zu)return Object.defineProperty(se,Zu,{value:!0,configurable:!0}),!1;typeof lt=="object"&<&&(Ze=lt)}return he&&(Ze=yield he(Ze)),Ze}),z=se=>{let xe=se.filter(Ze=>!Ze.file[Zu]);if(!xe.length)return;let _e=xe.map(Ze=>Cp(Ze.file)),he=te(N);_e.forEach(Ze=>{he=wp(Ze,he)}),_e.forEach((Ze,lt)=>{let Et=Ze;if(xe[lt].parsedFile)Ze.status="uploading";else{let{originFileObj:Tt}=Ze,pt;try{pt=new File([Tt],Tt.name,{type:Tt.type})}catch{pt=new Blob([Tt],{type:Tt.type}),pt.name=Tt.name,pt.lastModifiedDate=new Date,pt.lastModified=new Date().getTime()}pt.uid=Ze.uid,Et=pt}L(Et,he)})},G=(se,xe,_e)=>{try{typeof se=="string"&&(se=JSON.parse(se))}catch{}if(!w0(xe,N))return;let he=Cp(xe);he.status="done",he.percent=100,he.response=se,he.xhr=_e;let Ze=wp(he,N);L(he,Ze)},J=(se,xe)=>{if(!w0(xe,N))return;let _e=Cp(xe);_e.status="uploading",_e.percent=se.percent;let he=wp(_e,N);L(_e,he,se)},Y=(se,xe,_e)=>{if(!w0(_e,N))return;let he=Cp(_e);he.error=se,he.response=xe,he.status="error";let Ze=wp(he,N);L(he,Ze)},X=se=>{let xe;Promise.resolve(typeof o=="function"?o(se):o).then(_e=>{var he;if(_e===!1)return;let Ze=u3(se,N);Ze&&(xe=Object.assign(Object.assign({},se),{status:"removed"}),N?.forEach(lt=>{let Et=xe.uid!==void 0?"uid":"name";lt[Et]===xe[Et]&&!Object.isFrozen(lt)&&(lt.status="removed")}),(he=B.current)===null||he===void 0||he.abort(xe),L(xe,Ze))})},ae=se=>{W(se.type),se.type==="drop"&&u?.(se)};br.useImperativeHandle(t,()=>({onBatchStart:z,onSuccess:G,onProgress:J,onError:Y,fileList:N,upload:B.current,nativeElement:q.current}));let{getPrefixCls:Z,direction:K,upload:Q}=br.useContext(rt),re=Z("upload",m),ee=Object.assign(Object.assign({onBatchStart:z,onError:Y,onProgress:J,onSuccess:G},e),{data:R,multiple:P,action:A,accept:M,supportServerRender:F,prefixCls:re,disabled:I,beforeUpload:k,onChange:void 0,hasControlInside:O});delete ee.className,delete ee.style,(!b||I)&&delete ee.id;let ne=`${re}-wrapper`,[de,le,pe]=c3(re,ne),[Oe]=Ca("Upload",Ei.Upload),{showRemoveIcon:Ce,showPreviewIcon:$e,showDownloadIcon:ce,removeIcon:ie,previewIcon:Re,downloadIcon:Le,extra:Ge}=typeof i=="boolean"?{}:i,Me=typeof Ce>"u"?!I:Ce,Ie=(se,xe)=>i?br.createElement(g3,{prefixCls:re,listType:a,items:N,previewFile:f,onPreview:s,onDownload:l,onRemove:X,showRemoveIcon:Me,showPreviewIcon:$e,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:I}):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`]:N.some(xe=>xe.status==="uploading"),[`${re}-drag-hover`]:U==="dragover",[`${re}-disabled`]:I,[`${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:B,className:`${re}-btn`}),br.createElement("div",{className:`${re}-drag-container`},b))),Ie()))}let He=(0,E0.default)(re,`${re}-select`,{[`${re}-disabled`]:I,[`${re}-hidden`]:!b}),ye=br.createElement("div",{className:He,style:We},br.createElement(WE,Object.assign({},ee,{ref:B})));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()))},bG=br.forwardRef(xG),R0=bG;var SG=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=SG(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})}))}),h3=CG;var VE=R0;VE.Dragger=h3;VE.LIST_IGNORE=Zu;var HE=VE;var _r=E(Or(),1),TG=()=>{let[e,t]=(0,b3.useState)(Xe.data.useSliderForNumberWidget),r=()=>{location.href="/sd-ppp-static/sd-ppp_PS.ccx?_="+Date.now()},n=()=>{location.href="https://gitee.com/zombieyang/sd-ppp/raw/main/static/sd-ppp2_PS.ccx?_="+Date.now()};return(0,_r.jsxs)("div",{className:"settings-container",children:[(0,_r.jsx)("h2",{children:me("SDPPP Settings/Misc")}),(0,_r.jsxs)("div",{className:"settings-section",children:[(0,_r.jsx)("div",{className:"settings-label",children:(0,_r.jsx)("label",{children:me("Comfy URL (You can copy it to connect ComfyUI in the plugin):")})}),(0,_r.jsx)("div",{className:"settings-control",children:location.href.split("?")[0].split("#")[0]})]}),(0,_r.jsxs)("div",{className:"settings-section settings-row",children:[(0,_r.jsx)("div",{className:"settings-label",children:(0,_r.jsx)("label",{children:me("Photoshop plugin")})}),(0,_r.jsx)("div",{className:"settings-control",children:(0,_r.jsx)("button",{onClick:r,className:"download-button",children:me("Download")})})]}),(0,_r.jsxs)("div",{className:"settings-section settings-row",children:[(0,_r.jsx)("div",{className:"settings-label",children:(0,_r.jsxs)("label",{children:[me("Photoshop plugin")," 2.0 Beta(CHN only)"]})}),(0,_r.jsx)("div",{className:"settings-control",children:(0,_r.jsx)("button",{onClick:n,className:"download-button",children:me("Download")})})]}),(0,_r.jsxs)("div",{className:"settings-section settings-row",children:[(0,_r.jsx)("div",{className:"settings-label",children:(0,_r.jsx)("label",{htmlFor:"maxImageSize",children:me("use slider for number widget:")})}),(0,_r.jsx)("div",{className:"settings-control",children:(0,_r.jsx)(sp,{id:"useSliderForNumberWidget",checked:e,onChange:o=>{t(o.target.checked),Xe.setUseSliderForNumberWidget(o.target.checked),an.storeSetting("sdppp.useSliderForNumberWidget",o.target.checked)}})})]})]})},S3=TG;var _5=E(D(),1);var Ql=E(D(),1);var C3=E(D(),1);function P0(e){return e=e||12,{flex:`${e} 0 calc(${e/12*100}% - 10px)`,maxWidth:"100%"}}var $n=E(Or(),1);function qE({widgetTableStructure:e,widgetTableValue:t,widgetTableErrors:r,onWidgetRender:n,onWidgetChange:o,onTitleRender:i}){let[a,s]=(0,Ql.useState)(0),l=(0,Ql.useMemo)(()=>e.nodeIndexes.map(p=>{let g=e.nodes[p],h=(d,x,b)=>d.keepRender?x.outputType==="error"?(d.result.push((0,$n.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,$n.jsxs)("div",{className:"workflow-edit-field",children:[(0,$n.jsx)("div",{className:"workflow-edit-field-title",title:g.title,style:{...P0(m?4:12),borderColor:y},children:i?i(g.title,g):(0,$n.jsx)("span",{children:g.title})}),g.widgets.reduce(h,{keepRender:!0,result:[]}).result.map((d,x)=>(0,$n.jsx)(UE,{children:d},x)),r[g.id]?(0,$n.jsx)("span",{className:"list-error-label",children:r[g.id]}):""]},g.id)}).filter(Boolean),[e,t,r,n,o,i,a]),[c,u]=(0,Ql.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,$n.jsx)("span",{className:"list-error-label",children:r[+u[0]]}):c.length>0&&(f=(0,$n.jsx)("span",{className:"list-error-label",children:r[+c[0]]})),(0,$n.jsxs)($n.Fragment,{children:[f,Object.keys(e.nodes).length?"":(0,$n.jsx)("span",{className:"list-error-label",children:me("no suitable node to control in this workflow")}),(0,$n.jsx)("div",{className:"workflow-edit-content",children:l})]})}var UE=class extends Ql.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,$n.jsx)("span",{className:"list-error-label",children:this.state.error?.stack||this.state.error?.message||this.state.error?.toString()}):this.props.children}};var Jl=E(D(),1);var w3=E(D(),1);function Js(e){return(0,w3.useMemo)(()=>P0(e),[e])}var Zs=E(Or(),1),E3=({inputMin:e,inputMax:t,inputStep:r,name:n,value:o=0,uiWeight:i=1,extraOptions:a,onValueChange:s})=>{let l=Js(i||12),[c,u]=(0,Jl.useState)(+o.toFixed(3));(0,Jl.useEffect)(()=>{u(+o.toFixed(3))},[o]);let f=(0,Jl.useCallback)(h=>{if(h!==null){let v=+h.toFixed(3);u(v)}},[]),p=(0,Jl.useCallback)(()=>{s(c)},[c,s]);return!((t-e)/r>1e3)&&i>=1&&a?.useSliderForNumberWidget?(0,Zs.jsxs)(Ba,{style:{width:"100%",...l},align:"center",children:[(0,Zs.jsx)(bE,{style:{flex:1},min:e,max:t,step:r,value:c,onChange:f,onChangeComplete:p}),(0,Zs.jsx)(e0,{style:{width:80},min:e,max:t,step:r,value:c,onChange:f,onBlur:p,controls:!1})]}):(0,Zs.jsxs)(Ba,{style:{width:"100%",...l},align:"center",children:[n&&(0,Zs.jsx)("span",{style:{flex:1},children:n}),(0,Zs.jsx)(e0,{style:{width:"100%",flex:2},min:e,max:t,step:r,value:c,onChange:f,onBlur:p,controls:!1})]})};var Ep=E(Or(),1),R3=({onSelectUpdate:e,options:t,value:r,name:n,uiWeight:o})=>{let i=s=>{let l=t.indexOf(s);e(s,l)},a=Js(o||12);return(0,Ep.jsxs)(Ba,{style:{width:"100%",...a},align:"center",children:[n&&(0,Ep.jsx)("span",{style:{flex:1},children:n}),(0,Ep.jsx)(ip,{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 _3=E(Or(),1),O3=({value:e,name:t,onValueChange:r,uiWeight:n})=>{let o=a=>{r(a.target.checked)},i=Js(n||12);return(0,_3.jsx)(sp,{checked:!!e,onChange:o,style:{...i},children:t||""})};var GE=E(Or(),1),{TextArea:NG}=hp,P3=({value:e="",onValueChange:t,uiWeight:r})=>{let n=Js(r||12);return(0,GE.jsx)("div",{className:"widget-container",style:n,children:(0,GE.jsx)(NG,{value:e,onChange:i=>{t(i.target.value)},autoSize:{minRows:1}})})};var Rp=E(D(),1);var T0=E(Or(),1);function T3({title:e,onTitleChange:t}){let[r,n]=(0,Rp.useState)(!1),[o,i]=(0,Rp.useState)(e);(0,Rp.useEffect)(()=>{i(e)},[e]);let a=()=>{n(!0)};return r?(0,T0.jsx)(hp,{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)(Ma,{title:me("click to edit"),children:(0,T0.jsx)("span",{onClick:a,style:{cursor:"pointer"},children:o})})}var N3=E(D()),IG=(0,N3.createContext)({}),N0=IG;var tc=E(D()),E5=E(Ne());var I3={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 D3=(e,t,r)=>r===0?e:e/100;function Op(e,t){let r=t||255;return e>r?r:e<0?0:e}var Zl=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=I3[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=Op(t.r),this.g=Op(t.g),this.b=Op(t.b),this.a=typeof t.a=="number"?Op(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]=Op(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,D3);this.fromHsv({h:r[0],s:r[1],v:r[2],a:r[3]})}fromHslString(t){let r=KE(t,D3);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,DG=.05,$G=.05,kG=.15,F3=5,L3=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 k3(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===L3?n=e.s+$3:n=e.s+DG*t,n>1&&(n=1),r&&t===F3&&n>.1&&(n=.1),n<.06&&(n=.06),Math.round(n*100)/100}function M3(e,t,r){let n;return r?n=e.v+$G*t:n=e.v-kG*t,n=Math.max(0,Math.min(1,n)),Math.round(n*100)/100}function D0(e,t={}){let r=[],n=new Zl(e),o=n.toHsv();for(let i=F3;i>0;i-=1){let a=new Zl({h:k3(o,i,!0),s:A3(o,i,!0),v:M3(o,i,!0)});r.push(a)}r.push(n);for(let i=1;i<=L3;i+=1){let a=new Zl({h:k3(o,i),s:A3(o,i),v:M3(o,i)});r.push(a)}return t.theme==="dark"?AG.map(({index:i,amount:a})=>new Zl(t.backgroundColor||"#141414").mix(r[i],a).toHexString()):r.map(i=>i.toHexString())}var z3=["#fff1f0","#ffccc7","#ffa39e","#ff7875","#ff4d4f","#f5222d","#cf1322","#a8071a","#820014","#5c0011"];z3.primary=z3[5];var W3=["#fff2e8","#ffd8bf","#ffbb96","#ff9c6e","#ff7a45","#fa541c","#d4380d","#ad2102","#871400","#610b00"];W3.primary=W3[5];var B3=["#fff7e6","#ffe7ba","#ffd591","#ffc069","#ffa940","#fa8c16","#d46b08","#ad4e00","#873800","#612500"];B3.primary=B3[5];var j3=["#fffbe6","#fff1b8","#ffe58f","#ffd666","#ffc53d","#faad14","#d48806","#ad6800","#874d00","#613400"];j3.primary=j3[5];var V3=["#feffe6","#ffffb8","#fffb8f","#fff566","#ffec3d","#fadb14","#d4b106","#ad8b00","#876800","#614700"];V3.primary=V3[5];var H3=["#fcffe6","#f4ffb8","#eaff8f","#d3f261","#bae637","#a0d911","#7cb305","#5b8c00","#3f6600","#254000"];H3.primary=H3[5];var U3=["#f6ffed","#d9f7be","#b7eb8f","#95de64","#73d13d","#52c41a","#389e0d","#237804","#135200","#092b00"];U3.primary=U3[5];var q3=["#e6fffb","#b5f5ec","#87e8de","#5cdbd3","#36cfc9","#13c2c2","#08979c","#006d75","#00474f","#002329"];q3.primary=q3[5];var $0=["#e6f4ff","#bae0ff","#91caff","#69b1ff","#4096ff","#1677ff","#0958d9","#003eb3","#002c8c","#001d66"];$0.primary=$0[5];var G3=["#f0f5ff","#d6e4ff","#adc6ff","#85a5ff","#597ef7","#2f54eb","#1d39c4","#10239e","#061178","#030852"];G3.primary=G3[5];var K3=["#f9f0ff","#efdbff","#d3adf7","#b37feb","#9254de","#722ed1","#531dab","#391085","#22075e","#120338"];K3.primary=K3[5];var X3=["#fff0f6","#ffd6e7","#ffadd2","#ff85c0","#f759ab","#eb2f96","#c41d7f","#9e1068","#780650","#520339"];X3.primary=X3[5];var Y3=["#a6a6a6","#999999","#8c8c8c","#808080","#737373","#666666","#404040","#1a1a1a","#000000","#000000"];Y3.primary=Y3[5];var Q3=["#2a1215","#431418","#58181c","#791a1f","#a61d24","#d32029","#e84749","#f37370","#f89f9a","#fac8c3"];Q3.primary=Q3[5];var J3=["#2b1611","#441d12","#592716","#7c3118","#aa3e19","#d84a1b","#e87040","#f3956a","#f8b692","#fad4bc"];J3.primary=J3[5];var Z3=["#2b1d11","#442a11","#593815","#7c4a15","#aa6215","#d87a16","#e89a3c","#f3b765","#f8cf8d","#fae3b7"];Z3.primary=Z3[5];var e5=["#2b2111","#443111","#594214","#7c5914","#aa7714","#d89614","#e8b339","#f3cc62","#f8df8b","#faedb5"];e5.primary=e5[5];var t5=["#2b2611","#443b11","#595014","#7c6e14","#aa9514","#d8bd14","#e8d639","#f3ea62","#f8f48b","#fafab5"];t5.primary=t5[5];var r5=["#1f2611","#2e3c10","#3e4f13","#536d13","#6f9412","#8bbb11","#a9d134","#c9e75d","#e4f88b","#f0fab5"];r5.primary=r5[5];var n5=["#162312","#1d3712","#274916","#306317","#3c8618","#49aa19","#6abe39","#8fd460","#b2e58b","#d5f2bb"];n5.primary=n5[5];var o5=["#112123","#113536","#144848","#146262","#138585","#13a8a8","#33bcb7","#58d1c9","#84e2d8","#b2f1e8"];o5.primary=o5[5];var i5=["#111a2c","#112545","#15325b","#15417e","#1554ad","#1668dc","#3c89e8","#65a9f3","#8dc5f8","#b7dcfa"];i5.primary=i5[5];var a5=["#131629","#161d40","#1c2755","#203175","#263ea0","#2b4acb","#5273e0","#7f9ef3","#a8c1f8","#d2e0fa"];a5.primary=a5[5];var s5=["#1a1325","#24163a","#301c4d","#3e2069","#51258f","#642ab5","#854eca","#ab7ae0","#cda8f0","#ebd7fa"];s5.primary=s5[5];var l5=["#291321","#40162f","#551c3b","#75204f","#a02669","#cb2b83","#e0529c","#f37fb7","#f8a8cc","#fad2e3"];l5.primary=l5[5];var c5=["#151515","#1f1f1f","#2d2d2d","#393939","#494949","#5a5a5a","#6a6a6a","#7b7b7b","#888888","#969696"];c5.primary=c5[5];var C5=E(D());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 u5="data-rc-order",f5="data-rc-priority",MG="rc-util-key",QE=new Map;function d5({mark:e}={}){return e?e.startsWith("data-")?e:`data-${e}`:MG}function JE(e){return e.attachTo?e.attachTo:document.querySelector("head")||document.body}function FG(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 p5(e,t={}){if(!XE())return null;let{csp:r,prepend:n,priority:o=0}=t,i=FG(n),a=i==="prependQueue",s=document.createElement("style");s.setAttribute(u5,i),a&&o&&s.setAttribute(f5,`${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(u5)))return!1;let p=Number(f.getAttribute(f5)||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 LG(e,t={}){let{styles:r}=t;return r||=ZE(JE(t)),r.find(n=>n.getAttribute(d5(t))===e)}function zG(e,t){let r=QE.get(e);if(!r||!YE(document,r)){let n=p5("",t),{parentNode:o}=n;QE.set(e,o),e.removeChild(n)}}function m5(e,t,r={}){let n=JE(r),o=ZE(n),i={...r,styles:o};zG(n,i);let a=LG(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=p5(e,i);return s.setAttribute(d5(i),t),s}function g5(e){return e?.getRootNode?.()}function WG(e){return g5(e)instanceof ShadowRoot}function h5(e){return WG(e)?g5(e):null}var eR={},BG=[],jG=e=>{BG.push(e)};function VG(e,t){}function HG(e,t){}function UG(){eR={}}function v5(e,t,r){!t&&!eR[r]&&(e(!1,r),eR[r]=!0)}function k0(e,t){v5(VG,e,t)}function qG(e,t){v5(HG,e,t)}k0.preMessage=jG;k0.resetWarned=UG;k0.noteOnce=qG;var y5=k0;var ec=E(D());function GG(e){return e.replace(/-(.)/g,(t,r)=>r.toUpperCase())}function b5(e,t){y5(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 x5(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[GG(r)]=n}return t},{})}function A0(e,t,r){return r?ec.default.createElement(e.tag,{key:t,...x5(e.attrs),...r},(e.children||[]).map((n,o)=>A0(n,`${t}-${e.tag}-${o}`))):ec.default.createElement(e.tag,{key:t,...x5(e.attrs)},(e.children||[]).map((n,o)=>A0(n,`${t}-${e.tag}-${o}`)))}function rR(e){return D0(e)[0]}function M0(e){return e?Array.isArray(e)?e:[e]:[]}var KG=` .anticon { display: inline-flex; align-items: center; @@ -572,10 +572,10 @@ html body { transform: rotate(360deg); } } -`,P5=e=>{let{csp:t,prefixCls:r,layer:n}=(0,ec.useContext)(k0),o=tK;r&&(o=o.replace(/anticon/g,r)),n&&(o=`@layer ${n} { +`,S5=e=>{let{csp:t,prefixCls:r,layer:n}=(0,ec.useContext)(N0),o=KG;r&&(o=o.replace(/anticon/g,r)),n&&(o=`@layer ${n} { ${o} -}`),(0,ec.useEffect)(()=>{let i=e.current,a=w5(i);S5(o,"@ant-design-icons",{prepend:!n,csp:t,attachTo:a})},[])};var Tp={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function rK({primaryColor:e,secondaryColor:t}){Tp.primaryColor=e,Tp.secondaryColor=t||lR(e),Tp.calculated=!!t}function nK(){return{...Tp}}var j0=e=>{let{icon:t,className:r,onClick:n,style:o,primaryColor:i,secondaryColor:a,...s}=e,l=T5.useRef(),c=Tp;if(i&&(c={primaryColor:i,secondaryColor:a||lR(i)}),P5(l),_5(sR(t),`icon should be icon definiton, but got ${t}`),!sR(t))return null;let u=t;return u&&typeof u.icon=="function"&&(u={...u,icon:u.icon(c.primaryColor,c.secondaryColor)}),W0(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})};j0.displayName="IconReact";j0.getTwoToneColors=nK;j0.setTwoToneColors=rK;var Np=j0;function cR(e){let[t,r]=B0(e);return Np.setTwoToneColors({primaryColor:t,secondaryColor:r})}function N5(){let e=Np.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}function uR(){return uR=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}=tc.useContext(k0),d=(0,I5.default)(f,u,{[`${u}-${n.name}`]:!!n.name,[`${u}-spin`]:!!o||n.name==="loading"},r),m=a;m===void 0&&s&&(m=-1);let h=i?{msTransform:`rotate(${i}deg)`,transform:`rotate(${i}deg)`}:void 0,[v,y]=B0(l);return tc.createElement("span",uR({role:"img","aria-label":n.name},c,{ref:t,tabIndex:m,onClick:s,className:d}),tc.createElement(Np,{icon:n,primaryColor:v,secondaryColor:y,style:h}))});V0.displayName="AntdIcon";V0.getTwoToneColor=N5;V0.setTwoToneColor=cR;var H0=V0;var U0=E(N());function fR(){return fR=Object.assign?Object.assign.bind():function(e){for(var t=1;tU0.createElement(H0,fR({},e,{ref:t,icon:hv})),iK=U0.forwardRef(oK),dR=iK;var q0=E(N());function pR(){return pR=Object.assign?Object.assign.bind():function(e){for(var t=1;tq0.createElement(H0,pR({},e,{ref:t,icon:n3})),sK=q0.forwardRef(aK),mR=sK;var ja=E(Or(),1),D5=({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,ja.jsxs)(Ba,{gap:5,align:"stretch",vertical:!0,children:[(0,ja.jsxs)(Ba,{gap:5,vertical:!0,children:[(0,ja.jsx)(sp,{style:{flex:1},value:e,onChange:a=>{t?.(a)},options:r.map(a=>({label:a.split("/").pop(),value:a}))}),(0,ja.jsx)(YE,{action:"./api/upload/image",onChange:o,showUploadList:!1,data:a=>({image:a}),children:(0,ja.jsxs)("button",{type:"button",className:"ant-btn",children:[(0,ja.jsx)(mR,{})," ",me("upload")]})})]}),e&&(0,ja.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 ia=E(Or(),1),$5=window.comfyAPI.api.api,tf=class extends A5.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)=>{$5.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})=>{$5.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&&rm(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,ia.jsx)(I3,{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,ia.jsx)(D3,{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,ia.jsx)($3,{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,ia.jsx)(k3,{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,ia.jsx)("p",{children:me("only supported in Photoshop")})),!0;if(i.outputType=="IMAGE_PATH"||i.outputType=="MASK_PATH")return n.result.push((0,ia.jsx)(D5,{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,ia.jsx)(M3,{title:n,onTitleChange:i=>{jn.instance.setNodeTitle({node_id:o.id,title:i})}})},r=12;return(0,ia.jsx)(Ia,{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,ia.jsx)(JE,{...t})})}};var kn=E(Or(),1),k5=document.createElement("style");k5.innerHTML=ZT;document.head.appendChild(k5);function gR({onClose:e,tab:t}){let[r,n]=(0,rf.useState)("1"),[o,i]=(0,rf.useState)(0);return(0,rf.useEffect)(()=>{n(t)},[t]),(0,rf.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,kn.jsx)(Ia,{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,kn.jsxs)("div",{className:"sdppp-menu-container",style:{paddingLeft:o},children:[(0,kn.jsxs)("div",{className:"sdppp-menu-header",children:[(0,kn.jsxs)("div",{className:"sdppp-menu-header-left",children:[(0,kn.jsx)("button",{onClick:()=>n("1"),className:r==="1"?"active":"",children:me("Simplify Workflow")}),(0,kn.jsx)("button",{onClick:()=>n("2"),className:r==="2"?"active":"",children:me("Photoshop")})]}),(0,kn.jsx)("span",{children:"Powered by SDPPP"}),(0,kn.jsx)("button",{className:"sdppp-menu-close-button",onClick:e,children:(0,kn.jsx)(dR,{})})]}),(0,kn.jsxs)("div",{className:"sdppp-menu-content",children:[(0,kn.jsx)("div",{className:"sdppp-menu-workflow-edit-wrap",style:{display:r==="1"?"block":"none"},children:(0,kn.jsx)(tf,{})}),(0,kn.jsx)("div",{className:"sdppp-menu-settings-wrap",style:{display:r==="2"?"block":"none"},children:(0,kn.jsx)(P3,{})})]})]})})}var rc=E(Or(),1);function hR({onMaximize:e,onPhotoshop:t}){return(0,rc.jsxs)("div",{className:"sdppp-side-container",children:[(0,rc.jsxs)("div",{className:"sdppp-side-header",children:[(0,rc.jsx)("button",{className:"sdppp-photoshop-icon",onClick:t}),(0,rc.jsx)("button",{className:"pi pi-window-maximize",onClick:e})]}),(0,rc.jsx)(tf,{})]})}var M5=null,lK=null,vR=null;async function bR(e){if(!M5){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=>{lK||(r.style.width="100%",r.style.height="auto",r.style.padding="8px",(0,yR.createRoot)(r).render((0,xR.createElement)(hR,{onMaximize:()=>{n("1")},onPhotoshop:()=>{n("2")}}))),t.style.display="none";function n(o){M5?vR.props.tab=o:(vR=(0,xR.createElement)(gR,{onClose:()=>{t.style.display="none"},tab:o}),(0,yR.createRoot)(t).render(vR)),t.style.display="flex",document.querySelector(".sdppp-side-icon")?.parentElement?.click()}}})}}an.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=nm(mt.graph,r);B5(o,n)&&Xe.setWidgetTableStructure(o),Xe.setWidgetTableValue(vf(mt.graph))});an.addEventListener("executed",()=>{Xe.setWidgetTableValue(vf(mt.graph))});var F5=0,L5=!0,z5="";function W5(){requestAnimationFrame(W5);let e=mt.workflowManager||mt.extensionManager.workflow,t=e.activeWorkflow,r=t?.id||0,n=t?.path||"",o=t?.isPersisted||!0;if(r===F5&&n===z5&&o===L5)return;F5=r,z5=n,L5=o;let i=nm(mt.graph,t),a=vf(mt.graph);Xe.setWidgetTableStructure(i),Xe.setWidgetTableValue(a),setTimeout(()=>{if(t!==e.activeWorkflow)return;let s=nm(mt.graph,t),l=vf(mt.graph);B5(s,i)&&Xe.setWidgetTableStructure(s),Xe.setWidgetTableValue(l)},800)}requestAnimationFrame(W5);function B5(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 cK(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(""),al.get(s.detail.prompt_id)&&al.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(al.get(s.detail.prompt_id)?l=al.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:im(Xe.data.widgetTableStructure.widgetTablePath)})}}),bR(e);var i=new jn;i.connect(),e.registerExtension({name:"Comfy.SD-PPP",async setup(){},async beforeRegisterNodeDef(s,l,c){try{xO(s,l)}catch(u){Ip.push(u.stack||u.message||u)}}})}var Ip=[];(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 NR(),await cK(e,r,t),import("./sdppp-custom.js").then(n=>{n.default(aa)})}catch(e){Ip.push(e.stack||e.message||e)}await new Promise(e=>setTimeout(e,2e3)),Ip.length&&(console.error(Ip[0]),alert(`sd-ppp init failed: -`+Ip.join(` +}`),(0,ec.useEffect)(()=>{let i=e.current,a=h5(i);m5(o,"@ant-design-icons",{prepend:!n,csp:t,attachTo:a})},[])};var _p={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function XG({primaryColor:e,secondaryColor:t}){_p.primaryColor=e,_p.secondaryColor=t||rR(e),_p.calculated=!!t}function YG(){return{..._p}}var F0=e=>{let{icon:t,className:r,onClick:n,style:o,primaryColor:i,secondaryColor:a,...s}=e,l=C5.useRef(),c=_p;if(i&&(c={primaryColor:i,secondaryColor:a||rR(i)}),S5(l),b5(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)}),A0(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=YG;F0.setTwoToneColors=XG;var Pp=F0;function nR(e){let[t,r]=M0(e);return Pp.setTwoToneColors({primaryColor:t,secondaryColor:r})}function w5(){let e=Pp.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}=tc.useContext(N0),p=(0,E5.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 tc.createElement("span",oR({role:"img","aria-label":n.name},c,{ref:t,tabIndex:g,onClick:s,className:p}),tc.createElement(Pp,{icon:n,primaryColor:v,secondaryColor:y,style:h}))});L0.displayName="AntdIcon";L0.getTwoToneColor=w5;L0.setTwoToneColor=nR;var z0=L0;var W0=E(D());function iR(){return iR=Object.assign?Object.assign.bind():function(e){for(var t=1;tW0.createElement(z0,iR({},e,{ref:t,icon:pv})),JG=W0.forwardRef(QG),aR=JG;var B0=E(D());function sR(){return sR=Object.assign?Object.assign.bind():function(e){for(var t=1;tB0.createElement(z0,sR({},e,{ref:t,icon:YL})),eK=B0.forwardRef(ZG),lR=eK;var ja=E(Or(),1),R5=({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,ja.jsxs)(Ba,{gap:5,align:"stretch",vertical:!0,children:[(0,ja.jsxs)(Ba,{gap:5,vertical:!0,children:[(0,ja.jsx)(ip,{style:{flex:1},value:e,onChange:a=>{t?.(a)},options:r.map(a=>({label:a.split("/").pop(),value:a}))}),(0,ja.jsx)(HE,{action:"./api/upload/image",onChange:o,showUploadList:!1,data:a=>({image:a}),children:(0,ja.jsxs)("button",{type:"button",className:"ant-btn",children:[(0,ja.jsx)(lR,{})," ",me("upload")]})})]}),e&&(0,ja.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),O5=window.comfyAPI.api.api,ef=class extends _5.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)=>{O5.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})=>{O5.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&&em(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)(E3,{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)(R3,{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)(O3,{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)(P3,{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)(R5,{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)(T3,{title:n,onTitleChange:i=>{Bn.instance.setNodeTitle({node_id:o.id,title:i})}})},r=12;return(0,oa.jsx)(Ia,{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 kn=E(Or(),1),P5=document.createElement("style");P5.innerHTML=GT;document.head.appendChild(P5);function cR({onClose:e,tab:t}){let[r,n]=(0,tf.useState)("1"),[o,i]=(0,tf.useState)(0);return(0,tf.useEffect)(()=>{n(t)},[t]),(0,tf.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,kn.jsx)(Ia,{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,kn.jsxs)("div",{className:"sdppp-menu-container",style:{paddingLeft:o},children:[(0,kn.jsxs)("div",{className:"sdppp-menu-header",children:[(0,kn.jsxs)("div",{className:"sdppp-menu-header-left",children:[(0,kn.jsx)("button",{onClick:()=>n("1"),className:r==="1"?"active":"",children:me("Simplify Workflow")}),(0,kn.jsx)("button",{onClick:()=>n("2"),className:r==="2"?"active":"",children:me("Photoshop")})]}),(0,kn.jsx)("span",{children:"Powered by SDPPP"}),(0,kn.jsx)("button",{className:"sdppp-menu-close-button",onClick:e,children:(0,kn.jsx)(aR,{})})]}),(0,kn.jsxs)("div",{className:"sdppp-menu-content",children:[(0,kn.jsx)("div",{className:"sdppp-menu-workflow-edit-wrap",style:{display:r==="1"?"block":"none"},children:(0,kn.jsx)(ef,{})}),(0,kn.jsx)("div",{className:"sdppp-menu-settings-wrap",style:{display:r==="2"?"block":"none"},children:(0,kn.jsx)(S3,{})})]})]})})}var rc=E(Or(),1);function uR({onMaximize:e,onPhotoshop:t}){return(0,rc.jsxs)("div",{className:"sdppp-side-container",children:[(0,rc.jsxs)("div",{className:"sdppp-side-header",children:[(0,rc.jsx)("button",{className:"sdppp-photoshop-icon",onClick:t}),(0,rc.jsx)("button",{className:"pi pi-window-maximize",onClick:e})]}),(0,rc.jsx)(ef,{})]})}var T5=null,tK=null,fR=null;async function mR(e){if(!T5){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=>{tK||(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){T5?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()}}})}}an.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=tm(mt.graph,r);k5(o,n)&&Xe.setWidgetTableStructure(o),Xe.setWidgetTableValue(hf(mt.graph))});an.addEventListener("executed",()=>{Xe.setWidgetTableValue(hf(mt.graph))});var N5=0,I5=!0,D5="";function $5(){requestAnimationFrame($5);let e=mt.workflowManager||mt.extensionManager.workflow,t=e.activeWorkflow,r=t?.id||0,n=t?.path||"",o=t?.isPersisted||!0;if(r===N5&&n===D5&&o===I5)return;N5=r,D5=n,I5=o;let i=tm(mt.graph,t),a=hf(mt.graph);Xe.setWidgetTableStructure(i),Xe.setWidgetTableValue(a),setTimeout(()=>{if(t!==e.activeWorkflow)return;let s=tm(mt.graph,t),l=hf(mt.graph);k5(s,i)&&Xe.setWidgetTableStructure(s),Xe.setWidgetTableValue(l)},800)}requestAnimationFrame($5);function k5(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 rK(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(""),al.get(s.detail.prompt_id)&&al.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(al.get(s.detail.prompt_id)?l=al.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:nm(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){Tp.push(u.stack||u.message||u)}}})}var Tp=[];(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 rK(e,r,t),import("./sdppp-custom.js").then(n=>{n.default(ia)})}catch(e){Tp.push(e.stack||e.message||e)}await new Promise(e=>setTimeout(e,2e3)),Tp.length&&(console.error(Tp[0]),alert(`sd-ppp init failed: +`+Tp.join(` `)))}})(); /*! Bundled license information: @@ -655,6 +655,6 @@ fast-json-patch/module/duplex.mjs: * MIT license *) -@babel/runtime/helpers/esm/regenerator.js: - (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE *) +@babel/runtime/helpers/esm/regeneratorRuntime.js: + (*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE *) */ diff --git a/package.json b/package.json index 09d878b..cd29029 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sdppp", - "version": "1.9.2", + "version": "1.9.3", "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/librarys.js b/plugins/photoshop/dist/librarys.js index c64e046..e40f329 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/.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 +"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/.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/.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({"../../node_modules/.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` +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/.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({"node_modules/.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/.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({"../../node_modules/.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({"../../node_modules/.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` +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/.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({"node_modules/.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({"node_modules/.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/.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({"../../node_modules/.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({"../../node_modules/.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({"../../node_modules/.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(` + <%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/.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({"node_modules/.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({"node_modules/.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({"node_modules/.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 618d155..110e427 100644 --- a/plugins/photoshop/dist/photoshop-internal.js +++ b/plugins/photoshop/dist/photoshop-internal.js @@ -1,6 +1,207 @@ -"use strict";(()=>{var Gi=Object.create;var Ht=Object.defineProperty;var Ro=Object.getOwnPropertyDescriptor;var Qi=Object.getOwnPropertyNames;var qi=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?Gi(qi(e)):{},Hi(t||!e||!e.__esModule?Ht(r,"default",{value:e,enumerable:!0}):r,e));var x=(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,qo)=>{"use strict";qo.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=p,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 _=r.formatters[ie];if(typeof _=="function"){let Q=y[I];be=_.call(v,Q),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,f=r.enabled(d)),f),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,f=-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 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}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:()=>Me,useSDPPPWebpageList:()=>Ar,useSDPPPWorkflowList:()=>ai});var R=N("photoshop");var Le=N("photoshop"),Yi=N("uxp");var Gr={"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","Back to workflow list":"\u8FD4\u56DE\u5DE5\u4F5C\u6D41\u5217\u8868","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 Gr?Gr[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 Ce(e,t,r=0){return"-".repeat(r)+`${t} (id:${e})`}function Ae(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=Le.app.activeDocument?.activeLayers?.[0];return e?Ce(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,p=a-i,d=c-s,u=o.left,g=o.top,l=o.right,f=o.bottom,m=l-u,y=f-g,v=Math.max(i,u),w=Math.max(s,g),P=Math.min(a,l),I=Math.min(c,f),j=P-v,be=I-w,ie=m*y*n;if(t.length!==ie)throw new Error(`toImageDataArray.length(${t.length}) !== toLength(${ie})`);let _=j*be*n;if(e.length!==_)throw new Error(`fromImageDataArray.length(${e.length}) !== fromLength(${_})`);for(let Q=0;Q=i&&De=s&&qt0?e.activeLayers[0].id:0:C.is_SPECIAL_LAYER_NEW_LAYER(t)?-2:Mo(t)}function qr(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(qr(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==Le.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 Ie(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&&(p[l]===void 0?g=c.slice(0,d).join("/"):d==u-1&&(g=t.path),g!==void 0&&f(t,0,e,g)),d++,Array.isArray(p)){if(l==="-")l=p.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>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=es[t.op].call(t,p,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,p,l,e);if(s.test===!1)throw new M("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return s}if(p=p[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,p=s.length-1;p>=0;p--){var d=s[p],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+"/"+Ie(d),n):u!==g&&(a=!0,n&&r.push({op:"test",path:o+"/"+Ie(d),value:W(u)}),r.push({op:"replace",path:o+"/"+Ie(d),value:W(g)}))}else Array.isArray(e)===Array.isArray(t)?(n&&r.push({op:"test",path:o+"/"+Ie(d),value:W(u)}),r.push({op:"remove",path:o+"/"+Ie(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 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(d){console.error(d.stack||d.message||d)}p instanceof Promise&&p.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)}};x([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}};x([T],me.prototype,"setIsLocal",1),x([T],me.prototype,"setUName",1),x([T],me.prototype,"setDocument",1),x([T],me.prototype,"setCanvasStateID",1),x([T],me.prototype,"setSelectionStateID",1),x([T],me.prototype,"setHistoryStateID",1),x([T],me.prototype,"setComfyUserToken",1),x([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}};x([T],K.prototype,"setWebviewFromSid",1),x([T],K.prototype,"setTitle",1),x([T],K.prototype,"setProgress",1),x([T],K.prototype,"setLastError",1),x([T],K.prototype,"setQueueSize",1),x([T],K.prototype,"setExecutingNodeTitle",1),x([T],K.prototype,"setWidgetTableStructure",1),x([T],K.prototype,"setWidgetTableValue",1),x([T],K.prototype,"setWidgetTableErrors",1),x([T],K.prototype,"setHasPSDNodes",1),x([T],K.prototype,"setComfyUserToken",1),x([T],K.prototype,"setComfyOrgLoggedIn",1),x([T],K.prototype,"setComfyOrgAPIKey",1),x([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 Go=e=>{let t,r=new Set,o=(p,d)=>{let u=typeof p=="function"?p(t):p;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:p=>(r.add(p),()=>r.delete(p))},c=t=e(o,n,a);return a},Qo=e=>e?Go(e):Go;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 ke=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}),ke.app.activeDocument&&D.setDocument(ke.app.activeDocument.id,JSON.parse(JSON.stringify(r)))},clearCanvasDirtyID:()=>{e({canvasDirtyID:0})},clearLayerDirtyIDs:()=>{e({layerDirtyIDs:new Map})},clearSelectionDirtyID:()=>{e({selectionDirtyID:0})}}));function Zr(){if(!ke.app.activeDocument)return;let e=z.getState().documentCache[ke.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,[ke.app.activeDocument.id]:t}})),D.setDocument(ke.app.activeDocument.id,z.getState().documentCache)}}function ct(){try{if(!ke.app.activeDocument)return;let e=ke.app.documents.reduce((t,r)=>{let o=qr(r).map(n=>{let i=n.layer.id;return{level:n.level,id:i,name:n.layer.name,identify:Ce(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:Ae(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 Ne(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)&&(kt(),Ne(R.app.activeDocument?.activeLayers.map(t=>t.id)))});R.action.addNotificationListener(["toolModalStateChanged"],(e,t,...r)=>{t.state._value=="exit"&&t.kind._value=="paint"&&(kt(),Ne(R.app.activeDocument?.activeLayers.map(o=>o.id)))});R.action.addNotificationListener(["modalStateChanged"],(e,t)=>{t.state._value=="exit"&&(kt(),Ne(R.app.activeDocument?.activeLayers.map(r=>r.id)))});R.action.addNotificationListener(["show","hide","transform","fill","crop"],()=>{kt(),Ne(R.app.activeDocument?.activeLayers.map(e=>e.id))});R.action.addNotificationListener(["delete","move","copyToLayer"],()=>{ct(),kt(),Ne(R.app.activeDocument?.activeLayers.map(e=>e.id))});R.action.addNotificationListener(["newDocument","open","close","make","modalJavaScriptScopeExit"],()=>ct());function kt(){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 k=b(E(),1);var cn=b(S(),1),sn=(0,k.createContext)(null);function an({children:e}){let t=Cs();return(0,k.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,k.useContext)(sn);if(!e)throw new Error("useSDPPPWebview must be used within a SDPPPWebviewProvider");return e}function Cs(){let[e,t]=(0,k.useState)(null),[r,o]=(0,k.useState)(null),[n,i]=(0,k.useState)(null),[s,a]=(0,k.useState)(!1),[c,p]=(0,k.useState)(""),[d,u]=(0,k.useState)(""),[g,l]=(0,k.useState)(""),[f,m]=(0,k.useState)(!1),[y,v]=(0,k.useState)(!1),w=(0,k.useRef)(null),[P,I]=(0,k.useState)("");(0,k.useEffect)(()=>{let Q=()=>{a(!1),u(g),ie()};return n?.addEventListener("close",Q),()=>{n?.removeEventListener("close",Q)}},[n,g,u,a]),(0,k.useEffect)(()=>{l(d)},[d]),(0,k.useEffect)(()=>{Is(i,o);let Q=nn();return t(Q),w.current&&clearTimeout(w.current),m(!1),v(!1),w.current=setTimeout(()=>{m(!0)},5e3),Q.addEventListener("loadstop",()=>{v(!0)}),Q.addEventListener("loaderror",De=>{I(De.message||De.type)}),Q.addEventListener("loadstart",()=>{I("")}),()=>{w.current&&clearTimeout(w.current),n?.parentElement?.removeChild(n)}},[]);let[j,be]=(0,k.useState)("");(0,k.useEffect)(()=>{c&&(be(c),j===c?ie():(e?.setAttribute("src",c),r?.setAttribute("src",c)))},[c]);let ie=(0,k.useCallback)(()=>{e?.parentElement?.removeChild(e),a(!1),n?.close();let Q=nn();t(Q);let De=c;p(""),be(""),setTimeout(()=>{p(De)},300)},[e,c]),_=(0,k.useCallback)(()=>{s?(n?.close(),a(!1)):(n?.show(),a(!0))},[n,s]);return{dialogShowing:s,toggleWebviewDialog:_,setSrc:p,webviewAgentSID:d,setWebviewAgentSID:u,prevWebviewAgentSID:g,setPrevWebviewAgentSID:l,resetWebview:ie,anyWebviewLoaded:y,timeoutError:(0,k.useMemo)(()=>f&&!y,[f,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 _e=null;function nn(){_e||(_e=document.createElement("div"),_e.style.position="absolute",_e.style.width="100px",_e.style.height="100px",_e.style.right="0",_e.style.bottom="-10000px",document.body.appendChild(_e));let e=document.createElement("webview");return e.style.width="100px",e.style.height="100px",_e?.appendChild(e),e}var pn=b(ln(),1);var dn=`507 -`;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 p=!1;setTimeout(()=>{p||(console.warn("flush timeout"),c())},5e3),this.socket.emit("store_flush",{operations:i,fromVersion:s},d=>{p=!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 xe=N("photoshop"),oo=class{promise;restore;constructor(){this.restore=()=>{},this.promise=new Promise(t=>{this.restore=t})}add(t){this.promise.then(t)}};xe.core.setExecutionMode({enableErrorStacktraces:!0});var _t=Promise.resolve();async function B(e,t){let r=t.dontRecoverSelection||!1,o=new oo,n=!1,i=[],s=[],a=t.commandName;r||(xe.app.activeDocument.activeLayers.forEach(u=>i.push(u)),t.document&&xe.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==xe.app.activeDocument&&i.forEach((u,g)=>{u.visible=s[g]})}));let c=null;_t=_t.catch(u=>u).then(()=>new Promise(u=>{g();function g(){xe.core.isModal()?requestAnimationFrame(g):u()}})).then(()=>xe.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 p=null,d=null;try{await _t}catch(u){d=u}if(n&&(_t=xe.core.executeAsModal(async u=>{i.forEach((g,l)=>{g.visible=s[l]}),c&&u.hostControl.resumeHistory(c)},{commandName:a,interactive:!0}),await _t),d)throw d;return p}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,p,d={left:0,top:0,right:r.width,bottom:r.height},u=!1;if(await B(async f=>{let[m,y]=await Yt(r,n);y&&(a=m),a!=null&&f.add(()=>{a.delete()}),[c,p]=await Promise.all([_s(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=ks(c)),s.pixelData=lr(c,d,i);let g=null;return p&&(p=ur(p),g=lr(p,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 p=>{let d=te(i,p);if(C.is_SPECIAL_LAYER_USE_CANVAS(p))throw new Error(h("layer not found: {0}",p));let u=pe(i,d);if(!u)throw new Error(h("layer not found {0}",p));r(u);let g=t(u);if(o==="first"&&g.length===0)throw new Error(h("no first related layer in {0}",p));let l=g.filter((f,m)=>o==="first"?m===0:o==="text"?f.kind===fr.constants.LayerKind.TEXT:o==="image"?f.kind===fr.constants.LayerKind.NORMAL:!0).map(f=>Ce(f.id,f.name));return{layer_identifies:l,layer_infos:await Promise.all(l.map(f=>Rt({document_identify:n,layer_identify:f})))}})),c={layer_identifies:[],layer_boundaries:[],layer_infos:[]};return a.forEach(({layer_identifies:p,layer_infos:d})=>{c.layer_identifies.push(...p),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:Ae(r.id,r.name)}}throw new Error(h("document {0} not found",t))}return{value:Ae(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:Ce(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 p=c,d=te(p,o),u=pe(p,d);return u&&await B(async()=>{p.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,f)=>{if(r)return await hr.Jimp.read(r[f]);if(t){if("pngData"in t[f])return await hr.Jimp.read(await t[f].pngData.arrayBuffer());{let m=t[f].buffer,y=m instanceof Blob?await m.arrayBuffer():m;return new hr.Jimp({data:Buffer.from(y),width:t[f].width,height:t[f].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,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 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,f)=>{let m=c[f];if(l.bitmap.width!=m.width||l.bitmap.height!=m.height){let y={w:m.width,h:m.height};l.resize(y)}});let p=await Promise.all(i.map(async l=>{let f=l.bitmap.data;if(a.bitsPerChannel=="bitDepth16"){let y=new Uint16Array(f.length);for(let v=0;v{let f=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);f=pe(a,w)}if(f&&f.kind!=ce.constants.LayerKind.GROUP)return f;{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),f?P.move(f,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:p[y],targetBounds:c[y]})})),Ne(u.map(m=>m.id)),or()},{commandName:h("show sent images"),document:a});let g=z.getState();return{layers:u.map(l=>({identify:Ce(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),p=[];c&&Object.keys(c||{}).forEach(d=>{Object.keys(c[d]||{}).forEach(u=>{p.push({nodeID:d,widgetIndex:u,value:c[d][u].value,outputType:c[d][u].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,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 p=new AbortController,d=setTimeout(()=>p.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 kn=b(ar(),1),Tn=b(S(),1),Us=(0,kn.debug)("sdppp:internal"),yr="http://127.0.0.1:8188",_n=(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,p]=(0,U.useState)(localStorage.getItem("backendURL")||yr),[d,u]=(0,U.useState)(null),[g,l]=(0,U.useState)(""),[f,m]=(0,U.useState)(!1),[y,v]=(0,U.useState)(null),[w,P]=(0,U.useState)([]);function I(_){p(_.split("?")[0].split("#")[0].trim())}(0,U.useEffect)(()=>{localStorage.setItem("backendURL",c)},[c]),(0,U.useEffect)(()=>{if(n==="connected"){a(""),t(`${c}`);let _=!!(c.includes("localhost")||c.match(/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}/));Us("setBackendURL:",c,"src:",_),D.setIsLocal(_)}else t(""),l("")},[n]);function j(){if(n==="connected"||n==="connecting")y&&(y.close(),v(null));else try{let _=y;y||(_=new gr(c||yr,{setConnectState:i,setLastErrorMessage:a,setBackendURL:I,setComfyMultiUser:m}),v(_)),_.connect()}catch(_){a(_.stack||_.message||_)}}(0,U.useEffect)(()=>{let _=(Q,De,qt)=>{g&&(!De&&Q==g||!(g in O.getAllStore()))&&l("")};return O.subscribe("/",_),()=>{O.unsubscribe(_)}},[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)(_n.Provider,{value:{socket:y,backendURL:c,setBackendURL:I,connectState:n,doConnectOrDisconnect:j,lastErrorMessage:s,setLastErrorMessage:a,autoRunning:d,setAutoRunning:u,comfyMultiUser:f,setComfyMultiUser:m,workflowAgent:be,workflowAgentSID:g,setWorkflowAgentSID:l,beforeWorkflowRunHooks:w,setBeforeWorkflowRunHooks:P},children:e})}function A(){let e=(0,U.useContext)(_n);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 Oe=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 We=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 p=0;p{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 qn(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 Oe{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!We&&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 Oe{#e=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!We&&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},p=()=>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||p())&&m(y)},e.onPause?.()}).then(()=>{n=void 0,o||e.onContinue?.()}),f=()=>{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??(We?0:3),P=e.retryDelay??Vs,I=typeof P=="function"?P(r,v):P,j=w===!0||typeof w=="number"&&rp()?void 0:l()).then(()=>{t?g(v):f()})})};return{promise:i,cancel:s,continue:()=>(n?.(),i),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?f():l().then(f),i)}}var Gs=e=>setTimeout(e,0);function Qs(){let e=[],t=0,r=a=>{a()},o=a=>{a()},n=Gs,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??(We?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,...qs(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 qs(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 Oe{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 Oe{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,p=async()=>{let d=!1,u=f=>{Object.defineProperty(f,"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(f,m,y)=>{if(d)return Promise.reject();if(m==null&&f.pages.length)return Promise.resolve(f);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:qn;return{pages:I(f.pages,w,P),pageParams:I(f.pageParams,m,P)}};if(n&&i.length){let f=n==="backward",m=f?zs:Xn,y={pages:i,pageParams:s},v=m(o,y);a=await l(y,v,f)}else{let f=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?.(p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=p}}}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 Ue=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,p=`${s}_${a}_${c}`,d=e.data.widgetTableStructure.nodes[o].widgets[n].outputType;Ys(p,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]),p=(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]),f=(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:p,uploadImage:d,interrupt:f,clearQueue:m,reboot:y,setComfyOrgAPIKey:o}}function Ir(){let[e,t]=(0,Ue.useState)(!1),[r,o]=(0,Ue.useState)(!1),n=(0,Ue.useRef)(null),{autoRunning:i,workflowAgent:s}=A(),{runWorkflow:a,runPage:c}=oe();return(0,Ue.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=O.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,Ue.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),p=(0,ue.useCallback)(async(f,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:f,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 f=>{if(!f)throw new Error("Token is required");let m="access_token",y="https://api.authing.cn/oidc/token/introspection",v=`token=${encodeURIComponent(f)}&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 f=>{try{let y=await(await fetch("https://api.authing.cn/api/v3/get-profile",{method:"GET",headers:{Authorization:`Bearer ${f}`,"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(f,m="sdppp123456"){let y=await p(f,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(f){if(!localStorage.getItem("lastLogin"))return!1;if((await d(f)).active){let y=await u(f);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 f=setInterval(()=>{let m=localStorage.getItem("token");m&&l(m).then(y=>{y||s(!1)})},$s);return()=>{clearInterval(f)}}}else{let f=localStorage.getItem("token");if(!f)return;l(f).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 Fe=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,Fe.jsx)(So,{client:i,children:(0,Fe.jsx)(rt,{children:(0,Fe.jsx)(an,{children:(0,Fe.jsx)(oi,{loginAppID:t,loginStyle:r,loginBannerTop:o,loginBannerBottom:n,children:(0,Fe.jsx)(xn,{children:(0,Fe.jsx)(js,{children:e})})})})})})}function Me(){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:p,setWorkflowAgentSID:d,doConnectOrDisconnect:u,lastErrorMessage:g}=r,{setShouldTriggerLivePainting:l}=Ir();return(0,wt.useEffect)(()=>{let f=()=>{l(!0)};return D.subscribe("/canvasStateID",f),()=>{D.unsubscribe(f)}},[l]),(0,Fe.jsx)(ii.Provider,{value:{logout:o,isLogin:n,connectOrDisconnect:u,lastConnectErrorMessage:g,setAutoRunning:c,autoRunning:a,photoshopSID:D.data.sid,webviewAgentSID:s,workflowAgentSID:p?.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 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 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(p=>{let d={...p};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,p]=(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){p(new Error(l.error)),a(!1);return}a(!1),p(null),i(l.workflows.reduce((f,m)=>(f[m]={path:m,content:null,error:""},f),{}))}catch(l){a(!1),p(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}=Me(),[o,n]=(0,ye.useState)(!0),[i,s]=(0,ye.useState)(""),{data:a,isLoading:c,error:p,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&&!p&&a){let l=[],f=[];Object.keys(a).forEach(m=>{if(m.startsWith(i)){let y=m.slice(i.length).split("://").pop();y&&(y.indexOf("/")==-1?l.push(m):f.push(m.slice(0,m.lastIndexOf("/")+1)))}}),u=[...f.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 p&&(g=p.message),u.length||(g=h("Workflow list is empty, please save a workflow by Comfy's lastest UI")),p&&(g=h("Workflow list loading failed: {0}",p.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 Be=b(E(),1);var ci={site:{en:{name:"Github",url:"https://github.com/zombieyang/sd-ppp"},zhcn:{name:">> SD-PPP \u5B98\u65B9\u7AD9",url:"https://sdppp.zombee.tech/"}},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:"\u82BD\u9EA6AI&\u5218\u9510",url:"https://v.douyin.com/cw4ba7Vn5-w/"},{name:"\u56DB\u559CAI",url:"https://v.douyin.com/hD2X7S717uw/"},{name:"\u7075\u7ED8AI",url:"https://v.douyin.com/Jssc9ysKic4/"},{name:"AIX",url:"https://v.douyin.com/hbtnVQ2A9G4/"},{name:"\u6C90\u6C90AI",url:"https://v.douyin.com/k6yKDEcVgP8/"},{name:"\u68A8\u68A8AI",url:"https://v.douyin.com/55KuUbZVGCM/"},{name:"\u661F\u6C47\u672A\u6765",url:"https://www.starfusion.cn/"},{name:"\u8001\u8881AIGC",url:"https://v.douyin.com/dOlouy4GIo0/"},{name:"B\u7AD9\u5145\u7535\u7684\u5C0F\u4F19\u4F34\u4EEC",url:"https://space.bilibili.com/44908313"}],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:"\u5FAE\u4FE1\u7FA4",url:"https://sdppp.zombee.tech/docs/category/sd-ppp%E5%90%84%E9%A2%86%E5%9F%9F%E8%AE%A8%E8%AE%BA%E7%BE%A4"},{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:"https://sdppp.zombee.tech/img/icons/chenyu.ico",color:"var(--uxp-host-text-color-secondary)"},{name:"\u4ED9\u5BAB\u4E91",url:"https://www.xiangongyun.com/register/NWF5AH",icon:"https://sdppp.zombee.tech/img/icons/xgc.ico",color:"var(--uxp-host-text-color-secondary)"},{name:"Cephalon",url:"https://cephalon.cloud/share/register-landing?invite_id=m95SDj",icon:"https://sdppp.zombee.tech/img/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 _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 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 _r(r)?r:null}catch(t){return console.warn(`Failed to fetch from ${e}:`,t),null}}var kr=null;function xr(){let[e,t]=Be.default.useState(!0);if(!kr){let s=Co();kr=new Promise(a=>{let c=!1;di(ui.GITEE).then(p=>{!c&&p&&(c=!0,li(p),a(p),t(!1))}),di(ui.GITHUB).then(p=>{!c&&p&&(c=!0,li(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)))},Zs)})}let[r,o]=Be.default.useState(()=>{let s=Co();return s&&_r(s)?s:Do});Be.default.useEffect(()=>{kr&&kr.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,Be.useState)(!0);return(0,Be.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 Te=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 f=t?.comfyUserToken;D.setComfyUserToken(g),f==""&&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,Te.jsxs)("div",{className:"login-block",children:[(0,Te.jsx)("div",{className:"login-title",children:h("Comfy multi-user: ")}),(0,Te.jsx)("div",{children:h("ComfyUI with --multi-user is only available for sponsors")})]});let p=n&&t?.comfyUserToken,d=t?.comfyUserToken?.split("_")[0]||"";return(0,Te.jsxs)("div",{className:"login-block",children:[(0,Te.jsx)("div",{className:`login-title${p?"":" login-title-secondary"}`,children:h("Comfy multi-user: ")+(p?d:"")}),p?(0,Te.jsx)("div",{className:"logout-btn action-button",onClick:()=>{r(o),c(!1)},children:h("Logout")}):(0,Te.jsx)("div",{className:"logout-btn action-button",onClick:()=>{c(!0),e.onRequestLogin?.()},children:h("Not Login")})]})}var Ve=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,Ve.jsxs)("div",{className:"login-block",children:[(0,Ve.jsx)("div",{className:"api-key-title",children:"ComfyOrg API Key"}),(0,Ve.jsx)("div",{children:h("Logged in by email/password")})]}):(0,Ve.jsxs)("div",{className:"login-block",children:[(0,Ve.jsx)("div",{className:"api-key-title",children:"ComfyOrg API Key"}),(0,Ve.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 Ee=b(S(),1);function vi({onRequestLogin:e}){let{timeoutError:t}=J(),{hasAuthingLogin:r}=ne();return(0,Ee.jsxs)("div",{className:"client-panel",children:[(!r||t)&&(0,Ee.jsx)(wi,{}),(0,Ee.jsxs)("div",{className:"app-login-container",children:[(0,Ee.jsx)("div",{className:"client-panel-title",children:h("Login/Auth")}),r&&(0,Ee.jsx)(gi,{}),(0,Ee.jsx)(Rr,{onRequestLogin:e}),(0,Ee.jsx)(Nr,{}),(0,Ee.jsxs)("sp-label",{children:["photoshop id: ",D.data.uname]})]})]})}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}=Me(),{comfyMultiUser:i}=A(),{webviewAgentSID:s,timeoutError:a,loadError:c,toggleWebviewDialog:p}=J(),d=(0,Se.useRef)(null),{ssid:u,lastError:g,progress:l,executingNodeTitle:f,queueSize:m}=Lr(n),{loggedInUsername:y,hasAuthingLogin:v,isLogin:w}=ne(),P=n&&m?`(${m})`:"";(0,Se.useEffect)(()=>{n?n&&(f?t(`(${l}% - ${f}...)`):(t(""),o(""))):i&&!D.data.comfyUserToken?t(h("--multi-user Not Login!")):(a||c)&&o(h("Error: {0}",c||h("timeout")))},[n,g,l,f,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)),p()}})}),(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 Ge=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:Ge.makeDocumentDataOptions(D)};constructor(t){super(t),D.subscribe("/documents",this.updateOptions)}updateOptions=()=>{let t=Ge.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 Re=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=Ge.findDocumentData(D,t);if(!r){this.setState({options:[]});return}let o=Ge.makeLayerOptions(r,C.getSpecialLayerForGet());this.setState({options:o})};render(){let t=this.props.value;if(t)try{t=h(t)}catch{}return(0,Re.jsxs)("div",{className:"sdppp-layer-widget",style:Pe(this.props.uiWeight),children:[(0,Re.jsx)("div",{className:"sdppp-layer-widget-dropdown",children:(0,Re.jsx)(Qe,{uiWeight:12,options:this.state.options,onSelectUpdate:this.props.onSelectUpdate,value:t})}),(0,Re.jsxs)("div",{className:"sdppp-layer-widget-quick-set",children:[(0,Re.jsxs)("sp-label",{children:[h("Quick Set"),":"]}),(0,Re.jsx)(ve,{onClick:async()=>{let r=Je();this.props.onSelectUpdate(r,this.state.options.indexOf(r))},label:h("Selected Layer")}),(0,Re.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 Gt=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),[p,d]=(0,de.useState)(null),{backendURL:u}=A(),{uploadImage:g}=oe(),{addBeforeWorkflowRunHook:l}=yt(),f=(0,de.useRef)(null),m=(0,de.useCallback)(async()=>{if(i==="manual"&&!a&&p){await e.onValueChange(p);return}try{if(i==="auto"&&await v(t),f.current){let w=await f.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,p,e.onValueChange]);(0,de.useEffect)(()=>{let P=l(m);return()=>{P()}},[m]);let y=o;if(!y&&(p||e.value)){let w=p||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;f.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:Ae(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 ki(e){let[t,r]=(0,fe.useState)(""),[o,n]=(0,fe.useState)(""),[i,s]=(0,fe.useState)("manual"),[a,c]=(0,fe.useState)(!1),[p,d]=(0,fe.useState)(null),{backendURL:u}=A(),{uploadImage:g}=oe(),{addBeforeWorkflowRunHook:l}=yt(),f=(0,fe.useRef)(null),m=(0,fe.useCallback)(async()=>{if(i==="manual"&&!a&&p){await e.onValueChange(p);return}try{if(i==="auto"&&await v(t),f.current){let w=await f.current.getBuffer(Gt.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,p,e.onValueChange]);(0,fe.useEffect)(()=>{let w=l(m);return()=>{w()}},[m]);let y=o;if(!y&&(p||e.value)){let w=p||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,_){I.bitmap.data[_+3]=255-I.bitmap.data[_+3]}),f.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;f.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:Ae(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],f=(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(f,{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]),[p,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]]}):p.length>0&&(u=(0,$.jsx)("span",{className:"list-error-label",children:r[+p[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 He=b(E(),1);var Ke=b(S(),1),_i=e=>{let{inputMin:t,inputMax:r,inputStep:o,value:n=0,onValueChange:i,name:s,uiWeight:a,extraOptions:c}=e,[p,d]=(0,He.useState)(+n.toFixed(3));(0,He.useEffect)(()=>{d(+n.toFixed(3))},[n]);let u=(0,He.useCallback)(m=>{let y=+m.target.value;d(+y.toFixed(3))},[]),g=(0,He.useCallback)(()=>{i(p)},[p,i]),l=(0,He.useCallback)(m=>{let y=+m.target.value;d(+y.toFixed(3)),i(+y.toFixed(3))},[p,i]);return!((r-t)/o>1e3)&&a&&a>=1&&c?.useSliderForNumberWidget?(0,Ke.jsxs)("div",{style:{...Pe(a),display:"flex",alignItems:"center"},children:[(0,Ke.jsx)("sp-slider",{style:{width:"60%"},min:t,max:r,step:o,value:p,onInput:l,"show-value":"false",class:"sdppp-slider"}),(0,Ke.jsx)("sp-textfield",{style:{width:"40%"},onInput:u,onBlur:g,value:p})]}):(0,Ke.jsxs)("div",{style:{...Pe(a),display:"flex",alignItems:"center"},children:[s&&(0,Ke.jsx)("sp-label",{style:{flex:"1"},children:s}),(0,Ke.jsx)("sp-textfield",{style:s?{flex:"2"}:{width:"100%"},onInput:u,onBlur:g,value:p})]})};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 p=t.current.offsetHeight;p!==r&&o(p)}},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",width:"100%"},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 f=l.target.value;t(f),n(f)},[t,n]),p=(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:p,onBlur:d})}var ko=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,ko.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,ko.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,_o.useCallback)(async(u,g,l,f)=>{await r(u,g,l),o(!0)},[r,o]),a=n?.widgetTableStructure,c=n?.widgetTableValue,p=n?.widgetTableErrors,d=(0,_o.useCallback)((u,g,l,f)=>{if(l.outputType=="PS_DOCUMENT")return u.result.push((0,ee.jsx)(Mr,{uiWeight:l.uiWeight||12,value:c?.[g.id]?.[f]||"",onSelectUpdate:m=>{s(g.id,f,m,g)},extraOptions:a?.extraOptions},f)),!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]?.[f]||"",documentValue:y?y.split("/").pop():"",onSelectUpdate:v=>{s(g.id,f,v,g)},extraOptions:a?.extraOptions},f)),!0}else{if(l.outputType=="IMAGE_PATH")return u.result.push((0,ee.jsx)(Ai,{uiWeight:l.uiWeight||12,value:c?.[g.id]?.[f]||"",onValueChange:async m=>{await s(g.id,f,m,g)},extraOptions:a?.extraOptions},f)),!0;if(l.outputType=="MASK_PATH")return u.result.push((0,ee.jsx)(ki,{uiWeight:l.uiWeight||12,value:c?.[g.id]?.[f]||"",onValueChange:async m=>{await s(g.id,f,m,g)},extraOptions:a?.extraOptions},f)),!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)(_i,{uiWeight:l.uiWeight||12,name:l.name,inputMin:m,inputMax:y,inputStep:v,value:parseFloat(c?.[g.id]?.[f]||"0"),onValueChange:w=>{s(g.id,f,w,g)},extraOptions:a?.extraOptions},f))}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,f,m,g)},value:c?.[g.id]?.[f]||"",extraOptions:a?.extraOptions},f));else if(l.outputType==="toggle")u.result.push((0,ee.jsx)(Fr,{uiWeight:l.uiWeight||12,name:l.name,value:c?.[g.id]?.[f]||"",onValueChange:m=>{s(g.id,f,m,g)},extraOptions:a?.extraOptions},f));else{let m=c?.[g.id]?.[f]||"";u.result.push((0,ee.jsx)(xi,{uiWeight:l.uiWeight||12,value:typeof m=="string"?m:JSON.stringify(m),onValueChange:y=>{s(g.id,f,y,g)},extraOptions:a?.extraOptions},f))}}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:p||{},onWidgetChange:s,onWidgetRender:d})]}):null}var Br=b(E(),1);var G=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)(""),[p,d]=(0,Br.useState)("");return(0,G.jsxs)("div",{className:"login-container",children:[r,(0,G.jsx)("div",{className:"login-container-login",children:(0,G.jsxs)("div",{className:"login-form",children:[t==="invitation"?(0,G.jsxs)("div",{className:"login-form-item",children:[(0,G.jsx)("label",{htmlFor:"username",children:h("Invitation Code")}),(0,G.jsx)("sp-textfield",{type:"text",id:"username",placeholder:h("Please input invitation code"),value:i,onInput:u=>s(u.target.value)})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{className:"login-form-item",children:[(0,G.jsx)("label",{htmlFor:"username",children:h("Username")}),(0,G.jsx)("sp-textfield",{type:"text",id:"username",placeholder:h("Please input username"),value:i,onInput:u=>s(u.target.value)})]}),(0,G.jsxs)("div",{className:"login-form-item",children:[(0,G.jsx)("label",{htmlFor:"password",children:h("Password")}),(0,G.jsx)("sp-textfield",{type:"password",id:"password",placeholder:h("Please input password"),value:a,onInput:u=>c(u.target.value)})]})]}),(0,G.jsx)("div",{className:"login-error-message",children:p}),(0,G.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,G.jsx)("a",{className:"trial-button",onClick:()=>n(!0),children:"\u6E38\u5BA2\u8BD5\u7528"})]})}),o]})}var ze=b(S(),1);function Oi({renderContent:e}){let{connectState:t}=A(),{isLogin:r,isTrialing:o}=ne();return(0,ze.jsxs)("div",{className:"sdppp-container",style:t!=="connected"?{height:"100vh"}:{},children:[(0,ze.jsx)(rt,{children:r||o?e(t,bi,Ri):(0,ze.jsx)(Ni,{})}),t!="connected"&&(0,ze.jsx)(mi,{}),o&&(0,ze.jsx)("div",{className:"sdppp-trial-tips",children:(0,ze.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:p}})}),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,p=t.cloud[je()=="zhcn"?"zhcn":"en"];return p.length==0?null:(0,xo.jsx)("webview",{ref:o,className:"promote-webview",style:{width:"100%",height:"24px"},src:c})}Object.assign(globalThis,{SDPPPInternal:To});})(); +"use strict";(()=>{var Ui=Object.create;var qt=Object.defineProperty;var To=Object.getOwnPropertyDescriptor;var Fi=Object.getOwnPropertyNames;var Bi=Object.getPrototypeOf,Vi=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),Br=(e,t)=>{for(var r in t)qt(e,r,{get:t[r],enumerable:!0})},Gi=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Fi(t))!Vi.call(e,n)&&n!==r&&qt(e,n,{get:()=>t[n],enumerable:!(o=To(t,n))||o.enumerable});return e};var v=(e,t,r)=>(r=e!=null?Ui(Bi(e)):{},Gi(t||!e||!e.__esModule?qt(r,"default",{value:e,enumerable:!0}):r,e));var _=(e,t,r,o)=>{for(var n=o>1?void 0:o?To(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&&qt(t,r,n),n};var E=Ye((Ka,Qo)=>{"use strict";Qo.exports=window.React});var jo=Ye((nc,Jo)=>{"use strict";var at=1e3,ct=at*60,ut=ct*60,Ze=ut*24,cs=Ze*7,us=Ze*365.25;Jo.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return ls(e);if(r==="number"&&isFinite(e))return t.long?fs(e):ds(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function ls(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*us;case"weeks":case"week":case"w":return r*cs;case"days":case"day":case"d":return r*Ze;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ut;case"minutes":case"minute":case"mins":case"min":case"m":return r*ct;case"seconds":case"second":case"secs":case"sec":case"s":return r*at;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function ds(e){var t=Math.abs(e);return t>=Ze?Math.round(e/Ze)+"d":t>=ut?Math.round(e/ut)+"h":t>=ct?Math.round(e/ct)+"m":t>=at?Math.round(e/at)+"s":e+"ms"}function fs(e){var t=Math.abs(e);return t>=Ze?nr(e,t,Ze,"day"):t>=ut?nr(e,t,ut,"hour"):t>=ct?nr(e,t,ct,"minute"):t>=at?nr(e,t,at,"second"):e+" ms"}function nr(e,t,r,o){var n=t>=r*1.5;return Math.round(e/r)+" "+o+(n?"s":"")}});var Zo=Ye((ic,Xo)=>{"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=jo(),r.destroy=m,Object.keys(e).forEach(d=>{r[d]=e[d]}),r.names=[],r.skips=[],r.formatters={};function t(d){let l=0;for(let f=0;f{if(ve==="%%")return"%";I++;let k=r.formatters[oe];if(typeof k=="function"){let Q=w[I];ve=k.call(b,Q),w.splice(I,1),I--}return ve}),r.formatArgs.call(b,w),(b.log||r.log).apply(b,w)}return h.namespace=d,h.useColors=r.useColors(),h.color=r.selectColor(d),h.extend=o,h.destroy=r.destroy,Object.defineProperty(h,"enabled",{enumerable:!0,configurable:!1,get:()=>f!==null?f:(u!==r.namespaces&&(u=r.namespaces,p=r.enabled(d)),p),set:w=>{f=w}}),typeof r.init=="function"&&r.init(h),h}function o(d,l){let f=r(this.namespace+(typeof l>"u"?":":l)+d);return f.log=this.log,f}function n(d){r.save(d),r.namespaces=d,r.names=[],r.skips=[];let l=(typeof d=="string"?d:"").trim().replace(" ",",").split(",").filter(Boolean);for(let f of l)f[0]==="-"?r.skips.push(f.slice(1)):r.names.push(f)}function i(d,l){let f=0,u=0,p=-1,h=0;for(;f"-"+l)].join(",");return r.enable(""),d}function a(d){for(let l of r.skips)if(i(d,l))return!1;for(let l of r.names)if(i(d,l))return!0;return!1}function c(d){return d instanceof Error?d.stack||d.message:d}function m(){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}Xo.exports=ps});var sr=Ye((ne,ir)=>{"use strict";ne.formatArgs=hs;ne.save=gs;ne.load=ys;ne.useColors=ms;ne.storage=ws();ne.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`."))}})();ne.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 ms(){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 hs(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)}ne.log=console.debug||console.log||(()=>{});function gs(e){try{e?ne.storage.setItem("debug",e):ne.storage.removeItem("debug")}catch{}}function ys(){let e;try{e=ne.storage.getItem("debug")}catch{}return!e&&typeof process<"u"&&"env"in process&&(e=process.env.DEBUG),e}function ws(){try{return localStorage}catch{}}ir.exports=Zo()(ne);var{formatters:vs}=ir.exports;vs.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}});var P=Ye((ac,rn)=>{"use strict";rn.exports=window.ReactJSXRuntime});var un=Ye((dc,cn)=>{"use strict";cn.exports=window.socketIO});var kt=Ye((Lc,gn)=>{"use strict";gn.exports=window.Jimp});var xo={};Br(xo,{Auths:()=>Ri,Promote:()=>Wi,SDPPP:()=>xi,SDPPPProvider:()=>ii,useAgentState:()=>Er,useSDPPPComfyCaller:()=>re,useSDPPPContext:()=>We,useSDPPPWebpageList:()=>Ar,useSDPPPWorkflowList:()=>si});var T=N("photoshop");var Ee=N("photoshop"),qi=N("uxp");var Vr={"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 Gr={"### 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","Back to workflow list":"\u8FD4\u56DE\u5DE5\u4F5C\u6D41\u5217\u8868","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 Ro=typeof N<"u"?N:void 0,Kt="en";typeof navigator<"u"&&navigator.language?Kt=navigator.language=="zh-CN"?"zhcn":"en":Ro&&(Kt=Ro("uxp").host.uiLocale.startsWith("zh")?"zhcn":"en");function g(e,...t){let r=Kt=="zhcn"?Gr[e]:e in Vr?Vr[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 ze(e,t){return e==t||Gr[e]==t}function Ht(){return Kt}var C=class e{static SPECIAL_DOCUMENT_CURRENT="### Active Document ###";static is_SPECIAL_DOCUMENT_CURRENT(t){return ze(this.SPECIAL_DOCUMENT_CURRENT,t)}static get_SPECIAL_DOCUMENT_CURRENT(){return g(this.SPECIAL_DOCUMENT_CURRENT)}static SPECIAL_LAYER_KEEP_SIZE="### Keep Size or Fit Canvas ###";static is_SPECIAL_LAYER_FIT(t){return ze(this.SPECIAL_LAYER_KEEP_SIZE,t)}static get_SPECIAL_LAYER_FIT(){return g(this.SPECIAL_LAYER_KEEP_SIZE)}static SPECIAL_LAYER_USE_CANVAS="### The Canvas ###";static is_SPECIAL_LAYER_USE_CANVAS(t){return ze(this.SPECIAL_LAYER_USE_CANVAS,t)}static get_SPECIAL_LAYER_USE_CANVAS(){return g(this.SPECIAL_LAYER_USE_CANVAS)}static SPECIAL_LAYER_NEW_LAYER="### New Layer ###";static is_SPECIAL_LAYER_NEW_LAYER(t){return ze(this.SPECIAL_LAYER_NEW_LAYER,t)}static get_SPECIAL_LAYER_NEW_LAYER(){return g(this.SPECIAL_LAYER_NEW_LAYER)}static SPECIAL_LAYER_SELECTED_LAYER="### Selected Layer ###";static is_SPECIAL_LAYER_SELECTED_LAYER(t){return ze(this.SPECIAL_LAYER_SELECTED_LAYER,t)}static get_SPECIAL_LAYER_SELECTED_LAYER(){return g(this.SPECIAL_LAYER_SELECTED_LAYER)}static SPECIAL_LAYER_PREVIEW_DOCUMENT="_SDPPP_PSD_";static is_SPECIAL_LAYER_PREVIEW_DOCUMENT(t){return ze(this.SPECIAL_LAYER_PREVIEW_DOCUMENT,t)}static get_SPECIAL_LAYER_PREVIEW_DOCUMENT(){return g(this.SPECIAL_LAYER_PREVIEW_DOCUMENT)}static getSpecialDocumentCurrent(){return g(e.SPECIAL_DOCUMENT_CURRENT)}static getSpecialLayerForGet(){return[g(e.SPECIAL_LAYER_USE_CANVAS),g(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialLayerForSend(){return[g(e.SPECIAL_LAYER_NEW_LAYER),g(e.SPECIAL_LAYER_SELECTED_LAYER)]}static getSpecialDocumentForPreview(){return g(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 Ae(e,t){return`${t} (id:${e})`}function Qi(e){let t=e.split(" (id:");return{name:t[0],id:parseInt(t[1].slice(0,-1))}}function No(e){return Qi(e)}function $e(){let e=Ee.app.activeDocument?.activeLayers?.[0];return e?De(e.id,e.name):C.get_SPECIAL_LAYER_USE_CANVAS()}function Oo(e,t,r,o,n){let i=r.left,s=r.top,a=r.right,c=r.bottom,m=a-i,d=c-s,l=o.left,f=o.top,u=o.right,p=o.bottom,h=u-l,w=p-f,b=Math.max(i,l),y=Math.max(s,f),S=Math.min(a,u),I=Math.min(c,p),$=S-b,ve=I-y,oe=h*w*n;if(t.length!==oe)throw new Error(`toImageDataArray.length(${t.length}) !== toLength(${oe})`);let k=$*ve*n;if(e.length!==k)throw new Error(`fromImageDataArray.length(${e.length}) !== fromLength(${k})`);for(let Q=0;Q=i&&Se=s&&Gt0?e.activeLayers[0].id:0:C.is_SPECIAL_LAYER_NEW_LAYER(t)?-2:Wo(t)}function Qr(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(Qr(n,t+1,i))},[]):[]}function le(e,t){if(!e.layers)return null;for(let r=0;rt.id==Ki(e)))||null}function Mo(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 Uo(){let e=localStorage.getItem("sdppp_uid");return(!e||e.length!=3)&&(e=St(3),localStorage.setItem("sdppp_uid",e)),e}function St(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 qr={};Br(qr,{JsonPatchError:()=>M,_areEquals:()=>It,applyOperation:()=>Je,applyPatch:()=>it,applyReducer:()=>ji,deepClone:()=>$i,getValueByPointer:()=>je,validate:()=>Bo,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)}}(),zi=Object.prototype.hasOwnProperty;function Jt(e,t){return zi.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 Ce(e){return e.indexOf("/")===-1&&e.indexOf("~")===-1?e:e.replace(/~/g,"~0").replace(/\//g,"~1")}function Dt(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function $t(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&&f===void 0&&(m[u]===void 0?f=c.slice(0,d).join("/"):d==l-1&&(f=t.path),f!==void 0&&p(t,0,e,f)),d++,Array.isArray(m)){if(u==="-")u=m.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(d>=l){if(r&&t.op==="add"&&u>m.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,m,u,e);if(s.test===!1)throw new M("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return s}}else if(d>=l){var s=nt[t.op].call(t,m,u,e);if(s.test===!1)throw new M("Test operation failed","TEST_OPERATION_FAILED",i,t,e);return s}if(m=m[u],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")&&$t(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=Bo([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 Bo(e,t,r){try{if(!Array.isArray(e))throw new M("Patch sequence must be an array","SEQUENCE_NOT_AN_ARRAY");if(t)it(W(t),W(e),r||!0);else{r=r||Zt;for(var o=0;oer,generate:()=>Kr,observe:()=>ns,unobserve:()=>os});var Hr=new WeakMap,Xi=function(){function e(t){this.observers=new Map,this.obj=t}return e}(),Zi=function(){function e(t,r){this.callback=t,this.observer=r}return e}();function es(e){return Hr.get(e)}function ts(e,t){return e.observers.get(t)}function rs(e,t){e.observers.delete(t.callback)}function os(e,t){t.unobserve()}function ns(e,t){var r=[],o,n=es(e);if(!n)n=new Xi(e),Hr.set(e,n);else{var i=ts(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(){Kr(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(){Kr(o),clearTimeout(o.next),rs(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 Zi(t,o)),o}function Kr(e,t){t===void 0&&(t=!1);var r=Hr.get(e.object);Yr(r.value,e.object,e.patches,"",t),e.patches.length&&it(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,m=s.length-1;m>=0;m--){var d=s[m],l=e[d];if(Jt(t,d)&&!(t[d]===void 0&&l!==void 0&&Array.isArray(t)===!1)){var f=t[d];typeof l=="object"&&l!=null&&typeof f=="object"&&f!=null&&Array.isArray(l)===Array.isArray(f)?Yr(l,f,r,o+"/"+Ce(d),n):l!==f&&(a=!0,n&&r.push({op:"test",path:o+"/"+Ce(d),value:W(l)}),r.push({op:"replace",path:o+"/"+Ce(d),value:W(f)}))}else Array.isArray(e)===Array.isArray(t)?(n&&r.push({op:"test",path:o+"/"+Ce(d),value:W(l)}),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 m=0;mo!=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:je(r,i)))})}),o.forEach((n,i)=>{let s=i==="/"?this._data:je(this._data,i);n!==JSON.stringify(s)&&this.subscribers.filter(([a,c])=>a===i).forEach(([a,c])=>{let m={};try{m=c(s,JSON.parse(n||{}))}catch(d){console.error(d.stack||d.message||d)}m instanceof Promise&&m.catch(d=>{console.error(d.stack||d.message||d)})})})}};function x(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 Xe=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],Xe.prototype,"setSID",1);var de=class extends Xe{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}};_([x],de.prototype,"setIsLocal",1),_([x],de.prototype,"setUName",1),_([x],de.prototype,"setDocument",1),_([x],de.prototype,"setCanvasStateID",1),_([x],de.prototype,"setSelectionStateID",1),_([x],de.prototype,"setHistoryStateID",1),_([x],de.prototype,"setComfyUserToken",1),_([x],de.prototype,"setActions",1);var K=class extends Xe{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],K.prototype,"setWebviewFromSid",1),_([x],K.prototype,"setTitle",1),_([x],K.prototype,"setProgress",1),_([x],K.prototype,"setLastError",1),_([x],K.prototype,"setQueueSize",1),_([x],K.prototype,"setExecutingNodeTitle",1),_([x],K.prototype,"setWidgetTableStructure",1),_([x],K.prototype,"setWidgetTableValue",1),_([x],K.prototype,"setWidgetTableErrors",1),_([x],K.prototype,"setHasPSDNodes",1),_([x],K.prototype,"setComfyUserToken",1),_([x],K.prototype,"setComfyOrgLoggedIn",1),_([x],K.prototype,"setComfyOrgAPIKey",1),_([x],K.prototype,"setUseSliderForNumberWidget",1);var Jr=class extends zt{createStore(t,r){return new K(t,r)}},O=new Jr,D=new de;var Vo=e=>{let t,r=new Set,o=(m,d)=>{let l=typeof m=="function"?m(t):m;if(!Object.is(l,t)){let f=t;t=d??(typeof l!="object"||l===null)?l:Object.assign({},t,l),r.forEach(u=>u(t,f))}},n=()=>t,a={setState:o,getState:n,getInitialState:()=>c,subscribe:m=>(r.add(m),()=>r.delete(m))},c=t=e(o,n,a);return a},Go=e=>e?Vo(e):Vo;var jr=v(E(),1);var is=e=>e;function ss(e,t=is){let r=jr.default.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return jr.default.useDebugValue(r),r}var qo=e=>{let t=Go(e),r=o=>ss(t,o);return Object.assign(r,t),r},Ko=e=>e?qo(e):qo;var Le=N("photoshop");var H=Ko((e,t)=>({canvasDirtyID:0,selectionDirtyID:0,layerDirtyIDs:new Map,documentCache:{},incrementCanvasDirtyID:()=>{e(r=>({canvasDirtyID:r.canvasDirtyID+1})),Xr()},incrementLayerDirtyID:r=>{e(o=>{let n=o.layerDirtyIDs.get(r)||0,i=new Map(o.layerDirtyIDs);return i.set(r,n+1),{layerDirtyIDs:i}}),Xr()},incrementSelectionDirtyID:()=>{e(r=>({selectionDirtyID:r.selectionDirtyID+1})),Xr()},setDocuments:r=>{e({documentCache:r}),Le.app.activeDocument&&D.setDocument(Le.app.activeDocument.id,JSON.parse(JSON.stringify(r)))},clearCanvasDirtyID:()=>{e({canvasDirtyID:0})},clearLayerDirtyIDs:()=>{e({layerDirtyIDs:new Map})},clearSelectionDirtyID:()=>{e({selectionDirtyID:0})}}));function Xr(){if(!Le.app.activeDocument)return;let e=H.getState().documentCache[Le.app.activeDocument.id];if(e){let t={...e,dirtyID:H.getState().canvasDirtyID,layers:e.layers.map(r=>{let o=H.getState().layerDirtyIDs.get(r.id);return o!==void 0?{...r,dirtyID:o}:r})};H.setState(r=>({documentCache:{...r.documentCache,[Le.app.activeDocument.id]:t}})),D.setDocument(Le.app.activeDocument.id,H.getState().documentCache)}}function st(){try{if(!Le.app.activeDocument)return;let e=Le.app.documents.reduce((t,r)=>{let o=Qr(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:H.getState().layerDirtyIDs.get(i)||0}});return t[r.id]={name:r.name,id:r.id,identify:Ae(r.id,r.name),layers:o,canvasDirtyID:H.getState().canvasDirtyID,selectionDirtyID:H.getState().selectionDirtyID},t},{});H.getState().setDocuments(e)}catch(e){console.error(e)}}function rr(){H.getState().incrementCanvasDirtyID()}function Re(e){Array.isArray(e)?e.forEach(t=>{H.getState().incrementLayerDirtyID(t)}):H.getState().incrementLayerDirtyID(e)}function Ho(){H.getState().clearCanvasDirtyID(),H.getState().clearLayerDirtyIDs(),st()}function Zr(){H.getState().incrementSelectionDirtyID()}(async()=>{D.setUName(Uo()),st()})().catch(console.error);T.action.addNotificationListener(["historyStateChanged"],e=>{as(),(e.commandID==5004||e.commandID==5002)&&(Et(),Re(T.app.activeDocument?.activeLayers.map(t=>t.id)))});T.action.addNotificationListener(["toolModalStateChanged"],(e,t,...r)=>{t.state._value=="exit"&&t.kind._value=="paint"&&(Et(),Re(T.app.activeDocument?.activeLayers.map(o=>o.id)))});T.action.addNotificationListener(["modalStateChanged"],(e,t)=>{t.state._value=="exit"&&(Et(),Re(T.app.activeDocument?.activeLayers.map(r=>r.id)))});T.action.addNotificationListener(["show","hide","transform","fill","crop"],()=>{Et(),Re(T.app.activeDocument?.activeLayers.map(e=>e.id))});T.action.addNotificationListener(["delete","move","copyToLayer"],()=>{st(),Et(),Re(T.app.activeDocument?.activeLayers.map(e=>e.id))});T.action.addNotificationListener(["newDocument","open","close","make","modalJavaScriptScopeExit"],()=>st());function Et(){let e=T.app.activeDocument?.historyStates;e&&D.setCanvasStateID(e[e.length-1].id),rr()}function as(){let e=T.app.activeDocument?.historyStates;e&&D.setHistoryStateID(e[e.length-1].id)}function Yo(){D.setSelectionStateID(zo+"_"+At+"_"+or)}var At=T.app.activeDocument?.id,or=T.app.activeDocument?.activeLayers.map(e=>e.id).join(","),zo=0;T.action.addNotificationListener(["set"],(e,t)=>{t._target[0]._property=="selection"&&(zo++,Yo(),Zr())});function $o(){let e=T.app.activeDocument?.activeLayers.map(r=>r.id).join(",");At!=T.app.activeDocument?.id&&Ho();let t=[];T.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),At!=T.app.activeDocument?.id||or!=e?(At=T.app.activeDocument?.id,or=e,Yo(),Zr()):(At=T.app.activeDocument?.id,or=e),requestAnimationFrame($o)}requestAnimationFrame($o);setInterval(()=>st(),5e3);globalThis.sdpppX=globalThis.sdpppX||{};var R=globalThis.sdpppX;var en=v(sr(),1),tn=[];R.getLogs=()=>tn;localStorage.setItem("debug","sdppp:*");en.debug.log=(...e)=>{tn.push(e.join(" "))};var gt=v(E(),1);var U=v(E(),1);var L=v(E(),1);var an=v(P(),1),nn=(0,L.createContext)(null);function sn({children:e}){let t=bs();return(0,L.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,an.jsx)(nn.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,L.useContext)(nn);if(!e)throw new Error("useSDPPPWebview must be used within a SDPPPWebviewProvider");return e}function bs(){let[e,t]=(0,L.useState)(null),[r,o]=(0,L.useState)(null),[n,i]=(0,L.useState)(null),[s,a]=(0,L.useState)(!1),[c,m]=(0,L.useState)(""),[d,l]=(0,L.useState)(""),[f,u]=(0,L.useState)(""),[p,h]=(0,L.useState)(!1),[w,b]=(0,L.useState)(!1),y=(0,L.useRef)(null),[S,I]=(0,L.useState)("");(0,L.useEffect)(()=>{let Q=()=>{a(!1),l(f),oe()};return n?.addEventListener("close",Q),()=>{n?.removeEventListener("close",Q)}},[n,f,l,a]),(0,L.useEffect)(()=>{u(d)},[d]),(0,L.useEffect)(()=>{Ps(i,o);let Q=on();return t(Q),y.current&&clearTimeout(y.current),h(!1),b(!1),y.current=setTimeout(()=>{h(!0)},5e3),Q.addEventListener("loadstop",()=>{b(!0)}),Q.addEventListener("loaderror",Se=>{I(Se.message||Se.type)}),Q.addEventListener("loadstart",()=>{I("")}),()=>{y.current&&clearTimeout(y.current),n?.parentElement?.removeChild(n)}},[]);let[$,ve]=(0,L.useState)("");(0,L.useEffect)(()=>{c&&(ve(c),$===c?oe():(e?.setAttribute("src",c),r?.setAttribute("src",c)))},[c]);let oe=(0,L.useCallback)(()=>{e?.parentElement?.removeChild(e),a(!1),n?.close();let Q=on();t(Q);let Se=c;m(""),ve(""),setTimeout(()=>{m(Se)},300)},[e,c]),k=(0,L.useCallback)(()=>{s?(n?.close(),a(!1)):(n?.show(),a(!0))},[n,s]);return{dialogShowing:s,toggleWebviewDialog:k,setSrc:m,webviewAgentSID:d,setWebviewAgentSID:l,prevWebviewAgentSID:f,setPrevWebviewAgentSID:u,resetWebview:oe,anyWebviewLoaded:w,timeoutError:(0,L.useMemo)(()=>p&&!w,[p,w]),loadError:S}}function Ps(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 ke=null;function on(){ke||(ke=document.createElement("div"),ke.style.position="absolute",ke.style.width="100px",ke.style.height="100px",ke.style.right="0",ke.style.bottom="-10000px",document.body.appendChild(ke));let e=document.createElement("webview");return e.style.width="100px",e.style.height="100px",ke?.appendChild(e),e}var fn=v(un(),1);var ln="507";var dn=ln.trim();var eo=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,fn.io)(t,{transports:["websocket"],path:r,query:{api_level:dn},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 pn(...e){return e.reduce((t,r)=>r(t),eo)}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 m=!1;setTimeout(()=>{m||(console.warn("flush timeout"),c())},5e3),this.socket.emit("store_flush",{operations:i,fromVersion:s},d=>{m=!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 hn(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 to(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(g("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 _t=N("photoshop");var _e=N("photoshop"),ro=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 Lt=Promise.resolve();async function B(e,t){let r=t.dontRecoverSelection||!1,o=new ro,n=!1,i=[],s=[],a=t.commandName;r||(_e.app.activeDocument.activeLayers.forEach(l=>i.push(l)),t.document&&_e.app.activeDocument.id!=t.document.id&&t.document.activeLayers.forEach(l=>i.push(l)),s=i.map(l=>l.visible),o.add(()=>{i.forEach(l=>{l.selected||(l.selected=!0,n=!0)}),t.document==_e.app.activeDocument&&i.forEach((l,f)=>{l.visible=s[f]})}));let c=null;Lt=Lt.catch(l=>l).then(()=>new Promise(l=>{f();function f(){_e.core.isModal()?requestAnimationFrame(f):l()}})).then(()=>_e.core.executeAsModal(async function(l,...f){c=t.document?await l.hostControl.suspendHistory({documentID:t.document.id,name:a}):null,o.add(async()=>{await new Promise(requestAnimationFrame),n||c&&l.hostControl.resumeHistory(c)});try{let u=await e(o,l,...f);return o.restore(!0),u}catch(u){throw o.restore(!1),u}},{commandName:a,interactive:!0}));let m=null,d=null;try{await Lt}catch(l){d=l}if(n&&(Lt=_e.core.executeAsModal(async l=>{i.forEach((f,u)=>{f.visible=s[u]}),c&&l.hostControl.resumeHistory(c)},{commandName:a,interactive:!0}),await Lt),d)throw d;return m}var lt=v(kt(),1),yn=v(sr(),1),Ds=(0,yn.default)("sdppp:getImage");function Cs(e,t){for(let r=0,o=e.length/4;r{i.dispose()}),{dataFromAPI:s,width:i.width,height:i.height}}async function Es(e,t,r){if(!t)return null;let o={documentID:e.id,sourceBounds:r,layerID:t.id},n=null;try{n=await _t.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 wn(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(g("document {0} not found",t));let o=e.layer_identify,n=ee(r,o);if(Ds("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,m,d={left:0,top:0,right:r.width,bottom:r.height},l=!1;if(await B(async p=>{let[h,w]=await Yt(r,n);w&&(a=h),a!=null&&p.add(()=>{a.delete()}),[c,m]=await Promise.all([As(r,h,i),Es(r,h,i)]),d=h?.bounds??d,l=!1,h?l=h.transparentPixelsLocked:C.is_SPECIAL_LAYER_USE_CANVAS(o)&&(l=r.layers.every(b=>b.transparentPixelsLocked))},{commandName:g("get content of layer {0}",o),document:r}),!c)throw new Error(g("get pixel of {0} failed",o));c=cr(c),l&&(c=Is(c)),s.pixelData=ur(c,d,i);let f=null;return m&&(m=cr(m),f=ur(m,d,i,1)),s.pixelData=Cs(s.pixelData,f),s.width=i.width,s.height=i.height,new lt.Jimp({data:Buffer.from(s.pixelData),width:i.width,height:i.height})}async function vn(e){let t=await wn(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=ee(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(g("layer not found: {0}",e.layer_identify));o=Object.assign({isGroup:a,identify:s||""},Mo(r,i))},{commandName:g("get layer info"),document:r}),o}var dr=N("photoshop");async function oo(e,t,r){let o=e.select||"all",n=e.document_identify,i=F(n);if(!i)throw new Error(g("document {0} not found",n));let s=e.layer_identifies,a=await Promise.all(s.map(async m=>{let d=ee(i,m);if(C.is_SPECIAL_LAYER_USE_CANVAS(m))throw new Error(g("layer not found: {0}",m));let l=le(i,d);if(!l)throw new Error(g("layer not found {0}",m));r(l);let f=t(l);if(o==="first"&&f.length===0)throw new Error(g("no first related layer in {0}",m));let u=f.filter((p,h)=>o==="first"?h===0:o==="text"?p.kind===dr.constants.LayerKind.TEXT:o==="image"?p.kind===dr.constants.LayerKind.NORMAL:!0).map(p=>De(p.id,p.name));return{layer_identifies:u,layer_infos:await Promise.all(u.map(p=>xt({document_identify:n,layer_identify:p})))}})),c={layer_identifies:[],layer_boundaries:[],layer_infos:[]};return a.forEach(({layer_identifies:m,layer_infos:d})=>{c.layer_identifies.push(...m),c.layer_boundaries.push(...d.map(l=>l.boundary)),c.layer_infos.push(...d)}),c}async function no(e){return oo(e,t=>t.layers||[],t=>{if(t.kind!=dr.constants.LayerKind.GROUP)throw new Error(g("layer {0} is not a group",t.name));if(!t.layers)throw new Error(g("layer {0} is not a group",t.name))})}async function io(e){return oo(e,t=>t.linkedLayers||[],t=>{if(!t.linkedLayers)throw new Error(g("no linked layer for {0}",t.name))})}var bn=N("photoshop"),Pn=N("uxp");async function Ls(e,t){let r={documentID:e.id,sourceBounds:t},n=(await bn.imaging.getSelection(r)).imageData,i=await n.getData({});return Promise.resolve().then(()=>{n.dispose()}),{dataFromAPI:i,width:n.width,height:n.height}}async function Tt(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(g("document {0} not found",t));let o=parseInt(Pn.host.version.split(".")[0]);if(!isNaN(o)&&o<25)throw new Error(g("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 Ls(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 fe=N("photoshop");async function so(e){let{identifier:t}=e;if(C.is_SPECIAL_DOCUMENT_CURRENT(t)){if(!fe.app.activeDocument){if(e.width&&e.height){let r=await ks(e.width,e.height);if(r)return{value:Ae(r.id,r.name)}}throw new Error(g("document {0} not found",t))}return{value:Ae(fe.app.activeDocument.id,fe.app.activeDocument.name)}}else if(C.is_SPECIAL_LAYER_SELECTED_LAYER(t)){if(!fe.app.activeDocument)return{error:g("document {0} not found","current")};let r=fe.app.activeDocument.activeLayers[0];return r?{value:De(r.id,r.name)}:{error:g("layer not found {0}",t)}}}async function ks(e,t){if(fe.app.activeDocument)return fe.app.activeDocument;let r=null;return await B(async()=>{r=await fe.app.createDocument({width:e,height:t,resolution:72,mode:fe.constants.NewDocumentMode.RGB,fill:fe.constants.DocumentFill.TRANSPARENT})},{document:null,commandName:g("create document for sent images")}),r}var Sn=N("photoshop");async function ao(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(g("document {0} not found",t));let o=e.layer_identify,n=ee(r,o),i={text:""},s=le(r,n);if(!s||s.kind!=Sn.constants.LayerKind.TEXT)throw new Error(g('only layer kind "TEXT" is supported, invalid layer: {0}',o));return i.text=s.textItem.contents,{text:i.text}}var ie=N("photoshop"),dt=N("uxp");var fr=0,Dn=0,_s=5e3;async function co(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 xs()),!r)throw new Error(g("create document failed"));r=await r.duplicate(),n.add(async()=>{r?.close()});let s=await(await dt.storage.localFileSystem.getTemporaryFolder()).createEntry("sdppp.psd",{overwrite:!0});await r.saveAs.psd(s,{maximizeCompatibility:!1,typename:"PhotoshopSaveOptions"}),o=await s.read({format:dt.storage.formats.binary})},{commandName:g("sdppp get PSD"),document:r}),o?{data:o}:{error:"save Document failed"}}else if(e.action==="extract"){if(Date.now()-Dn<_s||fr>2||!confirm(g("{0} wants to extract a PSD file to Photoshop, are you sure?",e.fromSSID))){fr++,fr==3&&(confirm(g("should sdppp refuse extracting PSD to Photoshop in this session anymore?"))||fr--);return}Dn=Date.now();let o=e.data;await B(async function(){if(r||(r=await ie.app.createDocument({width:512,height:512,resolution:72,mode:ie.constants.NewDocumentMode.RGB,fill:ie.constants.DocumentFill.TRANSPARENT})),!r)throw new Error(g("document {0} not found",t));ie.app.activeDocument=r,r.selection?.deselect();let n=await o.arrayBuffer(),s=await(await dt.storage.localFileSystem.getTemporaryFolder()).createEntry("sdppp.psd",{overwrite:!0});await s.write(n,{format:dt.storage.formats.binary});let a=dt.storage.localFileSystem.createSessionToken(s),c=await r.createLayer(ie.constants.LayerKind.NORMAL,{name:"sdppp"});if(!c)throw new Error(g("create layer failed"));c.move(r.layers[0],ie.constants.ElementPlacement.PLACEBEFORE),await ie.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:g("sdppp extract PSD"),document:r,dontRecoverSelection:!0})}else throw new Error(g("invalid action: {0}",e.action))}async function xs(){return await ie.app.createDocument({width:512,height:512,resolution:72,mode:ie.constants.NewDocumentMode.RGB,fill:ie.constants.DocumentFill.TRANSPARENT})}var pr=N("photoshop");async function uo(e){let{action:t}=e,{document_identify:r,layer_identify:o}=e,[n,i]=t.split("/")||[],s=pr.app.actionTree.find(f=>f.name===n);if(!s)throw new Error(g("Action set {0} not found",n));let a=s.actions.find(f=>f.name===i);if(!a)throw new Error(g("Action {0} not found",i));let c=F(r);if(!c)throw new Error(g("document {0} not found",r));let m=c,d=ee(m,o),l=le(m,d);return l&&await B(async()=>{m.activeLayers.forEach(f=>{f.selected=!1}),l.selected=!0},{commandName:g("select layer"),dontRecoverSelection:!0,document:pr.app.activeDocument}),await B(async()=>{await a.play()},{commandName:g("run Photoshop Action"),document:pr.app.activeDocument}),{result:{success:!0}}}var mr=v(kt(),1),se=N("photoshop");async function Ts(e,t){let r=se.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:g("resize document for preview")}),r;{let o=null;return await B(async()=>{o=await se.app.createDocument({width:e,height:t,resolution:72,mode:se.constants.NewDocumentMode.RGB,fill:se.constants.DocumentFill.TRANSPARENT,name:C.getSpecialDocumentForPreview()})},{document:null,commandName:g("create document for preview")}),o}}var Cn=0;async function lo(e){Cn++;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,p)=>{if(r)return await mr.Jimp.read(r[p]);if(t){if("pngData"in t[p])return await mr.Jimp.read(await t[p].pngData.arrayBuffer());{let h=t[p].buffer,w=h instanceof Blob?await h.arrayBuffer():h;return new mr.Jimp({data:Buffer.from(w),width:t[p].width,height:t[p].height})}}}))).filter(u=>u),s=F(o);if(C.is_SPECIAL_LAYER_PREVIEW_DOCUMENT(o)&&(s=await Ts(i[0].bitmap.width,i[0].bitmap.height)),!s)throw new Error(g("document {0} not found",o));let a=s,c=i.map((u,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 h=1;return(u.bitmap.height>a.height||u.bitmap.width>a.width)&&(h=Math.min(a.height/u.bitmap.height,a.width/u.bitmap.width)),{width:u.bitmap.width*h,height:u.bitmap.height*h,top:(a.height-u.bitmap.height*h)/2,left:(a.width-u.bitmap.width*h)/2,bottom:(a.height-u.bitmap.height*h)/2,right:(a.width-u.bitmap.width*h)/2}});i.forEach((u,p)=>{let h=c[p];if(u.bitmap.width!=h.width||u.bitmap.height!=h.height){let w={w:h.width,h:h.height};u.resize(w)}});let m=await Promise.all(i.map(async u=>{let p=u.bitmap.data;if(a.bitsPerChannel=="bitDepth16"){let w=new Uint16Array(p.length);for(let b=0;b{let p=null;l=await Promise.all(i.map(async(h,w)=>{let b=n.length==1?n[0]:n[w];if(!C.is_SPECIAL_LAYER_NEW_LAYER(b)){let y=ee(a,b);p=le(a,y)}if(p&&p.kind!=se.constants.LayerKind.GROUP)return p;{let y=e.new_layer_name||"SDPPP Images";typeof R.handleSendLayerName=="function"&&(y=await R.handleSendLayerName(y));let S=await a.createLayer(se.constants.LayerKind.NORMAL,{name:`${y} ${Cn}${i.length>1?`_${w+1}`:""}`});if(!S)throw new Error(g("create layer failed"));return d.push(S),p?S.move(p,se.constants.ElementPlacement.PLACEINSIDE):S.move(a.layers[0],se.constants.ElementPlacement.PLACEBEFORE),S}})),d.length&&u.add(h=>{h?d.forEach((w,b)=>{w.selected=!1}):d.forEach(w=>w.delete())}),await Promise.all(l.map(async(h,w)=>{await se.imaging.putPixels({documentID:a.id,layerID:h.id,replace:!1,imageData:m[w],targetBounds:c[w]})})),Re(l.map(h=>h.id)),rr()},{commandName:g("show sent images"),document:a});let f=H.getState();return{layers:l.map(u=>({identify:De(u.id,u.name),dirtyID:f.layerDirtyIDs.get(u.id)||0}))}}var In=N("photoshop");async function fo(e){let t=e.document_identify,r=F(t);if(!r)throw new Error(g("document {0} not found",t));let o=e.layer_identify,n=ee(r,o),i=le(r,n);if(!i||i.kind!=In.constants.LayerKind.TEXT)throw new Error(g('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:g("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 co(i):n==="getImage"?s=await lr(i):n==="sendImages"?s=await lo(i):n==="getSelection"?s=await Tt(i):n==="getText"?s=await ao(i):n==="sendText"?s=await fo(i):n==="getLayerInfo"?s=await xt(i):n==="getDocumentInfo"?s=await to(i):n==="getLinkedLayers"?s=await io(i):n==="getLayersInGroup"?s=await no(i):n==="runPhotoshopActionOnLayer"?s=await uo(i):n==="getSpecialIdentifierValue"&&(s=await so(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=Rs(a),m=[];c&&Object.keys(c||{}).forEach(d=>{Object.keys(c[d]||{}).forEach(l=>{m.push({nodeID:d,widgetIndex:l,value:c[d][l].value,outputType:c[d][l].outputType})})}),o({values:m})}})}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 Rs(e){let t=localStorage.getItem(`widgetValue_${e}`);return t?JSON.parse(t):null}var hr=class extends pn(mn(D,"photoshop"),hn(O,"comfy"),En,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 m=new AbortController,d=setTimeout(()=>m.abort(),1500),l=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 Ln=v(sr(),1),xn=v(P(),1),Ns=(0,Ln.debug)("sdppp:internal"),gr="http://127.0.0.1:8188",kn=(0,U.createContext)(null);function _n({children:e}){let{setSrc:t,webviewAgentSID:r,prevWebviewAgentSID:o}=J(),[n,i]=(0,U.useState)("disconnected"),[s,a]=(0,U.useState)(""),[c,m]=(0,U.useState)(localStorage.getItem("backendURL")||gr),[d,l]=(0,U.useState)(null),[f,u]=(0,U.useState)(""),[p,h]=(0,U.useState)(!1),[w,b]=(0,U.useState)(null),[y,S]=(0,U.useState)([]);function I(k){m(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}/));Ns("setBackendURL:",c,"src:",k),D.setIsLocal(k)}else t(""),u("")},[n]);function $(){if(n==="connected"||n==="connecting")w&&(w.close(),b(null));else try{let k=w;w||(k=new hr(c||gr,{setConnectState:i,setLastErrorMessage:a,setBackendURL:I,setComfyMultiUser:h}),b(k)),k.connect()}catch(k){a(k.stack||k.message||k)}}(0,U.useEffect)(()=>{let k=(Q,Se,Gt)=>{f&&(!Se&&Q==f||!(f in O.getAllStore()))&&u("")};return O.subscribe("/",k),()=>{O.unsubscribe(k)}},[f]),(0,U.useEffect)(()=>{!f&&r&&u(r)},[f,r]),(0,U.useEffect)(()=>{r&&(!f||f==o)&&u(r)},[r,o,f,u]);let[ve,oe]=(0,U.useState)(null);return(0,U.useEffect)(()=>{oe(f?O.getAllStore()[f]:null)},[f]),(0,xn.jsx)(kn.Provider,{value:{socket:w,backendURL:c,setBackendURL:I,connectState:n,doConnectOrDisconnect:$,lastErrorMessage:s,setLastErrorMessage:a,autoRunning:d,setAutoRunning:l,comfyMultiUser:p,setComfyMultiUser:h,workflowAgent:ve,workflowAgentSID:f,setWorkflowAgentSID:u,beforeWorkflowRunHooks:y,setBeforeWorkflowRunHooks:S},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 Tn=v(E(),1);var Rn=v(P(),1),et=class extends Tn.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,Rn.jsx)("p",{className:"list-error-label",children:g("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 te(){}function Wn(e,t){return typeof e=="function"?e(t):e}function Mn(e){return typeof e=="number"&&e>=0&&e!==1/0}function Un(e,t){return Math.max(e+(t||0)-Date.now(),0)}function mo(e,t){return typeof e=="function"?e(t):e}function Fn(e,t){return typeof e=="function"?e(t):e}function ho(e,t){let{type:r="all",exact:o,fetchStatus:n,predicate:i,queryKey:s,stale:a}=e;if(s){if(o){if(t.queryHash!==Rt(s,t.options))return!1}else if(!pt(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 go(e,t){let{exact:r,status:o,predicate:n,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(ft(t.options.mutationKey)!==ft(i))return!1}else if(!pt(t.options.mutationKey,i))return!1}return!(o&&t.state.status!==o||n&&!n(t))}function Rt(e,t){return(t?.queryKeyHashFn||ft)(e)}function ft(e){return JSON.stringify(e,(t,r)=>po(r)?Object.keys(r).sort().reduce((o,n)=>(o[n]=r[n],o),{}):r)}function pt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(r=>pt(e[r],t[r])):!1}function Bn(e,t){if(e===t)return e;let r=Nn(e)&&Nn(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 m=0;m{setTimeout(t,e)})}function Gn(e,t,r){return typeof r.structuralSharing=="function"?r.structuralSharing(e,t):r.structuralSharing!==!1?Bn(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 Nt=Symbol();function yr(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Nt?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var Os=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"}},wr=new Os;var Ws=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}},mt=new Ws;function Kn(){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 Ms(e){return Math.min(1e3*2**e,3e4)}function yo(e){return(e??"online")==="online"?mt.isOnline():!0}var Hn=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function vr(e){return e instanceof Hn}function br(e){let t=!1,r=0,o=!1,n,i=Kn(),s=h=>{o||(f(new Hn(h)),e.abort?.())},a=()=>{t=!0},c=()=>{t=!1},m=()=>wr.isFocused()&&(e.networkMode==="always"||mt.isOnline())&&e.canRun(),d=()=>yo(e.networkMode)&&e.canRun(),l=h=>{o||(o=!0,e.onSuccess?.(h),n?.(),i.resolve(h))},f=h=>{o||(o=!0,e.onError?.(h),n?.(),i.reject(h))},u=()=>new Promise(h=>{n=w=>{(o||m())&&h(w)},e.onPause?.()}).then(()=>{n=void 0,o||e.onContinue?.()}),p=()=>{if(o)return;let h,w=r===0?e.initialPromise:void 0;try{h=w??e.fn()}catch(b){h=Promise.reject(b)}Promise.resolve(h).then(l).catch(b=>{if(o)return;let y=e.retry??(Oe?0:3),S=e.retryDelay??Ms,I=typeof S=="function"?S(r,b):S,$=y===!0||typeof y=="number"&&rm()?void 0:u()).then(()=>{t?f(b):p()})})};return{promise:i,cancel:s,continue:()=>(n?.(),i),cancelRetry:a,continueRetry:c,canStart:d,start:()=>(d()?p():u().then(p),i)}}var Us=e=>setTimeout(e,0);function Fs(){let e=[],t=0,r=a=>{a()},o=a=>{a()},n=Us,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=Fs();var Pr=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Mn(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=Vs(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=Gn(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(te).catch(te):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>Fn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Nt||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||!Un(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=>{vr(a)&&a.silent||this.#i({type:"error",error:a}),vr(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,...Bs(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 vr(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 Bs(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:yo(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Vs(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 Ne{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,r){let o=t.queryKey,n=t.queryHash??Rt(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=>ho(t,r))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(r=>ho(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 $n=class extends Pr{#e;#t;#r;constructor(e){super(),this.mutationId=e.mutationId,this.#t=e.mutationCache,this.#e=[],this.state=e.state||Gs(),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=br({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 Gs(){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 $n({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=>go(t,r))}findAll(e={}){return this.getAll().filter(t=>go(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(te))))}};function Sr(e){return e.options.scope?.id}function wo(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,m=async()=>{let d=!1,l=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(t.signal.aborted?d=!0:t.signal.addEventListener("abort",()=>{d=!0}),t.signal)})},f=yr(t.options,t.fetchOptions),u=async(p,h,w)=>{if(d)return Promise.reject();if(h==null&&p.pages.length)return Promise.resolve(p);let b={client:t.client,queryKey:t.queryKey,pageParam:h,direction:w?"backward":"forward",meta:t.options.meta};l(b);let y=await f(b),{maxPages:S}=t.options,I=w?qn:Qn;return{pages:I(p.pages,y,S),pageParams:I(p.pageParams,h,S)}};if(n&&i.length){let p=n==="backward",h=p?Qs:jn,w={pages:i,pageParams:s},b=h(o,w);a=await u(w,b,p)}else{let p=e??i.length;do{let h=c===0?s[0]??o.initialPageParam:jn(o,a);if(c>0&&h==null)break;a=await u(a,h),c++}while(ct.options.persister?.(m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=m}}}function jn(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 Qs(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}var vo=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=mt.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(mo(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=Wn(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(te).catch(te)}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(te)),n.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(o).then(te)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let r=this.#e.build(this,t);return r.isStaleByTime(mo(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(te).catch(te)}fetchInfiniteQuery(e){return e.behavior=wo(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(te).catch(te)}ensureInfiniteQueryData(e){return e.behavior=wo(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return mt.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(ft(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#n.values()],r={};return t.forEach(o=>{pt(e,o.queryKey)&&Object.assign(r,o.defaultOptions)}),r}setMutationDefaults(e,t){this.#o.set(ft(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#o.values()],r={};return t.forEach(o=>{pt(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=Rt(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===Nt&&(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 Ot=v(E(),1),Xn=v(P(),1),Zn=Ot.createContext(void 0);var bo=({client:e,children:t})=>(Ot.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Xn.jsx)(Zn.Provider,{value:e,children:t}));var Me=v(E(),1);var j=v(E(),1);var Dr=v(E(),1);function ei(){let{workflowAgent:e,socket:t}=A();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,m=`${s}_${a}_${c}`,d=e.data.widgetTableStructure.nodes[o].widgets[n].outputType;qs(m,o,n,i,d)},[e,t])}}function ht(){let{beforeWorkflowRunHooks:e,setBeforeWorkflowRunHooks:t}=A(),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,y)=>{let S=O.getStore(b);if(!S)throw new Error("workflowAgent not found");try{await e?.openWorkflow(S,{workflow_path:y,sdpppID:R.sdpppID,sdpppToken:localStorage.getItem("token")||"",from_sid:D.data.sid,reset:!0})}catch(I){console.error(I)}},[e]),i=(0,j.useCallback)(async b=>{let y=O.getStore(b);if(!y||!y.data.widgetTableStructure.widgetTablePath)throw new Error("workflow not found");if(!y.data.widgetTableStructure.widgetTablePersisted)throw new Error("workflow is not savable");await n(b,y.data.widgetTableStructure.widgetTablePath)},[n]),s=(0,j.useCallback)((b,y=1)=>{e?.pageInstanceRun(b,D.data.sid,y)},[e]),a=(0,j.useCallback)(async b=>{let y=O.getStore(b);if(!y)throw new Error("workflowAgent not found");if(!y.data.widgetTableStructure.widgetTablePath)throw new Error("workflow not found");y.data.widgetTableStructure.widgetTablePath.indexOf("://")===-1&&await e?.saveWorkflow(y,{workflow_path:y.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]),m=(0,j.useCallback)(async b=>{let y=O.getStore(b);if(!y)throw new Error("workflowAgent not found");await e?.logout(y)},[e]),d=(0,j.useCallback)(async(b,y)=>await e?.uploadImage(D.data.sid,{image:b,filename:y,overwrite:!0}),[e]);globalThis.sdppp_action_run=async(b,{workflowPath:y})=>{y?u(y):f()};let l=(0,j.useCallback)(async(b,y=1)=>{!b&&!t||(await r(),await s(b||t,y))},[s,t,r]),f=(0,j.useCallback)(async(b,y=1)=>{await l(b||t,y),Po.action.recordAction?.({name:"sdppp_run",methodName:"sdppp_action_run"},{})},[l]),u=(0,j.useCallback)(async(b,y,S=1)=>{!y&&!t||(await n(y||t,b),l(y||t,S),Po.action.recordAction?.({name:"sdppp_run_"+b,methodName:"sdppp_action_run"},{workflowPath:b}))},[n,f,t]),p=(0,j.useCallback)(async()=>{t&&await e?.interrupt(t)},[e,t]),h=(0,j.useCallback)(async()=>{t&&await e?.clearQueue(t)},[e,t]),w=(0,j.useCallback)(async()=>{if(t)return await e?.reboot(t)},[e,t]);return{openWorkflow:n,reopenWorkflow:i,saveWorkflow:a,runPage:f,runWorkflow:u,callForPSDExtract:c,logout:m,uploadImage:d,interrupt:p,clearQueue:h,reboot:w,setComfyOrgAPIKey:o}}function Cr(){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}=re();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 m=O.getStore(i.value);m&&!m.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 pe=v(E(),1);var oi=v(P(),1),Ks=15e3,ti=(0,pe.createContext)({});function ri({children:e,loginStyle:t,loginBannerTop:r,loginBannerBottom:o}){let[n,i]=(0,pe.useState)(!R.sdpppID),[s,a]=(0,pe.useState)(!1),c=(0,pe.useCallback)(async(f,u="sdppp123456")=>{try{let p=await fetch("https://sdppp.zombee.tech/api/authing/api/v3/signin",{method:"POST",headers:{"x-authing-sdk-version":"web:3.0.0","Content-Type":"application/json","x-sdppp-appid":R.sdpppID},body:JSON.stringify({connection:"PASSWORD",passwordPayload:{username:f,password:u}})}),h=await p.json();if(p.ok){if(h.statusCode===200)return{success:!0,token:h.data.access_token};if(h.statusCode===403)return{success:!1,message:g("Verification Error")}}else return{success:!1,message:JSON.stringify(h)}}catch(p){return{success:!1,message:p.toString()}}return{success:!1,message:"\u767B\u5F55\u5931\u8D25"}},[]),m=(0,pe.useCallback)(async f=>{try{let p=await(await fetch("https://sdppp.zombee.tech/api/authing/api/v3/get-profile",{method:"GET",headers:{Authorization:`Bearer ${f}`,"x-sdppp-appid":R.sdpppID}})).json();return p.statusCode===200?{data:p.data,success:!0}:{message:p.message,success:!1}}catch(u){return{success:!1,message:u}}},[]);async function d(f,u="sdppp123456"){let p=await c(f,u);if(p.success){let h=await m(p.token);h.success&&(localStorage.setItem("token",p.token),localStorage.setItem("lastLogin",new Date(h.data.lastLogin).getTime().toString()),i(!0))}return p}async function l(f){if(!localStorage.getItem("lastLogin"))return!1;let u=await m(f);if(u.success){let p=new Date(u.data.lastLogin).getTime().toString(),h=localStorage.getItem("lastLogin");return p===h}else return!1}return(0,pe.useEffect)(()=>{if(n){if(R.sdpppID){let f=setInterval(()=>{let u=localStorage.getItem("token");u&&l(u).then(p=>{p||i(!1)})},Ks);return()=>{clearInterval(f)}}}else{let f=localStorage.getItem("token");if(!f)return;l(f).then(u=>{u&&i(!0)})}},[n]),(0,oi.jsx)(ti.Provider,{value:{hasAuthingLogin:!!R.sdpppID,loginStyle:t||"none",loginBannerBottom:o||null,loginBannerTop:r||null,isLogin:n,loggedInUsername:n&&localStorage.getItem("last-username")||"",logout:()=>{localStorage.removeItem("token"),i(!1),a(!1)},login:d,setIsTrialing:a,isTrialing:s},children:e})}function me(){let e=(0,pe.useContext)(ti);if(!e)throw new Error("useSDPPPLogin must be used within a SDPPPLoginProvider");return e}var Ue=v(P(),1),ni=(0,gt.createContext)({});function ii({children:e,loginAppID:t,loginStyle:r,loginBannerTop:o,loginBannerBottom:n}){let i=new vo;return(0,Ue.jsx)(bo,{client:i,children:(0,Ue.jsx)(et,{children:(0,Ue.jsx)(sn,{children:(0,Ue.jsx)(ri,{loginAppID:t,loginStyle:r,loginBannerTop:o,loginBannerBottom:n,children:(0,Ue.jsx)(_n,{children:(0,Ue.jsx)(Hs,{children:e})})})})})})}function We(){let e=(0,gt.useContext)(ni);if(!e)throw new Error("SDPPPExternalContext not found");return e}function Hs({children:e}){let t=J(),r=A(),{logout:o,isLogin:n}=me();R.registerTestCase&&(globalThis.sdppp_debugPhotoshopInternalContext=r,globalThis.sdppp_debugPhotoshopWebviewContext=t);let{toggleWebviewDialog:i,webviewAgentSID:s}=t,{autoRunning:a,setAutoRunning:c,workflowAgent:m,setWorkflowAgentSID:d,doConnectOrDisconnect:l,lastErrorMessage:f}=r,{setShouldTriggerLivePainting:u}=Cr();return(0,gt.useEffect)(()=>{let p=()=>{u(!0)};return D.subscribe("/canvasStateID",p),()=>{D.unsubscribe(p)}},[u]),(0,Ue.jsx)(ni.Provider,{value:{logout:o,isLogin:n,connectOrDisconnect:l,lastConnectErrorMessage:f,setAutoRunning:c,autoRunning:a,photoshopSID:D.data.sid,webviewAgentSID:s,workflowAgentSID:m?.data.sid||"",setWorkflowAgentSID:d,toggleWebviewDialog:i},children:e})}var Ir=v(E(),1);var yt=v(E(),1);function he(e,t){let[r,o]=(0,yt.useState)(e?{...e.data}:null),[n,i]=(0,yt.useState)(e?{...e.data}:null),s=Array.isArray(t)?t:[t];return(0,yt.useEffect)(()=>{e&&o({...e.data})},[e]),(0,yt.useEffect)(()=>{if(!e)return;let a=s.map(c=>{let m=()=>{i(r),o(e.data)};return e.subscribe(c,m),m});return()=>{a.forEach(c=>{e.unsubscribe(c)})}},[e,t]),{state:r||null,prevState:n||null}}function Ar(){let[e,t]=(0,Ir.useState)({}),{state:r}=he(D,"/comfyUserToken"),o=r?.comfyUserToken;return(0,Ir.useEffect)(()=>{let n=!1,i=(s,a,c)=>{n||t(m=>{let d={...m};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 ge=v(E(),1);function Ys(e){let{state:t}=he(D,["/comfyUserToken"]),{socket:r,workflowAgentSID:o}=A(),[n,i]=(0,ge.useState)({}),[s,a]=(0,ge.useState)(!1),[c,m]=(0,ge.useState)(null),d=(0,ge.useCallback)(async l=>{if(!l&&!o){i({});return}a(!0);let f=O.getStore(l||o);try{let u=await r?.listWorkflows(f||null,{listMode:R.listMode,sdpppID:R.sdpppID,sdpppToken:localStorage.getItem("token")||""})||{workflows:[],error:"Empty workflow list"};if(u.error){m(new Error(u.error)),a(!1);return}a(!1),m(null),i(u.workflows.reduce((p,h)=>(p[h]={path:h,content:null,error:""},p),{}))}catch(u){a(!1),m(u)}},[r,o]);return(0,ge.useEffect)(()=>{e&&d()},[e]),(0,ge.useEffect)(()=>{t?.comfyUserToken&&d()},[t]),{data:n,isLoading:s,error:c,refetch:d}}function si(){let{backendURL:e,comfyMultiUser:t}=A(),{workflowAgentSID:r}=We(),[o,n]=(0,ge.useState)(!0),[i,s]=(0,ge.useState)(""),{data:a,isLoading:c,error:m,refetch:d}=Ys(e);(0,ge.useEffect)(()=>{if(r)d(),n(!1);else{n(!0);let u=setTimeout(()=>{n(!1)},4e3);return()=>clearTimeout(u)}},[r]);let l=[];if(!c&&!m&&a){let u=[],p=[];Object.keys(a).forEach(h=>{if(h.startsWith(i)){let w=h.slice(i.length).split("://").pop();w&&(w.indexOf("/")==-1?u.push(h):p.push(h.slice(0,h.lastIndexOf("/")+1)))}}),l=[...p.sort((h,w)=>h.localeCompare(w)).map(h=>({path:h,isDir:!0})),...u.map(h=>({path:h,isDir:!1}))].filter((h,w,b)=>b.findIndex(y=>y.path==h.path)===w)}let f="";return m&&(f=m.message),l.length||(f=g("Workflow list is empty, please save a workflow by Comfy's lastest UI")),m&&(f=g("Workflow list loading failed: {0}",m.message)),c&&(f="Loading"),r||(f=g("Workflow Runner is loading...")),{workflows:a,isLoadingWorkflows:c,workflowsError:f,refetchWorkflows:d,afterPropsUpdate4s:o,currentViewingDirectory:i,setCurrentViewingDirectory:s,showingList:l}}function Er(e){let t=e?O.getStore(e):null,{state:r}=he(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 Fe=v(E(),1);var ai={zh:` + + + `,en:` + + + `};var So=ai,ci="sponsorData",$s="https://sdppp.zombee.tech/sponsors/sponsors.html.json",Js=500;function Do(){try{let e=localStorage.getItem(ci);if(e)return JSON.parse(e)}catch(e){console.warn("Failed to parse sponsor data from localStorage:",e)}return null}function js(e){try{localStorage.setItem(ci,JSON.stringify(e))}catch(t){console.warn("Failed to save sponsor data to localStorage:",t)}}function kr(e){try{return!e||typeof e!="object"?(console.warn("Invalid sponsor data: not an object"),!1):typeof e.en!="string"?(console.warn("Invalid sponsor data: en is not a string"),!1):typeof e.zh!="string"?(console.warn("Invalid sponsor data: zh is not a string"),!1):!0}catch(t){return console.warn("Error validating sponsor data:",t),!1}}async function Xs(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 Lr=null;function _r(){let[e,t]=Fe.default.useState(!0);if(!Lr){let s=Do();Lr=new Promise(a=>{let c=!1;Xs($s).then(m=>{!c&&m&&(c=!0,js(m),a(m),t(!1))}),setTimeout(()=>{c||(c=!0,s&&kr(s)?(a(s),t(!1)):(console.warn("Using default data as fallback"),a(So),t(!1)))},Js)})}let[r,o]=Fe.default.useState(()=>{let s=Do();return s&&kr(s)?s:So});Fe.default.useEffect(()=>{Lr&&Lr.then(s=>{o(s)}).catch(s=>{console.error("Error in useSponsor:",s);let a=Do();o(a&&kr(a)?a:So)})},[]);let[n,i]=(0,Fe.useState)(!0);return(0,Fe.useEffect)(()=>{n&&!e&&i(e)},[e]),{data:r,isLoading:n}}var li=v(P(),1);function ui(){let{data:e}=_r(),t=e[Ht()=="zhcn"?"zh":"en"];return(0,li.jsx)("div",{style:{height:"100%",overflow:"auto"},dangerouslySetInnerHTML:{__html:t}})}var be=v(E(),1);var di=v(E(),1),wt=v(P(),1),Wt=class extends di.default.Component{render(){let t=this.props.size||1;return(0,wt.jsx)("div",{slot:"icon",className:"sdppp-icon",onClick:this.props.onClick,children:(0,wt.jsxs)("svg",{width:20*t,height:20*t,viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,wt.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,wt.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 Mt=v(P(),1);function fi(){let{loggedInUsername:e,logout:t}=me();return(0,Mt.jsxs)("div",{className:"login-block",children:[(0,Mt.jsxs)("div",{className:"api-key-title",children:[R.\u63D2\u4EF6\u540D\u5B57," ID: ",e||"\u672A\u767B\u5F55"]}),(0,Mt.jsx)("div",{className:"logout-btn action-button",onClick:()=>{t()},children:e?g("Logout"):g("Login")})]})}var xr=v(E(),1);var xe=v(P(),1);function Tr(e){let{state:t}=he(D,["/comfyUserToken"]),{logout:r}=re(),{workflowAgentSID:o,workflowAgent:n,comfyMultiUser:i}=A(),{resetWebview:s}=J(),[a,c]=(0,xr.useState)(!1);if((0,xr.useEffect)(()=>{if(!n){D.setComfyUserToken("");return}let l=(f,u)=>{let p=t?.comfyUserToken;D.setComfyUserToken(f),p==""&&a&&(s(),c(!1))};return n.subscribe("/comfyUserToken",l),l(n.data.comfyUserToken,""),()=>{n&&n.unsubscribe(l)}},[n,a,s]),!i)return null;if(!R.enableMU&&i)return(0,xe.jsxs)("div",{className:"login-block",children:[(0,xe.jsx)("div",{className:"login-title",children:g("Comfy multi-user: ")}),(0,xe.jsx)("div",{children:g("ComfyUI with --multi-user is only available for sponsors")})]});let m=n&&t?.comfyUserToken,d=t?.comfyUserToken?.split("_")[0]||"";return(0,xe.jsxs)("div",{className:"login-block",children:[(0,xe.jsx)("div",{className:`login-title${m?"":" login-title-secondary"}`,children:g("Comfy multi-user: ")+(m?d:"")}),m?(0,xe.jsx)("div",{className:"logout-btn action-button",onClick:()=>{r(o),c(!1)},children:g("Logout")}):(0,xe.jsx)("div",{className:"logout-btn action-button",onClick:()=>{c(!0),e.onRequestLogin?.()},children:g("Not Login")})]})}var Be=v(P(),1);function Rr(){let{workflowAgent:e}=A(),{state:t}=he(e,["/comfyOrgAPIKey","/comfyOrgLoggedIn"]),{setComfyOrgAPIKey:r}=re();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:g("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(g("Please input API key (will reload Runner)"));o&&r(o)},children:g("Set API Key")})]}):null}var Nr=v(P(),1),Zs=({pageInstance:e})=>{let{autoRunning:t,workflowAgentSID:r,setWorkflowAgentSID:o}=A(),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]})})},pi=Zs;var ye=v(P(),1),mi=()=>{let{workflowAgentSID:e,setWorkflowAgentSID:t,backendURL:r}=A(),{webviewAgentSID:o}=J(),{pageInstances:n}=Ar(),{timeoutError:i}=J();return(0,ye.jsxs)(ye.Fragment,{children:[i?(0,ye.jsx)("div",{className:"client-panel-title",children:g("Webview load timeout, please switch to a different runner")}):(0,ye.jsxs)("div",{className:"client-panel-title",children:[g("Runner")," (",r,")"]}),(0,ye.jsx)("sp-label",{children:g("Open ComfyUI in the browser to see more options")}),(0,ye.jsxs)("div",{className:"agent-list",children:[(0,ye.jsx)("div",{className:`agent-list-item${e==o?" selected":""}`,onClick:()=>t(o),children:(0,ye.jsxs)("span",{children:["\u25CF ",g("PS Webview")]})}),n.map(s=>(0,ye.jsx)(pi,{pageInstance:s},s.sid))]})]})};var Ie=v(P(),1);function hi({onRequestLogin:e}){let{timeoutError:t}=J(),{hasAuthingLogin:r}=me();return(0,Ie.jsxs)("div",{className:"client-panel",children:[(!r||t)&&(0,Ie.jsx)(mi,{}),(0,Ie.jsxs)("div",{className:"app-login-container",children:[(0,Ie.jsx)("div",{className:"client-panel-title",children:g("Login/Auth")}),r&&(0,Ie.jsx)(fi,{}),(0,Ie.jsx)(Tr,{onRequestLogin:e}),(0,Ie.jsx)(Rr,{}),(0,Ie.jsxs)("sp-label",{children:["photoshop id: ",D.data.uname]})]})]})}var q=v(P(),1);function gi(){let{backendURL:e,setBackendURL:t,connectState:r,doConnectOrDisconnect:o}=A(),n=r==="connected"||r==="connecting"?{disabled:!0}:{};(0,be.useEffect)(()=>{e&&r==="disconnected"&&setTimeout(()=>{o()},1e3)},[]);let i=(0,be.useRef)(!1);return(0,be.useEffect)(()=>()=>{i.current=!0},[]),(0,be.useEffect)(()=>()=>{r==="connected"&&i.current&&o()},[r]),(0,q.jsxs)(q.Fragment,{children:[r==="connected"?(0,q.jsx)(ea,{}):(0,q.jsx)("sp-textfield",{id:"url-bar",label:"backendURL",onInput:s=>{t(s.currentTarget.value)},...n,value:e||"",placeholder:gr}),(0,q.jsx)("sp-action-button",{id:"connect-btn",onClick:()=>{o()},children:r!=="disconnected"?"\u2297":"\u2192"})]})}function ea(){let[e,t]=(0,be.useState)(""),[r,o]=(0,be.useState)(""),{workflowAgentSID:n}=We(),{comfyMultiUser:i}=A(),{webviewAgentSID:s,timeoutError:a,loadError:c,toggleWebviewDialog:m}=J(),d=(0,be.useRef)(null),{ssid:l,lastError:f,progress:u,executingNodeTitle:p,queueSize:h}=Er(n),{loggedInUsername:w,hasAuthingLogin:b,isLogin:y}=me(),S=n&&h?`(${h})`:"";(0,be.useEffect)(()=>{n?n&&(p?t(`(${u}% - ${p}...)`):(t(""),o(""))):i&&!D.data.comfyUserToken?t(g("--multi-user Not Login!")):(a||c)&&o(g("Error: {0}",c||g("timeout")))},[n,f,u,p,a,c,i]);let I="";return s==n?I=g("PS Webview"):n&&l?I=g("Browser {0}",l):I=g("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:$=>{$.stopPropagation()},children:(0,q.jsx)(hi,{onRequestLogin:async()=>{d.current?.close(),await new Promise($=>setTimeout($,300)),m()}})}),(0,q.jsxs)("div",{className:"connect-config-content",children:[b?(0,q.jsxs)("span",{children:["\u7528\u6237\u540D\uFF1A",y?w:"\u672A\u767B\u5F55"]}):(0,q.jsxs)("span",{children:["\u23F5 ",g("Runner"),": ",I," ",S]}),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)(Wt,{size:.8})}),u?(0,q.jsx)("div",{className:"connect-config-progress",style:{width:`${u}%`}}):""]})}var vi=v(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:No(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=v(E(),1);var yi=v(E(),1);function Pe(e){return e=e||12,{flex:`${e} 0 calc(${e/12*100}% - 10px)`,maxWidth:"100%"}}var vt=class extends wi.Component{computeUIWeightCSS(t){return Pe(t)}};var tt=v(P(),1),Ge=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,tt.jsxs)("div",{style:{display:"flex",alignItems:"center",...this.computeUIWeightCSS(this.props.uiWeight)},children:[o&&(0,tt.jsx)("sp-label",{style:{flex:1},children:o}),(0,tt.jsx)("sp-picker",{class:"sdppp-dropdown-widget",size:"s",style:this.props.name?{flex:2}:{width:"100%"},children:(0,tt.jsx)("sp-menu",{slot:"options",children:t.map((n,i)=>this.state.filter&&!n.includes(this.state.filter)?"":(0,tt.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=v(P(),1),Wr=class e extends vi.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)(Ge,{uiWeight:this.props.uiWeight,options:this.state.options,onSelectUpdate:(r,o)=>{this.props.onSelectUpdate(D.data.uname+"/"+r,o)},value:t})}};var Si=v(E(),1);var Pi=v(P(),1);function we(e){return(0,Pi.jsx)("a",{onClick:e.onClick,children:e.label})}var Te=v(P(),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=g(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)(Ge,{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:[g("Quick Set"),":"]}),(0,Te.jsx)(we,{onClick:async()=>{let r=$e();this.props.onSelectUpdate(r,this.state.options.indexOf(r))},label:g("Selected Layer")}),(0,Te.jsx)(we,{onClick:async()=>{this.props.onSelectUpdate(C.get_SPECIAL_LAYER_USE_CANVAS(),this.state.options.indexOf(C.get_SPECIAL_LAYER_USE_CANVAS()))},label:g("Canvas")})]})]})}};var Bt=v(kt(),1),bt=N("photoshop"),ue=v(E(),1);var Co=v(kt(),1),Mr=N("photoshop"),ce=v(E(),1);var Ut=v(P(),1);function Ft({mode:e,setMode:t}){let r=o=>{t(o)};return(0,Ut.jsxs)("div",{className:"widget-mode-selection",children:[(0,Ut.jsx)("button",{className:`widget-mode-selection-button ${e==="manual"?"selected":""}`,onClick:()=>r("manual"),children:g("Manual")}),(0,Ut.jsx)("button",{className:`widget-mode-selection-button ${e==="auto"?"selected":""}`,onClick:()=>r("auto"),children:g("Auto")})]})}var ae=v(P(),1);function Di(e){let[t,r]=(0,ce.useState)(""),[o,n]=(0,ce.useState)(""),[i,s]=(0,ce.useState)("manual"),[a,c]=(0,ce.useState)(!1),[m,d]=(0,ce.useState)(null),{backendURL:l}=A(),{uploadImage:f}=re(),{addBeforeWorkflowRunHook:u}=ht(),p=(0,ce.useRef)(null),h=(0,ce.useCallback)(async()=>{if(i==="manual"&&!a&&m){await e.onValueChange(m);return}try{if(i==="auto"&&await b(t),p.current){let y=await p.current.getBuffer(Co.JimpMime.jpeg),S=await f(y,St(6)+".jpeg");S?.name&&(d(S.subfolder+"/"+S.name),c(!1),await e.onValueChange(S.subfolder+"/"+S.name))}}catch(y){console.error(y)}},[i,a,m,e.onValueChange]);(0,ce.useEffect)(()=>{let S=u(h);return()=>{S()}},[h]);let w=o;if(!w&&(m||e.value)){let y=m||e.value,S=y.split("/").slice(0,-1).join("/");w=l+(l.endsWith("/")?"":"/")+`api/view?filename=${y}&type=input&subfolder=${S}&rand=`+Math.random()}let b=(0,ce.useCallback)(async y=>{let S=await Io(y);if(!S)return;p.current=S;let I=await ta(S);r(y),n(I),c(!0)},[]);return(0,ae.jsxs)("div",{className:"image-widget",children:[(0,ae.jsx)("div",{className:"image-widget-left",children:(0,ae.jsx)("img",{src:w,className:"image-widget-image"+(w?"":" image-widget-image-empty")})}),(0,ae.jsxs)("div",{className:"image-widget-right",children:[(0,ae.jsx)(Ft,{mode:i,setMode:s}),i==="manual"&&(0,ae.jsxs)("div",{className:"image-widget-more-quickset",children:[(0,ae.jsx)("sp-label",{children:g("Set As:")}),(0,ae.jsx)(we,{onClick:()=>{b($e())},label:g("Selected Layer")}),(0,ae.jsx)(we,{onClick:()=>{b(C.get_SPECIAL_LAYER_USE_CANVAS())},label:g("Canvas")})]}),i=="auto"&&(0,ae.jsx)("div",{className:"image-widget-layer-widget-container",children:(0,ae.jsx)(Qe,{onSelectUpdate:b,uiWeight:10,value:t})})]})]})}async function Io(e){if(!Mr.app.activeDocument)return null;try{return await lr.getJimpImage({document_identify:Ae(Mr.app.activeDocument.id,Mr.app.activeDocument.name),layer_identify:e})}catch(t){throw console.error(t),t}}async function ta(e){let t=100/Math.max(e.width,e.height);return e=e.clone(),e.scale(t),await e.getBase64(Co.JimpMime.jpeg)}var X=v(P(),1);function Ii(e){let[t,r]=(0,ue.useState)(""),[o,n]=(0,ue.useState)(""),[i,s]=(0,ue.useState)("manual"),[a,c]=(0,ue.useState)(!1),[m,d]=(0,ue.useState)(null),{backendURL:l}=A(),{uploadImage:f}=re(),{addBeforeWorkflowRunHook:u}=ht(),p=(0,ue.useRef)(null),h=(0,ue.useCallback)(async()=>{if(i==="manual"&&!a&&m){await e.onValueChange(m);return}try{if(i==="auto"&&await b(t),p.current){let y=await p.current.getBuffer(Bt.JimpMime.png),S=await f(y,St(6)+".png");S?.name&&(d(S.subfolder+"/"+S.name),c(!1),await e.onValueChange(S.subfolder+"/"+S.name))}}catch(y){console.error(y)}},[i,a,m,e.onValueChange]);(0,ue.useEffect)(()=>{let y=u(h);return()=>{y()}},[h]);let w=o;if(!w&&(m||e.value)){let y=m||e.value,S=y.split("/").slice(0,-1).join("/");w=l+(l.endsWith("/")?"":"/")+`api/view?filename=${y}&type=input&subfolder=${S}&rand=`+Math.random()}let b=(0,ue.useCallback)(async(y,S=!1)=>{let I=await Io(y);if(!I)return;S&&I.scan(0,0,I.bitmap.width,I.bitmap.height,function(ve,oe,k){I.bitmap.data[k+3]=255-I.bitmap.data[k+3]}),p.current=I;let $=await Ci(I);r(y),n($),c(!0)},[]);return(0,X.jsxs)("div",{className:"image-widget",children:[(0,X.jsx)("div",{className:"image-widget-left",children:(0,X.jsx)("img",{src:w,className:"image-widget-image"+(w?"":" image-widget-image-empty")})}),(0,X.jsxs)("div",{className:"image-widget-right",children:[(0,X.jsx)(Ft,{mode:i,setMode:y=>{s(y)}}),i==="manual"&&(0,X.jsxs)("div",{className:"image-widget-more-quickset",children:[(0,X.jsx)("sp-label",{children:g("Set As:")}),(0,X.jsx)(we,{onClick:()=>{b($e(),!1)},label:g("Selected Layer")}),(0,X.jsx)(we,{onClick:async()=>{b($e(),!0)},label:g("Selected Layer (invert)")}),(0,X.jsx)(we,{onClick:()=>{b(C.get_SPECIAL_LAYER_USE_CANVAS())},label:g("Canvas")}),(0,X.jsx)(we,{onClick:async()=>{let y=await ra();if(!y)return;p.current=y;let S=await Ci(y);r(""),n(S),c(!0)},label:g("Selection")})]}),i==="auto"&&(0,X.jsx)("div",{className:"image-widget-layer-widget-container",children:(0,X.jsx)(Qe,{onSelectUpdate:y=>{b(y,!1)},uiWeight:12,value:t})})]})]})}async function ra(){if(!bt.app.activeDocument)return null;try{let e=await Tt({document_identify:Ae(bt.app.activeDocument.id,bt.app.activeDocument.name),boundary:{left:0,top:0,right:0,bottom:0,width:bt.app.activeDocument.width,height:bt.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(f=>{let u=e.nodes[f],p=(y,S,I)=>y.keepRender?S.outputType==="error"?(y.result.push((0,z.jsx)("span",{className:"list-error-label",children:t[u.id][I]})),y):(o?.(y,u,S,I),y):y,h=Object.values(e.groups).find(y=>y.nodeIDs.includes(u.id)),w=h?.color||"rgba(127, 127, 127, .4)";if(s&&h?.id!==s)return null;let b=u.uiWeightSum<=8&&u.widgets.length==1&&(u.widgets[0].outputType!=="number"||!e.extraOptions?.useSliderForNumberWidget);return(0,z.jsxs)("div",{className:"workflow-edit-field",children:[(0,z.jsx)("div",{className:"workflow-edit-field-title",title:u.title,style:{...Pe(b?4:12),borderColor:w},children:i?i(u.title,u):(0,z.jsx)("span",{children:u.title})}),u.widgets.reduce(p,{keepRender:!0,result:[]}).result.map((y,S)=>(0,z.jsx)(Ao,{children:y},S)),r[u.id]?(0,z.jsx)("span",{className:"list-error-label",children:r[u.id]}):""]},u.id)}).filter(Boolean),[e,t,r,o,n,i,s]),[m,d]=(0,rt.useMemo)(()=>[Object.keys(r).filter(f=>e.nodes[parseInt(f)]),Object.keys(r).filter(f=>!e.nodes[parseInt(f)])],[r,e]),l=null;return d.length>0?l=(0,z.jsx)("span",{className:"list-error-label",children:r[+d[0]]}):m.length>0&&(l=(0,z.jsx)("span",{className:"list-error-label",children:r[+m[0]]})),(0,z.jsxs)(z.Fragment,{children:[l,Object.keys(e.nodes).length?"":(0,z.jsx)("span",{className:"list-error-label",children:g("no suitable node to control in this workflow")}),(0,z.jsx)("div",{className:"workflow-edit-content",children:c})]})}var Ao=class extends rt.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,z.jsx)("span",{className:"list-error-label",children:this.state.error?.stack||this.state.error?.message||this.state.error?.toString()}):this.props.children}};var Ke=v(E(),1);var qe=v(P(),1),Ai=e=>{let{inputMin:t,inputMax:r,inputStep:o,value:n=0,onValueChange:i,name:s,uiWeight:a,extraOptions:c}=e,[m,d]=(0,Ke.useState)(+n.toFixed(3));(0,Ke.useEffect)(()=>{d(+n.toFixed(3))},[n]);let l=(0,Ke.useCallback)(h=>{let w=+h.target.value;d(+w.toFixed(3))},[]),f=(0,Ke.useCallback)(()=>{i(m)},[m,i]),u=(0,Ke.useCallback)(h=>{let w=+h.target.value;d(+w.toFixed(3)),i(+w.toFixed(3))},[m,i]);return!((r-t)/o>1e3)&&a&&a>=1&&c?.useSliderForNumberWidget?(0,qe.jsxs)("div",{style:{...Pe(a),display:"flex",alignItems:"center"},children:[(0,qe.jsx)("sp-slider",{style:{width:"60%"},min:t,max:r,step:o,value:m,onInput:u,"show-value":"false",class:"sdppp-slider"}),(0,qe.jsx)("sp-textfield",{style:{width:"40%"},onInput:l,onBlur:f,value:m})]}):(0,qe.jsxs)("div",{style:{...Pe(a),display:"flex",alignItems:"center"},children:[s&&(0,qe.jsx)("sp-label",{style:{flex:"1"},children:s}),(0,qe.jsx)("sp-textfield",{style:s?{flex:"2"}:{width:"100%"},onInput:l,onBlur:f,value:m})]})};var Y=v(E(),1);var Pt=v(P(),1);function Ei(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 m=t.current.offsetHeight;m!==r&&o(m)}},16);return()=>clearInterval(c)},[r]),(0,Pt.jsxs)("div",{className:"widget-container",style:{...Pe(e.uiWeight),position:"relative",height:Math.max(55,r)},children:[(0,Pt.jsx)(oa,{textAreaValue:n,setTextAreaValue:i,editing:s,setEditing:a,onValueChange:e.onValueChange,hiddenDivHeight:r}),(0,Pt.jsx)("p",{ref:t,style:{fontSize:14,visibility:"hidden",whiteSpace:"pre-line",width:"100%"},children:n})]})}function oa({textAreaValue:e,onValueChange:t,editing:r,setEditing:o,setTextAreaValue:n,hiddenDivHeight:i}){let[s,a]=(0,Y.useState)(0),c=(0,Y.useCallback)(u=>{let p=u.target.value;t(p),n(p)},[t,n]),m=(0,Y.useCallback)(()=>{o(!0)},[o]),d=(0,Y.useCallback)(()=>{let u={textfieldRerender:s,editing:!1};s==2&&(u.textfieldRerender=1),a(u.textfieldRerender),o(u.editing)},[s,a,o]),[l,f]=(0,Y.useState)(i);return(0,Y.useEffect)(()=>{i!=l&&(a(r?2:1),f(i))},[i]),(0,Y.useEffect)(()=>{s==1&&Promise.resolve().then(async()=>{await new Promise(requestAnimationFrame),a(0)})},[s]),s==1?"":(0,Pt.jsx)("sp-textarea",{style:{position:"absolute",height:"100%",width:"100%",top:0,left:0},value:e,onInput:c,onFocus:m,onBlur:d})}var Lo=v(P(),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 R.checkboxStyle==="div"?(0,Lo.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,Lo.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 Li(e){return e.replace(/^workflows\//,"").replace(/\.json$/,"").split("://").pop()}var Z=v(P(),1);function ki(){let{callForPSDExtract:e}=re(),{workflowAgent:t}=A(),{setWidgetValue:r}=ei(),{setShouldTriggerLivePainting:o}=Cr(),{state:n}=he(t,["/widgetTableValue","/widgetTableStructure","/widgetTableErrors"]),i=!!t?.data.hasPSDNodes,s=(0,ko.useCallback)(async(l,f,u,p)=>{await r(l,f,u),o(!0)},[r,o]),a=n?.widgetTableStructure,c=n?.widgetTableValue,m=n?.widgetTableErrors,d=(0,ko.useCallback)((l,f,u,p)=>{if(u.outputType=="PS_DOCUMENT")return l.result.push((0,Z.jsx)(Wr,{uiWeight:u.uiWeight||12,value:c?.[f.id]?.[p]||"",onSelectUpdate:h=>{s(f.id,p,h,f)},extraOptions:a?.extraOptions},p)),!0;if(u.outputType=="PS_LAYER"){let h=u.options?.documentNodeID||0,w=c?.[h]?.[0]||"";return l.result.push((0,Z.jsx)(Qe,{uiWeight:u.uiWeight||12,value:c?.[f.id]?.[p]||"",documentValue:w?w.split("/").pop():"",onSelectUpdate:b=>{s(f.id,p,b,f)},extraOptions:a?.extraOptions},p)),!0}else{if(u.outputType=="IMAGE_PATH")return l.result.push((0,Z.jsx)(Di,{uiWeight:u.uiWeight||12,value:c?.[f.id]?.[p]||"",onValueChange:async h=>{await s(f.id,p,h,f)},extraOptions:a?.extraOptions},p)),!0;if(u.outputType=="MASK_PATH")return l.result.push((0,Z.jsx)(Ii,{uiWeight:u.uiWeight||12,value:c?.[f.id]?.[p]||"",onValueChange:async h=>{await s(f.id,p,h,f)},extraOptions:a?.extraOptions},p)),!0;if(u.outputType==="number"){let h=u.options?.min??0,w=u.options?.max??100,b=u.options?.step??1;l.result.push((0,Z.jsx)(Ai,{uiWeight:u.uiWeight||12,name:u.name,inputMin:h,inputMax:w,inputStep:b,value:parseFloat(c?.[f.id]?.[p]||"0"),onValueChange:y=>{s(f.id,p,y,f)},extraOptions:a?.extraOptions},p))}else if(u.outputType==="combo")l.result.push((0,Z.jsx)(Ge,{uiWeight:u.uiWeight||12,name:u.name,options:u.options?.values||[],onSelectUpdate:h=>{s(f.id,p,h,f)},value:c?.[f.id]?.[p]||"",extraOptions:a?.extraOptions},p));else if(u.outputType==="toggle")l.result.push((0,Z.jsx)(Ur,{uiWeight:u.uiWeight||12,name:u.name,value:c?.[f.id]?.[p]||"",onValueChange:h=>{s(f.id,p,h,f)},extraOptions:a?.extraOptions},p));else{let h=c?.[f.id]?.[p]||"";l.result.push((0,Z.jsx)(Ei,{uiWeight:u.uiWeight||12,value:typeof h=="string"?h:JSON.stringify(h),onValueChange:w=>{s(f.id,p,w,f)},extraOptions:a?.extraOptions},p))}}return!1},[r,c]);return a?(0,Z.jsxs)("div",{className:"workflow-edit",children:[(0,Z.jsxs)("div",{className:"workflow-edit-title",children:[a.widgetTablePath&&(0,Z.jsx)("sp-label",{style:{fontWeight:"bold"},children:Li(a.widgetTablePath)}),i?(0,Z.jsx)("a",{onClick:()=>{e(t?.data.sid||"").catch(l=>{alert(l.message)})},children:">"+g("sample .psd")}):""]}),(0,Z.jsx)(Eo,{widgetTableStructure:a,widgetTableValue:c||{},widgetTableErrors:m||{},onWidgetChange:s,onWidgetRender:d})]}):null}var Fr=v(E(),1);var G=v(P(),1);function _i(){let{login:e,loginStyle:t,loginBannerTop:r,loginBannerBottom:o,setIsTrialing:n}=me(),[i,s]=(0,Fr.useState)(localStorage.getItem("last-username")||""),[a,c]=(0,Fr.useState)(""),[m,d]=(0,Fr.useState)("");return(0,G.jsxs)("div",{className:"login-container",children:[r,(0,G.jsx)("div",{className:"login-container-login",children:(0,G.jsxs)("div",{className:"login-form",children:[t==="invitation"?(0,G.jsxs)("div",{className:"login-form-item",children:[(0,G.jsx)("label",{htmlFor:"username",children:g("Invitation Code")}),(0,G.jsx)("sp-textfield",{type:"text",id:"username",placeholder:g("Please input invitation code"),value:i,onInput:l=>s(l.target.value)})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsxs)("div",{className:"login-form-item",children:[(0,G.jsx)("label",{htmlFor:"username",children:g("Username")}),(0,G.jsx)("sp-textfield",{type:"text",id:"username",placeholder:g("Please input username"),value:i,onInput:l=>s(l.target.value)})]}),(0,G.jsxs)("div",{className:"login-form-item",children:[(0,G.jsx)("label",{htmlFor:"password",children:g("Password")}),(0,G.jsx)("sp-textfield",{type:"password",id:"password",placeholder:g("Please input password"),value:a,onInput:l=>c(l.target.value)})]})]}),(0,G.jsx)("div",{className:"login-error-message",children:m}),(0,G.jsx)("button",{className:"login-button",onClick:async()=>{let l=await e(i,a);l.success?(d(""),localStorage.setItem("last-username",i)):d(l.message)},children:g("Login")}),t==="trialable-password"&&(0,G.jsx)("a",{className:"trial-button",onClick:()=>n(!0),children:"\u6E38\u5BA2\u8BD5\u7528"})]})}),o]})}var He=v(P(),1);function xi({renderContent:e}){let{connectState:t}=A(),{isLogin:r,isTrialing:o}=me();return(0,He.jsxs)("div",{className:"sdppp-container",style:t!=="connected"?{height:"100vh"}:{},children:[(0,He.jsx)(et,{children:r||o?e(t,gi,ki):(0,He.jsx)(_i,{})}),t!="connected"&&(0,He.jsx)(ui,{}),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 Ti=v(E(),1);var ot=v(P(),1);function Ri(){let e=A(),{toggleWebviewDialog:t}=J(),r=(0,Ti.useCallback)(()=>{t()},[t]);return(0,ot.jsx)("div",{className:"auths-bar",children:(0,ot.jsx)("div",{className:"identifier-bar",children:(0,ot.jsxs)("div",{className:"identifier-bar-left",children:[(0,ot.jsx)(Rr,{}),e.comfyMultiUser&&(0,ot.jsx)(Tr,{onRequestLogin:r})]})})})}var Vt=v(E(),1),Ni=v(E(),1),Oi=N("uxp"),_o=v(P(),1),na={en:[],zhcn:[{name:"\u6668\u7FBD\u667A\u4E91",url:"https://www.chenyu.cn/console/login?invitationCode=BUD913",icon:"https://sdppp.zombee.tech/img/icons/chenyu.ico",color:"var(--uxp-host-text-color-secondary)"},{name:"\u4ED9\u5BAB\u4E91",url:"https://www.xiangongyun.com/register/NWF5AH",icon:"https://sdppp.zombee.tech/img/icons/xgc.ico",color:"var(--uxp-host-text-color-secondary)"},{name:"Cephalon",url:"https://cephalon.cloud/share/register-landing?invite_id=m95SDj",icon:"https://sdppp.zombee.tech/img/icons/cephalon.ico",color:"var(--uxp-host-text-color-secondary)"}]};function Wi(){let e=document.getElementById("color_computer")?.style.color||"#777",{data:t,isLoading:r}=_r(),o=(0,Vt.useRef)(null),[n,i]=(0,Vt.useState)(!1),[s,a]=(0,Vt.useState)(!1);if((0,Ni.useEffect)(()=>{o.current&&(r||s||(a(!0),o.current.addEventListener("loadstop",d=>{d.target.postMessage({action:"init",payload:{color:e,cloud:m}})}),o.current.addEventListener("loaderror",d=>{i(!0)}),o.current.addEventListener("message",d=>{let l=d.message;if(!l)return;let f=JSON.parse(l);f.action==="open"&&Oi.shell.openExternal(f.payload.url)})))},[o,r]),r||n)return(0,_o.jsx)("div",{style:{height:"8px"}});let c="./promote.html?color="+e,m=na[Ht()=="zhcn"?"zhcn":"en"];return m.length==0?null:(0,_o.jsx)("webview",{ref:o,className:"promote-webview",style:{width:"100%",height:"24px"},src:c})}Object.assign(globalThis,{SDPPPInternal:xo});})(); /*! Bundled license information: fast-json-patch/module/helpers.mjs: diff --git a/plugins/photoshop/manifest.json b/plugins/photoshop/manifest.json index c5ffad9..8e924af 100644 --- a/plugins/photoshop/manifest.json +++ b/plugins/photoshop/manifest.json @@ -1,7 +1,7 @@ { "id": "sd-ppp", "name": "SD-PPP", - "version": "1.9.0", + "version": "1.9.3", "main": "index.html", "manifestVersion": 5, "host": { @@ -38,7 +38,7 @@ "type": "panel", "id": "sdppp-connect", "label": { - "default": "SD-PPP 1.9.0" + "default": "SD-PPP 1.9.3" }, "minimumSize": { "width": 300, diff --git a/pyproject.toml b/pyproject.toml index 4bfda39..154601b 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.9.2" +version = "1.9.3" license = { file = "LICENSE" } [project.urls] diff --git a/sponsors.html.json b/sponsors.html.json index 018298b..842b807 100644 --- a/sponsors.html.json +++ b/sponsors.html.json @@ -1,4 +1,4 @@ { - "zh": "\n \n
\n \n \n

赞助者

\n \n \n

友情链接

\n \n \n

SD-PPP 社区

\n
\n \n Github\n \n QQ频道\n \n Bilibili\n \n
\n \n \n

\n >> SD-PPP 官方站\n

\n \n
\n ", - "en": "\n \n
\n \n \n

Sponsors

\n \n \n

Links

\n \n \n

SD-PPP Community

\n
\n \n Github\n \n Discord\n \n Youtube\n \n
\n \n \n

\n Github\n

\n \n
\n " + "zh": "\n \n
\n \n \n

赞助者

\n \n \n

友情链接

\n \n \n

SD-PPP 社区

\n
\n \n Github\n \n QQ频道\n \n Bilibili\n \n
\n \n \n

\n >> SD-PPP 官方站\n

\n \n
\n ", + "en": "\n \n
\n \n \n

Sponsors

\n \n \n

Links

\n \n \n

SD-PPP Community

\n
\n \n Github\n \n Discord\n \n Youtube\n \n
\n \n \n

\n Github\n

\n \n
\n " } \ No newline at end of file diff --git a/static/sd-ppp_PS.ccx b/static/sd-ppp_PS.ccx index bc862ad..9a545e4 100644 Binary files a/static/sd-ppp_PS.ccx and b/static/sd-ppp_PS.ccx differ