@chamn/engine 0.0.26 → 0.0.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";var Hy=Object.defineProperty;var Uy=(e,t,n)=>t in e?Hy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var L=(e,t,n)=>(Uy(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react"),Yt=require("react-dom"),Y=require("antd"),ye=require("@chamn/model"),Xn=require("@chamn/layout");function Wp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const W=Wp(g),Wy=Wp(Yt);var So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hs={exports:{}},fo={};/**
1
+ "use strict";var Gy=Object.defineProperty;var Ky=(e,t,n)=>t in e?Gy(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var B=(e,t,n)=>(Ky(e,typeof t!="symbol"?t+"":t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react"),Lt=require("react-dom"),Y=require("antd"),be=require("@chamn/model"),Xn=require("@chamn/layout");function qp(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const U=qp(h),qy=qp(Lt);var So=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Yl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Hs={exports:{}},fo={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var wu;function Gy(){if(wu)return fo;wu=1;var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,c){var u,d={},f=null,p=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!a.hasOwnProperty(u)&&(d[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:s,key:f,ref:p,props:d,_owner:o.current}}return fo.Fragment=n,fo.jsx=i,fo.jsxs=i,fo}var po={};/**
9
+ */var Su;function Yy(){if(Su)return fo;Su=1;var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function i(s,l,c){var u,d={},f=null,p=null;c!==void 0&&(f=""+c),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(p=l.ref);for(u in l)r.call(l,u)&&!a.hasOwnProperty(u)&&(d[u]=l[u]);if(s&&s.defaultProps)for(u in l=s.defaultProps,l)d[u]===void 0&&(d[u]=l[u]);return{$$typeof:t,type:s,key:f,ref:p,props:d,_owner:o.current}}return fo.Fragment=n,fo.jsx=i,fo.jsxs=i,fo}var po={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,22 +14,22 @@
14
14
  *
15
15
  * This source code is licensed under the MIT license found in the
16
16
  * LICENSE file in the root directory of this source tree.
17
- */var Su;function Ky(){return Su||(Su=1,"{}".NODE_ENV!=="production"&&function(){var e=g,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),h=Symbol.iterator,m="@@iterator";function b(_){if(_===null||typeof _!="object")return null;var $=h&&_[h]||_[m];return typeof $=="function"?$:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(_){{for(var $=arguments.length,F=new Array($>1?$-1:0),Z=1;Z<$;Z++)F[Z-1]=arguments[Z];E("error",_,F)}}function E(_,$,F){{var Z=y.ReactDebugCurrentFrame,fe=Z.getStackAddendum();fe!==""&&($+="%s",F=F.concat([fe]));var me=F.map(function(ce){return String(ce)});me.unshift("Warning: "+$),Function.prototype.apply.call(console[_],console,me)}}var x=!1,v=!1,O=!1,C=!1,R=!1,N;N=Symbol.for("react.module.reference");function T(_){return!!(typeof _=="string"||typeof _=="function"||_===r||_===a||R||_===o||_===c||_===u||C||_===p||x||v||O||typeof _=="object"&&_!==null&&(_.$$typeof===f||_.$$typeof===d||_.$$typeof===i||_.$$typeof===s||_.$$typeof===l||_.$$typeof===N||_.getModuleId!==void 0))}function k(_,$,F){var Z=_.displayName;if(Z)return Z;var fe=$.displayName||$.name||"";return fe!==""?F+"("+fe+")":F}function j(_){return _.displayName||"Context"}function I(_){if(_==null)return null;if(typeof _.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof _=="object")switch(_.$$typeof){case s:var $=_;return j($)+".Consumer";case i:var F=_;return j(F._context)+".Provider";case l:return k(_,_.render,"ForwardRef");case d:var Z=_.displayName||null;return Z!==null?Z:I(_.type)||"Memo";case f:{var fe=_,me=fe._payload,ce=fe._init;try{return I(ce(me))}catch{return null}}}return null}var M=Object.assign,P=0,D,V,ne,ee,de,A,B;function q(){}q.__reactDisabledLog=!0;function Q(){{if(P===0){D=console.log,V=console.info,ne=console.warn,ee=console.error,de=console.group,A=console.groupCollapsed,B=console.groupEnd;var _={configurable:!0,enumerable:!0,value:q,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}P++}}function ie(){{if(P--,P===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},_,{value:D}),info:M({},_,{value:V}),warn:M({},_,{value:ne}),error:M({},_,{value:ee}),group:M({},_,{value:de}),groupCollapsed:M({},_,{value:A}),groupEnd:M({},_,{value:B})})}P<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var le=y.ReactCurrentDispatcher,Qe;function De(_,$,F){{if(Qe===void 0)try{throw Error()}catch(fe){var Z=fe.stack.trim().match(/\n( *(at )?)/);Qe=Z&&Z[1]||""}return`
18
- `+Qe+_}}var ze=!1,re;{var je=typeof WeakMap=="function"?WeakMap:Map;re=new je}function z(_,$){if(!_||ze)return"";{var F=re.get(_);if(F!==void 0)return F}var Z;ze=!0;var fe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var me;me=le.current,le.current=null,Q();try{if($){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(cn){Z=cn}Reflect.construct(_,[],ce)}else{try{ce.call()}catch(cn){Z=cn}_.call(ce.prototype)}}else{try{throw Error()}catch(cn){Z=cn}_()}}catch(cn){if(cn&&Z&&typeof cn.stack=="string"){for(var se=cn.stack.split(`
19
- `),ot=Z.stack.split(`
20
- `),Ie=se.length-1,Fe=ot.length-1;Ie>=1&&Fe>=0&&se[Ie]!==ot[Fe];)Fe--;for(;Ie>=1&&Fe>=0;Ie--,Fe--)if(se[Ie]!==ot[Fe]){if(Ie!==1||Fe!==1)do if(Ie--,Fe--,Fe<0||se[Ie]!==ot[Fe]){var Rt=`
21
- `+se[Ie].replace(" at new "," at ");return _.displayName&&Rt.includes("<anonymous>")&&(Rt=Rt.replace("<anonymous>",_.displayName)),typeof _=="function"&&re.set(_,Rt),Rt}while(Ie>=1&&Fe>=0);break}}}finally{ze=!1,le.current=me,ie(),Error.prepareStackTrace=fe}var ur=_?_.displayName||_.name:"",bu=ur?De(ur):"";return typeof _=="function"&&re.set(_,bu),bu}function Ye(_,$,F){return z(_,!1)}function $e(_){var $=_.prototype;return!!($&&$.isReactComponent)}function Me(_,$,F){if(_==null)return"";if(typeof _=="function")return z(_,$e(_));if(typeof _=="string")return De(_);switch(_){case c:return De("Suspense");case u:return De("SuspenseList")}if(typeof _=="object")switch(_.$$typeof){case l:return Ye(_.render);case d:return Me(_.type,$,F);case f:{var Z=_,fe=Z._payload,me=Z._init;try{return Me(me(fe),$,F)}catch{}}}return""}var vt=Object.prototype.hasOwnProperty,an={},sn=y.ReactDebugCurrentFrame;function Te(_){if(_){var $=_._owner,F=Me(_.type,_._source,$?$.type:null);sn.setExtraStackFrame(F)}else sn.setExtraStackFrame(null)}function ve(_,$,F,Z,fe){{var me=Function.call.bind(vt);for(var ce in _)if(me(_,ce)){var se=void 0;try{if(typeof _[ce]!="function"){var ot=Error((Z||"React class")+": "+F+" type `"+ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ot.name="Invariant Violation",ot}se=_[ce]($,ce,Z,F,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Ie){se=Ie}se&&!(se instanceof Error)&&(Te(fe),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",Z||"React class",F,ce,typeof se),Te(null)),se instanceof Error&&!(se.message in an)&&(an[se.message]=!0,Te(fe),S("Failed %s type: %s",F,se.message),Te(null))}}}var Pe=Array.isArray;function We(_){return Pe(_)}function Gt(_){{var $=typeof Symbol=="function"&&Symbol.toStringTag,F=$&&_[Symbol.toStringTag]||_.constructor.name||"Object";return F}}function ua(_){try{return da(_),!1}catch{return!0}}function da(_){return""+_}function fa(_){if(ua(_))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Gt(_)),da(_)}var Ot=y.ReactCurrentOwner,xn={key:!0,ref:!0,__self:!0,__source:!0},Cn,co,Et;Et={};function pa(_){if(vt.call(_,"ref")){var $=Object.getOwnPropertyDescriptor(_,"ref").get;if($&&$.isReactWarning)return!1}return _.ref!==void 0}function qi(_){if(vt.call(_,"key")){var $=Object.getOwnPropertyDescriptor(_,"key").get;if($&&$.isReactWarning)return!1}return _.key!==void 0}function Yi(_,$){if(typeof _.ref=="string"&&Ot.current&&$&&Ot.current.stateNode!==$){var F=I(Ot.current.type);Et[F]||(S('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',I(Ot.current.type),_.ref),Et[F]=!0)}}function ha(_,$){{var F=function(){Cn||(Cn=!0,S("%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)",$))};F.isReactWarning=!0,Object.defineProperty(_,"key",{get:F,configurable:!0})}}function Xi(_,$){{var F=function(){co||(co=!0,S("%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)",$))};F.isReactWarning=!0,Object.defineProperty(_,"ref",{get:F,configurable:!0})}}var ga=function(_,$,F,Z,fe,me,ce){var se={$$typeof:t,type:_,key:$,ref:F,props:ce,_owner:me};return se._store={},Object.defineProperty(se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(se,"_self",{configurable:!1,enumerable:!1,writable:!1,value:Z}),Object.defineProperty(se,"_source",{configurable:!1,enumerable:!1,writable:!1,value:fe}),Object.freeze&&(Object.freeze(se.props),Object.freeze(se)),se};function Ji(_,$,F,Z,fe){{var me,ce={},se=null,ot=null;F!==void 0&&(fa(F),se=""+F),qi($)&&(fa($.key),se=""+$.key),pa($)&&(ot=$.ref,Yi($,fe));for(me in $)vt.call($,me)&&!xn.hasOwnProperty(me)&&(ce[me]=$[me]);if(_&&_.defaultProps){var Ie=_.defaultProps;for(me in Ie)ce[me]===void 0&&(ce[me]=Ie[me])}if(se||ot){var Fe=typeof _=="function"?_.displayName||_.name||"Unknown":_;se&&ha(ce,Fe),ot&&Xi(ce,Fe)}return ga(_,se,ot,fe,Z,Ot.current,ce)}}var uo=y.ReactCurrentOwner,va=y.ReactDebugCurrentFrame;function Re(_){if(_){var $=_._owner,F=Me(_.type,_._source,$?$.type:null);va.setExtraStackFrame(F)}else va.setExtraStackFrame(null)}var Ze;Ze=!1;function et(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Mt(){{if(uo.current){var _=I(uo.current.type);if(_)return`
17
+ */var xu;function Xy(){return xu||(xu=1,"{}".NODE_ENV!=="production"&&function(){var e=h,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),g=Symbol.iterator,m="@@iterator";function b(_){if(_===null||typeof _!="object")return null;var I=g&&_[g]||_[m];return typeof I=="function"?I:null}var y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(_){{for(var I=arguments.length,F=new Array(I>1?I-1:0),ee=1;ee<I;ee++)F[ee-1]=arguments[ee];E("error",_,F)}}function E(_,I,F){{var ee=y.ReactDebugCurrentFrame,pe=ee.getStackAddendum();pe!==""&&(I+="%s",F=F.concat([pe]));var ye=F.map(function(ce){return String(ce)});ye.unshift("Warning: "+I),Function.prototype.apply.call(console[_],console,ye)}}var x=!1,v=!1,C=!1,O=!1,R=!1,N;N=Symbol.for("react.module.reference");function T(_){return!!(typeof _=="string"||typeof _=="function"||_===r||_===a||R||_===o||_===c||_===u||O||_===p||x||v||C||typeof _=="object"&&_!==null&&(_.$$typeof===f||_.$$typeof===d||_.$$typeof===i||_.$$typeof===s||_.$$typeof===l||_.$$typeof===N||_.getModuleId!==void 0))}function M(_,I,F){var ee=_.displayName;if(ee)return ee;var pe=I.displayName||I.name||"";return pe!==""?F+"("+pe+")":F}function j(_){return _.displayName||"Context"}function D(_){if(_==null)return null;if(typeof _.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof _=="function")return _.displayName||_.name||null;if(typeof _=="string")return _;switch(_){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof _=="object")switch(_.$$typeof){case s:var I=_;return j(I)+".Consumer";case i:var F=_;return j(F._context)+".Provider";case l:return M(_,_.render,"ForwardRef");case d:var ee=_.displayName||null;return ee!==null?ee:D(_.type)||"Memo";case f:{var pe=_,ye=pe._payload,ce=pe._init;try{return D(ce(ye))}catch{return null}}}return null}var k=Object.assign,P=0,L,z,Z,J,le,A,$;function W(){}W.__reactDisabledLog=!0;function ne(){{if(P===0){L=console.log,z=console.info,Z=console.warn,J=console.error,le=console.group,A=console.groupCollapsed,$=console.groupEnd;var _={configurable:!0,enumerable:!0,value:W,writable:!0};Object.defineProperties(console,{info:_,log:_,warn:_,error:_,group:_,groupCollapsed:_,groupEnd:_})}P++}}function ie(){{if(P--,P===0){var _={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:k({},_,{value:L}),info:k({},_,{value:z}),warn:k({},_,{value:Z}),error:k({},_,{value:J}),group:k({},_,{value:le}),groupCollapsed:k({},_,{value:A}),groupEnd:k({},_,{value:$})})}P<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var de=y.ReactCurrentDispatcher,we;function fe(_,I,F){{if(we===void 0)try{throw Error()}catch(pe){var ee=pe.stack.trim().match(/\n( *(at )?)/);we=ee&&ee[1]||""}return`
18
+ `+we+_}}var Ee=!1,re;{var $e=typeof WeakMap=="function"?WeakMap:Map;re=new $e}function V(_,I){if(!_||Ee)return"";{var F=re.get(_);if(F!==void 0)return F}var ee;Ee=!0;var pe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ye;ye=de.current,de.current=null,ne();try{if(I){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(cn){ee=cn}Reflect.construct(_,[],ce)}else{try{ce.call()}catch(cn){ee=cn}_.call(ce.prototype)}}else{try{throw Error()}catch(cn){ee=cn}_()}}catch(cn){if(cn&&ee&&typeof cn.stack=="string"){for(var se=cn.stack.split(`
19
+ `),ot=ee.stack.split(`
20
+ `),ze=se.length-1,Fe=ot.length-1;ze>=1&&Fe>=0&&se[ze]!==ot[Fe];)Fe--;for(;ze>=1&&Fe>=0;ze--,Fe--)if(se[ze]!==ot[Fe]){if(ze!==1||Fe!==1)do if(ze--,Fe--,Fe<0||se[ze]!==ot[Fe]){var Rt=`
21
+ `+se[ze].replace(" at new "," at ");return _.displayName&&Rt.includes("<anonymous>")&&(Rt=Rt.replace("<anonymous>",_.displayName)),typeof _=="function"&&re.set(_,Rt),Rt}while(ze>=1&&Fe>=0);break}}}finally{Ee=!1,de.current=ye,ie(),Error.prepareStackTrace=pe}var ur=_?_.displayName||_.name:"",wu=ur?fe(ur):"";return typeof _=="function"&&re.set(_,wu),wu}function Xe(_,I,F){return V(_,!1)}function Be(_){var I=_.prototype;return!!(I&&I.isReactComponent)}function Ie(_,I,F){if(_==null)return"";if(typeof _=="function")return V(_,Be(_));if(typeof _=="string")return fe(_);switch(_){case c:return fe("Suspense");case u:return fe("SuspenseList")}if(typeof _=="object")switch(_.$$typeof){case l:return Xe(_.render);case d:return Ie(_.type,I,F);case f:{var ee=_,pe=ee._payload,ye=ee._init;try{return Ie(ye(pe),I,F)}catch{}}}return""}var vt=Object.prototype.hasOwnProperty,an={},sn=y.ReactDebugCurrentFrame;function Ae(_){if(_){var I=_._owner,F=Ie(_.type,_._source,I?I.type:null);sn.setExtraStackFrame(F)}else sn.setExtraStackFrame(null)}function me(_,I,F,ee,pe){{var ye=Function.call.bind(vt);for(var ce in _)if(ye(_,ce)){var se=void 0;try{if(typeof _[ce]!="function"){var ot=Error((ee||"React class")+": "+F+" type `"+ce+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof _[ce]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw ot.name="Invariant Violation",ot}se=_[ce](I,ce,ee,F,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(ze){se=ze}se&&!(se instanceof Error)&&(Ae(pe),S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ee||"React class",F,ce,typeof se),Ae(null)),se instanceof Error&&!(se.message in an)&&(an[se.message]=!0,Ae(pe),S("Failed %s type: %s",F,se.message),Ae(null))}}}var De=Array.isArray;function Ge(_){return De(_)}function Kt(_){{var I=typeof Symbol=="function"&&Symbol.toStringTag,F=I&&_[Symbol.toStringTag]||_.constructor.name||"Object";return F}}function ua(_){try{return da(_),!1}catch{return!0}}function da(_){return""+_}function fa(_){if(ua(_))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Kt(_)),da(_)}var Ot=y.ReactCurrentOwner,xn={key:!0,ref:!0,__self:!0,__source:!0},Cn,co,Et;Et={};function pa(_){if(vt.call(_,"ref")){var I=Object.getOwnPropertyDescriptor(_,"ref").get;if(I&&I.isReactWarning)return!1}return _.ref!==void 0}function qi(_){if(vt.call(_,"key")){var I=Object.getOwnPropertyDescriptor(_,"key").get;if(I&&I.isReactWarning)return!1}return _.key!==void 0}function Yi(_,I){if(typeof _.ref=="string"&&Ot.current&&I&&Ot.current.stateNode!==I){var F=D(Ot.current.type);Et[F]||(S('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',D(Ot.current.type),_.ref),Et[F]=!0)}}function ha(_,I){{var F=function(){Cn||(Cn=!0,S("%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)",I))};F.isReactWarning=!0,Object.defineProperty(_,"key",{get:F,configurable:!0})}}function Xi(_,I){{var F=function(){co||(co=!0,S("%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)",I))};F.isReactWarning=!0,Object.defineProperty(_,"ref",{get:F,configurable:!0})}}var ga=function(_,I,F,ee,pe,ye,ce){var se={$$typeof:t,type:_,key:I,ref:F,props:ce,_owner:ye};return se._store={},Object.defineProperty(se._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(se,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ee}),Object.defineProperty(se,"_source",{configurable:!1,enumerable:!1,writable:!1,value:pe}),Object.freeze&&(Object.freeze(se.props),Object.freeze(se)),se};function Ji(_,I,F,ee,pe){{var ye,ce={},se=null,ot=null;F!==void 0&&(fa(F),se=""+F),qi(I)&&(fa(I.key),se=""+I.key),pa(I)&&(ot=I.ref,Yi(I,pe));for(ye in I)vt.call(I,ye)&&!xn.hasOwnProperty(ye)&&(ce[ye]=I[ye]);if(_&&_.defaultProps){var ze=_.defaultProps;for(ye in ze)ce[ye]===void 0&&(ce[ye]=ze[ye])}if(se||ot){var Fe=typeof _=="function"?_.displayName||_.name||"Unknown":_;se&&ha(ce,Fe),ot&&Xi(ce,Fe)}return ga(_,se,ot,pe,ee,Ot.current,ce)}}var uo=y.ReactCurrentOwner,va=y.ReactDebugCurrentFrame;function Pe(_){if(_){var I=_._owner,F=Ie(_.type,_._source,I?I.type:null);va.setExtraStackFrame(F)}else va.setExtraStackFrame(null)}var Ze;Ze=!1;function et(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function Mt(){{if(uo.current){var _=D(uo.current.type);if(_)return`
22
22
 
23
- Check the render method of \``+_+"`."}return""}}function lt(_){{if(_!==void 0){var $=_.fileName.replace(/^.*[\\\/]/,""),F=_.lineNumber;return`
23
+ Check the render method of \``+_+"`."}return""}}function lt(_){{if(_!==void 0){var I=_.fileName.replace(/^.*[\\\/]/,""),F=_.lineNumber;return`
24
24
 
25
- Check your code at `+$+":"+F+"."}return""}}var ct={};function _t(_){{var $=Mt();if(!$){var F=typeof _=="string"?_:_.displayName||_.name;F&&($=`
25
+ Check your code at `+I+":"+F+"."}return""}}var ct={};function _t(_){{var I=Mt();if(!I){var F=typeof _=="string"?_:_.displayName||_.name;F&&(I=`
26
26
 
27
- Check the top-level render call using <`+F+">.")}return $}}function ln(_,$){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var F=_t($);if(ct[F])return;ct[F]=!0;var Z="";_&&_._owner&&_._owner!==uo.current&&(Z=" It was passed a child from "+I(_._owner.type)+"."),Re(_),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',F,Z),Re(null)}}function ut(_,$){{if(typeof _!="object")return;if(We(_))for(var F=0;F<_.length;F++){var Z=_[F];et(Z)&&ln(Z,$)}else if(et(_))_._store&&(_._store.validated=!0);else if(_){var fe=b(_);if(typeof fe=="function"&&fe!==_.entries)for(var me=fe.call(_),ce;!(ce=me.next()).done;)et(ce.value)&&ln(ce.value,$)}}}function $n(_){{var $=_.type;if($==null||typeof $=="string")return;var F;if(typeof $=="function")F=$.propTypes;else if(typeof $=="object"&&($.$$typeof===l||$.$$typeof===d))F=$.propTypes;else return;if(F){var Z=I($);ve(F,_.props,"prop",Z,_)}else if($.PropTypes!==void 0&&!Ze){Ze=!0;var fe=I($);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",fe||"Unknown")}typeof $.getDefaultProps=="function"&&!$.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function In(_){{for(var $=Object.keys(_.props),F=0;F<$.length;F++){var Z=$[F];if(Z!=="children"&&Z!=="key"){Re(_),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",Z),Re(null);break}}_.ref!==null&&(Re(_),S("Invalid attribute `ref` supplied to `React.Fragment`."),Re(null))}}function Ln(_,$,F,Z,fe,me){{var ce=T(_);if(!ce){var se="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ot=lt(fe);ot?se+=ot:se+=Mt();var Ie;_===null?Ie="null":We(_)?Ie="array":_!==void 0&&_.$$typeof===t?(Ie="<"+(I(_.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):Ie=typeof _,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Ie,se)}var Fe=Ji(_,$,F,fe,me);if(Fe==null)return Fe;if(ce){var Rt=$.children;if(Rt!==void 0)if(Z)if(We(Rt)){for(var ur=0;ur<Rt.length;ur++)ut(Rt[ur],_);Object.freeze&&Object.freeze(Rt)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ut(Rt,_)}return _===r?In(Fe):$n(Fe),Fe}}function cr(_,$,F){return Ln(_,$,F,!0)}function ma(_,$,F){return Ln(_,$,F,!1)}var Bn=ma,zn=cr;po.Fragment=r,po.jsx=Bn,po.jsxs=zn}()),po}"{}".NODE_ENV==="production"?Hs.exports=Gy():Hs.exports=Ky();var Xl=Hs.exports;const qe=Xl.Fragment,w=Xl.jsx,te=Xl.jsxs;var qy=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ve=globalThis&&globalThis.__assign||function(){return Ve=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Ve.apply(this,arguments)},xu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Cu={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ya={width:"20px",height:"20px",position:"absolute"},Yy={top:Ve(Ve({},xu),{top:"-5px"}),right:Ve(Ve({},Cu),{left:void 0,right:"-5px"}),bottom:Ve(Ve({},xu),{top:void 0,bottom:"-5px"}),left:Ve(Ve({},Cu),{left:"-5px"}),topRight:Ve(Ve({},ya),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:Ve(Ve({},ya),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:Ve(Ve({},ya),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:Ve(Ve({},ya),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Xy=function(e){qy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return w("div",{className:this.props.className||"",style:Ve(Ve({position:"absolute",userSelect:"none"},Yy[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(W.PureComponent),Jy=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),qt=globalThis&&globalThis.__assign||function(){return qt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},qt.apply(this,arguments)},Qy={width:"auto",height:"auto"},ba=function(e,t,n){return Math.max(Math.min(e,n),t)},Ou=function(e,t){return Math.round(e/t)*t},dr=function(e,t){return new RegExp(e,"i").test(t)},wa=function(e){return!!(e.touches&&e.touches.length)},Zy=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},Eu=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(a,i,s){return Math.abs(i-e)<Math.abs(t[a]-e)?s:a},0),o=Math.abs(t[r]-e);return n===0||o<n?t[r]:e},Qi=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},Sa=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return n*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return r*o}}return e},eb=function(e,t,n,r,o,a,i){return r=Sa(r,e.width,t,n),o=Sa(o,e.height,t,n),a=Sa(a,e.width,t,n),i=Sa(i,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof i>"u"?void 0:Number(i)}},tb=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],_u="__resizable_base__",Ru=function(e){Jy(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var o=r.parentNode;if(!o)return null;var a=r.window.document.createElement("div");return a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.transform="scale(0, 0)",a.style.left="0",a.style.flex="0 0 100%",a.classList?a.classList.add(_u):a.className+=_u,o.appendChild(a),a},r.removeBase=function(o){var a=r.parentNode;a&&a.removeChild(o)},r.ref=function(o){o&&(r.resizable=o)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||Qy},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,a=this.resizable.offsetHeight,i=this.resizable.style.position;i!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=i}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),c=Number(n.state[s].toString().replace("px","")),u=c/l[s]*100;return u+"%"}return Qi(n.state[s])},a=r&&typeof r.width<"u"&&!this.state.isResizing?Qi(r.width):o("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?Qi(r.height):o("height");return{width:a,height:i}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var a={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),a},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,a=this.state.direction,i=o&&dr("left",a),s=o&&dr("top",a),l,c;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(l=i?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),c=s?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var o=this.props.scale||1,a=this.props.resizeRatio||1,i=this.state,s=i.direction,l=i.original,c=this.props,u=c.lockAspectRatio,d=c.lockAspectRatioExtraHeight,f=c.lockAspectRatioExtraWidth,p=l.width,h=l.height,m=d||0,b=f||0;return dr("right",s)&&(p=l.width+(n-l.x)*a/o,u&&(h=(p-b)/this.ratio+m)),dr("left",s)&&(p=l.width-(n-l.x)*a/o,u&&(h=(p-b)/this.ratio+m)),dr("bottom",s)&&(h=l.height+(r-l.y)*a/o,u&&(p=(h-m)*this.ratio+b)),dr("top",s)&&(h=l.height-(r-l.y)*a/o,u&&(p=(h-m)*this.ratio+b)),{newWidth:p,newHeight:h}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,o,a){var i=this.props,s=i.lockAspectRatio,l=i.lockAspectRatioExtraHeight,c=i.lockAspectRatioExtraWidth,u=typeof a.width>"u"?10:a.width,d=typeof o.width>"u"||o.width<0?n:o.width,f=typeof a.height>"u"?10:a.height,p=typeof o.height>"u"||o.height<0?r:o.height,h=l||0,m=c||0;if(s){var b=(f-h)*this.ratio+m,y=(p-h)*this.ratio+m,S=(u-m)/this.ratio+h,E=(d-m)/this.ratio+h,x=Math.max(u,b),v=Math.min(d,y),O=Math.max(f,S),C=Math.min(p,E);n=ba(n,x,v),r=ba(r,O,C)}else n=ba(n,u,d),r=ba(r,f,p);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var a=this.resizable.getBoundingClientRect(),i=a.left,s=a.top,l=a.right,c=a.bottom;this.resizableLeft=i,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=c}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,a=0;if(n.nativeEvent&&Zy(n.nativeEvent)?(o=n.nativeEvent.clientX,a=n.nativeEvent.clientY):n.nativeEvent&&wa(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,a=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var i=this.props.onResizeStart(n,r,this.resizable);if(i===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var u=this.window.getComputedStyle(c).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var d={original:{x:o,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:qt(qt({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(d)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&wa(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,a=o.maxWidth,i=o.maxHeight,s=o.minWidth,l=o.minHeight,c=wa(n)?n.touches[0].clientX:n.clientX,u=wa(n)?n.touches[0].clientY:n.clientY,d=this.state,f=d.direction,p=d.original,h=d.width,m=d.height,b=this.getParentSize(),y=eb(b,this.window.innerWidth,this.window.innerHeight,a,i,s,l);a=y.maxWidth,i=y.maxHeight,s=y.minWidth,l=y.minHeight;var S=this.calculateNewSizeFromDirection(c,u),E=S.newHeight,x=S.newWidth,v=this.calculateNewMaxFromBoundary(a,i);this.props.snap&&this.props.snap.x&&(x=Eu(x,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(E=Eu(E,this.props.snap.y,this.props.snapGap));var O=this.calculateNewSizeFromAspectRatio(x,E,{width:v.maxWidth,height:v.maxHeight},{width:s,height:l});if(x=O.newWidth,E=O.newHeight,this.props.grid){var C=Ou(x,this.props.grid[0]),R=Ou(E,this.props.grid[1]),N=this.props.snapGap||0;x=N===0||Math.abs(C-x)<=N?C:x,E=N===0||Math.abs(R-E)<=N?R:E}var T={width:x-p.width,height:E-p.height};if(h&&typeof h=="string"){if(h.endsWith("%")){var k=x/b.width*100;x=k+"%"}else if(h.endsWith("vw")){var j=x/this.window.innerWidth*100;x=j+"vw"}else if(h.endsWith("vh")){var I=x/this.window.innerHeight*100;x=I+"vh"}}if(m&&typeof m=="string"){if(m.endsWith("%")){var k=E/b.height*100;E=k+"%"}else if(m.endsWith("vw")){var j=E/this.window.innerWidth*100;E=j+"vw"}else if(m.endsWith("vh")){var I=E/this.window.innerHeight*100;E=I+"vh"}}var M={width:this.createSizeForCssProperty(x,"width"),height:this.createSizeForCssProperty(E,"height")};this.flexDir==="row"?M.flexBasis=M.width:this.flexDir==="column"&&(M.flexBasis=M.height),Yt.flushSync(function(){r.setState(M)}),this.props.onResize&&this.props.onResize(n,f,this.resizable,T)}},t.prototype.onMouseUp=function(n){var r=this.state,o=r.isResizing,a=r.direction,i=r.original;if(!(!o||!this.resizable)){var s={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(n,a,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:qt(qt({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,a=r.handleStyles,i=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,c=r.handleComponent;if(!o)return null;var u=Object.keys(o).map(function(d){return o[d]!==!1?w(Xy,{direction:d,onResizeStart:n.onResizeStart,replaceStyles:a&&a[d],className:i&&i[d],children:c&&c[d]?c[d]:null},d):null});return w("div",{className:l,style:s,children:u})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,s){return tb.indexOf(s)!==-1||(i[s]=n.props[s]),i},{}),o=qt(qt(qt({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return te(a,{...qt({ref:this.ref,style:o,className:this.props.className},r),children:[this.state.isResizing&&w("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(W.PureComponent);const nb="_workbenchContainer_15alj_2",rb="_topToolBarBox_15alj_8",ob="_topToolBarView_15alj_14",ab="_bodyContent_15alj_17",ib="_leftBox_15alj_23",sb="_pluginIconBar_15alj_29",lb="_pluginIconItem_15alj_34",cb="_active_15alj_44",ub="_pluginPanelBoxResizeBox_15alj_60",db="_pluginHeader_15alj_67",fb="_pluginNameText_15alj_75",pb="_closeBtn_15alj_82",hb="_fixedBtn_15alj_83",gb="_pluginPanelBox_15alj_60",vb="_rightResizeBox_15alj_98",mb="_arrowCursor_15alj_101",yb="_rightBox_15alj_116",bb="_centerBox_15alj_122",wb="_subTopToolbarBox_15alj_128",Sb="_canvasBox_15alj_133",xb="_scrollBox_15alj_140",ke={workbenchContainer:nb,topToolBarBox:rb,topToolBarView:ob,bodyContent:ab,leftBox:ib,pluginIconBar:sb,pluginIconItem:lb,active:cb,pluginPanelBoxResizeBox:ub,pluginHeader:db,pluginNameText:fb,closeBtn:pb,fixedBtn:hb,pluginPanelBox:gb,rightResizeBox:vb,arrowCursor:mb,rightBox:yb,centerBox:bb,subTopToolbarBox:wb,canvasBox:Sb,scrollBox:xb};var Cb=g.createContext({});const Gp=Cb;function xe(e){"@babel/helpers - typeof";return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(e)}function Ob(e,t){if(xe(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(xe(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Kp(e){var t=Ob(e,"string");return xe(t)==="symbol"?t:String(t)}function ae(e,t,n){return t=Kp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Nu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Nu(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Nu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qp(e){if(Array.isArray(e))return e}function Eb(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function Us(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jl(e,t){if(e){if(typeof e=="string")return Us(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Us(e,t)}}function Yp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Se(e,t){return qp(e)||Eb(e,t)||Jl(e,t)||Yp()}function _b(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Rr(e,t){if(e==null)return{};var n=_b(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Xp={exports:{}};/*!
27
+ Check the top-level render call using <`+F+">.")}return I}}function ln(_,I){{if(!_._store||_._store.validated||_.key!=null)return;_._store.validated=!0;var F=_t(I);if(ct[F])return;ct[F]=!0;var ee="";_&&_._owner&&_._owner!==uo.current&&(ee=" It was passed a child from "+D(_._owner.type)+"."),Pe(_),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',F,ee),Pe(null)}}function ut(_,I){{if(typeof _!="object")return;if(Ge(_))for(var F=0;F<_.length;F++){var ee=_[F];et(ee)&&ln(ee,I)}else if(et(_))_._store&&(_._store.validated=!0);else if(_){var pe=b(_);if(typeof pe=="function"&&pe!==_.entries)for(var ye=pe.call(_),ce;!(ce=ye.next()).done;)et(ce.value)&&ln(ce.value,I)}}}function $n(_){{var I=_.type;if(I==null||typeof I=="string")return;var F;if(typeof I=="function")F=I.propTypes;else if(typeof I=="object"&&(I.$$typeof===l||I.$$typeof===d))F=I.propTypes;else return;if(F){var ee=D(I);me(F,_.props,"prop",ee,_)}else if(I.PropTypes!==void 0&&!Ze){Ze=!0;var pe=D(I);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",pe||"Unknown")}typeof I.getDefaultProps=="function"&&!I.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function In(_){{for(var I=Object.keys(_.props),F=0;F<I.length;F++){var ee=I[F];if(ee!=="children"&&ee!=="key"){Pe(_),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ee),Pe(null);break}}_.ref!==null&&(Pe(_),S("Invalid attribute `ref` supplied to `React.Fragment`."),Pe(null))}}function Ln(_,I,F,ee,pe,ye){{var ce=T(_);if(!ce){var se="";(_===void 0||typeof _=="object"&&_!==null&&Object.keys(_).length===0)&&(se+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var ot=lt(pe);ot?se+=ot:se+=Mt();var ze;_===null?ze="null":Ge(_)?ze="array":_!==void 0&&_.$$typeof===t?(ze="<"+(D(_.type)||"Unknown")+" />",se=" Did you accidentally export a JSX literal instead of a component?"):ze=typeof _,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",ze,se)}var Fe=Ji(_,I,F,pe,ye);if(Fe==null)return Fe;if(ce){var Rt=I.children;if(Rt!==void 0)if(ee)if(Ge(Rt)){for(var ur=0;ur<Rt.length;ur++)ut(Rt[ur],_);Object.freeze&&Object.freeze(Rt)}else S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ut(Rt,_)}return _===r?In(Fe):$n(Fe),Fe}}function cr(_,I,F){return Ln(_,I,F,!0)}function ma(_,I,F){return Ln(_,I,F,!1)}var Bn=ma,zn=cr;po.Fragment=r,po.jsx=Bn,po.jsxs=zn}()),po}"{}".NODE_ENV==="production"?Hs.exports=Yy():Hs.exports=Xy();var Xl=Hs.exports;const Ye=Xl.Fragment,w=Xl.jsx,te=Xl.jsxs;var Jy=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),He=globalThis&&globalThis.__assign||function(){return He=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},He.apply(this,arguments)},Cu={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},Ou={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},ya={width:"20px",height:"20px",position:"absolute"},Qy={top:He(He({},Cu),{top:"-5px"}),right:He(He({},Ou),{left:void 0,right:"-5px"}),bottom:He(He({},Cu),{top:void 0,bottom:"-5px"}),left:He(He({},Ou),{left:"-5px"}),topRight:He(He({},ya),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:He(He({},ya),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:He(He({},ya),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:He(He({},ya),{left:"-10px",top:"-10px",cursor:"nw-resize"})},Zy=function(e){Jy(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.onMouseDown=function(r){n.props.onResizeStart(r,n.props.direction)},n.onTouchStart=function(r){n.props.onResizeStart(r,n.props.direction)},n}return t.prototype.render=function(){return w("div",{className:this.props.className||"",style:He(He({position:"absolute",userSelect:"none"},Qy[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart,children:this.props.children})},t}(U.PureComponent),eb=globalThis&&globalThis.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),Yt=globalThis&&globalThis.__assign||function(){return Yt=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o])}return e},Yt.apply(this,arguments)},tb={width:"auto",height:"auto"},ba=function(e,t,n){return Math.max(Math.min(e,n),t)},Eu=function(e,t){return Math.round(e/t)*t},dr=function(e,t){return new RegExp(e,"i").test(t)},wa=function(e){return!!(e.touches&&e.touches.length)},nb=function(e){return!!((e.clientX||e.clientX===0)&&(e.clientY||e.clientY===0))},_u=function(e,t,n){n===void 0&&(n=0);var r=t.reduce(function(a,i,s){return Math.abs(i-e)<Math.abs(t[a]-e)?s:a},0),o=Math.abs(t[r]-e);return n===0||o<n?t[r]:e},Qi=function(e){return e=e.toString(),e==="auto"||e.endsWith("px")||e.endsWith("%")||e.endsWith("vh")||e.endsWith("vw")||e.endsWith("vmax")||e.endsWith("vmin")?e:e+"px"},Sa=function(e,t,n,r){if(e&&typeof e=="string"){if(e.endsWith("px"))return Number(e.replace("px",""));if(e.endsWith("%")){var o=Number(e.replace("%",""))/100;return t*o}if(e.endsWith("vw")){var o=Number(e.replace("vw",""))/100;return n*o}if(e.endsWith("vh")){var o=Number(e.replace("vh",""))/100;return r*o}}return e},rb=function(e,t,n,r,o,a,i){return r=Sa(r,e.width,t,n),o=Sa(o,e.height,t,n),a=Sa(a,e.width,t,n),i=Sa(i,e.height,t,n),{maxWidth:typeof r>"u"?void 0:Number(r),maxHeight:typeof o>"u"?void 0:Number(o),minWidth:typeof a>"u"?void 0:Number(a),minHeight:typeof i>"u"?void 0:Number(i)}},ob=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],Ru="__resizable_base__",Nu=function(e){eb(t,e);function t(n){var r=e.call(this,n)||this;return r.ratio=1,r.resizable=null,r.parentLeft=0,r.parentTop=0,r.resizableLeft=0,r.resizableRight=0,r.resizableTop=0,r.resizableBottom=0,r.targetLeft=0,r.targetTop=0,r.appendBase=function(){if(!r.resizable||!r.window)return null;var o=r.parentNode;if(!o)return null;var a=r.window.document.createElement("div");return a.style.width="100%",a.style.height="100%",a.style.position="absolute",a.style.transform="scale(0, 0)",a.style.left="0",a.style.flex="0 0 100%",a.classList?a.classList.add(Ru):a.className+=Ru,o.appendChild(a),a},r.removeBase=function(o){var a=r.parentNode;a&&a.removeChild(o)},r.ref=function(o){o&&(r.resizable=o)},r.state={isResizing:!1,width:typeof(r.propsSize&&r.propsSize.width)>"u"?"auto":r.propsSize&&r.propsSize.width,height:typeof(r.propsSize&&r.propsSize.height)>"u"?"auto":r.propsSize&&r.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},r.onResizeStart=r.onResizeStart.bind(r),r.onMouseMove=r.onMouseMove.bind(r),r.onMouseUp=r.onMouseUp.bind(r),r}return Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"window",{get:function(){return!this.resizable||!this.resizable.ownerDocument?null:this.resizable.ownerDocument.defaultView},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||tb},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"size",{get:function(){var n=0,r=0;if(this.resizable&&this.window){var o=this.resizable.offsetWidth,a=this.resizable.offsetHeight,i=this.resizable.style.position;i!=="relative"&&(this.resizable.style.position="relative"),n=this.resizable.style.width!=="auto"?this.resizable.offsetWidth:o,r=this.resizable.style.height!=="auto"?this.resizable.offsetHeight:a,this.resizable.style.position=i}return{width:n,height:r}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sizeStyle",{get:function(){var n=this,r=this.props.size,o=function(s){if(typeof n.state[s]>"u"||n.state[s]==="auto")return"auto";if(n.propsSize&&n.propsSize[s]&&n.propsSize[s].toString().endsWith("%")){if(n.state[s].toString().endsWith("%"))return n.state[s].toString();var l=n.getParentSize(),c=Number(n.state[s].toString().replace("px","")),u=c/l[s]*100;return u+"%"}return Qi(n.state[s])},a=r&&typeof r.width<"u"&&!this.state.isResizing?Qi(r.width):o("width"),i=r&&typeof r.height<"u"&&!this.state.isResizing?Qi(r.height):o("height");return{width:a,height:i}},enumerable:!1,configurable:!0}),t.prototype.getParentSize=function(){if(!this.parentNode)return this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0};var n=this.appendBase();if(!n)return{width:0,height:0};var r=!1,o=this.parentNode.style.flexWrap;o!=="wrap"&&(r=!0,this.parentNode.style.flexWrap="wrap"),n.style.position="relative",n.style.minWidth="100%",n.style.minHeight="100%";var a={width:n.offsetWidth,height:n.offsetHeight};return r&&(this.parentNode.style.flexWrap=o),this.removeBase(n),a},t.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},t.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},t.prototype.componentDidMount=function(){if(!(!this.resizable||!this.window)){var n=this.window.getComputedStyle(this.resizable);this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:n.flexBasis!=="auto"?n.flexBasis:void 0})}},t.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},t.prototype.createSizeForCssProperty=function(n,r){var o=this.propsSize&&this.propsSize[r];return this.state[r]==="auto"&&this.state.original[r]===n&&(typeof o>"u"||o==="auto")?"auto":n},t.prototype.calculateNewMaxFromBoundary=function(n,r){var o=this.props.boundsByDirection,a=this.state.direction,i=o&&dr("left",a),s=o&&dr("top",a),l,c;if(this.props.bounds==="parent"){var u=this.parentNode;u&&(l=i?this.resizableRight-this.parentLeft:u.offsetWidth+(this.parentLeft-this.resizableLeft),c=s?this.resizableBottom-this.parentTop:u.offsetHeight+(this.parentTop-this.resizableTop))}else this.props.bounds==="window"?this.window&&(l=i?this.resizableRight:this.window.innerWidth-this.resizableLeft,c=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(l=i?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),c=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop));return l&&Number.isFinite(l)&&(n=n&&n<l?n:l),c&&Number.isFinite(c)&&(r=r&&r<c?r:c),{maxWidth:n,maxHeight:r}},t.prototype.calculateNewSizeFromDirection=function(n,r){var o=this.props.scale||1,a=this.props.resizeRatio||1,i=this.state,s=i.direction,l=i.original,c=this.props,u=c.lockAspectRatio,d=c.lockAspectRatioExtraHeight,f=c.lockAspectRatioExtraWidth,p=l.width,g=l.height,m=d||0,b=f||0;return dr("right",s)&&(p=l.width+(n-l.x)*a/o,u&&(g=(p-b)/this.ratio+m)),dr("left",s)&&(p=l.width-(n-l.x)*a/o,u&&(g=(p-b)/this.ratio+m)),dr("bottom",s)&&(g=l.height+(r-l.y)*a/o,u&&(p=(g-m)*this.ratio+b)),dr("top",s)&&(g=l.height-(r-l.y)*a/o,u&&(p=(g-m)*this.ratio+b)),{newWidth:p,newHeight:g}},t.prototype.calculateNewSizeFromAspectRatio=function(n,r,o,a){var i=this.props,s=i.lockAspectRatio,l=i.lockAspectRatioExtraHeight,c=i.lockAspectRatioExtraWidth,u=typeof a.width>"u"?10:a.width,d=typeof o.width>"u"||o.width<0?n:o.width,f=typeof a.height>"u"?10:a.height,p=typeof o.height>"u"||o.height<0?r:o.height,g=l||0,m=c||0;if(s){var b=(f-g)*this.ratio+m,y=(p-g)*this.ratio+m,S=(u-m)/this.ratio+g,E=(d-m)/this.ratio+g,x=Math.max(u,b),v=Math.min(d,y),C=Math.max(f,S),O=Math.min(p,E);n=ba(n,x,v),r=ba(r,C,O)}else n=ba(n,u,d),r=ba(r,f,p);return{newWidth:n,newHeight:r}},t.prototype.setBoundingClientRect=function(){if(this.props.bounds==="parent"){var n=this.parentNode;if(n){var r=n.getBoundingClientRect();this.parentLeft=r.left,this.parentTop=r.top}}if(this.props.bounds&&typeof this.props.bounds!="string"){var o=this.props.bounds.getBoundingClientRect();this.targetLeft=o.left,this.targetTop=o.top}if(this.resizable){var a=this.resizable.getBoundingClientRect(),i=a.left,s=a.top,l=a.right,c=a.bottom;this.resizableLeft=i,this.resizableRight=l,this.resizableTop=s,this.resizableBottom=c}},t.prototype.onResizeStart=function(n,r){if(!(!this.resizable||!this.window)){var o=0,a=0;if(n.nativeEvent&&nb(n.nativeEvent)?(o=n.nativeEvent.clientX,a=n.nativeEvent.clientY):n.nativeEvent&&wa(n.nativeEvent)&&(o=n.nativeEvent.touches[0].clientX,a=n.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable){var i=this.props.onResizeStart(n,r,this.resizable);if(i===!1)return}this.props.size&&(typeof this.props.size.height<"u"&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),typeof this.props.size.width<"u"&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width})),this.ratio=typeof this.props.lockAspectRatio=="number"?this.props.lockAspectRatio:this.size.width/this.size.height;var s,l=this.window.getComputedStyle(this.resizable);if(l.flexBasis!=="auto"){var c=this.parentNode;if(c){var u=this.window.getComputedStyle(c).flexDirection;this.flexDir=u.startsWith("row")?"row":"column",s=l.flexBasis}}this.setBoundingClientRect(),this.bindEvents();var d={original:{x:o,y:a,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:Yt(Yt({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(n.target).cursor||"auto"}),direction:r,flexBasis:s};this.setState(d)}},t.prototype.onMouseMove=function(n){var r=this;if(!(!this.state.isResizing||!this.resizable||!this.window)){if(this.window.TouchEvent&&wa(n))try{n.preventDefault(),n.stopPropagation()}catch{}var o=this.props,a=o.maxWidth,i=o.maxHeight,s=o.minWidth,l=o.minHeight,c=wa(n)?n.touches[0].clientX:n.clientX,u=wa(n)?n.touches[0].clientY:n.clientY,d=this.state,f=d.direction,p=d.original,g=d.width,m=d.height,b=this.getParentSize(),y=rb(b,this.window.innerWidth,this.window.innerHeight,a,i,s,l);a=y.maxWidth,i=y.maxHeight,s=y.minWidth,l=y.minHeight;var S=this.calculateNewSizeFromDirection(c,u),E=S.newHeight,x=S.newWidth,v=this.calculateNewMaxFromBoundary(a,i);this.props.snap&&this.props.snap.x&&(x=_u(x,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(E=_u(E,this.props.snap.y,this.props.snapGap));var C=this.calculateNewSizeFromAspectRatio(x,E,{width:v.maxWidth,height:v.maxHeight},{width:s,height:l});if(x=C.newWidth,E=C.newHeight,this.props.grid){var O=Eu(x,this.props.grid[0]),R=Eu(E,this.props.grid[1]),N=this.props.snapGap||0;x=N===0||Math.abs(O-x)<=N?O:x,E=N===0||Math.abs(R-E)<=N?R:E}var T={width:x-p.width,height:E-p.height};if(g&&typeof g=="string"){if(g.endsWith("%")){var M=x/b.width*100;x=M+"%"}else if(g.endsWith("vw")){var j=x/this.window.innerWidth*100;x=j+"vw"}else if(g.endsWith("vh")){var D=x/this.window.innerHeight*100;x=D+"vh"}}if(m&&typeof m=="string"){if(m.endsWith("%")){var M=E/b.height*100;E=M+"%"}else if(m.endsWith("vw")){var j=E/this.window.innerWidth*100;E=j+"vw"}else if(m.endsWith("vh")){var D=E/this.window.innerHeight*100;E=D+"vh"}}var k={width:this.createSizeForCssProperty(x,"width"),height:this.createSizeForCssProperty(E,"height")};this.flexDir==="row"?k.flexBasis=k.width:this.flexDir==="column"&&(k.flexBasis=k.height),Lt.flushSync(function(){r.setState(k)}),this.props.onResize&&this.props.onResize(n,f,this.resizable,T)}},t.prototype.onMouseUp=function(n){var r=this.state,o=r.isResizing,a=r.direction,i=r.original;if(!(!o||!this.resizable)){var s={width:this.size.width-i.width,height:this.size.height-i.height};this.props.onResizeStop&&this.props.onResizeStop(n,a,this.resizable,s),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:Yt(Yt({},this.state.backgroundStyle),{cursor:"auto"})})}},t.prototype.updateSize=function(n){this.setState({width:n.width,height:n.height})},t.prototype.renderResizer=function(){var n=this,r=this.props,o=r.enable,a=r.handleStyles,i=r.handleClasses,s=r.handleWrapperStyle,l=r.handleWrapperClass,c=r.handleComponent;if(!o)return null;var u=Object.keys(o).map(function(d){return o[d]!==!1?w(Zy,{direction:d,onResizeStart:n.onResizeStart,replaceStyles:a&&a[d],className:i&&i[d],children:c&&c[d]?c[d]:null},d):null});return w("div",{className:l,style:s,children:u})},t.prototype.render=function(){var n=this,r=Object.keys(this.props).reduce(function(i,s){return ob.indexOf(s)!==-1||(i[s]=n.props[s]),i},{}),o=Yt(Yt(Yt({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0});this.state.flexBasis&&(o.flexBasis=this.state.flexBasis);var a=this.props.as||"div";return te(a,{...Yt({ref:this.ref,style:o,className:this.props.className},r),children:[this.state.isResizing&&w("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer()]})},t.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},t}(U.PureComponent);const ab="_workbenchContainer_b7h5o_2",ib="_topToolBarBox_b7h5o_8",sb="_topToolBarView_b7h5o_14",lb="_bodyContent_b7h5o_17",cb="_leftBox_b7h5o_23",ub="_pluginIconBar_b7h5o_29",db="_pluginIconItem_b7h5o_34",fb="_active_b7h5o_44",pb="_pluginPanelBoxResizeBox_b7h5o_60",hb="_pluginHeader_b7h5o_67",gb="_pluginNameText_b7h5o_75",vb="_closeBtn_b7h5o_82",mb="_fixedBtn_b7h5o_83",yb="_pluginPanelBox_b7h5o_60",bb="_rightResizeBox_b7h5o_98",wb="_arrowCursor_b7h5o_101",Sb="_rightBox_b7h5o_116",xb="_centerBox_b7h5o_122",Cb="_subTopToolbarBox_b7h5o_128",Ob="_canvasBox_b7h5o_133",Eb="_scrollBox_b7h5o_140",_b="_customViewBox_b7h5o_146",ke={workbenchContainer:ab,topToolBarBox:ib,topToolBarView:sb,bodyContent:lb,leftBox:cb,pluginIconBar:ub,pluginIconItem:db,active:fb,pluginPanelBoxResizeBox:pb,pluginHeader:hb,pluginNameText:gb,closeBtn:vb,fixedBtn:mb,pluginPanelBox:yb,rightResizeBox:bb,arrowCursor:wb,rightBox:Sb,centerBox:xb,subTopToolbarBox:Cb,canvasBox:Ob,scrollBox:Eb,customViewBox:_b};var Rb=h.createContext({});const Yp=Rb;function Oe(e){"@babel/helpers - typeof";return Oe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(e)}function Nb(e,t){if(Oe(e)!=="object"||e===null)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||"default");if(Oe(r)!=="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Xp(e){var t=Nb(e,"string");return Oe(t)==="symbol"?t:String(t)}function ae(e,t,n){return t=Xp(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tu(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function H(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Tu(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Tu(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Jp(e){if(Array.isArray(e))return e}function Tb(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,a,i,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(u){c=!0,o=u}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(c)throw o}}return s}}function Us(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jl(e,t){if(e){if(typeof e=="string")return Us(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Us(e,t)}}function Qp(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
28
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ce(e,t){return Jp(e)||Tb(e,t)||Jl(e,t)||Qp()}function Pb(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function Rr(e,t){if(e==null)return{};var n=Pb(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var Zp={exports:{}};/*!
29
29
  Copyright (c) 2018 Jed Watson.
30
30
  Licensed under the MIT License (MIT), see
31
31
  http://jedwatson.github.io/classnames
32
- */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var a=arguments[o];if(a){var i=typeof a;if(i==="string"||i==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(i==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){r.push(a.toString());continue}for(var l in a)t.call(a,l)&&a[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Xp);var Rb=Xp.exports;const Ql=Yl(Rb);function tt(e,t){Nb(e)&&(e="100%");var n=Tb(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function xa(e){return Math.min(1,Math.max(0,e))}function Nb(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Tb(e){return typeof e=="string"&&e.indexOf("%")!==-1}function Jp(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ca(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Gn(e){return e.length===1?"0"+e:String(e)}function Pb(e,t,n){return{r:tt(e,255)*255,g:tt(t,255)*255,b:tt(n,255)*255}}function Tu(e,t,n){e=tt(e,255),t=tt(t,255),n=tt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=0,s=(r+o)/2;if(r===o)i=0,a=0;else{var l=r-o;switch(i=s>.5?l/(2-r-o):l/(r+o),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,l:s}}function Zi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function kb(e,t,n){var r,o,a;if(e=tt(e,360),t=tt(t,100),n=tt(n,100),t===0)o=n,a=n,r=n;else{var i=n<.5?n*(1+t):n+t-n*t,s=2*n-i;r=Zi(s,i,e+1/3),o=Zi(s,i,e),a=Zi(s,i,e-1/3)}return{r:r*255,g:o*255,b:a*255}}function Qa(e,t,n){e=tt(e,255),t=tt(t,255),n=tt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=r,s=r-o,l=r===0?0:s/r;if(r===o)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4;break}a/=6}return{h:a,s:l,v:i}}function jb(e,t,n){e=tt(e,360)*6,t=tt(t,100),n=tt(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6,c=[n,i,a,a,s,n][l],u=[s,n,n,i,a,a][l],d=[a,a,s,n,n,i][l];return{r:c*255,g:u*255,b:d*255}}function Za(e,t,n,r){var o=[Gn(Math.round(e).toString(16)),Gn(Math.round(t).toString(16)),Gn(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Mb(e,t,n,r,o){var a=[Gn(Math.round(e).toString(16)),Gn(Math.round(t).toString(16)),Gn(Math.round(n).toString(16)),Gn(Ab(r))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Ab(e){return Math.round(parseFloat(e)*255).toString(16)}function Pu(e){return yt(e)/255}function yt(e){return parseInt(e,16)}function Db(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Ws={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Lt(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=Lb(e)),typeof e=="object"&&(un(e.r)&&un(e.g)&&un(e.b)?(t=Pb(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):un(e.h)&&un(e.s)&&un(e.v)?(r=Ca(e.s),o=Ca(e.v),t=jb(e.h,r,o),i=!0,s="hsv"):un(e.h)&&un(e.s)&&un(e.l)&&(r=Ca(e.s),a=Ca(e.l),t=kb(e.h,r,a),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=Jp(n),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var $b="[-\\+]?\\d+%?",Ib="[-\\+]?\\d*\\.\\d+%?",_n="(?:".concat(Ib,")|(?:").concat($b,")"),es="[\\s|\\(]+(".concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")\\s*\\)?"),ts="[\\s|\\(]+(".concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")\\s*\\)?"),Dt={CSS_UNIT:new RegExp(_n),rgb:new RegExp("rgb"+es),rgba:new RegExp("rgba"+ts),hsl:new RegExp("hsl"+es),hsla:new RegExp("hsla"+ts),hsv:new RegExp("hsv"+es),hsva:new RegExp("hsva"+ts),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})$/};function Lb(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Ws[e])e=Ws[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Dt.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Dt.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Dt.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Dt.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Dt.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Dt.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Dt.hex8.exec(e),n?{r:yt(n[1]),g:yt(n[2]),b:yt(n[3]),a:Pu(n[4]),format:t?"name":"hex8"}:(n=Dt.hex6.exec(e),n?{r:yt(n[1]),g:yt(n[2]),b:yt(n[3]),format:t?"name":"hex"}:(n=Dt.hex4.exec(e),n?{r:yt(n[1]+n[1]),g:yt(n[2]+n[2]),b:yt(n[3]+n[3]),a:Pu(n[4]+n[4]),format:t?"name":"hex8"}:(n=Dt.hex3.exec(e),n?{r:yt(n[1]+n[1]),g:yt(n[2]+n[2]),b:yt(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function un(e){return!!Dt.CSS_UNIT.exec(String(e))}var wt=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Db(t)),this.originalInput=t;var o=Lt(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,o,a=t.r/255,i=t.g/255,s=t.b/255;return a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*o},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=Jp(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Qa(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Qa(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Tu(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Tu(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Za(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Mb(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(tt(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(tt(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Za(this.r,this.g,this.b,!1),n=0,r=Object.entries(Ws);n<r.length;n++){var o=r[n],a=o[0],i=o[1];if(t===i)return a}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,o=this.a<1&&this.a>=0,a=!n&&o&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=xa(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=xa(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=xa(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=xa(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100,i={r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a};return new e(i)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],s=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;i<t;i++)o.push(new e({h:(r+i*a)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Oa=2,ku=.16,Bb=.05,zb=.05,Fb=.15,Qp=5,Zp=4,Vb=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ju(e){var t=e.r,n=e.g,r=e.b,o=Qa(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Ea(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Za(t,n,r,!1))}function Hb(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Mu(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Oa*t:Math.round(e.h)+Oa*t:r=n?Math.round(e.h)+Oa*t:Math.round(e.h)-Oa*t,r<0?r+=360:r>=360&&(r-=360),r}function Au(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-ku*t:t===Zp?r=e.s+ku:r=e.s+Bb*t,r>1&&(r=1),n&&t===Qp&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Du(e,t,n){var r;return n?r=e.v+zb*t:r=e.v-Fb*t,r>1&&(r=1),Number(r.toFixed(2))}function Gs(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Lt(e),o=Qp;o>0;o-=1){var a=ju(r),i=Ea(Lt({h:Mu(a,o,!0),s:Au(a,o,!0),v:Du(a,o,!0)}));n.push(i)}n.push(Ea(r));for(var s=1;s<=Zp;s+=1){var l=ju(r),c=Ea(Lt({h:Mu(l,s),s:Au(l,s),v:Du(l,s)}));n.push(c)}return t.theme==="dark"?Vb.map(function(u){var d=u.index,f=u.opacity,p=Ea(Hb(Lt(t.backgroundColor||"#141414"),Lt(n[d]),f*100));return p}):n}var ns={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},rs={},os={};Object.keys(ns).forEach(function(e){rs[e]=Gs(ns[e]),rs[e].primary=rs[e][5],os[e]=Gs(ns[e],{theme:"dark",backgroundColor:"#141414"}),os[e].primary=os[e][5]});var Ks={},Zl=[],Ub=function(t){Zl.push(t)};function eh(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Zl.reduce(function(r,o){return o(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Wb(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Zl.reduce(function(r,o){return o(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function th(){Ks={}}function nh(e,t,n){!t&&!Ks[n]&&(e(!1,n),Ks[n]=!0)}function Mn(e,t){nh(eh,e,t)}function Gb(e,t){nh(Wb,e,t)}Mn.preMessage=Ub;Mn.resetWarned=th;Mn.noteOnce=Gb;function en(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Kb(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var $u="data-rc-order",qb="rc-util-key",qs=new Map;function rh(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):qb}function yi(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Yb(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function oh(e){return Array.from((qs.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function ah(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!en())return null;var n=t.csp,r=t.prepend,o=document.createElement("style");o.setAttribute($u,Yb(r)),n!=null&&n.nonce&&(o.nonce=n==null?void 0:n.nonce),o.innerHTML=e;var a=yi(t),i=a.firstChild;if(r){if(r==="queue"){var s=oh(a).filter(function(l){return["prepend","prependQueue"].includes(l.getAttribute($u))});if(s.length)return a.insertBefore(o,s[s.length-1].nextSibling),o}a.insertBefore(o,i)}else a.appendChild(o);return o}function ih(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=yi(t);return oh(n).find(function(r){return r.getAttribute(rh(t))===e})}function sh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=ih(e,t);if(n){var r=yi(t);r.removeChild(n)}}function Xb(e,t){var n=qs.get(e);if(!n||!Kb(document,n)){var r=ah("",t),o=r.parentNode;qs.set(e,o),e.removeChild(r)}}function Do(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=yi(n);Xb(r,n);var o=ih(t,n);if(o){var a,i;if((a=n.csp)!==null&&a!==void 0&&a.nonce&&o.nonce!==((i=n.csp)===null||i===void 0?void 0:i.nonce)){var s;o.nonce=(s=n.csp)===null||s===void 0?void 0:s.nonce}return o.innerHTML!==e&&(o.innerHTML=e),o}var l=ah(e,n);return l.setAttribute(rh(n),t),l}function Jb(e,t){Mn(e,"[@ant-design/icons] ".concat(t))}function Iu(e){return xe(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(xe(e.icon)==="object"||typeof e.icon=="function")}function Lu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function Ys(e,t,n){return n?g.createElement(e.tag,H(H({key:t},Lu(e.attrs)),n),(e.children||[]).map(function(r,o){return Ys(r,"".concat(t,"-").concat(e.tag,"-").concat(o))})):g.createElement(e.tag,H({key:t},Lu(e.attrs)),(e.children||[]).map(function(r,o){return Ys(r,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function lh(e){return Gs(e)[0]}function ch(e){return e?Array.isArray(e)?e:[e]:[]}var Qb=`
32
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],o=0;o<arguments.length;o++){var a=arguments[o];if(a){var i=typeof a;if(i==="string"||i==="number")r.push(a);else if(Array.isArray(a)){if(a.length){var s=n.apply(null,a);s&&r.push(s)}}else if(i==="object"){if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]")){r.push(a.toString());continue}for(var l in a)t.call(a,l)&&a[l]&&r.push(l)}}}return r.join(" ")}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(Zp);var kb=Zp.exports;const Ql=Yl(kb);function tt(e,t){jb(e)&&(e="100%");var n=Mb(e);return e=t===360?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:(t===360?e=(e<0?e%t+t:e%t)/parseFloat(String(t)):e=e%t/parseFloat(String(t)),e)}function xa(e){return Math.min(1,Math.max(0,e))}function jb(e){return typeof e=="string"&&e.indexOf(".")!==-1&&parseFloat(e)===1}function Mb(e){return typeof e=="string"&&e.indexOf("%")!==-1}function eh(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Ca(e){return e<=1?"".concat(Number(e)*100,"%"):e}function Gn(e){return e.length===1?"0"+e:String(e)}function Ab(e,t,n){return{r:tt(e,255)*255,g:tt(t,255)*255,b:tt(n,255)*255}}function Pu(e,t,n){e=tt(e,255),t=tt(t,255),n=tt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=0,s=(r+o)/2;if(r===o)i=0,a=0;else{var l=r-o;switch(i=s>.5?l/(2-r-o):l/(r+o),r){case e:a=(t-n)/l+(t<n?6:0);break;case t:a=(n-e)/l+2;break;case n:a=(e-t)/l+4;break}a/=6}return{h:a,s:i,l:s}}function Zi(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function Db(e,t,n){var r,o,a;if(e=tt(e,360),t=tt(t,100),n=tt(n,100),t===0)o=n,a=n,r=n;else{var i=n<.5?n*(1+t):n+t-n*t,s=2*n-i;r=Zi(s,i,e+1/3),o=Zi(s,i,e),a=Zi(s,i,e-1/3)}return{r:r*255,g:o*255,b:a*255}}function Qa(e,t,n){e=tt(e,255),t=tt(t,255),n=tt(n,255);var r=Math.max(e,t,n),o=Math.min(e,t,n),a=0,i=r,s=r-o,l=r===0?0:s/r;if(r===o)a=0;else{switch(r){case e:a=(t-n)/s+(t<n?6:0);break;case t:a=(n-e)/s+2;break;case n:a=(e-t)/s+4;break}a/=6}return{h:a,s:l,v:i}}function $b(e,t,n){e=tt(e,360)*6,t=tt(t,100),n=tt(n,100);var r=Math.floor(e),o=e-r,a=n*(1-t),i=n*(1-o*t),s=n*(1-(1-o)*t),l=r%6,c=[n,i,a,a,s,n][l],u=[s,n,n,i,a,a][l],d=[a,a,s,n,n,i][l];return{r:c*255,g:u*255,b:d*255}}function Za(e,t,n,r){var o=[Gn(Math.round(e).toString(16)),Gn(Math.round(t).toString(16)),Gn(Math.round(n).toString(16))];return r&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0):o.join("")}function Ib(e,t,n,r,o){var a=[Gn(Math.round(e).toString(16)),Gn(Math.round(t).toString(16)),Gn(Math.round(n).toString(16)),Gn(Lb(r))];return o&&a[0].startsWith(a[0].charAt(1))&&a[1].startsWith(a[1].charAt(1))&&a[2].startsWith(a[2].charAt(1))&&a[3].startsWith(a[3].charAt(1))?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}function Lb(e){return Math.round(parseFloat(e)*255).toString(16)}function ku(e){return yt(e)/255}function yt(e){return parseInt(e,16)}function Bb(e){return{r:e>>16,g:(e&65280)>>8,b:e&255}}var Ws={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Bt(e){var t={r:0,g:0,b:0},n=1,r=null,o=null,a=null,i=!1,s=!1;return typeof e=="string"&&(e=Fb(e)),typeof e=="object"&&(un(e.r)&&un(e.g)&&un(e.b)?(t=Ab(e.r,e.g,e.b),i=!0,s=String(e.r).substr(-1)==="%"?"prgb":"rgb"):un(e.h)&&un(e.s)&&un(e.v)?(r=Ca(e.s),o=Ca(e.v),t=$b(e.h,r,o),i=!0,s="hsv"):un(e.h)&&un(e.s)&&un(e.l)&&(r=Ca(e.s),a=Ca(e.l),t=Db(e.h,r,a),i=!0,s="hsl"),Object.prototype.hasOwnProperty.call(e,"a")&&(n=e.a)),n=eh(n),{ok:i,format:e.format||s,r:Math.min(255,Math.max(t.r,0)),g:Math.min(255,Math.max(t.g,0)),b:Math.min(255,Math.max(t.b,0)),a:n}}var zb="[-\\+]?\\d+%?",Vb="[-\\+]?\\d*\\.\\d+%?",_n="(?:".concat(Vb,")|(?:").concat(zb,")"),es="[\\s|\\(]+(".concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")\\s*\\)?"),ts="[\\s|\\(]+(".concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")[,|\\s]+(").concat(_n,")\\s*\\)?"),Dt={CSS_UNIT:new RegExp(_n),rgb:new RegExp("rgb"+es),rgba:new RegExp("rgba"+ts),hsl:new RegExp("hsl"+es),hsla:new RegExp("hsla"+ts),hsv:new RegExp("hsv"+es),hsva:new RegExp("hsva"+ts),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})$/};function Fb(e){if(e=e.trim().toLowerCase(),e.length===0)return!1;var t=!1;if(Ws[e])e=Ws[e],t=!0;else if(e==="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var n=Dt.rgb.exec(e);return n?{r:n[1],g:n[2],b:n[3]}:(n=Dt.rgba.exec(e),n?{r:n[1],g:n[2],b:n[3],a:n[4]}:(n=Dt.hsl.exec(e),n?{h:n[1],s:n[2],l:n[3]}:(n=Dt.hsla.exec(e),n?{h:n[1],s:n[2],l:n[3],a:n[4]}:(n=Dt.hsv.exec(e),n?{h:n[1],s:n[2],v:n[3]}:(n=Dt.hsva.exec(e),n?{h:n[1],s:n[2],v:n[3],a:n[4]}:(n=Dt.hex8.exec(e),n?{r:yt(n[1]),g:yt(n[2]),b:yt(n[3]),a:ku(n[4]),format:t?"name":"hex8"}:(n=Dt.hex6.exec(e),n?{r:yt(n[1]),g:yt(n[2]),b:yt(n[3]),format:t?"name":"hex"}:(n=Dt.hex4.exec(e),n?{r:yt(n[1]+n[1]),g:yt(n[2]+n[2]),b:yt(n[3]+n[3]),a:ku(n[4]+n[4]),format:t?"name":"hex8"}:(n=Dt.hex3.exec(e),n?{r:yt(n[1]+n[1]),g:yt(n[2]+n[2]),b:yt(n[3]+n[3]),format:t?"name":"hex"}:!1)))))))))}function un(e){return!!Dt.CSS_UNIT.exec(String(e))}var wt=function(){function e(t,n){t===void 0&&(t=""),n===void 0&&(n={});var r;if(t instanceof e)return t;typeof t=="number"&&(t=Bb(t)),this.originalInput=t;var o=Bt(t);this.originalInput=t,this.r=o.r,this.g=o.g,this.b=o.b,this.a=o.a,this.roundA=Math.round(100*this.a)/100,this.format=(r=n.format)!==null&&r!==void 0?r:o.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=o.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var t=this.toRgb();return(t.r*299+t.g*587+t.b*114)/1e3},e.prototype.getLuminance=function(){var t=this.toRgb(),n,r,o,a=t.r/255,i=t.g/255,s=t.b/255;return a<=.03928?n=a/12.92:n=Math.pow((a+.055)/1.055,2.4),i<=.03928?r=i/12.92:r=Math.pow((i+.055)/1.055,2.4),s<=.03928?o=s/12.92:o=Math.pow((s+.055)/1.055,2.4),.2126*n+.7152*r+.0722*o},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(t){return this.a=eh(t),this.roundA=Math.round(100*this.a)/100,this},e.prototype.isMonochrome=function(){var t=this.toHsl().s;return t===0},e.prototype.toHsv=function(){var t=Qa(this.r,this.g,this.b);return{h:t.h*360,s:t.s,v:t.v,a:this.a}},e.prototype.toHsvString=function(){var t=Qa(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.v*100);return this.a===1?"hsv(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsva(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var t=Pu(this.r,this.g,this.b);return{h:t.h*360,s:t.s,l:t.l,a:this.a}},e.prototype.toHslString=function(){var t=Pu(this.r,this.g,this.b),n=Math.round(t.h*360),r=Math.round(t.s*100),o=Math.round(t.l*100);return this.a===1?"hsl(".concat(n,", ").concat(r,"%, ").concat(o,"%)"):"hsla(".concat(n,", ").concat(r,"%, ").concat(o,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(t){return t===void 0&&(t=!1),Za(this.r,this.g,this.b,t)},e.prototype.toHexString=function(t){return t===void 0&&(t=!1),"#"+this.toHex(t)},e.prototype.toHex8=function(t){return t===void 0&&(t=!1),Ib(this.r,this.g,this.b,this.a,t)},e.prototype.toHex8String=function(t){return t===void 0&&(t=!1),"#"+this.toHex8(t)},e.prototype.toHexShortString=function(t){return t===void 0&&(t=!1),this.a===1?this.toHexString(t):this.toHex8String(t)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var t=Math.round(this.r),n=Math.round(this.g),r=Math.round(this.b);return this.a===1?"rgb(".concat(t,", ").concat(n,", ").concat(r,")"):"rgba(".concat(t,", ").concat(n,", ").concat(r,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var t=function(n){return"".concat(Math.round(tt(n,255)*100),"%")};return{r:t(this.r),g:t(this.g),b:t(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var t=function(n){return Math.round(tt(n,255)*100)};return this.a===1?"rgb(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%)"):"rgba(".concat(t(this.r),"%, ").concat(t(this.g),"%, ").concat(t(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(this.a===0)return"transparent";if(this.a<1)return!1;for(var t="#"+Za(this.r,this.g,this.b,!1),n=0,r=Object.entries(Ws);n<r.length;n++){var o=r[n],a=o[0],i=o[1];if(t===i)return a}return!1},e.prototype.toString=function(t){var n=!!t;t=t??this.format;var r=!1,o=this.a<1&&this.a>=0,a=!n&&o&&(t.startsWith("hex")||t==="name");return a?t==="name"&&this.a===0?this.toName():this.toRgbString():(t==="rgb"&&(r=this.toRgbString()),t==="prgb"&&(r=this.toPercentageRgbString()),(t==="hex"||t==="hex6")&&(r=this.toHexString()),t==="hex3"&&(r=this.toHexString(!0)),t==="hex4"&&(r=this.toHex8String(!0)),t==="hex8"&&(r=this.toHex8String()),t==="name"&&(r=this.toName()),t==="hsl"&&(r=this.toHslString()),t==="hsv"&&(r=this.toHsvString()),r||this.toHexString())},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=xa(n.l),new e(n)},e.prototype.brighten=function(t){t===void 0&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*-(t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*-(t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*-(t/100)))),new e(n)},e.prototype.darken=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=xa(n.l),new e(n)},e.prototype.tint=function(t){return t===void 0&&(t=10),this.mix("white",t)},e.prototype.shade=function(t){return t===void 0&&(t=10),this.mix("black",t)},e.prototype.desaturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=xa(n.s),new e(n)},e.prototype.saturate=function(t){t===void 0&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=xa(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){n===void 0&&(n=50);var r=this.toRgb(),o=new e(t).toRgb(),a=n/100,i={r:(o.r-r.r)*a+r.r,g:(o.g-r.g)*a+r.g,b:(o.b-r.b)*a+r.b,a:(o.a-r.a)*a+r.a};return new e(i)},e.prototype.analogous=function(t,n){t===void 0&&(t=6),n===void 0&&(n=30);var r=this.toHsl(),o=360/n,a=[this];for(r.h=(r.h-(o*t>>1)+720)%360;--t;)r.h=(r.h+o)%360,a.push(new e(r));return a},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){t===void 0&&(t=6);for(var n=this.toHsv(),r=n.h,o=n.s,a=n.v,i=[],s=1/t;t--;)i.push(new e({h:r,s:o,v:a})),a=(a+s)%1;return i},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb(),o=n.a+r.a*(1-n.a);return new e({r:(n.r*n.a+r.r*r.a*(1-n.a))/o,g:(n.g*n.a+r.g*r.a*(1-n.a))/o,b:(n.b*n.a+r.b*r.a*(1-n.a))/o,a:o})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,o=[this],a=360/t,i=1;i<t;i++)o.push(new e({h:(r+i*a)%360,s:n.s,l:n.l}));return o},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}(),Oa=2,ju=.16,Hb=.05,Ub=.05,Wb=.15,th=5,nh=4,Gb=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Mu(e){var t=e.r,n=e.g,r=e.b,o=Qa(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Ea(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Za(t,n,r,!1))}function Kb(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Au(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-Oa*t:Math.round(e.h)+Oa*t:r=n?Math.round(e.h)+Oa*t:Math.round(e.h)-Oa*t,r<0?r+=360:r>=360&&(r-=360),r}function Du(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-ju*t:t===nh?r=e.s+ju:r=e.s+Hb*t,r>1&&(r=1),n&&t===th&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function $u(e,t,n){var r;return n?r=e.v+Ub*t:r=e.v-Wb*t,r>1&&(r=1),Number(r.toFixed(2))}function Gs(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Bt(e),o=th;o>0;o-=1){var a=Mu(r),i=Ea(Bt({h:Au(a,o,!0),s:Du(a,o,!0),v:$u(a,o,!0)}));n.push(i)}n.push(Ea(r));for(var s=1;s<=nh;s+=1){var l=Mu(r),c=Ea(Bt({h:Au(l,s),s:Du(l,s),v:$u(l,s)}));n.push(c)}return t.theme==="dark"?Gb.map(function(u){var d=u.index,f=u.opacity,p=Ea(Kb(Bt(t.backgroundColor||"#141414"),Bt(n[d]),f*100));return p}):n}var ns={red:"#F5222D",volcano:"#FA541C",orange:"#FA8C16",gold:"#FAAD14",yellow:"#FADB14",lime:"#A0D911",green:"#52C41A",cyan:"#13C2C2",blue:"#1890FF",geekblue:"#2F54EB",purple:"#722ED1",magenta:"#EB2F96",grey:"#666666"},rs={},os={};Object.keys(ns).forEach(function(e){rs[e]=Gs(ns[e]),rs[e].primary=rs[e][5],os[e]=Gs(ns[e],{theme:"dark",backgroundColor:"#141414"}),os[e].primary=os[e][5]});var Ks={},Zl=[],qb=function(t){Zl.push(t)};function ec(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Zl.reduce(function(r,o){return o(r??"","warning")},t);n&&console.error("Warning: ".concat(n))}}function Yb(e,t){if("{}".NODE_ENV!=="production"&&!e&&console!==void 0){var n=Zl.reduce(function(r,o){return o(r??"","note")},t);n&&console.warn("Note: ".concat(n))}}function rh(){Ks={}}function oh(e,t,n){!t&&!Ks[n]&&(e(!1,n),Ks[n]=!0)}function Mn(e,t){oh(ec,e,t)}function Xb(e,t){oh(Yb,e,t)}Mn.preMessage=qb;Mn.resetWarned=rh;Mn.noteOnce=Xb;function en(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function Jb(e,t){if(!e)return!1;if(e.contains)return e.contains(t);for(var n=t;n;){if(n===e)return!0;n=n.parentNode}return!1}var Iu="data-rc-order",Lu="data-rc-priority",Qb="rc-util-key",qs=new Map;function ah(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=e.mark;return t?t.startsWith("data-")?t:"data-".concat(t):Qb}function yi(e){if(e.attachTo)return e.attachTo;var t=document.querySelector("head");return t||document.body}function Zb(e){return e==="queue"?"prependQueue":e?"prepend":"append"}function ih(e){return Array.from((qs.get(e)||e).children).filter(function(t){return t.tagName==="STYLE"})}function sh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!en())return null;var n=t.csp,r=t.prepend,o=t.priority,a=o===void 0?0:o,i=Zb(r),s=i==="prependQueue",l=document.createElement("style");l.setAttribute(Iu,i),s&&a&&l.setAttribute(Lu,"".concat(a)),n!=null&&n.nonce&&(l.nonce=n==null?void 0:n.nonce),l.innerHTML=e;var c=yi(t),u=c.firstChild;if(r){if(s){var d=ih(c).filter(function(f){if(!["prepend","prependQueue"].includes(f.getAttribute(Iu)))return!1;var p=Number(f.getAttribute(Lu)||0);return a>=p});if(d.length)return c.insertBefore(l,d[d.length-1].nextSibling),l}c.insertBefore(l,u)}else c.appendChild(l);return l}function lh(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=yi(t);return ih(n).find(function(r){return r.getAttribute(ah(t))===e})}function ch(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=lh(e,t);if(n){var r=yi(t);r.removeChild(n)}}function e0(e,t){var n=qs.get(e);if(!n||!Jb(document,n)){var r=sh("",t),o=r.parentNode;qs.set(e,o),e.removeChild(r)}}function Do(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=yi(n);e0(r,n);var o=lh(t,n);if(o){var a,i;if((a=n.csp)!==null&&a!==void 0&&a.nonce&&o.nonce!==((i=n.csp)===null||i===void 0?void 0:i.nonce)){var s;o.nonce=(s=n.csp)===null||s===void 0?void 0:s.nonce}return o.innerHTML!==e&&(o.innerHTML=e),o}var l=sh(e,n);return l.setAttribute(ah(n),t),l}function t0(e,t){Mn(e,"[@ant-design/icons] ".concat(t))}function Bu(e){return Oe(e)==="object"&&typeof e.name=="string"&&typeof e.theme=="string"&&(Oe(e.icon)==="object"||typeof e.icon=="function")}function zu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};return Object.keys(e).reduce(function(t,n){var r=e[n];switch(n){case"class":t.className=r,delete t.class;break;default:t[n]=r}return t},{})}function Ys(e,t,n){return n?h.createElement(e.tag,H(H({key:t},zu(e.attrs)),n),(e.children||[]).map(function(r,o){return Ys(r,"".concat(t,"-").concat(e.tag,"-").concat(o))})):h.createElement(e.tag,H({key:t},zu(e.attrs)),(e.children||[]).map(function(r,o){return Ys(r,"".concat(t,"-").concat(e.tag,"-").concat(o))}))}function uh(e){return Gs(e)[0]}function dh(e){return e?Array.isArray(e)?e:[e]:[]}var n0=`
33
33
  .anticon {
34
34
  display: inline-block;
35
35
  color: inherit;
@@ -83,16 +83,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
83
83
  transform: rotate(360deg);
84
84
  }
85
85
  }
86
- `,Zb=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Qb,n=g.useContext(Gp),r=n.csp;g.useEffect(function(){Do(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},e0=["icon","className","onClick","style","primaryColor","secondaryColor"],Co={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function t0(e){var t=e.primaryColor,n=e.secondaryColor;Co.primaryColor=t,Co.secondaryColor=n||lh(t),Co.calculated=!!n}function n0(){return H({},Co)}var bi=function(t){var n=t.icon,r=t.className,o=t.onClick,a=t.style,i=t.primaryColor,s=t.secondaryColor,l=Rr(t,e0),c=Co;if(i&&(c={primaryColor:i,secondaryColor:s||lh(i)}),Zb(),Jb(Iu(n),"icon should be icon definiton, but got ".concat(n)),!Iu(n))return null;var u=n;return u&&typeof u.icon=="function"&&(u=H(H({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),Ys(u.icon,"svg-".concat(u.name),H({className:r,onClick:o,style:a,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l))};bi.displayName="IconReact";bi.getTwoToneColors=n0;bi.setTwoToneColors=t0;const ec=bi;function uh(e){var t=ch(e),n=Se(t,2),r=n[0],o=n[1];return ec.setTwoToneColors({primaryColor:r,secondaryColor:o})}function r0(){var e=ec.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var o0=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];uh("#1890ff");var wi=W.forwardRef(function(e,t){var n,r=e.className,o=e.icon,a=e.spin,i=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,u=Rr(e,o0),d=W.useContext(Gp),f=d.prefixCls,p=f===void 0?"anticon":f,h=d.rootClassName,m=Ql(h,p,(n={},ae(n,"".concat(p,"-").concat(o.name),!!o.name),ae(n,"".concat(p,"-spin"),!!a||o.name==="loading"),n),r),b=s;b===void 0&&l&&(b=-1);var y=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,S=ch(c),E=Se(S,2),x=E[0],v=E[1];return w("span",{...H(H({role:"img","aria-label":o.name},u),{},{ref:t,tabIndex:b,onClick:l,className:m}),children:w(ec,{icon:o,primaryColor:x,secondaryColor:v,style:y})})});wi.displayName="AntdIcon";wi.getTwoToneColor=r0;wi.setTwoToneColor=uh;const st=wi;var a0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};const i0=a0;var dh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:i0})})};dh.displayName="ApartmentOutlined";const s0=W.forwardRef(dh);var l0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const c0=l0;var fh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:c0})})};fh.displayName="AppstoreAddOutlined";const u0=W.forwardRef(fh);var d0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"};const f0=d0;var ph=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:f0})})};ph.displayName="CloseOutlined";const p0=W.forwardRef(ph);var h0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const g0=h0;var hh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:g0})})};hh.displayName="CopyOutlined";const gh=W.forwardRef(hh);var v0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const m0=v0;var vh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:m0})})};vh.displayName="DatabaseOutlined";const y0=W.forwardRef(vh);var b0={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"};const w0=b0;var mh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:w0})})};mh.displayName="DeleteOutlined";const tc=W.forwardRef(mh);var S0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const x0=S0;var yh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:x0})})};yh.displayName="DoubleRightOutlined";const C0=W.forwardRef(yh);var O0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};const E0=O0;var bh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:E0})})};bh.displayName="EyeInvisibleOutlined";const wh=W.forwardRef(bh);var _0={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"};const R0=_0;var Sh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:R0})})};Sh.displayName="EyeOutlined";const N0=W.forwardRef(Sh);var T0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const P0=T0;var xh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:P0})})};xh.displayName="MinusCircleOutlined";const k0=W.forwardRef(xh);var j0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const M0=j0;var Ch=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:M0})})};Ch.displayName="MinusOutlined";const Oh=W.forwardRef(Ch);var A0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M176 474h672q8 0 8 8v60q0 8-8 8H176q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const D0=A0;var Eh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:D0})})};Eh.displayName="PlusOutlined";const nc=W.forwardRef(Eh);var $0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"}}]},name:"pushpin",theme:"outlined"};const I0=$0;var _h=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:I0})})};_h.displayName="PushpinOutlined";const L0=W.forwardRef(_h);var B0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const z0=B0;var Rh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:z0})})};Rh.displayName="RightOutlined";const F0=W.forwardRef(Rh);var V0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};const H0=V0;var Nh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:H0})})};Nh.displayName="SwapOutlined";const U0=W.forwardRef(Nh);function Th(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Th(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function dt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=Th(e))&&(r&&(r+=" "),r+=t);return r}function ei(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const rc=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},ti=e=>{const t=[],n=[];return Object.keys(e).forEach(o=>{const a=e[o];ye.isExpression(a)?n.push({key:o,value:a}):t.push({key:o,value:a})}),{normalProperty:t,expressionProperty:n}},Ph=(e,t)=>{const n={class:e,value:[]},r=[];return Object.keys(t).forEach(o=>{const a=t[o],i={state:o,media:[],style:(a==null?void 0:a.normal)||{}};Object.keys(a||{}).forEach(s=>{s!=="normal"&&i.media.push({type:"max-width",value:s,style:(a==null?void 0:a[s])||{}})}),r.push(i)}),n.value=r,n},kh=e=>{if(!e)return{};const t=e.value,n={};return t.forEach(r=>{const o={normal:r.style};r.media.forEach(a=>{o[a.value]=a.style}),n[r.state]=o}),n};var W0=Object.defineProperty,G0=(e,t,n)=>t in e?W0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,J=(e,t,n)=>(G0(e,typeof t!="symbol"?t+"":t,n),n);const K0=e=>()=>{console.warn(`${e} need to be implement getComponent`)},q0=["customPageRootRender"],Bu=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],Y0=e=>[...Bu,...q0].reduce((t,n)=>{var r;return e!=null&&e[n]?t[n]=(r=e[n])==null?void 0:r.bind(e):Bu.includes(n)&&(t[n]=K0),t},{});var X0=Object.defineProperty,J0=(e,t,n)=>t in e?X0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t,n)=>(J0(e,typeof t!="symbol"?t+"":t,n),n),Q0=typeof global=="object"&&global&&global.Object===Object&&global;const jh=Q0;var Z0=typeof self=="object"&&self&&self.Object===Object&&self,e1=jh||Z0||Function("return this")();const tn=e1;var t1=tn.Symbol;const Pt=t1;var Mh=Object.prototype,n1=Mh.hasOwnProperty,r1=Mh.toString,ho=Pt?Pt.toStringTag:void 0;function o1(e){var t=n1.call(e,ho),n=e[ho];try{e[ho]=void 0;var r=!0}catch{}var o=r1.call(e);return r&&(t?e[ho]=n:delete e[ho]),o}var a1=Object.prototype,i1=a1.toString;function s1(e){return i1.call(e)}var l1="[object Null]",c1="[object Undefined]",zu=Pt?Pt.toStringTag:void 0;function tr(e){return e==null?e===void 0?c1:l1:zu&&zu in Object(e)?o1(e):s1(e)}function Zt(e){return e!=null&&typeof e=="object"}var u1="[object Symbol]";function oc(e){return typeof e=="symbol"||Zt(e)&&tr(e)==u1}function ac(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var d1=Array.isArray;const Be=d1;var f1=1/0,Fu=Pt?Pt.prototype:void 0,Vu=Fu?Fu.toString:void 0;function Ah(e){if(typeof e=="string")return e;if(Be(e))return ac(e,Ah)+"";if(oc(e))return Vu?Vu.call(e):"";var t=e+"";return t=="0"&&1/e==-f1?"-0":t}function Ht(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function ic(e){return e}var p1="[object AsyncFunction]",h1="[object Function]",g1="[object GeneratorFunction]",v1="[object Proxy]";function sc(e){if(!Ht(e))return!1;var t=tr(e);return t==h1||t==g1||t==p1||t==v1}var m1=tn["__core-js_shared__"];const as=m1;var Hu=function(){var e=/[^.]+$/.exec(as&&as.keys&&as.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function y1(e){return!!Hu&&Hu in e}var b1=Function.prototype,w1=b1.toString;function nr(e){if(e!=null){try{return w1.call(e)}catch{}try{return e+""}catch{}}return""}var S1=/[\\^$.*+?()[\]{}|]/g,x1=/^\[object .+?Constructor\]$/,C1=Function.prototype,O1=Object.prototype,E1=C1.toString,_1=O1.hasOwnProperty,R1=RegExp("^"+E1.call(_1).replace(S1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function N1(e){if(!Ht(e)||y1(e))return!1;var t=sc(e)?R1:x1;return t.test(nr(e))}function T1(e,t){return e==null?void 0:e[t]}function rr(e,t){var n=T1(e,t);return N1(n)?n:void 0}var P1=rr(tn,"WeakMap");const Xs=P1;var Uu=Object.create,k1=function(){function e(){}return function(t){if(!Ht(t))return{};if(Uu)return Uu(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const j1=k1;function M1(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function A1(){}function Dh(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var D1=800,$1=16,I1=Date.now;function L1(e){var t=0,n=0;return function(){var r=I1(),o=$1-(r-n);if(n=r,o>0){if(++t>=D1)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function B1(e){return function(){return e}}var z1=function(){try{var e=rr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ni=z1;var F1=ni?function(e,t){return ni(e,"toString",{configurable:!0,enumerable:!1,value:B1(t),writable:!0})}:ic;const V1=F1;var H1=L1(V1);const $h=H1;function U1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function W1(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function G1(e){return e!==e}function K1(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function q1(e,t,n){return t===t?K1(e,t,n):W1(e,G1,n)}function Y1(e,t){var n=e==null?0:e.length;return!!n&&q1(e,t,0)>-1}var X1=9007199254740991,J1=/^(?:0|[1-9]\d*)$/;function Si(e,t){var n=typeof e;return t=t??X1,!!t&&(n=="number"||n!="symbol"&&J1.test(e))&&e>-1&&e%1==0&&e<t}function lc(e,t,n){t=="__proto__"&&ni?ni(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Qo(e,t){return e===t||e!==e&&t!==t}var Q1=Object.prototype,Z1=Q1.hasOwnProperty;function cc(e,t,n){var r=e[t];(!(Z1.call(e,t)&&Qo(r,n))||n===void 0&&!(t in e))&&lc(e,t,n)}function Ur(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?lc(n,s,l):cc(n,s,l)}return n}var Wu=Math.max;function Ih(e,t,n){return t=Wu(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Wu(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),M1(e,this,s)}}function Lh(e,t){return $h(Ih(e,t,ic),e+"")}var ew=9007199254740991;function uc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ew}function xi(e){return e!=null&&uc(e.length)&&!sc(e)}function tw(e,t,n){if(!Ht(n))return!1;var r=typeof t;return(r=="number"?xi(n)&&Si(t,n.length):r=="string"&&t in n)?Qo(n[t],e):!1}function nw(e){return Lh(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&tw(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var rw=Object.prototype;function dc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||rw;return e===n}function ow(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var aw="[object Arguments]";function Gu(e){return Zt(e)&&tr(e)==aw}var Bh=Object.prototype,iw=Bh.hasOwnProperty,sw=Bh.propertyIsEnumerable,lw=Gu(function(){return arguments}())?Gu:function(e){return Zt(e)&&iw.call(e,"callee")&&!sw.call(e,"callee")};const $o=lw;function cw(){return!1}var zh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ku=zh&&typeof module=="object"&&module&&!module.nodeType&&module,uw=Ku&&Ku.exports===zh,qu=uw?tn.Buffer:void 0,dw=qu?qu.isBuffer:void 0,fw=dw||cw;const Io=fw;var pw="[object Arguments]",hw="[object Array]",gw="[object Boolean]",vw="[object Date]",mw="[object Error]",yw="[object Function]",bw="[object Map]",ww="[object Number]",Sw="[object Object]",xw="[object RegExp]",Cw="[object Set]",Ow="[object String]",Ew="[object WeakMap]",_w="[object ArrayBuffer]",Rw="[object DataView]",Nw="[object Float32Array]",Tw="[object Float64Array]",Pw="[object Int8Array]",kw="[object Int16Array]",jw="[object Int32Array]",Mw="[object Uint8Array]",Aw="[object Uint8ClampedArray]",Dw="[object Uint16Array]",$w="[object Uint32Array]",Ce={};Ce[Nw]=Ce[Tw]=Ce[Pw]=Ce[kw]=Ce[jw]=Ce[Mw]=Ce[Aw]=Ce[Dw]=Ce[$w]=!0;Ce[pw]=Ce[hw]=Ce[_w]=Ce[gw]=Ce[Rw]=Ce[vw]=Ce[mw]=Ce[yw]=Ce[bw]=Ce[ww]=Ce[Sw]=Ce[xw]=Ce[Cw]=Ce[Ow]=Ce[Ew]=!1;function Iw(e){return Zt(e)&&uc(e.length)&&!!Ce[tr(e)]}function fc(e){return function(t){return e(t)}}var Fh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Oo=Fh&&typeof module=="object"&&module&&!module.nodeType&&module,Lw=Oo&&Oo.exports===Fh,is=Lw&&jh.process,Bw=function(){try{var e=Oo&&Oo.require&&Oo.require("util").types;return e||is&&is.binding&&is.binding("util")}catch{}}();const Nr=Bw;var Yu=Nr&&Nr.isTypedArray,zw=Yu?fc(Yu):Iw;const pc=zw;var Fw=Object.prototype,Vw=Fw.hasOwnProperty;function Vh(e,t){var n=Be(e),r=!n&&$o(e),o=!n&&!r&&Io(e),a=!n&&!r&&!o&&pc(e),i=n||r||o||a,s=i?ow(e.length,String):[],l=s.length;for(var c in e)(t||Vw.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Si(c,l)))&&s.push(c);return s}function Hh(e,t){return function(n){return e(t(n))}}var Hw=Hh(Object.keys,Object);const Uw=Hw;var Ww=Object.prototype,Gw=Ww.hasOwnProperty;function Kw(e){if(!dc(e))return Uw(e);var t=[];for(var n in Object(e))Gw.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ci(e){return xi(e)?Vh(e):Kw(e)}function qw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Yw=Object.prototype,Xw=Yw.hasOwnProperty;function Jw(e){if(!Ht(e))return qw(e);var t=dc(e),n=[];for(var r in e)r=="constructor"&&(t||!Xw.call(e,r))||n.push(r);return n}function Zo(e){return xi(e)?Vh(e,!0):Jw(e)}var Qw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zw=/^\w*$/;function hc(e,t){if(Be(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||oc(e)?!0:Zw.test(e)||!Qw.test(e)||t!=null&&e in Object(t)}var eS=rr(Object,"create");const Lo=eS;function tS(){this.__data__=Lo?Lo(null):{},this.size=0}function nS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var rS="__lodash_hash_undefined__",oS=Object.prototype,aS=oS.hasOwnProperty;function iS(e){var t=this.__data__;if(Lo){var n=t[e];return n===rS?void 0:n}return aS.call(t,e)?t[e]:void 0}var sS=Object.prototype,lS=sS.hasOwnProperty;function cS(e){var t=this.__data__;return Lo?t[e]!==void 0:lS.call(t,e)}var uS="__lodash_hash_undefined__";function dS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Lo&&t===void 0?uS:t,this}function Jn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jn.prototype.clear=tS;Jn.prototype.delete=nS;Jn.prototype.get=iS;Jn.prototype.has=cS;Jn.prototype.set=dS;function fS(){this.__data__=[],this.size=0}function Oi(e,t){for(var n=e.length;n--;)if(Qo(e[n][0],t))return n;return-1}var pS=Array.prototype,hS=pS.splice;function gS(e){var t=this.__data__,n=Oi(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():hS.call(t,n,1),--this.size,!0}function vS(e){var t=this.__data__,n=Oi(t,e);return n<0?void 0:t[n][1]}function mS(e){return Oi(this.__data__,e)>-1}function yS(e,t){var n=this.__data__,r=Oi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function vn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}vn.prototype.clear=fS;vn.prototype.delete=gS;vn.prototype.get=vS;vn.prototype.has=mS;vn.prototype.set=yS;var bS=rr(tn,"Map");const Bo=bS;function wS(){this.size=0,this.__data__={hash:new Jn,map:new(Bo||vn),string:new Jn}}function SS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ei(e,t){var n=e.__data__;return SS(t)?n[typeof t=="string"?"string":"hash"]:n.map}function xS(e){var t=Ei(this,e).delete(e);return this.size-=t?1:0,t}function CS(e){return Ei(this,e).get(e)}function OS(e){return Ei(this,e).has(e)}function ES(e,t){var n=Ei(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function mn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mn.prototype.clear=wS;mn.prototype.delete=xS;mn.prototype.get=CS;mn.prototype.has=OS;mn.prototype.set=ES;var _S="Expected a function";function gc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(_S);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(gc.Cache||mn),n}gc.Cache=mn;var RS=500;function NS(e){var t=gc(e,function(r){return n.size===RS&&n.clear(),r}),n=t.cache;return t}var TS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PS=/\\(\\)?/g,kS=NS(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(TS,function(n,r,o,a){t.push(o?a.replace(PS,"$1"):r||n)}),t});const jS=kS;function MS(e){return e==null?"":Ah(e)}function Wr(e,t){return Be(e)?e:hc(e,t)?[e]:jS(MS(e))}var AS=1/0;function Gr(e){if(typeof e=="string"||oc(e))return e;var t=e+"";return t=="0"&&1/e==-AS?"-0":t}function _i(e,t){t=Wr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Gr(t[n++])];return n&&n==r?e:void 0}function Uh(e,t,n){var r=e==null?void 0:_i(e,t);return r===void 0?n:r}function vc(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Xu=Pt?Pt.isConcatSpreadable:void 0;function DS(e){return Be(e)||$o(e)||!!(Xu&&e&&e[Xu])}function mc(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=DS),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?mc(s,t-1,n,r,o):vc(o,s):r||(o[o.length]=s)}return o}function $S(e){var t=e==null?0:e.length;return t?mc(e,1):[]}function IS(e){return $h(Ih(e,void 0,$S),e+"")}var LS=Hh(Object.getPrototypeOf,Object);const yc=LS;var BS="[object Object]",zS=Function.prototype,FS=Object.prototype,Wh=zS.toString,VS=FS.hasOwnProperty,HS=Wh.call(Object);function ht(e){if(!Zt(e)||tr(e)!=BS)return!1;var t=yc(e);if(t===null)return!0;var n=VS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Wh.call(n)==HS}function US(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function WS(){this.__data__=new vn,this.size=0}function GS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function KS(e){return this.__data__.get(e)}function qS(e){return this.__data__.has(e)}var YS=200;function XS(e,t){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!Bo||r.length<YS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new mn(r)}return n.set(e,t),this.size=n.size,this}function Bt(e){var t=this.__data__=new vn(e);this.size=t.size}Bt.prototype.clear=WS;Bt.prototype.delete=GS;Bt.prototype.get=KS;Bt.prototype.has=qS;Bt.prototype.set=XS;function JS(e,t){return e&&Ur(t,Ci(t),e)}function QS(e,t){return e&&Ur(t,Zo(t),e)}var Gh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ju=Gh&&typeof module=="object"&&module&&!module.nodeType&&module,ZS=Ju&&Ju.exports===Gh,Qu=ZS?tn.Buffer:void 0,Zu=Qu?Qu.allocUnsafe:void 0;function Kh(e,t){if(t)return e.slice();var n=e.length,r=Zu?Zu(n):new e.constructor(n);return e.copy(r),r}function ex(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function qh(){return[]}var tx=Object.prototype,nx=tx.propertyIsEnumerable,ed=Object.getOwnPropertySymbols,rx=ed?function(e){return e==null?[]:(e=Object(e),ex(ed(e),function(t){return nx.call(e,t)}))}:qh;const bc=rx;function ox(e,t){return Ur(e,bc(e),t)}var ax=Object.getOwnPropertySymbols,ix=ax?function(e){for(var t=[];e;)vc(t,bc(e)),e=yc(e);return t}:qh;const Yh=ix;function sx(e,t){return Ur(e,Yh(e),t)}function Xh(e,t,n){var r=t(e);return Be(e)?r:vc(r,n(e))}function Js(e){return Xh(e,Ci,bc)}function wc(e){return Xh(e,Zo,Yh)}var lx=rr(tn,"DataView");const Qs=lx;var cx=rr(tn,"Promise");const Zs=cx;var ux=rr(tn,"Set");const Er=ux;var td="[object Map]",dx="[object Object]",nd="[object Promise]",rd="[object Set]",od="[object WeakMap]",ad="[object DataView]",fx=nr(Qs),px=nr(Bo),hx=nr(Zs),gx=nr(Er),vx=nr(Xs),Vn=tr;(Qs&&Vn(new Qs(new ArrayBuffer(1)))!=ad||Bo&&Vn(new Bo)!=td||Zs&&Vn(Zs.resolve())!=nd||Er&&Vn(new Er)!=rd||Xs&&Vn(new Xs)!=od)&&(Vn=function(e){var t=tr(e),n=t==dx?e.constructor:void 0,r=n?nr(n):"";if(r)switch(r){case fx:return ad;case px:return td;case hx:return nd;case gx:return rd;case vx:return od}return t});const zo=Vn;var mx=Object.prototype,yx=mx.hasOwnProperty;function bx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&yx.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var wx=tn.Uint8Array;const ri=wx;function Sc(e){var t=new e.constructor(e.byteLength);return new ri(t).set(new ri(e)),t}function Sx(e,t){var n=t?Sc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var xx=/\w*$/;function Cx(e){var t=new e.constructor(e.source,xx.exec(e));return t.lastIndex=e.lastIndex,t}var id=Pt?Pt.prototype:void 0,sd=id?id.valueOf:void 0;function Ox(e){return sd?Object(sd.call(e)):{}}function Jh(e,t){var n=t?Sc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Ex="[object Boolean]",_x="[object Date]",Rx="[object Map]",Nx="[object Number]",Tx="[object RegExp]",Px="[object Set]",kx="[object String]",jx="[object Symbol]",Mx="[object ArrayBuffer]",Ax="[object DataView]",Dx="[object Float32Array]",$x="[object Float64Array]",Ix="[object Int8Array]",Lx="[object Int16Array]",Bx="[object Int32Array]",zx="[object Uint8Array]",Fx="[object Uint8ClampedArray]",Vx="[object Uint16Array]",Hx="[object Uint32Array]";function Ux(e,t,n){var r=e.constructor;switch(t){case Mx:return Sc(e);case Ex:case _x:return new r(+e);case Ax:return Sx(e,n);case Dx:case $x:case Ix:case Lx:case Bx:case zx:case Fx:case Vx:case Hx:return Jh(e,n);case Rx:return new r;case Nx:case kx:return new r(e);case Tx:return Cx(e);case Px:return new r;case jx:return Ox(e)}}function Qh(e){return typeof e.constructor=="function"&&!dc(e)?j1(yc(e)):{}}var Wx="[object Map]";function Gx(e){return Zt(e)&&zo(e)==Wx}var ld=Nr&&Nr.isMap,Kx=ld?fc(ld):Gx;const qx=Kx;var Yx="[object Set]";function Xx(e){return Zt(e)&&zo(e)==Yx}var cd=Nr&&Nr.isSet,Jx=cd?fc(cd):Xx;const Qx=Jx;var Zx=1,eC=2,tC=4,Zh="[object Arguments]",nC="[object Array]",rC="[object Boolean]",oC="[object Date]",aC="[object Error]",eg="[object Function]",iC="[object GeneratorFunction]",sC="[object Map]",lC="[object Number]",tg="[object Object]",cC="[object RegExp]",uC="[object Set]",dC="[object String]",fC="[object Symbol]",pC="[object WeakMap]",hC="[object ArrayBuffer]",gC="[object DataView]",vC="[object Float32Array]",mC="[object Float64Array]",yC="[object Int8Array]",bC="[object Int16Array]",wC="[object Int32Array]",SC="[object Uint8Array]",xC="[object Uint8ClampedArray]",CC="[object Uint16Array]",OC="[object Uint32Array]",be={};be[Zh]=be[nC]=be[hC]=be[gC]=be[rC]=be[oC]=be[vC]=be[mC]=be[yC]=be[bC]=be[wC]=be[sC]=be[lC]=be[tg]=be[cC]=be[uC]=be[dC]=be[fC]=be[SC]=be[xC]=be[CC]=be[OC]=!0;be[aC]=be[eg]=be[pC]=!1;function Eo(e,t,n,r,o,a){var i,s=t&Zx,l=t&eC,c=t&tC;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!Ht(e))return e;var u=Be(e);if(u){if(i=bx(e),!s)return Dh(e,i)}else{var d=zo(e),f=d==eg||d==iC;if(Io(e))return Kh(e,s);if(d==tg||d==Zh||f&&!o){if(i=l||f?{}:Qh(e),!s)return l?sx(e,QS(i,e)):ox(e,JS(i,e))}else{if(!be[d])return o?e:{};i=Ux(e,d,s)}}a||(a=new Bt);var p=a.get(e);if(p)return p;a.set(e,i),Qx(e)?e.forEach(function(b){i.add(Eo(b,t,n,b,e,a))}):qx(e)&&e.forEach(function(b,y){i.set(y,Eo(b,t,n,y,e,a))});var h=c?l?wc:Js:l?Zo:Ci,m=u?void 0:h(e);return U1(m||e,function(b,y){m&&(y=b,b=e[y]),cc(i,y,Eo(b,t,n,y,e,a))}),i}var EC=1,_C=4;function ng(e){return Eo(e,EC|_C)}var RC="__lodash_hash_undefined__";function NC(e){return this.__data__.set(e,RC),this}function TC(e){return this.__data__.has(e)}function Fo(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mn;++t<n;)this.add(e[t])}Fo.prototype.add=Fo.prototype.push=NC;Fo.prototype.has=TC;function PC(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function rg(e,t){return e.has(t)}var kC=1,jC=2;function og(e,t,n,r,o,a){var i=n&kC,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&jC?new Fo:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var h=e[d],m=t[d];if(r)var b=i?r(m,h,d,t,e,a):r(h,m,d,e,t,a);if(b!==void 0){if(b)continue;f=!1;break}if(p){if(!PC(t,function(y,S){if(!rg(p,S)&&(h===y||o(h,y,n,r,a)))return p.push(S)})){f=!1;break}}else if(!(h===m||o(h,m,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function MC(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function xc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var AC=1,DC=2,$C="[object Boolean]",IC="[object Date]",LC="[object Error]",BC="[object Map]",zC="[object Number]",FC="[object RegExp]",VC="[object Set]",HC="[object String]",UC="[object Symbol]",WC="[object ArrayBuffer]",GC="[object DataView]",ud=Pt?Pt.prototype:void 0,ss=ud?ud.valueOf:void 0;function KC(e,t,n,r,o,a,i){switch(n){case GC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case WC:return!(e.byteLength!=t.byteLength||!a(new ri(e),new ri(t)));case $C:case IC:case zC:return Qo(+e,+t);case LC:return e.name==t.name&&e.message==t.message;case FC:case HC:return e==t+"";case BC:var s=MC;case VC:var l=r&AC;if(s||(s=xc),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=DC,i.set(e,t);var u=og(s(e),s(t),r,o,a,i);return i.delete(e),u;case UC:if(ss)return ss.call(e)==ss.call(t)}return!1}var qC=1,YC=Object.prototype,XC=YC.hasOwnProperty;function JC(e,t,n,r,o,a){var i=n&qC,s=Js(e),l=s.length,c=Js(t),u=c.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var f=s[d];if(!(i?f in t:XC.call(t,f)))return!1}var p=a.get(e),h=a.get(t);if(p&&h)return p==t&&h==e;var m=!0;a.set(e,t),a.set(t,e);for(var b=i;++d<l;){f=s[d];var y=e[f],S=t[f];if(r)var E=i?r(S,y,f,t,e,a):r(y,S,f,e,t,a);if(!(E===void 0?y===S||o(y,S,n,r,a):E)){m=!1;break}b||(b=f=="constructor")}if(m&&!b){var x=e.constructor,v=t.constructor;x!=v&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof v=="function"&&v instanceof v)&&(m=!1)}return a.delete(e),a.delete(t),m}var QC=1,dd="[object Arguments]",fd="[object Array]",_a="[object Object]",ZC=Object.prototype,pd=ZC.hasOwnProperty;function eO(e,t,n,r,o,a){var i=Be(e),s=Be(t),l=i?fd:zo(e),c=s?fd:zo(t);l=l==dd?_a:l,c=c==dd?_a:c;var u=l==_a,d=c==_a,f=l==c;if(f&&Io(e)){if(!Io(t))return!1;i=!0,u=!1}if(f&&!u)return a||(a=new Bt),i||pc(e)?og(e,t,n,r,o,a):KC(e,t,l,n,r,o,a);if(!(n&QC)){var p=u&&pd.call(e,"__wrapped__"),h=d&&pd.call(t,"__wrapped__");if(p||h){var m=p?e.value():e,b=h?t.value():t;return a||(a=new Bt),o(m,b,n,r,a)}}return f?(a||(a=new Bt),JC(e,t,n,r,o,a)):!1}function Cc(e,t,n,r,o){return e===t?!0:e==null||t==null||!Zt(e)&&!Zt(t)?e!==e&&t!==t:eO(e,t,n,r,Cc,o)}var tO=1,nO=2;function rO(e,t,n,r){var o=n.length,a=o,i=!r;if(e==null)return!a;for(e=Object(e);o--;){var s=n[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=n[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new Bt;if(r)var f=r(c,u,l,e,t,d);if(!(f===void 0?Cc(u,c,tO|nO,r,d):f))return!1}}return!0}function ag(e){return e===e&&!Ht(e)}function oO(e){for(var t=Ci(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,ag(o)]}return t}function ig(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function aO(e){var t=oO(e);return t.length==1&&t[0][2]?ig(t[0][0],t[0][1]):function(n){return n===e||rO(n,e,t)}}function iO(e,t){return e!=null&&t in Object(e)}function sO(e,t,n){t=Wr(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var i=Gr(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&uc(o)&&Si(i,o)&&(Be(e)||$o(e)))}function lO(e,t){return e!=null&&sO(e,t,iO)}var cO=1,uO=2;function dO(e,t){return hc(e)&&ag(t)?ig(Gr(e),t):function(n){var r=Uh(n,e);return r===void 0&&r===t?lO(n,e):Cc(t,r,cO|uO)}}function fO(e){return function(t){return t==null?void 0:t[e]}}function pO(e){return function(t){return _i(t,e)}}function hO(e){return hc(e)?fO(Gr(e)):pO(e)}function Oc(e){return typeof e=="function"?e:e==null?ic:typeof e=="object"?Be(e)?dO(e[0],e[1]):aO(e):hO(e)}function gO(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var vO=gO();const mO=vO;function el(e,t,n){(n!==void 0&&!Qo(e[t],n)||n===void 0&&!(t in e))&&lc(e,t,n)}function tl(e){return Zt(e)&&xi(e)}function nl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function yO(e){return Ur(e,Zo(e))}function bO(e,t,n,r,o,a,i){var s=nl(e,n),l=nl(t,n),c=i.get(l);if(c){el(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Be(l),p=!f&&Io(l),h=!f&&!p&&pc(l);u=l,f||p||h?Be(s)?u=s:tl(s)?u=Dh(s):p?(d=!1,u=Kh(l,!0)):h?(d=!1,u=Jh(l,!0)):u=[]:ht(l)||$o(l)?(u=s,$o(s)?u=yO(s):(!Ht(s)||sc(s))&&(u=Qh(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),el(e,n,u)}function sg(e,t,n,r,o){e!==t&&mO(t,function(a,i){if(o||(o=new Bt),Ht(a))bO(e,t,i,n,sg,r,o);else{var s=r?r(nl(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),el(e,i,s)}},Zo)}function wO(e,t,n){for(var r=-1,o=e==null?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function lg(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function SO(e,t){return t.length<2?e:_i(e,US(t,0,-1))}var xO=nw(function(e,t,n){sg(e,t,n)});const cg=xO;var CO="Expected a function";function OO(e){if(typeof e!="function")throw new TypeError(CO);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function EO(e,t){return t=Wr(t,e),e=SO(e,t),e==null||delete e[Gr(lg(t))]}function _O(e){return ht(e)?void 0:e}var RO=1,NO=2,TO=4,PO=IS(function(e,t){var n={};if(e==null)return n;var r=!1;t=ac(t,function(a){return a=Wr(a,e),r||(r=a.length>1),a}),Ur(e,wc(e),n),r&&(n=Eo(n,RO|NO|TO,_O));for(var o=t.length;o--;)EO(n,t[o]);return n});const ug=PO;function kO(e,t,n,r){if(!Ht(e))return e;t=Wr(t,e);for(var o=-1,a=t.length,i=a-1,s=e;s!=null&&++o<a;){var l=Gr(t[o]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(o!=i){var u=s[l];c=r?r(u,l,s):void 0,c===void 0&&(c=Ht(u)?u:Si(t[o+1])?[]:{})}cc(s,l,c),s=s[l]}return e}function jO(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],s=_i(e,i);n(s,i)&&kO(a,Wr(i,e),s)}return a}function MO(e,t){if(e==null)return{};var n=ac(wc(e),function(r){return[r]});return t=Oc(t),jO(e,n,function(r,o){return t(r,o[0])})}function AO(e,t){return MO(e,OO(Oc(t)))}var DO=1/0,$O=Er&&1/xc(new Er([,-0]))[1]==DO?function(e){return new Er(e)}:A1;const IO=$O;var LO=200;function BO(e,t,n){var r=-1,o=Y1,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=wO;else if(a>=LO){var c=t?null:IO(e);if(c)return xc(c);i=!1,o=rg,l=new Fo}else l=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,i&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}var zO=Lh(function(e){var t=lg(e);return tl(t)&&(t=void 0),BO(mc(e,1,tl,!0),Oc(t))});const FO=zO;class dg extends TypeError{constructor(t,n){let r;const{message:o,...a}=t,{path:i}=t,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function VO(e){return zt(e)&&typeof e[Symbol.iterator]=="function"}function zt(e){return typeof e=="object"&&e!=null}function xt(e){return typeof e=="string"?JSON.stringify(e):""+e}function HO(e){const{done:t,value:n}=e.next();return t?void 0:n}function UO(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+xt(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*hd(e,t,n,r){VO(e)||(e=[e]);for(const o of e){const a=UO(o,t,n,r);a&&(yield a)}}function*Ec(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&zt(t.schema)&&zt(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=Ec(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):zt(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class nn{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return hd(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return hd(u,c,this,l)}:this.refiner=()=>[]}assert(t){return fg(t,this)}create(t){return WO(t,this)}is(t){return KO(t,this)}mask(t){return GO(t,this)}validate(t,n){return n===void 0&&(n={}),Kr(t,this,n)}}function fg(e,t){const n=Kr(e,t);if(n[0])throw n[0]}function WO(e,t){const n=Kr(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function GO(e,t){const n=Kr(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function KO(e,t){return!Kr(e,t)[0]}function Kr(e,t,n){n===void 0&&(n={});const r=Ec(e,t,n),o=HO(r);return o[0]?[new dg(o[0],function*(){for(const a of r)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function _c(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?vg(a):ge(a)}function An(e,t){return new nn({type:e,schema:null,validator:t})}function Tr(e){return new nn({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function pg(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return vg(r);default:return ge(r)}}function Le(){return An("any",()=>!0)}function Ae(e){return new nn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+xt(t)}})}function Pr(){return An("boolean",e=>typeof e=="boolean")}function rl(e){const t={},n=e.map(r=>xt(r)).join();for(const r of e)t[r]=r;return new nn({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+xt(r)}})}function hg(){return An("func",e=>typeof e=="function"||"Expected a function, but received: "+xt(e))}function ft(e){const t=xt(e),n=typeof e;return new nn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+xt(r)}})}function qO(){return An("never",()=>!1)}function gg(){return An("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+xt(e))}function ge(e){const t=e?Object.keys(e):[],n=qO();return new nn({type:"object",schema:e||null,*entries(r){if(e&&zt(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return zt(r)||"Expected an object, but received: "+xt(r)},coercer(r){return zt(r)?{...r}:r}})}function G(e){return new nn({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function _o(e,t){return new nn({type:"record",schema:null,*entries(n){if(zt(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return zt(n)||"Expected an object, but received: "+xt(n)}})}function U(){return An("string",e=>typeof e=="string"||"Expected a string, but received: "+xt(e))}function vg(e){const t=Object.keys(e);return new nn({type:"type",schema:e,*entries(n){if(zt(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return zt(n)||"Expected an object, but received: "+xt(n)}})}function pt(e){const t=e.map(n=>n.type).join(" | ");return new nn({type:"union",schema:null,coercer(n,r){return(e.find(o=>{const[a]=o.validate(n,{coerce:!0});return!a})||YO()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=Ec(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+xt(n),...o]}})}function YO(){return An("unknown",()=>!0)}const Rc=ge({package:U(),version:U(),name:U(),exportName:G(U()),destructuring:G(Pr()),subName:G(U()),main:G(U()),cssPaths:G(Ae(U()))}),XO=Ae(Rc),JO=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var Tt=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(Tt||{}),Nc=(e=>(e.DESIGN="design",e.SAVE="save",e))(Nc||{}),ol=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(ol||{});const QO=()=>An("normalObj",e=>!ht(e)||[Tt.SLOT,Tt.EXPRESSION,Tt.FUNCTION].includes(e==null?void 0:e.type)?!1:(Kr(e,_o(U(),Tc)),!0)),Tc=pt([U(),gg(),Pr(),ge({type:ft(Tt.SLOT),renderType:rl([ol.FUNC,ol.COMP]),params:G(Ae(U())),value:Tr(()=>pt([kr,Ae(kr)]))}),ge({type:ft(Tt.EXPRESSION),value:U()}),ge({type:ft(Tt.FUNCTION),value:U()}),QO(),Ae(Tr(()=>Tc))]),gd=ge({type:ft(Tt.EXPRESSION),value:U()}),kr=ge({id:G(U()),title:G(U()),componentName:U(),props:G(_o(U(),Tc)),nodeName:G(U()),state:G(_o(U(),Le())),children:Tr(()=>G(Ae(pt([U(),kr])))),configure:G(Le()),css:G(Le()),style:G(Le()),classNames:G(Ae(Le())),refId:G(U()),extra:G(_o(Le(),Le())),condition:G(pt([Pr(),gd])),loop:G(ge({open:Pr(),data:pt([Ae(Le()),gd]),args:G(Ae(U())),forName:G(U()),forIndex:G(U()),key:G(Le()),name:G(U())})),methods:G(Ae(Le()))}),oi=pt([U(),ge({label:U(),tip:G(U())})]),ZO=ge({type:ft("shape"),value:Ae(ge({name:U(),title:oi,valueType:Tr(()=>Ri)}))}),eE=ge({type:ft("enums"),value:Ae(U())});ge({type:ft("array"),value:Tr(()=>Ri)});const tE=ge({type:ft("array"),value:Tr(()=>Ae(Ri))}),Ri=pt([rl(["array","boolean","number","object","string"]),rl(["component","expression","function"]),ZO,eE,tE]),nE=pt([U(),ge({componentName:U(),props:G(Le()),initialValue:G(Le()),component:G(Le())})]),ls=ge({name:U(),title:oi,valueType:Ri,description:G(U()),defaultValue:Le(),setters:G(Ae(nE)),condition:G(hg())});pt([U(),hg()]);var al=(e=>(e.SINGLE="single",e.GROUP="group",e))(al||{});pt([U(),ge({name:U(),describe:G(U()),params:G(ge({name:U(),description:U()})),template:U()})]);const rE=ge({id:G(U()),title:U(),snapshot:pt([U(),Le()]),snapshotText:G(U()),description:G(U()),tags:G(Ae(U())),groupName:G(U()),category:G(U()),schema:_c(pg(kr,["id"]),ge({componentName:G(U())}))}),oE=ge({componentName:U(),title:U(),screenshot:G(U()),icon:G(U()),tags:G(Ae(U())),groupName:G(U()),category:G(U()),priority:G(gg()),npm:G(Rc),snippets:Ae(rE),props:Ae(pt([ls,ge({title:G(oi),type:ft("single"),content:ls}),ge({title:G(oi),type:ft("group"),content:Ae(ls)})])),fixedProps:G(Le()),isContainer:G(pt([Pr(),ge({placeholder:U(),width:U(),height:U()})])),disableEditorDragDom:G(Le()),isLayout:G(Pr()),rootSelector:G(U()),advanceCustom:G(Le()),extra:G(_o(Le(),Le()))}),aE=e=>({data:t,message:n,throwError:r})=>{const o=e({data:t,message:n,throwError:r});if(o.isValidate)return o;if(r)throw o.message||n?new Error(`${o.message||n}
86
+ `,r0=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:n0,n=h.useContext(Yp),r=n.csp;h.useEffect(function(){Do(t,"@ant-design-icons",{prepend:!0,csp:r})},[])},o0=["icon","className","onClick","style","primaryColor","secondaryColor"],Co={primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1};function a0(e){var t=e.primaryColor,n=e.secondaryColor;Co.primaryColor=t,Co.secondaryColor=n||uh(t),Co.calculated=!!n}function i0(){return H({},Co)}var bi=function(t){var n=t.icon,r=t.className,o=t.onClick,a=t.style,i=t.primaryColor,s=t.secondaryColor,l=Rr(t,o0),c=Co;if(i&&(c={primaryColor:i,secondaryColor:s||uh(i)}),r0(),t0(Bu(n),"icon should be icon definiton, but got ".concat(n)),!Bu(n))return null;var u=n;return u&&typeof u.icon=="function"&&(u=H(H({},u),{},{icon:u.icon(c.primaryColor,c.secondaryColor)})),Ys(u.icon,"svg-".concat(u.name),H({className:r,onClick:o,style:a,"data-icon":u.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"},l))};bi.displayName="IconReact";bi.getTwoToneColors=i0;bi.setTwoToneColors=a0;const tc=bi;function fh(e){var t=dh(e),n=Ce(t,2),r=n[0],o=n[1];return tc.setTwoToneColors({primaryColor:r,secondaryColor:o})}function s0(){var e=tc.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var l0=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];fh("#1890ff");var wi=U.forwardRef(function(e,t){var n,r=e.className,o=e.icon,a=e.spin,i=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,u=Rr(e,l0),d=U.useContext(Yp),f=d.prefixCls,p=f===void 0?"anticon":f,g=d.rootClassName,m=Ql(g,p,(n={},ae(n,"".concat(p,"-").concat(o.name),!!o.name),ae(n,"".concat(p,"-spin"),!!a||o.name==="loading"),n),r),b=s;b===void 0&&l&&(b=-1);var y=i?{msTransform:"rotate(".concat(i,"deg)"),transform:"rotate(".concat(i,"deg)")}:void 0,S=dh(c),E=Ce(S,2),x=E[0],v=E[1];return w("span",{...H(H({role:"img","aria-label":o.name},u),{},{ref:t,tabIndex:b,onClick:l,className:m}),children:w(tc,{icon:o,primaryColor:x,secondaryColor:v,style:y})})});wi.displayName="AntdIcon";wi.getTwoToneColor=s0;wi.setTwoToneColor=fh;const st=wi;var c0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908 640H804V488c0-4.4-3.6-8-8-8H548v-96h108c8.8 0 16-7.2 16-16V80c0-8.8-7.2-16-16-16H368c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h108v96H228c-4.4 0-8 3.6-8 8v152H116c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16H292v-88h440v88H620c-8.8 0-16 7.2-16 16v288c0 8.8 7.2 16 16 16h288c8.8 0 16-7.2 16-16V656c0-8.8-7.2-16-16-16zm-564 76v168H176V716h168zm84-408V140h168v168H428zm420 576H680V716h168v168z"}}]},name:"apartment",theme:"outlined"};const u0=c0;var ph=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:u0})})};ph.displayName="ApartmentOutlined";const d0=U.forwardRef(ph);var f0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M464 144H160c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H212V212h200v200zm452-268H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V160c0-8.8-7.2-16-16-16zm-52 268H612V212h200v200zm52 132H560c-8.8 0-16 7.2-16 16v304c0 8.8 7.2 16 16 16h304c8.8 0 16-7.2 16-16V560c0-8.8-7.2-16-16-16zm-52 268H612V612h200v200zM424 712H296V584c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v128H104c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h128v128c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V776h128c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"appstore-add",theme:"outlined"};const p0=f0;var hh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:p0})})};hh.displayName="AppstoreAddOutlined";const h0=U.forwardRef(hh);var g0={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"};const v0=g0;var gh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:v0})})};gh.displayName="CloseOutlined";const m0=U.forwardRef(gh);var y0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h496v688c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V96c0-17.7-14.3-32-32-32zM704 192H192c-17.7 0-32 14.3-32 32v530.7c0 8.5 3.4 16.6 9.4 22.6l173.3 173.3c2.2 2.2 4.7 4 7.4 5.5v1.9h4.2c3.5 1.3 7.2 2 11 2H704c17.7 0 32-14.3 32-32V224c0-17.7-14.3-32-32-32zM350 856.2L263.9 770H350v86.2zM664 888H414V746c0-22.1-17.9-40-40-40H232V264h432v624z"}}]},name:"copy",theme:"outlined"};const b0=y0;var vh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:b0})})};vh.displayName="CopyOutlined";const mh=U.forwardRef(vh);var w0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M832 64H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V96c0-17.7-14.3-32-32-32zm-600 72h560v208H232V136zm560 480H232V408h560v208zm0 272H232V680h560v208zM304 240a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0zm0 272a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"database",theme:"outlined"};const S0=w0;var yh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:S0})})};yh.displayName="DatabaseOutlined";const x0=U.forwardRef(yh);var C0={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"};const O0=C0;var bh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:O0})})};bh.displayName="DeleteOutlined";const nc=U.forwardRef(bh);var E0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M533.2 492.3L277.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H188c-6.7 0-10.4 7.7-6.3 12.9L447.1 512 181.7 851.1A7.98 7.98 0 00188 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5zm304 0L581.9 166.1c-3-3.9-7.7-6.1-12.6-6.1H492c-6.7 0-10.4 7.7-6.3 12.9L751.1 512 485.7 851.1A7.98 7.98 0 00492 864h77.3c4.9 0 9.6-2.3 12.6-6.1l255.3-326.1c9.1-11.7 9.1-27.9 0-39.5z"}}]},name:"double-right",theme:"outlined"};const _0=E0;var wh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:_0})})};wh.displayName="DoubleRightOutlined";const R0=U.forwardRef(wh);var N0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"};const T0=N0;var Sh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:T0})})};Sh.displayName="EyeInvisibleOutlined";const xh=U.forwardRef(Sh);var P0={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"};const k0=P0;var Ch=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:k0})})};Ch.displayName="EyeOutlined";const j0=U.forwardRef(Ch);var M0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{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 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"};const A0=M0;var Oh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:A0})})};Oh.displayName="MinusCircleOutlined";const D0=U.forwardRef(Oh);var $0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h720c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"minus",theme:"outlined"};const I0=$0;var Eh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:I0})})};Eh.displayName="MinusOutlined";const _h=U.forwardRef(Eh);var L0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8z"}},{tag:"path",attrs:{d:"M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8z"}}]},name:"plus",theme:"outlined"};const B0=L0;var Rh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:B0})})};Rh.displayName="PlusOutlined";const rc=U.forwardRef(Rh);var z0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M878.3 392.1L631.9 145.7c-6.5-6.5-15-9.7-23.5-9.7s-17 3.2-23.5 9.7L423.8 306.9c-12.2-1.4-24.5-2-36.8-2-73.2 0-146.4 24.1-206.5 72.3a33.23 33.23 0 00-2.7 49.4l181.7 181.7-215.4 215.2a15.8 15.8 0 00-4.6 9.8l-3.4 37.2c-.9 9.4 6.6 17.4 15.9 17.4.5 0 1 0 1.5-.1l37.2-3.4c3.7-.3 7.2-2 9.8-4.6l215.4-215.4 181.7 181.7c6.5 6.5 15 9.7 23.5 9.7 9.7 0 19.3-4.2 25.9-12.4 56.3-70.3 79.7-158.3 70.2-243.4l161.1-161.1c12.9-12.8 12.9-33.8 0-46.8zM666.2 549.3l-24.5 24.5 3.8 34.4a259.92 259.92 0 01-30.4 153.9L262 408.8c12.9-7.1 26.3-13.1 40.3-17.9 27.2-9.4 55.7-14.1 84.7-14.1 9.6 0 19.3.5 28.9 1.6l34.4 3.8 24.5-24.5L608.5 224 800 415.5 666.2 549.3z"}}]},name:"pushpin",theme:"outlined"};const V0=z0;var Nh=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:V0})})};Nh.displayName="PushpinOutlined";const F0=U.forwardRef(Nh);var H0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"};const U0=H0;var Th=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:U0})})};Th.displayName="RightOutlined";const W0=U.forwardRef(Th);var G0={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"};const K0=G0;var Ph=function(t,n){return w(st,{...H(H({},t),{},{ref:n,icon:K0})})};Ph.displayName="SwapOutlined";const q0=U.forwardRef(Ph);function kh(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=kh(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function dt(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=kh(e))&&(r&&(r+=" "),r+=t);return r}function ei(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const oc=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},ti=e=>{const t=[],n=[];return Object.keys(e).forEach(o=>{const a=e[o];be.isExpression(a)?n.push({key:o,value:a}):t.push({key:o,value:a})}),{normalProperty:t,expressionProperty:n}},jh=(e,t)=>{const n={class:e,value:[]},r=[];return Object.keys(t).forEach(o=>{const a=t[o],i={state:o,media:[],style:(a==null?void 0:a.normal)||{}};Object.keys(a||{}).forEach(s=>{s!=="normal"&&i.media.push({type:"max-width",value:s,style:(a==null?void 0:a[s])||{}})}),r.push(i)}),n.value=r,n},Mh=e=>{if(!e)return{};const t=e.value,n={};return t.forEach(r=>{const o={normal:r.style};r.media.forEach(a=>{o[a.value]=a.style}),n[r.state]=o}),n};var Y0=Object.defineProperty,X0=(e,t,n)=>t in e?Y0(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>(X0(e,typeof t!="symbol"?t+"":t,n),n);const J0=e=>()=>{console.warn(`${e} need to be implement getComponent`)},Q0=["customPageRootRender"],Vu=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],Z0=e=>[...Vu,...Q0].reduce((t,n)=>{var r;return e!=null&&e[n]?t[n]=(r=e[n])==null?void 0:r.bind(e):Vu.includes(n)&&(t[n]=J0),t},{});var e1=Object.defineProperty,t1=(e,t,n)=>t in e?e1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,oe=(e,t,n)=>(t1(e,typeof t!="symbol"?t+"":t,n),n),n1=typeof global=="object"&&global&&global.Object===Object&&global;const Ah=n1;var r1=typeof self=="object"&&self&&self.Object===Object&&self,o1=Ah||r1||Function("return this")();const tn=o1;var a1=tn.Symbol;const Pt=a1;var Dh=Object.prototype,i1=Dh.hasOwnProperty,s1=Dh.toString,ho=Pt?Pt.toStringTag:void 0;function l1(e){var t=i1.call(e,ho),n=e[ho];try{e[ho]=void 0;var r=!0}catch{}var o=s1.call(e);return r&&(t?e[ho]=n:delete e[ho]),o}var c1=Object.prototype,u1=c1.toString;function d1(e){return u1.call(e)}var f1="[object Null]",p1="[object Undefined]",Fu=Pt?Pt.toStringTag:void 0;function tr(e){return e==null?e===void 0?p1:f1:Fu&&Fu in Object(e)?l1(e):d1(e)}function Zt(e){return e!=null&&typeof e=="object"}var h1="[object Symbol]";function ac(e){return typeof e=="symbol"||Zt(e)&&tr(e)==h1}function ic(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var g1=Array.isArray;const Ve=g1;var v1=1/0,Hu=Pt?Pt.prototype:void 0,Uu=Hu?Hu.toString:void 0;function $h(e){if(typeof e=="string")return e;if(Ve(e))return ic(e,$h)+"";if(ac(e))return Uu?Uu.call(e):"";var t=e+"";return t=="0"&&1/e==-v1?"-0":t}function Ut(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function sc(e){return e}var m1="[object AsyncFunction]",y1="[object Function]",b1="[object GeneratorFunction]",w1="[object Proxy]";function lc(e){if(!Ut(e))return!1;var t=tr(e);return t==y1||t==b1||t==m1||t==w1}var S1=tn["__core-js_shared__"];const as=S1;var Wu=function(){var e=/[^.]+$/.exec(as&&as.keys&&as.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function x1(e){return!!Wu&&Wu in e}var C1=Function.prototype,O1=C1.toString;function nr(e){if(e!=null){try{return O1.call(e)}catch{}try{return e+""}catch{}}return""}var E1=/[\\^$.*+?()[\]{}|]/g,_1=/^\[object .+?Constructor\]$/,R1=Function.prototype,N1=Object.prototype,T1=R1.toString,P1=N1.hasOwnProperty,k1=RegExp("^"+T1.call(P1).replace(E1,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function j1(e){if(!Ut(e)||x1(e))return!1;var t=lc(e)?k1:_1;return t.test(nr(e))}function M1(e,t){return e==null?void 0:e[t]}function rr(e,t){var n=M1(e,t);return j1(n)?n:void 0}var A1=rr(tn,"WeakMap");const Xs=A1;var Gu=Object.create,D1=function(){function e(){}return function(t){if(!Ut(t))return{};if(Gu)return Gu(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const $1=D1;function I1(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function L1(){}function Ih(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var B1=800,z1=16,V1=Date.now;function F1(e){var t=0,n=0;return function(){var r=V1(),o=z1-(r-n);if(n=r,o>0){if(++t>=B1)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function H1(e){return function(){return e}}var U1=function(){try{var e=rr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ni=U1;var W1=ni?function(e,t){return ni(e,"toString",{configurable:!0,enumerable:!1,value:H1(t),writable:!0})}:sc;const G1=W1;var K1=F1(G1);const Lh=K1;function q1(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}function Y1(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function X1(e){return e!==e}function J1(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}function Q1(e,t,n){return t===t?J1(e,t,n):Y1(e,X1,n)}function Z1(e,t){var n=e==null?0:e.length;return!!n&&Q1(e,t,0)>-1}var ew=9007199254740991,tw=/^(?:0|[1-9]\d*)$/;function Si(e,t){var n=typeof e;return t=t??ew,!!t&&(n=="number"||n!="symbol"&&tw.test(e))&&e>-1&&e%1==0&&e<t}function cc(e,t,n){t=="__proto__"&&ni?ni(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Qo(e,t){return e===t||e!==e&&t!==t}var nw=Object.prototype,rw=nw.hasOwnProperty;function uc(e,t,n){var r=e[t];(!(rw.call(e,t)&&Qo(r,n))||n===void 0&&!(t in e))&&cc(e,t,n)}function Ur(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?cc(n,s,l):uc(n,s,l)}return n}var Ku=Math.max;function Bh(e,t,n){return t=Ku(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Ku(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),I1(e,this,s)}}function zh(e,t){return Lh(Bh(e,t,sc),e+"")}var ow=9007199254740991;function dc(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ow}function xi(e){return e!=null&&dc(e.length)&&!lc(e)}function aw(e,t,n){if(!Ut(n))return!1;var r=typeof t;return(r=="number"?xi(n)&&Si(t,n.length):r=="string"&&t in n)?Qo(n[t],e):!1}function iw(e){return zh(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&aw(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var sw=Object.prototype;function fc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||sw;return e===n}function lw(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var cw="[object Arguments]";function qu(e){return Zt(e)&&tr(e)==cw}var Vh=Object.prototype,uw=Vh.hasOwnProperty,dw=Vh.propertyIsEnumerable,fw=qu(function(){return arguments}())?qu:function(e){return Zt(e)&&uw.call(e,"callee")&&!dw.call(e,"callee")};const $o=fw;function pw(){return!1}var Fh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Yu=Fh&&typeof module=="object"&&module&&!module.nodeType&&module,hw=Yu&&Yu.exports===Fh,Xu=hw?tn.Buffer:void 0,gw=Xu?Xu.isBuffer:void 0,vw=gw||pw;const Io=vw;var mw="[object Arguments]",yw="[object Array]",bw="[object Boolean]",ww="[object Date]",Sw="[object Error]",xw="[object Function]",Cw="[object Map]",Ow="[object Number]",Ew="[object Object]",_w="[object RegExp]",Rw="[object Set]",Nw="[object String]",Tw="[object WeakMap]",Pw="[object ArrayBuffer]",kw="[object DataView]",jw="[object Float32Array]",Mw="[object Float64Array]",Aw="[object Int8Array]",Dw="[object Int16Array]",$w="[object Int32Array]",Iw="[object Uint8Array]",Lw="[object Uint8ClampedArray]",Bw="[object Uint16Array]",zw="[object Uint32Array]",_e={};_e[jw]=_e[Mw]=_e[Aw]=_e[Dw]=_e[$w]=_e[Iw]=_e[Lw]=_e[Bw]=_e[zw]=!0;_e[mw]=_e[yw]=_e[Pw]=_e[bw]=_e[kw]=_e[ww]=_e[Sw]=_e[xw]=_e[Cw]=_e[Ow]=_e[Ew]=_e[_w]=_e[Rw]=_e[Nw]=_e[Tw]=!1;function Vw(e){return Zt(e)&&dc(e.length)&&!!_e[tr(e)]}function pc(e){return function(t){return e(t)}}var Hh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Oo=Hh&&typeof module=="object"&&module&&!module.nodeType&&module,Fw=Oo&&Oo.exports===Hh,is=Fw&&Ah.process,Hw=function(){try{var e=Oo&&Oo.require&&Oo.require("util").types;return e||is&&is.binding&&is.binding("util")}catch{}}();const Nr=Hw;var Ju=Nr&&Nr.isTypedArray,Uw=Ju?pc(Ju):Vw;const hc=Uw;var Ww=Object.prototype,Gw=Ww.hasOwnProperty;function Uh(e,t){var n=Ve(e),r=!n&&$o(e),o=!n&&!r&&Io(e),a=!n&&!r&&!o&&hc(e),i=n||r||o||a,s=i?lw(e.length,String):[],l=s.length;for(var c in e)(t||Gw.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Si(c,l)))&&s.push(c);return s}function Wh(e,t){return function(n){return e(t(n))}}var Kw=Wh(Object.keys,Object);const qw=Kw;var Yw=Object.prototype,Xw=Yw.hasOwnProperty;function Jw(e){if(!fc(e))return qw(e);var t=[];for(var n in Object(e))Xw.call(e,n)&&n!="constructor"&&t.push(n);return t}function Ci(e){return xi(e)?Uh(e):Jw(e)}function Qw(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Zw=Object.prototype,eS=Zw.hasOwnProperty;function tS(e){if(!Ut(e))return Qw(e);var t=fc(e),n=[];for(var r in e)r=="constructor"&&(t||!eS.call(e,r))||n.push(r);return n}function Zo(e){return xi(e)?Uh(e,!0):tS(e)}var nS=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rS=/^\w*$/;function gc(e,t){if(Ve(e))return!1;var n=typeof e;return n=="number"||n=="symbol"||n=="boolean"||e==null||ac(e)?!0:rS.test(e)||!nS.test(e)||t!=null&&e in Object(t)}var oS=rr(Object,"create");const Lo=oS;function aS(){this.__data__=Lo?Lo(null):{},this.size=0}function iS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var sS="__lodash_hash_undefined__",lS=Object.prototype,cS=lS.hasOwnProperty;function uS(e){var t=this.__data__;if(Lo){var n=t[e];return n===sS?void 0:n}return cS.call(t,e)?t[e]:void 0}var dS=Object.prototype,fS=dS.hasOwnProperty;function pS(e){var t=this.__data__;return Lo?t[e]!==void 0:fS.call(t,e)}var hS="__lodash_hash_undefined__";function gS(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Lo&&t===void 0?hS:t,this}function Jn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jn.prototype.clear=aS;Jn.prototype.delete=iS;Jn.prototype.get=uS;Jn.prototype.has=pS;Jn.prototype.set=gS;function vS(){this.__data__=[],this.size=0}function Oi(e,t){for(var n=e.length;n--;)if(Qo(e[n][0],t))return n;return-1}var mS=Array.prototype,yS=mS.splice;function bS(e){var t=this.__data__,n=Oi(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():yS.call(t,n,1),--this.size,!0}function wS(e){var t=this.__data__,n=Oi(t,e);return n<0?void 0:t[n][1]}function SS(e){return Oi(this.__data__,e)>-1}function xS(e,t){var n=this.__data__,r=Oi(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function vn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}vn.prototype.clear=vS;vn.prototype.delete=bS;vn.prototype.get=wS;vn.prototype.has=SS;vn.prototype.set=xS;var CS=rr(tn,"Map");const Bo=CS;function OS(){this.size=0,this.__data__={hash:new Jn,map:new(Bo||vn),string:new Jn}}function ES(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ei(e,t){var n=e.__data__;return ES(t)?n[typeof t=="string"?"string":"hash"]:n.map}function _S(e){var t=Ei(this,e).delete(e);return this.size-=t?1:0,t}function RS(e){return Ei(this,e).get(e)}function NS(e){return Ei(this,e).has(e)}function TS(e,t){var n=Ei(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function mn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}mn.prototype.clear=OS;mn.prototype.delete=_S;mn.prototype.get=RS;mn.prototype.has=NS;mn.prototype.set=TS;var PS="Expected a function";function vc(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(PS);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],a=n.cache;if(a.has(o))return a.get(o);var i=e.apply(this,r);return n.cache=a.set(o,i)||a,i};return n.cache=new(vc.Cache||mn),n}vc.Cache=mn;var kS=500;function jS(e){var t=vc(e,function(r){return n.size===kS&&n.clear(),r}),n=t.cache;return t}var MS=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,AS=/\\(\\)?/g,DS=jS(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(MS,function(n,r,o,a){t.push(o?a.replace(AS,"$1"):r||n)}),t});const $S=DS;function IS(e){return e==null?"":$h(e)}function Wr(e,t){return Ve(e)?e:gc(e,t)?[e]:$S(IS(e))}var LS=1/0;function Gr(e){if(typeof e=="string"||ac(e))return e;var t=e+"";return t=="0"&&1/e==-LS?"-0":t}function _i(e,t){t=Wr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[Gr(t[n++])];return n&&n==r?e:void 0}function Gh(e,t,n){var r=e==null?void 0:_i(e,t);return r===void 0?n:r}function mc(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var Qu=Pt?Pt.isConcatSpreadable:void 0;function BS(e){return Ve(e)||$o(e)||!!(Qu&&e&&e[Qu])}function yc(e,t,n,r,o){var a=-1,i=e.length;for(n||(n=BS),o||(o=[]);++a<i;){var s=e[a];t>0&&n(s)?t>1?yc(s,t-1,n,r,o):mc(o,s):r||(o[o.length]=s)}return o}function zS(e){var t=e==null?0:e.length;return t?yc(e,1):[]}function VS(e){return Lh(Bh(e,void 0,zS),e+"")}var FS=Wh(Object.getPrototypeOf,Object);const bc=FS;var HS="[object Object]",US=Function.prototype,WS=Object.prototype,Kh=US.toString,GS=WS.hasOwnProperty,KS=Kh.call(Object);function ht(e){if(!Zt(e)||tr(e)!=HS)return!1;var t=bc(e);if(t===null)return!0;var n=GS.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Kh.call(n)==KS}function qS(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function YS(){this.__data__=new vn,this.size=0}function XS(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function JS(e){return this.__data__.get(e)}function QS(e){return this.__data__.has(e)}var ZS=200;function ex(e,t){var n=this.__data__;if(n instanceof vn){var r=n.__data__;if(!Bo||r.length<ZS-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new mn(r)}return n.set(e,t),this.size=n.size,this}function zt(e){var t=this.__data__=new vn(e);this.size=t.size}zt.prototype.clear=YS;zt.prototype.delete=XS;zt.prototype.get=JS;zt.prototype.has=QS;zt.prototype.set=ex;function tx(e,t){return e&&Ur(t,Ci(t),e)}function nx(e,t){return e&&Ur(t,Zo(t),e)}var qh=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Zu=qh&&typeof module=="object"&&module&&!module.nodeType&&module,rx=Zu&&Zu.exports===qh,ed=rx?tn.Buffer:void 0,td=ed?ed.allocUnsafe:void 0;function Yh(e,t){if(t)return e.slice();var n=e.length,r=td?td(n):new e.constructor(n);return e.copy(r),r}function ox(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function Xh(){return[]}var ax=Object.prototype,ix=ax.propertyIsEnumerable,nd=Object.getOwnPropertySymbols,sx=nd?function(e){return e==null?[]:(e=Object(e),ox(nd(e),function(t){return ix.call(e,t)}))}:Xh;const wc=sx;function lx(e,t){return Ur(e,wc(e),t)}var cx=Object.getOwnPropertySymbols,ux=cx?function(e){for(var t=[];e;)mc(t,wc(e)),e=bc(e);return t}:Xh;const Jh=ux;function dx(e,t){return Ur(e,Jh(e),t)}function Qh(e,t,n){var r=t(e);return Ve(e)?r:mc(r,n(e))}function Js(e){return Qh(e,Ci,wc)}function Sc(e){return Qh(e,Zo,Jh)}var fx=rr(tn,"DataView");const Qs=fx;var px=rr(tn,"Promise");const Zs=px;var hx=rr(tn,"Set");const Er=hx;var rd="[object Map]",gx="[object Object]",od="[object Promise]",ad="[object Set]",id="[object WeakMap]",sd="[object DataView]",vx=nr(Qs),mx=nr(Bo),yx=nr(Zs),bx=nr(Er),wx=nr(Xs),Fn=tr;(Qs&&Fn(new Qs(new ArrayBuffer(1)))!=sd||Bo&&Fn(new Bo)!=rd||Zs&&Fn(Zs.resolve())!=od||Er&&Fn(new Er)!=ad||Xs&&Fn(new Xs)!=id)&&(Fn=function(e){var t=tr(e),n=t==gx?e.constructor:void 0,r=n?nr(n):"";if(r)switch(r){case vx:return sd;case mx:return rd;case yx:return od;case bx:return ad;case wx:return id}return t});const zo=Fn;var Sx=Object.prototype,xx=Sx.hasOwnProperty;function Cx(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&xx.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var Ox=tn.Uint8Array;const ri=Ox;function xc(e){var t=new e.constructor(e.byteLength);return new ri(t).set(new ri(e)),t}function Ex(e,t){var n=t?xc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var _x=/\w*$/;function Rx(e){var t=new e.constructor(e.source,_x.exec(e));return t.lastIndex=e.lastIndex,t}var ld=Pt?Pt.prototype:void 0,cd=ld?ld.valueOf:void 0;function Nx(e){return cd?Object(cd.call(e)):{}}function Zh(e,t){var n=t?xc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var Tx="[object Boolean]",Px="[object Date]",kx="[object Map]",jx="[object Number]",Mx="[object RegExp]",Ax="[object Set]",Dx="[object String]",$x="[object Symbol]",Ix="[object ArrayBuffer]",Lx="[object DataView]",Bx="[object Float32Array]",zx="[object Float64Array]",Vx="[object Int8Array]",Fx="[object Int16Array]",Hx="[object Int32Array]",Ux="[object Uint8Array]",Wx="[object Uint8ClampedArray]",Gx="[object Uint16Array]",Kx="[object Uint32Array]";function qx(e,t,n){var r=e.constructor;switch(t){case Ix:return xc(e);case Tx:case Px:return new r(+e);case Lx:return Ex(e,n);case Bx:case zx:case Vx:case Fx:case Hx:case Ux:case Wx:case Gx:case Kx:return Zh(e,n);case kx:return new r;case jx:case Dx:return new r(e);case Mx:return Rx(e);case Ax:return new r;case $x:return Nx(e)}}function eg(e){return typeof e.constructor=="function"&&!fc(e)?$1(bc(e)):{}}var Yx="[object Map]";function Xx(e){return Zt(e)&&zo(e)==Yx}var ud=Nr&&Nr.isMap,Jx=ud?pc(ud):Xx;const Qx=Jx;var Zx="[object Set]";function eC(e){return Zt(e)&&zo(e)==Zx}var dd=Nr&&Nr.isSet,tC=dd?pc(dd):eC;const nC=tC;var rC=1,oC=2,aC=4,tg="[object Arguments]",iC="[object Array]",sC="[object Boolean]",lC="[object Date]",cC="[object Error]",ng="[object Function]",uC="[object GeneratorFunction]",dC="[object Map]",fC="[object Number]",rg="[object Object]",pC="[object RegExp]",hC="[object Set]",gC="[object String]",vC="[object Symbol]",mC="[object WeakMap]",yC="[object ArrayBuffer]",bC="[object DataView]",wC="[object Float32Array]",SC="[object Float64Array]",xC="[object Int8Array]",CC="[object Int16Array]",OC="[object Int32Array]",EC="[object Uint8Array]",_C="[object Uint8ClampedArray]",RC="[object Uint16Array]",NC="[object Uint32Array]",Se={};Se[tg]=Se[iC]=Se[yC]=Se[bC]=Se[sC]=Se[lC]=Se[wC]=Se[SC]=Se[xC]=Se[CC]=Se[OC]=Se[dC]=Se[fC]=Se[rg]=Se[pC]=Se[hC]=Se[gC]=Se[vC]=Se[EC]=Se[_C]=Se[RC]=Se[NC]=!0;Se[cC]=Se[ng]=Se[mC]=!1;function Eo(e,t,n,r,o,a){var i,s=t&rC,l=t&oC,c=t&aC;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!Ut(e))return e;var u=Ve(e);if(u){if(i=Cx(e),!s)return Ih(e,i)}else{var d=zo(e),f=d==ng||d==uC;if(Io(e))return Yh(e,s);if(d==rg||d==tg||f&&!o){if(i=l||f?{}:eg(e),!s)return l?dx(e,nx(i,e)):lx(e,tx(i,e))}else{if(!Se[d])return o?e:{};i=qx(e,d,s)}}a||(a=new zt);var p=a.get(e);if(p)return p;a.set(e,i),nC(e)?e.forEach(function(b){i.add(Eo(b,t,n,b,e,a))}):Qx(e)&&e.forEach(function(b,y){i.set(y,Eo(b,t,n,y,e,a))});var g=c?l?Sc:Js:l?Zo:Ci,m=u?void 0:g(e);return q1(m||e,function(b,y){m&&(y=b,b=e[y]),uc(i,y,Eo(b,t,n,y,e,a))}),i}var TC=1,PC=4;function og(e){return Eo(e,TC|PC)}var kC="__lodash_hash_undefined__";function jC(e){return this.__data__.set(e,kC),this}function MC(e){return this.__data__.has(e)}function Vo(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new mn;++t<n;)this.add(e[t])}Vo.prototype.add=Vo.prototype.push=jC;Vo.prototype.has=MC;function AC(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}function ag(e,t){return e.has(t)}var DC=1,$C=2;function ig(e,t,n,r,o,a){var i=n&DC,s=e.length,l=t.length;if(s!=l&&!(i&&l>s))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var d=-1,f=!0,p=n&$C?new Vo:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var g=e[d],m=t[d];if(r)var b=i?r(m,g,d,t,e,a):r(g,m,d,e,t,a);if(b!==void 0){if(b)continue;f=!1;break}if(p){if(!AC(t,function(y,S){if(!ag(p,S)&&(g===y||o(g,y,n,r,a)))return p.push(S)})){f=!1;break}}else if(!(g===m||o(g,m,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}function IC(e){var t=-1,n=Array(e.size);return e.forEach(function(r,o){n[++t]=[o,r]}),n}function Cc(e){var t=-1,n=Array(e.size);return e.forEach(function(r){n[++t]=r}),n}var LC=1,BC=2,zC="[object Boolean]",VC="[object Date]",FC="[object Error]",HC="[object Map]",UC="[object Number]",WC="[object RegExp]",GC="[object Set]",KC="[object String]",qC="[object Symbol]",YC="[object ArrayBuffer]",XC="[object DataView]",fd=Pt?Pt.prototype:void 0,ss=fd?fd.valueOf:void 0;function JC(e,t,n,r,o,a,i){switch(n){case XC:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case YC:return!(e.byteLength!=t.byteLength||!a(new ri(e),new ri(t)));case zC:case VC:case UC:return Qo(+e,+t);case FC:return e.name==t.name&&e.message==t.message;case WC:case KC:return e==t+"";case HC:var s=IC;case GC:var l=r&LC;if(s||(s=Cc),e.size!=t.size&&!l)return!1;var c=i.get(e);if(c)return c==t;r|=BC,i.set(e,t);var u=ig(s(e),s(t),r,o,a,i);return i.delete(e),u;case qC:if(ss)return ss.call(e)==ss.call(t)}return!1}var QC=1,ZC=Object.prototype,eO=ZC.hasOwnProperty;function tO(e,t,n,r,o,a){var i=n&QC,s=Js(e),l=s.length,c=Js(t),u=c.length;if(l!=u&&!i)return!1;for(var d=l;d--;){var f=s[d];if(!(i?f in t:eO.call(t,f)))return!1}var p=a.get(e),g=a.get(t);if(p&&g)return p==t&&g==e;var m=!0;a.set(e,t),a.set(t,e);for(var b=i;++d<l;){f=s[d];var y=e[f],S=t[f];if(r)var E=i?r(S,y,f,t,e,a):r(y,S,f,e,t,a);if(!(E===void 0?y===S||o(y,S,n,r,a):E)){m=!1;break}b||(b=f=="constructor")}if(m&&!b){var x=e.constructor,v=t.constructor;x!=v&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof v=="function"&&v instanceof v)&&(m=!1)}return a.delete(e),a.delete(t),m}var nO=1,pd="[object Arguments]",hd="[object Array]",_a="[object Object]",rO=Object.prototype,gd=rO.hasOwnProperty;function oO(e,t,n,r,o,a){var i=Ve(e),s=Ve(t),l=i?hd:zo(e),c=s?hd:zo(t);l=l==pd?_a:l,c=c==pd?_a:c;var u=l==_a,d=c==_a,f=l==c;if(f&&Io(e)){if(!Io(t))return!1;i=!0,u=!1}if(f&&!u)return a||(a=new zt),i||hc(e)?ig(e,t,n,r,o,a):JC(e,t,l,n,r,o,a);if(!(n&nO)){var p=u&&gd.call(e,"__wrapped__"),g=d&&gd.call(t,"__wrapped__");if(p||g){var m=p?e.value():e,b=g?t.value():t;return a||(a=new zt),o(m,b,n,r,a)}}return f?(a||(a=new zt),tO(e,t,n,r,o,a)):!1}function Oc(e,t,n,r,o){return e===t?!0:e==null||t==null||!Zt(e)&&!Zt(t)?e!==e&&t!==t:oO(e,t,n,r,Oc,o)}var aO=1,iO=2;function sO(e,t,n,r){var o=n.length,a=o,i=!r;if(e==null)return!a;for(e=Object(e);o--;){var s=n[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=n[o];var l=s[0],c=e[l],u=s[1];if(i&&s[2]){if(c===void 0&&!(l in e))return!1}else{var d=new zt;if(r)var f=r(c,u,l,e,t,d);if(!(f===void 0?Oc(u,c,aO|iO,r,d):f))return!1}}return!0}function sg(e){return e===e&&!Ut(e)}function lO(e){for(var t=Ci(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,sg(o)]}return t}function lg(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}function cO(e){var t=lO(e);return t.length==1&&t[0][2]?lg(t[0][0],t[0][1]):function(n){return n===e||sO(n,e,t)}}function uO(e,t){return e!=null&&t in Object(e)}function dO(e,t,n){t=Wr(t,e);for(var r=-1,o=t.length,a=!1;++r<o;){var i=Gr(t[r]);if(!(a=e!=null&&n(e,i)))break;e=e[i]}return a||++r!=o?a:(o=e==null?0:e.length,!!o&&dc(o)&&Si(i,o)&&(Ve(e)||$o(e)))}function fO(e,t){return e!=null&&dO(e,t,uO)}var pO=1,hO=2;function gO(e,t){return gc(e)&&sg(t)?lg(Gr(e),t):function(n){var r=Gh(n,e);return r===void 0&&r===t?fO(n,e):Oc(t,r,pO|hO)}}function vO(e){return function(t){return t==null?void 0:t[e]}}function mO(e){return function(t){return _i(t,e)}}function yO(e){return gc(e)?vO(Gr(e)):mO(e)}function Ec(e){return typeof e=="function"?e:e==null?sc:typeof e=="object"?Ve(e)?gO(e[0],e[1]):cO(e):yO(e)}function bO(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var wO=bO();const SO=wO;function el(e,t,n){(n!==void 0&&!Qo(e[t],n)||n===void 0&&!(t in e))&&cc(e,t,n)}function tl(e){return Zt(e)&&xi(e)}function nl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function xO(e){return Ur(e,Zo(e))}function CO(e,t,n,r,o,a,i){var s=nl(e,n),l=nl(t,n),c=i.get(l);if(c){el(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Ve(l),p=!f&&Io(l),g=!f&&!p&&hc(l);u=l,f||p||g?Ve(s)?u=s:tl(s)?u=Ih(s):p?(d=!1,u=Yh(l,!0)):g?(d=!1,u=Zh(l,!0)):u=[]:ht(l)||$o(l)?(u=s,$o(s)?u=xO(s):(!Ut(s)||lc(s))&&(u=eg(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),el(e,n,u)}function cg(e,t,n,r,o){e!==t&&SO(t,function(a,i){if(o||(o=new zt),Ut(a))CO(e,t,i,n,cg,r,o);else{var s=r?r(nl(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),el(e,i,s)}},Zo)}function OO(e,t,n){for(var r=-1,o=e==null?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function ug(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function EO(e,t){return t.length<2?e:_i(e,qS(t,0,-1))}var _O=iw(function(e,t,n){cg(e,t,n)});const dg=_O;var RO="Expected a function";function NO(e){if(typeof e!="function")throw new TypeError(RO);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}function TO(e,t){return t=Wr(t,e),e=EO(e,t),e==null||delete e[Gr(ug(t))]}function PO(e){return ht(e)?void 0:e}var kO=1,jO=2,MO=4,AO=VS(function(e,t){var n={};if(e==null)return n;var r=!1;t=ic(t,function(a){return a=Wr(a,e),r||(r=a.length>1),a}),Ur(e,Sc(e),n),r&&(n=Eo(n,kO|jO|MO,PO));for(var o=t.length;o--;)TO(n,t[o]);return n});const fg=AO;function DO(e,t,n,r){if(!Ut(e))return e;t=Wr(t,e);for(var o=-1,a=t.length,i=a-1,s=e;s!=null&&++o<a;){var l=Gr(t[o]),c=n;if(l==="__proto__"||l==="constructor"||l==="prototype")return e;if(o!=i){var u=s[l];c=r?r(u,l,s):void 0,c===void 0&&(c=Ut(u)?u:Si(t[o+1])?[]:{})}uc(s,l,c),s=s[l]}return e}function $O(e,t,n){for(var r=-1,o=t.length,a={};++r<o;){var i=t[r],s=_i(e,i);n(s,i)&&DO(a,Wr(i,e),s)}return a}function IO(e,t){if(e==null)return{};var n=ic(Sc(e),function(r){return[r]});return t=Ec(t),$O(e,n,function(r,o){return t(r,o[0])})}function LO(e,t){return IO(e,NO(Ec(t)))}var BO=1/0,zO=Er&&1/Cc(new Er([,-0]))[1]==BO?function(e){return new Er(e)}:L1;const VO=zO;var FO=200;function HO(e,t,n){var r=-1,o=Z1,a=e.length,i=!0,s=[],l=s;if(n)i=!1,o=OO;else if(a>=FO){var c=t?null:VO(e);if(c)return Cc(c);i=!1,o=ag,l=new Vo}else l=t?[]:s;e:for(;++r<a;){var u=e[r],d=t?t(u):u;if(u=n||u!==0?u:0,i&&d===d){for(var f=l.length;f--;)if(l[f]===d)continue e;t&&l.push(d),s.push(u)}else o(l,d,n)||(l!==s&&l.push(d),s.push(u))}return s}var UO=zh(function(e){var t=ug(e);return tl(t)&&(t=void 0),HO(yc(e,1,tl,!0),Ec(t))});const WO=UO;class pg extends TypeError{constructor(t,n){let r;const{message:o,...a}=t,{path:i}=t,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function GO(e){return Vt(e)&&typeof e[Symbol.iterator]=="function"}function Vt(e){return typeof e=="object"&&e!=null}function xt(e){return typeof e=="string"?JSON.stringify(e):""+e}function KO(e){const{done:t,value:n}=e.next();return t?void 0:n}function qO(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+xt(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*vd(e,t,n,r){GO(e)||(e=[e]);for(const o of e){const a=qO(o,t,n,r);a&&(yield a)}}function*_c(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&Vt(t.schema)&&Vt(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=_c(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):Vt(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class nn{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return vd(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return vd(u,c,this,l)}:this.refiner=()=>[]}assert(t){return hg(t,this)}create(t){return YO(t,this)}is(t){return JO(t,this)}mask(t){return XO(t,this)}validate(t,n){return n===void 0&&(n={}),Kr(t,this,n)}}function hg(e,t){const n=Kr(e,t);if(n[0])throw n[0]}function YO(e,t){const n=Kr(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function XO(e,t){const n=Kr(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function JO(e,t){return!Kr(e,t)[0]}function Kr(e,t,n){n===void 0&&(n={});const r=_c(e,t,n),o=KO(r);return o[0]?[new pg(o[0],function*(){for(const a of r)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Rc(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?yg(a):ve(a)}function An(e,t){return new nn({type:e,schema:null,validator:t})}function Tr(e){return new nn({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function gg(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return yg(r);default:return ve(r)}}function je(){return An("any",()=>!0)}function Le(e){return new nn({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+xt(t)}})}function Pr(){return An("boolean",e=>typeof e=="boolean")}function rl(e){const t={},n=e.map(r=>xt(r)).join();for(const r of e)t[r]=r;return new nn({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+xt(r)}})}function vg(){return An("func",e=>typeof e=="function"||"Expected a function, but received: "+xt(e))}function ft(e){const t=xt(e),n=typeof e;return new nn({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+xt(r)}})}function QO(){return An("never",()=>!1)}function mg(){return An("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+xt(e))}function ve(e){const t=e?Object.keys(e):[],n=QO();return new nn({type:"object",schema:e||null,*entries(r){if(e&&Vt(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return Vt(r)||"Expected an object, but received: "+xt(r)},coercer(r){return Vt(r)?{...r}:r}})}function G(e){return new nn({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function _o(e,t){return new nn({type:"record",schema:null,*entries(n){if(Vt(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return Vt(n)||"Expected an object, but received: "+xt(n)}})}function K(){return An("string",e=>typeof e=="string"||"Expected a string, but received: "+xt(e))}function yg(e){const t=Object.keys(e);return new nn({type:"type",schema:e,*entries(n){if(Vt(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return Vt(n)||"Expected an object, but received: "+xt(n)}})}function pt(e){const t=e.map(n=>n.type).join(" | ");return new nn({type:"union",schema:null,coercer(n,r){return(e.find(o=>{const[a]=o.validate(n,{coerce:!0});return!a})||ZO()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=_c(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+xt(n),...o]}})}function ZO(){return An("unknown",()=>!0)}const Nc=ve({package:K(),version:K(),name:K(),exportName:G(K()),destructuring:G(Pr()),subName:G(K()),main:G(K()),cssPaths:G(Le(K()))}),eE=Le(Nc),tE=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var Tt=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(Tt||{}),Tc=(e=>(e.DESIGN="design",e.SAVE="save",e))(Tc||{}),ol=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(ol||{});const nE=()=>An("normalObj",e=>!ht(e)||[Tt.SLOT,Tt.EXPRESSION,Tt.FUNCTION].includes(e==null?void 0:e.type)?!1:(Kr(e,_o(K(),Pc)),!0)),Pc=pt([K(),mg(),Pr(),ve({type:ft(Tt.SLOT),renderType:rl([ol.FUNC,ol.COMP]),params:G(Le(K())),value:Tr(()=>pt([kr,Le(kr)]))}),ve({type:ft(Tt.EXPRESSION),value:K()}),ve({type:ft(Tt.FUNCTION),value:K()}),nE(),Le(Tr(()=>Pc))]),md=ve({type:ft(Tt.EXPRESSION),value:K()}),kr=ve({id:G(K()),title:G(K()),componentName:K(),props:G(_o(K(),Pc)),nodeName:G(K()),state:G(_o(K(),je())),children:Tr(()=>G(Le(pt([K(),kr])))),configure:G(je()),css:G(je()),style:G(je()),classNames:G(Le(je())),refId:G(K()),extra:G(_o(je(),je())),condition:G(pt([Pr(),md])),loop:G(ve({open:Pr(),data:pt([Le(je()),md]),args:G(Le(K())),forName:G(K()),forIndex:G(K()),key:G(je()),name:G(K())})),methods:G(Le(je()))}),oi=pt([K(),ve({label:K(),tip:G(K())})]),rE=ve({type:ft("shape"),value:Le(ve({name:K(),title:oi,valueType:Tr(()=>Ri)}))}),oE=ve({type:ft("enums"),value:Le(K())});ve({type:ft("array"),value:Tr(()=>Ri)});const aE=ve({type:ft("array"),value:Tr(()=>Le(Ri))}),Ri=pt([rl(["array","boolean","number","object","string"]),rl(["component","expression","function"]),rE,oE,aE]),iE=pt([K(),ve({componentName:K(),props:G(je()),initialValue:G(je()),component:G(je())})]),ls=ve({name:K(),title:oi,valueType:Ri,description:G(K()),defaultValue:je(),setters:G(Le(iE)),condition:G(vg())});pt([K(),vg()]);var al=(e=>(e.SINGLE="single",e.GROUP="group",e))(al||{});pt([K(),ve({name:K(),describe:G(K()),params:G(ve({name:K(),description:K()})),template:K()})]);const sE=ve({id:G(K()),title:K(),snapshot:pt([K(),je()]),snapshotText:G(K()),description:G(K()),tags:G(Le(K())),groupName:G(K()),category:G(K()),schema:Rc(gg(kr,["id"]),ve({componentName:G(K())}))}),lE=ve({componentName:K(),title:K(),screenshot:G(K()),icon:G(K()),tags:G(Le(K())),groupName:G(K()),category:G(K()),priority:G(mg()),npm:G(Nc),snippets:Le(sE),props:Le(pt([ls,ve({title:G(oi),type:ft("single"),content:ls}),ve({title:G(oi),type:ft("group"),content:Le(ls)})])),fixedProps:G(je()),isContainer:G(pt([Pr(),ve({placeholder:K(),width:K(),height:K()})])),disableEditorDragDom:G(je()),isLayout:G(Pr()),rootSelector:G(K()),advanceCustom:G(je()),extra:G(_o(je(),je()))}),cE=e=>({data:t,message:n,throwError:r})=>{const o=e({data:t,message:n,throwError:r});if(o.isValidate)return o;if(r)throw o.message||n?new Error(`${o.message||n}
87
87
  originData: ${JSON.stringify(t)}`):new Error(`${JSON.stringify(t)}
88
88
  data struct format is invalidate`);return o.message||n?console.warn(`${o.message||n}
89
89
  originData: ${JSON.stringify(t)}`):console.warn(`${JSON.stringify(t)}
90
- data struct format is invalidate`),o},Pc=e=>{const{data:t,message:n,throwError:r,dataStruct:o}=e;return aE(({data:a})=>{try{return fg(a,o),{isValidate:!0}}catch(i){let s=i;return i instanceof dg&&(s=i.failures().map(l=>`【${l.path.join(".")}】: ${l.message}
91
- `)),{isValidate:!1,message:s,error:i}}})({data:t,message:n,throwError:r})};var qr=(e=>(e.ROOT_CONTAINER="RootContainer",e))(qr||{});const iE=ge({type:ft(Tt.FUNCTION),value:U()}),sE=_c(pg(kr,["componentName"]),ge({componentName:ft("RootContainer")}));function lE(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const ea=lE(),cE=(e,t)=>{const n={...e,value:[]},r=e.value;let o=new Qn([]);return t&&(o=t.materialsMode||new Qn([])),r&&(Be(r)?n.value=r.map(a=>new Ne(a,{parent:t,materials:o})):ht(r)&&n.value.push(new Ne(r,{parent:t,materials:o}))),n};class jr{constructor(t,n){oe(this,"nodeType","SLOT"),oe(this,"rawData"),oe(this,"parent"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"id"),oe(this,"materialsMode"),this.parent=(n==null?void 0:n.parent)||null,this.rawData=t;const r=(n==null?void 0:n.materials)||new Qn([]);this.materialsMode=r,this.id=yn(),this.data=cE(t,this)}get value(){return this.data}export(t){const n=this.data,r=o=>{if(o instanceof Ne)return o.export(t);if(ht(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return Be(o)?o.map(a=>r(a)):(t==="design"&&delete o.id,o)};return r(n)}}const mg=e=>{let t=[];return e.forEach(n=>{const r=n;r.type?r.type===al.SINGLE?t.push(r.content):r.type===al.GROUP&&(t=[...t,...mg(r.content)]):t.push(n)}),t},il=(e,t,n)=>{if(e.type)return e.type===Tt.SLOT?new jr(e,{parent:t,materials:n}):e;if(ht(e)){const r={};return Object.keys(e).forEach(o=>{r[o]=sl(e[o],t,n)}),r}else return Array.isArray(e)?e.map(r=>il(r,t,n)):e},sl=(e,t,n)=>ht(e)?il(e,t,n):Be(e)?e.map(r=>il(r,t,n)):e;let Mr=class yg{constructor(t,n,r){oe(this,"nodeType","PROP"),oe(this,"rawData"),oe(this,"parent"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"name"),oe(this,"materialsMode");const o=(r==null?void 0:r.materials)||new Qn([]);this.materialsMode=o,this.parent=r==null?void 0:r.parent,this.rawData=n,this.name=t,this.data=sl(n,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const n=this.data;this.data=sl(t??n,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:n,node:this}),this.parent&&!(this.parent instanceof jr)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof Ne){const n=t.material;return mg((n==null?void 0:n.value.props)||[]).find(r=>r.name===this.name)}else return null}export(t){const n=this.data,r=o=>{if(o instanceof yg||o instanceof jr||o instanceof Ne)return o.export(t);if(Be(o))return o.map(a=>r(a));if(ht(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return o};return r(n)}};const uE=e=>{if(typeof e=="string")return!0;Pc({data:e,dataStruct:kr,throwError:!1})},vd=(e,t,n=new Qn([]))=>{if(typeof e=="string")return e;const r={...e,id:e.id??yn(),children:[],props:{},methods:e.methods||[],configure:cg(e.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(e.props||{});return o.length&&o.forEach(a=>{var i;const s=(i=e.props)==null?void 0:i[a];if(s instanceof Mr){r.props[a]=s;return}r.props[a]=new Mr(a,s||"",{parent:t,materials:n})}),e.children&&(Array.isArray(e.children)?r.children=e.children.map(a=>{if(a instanceof Ne)return a;if(ht(a)){const i=a;return new Ne(i,{parent:t,materials:n})}else return a}):(e.children instanceof Ne&&(r.children=[e.children]),r.children=[new Ne(e.children,{parent:t,materials:n})])),r};class Ne{constructor(t,n){oe(this,"nodeType","NODE"),oe(this,"rawData"),oe(this,"data"),oe(this,"emitter",ea),oe(this,"parent"),oe(this,"materialsModel"),oe(this,"listenerHandle"),oe(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),uE(t);const r=(n==null?void 0:n.materials)||new Qn([]);this.parent=(n==null?void 0:n.parent)||null,this.materialsModel=r,this.data=vd(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(n=>n!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const n={...this.export("design"),id:t||yn()};return new Ne(n,{materials:this.materialsModel})}updateWithPlainObj(t){const n={...this.data,...t};return this.data=vd(n,this),n}updateValue(t){const n=this.data,r=this.updateWithPlainObj(t);this.emitter.emit("onNodeChange",{value:r,preValue:n,node:this})}contains(t){return jc(this,t)}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t){var n;const r=this.data;if(typeof r=="string")return r;const o={};Object.keys(r.props||{}).forEach(u=>{o[u]=r.props[u].export(t)});const a=(n=r.children)==null?void 0:n.map(u=>u instanceof Ne?u.export(t):u),i=r.configure||{},s=i.propsSetter||{},l={};Object.keys(s).forEach(u=>{const d=Uh(s,u,!1);d&&(l[u]=d)}),i.propsSetter=l,this.material&&this.materialsModel.usedMaterials.push(this.material);let c={...r,configure:i,props:o,children:a};return t==="design"&&delete c.id,c=kc(c),c}}const md=(e,t,n)=>{const r={...e,id:yn(),props:{},componentName:qr.ROOT_CONTAINER,children:[],methods:e.methods||[],configure:cg(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];Be(e.children)?o=e.children.map(i=>i instanceof Ne?i:ht(i)?new Ne(i,{parent:t,materials:n}):i):e.children instanceof Ne?o.push(e.children):e.children&&ht(e.children)&&o.push(new Ne(e.children,{parent:t,materials:n}));const a=Object.keys(e.props||{});return a.length&&a.forEach(i=>{var s;const l=(s=e.props)==null?void 0:s[i];l instanceof Mr?r.props[i]=l:r.props[i]=new Mr(i,l||"",{parent:t,materials:n})}),r.children=o,r};class Vo{constructor(t,{parent:n,materials:r}){oe(this,"rawData"),oe(this,"data"),oe(this,"nodeType",qr.ROOT_CONTAINER),oe(this,"emitter",ea),oe(this,"materialsModel"),oe(this,"listenerHandle"),oe(this,"onChangeCbQueue"),oe(this,"parent"),this.materialsModel=r,this.rawData=JSON.parse(JSON.stringify(t)),this.data=md(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=n}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(n=>n!==t)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}updateWithPlainObj(t){const n={...this.data,...t};return this.data=md(n,this,this.materialsModel),n}updateValue(t){const n=this.data;this.updateWithPlainObj(t),this.emitter.emit("onNodeChange",{value:this.data,preValue:n,node:this})}contains(t){return jc(this,t)}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t=Nc.SAVE){var n;const r=this.data,o={};Object.keys(r.props||{}).forEach(l=>{o[l]=r.props[l].export(t)});const a=((n=r.children)==null?void 0:n.map(l=>{var c;return(c=l==null?void 0:l.export)==null?void 0:c.call(l,t)}))||[],i={...r,props:o,children:a.filter(l=>l)};let s=ug(i,["id"]);return s=kc(s),s}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const n={...this.export("design"),id:t||yn()};return new Vo(n,{materials:this.materialsModel,parent:null})}}const Fn=e=>(e==null?void 0:e.type)===Tt.EXPRESSION,dE=e=>(e==null?void 0:e.type)===Tt.FUNCTION,yn=()=>Math.random().toString(32).slice(3,9),fE=e=>(e==null?void 0:e.nodeType)==="NODE",cs=e=>(e==null?void 0:e.nodeType)==="PROP",pE=e=>(e==null?void 0:e.nodeType)==="SLOT",kc=e=>AO(e,t=>ht(t)?!Object.keys(t).length:Be(t)?!t.length:!t);function hE(e,t){const n=[e];for(;n.length;){const r=n.shift();if(r&&t(r))return r;const o=(r==null?void 0:r.props)||{},a=s=>{if(s instanceof Ne){n.push(s);return}if(s instanceof jr&&a(s.value.value),s instanceof Mr){a(s.value);return}if(ht(s)){const l=s;Object.keys(l).forEach(c=>{a(l[c])});return}if(Be(s)){s.forEach(l=>{a(l)});return}};a(o);const i=(r==null?void 0:r.value.children.filter(s=>s instanceof Ne))||[];n.push(...i)}}function jc(e,t){return hE(e,n=>n.id===t)}const gE=e=>{const t=ng(e),n=t.snippets;return delete t.snippets,t.snippets=n.map(r=>({...t,...r,id:r.id||`${e.componentName}-${yn()}`,title:r.title||e.title,category:r.category||e.category,tags:[...r.tags||[],...e.tags||[]],groupName:r.groupName||e.groupName,snapshot:r.snapshot||e.icon,snapshotText:r.snapshotText,schema:{...r.schema,componentName:r.schema.componentName||e.componentName}})),t};class vE{constructor(t){oe(this,"rawData"),oe(this,"data"),this.rawData=t,this.data=gE(t)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(t){return this.data.snippets.find(n=>n.id===t)}}const mE=e=>{if(!Be(e))throw new Error("Materials must be a array");return e.map(t=>new vE(t))},yE=e=>{e==null||e.forEach(t=>{Pc({data:t,dataStruct:oE,throwError:!1})})};let Qn=class{constructor(t){oe(this,"rawData"),oe(this,"data"),oe(this,"usedMaterials",[]),this.rawData=t,yE(t),this.data=mE(t)}findByComponentName(t){return this.data.find(n=>n.componentName===t)}findSnippetById(t){const n=[...this.data];let r=null;for(;!r&&n.length;){const o=n.pop();r=o==null?void 0:o.getSnippetById(t)}return r}getAllSnippets(){const t=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]),n=[],r={default:[]};t.forEach(a=>{const i=a.groupName||"default";n.includes(i)||(n.push(i),r[i]=[]),r[i].push(a)});let o=[];return n.forEach(a=>{const i=["default"],s={default:[]},l=r[a];if(l.length!==0){l.forEach(d=>{const f=d.category||"default";i.includes(f)||(i.push(f),s[f]=[]),s[f].push(d)});const c=[];i.forEach(d=>{s[d].length&&c.push({name:d,list:s[d]})});const u={name:a,list:c};o.push(u)}}),o=o.sort((a,i)=>(a.name||"")>(i.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}};const bE=ge({version:U(),name:U(),css:G(U()),renderType:G(pt([ft("COMPONENT"),ft("PAGE")])),methods:G(Ae(iE)),componentsMeta:Ae(_c(ge({componentName:U()}),Rc)),thirdLibs:G(XO),componentsTree:sE,assets:G(Ae(Le()))}),bg=e=>(Pc({data:e,dataStruct:bE,throwError:!1}),e),us=(e,t,n)=>({...e,componentsTree:new Vo(e.componentsTree,{parent:t,materials:n})});class ai{constructor(t,n){oe(this,"nodeType","PAGE"),oe(this,"rawData"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"parent"),oe(this,"materialsModel"),oe(this,"assetPackagesList"),bg(t),this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new Qn((n==null?void 0:n.materials)||[]),this.data=us(t,this,this.materialsModel),this.assetPackagesList=[...(n==null?void 0:n.assetPackagesList)||[],...this.data.assets||[]]}updatePage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=us(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:n,node:this})}reloadPage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=us(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:n,node:this})}get value(){return this.data}getNode(t){if(!t)return;const n=this.data.componentsTree;return jc(n,t)}addNode(t,n,r="AFTER"){var o;if(r==="AFTER"||r==="BEFORE"){const a=n.parent;if(a===null&&n instanceof Vo)return console.warn("Not found parent node"),!1;if(a instanceof Mr)return console.warn("CProp can not add node"),!1;if(a instanceof jr){const s=a.value.value,l=s.findIndex(c=>c===n)??-1;return l>=0?(r==="BEFORE"?s.splice(l,0,t):s.splice(l+1,0,t),t.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof ai)return!1;const i=(a==null?void 0:a.value.children.findIndex(s=>s===n))??-1;return i>=0?(r==="BEFORE"?a==null||a.value.children.splice(i,0,t):a==null||a.value.children.splice(i+1,0,t),t.parent=a,a==null||a.updateValue(),!0):(console.warn("Not found target node"),!1)}if(r==="CHILD_START")return n.value.children.unshift(t),t.parent=n,n.updateValue(),!0;if(r==="CHILD_END")return n.value.children.push(t),t.parent=n,n.updateValue(),!0;if(ht(r)){const a=r;if(a.type==="CHILD"){const i=a.pos,s=a.index||0;return i==="BEFORE"?n==null||n.value.children.splice(s,0,t):n==null||n.value.children.splice(s+1,0,t),t.parent=n,n.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new Ne(t,{parent:null,materials:this.materialsModel})}addNodeById(t,n,r="AFTER"){const o=this.getNode(n);return o?this.addNode(t,o,r):(console.warn(`Not find a node by ${n}, pls check it`),!1)}copyNode(t){const n=t.export("design");n.id=yn();const r=new Ne(n,{parent:t.parent,materials:this.materialsModel});return this.addNode(r,t,"AFTER"),r}copyNodeById(t){const n=this.getNode(t);return n&&n instanceof Ne?this.copyNode(n):!1}moveNode(t,n,r){this.deleteNode(t);let o=n;return["AFTER","BEFORE"].includes(r)&&(o=n.parent),t.parent=o,this.addNode(t,n,r)}moveNodeById(t,n,r){const o=this.getNode(t),a=this.getNode(n);return o&&a&&o instanceof Ne&&a instanceof Ne?this.moveNode(o,a,r):!1}deleteNode(t){var n;const r=t.parent;if(!r)throw new Error("parent node is null or undefined, pls check it");if(r instanceof jr){const o=r.value.value,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),(n=r.parent)==null||n.updateValue(),i}if(r instanceof Ne||r instanceof Vo){const o=r.value.children,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),r.updateValue(),i}}deleteNodeById(t){const n=this.getNode(t);if(n)return this.deleteNode(n)}export(t=Nc.SAVE){var n;const r=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(l=>{const c=o.find(u=>{var d;return u.package===((d=l.value.npm)==null?void 0:d.package)});return c&&a.push(c),{componentName:l.componentName,...ng(l.value.npm||{})}}).filter(l=>!!(l.componentName&&l.package&&l.version));this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:kc(r),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(n=this.data.thirdLibs)==null||n.forEach(l=>{const c=o.find(u=>l.package===u.package);c&&a.push(c)}),s.assets=FO(a,l=>l.package),s=ug(s,["id"]),JSON.parse(JSON.stringify(s))}getRootNode(){return this.data.componentsTree}}qr.ROOT_CONTAINER;var wE=typeof global=="object"&&global&&global.Object===Object&&global;const wg=wE;var SE=typeof self=="object"&&self&&self.Object===Object&&self,xE=wg||SE||Function("return this")();const Yr=xE;var CE=Yr.Symbol;const Ar=CE;var Sg=Object.prototype,OE=Sg.hasOwnProperty,EE=Sg.toString,go=Ar?Ar.toStringTag:void 0;function _E(e){var t=OE.call(e,go),n=e[go];try{e[go]=void 0;var r=!0}catch{}var o=EE.call(e);return r&&(t?e[go]=n:delete e[go]),o}var RE=Object.prototype,NE=RE.toString;function TE(e){return NE.call(e)}var PE="[object Null]",kE="[object Undefined]",yd=Ar?Ar.toStringTag:void 0;function ta(e){return e==null?e===void 0?kE:PE:yd&&yd in Object(e)?_E(e):TE(e)}function Xr(e){return e!=null&&typeof e=="object"}var jE="[object Symbol]";function ME(e){return typeof e=="symbol"||Xr(e)&&ta(e)==jE}function AE(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var DE=Array.isArray;const Dr=DE;var $E=1/0,bd=Ar?Ar.prototype:void 0,wd=bd?bd.toString:void 0;function xg(e){if(typeof e=="string")return e;if(Dr(e))return AE(e,xg)+"";if(ME(e))return wd?wd.call(e):"";var t=e+"";return t=="0"&&1/e==-$E?"-0":t}function or(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Cg(e){return e}var IE="[object AsyncFunction]",LE="[object Function]",BE="[object GeneratorFunction]",zE="[object Proxy]";function Mc(e){if(!or(e))return!1;var t=ta(e);return t==LE||t==BE||t==IE||t==zE}var FE=Yr["__core-js_shared__"];const ds=FE;var Sd=function(){var e=/[^.]+$/.exec(ds&&ds.keys&&ds.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function VE(e){return!!Sd&&Sd in e}var HE=Function.prototype,UE=HE.toString;function WE(e){if(e!=null){try{return UE.call(e)}catch{}try{return e+""}catch{}}return""}var GE=/[\\^$.*+?()[\]{}|]/g,KE=/^\[object .+?Constructor\]$/,qE=Function.prototype,YE=Object.prototype,XE=qE.toString,JE=YE.hasOwnProperty,QE=RegExp("^"+XE.call(JE).replace(GE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function ZE(e){if(!or(e)||VE(e))return!1;var t=Mc(e)?QE:KE;return t.test(WE(e))}function e_(e,t){return e==null?void 0:e[t]}function Ac(e,t){var n=e_(e,t);return ZE(n)?n:void 0}var xd=Object.create,t_=function(){function e(){}return function(t){if(!or(t))return{};if(xd)return xd(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const n_=t_;function r_(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function o_(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var a_=800,i_=16,s_=Date.now;function l_(e){var t=0,n=0;return function(){var r=s_(),o=i_-(r-n);if(n=r,o>0){if(++t>=a_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function c_(e){return function(){return e}}var u_=function(){try{var e=Ac(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ii=u_;var d_=ii?function(e,t){return ii(e,"toString",{configurable:!0,enumerable:!1,value:c_(t),writable:!0})}:Cg;const f_=d_;var p_=l_(f_);const h_=p_;var g_=9007199254740991,v_=/^(?:0|[1-9]\d*)$/;function Og(e,t){var n=typeof e;return t=t??g_,!!t&&(n=="number"||n!="symbol"&&v_.test(e))&&e>-1&&e%1==0&&e<t}function Dc(e,t,n){t=="__proto__"&&ii?ii(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ni(e,t){return e===t||e!==e&&t!==t}var m_=Object.prototype,y_=m_.hasOwnProperty;function b_(e,t,n){var r=e[t];(!(y_.call(e,t)&&Ni(r,n))||n===void 0&&!(t in e))&&Dc(e,t,n)}function w_(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?Dc(n,s,l):b_(n,s,l)}return n}var Cd=Math.max;function S_(e,t,n){return t=Cd(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Cd(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),r_(e,this,s)}}function x_(e,t){return h_(S_(e,t,Cg),e+"")}var C_=9007199254740991;function Eg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=C_}function $c(e){return e!=null&&Eg(e.length)&&!Mc(e)}function O_(e,t,n){if(!or(n))return!1;var r=typeof t;return(r=="number"?$c(n)&&Og(t,n.length):r=="string"&&t in n)?Ni(n[t],e):!1}function E_(e){return x_(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&O_(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var __=Object.prototype;function _g(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||__;return e===n}function R_(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var N_="[object Arguments]";function Od(e){return Xr(e)&&ta(e)==N_}var Rg=Object.prototype,T_=Rg.hasOwnProperty,P_=Rg.propertyIsEnumerable,k_=Od(function(){return arguments}())?Od:function(e){return Xr(e)&&T_.call(e,"callee")&&!P_.call(e,"callee")};const ll=k_;function j_(){return!1}var Ng=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ed=Ng&&typeof module=="object"&&module&&!module.nodeType&&module,M_=Ed&&Ed.exports===Ng,_d=M_?Yr.Buffer:void 0,A_=_d?_d.isBuffer:void 0,D_=A_||j_;const Tg=D_;var $_="[object Arguments]",I_="[object Array]",L_="[object Boolean]",B_="[object Date]",z_="[object Error]",F_="[object Function]",V_="[object Map]",H_="[object Number]",U_="[object Object]",W_="[object RegExp]",G_="[object Set]",K_="[object String]",q_="[object WeakMap]",Y_="[object ArrayBuffer]",X_="[object DataView]",J_="[object Float32Array]",Q_="[object Float64Array]",Z_="[object Int8Array]",eR="[object Int16Array]",tR="[object Int32Array]",nR="[object Uint8Array]",rR="[object Uint8ClampedArray]",oR="[object Uint16Array]",aR="[object Uint32Array]",Oe={};Oe[J_]=Oe[Q_]=Oe[Z_]=Oe[eR]=Oe[tR]=Oe[nR]=Oe[rR]=Oe[oR]=Oe[aR]=!0;Oe[$_]=Oe[I_]=Oe[Y_]=Oe[L_]=Oe[X_]=Oe[B_]=Oe[z_]=Oe[F_]=Oe[V_]=Oe[H_]=Oe[U_]=Oe[W_]=Oe[G_]=Oe[K_]=Oe[q_]=!1;function iR(e){return Xr(e)&&Eg(e.length)&&!!Oe[ta(e)]}function sR(e){return function(t){return e(t)}}var Pg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ro=Pg&&typeof module=="object"&&module&&!module.nodeType&&module,lR=Ro&&Ro.exports===Pg,fs=lR&&wg.process,cR=function(){try{var e=Ro&&Ro.require&&Ro.require("util").types;return e||fs&&fs.binding&&fs.binding("util")}catch{}}();const Rd=cR;var Nd=Rd&&Rd.isTypedArray,uR=Nd?sR(Nd):iR;const kg=uR;var dR=Object.prototype,fR=dR.hasOwnProperty;function pR(e,t){var n=Dr(e),r=!n&&ll(e),o=!n&&!r&&Tg(e),a=!n&&!r&&!o&&kg(e),i=n||r||o||a,s=i?R_(e.length,String):[],l=s.length;for(var c in e)(t||fR.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Og(c,l)))&&s.push(c);return s}function hR(e,t){return function(n){return e(t(n))}}function gR(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var vR=Object.prototype,mR=vR.hasOwnProperty;function yR(e){if(!or(e))return gR(e);var t=_g(e),n=[];for(var r in e)r=="constructor"&&(t||!mR.call(e,r))||n.push(r);return n}function jg(e){return $c(e)?pR(e,!0):yR(e)}var bR=Ac(Object,"create");const Ho=bR;function wR(){this.__data__=Ho?Ho(null):{},this.size=0}function SR(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var xR="__lodash_hash_undefined__",CR=Object.prototype,OR=CR.hasOwnProperty;function ER(e){var t=this.__data__;if(Ho){var n=t[e];return n===xR?void 0:n}return OR.call(t,e)?t[e]:void 0}var _R=Object.prototype,RR=_R.hasOwnProperty;function NR(e){var t=this.__data__;return Ho?t[e]!==void 0:RR.call(t,e)}var TR="__lodash_hash_undefined__";function PR(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ho&&t===void 0?TR:t,this}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zn.prototype.clear=wR;Zn.prototype.delete=SR;Zn.prototype.get=ER;Zn.prototype.has=NR;Zn.prototype.set=PR;function kR(){this.__data__=[],this.size=0}function Ti(e,t){for(var n=e.length;n--;)if(Ni(e[n][0],t))return n;return-1}var jR=Array.prototype,MR=jR.splice;function AR(e){var t=this.__data__,n=Ti(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():MR.call(t,n,1),--this.size,!0}function DR(e){var t=this.__data__,n=Ti(t,e);return n<0?void 0:t[n][1]}function $R(e){return Ti(this.__data__,e)>-1}function IR(e,t){var n=this.__data__,r=Ti(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function bn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bn.prototype.clear=kR;bn.prototype.delete=AR;bn.prototype.get=DR;bn.prototype.has=$R;bn.prototype.set=IR;var LR=Ac(Yr,"Map");const Mg=LR;function BR(){this.size=0,this.__data__={hash:new Zn,map:new(Mg||bn),string:new Zn}}function zR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pi(e,t){var n=e.__data__;return zR(t)?n[typeof t=="string"?"string":"hash"]:n.map}function FR(e){var t=Pi(this,e).delete(e);return this.size-=t?1:0,t}function VR(e){return Pi(this,e).get(e)}function HR(e){return Pi(this,e).has(e)}function UR(e,t){var n=Pi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Jr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jr.prototype.clear=BR;Jr.prototype.delete=FR;Jr.prototype.get=VR;Jr.prototype.has=HR;Jr.prototype.set=UR;function Ag(e){return e==null?"":xg(e)}var WR=hR(Object.getPrototypeOf,Object);const Dg=WR;var GR="[object Object]",KR=Function.prototype,qR=Object.prototype,$g=KR.toString,YR=qR.hasOwnProperty,XR=$g.call(Object);function $r(e){if(!Xr(e)||ta(e)!=GR)return!1;var t=Dg(e);if(t===null)return!0;var n=YR.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$g.call(n)==XR}function JR(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function QR(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:JR(e,t,n)}var ZR="\\ud800-\\udfff",eN="\\u0300-\\u036f",tN="\\ufe20-\\ufe2f",nN="\\u20d0-\\u20ff",rN=eN+tN+nN,oN="\\ufe0e\\ufe0f",aN="\\u200d",iN=RegExp("["+aN+ZR+rN+oN+"]");function Ig(e){return iN.test(e)}function sN(e){return e.split("")}var Lg="\\ud800-\\udfff",lN="\\u0300-\\u036f",cN="\\ufe20-\\ufe2f",uN="\\u20d0-\\u20ff",dN=lN+cN+uN,fN="\\ufe0e\\ufe0f",pN="["+Lg+"]",cl="["+dN+"]",ul="\\ud83c[\\udffb-\\udfff]",hN="(?:"+cl+"|"+ul+")",Bg="[^"+Lg+"]",zg="(?:\\ud83c[\\udde6-\\uddff]){2}",Fg="[\\ud800-\\udbff][\\udc00-\\udfff]",gN="\\u200d",Vg=hN+"?",Hg="["+fN+"]?",vN="(?:"+gN+"(?:"+[Bg,zg,Fg].join("|")+")"+Hg+Vg+")*",mN=Hg+Vg+vN,yN="(?:"+[Bg+cl+"?",cl,zg,Fg,pN].join("|")+")",bN=RegExp(ul+"(?="+ul+")|"+yN+mN,"g");function wN(e){return e.match(bN)||[]}function SN(e){return Ig(e)?wN(e):sN(e)}function xN(e){return function(t){t=Ag(t);var n=Ig(t)?SN(t):void 0,r=n?n[0]:t.charAt(0),o=n?QR(n,1).join(""):t.slice(1);return r[e]()+o}}var CN=xN("toUpperCase");const ON=CN;function EN(e){return ON(Ag(e).toLowerCase())}function _N(){this.__data__=new bn,this.size=0}function RN(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function NN(e){return this.__data__.get(e)}function TN(e){return this.__data__.has(e)}var PN=200;function kN(e,t){var n=this.__data__;if(n instanceof bn){var r=n.__data__;if(!Mg||r.length<PN-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Jr(r)}return n.set(e,t),this.size=n.size,this}function Qr(e){var t=this.__data__=new bn(e);this.size=t.size}Qr.prototype.clear=_N;Qr.prototype.delete=RN;Qr.prototype.get=NN;Qr.prototype.has=TN;Qr.prototype.set=kN;var Ug=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Td=Ug&&typeof module=="object"&&module&&!module.nodeType&&module,jN=Td&&Td.exports===Ug,Pd=jN?Yr.Buffer:void 0,kd=Pd?Pd.allocUnsafe:void 0;function MN(e,t){if(t)return e.slice();var n=e.length,r=kd?kd(n):new e.constructor(n);return e.copy(r),r}var AN=Yr.Uint8Array;const jd=AN;function DN(e){var t=new e.constructor(e.byteLength);return new jd(t).set(new jd(e)),t}function $N(e,t){var n=t?DN(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function IN(e){return typeof e.constructor=="function"&&!_g(e)?n_(Dg(e)):{}}function LN(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var BN=LN();const zN=BN;function dl(e,t,n){(n!==void 0&&!Ni(e[t],n)||n===void 0&&!(t in e))&&Dc(e,t,n)}function FN(e){return Xr(e)&&$c(e)}function fl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function VN(e){return w_(e,jg(e))}function HN(e,t,n,r,o,a,i){var s=fl(e,n),l=fl(t,n),c=i.get(l);if(c){dl(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Dr(l),p=!f&&Tg(l),h=!f&&!p&&kg(l);u=l,f||p||h?Dr(s)?u=s:FN(s)?u=o_(s):p?(d=!1,u=MN(l,!0)):h?(d=!1,u=$N(l,!0)):u=[]:$r(l)||ll(l)?(u=s,ll(s)?u=VN(s):(!or(s)||Mc(s))&&(u=IN(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),dl(e,n,u)}function Wg(e,t,n,r,o){e!==t&&zN(t,function(a,i){if(o||(o=new Qr),or(a))HN(e,t,i,n,Wg,r,o);else{var s=r?r(fl(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),dl(e,i,s)}},jg)}var UN=E_(function(e,t,n){Wg(e,t,n)});const WN=UN;function GN(e){const t=e.prototype;return!!(t&&t.isReactComponent)}function KN(e){var t,n;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===r||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((n=e==null?void 0:e.prototype)==null?void 0:n.setState)||e._forwardRef}function qN(e){class t extends g.Component{render(){return g.createElement(e,this.props)}}return t.displayName=e.displayName,t}const fr=(e,t)=>{const n=r=>{const o=`
90
+ data struct format is invalidate`),o},kc=e=>{const{data:t,message:n,throwError:r,dataStruct:o}=e;return cE(({data:a})=>{try{return hg(a,o),{isValidate:!0}}catch(i){let s=i;return i instanceof pg&&(s=i.failures().map(l=>`【${l.path.join(".")}】: ${l.message}
91
+ `)),{isValidate:!1,message:s,error:i}}})({data:t,message:n,throwError:r})};var qr=(e=>(e.ROOT_CONTAINER="RootContainer",e))(qr||{});const uE=ve({type:ft(Tt.FUNCTION),value:K()}),dE=Rc(gg(kr,["componentName"]),ve({componentName:ft("RootContainer")}));function fE(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r?r.push(n):e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&(n?r.splice(r.indexOf(n)>>>0,1):e.set(t,[]))},emit:function(t,n){var r=e.get(t);r&&r.slice().map(function(o){o(n)}),(r=e.get("*"))&&r.slice().map(function(o){o(t,n)})}}}const ea=fE(),pE=(e,t)=>{const n={...e,value:[]},r=e.value;let o=new Qn([]);return t&&(o=t.materialsMode||new Qn([])),r&&(Ve(r)?n.value=r.map(a=>new Me(a,{parent:t,materials:o})):ht(r)&&n.value.push(new Me(r,{parent:t,materials:o}))),n};class jr{constructor(t,n){oe(this,"nodeType","SLOT"),oe(this,"rawData"),oe(this,"parent"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"id"),oe(this,"materialsMode"),this.parent=(n==null?void 0:n.parent)||null,this.rawData=t;const r=(n==null?void 0:n.materials)||new Qn([]);this.materialsMode=r,this.id=yn(),this.data=pE(t,this)}get value(){return this.data}export(t){const n=this.data,r=o=>{if(o instanceof Me)return o.export(t);if(ht(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return Ve(o)?o.map(a=>r(a)):(t==="design"&&delete o.id,o)};return r(n)}}const bg=e=>{let t=[];return e.forEach(n=>{const r=n;r.type?r.type===al.SINGLE?t.push(r.content):r.type===al.GROUP&&(t=[...t,...bg(r.content)]):t.push(n)}),t},il=(e,t,n)=>{if(e.type)return e.type===Tt.SLOT?new jr(e,{parent:t,materials:n}):e;if(ht(e)){const r={};return Object.keys(e).forEach(o=>{r[o]=sl(e[o],t,n)}),r}else return Array.isArray(e)?e.map(r=>il(r,t,n)):e},sl=(e,t,n)=>ht(e)?il(e,t,n):Ve(e)?e.map(r=>il(r,t,n)):e;let Mr=class wg{constructor(t,n,r){oe(this,"nodeType","PROP"),oe(this,"rawData"),oe(this,"parent"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"name"),oe(this,"materialsMode");const o=(r==null?void 0:r.materials)||new Qn([]);this.materialsMode=o,this.parent=r==null?void 0:r.parent,this.rawData=n,this.name=t,this.data=sl(n,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const n=this.data;this.data=sl(t??n,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:n,node:this}),this.parent&&!(this.parent instanceof jr)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof Me){const n=t.material;return bg((n==null?void 0:n.value.props)||[]).find(r=>r.name===this.name)}else return null}export(t){const n=this.data,r=o=>{if(o instanceof wg||o instanceof jr||o instanceof Me)return o.export(t);if(Ve(o))return o.map(a=>r(a));if(ht(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=r(o[i])}),a}return o};return r(n)}};const hE=e=>{if(typeof e=="string")return!0;kc({data:e,dataStruct:kr,throwError:!1})},yd=(e,t,n=new Qn([]))=>{if(typeof e=="string")return e;const r={...e,id:e.id??yn(),children:[],props:{},methods:e.methods||[],configure:dg(e.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(e.props||{});return o.length&&o.forEach(a=>{var i;const s=(i=e.props)==null?void 0:i[a];if(s instanceof Mr){r.props[a]=s;return}r.props[a]=new Mr(a,s||"",{parent:t,materials:n})}),e.children&&(Array.isArray(e.children)?r.children=e.children.map(a=>{if(a instanceof Me)return a;if(ht(a)){const i=a;return new Me(i,{parent:t,materials:n})}else return a}):(e.children instanceof Me&&(r.children=[e.children]),r.children=[new Me(e.children,{parent:t,materials:n})])),r};class Me{constructor(t,n){oe(this,"nodeType","NODE"),oe(this,"rawData"),oe(this,"data"),oe(this,"emitter",ea),oe(this,"parent"),oe(this,"materialsModel"),oe(this,"listenerHandle"),oe(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),hE(t);const r=(n==null?void 0:n.materials)||new Qn([]);this.parent=(n==null?void 0:n.parent)||null,this.materialsModel=r,this.data=yd(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(n=>n!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const n={...this.export("design"),id:t||yn()};return new Me(n,{materials:this.materialsModel})}updateWithPlainObj(t){const n={...this.data,...t};return this.data=yd(n,this),n}updateValue(t){const n=this.data,r=this.updateWithPlainObj(t);this.emitter.emit("onNodeChange",{value:r,preValue:n,node:this})}contains(t){return Mc(this,t)}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t){var n;const r=this.data;if(typeof r=="string")return r;const o={};Object.keys(r.props||{}).forEach(u=>{o[u]=r.props[u].export(t)});const a=(n=r.children)==null?void 0:n.map(u=>u instanceof Me?u.export(t):u),i=r.configure||{},s=i.propsSetter||{},l={};Object.keys(s).forEach(u=>{const d=Gh(s,u,!1);d&&(l[u]=d)}),i.propsSetter=l,this.material&&this.materialsModel.usedMaterials.push(this.material);let c={...r,configure:i,props:o,children:a};return t==="design"&&delete c.id,c=jc(c),c}}const bd=(e,t,n)=>{const r={...e,id:yn(),props:{},componentName:qr.ROOT_CONTAINER,children:[],methods:e.methods||[],configure:dg(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];Ve(e.children)?o=e.children.map(i=>i instanceof Me?i:ht(i)?new Me(i,{parent:t,materials:n}):i):e.children instanceof Me?o.push(e.children):e.children&&ht(e.children)&&o.push(new Me(e.children,{parent:t,materials:n}));const a=Object.keys(e.props||{});return a.length&&a.forEach(i=>{var s;const l=(s=e.props)==null?void 0:s[i];l instanceof Mr?r.props[i]=l:r.props[i]=new Mr(i,l||"",{parent:t,materials:n})}),r.children=o,r};class Fo{constructor(t,{parent:n,materials:r}){oe(this,"rawData"),oe(this,"data"),oe(this,"nodeType",qr.ROOT_CONTAINER),oe(this,"emitter",ea),oe(this,"materialsModel"),oe(this,"listenerHandle"),oe(this,"onChangeCbQueue"),oe(this,"parent"),this.materialsModel=r,this.rawData=JSON.parse(JSON.stringify(t)),this.data=bd(t,this,r),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=n}registerListener(){const t=n=>{const{node:r}=n;r===this&&r.id===this.id&&this.onChangeCbQueue.forEach(o=>o(n))};this.emitter.on("onNodeChange",t),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",t)})}onChange(t){return this.onChangeCbQueue.push(t),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(n=>n!==t)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const t=this.materialsModel;return t==null?void 0:t.findByComponentName(this.data.componentName)}updateWithPlainObj(t){const n={...this.data,...t};return this.data=bd(n,this,this.materialsModel),n}updateValue(t){const n=this.data;this.updateWithPlainObj(t),this.emitter.emit("onNodeChange",{value:this.data,preValue:n,node:this})}contains(t){return Mc(this,t)}getMaterialConfig(t){var n;return this.data.configure[t]!==void 0?this.data.configure.isContainer:(n=this.material)==null?void 0:n.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(t=Tc.SAVE){var n;const r=this.data,o={};Object.keys(r.props||{}).forEach(l=>{o[l]=r.props[l].export(t)});const a=((n=r.children)==null?void 0:n.map(l=>{var c;return(c=l==null?void 0:l.export)==null?void 0:c.call(l,t)}))||[],i={...r,props:o,children:a.filter(l=>l)};let s=fg(i,["id"]);return s=jc(s),s}getPlainProps(){const t=this.data,n={};return Object.keys(t.props||{}).forEach(r=>{n[r]=t.props[r].export("design")}),n}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const n={...this.export("design"),id:t||yn()};return new Fo(n,{materials:this.materialsModel,parent:null})}}const Vn=e=>(e==null?void 0:e.type)===Tt.EXPRESSION,gE=e=>(e==null?void 0:e.type)===Tt.FUNCTION,yn=()=>Math.random().toString(32).slice(3,9),vE=e=>(e==null?void 0:e.nodeType)==="NODE",cs=e=>(e==null?void 0:e.nodeType)==="PROP",mE=e=>(e==null?void 0:e.nodeType)==="SLOT",jc=e=>LO(e,t=>ht(t)?!Object.keys(t).length:Ve(t)?!t.length:!t);function yE(e,t){const n=[e];for(;n.length;){const r=n.shift();if(r&&t(r))return r;const o=(r==null?void 0:r.props)||{},a=s=>{if(s instanceof Me){n.push(s);return}if(s instanceof jr&&a(s.value.value),s instanceof Mr){a(s.value);return}if(ht(s)){const l=s;Object.keys(l).forEach(c=>{a(l[c])});return}if(Ve(s)){s.forEach(l=>{a(l)});return}};a(o);const i=(r==null?void 0:r.value.children.filter(s=>s instanceof Me))||[];n.push(...i)}}function Mc(e,t){return yE(e,n=>n.id===t)}const bE=e=>{const t=og(e),n=t.snippets;return delete t.snippets,t.snippets=n.map(r=>({...t,...r,id:r.id||`${e.componentName}-${yn()}`,title:r.title||e.title,category:r.category||e.category,tags:[...r.tags||[],...e.tags||[]],groupName:r.groupName||e.groupName,snapshot:r.snapshot||e.icon,snapshotText:r.snapshotText,schema:{...r.schema,componentName:r.schema.componentName||e.componentName}})),t};class wE{constructor(t){oe(this,"rawData"),oe(this,"data"),this.rawData=t,this.data=bE(t)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(t){return this.data.snippets.find(n=>n.id===t)}}const SE=e=>{if(!Ve(e))throw new Error("Materials must be a array");return e.map(t=>new wE(t))},xE=e=>{e==null||e.forEach(t=>{kc({data:t,dataStruct:lE,throwError:!1})})};let Qn=class{constructor(t){oe(this,"rawData"),oe(this,"data"),oe(this,"usedMaterials",[]),this.rawData=t,xE(t),this.data=SE(t)}findByComponentName(t){return this.data.find(n=>n.componentName===t)}findSnippetById(t){const n=[...this.data];let r=null;for(;!r&&n.length;){const o=n.pop();r=o==null?void 0:o.getSnippetById(t)}return r}getAllSnippets(){const t=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]),n=[],r={default:[]};t.forEach(a=>{const i=a.groupName||"default";n.includes(i)||(n.push(i),r[i]=[]),r[i].push(a)});let o=[];return n.forEach(a=>{const i=["default"],s={default:[]},l=r[a];if(l.length!==0){l.forEach(d=>{const f=d.category||"default";i.includes(f)||(i.push(f),s[f]=[]),s[f].push(d)});const c=[];i.forEach(d=>{s[d].length&&c.push({name:d,list:s[d]})});const u={name:a,list:c};o.push(u)}}),o=o.sort((a,i)=>(a.name||"")>(i.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}};const CE=ve({version:K(),name:K(),css:G(K()),renderType:G(pt([ft("COMPONENT"),ft("PAGE")])),loadType:G(je()),lifecycle:G(je()),props:G(je()),methods:G(Le(uE)),componentsMeta:Le(Rc(ve({componentName:K()}),Nc)),thirdLibs:G(eE),componentsTree:dE,assets:G(Le(je()))}),Sg=e=>(kc({data:e,dataStruct:CE,throwError:!1}),e),us=(e,t,n)=>({...e,componentsTree:new Fo(e.componentsTree,{parent:t,materials:n})});class ai{constructor(t,n){oe(this,"nodeType","PAGE"),oe(this,"rawData"),oe(this,"emitter",ea),oe(this,"data"),oe(this,"parent"),oe(this,"materialsModel"),oe(this,"assetPackagesList"),Sg(t),this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new Qn((n==null?void 0:n.materials)||[]),this.data=us(t,this,this.materialsModel),this.assetPackagesList=[...(n==null?void 0:n.assetPackagesList)||[],...this.data.assets||[]]}updatePage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=us(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:n,node:this})}reloadPage(t){const n=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=us(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:n,node:this})}get value(){return this.data}getNode(t){if(!t)return;const n=this.data.componentsTree;return Mc(n,t)}addNode(t,n,r="AFTER"){var o;if(r==="AFTER"||r==="BEFORE"){const a=n.parent;if(a===null&&n instanceof Fo)return console.warn("Not found parent node"),!1;if(a instanceof Mr)return console.warn("CProp can not add node"),!1;if(a instanceof jr){const s=a.value.value,l=s.findIndex(c=>c===n)??-1;return l>=0?(r==="BEFORE"?s.splice(l,0,t):s.splice(l+1,0,t),t.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof ai)return!1;const i=(a==null?void 0:a.value.children.findIndex(s=>s===n))??-1;return i>=0?(r==="BEFORE"?a==null||a.value.children.splice(i,0,t):a==null||a.value.children.splice(i+1,0,t),t.parent=a,a==null||a.updateValue(),!0):(console.warn("Not found target node"),!1)}if(r==="CHILD_START")return n.value.children.unshift(t),t.parent=n,n.updateValue(),!0;if(r==="CHILD_END")return n.value.children.push(t),t.parent=n,n.updateValue(),!0;if(ht(r)){const a=r;if(a.type==="CHILD"){const i=a.pos,s=a.index||0;return i==="BEFORE"?n==null||n.value.children.splice(s,0,t):n==null||n.value.children.splice(s+1,0,t),t.parent=n,n.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new Me(t,{parent:null,materials:this.materialsModel})}addNodeById(t,n,r="AFTER"){const o=this.getNode(n);return o?this.addNode(t,o,r):(console.warn(`Not find a node by ${n}, pls check it`),!1)}copyNode(t){const n=t.export("design");n.id=yn();const r=new Me(n,{parent:t.parent,materials:this.materialsModel});return this.addNode(r,t,"AFTER"),r}copyNodeById(t){const n=this.getNode(t);return n&&n instanceof Me?this.copyNode(n):!1}moveNode(t,n,r){this.deleteNode(t);let o=n;return["AFTER","BEFORE"].includes(r)&&(o=n.parent),t.parent=o,this.addNode(t,n,r)}moveNodeById(t,n,r){const o=this.getNode(t),a=this.getNode(n);return o&&a&&o instanceof Me&&a instanceof Me?this.moveNode(o,a,r):!1}deleteNode(t){var n;const r=t.parent;if(!r)throw new Error("parent node is null or undefined, pls check it");if(r instanceof jr){const o=r.value.value,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),(n=r.parent)==null||n.updateValue(),i}if(r instanceof Me||r instanceof Fo){const o=r.value.children,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),r.updateValue(),i}}deleteNodeById(t){const n=this.getNode(t);if(n)return this.deleteNode(n)}export(t=Tc.SAVE){var n;const r=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(l=>{const c=o.find(u=>{var d;return u.package===((d=l.value.npm)==null?void 0:d.package)});return c&&a.push(c),{componentName:l.componentName,...og(l.value.npm||{})}}).filter(l=>!!(l.componentName&&l.package&&l.version));this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:jc(r),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(n=this.data.thirdLibs)==null||n.forEach(l=>{const c=o.find(u=>l.package===u.package);c&&a.push(c)}),s.assets=WO(a,l=>l.package),s=fg(s,["id"]),JSON.parse(JSON.stringify(s))}getRootNode(){return this.data.componentsTree}}qr.ROOT_CONTAINER;var OE=typeof global=="object"&&global&&global.Object===Object&&global;const xg=OE;var EE=typeof self=="object"&&self&&self.Object===Object&&self,_E=xg||EE||Function("return this")();const Yr=_E;var RE=Yr.Symbol;const Ar=RE;var Cg=Object.prototype,NE=Cg.hasOwnProperty,TE=Cg.toString,go=Ar?Ar.toStringTag:void 0;function PE(e){var t=NE.call(e,go),n=e[go];try{e[go]=void 0;var r=!0}catch{}var o=TE.call(e);return r&&(t?e[go]=n:delete e[go]),o}var kE=Object.prototype,jE=kE.toString;function ME(e){return jE.call(e)}var AE="[object Null]",DE="[object Undefined]",wd=Ar?Ar.toStringTag:void 0;function ta(e){return e==null?e===void 0?DE:AE:wd&&wd in Object(e)?PE(e):ME(e)}function Xr(e){return e!=null&&typeof e=="object"}var $E="[object Symbol]";function IE(e){return typeof e=="symbol"||Xr(e)&&ta(e)==$E}function LE(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var BE=Array.isArray;const Dr=BE;var zE=1/0,Sd=Ar?Ar.prototype:void 0,xd=Sd?Sd.toString:void 0;function Og(e){if(typeof e=="string")return e;if(Dr(e))return LE(e,Og)+"";if(IE(e))return xd?xd.call(e):"";var t=e+"";return t=="0"&&1/e==-zE?"-0":t}function or(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Eg(e){return e}var VE="[object AsyncFunction]",FE="[object Function]",HE="[object GeneratorFunction]",UE="[object Proxy]";function Ac(e){if(!or(e))return!1;var t=ta(e);return t==FE||t==HE||t==VE||t==UE}var WE=Yr["__core-js_shared__"];const ds=WE;var Cd=function(){var e=/[^.]+$/.exec(ds&&ds.keys&&ds.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function GE(e){return!!Cd&&Cd in e}var KE=Function.prototype,qE=KE.toString;function YE(e){if(e!=null){try{return qE.call(e)}catch{}try{return e+""}catch{}}return""}var XE=/[\\^$.*+?()[\]{}|]/g,JE=/^\[object .+?Constructor\]$/,QE=Function.prototype,ZE=Object.prototype,e_=QE.toString,t_=ZE.hasOwnProperty,n_=RegExp("^"+e_.call(t_).replace(XE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function r_(e){if(!or(e)||GE(e))return!1;var t=Ac(e)?n_:JE;return t.test(YE(e))}function o_(e,t){return e==null?void 0:e[t]}function Dc(e,t){var n=o_(e,t);return r_(n)?n:void 0}var Od=Object.create,a_=function(){function e(){}return function(t){if(!or(t))return{};if(Od)return Od(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const i_=a_;function s_(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function l_(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var c_=800,u_=16,d_=Date.now;function f_(e){var t=0,n=0;return function(){var r=d_(),o=u_-(r-n);if(n=r,o>0){if(++t>=c_)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function p_(e){return function(){return e}}var h_=function(){try{var e=Dc(Object,"defineProperty");return e({},"",{}),e}catch{}}();const ii=h_;var g_=ii?function(e,t){return ii(e,"toString",{configurable:!0,enumerable:!1,value:p_(t),writable:!0})}:Eg;const v_=g_;var m_=f_(v_);const y_=m_;var b_=9007199254740991,w_=/^(?:0|[1-9]\d*)$/;function _g(e,t){var n=typeof e;return t=t??b_,!!t&&(n=="number"||n!="symbol"&&w_.test(e))&&e>-1&&e%1==0&&e<t}function $c(e,t,n){t=="__proto__"&&ii?ii(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Ni(e,t){return e===t||e!==e&&t!==t}var S_=Object.prototype,x_=S_.hasOwnProperty;function C_(e,t,n){var r=e[t];(!(x_.call(e,t)&&Ni(r,n))||n===void 0&&!(t in e))&&$c(e,t,n)}function O_(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?$c(n,s,l):C_(n,s,l)}return n}var Ed=Math.max;function E_(e,t,n){return t=Ed(t===void 0?e.length-1:t,0),function(){for(var r=arguments,o=-1,a=Ed(r.length-t,0),i=Array(a);++o<a;)i[o]=r[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=r[o];return s[t]=n(i),s_(e,this,s)}}function __(e,t){return y_(E_(e,t,Eg),e+"")}var R_=9007199254740991;function Rg(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=R_}function Ic(e){return e!=null&&Rg(e.length)&&!Ac(e)}function N_(e,t,n){if(!or(n))return!1;var r=typeof t;return(r=="number"?Ic(n)&&_g(t,n.length):r=="string"&&t in n)?Ni(n[t],e):!1}function T_(e){return __(function(t,n){var r=-1,o=n.length,a=o>1?n[o-1]:void 0,i=o>2?n[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&N_(n[0],n[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++r<o;){var s=n[r];s&&e(t,s,r,a)}return t})}var P_=Object.prototype;function Ng(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||P_;return e===n}function k_(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var j_="[object Arguments]";function _d(e){return Xr(e)&&ta(e)==j_}var Tg=Object.prototype,M_=Tg.hasOwnProperty,A_=Tg.propertyIsEnumerable,D_=_d(function(){return arguments}())?_d:function(e){return Xr(e)&&M_.call(e,"callee")&&!A_.call(e,"callee")};const ll=D_;function $_(){return!1}var Pg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Rd=Pg&&typeof module=="object"&&module&&!module.nodeType&&module,I_=Rd&&Rd.exports===Pg,Nd=I_?Yr.Buffer:void 0,L_=Nd?Nd.isBuffer:void 0,B_=L_||$_;const kg=B_;var z_="[object Arguments]",V_="[object Array]",F_="[object Boolean]",H_="[object Date]",U_="[object Error]",W_="[object Function]",G_="[object Map]",K_="[object Number]",q_="[object Object]",Y_="[object RegExp]",X_="[object Set]",J_="[object String]",Q_="[object WeakMap]",Z_="[object ArrayBuffer]",eR="[object DataView]",tR="[object Float32Array]",nR="[object Float64Array]",rR="[object Int8Array]",oR="[object Int16Array]",aR="[object Int32Array]",iR="[object Uint8Array]",sR="[object Uint8ClampedArray]",lR="[object Uint16Array]",cR="[object Uint32Array]",Re={};Re[tR]=Re[nR]=Re[rR]=Re[oR]=Re[aR]=Re[iR]=Re[sR]=Re[lR]=Re[cR]=!0;Re[z_]=Re[V_]=Re[Z_]=Re[F_]=Re[eR]=Re[H_]=Re[U_]=Re[W_]=Re[G_]=Re[K_]=Re[q_]=Re[Y_]=Re[X_]=Re[J_]=Re[Q_]=!1;function uR(e){return Xr(e)&&Rg(e.length)&&!!Re[ta(e)]}function dR(e){return function(t){return e(t)}}var jg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ro=jg&&typeof module=="object"&&module&&!module.nodeType&&module,fR=Ro&&Ro.exports===jg,fs=fR&&xg.process,pR=function(){try{var e=Ro&&Ro.require&&Ro.require("util").types;return e||fs&&fs.binding&&fs.binding("util")}catch{}}();const Td=pR;var Pd=Td&&Td.isTypedArray,hR=Pd?dR(Pd):uR;const Mg=hR;var gR=Object.prototype,vR=gR.hasOwnProperty;function mR(e,t){var n=Dr(e),r=!n&&ll(e),o=!n&&!r&&kg(e),a=!n&&!r&&!o&&Mg(e),i=n||r||o||a,s=i?k_(e.length,String):[],l=s.length;for(var c in e)(t||vR.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||_g(c,l)))&&s.push(c);return s}function yR(e,t){return function(n){return e(t(n))}}function bR(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var wR=Object.prototype,SR=wR.hasOwnProperty;function xR(e){if(!or(e))return bR(e);var t=Ng(e),n=[];for(var r in e)r=="constructor"&&(t||!SR.call(e,r))||n.push(r);return n}function Ag(e){return Ic(e)?mR(e,!0):xR(e)}var CR=Dc(Object,"create");const Ho=CR;function OR(){this.__data__=Ho?Ho(null):{},this.size=0}function ER(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var _R="__lodash_hash_undefined__",RR=Object.prototype,NR=RR.hasOwnProperty;function TR(e){var t=this.__data__;if(Ho){var n=t[e];return n===_R?void 0:n}return NR.call(t,e)?t[e]:void 0}var PR=Object.prototype,kR=PR.hasOwnProperty;function jR(e){var t=this.__data__;return Ho?t[e]!==void 0:kR.call(t,e)}var MR="__lodash_hash_undefined__";function AR(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Ho&&t===void 0?MR:t,this}function Zn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Zn.prototype.clear=OR;Zn.prototype.delete=ER;Zn.prototype.get=TR;Zn.prototype.has=jR;Zn.prototype.set=AR;function DR(){this.__data__=[],this.size=0}function Ti(e,t){for(var n=e.length;n--;)if(Ni(e[n][0],t))return n;return-1}var $R=Array.prototype,IR=$R.splice;function LR(e){var t=this.__data__,n=Ti(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():IR.call(t,n,1),--this.size,!0}function BR(e){var t=this.__data__,n=Ti(t,e);return n<0?void 0:t[n][1]}function zR(e){return Ti(this.__data__,e)>-1}function VR(e,t){var n=this.__data__,r=Ti(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function bn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}bn.prototype.clear=DR;bn.prototype.delete=LR;bn.prototype.get=BR;bn.prototype.has=zR;bn.prototype.set=VR;var FR=Dc(Yr,"Map");const Dg=FR;function HR(){this.size=0,this.__data__={hash:new Zn,map:new(Dg||bn),string:new Zn}}function UR(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Pi(e,t){var n=e.__data__;return UR(t)?n[typeof t=="string"?"string":"hash"]:n.map}function WR(e){var t=Pi(this,e).delete(e);return this.size-=t?1:0,t}function GR(e){return Pi(this,e).get(e)}function KR(e){return Pi(this,e).has(e)}function qR(e,t){var n=Pi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function Jr(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Jr.prototype.clear=HR;Jr.prototype.delete=WR;Jr.prototype.get=GR;Jr.prototype.has=KR;Jr.prototype.set=qR;function $g(e){return e==null?"":Og(e)}var YR=yR(Object.getPrototypeOf,Object);const Ig=YR;var XR="[object Object]",JR=Function.prototype,QR=Object.prototype,Lg=JR.toString,ZR=QR.hasOwnProperty,e2=Lg.call(Object);function $r(e){if(!Xr(e)||ta(e)!=XR)return!1;var t=Ig(e);if(t===null)return!0;var n=ZR.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Lg.call(n)==e2}function t2(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function n2(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:t2(e,t,n)}var r2="\\ud800-\\udfff",o2="\\u0300-\\u036f",a2="\\ufe20-\\ufe2f",i2="\\u20d0-\\u20ff",s2=o2+a2+i2,l2="\\ufe0e\\ufe0f",c2="\\u200d",u2=RegExp("["+c2+r2+s2+l2+"]");function Bg(e){return u2.test(e)}function d2(e){return e.split("")}var zg="\\ud800-\\udfff",f2="\\u0300-\\u036f",p2="\\ufe20-\\ufe2f",h2="\\u20d0-\\u20ff",g2=f2+p2+h2,v2="\\ufe0e\\ufe0f",m2="["+zg+"]",cl="["+g2+"]",ul="\\ud83c[\\udffb-\\udfff]",y2="(?:"+cl+"|"+ul+")",Vg="[^"+zg+"]",Fg="(?:\\ud83c[\\udde6-\\uddff]){2}",Hg="[\\ud800-\\udbff][\\udc00-\\udfff]",b2="\\u200d",Ug=y2+"?",Wg="["+v2+"]?",w2="(?:"+b2+"(?:"+[Vg,Fg,Hg].join("|")+")"+Wg+Ug+")*",S2=Wg+Ug+w2,x2="(?:"+[Vg+cl+"?",cl,Fg,Hg,m2].join("|")+")",C2=RegExp(ul+"(?="+ul+")|"+x2+S2,"g");function O2(e){return e.match(C2)||[]}function E2(e){return Bg(e)?O2(e):d2(e)}function _2(e){return function(t){t=$g(t);var n=Bg(t)?E2(t):void 0,r=n?n[0]:t.charAt(0),o=n?n2(n,1).join(""):t.slice(1);return r[e]()+o}}var R2=_2("toUpperCase");const N2=R2;function T2(e){return N2($g(e).toLowerCase())}function P2(){this.__data__=new bn,this.size=0}function k2(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function j2(e){return this.__data__.get(e)}function M2(e){return this.__data__.has(e)}var A2=200;function D2(e,t){var n=this.__data__;if(n instanceof bn){var r=n.__data__;if(!Dg||r.length<A2-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Jr(r)}return n.set(e,t),this.size=n.size,this}function Qr(e){var t=this.__data__=new bn(e);this.size=t.size}Qr.prototype.clear=P2;Qr.prototype.delete=k2;Qr.prototype.get=j2;Qr.prototype.has=M2;Qr.prototype.set=D2;var Gg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,kd=Gg&&typeof module=="object"&&module&&!module.nodeType&&module,$2=kd&&kd.exports===Gg,jd=$2?Yr.Buffer:void 0,Md=jd?jd.allocUnsafe:void 0;function I2(e,t){if(t)return e.slice();var n=e.length,r=Md?Md(n):new e.constructor(n);return e.copy(r),r}var L2=Yr.Uint8Array;const Ad=L2;function B2(e){var t=new e.constructor(e.byteLength);return new Ad(t).set(new Ad(e)),t}function z2(e,t){var n=t?B2(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function V2(e){return typeof e.constructor=="function"&&!Ng(e)?i_(Ig(e)):{}}function F2(e){return function(t,n,r){for(var o=-1,a=Object(t),i=r(t),s=i.length;s--;){var l=i[e?s:++o];if(n(a[l],l,a)===!1)break}return t}}var H2=F2();const U2=H2;function dl(e,t,n){(n!==void 0&&!Ni(e[t],n)||n===void 0&&!(t in e))&&$c(e,t,n)}function W2(e){return Xr(e)&&Ic(e)}function fl(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function G2(e){return O_(e,Ag(e))}function K2(e,t,n,r,o,a,i){var s=fl(e,n),l=fl(t,n),c=i.get(l);if(c){dl(e,n,c);return}var u=a?a(s,l,n+"",e,t,i):void 0,d=u===void 0;if(d){var f=Dr(l),p=!f&&kg(l),g=!f&&!p&&Mg(l);u=l,f||p||g?Dr(s)?u=s:W2(s)?u=l_(s):p?(d=!1,u=I2(l,!0)):g?(d=!1,u=z2(l,!0)):u=[]:$r(l)||ll(l)?(u=s,ll(s)?u=G2(s):(!or(s)||Ac(s))&&(u=V2(l))):d=!1}d&&(i.set(l,u),o(u,l,r,a,i),i.delete(l)),dl(e,n,u)}function Kg(e,t,n,r,o){e!==t&&U2(t,function(a,i){if(o||(o=new Qr),or(a))K2(e,t,i,n,Kg,r,o);else{var s=r?r(fl(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),dl(e,i,s)}},Ag)}var q2=T_(function(e,t,n){Kg(e,t,n)});const Y2=q2;function X2(e){const t=e.prototype;return!!(t&&t.isReactComponent)}function J2(e){var t,n;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===r||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((n=e==null?void 0:e.prototype)==null?void 0:n.setState)||e._forwardRef}function Q2(e){class t extends h.Component{render(){return h.createElement(e,this.props)}}return t.displayName=e.displayName,t}const fr=(e,t)=>{const n=r=>{const o=`
92
92
  ${Object.keys(t).map(a=>`const ${a} = $$context['${a}'];`).join(`
93
93
  `)}
94
94
  return ${r};
95
- `;return new Function("$$context",o)(t)};try{return n(e)}catch(r){console.warn(r);const o=`[${e}] expression run failed`;return console.warn(o),null}},YN=(e,t,n)=>function(...r){let o;try{o=`
95
+ `;return new Function("$$context",o)(t)};try{return n(e)}catch(r){console.warn(r);const o=`[${e}] expression run failed`;return console.warn(o),null}},Z2=(e,t,n)=>function(...r){let o;try{o=`
96
96
  var $$$__args__$$$ = Array.from(arguments);
97
97
  function $$_run_$$() {
98
98
  var $$_f_$$ = ${e||"function () {}"};
@@ -102,7 +102,7 @@ function $$_run_$$() {
102
102
  return $$_f_$$.apply($$_f_$$, $$$__args__$$$);
103
103
  }
104
104
  return $$_run_$$();
105
- `,new Function(o)(...r,t,n)}catch(a){console.log(o),console.warn(a)}},Md=(e,t)=>{const n={};return t.forEach((r,o)=>{n[r]=e[o]}),n},Ad=e=>{const t={};return Object.keys(e).forEach(n=>{let r=n.replace("-webkit","Webkit");r=r.replace("-ms","ms"),r=r.replace("-moz","Moz"),r=r.replace("-o","O");let o=r.split("-");o.length>=2&&(o=o.map((a,i)=>i!==0?EN(a):a)),t[o.join("")]=e[n]}),t},Dd=e=>{let t="";return Object.keys(e).forEach(n=>{t+=`${n}:${e[n]};`}),t},XN=(e,t)=>{const n=[];return t.forEach(r=>{const o=r.exec(e);o!=null&&o.length&&n.push(o[1])}),n},JN=(e,t)=>{const n={};return t.forEach(r=>{e[r.name]&&(n[r.name]=e[r.name])}),n},QN=(e,t)=>JN(e,t),Ra="DYNAMIC",ZN=["$$context","$$nodeModel"],$d=e=>{let t;const n=new Set,r=(i,s)=>{const l=typeof i=="function"?i(t):i;if(!Object.is(l,t)){const c=t;t=s??typeof l!="object"?l:Object.assign({},t,l),n.forEach(u=>u(t,c))}},o=()=>t,a={setState:r,getState:o,subscribe:i=>(n.add(i),()=>n.delete(i)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,a),a},e2=e=>e?$d(e):$d;class t2{constructor(){J(this,"storeMap",new Map)}addStore(t,n){const r=e2(n);return this.storeMap.set(t,r),r.name=t,r}setStore(t,n){this.storeMap.set(t,n)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}getState(t){var n;return(n=this.storeMap.get(t))==null?void 0:n.getState()}getStateObj(t){return{state:this.getState(t),updateState:n=>{this.setState(t,n)}}}setState(t,n){var r;return(r=this.storeMap.get(t))==null?void 0:r.setState(n)}connect(t,n){const r=this.storeMap.get(t);return r?r.subscribe(n):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((n,r)=>{t[r]=this.getStateObj(r)}),t}destroy(){this.storeMap=new Map}}class n2{constructor(){J(this,"varSpace",new Map)}get(t){return this.varSpace.get(t)}add(t,n){this.varSpace.set(t,n)}remove(t){this.varSpace.delete(t)}destroy(){this.varSpace.clear()}getStateSnapshot(){const t={};return this.varSpace.forEach((n,r)=>{t[r]=n}),t}}class r2{constructor(){J(this,"renderMode","normal"),J(this,"components",{}),J(this,"storeManager",new t2),J(this,"variableManager",new n2),J(this,"runtimeComponentCache",new Map),J(this,"onGetRef"),J(this,"onGetComponent"),J(this,"onComponentMount"),J(this,"onComponentDestroy"),J(this,"processNodeConfigHook")}getComponent(t){var n;const r=t.value.componentName;let o=this.components[r]||(()=>`Component [${r}] not found`);return KN(o)||(o=qN(o),this.components[r]=o),this.onGetComponent&&(o=(n=this.onGetComponent)==null?void 0:n.call(this,o,t)),o}getContext(t={},n){let r=t;return n&&(r={...t},r.__proto__=n||null),r}pageRender(t,{components:n,onGetRef:r,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:l,processNodeConfigHook:c}){this.renderMode=l,this.components=n,this.onGetRef=r,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=c;const u=t.value.componentsTree,d=this.getComponent(u),f=this.convertModelToComponent(d,t.value.componentsTree),p={},h=u.props;return Object.keys(h).forEach(m=>{p[m]=h[m].value}),p.$$context=o,this.render(f,p)}transformProps(t={},{$$context:n}){const r=t,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(cs(i))return o(i.value);if(pE(i)){const s=i.value,l=s.value;if(!l)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const c=u=>{const d=`${u.id}-${Ra}`;if(this.runtimeComponentCache.get(u.id))return{key:d,component:this.runtimeComponentCache.get(u.id)};const f=this.getComponent(u),p=this.convertModelToComponent(f,u),h=s.params||[];return{component:(...m)=>{const b=Md(m,h),y=this.getContext({params:b},n);return this.render(p,{$$context:y,key:d})},key:d}};if(Array.isArray(l)){const u=l==null?void 0:l.map(d=>c(d));return(...d)=>u.map(f=>GN(f.component)?g.createElement(f.component,{$$context:n,key:f.key}):f.component(...d))}else return c(l).component}else{if(Fn(i))return fr(i.value,n||{});if(dE(i))return YN(i.value,n,this.storeManager);if($r(i)){let s=i;cs(i)&&(s=i.value);const l=s,c={};return Object.keys(s).forEach(u=>{c[u]=o(l[u])}),c}else return i}},a={};return Object.keys(r).forEach(i=>{const s=r[i];a[i]=o(s)}),a}collectSpecialProps(t={},n){const r=[],o=(a,i)=>{let s=i;cs(i)&&(s=i.value),n(s)?r.push({keyPath:a,val:s}):Dr(s)?s.forEach((l,c)=>{o([...a,String(c)],l)}):$r(s)&&Object.keys(s).forEach(l=>{o([...a,l],s[l])})};return o(["$root"],t),r}convertModelToComponent(t,n){const r=this;class o extends g.Component{constructor(i){super(i),J(this,"_CONDITION",!0),J(this,"_DESIGN_BOX",!1),J(this,"_NODE_MODEL",n),J(this,"_NODE_ID",n.id),J(this,"UNIQUE_ID",`${n.id}_${yn()}`),J(this,"targetComponentRef"),J(this,"listenerHandle",[]),J(this,"storeState"),J(this,"storeListenDisposeList",[]),J(this,"domHeader"),J(this,"mediaStyleDomMap",{}),J(this,"variableSpace"),J(this,"nodeName"),J(this,"updateState",u=>{this.storeState.setState(u),this.forceUpdate()}),J(this,"getStyleDomById",u=>{const d=this.mediaStyleDomMap;let f=d[u];return f||(f=document.createElement("style"),d[u]=f),f.id=u,f}),J(this,"addMediaCSS",()=>{var u;let d=this.domHeader;if(d||(d=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=d),!this.domHeader)return;const f=this._NODE_MODEL.value.css;f&&f.value.forEach(p=>{var h;const m=`${this.UNIQUE_ID}_${p.state}`;let b=`.${f.class}`;if(p.state!=="normal"&&(b=`${b}:${p.state}`),Object.keys(p.style).length!==0){const y=this.getStyleDomById(m);y.innerText=`${b} { ${Dd(p.style)} }`,d==null||d.appendChild(y)}(h=p.media)!=null&&h.length&&p.media.forEach(y=>{const S=`${m}_${y.type}_${y.value}`,E=this.getStyleDomById(S);E.media=`screen and (${y.type}:${y.value}px)`,E.innerHTML=`${b} { ${Dd(y.style)} }`,d==null||d.appendChild(E)})})}),J(this,"removeMediaCSS",()=>{const u=this.mediaStyleDomMap;Object.keys(u).forEach(d=>{var f;(f=this.domHeader)==null||f.removeChild(u[d])}),this.mediaStyleDomMap={}}),J(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(u=>u()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=g.createRef(),this.state=n.value.state||{};const s=n.value.nodeName||n.id;this.nodeName=s;const l=r.storeManager.getStore(s);l?(this.storeState=l,l.setState({...n.value.state||{}})):this.storeState=r.storeManager.addStore(s,()=>({...n.value.state||{}})),this.storeState.subscribe(u=>{this.setState({...u})}),this.connectStore();const c=r.variableManager.get(s);c?this.variableSpace=c:(this.variableSpace={staticVar:{},methods:{}},r.variableManager.add(s,this.variableSpace))}connectStore(){const i=r.collectSpecialProps(n.props,d=>!!Fn(d)),s=r.collectSpecialProps({css:n.value.css,class:n.value.classNames},d=>!!Fn(d));let l=[];[...i,...s].map(d=>{const f=d.val,p=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],h=XN(f.value,p);l=[...l,...h]}).filter(Boolean);const c=Array.from(new Set(l)),u=[];c.length&&c.forEach(d=>{r.storeManager.getStore(d)||(r.storeManager.addStore(d,()=>({})),console.warn(r.storeManager,d,"not exits"));const f=r.storeManager.connect(d,()=>{this.forceUpdate()});u.push(f)}),this.storeListenDisposeList=u}componentDidMount(){var i;this.addMediaCSS(),r.onGetRef&&r.onGetRef(this.targetComponentRef,n,this),(i=r.onComponentMount)==null||i.call(r,this,n);const s=()=>{r.storeManager.setStore(n.value.nodeName||n.id,this.storeState),this.storeState.setState({...this.state,...n.value.state||{}}),this.rebuildNode()};n.onChange(s)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(s=>s()),this.removeMediaCSS(),(i=r.onComponentDestroy)==null||i.call(r,this,n)}render(){var i;const{$$context:s,...l}=this.props,c=n.value.nodeName||n.id,u={key:n.id,...n.props,...l},d={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:r.storeManager,getState:()=>r.storeManager.getStateObj(c),getStateObj:()=>r.storeManager.getStateObj(c),getStateObjById:N=>r.storeManager.getStateObj(N),stateManager:r.storeManager.getStateSnapshot(),getMethods:()=>r.variableManager.get(c).methods,getMethodsById:N=>r.variableManager.get(N).methods,getStaticVar:()=>r.variableManager.get(c).staticVar,getStaticVarById:N=>r.variableManager.get(N).staticVar};n.value.componentName===qr.ROOT_CONTAINER&&(d.globalState=this.state,d.updateGlobalState=this.updateState);const f=r.getContext(d,s),p=r.transformProps({methods:n.value.methods},{$$context:f}).methods.reduce((N,T)=>(N[T.name]=T.define,N),{});f.methods=p,this.variableSpace.methods=Object.assign(this.variableSpace.methods,p);const h=n.value.loop;let m=[];if(h&&h.open){this.targetComponentRef.current=[];let N=h.data||[];if(Fn(h.data)){const T=h.data;N=fr(T.value,f||{})}return m=N.map((...T)=>{var k;const j=T[1],I=[h.forName||"item",h.forIndex||"index"],M=Md(T,I);let P="loopData";h.name&&(P=`${P}${h.name}`);const D=r.getContext({[P]:M},f),V=r.transformProps(u,{$$context:D}),ne=((k=n.value.classNames)==null?void 0:k.map(q=>{var Q;const ie=q.name;return Fn(q.status)&&fr(String(((Q=q.status)==null?void 0:Q.value)||""),D)?ie:""}))||[];let ee=`${V.className??""} ${ne.join(" ")}`.trim();n.value.css&&(ee=`${n.value.css.class} ${ee}`.trim()),V.className=ee;const de=r.transformProps(n.value.style,{$$context:D});n.value.style&&(V.style=Ad(de||{}));const{children:A}=V;let B=[];if(A!==void 0)delete V.children,B=Array.isArray(A)?A:[A];else{const q=[];n.value.children.forEach((Q,ie)=>{const le=r.buildComponent(Q,{$$context:D,idx:ie});q.push(le)}),B=q}if(V.key=`${V.key}-${j}`,Fn(h.key)){const q=h.key,Q=fr(q.value,D||{});V.key+=`-${Q}`}return V.ref=q=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[j]=q},r.render(t,V,...B)}),m}const b=r.transformProps(u,{$$context:f}),{children:y}=b;let S=[];if(y!==void 0)delete b.children,S=Array.isArray(y)?y:[y];else{const N=[];n.value.children.forEach((T,k)=>{const j=r.buildComponent(T,{$$context:f,idx:k});N.push(j)}),S=N}b.ref=this.targetComponentRef;const E=((i=n.value.classNames)==null?void 0:i.map(N=>{var T;const k=N.name;return Fn(N.status)&&fr(((T=N.status)==null?void 0:T.value)||"",f)?k:""}))||[];let x=`${b.className??""} ${E.join(" ")}`.trim();n.value.css&&(x=`${n.value.css.class} ${x}`.trim()),b.className=x;const v=r.transformProps(n.value.style,{$$context:f});n.value.style&&(b.style=Ad(v||{}));let O=n.value.condition??!0;typeof O!="boolean"&&(O=fr(O.value,f||{}));let C={condition:O,props:b};r.processNodeConfigHook&&(C=r.processNodeConfigHook(C,n));const R=r.render(t,C.props,...S);return this._CONDITION=C.condition,C.condition?R:w("div",{style:{display:"none"},children:R})}}return J(o,"__CP_TYPE__",Ra),o.displayName=`${n.value.componentName}Dynamic`,o}buildComponent(t,{$$context:n={}}){const r=this.runtimeComponentCache;return typeof t=="string"?this.render(t):fE(t)?(({currentNode:o})=>{const a=o.value.id;let i=null;if(r.get(a))i=r.get(a);else{const c=this.getComponent(o);i=this.convertModelToComponent(c,o)}!r.get(a)&&this.renderMode!=="design"&&r.set(a,i);const s=`${a}-${Ra}`,l={$$context:n,$$nodeModel:t,key:s};return this.render(i,l)})({currentNode:t}):void 0}render(t,n={},...r){return typeof t=="string"||typeof t=="number"?String(t):(ZN.forEach(o=>{o in n&&t.__CP_TYPE__!==Ra&&delete n[o]}),g.createElement(t,n,...r))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}Y0(new r2);const o2=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var a2=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Gg={exports:{}},ki={};/**
105
+ `,new Function(o)(...r,t,n)}catch(a){console.log(o),console.warn(a)}},Dd=(e,t)=>{const n={};return t.forEach((r,o)=>{n[r]=e[o]}),n},$d=e=>{const t={};return Object.keys(e).forEach(n=>{let r=n.replace("-webkit","Webkit");r=r.replace("-ms","ms"),r=r.replace("-moz","Moz"),r=r.replace("-o","O");let o=r.split("-");o.length>=2&&(o=o.map((a,i)=>i!==0?T2(a):a)),t[o.join("")]=e[n]}),t},Id=e=>{let t="";return Object.keys(e).forEach(n=>{t+=`${n}:${e[n]};`}),t},eN=(e,t)=>{const n=[];return t.forEach(r=>{const o=r.exec(e);o!=null&&o.length&&n.push(o[1])}),n},tN=(e,t)=>{const n={};return t.forEach(r=>{e[r.name]&&(n[r.name]=e[r.name])}),n},nN=(e,t)=>tN(e,t),Ra="DYNAMIC",rN=["$$context","$$nodeModel"],Ld=e=>{let t;const n=new Set,r=(i,s)=>{const l=typeof i=="function"?i(t):i;if(!Object.is(l,t)){const c=t;t=s??typeof l!="object"?l:Object.assign({},t,l),n.forEach(u=>u(t,c))}},o=()=>t,a={setState:r,getState:o,subscribe:i=>(n.add(i),()=>n.delete(i)),destroy:()=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}};return t=e(r,o,a),a},oN=e=>e?Ld(e):Ld;class aN{constructor(){Q(this,"storeMap",new Map)}addStore(t,n){const r=oN(n);return this.storeMap.set(t,r),r.name=t,r}setStore(t,n){this.storeMap.set(t,n)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}getState(t){var n;return(n=this.storeMap.get(t))==null?void 0:n.getState()}getStateObj(t){return{state:this.getState(t),updateState:n=>{this.setState(t,n)}}}setState(t,n){var r;return(r=this.storeMap.get(t))==null?void 0:r.setState(n)}connect(t,n){const r=this.storeMap.get(t);return r?r.subscribe(n):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((n,r)=>{t[r]=this.getStateObj(r)}),t}destroy(){this.storeMap=new Map}}class iN{constructor(){Q(this,"varSpace",new Map)}get(t){return this.varSpace.get(t)}add(t,n){this.varSpace.set(t,n)}remove(t){this.varSpace.delete(t)}destroy(){this.varSpace.clear()}getStateSnapshot(){const t={};return this.varSpace.forEach((n,r)=>{t[r]=n}),t}}class sN{constructor(){Q(this,"renderMode","normal"),Q(this,"components",{}),Q(this,"storeManager",new aN),Q(this,"variableManager",new iN),Q(this,"runtimeComponentCache",new Map),Q(this,"onGetRef"),Q(this,"onGetComponent"),Q(this,"onComponentMount"),Q(this,"onComponentDestroy"),Q(this,"processNodeConfigHook")}getComponent(t){var n;const r=t.value.componentName;let o=this.components[r]||(()=>`Component [${r}] not found`);return J2(o)||(o=Q2(o),this.components[r]=o),this.onGetComponent&&(o=(n=this.onGetComponent)==null?void 0:n.call(this,o,t)),o}getContext(t={},n){let r=t;return n&&(r={...t},r.__proto__=n||null),r}pageRender(t,{components:n,onGetRef:r,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:l,processNodeConfigHook:c}){this.renderMode=l,this.components=n,this.onGetRef=r,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=c;const u=t.value.componentsTree,d=this.getComponent(u),f=this.convertModelToComponent(d,t.value.componentsTree),p={},g=u.props;return Object.keys(g).forEach(m=>{p[m]=g[m].value}),p.$$context=o,this.render(f,p)}transformProps(t={},{$$context:n}){const r=t,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(cs(i))return o(i.value);if(mE(i)){const s=i.value,l=s.value;if(!l)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const c=u=>{const d=`${u.id}-${Ra}`;if(this.runtimeComponentCache.get(u.id))return{key:d,component:this.runtimeComponentCache.get(u.id)};const f=this.getComponent(u),p=this.convertModelToComponent(f,u),g=s.params||[];return{component:(...m)=>{const b=Dd(m,g),y=this.getContext({params:b},n);return this.render(p,{$$context:y,key:d})},key:d}};if(Array.isArray(l)){const u=l==null?void 0:l.map(d=>c(d));return(...d)=>u.map(f=>X2(f.component)?h.createElement(f.component,{$$context:n,key:f.key}):f.component(...d))}else return c(l).component}else{if(Vn(i))return fr(i.value,n||{});if(gE(i))return Z2(i.value,n,this.storeManager);if($r(i)){let s=i;cs(i)&&(s=i.value);const l=s,c={};return Object.keys(s).forEach(u=>{c[u]=o(l[u])}),c}else return i}},a={};return Object.keys(r).forEach(i=>{const s=r[i];a[i]=o(s)}),a}collectSpecialProps(t={},n){const r=[],o=(a,i)=>{let s=i;cs(i)&&(s=i.value),n(s)?r.push({keyPath:a,val:s}):Dr(s)?s.forEach((l,c)=>{o([...a,String(c)],l)}):$r(s)&&Object.keys(s).forEach(l=>{o([...a,l],s[l])})};return o(["$root"],t),r}convertModelToComponent(t,n){const r=this;class o extends h.Component{constructor(i){super(i),Q(this,"_CONDITION",!0),Q(this,"_DESIGN_BOX",!1),Q(this,"_NODE_MODEL",n),Q(this,"_NODE_ID",n.id),Q(this,"UNIQUE_ID",`${n.id}_${yn()}`),Q(this,"targetComponentRef"),Q(this,"listenerHandle",[]),Q(this,"storeState"),Q(this,"storeListenDisposeList",[]),Q(this,"domHeader"),Q(this,"mediaStyleDomMap",{}),Q(this,"variableSpace"),Q(this,"nodeName"),Q(this,"updateState",u=>{this.storeState.setState(u),this.forceUpdate()}),Q(this,"getStyleDomById",u=>{const d=this.mediaStyleDomMap;let f=d[u];return f||(f=document.createElement("style"),d[u]=f),f.id=u,f}),Q(this,"addMediaCSS",()=>{var u;let d=this.domHeader;if(d||(d=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=d),!this.domHeader)return;const f=this._NODE_MODEL.value.css;f&&f.value.forEach(p=>{var g;const m=`${this.UNIQUE_ID}_${p.state}`;let b=`.${f.class}`;if(p.state!=="normal"&&(b=`${b}:${p.state}`),Object.keys(p.style).length!==0){const y=this.getStyleDomById(m);y.innerText=`${b} { ${Id(p.style)} }`,d==null||d.appendChild(y)}(g=p.media)!=null&&g.length&&p.media.forEach(y=>{const S=`${m}_${y.type}_${y.value}`,E=this.getStyleDomById(S);E.media=`screen and (${y.type}:${y.value}px)`,E.innerHTML=`${b} { ${Id(y.style)} }`,d==null||d.appendChild(E)})})}),Q(this,"removeMediaCSS",()=>{const u=this.mediaStyleDomMap;Object.keys(u).forEach(d=>{var f;(f=this.domHeader)==null||f.removeChild(u[d])}),this.mediaStyleDomMap={}}),Q(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(u=>u()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=h.createRef(),this.state=n.value.state||{};const s=n.value.nodeName||n.id;this.nodeName=s;const l=r.storeManager.getStore(s);l?(this.storeState=l,l.setState({...n.value.state||{}})):this.storeState=r.storeManager.addStore(s,()=>({...n.value.state||{}})),this.storeState.subscribe(u=>{this.setState({...u})}),this.connectStore();const c=r.variableManager.get(s);c?this.variableSpace=c:(this.variableSpace={staticVar:{},methods:{}},r.variableManager.add(s,this.variableSpace))}connectStore(){const i=r.collectSpecialProps(n.props,d=>!!Vn(d)),s=r.collectSpecialProps({css:n.value.css,class:n.value.classNames},d=>!!Vn(d));let l=[];[...i,...s].map(d=>{const f=d.val,p=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],g=eN(f.value,p);l=[...l,...g]}).filter(Boolean);const c=Array.from(new Set(l)),u=[];c.length&&c.forEach(d=>{r.storeManager.getStore(d)||(r.storeManager.addStore(d,()=>({})),console.warn(r.storeManager,d,"not exits"));const f=r.storeManager.connect(d,()=>{this.forceUpdate()});u.push(f)}),this.storeListenDisposeList=u}componentDidMount(){var i;this.addMediaCSS(),r.onGetRef&&r.onGetRef(this.targetComponentRef,n,this),(i=r.onComponentMount)==null||i.call(r,this,n);const s=()=>{r.storeManager.setStore(n.value.nodeName||n.id,this.storeState),this.storeState.setState({...this.state,...n.value.state||{}}),this.rebuildNode()};n.onChange(s)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(s=>s()),this.removeMediaCSS(),(i=r.onComponentDestroy)==null||i.call(r,this,n)}render(){var i;const{$$context:s,...l}=this.props,c=n.value.nodeName||n.id,u={key:n.id,...n.props,...l},d={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:r.storeManager,getState:()=>r.storeManager.getStateObj(c),getStateObj:()=>r.storeManager.getStateObj(c),getStateObjById:N=>r.storeManager.getStateObj(N),stateManager:r.storeManager.getStateSnapshot(),getMethods:()=>r.variableManager.get(c).methods,getMethodsById:N=>r.variableManager.get(N).methods,getStaticVar:()=>r.variableManager.get(c).staticVar,getStaticVarById:N=>r.variableManager.get(N).staticVar};n.value.componentName===qr.ROOT_CONTAINER&&(d.globalState=this.state,d.updateGlobalState=this.updateState);const f=r.getContext(d,s),p=r.transformProps({methods:n.value.methods},{$$context:f}).methods.reduce((N,T)=>(N[T.name]=T.define,N),{});f.methods=p,this.variableSpace.methods=Object.assign(this.variableSpace.methods,p);const g=n.value.loop;let m=[];if(g&&g.open){this.targetComponentRef.current=[];let N=g.data||[];if(Vn(g.data)){const T=g.data;N=fr(T.value,f||{})}return m=N.map((...T)=>{var M;const j=T[1],D=[g.forName||"item",g.forIndex||"index"],k=Dd(T,D);let P="loopData";g.name&&(P=`${P}${g.name}`);const L=r.getContext({[P]:k},f),z=r.transformProps(u,{$$context:L}),Z=((M=n.value.classNames)==null?void 0:M.map(W=>{var ne;const ie=W.name;return Vn(W.status)&&fr(String(((ne=W.status)==null?void 0:ne.value)||""),L)?ie:""}))||[];let J=`${z.className??""} ${Z.join(" ")}`.trim();n.value.css&&(J=`${n.value.css.class} ${J}`.trim()),z.className=J;const le=r.transformProps(n.value.style,{$$context:L});n.value.style&&(z.style=$d(le||{}));const{children:A}=z;let $=[];if(A!==void 0)delete z.children,$=Array.isArray(A)?A:[A];else{const W=[];n.value.children.forEach((ne,ie)=>{const de=r.buildComponent(ne,{$$context:L,idx:ie});W.push(de)}),$=W}if(z.key=`${z.key}-${j}`,Vn(g.key)){const W=g.key,ne=fr(W.value,L||{});z.key+=`-${ne}`}return z.ref=W=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[j]=W},r.render(t,z,...$)}),m}const b=r.transformProps(u,{$$context:f}),{children:y}=b;let S=[];if(y!==void 0)delete b.children,S=Array.isArray(y)?y:[y];else{const N=[];n.value.children.forEach((T,M)=>{const j=r.buildComponent(T,{$$context:f,idx:M});N.push(j)}),S=N}b.ref=this.targetComponentRef;const E=((i=n.value.classNames)==null?void 0:i.map(N=>{var T;const M=N.name;return Vn(N.status)&&fr(((T=N.status)==null?void 0:T.value)||"",f)?M:""}))||[];let x=`${b.className??""} ${E.join(" ")}`.trim();n.value.css&&(x=`${n.value.css.class} ${x}`.trim()),b.className=x;const v=r.transformProps(n.value.style,{$$context:f});n.value.style&&(b.style=$d(v||{}));let C=n.value.condition??!0;typeof C!="boolean"&&(C=fr(C.value,f||{}));let O={condition:C,props:b};r.processNodeConfigHook&&(O=r.processNodeConfigHook(O,n));const R=r.render(t,O.props,...S);return this._CONDITION=O.condition,O.condition?R:w("div",{style:{display:"none"},children:R})}}return Q(o,"__CP_TYPE__",Ra),o.displayName=`${n.value.componentName}Dynamic`,o}buildComponent(t,{$$context:n={}}){const r=this.runtimeComponentCache;return typeof t=="string"?this.render(t):vE(t)?(({currentNode:o})=>{const a=o.value.id;let i=null;if(r.get(a))i=r.get(a);else{const c=this.getComponent(o);i=this.convertModelToComponent(c,o)}!r.get(a)&&this.renderMode!=="design"&&r.set(a,i);const s=`${a}-${Ra}`,l={$$context:n,$$nodeModel:t,key:s};return this.render(i,l)})({currentNode:t}):void 0}render(t,n={},...r){return typeof t=="string"||typeof t=="number"?String(t):(rN.forEach(o=>{o in n&&t.__CP_TYPE__!==Ra&&delete n[o]}),h.createElement(t,n,...r))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}Z0(new sN);const lN=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var cN=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},qg={exports:{}},ki={};/**
106
106
  * @license React
107
107
  * react-jsx-runtime.production.min.js
108
108
  *
@@ -110,23 +110,23 @@ return $$_run_$$();
110
110
  *
111
111
  * This source code is licensed under the MIT license found in the
112
112
  * LICENSE file in the root directory of this source tree.
113
- */var i2=g,s2=Symbol.for("react.element"),l2=Symbol.for("react.fragment"),c2=Object.prototype.hasOwnProperty,u2=i2.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,d2={key:!0,ref:!0,__self:!0,__source:!0};function Kg(e,t,n){var r,o={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)c2.call(t,r)&&!d2.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:s2,type:e,key:a,ref:i,props:o,_owner:u2.current}}ki.Fragment=l2;ki.jsx=Kg;ki.jsxs=Kg;Gg.exports=ki;var f2=Gg.exports;const p2=f2.jsx,wn=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},h2=[...o2,...JO],g2=h2.reduce((e,t)=>(e[t]=({children:n,$$attributes:r=[],...o})=>{let a=n;return Array.isArray(n)||(a=[n]),g.createElement(t,{...o,...wn(r)},...a)},e),{}),v2=({children:e,width:t,height:n,$$attributes:r=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(c=>c!==void 0);const{style:i={},...s}=wn(r),l={height:n,width:t,...i,...o.style||{}};return React.createElement("div",{...o,...s,style:l},...a)},m2=({afterMount:e,beforeDestroy:t,$$attributes:n=[],...r})=>(g.useEffect(()=>(e==null||e(r),()=>{t==null||t(r)}),[]),w("canvas",{...r,...wn(n)})),y2=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("img",{...n,...wn(t)},...r)},b2=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("video",{...n,...wn(t)},...r)},w2=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("audio",{...n,...wn(t)},...r)},S2=({$$attributes:e=[],content:t,...n})=>w("span",{...n,...wn(e),children:t}),x2=({children:e,$$attributes:t=[],afterMount:n,beforeDestroy:r,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),g.useEffect(()=>(n==null||n(o),()=>{r==null||r(o)}),[]),p2("div",{...o,...wn(t),children:a})},C2=({children:e,$$attributes:t=[],htmlTag:n="div",...r})=>{let o=e;Array.isArray(e)||(o=[e]);const{style:a={},...i}=wn(t),s={...a,...r.style||{}};return g.createElement(n,{...r,...i,style:s},...o)},O2={RootContainer:({children:e})=>e,...g2,CContainer:x2,CVideo:b2,CAudio:w2,CBlock:v2,CImage:y2,CText:S2,CCanvas:m2,CNativeTag:C2};class E2{constructor(){J(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,n){this.refMap.set(t,n)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class _2 extends g.Component{constructor(t){super(t),J(this,"refManager"),J(this,"dynamicComponentInstanceMap",new Map),J(this,"onGetRef",(n,r,o)=>{var a,i;(i=(a=this.props).onGetRef)==null||i.call(a,n,r,o),this.dynamicComponentInstanceMap.set(r.id,o),this.refManager.add(r.value.refId||r.id,n)}),J(this,"rerender",n=>{if(this.props.adapter.clear(),(n==null?void 0:n.nodeType)==="PAGE"&&n)this.setState({pageModel:n});else if($r(n)&&bg(n)){const r=n;this.setState({pageModel:new ai(r,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new ai(t.page)},this.refManager=new E2}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:t}=this.props;t&&(t.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:t}=this,{adapter:n,onGetComponent:r,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const s={...O2,...t.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:s,onGetRef:this.onGetRef,onGetComponent:r,onComponentMount:a,onComponentDestroy:o,$$context:l,renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}class R2 extends g.Component{constructor(t){super(t),J(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})}),this.state={hasError:!1,error:""}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,n)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const r=te("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,te("p",{children:["msg: ",String(this.state.error)]}),w("button",{onDoubleClick:t,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"},children:"double click to refresh"}),w("div",{style:{display:"none"}})]});return g.createElement(this.props.targetComponent,{onlyRenderChild:!0},r)}return this.props.children}}class N2{constructor(){J(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,n){const r=this.instanceMap.get(t);r?r.push(n):this.instanceMap.set(t,[n])}remove(t,n){const r=this.instanceMap.get(t);if(n!==void 0&&Array.isArray(r)){const o=r.filter(a=>a!==n);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const T2=e=>{const{node:t}=e,n=g.useMemo(()=>{const s=t.isContainer();return $r(s)?s:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:r,height:o,width:a,style:i}=n;return w("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",minWidth:"300px",minHeight:"50px",width:a,height:o,...i},children:r})};class q5 extends g.Component{constructor(t){super(t),J(this,"instanceManager",new N2),J(this,"renderRef"),J(this,"dropPlaceholder",T2),J(this,"onGetComponent",(n,r)=>{var o,a;const i=this;let s=n;const l=(a=(o=r.material)==null?void 0:o.value.advanceCustom)==null?void 0:a.wrapComponent;l&&(s=l(n,{node:r,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class c extends g.Component{constructor(){super(...arguments),J(this,"_DESIGN_BOX",!0),J(this,"_NODE_MODEL",r),J(this,"_NODE_ID",r.id),J(this,"_UNIQUE_ID",`${r.id}_${yn()}`),J(this,"_STATUS")}componentDidMount(){i.instanceManager.add(r.id,this)}componentWillUnmount(){this._STATUS="DESTROY",i.instanceManager.remove(r.id,this)}render(){const{children:d=[],onlyRenderChild:f,...p}=this.props;let h=d;return Dr(d)||(h=[d]),!h.filter(Boolean).length&&(r.isContainer()||r.value.componentName===qr.ROOT_CONTAINER)&&h.push(g.createElement(i.dropPlaceholder,{node:r})),f?h:g.createElement(s,p,...h)}}return g.forwardRef(function(u,d){return w(R2,{node:r,targetComponent:c,children:g.createElement(c,{ref:d,...u})})})}),this.renderRef=g.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,n;(n=(t=this.props).onMount)==null||n.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(t)}getInstancesById(t,n){let r=[...this.instanceManager.get(t)||[]];return n!==void 0&&(r=r.filter(o=>n===(o==null?void 0:o._UNIQUE_ID))),r}getInstanceByDom(t){const n=qg(t);if(!n)return null;const r=Yg(n);return(r==null?void 0:r.stateNode)||null}getDomsById(t,n){const r=this.getInstancesById(t),o=[];return r==null||r.forEach(a=>{var i;if((a==null?void 0:a._STATUS)==="DESTROY")return;const s=Wy.findDOMNode(a);if(s&&!(s instanceof Text))if(n){const l=Array.from(((i=s.querySelectorAll)==null?void 0:i.call(s,n))||[]);o.push(...l)}else o.push(s)}),o}getDomRectById(t,n){return this.getDomsById(t,n).map(r=>r==null?void 0:r.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:n}=this,{render:r,...o}=t;return r&&(r.ref.current=this),w(_2,{onGetComponent:n,...o,processNodeConfigHook:(a,i)=>{var s,l;if(i.nodeType!=="NODE")return a;const{props:c,condition:u}=a;let d={...c};const f=((s=i.value.configure)==null?void 0:s.devState)||{},p=(l=i.material)==null?void 0:l.value.fixedProps;if(p!==void 0){if($r(p))d={...d,...p};else if(typeof p=="function"){const m=p(d);d={...d,...m}}}let h=u;return f.condition===!1&&(h=f.condition),{props:WN(d,f.props||{}),condition:h}},ref:this.renderRef})}}const qg=e=>{if(!e)return null;const t=Object.keys(e).find(n=>n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber$"))||"";return t?e[t]:qg(e.parentElement)},Yg=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:Yg(e.return):null};var P2={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(a2,function(){var n=function(){},r={},o={},a={};function i(f,p){f=f.push?f:[f];var h=[],m=f.length,b=m,y,S,E,x;for(y=function(v,O){O.length&&h.push(v),b--,b||p(h)};m--;){if(S=f[m],E=o[S],E){y(S,E);continue}x=a[S]=a[S]||[],x.push(y)}}function s(f,p){if(f){var h=a[f];if(o[f]=p,!!h)for(;h.length;)h[0](f,p),h.splice(0,1)}}function l(f,p){f.call&&(f={success:f}),p.length?(f.error||n)(p):(f.success||n)(f)}function c(f,p,h,m){var b=document,y=h.async,S=(h.numRetries||0)+1,E=h.before||n,x=f.replace(/[\?|#].*$/,""),v=f.replace(/^(css|img|module|nomodule)!/,""),O,C,R;if(m=m||0,/(^css!|\.css$)/.test(x))R=b.createElement("link"),R.rel="stylesheet",R.href=v,O="hideFocus"in R,O&&R.relList&&(O=0,R.rel="preload",R.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(x))R=b.createElement("img"),R.src=v;else if(R=b.createElement("script"),R.src=v,R.async=y===void 0?!0:y,C="noModule"in R,/^module!/.test(x)){if(!C)return p(f,"l");R.type="module"}else if(/^nomodule!/.test(x)&&C)return p(f,"l");R.onload=R.onerror=R.onbeforeload=function(N){var T=N.type[0];if(O)try{R.sheet.cssText.length||(T="e")}catch(k){k.code!=18&&(T="e")}if(T=="e"){if(m+=1,m<S)return c(f,p,h,m)}else if(R.rel=="preload"&&R.as=="style")return R.rel="stylesheet";p(f,T,N.defaultPrevented)},E(f,R)!==!1&&b.head.appendChild(R)}function u(f,p,h){f=f.push?f:[f];var m=f.length,b=m,y=[],S,E;for(S=function(x,v,O){if(v=="e"&&y.push(x),v=="b")if(O)y.push(x);else return;m--,m||p(y)},E=0;E<b;E++)c(f[E],S,h)}function d(f,p,h){var m,b;if(p&&p.trim&&(m=p),b=(m?h:p)||{},m){if(m in r)throw"LoadJS";r[m]=!0}function y(S,E){u(f,function(x){l(b,x),S&&l({success:S,error:E},x),s(m,x)},b)}if(b.returnPromise)return new Promise(y);y()}return d.ready=function(f,p){return i(f,function(h){l(p,h)}),d},d.done=function(f){s(f,[])},d.reset=function(){r={},o={},a={}},d.isDefined=function(f){return f in r},d})})(P2);const Xg=async({iframe:e})=>{const t=e.getWindow();t&&(t.React=window.React,t.ReactDOM=window.ReactDOM,t.ReactDOMClient=window.ReactDOMClient)},Jg=e=>async({iframe:n,assets:r,page:o,pageModel:a,ready:i,renderJSUrl:s})=>{await n.injectJS(s||"");const l=n.getWindow(),c=n.getDocument(),u=l.React,d=l.ReactDOMClient,f=l.CRender,p=o||(a==null?void 0:a.export());if(!p){console.log("page schema is empty");return}const h=[...r,...p.assets||[]];new f.AssetLoader(h,{window:n.getWindow()}).onSuccess(()=>{const b=Xn.collectVariable(h,l),y=Xn.flatObject(b),S=QN(b,p.thirdLibs||[]),E=u==null?void 0:u.createElement(f.DesignRender,{adapter:f==null?void 0:f.ReactAdapter,page:o,pageModel:a,components:{...y,...e},$$context:{thirdLibs:S},onMount:x=>{i(x)}});d.createRoot(c.getElementById("app")).render(E)}).onError(()=>{console.log("资源加载出错")}).load()};var Qg={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(So,function(){function n(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function r(x,v){for(var O=0;O<v.length;O++){var C=v[O];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(x,C.key,C)}}function o(x,v,O){return v&&r(x.prototype,v),O&&r(x,O),x}function a(x,v,O){return v in x?Object.defineProperty(x,v,{value:O,enumerable:!0,configurable:!0,writable:!0}):x[v]=O,x}function i(x,v){var O=Object.keys(x);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(x);v&&(C=C.filter(function(R){return Object.getOwnPropertyDescriptor(x,R).enumerable})),O.push.apply(O,C)}return O}function s(x){for(var v=1;v<arguments.length;v++){var O=arguments[v]!=null?arguments[v]:{};v%2?i(Object(O),!0).forEach(function(C){a(x,C,O[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(O)):i(Object(O)).forEach(function(C){Object.defineProperty(x,C,Object.getOwnPropertyDescriptor(O,C))})}return x}function l(x){return function(v){if(Array.isArray(v))return u(v)}(x)||function(v){if(typeof Symbol<"u"&&Symbol.iterator in Object(v))return Array.from(v)}(x)||c(x)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
114
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function c(x,v){if(x){if(typeof x=="string")return u(x,v);var O=Object.prototype.toString.call(x).slice(8,-1);return O==="Object"&&x.constructor&&(O=x.constructor.name),O==="Map"||O==="Set"?Array.from(x):O==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(O)?u(x,v):void 0}}function u(x,v){(v==null||v>x.length)&&(v=x.length);for(var O=0,C=new Array(v);O<v;O++)C[O]=x[O];return C}function d(x){if(typeof Symbol>"u"||x[Symbol.iterator]==null){if(Array.isArray(x)||(x=c(x))){var v=0,O=function(){};return{s:O,n:function(){return v>=x.length?{done:!0}:{done:!1,value:x[v++]}},e:function(k){throw k},f:O}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
115
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var C,R,N=!0,T=!1;return{s:function(){C=x[Symbol.iterator]()},n:function(){var k=C.next();return N=k.done,k},e:function(k){T=!0,R=k},f:function(){try{N||C.return==null||C.return()}finally{if(T)throw R}}}}var f={};f[f.Fatal=0]="Fatal",f[f.Error=0]="Error",f[f.Warn=1]="Warn",f[f.Log=2]="Log",f[f.Info=3]="Info",f[f.Success=3]="Success",f[f.Debug=4]="Debug",f[f.Trace=5]="Trace",f[f.Silent=-1/0]="Silent",f[f.Verbose=1/0]="Verbose";var p={silent:{level:-1},fatal:{level:f.Fatal},error:{level:f.Error},warn:{level:f.Warn},log:{level:f.Log},info:{level:f.Info},success:{level:f.Success},debug:{level:f.Debug},trace:{level:f.Trace},verbose:{level:f.Trace},ready:{level:f.Info},start:{level:f.Info}};function h(x){return v=x,Object.prototype.toString.call(v)==="[object Object]"&&!(!x.message&&!x.args)&&!x.stack;var v}var m=!1,b=[],y=function(){function x(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(var O in n(this,x),this._reporters=v.reporters||[],this._types=v.types||p,this.level=v.level!==void 0?v.level:3,this._defaults=v.defaults||{},this._async=v.async!==void 0?v.async:void 0,this._stdout=v.stdout,this._stderr=v.stderr,this._mockFn=v.mockFn,this._throttle=v.throttle||1e3,this._throttleMin=v.throttleMin||5,this._types){var C=s(s({type:O},this._types[O]),this._defaults);this[O]=this._wrapLogFn(C),this[O].raw=this._wrapLogFn(C,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return o(x,[{key:"create",value:function(v){return new x(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},v))}},{key:"withDefaults",value:function(v){return this.create({defaults:Object.assign({},this._defaults,v)})}},{key:"withTag",value:function(v){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+v:v})}},{key:"addReporter",value:function(v){return this._reporters.push(v),this}},{key:"removeReporter",value:function(v){if(v){var O=this._reporters.indexOf(v);if(O>=0)return this._reporters.splice(O,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(v){return this._reporters=Array.isArray(v)?v:[v],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var v in this._types)console["__"+v]||(console["__"+v]=console[v]),console[v]=this[v].raw}},{key:"restoreConsole",value:function(){for(var v in this._types)console["__"+v]&&(console[v]=console["__"+v],delete console["__"+v])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(v,O){var C=this;v&&(v.__write||(v.__write=v.write),v.write=function(R){C[O].raw(String(R).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(v){v&&v.__write&&(v.write=v.__write,delete v.__write)}},{key:"pauseLogs",value:function(){m=!0}},{key:"resumeLogs",value:function(){m=!1;var v,O=d(b.splice(0));try{for(O.s();!(v=O.n()).done;){var C=v.value;C[0]._logFn(C[1],C[2])}}catch(R){O.e(R)}finally{O.f()}}},{key:"mockTypes",value:function(v){if(this._mockFn=v||this._mockFn,typeof this._mockFn=="function")for(var O in this._types)this[O]=this._mockFn(O,this._types[O])||this[O],this[O].raw=this[O]}},{key:"_wrapLogFn",value:function(v,O){var C=this;return function(){for(var R=arguments.length,N=new Array(R),T=0;T<R;T++)N[T]=arguments[T];if(!m)return C._logFn(v,N,O);b.push([C,v,N,O])}}},{key:"_logFn",value:function(v,O,C){var R=this;if(v.level>this.level)return!!this._async&&Promise.resolve(!1);var N=Object.assign({date:new Date,args:[]},v);!C&&O.length===1&&h(O[0])?Object.assign(N,O[0]):N.args=Array.from(O),N.message&&(N.args.unshift(N.message),delete N.message),N.additional&&(Array.isArray(N.additional)||(N.additional=N.additional.split(`
113
+ */var uN=h,dN=Symbol.for("react.element"),fN=Symbol.for("react.fragment"),pN=Object.prototype.hasOwnProperty,hN=uN.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,gN={key:!0,ref:!0,__self:!0,__source:!0};function Yg(e,t,n){var r,o={},a=null,i=null;n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(r in t)pN.call(t,r)&&!gN.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)o[r]===void 0&&(o[r]=t[r]);return{$$typeof:dN,type:e,key:a,ref:i,props:o,_owner:hN.current}}ki.Fragment=fN;ki.jsx=Yg;ki.jsxs=Yg;qg.exports=ki;var vN=qg.exports;const mN=vN.jsx,wn=e=>{const t={};return e.forEach(n=>{t[n.key]=n.value}),t},yN=[...lN,...tE],bN=yN.reduce((e,t)=>(e[t]=({children:n,$$attributes:r=[],...o})=>{let a=n;return Array.isArray(n)||(a=[n]),h.createElement(t,{...o,...wn(r)},...a)},e),{}),wN=({children:e,width:t,height:n,$$attributes:r=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(c=>c!==void 0);const{style:i={},...s}=wn(r),l={height:n,width:t,...i,...o.style||{}};return React.createElement("div",{...o,...s,style:l},...a)},SN=({afterMount:e,beforeDestroy:t,$$attributes:n=[],...r})=>(h.useEffect(()=>(e==null||e(r),()=>{t==null||t(r)}),[]),w("canvas",{...r,...wn(n)})),xN=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("img",{...n,...wn(t)},...r)},CN=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("video",{...n,...wn(t)},...r)},ON=({children:e,$$attributes:t=[],...n})=>{let r=e;return Array.isArray(e)||(r=[e]),React.createElement("audio",{...n,...wn(t)},...r)},EN=({$$attributes:e=[],content:t,...n})=>w("span",{...n,...wn(e),children:t}),_N=({children:e,$$attributes:t=[],afterMount:n,beforeDestroy:r,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),h.useEffect(()=>(n==null||n(o),()=>{r==null||r(o)}),[]),mN("div",{...o,...wn(t),children:a})},RN=({children:e,$$attributes:t=[],htmlTag:n="div",...r})=>{let o=e;Array.isArray(e)||(o=[e]);const{style:a={},...i}=wn(t),s={...a,...r.style||{}};return h.createElement(n,{...r,...i,style:s},...o)},NN={RootContainer:({children:e})=>e,...bN,CContainer:_N,CVideo:CN,CAudio:ON,CBlock:wN,CImage:xN,CText:EN,CCanvas:SN,CNativeTag:RN};class TN{constructor(){Q(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,n){this.refMap.set(t,n)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class PN extends h.Component{constructor(t){super(t),Q(this,"refManager"),Q(this,"dynamicComponentInstanceMap",new Map),Q(this,"onGetRef",(n,r,o)=>{var a,i;(i=(a=this.props).onGetRef)==null||i.call(a,n,r,o),this.dynamicComponentInstanceMap.set(r.id,o),this.refManager.add(r.value.refId||r.id,n)}),Q(this,"rerender",n=>{if(this.props.adapter.clear(),(n==null?void 0:n.nodeType)==="PAGE"&&n)this.setState({pageModel:n});else if($r(n)&&Sg(n)){const r=n;this.setState({pageModel:new ai(r,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new ai(t.page)},this.refManager=new TN}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:t}=this.props;t&&(t.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:t}=this,{adapter:n,onGetComponent:r,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const s={...NN,...t.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:s,onGetRef:this.onGetRef,onGetComponent:r,onComponentMount:a,onComponentDestroy:o,$$context:l,renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}class kN extends h.Component{constructor(t){super(t),Q(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})}),this.state={hasError:!1,error:""}}static getDerivedStateFromError(t){return{hasError:!0,error:t}}componentDidCatch(t,n){var r,o;(o=(r=this.props).onError)==null||o.call(r,n)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const r=te("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,te("p",{children:["msg: ",String(this.state.error)]}),w("button",{onDoubleClick:t,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"},children:"double click to refresh"}),w("div",{style:{display:"none"}})]});return h.createElement(this.props.targetComponent,{onlyRenderChild:!0},r)}return this.props.children}}class jN{constructor(){Q(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,n){const r=this.instanceMap.get(t);r?r.push(n):this.instanceMap.set(t,[n])}remove(t,n){const r=this.instanceMap.get(t);if(n!==void 0&&Array.isArray(r)){const o=r.filter(a=>a!==n);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const MN=e=>{const{node:t}=e,n=h.useMemo(()=>{const s=t.isContainer();return $r(s)?s:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:r,height:o,width:a,style:i}=n;return w("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",width:a,height:o,...i},children:r})};class rB extends h.Component{constructor(t){super(t),Q(this,"instanceManager",new jN),Q(this,"renderRef"),Q(this,"dropPlaceholder",MN),Q(this,"onGetComponent",(n,r)=>{var o,a;const i=this;let s=n;const l=(a=(o=r.material)==null?void 0:o.value.advanceCustom)==null?void 0:a.wrapComponent;l&&(s=l(n,{node:r,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class c extends h.Component{constructor(){super(...arguments),Q(this,"_DESIGN_BOX",!0),Q(this,"_NODE_MODEL",r),Q(this,"_NODE_ID",r.id),Q(this,"_UNIQUE_ID",`${r.id}_${yn()}`),Q(this,"_STATUS")}componentDidMount(){i.instanceManager.add(r.id,this)}componentWillUnmount(){this._STATUS="DESTROY",i.instanceManager.remove(r.id,this)}render(){var d,f;const{children:p=[],onlyRenderChild:g,...m}=this.props;let b=p;if(Dr(p)||(b=[p]),!b.filter(Boolean).length&&(r.isContainer()||r.value.componentName===qr.ROOT_CONTAINER)){const y=(f=(d=r.material)==null?void 0:d.value.advanceCustom)==null?void 0:f.dropPlaceholder;b.push(h.createElement(y||i.dropPlaceholder,{node:r}))}return g?b:h.createElement(s,m,...b)}}return h.forwardRef(function(u,d){return w(kN,{node:r,targetComponent:c,children:h.createElement(c,{ref:d,...u})})})}),this.renderRef=h.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,n;(n=(t=this.props).onMount)==null||n.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(t)}getInstancesById(t,n){let r=[...this.instanceManager.get(t)||[]];return n!==void 0&&(r=r.filter(o=>n===(o==null?void 0:o._UNIQUE_ID))),r}getInstanceByDom(t){const n=Xg(t);if(!n)return null;const r=Jg(n);return(r==null?void 0:r.stateNode)||null}getDomsById(t,n){const r=this.getInstancesById(t),o=[];return r==null||r.forEach(a=>{var i;if((a==null?void 0:a._STATUS)==="DESTROY")return;const s=qy.findDOMNode(a);if(s&&!(s instanceof Text))if(n){const l=Array.from(((i=s.querySelectorAll)==null?void 0:i.call(s,n))||[]);o.push(...l)}else o.push(s)}),o}getDomRectById(t,n){return this.getDomsById(t,n).map(r=>r==null?void 0:r.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:n}=this,{render:r,...o}=t;return r&&(r.ref.current=this),w(PN,{onGetComponent:n,...o,processNodeConfigHook:(a,i)=>{var s,l;if(i.nodeType!=="NODE")return a;const{props:c,condition:u}=a;let d={...c};const f=((s=i.value.configure)==null?void 0:s.devState)||{},p=(l=i.material)==null?void 0:l.value.fixedProps;if(p!==void 0){if($r(p))d={...d,...p};else if(typeof p=="function"){const m=p(d);d={...d,...m}}}let g=u;return f.condition===!1&&(g=f.condition),{props:Y2(d,f.props||{}),condition:g}},ref:this.renderRef})}}const Xg=e=>{if(!e)return null;const t=Object.keys(e).find(n=>n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber$"))||"";return t?e[t]:Xg(e.parentElement)},Jg=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:Jg(e.return):null};var AN={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(cN,function(){var n=function(){},r={},o={},a={};function i(f,p){f=f.push?f:[f];var g=[],m=f.length,b=m,y,S,E,x;for(y=function(v,C){C.length&&g.push(v),b--,b||p(g)};m--;){if(S=f[m],E=o[S],E){y(S,E);continue}x=a[S]=a[S]||[],x.push(y)}}function s(f,p){if(f){var g=a[f];if(o[f]=p,!!g)for(;g.length;)g[0](f,p),g.splice(0,1)}}function l(f,p){f.call&&(f={success:f}),p.length?(f.error||n)(p):(f.success||n)(f)}function c(f,p,g,m){var b=document,y=g.async,S=(g.numRetries||0)+1,E=g.before||n,x=f.replace(/[\?|#].*$/,""),v=f.replace(/^(css|img|module|nomodule)!/,""),C,O,R;if(m=m||0,/(^css!|\.css$)/.test(x))R=b.createElement("link"),R.rel="stylesheet",R.href=v,C="hideFocus"in R,C&&R.relList&&(C=0,R.rel="preload",R.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(x))R=b.createElement("img"),R.src=v;else if(R=b.createElement("script"),R.src=v,R.async=y===void 0?!0:y,O="noModule"in R,/^module!/.test(x)){if(!O)return p(f,"l");R.type="module"}else if(/^nomodule!/.test(x)&&O)return p(f,"l");R.onload=R.onerror=R.onbeforeload=function(N){var T=N.type[0];if(C)try{R.sheet.cssText.length||(T="e")}catch(M){M.code!=18&&(T="e")}if(T=="e"){if(m+=1,m<S)return c(f,p,g,m)}else if(R.rel=="preload"&&R.as=="style")return R.rel="stylesheet";p(f,T,N.defaultPrevented)},E(f,R)!==!1&&b.head.appendChild(R)}function u(f,p,g){f=f.push?f:[f];var m=f.length,b=m,y=[],S,E;for(S=function(x,v,C){if(v=="e"&&y.push(x),v=="b")if(C)y.push(x);else return;m--,m||p(y)},E=0;E<b;E++)c(f[E],S,g)}function d(f,p,g){var m,b;if(p&&p.trim&&(m=p),b=(m?g:p)||{},m){if(m in r)throw"LoadJS";r[m]=!0}function y(S,E){u(f,function(x){l(b,x),S&&l({success:S,error:E},x),s(m,x)},b)}if(b.returnPromise)return new Promise(y);y()}return d.ready=function(f,p){return i(f,function(g){l(p,g)}),d},d.done=function(f){s(f,[])},d.reset=function(){r={},o={},a={}},d.isDefined=function(f){return f in r},d})})(AN);const Qg=async({iframe:e})=>{const t=e.getWindow();t&&(t.React=window.React,t.ReactDOM=window.ReactDOM,t.ReactDOMClient=window.ReactDOMClient)},Zg=e=>async({iframe:n,assets:r,page:o,pageModel:a,ready:i,renderJSUrl:s})=>{await n.injectJS(s||"");const l=n.getWindow(),c=n.getDocument(),u=l.React,d=l.ReactDOMClient,f=l.CRender,p=o||(a==null?void 0:a.export());if(!p){console.log("page schema is empty");return}const g=[...r,...p.assets||[]];new f.AssetLoader(g,{window:n.getWindow()}).onSuccess(()=>{const b=Xn.collectVariable(g,l),y=Xn.flatObject(b),S=nN(b,p.thirdLibs||[]),E=u==null?void 0:u.createElement(f.DesignRender,{adapter:f==null?void 0:f.ReactAdapter,page:o,pageModel:a,components:{...y,...e},$$context:{thirdLibs:S},onMount:x=>{i(x)}});d.createRoot(c.getElementById("app")).render(E)}).onError(()=>{console.log("资源加载出错")}).load()};var ev={exports:{}};(function(e,t){(function(n,r){e.exports=r()})(So,function(){function n(x,v){if(!(x instanceof v))throw new TypeError("Cannot call a class as a function")}function r(x,v){for(var C=0;C<v.length;C++){var O=v[C];O.enumerable=O.enumerable||!1,O.configurable=!0,"value"in O&&(O.writable=!0),Object.defineProperty(x,O.key,O)}}function o(x,v,C){return v&&r(x.prototype,v),C&&r(x,C),x}function a(x,v,C){return v in x?Object.defineProperty(x,v,{value:C,enumerable:!0,configurable:!0,writable:!0}):x[v]=C,x}function i(x,v){var C=Object.keys(x);if(Object.getOwnPropertySymbols){var O=Object.getOwnPropertySymbols(x);v&&(O=O.filter(function(R){return Object.getOwnPropertyDescriptor(x,R).enumerable})),C.push.apply(C,O)}return C}function s(x){for(var v=1;v<arguments.length;v++){var C=arguments[v]!=null?arguments[v]:{};v%2?i(Object(C),!0).forEach(function(O){a(x,O,C[O])}):Object.getOwnPropertyDescriptors?Object.defineProperties(x,Object.getOwnPropertyDescriptors(C)):i(Object(C)).forEach(function(O){Object.defineProperty(x,O,Object.getOwnPropertyDescriptor(C,O))})}return x}function l(x){return function(v){if(Array.isArray(v))return u(v)}(x)||function(v){if(typeof Symbol<"u"&&Symbol.iterator in Object(v))return Array.from(v)}(x)||c(x)||function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
114
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function c(x,v){if(x){if(typeof x=="string")return u(x,v);var C=Object.prototype.toString.call(x).slice(8,-1);return C==="Object"&&x.constructor&&(C=x.constructor.name),C==="Map"||C==="Set"?Array.from(x):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?u(x,v):void 0}}function u(x,v){(v==null||v>x.length)&&(v=x.length);for(var C=0,O=new Array(v);C<v;C++)O[C]=x[C];return O}function d(x){if(typeof Symbol>"u"||x[Symbol.iterator]==null){if(Array.isArray(x)||(x=c(x))){var v=0,C=function(){};return{s:C,n:function(){return v>=x.length?{done:!0}:{done:!1,value:x[v++]}},e:function(M){throw M},f:C}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
115
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var O,R,N=!0,T=!1;return{s:function(){O=x[Symbol.iterator]()},n:function(){var M=O.next();return N=M.done,M},e:function(M){T=!0,R=M},f:function(){try{N||O.return==null||O.return()}finally{if(T)throw R}}}}var f={};f[f.Fatal=0]="Fatal",f[f.Error=0]="Error",f[f.Warn=1]="Warn",f[f.Log=2]="Log",f[f.Info=3]="Info",f[f.Success=3]="Success",f[f.Debug=4]="Debug",f[f.Trace=5]="Trace",f[f.Silent=-1/0]="Silent",f[f.Verbose=1/0]="Verbose";var p={silent:{level:-1},fatal:{level:f.Fatal},error:{level:f.Error},warn:{level:f.Warn},log:{level:f.Log},info:{level:f.Info},success:{level:f.Success},debug:{level:f.Debug},trace:{level:f.Trace},verbose:{level:f.Trace},ready:{level:f.Info},start:{level:f.Info}};function g(x){return v=x,Object.prototype.toString.call(v)==="[object Object]"&&!(!x.message&&!x.args)&&!x.stack;var v}var m=!1,b=[],y=function(){function x(){var v=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};for(var C in n(this,x),this._reporters=v.reporters||[],this._types=v.types||p,this.level=v.level!==void 0?v.level:3,this._defaults=v.defaults||{},this._async=v.async!==void 0?v.async:void 0,this._stdout=v.stdout,this._stderr=v.stderr,this._mockFn=v.mockFn,this._throttle=v.throttle||1e3,this._throttleMin=v.throttleMin||5,this._types){var O=s(s({type:C},this._types[C]),this._defaults);this[C]=this._wrapLogFn(O),this[C].raw=this._wrapLogFn(O,!0)}this._mockFn&&this.mockTypes(),this._lastLogSerialized=void 0,this._lastLog=void 0,this._lastLogTime=void 0,this._lastLogCount=0,this._throttleTimeout=void 0}return o(x,[{key:"create",value:function(v){return new x(Object.assign({reporters:this._reporters,level:this.level,types:this._types,defaults:this._defaults,stdout:this._stdout,stderr:this._stderr,mockFn:this._mockFn},v))}},{key:"withDefaults",value:function(v){return this.create({defaults:Object.assign({},this._defaults,v)})}},{key:"withTag",value:function(v){return this.withDefaults({tag:this._defaults.tag?this._defaults.tag+":"+v:v})}},{key:"addReporter",value:function(v){return this._reporters.push(v),this}},{key:"removeReporter",value:function(v){if(v){var C=this._reporters.indexOf(v);if(C>=0)return this._reporters.splice(C,1)}else this._reporters.splice(0);return this}},{key:"setReporters",value:function(v){return this._reporters=Array.isArray(v)?v:[v],this}},{key:"wrapAll",value:function(){this.wrapConsole(),this.wrapStd()}},{key:"restoreAll",value:function(){this.restoreConsole(),this.restoreStd()}},{key:"wrapConsole",value:function(){for(var v in this._types)console["__"+v]||(console["__"+v]=console[v]),console[v]=this[v].raw}},{key:"restoreConsole",value:function(){for(var v in this._types)console["__"+v]&&(console[v]=console["__"+v],delete console["__"+v])}},{key:"wrapStd",value:function(){this._wrapStream(this.stdout,"log"),this._wrapStream(this.stderr,"log")}},{key:"_wrapStream",value:function(v,C){var O=this;v&&(v.__write||(v.__write=v.write),v.write=function(R){O[C].raw(String(R).trim())})}},{key:"restoreStd",value:function(){this._restoreStream(this.stdout),this._restoreStream(this.stderr)}},{key:"_restoreStream",value:function(v){v&&v.__write&&(v.write=v.__write,delete v.__write)}},{key:"pauseLogs",value:function(){m=!0}},{key:"resumeLogs",value:function(){m=!1;var v,C=d(b.splice(0));try{for(C.s();!(v=C.n()).done;){var O=v.value;O[0]._logFn(O[1],O[2])}}catch(R){C.e(R)}finally{C.f()}}},{key:"mockTypes",value:function(v){if(this._mockFn=v||this._mockFn,typeof this._mockFn=="function")for(var C in this._types)this[C]=this._mockFn(C,this._types[C])||this[C],this[C].raw=this[C]}},{key:"_wrapLogFn",value:function(v,C){var O=this;return function(){for(var R=arguments.length,N=new Array(R),T=0;T<R;T++)N[T]=arguments[T];if(!m)return O._logFn(v,N,C);b.push([O,v,N,C])}}},{key:"_logFn",value:function(v,C,O){var R=this;if(v.level>this.level)return!!this._async&&Promise.resolve(!1);var N=Object.assign({date:new Date,args:[]},v);!O&&C.length===1&&g(C[0])?Object.assign(N,C[0]):N.args=Array.from(C),N.message&&(N.args.unshift(N.message),delete N.message),N.additional&&(Array.isArray(N.additional)||(N.additional=N.additional.split(`
116
116
  `)),N.args.push(`
117
117
  `+N.additional.join(`
118
- `)),delete N.additional),N.type=typeof N.type=="string"?N.type.toLowerCase():"",N.tag=typeof N.tag=="string"?N.tag.toLowerCase():"";var T=function(){var M=arguments.length>0&&arguments[0]!==void 0&&arguments[0],P=R._lastLogCount-R._throttleMin;if(R._lastLog&&P>0){var D=l(R._lastLog.args);P>1&&D.push("(repeated ".concat(P," times)")),R._log(s(s({},R._lastLog),{},{args:D})),R._lastLogCount=1}if(M){if(R._lastLog=N,R._async)return R._logAsync(N);R._log(N)}};clearTimeout(this._throttleTimeout);var k=this._lastLogTime?N.date-this._lastLogTime:0;if(this._lastLogTime=N.date,k<this._throttle)try{var j=JSON.stringify([N.type,N.tag,N.args]),I=this._lastLogSerialized===j;if(this._lastLogSerialized=j,I&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(T,this._throttle))}catch{}T(!0)}},{key:"_log",value:function(v){var O,C=d(this._reporters);try{for(C.s();!(O=C.n()).done;)O.value.log(v,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(R){C.e(R)}finally{C.f()}}},{key:"_logAsync",value:function(v){var O=this;return Promise.all(this._reporters.map(function(C){return C.log(v,{async:!0,stdout:O.stdout,stderr:O.stderr})}))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),x}();y.prototype.add=y.prototype.addReporter,y.prototype.remove=y.prototype.removeReporter,y.prototype.clear=y.prototype.removeReporter,y.prototype.withScope=y.prototype.withTag,y.prototype.mock=y.prototype.mockTypes,y.prototype.pause=y.prototype.pauseLogs,y.prototype.resume=y.prototype.resumeLogs;var S,E=function(){function x(v){n(this,x),this.options=Object.assign({},v),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return o(x,[{key:"log",value:function(v){var O=v.level<1?console.__error||console.error:v.level===1&&console.warn?console.__warn||console.warn:console.__log||console.log,C=v.type!=="log"?v.type:"",R=v.tag?v.tag:"",N=this.typeColorMap[v.type]||this.levelColorMap[v.level]||this.defaultColor,T=`
118
+ `)),delete N.additional),N.type=typeof N.type=="string"?N.type.toLowerCase():"",N.tag=typeof N.tag=="string"?N.tag.toLowerCase():"";var T=function(){var k=arguments.length>0&&arguments[0]!==void 0&&arguments[0],P=R._lastLogCount-R._throttleMin;if(R._lastLog&&P>0){var L=l(R._lastLog.args);P>1&&L.push("(repeated ".concat(P," times)")),R._log(s(s({},R._lastLog),{},{args:L})),R._lastLogCount=1}if(k){if(R._lastLog=N,R._async)return R._logAsync(N);R._log(N)}};clearTimeout(this._throttleTimeout);var M=this._lastLogTime?N.date-this._lastLogTime:0;if(this._lastLogTime=N.date,M<this._throttle)try{var j=JSON.stringify([N.type,N.tag,N.args]),D=this._lastLogSerialized===j;if(this._lastLogSerialized=j,D&&(this._lastLogCount++,this._lastLogCount>this._throttleMin))return void(this._throttleTimeout=setTimeout(T,this._throttle))}catch{}T(!0)}},{key:"_log",value:function(v){var C,O=d(this._reporters);try{for(O.s();!(C=O.n()).done;)C.value.log(v,{async:!1,stdout:this.stdout,stderr:this.stderr})}catch(R){O.e(R)}finally{O.f()}}},{key:"_logAsync",value:function(v){var C=this;return Promise.all(this._reporters.map(function(O){return O.log(v,{async:!0,stdout:C.stdout,stderr:C.stderr})}))}},{key:"stdout",get:function(){return this._stdout||console._stdout}},{key:"stderr",get:function(){return this._stderr||console._stderr}}]),x}();y.prototype.add=y.prototype.addReporter,y.prototype.remove=y.prototype.removeReporter,y.prototype.clear=y.prototype.removeReporter,y.prototype.withScope=y.prototype.withTag,y.prototype.mock=y.prototype.mockTypes,y.prototype.pause=y.prototype.pauseLogs,y.prototype.resume=y.prototype.resumeLogs;var S,E=function(){function x(v){n(this,x),this.options=Object.assign({},v),this.defaultColor="#7f8c8d",this.levelColorMap={0:"#c0392b",1:"#f39c12",3:"#00BCD4"},this.typeColorMap={success:"#2ecc71"}}return o(x,[{key:"log",value:function(v){var C=v.level<1?console.__error||console.error:v.level===1&&console.warn?console.__warn||console.warn:console.__log||console.log,O=v.type!=="log"?v.type:"",R=v.tag?v.tag:"",N=this.typeColorMap[v.type]||this.levelColorMap[v.level]||this.defaultColor,T=`
119
119
  background: `.concat(N,`;
120
120
  border-radius: 0.5em;
121
121
  color: white;
122
122
  font-weight: bold;
123
123
  padding: 2px 0.5em;
124
- `),k="%c".concat([R,C].filter(Boolean).join(":"));typeof v.args[0]=="string"?O.apply(void 0,["".concat(k,"%c ").concat(v.args[0]),T,""].concat(l(v.args.slice(1)))):O.apply(void 0,[k,T].concat(l(v.args)))}}]),x}();return typeof window<"u"&&window.consola||((S=new y({reporters:[new E]})).Consola=y,S.LogLevel=f,S.BrowserReporter=E,S)})})(Qg);var k2=Qg.exports;const j2=Yl(k2),$t=j2.create({level:1}),Tn=e=>new Promise(t=>{setTimeout(()=>{t("ok")},e??1e3/60*2)});class M2 extends g.Component{constructor(n){super(n);L(this,"emitter");L(this,"leftPanelContentRef");L(this,"addLeftPanel",n=>{this.state.leftPanels.push(n),this.setState({leftPanels:[...this.state.leftPanels]})});L(this,"replaceLeftPanel",(n,r)=>{const o=this.state.leftPanels.findIndex(a=>a.name===n);if(o>-1){const a=[...this.state.leftPanels];a[o]=r,this.setState({leftPanels:a})}});L(this,"openLeftPanel",async n=>{const r=n||this.state.currentActiveLeftPanel;this.setState({leftBoxVisible:!0,leftBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:r}),await Tn(),this.emitter.emit("leftPanelVisible",{visible:!0,panelName:r})});L(this,"closeLeftPanel",async()=>{this.setState({leftBoxVisible:!1,leftBoxSize:{width:0,height:"100%"}}),await Tn(),this.emitter.emit("leftPanelVisible",{visible:!1,panelName:this.state.currentActiveLeftPanel})});L(this,"toggleLeftPanel",()=>{const{leftBoxVisible:n}=this.state;!n?this.openLeftPanel():this.closeLeftPanel()});L(this,"onPluginIconClick",n=>{const{currentActiveLeftPanel:r}=this.state;r===n.name&&this.state.leftBoxVisible?this.closeLeftPanel():this.openLeftPanel(n.name)});L(this,"openRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!0,rightBoxSize:{width:400,height:n.height}})});L(this,"closeRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!1,rightBoxSize:{width:0,height:n.height}})});L(this,"replaceBodyView",n=>{this.setState({bodyView:n})});L(this,"replaceRightView",n=>{this.setState({rightView:n})});L(this,"replaceTopBarView",n=>{this.setState({topToolBarView:n})});L(this,"replaceSubTopBarView",n=>{this.setState({subTopToolBarView:n})});L(this,"toggleRightPanel",()=>{const{rightBoxVisible:n,rightBoxSize:r}=this.state,o=!n;this.setState({rightBoxVisible:o,rightBoxSize:{width:o?400:0,height:r.height}})});L(this,"onLeftBoxResizeStop",(n,r,o,a)=>{const i=this.state.leftBoxSize.width+a.width;this.setState({leftBoxSize:{width:i,height:this.state.leftBoxSize.height}})});L(this,"onGlobalClick",n=>{var r;n.target&&((r=this.leftPanelContentRef.current)!=null&&r.contains(n.target))||!this.state.leftBoxFixed&&this.state.leftBoxVisible&&this.closeLeftPanel()});this.emitter=n.emitter||ei(),this.leftPanelContentRef=g.createRef(),this.state={leftBoxVisible:!0,leftBoxSize:{width:300,height:"100%"},leftBoxFixed:!0,rightBoxVisible:!0,rightBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:"OutlineTree",leftPanels:[],bodyView:null,rightView:null,topToolBarView:null,subTopToolBarView:null}}componentDidMount(){document.addEventListener("click",this.onGlobalClick)}render(){const{leftBoxVisible:n,leftBoxSize:r,leftBoxFixed:o,rightBoxSize:a,rightBoxVisible:i,leftPanels:s,currentActiveLeftPanel:l,bodyView:c,rightView:u,topToolBarView:d,subTopToolBarView:f}=this.state,p={};o||(p.position="absolute",p.left="50px",p.top=0);const h=s.find(x=>x.name===l),m=(h==null?void 0:h.render)||null,{onPluginIconClick:b,toggleRightPanel:y,toggleLeftPanel:S,onLeftBoxResizeStop:E}=this;return te("div",{className:ke.workbenchContainer,children:[w("div",{className:ke.topToolBarBox,children:w("div",{className:ke.topToolBarView,children:d})}),te("div",{className:ke.bodyContent,children:[te("div",{className:ke.leftBox,ref:this.leftPanelContentRef,children:[w("div",{className:ke.pluginIconBar,children:s.map(x=>w("div",{onClick:()=>b(x),className:dt([ke.pluginIconItem,(h==null?void 0:h.name)===x.name&&ke.active]),children:x.icon},x.name))}),n&&te(Ru,{className:ke.pluginPanelBoxResizeBox,size:r,style:p,minWidth:300,maxWidth:600,enable:{right:n},onResizeStop:E,children:[te("div",{className:ke.pluginHeader,children:[w("span",{className:ke.pluginNameText,children:(h==null?void 0:h.title)||(h==null?void 0:h.name)}),w(Y.Button,{className:dt([ke.fixedBtn]),type:"text",size:"small",onClick:()=>{this.setState({leftBoxFixed:!this.state.leftBoxFixed})},children:w(L0,{className:dt([o&&ke.active])})}),w(Y.Button,{className:ke.closeBtn,type:"text",size:"small",onClick:S,children:w(p0,{})})]}),w("div",{className:ke.pluginPanelBox,children:m})]})]}),te("div",{className:ke.centerBox,children:[f&&w("div",{className:ke.subTopToolbarBox,children:f}),w("div",{className:ke.canvasBox,children:w("div",{className:ke.scrollBox,children:c})})]}),te("div",{className:ke.rightResizeBox,children:[w("div",{className:ke.arrowCursor,onClick:y,children:w(C0,{className:dt([!i&&ke.active])})}),w("div",{style:{display:i?"block":"none",height:"100%"},children:w(Ru,{minWidth:400,maxWidth:600,enable:{left:i},size:a,onResizeStop:(x,v,O,C)=>{this.setState({rightBoxSize:{width:this.state.rightBoxSize.width+C.width,height:this.state.rightBoxSize.height}})},children:w("div",{className:ke.rightBox,children:u})})})]})]})]})}}const A2="_engineContainer_f3ly9_2",D2={engineContainer:A2};function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Id(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Kp(r.key),r)}}function rt(e,t,n){return t&&Id(e.prototype,t),n&&Id(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pl(e,t){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},pl(e,t)}function Zr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pl(e,t)}function eo(e,t){if(t&&(xe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jt(e)}function kt(e){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kt(e)}function Zg(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ev(e){return qp(e)||Zg(e)||Jl(e)||Yp()}function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Bd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ld(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ld(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var $2={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},I2=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.init(t,n)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||$2,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,o,a){return a&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(o).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,Bd(Bd({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Xt=new I2,Pn=function(){function e(){nt(this,e),this.observers={}}return rt(e,[{key:"on",value:function(n,r){var o=this;return n.split(" ").forEach(function(a){o.observers[a]=o.observers[a]||[],o.observers[a].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(o){return o!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];if(this.observers[n]){var i=[].concat(this.observers[n]);i.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(o))})}}}]),e}();function vo(){var e,t,n=new Promise(function(r,o){e=r,t=o});return n.resolve=e,n.reject=t,n}function zd(e){return e==null?"":""+e}function L2(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function Ic(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=r(a.shift());!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={}}return o()?{}:{obj:e,k:r(a.shift())}}function Fd(e,t,n){var r=Ic(e,t,Object),o=r.obj,a=r.k;o[a]=n}function B2(e,t,n,r){var o=Ic(e,t,Object),a=o.obj,i=o.k;a[i]=a[i]||[],r&&(a[i]=a[i].concat(n)),r||a[i].push(n)}function si(e,t){var n=Ic(e,t),r=n.obj,o=n.k;if(r)return r[o]}function Vd(e,t,n){var r=si(e,n);return r!==void 0?r:si(t,n)}function tv(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):tv(e[r],t[r],n):e[r]=t[r]);return e}function pr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var z2={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function F2(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return z2[t]}):e}var ji=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,V2=[" ",",","?","!",";"];function H2(e,t,n){t=t||"",n=n||"";var r=V2.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var o=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}function Hd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Na(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Hd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function U2(e){var t=W2();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function W2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function nv(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,a=0;a<r.length;++a){if(!o||typeof o[r[a]]=="string"&&a+1<r.length)return;if(o[r[a]]===void 0){for(var i=2,s=r.slice(a,a+i).join(n),l=o[s];l===void 0&&r.length>a+i;)i++,s=r.slice(a,a+i).join(n),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var c=r.slice(a+i).join(n);return c?nv(l,c,n):void 0}o=o[r[a]]}return o}}var G2=function(e){Zr(n,e);var t=U2(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return nt(this,n),o=t.call(this),ji&&Pn.call(Jt(o)),o.data=r||{},o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return rt(n,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var a=this.options.ns.indexOf(o);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[o,a];i&&typeof i!="string"&&(u=u.concat(i)),i&&typeof i=="string"&&(u=u.concat(l?i.split(l):i)),o.indexOf(".")>-1&&(u=o.split("."));var d=si(this.data,u);return d||!c||typeof i!="string"?d:nv(this.data&&this.data[o]&&this.data[o][a],i,l)}},{key:"addResource",value:function(o,a,i,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[o,a];i&&(u=u.concat(c?i.split(c):i)),o.indexOf(".")>-1&&(u=o.split("."),s=a,a=u[1]),this.addNamespaces(a),Fd(this.data,u,s),l.silent||this.emit("added",o,a,i,s)}},{key:"addResources",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in i)(typeof i[l]=="string"||Object.prototype.toString.apply(i[l])==="[object Array]")&&this.addResource(o,a,l,i[l],{silent:!0});s.silent||this.emit("added",o,a,i)}},{key:"addResourceBundle",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[o,a];o.indexOf(".")>-1&&(u=o.split("."),s=i,i=a,a=u[1]),this.addNamespaces(a);var d=si(this.data,u)||{};s?tv(d,i,l):d=Na(Na({},d),i),Fd(this.data,u,d),c.silent||this.emit("added",o,a,i)}},{key:"removeResourceBundle",value:function(o,a){this.hasResourceBundle(o,a)&&delete this.data[o][a],this.removeNamespaces(a),this.emit("removed",o,a)}},{key:"hasResourceBundle",value:function(o,a){return this.getResource(o,a)!==void 0}},{key:"getResourceBundle",value:function(o,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Na(Na({},{}),this.getResource(o,a)):this.getResource(o,a)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var a=this.getDataByLanguage(o),i=a&&Object.keys(a)||[];return!!i.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Pn),rv={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,o,a){var i=this;return t.forEach(function(s){i.processors[s]&&(n=i.processors[s].process(n,r,o,a))}),n}};function Ud(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Ud(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ud(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function K2(e){var t=q2();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function q2(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Wd={},Gd=function(e){Zr(n,e);var t=K2(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return nt(this,n),o=t.call(this),ji&&Pn.call(Jt(o)),L2(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Jt(o)),o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Xt.create("translator"),o}return rt(n,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var i=this.resolve(o,a);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(o,a){var i=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,l=a.ns||this.options.defaultNS||[],c=i&&o.indexOf(i)>-1,u=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!H2(o,i,s);if(c&&!u){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var f=o.split(i);(i!==s||i===s&&this.options.ns.indexOf(f[0])>-1)&&(l=f.shift()),o=f.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,a,i){var s=this;if(xe(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,c=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=this.extractFromKey(o[o.length-1],a),d=u.key,f=u.namespaces,p=f[f.length-1],h=a.lng||this.language,m=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(h&&h.toLowerCase()==="cimode"){if(m){var b=a.nsSeparator||this.options.nsSeparator;return l?(y.res="".concat(p).concat(b).concat(d),y):"".concat(p).concat(b).concat(d)}return l?(y.res=d,y):d}var y=this.resolve(o,a),S=y&&y.res,E=y&&y.usedKey||d,x=y&&y.exactUsedKey||d,v=Object.prototype.toString.apply(S),O=["[object Number]","[object Function]","[object RegExp]"],C=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,N=typeof S!="string"&&typeof S!="boolean"&&typeof S!="number";if(R&&S&&N&&O.indexOf(v)<0&&!(typeof C=="string"&&v==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,S,at(at({},a),{},{ns:f})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(y.res=T,y):T}if(c){var k=v==="[object Array]",j=k?[]:{},I=k?x:E;for(var M in S)if(Object.prototype.hasOwnProperty.call(S,M)){var P="".concat(I).concat(c).concat(M);j[M]=this.translate(P,at(at({},a),{joinArrays:!1,ns:f})),j[M]===P&&(j[M]=S[M])}S=j}}else if(R&&typeof C=="string"&&v==="[object Array]")S=S.join(C),S&&(S=this.extendTranslation(S,o,a,i));else{var D=!1,V=!1,ne=a.count!==void 0&&typeof a.count!="string",ee=n.hasDefaultValue(a),de=ne?this.pluralResolver.getSuffix(h,a.count,a):"",A=a["defaultValue".concat(de)]||a.defaultValue;!this.isValidLookup(S)&&ee&&(D=!0,S=A),this.isValidLookup(S)||(V=!0,S=d);var B=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,q=B&&V?void 0:S,Q=ee&&A!==S&&this.options.updateMissing;if(V||D||Q){if(this.logger.log(Q?"updateKey":"missingKey",h,p,d,Q?A:S),c){var ie=this.resolve(d,at(at({},a),{},{keySeparator:!1}));ie&&ie.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var le=[],Qe=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&Qe&&Qe[0])for(var De=0;De<Qe.length;De++)le.push(Qe[De]);else this.options.saveMissingTo==="all"?le=this.languageUtils.toResolveHierarchy(a.lng||this.language):le.push(a.lng||this.language);var ze=function(je,z,Ye){var $e=ee&&Ye!==S?Ye:q;s.options.missingKeyHandler?s.options.missingKeyHandler(je,p,z,$e,Q,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing(je,p,z,$e,Q,a),s.emit("missingKey",je,p,z,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&ne?le.forEach(function(re){s.pluralResolver.getSuffixes(re,a).forEach(function(je){ze([re],d+je,a["defaultValue".concat(je)]||A)})}):ze(le,d,A))}S=this.extendTranslation(S,o,a,y,i),V&&S===d&&this.options.appendNamespaceToMissingKey&&(S="".concat(p,":").concat(d)),(V||D)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(p,":").concat(d):d,D?S:void 0):S=this.options.parseMissingKeyHandler(S))}return l?(y.res=S,y):S}},{key:"extendTranslation",value:function(o,a,i,s,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,at(at({},this.options.interpolation.defaultVariables),i),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(at(at({},i),{interpolation:at(at({},this.options.interpolation),i.interpolation)}));var u=typeof o=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(u){var f=o.match(this.interpolator.nestingRegexp);d=f&&f.length}var p=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(p=at(at({},this.options.interpolation.defaultVariables),p)),o=this.interpolator.interpolate(o,p,i.lng||this.language,i),u){var h=o.match(this.interpolator.nestingRegexp),m=h&&h.length;d<m&&(i.nest=!1)}i.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var S=arguments.length,E=new Array(S),x=0;x<S;x++)E[x]=arguments[x];return l&&l[0]===E[0]&&!i.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(a[0])),null):c.translate.apply(c,E.concat([a]))},i)),i.interpolation&&this.interpolator.reset()}var b=i.postProcess||this.options.postProcess,y=typeof b=="string"?[b]:b;return o!=null&&y&&y.length&&i.applyPostProcessor!==!1&&(o=rv.handle(y,o,a,this.options&&this.options.postProcessPassResolved?at({i18nResolved:s},i):i,this)),o}},{key:"resolve",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,c,u,d;return typeof o=="string"&&(o=[o]),o.forEach(function(f){if(!a.isValidLookup(s)){var p=a.extractFromKey(f,i),h=p.key;l=h;var m=p.namespaces;a.options.fallbackNS&&(m=m.concat(a.options.fallbackNS));var b=i.count!==void 0&&typeof i.count!="string",y=b&&!i.ordinal&&i.count===0&&a.pluralResolver.shouldUseIntlApi(),S=i.context!==void 0&&(typeof i.context=="string"||typeof i.context=="number")&&i.context!=="",E=i.lngs?i.lngs:a.languageUtils.toResolveHierarchy(i.lng||a.language,i.fallbackLng);m.forEach(function(x){a.isValidLookup(s)||(d=x,!Wd["".concat(E[0],"-").concat(x)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(d)&&(Wd["".concat(E[0],"-").concat(x)]=!0,a.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(v){if(!a.isValidLookup(s)){u=v;var O=[h];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(O,h,v,x,i);else{var C;b&&(C=a.pluralResolver.getSuffix(v,i.count,i));var R="".concat(a.options.pluralSeparator,"zero");if(b&&(O.push(h+C),y&&O.push(h+R)),S){var N="".concat(h).concat(a.options.contextSeparator).concat(i.context);O.push(N),b&&(O.push(N+C),y&&O.push(N+R))}}for(var T;T=O.pop();)a.isValidLookup(s)||(c=T,s=a.getResource(v,x,T,i))}}))})}}),{res:s,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,a,i,s):this.resourceStore.getResource(o,a,i,s)}}],[{key:"hasDefaultValue",value:function(o){var a="defaultValue";for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i)&&a===i.substring(0,a.length)&&o[i]!==void 0)return!0;return!1}}]),n}(Pn);function ps(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Kd=function(){function e(t){nt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xt.create("languageUtils")}return rt(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=n.split("-");return this.options.lowerCaseLng?o=o.map(function(a){return a.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=ps(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=ps(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=ps(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var o;return n.forEach(function(a){if(!o){var i=r.formatLanguageCode(a);(!r.options.supportedLngs||r.isSupportedCode(i))&&(o=i)}}),!o&&this.options.supportedLngs&&n.forEach(function(a){if(!o){var i=r.getLanguagePartFromCode(a);if(r.isSupportedCode(i))return o=i;o=r.options.supportedLngs.find(function(s){if(s.indexOf(i)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}},{key:"toResolveHierarchy",value:function(n,r){var o=this,a=this.getFallbackCodes(r||this.options.fallbackLng||[],n),i=[],s=function(c){c&&(o.isSupportedCode(c)?i.push(c):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),a.forEach(function(l){i.indexOf(l)<0&&s(o.formatLanguageCode(l))}),i}}]),e}(),Y2=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],X2={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},J2=["v1","v2","v3"],qd={zero:0,one:1,two:2,few:3,many:4,other:5};function Q2(){var e={};return Y2.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:X2[t.fc]}})}),e}var Z2=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.languageUtils=t,this.options=n,this.logger=Xt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Q2()}return rt(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map(function(a){return"".concat(r).concat(a)})}},{key:"getSuffixes",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(i,s){return qd[i]-qd[s]}).map(function(i){return"".concat(r.options.prepend).concat(i)}):a.numbers.map(function(i){return r.getSuffix(n,i,o)}):[]}},{key:"getSuffix",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(r)):this.getSuffixRetroCompatible(a,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var o=this,a=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),i=n.numbers[a];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));var s=function(){return o.options.prepend&&i.toString()?o.options.prepend+i.toString():i.toString()};return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?"_plural_".concat(i.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!J2.includes(this.options.compatibilityJSON)}}]),e}();function Yd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Yd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var eT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=Xt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return rt(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:F2,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?pr(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?pr(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?pr(r.nestingPrefix):r.nestingPrefixEscaped||pr("$t("),this.nestingSuffix=r.nestingSuffix?pr(r.nestingSuffix):r.nestingSuffixEscaped||pr(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(n,r,o,a){var i=this,s,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(b){return b.replace(/\$/g,"$$$$")}var f=function(y){if(y.indexOf(i.formatSeparator)<0){var S=Vd(r,u,y);return i.alwaysFormat?i.format(S,void 0,o,At(At(At({},a),r),{},{interpolationkey:y})):S}var E=y.split(i.formatSeparator),x=E.shift().trim(),v=E.join(i.formatSeparator).trim();return i.format(Vd(r,u,x),v,o,At(At(At({},a),r),{},{interpolationkey:x}))};this.resetRegExp();var p=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,h=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,m=[{regex:this.regexpUnescape,safeValue:function(y){return d(y)}},{regex:this.regexp,safeValue:function(y){return i.escapeValue?d(i.escape(y)):d(y)}}];return m.forEach(function(b){for(c=0;s=b.regex.exec(n);){var y=s[1].trim();if(l=f(y),l===void 0)if(typeof p=="function"){var S=p(n,s,a);l=typeof S=="string"?S:""}else if(a&&a.hasOwnProperty(y))l="";else if(h){l=s[0];continue}else i.logger.warn("missed to pass in variable ".concat(y," for interpolating ").concat(n)),l="";else typeof l!="string"&&!i.useRawValueToEscape&&(l=zd(l));var E=b.safeValue(l);if(n=n.replace(s[0],E),h?(b.regex.lastIndex+=l.length,b.regex.lastIndex-=s[0].length):b.regex.lastIndex=0,c++,c>=i.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,l;function c(p,h){var m=this.nestingOptionsSeparator;if(p.indexOf(m)<0)return p;var b=p.split(new RegExp("".concat(m,"[ ]*{"))),y="{".concat(b[1]);p=b[0],y=this.interpolate(y,l);var S=y.match(/'/g),E=y.match(/"/g);(S&&S.length%2===0&&!E||E.length%2!==0)&&(y=y.replace(/'/g,'"'));try{l=JSON.parse(y),h&&(l=At(At({},h),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),x),"".concat(p).concat(m).concat(y)}return delete l.defaultValue,p}for(;i=this.nestingRegexp.exec(n);){var u=[];l=At({},a),l.applyPostProcessor=!1,delete l.defaultValue;var d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){var f=i[1].split(this.formatSeparator).map(function(p){return p.trim()});i[1]=f.shift(),u=f,d=!0}if(s=r(c.call(this,i[1].trim(),l),l),s&&i[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=zd(s)),s||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(n)),s=""),d&&(s=u.reduce(function(p,h){return o.format(p,h,a.lng,At(At({},a),{},{interpolationkey:i[1].trim()}))},s.trim())),n=n.replace(i[0],s),this.regexp.lastIndex=0}return n}}]),e}();function Xd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Xd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function tT(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if(t==="currency"&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{var a=o.split(";");a.forEach(function(i){if(i){var s=i.split(":"),l=ev(s),c=l[0],u=l.slice(1),d=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=d),d==="false"&&(n[c.trim()]=!1),d==="true"&&(n[c.trim()]=!0),isNaN(d)||(n[c.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:n}}function hr(e){var t={};return function(r,o,a){var i=o+JSON.stringify(a),s=t[i];return s||(s=e(o,a),t[i]=s),s(r)}}var nT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=Xt.create("formatter"),this.options=t,this.formats={number:hr(function(n,r){var o=new Intl.NumberFormat(n,r);return function(a){return o.format(a)}}),currency:hr(function(n,r){var o=new Intl.NumberFormat(n,On(On({},r),{},{style:"currency"}));return function(a){return o.format(a)}}),datetime:hr(function(n,r){var o=new Intl.DateTimeFormat(n,On({},r));return function(a){return o.format(a)}}),relativetime:hr(function(n,r){var o=new Intl.RelativeTimeFormat(n,On({},r));return function(a){return o.format(a,r.range||"day")}}),list:hr(function(n,r){var o=new Intl.ListFormat(n,On({},r));return function(a){return o.format(a)}})},this.init(t)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=r.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=hr(r)}},{key:"format",value:function(n,r,o,a){var i=this,s=r.split(this.formatSeparator),l=s.reduce(function(c,u){var d=tT(u),f=d.formatName,p=d.formatOptions;if(i.formats[f]){var h=c;try{var m=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},b=m.locale||m.lng||a.locale||a.lng||o;h=i.formats[f](c,b,On(On(On({},p),a),m))}catch(y){i.logger.warn(y)}return h}else i.logger.warn("there was no format function for ".concat(f));return c},n);return l}}]),e}();function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Qd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function rT(e){var t=oT();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function oT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function aT(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var iT=function(e){Zr(n,e);var t=rT(n);function n(r,o,a){var i,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return nt(this,n),i=t.call(this),ji&&Pn.call(Jt(i)),i.backend=r,i.store=o,i.services=a,i.languageUtils=a.languageUtils,i.options=s,i.logger=Xt.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=s.maxParallelReads||10,i.readingCalls=0,i.maxRetries=s.maxRetries>=0?s.maxRetries:5,i.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(a,s.backend,s),i}return rt(n,[{key:"queueLoad",value:function(o,a,i,s){var l=this,c={},u={},d={},f={};return o.forEach(function(p){var h=!0;a.forEach(function(m){var b="".concat(p,"|").concat(m);!i.reload&&l.store.hasResourceBundle(p,m)?l.state[b]=2:l.state[b]<0||(l.state[b]===1?u[b]===void 0&&(u[b]=!0):(l.state[b]=1,h=!1,u[b]===void 0&&(u[b]=!0),c[b]===void 0&&(c[b]=!0),f[m]===void 0&&(f[m]=!0)))}),h||(d[p]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}},{key:"loaded",value:function(o,a,i){var s=o.split("|"),l=s[0],c=s[1];a&&this.emit("failedLoading",l,c,a),i&&this.store.addResourceBundle(l,c,i),this.state[o]=a?-1:2;var u={};this.queue.forEach(function(d){B2(d.loaded,[l],c),aT(d,o),a&&d.errors.push(a),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){u[f]||(u[f]={});var p=d.loaded[f];p.length&&p.forEach(function(h){u[f][h]===void 0&&(u[f][h]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,a,i){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!o.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:a,fcName:i,tried:l,wait:c,callback:u});return}this.readingCalls++;var d=function(m,b){if(s.readingCalls--,s.waitingReads.length>0){var y=s.waitingReads.shift();s.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(m&&b&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,a,i,l+1,c*2,u)},c);return}u(m,b)},f=this.backend[i].bind(this.backend);if(f.length===2){try{var p=f(o,a);p&&typeof p.then=="function"?p.then(function(h){return d(null,h)}).catch(d):d(null,p)}catch(h){d(h)}return}return f(o,a,d)}},{key:"prepareLoading",value:function(o,a){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof a=="string"&&(a=[a]);var c=this.queueLoad(o,a,s,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){i.loadOne(u)})}},{key:"load",value:function(o,a,i){this.prepareLoading(o,a,{},i)}},{key:"reload",value:function(o,a,i){this.prepareLoading(o,a,{reload:!0},i)}},{key:"loadOne",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],c=s[1];this.read(l,c,"read",void 0,void 0,function(u,d){u&&a.logger.warn("".concat(i,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&d&&a.logger.log("".concat(i,"loaded namespace ").concat(c," for language ").concat(l),d),a.loaded(o,u,d)})}},{key:"saveMissing",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){var d=Qd(Qd({},c),{},{isUpdate:l}),f=this.backend.create.bind(this.backend);if(f.length<6)try{var p;f.length===5?p=f(o,a,i,s,d):p=f(o,a,i,s),p&&typeof p.then=="function"?p.then(function(h){return u(null,h)}).catch(u):u(null,p)}catch(h){u(h)}else f(o,a,i,s,u,d)}!o||!o[0]||this.store.addResource(o[0],a,i,s)}}}]),n}(Pn);function Zd(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(xe(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),xe(t[2])==="object"||xe(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(o){n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function ef(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function tf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Kt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sT(e){var t=lT();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function lT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ta(){}function cT(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var li=function(e){Zr(n,e);var t=sT(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(nt(this,n),r=t.call(this),ji&&Pn.call(Jt(r)),r.options=ef(o),r.services={},r.logger=Xt,r.modules={external:[]},cT(Jt(r)),a&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,a),eo(r,Jt(r));setTimeout(function(){r.init(o,a)},0)}return r}return rt(n,[{key:"init",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(i=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=Zd();this.options=Kt(Kt(Kt({},s),this.options),ef(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=Kt(Kt({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function l(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?Xt.init(l(this.modules.logger),this.options):Xt.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=nT);var u=new Kd(this.options);this.store=new G2(this.options.resources,this.options);var d=this.services;d.logger=Xt,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new Z2(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new eT(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new iT(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),x=1;x<S;x++)E[x-1]=arguments[x];o.emit.apply(o,[y].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new Gd(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),x=1;x<S;x++)E[x-1]=arguments[x];o.emit.apply(o,[y].concat(E))}),this.modules.external.forEach(function(y){y.init&&y.init(o)})}if(this.format=this.options.interpolation.format,i||(i=Ta),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(y){o[y]=function(){var S;return(S=o.store)[y].apply(S,arguments)}});var h=["addResource","addResources","addResourceBundle","removeResourceBundle"];h.forEach(function(y){o[y]=function(){var S;return(S=o.store)[y].apply(S,arguments),o}});var m=vo(),b=function(){var S=function(x,v){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),m.resolve(v),i(x,v)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return S(null,o.t.bind(o));o.changeLanguage(o.options.lng,S)};return this.options.resources||!this.options.initImmediate?b():setTimeout(b,0),m}},{key:"loadResources",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta,s=i,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var c=[],u=function(p){if(p){var h=a.services.languageUtils.toResolveHierarchy(p);h.forEach(function(m){c.indexOf(m)<0&&c.push(m)})}};if(l)u(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(f){return u(f)})}this.options.preload&&this.options.preload.forEach(function(f){return u(f)}),this.services.backendConnector.load(c,this.options.ns,function(f){!f&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(f)})}else s(null)}},{key:"reloadResources",value:function(o,a,i){var s=vo();return o||(o=this.languages),a||(a=this.options.ns),i||(i=Ta),this.services.backendConnector.reload(o,a,function(l){s.resolve(),i(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&rv.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var a=0;a<this.languages.length;a++){var i=this.languages[a];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}},{key:"changeLanguage",value:function(o,a){var i=this;this.isLanguageChangingTo=o;var s=vo();this.emit("languageChanging",o);var l=function(f){i.language=f,i.languages=i.services.languageUtils.toResolveHierarchy(f),i.resolvedLanguage=void 0,i.setResolvedLanguage(f)},c=function(f,p){p?(l(p),i.translator.changeLanguage(p),i.isLanguageChangingTo=void 0,i.emit("languageChanged",p),i.logger.log("languageChanged",p)):i.isLanguageChangingTo=void 0,s.resolve(function(){return i.t.apply(i,arguments)}),a&&a(f,function(){return i.t.apply(i,arguments)})},u=function(f){!o&&!f&&i.services.languageDetector&&(f=[]);var p=typeof f=="string"?f:i.services.languageUtils.getBestMatchFromCodes(f);p&&(i.language||l(p),i.translator.language||i.translator.changeLanguage(p),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(p)),i.loadResources(p,function(h){c(h,p)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(o),s}},{key:"getFixedT",value:function(o,a,i){var s=this,l=function c(u,d){var f;if(xe(d)!=="object"){for(var p=arguments.length,h=new Array(p>2?p-2:0),m=2;m<p;m++)h[m-2]=arguments[m];f=s.options.overloadTranslationOptionHandler([u,d].concat(h))}else f=Kt({},d);f.lng=f.lng||c.lng,f.lngs=f.lngs||c.lngs,f.ns=f.ns||c.ns,f.keyPrefix=f.keyPrefix||i||c.keyPrefix;var b=s.options.keySeparator||".",y=f.keyPrefix?"".concat(f.keyPrefix).concat(b).concat(u):u;return s.t(y,f)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=a,l.keyPrefix=i,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var u=function(p,h){var m=a.services.backendConnector.state["".concat(p,"|").concat(h)];return m===-1||m===2};if(i.precheck){var d=i.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,o)&&(!l||u(c,o)))}},{key:"loadNamespaces",value:function(o,a){var i=this,s=vo();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){i.options.ns.indexOf(l)<0&&i.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),a&&a(l)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(o,a){var i=vo();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(c){return s.indexOf(c)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(c){i.resolve(),a&&a(c)}),i):(a&&a(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Kd(Zd());return a.indexOf(i.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta,s=Kt(Kt(Kt({},this.options),a),{isClone:!0}),l=new n(s);(a.debug!==void 0||a.prefix!==void 0)&&(l.logger=l.logger.clone(a));var c=["store","services","language"];return c.forEach(function(u){l[u]=o[u]}),l.services=Kt({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new Gd(l.services,l.options),l.translator.on("*",function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];l.emit.apply(l,[u].concat(f))}),l.init(s,i),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Pn);ae(li,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new li(e,t)});var Je=li.createInstance();Je.createInstance=li.createInstance;Je.createInstance;Je.dir;Je.init;Je.loadResources;Je.reloadResources;Je.use;Je.changeLanguage;Je.getFixedT;Je.t;Je.exists;Je.setDefaultNamespace;Je.hasLoadedNamespace;Je.loadNamespaces;Je.loadLanguages;function uT(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var nf={};function hl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&nf[t[0]]||(typeof t[0]=="string"&&(nf[t[0]]=new Date),uT.apply(void 0,t))}function rf(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function o(){setTimeout(function(){e.off("initialized",o)},0),n()};e.on("initialized",r)}})}function dT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var i=function(l,c){var u=t.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}function fT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return hl("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(a,i){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!i(a.isLanguageChangingTo,e))return!1}}):dT(e,t,n)}function pT(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}var hT=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,gT={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},vT=function(t){return gT[t]},mT=function(t){return t.replace(hT,vT)};function of(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function af(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?of(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):of(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var gl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:mT};function yT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gl=af(af({},gl),e)}function bT(){return gl}var ov;function wT(e){ov=e}function ST(){return ov}var xT={type:"3rdParty",init:function(t){yT(t.options.react),wT(t)}},CT=g.createContext(),OT=function(){function e(){nt(this,e),this.usedNamespaces={}}return rt(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(o){r.usedNamespaces[o]||(r.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function sf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function hs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var ET=function(t,n){var r=g.useRef();return g.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function _T(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=g.useContext(CT)||{},o=r.i18n,a=r.defaultNS,i=n||o||ST();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new OT),!i){hl("You will need to pass in an i18next instance by using initReactI18next");var s=function(N){return Array.isArray(N)?N[N.length-1]:N},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}i.options.react&&i.options.react.wait!==void 0&&hl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=hs(hs(hs({},bT()),i.options.react),t),u=c.useSuspense,d=c.keyPrefix,f=e||a||i.options&&i.options.defaultNS;f=typeof f=="string"?[f]:f||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(f);var p=(i.isInitialized||i.initializedStoreOnce)&&f.every(function(R){return fT(R,i,c)});function h(){return i.getFixedT(null,c.nsMode==="fallback"?f:f[0],d)}var m=g.useState(h),b=Se(m,2),y=b[0],S=b[1],E=f.join(),x=ET(E),v=g.useRef(!0);g.useEffect(function(){var R=c.bindI18n,N=c.bindI18nStore;v.current=!0,!p&&!u&&rf(i,f,function(){v.current&&S(h)}),p&&x&&x!==E&&v.current&&S(h);function T(){v.current&&S(h)}return R&&i&&i.on(R,T),N&&i&&i.store.on(N,T),function(){v.current=!1,R&&i&&R.split(" ").forEach(function(k){return i.off(k,T)}),N&&i&&N.split(" ").forEach(function(k){return i.store.off(k,T)})}},[i,E]);var O=g.useRef(!0);g.useEffect(function(){v.current&&!O.current&&S(h),O.current=!1},[i,d]);var C=[y,i,p];if(C.t=y,C.i18n=i,C.ready=p,p||!p&&!u)return C;throw new Promise(function(R){rf(i,f,function(){R()})})}var RT=["forwardedRef"];function lf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?lf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ir(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){function o(i){var s=i.forwardedRef,l=Rr(i,RT),c=_T(e,Pa(Pa({},l),{},{keyPrefix:t.keyPrefix})),u=Se(c,3),d=u[0],f=u[1],p=u[2],h=Pa(Pa({},l),{},{t:d,i18n:f,tReady:p});return t.withRef&&s?h.ref=s:!t.withRef&&s&&(h.forwardedRef=s),g.createElement(r,h)}o.displayName="withI18nextTranslation(".concat(pT(r),")"),o.WrappedComponent=r;var a=function(s,l){return g.createElement(o,Object.assign({},s,{forwardedRef:l}))};return t.withRef?g.forwardRef(a):o}}const NT={translation:{"Welcome to React":"欢迎使用 React"}},TT={translation:{"Welcome to React":"Welcome to React and react-i18next"}},PT={zh_CN:NT,en_US:TT};Je.use(xT).init({resources:PT,lng:"zh_CN",react:{bindI18n:"added languageChanged",bindI18nStore:"added"}});const av=Je;av.update=()=>{setTimeout(()=>{Je.emit("added")},0)};class kT{constructor({getWorkbench:t,emitter:n,pageModel:r,i18n:o,assets:a,engine:i}){L(this,"plugins",new Map);L(this,"emitter",ei());L(this,"getWorkbench");L(this,"pageModel");L(this,"i18n");L(this,"assets");L(this,"engine");L(this,"customPluginHooks",{});L(this,"customPlugin",(t,n)=>{const r=this.customPluginHooks,o=r[t]||[];o.push(n),r[t]=o,this.customPluginHooks=r});L(this,"createPluginCtx",()=>({globalEmitter:this.emitter,emitter:ei(),config:{},getWorkbench:this.getWorkbench,pluginManager:this,pageModel:this.pageModel,i18n:this.i18n,assets:this.assets,engine:this.engine,pluginReadyOk:()=>{}}));this.getWorkbench=t,this.emitter=n,this.pageModel=r,this.i18n=o,this.assets=a,this.engine=i}async add(t){var i;const n=this.createPluginCtx();let r;typeof t=="function"?r=t(n):r=t;let o={source:r,ctx:n,export:((i=r.export)==null?void 0:i.call(r,n))||{},ready:!1};(this.customPluginHooks[r.name]||[]).forEach(s=>{o=s(o)}),n.pluginReadyOk=()=>{this.emitter.emit(`${r.name}:ready`),o.ready=!0},this.plugins.set(r.name,o),await r.init(n)}async get(t){const n=this.plugins.get(t);return n!=null&&n.ready||await this.onPluginReadyOk(t),n}async remove(t){const n=this.plugins.get(t);await(n==null?void 0:n.source.destroy(n.ctx)),this.plugins.delete(t)}onPluginReadyOk(t,n){const r=this.plugins.get(t);if(!(r!=null&&r.ready))return r===void 0&&console.warn(`plugin: ${t} not found.`),new Promise(o=>{this.emitter.on(`${t}:ready`,()=>{r&&(r.ready=!0,n==null||n(r),o(r))})})}}const jT={pluginName:"组件库"},MT={pluginName:"Component Store"},cf={zh_CN:jT,en_US:MT},AT="_container_191p3_2",DT="_tabTitle_191p3_23",iv={container:AT,tabTitle:DT},$T="_square_1b87f_2",IT="_componentItem_1b87f_18",LT="_iconImg_1b87f_41",BT="_iconBox_1b87f_45",zT="_iconText_1b87f_54",mo={square:$T,componentItem:IT,iconImg:LT,iconBox:BT,iconText:zT},FT=e=>{const t={[sv]:e.id},n=g.useMemo(()=>e.iconText?w("div",{className:mo.iconText,children:String(e.iconText).toUpperCase()}):typeof e.icon=="string"?w("img",{className:mo.iconImg,src:e.icon,draggable:!1}):e.icon,[e.icon]),r=w("div",{className:dt([mo.square,e.containerClassName]),children:te("div",{...t,className:mo.componentItem,style:e.style,children:[w("div",{className:mo.iconBox,children:n}),w("span",{children:e.name})]})});return e.description?w(Y.Popover,{overlayInnerStyle:{maxWidth:"300px",maxHeight:"200px",overflow:"auto"},content:e.description||"",zIndex:1e3,placement:"right",children:r}):r},sv="data-drag-key",VT="_ListBox_1q7zr_2",HT="_collapsePanel_1q7zr_23",uf={ListBox:VT,collapsePanel:HT},UT=e=>{const{dataSource:t}=e,n=t.map(o=>o.name||"");if(!t.length)return null;const r=g.useMemo(()=>t.map(o=>{const a=o.name||"",i=w("div",{className:uf.collapsePanel,children:o.list.map(s=>w(FT,{id:s.id,name:s.title,icon:s.snapshot||s.snapshotText,iconText:s.snapshotText,description:s.description||""},s.id))});return{key:a,label:a,children:i}}),[]);return w("div",{className:uf.ListBox,children:w(Y.Collapse,{style:{width:"100%"},defaultActiveKey:n,items:r})})},lv=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||lv(e.parentElement,t)};var WT=typeof global=="object"&&global&&global.Object===Object&&global;const cv=WT;var GT=typeof self=="object"&&self&&self.Object===Object&&self,KT=cv||GT||Function("return this")();const rn=KT;var qT=rn.Symbol;const kn=qT;var uv=Object.prototype,YT=uv.hasOwnProperty,XT=uv.toString,yo=kn?kn.toStringTag:void 0;function JT(e){var t=YT.call(e,yo),n=e[yo];try{e[yo]=void 0;var r=!0}catch{}var o=XT.call(e);return r&&(t?e[yo]=n:delete e[yo]),o}var QT=Object.prototype,ZT=QT.toString;function eP(e){return ZT.call(e)}var tP="[object Null]",nP="[object Undefined]",df=kn?kn.toStringTag:void 0;function ar(e){return e==null?e===void 0?nP:tP:df&&df in Object(e)?JT(e):eP(e)}function ir(e){return e!=null&&typeof e=="object"}var rP="[object Symbol]";function oP(e){return typeof e=="symbol"||ir(e)&&ar(e)==rP}function aP(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var iP=Array.isArray;const Mi=iP;var sP=1/0,ff=kn?kn.prototype:void 0,pf=ff?ff.toString:void 0;function dv(e){if(typeof e=="string")return e;if(Mi(e))return aP(e,dv)+"";if(oP(e))return pf?pf.call(e):"";var t=e+"";return t=="0"&&1/e==-sP?"-0":t}function na(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var lP="[object AsyncFunction]",cP="[object Function]",uP="[object GeneratorFunction]",dP="[object Proxy]";function fv(e){if(!na(e))return!1;var t=ar(e);return t==cP||t==uP||t==lP||t==dP}var fP=rn["__core-js_shared__"];const gs=fP;var hf=function(){var e=/[^.]+$/.exec(gs&&gs.keys&&gs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function pP(e){return!!hf&&hf in e}var hP=Function.prototype,gP=hP.toString;function sr(e){if(e!=null){try{return gP.call(e)}catch{}try{return e+""}catch{}}return""}var vP=/[\\^$.*+?()[\]{}|]/g,mP=/^\[object .+?Constructor\]$/,yP=Function.prototype,bP=Object.prototype,wP=yP.toString,SP=bP.hasOwnProperty,xP=RegExp("^"+wP.call(SP).replace(vP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function CP(e){if(!na(e)||pP(e))return!1;var t=fv(e)?xP:mP;return t.test(sr(e))}function OP(e,t){return e==null?void 0:e[t]}function lr(e,t){var n=OP(e,t);return CP(n)?n:void 0}var EP=lr(rn,"WeakMap");const vl=EP;var gf=Object.create,_P=function(){function e(){}return function(t){if(!na(t))return{};if(gf)return gf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const RP=_P;function NP(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var TP=function(){try{var e=lr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const vf=TP;function PP(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var kP=9007199254740991,jP=/^(?:0|[1-9]\d*)$/;function MP(e,t){var n=typeof e;return t=t??kP,!!t&&(n=="number"||n!="symbol"&&jP.test(e))&&e>-1&&e%1==0&&e<t}function pv(e,t,n){t=="__proto__"&&vf?vf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function hv(e,t){return e===t||e!==e&&t!==t}var AP=Object.prototype,DP=AP.hasOwnProperty;function gv(e,t,n){var r=e[t];(!(DP.call(e,t)&&hv(r,n))||n===void 0&&!(t in e))&&pv(e,t,n)}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?pv(n,s,l):gv(n,s,l)}return n}var $P=9007199254740991;function vv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=$P}function mv(e){return e!=null&&vv(e.length)&&!fv(e)}var IP=Object.prototype;function Lc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||IP;return e===n}function LP(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var BP="[object Arguments]";function mf(e){return ir(e)&&ar(e)==BP}var yv=Object.prototype,zP=yv.hasOwnProperty,FP=yv.propertyIsEnumerable,VP=mf(function(){return arguments}())?mf:function(e){return ir(e)&&zP.call(e,"callee")&&!FP.call(e,"callee")};const HP=VP;function UP(){return!1}var bv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,yf=bv&&typeof module=="object"&&module&&!module.nodeType&&module,WP=yf&&yf.exports===bv,bf=WP?rn.Buffer:void 0,GP=bf?bf.isBuffer:void 0,KP=GP||UP;const wv=KP;var qP="[object Arguments]",YP="[object Array]",XP="[object Boolean]",JP="[object Date]",QP="[object Error]",ZP="[object Function]",ek="[object Map]",tk="[object Number]",nk="[object Object]",rk="[object RegExp]",ok="[object Set]",ak="[object String]",ik="[object WeakMap]",sk="[object ArrayBuffer]",lk="[object DataView]",ck="[object Float32Array]",uk="[object Float64Array]",dk="[object Int8Array]",fk="[object Int16Array]",pk="[object Int32Array]",hk="[object Uint8Array]",gk="[object Uint8ClampedArray]",vk="[object Uint16Array]",mk="[object Uint32Array]",Ee={};Ee[ck]=Ee[uk]=Ee[dk]=Ee[fk]=Ee[pk]=Ee[hk]=Ee[gk]=Ee[vk]=Ee[mk]=!0;Ee[qP]=Ee[YP]=Ee[sk]=Ee[XP]=Ee[lk]=Ee[JP]=Ee[QP]=Ee[ZP]=Ee[ek]=Ee[tk]=Ee[nk]=Ee[rk]=Ee[ok]=Ee[ak]=Ee[ik]=!1;function yk(e){return ir(e)&&vv(e.length)&&!!Ee[ar(e)]}function Bc(e){return function(t){return e(t)}}var Sv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,No=Sv&&typeof module=="object"&&module&&!module.nodeType&&module,bk=No&&No.exports===Sv,vs=bk&&cv.process,wk=function(){try{var e=No&&No.require&&No.require("util").types;return e||vs&&vs.binding&&vs.binding("util")}catch{}}();const Lr=wk;var wf=Lr&&Lr.isTypedArray,Sk=wf?Bc(wf):yk;const xk=Sk;var Ck=Object.prototype,Ok=Ck.hasOwnProperty;function xv(e,t){var n=Mi(e),r=!n&&HP(e),o=!n&&!r&&wv(e),a=!n&&!r&&!o&&xk(e),i=n||r||o||a,s=i?LP(e.length,String):[],l=s.length;for(var c in e)(t||Ok.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||MP(c,l)))&&s.push(c);return s}function Cv(e,t){return function(n){return e(t(n))}}var Ek=Cv(Object.keys,Object);const _k=Ek;var Rk=Object.prototype,Nk=Rk.hasOwnProperty;function Tk(e){if(!Lc(e))return _k(e);var t=[];for(var n in Object(e))Nk.call(e,n)&&n!="constructor"&&t.push(n);return t}function zc(e){return mv(e)?xv(e):Tk(e)}function Pk(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var kk=Object.prototype,jk=kk.hasOwnProperty;function Mk(e){if(!na(e))return Pk(e);var t=Lc(e),n=[];for(var r in e)r=="constructor"&&(t||!jk.call(e,r))||n.push(r);return n}function Fc(e){return mv(e)?xv(e,!0):Mk(e)}var Ak=lr(Object,"create");const Uo=Ak;function Dk(){this.__data__=Uo?Uo(null):{},this.size=0}function $k(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ik="__lodash_hash_undefined__",Lk=Object.prototype,Bk=Lk.hasOwnProperty;function zk(e){var t=this.__data__;if(Uo){var n=t[e];return n===Ik?void 0:n}return Bk.call(t,e)?t[e]:void 0}var Fk=Object.prototype,Vk=Fk.hasOwnProperty;function Hk(e){var t=this.__data__;return Uo?t[e]!==void 0:Vk.call(t,e)}var Uk="__lodash_hash_undefined__";function Wk(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Uo&&t===void 0?Uk:t,this}function er(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}er.prototype.clear=Dk;er.prototype.delete=$k;er.prototype.get=zk;er.prototype.has=Hk;er.prototype.set=Wk;function Gk(){this.__data__=[],this.size=0}function Di(e,t){for(var n=e.length;n--;)if(hv(e[n][0],t))return n;return-1}var Kk=Array.prototype,qk=Kk.splice;function Yk(e){var t=this.__data__,n=Di(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():qk.call(t,n,1),--this.size,!0}function Xk(e){var t=this.__data__,n=Di(t,e);return n<0?void 0:t[n][1]}function Jk(e){return Di(this.__data__,e)>-1}function Qk(e,t){var n=this.__data__,r=Di(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Sn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Sn.prototype.clear=Gk;Sn.prototype.delete=Yk;Sn.prototype.get=Xk;Sn.prototype.has=Jk;Sn.prototype.set=Qk;var Zk=lr(rn,"Map");const Wo=Zk;function ej(){this.size=0,this.__data__={hash:new er,map:new(Wo||Sn),string:new er}}function tj(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $i(e,t){var n=e.__data__;return tj(t)?n[typeof t=="string"?"string":"hash"]:n.map}function nj(e){var t=$i(this,e).delete(e);return this.size-=t?1:0,t}function rj(e){return $i(this,e).get(e)}function oj(e){return $i(this,e).has(e)}function aj(e,t){var n=$i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function to(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}to.prototype.clear=ej;to.prototype.delete=nj;to.prototype.get=rj;to.prototype.has=oj;to.prototype.set=aj;function Ov(e){return e==null?"":dv(e)}function Ev(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var ij=Cv(Object.getPrototypeOf,Object);const Vc=ij;var sj="[object Object]",lj=Function.prototype,cj=Object.prototype,_v=lj.toString,uj=cj.hasOwnProperty,dj=_v.call(Object);function Ii(e){if(!ir(e)||ar(e)!=sj)return!1;var t=Vc(e);if(t===null)return!0;var n=uj.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&_v.call(n)==dj}function fj(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function pj(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:fj(e,t,n)}var hj="\\ud800-\\udfff",gj="\\u0300-\\u036f",vj="\\ufe20-\\ufe2f",mj="\\u20d0-\\u20ff",yj=gj+vj+mj,bj="\\ufe0e\\ufe0f",wj="\\u200d",Sj=RegExp("["+wj+hj+yj+bj+"]");function Rv(e){return Sj.test(e)}function xj(e){return e.split("")}var Nv="\\ud800-\\udfff",Cj="\\u0300-\\u036f",Oj="\\ufe20-\\ufe2f",Ej="\\u20d0-\\u20ff",_j=Cj+Oj+Ej,Rj="\\ufe0e\\ufe0f",Nj="["+Nv+"]",ml="["+_j+"]",yl="\\ud83c[\\udffb-\\udfff]",Tj="(?:"+ml+"|"+yl+")",Tv="[^"+Nv+"]",Pv="(?:\\ud83c[\\udde6-\\uddff]){2}",kv="[\\ud800-\\udbff][\\udc00-\\udfff]",Pj="\\u200d",jv=Tj+"?",Mv="["+Rj+"]?",kj="(?:"+Pj+"(?:"+[Tv,Pv,kv].join("|")+")"+Mv+jv+")*",jj=Mv+jv+kj,Mj="(?:"+[Tv+ml+"?",ml,Pv,kv,Nj].join("|")+")",Aj=RegExp(yl+"(?="+yl+")|"+Mj+jj,"g");function Dj(e){return e.match(Aj)||[]}function $j(e){return Rv(e)?Dj(e):xj(e)}function Ij(e){return function(t){t=Ov(t);var n=Rv(t)?$j(t):void 0,r=n?n[0]:t.charAt(0),o=n?pj(n,1).join(""):t.slice(1);return r[e]()+o}}var Lj=Ij("toUpperCase");const Bj=Lj;function Av(e){return Bj(Ov(e).toLowerCase())}function zj(){this.__data__=new Sn,this.size=0}function Fj(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Vj(e){return this.__data__.get(e)}function Hj(e){return this.__data__.has(e)}var Uj=200;function Wj(e,t){var n=this.__data__;if(n instanceof Sn){var r=n.__data__;if(!Wo||r.length<Uj-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new to(r)}return n.set(e,t),this.size=n.size,this}function no(e){var t=this.__data__=new Sn(e);this.size=t.size}no.prototype.clear=zj;no.prototype.delete=Fj;no.prototype.get=Vj;no.prototype.has=Hj;no.prototype.set=Wj;function Gj(e,t){return e&&Ai(t,zc(t),e)}function Kj(e,t){return e&&Ai(t,Fc(t),e)}var Dv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sf=Dv&&typeof module=="object"&&module&&!module.nodeType&&module,qj=Sf&&Sf.exports===Dv,xf=qj?rn.Buffer:void 0,Cf=xf?xf.allocUnsafe:void 0;function Yj(e,t){if(t)return e.slice();var n=e.length,r=Cf?Cf(n):new e.constructor(n);return e.copy(r),r}function Xj(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function $v(){return[]}var Jj=Object.prototype,Qj=Jj.propertyIsEnumerable,Of=Object.getOwnPropertySymbols,Zj=Of?function(e){return e==null?[]:(e=Object(e),Xj(Of(e),function(t){return Qj.call(e,t)}))}:$v;const Hc=Zj;function eM(e,t){return Ai(e,Hc(e),t)}var tM=Object.getOwnPropertySymbols,nM=tM?function(e){for(var t=[];e;)Ev(t,Hc(e)),e=Vc(e);return t}:$v;const Iv=nM;function rM(e,t){return Ai(e,Iv(e),t)}function Lv(e,t,n){var r=t(e);return Mi(e)?r:Ev(r,n(e))}function oM(e){return Lv(e,zc,Hc)}function aM(e){return Lv(e,Fc,Iv)}var iM=lr(rn,"DataView");const bl=iM;var sM=lr(rn,"Promise");const wl=sM;var lM=lr(rn,"Set");const Sl=lM;var Ef="[object Map]",cM="[object Object]",_f="[object Promise]",Rf="[object Set]",Nf="[object WeakMap]",Tf="[object DataView]",uM=sr(bl),dM=sr(Wo),fM=sr(wl),pM=sr(Sl),hM=sr(vl),Hn=ar;(bl&&Hn(new bl(new ArrayBuffer(1)))!=Tf||Wo&&Hn(new Wo)!=Ef||wl&&Hn(wl.resolve())!=_f||Sl&&Hn(new Sl)!=Rf||vl&&Hn(new vl)!=Nf)&&(Hn=function(e){var t=ar(e),n=t==cM?e.constructor:void 0,r=n?sr(n):"";if(r)switch(r){case uM:return Tf;case dM:return Ef;case fM:return _f;case pM:return Rf;case hM:return Nf}return t});const Uc=Hn;var gM=Object.prototype,vM=gM.hasOwnProperty;function mM(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&vM.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var yM=rn.Uint8Array;const Pf=yM;function Wc(e){var t=new e.constructor(e.byteLength);return new Pf(t).set(new Pf(e)),t}function bM(e,t){var n=t?Wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var wM=/\w*$/;function SM(e){var t=new e.constructor(e.source,wM.exec(e));return t.lastIndex=e.lastIndex,t}var kf=kn?kn.prototype:void 0,jf=kf?kf.valueOf:void 0;function xM(e){return jf?Object(jf.call(e)):{}}function CM(e,t){var n=t?Wc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var OM="[object Boolean]",EM="[object Date]",_M="[object Map]",RM="[object Number]",NM="[object RegExp]",TM="[object Set]",PM="[object String]",kM="[object Symbol]",jM="[object ArrayBuffer]",MM="[object DataView]",AM="[object Float32Array]",DM="[object Float64Array]",$M="[object Int8Array]",IM="[object Int16Array]",LM="[object Int32Array]",BM="[object Uint8Array]",zM="[object Uint8ClampedArray]",FM="[object Uint16Array]",VM="[object Uint32Array]";function HM(e,t,n){var r=e.constructor;switch(t){case jM:return Wc(e);case OM:case EM:return new r(+e);case MM:return bM(e,n);case AM:case DM:case $M:case IM:case LM:case BM:case zM:case FM:case VM:return CM(e,n);case _M:return new r;case RM:case PM:return new r(e);case NM:return SM(e);case TM:return new r;case kM:return xM(e)}}function UM(e){return typeof e.constructor=="function"&&!Lc(e)?RP(Vc(e)):{}}var WM="[object Map]";function GM(e){return ir(e)&&Uc(e)==WM}var Mf=Lr&&Lr.isMap,KM=Mf?Bc(Mf):GM;const qM=KM;var YM="[object Set]";function XM(e){return ir(e)&&Uc(e)==YM}var Af=Lr&&Lr.isSet,JM=Af?Bc(Af):XM;const QM=JM;var ZM=1,eA=2,tA=4,Bv="[object Arguments]",nA="[object Array]",rA="[object Boolean]",oA="[object Date]",aA="[object Error]",zv="[object Function]",iA="[object GeneratorFunction]",sA="[object Map]",lA="[object Number]",Fv="[object Object]",cA="[object RegExp]",uA="[object Set]",dA="[object String]",fA="[object Symbol]",pA="[object WeakMap]",hA="[object ArrayBuffer]",gA="[object DataView]",vA="[object Float32Array]",mA="[object Float64Array]",yA="[object Int8Array]",bA="[object Int16Array]",wA="[object Int32Array]",SA="[object Uint8Array]",xA="[object Uint8ClampedArray]",CA="[object Uint16Array]",OA="[object Uint32Array]",we={};we[Bv]=we[nA]=we[hA]=we[gA]=we[rA]=we[oA]=we[vA]=we[mA]=we[yA]=we[bA]=we[wA]=we[sA]=we[lA]=we[Fv]=we[cA]=we[uA]=we[dA]=we[fA]=we[SA]=we[xA]=we[CA]=we[OA]=!0;we[aA]=we[zv]=we[pA]=!1;function Ga(e,t,n,r,o,a){var i,s=t&ZM,l=t&eA,c=t&tA;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!na(e))return e;var u=Mi(e);if(u){if(i=mM(e),!s)return NP(e,i)}else{var d=Uc(e),f=d==zv||d==iA;if(wv(e))return Yj(e,s);if(d==Fv||d==Bv||f&&!o){if(i=l||f?{}:UM(e),!s)return l?rM(e,Kj(i,e)):eM(e,Gj(i,e))}else{if(!we[d])return o?e:{};i=HM(e,d,s)}}a||(a=new no);var p=a.get(e);if(p)return p;a.set(e,i),QM(e)?e.forEach(function(b){i.add(Ga(b,t,n,b,e,a))}):qM(e)&&e.forEach(function(b,y){i.set(y,Ga(b,t,n,y,e,a))});var h=c?l?aM:oM:l?Fc:zc,m=u?void 0:h(e);return PP(m||e,function(b,y){m&&(y=b,b=e[y]),gv(i,y,Ga(b,t,n,y,e,a))}),i}var EA=1,_A=4;function Df(e){return Ga(e,EA|_A)}const ci="ComponentLib",xl=`plugin:${ci}`,RA=({children:e})=>w("div",{className:iv.tabTitle,children:e});class NA extends g.Component{constructor(n){super(n);L(this,"containerRef");L(this,"disposeList",[]);L(this,"leftPanelVisibleCb",async({visible:n,panelName:r})=>{await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),r===ci&&n&&this.registerDragEvent()});L(this,"registerDragEvent",async()=>{const{containerRef:n}=this,{pluginCtx:r}=this.props,o=await r.pluginManager.get("Designer");if(!o||!n.current)return;const a=r.pageModel,s=o.export.getDnd(),l=new Xn.Sensor({name:"ComponentListBox",container:n.current}),c=f=>{const p=f.event.target;if(!p)return;const h=lv(p,sv);if(!h)return;const m=a.materialsModel.findSnippetById(h);if(m)return a==null?void 0:a.createNode(m.schema)};l.setCanDrag(async f=>{const p=c(f);return this.props.pluginCtx.pluginManager.get("Designer").then(h=>{const m=h==null?void 0:h.export;m==null||m.selectNode("")}),{...f,extraData:{dropType:"NEW_ADD",dragNode:p}}}),s.registerSensor(l);const u=()=>{const{getWorkbench:f}=this.props.pluginCtx,p=f();p.state.leftBoxFixed||p.closeLeftPanel()};this.disposeList.push(()=>{s.emitter.off("dragStart",u)}),s.emitter.on("dragStart",u);const d=async f=>{const p=c(f);if(!p)return;const{pageModel:h}=this.props.pluginCtx;return this.props.pluginCtx.pluginManager.get("Designer").then(async m=>{var N;const b=m==null?void 0:m.export,y=b==null?void 0:b.getSelectedNodeId(),S=h.getNode(y),E=ye.findContainerNode(S);let x="CHILD_END",v=S??null;if(S)E===S.parent?S.isContainer()?(x="CHILD_END",v=S,h.addNode(p,S,x)):(x="AFTER",v=S):E&&!ye.isPageModel(E)&&(x="CHILD_END",v=E);else{const T=h.getRootNode();T&&(x="CHILD_END",v=T)}const O=b==null?void 0:b.getInstance(),C=await(O==null?void 0:O.customAdvanceHook.onNewAdd({dragNode:p,dropNode:v,eventObj:{...f,from:f.event,fromSensor:l,pointer:null,fromPointer:null,extraData:{}}}));if(C===!1)return;let R={dragNode:p,dropNode:v,pos:x};typeof C=="object"&&(R={...R,dragNode:C.addNode??R.dragNode,dropNode:C.dropNode??R.dropNode,pos:((N=C.dropPosInfo)==null?void 0:N.pos)??R.pos}),h.addNode(R.dragNode,R.dropNode,R.pos),setTimeout(()=>{b==null||b.selectNode(R.dragNode.id)},200)})};this.disposeList.push(()=>{l.emitter.off("onClick",d)}),l.emitter.on("onClick",d)});this.containerRef=g.createRef(),this.state={componentsList:[]}}async componentDidMount(){const{pluginCtx:n}=this.props,{pageModel:r,i18n:o}=n,{materialsModel:a}=r;await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent(),Object.keys(cf).forEach(s=>{o.addResourceBundle(s,xl,cf[s],!0,!0)}),o.update();const i=a.getAllSnippets();if(i.length&&i[0].name==="default"){const s=i.shift();s&&i.push(s)}this.setState({componentsList:i})}componentWillUnmount(){this.disposeList.map(n=>n())}render(){const{componentsList:n}=this.state,r=n.map(o=>({label:w(RA,{children:Av(o.name)}),key:o.name,children:w(UT,{dataSource:o.list})}));return w("div",{ref:this.containerRef,className:iv.container,children:w(Y.Tabs,{defaultActiveKey:"BaseComponent",items:r,style:{flex:1}})})}}const Vv={name:ci,async init(e){const t=Ir(xl)(NA),n=Ir(xl)(({t:o})=>w(qe,{children:o("pluginName")}));e.getWorkbench().addLeftPanel({title:w(n,{}),name:"ComponentLib",icon:w(u0,{}),render:w(t,{pluginCtx:e})})},reload:async()=>{console.log(ci,"not suooprt reload")},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},Hv="Designer",TA={pluginName:"组件库"},PA={pluginName:"Component Store"},$f={zh_CN:TA,en_US:PA},kA="_toolBarBox_h5ljb_2",jA="_item_h5ljb_10",MA="_layoutSelectBox_h5ljb_20",AA="_hoverBox_h5ljb_25",DA="_hoverBoxActive_h5ljb_35",$A="_hoverItem_h5ljb_39",IA="_placeholder_h5ljb_47",gn={toolBarBox:kA,item:jA,layoutSelectBox:MA,hoverBox:AA,hoverBoxActive:DA,hoverItem:$A,placeholder:IA},LA=({dataSource:e,children:t,onSelect:n})=>{const[r,o]=g.useState(!1);return te("div",{className:gn.layoutSelectBox,children:[w("div",{className:dt([gn.hoverBox,r&&gn.hoverBoxActive]),children:e.map(a=>w("div",{className:gn.hoverItem,onClick:()=>n(a.key),children:a.label},a.key))}),w("div",{className:gn.placeholder,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),children:t})]})},Uv=e=>{var p;const{nodeList:t,toSelectNode:n,toDelete:r,toCopy:o,toHidden:a}=e,i=[...t],s=i.shift(),l=i.map(h=>{var S;const m=h,b=(S=m.materialsModel.findByComponentName(m.value.componentName))==null?void 0:S.value.title,y=m.value.title||b||m.value.componentName||"";return{key:h.id,label:y||"Empty"}}),c=w("div",{className:gn.item,onClick:()=>o((s==null?void 0:s.id)||""),children:w(gh,{})}),u=w("div",{className:gn.item,onClick:()=>r((s==null?void 0:s.id)||""),children:w(tc,{})}),d=w("div",{className:gn.item,onClick:()=>a((s==null?void 0:s.id)||""),children:w(wh,{})}),f=w(LA,{dataSource:l.reverse(),onSelect:n,children:w("div",{children:(s==null?void 0:s.value.title)||((p=s==null?void 0:s.material)==null?void 0:p.value.title)||"Empty"})});return{copyItem:c,deleteItem:u,visibleItem:d,nodeLayout:f}},BA=e=>{const{copyItem:t,deleteItem:n,visibleItem:r,nodeLayout:o}=g.useMemo(()=>Uv(e),[e]);return te("div",{className:gn.toolBarBox,children:[o,r,t,n]})},zA=(e,t=5)=>{const n=[];let r=0,o=e;for(;r<t&&o;)ye.isNodeModel(o)&&(n.push(o),r++),o=o.parent||null;return n},FA=({node:e})=>w("div",{style:{backgroundColor:"rgba(100,100,100)",padding:"3px 10px 3px 15px",borderRadius:"2px",opacity:.9,color:"rgba(220,220,220)"},children:e.value.componentName}),VA="_hoverTips_k3vn7_2",HA={hoverTips:VA};class UA{constructor(t){L(this,"getPortalViewCtx");L(this,"ctx");L(this,"layoutRef");this.getPortalViewCtx=t.getPortalViewCtx,this.ctx=t.ctx,this.layoutRef=t.layoutRef}async canDrag({dragNode:t,eventObj:n}){var o;const r=(o=t.material)==null?void 0:o.value.advanceCustom;return r!=null&&r.canDragNode?r==null?void 0:r.canDragNode(t,{context:this.ctx,viewPortal:this.getPortalViewCtx(),event:n,extra:n.extraData}):!0}async canDrop({dragNode:t,dropNode:n,eventObj:r}){var s;const o=(s=t.material)==null?void 0:s.value.advanceCustom;let a={};const i={dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData};if(o!=null&&o.canDropNode)if(a=await o.canDropNode(t,i),o!=null&&o.canAcceptNode){let l;return typeof a=="object"?l=await(o==null?void 0:o.canAcceptNode(a.dragNode,{...i,...a})):l=await(o==null?void 0:o.canAcceptNode(t,{...i})),l}else return a;return!0}async onNewAdd({dragNode:t,dropNode:n,eventObj:r}){var a,i,s;const o=await((s=(i=(a=t.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onNewAdd)==null?void 0:s.call(i,t,{dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData}));return o===!1?!1:o}getSelectRectViewRender(t){var r;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.selectRectViewRender}getHoverRectViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.hoverRectViewRender}getDropViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.dropViewRender}getGhostViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.ghostViewRender}getToolbarViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.toolbarViewRender}async onCopy(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onCopy;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.copyNode??n)}return n&&r.pageModel.copyNode(n)&&await Tn(),n}async onDelete(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onDelete;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.deleteNode??n)}return n&&r.pageModel.deleteNode(n)&&await Tn(),n}}class WA extends g.Component{constructor(n){super(n);L(this,"layoutRef");L(this,"customAdvanceHook");L(this,"getPortalViewCtx",()=>({setView:n=>{this.setState({portalView:n})},clearView:()=>{this.setState({portalView:null})}}));L(this,"onNodeDragging",async n=>{var a,i,s;const r=n.extraData,o=r==null?void 0:r.dragNode;if(o)return(s=(i=(a=o.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onDragging)==null?void 0:s.call(i,o,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r})});L(this,"onNodeDragEnd",async()=>{this.setState({...this.state,dropViewRender:this.props.pluginCtx.config.dropViewRender})});L(this,"onNodeDrop",async n=>{var c,u,d,f,p,h,m,b,y,S,E;const{layoutRef:r}=this,o=this.props.pluginCtx.pageModel,a=n.extraData,i=a==null?void 0:a.dropPosInfo,s={before:"BEFORE",after:"AFTER",current:"CHILD_START"}[(i==null?void 0:i.pos)||"after"],l=a==null?void 0:a.dragNode;if(l&&await((d=(u=(c=l.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onDrop)==null?void 0:d.call(u,l,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;if(!(a!=null&&a.dropNode))return console.warn("cancel drop, because drop node is null"),!1;if(a.dropType==="NEW_ADD"){if(l&&await((h=(p=(f=l.material)==null?void 0:f.value.advanceCustom)==null?void 0:p.onNewAdd)==null?void 0:h.call(p,l,{dropNode:a.dropNode,context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;((m=a.dropNode)==null?void 0:m.nodeType)!=="NODE"?o==null||o.addNode(a.dragNode,a.dropNode,"CHILD_START"):o==null||o.addNode(a.dragNode,a.dropNode,s)}else{if(((b=a.dropNode)==null?void 0:b.id)===((y=a.dragNode)==null?void 0:y.id)){console.warn("dragNode and dropNode id is the same");return}if(!o.moveNodeById(((S=a.dragNode)==null?void 0:S.id)||"",((E=a==null?void 0:a.dropNode)==null?void 0:E.id)||"",s))return console.warn("drop failed"),!1}setTimeout(async()=>{var x,v,O;if(l&&await this.onSelectNode(l,null)===!1){(x=r.current)==null||x.selectNode("");return}(O=r.current)==null||O.selectNode(((v=a.dragNode)==null?void 0:v.id)||"")},150),this.props.pluginCtx.emitter.emit("onDrop",n)});L(this,"onSelectNode",async(n,r)=>{var l,c,u,d;const{pluginCtx:o}=this.props,{layoutRef:a}=this;if(!n){o.engine.updateCurrentSelectNode(null),(l=a.current)==null||l.selectNode(""),this.setState({selectToolbarView:null});return}const i=await((d=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onSelect)==null?void 0:d.call(u,n,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:r,extra:{}}));if(i===!1)return i;o.engine.updateCurrentSelectNode(n);const s=this.getToolbarView(n);this.setState({selectToolbarView:s,selectRectViewRender:this.customAdvanceHook.getSelectRectViewRender(n)||this.props.pluginCtx.config.selectRectViewRender})});L(this,"onDragStart",async n=>{var l,c,u;const r=n.extraData,o=r==null?void 0:r.dragNode;if(!o)return;const a={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r},i=await((u=(c=(l=o.material)==null?void 0:l.value.advanceCustom)==null?void 0:c.onDragStart)==null?void 0:u.call(c,o,{...a}));if(i===!1)return i;const s=this.getGhostView(o,a);this.setState({...this.state,ghostView:s,dropViewRender:this.customAdvanceHook.getDropViewRender(o)||this.props.pluginCtx.config.dropViewRender})});L(this,"getGhostView",(n,r)=>{let o=w(FA,{node:n});const i=this.customAdvanceHook.getGhostViewRender(n)||this.props.pluginCtx.config.ghostViewRender;return i&&(o=w(i,{node:n,params:r})),o});L(this,"toSelectNode",async n=>{var i;const o=this.props.pluginCtx.pageModel.getNode(n);if(await this.onSelectNode(o||null,null)!==!1)return(i=this.layoutRef.current)==null||i.selectNode(n),!0});L(this,"toCopyNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n),a=await this.customAdvanceHook.onCopy(o);a&&this.toSelectNode(a.id)});L(this,"toDeleteNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n);!o||await this.customAdvanceHook.onDelete(o)===!1||this.toSelectNode("")});L(this,"toHidden",n=>{const r=this.props.pluginCtx.pageModel.getNode(n);if(!r)return;const o=r.value.configure.devState??{};o.condition=!1,r.value.configure.devState=o,r.updateValue()});L(this,"getToolbarView",n=>{const o={nodeList:zA(n,5),toSelectNode:this.toSelectNode,toCopy:this.toCopyNode,toDelete:this.toDeleteNode,toHidden:this.toHidden},a=Uv(o);let i=w(BA,{...o});const s=this.customAdvanceHook.getToolbarViewRender(n)||this.props.pluginCtx.config.toolbarViewRender;return s&&(i=w(s,{node:n,context:this.context,toolBarItems:a})),i});L(this,"onHoverNode",(n,r,o)=>{this.props.pluginCtx.emitter.emit("onHover",n);const a=n==null?void 0:n.material;a||console.warn("material not found",n);const i={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:o,extra:{}},s=this.getGhostView(r,i),l={hoverToolbarView:w("div",{className:HA.hoverTips,children:(a==null?void 0:a.value.title)||(a==null?void 0:a.componentName)}),ghostView:s,hoverRectViewRender:this.customAdvanceHook.getHoverRectViewRender(n)||this.props.pluginCtx.config.hoverRectViewRender};r||(l.ghostView=null),this.setState({...l})});L(this,"nodeCanDrag",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrag({dragNode:o,eventObj:n})});L(this,"nodeCanDrop",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrop({dragNode:o,eventObj:n,...r})});L(this,"innerSelectRectViewRender",n=>{const{selectRectViewRender:r}=this.state,{pluginCtx:o}=this.props,a=r,i=o.engine.getActiveNode();return!a||!i?w(qe,{}):w(a,{node:i,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}})});L(this,"innerHoverRectViewRender",n=>{const{hoverRectViewRender:r}=this.state,o=r;return o?w(o,{node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):w(qe,{})});L(this,"innerDropViewRender",n=>{const{dropViewRender:r}=this.state,o=r;return o?w(o,{...n,node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):w(qe,{})});this.state={pageModel:n.pluginCtx.pageModel,hoverToolbarView:null,selectToolbarView:null,ghostView:null,assets:n.pluginCtx.assets||[],portalView:null,selectRectViewRender:null,hoverRectViewRender:null,dropViewRender:null},this.layoutRef=g.createRef(),this.customAdvanceHook=new UA({getPortalViewCtx:this.getPortalViewCtx,ctx:this.props.pluginCtx,layoutRef:this.layoutRef})}componentDidMount(){const{i18n:n}=this.props.pluginCtx;Object.keys($f).forEach(r=>{n.addResourceBundle(r,`plugin:${Hv}`,$f[r],!0,!0)}),this.init()}updateAssets(n){this.setState({assets:n})}reloadRender({assets:n}){var r;(r=this.layoutRef.current)==null||r.reload({assets:n})}async init(){const{layoutRef:n}=this,{pluginCtx:r}=this.props;if(!n.current){console.warn("layout not ready ok");return}await n.current.ready();const o=n.current;r.emitter.emit("ready",{UIInstance:this}),o.dnd.emitter.on("click",({event:a})=>{r.getWorkbench().onGlobalClick(a)}),this.props.pluginCtx.pageModel.emitter.on("onPageChange",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),this.props.pluginCtx.pageModel.emitter.on("onReloadPage",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),r.pluginReadyOk()}render(){const{layoutRef:n,props:r,onSelectNode:o,onDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDragEnd:c}=this,{pageModel:u,hoverToolbarView:d,selectToolbarView:f,ghostView:p,assets:h,portalView:m,selectRectViewRender:b,hoverRectViewRender:y,dropViewRender:S}=this.state,{pluginCtx:E}=r,x=E.engine.props.renderJSUrl||"./render.umd.js",v={};return b&&(v.selectRectViewRender=this.innerSelectRectViewRender),y&&(v.hoverRectViewRender=this.innerHoverRectViewRender),S&&(v.dropViewRender=this.innerDropViewRender),f&&(v.selectToolbarView=this.state.selectToolbarView),te(qe,{children:[w(Xn.Layout,{beforeInitRender:r.pluginCtx.config.beforeInitRender,customRender:r.pluginCtx.config.customRender,ref:n,pageModel:u,renderJSUrl:x,...r,hoverToolBarView:d,selectBoxStyle:{},hoverBoxStyle:{},nodeCanDrag:this.nodeCanDrag,nodeCanDrop:this.nodeCanDrop,onSelectNode:o,onNodeDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDraEnd:c,...v,ghostView:p,assets:h,pluginCtx:this.props.pluginCtx}),m&&Yt.createPortal(m,document.body)]})}}const Wv=e=>{const t=g.createRef();return{name:Hv,async init(n){n.getWorkbench().replaceBodyView(w(WA,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:()=>({getInstance:()=>t.current,getDnd:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.dnd},selectNode:async n=>{var r;(r=t.current)==null||r.toSelectNode(n)},copyNode:async n=>{var r;(r=t.current)==null||r.toCopyNode(n)},deleteNode:async n=>{var r;(r=t.current)==null||r.toDeleteNode(n)},getSelectedNodeId:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.state.currentSelectId},updatePage:n=>{var r,o,a,i;(i=(a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef)==null?void 0:a.current)==null||i.rerender(n)},reload:({assets:n}={})=>{var r;(r=t.current)==null||r.reloadRender({assets:n})},getComponentInstances:n=>{var r,o,a;return((a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef.current)==null?void 0:a.getInstancesById(n))||[]},getDynamicComponentInstances:n=>{var o,a,i,s;const r=(s=(i=(a=(o=t.current)==null?void 0:o.layoutRef.current)==null?void 0:a.designRenderRef.current)==null?void 0:i.renderRef.current)==null?void 0:s.dynamicComponentInstanceMap;return(r==null?void 0:r.get(n))||[]}}),meta:{engine:{version:"1.0.0"}}}},Cl=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||Cl(e.parentElement,t)},Gv=(e,t,n)=>{const r=(o,a)=>{var m,b,y;let i=o.children||[];Array.isArray(i)||(i=[]),i=i.filter(S=>typeof S!="string");const s=(m=n.materialsModel.findByComponentName(o.componentName))==null?void 0:m.value.title,l={title:o.title||s||o.componentName,key:o.id,children:[],parent:a,canDropPos:(b=n.getNode(o.id||""))!=null&&b.isContainer()?void 0:["after","before"]},c=[],u={title:"SLOT",key:`${o.id}-SLOT`,children:c,canBeSelected:!1,canDropPos:!1,parent:null,containerRender:({treeNodeView:S})=>w("div",{style:{border:"1px solid #a97cf8",borderTopWidth:"6px",marginRight:"2px",marginTop:"5px"},children:S})},d=o.props||{},f=(S,E,x)=>{if(ye.isJSSlotPropNode(S)){const O=S,C=n.getNode(o.id);let R="";if(C){const j=p(C,[...x,E]);R=ye.getMTitle(j)}let N=E;R&&(N=ye.getMTitle(R)||E);const T={title:N,key:`${o.id}-${x.join("_")}`,children:[],canBeSelected:!1,canDrag:!1,canDropPos:["current"],parent:u};let k=[];O.value&&!Array.isArray(O.value)?k=[O.value]:k=O.value,T.children=Gv(k,T,n),c.push(T);return}if(Ii(S)){const O=S;Object.keys(O).forEach(C=>{f(O[C],C,[...x,E])})}Array.isArray(S)&&S.forEach((C,R)=>{f(C,String(R),[...x,E])})},p=(S,E)=>{const x=qA(S),v=E.map(O=>String(parseInt(O,10))===O?"$NUM":O);return x[v.join(".")]||""};Object.keys(d).forEach(S=>{f(d[S],S,[])}),c.length>0&&((y=l.children)==null||y.push(u),u.parent=l);const h=i.map(S=>r(S,l))||[];return l.children=[...l.children,...h],l};return Array.isArray(e)?e.map(o=>r(o,t)):r(e,t)},GA=(e,t)=>{const n=e.componentsTree;let r=n.children||[];Array.isArray(r)||(r=[]);const o={title:"Page",key:n.id||"Page",rootNode:!0,children:[]};return o.children=Gv(r,o,t),[o]},ms=(e,t)=>{let n=[];Array.isArray(e)?n=e:n=[e];let r=!1;const o=(a,i)=>{var l;if(r)return;i(a)?r=!0:(l=a.children)==null||l.forEach(c=>{o(c,i)})};n.forEach(a=>{o(a,t)})};function KA(e){const{point:t,dom:n}=e;let r;const o=t,a=n.getBoundingClientRect(),i=a.height,s=a.x+50,l=a.y+Math.round(i/2);return o.y>l?r="after":r="before",o.x>s&&r==="after"&&(r="current"),{pos:r,direction:"vertical"}}const qA=e=>{var o;const t={},n=(o=e.material)==null?void 0:o.value.props;if(!n)return t;const r=(a,i)=>{var s,l;if(Ii(a)){const c=[...i],u=a,d=u.componentName;if(d==="ArraySetter"){const p=((s=u.props)==null?void 0:s.item.setters)||[],h=t[i.join(".")];let m="";typeof h=="string"?m=h:m=h.label,c.push("$NUM"),p.forEach(b=>{m=`${m}`,t[c.join(".")]=m,r(b,c)})}else d==="ShapeSetter"&&(((l=u.props)==null?void 0:l.elements)||[]).forEach(h=>{const m=[...c];m.push(h.name),t[m.join(".")]=h.title,(h.setters||[]).forEach(y=>{r(y,[...m])})})}};return n.forEach(a=>{let i=null;ye.isSpecialMaterialPropType(a)?i=a.content:i=a;let s=[];Array.isArray(i)?s=i:s=[i],s.forEach(l=>{var u;const c=[l.name];t[c.join(".")]=l.title,(u=l.setters)==null||u.forEach(d=>{r(d,c)})})}),t};var wr=(e=>(e.DRAGGING="DRAGGING",e.NORMAL="NORMAL",e))(wr||{});const Kv=g.createContext({state:{treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:!1,dragState:"NORMAL",pageModel:null},updateState:()=>{},onSelectNode:()=>{},onDeleteNode:e=>{},onCopyNode:e=>{}}),YA="_contentBox_1vfqn_2",XA="_nodeBox_1vfqn_13",JA="_toolbarBox_1vfqn_17",QA="_iconItem_1vfqn_21",ZA="_nodeContent_1vfqn_25",eD="_selected_1vfqn_35",tD="_nodeArrow_1vfqn_38",nD="_expanded_1vfqn_41",rD="_nodeRenderView_1vfqn_45",oD="_nodeChildren_1vfqn_54",aD="_dropAnchorLine_1vfqn_71",iD="_arrowSpan_1vfqn_80",it={contentBox:YA,nodeBox:XA,toolbarBox:JA,iconItem:QA,nodeContent:ZA,selected:eD,nodeArrow:tD,expanded:nD,nodeRenderView:rD,nodeChildren:oD,dropAnchorLine:aD,arrowSpan:iD},yr="data-drag-key",qv=e=>{var V,ne,ee,de;const t=g.useRef({titleEditable:!1}),{level:n=0,item:r,paths:o=["0"]}=e,[a,i]=g.useState(!0),{state:s,updateState:l,onSelectNode:c,onDeleteNode:u,getDesignerHandler:d,onCopyNode:f}=g.useContext(Kv),[p,h]=g.useState((V=t.current)==null?void 0:V.titleEditable),[m,b]=g.useState("");t.current.titleEditable=p;const y=s.expandKeys.find(A=>A===r.key),S=()=>{let A=s.expandKeys;y?A=A.filter(B=>B!==r.key):A.push(r.key||""),l({expandKeys:A})},E=s.currentSelectNodeKeys.find(A=>A===r.key),x=g.useRef(null),v=()=>{var B;if(p){(B=x==null?void 0:x.current)==null||B.focus();return}if(r.canBeSelected!==void 0&&r.canBeSelected===!1)return;let A=s.currentSelectNodeKeys;if(!s.multiSelect){r.key?c==null||c({keys:[r.key],node:r}):c==null||c({keys:[],node:r}),l({currentSelectNodeKeys:[String(r.key)]});return}E?A=A.filter(q=>q!==r.key):A.push(String(r.key)),c==null||c({keys:A,node:r}),l({currentSelectNodeKeys:A})},O=20,C=O*n,R=r.canBeSelected??!0,N={[yr]:r.key},T=g.useRef(),k=g.useRef();k.current=s,T.current=A=>{const B=s.expandKeys,q=Array.from(new Set([...B,A]));l({expandKeys:q})};const j=g.useRef(null);g.useEffect(()=>{var q,Q;let A=0;(q=j.current)==null||q.addEventListener("mouseenter",()=>{A=window.setTimeout(()=>{var ie,le;((ie=k.current)==null?void 0:ie.dragState)===wr.DRAGGING&&((le=T.current)==null||le.call(T,r.key||""))},.8*1e3)}),(Q=j.current)==null||Q.addEventListener("mouseleave",()=>{clearTimeout(A)});const B=ie=>{var le;if(t.current.titleEditable){if(ie.target===((le=x.current)==null?void 0:le.input))return;h(!1),I.updateValue()}};return document.addEventListener("click",B),()=>{A&&clearTimeout(A),document.removeEventListener("click",B)}},[]);const I=(ne=s.pageModel)==null?void 0:ne.getNode(r.key||""),M=()=>{const A=!a;if(!I)return;const B=I.value.configure.devState??{};B.condition=A,I.value.configure.devState=B,I.updateValue(),i(A)};let P=r.title;r.titleViewRender&&(P=r.titleViewRender({item:r,titleView:r.title}));const D=te("div",{className:it.nodeBox,children:[te("div",{className:dt([it.nodeContent,E&&R&&it.selected]),style:{marginLeft:`${-C}px`,paddingLeft:`${C+8}px`},onMouseMove:async()=>{if(!r.key)return;const A=await(d==null?void 0:d()),B=A==null?void 0:A.getDynamicComponentInstances(r.key);typeof(B==null?void 0:B._CONDITION)<"u"&&i(B==null?void 0:B._CONDITION)},children:[(ee=r.children)!=null&&ee.length?w("span",{style:{paddingRight:"5px"},className:it.arrowSpan,onClickCapture:S,children:w(F0,{className:dt([it.nodeArrow,y&&it.expanded])})}):null,te("div",{className:it.nodeRenderView,...N,ref:j,onClick:v,onDoubleClick:()=>{var Q;if(!I)return;const A=I,B=(Q=A.materialsModel.findByComponentName(A.value.componentName))==null?void 0:Q.value.title,q=A.value.title||B||A.value.componentName||"";b(q),h(!0),setTimeout(()=>{var ie;(ie=x.current)==null||ie.focus()},100)},children:[!p&&P,p&&w("div",{style:{paddingRight:"10px"},children:w(Y.Input,{size:"small",maxLength:20,ref:x,value:m,onPressEnter:()=>{h(!1),I.updateValue()},onChange:A=>{I.value.title=A.target.value,b(A.target.value)}})})]}),!p&&!r.rootNode&&te("div",{className:it.toolbarBox,children:[te("div",{className:it.iconItem,children:[!a&&w(N0,{onClick:M}),a&&w(wh,{onClick:M})]}),w("div",{className:it.iconItem,onClick:()=>{f(r.key||"")},children:w(gh,{})}),w("div",{className:it.iconItem,onClick:()=>{u(r.key||"")},children:w(tc,{})})]})]}),w("div",{className:dt([it.nodeChildren,E&&it.selected]),style:{paddingLeft:`${O}px`,height:y?"auto":"0"},children:y&&((de=r.children)==null?void 0:de.map((A,B)=>{const q=`${A.key}-${B}`;return w(qv,{item:A,paths:[...o,B],level:n+1},q)}))})]});return r.containerRender?r.containerRender({item:r,treeNodeView:D}):D};class sD extends g.Component{constructor(n){super(n);L(this,"domRef");L(this,"disposeCbList",[]);L(this,"sensor");L(this,"getDesignerHandler",async()=>{const n=await this.props.pluginCtx.pluginManager.get("Designer");return n==null?void 0:n.export});L(this,"updateTreeDataFromNode",()=>{const{pluginCtx:n}=this.props,{pageModel:r}=n,o=r.export(),a=GA(o,r);this.setState({treeData:a})});L(this,"getParentKeyPaths",n=>{const{treeData:r}=this.state;let o=null;if(ms(r,a=>a.key===n?(o=a,!0):!1),o){let a=o==null?void 0:o.parent;const i=[];for(;a;)a.key&&i.push(a.key),a=a.parent;return i}else return[]});L(this,"scrollNodeToView",n=>{var o;const r=document.querySelector(`[${yr}="${n}"]`);(o=r==null?void 0:r.scrollIntoView)==null||o.call(r,{behavior:"smooth",block:"center"})});L(this,"toSelectTreeNode",n=>{if(!n){this.setState({currentSelectNodeKeys:[]});return}const r=this.getParentKeyPaths(n.id);$t.debug("onSelectNodeChange parent path",r,n);const o=Array.from(new Set([...this.state.expandKeys,...r]));$t.debug("onSelectNodeChange newExpandKeys",o,n),this.setState({currentSelectNodeKeys:[n.id],expandKeys:o}),setTimeout(()=>{this.scrollNodeToView(n.id)},100)});L(this,"containNode",(n,r)=>{let o=null;return ms(n,a=>a.key===r.key?(o=a,!0):!1),o});L(this,"getTreeNodeByKey",n=>{const{treeData:r}=this.state;let o=null;return ms(r,a=>a.key===n?(o=a,!0):!1),o});L(this,"registerDragEvent",async()=>{if(!this.domRef.current)return;const n=new Xn.Sensor({container:this.domRef.current,name:"OutlineTree",eventPriority:999}),{pluginCtx:r}=this.props,o=r.pageModel,a=await this.getDesignerHandler(),i=a.getDnd();n.setCanDrag(async s=>{var m;const l=s.event.target;if(!l)return;const c=Cl(l,yr);if(!c)return;const u=o.getNode(c),d=this.getTreeNodeByKey(c);if((d==null?void 0:d.canDrag)!==void 0&&(d==null?void 0:d.canDrag)===!1)return;const f=a.getInstance(),p=await(f==null?void 0:f.customAdvanceHook.canDrag({dragNode:u,eventObj:{extraData:{},...s,from:s.event,fromSensor:n,fromPointer:s.pointer}}));if(p===!1)return!1;if(!u){console.log("targetNode not found");return}const h={...s,extraData:{dragNode:u,dragNodeUID:u.id}};return typeof p=="object"&&(h.extraData.dragNode=p.dragNode,h.extraData.dragNodeUID=((m=p.dragNode)==null?void 0:m.id)||""),h}),n.setCanDrop(async s=>{var S;const l=s.event.target;if(!l)return $t.debug("drop dom not found"),s;const c=Cl(l,yr);if(!c)return $t.debug("targetNodeId dom not found",s,l,yr),s;const u=this.getTreeNodeByKey(c);if((u==null?void 0:u.canDropPos)!==void 0&&u.canDropPos===!1)return $t.debug("node can not be drop by tree node config"),s;const d=o.getNode(c);if(!d)return $t.debug("targetNode not found"),s;const f=(S=s.extraData)==null?void 0:S.dragNode;if(!f)return $t.debug("startNode not found"),s;if((f==null?void 0:f.id)===d.id)return $t.debug("startNode and dropNode is the same"),s;if(f.contains(d.id))return $t.debug("startNode contain dropNode"),s;const h=KA({point:s.pointer,dom:l});if(Array.isArray(u==null?void 0:u.canDropPos)&&!(u!=null&&u.canDropPos.includes(h.pos)))return!1;$t.info("can dropNode",d);const m={...s,extraData:{...s.extraData,dropPosInfo:h,dropNode:d,dropNodeUID:d.id}},b=a.getInstance(),y=await(b==null?void 0:b.customAdvanceHook.canDrop({dragNode:m.extraData.dragNode,dropNode:d,eventObj:{...m,from:m.event,fromSensor:n,fromPointer:m.pointer}}));return y===!1?!1:(typeof y=="object"&&(m.extraData={...m.extraData,...y}),m)}),i.registerSensor(n),n.emitter.on("dragging",s=>{var p,h;const l=s.extraData.dropNode;if(this.setState({dragState:wr.DRAGGING}),!l){this.setState({dropPosInfo:null});return}const c=(p=document.querySelectorAll(`[${yr}="${l.id}"]`))==null?void 0:p[0];if(!c)return;const u=((h=s.extraData)==null?void 0:h.dropPosInfo)||{},d=c.getBoundingClientRect(),f={x:0,y:0};f.x=d.x,u.pos==="before"?f.y=d.y:u.pos==="after"?f.y=d.y+d.height:(f.y=d.y+d.height,f.x=d.x+20),this.setState({dropPosInfo:f})}),n.emitter.on("dragEnd",()=>{this.setState({dragState:wr.NORMAL})}),this.sensor=n});this.domRef=g.createRef(),this.state={treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:n.multiSelect||!1,dropPosInfo:{x:0,y:0},pageModel:n.pluginCtx.pageModel,dragState:wr.NORMAL}}async componentDidMount(){this.updateTreeDataFromNode();const{pluginCtx:n}=this.props,{pageModel:r}=n;r.emitter.on("*",()=>{this.updateTreeDataFromNode()}),n.globalEmitter.on("onSelectNodeChange",({node:i})=>{this.toSelectTreeNode(i)}),n.getWorkbench().emitter.on("leftPanelVisible",({visible:i,panelName:s})=>{if(i&&s==="OutlineTree"){console.log("visible, panelName",i,s);const l=n.engine.getActiveNode();l&&this.toSelectTreeNode(l)}});const a=n.engine.getActiveNode();a&&this.toSelectTreeNode(a),await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent()}render(){const{treeData:n,dragState:r,dropPosInfo:o}=this.state,{pluginCtx:a}=this.props;return w(Kv.Provider,{value:{sensor:this.sensor,state:this.state,getDesignerHandler:this.getDesignerHandler,onSelectNode:async({keys:i})=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}const l=(i==null?void 0:i[0])||"",c=a.pageModel.getNode(l);s.export.selectNode(l),c&&a.engine.updateCurrentSelectNode(c)},updateState:i=>{this.setState(i)},onDeleteNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.deleteNode(i)},onCopyNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.copyNode(i)}},children:te("div",{className:it.contentBox,ref:this.domRef,children:[n.map((i,s)=>w(qv,{item:i},i.key+`${s}`)),r===wr.DRAGGING&&o&&w("div",{className:it.dropAnchorLine,style:{left:`${o.x}px`,top:`${o.y}px`}})]})})}}const lD={pluginName:"大纲树"},cD={pluginName:"Layout Tree"},If={zh_CN:lD,en_US:cD},Ol="OutlineTree",ys=`plugin:${Ol}`,uD={name:Ol,async init(e){const{i18n:t}=e;Object.keys(If).forEach(a=>{t.addResourceBundle(a,ys,If[a],!0,!0)});const n=Ir(ys)(sD),r=Ir(ys)(({t:a})=>w(qe,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:w(r,{}),name:Ol,icon:w(s0,{}),render:w(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},dD="_CFromRenderBox_1vsdm_2",fD={CFromRenderBox:dD},Gc=g.createContext({formName:"",formState:{},conditionConfig:{},updateContext:()=>{},updateConditionConfig:()=>{},customSetterMap:{}}),Yv={},pD=e=>{Object.assign(Yv,e)};class Kc extends g.Component{constructor(n){super(n);L(this,"updateContext");L(this,"getFieldsValue",()=>this.formatValue(this.state.formState));L(this,"setFields",n=>{this.setState({formState:n})});L(this,"formatValue",n=>{const r={},o=this.state.conditionConfig;return Object.keys(n).forEach(a=>{var s;(((s=o[a])==null?void 0:s.call(o,n))??!0)&&(r[a]=n[a])}),r});this.updateContext=r=>{var o,a;this.setState({formState:r,customSetterMap:Yv}),(a=(o=this.props).onValueChange)==null||a.call(o,this.formatValue(r))},this.state={formName:n.name,formState:n.initialValue??{},conditionConfig:{},customSetterMap:n.customSetterMap||{},updateContext:this.updateContext,updateConditionConfig:(r,o)=>{this.setState({conditionConfig:{...this.state.conditionConfig,[r]:o}})}}}render(){const{state:n}=this,{children:r}=this.props;return w(Gc.Provider,{value:n,children:r})}}class hD extends TypeError{constructor(t,n){let r;const{message:o,...a}=t,{path:i}=t,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function gD(e){return Ft(e)&&typeof e[Symbol.iterator]=="function"}function Ft(e){return typeof e=="object"&&e!=null}function Ct(e){return typeof e=="string"?JSON.stringify(e):""+e}function vD(e){const{done:t,value:n}=e.next();return t?void 0:n}function mD(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+Ct(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*Lf(e,t,n,r){gD(e)||(e=[e]);for(const o of e){const a=mD(o,t,n,r);a&&(yield a)}}function*qc(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&Ft(t.schema)&&Ft(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=qc(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):Ft(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class on{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return Lf(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return Lf(u,c,this,l)}:this.refiner=()=>[]}assert(t){return yD(t,this)}create(t){return bD(t,this)}is(t){return SD(t,this)}mask(t){return wD(t,this)}validate(t,n){return n===void 0&&(n={}),ro(t,this,n)}}function yD(e,t){const n=ro(e,t);if(n[0])throw n[0]}function bD(e,t){const n=ro(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function wD(e,t){const n=ro(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function SD(e,t){return!ro(e,t)[0]}function ro(e,t,n){n===void 0&&(n={});const r=qc(e,t,n),o=vD(r);return o[0]?[new hD(o[0],function*(){for(const i of r)i[0]&&(yield i[0])}),void 0]:[void 0,o[1]]}function xD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?Qv(a):_e(a)}function Dn(e,t){return new on({type:e,schema:null,validator:t})}function Br(e){return new on({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function CD(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return Qv(r);default:return _e(r)}}function He(){return Dn("any",()=>!0)}function Ke(e){return new on({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+Ct(t)}})}function zr(){return Dn("boolean",e=>typeof e=="boolean")}function El(e){const t={},n=e.map(r=>Ct(r)).join();for(const r of e)t[r]=r;return new on({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+Ct(r)}})}function Xv(){return Dn("func",e=>typeof e=="function"||"Expected a function, but received: "+Ct(e))}function Qt(e){const t=Ct(e),n=typeof e;return new on({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+Ct(r)}})}function OD(){return Dn("never",()=>!1)}function Jv(){return Dn("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+Ct(e))}function _e(e){const t=e?Object.keys(e):[],n=OD();return new on({type:"object",schema:e||null,*entries(r){if(e&&Ft(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return Ft(r)||"Expected an object, but received: "+Ct(r)},coercer(r){return Ft(r)?{...r}:r}})}function X(e){return new on({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function To(e,t){return new on({type:"record",schema:null,*entries(n){if(Ft(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return Ft(n)||"Expected an object, but received: "+Ct(n)}})}function K(){return Dn("string",e=>typeof e=="string"||"Expected a string, but received: "+Ct(e))}function Qv(e){const t=Object.keys(e);return new on({type:"type",schema:e,*entries(n){if(Ft(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return Ft(n)||"Expected an object, but received: "+Ct(n)}})}function St(e){const t=e.map(n=>n.type).join(" | ");return new on({type:"union",schema:null,coercer(n,r){return(e.find(a=>{const[i]=a.validate(n,{coerce:!0});return!i})||ED()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=qc(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+Ct(n),...o]}})}function ED(){return Dn("unknown",()=>!0)}const Zv=_e({package:K(),version:K(),name:K(),exportName:X(K()),destructuring:X(zr()),subName:X(K()),main:X(K()),cssPaths:X(Ke(K()))});Ke(Zv);var Rn=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(Rn||{}),_l=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(_l||{});const _D=()=>Dn("normalObj",e=>!Ii(e)||[Rn.SLOT,Rn.EXPRESSION,Rn.FUNCTION].includes(e==null?void 0:e.type)?!1:(ro(e,To(K(),Yc)),!0)),Yc=St([K(),Jv(),zr(),_e({type:Qt(Rn.SLOT),renderType:El([_l.FUNC,_l.COMP]),params:X(Ke(K())),value:Br(()=>St([ui,Ke(ui)]))}),_e({type:Qt(Rn.EXPRESSION),value:K()}),_e({type:Qt(Rn.FUNCTION),value:K()}),_D(),Ke(Br(()=>Yc))]),Bf=_e({type:Qt(Rn.EXPRESSION),value:K()}),ui=_e({id:X(K()),title:X(K()),componentName:K(),props:X(To(K(),Yc)),nodeName:X(K()),state:X(To(K(),He())),children:Br(()=>X(Ke(St([K(),ui])))),configure:X(He()),css:X(He()),style:X(He()),classNames:X(Ke(He())),refId:X(K()),extra:X(To(He(),He())),condition:X(St([zr(),Bf])),loop:X(_e({open:zr(),data:St([Ke(He()),Bf]),args:X(Ke(K())),forName:X(K()),forIndex:X(K()),key:X(He()),name:X(K())})),methods:X(Ke(He()))}),RD=e=>Ii(e)?e.label:e,di=St([K(),_e({label:K(),tip:X(K())})]),ND=_e({type:Qt("shape"),value:Ke(_e({name:K(),title:di,valueType:Br(()=>Li)}))}),TD=_e({type:Qt("enums"),value:Ke(K())});_e({type:Qt("array"),value:Br(()=>Li)});const PD=_e({type:Qt("array"),value:Br(()=>Ke(Li))}),Li=St([El(["array","boolean","number","object","string"]),El(["component","expression","function"]),ND,TD,PD]),kD=St([K(),_e({componentName:K(),props:X(He()),initialValue:X(He()),component:X(He())})]),bs=_e({name:K(),title:di,valueType:Li,description:X(K()),defaultValue:He(),setters:X(Ke(kD)),condition:X(Xv())});St([K(),Xv()]);St([K(),_e({name:K(),describe:X(K()),params:X(_e({name:K(),description:K()})),template:K()})]);const jD=_e({id:X(K()),title:K(),snapshot:St([K(),He()]),snapshotText:X(K()),description:X(K()),tags:X(Ke(K())),groupName:X(K()),category:X(K()),schema:xD(CD(ui,["id"]),_e({componentName:X(K())}))});_e({componentName:K(),title:K(),screenshot:X(K()),icon:X(K()),tags:X(Ke(K())),groupName:X(K()),category:X(K()),priority:X(Jv()),npm:X(Zv),snippets:Ke(jD),props:Ke(St([bs,_e({title:X(di),type:Qt("single"),content:bs}),_e({title:X(di),type:Qt("group"),content:Ke(bs)})])),fixedProps:X(He()),isContainer:X(St([zr(),_e({placeholder:K(),width:K(),height:K()})])),disableEditorDragDom:X(He()),isLayout:X(zr()),rootSelector:X(K()),advanceCustom:X(He()),extra:X(To(He(),He()))});const em=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});em.setterName="字符设置器";const tm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.InputNumber,{style:{width:"100%"},...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o)}})});tm.setterName="数字设置器";const Xc=(e=[])=>e.map(t=>typeof t=="string"?{componentName:t}:t);function MD(e){const{index:t,keyPaths:n,setters:r}=e,o={...e.style},a={[t]:e.value},i=g.useRef(null);return g.useEffect(()=>{var s;(s=i.current)==null||s.setFields({[t]:e.value})},[e.value]),w("div",{style:o,children:w(Kc,{ref:i,name:String(t),initialValue:a||{},onValueChange:e.onValueChange,customSetterMap:{},children:w(lu,{suffix:w("div",{onClick:e.onDelete,style:{marginLeft:"8px",cursor:"pointer",fontSize:"12px"},children:w(tc,{})}),name:String(t),label:`元素${t}`,keyPaths:[...n,String(t)],setters:r})})})}function AD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Bi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function oo(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Jc(e){return"nodeType"in e}function gt(e){var t,n;return e?oo(e)?e:Jc(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Qc(e){const{Document:t}=gt(e);return e instanceof t}function ra(e){return oo(e)?!1:e instanceof gt(e).HTMLElement}function DD(e){return e instanceof gt(e).SVGElement}function ao(e){return e?oo(e)?e.document:Jc(e)?Qc(e)?e:ra(e)?e.ownerDocument:document:document:document}const Ut=Bi?g.useLayoutEffect:g.useEffect;function Zc(e){const t=g.useRef(e);return Ut(()=>{t.current=e}),g.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function $D(){const e=g.useRef(null),t=g.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=g.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Go(e,t){t===void 0&&(t=[e]);const n=g.useRef(e);return Ut(()=>{n.current!==e&&(n.current=e)},t),n}function oa(e,t){const n=g.useRef();return g.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function fi(e){const t=Zc(e),n=g.useRef(null),r=g.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Rl(e){const t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}let ws={};function aa(e,t){return g.useMemo(()=>{if(t)return t;const n=ws[e]==null?0:ws[e]+1;return ws[e]=n,e+"-"+n},[e,t])}function nm(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((a,i)=>{const s=Object.entries(i);for(const[l,c]of s){const u=a[l];u!=null&&(a[l]=u+e*c)}return a},{...t})}}const _r=nm(1),Ko=nm(-1);function ID(e){return"clientX"in e&&"clientY"in e}function eu(e){if(!e)return!1;const{KeyboardEvent:t}=gt(e.target);return t&&e instanceof t}function LD(e){if(!e)return!1;const{TouchEvent:t}=gt(e.target);return t&&e instanceof t}function Nl(e){if(LD(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return ID(e)?{x:e.clientX,y:e.clientY}:null}const Fr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Fr.Translate.toString(e),Fr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),zf="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function BD(e){return e.matches(zf)?e:e.querySelector(zf)}const zD={display:"none"};function FD(e){let{id:t,value:n}=e;return w("div",{id:t,style:zD,children:n})}const VD={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function HD(e){let{id:t,announcement:n}=e;return w("div",{id:t,style:VD,role:"status","aria-live":"assertive","aria-atomic":!0,children:n})}function UD(){const[e,t]=g.useState("");return{announce:g.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const rm=g.createContext(null);function WD(e){const t=g.useContext(rm);g.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function GD(){const[e]=g.useState(()=>new Set),t=g.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[g.useCallback(r=>{let{type:o,event:a}=r;e.forEach(i=>{var s;return(s=i[o])==null?void 0:s.call(i,a)})},[e]),t]}const KD={draggable:`
124
+ `),M="%c".concat([R,O].filter(Boolean).join(":"));typeof v.args[0]=="string"?C.apply(void 0,["".concat(M,"%c ").concat(v.args[0]),T,""].concat(l(v.args.slice(1)))):C.apply(void 0,[M,T].concat(l(v.args)))}}]),x}();return typeof window<"u"&&window.consola||((S=new y({reporters:[new E]})).Consola=y,S.LogLevel=f,S.BrowserReporter=E,S)})})(ev);var DN=ev.exports;const $N=Yl(DN),$t=$N.create({level:1}),Tn=e=>new Promise(t=>{setTimeout(()=>{t("ok")},e??1e3/60*2)});class IN extends h.Component{constructor(n){super(n);B(this,"emitter");B(this,"leftPanelContentRef");B(this,"addLeftPanel",n=>{this.state.leftPanels.push(n),this.setState({leftPanels:[...this.state.leftPanels]})});B(this,"replaceLeftPanel",(n,r)=>{const o=this.state.leftPanels.findIndex(a=>a.name===n);if(o>-1){const a=[...this.state.leftPanels];a[o]=r,this.setState({leftPanels:a})}});B(this,"openLeftPanel",async n=>{const r=n||this.state.currentActiveLeftPanel;this.setState({leftBoxVisible:!0,leftBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:r}),await Tn(),this.emitter.emit("leftPanelVisible",{visible:!0,panelName:r})});B(this,"closeLeftPanel",async()=>{this.setState({leftBoxVisible:!1,leftBoxSize:{width:0,height:"100%"}}),await Tn(),this.emitter.emit("leftPanelVisible",{visible:!1,panelName:this.state.currentActiveLeftPanel})});B(this,"toggleLeftPanel",()=>{const{leftBoxVisible:n}=this.state;!n?this.openLeftPanel():this.closeLeftPanel()});B(this,"onPluginIconClick",n=>{const{currentActiveLeftPanel:r}=this.state;r===n.name&&this.state.leftBoxVisible?this.closeLeftPanel():this.openLeftPanel(n.name)});B(this,"openRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!0,rightBoxSize:{width:400,height:n.height}})});B(this,"closeRightPanel",()=>{const{rightBoxSize:n}=this.state;this.setState({rightBoxVisible:!1,rightBoxSize:{width:0,height:n.height}})});B(this,"replaceBodyView",n=>{this.setState({bodyView:n})});B(this,"replaceRightView",n=>{this.setState({rightView:n})});B(this,"replaceTopBarView",n=>{this.setState({topToolBarView:n})});B(this,"replaceSubTopBarView",n=>{this.setState({subTopToolBarView:n})});B(this,"toggleRightPanel",()=>{const{rightBoxVisible:n,rightBoxSize:r}=this.state,o=!n;this.setState({rightBoxVisible:o,rightBoxSize:{width:o?400:0,height:r.height}})});B(this,"onLeftBoxResizeStop",(n,r,o,a)=>{const i=this.state.leftBoxSize.width+a.width;this.setState({leftBoxSize:{width:i,height:this.state.leftBoxSize.height}})});B(this,"onGlobalClick",n=>{var r;n.target&&((r=this.leftPanelContentRef.current)!=null&&r.contains(n.target))||!this.state.leftBoxFixed&&this.state.leftBoxVisible&&this.closeLeftPanel()});this.emitter=n.emitter||ei(),this.leftPanelContentRef=h.createRef(),this.state={leftBoxVisible:!0,leftBoxSize:{width:300,height:"100%"},leftBoxFixed:!0,rightBoxVisible:!0,rightBoxSize:{width:350,height:"100%"},currentActiveLeftPanel:"OutlineTree",leftPanels:[],bodyView:null,rightView:null,topToolBarView:null,subTopToolBarView:null,customViewList:[]}}addCustomView(n){const r=this.state.customViewList;return r.push(n),this.setState({customViewList:[...r]}),()=>{const o=this.state.customViewList.filter(a=>a!==n);this.setState({customViewList:[...o]})}}componentDidMount(){document.addEventListener("click",this.onGlobalClick)}render(){const{leftBoxVisible:n,leftBoxSize:r,leftBoxFixed:o,rightBoxSize:a,rightBoxVisible:i,leftPanels:s,currentActiveLeftPanel:l,bodyView:c,rightView:u,topToolBarView:d,subTopToolBarView:f,customViewList:p}=this.state,g={};o||(g.position="absolute",g.left="50px",g.top=0);const m=s.find(v=>v.name===l),b=(m==null?void 0:m.render)||null,{onPluginIconClick:y,toggleRightPanel:S,toggleLeftPanel:E,onLeftBoxResizeStop:x}=this;return te("div",{className:ke.workbenchContainer,children:[w("div",{className:ke.topToolBarBox,children:w("div",{className:ke.topToolBarView,children:d})}),te("div",{className:ke.bodyContent,children:[te("div",{className:ke.leftBox,ref:this.leftPanelContentRef,children:[w("div",{className:ke.pluginIconBar,children:s.map(v=>w("div",{onClick:()=>y(v),className:dt([ke.pluginIconItem,(m==null?void 0:m.name)===v.name&&ke.active]),children:v.icon},v.name))}),n&&te(Nu,{className:ke.pluginPanelBoxResizeBox,size:r,style:g,minWidth:300,maxWidth:600,enable:{right:n},onResizeStop:x,children:[te("div",{className:ke.pluginHeader,children:[w("span",{className:ke.pluginNameText,children:(m==null?void 0:m.title)||(m==null?void 0:m.name)}),w(Y.Button,{className:dt([ke.fixedBtn]),type:"text",size:"small",onClick:()=>{this.setState({leftBoxFixed:!this.state.leftBoxFixed})},children:w(F0,{className:dt([o&&ke.active])})}),w(Y.Button,{className:ke.closeBtn,type:"text",size:"small",onClick:E,children:w(m0,{})})]}),w("div",{className:ke.pluginPanelBox,children:b})]})]}),te("div",{className:ke.centerBox,children:[f&&w("div",{className:ke.subTopToolbarBox,children:f}),w("div",{className:ke.canvasBox,children:w("div",{className:ke.scrollBox,children:c})})]}),te("div",{className:ke.rightResizeBox,children:[w("div",{className:ke.arrowCursor,onClick:S,children:w(R0,{className:dt([!i&&ke.active])})}),w("div",{style:{display:i?"block":"none",height:"100%"},children:w(Nu,{minWidth:400,maxWidth:600,enable:{left:i},size:a,onResizeStop:(v,C,O,R)=>{this.setState({rightBoxSize:{width:this.state.rightBoxSize.width+R.width,height:this.state.rightBoxSize.height}})},children:w("div",{className:ke.rightBox,children:u})})})]})]}),Lt.createPortal(w("div",{className:ke.customViewBox,children:p.map(v=>w("div",{style:{pointerEvents:"auto",display:"inline-block"},children:v.view},v.key))}),document.body)]})}}const LN="_engineContainer_f3ly9_2",BN={engineContainer:LN};function nt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Bd(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,Xp(r.key),r)}}function rt(e,t,n){return t&&Bd(e.prototype,t),n&&Bd(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Jt(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pl(e,t){return pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,o){return r.__proto__=o,r},pl(e,t)}function Zr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&pl(e,t)}function eo(e,t){if(t&&(Oe(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Jt(e)}function kt(e){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},kt(e)}function tv(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function nv(e){return Jp(e)||tv(e)||Jl(e)||Qp()}function zd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Vd(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?zd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):zd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var zN={type:"logger",log:function(t){this.output("log",t)},warn:function(t){this.output("warn",t)},error:function(t){this.output("error",t)},output:function(t,n){console&&console[t]&&console[t].apply(console,n)}},VN=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.init(t,n)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.prefix=r.prefix||"i18next:",this.logger=n||zN,this.options=r,this.debug=r.debug}},{key:"setDebug",value:function(n){this.debug=n}},{key:"log",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"log","",!0)}},{key:"warn",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","",!0)}},{key:"error",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"error","")}},{key:"deprecate",value:function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return this.forward(r,"warn","WARNING DEPRECATED: ",!0)}},{key:"forward",value:function(n,r,o,a){return a&&!this.debug?null:(typeof n[0]=="string"&&(n[0]="".concat(o).concat(this.prefix," ").concat(n[0])),this.logger[r](n))}},{key:"create",value:function(n){return new e(this.logger,Vd(Vd({},{prefix:"".concat(this.prefix,":").concat(n,":")}),this.options))}},{key:"clone",value:function(n){return n=n||this.options,n.prefix=n.prefix||this.prefix,new e(this.logger,n)}}]),e}(),Xt=new VN,Pn=function(){function e(){nt(this,e),this.observers={}}return rt(e,[{key:"on",value:function(n,r){var o=this;return n.split(" ").forEach(function(a){o.observers[a]=o.observers[a]||[],o.observers[a].push(r)}),this}},{key:"off",value:function(n,r){if(this.observers[n]){if(!r){delete this.observers[n];return}this.observers[n]=this.observers[n].filter(function(o){return o!==r})}}},{key:"emit",value:function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];if(this.observers[n]){var i=[].concat(this.observers[n]);i.forEach(function(l){l.apply(void 0,o)})}if(this.observers["*"]){var s=[].concat(this.observers["*"]);s.forEach(function(l){l.apply(l,[n].concat(o))})}}}]),e}();function vo(){var e,t,n=new Promise(function(r,o){e=r,t=o});return n.resolve=e,n.reject=t,n}function Fd(e){return e==null?"":""+e}function FN(e,t,n){e.forEach(function(r){t[r]&&(n[r]=t[r])})}function Lc(e,t,n){function r(s){return s&&s.indexOf("###")>-1?s.replace(/###/g,"."):s}function o(){return!e||typeof e=="string"}for(var a=typeof t!="string"?[].concat(t):t.split(".");a.length>1;){if(o())return{};var i=r(a.shift());!e[i]&&n&&(e[i]=new n),Object.prototype.hasOwnProperty.call(e,i)?e=e[i]:e={}}return o()?{}:{obj:e,k:r(a.shift())}}function Hd(e,t,n){var r=Lc(e,t,Object),o=r.obj,a=r.k;o[a]=n}function HN(e,t,n,r){var o=Lc(e,t,Object),a=o.obj,i=o.k;a[i]=a[i]||[],r&&(a[i]=a[i].concat(n)),r||a[i].push(n)}function si(e,t){var n=Lc(e,t),r=n.obj,o=n.k;if(r)return r[o]}function Ud(e,t,n){var r=si(e,n);return r!==void 0?r:si(t,n)}function rv(e,t,n){for(var r in t)r!=="__proto__"&&r!=="constructor"&&(r in e?typeof e[r]=="string"||e[r]instanceof String||typeof t[r]=="string"||t[r]instanceof String?n&&(e[r]=t[r]):rv(e[r],t[r],n):e[r]=t[r]);return e}function pr(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var UN={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};function WN(e){return typeof e=="string"?e.replace(/[&<>"'\/]/g,function(t){return UN[t]}):e}var ji=typeof window<"u"&&window.navigator&&typeof window.navigator.userAgentData>"u"&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,GN=[" ",",","?","!",";"];function KN(e,t,n){t=t||"",n=n||"";var r=GN.filter(function(s){return t.indexOf(s)<0&&n.indexOf(s)<0});if(r.length===0)return!0;var o=new RegExp("(".concat(r.map(function(s){return s==="?"?"\\?":s}).join("|"),")")),a=!o.test(e);if(!a){var i=e.indexOf(n);i>0&&!o.test(e.substring(0,i))&&(a=!0)}return a}function Wd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Na(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Wd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Wd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function qN(e){var t=YN();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function YN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function ov(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),o=e,a=0;a<r.length;++a){if(!o||typeof o[r[a]]=="string"&&a+1<r.length)return;if(o[r[a]]===void 0){for(var i=2,s=r.slice(a,a+i).join(n),l=o[s];l===void 0&&r.length>a+i;)i++,s=r.slice(a,a+i).join(n),l=o[s];if(l===void 0)return;if(l===null)return null;if(t.endsWith(s)){if(typeof l=="string")return l;if(s&&typeof l[s]=="string")return l[s]}var c=r.slice(a+i).join(n);return c?ov(l,c,n):void 0}o=o[r[a]]}return o}}var XN=function(e){Zr(n,e);var t=qN(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{ns:["translation"],defaultNS:"translation"};return nt(this,n),o=t.call(this),ji&&Pn.call(Jt(o)),o.data=r||{},o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.options.ignoreJSONStructure===void 0&&(o.options.ignoreJSONStructure=!0),o}return rt(n,[{key:"addNamespaces",value:function(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}},{key:"removeNamespaces",value:function(o){var a=this.options.ns.indexOf(o);a>-1&&this.options.ns.splice(a,1)}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},l=s.keySeparator!==void 0?s.keySeparator:this.options.keySeparator,c=s.ignoreJSONStructure!==void 0?s.ignoreJSONStructure:this.options.ignoreJSONStructure,u=[o,a];i&&typeof i!="string"&&(u=u.concat(i)),i&&typeof i=="string"&&(u=u.concat(l?i.split(l):i)),o.indexOf(".")>-1&&(u=o.split("."));var d=si(this.data,u);return d||!c||typeof i!="string"?d:ov(this.data&&this.data[o]&&this.data[o][a],i,l)}},{key:"addResource",value:function(o,a,i,s){var l=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{silent:!1},c=this.options.keySeparator;c===void 0&&(c=".");var u=[o,a];i&&(u=u.concat(c?i.split(c):i)),o.indexOf(".")>-1&&(u=o.split("."),s=a,a=u[1]),this.addNamespaces(a),Hd(this.data,u,s),l.silent||this.emit("added",o,a,i,s)}},{key:"addResources",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{silent:!1};for(var l in i)(typeof i[l]=="string"||Object.prototype.toString.apply(i[l])==="[object Array]")&&this.addResource(o,a,l,i[l],{silent:!0});s.silent||this.emit("added",o,a,i)}},{key:"addResourceBundle",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{silent:!1},u=[o,a];o.indexOf(".")>-1&&(u=o.split("."),s=i,i=a,a=u[1]),this.addNamespaces(a);var d=si(this.data,u)||{};s?rv(d,i,l):d=Na(Na({},d),i),Hd(this.data,u,d),c.silent||this.emit("added",o,a,i)}},{key:"removeResourceBundle",value:function(o,a){this.hasResourceBundle(o,a)&&delete this.data[o][a],this.removeNamespaces(a),this.emit("removed",o,a)}},{key:"hasResourceBundle",value:function(o,a){return this.getResource(o,a)!==void 0}},{key:"getResourceBundle",value:function(o,a){return a||(a=this.options.defaultNS),this.options.compatibilityAPI==="v1"?Na(Na({},{}),this.getResource(o,a)):this.getResource(o,a)}},{key:"getDataByLanguage",value:function(o){return this.data[o]}},{key:"hasLanguageSomeTranslations",value:function(o){var a=this.getDataByLanguage(o),i=a&&Object.keys(a)||[];return!!i.find(function(s){return a[s]&&Object.keys(a[s]).length>0})}},{key:"toJSON",value:function(){return this.data}}]),n}(Pn),av={processors:{},addPostProcessor:function(t){this.processors[t.name]=t},handle:function(t,n,r,o,a){var i=this;return t.forEach(function(s){i.processors[s]&&(n=i.processors[s].process(n,r,o,a))}),n}};function Gd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function at(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Gd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Gd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function JN(e){var t=QN();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function QN(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}var Kd={},qd=function(e){Zr(n,e);var t=JN(n);function n(r){var o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return nt(this,n),o=t.call(this),ji&&Pn.call(Jt(o)),FN(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],r,Jt(o)),o.options=a,o.options.keySeparator===void 0&&(o.options.keySeparator="."),o.logger=Xt.create("translator"),o}return rt(n,[{key:"changeLanguage",value:function(o){o&&(this.language=o)}},{key:"exists",value:function(o){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}};if(o==null)return!1;var i=this.resolve(o,a);return i&&i.res!==void 0}},{key:"extractFromKey",value:function(o,a){var i=a.nsSeparator!==void 0?a.nsSeparator:this.options.nsSeparator;i===void 0&&(i=":");var s=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,l=a.ns||this.options.defaultNS||[],c=i&&o.indexOf(i)>-1,u=!this.options.userDefinedKeySeparator&&!a.keySeparator&&!this.options.userDefinedNsSeparator&&!a.nsSeparator&&!KN(o,i,s);if(c&&!u){var d=o.match(this.interpolator.nestingRegexp);if(d&&d.length>0)return{key:o,namespaces:l};var f=o.split(i);(i!==s||i===s&&this.options.ns.indexOf(f[0])>-1)&&(l=f.shift()),o=f.join(s)}return typeof l=="string"&&(l=[l]),{key:o,namespaces:l}}},{key:"translate",value:function(o,a,i){var s=this;if(Oe(a)!=="object"&&this.options.overloadTranslationOptionHandler&&(a=this.options.overloadTranslationOptionHandler(arguments)),a||(a={}),o==null)return"";Array.isArray(o)||(o=[String(o)]);var l=a.returnDetails!==void 0?a.returnDetails:this.options.returnDetails,c=a.keySeparator!==void 0?a.keySeparator:this.options.keySeparator,u=this.extractFromKey(o[o.length-1],a),d=u.key,f=u.namespaces,p=f[f.length-1],g=a.lng||this.language,m=a.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(g&&g.toLowerCase()==="cimode"){if(m){var b=a.nsSeparator||this.options.nsSeparator;return l?(y.res="".concat(p).concat(b).concat(d),y):"".concat(p).concat(b).concat(d)}return l?(y.res=d,y):d}var y=this.resolve(o,a),S=y&&y.res,E=y&&y.usedKey||d,x=y&&y.exactUsedKey||d,v=Object.prototype.toString.apply(S),C=["[object Number]","[object Function]","[object RegExp]"],O=a.joinArrays!==void 0?a.joinArrays:this.options.joinArrays,R=!this.i18nFormat||this.i18nFormat.handleAsObject,N=typeof S!="string"&&typeof S!="boolean"&&typeof S!="number";if(R&&S&&N&&C.indexOf(v)<0&&!(typeof O=="string"&&v==="[object Array]")){if(!a.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var T=this.options.returnedObjectHandler?this.options.returnedObjectHandler(E,S,at(at({},a),{},{ns:f})):"key '".concat(d," (").concat(this.language,")' returned an object instead of string.");return l?(y.res=T,y):T}if(c){var M=v==="[object Array]",j=M?[]:{},D=M?x:E;for(var k in S)if(Object.prototype.hasOwnProperty.call(S,k)){var P="".concat(D).concat(c).concat(k);j[k]=this.translate(P,at(at({},a),{joinArrays:!1,ns:f})),j[k]===P&&(j[k]=S[k])}S=j}}else if(R&&typeof O=="string"&&v==="[object Array]")S=S.join(O),S&&(S=this.extendTranslation(S,o,a,i));else{var L=!1,z=!1,Z=a.count!==void 0&&typeof a.count!="string",J=n.hasDefaultValue(a),le=Z?this.pluralResolver.getSuffix(g,a.count,a):"",A=a["defaultValue".concat(le)]||a.defaultValue;!this.isValidLookup(S)&&J&&(L=!0,S=A),this.isValidLookup(S)||(z=!0,S=d);var $=a.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,W=$&&z?void 0:S,ne=J&&A!==S&&this.options.updateMissing;if(z||L||ne){if(this.logger.log(ne?"updateKey":"missingKey",g,p,d,ne?A:S),c){var ie=this.resolve(d,at(at({},a),{},{keySeparator:!1}));ie&&ie.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var de=[],we=this.languageUtils.getFallbackCodes(this.options.fallbackLng,a.lng||this.language);if(this.options.saveMissingTo==="fallback"&&we&&we[0])for(var fe=0;fe<we.length;fe++)de.push(we[fe]);else this.options.saveMissingTo==="all"?de=this.languageUtils.toResolveHierarchy(a.lng||this.language):de.push(a.lng||this.language);var Ee=function($e,V,Xe){var Be=J&&Xe!==S?Xe:W;s.options.missingKeyHandler?s.options.missingKeyHandler($e,p,V,Be,ne,a):s.backendConnector&&s.backendConnector.saveMissing&&s.backendConnector.saveMissing($e,p,V,Be,ne,a),s.emit("missingKey",$e,p,V,S)};this.options.saveMissing&&(this.options.saveMissingPlurals&&Z?de.forEach(function(re){s.pluralResolver.getSuffixes(re,a).forEach(function($e){Ee([re],d+$e,a["defaultValue".concat($e)]||A)})}):Ee(de,d,A))}S=this.extendTranslation(S,o,a,y,i),z&&S===d&&this.options.appendNamespaceToMissingKey&&(S="".concat(p,":").concat(d)),(z||L)&&this.options.parseMissingKeyHandler&&(this.options.compatibilityAPI!=="v1"?S=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?"".concat(p,":").concat(d):d,L?S:void 0):S=this.options.parseMissingKeyHandler(S))}return l?(y.res=S,y):S}},{key:"extendTranslation",value:function(o,a,i,s,l){var c=this;if(this.i18nFormat&&this.i18nFormat.parse)o=this.i18nFormat.parse(o,at(at({},this.options.interpolation.defaultVariables),i),s.usedLng,s.usedNS,s.usedKey,{resolved:s});else if(!i.skipInterpolation){i.interpolation&&this.interpolator.init(at(at({},i),{interpolation:at(at({},this.options.interpolation),i.interpolation)}));var u=typeof o=="string"&&(i&&i.interpolation&&i.interpolation.skipOnVariables!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables),d;if(u){var f=o.match(this.interpolator.nestingRegexp);d=f&&f.length}var p=i.replace&&typeof i.replace!="string"?i.replace:i;if(this.options.interpolation.defaultVariables&&(p=at(at({},this.options.interpolation.defaultVariables),p)),o=this.interpolator.interpolate(o,p,i.lng||this.language,i),u){var g=o.match(this.interpolator.nestingRegexp),m=g&&g.length;d<m&&(i.nest=!1)}i.nest!==!1&&(o=this.interpolator.nest(o,function(){for(var S=arguments.length,E=new Array(S),x=0;x<S;x++)E[x]=arguments[x];return l&&l[0]===E[0]&&!i.context?(c.logger.warn("It seems you are nesting recursively key: ".concat(E[0]," in key: ").concat(a[0])),null):c.translate.apply(c,E.concat([a]))},i)),i.interpolation&&this.interpolator.reset()}var b=i.postProcess||this.options.postProcess,y=typeof b=="string"?[b]:b;return o!=null&&y&&y.length&&i.applyPostProcessor!==!1&&(o=av.handle(y,o,a,this.options&&this.options.postProcessPassResolved?at({i18nResolved:s},i):i,this)),o}},{key:"resolve",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s,l,c,u,d;return typeof o=="string"&&(o=[o]),o.forEach(function(f){if(!a.isValidLookup(s)){var p=a.extractFromKey(f,i),g=p.key;l=g;var m=p.namespaces;a.options.fallbackNS&&(m=m.concat(a.options.fallbackNS));var b=i.count!==void 0&&typeof i.count!="string",y=b&&!i.ordinal&&i.count===0&&a.pluralResolver.shouldUseIntlApi(),S=i.context!==void 0&&(typeof i.context=="string"||typeof i.context=="number")&&i.context!=="",E=i.lngs?i.lngs:a.languageUtils.toResolveHierarchy(i.lng||a.language,i.fallbackLng);m.forEach(function(x){a.isValidLookup(s)||(d=x,!Kd["".concat(E[0],"-").concat(x)]&&a.utils&&a.utils.hasLoadedNamespace&&!a.utils.hasLoadedNamespace(d)&&(Kd["".concat(E[0],"-").concat(x)]=!0,a.logger.warn('key "'.concat(l,'" for languages "').concat(E.join(", "),`" won't get resolved as namespace "`).concat(d,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),E.forEach(function(v){if(!a.isValidLookup(s)){u=v;var C=[g];if(a.i18nFormat&&a.i18nFormat.addLookupKeys)a.i18nFormat.addLookupKeys(C,g,v,x,i);else{var O;b&&(O=a.pluralResolver.getSuffix(v,i.count,i));var R="".concat(a.options.pluralSeparator,"zero");if(b&&(C.push(g+O),y&&C.push(g+R)),S){var N="".concat(g).concat(a.options.contextSeparator).concat(i.context);C.push(N),b&&(C.push(N+O),y&&C.push(N+R))}}for(var T;T=C.pop();)a.isValidLookup(s)||(c=T,s=a.getResource(v,x,T,i))}}))})}}),{res:s,usedKey:l,exactUsedKey:c,usedLng:u,usedNS:d}}},{key:"isValidLookup",value:function(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}},{key:"getResource",value:function(o,a,i){var s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(o,a,i,s):this.resourceStore.getResource(o,a,i,s)}}],[{key:"hasDefaultValue",value:function(o){var a="defaultValue";for(var i in o)if(Object.prototype.hasOwnProperty.call(o,i)&&a===i.substring(0,a.length)&&o[i]!==void 0)return!0;return!1}}]),n}(Pn);function ps(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Yd=function(){function e(t){nt(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Xt.create("languageUtils")}return rt(e,[{key:"getScriptPartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return null;var r=n.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}},{key:"getLanguagePartFromCode",value:function(n){if(!n||n.indexOf("-")<0)return n;var r=n.split("-");return this.formatLanguageCode(r[0])}},{key:"formatLanguageCode",value:function(n){if(typeof n=="string"&&n.indexOf("-")>-1){var r=["hans","hant","latn","cyrl","cans","mong","arab"],o=n.split("-");return this.options.lowerCaseLng?o=o.map(function(a){return a.toLowerCase()}):o.length===2?(o[0]=o[0].toLowerCase(),o[1]=o[1].toUpperCase(),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=ps(o[1].toLowerCase()))):o.length===3&&(o[0]=o[0].toLowerCase(),o[1].length===2&&(o[1]=o[1].toUpperCase()),o[0]!=="sgn"&&o[2].length===2&&(o[2]=o[2].toUpperCase()),r.indexOf(o[1].toLowerCase())>-1&&(o[1]=ps(o[1].toLowerCase())),r.indexOf(o[2].toLowerCase())>-1&&(o[2]=ps(o[2].toLowerCase()))),o.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?n.toLowerCase():n}},{key:"isSupportedCode",value:function(n){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(n=this.getLanguagePartFromCode(n)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(n)>-1}},{key:"getBestMatchFromCodes",value:function(n){var r=this;if(!n)return null;var o;return n.forEach(function(a){if(!o){var i=r.formatLanguageCode(a);(!r.options.supportedLngs||r.isSupportedCode(i))&&(o=i)}}),!o&&this.options.supportedLngs&&n.forEach(function(a){if(!o){var i=r.getLanguagePartFromCode(a);if(r.isSupportedCode(i))return o=i;o=r.options.supportedLngs.find(function(s){if(s.indexOf(i)===0)return s})}}),o||(o=this.getFallbackCodes(this.options.fallbackLng)[0]),o}},{key:"getFallbackCodes",value:function(n,r){if(!n)return[];if(typeof n=="function"&&(n=n(r)),typeof n=="string"&&(n=[n]),Object.prototype.toString.apply(n)==="[object Array]")return n;if(!r)return n.default||[];var o=n[r];return o||(o=n[this.getScriptPartFromCode(r)]),o||(o=n[this.formatLanguageCode(r)]),o||(o=n[this.getLanguagePartFromCode(r)]),o||(o=n.default),o||[]}},{key:"toResolveHierarchy",value:function(n,r){var o=this,a=this.getFallbackCodes(r||this.options.fallbackLng||[],n),i=[],s=function(c){c&&(o.isSupportedCode(c)?i.push(c):o.logger.warn("rejecting language code not found in supportedLngs: ".concat(c)))};return typeof n=="string"&&n.indexOf("-")>-1?(this.options.load!=="languageOnly"&&s(this.formatLanguageCode(n)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&s(this.getScriptPartFromCode(n)),this.options.load!=="currentOnly"&&s(this.getLanguagePartFromCode(n))):typeof n=="string"&&s(this.formatLanguageCode(n)),a.forEach(function(l){i.indexOf(l)<0&&s(o.formatLanguageCode(l))}),i}}]),e}(),ZN=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],eT={1:function(t){return+(t>1)},2:function(t){return+(t!=1)},3:function(t){return 0},4:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},5:function(t){return t==0?0:t==1?1:t==2?2:t%100>=3&&t%100<=10?3:t%100>=11?4:5},6:function(t){return t==1?0:t>=2&&t<=4?1:2},7:function(t){return t==1?0:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?1:2},8:function(t){return t==1?0:t==2?1:t!=8&&t!=11?2:3},9:function(t){return+(t>=2)},10:function(t){return t==1?0:t==2?1:t<7?2:t<11?3:4},11:function(t){return t==1||t==11?0:t==2||t==12?1:t>2&&t<20?2:3},12:function(t){return+(t%10!=1||t%100==11)},13:function(t){return+(t!==0)},14:function(t){return t==1?0:t==2?1:t==3?2:3},15:function(t){return t%10==1&&t%100!=11?0:t%10>=2&&(t%100<10||t%100>=20)?1:2},16:function(t){return t%10==1&&t%100!=11?0:t!==0?1:2},17:function(t){return t==1||t%10==1&&t%100!=11?0:1},18:function(t){return t==0?0:t==1?1:2},19:function(t){return t==1?0:t==0||t%100>1&&t%100<11?1:t%100>10&&t%100<20?2:3},20:function(t){return t==1?0:t==0||t%100>0&&t%100<20?1:2},21:function(t){return t%100==1?1:t%100==2?2:t%100==3||t%100==4?3:0},22:function(t){return t==1?0:t==2?1:(t<0||t>10)&&t%10==0?2:3}},tT=["v1","v2","v3"],Xd={zero:0,one:1,two:2,few:3,many:4,other:5};function nT(){var e={};return ZN.forEach(function(t){t.lngs.forEach(function(n){e[n]={numbers:t.nr,plurals:eT[t.fc]}})}),e}var rT=function(){function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};nt(this,e),this.languageUtils=t,this.options=n,this.logger=Xt.create("pluralResolver"),(!this.options.compatibilityJSON||this.options.compatibilityJSON==="v4")&&(typeof Intl>"u"||!Intl.PluralRules)&&(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=nT()}return rt(e,[{key:"addRule",value:function(n,r){this.rules[n]=r}},{key:"getRule",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(n,{type:r.ordinal?"ordinal":"cardinal"})}catch{return}return this.rules[n]||this.rules[this.languageUtils.getLanguagePartFromCode(n)]}},{key:"needsPlural",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=this.getRule(n,r);return this.shouldUseIntlApi()?o&&o.resolvedOptions().pluralCategories.length>1:o&&o.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.getSuffixes(n,o).map(function(a){return"".concat(r).concat(a)})}},{key:"getSuffixes",value:function(n){var r=this,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?a.resolvedOptions().pluralCategories.sort(function(i,s){return Xd[i]-Xd[s]}).map(function(i){return"".concat(r.options.prepend).concat(i)}):a.numbers.map(function(i){return r.getSuffix(n,i,o)}):[]}},{key:"getSuffix",value:function(n,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=this.getRule(n,o);return a?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(a.select(r)):this.getSuffixRetroCompatible(a,r):(this.logger.warn("no plural rule found for: ".concat(n)),"")}},{key:"getSuffixRetroCompatible",value:function(n,r){var o=this,a=n.noAbs?n.plurals(r):n.plurals(Math.abs(r)),i=n.numbers[a];this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1&&(i===2?i="plural":i===1&&(i=""));var s=function(){return o.options.prepend&&i.toString()?o.options.prepend+i.toString():i.toString()};return this.options.compatibilityJSON==="v1"?i===1?"":typeof i=="number"?"_plural_".concat(i.toString()):s():this.options.compatibilityJSON==="v2"||this.options.simplifyPluralSuffix&&n.numbers.length===2&&n.numbers[0]===1?s():this.options.prepend&&a.toString()?this.options.prepend+a.toString():a.toString()}},{key:"shouldUseIntlApi",value:function(){return!tT.includes(this.options.compatibilityJSON)}}]),e}();function Jd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function At(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Jd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var oT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=Xt.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(n){return n},this.init(t)}return rt(e,[{key:"init",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};n.interpolation||(n.interpolation={escapeValue:!0});var r=n.interpolation;this.escape=r.escape!==void 0?r.escape:WN,this.escapeValue=r.escapeValue!==void 0?r.escapeValue:!0,this.useRawValueToEscape=r.useRawValueToEscape!==void 0?r.useRawValueToEscape:!1,this.prefix=r.prefix?pr(r.prefix):r.prefixEscaped||"{{",this.suffix=r.suffix?pr(r.suffix):r.suffixEscaped||"}}",this.formatSeparator=r.formatSeparator?r.formatSeparator:r.formatSeparator||",",this.unescapePrefix=r.unescapeSuffix?"":r.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":r.unescapeSuffix||"",this.nestingPrefix=r.nestingPrefix?pr(r.nestingPrefix):r.nestingPrefixEscaped||pr("$t("),this.nestingSuffix=r.nestingSuffix?pr(r.nestingSuffix):r.nestingSuffixEscaped||pr(")"),this.nestingOptionsSeparator=r.nestingOptionsSeparator?r.nestingOptionsSeparator:r.nestingOptionsSeparator||",",this.maxReplaces=r.maxReplaces?r.maxReplaces:1e3,this.alwaysFormat=r.alwaysFormat!==void 0?r.alwaysFormat:!1,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var n="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(n,"g");var r="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(r,"g");var o="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(o,"g")}},{key:"interpolate",value:function(n,r,o,a){var i=this,s,l,c,u=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function d(b){return b.replace(/\$/g,"$$$$")}var f=function(y){if(y.indexOf(i.formatSeparator)<0){var S=Ud(r,u,y);return i.alwaysFormat?i.format(S,void 0,o,At(At(At({},a),r),{},{interpolationkey:y})):S}var E=y.split(i.formatSeparator),x=E.shift().trim(),v=E.join(i.formatSeparator).trim();return i.format(Ud(r,u,x),v,o,At(At(At({},a),r),{},{interpolationkey:x}))};this.resetRegExp();var p=a&&a.missingInterpolationHandler||this.options.missingInterpolationHandler,g=a&&a.interpolation&&a.interpolation.skipOnVariables!==void 0?a.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables,m=[{regex:this.regexpUnescape,safeValue:function(y){return d(y)}},{regex:this.regexp,safeValue:function(y){return i.escapeValue?d(i.escape(y)):d(y)}}];return m.forEach(function(b){for(c=0;s=b.regex.exec(n);){var y=s[1].trim();if(l=f(y),l===void 0)if(typeof p=="function"){var S=p(n,s,a);l=typeof S=="string"?S:""}else if(a&&a.hasOwnProperty(y))l="";else if(g){l=s[0];continue}else i.logger.warn("missed to pass in variable ".concat(y," for interpolating ").concat(n)),l="";else typeof l!="string"&&!i.useRawValueToEscape&&(l=Fd(l));var E=b.safeValue(l);if(n=n.replace(s[0],E),g?(b.regex.lastIndex+=l.length,b.regex.lastIndex-=s[0].length):b.regex.lastIndex=0,c++,c>=i.maxReplaces)break}}),n}},{key:"nest",value:function(n,r){var o=this,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,l;function c(p,g){var m=this.nestingOptionsSeparator;if(p.indexOf(m)<0)return p;var b=p.split(new RegExp("".concat(m,"[ ]*{"))),y="{".concat(b[1]);p=b[0],y=this.interpolate(y,l);var S=y.match(/'/g),E=y.match(/"/g);(S&&S.length%2===0&&!E||E.length%2!==0)&&(y=y.replace(/'/g,'"'));try{l=JSON.parse(y),g&&(l=At(At({},g),l))}catch(x){return this.logger.warn("failed parsing options string in nesting for key ".concat(p),x),"".concat(p).concat(m).concat(y)}return delete l.defaultValue,p}for(;i=this.nestingRegexp.exec(n);){var u=[];l=At({},a),l.applyPostProcessor=!1,delete l.defaultValue;var d=!1;if(i[0].indexOf(this.formatSeparator)!==-1&&!/{.*}/.test(i[1])){var f=i[1].split(this.formatSeparator).map(function(p){return p.trim()});i[1]=f.shift(),u=f,d=!0}if(s=r(c.call(this,i[1].trim(),l),l),s&&i[0]===n&&typeof s!="string")return s;typeof s!="string"&&(s=Fd(s)),s||(this.logger.warn("missed to resolve ".concat(i[1]," for nesting ").concat(n)),s=""),d&&(s=u.reduce(function(p,g){return o.format(p,g,a.lng,At(At({},a),{},{interpolationkey:i[1].trim()}))},s.trim())),n=n.replace(i[0],s),this.regexp.lastIndex=0}return n}}]),e}();function Qd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function On(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Qd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aT(e){var t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){var r=e.split("(");t=r[0].toLowerCase().trim();var o=r[1].substring(0,r[1].length-1);if(t==="currency"&&o.indexOf(":")<0)n.currency||(n.currency=o.trim());else if(t==="relativetime"&&o.indexOf(":")<0)n.range||(n.range=o.trim());else{var a=o.split(";");a.forEach(function(i){if(i){var s=i.split(":"),l=nv(s),c=l[0],u=l.slice(1),d=u.join(":").trim().replace(/^'+|'+$/g,"");n[c.trim()]||(n[c.trim()]=d),d==="false"&&(n[c.trim()]=!1),d==="true"&&(n[c.trim()]=!0),isNaN(d)||(n[c.trim()]=parseInt(d,10))}})}}return{formatName:t,formatOptions:n}}function hr(e){var t={};return function(r,o,a){var i=o+JSON.stringify(a),s=t[i];return s||(s=e(o,a),t[i]=s),s(r)}}var iT=function(){function e(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};nt(this,e),this.logger=Xt.create("formatter"),this.options=t,this.formats={number:hr(function(n,r){var o=new Intl.NumberFormat(n,r);return function(a){return o.format(a)}}),currency:hr(function(n,r){var o=new Intl.NumberFormat(n,On(On({},r),{},{style:"currency"}));return function(a){return o.format(a)}}),datetime:hr(function(n,r){var o=new Intl.DateTimeFormat(n,On({},r));return function(a){return o.format(a)}}),relativetime:hr(function(n,r){var o=new Intl.RelativeTimeFormat(n,On({},r));return function(a){return o.format(a,r.range||"day")}}),list:hr(function(n,r){var o=new Intl.ListFormat(n,On({},r));return function(a){return o.format(a)}})},this.init(t)}return rt(e,[{key:"init",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{interpolation:{}},o=r.interpolation;this.formatSeparator=o.formatSeparator?o.formatSeparator:o.formatSeparator||","}},{key:"add",value:function(n,r){this.formats[n.toLowerCase().trim()]=r}},{key:"addCached",value:function(n,r){this.formats[n.toLowerCase().trim()]=hr(r)}},{key:"format",value:function(n,r,o,a){var i=this,s=r.split(this.formatSeparator),l=s.reduce(function(c,u){var d=aT(u),f=d.formatName,p=d.formatOptions;if(i.formats[f]){var g=c;try{var m=a&&a.formatParams&&a.formatParams[a.interpolationkey]||{},b=m.locale||m.lng||a.locale||a.lng||o;g=i.formats[f](c,b,On(On(On({},p),a),m))}catch(y){i.logger.warn(y)}return g}else i.logger.warn("there was no format function for ".concat(f));return c},n);return l}}]),e}();function Zd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ef(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zd(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zd(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function sT(e){var t=lT();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function lT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function cT(e,t){e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)}var uT=function(e){Zr(n,e);var t=sT(n);function n(r,o,a){var i,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{};return nt(this,n),i=t.call(this),ji&&Pn.call(Jt(i)),i.backend=r,i.store=o,i.services=a,i.languageUtils=a.languageUtils,i.options=s,i.logger=Xt.create("backendConnector"),i.waitingReads=[],i.maxParallelReads=s.maxParallelReads||10,i.readingCalls=0,i.maxRetries=s.maxRetries>=0?s.maxRetries:5,i.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,i.state={},i.queue=[],i.backend&&i.backend.init&&i.backend.init(a,s.backend,s),i}return rt(n,[{key:"queueLoad",value:function(o,a,i,s){var l=this,c={},u={},d={},f={};return o.forEach(function(p){var g=!0;a.forEach(function(m){var b="".concat(p,"|").concat(m);!i.reload&&l.store.hasResourceBundle(p,m)?l.state[b]=2:l.state[b]<0||(l.state[b]===1?u[b]===void 0&&(u[b]=!0):(l.state[b]=1,g=!1,u[b]===void 0&&(u[b]=!0),c[b]===void 0&&(c[b]=!0),f[m]===void 0&&(f[m]=!0)))}),g||(d[p]=!0)}),(Object.keys(c).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:s}),{toLoad:Object.keys(c),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(f)}}},{key:"loaded",value:function(o,a,i){var s=o.split("|"),l=s[0],c=s[1];a&&this.emit("failedLoading",l,c,a),i&&this.store.addResourceBundle(l,c,i),this.state[o]=a?-1:2;var u={};this.queue.forEach(function(d){HN(d.loaded,[l],c),cT(d,o),a&&d.errors.push(a),d.pendingCount===0&&!d.done&&(Object.keys(d.loaded).forEach(function(f){u[f]||(u[f]={});var p=d.loaded[f];p.length&&p.forEach(function(g){u[f][g]===void 0&&(u[f][g]=!0)})}),d.done=!0,d.errors.length?d.callback(d.errors):d.callback())}),this.emit("loaded",u),this.queue=this.queue.filter(function(d){return!d.done})}},{key:"read",value:function(o,a,i){var s=this,l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,c=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.retryTimeout,u=arguments.length>5?arguments[5]:void 0;if(!o.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:a,fcName:i,tried:l,wait:c,callback:u});return}this.readingCalls++;var d=function(m,b){if(s.readingCalls--,s.waitingReads.length>0){var y=s.waitingReads.shift();s.read(y.lng,y.ns,y.fcName,y.tried,y.wait,y.callback)}if(m&&b&&l<s.maxRetries){setTimeout(function(){s.read.call(s,o,a,i,l+1,c*2,u)},c);return}u(m,b)},f=this.backend[i].bind(this.backend);if(f.length===2){try{var p=f(o,a);p&&typeof p.then=="function"?p.then(function(g){return d(null,g)}).catch(d):d(null,p)}catch(g){d(g)}return}return f(o,a,d)}},{key:"prepareLoading",value:function(o,a){var i=this,s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),l&&l();typeof o=="string"&&(o=this.languageUtils.toResolveHierarchy(o)),typeof a=="string"&&(a=[a]);var c=this.queueLoad(o,a,s,l);if(!c.toLoad.length)return c.pending.length||l(),null;c.toLoad.forEach(function(u){i.loadOne(u)})}},{key:"load",value:function(o,a,i){this.prepareLoading(o,a,{},i)}},{key:"reload",value:function(o,a,i){this.prepareLoading(o,a,{reload:!0},i)}},{key:"loadOne",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",s=o.split("|"),l=s[0],c=s[1];this.read(l,c,"read",void 0,void 0,function(u,d){u&&a.logger.warn("".concat(i,"loading namespace ").concat(c," for language ").concat(l," failed"),u),!u&&d&&a.logger.log("".concat(i,"loaded namespace ").concat(c," for language ").concat(l),d),a.loaded(o,u,d)})}},{key:"saveMissing",value:function(o,a,i,s,l){var c=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{},u=arguments.length>6&&arguments[6]!==void 0?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(a)){this.logger.warn('did not save key "'.concat(i,'" as the namespace "').concat(a,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(i==null||i==="")){if(this.backend&&this.backend.create){var d=ef(ef({},c),{},{isUpdate:l}),f=this.backend.create.bind(this.backend);if(f.length<6)try{var p;f.length===5?p=f(o,a,i,s,d):p=f(o,a,i,s),p&&typeof p.then=="function"?p.then(function(g){return u(null,g)}).catch(u):u(null,p)}catch(g){u(g)}else f(o,a,i,s,u,d)}!o||!o[0]||this.store.addResource(o[0],a,i,s)}}}]),n}(Pn);function tf(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(t){var n={};if(Oe(t[1])==="object"&&(n=t[1]),typeof t[1]=="string"&&(n.defaultValue=t[1]),typeof t[2]=="string"&&(n.tDescription=t[2]),Oe(t[2])==="object"||Oe(t[3])==="object"){var r=t[3]||t[2];Object.keys(r).forEach(function(o){n[o]=r[o]})}return n},interpolation:{escapeValue:!0,format:function(t,n,r,o){return t},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function nf(e){return typeof e.ns=="string"&&(e.ns=[e.ns]),typeof e.fallbackLng=="string"&&(e.fallbackLng=[e.fallbackLng]),typeof e.fallbackNS=="string"&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function rf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function qt(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?rf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):rf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function dT(e){var t=fT();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}function fT(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ta(){}function pT(e){var t=Object.getOwnPropertyNames(Object.getPrototypeOf(e));t.forEach(function(n){typeof e[n]=="function"&&(e[n]=e[n].bind(e))})}var li=function(e){Zr(n,e);var t=dT(n);function n(){var r,o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},a=arguments.length>1?arguments[1]:void 0;if(nt(this,n),r=t.call(this),ji&&Pn.call(Jt(r)),r.options=nf(o),r.services={},r.logger=Xt,r.modules={external:[]},pT(Jt(r)),a&&!r.isInitialized&&!o.isClone){if(!r.options.initImmediate)return r.init(o,a),eo(r,Jt(r));setTimeout(function(){r.init(o,a)},0)}return r}return rt(n,[{key:"init",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;typeof a=="function"&&(i=a,a={}),!a.defaultNS&&a.defaultNS!==!1&&a.ns&&(typeof a.ns=="string"?a.defaultNS=a.ns:a.ns.indexOf("translation")<0&&(a.defaultNS=a.ns[0]));var s=tf();this.options=qt(qt(qt({},s),this.options),nf(a)),this.options.compatibilityAPI!=="v1"&&(this.options.interpolation=qt(qt({},s.interpolation),this.options.interpolation)),a.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=a.keySeparator),a.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=a.nsSeparator);function l(y){return y?typeof y=="function"?new y:y:null}if(!this.options.isClone){this.modules.logger?Xt.init(l(this.modules.logger),this.options):Xt.init(null,this.options);var c;this.modules.formatter?c=this.modules.formatter:typeof Intl<"u"&&(c=iT);var u=new Yd(this.options);this.store=new XN(this.options.resources,this.options);var d=this.services;d.logger=Xt,d.resourceStore=this.store,d.languageUtils=u,d.pluralResolver=new rT(u,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),c&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(d.formatter=l(c),d.formatter.init(d,this.options),this.options.interpolation.format=d.formatter.format.bind(d.formatter)),d.interpolator=new oT(this.options),d.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},d.backendConnector=new uT(l(this.modules.backend),d.resourceStore,d,this.options),d.backendConnector.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),x=1;x<S;x++)E[x-1]=arguments[x];o.emit.apply(o,[y].concat(E))}),this.modules.languageDetector&&(d.languageDetector=l(this.modules.languageDetector),d.languageDetector.init(d,this.options.detection,this.options)),this.modules.i18nFormat&&(d.i18nFormat=l(this.modules.i18nFormat),d.i18nFormat.init&&d.i18nFormat.init(this)),this.translator=new qd(this.services,this.options),this.translator.on("*",function(y){for(var S=arguments.length,E=new Array(S>1?S-1:0),x=1;x<S;x++)E[x-1]=arguments[x];o.emit.apply(o,[y].concat(E))}),this.modules.external.forEach(function(y){y.init&&y.init(o)})}if(this.format=this.options.interpolation.format,i||(i=Ta),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){var f=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);f.length>0&&f[0]!=="dev"&&(this.options.lng=f[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined");var p=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];p.forEach(function(y){o[y]=function(){var S;return(S=o.store)[y].apply(S,arguments)}});var g=["addResource","addResources","addResourceBundle","removeResourceBundle"];g.forEach(function(y){o[y]=function(){var S;return(S=o.store)[y].apply(S,arguments),o}});var m=vo(),b=function(){var S=function(x,v){o.isInitialized&&!o.initializedStoreOnce&&o.logger.warn("init: i18next is already initialized. You should call init just once!"),o.isInitialized=!0,o.options.isClone||o.logger.log("initialized",o.options),o.emit("initialized",o.options),m.resolve(v),i(x,v)};if(o.languages&&o.options.compatibilityAPI!=="v1"&&!o.isInitialized)return S(null,o.t.bind(o));o.changeLanguage(o.options.lng,S)};return this.options.resources||!this.options.initImmediate?b():setTimeout(b,0),m}},{key:"loadResources",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta,s=i,l=typeof o=="string"?o:this.language;if(typeof o=="function"&&(s=o),!this.options.resources||this.options.partialBundledLanguages){if(l&&l.toLowerCase()==="cimode")return s();var c=[],u=function(p){if(p){var g=a.services.languageUtils.toResolveHierarchy(p);g.forEach(function(m){c.indexOf(m)<0&&c.push(m)})}};if(l)u(l);else{var d=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);d.forEach(function(f){return u(f)})}this.options.preload&&this.options.preload.forEach(function(f){return u(f)}),this.services.backendConnector.load(c,this.options.ns,function(f){!f&&!a.resolvedLanguage&&a.language&&a.setResolvedLanguage(a.language),s(f)})}else s(null)}},{key:"reloadResources",value:function(o,a,i){var s=vo();return o||(o=this.languages),a||(a=this.options.ns),i||(i=Ta),this.services.backendConnector.reload(o,a,function(l){s.resolve(),i(l)}),s}},{key:"use",value:function(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&av.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}},{key:"setResolvedLanguage",value:function(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1))for(var a=0;a<this.languages.length;a++){var i=this.languages[a];if(!(["cimode","dev"].indexOf(i)>-1)&&this.store.hasLanguageSomeTranslations(i)){this.resolvedLanguage=i;break}}}},{key:"changeLanguage",value:function(o,a){var i=this;this.isLanguageChangingTo=o;var s=vo();this.emit("languageChanging",o);var l=function(f){i.language=f,i.languages=i.services.languageUtils.toResolveHierarchy(f),i.resolvedLanguage=void 0,i.setResolvedLanguage(f)},c=function(f,p){p?(l(p),i.translator.changeLanguage(p),i.isLanguageChangingTo=void 0,i.emit("languageChanged",p),i.logger.log("languageChanged",p)):i.isLanguageChangingTo=void 0,s.resolve(function(){return i.t.apply(i,arguments)}),a&&a(f,function(){return i.t.apply(i,arguments)})},u=function(f){!o&&!f&&i.services.languageDetector&&(f=[]);var p=typeof f=="string"?f:i.services.languageUtils.getBestMatchFromCodes(f);p&&(i.language||l(p),i.translator.language||i.translator.changeLanguage(p),i.services.languageDetector&&i.services.languageDetector.cacheUserLanguage(p)),i.loadResources(p,function(g){c(g,p)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect(u):u(o),s}},{key:"getFixedT",value:function(o,a,i){var s=this,l=function c(u,d){var f;if(Oe(d)!=="object"){for(var p=arguments.length,g=new Array(p>2?p-2:0),m=2;m<p;m++)g[m-2]=arguments[m];f=s.options.overloadTranslationOptionHandler([u,d].concat(g))}else f=qt({},d);f.lng=f.lng||c.lng,f.lngs=f.lngs||c.lngs,f.ns=f.ns||c.ns,f.keyPrefix=f.keyPrefix||i||c.keyPrefix;var b=s.options.keySeparator||".",y=f.keyPrefix?"".concat(f.keyPrefix).concat(b).concat(u):u;return s.t(y,f)};return typeof o=="string"?l.lng=o:l.lngs=o,l.ns=a,l.keyPrefix=i,l}},{key:"t",value:function(){var o;return this.translator&&(o=this.translator).translate.apply(o,arguments)}},{key:"exists",value:function(){var o;return this.translator&&(o=this.translator).exists.apply(o,arguments)}},{key:"setDefaultNamespace",value:function(o){this.options.defaultNS=o}},{key:"hasLoadedNamespace",value:function(o){var a=this,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var s=this.resolvedLanguage||this.languages[0],l=this.options?this.options.fallbackLng:!1,c=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;var u=function(p,g){var m=a.services.backendConnector.state["".concat(p,"|").concat(g)];return m===-1||m===2};if(i.precheck){var d=i.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,o)&&(!l||u(c,o)))}},{key:"loadNamespaces",value:function(o,a){var i=this,s=vo();return this.options.ns?(typeof o=="string"&&(o=[o]),o.forEach(function(l){i.options.ns.indexOf(l)<0&&i.options.ns.push(l)}),this.loadResources(function(l){s.resolve(),a&&a(l)}),s):(a&&a(),Promise.resolve())}},{key:"loadLanguages",value:function(o,a){var i=vo();typeof o=="string"&&(o=[o]);var s=this.options.preload||[],l=o.filter(function(c){return s.indexOf(c)<0});return l.length?(this.options.preload=s.concat(l),this.loadResources(function(c){i.resolve(),a&&a(c)}),i):(a&&a(),Promise.resolve())}},{key:"dir",value:function(o){if(o||(o=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!o)return"rtl";var a=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],i=this.services&&this.services.languageUtils||new Yd(tf());return a.indexOf(i.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var o=this,a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ta,s=qt(qt(qt({},this.options),a),{isClone:!0}),l=new n(s);(a.debug!==void 0||a.prefix!==void 0)&&(l.logger=l.logger.clone(a));var c=["store","services","language"];return c.forEach(function(u){l[u]=o[u]}),l.services=qt({},this.services),l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l.translator=new qd(l.services,l.options),l.translator.on("*",function(u){for(var d=arguments.length,f=new Array(d>1?d-1:0),p=1;p<d;p++)f[p-1]=arguments[p];l.emit.apply(l,[u].concat(f))}),l.init(s,i),l.translator.options=l.options,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}},{key:"toJSON",value:function(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}]),n}(Pn);ae(li,"createInstance",function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new li(e,t)});var Qe=li.createInstance();Qe.createInstance=li.createInstance;Qe.createInstance;Qe.dir;Qe.init;Qe.loadResources;Qe.reloadResources;Qe.use;Qe.changeLanguage;Qe.getFixedT;Qe.t;Qe.exists;Qe.setDefaultNamespace;Qe.hasLoadedNamespace;Qe.loadNamespaces;Qe.loadLanguages;function hT(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];typeof n[0]=="string"&&(n[0]="react-i18next:: ".concat(n[0])),(e=console).warn.apply(e,n)}}var of={};function hl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];typeof t[0]=="string"&&of[t[0]]||(typeof t[0]=="string"&&(of[t[0]]=new Date),hT.apply(void 0,t))}function af(e,t,n){e.loadNamespaces(t,function(){if(e.isInitialized)n();else{var r=function o(){setTimeout(function(){e.off("initialized",o)},0),n()};e.on("initialized",r)}})}function gT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=t.languages[0],o=t.options?t.options.fallbackLng:!1,a=t.languages[t.languages.length-1];if(r.toLowerCase()==="cimode")return!0;var i=function(l,c){var u=t.services.backendConnector.state["".concat(l,"|").concat(c)];return u===-1||u===2};return n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!i(t.isLanguageChangingTo,e)?!1:!!(t.hasResourceBundle(r,e)||!t.services.backendConnector.backend||t.options.resources&&!t.options.partialBundledLanguages||i(r,e)&&(!o||i(a,e)))}function vT(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};if(!t.languages||!t.languages.length)return hl("i18n.languages were undefined or empty",t.languages),!0;var r=t.options.ignoreJSONStructure!==void 0;return r?t.hasLoadedNamespace(e,{precheck:function(a,i){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&a.services.backendConnector.backend&&a.isLanguageChangingTo&&!i(a.isLanguageChangingTo,e))return!1}}):gT(e,t,n)}function mT(e){return e.displayName||e.name||(typeof e=="string"&&e.length>0?e:"Unknown")}var yT=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,bT={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},wT=function(t){return bT[t]},ST=function(t){return t.replace(yT,wT)};function sf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function lf(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?sf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):sf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var gl={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:ST};function xT(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};gl=lf(lf({},gl),e)}function CT(){return gl}var iv;function OT(e){iv=e}function ET(){return iv}var _T={type:"3rdParty",init:function(t){xT(t.options.react),OT(t)}},RT=h.createContext(),NT=function(){function e(){nt(this,e),this.usedNamespaces={}}return rt(e,[{key:"addUsedNamespaces",value:function(n){var r=this;n.forEach(function(o){r.usedNamespaces[o]||(r.usedNamespaces[o]=!0)})}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();function cf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function hs(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?cf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):cf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}var TT=function(t,n){var r=h.useRef();return h.useEffect(function(){r.current=n?r.current:t},[t,n]),r.current};function PT(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.i18n,r=h.useContext(RT)||{},o=r.i18n,a=r.defaultNS,i=n||o||ET();if(i&&!i.reportNamespaces&&(i.reportNamespaces=new NT),!i){hl("You will need to pass in an i18next instance by using initReactI18next");var s=function(N){return Array.isArray(N)?N[N.length-1]:N},l=[s,{},!1];return l.t=s,l.i18n={},l.ready=!1,l}i.options.react&&i.options.react.wait!==void 0&&hl("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var c=hs(hs(hs({},CT()),i.options.react),t),u=c.useSuspense,d=c.keyPrefix,f=e||a||i.options&&i.options.defaultNS;f=typeof f=="string"?[f]:f||["translation"],i.reportNamespaces.addUsedNamespaces&&i.reportNamespaces.addUsedNamespaces(f);var p=(i.isInitialized||i.initializedStoreOnce)&&f.every(function(R){return vT(R,i,c)});function g(){return i.getFixedT(null,c.nsMode==="fallback"?f:f[0],d)}var m=h.useState(g),b=Ce(m,2),y=b[0],S=b[1],E=f.join(),x=TT(E),v=h.useRef(!0);h.useEffect(function(){var R=c.bindI18n,N=c.bindI18nStore;v.current=!0,!p&&!u&&af(i,f,function(){v.current&&S(g)}),p&&x&&x!==E&&v.current&&S(g);function T(){v.current&&S(g)}return R&&i&&i.on(R,T),N&&i&&i.store.on(N,T),function(){v.current=!1,R&&i&&R.split(" ").forEach(function(M){return i.off(M,T)}),N&&i&&N.split(" ").forEach(function(M){return i.store.off(M,T)})}},[i,E]);var C=h.useRef(!0);h.useEffect(function(){v.current&&!C.current&&S(g),C.current=!1},[i,d]);var O=[y,i,p];if(O.t=y,O.i18n=i,O.ready=p,p||!p&&!u)return O;throw new Promise(function(R){af(i,f,function(){R()})})}var kT=["forwardedRef"];function uf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Pa(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?uf(Object(n),!0).forEach(function(r){ae(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):uf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function Ir(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return function(r){function o(i){var s=i.forwardedRef,l=Rr(i,kT),c=PT(e,Pa(Pa({},l),{},{keyPrefix:t.keyPrefix})),u=Ce(c,3),d=u[0],f=u[1],p=u[2],g=Pa(Pa({},l),{},{t:d,i18n:f,tReady:p});return t.withRef&&s?g.ref=s:!t.withRef&&s&&(g.forwardedRef=s),h.createElement(r,g)}o.displayName="withI18nextTranslation(".concat(mT(r),")"),o.WrappedComponent=r;var a=function(s,l){return h.createElement(o,Object.assign({},s,{forwardedRef:l}))};return t.withRef?h.forwardRef(a):o}}const jT={translation:{"Welcome to React":"欢迎使用 React"}},MT={translation:{"Welcome to React":"Welcome to React and react-i18next"}},AT={zh_CN:jT,en_US:MT};Qe.use(_T).init({resources:AT,lng:"zh_CN",react:{bindI18n:"added languageChanged",bindI18nStore:"added"}});const sv=Qe;sv.update=()=>{setTimeout(()=>{Qe.emit("added")},0)};class DT{constructor({getWorkbench:t,emitter:n,pageModel:r,i18n:o,assets:a,engine:i}){B(this,"plugins",new Map);B(this,"emitter",ei());B(this,"getWorkbench");B(this,"pageModel");B(this,"i18n");B(this,"assets");B(this,"engine");B(this,"customPluginHooks",{});B(this,"customPlugin",(t,n)=>{const r=this.customPluginHooks,o=r[t]||[];o.push(n),r[t]=o,this.customPluginHooks=r});B(this,"createPluginCtx",()=>({globalEmitter:this.emitter,emitter:ei(),config:{},getWorkbench:this.getWorkbench,pluginManager:this,pageModel:this.pageModel,i18n:this.i18n,assets:this.assets,engine:this.engine,pluginReadyOk:()=>{}}));this.getWorkbench=t,this.emitter=n,this.pageModel=r,this.i18n=o,this.assets=a,this.engine=i}async add(t){var i;const n=this.createPluginCtx();let r;typeof t=="function"?r=t(n):r=t;let o={source:r,ctx:n,export:((i=r.export)==null?void 0:i.call(r,n))||{},ready:!1};(this.customPluginHooks[r.name]||[]).forEach(s=>{o=s(o)}),n.pluginReadyOk=()=>{this.emitter.emit(`${r.name}:ready`),o.ready=!0},this.plugins.set(r.name,o),await r.init(n)}async get(t){const n=this.plugins.get(t);return n!=null&&n.ready||await this.onPluginReadyOk(t),n}async remove(t){const n=this.plugins.get(t);await(n==null?void 0:n.source.destroy(n.ctx)),this.plugins.delete(t)}onPluginReadyOk(t,n){const r=this.plugins.get(t);if(!(r!=null&&r.ready))return r===void 0&&console.warn(`plugin: ${t} not found.`),new Promise(o=>{this.emitter.on(`${t}:ready`,()=>{r&&(r.ready=!0,n==null||n(r),o(r))})})}}const $T={pluginName:"组件库"},IT={pluginName:"Component Store"},df={zh_CN:$T,en_US:IT},LT="_container_191p3_2",BT="_tabTitle_191p3_23",lv={container:LT,tabTitle:BT},zT="_square_1b87f_2",VT="_componentItem_1b87f_18",FT="_iconImg_1b87f_41",HT="_iconBox_1b87f_45",UT="_iconText_1b87f_54",mo={square:zT,componentItem:VT,iconImg:FT,iconBox:HT,iconText:UT},WT=e=>{const t={[cv]:e.id},n=h.useMemo(()=>e.iconText?w("div",{className:mo.iconText,children:String(e.iconText).toUpperCase()}):typeof e.icon=="string"?w("img",{className:mo.iconImg,src:e.icon,draggable:!1}):e.icon,[e.icon]),r=w("div",{className:dt([mo.square,e.containerClassName]),children:te("div",{...t,className:mo.componentItem,style:e.style,children:[w("div",{className:mo.iconBox,children:n}),w("span",{children:e.name})]})});return e.description?w(Y.Popover,{overlayInnerStyle:{maxWidth:"300px",maxHeight:"200px",overflow:"auto"},content:e.description||"",zIndex:1e3,placement:"right",children:r}):r},cv="data-drag-key",GT="_ListBox_1q7zr_2",KT="_collapsePanel_1q7zr_23",ff={ListBox:GT,collapsePanel:KT},qT=e=>{const{dataSource:t}=e,n=t.map(o=>o.name||"");if(!t.length)return null;const r=h.useMemo(()=>t.map(o=>{const a=o.name||"",i=w("div",{className:ff.collapsePanel,children:o.list.map(s=>w(WT,{id:s.id,name:s.title,icon:s.snapshot||s.snapshotText,iconText:s.snapshotText,description:s.description||""},s.id))});return{key:a,label:a,children:i}}),[]);return w("div",{className:ff.ListBox,children:w(Y.Collapse,{style:{width:"100%"},defaultActiveKey:n,items:r})})},uv=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||uv(e.parentElement,t)};var YT=typeof global=="object"&&global&&global.Object===Object&&global;const dv=YT;var XT=typeof self=="object"&&self&&self.Object===Object&&self,JT=dv||XT||Function("return this")();const rn=JT;var QT=rn.Symbol;const kn=QT;var fv=Object.prototype,ZT=fv.hasOwnProperty,eP=fv.toString,yo=kn?kn.toStringTag:void 0;function tP(e){var t=ZT.call(e,yo),n=e[yo];try{e[yo]=void 0;var r=!0}catch{}var o=eP.call(e);return r&&(t?e[yo]=n:delete e[yo]),o}var nP=Object.prototype,rP=nP.toString;function oP(e){return rP.call(e)}var aP="[object Null]",iP="[object Undefined]",pf=kn?kn.toStringTag:void 0;function ar(e){return e==null?e===void 0?iP:aP:pf&&pf in Object(e)?tP(e):oP(e)}function ir(e){return e!=null&&typeof e=="object"}var sP="[object Symbol]";function lP(e){return typeof e=="symbol"||ir(e)&&ar(e)==sP}function cP(e,t){for(var n=-1,r=e==null?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}var uP=Array.isArray;const Mi=uP;var dP=1/0,hf=kn?kn.prototype:void 0,gf=hf?hf.toString:void 0;function pv(e){if(typeof e=="string")return e;if(Mi(e))return cP(e,pv)+"";if(lP(e))return gf?gf.call(e):"";var t=e+"";return t=="0"&&1/e==-dP?"-0":t}function na(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var fP="[object AsyncFunction]",pP="[object Function]",hP="[object GeneratorFunction]",gP="[object Proxy]";function hv(e){if(!na(e))return!1;var t=ar(e);return t==pP||t==hP||t==fP||t==gP}var vP=rn["__core-js_shared__"];const gs=vP;var vf=function(){var e=/[^.]+$/.exec(gs&&gs.keys&&gs.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function mP(e){return!!vf&&vf in e}var yP=Function.prototype,bP=yP.toString;function sr(e){if(e!=null){try{return bP.call(e)}catch{}try{return e+""}catch{}}return""}var wP=/[\\^$.*+?()[\]{}|]/g,SP=/^\[object .+?Constructor\]$/,xP=Function.prototype,CP=Object.prototype,OP=xP.toString,EP=CP.hasOwnProperty,_P=RegExp("^"+OP.call(EP).replace(wP,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function RP(e){if(!na(e)||mP(e))return!1;var t=hv(e)?_P:SP;return t.test(sr(e))}function NP(e,t){return e==null?void 0:e[t]}function lr(e,t){var n=NP(e,t);return RP(n)?n:void 0}var TP=lr(rn,"WeakMap");const vl=TP;var mf=Object.create,PP=function(){function e(){}return function(t){if(!na(t))return{};if(mf)return mf(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();const kP=PP;function jP(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}var MP=function(){try{var e=lr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const yf=MP;function AP(e,t){for(var n=-1,r=e==null?0:e.length;++n<r&&t(e[n],n,e)!==!1;);return e}var DP=9007199254740991,$P=/^(?:0|[1-9]\d*)$/;function IP(e,t){var n=typeof e;return t=t??DP,!!t&&(n=="number"||n!="symbol"&&$P.test(e))&&e>-1&&e%1==0&&e<t}function gv(e,t,n){t=="__proto__"&&yf?yf(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function vv(e,t){return e===t||e!==e&&t!==t}var LP=Object.prototype,BP=LP.hasOwnProperty;function mv(e,t,n){var r=e[t];(!(BP.call(e,t)&&vv(r,n))||n===void 0&&!(t in e))&&gv(e,t,n)}function Ai(e,t,n,r){var o=!n;n||(n={});for(var a=-1,i=t.length;++a<i;){var s=t[a],l=r?r(n[s],e[s],s,n,e):void 0;l===void 0&&(l=e[s]),o?gv(n,s,l):mv(n,s,l)}return n}var zP=9007199254740991;function yv(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=zP}function bv(e){return e!=null&&yv(e.length)&&!hv(e)}var VP=Object.prototype;function Bc(e){var t=e&&e.constructor,n=typeof t=="function"&&t.prototype||VP;return e===n}function FP(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var HP="[object Arguments]";function bf(e){return ir(e)&&ar(e)==HP}var wv=Object.prototype,UP=wv.hasOwnProperty,WP=wv.propertyIsEnumerable,GP=bf(function(){return arguments}())?bf:function(e){return ir(e)&&UP.call(e,"callee")&&!WP.call(e,"callee")};const KP=GP;function qP(){return!1}var Sv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wf=Sv&&typeof module=="object"&&module&&!module.nodeType&&module,YP=wf&&wf.exports===Sv,Sf=YP?rn.Buffer:void 0,XP=Sf?Sf.isBuffer:void 0,JP=XP||qP;const xv=JP;var QP="[object Arguments]",ZP="[object Array]",ek="[object Boolean]",tk="[object Date]",nk="[object Error]",rk="[object Function]",ok="[object Map]",ak="[object Number]",ik="[object Object]",sk="[object RegExp]",lk="[object Set]",ck="[object String]",uk="[object WeakMap]",dk="[object ArrayBuffer]",fk="[object DataView]",pk="[object Float32Array]",hk="[object Float64Array]",gk="[object Int8Array]",vk="[object Int16Array]",mk="[object Int32Array]",yk="[object Uint8Array]",bk="[object Uint8ClampedArray]",wk="[object Uint16Array]",Sk="[object Uint32Array]",Ne={};Ne[pk]=Ne[hk]=Ne[gk]=Ne[vk]=Ne[mk]=Ne[yk]=Ne[bk]=Ne[wk]=Ne[Sk]=!0;Ne[QP]=Ne[ZP]=Ne[dk]=Ne[ek]=Ne[fk]=Ne[tk]=Ne[nk]=Ne[rk]=Ne[ok]=Ne[ak]=Ne[ik]=Ne[sk]=Ne[lk]=Ne[ck]=Ne[uk]=!1;function xk(e){return ir(e)&&yv(e.length)&&!!Ne[ar(e)]}function zc(e){return function(t){return e(t)}}var Cv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,No=Cv&&typeof module=="object"&&module&&!module.nodeType&&module,Ck=No&&No.exports===Cv,vs=Ck&&dv.process,Ok=function(){try{var e=No&&No.require&&No.require("util").types;return e||vs&&vs.binding&&vs.binding("util")}catch{}}();const Lr=Ok;var xf=Lr&&Lr.isTypedArray,Ek=xf?zc(xf):xk;const _k=Ek;var Rk=Object.prototype,Nk=Rk.hasOwnProperty;function Ov(e,t){var n=Mi(e),r=!n&&KP(e),o=!n&&!r&&xv(e),a=!n&&!r&&!o&&_k(e),i=n||r||o||a,s=i?FP(e.length,String):[],l=s.length;for(var c in e)(t||Nk.call(e,c))&&!(i&&(c=="length"||o&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||IP(c,l)))&&s.push(c);return s}function Ev(e,t){return function(n){return e(t(n))}}var Tk=Ev(Object.keys,Object);const Pk=Tk;var kk=Object.prototype,jk=kk.hasOwnProperty;function Mk(e){if(!Bc(e))return Pk(e);var t=[];for(var n in Object(e))jk.call(e,n)&&n!="constructor"&&t.push(n);return t}function Vc(e){return bv(e)?Ov(e):Mk(e)}function Ak(e){var t=[];if(e!=null)for(var n in Object(e))t.push(n);return t}var Dk=Object.prototype,$k=Dk.hasOwnProperty;function Ik(e){if(!na(e))return Ak(e);var t=Bc(e),n=[];for(var r in e)r=="constructor"&&(t||!$k.call(e,r))||n.push(r);return n}function Fc(e){return bv(e)?Ov(e,!0):Ik(e)}var Lk=lr(Object,"create");const Uo=Lk;function Bk(){this.__data__=Uo?Uo(null):{},this.size=0}function zk(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Vk="__lodash_hash_undefined__",Fk=Object.prototype,Hk=Fk.hasOwnProperty;function Uk(e){var t=this.__data__;if(Uo){var n=t[e];return n===Vk?void 0:n}return Hk.call(t,e)?t[e]:void 0}var Wk=Object.prototype,Gk=Wk.hasOwnProperty;function Kk(e){var t=this.__data__;return Uo?t[e]!==void 0:Gk.call(t,e)}var qk="__lodash_hash_undefined__";function Yk(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=Uo&&t===void 0?qk:t,this}function er(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}er.prototype.clear=Bk;er.prototype.delete=zk;er.prototype.get=Uk;er.prototype.has=Kk;er.prototype.set=Yk;function Xk(){this.__data__=[],this.size=0}function Di(e,t){for(var n=e.length;n--;)if(vv(e[n][0],t))return n;return-1}var Jk=Array.prototype,Qk=Jk.splice;function Zk(e){var t=this.__data__,n=Di(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():Qk.call(t,n,1),--this.size,!0}function ej(e){var t=this.__data__,n=Di(t,e);return n<0?void 0:t[n][1]}function tj(e){return Di(this.__data__,e)>-1}function nj(e,t){var n=this.__data__,r=Di(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}function Sn(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Sn.prototype.clear=Xk;Sn.prototype.delete=Zk;Sn.prototype.get=ej;Sn.prototype.has=tj;Sn.prototype.set=nj;var rj=lr(rn,"Map");const Wo=rj;function oj(){this.size=0,this.__data__={hash:new er,map:new(Wo||Sn),string:new er}}function aj(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $i(e,t){var n=e.__data__;return aj(t)?n[typeof t=="string"?"string":"hash"]:n.map}function ij(e){var t=$i(this,e).delete(e);return this.size-=t?1:0,t}function sj(e){return $i(this,e).get(e)}function lj(e){return $i(this,e).has(e)}function cj(e,t){var n=$i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}function to(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}to.prototype.clear=oj;to.prototype.delete=ij;to.prototype.get=sj;to.prototype.has=lj;to.prototype.set=cj;function _v(e){return e==null?"":pv(e)}function Rv(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}var uj=Ev(Object.getPrototypeOf,Object);const Hc=uj;var dj="[object Object]",fj=Function.prototype,pj=Object.prototype,Nv=fj.toString,hj=pj.hasOwnProperty,gj=Nv.call(Object);function Ii(e){if(!ir(e)||ar(e)!=dj)return!1;var t=Hc(e);if(t===null)return!0;var n=hj.call(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Nv.call(n)==gj}function vj(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),n=n>o?o:n,n<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(o);++r<o;)a[r]=e[r+t];return a}function mj(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:vj(e,t,n)}var yj="\\ud800-\\udfff",bj="\\u0300-\\u036f",wj="\\ufe20-\\ufe2f",Sj="\\u20d0-\\u20ff",xj=bj+wj+Sj,Cj="\\ufe0e\\ufe0f",Oj="\\u200d",Ej=RegExp("["+Oj+yj+xj+Cj+"]");function Tv(e){return Ej.test(e)}function _j(e){return e.split("")}var Pv="\\ud800-\\udfff",Rj="\\u0300-\\u036f",Nj="\\ufe20-\\ufe2f",Tj="\\u20d0-\\u20ff",Pj=Rj+Nj+Tj,kj="\\ufe0e\\ufe0f",jj="["+Pv+"]",ml="["+Pj+"]",yl="\\ud83c[\\udffb-\\udfff]",Mj="(?:"+ml+"|"+yl+")",kv="[^"+Pv+"]",jv="(?:\\ud83c[\\udde6-\\uddff]){2}",Mv="[\\ud800-\\udbff][\\udc00-\\udfff]",Aj="\\u200d",Av=Mj+"?",Dv="["+kj+"]?",Dj="(?:"+Aj+"(?:"+[kv,jv,Mv].join("|")+")"+Dv+Av+")*",$j=Dv+Av+Dj,Ij="(?:"+[kv+ml+"?",ml,jv,Mv,jj].join("|")+")",Lj=RegExp(yl+"(?="+yl+")|"+Ij+$j,"g");function Bj(e){return e.match(Lj)||[]}function zj(e){return Tv(e)?Bj(e):_j(e)}function Vj(e){return function(t){t=_v(t);var n=Tv(t)?zj(t):void 0,r=n?n[0]:t.charAt(0),o=n?mj(n,1).join(""):t.slice(1);return r[e]()+o}}var Fj=Vj("toUpperCase");const Hj=Fj;function $v(e){return Hj(_v(e).toLowerCase())}function Uj(){this.__data__=new Sn,this.size=0}function Wj(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}function Gj(e){return this.__data__.get(e)}function Kj(e){return this.__data__.has(e)}var qj=200;function Yj(e,t){var n=this.__data__;if(n instanceof Sn){var r=n.__data__;if(!Wo||r.length<qj-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new to(r)}return n.set(e,t),this.size=n.size,this}function no(e){var t=this.__data__=new Sn(e);this.size=t.size}no.prototype.clear=Uj;no.prototype.delete=Wj;no.prototype.get=Gj;no.prototype.has=Kj;no.prototype.set=Yj;function Xj(e,t){return e&&Ai(t,Vc(t),e)}function Jj(e,t){return e&&Ai(t,Fc(t),e)}var Iv=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cf=Iv&&typeof module=="object"&&module&&!module.nodeType&&module,Qj=Cf&&Cf.exports===Iv,Of=Qj?rn.Buffer:void 0,Ef=Of?Of.allocUnsafe:void 0;function Zj(e,t){if(t)return e.slice();var n=e.length,r=Ef?Ef(n):new e.constructor(n);return e.copy(r),r}function eM(e,t){for(var n=-1,r=e==null?0:e.length,o=0,a=[];++n<r;){var i=e[n];t(i,n,e)&&(a[o++]=i)}return a}function Lv(){return[]}var tM=Object.prototype,nM=tM.propertyIsEnumerable,_f=Object.getOwnPropertySymbols,rM=_f?function(e){return e==null?[]:(e=Object(e),eM(_f(e),function(t){return nM.call(e,t)}))}:Lv;const Uc=rM;function oM(e,t){return Ai(e,Uc(e),t)}var aM=Object.getOwnPropertySymbols,iM=aM?function(e){for(var t=[];e;)Rv(t,Uc(e)),e=Hc(e);return t}:Lv;const Bv=iM;function sM(e,t){return Ai(e,Bv(e),t)}function zv(e,t,n){var r=t(e);return Mi(e)?r:Rv(r,n(e))}function lM(e){return zv(e,Vc,Uc)}function cM(e){return zv(e,Fc,Bv)}var uM=lr(rn,"DataView");const bl=uM;var dM=lr(rn,"Promise");const wl=dM;var fM=lr(rn,"Set");const Sl=fM;var Rf="[object Map]",pM="[object Object]",Nf="[object Promise]",Tf="[object Set]",Pf="[object WeakMap]",kf="[object DataView]",hM=sr(bl),gM=sr(Wo),vM=sr(wl),mM=sr(Sl),yM=sr(vl),Hn=ar;(bl&&Hn(new bl(new ArrayBuffer(1)))!=kf||Wo&&Hn(new Wo)!=Rf||wl&&Hn(wl.resolve())!=Nf||Sl&&Hn(new Sl)!=Tf||vl&&Hn(new vl)!=Pf)&&(Hn=function(e){var t=ar(e),n=t==pM?e.constructor:void 0,r=n?sr(n):"";if(r)switch(r){case hM:return kf;case gM:return Rf;case vM:return Nf;case mM:return Tf;case yM:return Pf}return t});const Wc=Hn;var bM=Object.prototype,wM=bM.hasOwnProperty;function SM(e){var t=e.length,n=new e.constructor(t);return t&&typeof e[0]=="string"&&wM.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var xM=rn.Uint8Array;const jf=xM;function Gc(e){var t=new e.constructor(e.byteLength);return new jf(t).set(new jf(e)),t}function CM(e,t){var n=t?Gc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var OM=/\w*$/;function EM(e){var t=new e.constructor(e.source,OM.exec(e));return t.lastIndex=e.lastIndex,t}var Mf=kn?kn.prototype:void 0,Af=Mf?Mf.valueOf:void 0;function _M(e){return Af?Object(Af.call(e)):{}}function RM(e,t){var n=t?Gc(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var NM="[object Boolean]",TM="[object Date]",PM="[object Map]",kM="[object Number]",jM="[object RegExp]",MM="[object Set]",AM="[object String]",DM="[object Symbol]",$M="[object ArrayBuffer]",IM="[object DataView]",LM="[object Float32Array]",BM="[object Float64Array]",zM="[object Int8Array]",VM="[object Int16Array]",FM="[object Int32Array]",HM="[object Uint8Array]",UM="[object Uint8ClampedArray]",WM="[object Uint16Array]",GM="[object Uint32Array]";function KM(e,t,n){var r=e.constructor;switch(t){case $M:return Gc(e);case NM:case TM:return new r(+e);case IM:return CM(e,n);case LM:case BM:case zM:case VM:case FM:case HM:case UM:case WM:case GM:return RM(e,n);case PM:return new r;case kM:case AM:return new r(e);case jM:return EM(e);case MM:return new r;case DM:return _M(e)}}function qM(e){return typeof e.constructor=="function"&&!Bc(e)?kP(Hc(e)):{}}var YM="[object Map]";function XM(e){return ir(e)&&Wc(e)==YM}var Df=Lr&&Lr.isMap,JM=Df?zc(Df):XM;const QM=JM;var ZM="[object Set]";function eA(e){return ir(e)&&Wc(e)==ZM}var $f=Lr&&Lr.isSet,tA=$f?zc($f):eA;const nA=tA;var rA=1,oA=2,aA=4,Vv="[object Arguments]",iA="[object Array]",sA="[object Boolean]",lA="[object Date]",cA="[object Error]",Fv="[object Function]",uA="[object GeneratorFunction]",dA="[object Map]",fA="[object Number]",Hv="[object Object]",pA="[object RegExp]",hA="[object Set]",gA="[object String]",vA="[object Symbol]",mA="[object WeakMap]",yA="[object ArrayBuffer]",bA="[object DataView]",wA="[object Float32Array]",SA="[object Float64Array]",xA="[object Int8Array]",CA="[object Int16Array]",OA="[object Int32Array]",EA="[object Uint8Array]",_A="[object Uint8ClampedArray]",RA="[object Uint16Array]",NA="[object Uint32Array]",xe={};xe[Vv]=xe[iA]=xe[yA]=xe[bA]=xe[sA]=xe[lA]=xe[wA]=xe[SA]=xe[xA]=xe[CA]=xe[OA]=xe[dA]=xe[fA]=xe[Hv]=xe[pA]=xe[hA]=xe[gA]=xe[vA]=xe[EA]=xe[_A]=xe[RA]=xe[NA]=!0;xe[cA]=xe[Fv]=xe[mA]=!1;function Ga(e,t,n,r,o,a){var i,s=t&rA,l=t&oA,c=t&aA;if(n&&(i=o?n(e,r,o,a):n(e)),i!==void 0)return i;if(!na(e))return e;var u=Mi(e);if(u){if(i=SM(e),!s)return jP(e,i)}else{var d=Wc(e),f=d==Fv||d==uA;if(xv(e))return Zj(e,s);if(d==Hv||d==Vv||f&&!o){if(i=l||f?{}:qM(e),!s)return l?sM(e,Jj(i,e)):oM(e,Xj(i,e))}else{if(!xe[d])return o?e:{};i=KM(e,d,s)}}a||(a=new no);var p=a.get(e);if(p)return p;a.set(e,i),nA(e)?e.forEach(function(b){i.add(Ga(b,t,n,b,e,a))}):QM(e)&&e.forEach(function(b,y){i.set(y,Ga(b,t,n,y,e,a))});var g=c?l?cM:lM:l?Fc:Vc,m=u?void 0:g(e);return AP(m||e,function(b,y){m&&(y=b,b=e[y]),mv(i,y,Ga(b,t,n,y,e,a))}),i}var TA=1,PA=4;function If(e){return Ga(e,TA|PA)}const ci="ComponentLib",xl=`plugin:${ci}`,kA=({children:e})=>w("div",{className:lv.tabTitle,children:e});class jA extends h.Component{constructor(n){super(n);B(this,"containerRef");B(this,"disposeList",[]);B(this,"boxSensor");B(this,"leftPanelVisibleCb",async({visible:n,panelName:r})=>{await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),r===ci&&n&&this.registerDragEvent()});B(this,"getNewNode",n=>{const{pluginCtx:r}=this.props,o=r.pageModel;if(!n)return;const a=uv(n,cv);if(!a)return;const i=o.materialsModel.findSnippetById(a);if(i)return o==null?void 0:o.createNode(i.schema)});B(this,"registerDragEvent",async()=>{const{containerRef:n}=this,{pluginCtx:r}=this.props,o=await r.pluginManager.get("Designer");if(!o||!n.current)return;const i=o.export.getDnd(),s=new Xn.Sensor({name:"ComponentListBox",container:n.current});this.boxSensor=s,s.setCanDrag(async c=>{const u=this.getNewNode(c.event.target);return this.props.pluginCtx.pluginManager.get("Designer").then(d=>{const f=d==null?void 0:d.export;f==null||f.selectNode("")}),{...c,extraData:{dropType:"NEW_ADD",dragNode:u}}}),i.registerSensor(s);const l=()=>{const{getWorkbench:c}=this.props.pluginCtx,u=c();u.state.leftBoxFixed||u.closeLeftPanel()};this.disposeList.push(()=>{i.emitter.off("dragStart",l)}),i.emitter.on("dragStart",l)});B(this,"toAddNewNode",async n=>{const r=this.getNewNode(n.nativeEvent.target);if(!r)return;const{pageModel:o}=this.props.pluginCtx;return this.props.pluginCtx.pluginManager.get("Designer").then(async a=>{var m;const i=a==null?void 0:a.export,s=i==null?void 0:i.getSelectedNodeId(),l=o.getNode(s),c=be.findContainerNode(l);let u="CHILD_END",d=l??null;if(l)c===l.parent?l.isContainer()?(u="CHILD_END",d=l,o.addNode(r,l,u)):(u="AFTER",d=l):c&&!be.isPageModel(c)&&(u="CHILD_END",d=c);else{const b=o.getRootNode();b&&(u="CHILD_END",d=b)}const f=i==null?void 0:i.getInstance(),p=await(f==null?void 0:f.customAdvanceHook.onNewAdd({dragNode:r,dropNode:d,eventObj:{from:n.nativeEvent,fromSensor:this.boxSensor,pointer:null,fromPointer:null,extraData:{}}}));if(p===!1)return;let g={dragNode:r,dropNode:d,pos:u};typeof p=="object"&&(g={...g,dragNode:p.addNode??g.dragNode,dropNode:p.dropNode??g.dropNode,pos:((m=p.dropPosInfo)==null?void 0:m.pos)??g.pos}),o.addNode(g.dragNode,g.dropNode,g.pos),setTimeout(()=>{i==null||i.selectNode(g.dragNode.id)},200)})});this.containerRef=h.createRef(),this.state={componentsList:[]}}async componentDidMount(){const{pluginCtx:n}=this.props,{pageModel:r,i18n:o}=n,{materialsModel:a}=r;await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent(),Object.keys(df).forEach(s=>{o.addResourceBundle(s,xl,df[s],!0,!0)}),o.update();const i=a.getAllSnippets();if(i.length&&i[0].name==="default"){const s=i.shift();s&&i.push(s)}this.setState({componentsList:i})}componentWillUnmount(){this.disposeList.map(n=>n())}render(){const{componentsList:n}=this.state,{toAddNewNode:r}=this,o=n.map(a=>({label:w(kA,{children:$v(a.name)}),key:a.name,children:w(qT,{dataSource:a.list})}));return w("div",{ref:this.containerRef,className:lv.container,onClick:r,children:w(Y.Tabs,{defaultActiveKey:"BaseComponent",items:o,style:{flex:1}})})}}const Uv={name:ci,async init(e){const t=Ir(xl)(jA),n=Ir(xl)(({t:o})=>w(Ye,{children:o("pluginName")}));e.getWorkbench().addLeftPanel({title:w(n,{}),name:"ComponentLib",icon:w(h0,{}),render:w(t,{pluginCtx:e})})},reload:async()=>{console.log(ci,"not suooprt reload")},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},Wv="Designer",MA={pluginName:"组件库"},AA={pluginName:"Component Store"},Lf={zh_CN:MA,en_US:AA},DA="_toolBarBox_h5ljb_2",$A="_item_h5ljb_10",IA="_layoutSelectBox_h5ljb_20",LA="_hoverBox_h5ljb_25",BA="_hoverBoxActive_h5ljb_35",zA="_hoverItem_h5ljb_39",VA="_placeholder_h5ljb_47",gn={toolBarBox:DA,item:$A,layoutSelectBox:IA,hoverBox:LA,hoverBoxActive:BA,hoverItem:zA,placeholder:VA},FA=({dataSource:e,children:t,onSelect:n})=>{const[r,o]=h.useState(!1);return te("div",{className:gn.layoutSelectBox,children:[w("div",{className:dt([gn.hoverBox,r&&gn.hoverBoxActive]),children:e.map(a=>w("div",{className:gn.hoverItem,onClick:()=>n(a.key),children:a.label},a.key))}),w("div",{className:gn.placeholder,onMouseOver:()=>o(!0),onMouseOut:()=>o(!1),children:t})]})},Gv=e=>{var p;const{nodeList:t,toSelectNode:n,toDelete:r,toCopy:o,toHidden:a}=e,i=[...t],s=i.shift(),l=i.map(g=>{var S;const m=g,b=(S=m.materialsModel.findByComponentName(m.value.componentName))==null?void 0:S.value.title,y=m.value.title||b||m.value.componentName||"";return{key:g.id,label:y||"Empty"}}),c=w("div",{className:gn.item,onClick:()=>o((s==null?void 0:s.id)||""),children:w(mh,{})}),u=w("div",{className:gn.item,onClick:()=>r((s==null?void 0:s.id)||""),children:w(nc,{})}),d=w("div",{className:gn.item,onClick:()=>a((s==null?void 0:s.id)||""),children:w(xh,{})}),f=w(FA,{dataSource:l.reverse(),onSelect:n,children:w("div",{children:(s==null?void 0:s.value.title)||((p=s==null?void 0:s.material)==null?void 0:p.value.title)||"Empty"})});return{copyItem:c,deleteItem:u,visibleItem:d,nodeLayout:f}},HA=e=>{const{copyItem:t,deleteItem:n,visibleItem:r,nodeLayout:o}=h.useMemo(()=>Gv(e),[e]);return te("div",{className:gn.toolBarBox,children:[o,r,t,n]})},UA=(e,t=5)=>{const n=[];let r=0,o=e;for(;r<t&&o;)be.isNodeModel(o)&&(n.push(o),r++),o=o.parent||null;return n},WA=({node:e})=>w("div",{style:{backgroundColor:"rgba(100,100,100)",padding:"3px 10px 3px 15px",borderRadius:"2px",opacity:.9,color:"rgba(220,220,220)"},children:e.value.componentName}),GA="_hoverTips_k3vn7_2",KA={hoverTips:GA};class qA{constructor(t){B(this,"getPortalViewCtx");B(this,"ctx");B(this,"layoutRef");this.getPortalViewCtx=t.getPortalViewCtx,this.ctx=t.ctx,this.layoutRef=t.layoutRef}async canDrag({dragNode:t,eventObj:n}){var o;const r=(o=t.material)==null?void 0:o.value.advanceCustom;return r!=null&&r.canDragNode?r==null?void 0:r.canDragNode(t,{context:this.ctx,viewPortal:this.getPortalViewCtx(),event:n,extra:n.extraData}):!0}async canDrop({dragNode:t,dropNode:n,eventObj:r}){var s;const o=(s=t.material)==null?void 0:s.value.advanceCustom;let a={};const i={dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData};if(o!=null&&o.canDropNode)if(a=await o.canDropNode(t,i),o!=null&&o.canAcceptNode){let l;return typeof a=="object"?l=await(o==null?void 0:o.canAcceptNode(a.dragNode,{...i,...a})):l=await(o==null?void 0:o.canAcceptNode(t,{...i})),l}else return a;return!0}async onNewAdd({dragNode:t,dropNode:n,eventObj:r}){var a,i,s;const o=await((s=(i=(a=t.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onNewAdd)==null?void 0:s.call(i,t,{dropNode:n,context:this.ctx,viewPortal:this.getPortalViewCtx(),event:r,extra:r.extraData}));return o===!1?!1:o}getSelectRectViewRender(t){var r;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.selectRectViewRender}getHoverRectViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.hoverRectViewRender}getDropViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.dropViewRender}getGhostViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.ghostViewRender}getToolbarViewRender(t){var r;if(!t)return null;const n=t.material;return(r=n==null?void 0:n.value.advanceCustom)==null?void 0:r.toolbarViewRender}async onCopy(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onCopy;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.copyNode??n)}return n&&r.pageModel.copyNode(n)&&await Tn(),n}async onDelete(t){var i;let n=t;const r=this.ctx,o=t.material,a=(i=o==null?void 0:o.value.advanceCustom)==null?void 0:i.onDelete;if(a){const s=await a(t,{viewPortal:this.getPortalViewCtx(),context:r,extra:{}});if(s===!1)return!1;typeof s=="object"&&(n=s.deleteNode??n)}return n&&r.pageModel.deleteNode(n)&&await Tn(),n}}class YA extends h.Component{constructor(n){super(n);B(this,"layoutRef");B(this,"customAdvanceHook");B(this,"getPortalViewCtx",()=>({setView:n=>{this.setState({portalView:n})},clearView:()=>{this.setState({portalView:null})}}));B(this,"onNodeDragging",async n=>{var a,i,s;const r=n.extraData,o=r==null?void 0:r.dragNode;if(o)return(s=(i=(a=o.material)==null?void 0:a.value.advanceCustom)==null?void 0:i.onDragging)==null?void 0:s.call(i,o,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r})});B(this,"onNodeDragEnd",async()=>{this.setState({...this.state,dropViewRender:this.props.pluginCtx.config.dropViewRender})});B(this,"onNodeDrop",async n=>{var c,u,d,f,p,g,m,b,y,S,E;const{layoutRef:r}=this,o=this.props.pluginCtx.pageModel,a=n.extraData,i=a==null?void 0:a.dropPosInfo,s={before:"BEFORE",after:"AFTER",current:"CHILD_START"}[(i==null?void 0:i.pos)||"after"],l=a==null?void 0:a.dragNode;if(l&&await((d=(u=(c=l.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onDrop)==null?void 0:d.call(u,l,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;if(!(a!=null&&a.dropNode))return console.warn("cancel drop, because drop node is null"),!1;if(a.dropType==="NEW_ADD"){if(l&&await((g=(p=(f=l.material)==null?void 0:f.value.advanceCustom)==null?void 0:p.onNewAdd)==null?void 0:g.call(p,l,{dropNode:a.dropNode,context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:a}))===!1)return!1;((m=a.dropNode)==null?void 0:m.nodeType)!=="NODE"?o==null||o.addNode(a.dragNode,a.dropNode,"CHILD_START"):o==null||o.addNode(a.dragNode,a.dropNode,s)}else{if(((b=a.dropNode)==null?void 0:b.id)===((y=a.dragNode)==null?void 0:y.id)){console.warn("dragNode and dropNode id is the same");return}if(!o.moveNodeById(((S=a.dragNode)==null?void 0:S.id)||"",((E=a==null?void 0:a.dropNode)==null?void 0:E.id)||"",s))return console.warn("drop failed"),!1}setTimeout(async()=>{var x,v,C;if(l&&await this.onSelectNode(l,null)===!1){(x=r.current)==null||x.selectNode("");return}(C=r.current)==null||C.selectNode(((v=a.dragNode)==null?void 0:v.id)||"")},150),this.props.pluginCtx.emitter.emit("onDrop",n)});B(this,"onSelectNode",async(n,r)=>{var l,c,u,d;const{pluginCtx:o}=this.props,{layoutRef:a}=this;if(!n){o.engine.updateCurrentSelectNode(null),(l=a.current)==null||l.selectNode(""),this.setState({selectToolbarView:null});return}const i=await((d=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.onSelect)==null?void 0:d.call(u,n,{context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:r,extra:{}}));if(i===!1)return i;o.engine.updateCurrentSelectNode(n);const s=this.getToolbarView(n);this.setState({selectToolbarView:s,selectRectViewRender:this.customAdvanceHook.getSelectRectViewRender(n)||this.props.pluginCtx.config.selectRectViewRender})});B(this,"onDragStart",async n=>{var l,c,u;const r=n.extraData,o=r==null?void 0:r.dragNode;if(!o)return;const a={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:n,extra:r},i=await((u=(c=(l=o.material)==null?void 0:l.value.advanceCustom)==null?void 0:c.onDragStart)==null?void 0:u.call(c,o,{...a}));if(i===!1)return i;const s=this.getGhostView(o,a);this.setState({...this.state,ghostView:s,dropViewRender:this.customAdvanceHook.getDropViewRender(o)||this.props.pluginCtx.config.dropViewRender})});B(this,"getGhostView",(n,r)=>{let o=w(WA,{node:n});const i=this.customAdvanceHook.getGhostViewRender(n)||this.props.pluginCtx.config.ghostViewRender;return i&&(o=w(i,{node:n,params:r})),o});B(this,"toSelectNode",async n=>{var i;const o=this.props.pluginCtx.pageModel.getNode(n);if(await this.onSelectNode(o||null,null)!==!1)return(i=this.layoutRef.current)==null||i.selectNode(n),!0});B(this,"toCopyNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n),a=await this.customAdvanceHook.onCopy(o);a&&this.toSelectNode(a.id)});B(this,"toDeleteNode",async n=>{const o=this.props.pluginCtx.pageModel.getNode(n);!o||await this.customAdvanceHook.onDelete(o)===!1||this.toSelectNode("")});B(this,"toHidden",n=>{const r=this.props.pluginCtx.pageModel.getNode(n);if(!r)return;const o=r.value.configure.devState??{};o.condition=!1,r.value.configure.devState=o,r.updateValue()});B(this,"getToolbarView",n=>{const o={nodeList:UA(n,5),toSelectNode:this.toSelectNode,toCopy:this.toCopyNode,toDelete:this.toDeleteNode,toHidden:this.toHidden},a=Gv(o);let i=w(HA,{...o});const s=this.customAdvanceHook.getToolbarViewRender(n)||this.props.pluginCtx.config.toolbarViewRender;return s&&(i=w(s,{node:n,context:this.context,toolBarItems:a})),i});B(this,"onHoverNode",(n,r,o)=>{this.props.pluginCtx.emitter.emit("onHover",n);const a=n==null?void 0:n.material;a||console.warn("material not found",n);const i={context:this.props.pluginCtx,viewPortal:this.getPortalViewCtx(),event:o,extra:{}},s=this.getGhostView(r,i),l={hoverToolbarView:w("div",{className:KA.hoverTips,children:(a==null?void 0:a.value.title)||(a==null?void 0:a.componentName)}),ghostView:s,hoverRectViewRender:this.customAdvanceHook.getHoverRectViewRender(n)||this.props.pluginCtx.config.hoverRectViewRender};r||(l.ghostView=null),this.setState({...l})});B(this,"nodeCanDrag",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrag({dragNode:o,eventObj:n})});B(this,"nodeCanDrop",async n=>{const r=n.extraData,o=r==null?void 0:r.dragNode;return await this.customAdvanceHook.canDrop({dragNode:o,eventObj:n,...r})});B(this,"innerSelectRectViewRender",n=>{const{selectRectViewRender:r}=this.state,{pluginCtx:o}=this.props,a=r,i=o.engine.getActiveNode();return!a||!i?w(Ye,{}):w(a,{node:i,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}})});B(this,"innerHoverRectViewRender",n=>{const{hoverRectViewRender:r}=this.state,o=r;return o?w(o,{node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):w(Ye,{})});B(this,"innerDropViewRender",n=>{const{dropViewRender:r}=this.state,o=r;return o?w(o,{...n,node:n.instance._NODE_MODEL,componentInstance:n.instance,componentInstanceIndex:n.index,params:{viewPortal:this.getPortalViewCtx(),context:this.props.pluginCtx,extra:{}}}):w(Ye,{})});this.state={pageModel:n.pluginCtx.pageModel,hoverToolbarView:null,selectToolbarView:null,ghostView:null,assets:n.pluginCtx.assets||[],portalView:null,selectRectViewRender:null,hoverRectViewRender:null,dropViewRender:null},this.layoutRef=h.createRef(),this.customAdvanceHook=new qA({getPortalViewCtx:this.getPortalViewCtx,ctx:this.props.pluginCtx,layoutRef:this.layoutRef})}componentDidMount(){const{i18n:n}=this.props.pluginCtx;Object.keys(Lf).forEach(r=>{n.addResourceBundle(r,`plugin:${Wv}`,Lf[r],!0,!0)}),this.init()}updateAssets(n){this.setState({assets:n})}reloadRender({assets:n}){var r;(r=this.layoutRef.current)==null||r.reload({assets:n})}async init(){const{layoutRef:n}=this,{pluginCtx:r}=this.props;if(!n.current){console.warn("layout not ready ok");return}await n.current.ready();const o=n.current;r.emitter.emit("ready",{UIInstance:this}),o.dnd.emitter.on("click",({event:a})=>{r.getWorkbench().onGlobalClick(a)}),this.props.pluginCtx.pageModel.emitter.on("onPageChange",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),this.props.pluginCtx.pageModel.emitter.on("onReloadPage",({node:a})=>{var i,s,l;(l=(s=(i=n.current)==null?void 0:i.designRenderRef)==null?void 0:s.current)==null||l.rerender(a)}),r.pluginReadyOk()}render(){const{layoutRef:n,props:r,onSelectNode:o,onDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDragEnd:c}=this,{pageModel:u,hoverToolbarView:d,selectToolbarView:f,ghostView:p,assets:g,portalView:m,selectRectViewRender:b,hoverRectViewRender:y,dropViewRender:S}=this.state,{pluginCtx:E}=r,x=E.engine.props.renderJSUrl||"./render.umd.js",v={};return b&&(v.selectRectViewRender=this.innerSelectRectViewRender),y&&(v.hoverRectViewRender=this.innerHoverRectViewRender),S&&(v.dropViewRender=this.innerDropViewRender),f&&(v.selectToolbarView=this.state.selectToolbarView),te(Ye,{children:[w(Xn.Layout,{beforeInitRender:r.pluginCtx.config.beforeInitRender,customRender:r.pluginCtx.config.customRender,ref:n,pageModel:u,renderJSUrl:x,...r,hoverToolBarView:d,selectBoxStyle:{},hoverBoxStyle:{},nodeCanDrag:this.nodeCanDrag,nodeCanDrop:this.nodeCanDrop,onSelectNode:o,onNodeDragStart:a,onHoverNode:i,onNodeDrop:s,onNodeDragging:l,onNodeDraEnd:c,...v,ghostView:p,assets:g,pluginCtx:this.props.pluginCtx}),m&&Lt.createPortal(m,document.body)]})}}const Kv=e=>{const t=h.createRef();return{name:Wv,async init(n){n.getWorkbench().replaceBodyView(w(YA,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:()=>({getInstance:()=>t.current,getDnd:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.dnd},selectNode:async n=>{var r;(r=t.current)==null||r.toSelectNode(n)},copyNode:async n=>{var r;(r=t.current)==null||r.toCopyNode(n)},deleteNode:async n=>{var r;(r=t.current)==null||r.toDeleteNode(n)},getSelectedNodeId:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.state.currentSelectId},updatePage:n=>{var r,o,a,i;(i=(a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef)==null?void 0:a.current)==null||i.rerender(n)},reload:({assets:n}={})=>{var r;(r=t.current)==null||r.reloadRender({assets:n})},getComponentInstances:n=>{var r,o,a;return((a=(o=(r=t.current)==null?void 0:r.layoutRef.current)==null?void 0:o.designRenderRef.current)==null?void 0:a.getInstancesById(n))||[]},getDynamicComponentInstances:n=>{var o,a,i,s;const r=(s=(i=(a=(o=t.current)==null?void 0:o.layoutRef.current)==null?void 0:a.designRenderRef.current)==null?void 0:i.renderRef.current)==null?void 0:s.dynamicComponentInstanceMap;return(r==null?void 0:r.get(n))||[]},getLayoutRef:()=>{var n;return(n=t.current)==null?void 0:n.layoutRef},getDesignerWindow:()=>{var n,r;return(r=(n=t.current)==null?void 0:n.layoutRef.current)==null?void 0:r.iframeContainer.getWindow()}}),meta:{engine:{version:"1.0.0"}}}},Cl=(e,t)=>{if(!e)return null;const n=e.getAttribute(t);return n||Cl(e.parentElement,t)},qv=(e,t,n)=>{const r=(o,a)=>{var m,b,y;let i=o.children||[];Array.isArray(i)||(i=[]),i=i.filter(S=>typeof S!="string");const s=(m=n.materialsModel.findByComponentName(o.componentName))==null?void 0:m.value.title,l={title:o.title||s||o.componentName,key:o.id,children:[],parent:a,canDropPos:(b=n.getNode(o.id||""))!=null&&b.isContainer()?void 0:["after","before"]},c=[],u={title:"SLOT",key:`${o.id}-SLOT`,children:c,canBeSelected:!1,canDropPos:!1,parent:null,containerRender:({treeNodeView:S})=>w("div",{style:{border:"1px solid #a97cf8",borderTopWidth:"6px",marginRight:"2px",marginTop:"5px"},children:S})},d=o.props||{},f=(S,E,x)=>{if(be.isJSSlotPropNode(S)){const C=S,O=n.getNode(o.id);let R="";if(O){const j=p(O,[...x,E]);R=be.getMTitle(j)}let N=E;R&&(N=be.getMTitle(R)||E);const T={title:N,key:`${o.id}-${x.join("_")}`,children:[],canBeSelected:!1,canDrag:!1,canDropPos:["current"],parent:u};let M=[];C.value&&!Array.isArray(C.value)?M=[C.value]:M=C.value,T.children=qv(M,T,n),c.push(T);return}if(Ii(S)){const C=S;Object.keys(C).forEach(O=>{f(C[O],O,[...x,E])})}Array.isArray(S)&&S.forEach((O,R)=>{f(O,String(R),[...x,E])})},p=(S,E)=>{const x=QA(S),v=E.map(C=>String(parseInt(C,10))===C?"$NUM":C);return x[v.join(".")]||""};Object.keys(d).forEach(S=>{f(d[S],S,[])}),c.length>0&&((y=l.children)==null||y.push(u),u.parent=l);const g=i.map(S=>r(S,l))||[];return l.children=[...l.children,...g],l};return Array.isArray(e)?e.map(o=>r(o,t)):r(e,t)},XA=(e,t)=>{const n=e.componentsTree;let r=n.children||[];Array.isArray(r)||(r=[]);const o={title:"Page",key:n.id||"Page",rootNode:!0,children:[]};return o.children=qv(r,o,t),[o]},ms=(e,t)=>{let n=[];Array.isArray(e)?n=e:n=[e];let r=!1;const o=(a,i)=>{var l;if(r)return;i(a)?r=!0:(l=a.children)==null||l.forEach(c=>{o(c,i)})};n.forEach(a=>{o(a,t)})};function JA(e){const{point:t,dom:n}=e;let r;const o=t,a=n.getBoundingClientRect(),i=a.height,s=a.x+50,l=a.y+Math.round(i/2);return o.y>l?r="after":r="before",o.x>s&&r==="after"&&(r="current"),{pos:r,direction:"vertical"}}const QA=e=>{var o;const t={},n=(o=e.material)==null?void 0:o.value.props;if(!n)return t;const r=(a,i)=>{var s,l;if(Ii(a)){const c=[...i],u=a,d=u.componentName;if(d==="ArraySetter"){const p=((s=u.props)==null?void 0:s.item.setters)||[],g=t[i.join(".")];let m="";typeof g=="string"?m=g:m=g.label,c.push("$NUM"),p.forEach(b=>{m=`${m}`,t[c.join(".")]=m,r(b,c)})}else d==="ShapeSetter"&&(((l=u.props)==null?void 0:l.elements)||[]).forEach(g=>{const m=[...c];m.push(g.name),t[m.join(".")]=g.title,(g.setters||[]).forEach(y=>{r(y,[...m])})})}};return n.forEach(a=>{let i=null;be.isSpecialMaterialPropType(a)?i=a.content:i=a;let s=[];Array.isArray(i)?s=i:s=[i],s.forEach(l=>{var u;const c=[l.name];t[c.join(".")]=l.title,(u=l.setters)==null||u.forEach(d=>{r(d,c)})})}),t};var wr=(e=>(e.DRAGGING="DRAGGING",e.NORMAL="NORMAL",e))(wr||{});const Yv=h.createContext({state:{treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:!1,dragState:"NORMAL",pageModel:null},updateState:()=>{},onSelectNode:()=>{},onDeleteNode:e=>{},onCopyNode:e=>{}}),ZA="_contentBox_1tkrj_2",eD="_nodeBox_1tkrj_13",tD="_toolbarBox_1tkrj_17",nD="_iconItem_1tkrj_21",rD="_nodeContent_1tkrj_25",oD="_selected_1tkrj_35",aD="_nodeArrow_1tkrj_38",iD="_expanded_1tkrj_41",sD="_nodeRenderView_1tkrj_45",lD="_nodeChildren_1tkrj_56",cD="_dropAnchorLine_1tkrj_73",uD="_arrowSpan_1tkrj_82",it={contentBox:ZA,nodeBox:eD,toolbarBox:tD,iconItem:nD,nodeContent:rD,selected:oD,nodeArrow:aD,expanded:iD,nodeRenderView:sD,nodeChildren:lD,dropAnchorLine:cD,arrowSpan:uD},yr="data-drag-key",Xv=e=>{var z,Z,J,le;const t=h.useRef({titleEditable:!1}),{level:n=0,item:r,paths:o=["0"]}=e,[a,i]=h.useState(!0),{state:s,updateState:l,onSelectNode:c,onDeleteNode:u,getDesignerHandler:d,onCopyNode:f}=h.useContext(Yv),[p,g]=h.useState((z=t.current)==null?void 0:z.titleEditable),[m,b]=h.useState("");t.current.titleEditable=p;const y=s.expandKeys.find(A=>A===r.key),S=A=>{let $=s.expandKeys;A!==void 0?A===!0?y||$.push(r.key||""):y&&($=$.filter(W=>W!==r.key)):y?$=$.filter(W=>W!==r.key):$.push(r.key||""),l({expandKeys:$})},E=s.currentSelectNodeKeys.find(A=>A===r.key),x=h.useRef(null),v=()=>{var $;if(S(!0),p){($=x==null?void 0:x.current)==null||$.focus();return}if(r.canBeSelected!==void 0&&r.canBeSelected===!1)return;let A=s.currentSelectNodeKeys;if(!s.multiSelect){r.key?c==null||c({keys:[r.key],node:r}):c==null||c({keys:[],node:r}),l({currentSelectNodeKeys:[String(r.key)]});return}E?A=A.filter(W=>W!==r.key):A.push(String(r.key)),c==null||c({keys:A,node:r}),l({currentSelectNodeKeys:A})},C=20,O=C*n,R=r.canBeSelected??!0,N={[yr]:r.key},T=h.useRef(),M=h.useRef();M.current=s,T.current=A=>{const $=s.expandKeys,W=Array.from(new Set([...$,A]));l({expandKeys:W})};const j=h.useRef(null);h.useEffect(()=>{var ie,de;let A=0;(ie=j.current)==null||ie.addEventListener("mouseenter",()=>{A=window.setTimeout(()=>{var we,fe;((we=M.current)==null?void 0:we.dragState)===wr.DRAGGING&&((fe=T.current)==null||fe.call(T,r.key||""))},.8*1e3)}),(de=j.current)==null||de.addEventListener("mouseleave",()=>{clearTimeout(A)});const $=we=>{var fe;if(t.current.titleEditable){if(we.target===((fe=x.current)==null?void 0:fe.input))return;g(!1),D.updateValue()}};let W;return(async()=>{const we=await e.pluginCtx.pluginManager.get("Designer"),fe=we==null?void 0:we.export,Ee=fe==null?void 0:fe.getDesignerWindow();Ee==null||Ee.addEventListener("click",$),W=Ee||null})(),document.addEventListener("click",$),()=>{A&&clearTimeout(A),document.removeEventListener("click",$),W==null||W.removeEventListener("click",$)}},[]);const D=(Z=s.pageModel)==null?void 0:Z.getNode(r.key||""),k=()=>{const A=!a;if(!D)return;const $=D.value.configure.devState??{};$.condition=A,D.value.configure.devState=$,D.updateValue(),i(A)};let P=r.title;r.titleViewRender&&(P=r.titleViewRender({item:r,titleView:r.title}));const L=te("div",{className:it.nodeBox,children:[te("div",{className:dt([it.nodeContent,E&&R&&it.selected]),style:{marginLeft:`${-O}px`,paddingLeft:`${O+8}px`},onMouseMove:async()=>{if(!r.key)return;const A=await(d==null?void 0:d()),$=A==null?void 0:A.getDynamicComponentInstances(r.key);typeof($==null?void 0:$._CONDITION)<"u"&&i($==null?void 0:$._CONDITION)},children:[(J=r.children)!=null&&J.length?w("span",{style:{paddingRight:"5px"},className:it.arrowSpan,onClickCapture:()=>S(),children:w(W0,{className:dt([it.nodeArrow,y&&it.expanded])})}):null,te("div",{className:it.nodeRenderView,...N,ref:j,onClick:v,onDoubleClick:()=>{var ne;if(!D)return;const A=D,$=(ne=A.materialsModel.findByComponentName(A.value.componentName))==null?void 0:ne.value.title,W=A.value.title||$||A.value.componentName||"";b(W),g(!0),setTimeout(()=>{var ie;(ie=x.current)==null||ie.focus()},16.66)},children:[!p&&P,p&&w("div",{style:{paddingRight:"10px"},children:w(Y.Input,{size:"small",maxLength:20,style:{},ref:x,value:m,onPressEnter:()=>{g(!1),D.updateValue()},onChange:A=>{D.value.title=A.target.value,b(A.target.value)}})})]}),!p&&!r.rootNode&&te("div",{className:it.toolbarBox,children:[te("div",{className:it.iconItem,children:[!a&&w(j0,{onClick:k}),a&&w(xh,{onClick:k})]}),w("div",{className:it.iconItem,onClick:()=>{f(r.key||"")},children:w(mh,{})}),w("div",{className:it.iconItem,onClick:()=>{u(r.key||"")},children:w(nc,{})})]})]}),w("div",{className:dt([it.nodeChildren,E&&it.selected]),style:{paddingLeft:`${C}px`,height:y?"auto":"0"},children:y&&((le=r.children)==null?void 0:le.map((A,$)=>{const W=`${A.key}-${$}`;return w(Xv,{item:A,paths:[...o,$],level:n+1,pluginCtx:e.pluginCtx},W)}))})]});return r.containerRender?r.containerRender({item:r,treeNodeView:L}):L};class dD extends h.Component{constructor(n){super(n);B(this,"domRef");B(this,"disposeCbList",[]);B(this,"sensor");B(this,"getDesignerHandler",async()=>{const n=await this.props.pluginCtx.pluginManager.get("Designer");return n==null?void 0:n.export});B(this,"updateTreeDataFromNode",()=>{const{pluginCtx:n}=this.props,{pageModel:r}=n,o=r.export(),a=XA(o,r);this.setState({treeData:a})});B(this,"getParentKeyPaths",n=>{const{treeData:r}=this.state;let o=null;if(ms(r,a=>a.key===n?(o=a,!0):!1),o){let a=o==null?void 0:o.parent;const i=[];for(;a;)a.key&&i.push(a.key),a=a.parent;return i}else return[]});B(this,"scrollNodeToView",n=>{var o;const r=document.querySelector(`[${yr}="${n}"]`);(o=r==null?void 0:r.scrollIntoView)==null||o.call(r,{behavior:"smooth",block:"center"})});B(this,"toSelectTreeNode",n=>{if(!n){this.setState({currentSelectNodeKeys:[]});return}const r=this.getParentKeyPaths(n.id);$t.debug("onSelectNodeChange parent path",r,n);const o=Array.from(new Set([...this.state.expandKeys,...r]));$t.debug("onSelectNodeChange newExpandKeys",o,n),this.setState({currentSelectNodeKeys:[n.id],expandKeys:o}),setTimeout(()=>{this.scrollNodeToView(n.id)},100)});B(this,"containNode",(n,r)=>{let o=null;return ms(n,a=>a.key===r.key?(o=a,!0):!1),o});B(this,"getTreeNodeByKey",n=>{const{treeData:r}=this.state;let o=null;return ms(r,a=>a.key===n?(o=a,!0):!1),o});B(this,"registerDragEvent",async()=>{if(!this.domRef.current)return;const n=new Xn.Sensor({container:this.domRef.current,name:"OutlineTree",eventPriority:999}),{pluginCtx:r}=this.props,o=r.pageModel,a=await this.getDesignerHandler(),i=a.getDnd();n.setCanDrag(async s=>{var m;const l=s.event.target;if(!l)return;const c=Cl(l,yr);if(!c)return;const u=o.getNode(c),d=this.getTreeNodeByKey(c);if((d==null?void 0:d.canDrag)!==void 0&&(d==null?void 0:d.canDrag)===!1)return;const f=a.getInstance(),p=await(f==null?void 0:f.customAdvanceHook.canDrag({dragNode:u,eventObj:{extraData:{},...s,from:s.event,fromSensor:n,fromPointer:s.pointer}}));if(p===!1)return!1;if(!u){console.log("targetNode not found");return}const g={...s,extraData:{dragNode:u,dragNodeUID:u.id}};return typeof p=="object"&&(g.extraData.dragNode=p.dragNode,g.extraData.dragNodeUID=((m=p.dragNode)==null?void 0:m.id)||""),g}),n.setCanDrop(async s=>{var S;const l=s.event.target;if(!l)return $t.debug("drop dom not found"),s;const c=Cl(l,yr);if(!c)return $t.debug("targetNodeId dom not found",s,l,yr),s;const u=this.getTreeNodeByKey(c);if((u==null?void 0:u.canDropPos)!==void 0&&u.canDropPos===!1)return $t.debug("node can not be drop by tree node config"),s;const d=o.getNode(c);if(!d)return $t.debug("targetNode not found"),s;const f=(S=s.extraData)==null?void 0:S.dragNode;if(!f)return $t.debug("startNode not found"),s;if((f==null?void 0:f.id)===d.id)return $t.debug("startNode and dropNode is the same"),s;if(f.contains(d.id))return $t.debug("startNode contain dropNode"),s;const g=JA({point:s.pointer,dom:l});if(Array.isArray(u==null?void 0:u.canDropPos)&&!(u!=null&&u.canDropPos.includes(g.pos)))return!1;$t.info("can dropNode",d);const m={...s,extraData:{...s.extraData,dropPosInfo:g,dropNode:d,dropNodeUID:d.id}},b=a.getInstance(),y=await(b==null?void 0:b.customAdvanceHook.canDrop({dragNode:m.extraData.dragNode,dropNode:d,eventObj:{...m,from:m.event,fromSensor:n,fromPointer:m.pointer}}));return y===!1?!1:(typeof y=="object"&&(m.extraData={...m.extraData,...y}),m)}),i.registerSensor(n),n.emitter.on("dragging",s=>{var p,g;const l=s.extraData.dropNode;if(this.setState({dragState:wr.DRAGGING}),!l){this.setState({dropPosInfo:null});return}const c=(p=document.querySelectorAll(`[${yr}="${l.id}"]`))==null?void 0:p[0];if(!c)return;const u=((g=s.extraData)==null?void 0:g.dropPosInfo)||{},d=c.getBoundingClientRect(),f={x:0,y:0};f.x=d.x,u.pos==="before"?f.y=d.y:u.pos==="after"?f.y=d.y+d.height:(f.y=d.y+d.height,f.x=d.x+20),this.setState({dropPosInfo:f})}),n.emitter.on("dragEnd",()=>{this.setState({dragState:wr.NORMAL})}),this.sensor=n});this.domRef=h.createRef(),this.state={treeData:[],currentSelectNodeKeys:[],expandKeys:[],multiSelect:n.multiSelect||!1,dropPosInfo:{x:0,y:0},pageModel:n.pluginCtx.pageModel,dragState:wr.NORMAL}}async componentDidMount(){this.updateTreeDataFromNode();const{pluginCtx:n}=this.props,{pageModel:r}=n;r.emitter.on("*",()=>{this.updateTreeDataFromNode()}),n.globalEmitter.on("onSelectNodeChange",({node:i})=>{this.toSelectTreeNode(i)}),n.getWorkbench().emitter.on("leftPanelVisible",({visible:i,panelName:s})=>{if(i&&s==="OutlineTree"){console.log("visible, panelName",i,s);const l=n.engine.getActiveNode();l&&this.toSelectTreeNode(l)}});const a=n.engine.getActiveNode();a&&this.toSelectTreeNode(a),await this.props.pluginCtx.pluginManager.onPluginReadyOk("Designer"),this.registerDragEvent()}render(){const{treeData:n,dragState:r,dropPosInfo:o}=this.state,{pluginCtx:a}=this.props;return w(Yv.Provider,{value:{sensor:this.sensor,state:this.state,getDesignerHandler:this.getDesignerHandler,onSelectNode:async({keys:i})=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}const l=(i==null?void 0:i[0])||"",c=a.pageModel.getNode(l);s.export.selectNode(l),c&&a.engine.updateCurrentSelectNode(c)},updateState:i=>{this.setState(i)},onDeleteNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.deleteNode(i)},onCopyNode:async i=>{const s=await a.pluginManager.get("Designer");if(!s){console.warn("Designer is empty");return}s.export.copyNode(i)}},children:te("div",{className:it.contentBox,ref:this.domRef,children:[n.map((i,s)=>w(Xv,{item:i,pluginCtx:this.props.pluginCtx},i.key+`${s}`)),r===wr.DRAGGING&&o&&w("div",{className:it.dropAnchorLine,style:{left:`${o.x}px`,top:`${o.y}px`}})]})})}}const fD={pluginName:"大纲树"},pD={pluginName:"Layout Tree"},Bf={zh_CN:fD,en_US:pD},Ol="OutlineTree",ys=`plugin:${Ol}`,hD={name:Ol,async init(e){const{i18n:t}=e;Object.keys(Bf).forEach(a=>{t.addResourceBundle(a,ys,Bf[a],!0,!0)});const n=Ir(ys)(dD),r=Ir(ys)(({t:a})=>w(Ye,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:w(r,{}),name:Ol,icon:w(d0,{}),render:w(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},gD="_CFromRenderBox_1vsdm_2",vD={CFromRenderBox:gD},Kc=h.createContext({formName:"",formState:{},conditionConfig:{},updateContext:()=>{},updateConditionConfig:()=>{},customSetterMap:{}}),Jv={},mD=e=>{Object.assign(Jv,e)};class qc extends h.Component{constructor(n){super(n);B(this,"updateContext");B(this,"getFieldsValue",()=>this.formatValue(this.state.formState));B(this,"setFields",n=>{this.setState({formState:n})});B(this,"formatValue",n=>{const r={},o=this.state.conditionConfig;return Object.keys(n).forEach(a=>{var s;(((s=o[a])==null?void 0:s.call(o,n))??!0)&&(r[a]=n[a])}),r});this.updateContext=r=>{var o,a;this.setState({formState:r,customSetterMap:Jv}),(a=(o=this.props).onValueChange)==null||a.call(o,this.formatValue(r))},this.state={formName:n.name,formState:n.initialValue??{},conditionConfig:{},customSetterMap:n.customSetterMap||{},updateContext:this.updateContext,updateConditionConfig:(r,o)=>{this.setState({conditionConfig:{...this.state.conditionConfig,[r]:o}})}}}render(){const{state:n}=this,{children:r}=this.props;return w(Kc.Provider,{value:n,children:r})}}class yD extends TypeError{constructor(t,n){let r;const{message:o,...a}=t,{path:i}=t,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var l;return(l=r)!=null?l:r=[t,...n()]}}}function bD(e){return Ft(e)&&typeof e[Symbol.iterator]=="function"}function Ft(e){return typeof e=="object"&&e!=null}function Ct(e){return typeof e=="string"?JSON.stringify(e):""+e}function wD(e){const{done:t,value:n}=e.next();return t?void 0:n}function SD(e,t,n,r){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=n,{refinement:s,message:l="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+Ct(r)+"`"}=e;return{value:r,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:l}}function*zf(e,t,n,r){bD(e)||(e=[e]);for(const o of e){const a=SD(o,t,n,r);a&&(yield a)}}function*Yc(e,t,n){n===void 0&&(n={});const{path:r=[],branch:o=[e],coerce:a=!1,mask:i=!1}=n,s={path:r,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&Ft(t.schema)&&Ft(e)&&!Array.isArray(e)))for(const c in e)t.schema[c]===void 0&&delete e[c];let l="valid";for(const c of t.validator(e,s))l="not_valid",yield[c,void 0];for(let[c,u,d]of t.entries(e,s)){const f=Yc(u,d,{path:c===void 0?r:[...r,c],branch:c===void 0?o:[...o,u],coerce:a,mask:i});for(const p of f)p[0]?(l=p[0].refinement!=null?"not_refined":"not_valid",yield[p[0],void 0]):a&&(u=p[1],c===void 0?e=u:e instanceof Map?e.set(c,u):e instanceof Set?e.add(u):Ft(e)&&(e[c]=u))}if(l!=="not_valid")for(const c of t.refiner(e,s))l="not_refined",yield[c,void 0];l==="valid"&&(yield[void 0,e])}class on{constructor(t){this.TYPE=void 0,this.type=void 0,this.schema=void 0,this.coercer=void 0,this.validator=void 0,this.refiner=void 0,this.entries=void 0;const{type:n,schema:r,validator:o,refiner:a,coercer:i=l=>l,entries:s=function*(){}}=t;this.type=n,this.schema=r,this.entries=s,this.coercer=i,o?this.validator=(l,c)=>{const u=o(l,c);return zf(u,c,this,l)}:this.validator=()=>[],a?this.refiner=(l,c)=>{const u=a(l,c);return zf(u,c,this,l)}:this.refiner=()=>[]}assert(t){return xD(t,this)}create(t){return CD(t,this)}is(t){return ED(t,this)}mask(t){return OD(t,this)}validate(t,n){return n===void 0&&(n={}),ro(t,this,n)}}function xD(e,t){const n=ro(e,t);if(n[0])throw n[0]}function CD(e,t){const n=ro(e,t,{coerce:!0});if(n[0])throw n[0];return n[1]}function OD(e,t){const n=ro(e,t,{coerce:!0,mask:!0});if(n[0])throw n[0];return n[1]}function ED(e,t){return!ro(e,t)[0]}function ro(e,t,n){n===void 0&&(n={});const r=Yc(e,t,n),o=wD(r);return o[0]?[new yD(o[0],function*(){for(const i of r)i[0]&&(yield i[0])}),void 0]:[void 0,o[1]]}function _D(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return r?em(a):Te(a)}function Dn(e,t){return new on({type:e,schema:null,validator:t})}function Br(e){return new on({type:"dynamic",schema:null,*entries(t,n){yield*e(t,n).entries(t,n)},validator(t,n){return e(t,n).validator(t,n)},coercer(t,n){return e(t,n).coercer(t,n)},refiner(t,n){return e(t,n).refiner(t,n)}})}function RD(e,t){const{schema:n}=e,r={...n};for(const o of t)delete r[o];switch(e.type){case"type":return em(r);default:return Te(r)}}function Ue(){return Dn("any",()=>!0)}function qe(e){return new on({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[n,r]of t.entries())yield[n,r,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||"Expected an array value, but received: "+Ct(t)}})}function zr(){return Dn("boolean",e=>typeof e=="boolean")}function El(e){const t={},n=e.map(r=>Ct(r)).join();for(const r of e)t[r]=r;return new on({type:"enums",schema:t,validator(r){return e.includes(r)||"Expected one of `"+n+"`, but received: "+Ct(r)}})}function Qv(){return Dn("func",e=>typeof e=="function"||"Expected a function, but received: "+Ct(e))}function Qt(e){const t=Ct(e),n=typeof e;return new on({type:"literal",schema:n==="string"||n==="number"||n==="boolean"?e:null,validator(r){return r===e||"Expected the literal `"+t+"`, but received: "+Ct(r)}})}function ND(){return Dn("never",()=>!1)}function Zv(){return Dn("number",e=>typeof e=="number"&&!isNaN(e)||"Expected a number, but received: "+Ct(e))}function Te(e){const t=e?Object.keys(e):[],n=ND();return new on({type:"object",schema:e||null,*entries(r){if(e&&Ft(r)){const o=new Set(Object.keys(r));for(const a of t)o.delete(a),yield[a,r[a],e[a]];for(const a of o)yield[a,r[a],n]}},validator(r){return Ft(r)||"Expected an object, but received: "+Ct(r)},coercer(r){return Ft(r)?{...r}:r}})}function X(e){return new on({...e,validator:(t,n)=>t===void 0||e.validator(t,n),refiner:(t,n)=>t===void 0||e.refiner(t,n)})}function To(e,t){return new on({type:"record",schema:null,*entries(n){if(Ft(n))for(const r in n){const o=n[r];yield[r,r,e],yield[r,o,t]}},validator(n){return Ft(n)||"Expected an object, but received: "+Ct(n)}})}function q(){return Dn("string",e=>typeof e=="string"||"Expected a string, but received: "+Ct(e))}function em(e){const t=Object.keys(e);return new on({type:"type",schema:e,*entries(n){if(Ft(n))for(const r of t)yield[r,n[r],e[r]]},validator(n){return Ft(n)||"Expected an object, but received: "+Ct(n)}})}function St(e){const t=e.map(n=>n.type).join(" | ");return new on({type:"union",schema:null,coercer(n,r){return(e.find(a=>{const[i]=a.validate(n,{coerce:!0});return!i})||TD()).coercer(n,r)},validator(n,r){const o=[];for(const a of e){const[...i]=Yc(n,a,r),[s]=i;if(s[0])for(const[l]of i)l&&o.push(l);else return[]}return["Expected the value to satisfy a union of `"+t+"`, but received: "+Ct(n),...o]}})}function TD(){return Dn("unknown",()=>!0)}const tm=Te({package:q(),version:q(),name:q(),exportName:X(q()),destructuring:X(zr()),subName:X(q()),main:X(q()),cssPaths:X(qe(q()))});qe(tm);var Rn=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(Rn||{}),_l=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(_l||{});const PD=()=>Dn("normalObj",e=>!Ii(e)||[Rn.SLOT,Rn.EXPRESSION,Rn.FUNCTION].includes(e==null?void 0:e.type)?!1:(ro(e,To(q(),Xc)),!0)),Xc=St([q(),Zv(),zr(),Te({type:Qt(Rn.SLOT),renderType:El([_l.FUNC,_l.COMP]),params:X(qe(q())),value:Br(()=>St([ui,qe(ui)]))}),Te({type:Qt(Rn.EXPRESSION),value:q()}),Te({type:Qt(Rn.FUNCTION),value:q()}),PD(),qe(Br(()=>Xc))]),Vf=Te({type:Qt(Rn.EXPRESSION),value:q()}),ui=Te({id:X(q()),title:X(q()),componentName:q(),props:X(To(q(),Xc)),nodeName:X(q()),state:X(To(q(),Ue())),children:Br(()=>X(qe(St([q(),ui])))),configure:X(Ue()),css:X(Ue()),style:X(Ue()),classNames:X(qe(Ue())),refId:X(q()),extra:X(To(Ue(),Ue())),condition:X(St([zr(),Vf])),loop:X(Te({open:zr(),data:St([qe(Ue()),Vf]),args:X(qe(q())),forName:X(q()),forIndex:X(q()),key:X(Ue()),name:X(q())})),methods:X(qe(Ue()))}),kD=e=>Ii(e)?e.label:e,di=St([q(),Te({label:q(),tip:X(q())})]),jD=Te({type:Qt("shape"),value:qe(Te({name:q(),title:di,valueType:Br(()=>Li)}))}),MD=Te({type:Qt("enums"),value:qe(q())});Te({type:Qt("array"),value:Br(()=>Li)});const AD=Te({type:Qt("array"),value:Br(()=>qe(Li))}),Li=St([El(["array","boolean","number","object","string"]),El(["component","expression","function"]),jD,MD,AD]),DD=St([q(),Te({componentName:q(),props:X(Ue()),initialValue:X(Ue()),component:X(Ue())})]),bs=Te({name:q(),title:di,valueType:Li,description:X(q()),defaultValue:Ue(),setters:X(qe(DD)),condition:X(Qv())});St([q(),Qv()]);St([q(),Te({name:q(),describe:X(q()),params:X(Te({name:q(),description:q()})),template:q()})]);const $D=Te({id:X(q()),title:q(),snapshot:St([q(),Ue()]),snapshotText:X(q()),description:X(q()),tags:X(qe(q())),groupName:X(q()),category:X(q()),schema:_D(RD(ui,["id"]),Te({componentName:X(q())}))});Te({componentName:q(),title:q(),screenshot:X(q()),icon:X(q()),tags:X(qe(q())),groupName:X(q()),category:X(q()),priority:X(Zv()),npm:X(tm),snippets:qe($D),props:qe(St([bs,Te({title:X(di),type:Qt("single"),content:bs}),Te({title:X(di),type:Qt("group"),content:qe(bs)})])),fixedProps:X(Ue()),isContainer:X(St([zr(),Te({placeholder:q(),width:q(),height:q()})])),disableEditorDragDom:X(Ue()),isLayout:X(zr()),rootSelector:X(q()),advanceCustom:X(Ue()),extra:X(To(Ue(),Ue()))});const nm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});nm.setterName="字符设置器";const rm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.InputNumber,{style:{width:"100%"},...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o)}})});rm.setterName="数字设置器";const Jc=(e=[])=>e.map(t=>typeof t=="string"?{componentName:t}:t);function ID(e){const{index:t,keyPaths:n,setters:r}=e,o={...e.style},a={[t]:e.value},i=h.useRef(null);return h.useEffect(()=>{var s;(s=i.current)==null||s.setFields({[t]:e.value})},[e.value]),w("div",{style:o,children:w(qc,{ref:i,name:String(t),initialValue:a||{},onValueChange:e.onValueChange,customSetterMap:{},children:w(cu,{suffix:w("div",{onClick:e.onDelete,style:{marginLeft:"8px",cursor:"pointer",fontSize:"12px"},children:w(nc,{})}),name:String(t),label:`元素${t}`,keyPaths:[...n,String(t)],setters:r})})})}function LD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h.useMemo(()=>r=>{t.forEach(o=>o(r))},t)}const Bi=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function oo(e){const t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function Qc(e){return"nodeType"in e}function gt(e){var t,n;return e?oo(e)?e:Qc(e)&&(t=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?t:window:window}function Zc(e){const{Document:t}=gt(e);return e instanceof t}function ra(e){return oo(e)?!1:e instanceof gt(e).HTMLElement}function BD(e){return e instanceof gt(e).SVGElement}function ao(e){return e?oo(e)?e.document:Qc(e)?Zc(e)?e:ra(e)?e.ownerDocument:document:document:document}const Wt=Bi?h.useLayoutEffect:h.useEffect;function eu(e){const t=h.useRef(e);return Wt(()=>{t.current=e}),h.useCallback(function(){for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return t.current==null?void 0:t.current(...r)},[])}function zD(){const e=h.useRef(null),t=h.useCallback((r,o)=>{e.current=setInterval(r,o)},[]),n=h.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,n]}function Go(e,t){t===void 0&&(t=[e]);const n=h.useRef(e);return Wt(()=>{n.current!==e&&(n.current=e)},t),n}function oa(e,t){const n=h.useRef();return h.useMemo(()=>{const r=e(n.current);return n.current=r,r},[...t])}function fi(e){const t=eu(e),n=h.useRef(null),r=h.useCallback(o=>{o!==n.current&&(t==null||t(o,n.current)),n.current=o},[]);return[n,r]}function Rl(e){const t=h.useRef();return h.useEffect(()=>{t.current=e},[e]),t.current}let ws={};function aa(e,t){return h.useMemo(()=>{if(t)return t;const n=ws[e]==null?0:ws[e]+1;return ws[e]=n,e+"-"+n},[e,t])}function om(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((a,i)=>{const s=Object.entries(i);for(const[l,c]of s){const u=a[l];u!=null&&(a[l]=u+e*c)}return a},{...t})}}const _r=om(1),Ko=om(-1);function VD(e){return"clientX"in e&&"clientY"in e}function tu(e){if(!e)return!1;const{KeyboardEvent:t}=gt(e.target);return t&&e instanceof t}function FD(e){if(!e)return!1;const{TouchEvent:t}=gt(e.target);return t&&e instanceof t}function Nl(e){if(FD(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return VD(e)?{x:e.clientX,y:e.clientY}:null}const Vr=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[Vr.Translate.toString(e),Vr.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),Ff="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function HD(e){return e.matches(Ff)?e:e.querySelector(Ff)}const UD={display:"none"};function WD(e){let{id:t,value:n}=e;return w("div",{id:t,style:UD,children:n})}const GD={position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};function KD(e){let{id:t,announcement:n}=e;return w("div",{id:t,style:GD,role:"status","aria-live":"assertive","aria-atomic":!0,children:n})}function qD(){const[e,t]=h.useState("");return{announce:h.useCallback(r=>{r!=null&&t(r)},[]),announcement:e}}const am=h.createContext(null);function YD(e){const t=h.useContext(am);h.useEffect(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function XD(){const[e]=h.useState(()=>new Set),t=h.useCallback(r=>(e.add(r),()=>e.delete(r)),[e]);return[h.useCallback(r=>{let{type:o,event:a}=r;e.forEach(i=>{var s;return(s=i[o])==null?void 0:s.call(i,a)})},[e]),t]}const JD={draggable:`
125
125
  To pick up a draggable item, press the space bar.
126
126
  While dragging, use the arrow keys to move the item.
127
127
  Press space again to drop the item in its new position, or press escape to cancel.
128
- `},qD={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function YD(e){let{announcements:t=qD,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=KD}=e;const{announce:a,announcement:i}=UD(),s=aa("DndLiveRegion"),[l,c]=g.useState(!1);if(g.useEffect(()=>{c(!0)},[]),WD(g.useMemo(()=>({onDragStart(d){let{active:f}=d;a(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:p}=d;t.onDragMove&&a(t.onDragMove({active:f,over:p}))},onDragOver(d){let{active:f,over:p}=d;a(t.onDragOver({active:f,over:p}))},onDragEnd(d){let{active:f,over:p}=d;a(t.onDragEnd({active:f,over:p}))},onDragCancel(d){let{active:f,over:p}=d;a(t.onDragCancel({active:f,over:p}))}}),[a,t])),!l)return null;const u=te(qe,{children:[w(FD,{id:r,value:o.draggable}),w(HD,{id:s,announcement:i})]});return n?Yt.createPortal(u,n):u}var Ge;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ge||(Ge={}));function pi(){}function Ff(e,t){return g.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function XD(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return g.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Wt=Object.freeze({x:0,y:0});function JD(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function QD(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function ZD(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Vf(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function om(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}const e$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Vf(t),a=[];for(const i of r){const{id:s}=i,l=n.get(s);if(l){const c=Vf(l),u=o.reduce((f,p,h)=>f+JD(c[h],p),0),d=Number((u/4).toFixed(4));a.push({id:s,data:{droppableContainer:i,value:d}})}}return a.sort(QD)};function t$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),i=o-r,s=a-n;if(r<o&&n<a){const l=t.width*t.height,c=e.width*e.height,u=i*s,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const n$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const a of r){const{id:i}=a,s=n.get(i);if(s){const l=t$(s,t);l>0&&o.push({id:i,data:{droppableContainer:a,value:l}})}}return o.sort(ZD)};function r$(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function am(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Wt}function o$(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return o.reduce((i,s)=>({...i,top:i.top+e*s.y,bottom:i.bottom+e*s.y,left:i.left+e*s.x,right:i.right+e*s.x}),{...n})}}const a$=o$(1);function i$(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function s$(e,t,n){const r=i$(t);if(!r)return e;const{scaleX:o,scaleY:a,x:i,y:s}=r,l=e.left-i-(1-o)*parseFloat(n),c=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const l$={ignoreTransform:!1};function io(e,t){t===void 0&&(t=l$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=gt(e),{transform:u,transformOrigin:d}=c(e);u&&(n=s$(n,u,d))}const{top:r,left:o,width:a,height:i,bottom:s,right:l}=n;return{top:r,left:o,width:a,height:i,bottom:s,right:l}}function Hf(e){return io(e,{ignoreTransform:!0})}function c$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function u$(e,t){return t===void 0&&(t=gt(e).getComputedStyle(e)),t.position==="fixed"}function d$(e,t){t===void 0&&(t=gt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?n.test(a):!1})}function zi(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Qc(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ra(o)||DD(o)||n.includes(o))return n;const{getComputedStyle:a}=gt(o),i=a(o);return o!==e&&d$(o,i)&&n.push(o),u$(o,i)?n:r(o.parentNode)}return e?r(e):n}function im(e){const[t]=zi(e,1);return t??null}function Ss(e){return!Bi||!e?null:oo(e)?e:Jc(e)?Qc(e)||e===ao(e).scrollingElement?window:ra(e)?e:null:null}function sm(e){return oo(e)?e.scrollX:e.scrollLeft}function lm(e){return oo(e)?e.scrollY:e.scrollTop}function Tl(e){return{x:sm(e),y:lm(e)}}var Xe;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Xe||(Xe={}));function cm(e){return!Bi||!e?!1:e===document.scrollingElement}function um(e){const t={x:0,y:0},n=cm(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:a,isBottom:i,isRight:s,maxScroll:r,minScroll:t}}const f$={x:.2,y:.2};function p$(e,t,n,r,o){let{top:a,left:i,right:s,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=f$);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=um(e),p={x:0,y:0},h={x:0,y:0},m={height:t.height*o.y,width:t.width*o.x};return!c&&a<=t.top+m.height?(p.y=Xe.Backward,h.y=r*Math.abs((t.top+m.height-a)/m.height)):!u&&l>=t.bottom-m.height&&(p.y=Xe.Forward,h.y=r*Math.abs((t.bottom-m.height-l)/m.height)),!f&&s>=t.right-m.width?(p.x=Xe.Forward,h.x=r*Math.abs((t.right-m.width-s)/m.width)):!d&&i<=t.left+m.width&&(p.x=Xe.Backward,h.x=r*Math.abs((t.left+m.width-i)/m.width)),{direction:p,speed:h}}function h$(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:i}=window;return{top:0,left:0,right:a,bottom:i,width:a,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function dm(e){return e.reduce((t,n)=>_r(t,Tl(n)),Wt)}function g$(e){return e.reduce((t,n)=>t+sm(n),0)}function v$(e){return e.reduce((t,n)=>t+lm(n),0)}function m$(e,t){if(t===void 0&&(t=io),!e)return;const{top:n,left:r,bottom:o,right:a}=t(e);im(e)&&(o<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const y$=[["x",["left","right"],g$],["y",["top","bottom"],v$]];class tu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=zi(n),o=dm(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,i,s]of y$)for(const l of i)Object.defineProperty(this,l,{get:()=>{const c=s(r),u=o[a]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Po{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function b$(e){const{EventTarget:t}=gt(e);return e instanceof t?e:ao(e)}function xs(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Nt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Nt||(Nt={}));function Uf(e){e.preventDefault()}function w$(e){e.stopPropagation()}var ue;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(ue||(ue={}));const fm={start:[ue.Space,ue.Enter],cancel:[ue.Esc],end:[ue.Space,ue.Enter]},S$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ue.Right:return{...n,x:n.x+25};case ue.Left:return{...n,x:n.x-25};case ue.Down:return{...n,y:n.y+25};case ue.Up:return{...n,y:n.y-25}}};class nu{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Po(ao(n)),this.windowListeners=new Po(gt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Nt.Resize,this.handleCancel),this.windowListeners.add(Nt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Nt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&m$(r),n(Wt)}handleKeyDown(t){if(eu(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:a=fm,coordinateGetter:i=S$,scrollBehavior:s="smooth"}=o,{code:l}=t;if(a.end.includes(l)){this.handleEnd(t);return}if(a.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:Wt;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(t,{active:n,context:r.current,currentCoordinates:u});if(d){const f=Ko(d,u),p={x:0,y:0},{scrollableAncestors:h}=r.current;for(const m of h){const b=t.code,{isTop:y,isRight:S,isLeft:E,isBottom:x,maxScroll:v,minScroll:O}=um(m),C=h$(m),R={x:Math.min(b===ue.Right?C.right-C.width/2:C.right,Math.max(b===ue.Right?C.left:C.left+C.width/2,d.x)),y:Math.min(b===ue.Down?C.bottom-C.height/2:C.bottom,Math.max(b===ue.Down?C.top:C.top+C.height/2,d.y))},N=b===ue.Right&&!S||b===ue.Left&&!E,T=b===ue.Down&&!x||b===ue.Up&&!y;if(N&&R.x!==d.x){const k=m.scrollLeft+f.x,j=b===ue.Right&&k<=v.x||b===ue.Left&&k>=O.x;if(j&&!f.y){m.scrollTo({left:k,behavior:s});return}j?p.x=m.scrollLeft-k:p.x=b===ue.Right?m.scrollLeft-v.x:m.scrollLeft-O.x,p.x&&m.scrollBy({left:-p.x,behavior:s});break}else if(T&&R.y!==d.y){const k=m.scrollTop+f.y,j=b===ue.Down&&k<=v.y||b===ue.Up&&k>=O.y;if(j&&!f.x){m.scrollTo({top:k,behavior:s});return}j?p.y=m.scrollTop-k:p.y=b===ue.Down?m.scrollTop-v.y:m.scrollTop-O.y,p.y&&m.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,_r(Ko(d,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}nu.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=fm,onActivation:o}=t,{active:a}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Wf(e){return!!(e&&"distance"in e)}function Gf(e){return!!(e&&"delay"in e)}class ru{constructor(t,n,r){var o;r===void 0&&(r=b$(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:i}=a;this.props=t,this.events=n,this.document=ao(i),this.documentListeners=new Po(this.document),this.listeners=new Po(r),this.windowListeners=new Po(gt(i)),this.initialCoordinates=(o=Nl(a))!=null?o:Wt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Nt.Resize,this.handleCancel),this.windowListeners.add(Nt.DragStart,Uf),this.windowListeners.add(Nt.VisibilityChange,this.handleCancel),this.windowListeners.add(Nt.ContextMenu,Uf),this.documentListeners.add(Nt.Keydown,this.handleKeydown),n){if(Wf(n))return;if(Gf(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Nt.Click,w$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Nt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:a}=this,{onMove:i,options:{activationConstraint:s}}=a;if(!o)return;const l=(n=Nl(t))!=null?n:Wt,c=Ko(o,l);if(!r&&s){if(Gf(s))return xs(c,s.tolerance)?this.handleCancel():void 0;if(Wf(s))return s.tolerance!=null&&xs(c,s.tolerance)?this.handleCancel():xs(c,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),i(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const x$={move:{name:"pointermove"},end:{name:"pointerup"}};class ou extends ru{constructor(t){const{event:n}=t,r=ao(n.target);super(t,x$,r)}}ou.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const C$={move:{name:"mousemove"},end:{name:"mouseup"}};var Pl;(function(e){e[e.RightClick=2]="RightClick"})(Pl||(Pl={}));class O$ extends ru{constructor(t){super(t,C$,ao(t.event.target))}}O$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Pl.RightClick?!1:(r==null||r({event:n}),!0)}}];const Cs={move:{name:"touchmove"},end:{name:"touchend"}};class E$ extends ru{constructor(t){super(t,Cs)}static setup(){return window.addEventListener(Cs.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Cs.move.name,t)};function t(){}}}E$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var ko;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ko||(ko={}));var hi;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(hi||(hi={}));function _$(e){let{acceleration:t,activator:n=ko.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:i=5,order:s=hi.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=N$({delta:d,disabled:!a}),[h,m]=$D(),b=g.useRef({x:0,y:0}),y=g.useRef({x:0,y:0}),S=g.useMemo(()=>{switch(n){case ko.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ko.DraggableRect:return o}},[n,o,l]),E=g.useRef(null),x=g.useCallback(()=>{const O=E.current;if(!O)return;const C=b.current.x*y.current.x,R=b.current.y*y.current.y;O.scrollBy(C,R)},[]),v=g.useMemo(()=>s===hi.TreeOrder?[...c].reverse():c,[s,c]);g.useEffect(()=>{if(!a||!c.length||!S){m();return}for(const O of v){if((r==null?void 0:r(O))===!1)continue;const C=c.indexOf(O),R=u[C];if(!R)continue;const{direction:N,speed:T}=p$(O,R,S,t,f);for(const k of["x","y"])p[k][N[k]]||(T[k]=0,N[k]=0);if(T.x>0||T.y>0){m(),E.current=O,h(x,i),b.current=T,y.current=N;return}}b.current={x:0,y:0},y.current={x:0,y:0},m()},[t,x,r,m,a,i,JSON.stringify(S),JSON.stringify(p),h,c,v,u,JSON.stringify(f)])}const R$={x:{[Xe.Backward]:!1,[Xe.Forward]:!1},y:{[Xe.Backward]:!1,[Xe.Forward]:!1}};function N$(e){let{delta:t,disabled:n}=e;const r=Rl(t);return oa(o=>{if(n||!r||!o)return R$;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Xe.Backward]:o.x[Xe.Backward]||a.x===-1,[Xe.Forward]:o.x[Xe.Forward]||a.x===1},y:{[Xe.Backward]:o.y[Xe.Backward]||a.y===-1,[Xe.Forward]:o.y[Xe.Forward]||a.y===1}}},[n,t,r])}function T$(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return oa(o=>{var a;return t===null?null:(a=r??o)!=null?a:null},[r,t])}function P$(e,t){return g.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,a=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...a]},[]),[e,t])}var qo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(qo||(qo={}));var kl;(function(e){e.Optimized="optimized"})(kl||(kl={}));const Kf=new Map;function k$(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,i]=g.useState(null),{frequency:s,measure:l,strategy:c}=o,u=g.useRef(e),d=b(),f=Go(d),p=g.useCallback(function(y){y===void 0&&(y=[]),!f.current&&i(S=>S===null?y:S.concat(y.filter(E=>!S.includes(E))))},[f]),h=g.useRef(null),m=oa(y=>{if(d&&!n)return Kf;if(!y||y===Kf||u.current!==e||a!=null){const S=new Map;for(let E of e){if(!E)continue;if(a&&a.length>0&&!a.includes(E.id)&&E.rect.current){S.set(E.id,E.rect.current);continue}const x=E.node.current,v=x?new tu(l(x),x):null;E.rect.current=v,v&&S.set(E.id,v)}return S}return y},[e,a,n,d,l]);return g.useEffect(()=>{u.current=e},[e]),g.useEffect(()=>{d||p()},[n,d]),g.useEffect(()=>{a&&a.length>0&&i(null)},[JSON.stringify(a)]),g.useEffect(()=>{d||typeof s!="number"||h.current!==null||(h.current=setTimeout(()=>{p(),h.current=null},s))},[s,d,p,...r]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:a!=null};function b(){switch(c){case qo.Always:return!1;case qo.BeforeDragging:return n;default:return!n}}}function pm(e,t){return oa(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function j$(e,t){return pm(e,t)}function M$(e){let{callback:t,disabled:n}=e;const r=Zc(t),o=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Fi(e){let{callback:t,disabled:n}=e;const r=Zc(t),o=g.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return g.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function A$(e){return new tu(io(e),e)}function qf(e,t,n){t===void 0&&(t=A$);const[r,o]=g.useReducer(s,null),a=M$({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),i=Fi({callback:o});return Ut(()=>{o(),e?(i==null||i.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(i==null||i.disconnect(),a==null||a.disconnect())},[e]),r;function s(l){if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u}}function D$(e){const t=pm(e);return am(e,t)}const Yf=[];function $$(e){const t=g.useRef(e),n=oa(r=>e?r&&r!==Yf&&e&&t.current&&e.parentNode===t.current.parentNode?r:zi(e):Yf,[e]);return g.useEffect(()=>{t.current=e},[e]),n}function I$(e){const[t,n]=g.useState(null),r=g.useRef(e),o=g.useCallback(a=>{const i=Ss(a.target);i&&n(s=>s?(s.set(i,Tl(i)),new Map(s)):null)},[]);return g.useEffect(()=>{const a=r.current;if(e!==a){i(a);const s=e.map(l=>{const c=Ss(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,Tl(c)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(a)};function i(s){s.forEach(l=>{const c=Ss(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),g.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,i)=>_r(a,i),Wt):dm(e):Wt,[e,t])}function Xf(e,t){t===void 0&&(t=[]);const n=g.useRef(null);return g.useEffect(()=>{n.current=null},t),g.useEffect(()=>{const r=e!==Wt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Ko(e,n.current):Wt}function L$(e){g.useEffect(()=>{if(!Bi)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function B$(e,t){return g.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:a}=r;return n[o]=i=>{a(i,t)},n},{}),[e,t])}function hm(e){return g.useMemo(()=>e?c$(e):null,[e])}const Os=[];function z$(e,t){t===void 0&&(t=io);const[n]=e,r=hm(n?gt(n):null),[o,a]=g.useReducer(s,Os),i=Fi({callback:a});return e.length>0&&o===Os&&a(),Ut(()=>{e.length?e.forEach(l=>i==null?void 0:i.observe(l)):(i==null||i.disconnect(),a())},[e]),o;function s(){return e.length?e.map(l=>cm(l)?r:new tu(t(l),l)):Os}}function F$(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ra(t)?t:e}function V$(e){let{measure:t}=e;const[n,r]=g.useState(null),o=g.useCallback(c=>{for(const{target:u}of c)if(ra(u)){r(d=>{const f=t(u);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),a=Fi({callback:o}),i=g.useCallback(c=>{const u=F$(c);a==null||a.disconnect(),u&&(a==null||a.observe(u)),r(u?t(u):null)},[t,a]),[s,l]=fi(i);return g.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const H$=[{sensor:ou,options:{}},{sensor:nu,options:{}}],U$={current:{}},Ka={draggable:{measure:Hf},droppable:{measure:Hf,strategy:qo.WhileDragging,frequency:kl.Optimized},dragOverlay:{measure:io}};class jo extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const W$={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:pi},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ka,measureDroppableContainers:pi,windowRect:null,measuringScheduled:!1},G$={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:pi,draggableNodes:new Map,over:null,measureDroppableContainers:pi},Vi=g.createContext(G$),gm=g.createContext(W$);function K$(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jo}}}function q$(e,t){switch(t.type){case Ge.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ge.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Ge.DragEnd:case Ge.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ge.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new jo(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Ge.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const i=new jo(e.droppable.containers);return i.set(n,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case Ge.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new jo(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Y$(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=g.useContext(Vi),a=Rl(r),i=Rl(n==null?void 0:n.id);return g.useEffect(()=>{if(!t&&!r&&a&&i!=null){if(!eu(a)||document.activeElement===a.target)return;const s=o.get(i);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=BD(u);if(d){d.focus();break}}})}},[r,t,o,i,a]),null}function X$(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...r}),n):n}function J$(e){return g.useMemo(()=>({draggable:{...Ka.draggable,...e==null?void 0:e.draggable},droppable:{...Ka.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ka.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function Q$(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=g.useRef(!1),{x:i,y:s}=typeof o=="boolean"?{x:o,y:o}:o;Ut(()=>{if(!i&&!s||!t){a.current=!1;return}if(a.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=am(u,r);if(i||(d.x=0),s||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=im(c);f&&f.scrollBy({top:d.y,left:d.x})}},[t,i,s,r,n])}const vm=g.createContext({...Wt,scaleX:1,scaleY:1});var En;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(En||(En={}));const Jf=g.memo(function(t){var n,r,o,a;let{id:i,accessibility:s,autoScroll:l=!0,children:c,sensors:u=H$,collisionDetection:d=n$,measuring:f,modifiers:p,...h}=t;const m=g.useReducer(q$,void 0,K$),[b,y]=m,[S,E]=GD(),[x,v]=g.useState(En.Uninitialized),O=x===En.Initialized,{draggable:{active:C,nodes:R,translate:N},droppable:{containers:T}}=b,k=C?R.get(C):null,j=g.useRef({initial:null,translated:null}),I=g.useMemo(()=>{var Re;return C!=null?{id:C,data:(Re=k==null?void 0:k.data)!=null?Re:U$,rect:j}:null},[C,k]),M=g.useRef(null),[P,D]=g.useState(null),[V,ne]=g.useState(null),ee=Go(h,Object.values(h)),de=aa("DndDescribedBy",i),A=g.useMemo(()=>T.getEnabled(),[T]),B=J$(f),{droppableRects:q,measureDroppableContainers:Q,measuringScheduled:ie}=k$(A,{dragging:O,dependencies:[N.x,N.y],config:B.droppable}),le=T$(R,C),Qe=g.useMemo(()=>V?Nl(V):null,[V]),De=va(),ze=j$(le,B.draggable.measure);Q$({activeNode:C?R.get(C):null,config:De.layoutShiftCompensation,initialRect:ze,measure:B.draggable.measure});const re=qf(le,B.draggable.measure,ze),je=qf(le?le.parentElement:null),z=g.useRef({activatorEvent:null,active:null,activeNode:le,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Ye=T.getNodeFor((n=z.current.over)==null?void 0:n.id),$e=V$({measure:B.dragOverlay.measure}),Me=(r=$e.nodeRef.current)!=null?r:le,vt=O?(o=$e.rect)!=null?o:re:null,an=!!($e.nodeRef.current&&$e.rect),sn=D$(an?null:re),Te=hm(Me?gt(Me):null),ve=$$(O?Ye??le:null),Pe=z$(ve),We=X$(p,{transform:{x:N.x-sn.x,y:N.y-sn.y,scaleX:1,scaleY:1},activatorEvent:V,active:I,activeNodeRect:re,containerNodeRect:je,draggingNodeRect:vt,over:z.current.over,overlayNodeRect:$e.rect,scrollableAncestors:ve,scrollableAncestorRects:Pe,windowRect:Te}),Gt=Qe?_r(Qe,N):null,ua=I$(ve),da=Xf(ua),fa=Xf(ua,[re]),Ot=_r(We,da),xn=vt?a$(vt,We):null,Cn=I&&xn?d({active:I,collisionRect:xn,droppableRects:q,droppableContainers:A,pointerCoordinates:Gt}):null,co=om(Cn,"id"),[Et,pa]=g.useState(null),qi=an?We:_r(We,fa),Yi=r$(qi,(a=Et==null?void 0:Et.rect)!=null?a:null,re),ha=g.useCallback((Re,Ze)=>{let{sensor:et,options:Mt}=Ze;if(M.current==null)return;const lt=R.get(M.current);if(!lt)return;const ct=Re.nativeEvent,_t=new et({active:M.current,activeNode:lt,event:ct,options:Mt,context:z,onStart(ut){const $n=M.current;if($n==null)return;const In=R.get($n);if(!In)return;const{onDragStart:Ln}=ee.current,cr={active:{id:$n,data:In.data,rect:j}};Yt.unstable_batchedUpdates(()=>{Ln==null||Ln(cr),v(En.Initializing),y({type:Ge.DragStart,initialCoordinates:ut,active:$n}),S({type:"onDragStart",event:cr})})},onMove(ut){y({type:Ge.DragMove,coordinates:ut})},onEnd:ln(Ge.DragEnd),onCancel:ln(Ge.DragCancel)});Yt.unstable_batchedUpdates(()=>{D(_t),ne(Re.nativeEvent)});function ln(ut){return async function(){const{active:In,collisions:Ln,over:cr,scrollAdjustedTranslate:ma}=z.current;let Bn=null;if(In&&ma){const{cancelDrop:zn}=ee.current;Bn={activatorEvent:ct,active:In,collisions:Ln,delta:ma,over:cr},ut===Ge.DragEnd&&typeof zn=="function"&&await Promise.resolve(zn(Bn))&&(ut=Ge.DragCancel)}M.current=null,Yt.unstable_batchedUpdates(()=>{y({type:ut}),v(En.Uninitialized),pa(null),D(null),ne(null);const zn=ut===Ge.DragEnd?"onDragEnd":"onDragCancel";if(Bn){const _=ee.current[zn];_==null||_(Bn),S({type:zn,event:Bn})}})}}},[R]),Xi=g.useCallback((Re,Ze)=>(et,Mt)=>{const lt=et.nativeEvent,ct=R.get(Mt);if(M.current!==null||!ct||lt.dndKit||lt.defaultPrevented)return;const _t={active:ct};Re(et,Ze.options,_t)===!0&&(lt.dndKit={capturedBy:Ze.sensor},M.current=Mt,ha(et,Ze))},[R,ha]),ga=P$(u,Xi);L$(u),Ut(()=>{re&&x===En.Initializing&&v(En.Initialized)},[re,x]),g.useEffect(()=>{const{onDragMove:Re}=ee.current,{active:Ze,activatorEvent:et,collisions:Mt,over:lt}=z.current;if(!Ze||!et)return;const ct={active:Ze,activatorEvent:et,collisions:Mt,delta:{x:Ot.x,y:Ot.y},over:lt};Yt.unstable_batchedUpdates(()=>{Re==null||Re(ct),S({type:"onDragMove",event:ct})})},[Ot.x,Ot.y]),g.useEffect(()=>{const{active:Re,activatorEvent:Ze,collisions:et,droppableContainers:Mt,scrollAdjustedTranslate:lt}=z.current;if(!Re||M.current==null||!Ze||!lt)return;const{onDragOver:ct}=ee.current,_t=Mt.get(co),ln=_t&&_t.rect.current?{id:_t.id,rect:_t.rect.current,data:_t.data,disabled:_t.disabled}:null,ut={active:Re,activatorEvent:Ze,collisions:et,delta:{x:lt.x,y:lt.y},over:ln};Yt.unstable_batchedUpdates(()=>{pa(ln),ct==null||ct(ut),S({type:"onDragOver",event:ut})})},[co]),Ut(()=>{z.current={activatorEvent:V,active:I,activeNode:le,collisionRect:xn,collisions:Cn,droppableRects:q,draggableNodes:R,draggingNode:Me,draggingNodeRect:vt,droppableContainers:T,over:Et,scrollableAncestors:ve,scrollAdjustedTranslate:Ot},j.current={initial:vt,translated:xn}},[I,le,Cn,xn,R,Me,vt,q,T,Et,ve,Ot]),_$({...De,delta:N,draggingRect:xn,pointerCoordinates:Gt,scrollableAncestors:ve,scrollableAncestorRects:Pe});const Ji=g.useMemo(()=>({active:I,activeNode:le,activeNodeRect:re,activatorEvent:V,collisions:Cn,containerNodeRect:je,dragOverlay:$e,draggableNodes:R,droppableContainers:T,droppableRects:q,over:Et,measureDroppableContainers:Q,scrollableAncestors:ve,scrollableAncestorRects:Pe,measuringConfiguration:B,measuringScheduled:ie,windowRect:Te}),[I,le,re,V,Cn,je,$e,R,T,q,Et,Q,ve,Pe,B,ie,Te]),uo=g.useMemo(()=>({activatorEvent:V,activators:ga,active:I,activeNodeRect:re,ariaDescribedById:{draggable:de},dispatch:y,draggableNodes:R,over:Et,measureDroppableContainers:Q}),[V,ga,I,re,y,de,R,Et,Q]);return te(rm.Provider,{value:E,children:[te(Vi.Provider,{value:uo,children:[w(gm.Provider,{value:Ji,children:w(vm.Provider,{value:Yi,children:c})}),w(Y$,{disabled:(s==null?void 0:s.restoreFocus)===!1})]}),w(YD,{...s,hiddenTextDescribedById:de})]});function va(){const Re=(P==null?void 0:P.autoScrollEnabled)===!1,Ze=typeof l=="object"?l.enabled===!1:l===!1,et=O&&!Re&&!Ze;return typeof l=="object"?{...l,enabled:et}:{enabled:et}}}),Z$=g.createContext(null),Qf="button",e8="Droppable";function mm(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=aa(e8),{activators:i,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=g.useContext(Vi),{role:p=Qf,roleDescription:h="draggable",tabIndex:m=0}=o??{},b=(l==null?void 0:l.id)===t,y=g.useContext(b?vm:Z$),[S,E]=fi(),[x,v]=fi(),O=B$(i,t),C=Go(n);Ut(()=>(d.set(t,{id:t,key:a,node:S,activatorNode:x,data:C}),()=>{const N=d.get(t);N&&N.key===a&&d.delete(t)}),[d,t]);const R=g.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":b&&p===Qf?!0:void 0,"aria-roledescription":h,"aria-describedby":u.draggable}),[r,p,m,b,h,u.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:R,isDragging:b,listeners:r?void 0:O,node:S,over:f,setNodeRef:E,setActivatorNodeRef:v,transform:y}}function t8(){return g.useContext(gm)}const n8="Droppable",r8={timeout:25};function o8(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=aa(n8),{active:i,dispatch:s,over:l,measureDroppableContainers:c}=g.useContext(Vi),u=g.useRef({disabled:n}),d=g.useRef(!1),f=g.useRef(null),p=g.useRef(null),{disabled:h,updateMeasurementsFor:m,timeout:b}={...r8,...o},y=Go(m??r),S=g.useCallback(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),p.current=null},b)},[b]),E=Fi({callback:S,disabled:h||!i}),x=g.useCallback((R,N)=>{E&&(N&&(E.unobserve(N),d.current=!1),R&&E.observe(R))},[E]),[v,O]=fi(x),C=Go(t);return g.useEffect(()=>{!E||!v.current||(E.disconnect(),d.current=!1,E.observe(v.current))},[v,E]),Ut(()=>(s({type:Ge.RegisterDroppable,element:{id:r,key:a,disabled:n,node:v,rect:f,data:C}}),()=>s({type:Ge.UnregisterDroppable,key:a,id:r})),[r]),g.useEffect(()=>{n!==u.current.disabled&&(s({type:Ge.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:i,rect:f,isOver:(l==null?void 0:l.id)===r,node:v,over:l,setNodeRef:O}}function au(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function a8(e,t){return e.reduce((n,r,o)=>{const a=t.get(r);return a&&(n[o]=a),n},Array(e.length))}function ka(e){return e!==null&&e>=0}function i8(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function s8(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const ym=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const a=au(t,r,n),i=t[o],s=a[o];return!s||!i?null:{x:s.left-i.left,y:s.top-i.top,scaleX:s.width/i.width,scaleY:s.height/i.height}},bm="Sortable",wm=g.createContext({activeIndex:-1,containerId:bm,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:ym,disabled:{draggable:!1,droppable:!1}});function l8(e){let{children:t,id:n,items:r,strategy:o=ym,disabled:a=!1}=e;const{active:i,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=t8(),d=aa(bm,n),f=s.rect!==null,p=g.useMemo(()=>r.map(O=>typeof O=="object"&&"id"in O?O.id:O),[r]),h=i!=null,m=i?p.indexOf(i.id):-1,b=c?p.indexOf(c.id):-1,y=g.useRef(p),S=!i8(p,y.current),E=b!==-1&&m===-1||S,x=s8(a);Ut(()=>{S&&h&&u(p)},[S,p,h,u]),g.useEffect(()=>{y.current=p},[p]);const v=g.useMemo(()=>({activeIndex:m,containerId:d,disabled:x,disableTransforms:E,items:p,overIndex:b,useDragOverlay:f,sortedRects:a8(p,l),strategy:o}),[m,d,x.draggable,x.droppable,E,p,b,l,f,o]);return w(wm.Provider,{value:v,children:t})}const c8=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return au(n,r,o).indexOf(t)},u8=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:a,newIndex:i,previousItems:s,previousContainerId:l,transition:c}=e;return!c||!r||s!==a&&o===i?!1:n?!0:i!==o&&t===l},d8={duration:200,easing:"ease"},Sm="transform",f8=Fr.Transition.toString({property:Sm,duration:0,easing:"linear"}),p8={roleDescription:"sortable"};function h8(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,i]=g.useState(null),s=g.useRef(n);return Ut(()=>{if(!t&&n!==s.current&&r.current){const l=o.current;if(l){const c=io(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&i(u)}}n!==s.current&&(s.current=n)},[t,n,r,o]),g.useEffect(()=>{a&&i(null)},[a]),a}function g8(e){let{animateLayoutChanges:t=u8,attributes:n,disabled:r,data:o,getNewIndex:a=c8,id:i,strategy:s,resizeObserverConfig:l,transition:c=d8}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:h,sortedRects:m,overIndex:b,useDragOverlay:y,strategy:S}=g.useContext(wm),E=v8(r,p),x=u.indexOf(i),v=g.useMemo(()=>({sortable:{containerId:d,index:x,items:u},...o}),[d,o,x,u]),O=g.useMemo(()=>u.slice(u.indexOf(i)),[u,i]),{rect:C,node:R,isOver:N,setNodeRef:T}=o8({id:i,data:v,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:O,...l}}),{active:k,activatorEvent:j,activeNodeRect:I,attributes:M,setNodeRef:P,listeners:D,isDragging:V,over:ne,setActivatorNodeRef:ee,transform:de}=mm({id:i,data:v,attributes:{...p8,...n},disabled:E.draggable}),A=AD(T,P),B=!!k,q=B&&!h&&ka(f)&&ka(b),Q=!y&&V,ie=Q&&q?de:null,Qe=q?ie??(s??S)({rects:m,activeNodeRect:I,activeIndex:f,overIndex:b,index:x}):null,De=ka(f)&&ka(b)?a({id:i,items:u,activeIndex:f,overIndex:b}):x,ze=k==null?void 0:k.id,re=g.useRef({activeId:ze,items:u,newIndex:De,containerId:d}),je=u!==re.current.items,z=t({active:k,containerId:d,isDragging:V,isSorting:B,id:i,index:x,items:u,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:c,wasDragging:re.current.activeId!=null}),Ye=h8({disabled:!z,index:x,node:R,rect:C});return g.useEffect(()=>{B&&re.current.newIndex!==De&&(re.current.newIndex=De),d!==re.current.containerId&&(re.current.containerId=d),u!==re.current.items&&(re.current.items=u)},[B,De,d,u]),g.useEffect(()=>{if(ze===re.current.activeId)return;if(ze&&!re.current.activeId){re.current.activeId=ze;return}const Me=setTimeout(()=>{re.current.activeId=ze},50);return()=>clearTimeout(Me)},[ze]),{active:k,activeIndex:f,attributes:M,data:v,rect:C,index:x,newIndex:De,items:u,isOver:N,isSorting:B,isDragging:V,listeners:D,node:R,overIndex:b,over:ne,setNodeRef:A,setActivatorNodeRef:ee,setDroppableNodeRef:T,setDraggableNodeRef:P,transform:Ye??Qe,transition:$e()};function $e(){if(Ye||je&&re.current.newIndex===x)return f8;if(!(Q&&!eu(j)||!c)&&(B||z))return Fr.Transition.toString({...c,property:Sm})}}function v8(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function gi(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const m8=[ue.Down,ue.Right,ue.Up,ue.Left],y8=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:a,over:i,scrollableAncestors:s}}=t;if(m8.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const f=o.get(d.id);if(f)switch(e.code){case ue.Down:r.top<f.top&&l.push(d);break;case ue.Up:r.top>f.top&&l.push(d);break;case ue.Left:r.left>f.left&&l.push(d);break;case ue.Right:r.left<f.left&&l.push(d);break}});const c=e$({active:n,collisionRect:r,droppableRects:o,droppableContainers:l,pointerCoordinates:null});let u=om(c,"id");if(u===(i==null?void 0:i.id)&&c.length>1&&(u=c[1].id),u!=null){const d=a.get(n.id),f=a.get(u),p=f?o.get(f.id):null,h=f==null?void 0:f.node.current;if(h&&p&&d&&f){const b=zi(h).some((O,C)=>s[C]!==O),y=xm(d,f),S=b8(d,f),E=b||!y?{x:0,y:0}:{x:S?r.width-p.width:0,y:S?r.height-p.height:0},x={x:p.left,y:p.top};return E.x&&E.y?x:Ko(x,E)}}}};function xm(e,t){return!gi(e)||!gi(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function b8(e,t){return!gi(e)||!gi(t)||!xm(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const w8=e=>{let{transform:t}=e;return{...t,x:0}},S8="_dragItem_xzliq_2",x8="_sortModalBox_xzliq_13",C8="_addOneBtn_xzliq_19",iu={dragItem:S8,sortModalBox:x8,addOneBtn:C8},O8=({list:e,onValueChange:t,keyPaths:n,label:r,sortLabelKey:o,...a})=>{const[i,s]=g.useState([]);g.useEffect(()=>{const f=e.map((p,h)=>({val:p,oldIndex:h,id:ye.getRandomStr()}));s(f)},[a.open]);const l=XD(Ff(ou,{activationConstraint:{distance:15}}),Ff(nu,{coordinateGetter:y8}));function c(f){const{active:p,over:h}=f;if(p.id!==(h==null?void 0:h.id)){const m=i.findIndex(E=>E.id===(p==null?void 0:p.id)),b=i.findIndex(E=>E.id===(h==null?void 0:h.id)),y=au(i,m,b),S=y.map(E=>E.val);s(y),t==null||t(S)}}const[u,d]=g.useState({x:0,y:0,scaleX:1,scaleY:1});return w(Y.Modal,{...a,title:`Sort: ${r} [${n.join(".")}]`,maskStyle:{backgroundColor:"rgba(0, 0, 0, 0.1)"},modalRender:f=>w(Jf,{sensors:l,onDragEnd:({delta:p})=>{const h={...u,...p,x:u.x+((p==null?void 0:p.x)||0),y:u.y+((p==null?void 0:p.y)||0)};d(h)},children:w(E8,{modal:f,transform:u})}),children:w("div",{className:iu.sortModalBox,children:w(Jf,{sensors:l,onDragEnd:c,modifiers:[w8],children:w(l8,{items:i,children:i.map(({id:f,val:p},h)=>w(_8,{id:f,index:h,label:p[o||""]},f))})})})})},E8=({modal:e,transform:t})=>{const n=g.useRef(ye.getRandomStr()),{setNodeRef:r,attributes:o,listeners:a,transform:i}=mm({id:n.current}),s={...t,...i,x:t.x+((i==null?void 0:i.x)||0),y:t.y+((i==null?void 0:i.y)||0)};return w("div",{ref:r,style:{pointerEvents:"auto",transform:Fr.Transform.toString(s)},...o,...a,children:e})},_8=e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:a}=g8({id:e.id}),i={transform:Fr.Transform.toString(o),transition:a},s=e.label||`Ele ${e.index}`;return w("div",{className:iu.dragItem,ref:r,style:i,...t,...n,children:s})};function R8(e){return Array.isArray(e)?e:[]}const Cm=({onValueChange:e,setterContext:t,item:{setters:n,initialValue:r},sortLabelKey:o,initialValue:a,...i})=>{const{keyPaths:s,label:l}=t,c=g.useMemo(()=>R8(i.value??a),[i.value]),[u,d]=g.useState(!1),f=Xc(n||[{component:"StringSetter"}]);return g.useEffect(()=>{var p;t.setCollapseHeaderExt&&((p=t.setCollapseHeaderExt)==null||p.call(t,w(Y.Button,{type:"text",size:"small",style:{color:"gray"},onClick:h=>{h.preventDefault(),h.stopPropagation(),d(!0)},children:"sort"})))},[]),te(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[c.map((p,h)=>w(MD,{style:{paddingBottom:"10px"},index:h,keyPaths:s,value:p,onValueChange:m=>{c[h]=m[h],e==null||e([...c])},setters:f,onDelete:()=>{const m=[...c];m.splice(h),e==null||e(m)}},h)),w(Y.Button,{className:iu.addOneBtn,size:"small",onClick:()=>{const p=[...c];e==null||e([...p,r??""])},children:"Add One"}),w(O8,{label:l,sortLabelKey:o,onValueChange:p=>{e==null||e([...p])},open:u,list:c,keyPaths:s,onCancel:()=>{d(!1)},onOk:()=>{d(!1)}})]})};Cm.setterName="数组设置器";const Om=({onValueChange:e,elements:t,value:n,setterContext:r,initialValue:o})=>{const{keyPaths:a}=r,i=g.useRef(null);return g.useEffect(()=>{var s;(s=i.current)==null||s.setFields(n||{})},[n]),w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Kc,{ref:i,name:a.join("."),initialValue:n||o||{},onValueChange:s=>{e==null||e(s)},customSetterMap:{},children:t.map((s,l)=>{const c=Xc(s.setters),u=ye.getMTitle(s.title),d=ye.getMTitleTip(s.title);return w("div",{children:w(lu,{name:s.name,label:u,tips:d,condition:s.condition,keyPaths:[...a,s.name],setters:c})},l)})})})};Om.setterName="对象设置器";const Em=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var o;return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input.TextArea,{...r,value:((o=r.value)==null?void 0:o.value)??(t||""),onChange:a=>{var i;(i=r.onChange)==null||i.call(r,a),e==null||e({type:ye.CNodePropsTypeEnum.EXPRESSION,value:a.target.value})}})})};Em.setterName="表达式设置器";const _m=({onValueChange:e,initialValue:t,setterContext:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Switch,{...r,checked:r.value??t,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});_m.setterName="Bool 设置器";const Rm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Select,{showSearch:!0,style:{width:"100%"},...r,value:r.value??n,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});Rm.setterName="选择设置器";function N8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zf(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ep(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Zf(Object(n),!0).forEach(function(r){N8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zf(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function T8(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function P8(e,t){if(e==null)return{};var n=T8(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function k8(e,t){return j8(e)||M8(e,t)||A8(e,t)||D8()}function j8(e){if(Array.isArray(e))return e}function M8(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,a=void 0;try{for(var i=e[Symbol.iterator](),s;!(r=(s=i.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw a}}return n}}function A8(e,t){if(e){if(typeof e=="string")return tp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tp(e,t)}}function tp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function D8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
129
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function np(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function rp(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?np(Object(n),!0).forEach(function(r){$8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):np(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function I8(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,a){return a(o)},r)}}function xo(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function vi(e){return{}.toString.call(e).includes("Object")}function L8(e){return!Object.keys(e).length}function Yo(e){return typeof e=="function"}function B8(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function z8(e,t){return vi(t)||Nn("changeType"),Object.keys(t).some(function(n){return!B8(e,n)})&&Nn("changeField"),t}function F8(e){Yo(e)||Nn("selectorType")}function V8(e){Yo(e)||vi(e)||Nn("handlerType"),vi(e)&&Object.values(e).some(function(t){return!Yo(t)})&&Nn("handlersType")}function H8(e){e||Nn("initialIsRequired"),vi(e)||Nn("initialType"),L8(e)&&Nn("initialContent")}function U8(e,t){throw new Error(e[t]||e.default)}var W8={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Nn=xo(U8)(W8),ja={changes:z8,selector:F8,handler:V8,initial:H8};function G8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ja.initial(e),ja.handler(t);var n={current:e},r=xo(Y8)(n,t),o=xo(q8)(n),a=xo(ja.changes)(e),i=xo(K8)(n);function s(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return ja.selector(c),c(n.current)}function l(c){I8(r,o,a,i)(c)}return[s,l]}function K8(e,t){return Yo(t)?t(e.current):t}function q8(e,t){return e.current=rp(rp({},e.current),t),t}function Y8(e,t,n){return Yo(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var X8={create:G8},J8={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function Q8(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function Z8(e){return{}.toString.call(e).includes("Object")}function eI(e){return e||op("configIsRequired"),Z8(e)||op("configType"),e.urls?(tI(),{paths:{vs:e.urls.monacoBase}}):e}function tI(){console.warn(Nm.deprecation)}function nI(e,t){throw new Error(e[t]||e.default)}var Nm={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
128
+ `},QD={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function ZD(e){let{announcements:t=QD,container:n,hiddenTextDescribedById:r,screenReaderInstructions:o=JD}=e;const{announce:a,announcement:i}=qD(),s=aa("DndLiveRegion"),[l,c]=h.useState(!1);if(h.useEffect(()=>{c(!0)},[]),YD(h.useMemo(()=>({onDragStart(d){let{active:f}=d;a(t.onDragStart({active:f}))},onDragMove(d){let{active:f,over:p}=d;t.onDragMove&&a(t.onDragMove({active:f,over:p}))},onDragOver(d){let{active:f,over:p}=d;a(t.onDragOver({active:f,over:p}))},onDragEnd(d){let{active:f,over:p}=d;a(t.onDragEnd({active:f,over:p}))},onDragCancel(d){let{active:f,over:p}=d;a(t.onDragCancel({active:f,over:p}))}}),[a,t])),!l)return null;const u=te(Ye,{children:[w(WD,{id:r,value:o.draggable}),w(KD,{id:s,announcement:i})]});return n?Lt.createPortal(u,n):u}var Ke;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Ke||(Ke={}));function pi(){}function Hf(e,t){return h.useMemo(()=>({sensor:e,options:t??{}}),[e,t])}function e$(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return h.useMemo(()=>[...t].filter(r=>r!=null),[...t])}const Gt=Object.freeze({x:0,y:0});function t$(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function n$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return n-r}function r$(e,t){let{data:{value:n}}=e,{data:{value:r}}=t;return r-n}function Uf(e){let{left:t,top:n,height:r,width:o}=e;return[{x:t,y:n},{x:t+o,y:n},{x:t,y:n+r},{x:t+o,y:n+r}]}function im(e,t){if(!e||e.length===0)return null;const[n]=e;return t?n[t]:n}const o$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=Uf(t),a=[];for(const i of r){const{id:s}=i,l=n.get(s);if(l){const c=Uf(l),u=o.reduce((f,p,g)=>f+t$(c[g],p),0),d=Number((u/4).toFixed(4));a.push({id:s,data:{droppableContainer:i,value:d}})}}return a.sort(n$)};function a$(e,t){const n=Math.max(t.top,e.top),r=Math.max(t.left,e.left),o=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),i=o-r,s=a-n;if(r<o&&n<a){const l=t.width*t.height,c=e.width*e.height,u=i*s,d=u/(l+c-u);return Number(d.toFixed(4))}return 0}const i$=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:r}=e;const o=[];for(const a of r){const{id:i}=a,s=n.get(i);if(s){const l=a$(s,t);l>0&&o.push({id:i,data:{droppableContainer:a,value:l}})}}return o.sort(r$)};function s$(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}function sm(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:Gt}function l$(e){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),a=1;a<r;a++)o[a-1]=arguments[a];return o.reduce((i,s)=>({...i,top:i.top+e*s.y,bottom:i.bottom+e*s.y,left:i.left+e*s.x,right:i.right+e*s.x}),{...n})}}const c$=l$(1);function u$(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function d$(e,t,n){const r=u$(t);if(!r)return e;const{scaleX:o,scaleY:a,x:i,y:s}=r,l=e.left-i-(1-o)*parseFloat(n),c=e.top-s-(1-a)*parseFloat(n.slice(n.indexOf(" ")+1)),u=o?e.width/o:e.width,d=a?e.height/a:e.height;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l}}const f$={ignoreTransform:!1};function io(e,t){t===void 0&&(t=f$);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{getComputedStyle:c}=gt(e),{transform:u,transformOrigin:d}=c(e);u&&(n=d$(n,u,d))}const{top:r,left:o,width:a,height:i,bottom:s,right:l}=n;return{top:r,left:o,width:a,height:i,bottom:s,right:l}}function Wf(e){return io(e,{ignoreTransform:!0})}function p$(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}function h$(e,t){return t===void 0&&(t=gt(e).getComputedStyle(e)),t.position==="fixed"}function g$(e,t){t===void 0&&(t=gt(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const a=t[o];return typeof a=="string"?n.test(a):!1})}function zi(e,t){const n=[];function r(o){if(t!=null&&n.length>=t||!o)return n;if(Zc(o)&&o.scrollingElement!=null&&!n.includes(o.scrollingElement))return n.push(o.scrollingElement),n;if(!ra(o)||BD(o)||n.includes(o))return n;const{getComputedStyle:a}=gt(o),i=a(o);return o!==e&&g$(o,i)&&n.push(o),h$(o,i)?n:r(o.parentNode)}return e?r(e):n}function lm(e){const[t]=zi(e,1);return t??null}function Ss(e){return!Bi||!e?null:oo(e)?e:Qc(e)?Zc(e)||e===ao(e).scrollingElement?window:ra(e)?e:null:null}function cm(e){return oo(e)?e.scrollX:e.scrollLeft}function um(e){return oo(e)?e.scrollY:e.scrollTop}function Tl(e){return{x:cm(e),y:um(e)}}var Je;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(Je||(Je={}));function dm(e){return!Bi||!e?!1:e===document.scrollingElement}function fm(e){const t={x:0,y:0},n=dm(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},r={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height},o=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,i=e.scrollTop>=r.y,s=e.scrollLeft>=r.x;return{isTop:o,isLeft:a,isBottom:i,isRight:s,maxScroll:r,minScroll:t}}const v$={x:.2,y:.2};function m$(e,t,n,r,o){let{top:a,left:i,right:s,bottom:l}=n;r===void 0&&(r=10),o===void 0&&(o=v$);const{isTop:c,isBottom:u,isLeft:d,isRight:f}=fm(e),p={x:0,y:0},g={x:0,y:0},m={height:t.height*o.y,width:t.width*o.x};return!c&&a<=t.top+m.height?(p.y=Je.Backward,g.y=r*Math.abs((t.top+m.height-a)/m.height)):!u&&l>=t.bottom-m.height&&(p.y=Je.Forward,g.y=r*Math.abs((t.bottom-m.height-l)/m.height)),!f&&s>=t.right-m.width?(p.x=Je.Forward,g.x=r*Math.abs((t.right-m.width-s)/m.width)):!d&&i<=t.left+m.width&&(p.x=Je.Backward,g.x=r*Math.abs((t.left+m.width-i)/m.width)),{direction:p,speed:g}}function y$(e){if(e===document.scrollingElement){const{innerWidth:a,innerHeight:i}=window;return{top:0,left:0,right:a,bottom:i,width:a,height:i}}const{top:t,left:n,right:r,bottom:o}=e.getBoundingClientRect();return{top:t,left:n,right:r,bottom:o,width:e.clientWidth,height:e.clientHeight}}function pm(e){return e.reduce((t,n)=>_r(t,Tl(n)),Gt)}function b$(e){return e.reduce((t,n)=>t+cm(n),0)}function w$(e){return e.reduce((t,n)=>t+um(n),0)}function S$(e,t){if(t===void 0&&(t=io),!e)return;const{top:n,left:r,bottom:o,right:a}=t(e);lm(e)&&(o<=0||a<=0||n>=window.innerHeight||r>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const x$=[["x",["left","right"],b$],["y",["top","bottom"],w$]];class nu{constructor(t,n){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const r=zi(n),o=pm(r);this.rect={...t},this.width=t.width,this.height=t.height;for(const[a,i,s]of x$)for(const l of i)Object.defineProperty(this,l,{get:()=>{const c=s(r),u=o[a]-c;return this.rect[l]+u},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Po{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(n=>{var r;return(r=this.target)==null?void 0:r.removeEventListener(...n)})},this.target=t}add(t,n,r){var o;(o=this.target)==null||o.addEventListener(t,n,r),this.listeners.push([t,n,r])}}function C$(e){const{EventTarget:t}=gt(e);return e instanceof t?e:ao(e)}function xs(e,t){const n=Math.abs(e.x),r=Math.abs(e.y);return typeof t=="number"?Math.sqrt(n**2+r**2)>t:"x"in t&&"y"in t?n>t.x&&r>t.y:"x"in t?n>t.x:"y"in t?r>t.y:!1}var Nt;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Nt||(Nt={}));function Gf(e){e.preventDefault()}function O$(e){e.stopPropagation()}var ue;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"})(ue||(ue={}));const hm={start:[ue.Space,ue.Enter],cancel:[ue.Esc],end:[ue.Space,ue.Enter]},E$=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case ue.Right:return{...n,x:n.x+25};case ue.Left:return{...n,x:n.x-25};case ue.Down:return{...n,y:n.y+25};case ue.Up:return{...n,y:n.y-25}}};class ru{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;const{event:{target:n}}=t;this.props=t,this.listeners=new Po(ao(n)),this.windowListeners=new Po(gt(n)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Nt.Resize,this.handleCancel),this.windowListeners.add(Nt.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Nt.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:t,onStart:n}=this.props,r=t.node.current;r&&S$(r),n(Gt)}handleKeyDown(t){if(tu(t)){const{active:n,context:r,options:o}=this.props,{keyboardCodes:a=hm,coordinateGetter:i=E$,scrollBehavior:s="smooth"}=o,{code:l}=t;if(a.end.includes(l)){this.handleEnd(t);return}if(a.cancel.includes(l)){this.handleCancel(t);return}const{collisionRect:c}=r.current,u=c?{x:c.left,y:c.top}:Gt;this.referenceCoordinates||(this.referenceCoordinates=u);const d=i(t,{active:n,context:r.current,currentCoordinates:u});if(d){const f=Ko(d,u),p={x:0,y:0},{scrollableAncestors:g}=r.current;for(const m of g){const b=t.code,{isTop:y,isRight:S,isLeft:E,isBottom:x,maxScroll:v,minScroll:C}=fm(m),O=y$(m),R={x:Math.min(b===ue.Right?O.right-O.width/2:O.right,Math.max(b===ue.Right?O.left:O.left+O.width/2,d.x)),y:Math.min(b===ue.Down?O.bottom-O.height/2:O.bottom,Math.max(b===ue.Down?O.top:O.top+O.height/2,d.y))},N=b===ue.Right&&!S||b===ue.Left&&!E,T=b===ue.Down&&!x||b===ue.Up&&!y;if(N&&R.x!==d.x){const M=m.scrollLeft+f.x,j=b===ue.Right&&M<=v.x||b===ue.Left&&M>=C.x;if(j&&!f.y){m.scrollTo({left:M,behavior:s});return}j?p.x=m.scrollLeft-M:p.x=b===ue.Right?m.scrollLeft-v.x:m.scrollLeft-C.x,p.x&&m.scrollBy({left:-p.x,behavior:s});break}else if(T&&R.y!==d.y){const M=m.scrollTop+f.y,j=b===ue.Down&&M<=v.y||b===ue.Up&&M>=C.y;if(j&&!f.x){m.scrollTo({top:M,behavior:s});return}j?p.y=m.scrollTop-M:p.y=b===ue.Down?m.scrollTop-v.y:m.scrollTop-C.y,p.y&&m.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,_r(Ko(d,this.referenceCoordinates),p))}}}handleMove(t,n){const{onMove:r}=this.props;t.preventDefault(),r(n)}handleEnd(t){const{onEnd:n}=this.props;t.preventDefault(),this.detach(),n()}handleCancel(t){const{onCancel:n}=this.props;t.preventDefault(),this.detach(),n()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}ru.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:r=hm,onActivation:o}=t,{active:a}=n;const{code:i}=e.nativeEvent;if(r.start.includes(i)){const s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function Kf(e){return!!(e&&"distance"in e)}function qf(e){return!!(e&&"delay"in e)}class ou{constructor(t,n,r){var o;r===void 0&&(r=C$(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=n;const{event:a}=t,{target:i}=a;this.props=t,this.events=n,this.document=ao(i),this.documentListeners=new Po(this.document),this.listeners=new Po(r),this.windowListeners=new Po(gt(i)),this.initialCoordinates=(o=Nl(a))!=null?o:Gt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:t,props:{options:{activationConstraint:n}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),this.windowListeners.add(Nt.Resize,this.handleCancel),this.windowListeners.add(Nt.DragStart,Gf),this.windowListeners.add(Nt.VisibilityChange,this.handleCancel),this.windowListeners.add(Nt.ContextMenu,Gf),this.documentListeners.add(Nt.Keydown,this.handleKeydown),n){if(Kf(n))return;if(qf(n)){this.timeoutId=setTimeout(this.handleStart,n.delay);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:t}=this,{onStart:n}=this.props;t&&(this.activated=!0,this.documentListeners.add(Nt.Click,O$,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Nt.SelectionChange,this.removeTextSelection),n(t))}handleMove(t){var n;const{activated:r,initialCoordinates:o,props:a}=this,{onMove:i,options:{activationConstraint:s}}=a;if(!o)return;const l=(n=Nl(t))!=null?n:Gt,c=Ko(o,l);if(!r&&s){if(qf(s))return xs(c,s.tolerance)?this.handleCancel():void 0;if(Kf(s))return s.tolerance!=null&&xs(c,s.tolerance)?this.handleCancel():xs(c,s.distance)?this.handleStart():void 0}t.cancelable&&t.preventDefault(),i(l)}handleEnd(){const{onEnd:t}=this.props;this.detach(),t()}handleCancel(){const{onCancel:t}=this.props;this.detach(),t()}handleKeydown(t){t.code===ue.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}}const _$={move:{name:"pointermove"},end:{name:"pointerup"}};class au extends ou{constructor(t){const{event:n}=t,r=ao(n.target);super(t,_$,r)}}au.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return!n.isPrimary||n.button!==0?!1:(r==null||r({event:n}),!0)}}];const R$={move:{name:"mousemove"},end:{name:"mouseup"}};var Pl;(function(e){e[e.RightClick=2]="RightClick"})(Pl||(Pl={}));class N$ extends ou{constructor(t){super(t,R$,ao(t.event.target))}}N$.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;return n.button===Pl.RightClick?!1:(r==null||r({event:n}),!0)}}];const Cs={move:{name:"touchmove"},end:{name:"touchend"}};class T$ extends ou{constructor(t){super(t,Cs)}static setup(){return window.addEventListener(Cs.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(Cs.move.name,t)};function t(){}}}T$.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:r}=t;const{touches:o}=n;return o.length>1?!1:(r==null||r({event:n}),!0)}}];var ko;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ko||(ko={}));var hi;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(hi||(hi={}));function P$(e){let{acceleration:t,activator:n=ko.Pointer,canScroll:r,draggingRect:o,enabled:a,interval:i=5,order:s=hi.TreeOrder,pointerCoordinates:l,scrollableAncestors:c,scrollableAncestorRects:u,delta:d,threshold:f}=e;const p=j$({delta:d,disabled:!a}),[g,m]=zD(),b=h.useRef({x:0,y:0}),y=h.useRef({x:0,y:0}),S=h.useMemo(()=>{switch(n){case ko.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ko.DraggableRect:return o}},[n,o,l]),E=h.useRef(null),x=h.useCallback(()=>{const C=E.current;if(!C)return;const O=b.current.x*y.current.x,R=b.current.y*y.current.y;C.scrollBy(O,R)},[]),v=h.useMemo(()=>s===hi.TreeOrder?[...c].reverse():c,[s,c]);h.useEffect(()=>{if(!a||!c.length||!S){m();return}for(const C of v){if((r==null?void 0:r(C))===!1)continue;const O=c.indexOf(C),R=u[O];if(!R)continue;const{direction:N,speed:T}=m$(C,R,S,t,f);for(const M of["x","y"])p[M][N[M]]||(T[M]=0,N[M]=0);if(T.x>0||T.y>0){m(),E.current=C,g(x,i),b.current=T,y.current=N;return}}b.current={x:0,y:0},y.current={x:0,y:0},m()},[t,x,r,m,a,i,JSON.stringify(S),JSON.stringify(p),g,c,v,u,JSON.stringify(f)])}const k$={x:{[Je.Backward]:!1,[Je.Forward]:!1},y:{[Je.Backward]:!1,[Je.Forward]:!1}};function j$(e){let{delta:t,disabled:n}=e;const r=Rl(t);return oa(o=>{if(n||!r||!o)return k$;const a={x:Math.sign(t.x-r.x),y:Math.sign(t.y-r.y)};return{x:{[Je.Backward]:o.x[Je.Backward]||a.x===-1,[Je.Forward]:o.x[Je.Forward]||a.x===1},y:{[Je.Backward]:o.y[Je.Backward]||a.y===-1,[Je.Forward]:o.y[Je.Forward]||a.y===1}}},[n,t,r])}function M$(e,t){const n=t!==null?e.get(t):void 0,r=n?n.node.current:null;return oa(o=>{var a;return t===null?null:(a=r??o)!=null?a:null},[r,t])}function A$(e,t){return h.useMemo(()=>e.reduce((n,r)=>{const{sensor:o}=r,a=o.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,r)}));return[...n,...a]},[]),[e,t])}var qo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(qo||(qo={}));var kl;(function(e){e.Optimized="optimized"})(kl||(kl={}));const Yf=new Map;function D$(e,t){let{dragging:n,dependencies:r,config:o}=t;const[a,i]=h.useState(null),{frequency:s,measure:l,strategy:c}=o,u=h.useRef(e),d=b(),f=Go(d),p=h.useCallback(function(y){y===void 0&&(y=[]),!f.current&&i(S=>S===null?y:S.concat(y.filter(E=>!S.includes(E))))},[f]),g=h.useRef(null),m=oa(y=>{if(d&&!n)return Yf;if(!y||y===Yf||u.current!==e||a!=null){const S=new Map;for(let E of e){if(!E)continue;if(a&&a.length>0&&!a.includes(E.id)&&E.rect.current){S.set(E.id,E.rect.current);continue}const x=E.node.current,v=x?new nu(l(x),x):null;E.rect.current=v,v&&S.set(E.id,v)}return S}return y},[e,a,n,d,l]);return h.useEffect(()=>{u.current=e},[e]),h.useEffect(()=>{d||p()},[n,d]),h.useEffect(()=>{a&&a.length>0&&i(null)},[JSON.stringify(a)]),h.useEffect(()=>{d||typeof s!="number"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},s))},[s,d,p,...r]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:a!=null};function b(){switch(c){case qo.Always:return!1;case qo.BeforeDragging:return n;default:return!n}}}function gm(e,t){return oa(n=>e?n||(typeof t=="function"?t(e):e):null,[t,e])}function $$(e,t){return gm(e,t)}function I$(e){let{callback:t,disabled:n}=e;const r=eu(t),o=h.useMemo(()=>{if(n||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:a}=window;return new a(r)},[r,n]);return h.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Vi(e){let{callback:t,disabled:n}=e;const r=eu(t),o=h.useMemo(()=>{if(n||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:a}=window;return new a(r)},[n]);return h.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function L$(e){return new nu(io(e),e)}function Xf(e,t,n){t===void 0&&(t=L$);const[r,o]=h.useReducer(s,null),a=I$({callback(l){if(e)for(const c of l){const{type:u,target:d}=c;if(u==="childList"&&d instanceof HTMLElement&&d.contains(e)){o();break}}}}),i=Vi({callback:o});return Wt(()=>{o(),e?(i==null||i.observe(e),a==null||a.observe(document.body,{childList:!0,subtree:!0})):(i==null||i.disconnect(),a==null||a.disconnect())},[e]),r;function s(l){if(!e)return null;if(e.isConnected===!1){var c;return(c=l??n)!=null?c:null}const u=t(e);return JSON.stringify(l)===JSON.stringify(u)?l:u}}function B$(e){const t=gm(e);return sm(e,t)}const Jf=[];function z$(e){const t=h.useRef(e),n=oa(r=>e?r&&r!==Jf&&e&&t.current&&e.parentNode===t.current.parentNode?r:zi(e):Jf,[e]);return h.useEffect(()=>{t.current=e},[e]),n}function V$(e){const[t,n]=h.useState(null),r=h.useRef(e),o=h.useCallback(a=>{const i=Ss(a.target);i&&n(s=>s?(s.set(i,Tl(i)),new Map(s)):null)},[]);return h.useEffect(()=>{const a=r.current;if(e!==a){i(a);const s=e.map(l=>{const c=Ss(l);return c?(c.addEventListener("scroll",o,{passive:!0}),[c,Tl(c)]):null}).filter(l=>l!=null);n(s.length?new Map(s):null),r.current=e}return()=>{i(e),i(a)};function i(s){s.forEach(l=>{const c=Ss(l);c==null||c.removeEventListener("scroll",o)})}},[o,e]),h.useMemo(()=>e.length?t?Array.from(t.values()).reduce((a,i)=>_r(a,i),Gt):pm(e):Gt,[e,t])}function Qf(e,t){t===void 0&&(t=[]);const n=h.useRef(null);return h.useEffect(()=>{n.current=null},t),h.useEffect(()=>{const r=e!==Gt;r&&!n.current&&(n.current=e),!r&&n.current&&(n.current=null)},[e]),n.current?Ko(e,n.current):Gt}function F$(e){h.useEffect(()=>{if(!Bi)return;const t=e.map(n=>{let{sensor:r}=n;return r.setup==null?void 0:r.setup()});return()=>{for(const n of t)n==null||n()}},e.map(t=>{let{sensor:n}=t;return n}))}function H$(e,t){return h.useMemo(()=>e.reduce((n,r)=>{let{eventName:o,handler:a}=r;return n[o]=i=>{a(i,t)},n},{}),[e,t])}function vm(e){return h.useMemo(()=>e?p$(e):null,[e])}const Os=[];function U$(e,t){t===void 0&&(t=io);const[n]=e,r=vm(n?gt(n):null),[o,a]=h.useReducer(s,Os),i=Vi({callback:a});return e.length>0&&o===Os&&a(),Wt(()=>{e.length?e.forEach(l=>i==null?void 0:i.observe(l)):(i==null||i.disconnect(),a())},[e]),o;function s(){return e.length?e.map(l=>dm(l)?r:new nu(t(l),l)):Os}}function W$(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ra(t)?t:e}function G$(e){let{measure:t}=e;const[n,r]=h.useState(null),o=h.useCallback(c=>{for(const{target:u}of c)if(ra(u)){r(d=>{const f=t(u);return d?{...d,width:f.width,height:f.height}:f});break}},[t]),a=Vi({callback:o}),i=h.useCallback(c=>{const u=W$(c);a==null||a.disconnect(),u&&(a==null||a.observe(u)),r(u?t(u):null)},[t,a]),[s,l]=fi(i);return h.useMemo(()=>({nodeRef:s,rect:n,setRef:l}),[n,s,l])}const K$=[{sensor:au,options:{}},{sensor:ru,options:{}}],q$={current:{}},Ka={draggable:{measure:Wf},droppable:{measure:Wf,strategy:qo.WhileDragging,frequency:kl.Optimized},dragOverlay:{measure:io}};class jo extends Map{get(t){var n;return t!=null&&(n=super.get(t))!=null?n:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:n}=t;return!n})}getNodeFor(t){var n,r;return(n=(r=this.get(t))==null?void 0:r.node.current)!=null?n:void 0}}const Y$={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:pi},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Ka,measureDroppableContainers:pi,windowRect:null,measuringScheduled:!1},X$={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:pi,draggableNodes:new Map,over:null,measureDroppableContainers:pi},Fi=h.createContext(X$),mm=h.createContext(Y$);function J$(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jo}}}function Q$(e,t){switch(t.type){case Ke.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Ke.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case Ke.DragEnd:case Ke.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Ke.RegisterDroppable:{const{element:n}=t,{id:r}=n,o=new jo(e.droppable.containers);return o.set(r,n),{...e,droppable:{...e.droppable,containers:o}}}case Ke.SetDroppableDisabled:{const{id:n,key:r,disabled:o}=t,a=e.droppable.containers.get(n);if(!a||r!==a.key)return e;const i=new jo(e.droppable.containers);return i.set(n,{...a,disabled:o}),{...e,droppable:{...e.droppable,containers:i}}}case Ke.UnregisterDroppable:{const{id:n,key:r}=t,o=e.droppable.containers.get(n);if(!o||r!==o.key)return e;const a=new jo(e.droppable.containers);return a.delete(n),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function Z$(e){let{disabled:t}=e;const{active:n,activatorEvent:r,draggableNodes:o}=h.useContext(Fi),a=Rl(r),i=Rl(n==null?void 0:n.id);return h.useEffect(()=>{if(!t&&!r&&a&&i!=null){if(!tu(a)||document.activeElement===a.target)return;const s=o.get(i);if(!s)return;const{activatorNode:l,node:c}=s;if(!l.current&&!c.current)return;requestAnimationFrame(()=>{for(const u of[l.current,c.current]){if(!u)continue;const d=HD(u);if(d){d.focus();break}}})}},[r,t,o,i,a]),null}function e8(e,t){let{transform:n,...r}=t;return e!=null&&e.length?e.reduce((o,a)=>a({transform:o,...r}),n):n}function t8(e){return h.useMemo(()=>({draggable:{...Ka.draggable,...e==null?void 0:e.draggable},droppable:{...Ka.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Ka.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function n8(e){let{activeNode:t,measure:n,initialRect:r,config:o=!0}=e;const a=h.useRef(!1),{x:i,y:s}=typeof o=="boolean"?{x:o,y:o}:o;Wt(()=>{if(!i&&!s||!t){a.current=!1;return}if(a.current||!r)return;const c=t==null?void 0:t.node.current;if(!c||c.isConnected===!1)return;const u=n(c),d=sm(u,r);if(i||(d.x=0),s||(d.y=0),a.current=!0,Math.abs(d.x)>0||Math.abs(d.y)>0){const f=lm(c);f&&f.scrollBy({top:d.y,left:d.x})}},[t,i,s,r,n])}const ym=h.createContext({...Gt,scaleX:1,scaleY:1});var En;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(En||(En={}));const Zf=h.memo(function(t){var n,r,o,a;let{id:i,accessibility:s,autoScroll:l=!0,children:c,sensors:u=K$,collisionDetection:d=i$,measuring:f,modifiers:p,...g}=t;const m=h.useReducer(Q$,void 0,J$),[b,y]=m,[S,E]=XD(),[x,v]=h.useState(En.Uninitialized),C=x===En.Initialized,{draggable:{active:O,nodes:R,translate:N},droppable:{containers:T}}=b,M=O?R.get(O):null,j=h.useRef({initial:null,translated:null}),D=h.useMemo(()=>{var Pe;return O!=null?{id:O,data:(Pe=M==null?void 0:M.data)!=null?Pe:q$,rect:j}:null},[O,M]),k=h.useRef(null),[P,L]=h.useState(null),[z,Z]=h.useState(null),J=Go(g,Object.values(g)),le=aa("DndDescribedBy",i),A=h.useMemo(()=>T.getEnabled(),[T]),$=t8(f),{droppableRects:W,measureDroppableContainers:ne,measuringScheduled:ie}=D$(A,{dragging:C,dependencies:[N.x,N.y],config:$.droppable}),de=M$(R,O),we=h.useMemo(()=>z?Nl(z):null,[z]),fe=va(),Ee=$$(de,$.draggable.measure);n8({activeNode:O?R.get(O):null,config:fe.layoutShiftCompensation,initialRect:Ee,measure:$.draggable.measure});const re=Xf(de,$.draggable.measure,Ee),$e=Xf(de?de.parentElement:null),V=h.useRef({activatorEvent:null,active:null,activeNode:de,collisionRect:null,collisions:null,droppableRects:W,draggableNodes:R,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Xe=T.getNodeFor((n=V.current.over)==null?void 0:n.id),Be=G$({measure:$.dragOverlay.measure}),Ie=(r=Be.nodeRef.current)!=null?r:de,vt=C?(o=Be.rect)!=null?o:re:null,an=!!(Be.nodeRef.current&&Be.rect),sn=B$(an?null:re),Ae=vm(Ie?gt(Ie):null),me=z$(C?Xe??de:null),De=U$(me),Ge=e8(p,{transform:{x:N.x-sn.x,y:N.y-sn.y,scaleX:1,scaleY:1},activatorEvent:z,active:D,activeNodeRect:re,containerNodeRect:$e,draggingNodeRect:vt,over:V.current.over,overlayNodeRect:Be.rect,scrollableAncestors:me,scrollableAncestorRects:De,windowRect:Ae}),Kt=we?_r(we,N):null,ua=V$(me),da=Qf(ua),fa=Qf(ua,[re]),Ot=_r(Ge,da),xn=vt?c$(vt,Ge):null,Cn=D&&xn?d({active:D,collisionRect:xn,droppableRects:W,droppableContainers:A,pointerCoordinates:Kt}):null,co=im(Cn,"id"),[Et,pa]=h.useState(null),qi=an?Ge:_r(Ge,fa),Yi=s$(qi,(a=Et==null?void 0:Et.rect)!=null?a:null,re),ha=h.useCallback((Pe,Ze)=>{let{sensor:et,options:Mt}=Ze;if(k.current==null)return;const lt=R.get(k.current);if(!lt)return;const ct=Pe.nativeEvent,_t=new et({active:k.current,activeNode:lt,event:ct,options:Mt,context:V,onStart(ut){const $n=k.current;if($n==null)return;const In=R.get($n);if(!In)return;const{onDragStart:Ln}=J.current,cr={active:{id:$n,data:In.data,rect:j}};Lt.unstable_batchedUpdates(()=>{Ln==null||Ln(cr),v(En.Initializing),y({type:Ke.DragStart,initialCoordinates:ut,active:$n}),S({type:"onDragStart",event:cr})})},onMove(ut){y({type:Ke.DragMove,coordinates:ut})},onEnd:ln(Ke.DragEnd),onCancel:ln(Ke.DragCancel)});Lt.unstable_batchedUpdates(()=>{L(_t),Z(Pe.nativeEvent)});function ln(ut){return async function(){const{active:In,collisions:Ln,over:cr,scrollAdjustedTranslate:ma}=V.current;let Bn=null;if(In&&ma){const{cancelDrop:zn}=J.current;Bn={activatorEvent:ct,active:In,collisions:Ln,delta:ma,over:cr},ut===Ke.DragEnd&&typeof zn=="function"&&await Promise.resolve(zn(Bn))&&(ut=Ke.DragCancel)}k.current=null,Lt.unstable_batchedUpdates(()=>{y({type:ut}),v(En.Uninitialized),pa(null),L(null),Z(null);const zn=ut===Ke.DragEnd?"onDragEnd":"onDragCancel";if(Bn){const _=J.current[zn];_==null||_(Bn),S({type:zn,event:Bn})}})}}},[R]),Xi=h.useCallback((Pe,Ze)=>(et,Mt)=>{const lt=et.nativeEvent,ct=R.get(Mt);if(k.current!==null||!ct||lt.dndKit||lt.defaultPrevented)return;const _t={active:ct};Pe(et,Ze.options,_t)===!0&&(lt.dndKit={capturedBy:Ze.sensor},k.current=Mt,ha(et,Ze))},[R,ha]),ga=A$(u,Xi);F$(u),Wt(()=>{re&&x===En.Initializing&&v(En.Initialized)},[re,x]),h.useEffect(()=>{const{onDragMove:Pe}=J.current,{active:Ze,activatorEvent:et,collisions:Mt,over:lt}=V.current;if(!Ze||!et)return;const ct={active:Ze,activatorEvent:et,collisions:Mt,delta:{x:Ot.x,y:Ot.y},over:lt};Lt.unstable_batchedUpdates(()=>{Pe==null||Pe(ct),S({type:"onDragMove",event:ct})})},[Ot.x,Ot.y]),h.useEffect(()=>{const{active:Pe,activatorEvent:Ze,collisions:et,droppableContainers:Mt,scrollAdjustedTranslate:lt}=V.current;if(!Pe||k.current==null||!Ze||!lt)return;const{onDragOver:ct}=J.current,_t=Mt.get(co),ln=_t&&_t.rect.current?{id:_t.id,rect:_t.rect.current,data:_t.data,disabled:_t.disabled}:null,ut={active:Pe,activatorEvent:Ze,collisions:et,delta:{x:lt.x,y:lt.y},over:ln};Lt.unstable_batchedUpdates(()=>{pa(ln),ct==null||ct(ut),S({type:"onDragOver",event:ut})})},[co]),Wt(()=>{V.current={activatorEvent:z,active:D,activeNode:de,collisionRect:xn,collisions:Cn,droppableRects:W,draggableNodes:R,draggingNode:Ie,draggingNodeRect:vt,droppableContainers:T,over:Et,scrollableAncestors:me,scrollAdjustedTranslate:Ot},j.current={initial:vt,translated:xn}},[D,de,Cn,xn,R,Ie,vt,W,T,Et,me,Ot]),P$({...fe,delta:N,draggingRect:xn,pointerCoordinates:Kt,scrollableAncestors:me,scrollableAncestorRects:De});const Ji=h.useMemo(()=>({active:D,activeNode:de,activeNodeRect:re,activatorEvent:z,collisions:Cn,containerNodeRect:$e,dragOverlay:Be,draggableNodes:R,droppableContainers:T,droppableRects:W,over:Et,measureDroppableContainers:ne,scrollableAncestors:me,scrollableAncestorRects:De,measuringConfiguration:$,measuringScheduled:ie,windowRect:Ae}),[D,de,re,z,Cn,$e,Be,R,T,W,Et,ne,me,De,$,ie,Ae]),uo=h.useMemo(()=>({activatorEvent:z,activators:ga,active:D,activeNodeRect:re,ariaDescribedById:{draggable:le},dispatch:y,draggableNodes:R,over:Et,measureDroppableContainers:ne}),[z,ga,D,re,y,le,R,Et,ne]);return te(am.Provider,{value:E,children:[te(Fi.Provider,{value:uo,children:[w(mm.Provider,{value:Ji,children:w(ym.Provider,{value:Yi,children:c})}),w(Z$,{disabled:(s==null?void 0:s.restoreFocus)===!1})]}),w(ZD,{...s,hiddenTextDescribedById:le})]});function va(){const Pe=(P==null?void 0:P.autoScrollEnabled)===!1,Ze=typeof l=="object"?l.enabled===!1:l===!1,et=C&&!Pe&&!Ze;return typeof l=="object"?{...l,enabled:et}:{enabled:et}}}),r8=h.createContext(null),ep="button",o8="Droppable";function bm(e){let{id:t,data:n,disabled:r=!1,attributes:o}=e;const a=aa(o8),{activators:i,activatorEvent:s,active:l,activeNodeRect:c,ariaDescribedById:u,draggableNodes:d,over:f}=h.useContext(Fi),{role:p=ep,roleDescription:g="draggable",tabIndex:m=0}=o??{},b=(l==null?void 0:l.id)===t,y=h.useContext(b?ym:r8),[S,E]=fi(),[x,v]=fi(),C=H$(i,t),O=Go(n);Wt(()=>(d.set(t,{id:t,key:a,node:S,activatorNode:x,data:O}),()=>{const N=d.get(t);N&&N.key===a&&d.delete(t)}),[d,t]);const R=h.useMemo(()=>({role:p,tabIndex:m,"aria-disabled":r,"aria-pressed":b&&p===ep?!0:void 0,"aria-roledescription":g,"aria-describedby":u.draggable}),[r,p,m,b,g,u.draggable]);return{active:l,activatorEvent:s,activeNodeRect:c,attributes:R,isDragging:b,listeners:r?void 0:C,node:S,over:f,setNodeRef:E,setActivatorNodeRef:v,transform:y}}function a8(){return h.useContext(mm)}const i8="Droppable",s8={timeout:25};function l8(e){let{data:t,disabled:n=!1,id:r,resizeObserverConfig:o}=e;const a=aa(i8),{active:i,dispatch:s,over:l,measureDroppableContainers:c}=h.useContext(Fi),u=h.useRef({disabled:n}),d=h.useRef(!1),f=h.useRef(null),p=h.useRef(null),{disabled:g,updateMeasurementsFor:m,timeout:b}={...s8,...o},y=Go(m??r),S=h.useCallback(()=>{if(!d.current){d.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{c(Array.isArray(y.current)?y.current:[y.current]),p.current=null},b)},[b]),E=Vi({callback:S,disabled:g||!i}),x=h.useCallback((R,N)=>{E&&(N&&(E.unobserve(N),d.current=!1),R&&E.observe(R))},[E]),[v,C]=fi(x),O=Go(t);return h.useEffect(()=>{!E||!v.current||(E.disconnect(),d.current=!1,E.observe(v.current))},[v,E]),Wt(()=>(s({type:Ke.RegisterDroppable,element:{id:r,key:a,disabled:n,node:v,rect:f,data:O}}),()=>s({type:Ke.UnregisterDroppable,key:a,id:r})),[r]),h.useEffect(()=>{n!==u.current.disabled&&(s({type:Ke.SetDroppableDisabled,id:r,key:a,disabled:n}),u.current.disabled=n)},[r,a,n,s]),{active:i,rect:f,isOver:(l==null?void 0:l.id)===r,node:v,over:l,setNodeRef:C}}function iu(e,t,n){const r=e.slice();return r.splice(n<0?r.length+n:n,0,r.splice(t,1)[0]),r}function c8(e,t){return e.reduce((n,r,o)=>{const a=t.get(r);return a&&(n[o]=a),n},Array(e.length))}function ka(e){return e!==null&&e>=0}function u8(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function d8(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const wm=e=>{let{rects:t,activeIndex:n,overIndex:r,index:o}=e;const a=iu(t,r,n),i=t[o],s=a[o];return!s||!i?null:{x:s.left-i.left,y:s.top-i.top,scaleX:s.width/i.width,scaleY:s.height/i.height}},Sm="Sortable",xm=h.createContext({activeIndex:-1,containerId:Sm,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:wm,disabled:{draggable:!1,droppable:!1}});function f8(e){let{children:t,id:n,items:r,strategy:o=wm,disabled:a=!1}=e;const{active:i,dragOverlay:s,droppableRects:l,over:c,measureDroppableContainers:u}=a8(),d=aa(Sm,n),f=s.rect!==null,p=h.useMemo(()=>r.map(C=>typeof C=="object"&&"id"in C?C.id:C),[r]),g=i!=null,m=i?p.indexOf(i.id):-1,b=c?p.indexOf(c.id):-1,y=h.useRef(p),S=!u8(p,y.current),E=b!==-1&&m===-1||S,x=d8(a);Wt(()=>{S&&g&&u(p)},[S,p,g,u]),h.useEffect(()=>{y.current=p},[p]);const v=h.useMemo(()=>({activeIndex:m,containerId:d,disabled:x,disableTransforms:E,items:p,overIndex:b,useDragOverlay:f,sortedRects:c8(p,l),strategy:o}),[m,d,x.draggable,x.droppable,E,p,b,l,f,o]);return w(xm.Provider,{value:v,children:t})}const p8=e=>{let{id:t,items:n,activeIndex:r,overIndex:o}=e;return iu(n,r,o).indexOf(t)},h8=e=>{let{containerId:t,isSorting:n,wasDragging:r,index:o,items:a,newIndex:i,previousItems:s,previousContainerId:l,transition:c}=e;return!c||!r||s!==a&&o===i?!1:n?!0:i!==o&&t===l},g8={duration:200,easing:"ease"},Cm="transform",v8=Vr.Transition.toString({property:Cm,duration:0,easing:"linear"}),m8={roleDescription:"sortable"};function y8(e){let{disabled:t,index:n,node:r,rect:o}=e;const[a,i]=h.useState(null),s=h.useRef(n);return Wt(()=>{if(!t&&n!==s.current&&r.current){const l=o.current;if(l){const c=io(r.current,{ignoreTransform:!0}),u={x:l.left-c.left,y:l.top-c.top,scaleX:l.width/c.width,scaleY:l.height/c.height};(u.x||u.y)&&i(u)}}n!==s.current&&(s.current=n)},[t,n,r,o]),h.useEffect(()=>{a&&i(null)},[a]),a}function b8(e){let{animateLayoutChanges:t=h8,attributes:n,disabled:r,data:o,getNewIndex:a=p8,id:i,strategy:s,resizeObserverConfig:l,transition:c=g8}=e;const{items:u,containerId:d,activeIndex:f,disabled:p,disableTransforms:g,sortedRects:m,overIndex:b,useDragOverlay:y,strategy:S}=h.useContext(xm),E=w8(r,p),x=u.indexOf(i),v=h.useMemo(()=>({sortable:{containerId:d,index:x,items:u},...o}),[d,o,x,u]),C=h.useMemo(()=>u.slice(u.indexOf(i)),[u,i]),{rect:O,node:R,isOver:N,setNodeRef:T}=l8({id:i,data:v,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:C,...l}}),{active:M,activatorEvent:j,activeNodeRect:D,attributes:k,setNodeRef:P,listeners:L,isDragging:z,over:Z,setActivatorNodeRef:J,transform:le}=bm({id:i,data:v,attributes:{...m8,...n},disabled:E.draggable}),A=LD(T,P),$=!!M,W=$&&!g&&ka(f)&&ka(b),ne=!y&&z,ie=ne&&W?le:null,we=W?ie??(s??S)({rects:m,activeNodeRect:D,activeIndex:f,overIndex:b,index:x}):null,fe=ka(f)&&ka(b)?a({id:i,items:u,activeIndex:f,overIndex:b}):x,Ee=M==null?void 0:M.id,re=h.useRef({activeId:Ee,items:u,newIndex:fe,containerId:d}),$e=u!==re.current.items,V=t({active:M,containerId:d,isDragging:z,isSorting:$,id:i,index:x,items:u,newIndex:re.current.newIndex,previousItems:re.current.items,previousContainerId:re.current.containerId,transition:c,wasDragging:re.current.activeId!=null}),Xe=y8({disabled:!V,index:x,node:R,rect:O});return h.useEffect(()=>{$&&re.current.newIndex!==fe&&(re.current.newIndex=fe),d!==re.current.containerId&&(re.current.containerId=d),u!==re.current.items&&(re.current.items=u)},[$,fe,d,u]),h.useEffect(()=>{if(Ee===re.current.activeId)return;if(Ee&&!re.current.activeId){re.current.activeId=Ee;return}const Ie=setTimeout(()=>{re.current.activeId=Ee},50);return()=>clearTimeout(Ie)},[Ee]),{active:M,activeIndex:f,attributes:k,data:v,rect:O,index:x,newIndex:fe,items:u,isOver:N,isSorting:$,isDragging:z,listeners:L,node:R,overIndex:b,over:Z,setNodeRef:A,setActivatorNodeRef:J,setDroppableNodeRef:T,setDraggableNodeRef:P,transform:Xe??we,transition:Be()};function Be(){if(Xe||$e&&re.current.newIndex===x)return v8;if(!(ne&&!tu(j)||!c)&&($||V))return Vr.Transition.toString({...c,property:Cm})}}function w8(e,t){var n,r;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(n=e==null?void 0:e.draggable)!=null?n:t.draggable,droppable:(r=e==null?void 0:e.droppable)!=null?r:t.droppable}}function gi(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const S8=[ue.Down,ue.Right,ue.Up,ue.Left],x8=(e,t)=>{let{context:{active:n,collisionRect:r,droppableRects:o,droppableContainers:a,over:i,scrollableAncestors:s}}=t;if(S8.includes(e.code)){if(e.preventDefault(),!n||!r)return;const l=[];a.getEnabled().forEach(d=>{if(!d||d!=null&&d.disabled)return;const f=o.get(d.id);if(f)switch(e.code){case ue.Down:r.top<f.top&&l.push(d);break;case ue.Up:r.top>f.top&&l.push(d);break;case ue.Left:r.left>f.left&&l.push(d);break;case ue.Right:r.left<f.left&&l.push(d);break}});const c=o$({active:n,collisionRect:r,droppableRects:o,droppableContainers:l,pointerCoordinates:null});let u=im(c,"id");if(u===(i==null?void 0:i.id)&&c.length>1&&(u=c[1].id),u!=null){const d=a.get(n.id),f=a.get(u),p=f?o.get(f.id):null,g=f==null?void 0:f.node.current;if(g&&p&&d&&f){const b=zi(g).some((C,O)=>s[O]!==C),y=Om(d,f),S=C8(d,f),E=b||!y?{x:0,y:0}:{x:S?r.width-p.width:0,y:S?r.height-p.height:0},x={x:p.left,y:p.top};return E.x&&E.y?x:Ko(x,E)}}}};function Om(e,t){return!gi(e)||!gi(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function C8(e,t){return!gi(e)||!gi(t)||!Om(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}const O8=e=>{let{transform:t}=e;return{...t,x:0}},E8="_dragItem_xzliq_2",_8="_sortModalBox_xzliq_13",R8="_addOneBtn_xzliq_19",su={dragItem:E8,sortModalBox:_8,addOneBtn:R8},N8=({list:e,onValueChange:t,keyPaths:n,label:r,sortLabelKey:o,...a})=>{const[i,s]=h.useState([]);h.useEffect(()=>{const f=e.map((p,g)=>({val:p,oldIndex:g,id:be.getRandomStr()}));s(f)},[a.open]);const l=e$(Hf(au,{activationConstraint:{distance:15}}),Hf(ru,{coordinateGetter:x8}));function c(f){const{active:p,over:g}=f;if(p.id!==(g==null?void 0:g.id)){const m=i.findIndex(E=>E.id===(p==null?void 0:p.id)),b=i.findIndex(E=>E.id===(g==null?void 0:g.id)),y=iu(i,m,b),S=y.map(E=>E.val);s(y),t==null||t(S)}}const[u,d]=h.useState({x:0,y:0,scaleX:1,scaleY:1});return w(Y.Modal,{...a,title:`Sort: ${r} [${n.join(".")}]`,maskStyle:{backgroundColor:"rgba(0, 0, 0, 0.1)"},modalRender:f=>w(Zf,{sensors:l,onDragEnd:({delta:p})=>{const g={...u,...p,x:u.x+((p==null?void 0:p.x)||0),y:u.y+((p==null?void 0:p.y)||0)};d(g)},children:w(T8,{modal:f,transform:u})}),children:w("div",{className:su.sortModalBox,children:w(Zf,{sensors:l,onDragEnd:c,modifiers:[O8],children:w(f8,{items:i,children:i.map(({id:f,val:p},g)=>w(P8,{id:f,index:g,label:p[o||""]},f))})})})})},T8=({modal:e,transform:t})=>{const n=h.useRef(be.getRandomStr()),{setNodeRef:r,attributes:o,listeners:a,transform:i}=bm({id:n.current}),s={...t,...i,x:t.x+((i==null?void 0:i.x)||0),y:t.y+((i==null?void 0:i.y)||0)};return w("div",{ref:r,style:{pointerEvents:"auto",transform:Vr.Transform.toString(s)},...o,...a,children:e})},P8=e=>{const{attributes:t,listeners:n,setNodeRef:r,transform:o,transition:a}=b8({id:e.id}),i={transform:Vr.Transform.toString(o),transition:a},s=e.label||`Ele ${e.index}`;return w("div",{className:su.dragItem,ref:r,style:i,...t,...n,children:s})};function k8(e){return Array.isArray(e)?e:[]}const Em=({onValueChange:e,setterContext:t,item:{setters:n,initialValue:r},sortLabelKey:o,initialValue:a,...i})=>{const{keyPaths:s,label:l}=t,c=h.useMemo(()=>k8(i.value??a),[i.value]),[u,d]=h.useState(!1),f=Jc(n||[{component:"StringSetter"}]);return h.useEffect(()=>{var p;t.setCollapseHeaderExt&&((p=t.setCollapseHeaderExt)==null||p.call(t,w(Y.Button,{type:"text",size:"small",style:{color:"gray"},onClick:g=>{g.preventDefault(),g.stopPropagation(),d(!0)},children:"sort"})))},[]),te(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[c.map((p,g)=>w(ID,{style:{paddingBottom:"10px"},index:g,keyPaths:s,value:p,onValueChange:m=>{c[g]=m[g],e==null||e([...c])},setters:f,onDelete:()=>{const m=[...c];m.splice(g),e==null||e(m)}},g)),w(Y.Button,{className:su.addOneBtn,size:"small",onClick:()=>{const p=[...c];e==null||e([...p,r??""])},children:"Add One"}),w(N8,{label:l,sortLabelKey:o,onValueChange:p=>{e==null||e([...p])},open:u,list:c,keyPaths:s,onCancel:()=>{d(!1)},onOk:()=>{d(!1)}})]})};Em.setterName="数组设置器";const _m=({onValueChange:e,elements:t,value:n,setterContext:r,initialValue:o})=>{const{keyPaths:a}=r,i=h.useRef(null);return h.useEffect(()=>{var s;(s=i.current)==null||s.setFields(n||{})},[n]),w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(qc,{ref:i,name:a.join("."),initialValue:n||o||{},onValueChange:s=>{e==null||e(s)},customSetterMap:{},children:t.map((s,l)=>{const c=Jc(s.setters),u=be.getMTitle(s.title),d=be.getMTitleTip(s.title);return w("div",{children:w(cu,{name:s.name,label:u,tips:d,condition:s.condition,keyPaths:[...a,s.name],setters:c})},l)})})})};_m.setterName="对象设置器";const Rm=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var o;return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input.TextArea,{...r,value:((o=r.value)==null?void 0:o.value)??(t||""),onChange:a=>{var i;(i=r.onChange)==null||i.call(r,a),e==null||e({type:be.CNodePropsTypeEnum.EXPRESSION,value:a.target.value})}})})};Rm.setterName="表达式设置器";const Nm=({onValueChange:e,initialValue:t,setterContext:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Switch,{...r,checked:r.value??t,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});Nm.setterName="Bool 设置器";const Tm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Select,{showSearch:!0,style:{width:"100%"},...r,value:r.value??n,onChange:(o,a)=>{var i;(i=r.onChange)==null||i.call(r,o,a),e==null||e(o)}})});Tm.setterName="选择设置器";function j8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function tp(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function np(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?tp(Object(n),!0).forEach(function(r){j8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):tp(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function M8(e,t){if(e==null)return{};var n={},r=Object.keys(e),o,a;for(a=0;a<r.length;a++)o=r[a],!(t.indexOf(o)>=0)&&(n[o]=e[o]);return n}function A8(e,t){if(e==null)return{};var n=M8(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function D8(e,t){return $8(e)||I8(e,t)||L8(e,t)||B8()}function $8(e){if(Array.isArray(e))return e}function I8(e,t){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(e)))){var n=[],r=!0,o=!1,a=void 0;try{for(var i=e[Symbol.iterator](),s;!(r=(s=i.next()).done)&&(n.push(s.value),!(t&&n.length===t));r=!0);}catch(l){o=!0,a=l}finally{try{!r&&i.return!=null&&i.return()}finally{if(o)throw a}}return n}}function L8(e,t){if(e){if(typeof e=="string")return rp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rp(e,t)}}function rp(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function B8(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
129
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function z8(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function op(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function ap(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?op(Object(n),!0).forEach(function(r){z8(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):op(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function V8(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(r){return t.reduceRight(function(o,a){return a(o)},r)}}function xo(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function vi(e){return{}.toString.call(e).includes("Object")}function F8(e){return!Object.keys(e).length}function Yo(e){return typeof e=="function"}function H8(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function U8(e,t){return vi(t)||Nn("changeType"),Object.keys(t).some(function(n){return!H8(e,n)})&&Nn("changeField"),t}function W8(e){Yo(e)||Nn("selectorType")}function G8(e){Yo(e)||vi(e)||Nn("handlerType"),vi(e)&&Object.values(e).some(function(t){return!Yo(t)})&&Nn("handlersType")}function K8(e){e||Nn("initialIsRequired"),vi(e)||Nn("initialType"),F8(e)&&Nn("initialContent")}function q8(e,t){throw new Error(e[t]||e.default)}var Y8={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},Nn=xo(q8)(Y8),ja={changes:U8,selector:W8,handler:G8,initial:K8};function X8(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};ja.initial(e),ja.handler(t);var n={current:e},r=xo(Z8)(n,t),o=xo(Q8)(n),a=xo(ja.changes)(e),i=xo(J8)(n);function s(){var c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(u){return u};return ja.selector(c),c(n.current)}function l(c){V8(r,o,a,i)(c)}return[s,l]}function J8(e,t){return Yo(t)?t(e.current):t}function Q8(e,t){return e.current=ap(ap({},e.current),t),t}function Z8(e,t,n){return Yo(t)?t(e.current):Object.keys(n).forEach(function(r){var o;return(o=t[r])===null||o===void 0?void 0:o.call(t,e.current[r])}),n}var eI={create:X8},tI={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.36.1/min/vs"}};function nI(e){return function t(){for(var n=this,r=arguments.length,o=new Array(r),a=0;a<r;a++)o[a]=arguments[a];return o.length>=e.length?e.apply(this,o):function(){for(var i=arguments.length,s=new Array(i),l=0;l<i;l++)s[l]=arguments[l];return t.apply(n,[].concat(o,s))}}}function rI(e){return{}.toString.call(e).includes("Object")}function oI(e){return e||ip("configIsRequired"),rI(e)||ip("configType"),e.urls?(aI(),{paths:{vs:e.urls.monacoBase}}):e}function aI(){console.warn(Pm.deprecation)}function iI(e,t){throw new Error(e[t]||e.default)}var Pm={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
130
130
  You are using deprecated way of configuration.
131
131
 
132
132
  Instead of using
@@ -135,7 +135,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
135
135
  monaco.config({ paths: { vs: '...' } })
136
136
 
137
137
  For more please check the link https://github.com/suren-atoyan/monaco-loader#config
138
- `},op=Q8(nI)(Nm),rI={config:eI},oI=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(a,i){return i(a)},o)}};function Tm(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],Tm(e[n],t[n]))}),ep(ep({},e),t)}var aI={type:"cancelation",msg:"operation is manually canceled"};function Es(e){var t=!1,n=new Promise(function(r,o){e.then(function(a){return t?o(aI):r(a)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var iI=X8.create({config:J8,isInitialized:!1,resolve:null,reject:null,monaco:null}),Pm=k8(iI,2),ia=Pm[0],Hi=Pm[1];function sI(e){var t=rI.config(e),n=t.monaco,r=P8(t,["monaco"]);dbeugger,Hi(function(o){return{config:Tm(o.config,r),monaco:n}})}function lI(){var e=ia(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(Hi({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Es(_s);if(window.monaco&&window.monaco.editor)return km(window.monaco),e.resolve(window.monaco),Es(_s);oI(cI,dI)(fI)}return Es(_s)}function cI(e){return document.body.appendChild(e)}function uI(e){var t=document.createElement("script");return e&&(t.src=e),t}function dI(e){var t=ia(function(r){var o=r.config,a=r.reject;return{config:o,reject:a}}),n=uI("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function fI(){var e=ia(function(n){var r=n.config,o=n.resolve,a=n.reject;return{config:r,resolve:o,reject:a}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){km(n),e.resolve(n)},function(n){e.reject(n)})}function km(e){ia().monaco||Hi({monaco:e})}function pI(){return ia(function(e){var t=e.monaco;return t})}var _s=new Promise(function(e,t){return Hi({resolve:e,reject:t})}),jm={config:sI,init:lI,__getMonacoInstance:pI},hI={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Rs=hI,gI={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},vI=gI;function mI({children:e}){return g.createElement("div",{style:vI.container},e)}var yI=mI,bI=yI;function wI({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:a,wrapperProps:i}){return g.createElement("section",{style:{...Rs.wrapper,width:e,height:t},...i},!n&&g.createElement(bI,null,r),g.createElement("div",{ref:o,style:{...Rs.fullWidth,...!n&&Rs.hide},className:a}))}var SI=wI,Mm=g.memo(SI);function xI(e){g.useEffect(e,[])}var Am=xI;function CI(e,t,n=!0){let r=g.useRef(!0);g.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var bt=CI;function Mo(){}function Sr(e,t,n,r){return OI(e,r)||EI(e,t,n,r)}function OI(e,t){return e.editor.getModel(Dm(e,t))}function EI(e,t,n,r){return e.editor.createModel(t,n,r?Dm(e,r):void 0)}function Dm(e,t){return e.Uri.parse(t)}function _I({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:a,modifiedModelPath:i,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:u="Loading...",options:d={},height:f="100%",width:p="100%",className:h,wrapperProps:m={},beforeMount:b=Mo,onMount:y=Mo}){let[S,E]=g.useState(!1),[x,v]=g.useState(!0),O=g.useRef(null),C=g.useRef(null),R=g.useRef(null),N=g.useRef(y),T=g.useRef(b),k=g.useRef(!1);Am(()=>{let P=jm.init();return P.then(D=>(C.current=D)&&v(!1)).catch(D=>(D==null?void 0:D.type)!=="cancelation"&&console.error("Monaco initialization: error:",D)),()=>O.current?M():P.cancel()}),bt(()=>{let P=O.current.getModifiedEditor();P.getOption(C.current.editor.EditorOption.readOnly)?P.setValue(t||""):t!==P.getValue()&&(P.executeEdits("",[{range:P.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),P.pushUndoStop())},[t],S),bt(()=>{var P,D;(D=(P=O.current)==null?void 0:P.getModel())==null||D.original.setValue(e||"")},[e],S),bt(()=>{let{original:P,modified:D}=O.current.getModel();C.current.editor.setModelLanguage(P,r||n||"text"),C.current.editor.setModelLanguage(D,o||n||"text")},[n,r,o],S),bt(()=>{var P;(P=C.current)==null||P.editor.setTheme(c)},[c],S),bt(()=>{var P;(P=O.current)==null||P.updateOptions(d)},[d],S);let j=g.useCallback(()=>{var V;if(!C.current)return;T.current(C.current);let P=Sr(C.current,e||"",r||n||"text",a||""),D=Sr(C.current,t||"",o||n||"text",i||"");(V=O.current)==null||V.setModel({original:P,modified:D})},[n,t,o,e,r,a,i]),I=g.useCallback(()=>{var P;!k.current&&R.current&&(O.current=C.current.editor.createDiffEditor(R.current,{automaticLayout:!0,...d}),j(),(P=C.current)==null||P.editor.setTheme(c),E(!0),k.current=!0)},[d,c,j]);g.useEffect(()=>{S&&N.current(O.current,C.current)},[S]),g.useEffect(()=>{!x&&!S&&I()},[x,S,I]),bt(()=>{if(O.current&&C.current){let P=O.current.getOriginalEditor(),D=Sr(C.current,e||"",r||n||"text",a||"");D!==P.getModel()&&P.setModel(D)}},[a],S),bt(()=>{if(O.current&&C.current){let P=O.current.getModifiedEditor(),D=Sr(C.current,t||"",o||n||"text",i||"");D!==P.getModel()&&P.setModel(D)}},[i],S);function M(){var D,V,ne,ee;let P=(D=O.current)==null?void 0:D.getModel();s||((V=P==null?void 0:P.original)==null||V.dispose()),l||((ne=P==null?void 0:P.modified)==null||ne.dispose()),(ee=O.current)==null||ee.dispose()}return g.createElement(Mm,{width:p,height:f,isEditorReady:S,loading:u,_ref:R,className:h,wrapperProps:m})}var RI=_I;g.memo(RI);function NI(e){let t=g.useRef();return g.useEffect(()=>{t.current=e},[e]),t.current}var TI=NI,Ma=new Map;function PI({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:a,theme:i="light",line:s,loading:l="Loading...",options:c={},overrideServices:u={},saveViewState:d=!0,keepCurrentModel:f=!1,width:p="100%",height:h="100%",className:m,wrapperProps:b={},beforeMount:y=Mo,onMount:S=Mo,onChange:E,onValidate:x=Mo}){let[v,O]=g.useState(!1),[C,R]=g.useState(!0),N=g.useRef(null),T=g.useRef(null),k=g.useRef(null),j=g.useRef(S),I=g.useRef(y),M=g.useRef(),P=g.useRef(r),D=TI(a),V=g.useRef(!1),ne=g.useRef(!1);Am(()=>{let A=jm.init();return A.then(B=>(N.current=B)&&R(!1)).catch(B=>(B==null?void 0:B.type)!=="cancelation"&&console.error("Monaco initialization: error:",B)),()=>T.current?de():A.cancel()}),bt(()=>{var B,q,Q,ie;let A=Sr(N.current,e||r||"",t||o||"",a||n||"");A!==((B=T.current)==null?void 0:B.getModel())&&(d&&Ma.set(D,(q=T.current)==null?void 0:q.saveViewState()),(Q=T.current)==null||Q.setModel(A),d&&((ie=T.current)==null||ie.restoreViewState(Ma.get(a))))},[a],v),bt(()=>{var A;(A=T.current)==null||A.updateOptions(c)},[c],v),bt(()=>{!T.current||r===void 0||(T.current.getOption(N.current.editor.EditorOption.readOnly)?T.current.setValue(r):r!==T.current.getValue()&&(ne.current=!0,T.current.executeEdits("",[{range:T.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),T.current.pushUndoStop(),ne.current=!1))},[r],v),bt(()=>{var B,q;let A=(B=T.current)==null?void 0:B.getModel();A&&o&&((q=N.current)==null||q.editor.setModelLanguage(A,o))},[o],v),bt(()=>{var A;s!==void 0&&((A=T.current)==null||A.revealLine(s))},[s],v),bt(()=>{var A;(A=N.current)==null||A.editor.setTheme(i)},[i],v);let ee=g.useCallback(()=>{var A;if(!(!k.current||!N.current)&&!V.current){I.current(N.current);let B=a||n,q=Sr(N.current,r||e||"",t||o||"",B||"");T.current=(A=N.current)==null?void 0:A.editor.create(k.current,{model:q,automaticLayout:!0,...c},u),d&&T.current.restoreViewState(Ma.get(B)),N.current.editor.setTheme(i),O(!0),V.current=!0}},[e,t,n,r,o,a,c,u,d,i]);g.useEffect(()=>{v&&j.current(T.current,N.current)},[v]),g.useEffect(()=>{!C&&!v&&ee()},[C,v,ee]),P.current=r,g.useEffect(()=>{var A,B;v&&E&&((A=M.current)==null||A.dispose(),M.current=(B=T.current)==null?void 0:B.onDidChangeModelContent(q=>{ne.current||E(T.current.getValue(),q)}))},[v,E]),g.useEffect(()=>{if(v){let A=N.current.editor.onDidChangeMarkers(B=>{var Q;let q=(Q=T.current.getModel())==null?void 0:Q.uri;if(q&&B.find(ie=>ie.path===q.path)){let ie=N.current.editor.getModelMarkers({resource:q});x==null||x(ie)}});return()=>{A==null||A.dispose()}}return()=>{}},[v,x]);function de(){var A,B;(A=M.current)==null||A.dispose(),f?d&&Ma.set(a,T.current.saveViewState()):(B=T.current.getModel())==null||B.dispose(),T.current.dispose()}return g.createElement(Mm,{width:p,height:h,isEditorReady:v,loading:l,_ref:k,className:m,wrapperProps:b})}var kI=PI,jI=g.memo(kI),MI=jI;const sa=e=>{const t=r=>{var o;(o=e.beforeMount)==null||o.call(e,r)},n=r=>{var o;(o=e.onDidMount)==null||o.call(e,r)};return w(qe,{children:w(MI,{height:"100%",width:"100%",defaultLanguage:e.language,defaultValue:e.initialValue,beforeMount:t,onMount:n,options:e.options})})},$m=({onValueChange:e,setterContext:t,initialValue:n,...r})=>{const o=g.useRef(null),[a,i]=g.useState(!1),s=()=>{var c;const l=((c=o.current)==null?void 0:c.getValue())||"";try{const u=JSON.parse(l);e(u)}catch(u){console.warn(u)}};return te(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[w(Y.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),w(Y.Modal,{destroyOnClose:!0,open:a,title:"JSON Editor",width:"800px",onCancel:()=>i(!1),onOk:()=>{s(),i(!1)},style:{},children:w("div",{style:{height:"500px"},children:a&&w(sa,{onDidMount:l=>{o.current=l},initialValue:JSON.stringify(r.value??(n||{}),null,2),language:"json",options:{automaticLayout:!0,tabSize:2,suggestOnTriggerCharacters:!1}})})})]})};$m.setterName="JSON 设置器";const ap=`
138
+ `},ip=nI(iI)(Pm),sI={config:oI},lI=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return function(o){return n.reduceRight(function(a,i){return i(a)},o)}};function km(e,t){return Object.keys(t).forEach(function(n){t[n]instanceof Object&&e[n]&&Object.assign(t[n],km(e[n],t[n]))}),np(np({},e),t)}var cI={type:"cancelation",msg:"operation is manually canceled"};function Es(e){var t=!1,n=new Promise(function(r,o){e.then(function(a){return t?o(cI):r(a)}),e.catch(o)});return n.cancel=function(){return t=!0},n}var uI=eI.create({config:tI,isInitialized:!1,resolve:null,reject:null,monaco:null}),jm=D8(uI,2),ia=jm[0],Hi=jm[1];function dI(e){var t=sI.config(e),n=t.monaco,r=A8(t,["monaco"]);Hi(function(o){return{config:km(o.config,r),monaco:n}})}function fI(){var e=ia(function(t){var n=t.monaco,r=t.isInitialized,o=t.resolve;return{monaco:n,isInitialized:r,resolve:o}});if(!e.isInitialized){if(Hi({isInitialized:!0}),e.monaco)return e.resolve(e.monaco),Es(_s);if(window.monaco&&window.monaco.editor)return Mm(window.monaco),e.resolve(window.monaco),Es(_s);lI(pI,gI)(vI)}return Es(_s)}function pI(e){return document.body.appendChild(e)}function hI(e){var t=document.createElement("script");return e&&(t.src=e),t}function gI(e){var t=ia(function(r){var o=r.config,a=r.reject;return{config:o,reject:a}}),n=hI("".concat(t.config.paths.vs,"/loader.js"));return n.onload=function(){return e()},n.onerror=t.reject,n}function vI(){var e=ia(function(n){var r=n.config,o=n.resolve,a=n.reject;return{config:r,resolve:o,reject:a}}),t=window.require;t.config(e.config),t(["vs/editor/editor.main"],function(n){Mm(n),e.resolve(n)},function(n){e.reject(n)})}function Mm(e){ia().monaco||Hi({monaco:e})}function mI(){return ia(function(e){var t=e.monaco;return t})}var _s=new Promise(function(e,t){return Hi({resolve:e,reject:t})}),Am={config:dI,init:fI,__getMonacoInstance:mI},yI={wrapper:{display:"flex",position:"relative",textAlign:"initial"},fullWidth:{width:"100%"},hide:{display:"none"}},Rs=yI,bI={container:{display:"flex",height:"100%",width:"100%",justifyContent:"center",alignItems:"center"}},wI=bI;function SI({children:e}){return h.createElement("div",{style:wI.container},e)}var xI=SI,CI=xI;function OI({width:e,height:t,isEditorReady:n,loading:r,_ref:o,className:a,wrapperProps:i}){return h.createElement("section",{style:{...Rs.wrapper,width:e,height:t},...i},!n&&h.createElement(CI,null,r),h.createElement("div",{ref:o,style:{...Rs.fullWidth,...!n&&Rs.hide},className:a}))}var EI=OI,Dm=h.memo(EI);function _I(e){h.useEffect(e,[])}var $m=_I;function RI(e,t,n=!0){let r=h.useRef(!0);h.useEffect(r.current||!n?()=>{r.current=!1}:e,t)}var bt=RI;function Mo(){}function Sr(e,t,n,r){return NI(e,r)||TI(e,t,n,r)}function NI(e,t){return e.editor.getModel(Im(e,t))}function TI(e,t,n,r){return e.editor.createModel(t,n,r?Im(e,r):void 0)}function Im(e,t){return e.Uri.parse(t)}function PI({original:e,modified:t,language:n,originalLanguage:r,modifiedLanguage:o,originalModelPath:a,modifiedModelPath:i,keepCurrentOriginalModel:s=!1,keepCurrentModifiedModel:l=!1,theme:c="light",loading:u="Loading...",options:d={},height:f="100%",width:p="100%",className:g,wrapperProps:m={},beforeMount:b=Mo,onMount:y=Mo}){let[S,E]=h.useState(!1),[x,v]=h.useState(!0),C=h.useRef(null),O=h.useRef(null),R=h.useRef(null),N=h.useRef(y),T=h.useRef(b),M=h.useRef(!1);$m(()=>{let P=Am.init();return P.then(L=>(O.current=L)&&v(!1)).catch(L=>(L==null?void 0:L.type)!=="cancelation"&&console.error("Monaco initialization: error:",L)),()=>C.current?k():P.cancel()}),bt(()=>{let P=C.current.getModifiedEditor();P.getOption(O.current.editor.EditorOption.readOnly)?P.setValue(t||""):t!==P.getValue()&&(P.executeEdits("",[{range:P.getModel().getFullModelRange(),text:t||"",forceMoveMarkers:!0}]),P.pushUndoStop())},[t],S),bt(()=>{var P,L;(L=(P=C.current)==null?void 0:P.getModel())==null||L.original.setValue(e||"")},[e],S),bt(()=>{let{original:P,modified:L}=C.current.getModel();O.current.editor.setModelLanguage(P,r||n||"text"),O.current.editor.setModelLanguage(L,o||n||"text")},[n,r,o],S),bt(()=>{var P;(P=O.current)==null||P.editor.setTheme(c)},[c],S),bt(()=>{var P;(P=C.current)==null||P.updateOptions(d)},[d],S);let j=h.useCallback(()=>{var z;if(!O.current)return;T.current(O.current);let P=Sr(O.current,e||"",r||n||"text",a||""),L=Sr(O.current,t||"",o||n||"text",i||"");(z=C.current)==null||z.setModel({original:P,modified:L})},[n,t,o,e,r,a,i]),D=h.useCallback(()=>{var P;!M.current&&R.current&&(C.current=O.current.editor.createDiffEditor(R.current,{automaticLayout:!0,...d}),j(),(P=O.current)==null||P.editor.setTheme(c),E(!0),M.current=!0)},[d,c,j]);h.useEffect(()=>{S&&N.current(C.current,O.current)},[S]),h.useEffect(()=>{!x&&!S&&D()},[x,S,D]),bt(()=>{if(C.current&&O.current){let P=C.current.getOriginalEditor(),L=Sr(O.current,e||"",r||n||"text",a||"");L!==P.getModel()&&P.setModel(L)}},[a],S),bt(()=>{if(C.current&&O.current){let P=C.current.getModifiedEditor(),L=Sr(O.current,t||"",o||n||"text",i||"");L!==P.getModel()&&P.setModel(L)}},[i],S);function k(){var L,z,Z,J;let P=(L=C.current)==null?void 0:L.getModel();s||((z=P==null?void 0:P.original)==null||z.dispose()),l||((Z=P==null?void 0:P.modified)==null||Z.dispose()),(J=C.current)==null||J.dispose()}return h.createElement(Dm,{width:p,height:f,isEditorReady:S,loading:u,_ref:R,className:g,wrapperProps:m})}var kI=PI;h.memo(kI);function jI(e){let t=h.useRef();return h.useEffect(()=>{t.current=e},[e]),t.current}var MI=jI,Ma=new Map;function AI({defaultValue:e,defaultLanguage:t,defaultPath:n,value:r,language:o,path:a,theme:i="light",line:s,loading:l="Loading...",options:c={},overrideServices:u={},saveViewState:d=!0,keepCurrentModel:f=!1,width:p="100%",height:g="100%",className:m,wrapperProps:b={},beforeMount:y=Mo,onMount:S=Mo,onChange:E,onValidate:x=Mo}){let[v,C]=h.useState(!1),[O,R]=h.useState(!0),N=h.useRef(null),T=h.useRef(null),M=h.useRef(null),j=h.useRef(S),D=h.useRef(y),k=h.useRef(),P=h.useRef(r),L=MI(a),z=h.useRef(!1),Z=h.useRef(!1);$m(()=>{let A=Am.init();return A.then($=>(N.current=$)&&R(!1)).catch($=>($==null?void 0:$.type)!=="cancelation"&&console.error("Monaco initialization: error:",$)),()=>T.current?le():A.cancel()}),bt(()=>{var $,W,ne,ie;let A=Sr(N.current,e||r||"",t||o||"",a||n||"");A!==(($=T.current)==null?void 0:$.getModel())&&(d&&Ma.set(L,(W=T.current)==null?void 0:W.saveViewState()),(ne=T.current)==null||ne.setModel(A),d&&((ie=T.current)==null||ie.restoreViewState(Ma.get(a))))},[a],v),bt(()=>{var A;(A=T.current)==null||A.updateOptions(c)},[c],v),bt(()=>{!T.current||r===void 0||(T.current.getOption(N.current.editor.EditorOption.readOnly)?T.current.setValue(r):r!==T.current.getValue()&&(Z.current=!0,T.current.executeEdits("",[{range:T.current.getModel().getFullModelRange(),text:r,forceMoveMarkers:!0}]),T.current.pushUndoStop(),Z.current=!1))},[r],v),bt(()=>{var $,W;let A=($=T.current)==null?void 0:$.getModel();A&&o&&((W=N.current)==null||W.editor.setModelLanguage(A,o))},[o],v),bt(()=>{var A;s!==void 0&&((A=T.current)==null||A.revealLine(s))},[s],v),bt(()=>{var A;(A=N.current)==null||A.editor.setTheme(i)},[i],v);let J=h.useCallback(()=>{var A;if(!(!M.current||!N.current)&&!z.current){D.current(N.current);let $=a||n,W=Sr(N.current,r||e||"",t||o||"",$||"");T.current=(A=N.current)==null?void 0:A.editor.create(M.current,{model:W,automaticLayout:!0,...c},u),d&&T.current.restoreViewState(Ma.get($)),N.current.editor.setTheme(i),C(!0),z.current=!0}},[e,t,n,r,o,a,c,u,d,i]);h.useEffect(()=>{v&&j.current(T.current,N.current)},[v]),h.useEffect(()=>{!O&&!v&&J()},[O,v,J]),P.current=r,h.useEffect(()=>{var A,$;v&&E&&((A=k.current)==null||A.dispose(),k.current=($=T.current)==null?void 0:$.onDidChangeModelContent(W=>{Z.current||E(T.current.getValue(),W)}))},[v,E]),h.useEffect(()=>{if(v){let A=N.current.editor.onDidChangeMarkers($=>{var ne;let W=(ne=T.current.getModel())==null?void 0:ne.uri;if(W&&$.find(ie=>ie.path===W.path)){let ie=N.current.editor.getModelMarkers({resource:W});x==null||x(ie)}});return()=>{A==null||A.dispose()}}return()=>{}},[v,x]);function le(){var A,$;(A=k.current)==null||A.dispose(),f?d&&Ma.set(a,T.current.saveViewState()):($=T.current.getModel())==null||$.dispose(),T.current.dispose()}return h.createElement(Dm,{width:p,height:g,isEditorReady:v,loading:l,_ref:M,className:m,wrapperProps:b})}var DI=AI,$I=h.memo(DI),II=$I;const sa=e=>{const t=r=>{var o;(o=e.beforeMount)==null||o.call(e,r)},n=r=>{var o;(o=e.onDidMount)==null||o.call(e,r)};return w(Ye,{children:w(II,{height:"100%",width:"100%",defaultLanguage:e.language,defaultValue:e.initialValue,beforeMount:t,onMount:n,options:e.options})})},Lm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>{const o=h.useRef(null),[a,i]=h.useState(!1),s=()=>{var c;const l=((c=o.current)==null?void 0:c.getValue())||"";try{const u=JSON.parse(l);e(u)}catch(u){console.warn(u)}};return te(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[w(Y.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),w(Y.Modal,{destroyOnClose:!0,open:a,title:"JSON Editor",width:"800px",onCancel:()=>i(!1),onOk:()=>{s(),i(!1)},style:{},children:w("div",{style:{height:"500px"},children:a&&w(sa,{onDidMount:l=>{o.current=l},initialValue:JSON.stringify(r.value??(n||{}),null,2),language:"json",options:{automaticLayout:!0,tabSize:2,suggestOnTriggerCharacters:!1}})})})]})};Lm.setterName="JSON 设置器";const sp=`
139
139
  type ContextType = {
140
140
  /** 渲染函数的入口参数 */
141
141
  params?: Record<any, any>;
@@ -181,12 +181,12 @@ type ContextType = {
181
181
 
182
182
  /** 渲染上下文 */
183
183
  declare var $$context: ContextType;
184
- `,Im=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var l;const o=g.useRef(null),[a,i]=g.useState(!1),s=()=>{var u;const c=((u=o.current)==null?void 0:u.getValue())||"";e({type:ye.CNodePropsTypeEnum.FUNCTION,value:c})};return te(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[w(Y.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),w(Y.Modal,{centered:!0,destroyOnClose:!0,open:a,title:"Function Editor",onCancel:()=>i(!1),width:"calc(100vw - 100px)",onOk:()=>{s(),i(!1)},style:{maxWidth:"1300px"},bodyStyle:{minHeight:"500px",height:"calc(100vh - 280px)"},children:w("div",{style:{height:"100%"},children:a&&w(sa,{beforeMount:c=>{c.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!1}),c.languages.typescript.javascriptDefaults.setCompilerOptions({target:c.languages.typescript.ScriptTarget.ES5,allowNonTsExtensions:!0});const u="ts:filename/chameleon.default.variable.d.ts";c.languages.typescript.javascriptDefaults.addExtraLib(ap,u),c.editor.getModel(c.Uri.parse(u))||c.editor.createModel(ap,"typescript",c.Uri.parse(u))},onDidMount:c=>{o.current=c},initialValue:((l=r.value)==null?void 0:l.value)??(t||""),language:"javascript",options:{automaticLayout:!0,tabSize:2}})})})]})};Im.setterName="函数 设置器";const Lm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input.TextArea,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});Lm.setterName="长文本设置器";const Bm=e=>typeof e=="function",AI="{}".NODE_ENV==="development"||"{}".NODE_ENV==="test",zm=AI;function Fm(e){const t=g.useRef(e);return t.current=e,t}const DI=e=>{zm&&(Bm(e)||console.error(`useUnmount expected parameter is a function, got ${typeof e}`));const t=Fm(e);g.useEffect(()=>()=>{t.current()},[])},$I=DI;function II(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Vm=II,LI=typeof So=="object"&&So&&So.Object===Object&&So,BI=LI,zI=BI,FI=typeof self=="object"&&self&&self.Object===Object&&self,VI=zI||FI||Function("return this")(),Hm=VI,HI=Hm,UI=function(){return HI.Date.now()},WI=UI,GI=/\s/;function KI(e){for(var t=e.length;t--&&GI.test(e.charAt(t)););return t}var qI=KI,YI=qI,XI=/^\s+/;function JI(e){return e&&e.slice(0,YI(e)+1).replace(XI,"")}var QI=JI,ZI=Hm,e6=ZI.Symbol,Um=e6,ip=Um,Wm=Object.prototype,t6=Wm.hasOwnProperty,n6=Wm.toString,bo=ip?ip.toStringTag:void 0;function r6(e){var t=t6.call(e,bo),n=e[bo];try{e[bo]=void 0;var r=!0}catch{}var o=n6.call(e);return r&&(t?e[bo]=n:delete e[bo]),o}var o6=r6,a6=Object.prototype,i6=a6.toString;function s6(e){return i6.call(e)}var l6=s6,sp=Um,c6=o6,u6=l6,d6="[object Null]",f6="[object Undefined]",lp=sp?sp.toStringTag:void 0;function p6(e){return e==null?e===void 0?f6:d6:lp&&lp in Object(e)?c6(e):u6(e)}var h6=p6;function g6(e){return e!=null&&typeof e=="object"}var v6=g6,m6=h6,y6=v6,b6="[object Symbol]";function w6(e){return typeof e=="symbol"||y6(e)&&m6(e)==b6}var S6=w6,x6=QI,cp=Vm,C6=S6,up=0/0,O6=/^[-+]0x[0-9a-f]+$/i,E6=/^0b[01]+$/i,_6=/^0o[0-7]+$/i,R6=parseInt;function N6(e){if(typeof e=="number")return e;if(C6(e))return up;if(cp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=cp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=x6(e);var n=E6.test(e);return n||_6.test(e)?R6(e.slice(2),n?2:8):O6.test(e)?up:+e}var T6=N6,P6=Vm,Ns=WI,dp=T6,k6="Expected a function",j6=Math.max,M6=Math.min;function A6(e,t,n){var r,o,a,i,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(k6);t=dp(t)||0,P6(n)&&(u=!!n.leading,d="maxWait"in n,a=d?j6(dp(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f);function p(O){var C=r,R=o;return r=o=void 0,c=O,i=e.apply(R,C),i}function h(O){return c=O,s=setTimeout(y,t),u?p(O):i}function m(O){var C=O-l,R=O-c,N=t-C;return d?M6(N,a-R):N}function b(O){var C=O-l,R=O-c;return l===void 0||C>=t||C<0||d&&R>=a}function y(){var O=Ns();if(b(O))return S(O);s=setTimeout(y,m(O))}function S(O){return s=void 0,f&&r?p(O):(r=o=void 0,i)}function E(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function x(){return s===void 0?i:S(Ns())}function v(){var O=Ns(),C=b(O);if(r=arguments,o=this,l=O,C){if(s===void 0)return h(l);if(d)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),i}return v.cancel=E,v.flush=x,v}var D6=A6;const $6=Yl(D6);function su(e,t){var n;zm&&(Bm(e)||console.error(`useDebounceFn expected parameter is a function, got ${typeof e}`));const r=Fm(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,a=g.useMemo(()=>$6((...i)=>r.current(...i),o,t),[]);return $I(()=>{a.cancel()}),{run:a,cancel:a.cancel,flush:a.flush}}const I6="_inputAuto_gk0d2_2",L6="_active_gk0d2_6",fp={inputAuto:I6,active:L6},Gm={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},Km=Gm.cssKeyValue,B6=Object.keys(Gm.cssKeyValue),qm=({onValueChange:e,setterContext:t,propertyKey:n="",value:r,initialValue:o,...a})=>{const i=g.useRef(null),[s,l]=g.useState(r??(o||"")),[c,u]=g.useState(!1),d=()=>{e==null||e(s)};g.useLayoutEffect(()=>{l(r)},[r]);const{run:f}=su(d,{wait:10}),p=g.useMemo(()=>{var m;return(((m=Km[n])==null?void 0:m.values)||[]).map(b=>({value:b}))},[n]);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.AutoComplete,{ref:i,popupMatchSelectWidth:200,bordered:!1,value:s,onChange:h=>{l(h),f()},style:{flex:1},onFocus:()=>{u(!0)},onBlur:()=>{u(!1)},className:dt([fp.inputAuto,c&&fp.active]),placeholder:"value",options:p})})};qm.setterName="CSS值设置器";const z6={StringSetter:em,ArraySetter:Cm,ShapeSetter:Om,NumberSetter:tm,ExpressionSetter:Em,BooleanSetter:_m,SelectSetter:Rm,JSONSetter:$m,FunctionSetter:Im,TextAreaSetter:Lm,CSSValueSetter:qm},F6="_fieldBox_nltxm_3",V6="_label_nltxm_11",H6="_tipsLabel_nltxm_25",U6="_content_nltxm_32",Aa={fieldBox:F6,label:V6,tipsLabel:H6,content:U6},Da=e=>{const{children:t,label:n,tips:r,name:o}=e;let a=n;const{formState:i,updateContext:s,updateConditionConfig:l}=g.useContext(Gc);if(g.useEffect(()=>{e.condition&&l(o,e.condition)},[]),g.useEffect(()=>{var h;const p=(e.condition??(()=>!0))(i);(h=e.onConditionValueChange)==null||h.call(e,p)},[i,e]),r){let f=r;typeof r=="function"&&(f=r()),a=w(Y.Tooltip,{title:w("span",{style:{color:"rgba(255,255,255,0.9",fontSize:"12px"},children:f}),color:"rgba(50,50,50,0.8)",children:w("span",{className:Aa.tipsLabel,children:n})})}let c=t;if(g.isValidElement(t)){const f={onValueChange:p=>{s({...i,[o]:p})}};i[o]!==void 0&&(f.value=i[o]),c=g.cloneElement(t,f)}return(e.condition??(()=>!0))(i)?e.noStyle?w(qe,{children:c}):te("div",{className:Aa.fieldBox,children:[w("div",{className:Aa.label,children:a}),w("div",{className:Aa.content,children:c})]}):null},W6="_switchBtn_k17cr_2",G6="_shapeFieldBox_k17cr_8",K6="_collapseHeader_k17cr_9",$a={switchBtn:W6,shapeFieldBox:G6,collapseHeader:K6},Ym=g.createContext({defaultSetterConfig:{},onSetterChange:()=>{}}),lu=({setters:e,keyPaths:t,condition:n,useField:r=!0,...o})=>{var T,k;const[a,i]=g.useState(!0),{customSetterMap:s}=g.useContext(Gc),{onSetterChange:l,defaultSetterConfig:c,formRef:u,pluginCtx:d}=g.useContext(Ym),f={...z6,...s},[p,h]=g.useState(()=>{var I;const j=((I=c[t.join(".")])==null?void 0:I.setter)||"";return[...e].find(M=>M.componentName===j)||e[0]});let m=null;p!=null&&p.componentName&&(m=f[p==null?void 0:p.componentName]||p.component),m||(m=function(){return w("div",{style:{backgroundColor:"whitesmoke",margin:"5px 0",padding:"5px",borderRadius:"2px",color:"gray"},children:`${p==null?void 0:p.componentName} is not found.`})});const b=e.map(j=>{const I=(j==null?void 0:j.componentName)||"",M=f[I];return{key:j.componentName,label:(M==null?void 0:M.setterName)||j.componentName}}),y=({key:j})=>{const I=e.find(M=>M.componentName===j);I&&(h(I),l==null||l(t,I.componentName))};let S=w("div",{className:$a.switchBtn,onClick:j=>{j.preventDefault(),j.stopPropagation()},children:w(Y.Dropdown,{trigger:["click"],menu:{selectable:!0,items:b,onClick:y,defaultSelectedKeys:[(p==null?void 0:p.componentName)||""]},children:w(U0,{})})});b.length===1&&(S=null);const E=g.useMemo(()=>{let j={...(p==null?void 0:p.props)||{},initialValue:p==null?void 0:p.initialValue};const I=e.find(M=>M.componentName===(p==null?void 0:p.componentName));return I&&(j={...j,...I.props}),j},[e]),x={formRef:u,pluginCtx:d},[v,O]=g.useState([]),C={condition:n,onConditionValueChange:j=>{i(j)}};let R=null;const N=r===!1||(p==null?void 0:p.hiddenLabel)===!0;return["ArraySetter"].includes((p==null?void 0:p.componentName)||"")?R=w(Y.Collapse,{bordered:!1,style:{marginBottom:"10px"},defaultActiveKey:[o.name],items:[{label:te("div",{className:$a.collapseHeader,children:[w("span",{style:{flex:1},children:o.label}),v,S]}),children:N?w(m,{...E,setterContext:{...x,keyPaths:[...t],label:o.label,setCollapseHeaderExt:O}}):w(Da,{...o,noStyle:!0,...C,children:w(m,{...E,setterContext:{...x,keyPaths:[...t],label:o.label,setCollapseHeaderExt:O}})})}]}):["ShapeSetter"].includes((p==null?void 0:p.componentName)||"")?R=te("div",{className:$a.shapeFieldBox,children:[o.prefix??null,((T=p==null?void 0:p.props)==null?void 0:T.collapse)===!1&&te("div",{style:{width:"100%"},children:[!N&&w(Da,{...o,noStyle:!0,...C,children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})}),N&&w(m,{...E,setterContext:{...x,keyPaths:[...t]}})]}),((k=p==null?void 0:p.props)==null?void 0:k.collapse)!==!1&&w(Y.Collapse,{bordered:!1,style:{flex:1},items:[{key:o.name,label:te("div",{className:$a.collapseHeader,children:[w("span",{style:{flex:1},children:o.label}),S]}),children:w(Da,{...o,noStyle:!0,...C,children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})})}]}),o.suffix??null]}):R=te("div",{style:{display:"flex",alignItems:"center",paddingBottom:"8px"},children:[o.prefix??null,!N&&w(Da,{...o,condition:n,onConditionValueChange:j=>{i(j)},children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})}),N&&w(m,{...E,setterContext:{...x,keyPaths:[...t]}}),S,o.suffix??null]}),w("div",{style:{display:a?"block":"none",overflow:"auto"},children:R})},q6="_CFromRenderBox_13lda_2",Y6={CFromRenderBox:q6},X6=(e,t)=>{const{properties:n,initialValue:r,onValueChange:o,onSetterChange:a,defaultSetterConfig:i,pluginCtx:s,customSetterMap:l}=e,c=n;return w(Ym.Provider,{value:{defaultSetterConfig:i,onSetterChange:a,formRef:t,pluginCtx:s},children:w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w("div",{className:Y6.CFromRenderBox,style:{overflow:"auto",height:"100%"},children:w(Kc,{ref:t,name:"root-form",initialValue:r,customSetterMap:l,onValueChange:u=>{o==null||o(u)},children:c.map(u=>{if(ye.isSpecialMaterialPropType(u))console.log("Current not Support type config for props, wait future....");else{const d=RD(u.title),f=ye.getMTitleTip(u.title),p=Xc(u.setters),h=[u.name];return w(lu,{condition:u.condition,keyPaths:h,setters:p,label:d,name:u.name||"",tips:f},u.name)}})})})})})},cu=g.forwardRef(X6),J6=e=>{var l,c,u;const{node:t}=e,n=((l=t==null?void 0:t.material)==null?void 0:l.value.props)||[],r=g.useRef(null);g.useEffect(()=>{const d=()=>{var p,h;const f=((p=t==null?void 0:t.getPlainProps)==null?void 0:p.call(t))||{};(h=r.current)==null||h.setFields(f)};d(),t==null||t.emitter.on("onNodeChange",d)},[t]);const o=((c=t==null?void 0:t.getPlainProps)==null?void 0:c.call(t))||{},a=d=>{t==null||t.updateValue({props:d})},i=(d,f)=>{t&&(t.value.configure=t.value.configure||{},t.value.configure.propsSetter=t.value.configure.propsSetter||{},t.value.configure.propsSetter[d.join(".")]={name:d.join("."),setter:f})},s=(u=e.pluginCtx.config)==null?void 0:u.customPropertySetterMap;return w("div",{className:fD.CFromRenderBox,children:w(cu,{pluginCtx:e.pluginCtx,defaultSetterConfig:(t==null?void 0:t.value.configure.propsSetter)||{},onSetterChange:i,properties:n,initialValue:o,ref:r,customSetterMap:s,onValueChange:a},t==null?void 0:t.id)})},Q6={key:"Property",name:"Property",view:({node:e,pluginCtx:t})=>w(J6,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.property)!==!1}},Z6=e=>{const{node:t}=e;if(!t)return w(qe,{});const n=t.value.state||{},r=g.useRef(null);g.useEffect(()=>{var i;const a=t.value.state||{};(i=r==null?void 0:r.current)==null||i.setValue(JSON.stringify(a,null,2))},[t]);const o=a=>{try{const i=JSON.parse(a||"{}");t.value.state=i,t.updateValue()}catch(i){console.warn(i)}};return w(qe,{children:w(sa,{initialValue:JSON.stringify(n,null,2),language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:a=>{r.current=a},onChange:o})})},eL={key:"State",name:"State",view:({node:e,pluginCtx:t})=>w(Z6,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.state)!==!1}},tL="_advanceBox_9o3af_2",nL={advanceBox:tL},rL=[{name:"id",title:{label:"id",tip:"node unique id"},valueType:"string",setters:[{componentName:"StringSetter",props:{disabled:!0,bordered:!1}}]},{name:"condition",title:{label:"Render",tip:"controller component render"},valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"loop",title:"loop render",valueType:"object",setters:[{componentName:"ShapeSetter",props:{elements:[{name:"open",title:"open",valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"data",title:"data",valueType:"array",setters:[{componentName:"ArraySetter",initialValue:[],props:{item:{setters:["JSONSetter","ExpressionSetter"],initialValue:{}}}},"JSONSetter","ExpressionSetter"]},{name:"forName",title:{label:"name",tip:"loop element name"},valueType:"string",setters:["StringSetter"]},{name:"forIndex",title:{label:"index",tip:"loop element index"},valueType:"string",setters:["StringSetter"]},{name:"key",title:{label:"key",tip:"loop element key"},valueType:"expression",setters:["ExpressionSetter"]},{name:"name",title:{label:`variable
185
- name`,tip:"loop variable name"},valueType:"string",setters:[{componentName:"StringSetter",props:{prefix:"loopData"}}]}]},initialValue:{open:!1,data:[]}}]},{name:"refId",title:{label:"refId",tip:"unique node flag"},valueType:"string",setters:["StringSetter"]},{name:"nodeName",title:{label:te(qe,{children:["node ",w("br",{})," name"]}),tip:"alias for node"},valueType:"string",setters:["StringSetter"]}],oL=e=>{var i;const{node:t}=e;if(!t)return w(qe,{});const n=(s,l)=>{t.value.configure=t.value.configure||{},t.value.configure.advanceSetter=t.value.configure.advanceSetter||{},t.value.configure.advanceSetter[s.join(".")]={name:s.join("."),setter:l}},r=t.value.loop,o=g.useRef(null);g.useEffect(()=>{var l;const s={id:t.id,condition:t.value.condition||!0,loop:{open:(r==null?void 0:r.open)||!1,data:(r==null?void 0:r.data)||[],forName:(r==null?void 0:r.forName)||"item",forIndex:(r==null?void 0:r.forIndex)||"index",key:(r==null?void 0:r.key)||"",name:(r==null?void 0:r.name)||""},refId:t.value.refId,nodeName:t.value.nodeName};(l=o.current)==null||l.setFields(s)},[t]);const a=s=>{t.value.loop=s.loop,t.value.condition=s.condition,t.value.refId=s.refId,t.value.nodeName=s.nodeName,t.updateValue()};return w("div",{className:nL.advanceBox,children:w(cu,{defaultSetterConfig:((i=t.value.configure)==null?void 0:i.advanceSetter)||{},onSetterChange:n,properties:rL,initialValue:{},ref:o,onValueChange:a},t.id)})},aL={key:"Advance",name:"Advance",view:({node:e,pluginCtx:t})=>w(oL,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.advance)!==!1}},iL="_rightPanelContainer_1p332_2",sL={rightPanelContainer:iL},lL="_visualPanelBox_6q12v_2",cL="_header_6q12v_5",pp={visualPanelBox:lL,header:cL},uL={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},dL=Object.keys(uL.cssKeyValue),fL="_cssFieldBox_15f2h_2",pL="_row_15f2h_9",hL="_fieldLabel_15f2h_14",gL="_leftBox_15f2h_20",vL="_rightBox_15f2h_23",mL="_inputBox_15f2h_26",yL="_cssBox_15f2h_30",fn={cssFieldBox:fL,row:pL,fieldLabel:hL,leftBox:gL,rightBox:vL,inputBox:mL,cssBox:yL},bL=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),Ts=dL.map(e=>({value:e})),hp=g.forwardRef(function(t,n){var v,O;const[r,o]=g.useState(""),[a,i]=g.useState(""),{mod:s="create"}=t,[l,c]=g.useState({key:((v=t.value)==null?void 0:v.key)||"",value:((O=t.value)==null?void 0:O.value)||{type:ye.CNodePropsTypeEnum.EXPRESSION,value:""}});g.useEffect(()=>{t.value&&c(t.value)},[t.value]);const[u,d]=g.useState(Ts),f=C=>{const R=Ts.filter(N=>N.value.includes(C));d(C?R:Ts)},p=()=>{t.onValueChange({...l})},{run:h}=su(p,{wait:20}),[m,b]=g.useState(0);g.useEffect(()=>{bL(l.key,13.33).then(C=>{let R=parseFloat(C);l.key===""&&(R=200),b(R+6)})},[l.key]);const y=g.useRef(null),[S,E]=g.useState({key:!1,value:!1});g.useImperativeHandle(n,()=>({reset:()=>{var C;c({key:"",value:{type:ye.CNodePropsTypeEnum.EXPRESSION,value:""}}),(C=y.current)==null||C.focus()}}),[]);const x=()=>{var R,N,T;if(l.key===""){o("error");return}if(l.value.value===""){i("error");return}o(""),i("");const C=(R=t.onCreate)==null?void 0:R.call(t,l);(N=C==null?void 0:C.errorKey)!=null&&N.includes("key")&&o("error"),(T=C==null?void 0:C.errorKey)!=null&&T.includes("value")&&i("error")};return w(qe,{children:te("div",{className:fn.cssFieldBox,children:[te("div",{className:fn.leftBox,children:[te("div",{className:fn.row,children:[w("span",{className:fn.fieldLabel,children:"Name"}),w(Y.AutoComplete,{status:r,disabled:s==="edit",ref:y,onSearch:f,popupMatchSelectWidth:200,value:l.key,onChange:C=>{o(""),c({...l,key:C})},style:{width:`${m}px`},className:dt([fn.inputBox]),onFocus:()=>{E({key:!0,value:!1})},onBlur:()=>{E({key:!1,value:!1}),h()},placeholder:"property",options:u})]}),te("div",{className:fn.row,children:[w("span",{className:fn.fieldLabel,children:"Value"}),w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input,{status:a,value:l.value.value,onChange:C=>{i("");const R={type:ye.CNodePropsTypeEnum.EXPRESSION,value:C.target.value};c({...l,value:R})},onPressEnter:()=>{h()},onKeyDown:C=>{var R;C.code==="Enter"&&s==="create"&&(x(),(R=y.current)==null||R.focus())}})})]})]}),w("div",{className:fn.rightBox,children:t.onDelete&&s==="edit"&&w(Y.Button,{size:"small",type:"text",onClick:()=>{var C;(C=t.onDelete)==null||C.call(t)},children:w(Oh,{style:{display:"inline-flex",fontSize:"12px"}})})}),t.onCreate&&s==="create"&&w("div",{children:w(Y.Button,{size:"small",type:"text",icon:w(nc,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:x})})]})})}),wL=g.forwardRef(function(t,n){const[r,o]=g.useState([]);g.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),g.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=g.useState({key:"",value:{type:ye.CNodePropsTypeEnum.EXPRESSION,value:""}}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=g.useRef(null);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:te("div",{className:fn.cssBox,children:[r.map((c,u)=>w("div",{children:w(hp,{value:c,mod:"edit",onValueChange:d=>{if(d.key===""){r.splice(u,1),o([...r]);return}r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),w(hp,{value:a,ref:l,mod:"create",onValueChange:c=>{i(c)},onCreate:c=>{if(r.find(d=>d.key===c.key))return Y.message.error("The attribute name already exists, please replace"),{errorKey:["key"]};r.push(c),o([...r]),s(r),i({key:"",value:{type:ye.CNodePropsTypeEnum.EXPRESSION,value:""}})}})]})})}),SL=[{title:"Class Names",name:"className",valueType:"array",setters:[{componentName:"ArraySetter",props:{sortLabelKey:"name",item:{setters:[{componentName:"ShapeSetter",props:{collapse:!1,elements:[{name:"name",title:"类名",valueType:"string",setters:["StringSetter"]},{name:"status",title:"启用",valueType:"boolean",setters:["ExpressionSetter"]}]},initialValue:{}}],initialValue:{name:"",status:{type:ye.CNodePropsTypeEnum.EXPRESSION,value:!0}}}},initialValue:[]}]}],xL=g.forwardRef(function(t,n){return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w("div",{children:w(cu,{initialValue:[],properties:SL,onSetterChange:function(){},onValueChange:r=>{var o;(o=t.onValueChange)==null||o.call(t,r.className||[])},defaultSetterConfig:{}})})})});function CL(e){if(Array.isArray(e))return Us(e)}function OL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
186
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jn(e){return CL(e)||Zg(e)||Jl(e)||OL()}function uu(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Xm(e,t,n){var r=W.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function EL(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function o(a,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(a);if(Mn(!l,"Warning: There may be circular references"),l)return!1;if(a===i)return!0;if(n&&s>1)return!1;r.add(a);var c=s+1;if(Array.isArray(a)){if(!Array.isArray(i)||a.length!==i.length)return!1;for(var u=0;u<a.length;u++)if(!o(a[u],i[u],c))return!1;return!0}if(a&&i&&xe(a)==="object"&&xe(i)==="object"){var d=Object.keys(a);return d.length!==Object.keys(i).length?!1:d.every(function(f){return o(a[f],i[f],c)})}return!1}return o(e,t)}var gp="%",_L=function(){function e(t){nt(this,e),ae(this,"instanceId",void 0),ae(this,"cache",new Map),this.instanceId=t}return rt(e,[{key:"get",value:function(n){return this.cache.get(n.join(gp))||null}},{key:"update",value:function(n,r){var o=n.join(gp),a=this.cache.get(o),i=r(a);i===null?this.cache.delete(o):this.cache.set(o,i)}}]),e}(),jl="data-token-hash",Kn="data-css-hash",RL="data-cache-path",xr="__cssinjs_instance__";function NL(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Kn,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(o){o[xr]=o[xr]||e,o[xr]===e&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Kn,"]"))).forEach(function(o){var a=o.getAttribute(Kn);if(r[a]){if(o[xr]===e){var i;(i=o.parentNode)===null||i===void 0||i.removeChild(o)}}else r[a]=!0})}return new _L(e)}var TL=W.createContext({hashPriority:"low",cache:NL(),defaultCache:!0});const du=TL;function mi(e){var t="";return Object.keys(e).forEach(function(n){var r=e[n];t+=n,r&&xe(r)==="object"?t+=mi(r):t+=r}),t}function PL(e,t){return uu("".concat(t,"_").concat(mi(e)))}var Ao="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),Jm="_bAmBoO_";function kL(e,t,n){if(en()){var r,o;Do(e,Ao);var a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",t==null||t(a),document.body.appendChild(a),"{}".NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");var i=n?n(a):(r=getComputedStyle(a).content)===null||r===void 0?void 0:r.includes(Jm);return(o=a.parentNode)===null||o===void 0||o.removeChild(a),sh(Ao),i}return!1}var Ps=void 0;function jL(){return Ps===void 0&&(Ps=kL("@layer ".concat(Ao," { .").concat(Ao,' { content: "').concat(Jm,'"!important; } }'),function(e){e.className=Ao})),Ps}var vp="{}".NODE_ENV!=="test"&&en()?W.useLayoutEffect:W.useEffect,ML=function(t,n){var r=W.useRef(!0);vp(function(){return t(r.current)},n),vp(function(){return r.current=!1,function(){r.current=!0}},[])},AL=H({},W),mp=AL.useInsertionEffect,DL=function(t,n,r){W.useMemo(t,r),ML(function(){return n(!0)},r)},$L=mp?function(e,t,n){return mp(function(){return e(),t()},n)}:DL;const IL=$L;function LL(){return!1}var Ml=!1;function BL(){return Ml}const zL="{}".NODE_ENV==="production"?LL:BL;if("{}".NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot){var ks=window;if(typeof ks.webpackHotUpdate=="function"){var FL=ks.webpackHotUpdate;ks.webpackHotUpdate=function(){return Ml=!0,setTimeout(function(){Ml=!1},0),FL.apply(void 0,arguments)}}}function Qm(e,t,n,r,o){var a=W.useContext(du),i=a.cache,s=[e].concat(jn(t)),l=s.join("_"),c=zL(),u=function(p){i.update(s,function(h){var m=h||[],b=Se(m,2),y=b[0],S=y===void 0?0:y,E=b[1],x=E;"{}".NODE_ENV!=="production"&&E&&c&&(r==null||r(x,c),x=null);var v=x||n(),O=[S,v];return p?p(O):O})};W.useMemo(function(){return u()},[l]);var d=i.get(s)[1];return IL(function(){o==null||o(d)},function(f){return u(function(p){var h=Se(p,2),m=h[0],b=h[1];return f&&m===0&&(o==null||o(d)),[m+1,b]}),function(){i.update(s,function(p){var h=p||[],m=Se(h,2),b=m[0],y=b===void 0?0:b,S=m[1],E=y-1;return E===0?(r==null||r(S,!1),null):[y-1,S]})}},[l]),d}var VL={},HL="{}".NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Wn=new Map;function UL(e){Wn.set(e,(Wn.get(e)||0)+1)}function WL(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(jl,'="').concat(e,'"]'));n.forEach(function(r){if(r[xr]===t){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var GL=0;function KL(e,t){Wn.set(e,(Wn.get(e)||0)-1);var n=Array.from(Wn.keys()),r=n.filter(function(o){var a=Wn.get(o)||0;return a<=0});n.length-r.length>GL&&r.forEach(function(o){WL(o,t),Wn.delete(o)})}var qL=function(t,n,r,o){var a=r.getDerivativeToken(t),i=H(H({},a),n);return o&&(i=o(i)),i};function YL(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=g.useContext(du),o=r.cache.instanceId,a=n.salt,i=a===void 0?"":a,s=n.override,l=s===void 0?VL:s,c=n.formatToken,u=W.useMemo(function(){return Object.assign.apply(Object,[{}].concat(jn(t)))},[t]),d=W.useMemo(function(){return mi(u)},[u]),f=W.useMemo(function(){return mi(l)},[l]),p=Qm("token",[i,e.id,d,f],function(){var h=qL(u,l,e,c),m=PL(h,i);h._tokenKey=m,UL(m);var b="".concat(HL,"-").concat(uu(m));return h._hashId=b,[h,b]},function(h){KL(h[0]._tokenKey,o)});return p}var XL={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},Zm="comm",ey="rule",ty="decl",JL="@import",QL="@keyframes",ZL="@layer",e3=Math.abs,fu=String.fromCharCode;function ny(e){return e.trim()}function qa(e,t,n){return e.replace(t,n)}function t3(e,t){return e.indexOf(t)}function Xo(e,t){return e.charCodeAt(t)|0}function Jo(e,t,n){return e.slice(t,n)}function hn(e){return e.length}function n3(e){return e.length}function Ia(e,t){return t.push(e),e}var Ui=1,Vr=1,ry=0,jt=0,Ue=0,so="";function pu(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Ui,column:Vr,length:i,return:"",siblings:s}}function r3(){return Ue}function o3(){return Ue=jt>0?Xo(so,--jt):0,Vr--,Ue===10&&(Vr=1,Ui--),Ue}function Vt(){return Ue=jt<ry?Xo(so,jt++):0,Vr++,Ue===10&&(Vr=1,Ui++),Ue}function qn(){return Xo(so,jt)}function Ya(){return jt}function Wi(e,t){return Jo(so,e,t)}function Al(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function a3(e){return Ui=Vr=1,ry=hn(so=e),jt=0,[]}function i3(e){return so="",e}function js(e){return ny(Wi(jt-1,Dl(e===91?e+2:e===40?e+1:e)))}function s3(e){for(;(Ue=qn())&&Ue<33;)Vt();return Al(e)>2||Al(Ue)>3?"":" "}function l3(e,t){for(;--t&&Vt()&&!(Ue<48||Ue>102||Ue>57&&Ue<65||Ue>70&&Ue<97););return Wi(e,Ya()+(t<6&&qn()==32&&Vt()==32))}function Dl(e){for(;Vt();)switch(Ue){case e:return jt;case 34:case 39:e!==34&&e!==39&&Dl(Ue);break;case 40:e===41&&Dl(e);break;case 92:Vt();break}return jt}function c3(e,t){for(;Vt()&&e+Ue!==47+10;)if(e+Ue===42+42&&qn()===47)break;return"/*"+Wi(t,jt-1)+"*"+fu(e===47?e:Vt())}function u3(e){for(;!Al(qn());)Vt();return Wi(e,jt)}function d3(e){return i3(Xa("",null,null,null,[""],e=a3(e),0,[0],e))}function Xa(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,f=0,p=0,h=0,m=1,b=1,y=1,S=0,E="",x=o,v=a,O=r,C=E;b;)switch(h=S,S=Vt()){case 40:if(h!=108&&Xo(C,d-1)==58){t3(C+=qa(js(S),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:C+=js(S);break;case 9:case 10:case 13:case 32:C+=s3(h);break;case 92:C+=l3(Ya()-1,7);continue;case 47:switch(qn()){case 42:case 47:Ia(f3(c3(Vt(),Ya()),t,n,l),l);break;default:C+="/"}break;case 123*m:s[c++]=hn(C)*y;case 125*m:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+u:y==-1&&(C=qa(C,/\f/g,"")),p>0&&hn(C)-d&&Ia(p>32?bp(C+";",r,n,d-1,l):bp(qa(C," ","")+";",r,n,d-2,l),l);break;case 59:C+=";";default:if(Ia(O=yp(C,t,n,c,u,o,s,E,x=[],v=[],d,a),a),S===123)if(u===0)Xa(C,t,O,O,x,a,d,s,v);else switch(f===99&&Xo(C,3)===110?100:f){case 100:case 108:case 109:case 115:Xa(e,O,O,r&&Ia(yp(e,O,O,0,0,o,s,E,o,x=[],d,v),v),o,v,d,s,r?x:v);break;default:Xa(C,O,O,O,[""],v,0,s,v)}}c=u=p=0,m=y=1,E=C="",d=i;break;case 58:d=1+hn(C),p=h;default:if(m<1){if(S==123)--m;else if(S==125&&m++==0&&o3()==125)continue}switch(C+=fu(S),S*m){case 38:y=u>0?1:(C+="\f",-1);break;case 44:s[c++]=(hn(C)-1)*y,y=1;break;case 64:qn()===45&&(C+=js(Vt())),f=qn(),u=d=hn(E=C+=u3(Ya())),S++;break;case 45:h===45&&hn(C)==2&&(m=0)}}return a}function yp(e,t,n,r,o,a,i,s,l,c,u,d){for(var f=o-1,p=o===0?a:[""],h=n3(p),m=0,b=0,y=0;m<r;++m)for(var S=0,E=Jo(e,f+1,f=e3(b=i[m])),x=e;S<h;++S)(x=ny(b>0?p[S]+" "+E:qa(E,/&\f/g,p[S])))&&(l[y++]=x);return pu(e,t,n,o===0?ey:s,l,c,u,d)}function f3(e,t,n,r){return pu(e,t,n,Zm,fu(r3()),Jo(e,2,-2),0,r)}function bp(e,t,n,r,o){return pu(e,t,n,ty,Jo(e,0,r),Jo(e,r+1,-1),r,o)}function $l(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function p3(e,t,n,r){switch(e.type){case ZL:if(e.children.length)break;case JL:case ty:return e.return=e.return||e.value;case Zm:return"";case QL:return e.return=e.value+"{"+$l(e.children,r)+"}";case ey:if(!hn(e.value=e.props.join(",")))return""}return hn(n=$l(e.children,r))?e.return=e.value+"{"+n+"}":""}function oy(e,t){var n=t.path,r=t.parentSelectors;Mn(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(e).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var h3=function(t,n,r){if(t==="content"){var o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,a=["normal","none","initial","inherit","unset"];(typeof n!="string"||a.indexOf(n)===-1&&!o.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&oy("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},g3=function(t,n,r){t==="animation"&&r.hashId&&n!=="none"&&oy("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},wp="data-ant-cssinjs-cache-path",ay="_FILE_STYLE__",Yn,iy=!0;function v3(){if(!Yn&&(Yn={},en())){var e=document.createElement("div");e.className=wp,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var a=o.split(":"),i=Se(a,2),s=i[0],l=i[1];Yn[s]=l});var n=document.querySelector("style[".concat(wp,"]"));if(n){var r;iy=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function m3(e){return v3(),!!Yn[e]}function y3(e){var t=Yn[e],n=null;if(t&&en())if(iy)n=ay;else{var r=document.querySelector("style[".concat(Kn,'="').concat(Yn[e],'"]'));r?n=r.innerHTML:delete Yn[e]}return[n,t]}var Sp=en(),sy="_skip_check_",ly="_multi_value_";function xp(e){var t=$l(d3(e),p3);return t.replace(/\{%%%\:[^;];}/g,";")}function b3(e){return xe(e)==="object"&&e&&(sy in e||ly in e)}function w3(e,t,n){if(!t)return e;var r=".".concat(t),o=n==="low"?":where(".concat(r,")"):r,a=e.split(",").map(function(i){var s,l=i.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(o).concat(c.slice(u.length)),[c].concat(jn(l.slice(1))).join(" ")});return a.join(",")}var S3=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,a=r.injectHash,i=r.parentSelectors,s=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,d=n.transformers,f=d===void 0?[]:d,p=n.linters,h=p===void 0?[]:p,m="",b={};function y(O){var C=O.getName(s);if(!b[C]){var R=e(O.style,n,{root:!1,parentSelectors:i}),N=Se(R,1),T=N[0];b[C]="@keyframes ".concat(O.getName(s)).concat(T)}}function S(O){var C=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return O.forEach(function(R){Array.isArray(R)?S(R,C):R&&C.push(R)}),C}var E=S(Array.isArray(t)?t:[t]);if(E.forEach(function(O){var C=typeof O=="string"&&!o?{}:O;if(typeof C=="string")m+="".concat(C,`
187
- `);else if(C._keyframe)y(C);else{var R=f.reduce(function(N,T){var k;return(T==null||(k=T.visit)===null||k===void 0?void 0:k.call(T,N))||N},C);Object.keys(R).forEach(function(N){var T=R[N];if(xe(T)==="object"&&T&&(N!=="animationName"||!T._keyframe)&&!b3(T)){var k=!1,j=N.trim(),I=!1;(o||a)&&s?j.startsWith("@")?k=!0:j=w3(N,s,u):o&&!s&&(j==="&"||j==="")&&(j="",I=!0);var M=e(T,n,{root:I,injectHash:k,parentSelectors:[].concat(jn(i),[j])}),P=Se(M,2),D=P[0],V=P[1];b=H(H({},b),V),m+="".concat(j).concat(D)}else{let de=function(A,B){"{}".NODE_ENV!=="production"&&(xe(T)!=="object"||!(T!=null&&T[sy]))&&[h3,g3].concat(jn(h)).forEach(function(ie){return ie(A,B,{path:c,hashId:s,parentSelectors:i})});var q=A.replace(/[A-Z]/g,function(ie){return"-".concat(ie.toLowerCase())}),Q=B;!XL[A]&&typeof Q=="number"&&Q!==0&&(Q="".concat(Q,"px")),A==="animationName"&&B!==null&&B!==void 0&&B._keyframe&&(y(B),Q=B.getName(s)),m+="".concat(q,":").concat(Q,";")};var ne,ee=(ne=T==null?void 0:T.value)!==null&&ne!==void 0?ne:T;xe(T)==="object"&&T!==null&&T!==void 0&&T[ly]&&Array.isArray(ee)?ee.forEach(function(A){de(N,A)}):de(N,ee)}})}}),!o)m="{".concat(m,"}");else if(l&&jL()){var x=l.split(","),v=x[x.length-1].trim();m="@layer ".concat(v," {").concat(m,"}"),x.length>1&&(m="@layer ".concat(l,"{%%%:%}").concat(m))}return[m,b]};function x3(e,t){return uu("".concat(e.join("%")).concat(t))}function C3(){return null}function Il(e,t){var n=e.token,r=e.path,o=e.hashId,a=e.layer,i=e.nonce,s=W.useContext(du),l=s.autoClear,c=s.mock,u=s.defaultCache,d=s.hashPriority,f=s.container,p=s.ssrInline,h=s.transformers,m=s.linters,b=s.cache,y=n._tokenKey,S=[y].concat(jn(r)),E=Sp;"{}".NODE_ENV!=="production"&&c!==void 0&&(E=c==="client");var x=Qm("style",S,function(){var N=S.join("|");if(m3(N)){var T=y3(N),k=Se(T,2),j=k[0],I=k[1];if(j)return[j,y,I,{}]}var M=t(),P=S3(M,{hashId:o,hashPriority:d,layer:a,path:r.join("-"),transformers:h,linters:m}),D=Se(P,2),V=D[0],ne=D[1],ee=xp(V),de=x3(S,ee);return[ee,y,de,ne]},function(N,T){var k=Se(N,3),j=k[2];(T||l)&&Sp&&sh(j,{mark:Kn})},function(N){var T=Se(N,4),k=T[0];T[1];var j=T[2],I=T[3];if(E&&k!==ay){var M={mark:Kn,prepend:"queue",attachTo:f},P=typeof i=="function"?i():i;P&&(M.csp={nonce:P});var D=Do(k,j,M);D[xr]=b.instanceId,D.setAttribute(jl,y),"{}".NODE_ENV!=="production"&&D.setAttribute(RL,S.join("|")),Object.keys(I).forEach(function(V){Do(xp(I[V]),"_effect-".concat(V),M)})}}),v=Se(x,3),O=v[0],C=v[1],R=v[2];return function(N){var T;if(!p||E||!u)T=w(C3,{});else{var k;T=w("style",{...(k={},ae(k,jl,C),ae(k,Kn,R),k),dangerouslySetInnerHTML:{__html:O}})}return te(qe,{children:[T,N]})}}function O3(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var hu=function(){function e(){nt(this,e),ae(this,"cache",void 0),ae(this,"keys",void 0),ae(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return rt(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i={map:this.cache};return n.forEach(function(s){if(!i)i=void 0;else{var l,c;i=(l=i)===null||l===void 0||(c=l.map)===null||c===void 0?void 0:c.get(s)}}),(r=i)!==null&&r!==void 0&&r.value&&a&&(i.value[1]=this.cacheCallTimes++),(o=i)===null||o===void 0?void 0:o.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var o=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(c,u){var d=Se(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),i=Se(a,1),s=i[0];this.delete(s)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[r,o.cacheCallTimes++]});else{var d=l.get(c);d?d.map||(d.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,r){var o=n.get(r[0]);if(r.length===1){var a;return o.map?n.set(r[0],{map:o.map}):n.delete(r[0]),(a=o.value)===null||a===void 0?void 0:a[0]}var i=this.deleteByPath(o.map,r.slice(1));return(!o.map||o.map.size===0)&&!o.value&&n.delete(r[0]),i}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!O3(r,n)}),this.deleteByPath(this.cache,n)}}]),e}();ae(hu,"MAX_CACHE_SIZE",20);ae(hu,"MAX_CACHE_OFFSET",5);var Cp=0,E3=function(){function e(t){nt(this,e),ae(this,"derivatives",void 0),ae(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=Cp,t.length===0&&eh(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),Cp+=1}return rt(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),e}(),Ms=new hu;function cy(e){var t=Array.isArray(e)?e:[e];return Ms.has(t)||Ms.set(t,new E3(t)),Ms.get(t)}function gr(e){return e.notSplit=!0,e}gr(["borderTop","borderBottom"]),gr(["borderTop"]),gr(["borderBottom"]),gr(["borderLeft","borderRight"]),gr(["borderLeft"]),gr(["borderRight"]);var _3=g.createContext({});const R3=_3;function Ll(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function uy(e,t,n,r){if(!t.length)return n;var o=ev(t),a=o[0],i=o.slice(1),s;return!e&&typeof a=="number"?s=[]:Array.isArray(e)?s=jn(e):s=H({},e),r&&n===void 0&&i.length===1?delete s[a][i[0]]:s[a]=uy(s[a],i,n,r),s}function As(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Ll(e,t.slice(0,-1))?e:uy(e,t,n,r)}function N3(e){return xe(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Op(e){return Array.isArray(e)?[]:{}}var T3=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function P3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Op(t[0]);return t.forEach(function(o){function a(i,s){var l=new Set(s),c=Ll(o,i),u=Array.isArray(c);if(u||N3(c)){if(!l.has(c)){l.add(c);var d=Ll(r,i);u?r=As(r,i,[]):(!d||xe(d)!=="object")&&(r=As(r,i,Op(c))),T3(c).forEach(function(f){a([].concat(jn(i),[f]),l)})}}else r=As(r,i,c)}a([])}),r}function k3(){}let dy=k3;"{}".NODE_ENV!=="production"&&(dy=(e,t,n)=>{Mn(e,`[antd: ${t}] ${n}`),"{}".NODE_ENV==="test"&&th()});const la=dy,j3=g.createContext(void 0),M3={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var A3={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",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",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,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"};const D3={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},fy=D3,$3={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"]},A3),timePickerLocale:Object.assign({},fy)},Ep=$3,mt="${label} is not a valid ${type}",I3={locale:"en",Pagination:M3,DatePicker:Ep,TimePicker:fy,Calendar:Ep,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",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"},PageHeader:{back:"Back"},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:mt,method:mt,array:mt,object:mt,number:mt,date:mt,boolean:mt,integer:mt,float:mt,regexp:mt,email:mt,url:mt,hex:mt},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"},ColorPicker:{presetEmpty:"Empty"}},gu=I3;let Ds=Object.assign({},gu.Modal);function _p(e){e?Ds=Object.assign(Object.assign({},Ds),e):Ds=Object.assign({},gu.Modal)}const L3=g.createContext(void 0),py=L3,hy="internalMark",gy=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&la(r===hy,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),W.useEffect(()=>(_p(t&&t.Modal),()=>{_p()}),[t]);const o=W.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return w(py.Provider,{value:o,children:n})};"{}".NODE_ENV!=="production"&&(gy.displayName="LocaleProvider");const B3=gy,z3="5.6.3",F3=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var La=2,Rp=.16,V3=.05,H3=.05,U3=.15,vy=5,my=4,W3=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function Np(e){var t=e.r,n=e.g,r=e.b,o=Qa(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Ba(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Za(t,n,r,!1))}function G3(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function Tp(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-La*t:Math.round(e.h)+La*t:r=n?Math.round(e.h)+La*t:Math.round(e.h)-La*t,r<0?r+=360:r>=360&&(r-=360),r}function Pp(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Rp*t:t===my?r=e.s+Rp:r=e.s+V3*t,r>1&&(r=1),n&&t===vy&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function kp(e,t,n){var r;return n?r=e.v+H3*t:r=e.v-U3*t,r>1&&(r=1),Number(r.toFixed(2))}function Hr(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Lt(e),o=vy;o>0;o-=1){var a=Np(r),i=Ba(Lt({h:Tp(a,o,!0),s:Pp(a,o,!0),v:kp(a,o,!0)}));n.push(i)}n.push(Ba(r));for(var s=1;s<=my;s+=1){var l=Np(r),c=Ba(Lt({h:Tp(l,s),s:Pp(l,s),v:kp(l,s)}));n.push(c)}return t.theme==="dark"?W3.map(function(u){var d=u.index,f=u.opacity,p=Ba(G3(Lt(t.backgroundColor||"#141414"),Lt(n[d]),f*100));return p}):n}var $s={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"},Is={},Ls={};Object.keys($s).forEach(function(e){Is[e]=Hr($s[e]),Is[e].primary=Is[e][5],Ls[e]=Hr($s[e],{theme:"dark",backgroundColor:"#141414"}),Ls[e].primary=Ls[e][5]});const K3=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},q3=K3;function Y3(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const yy={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"},X3=Object.assign(Object.assign({},yy),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
184
+ `,Bm=({onValueChange:e,initialValue:t,setterContext:n,...r})=>{var l;const o=h.useRef(null),[a,i]=h.useState(!1),s=()=>{var u;const c=((u=o.current)==null?void 0:u.getValue())||"";e({type:be.CNodePropsTypeEnum.FUNCTION,value:c})};return te(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:[w(Y.Button,{size:"small",style:{marginTop:"5px",width:"100%",color:"#676767",fontSize:"12px"},onClick:()=>{i(!0)},children:"Edit"}),w(Y.Modal,{centered:!0,destroyOnClose:!0,open:a,title:"Function Editor",onCancel:()=>i(!1),width:"calc(100vw - 100px)",onOk:()=>{s(),i(!1)},style:{maxWidth:"1300px"},bodyStyle:{minHeight:"500px",height:"calc(100vh - 280px)"},children:w("div",{style:{height:"100%"},children:a&&w(sa,{beforeMount:c=>{c.languages.typescript.javascriptDefaults.setDiagnosticsOptions({noSemanticValidation:!0,noSyntaxValidation:!1}),c.languages.typescript.javascriptDefaults.setCompilerOptions({target:c.languages.typescript.ScriptTarget.ES5,allowNonTsExtensions:!0});const u="ts:filename/chameleon.default.variable.d.ts";c.languages.typescript.javascriptDefaults.addExtraLib(sp,u),c.editor.getModel(c.Uri.parse(u))||c.editor.createModel(sp,"typescript",c.Uri.parse(u))},onDidMount:c=>{o.current=c},initialValue:((l=r.value)==null?void 0:l.value)??(t||""),language:"javascript",options:{automaticLayout:!0,tabSize:2}})})})]})};Bm.setterName="函数 设置器";const zm=({onValueChange:e,setterContext:t,initialValue:n,...r})=>w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input.TextArea,{...r,value:r.value??n,onChange:o=>{var a;(a=r.onChange)==null||a.call(r,o),e==null||e(o.target.value)}})});zm.setterName="长文本设置器";const Vm=e=>typeof e=="function",LI="{}".NODE_ENV==="development"||"{}".NODE_ENV==="test",Fm=LI;function Hm(e){const t=h.useRef(e);return t.current=e,t}const BI=e=>{Fm&&(Vm(e)||console.error(`useUnmount expected parameter is a function, got ${typeof e}`));const t=Hm(e);h.useEffect(()=>()=>{t.current()},[])},zI=BI;function VI(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Um=VI,FI=typeof So=="object"&&So&&So.Object===Object&&So,HI=FI,UI=HI,WI=typeof self=="object"&&self&&self.Object===Object&&self,GI=UI||WI||Function("return this")(),Wm=GI,KI=Wm,qI=function(){return KI.Date.now()},YI=qI,XI=/\s/;function JI(e){for(var t=e.length;t--&&XI.test(e.charAt(t)););return t}var QI=JI,ZI=QI,e6=/^\s+/;function t6(e){return e&&e.slice(0,ZI(e)+1).replace(e6,"")}var n6=t6,r6=Wm,o6=r6.Symbol,Gm=o6,lp=Gm,Km=Object.prototype,a6=Km.hasOwnProperty,i6=Km.toString,bo=lp?lp.toStringTag:void 0;function s6(e){var t=a6.call(e,bo),n=e[bo];try{e[bo]=void 0;var r=!0}catch{}var o=i6.call(e);return r&&(t?e[bo]=n:delete e[bo]),o}var l6=s6,c6=Object.prototype,u6=c6.toString;function d6(e){return u6.call(e)}var f6=d6,cp=Gm,p6=l6,h6=f6,g6="[object Null]",v6="[object Undefined]",up=cp?cp.toStringTag:void 0;function m6(e){return e==null?e===void 0?v6:g6:up&&up in Object(e)?p6(e):h6(e)}var y6=m6;function b6(e){return e!=null&&typeof e=="object"}var w6=b6,S6=y6,x6=w6,C6="[object Symbol]";function O6(e){return typeof e=="symbol"||x6(e)&&S6(e)==C6}var E6=O6,_6=n6,dp=Um,R6=E6,fp=0/0,N6=/^[-+]0x[0-9a-f]+$/i,T6=/^0b[01]+$/i,P6=/^0o[0-7]+$/i,k6=parseInt;function j6(e){if(typeof e=="number")return e;if(R6(e))return fp;if(dp(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=dp(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=_6(e);var n=T6.test(e);return n||P6.test(e)?k6(e.slice(2),n?2:8):N6.test(e)?fp:+e}var M6=j6,A6=Um,Ns=YI,pp=M6,D6="Expected a function",$6=Math.max,I6=Math.min;function L6(e,t,n){var r,o,a,i,s,l,c=0,u=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(D6);t=pp(t)||0,A6(n)&&(u=!!n.leading,d="maxWait"in n,a=d?$6(pp(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f);function p(C){var O=r,R=o;return r=o=void 0,c=C,i=e.apply(R,O),i}function g(C){return c=C,s=setTimeout(y,t),u?p(C):i}function m(C){var O=C-l,R=C-c,N=t-O;return d?I6(N,a-R):N}function b(C){var O=C-l,R=C-c;return l===void 0||O>=t||O<0||d&&R>=a}function y(){var C=Ns();if(b(C))return S(C);s=setTimeout(y,m(C))}function S(C){return s=void 0,f&&r?p(C):(r=o=void 0,i)}function E(){s!==void 0&&clearTimeout(s),c=0,r=l=o=s=void 0}function x(){return s===void 0?i:S(Ns())}function v(){var C=Ns(),O=b(C);if(r=arguments,o=this,l=C,O){if(s===void 0)return g(l);if(d)return clearTimeout(s),s=setTimeout(y,t),p(l)}return s===void 0&&(s=setTimeout(y,t)),i}return v.cancel=E,v.flush=x,v}var B6=L6;const z6=Yl(B6);function lu(e,t){var n;Fm&&(Vm(e)||console.error(`useDebounceFn expected parameter is a function, got ${typeof e}`));const r=Hm(e),o=(n=t==null?void 0:t.wait)!==null&&n!==void 0?n:1e3,a=h.useMemo(()=>z6((...i)=>r.current(...i),o,t),[]);return zI(()=>{a.cancel()}),{run:a,cancel:a.cancel,flush:a.flush}}const V6="_inputAuto_gk0d2_2",F6="_active_gk0d2_6",hp={inputAuto:V6,active:F6},qm={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},Ym=qm.cssKeyValue,H6=Object.keys(qm.cssKeyValue),Xm=({onValueChange:e,setterContext:t,propertyKey:n="",value:r,initialValue:o,...a})=>{const i=h.useRef(null),[s,l]=h.useState(r??(o||"")),[c,u]=h.useState(!1),d=()=>{e==null||e(s)};h.useLayoutEffect(()=>{l(r)},[r]);const{run:f}=lu(d,{wait:10}),p=h.useMemo(()=>{var m;return(((m=Ym[n])==null?void 0:m.values)||[]).map(b=>({value:b}))},[n]);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.AutoComplete,{ref:i,popupMatchSelectWidth:200,bordered:!1,value:s,onChange:g=>{l(g),f()},style:{flex:1},onFocus:()=>{u(!0)},onBlur:()=>{u(!1)},className:dt([hp.inputAuto,c&&hp.active]),placeholder:"value",options:p})})};Xm.setterName="CSS值设置器";const U6={StringSetter:nm,ArraySetter:Em,ShapeSetter:_m,NumberSetter:rm,ExpressionSetter:Rm,BooleanSetter:Nm,SelectSetter:Tm,JSONSetter:Lm,FunctionSetter:Bm,TextAreaSetter:zm,CSSValueSetter:Xm},W6="_fieldBox_nltxm_3",G6="_label_nltxm_11",K6="_tipsLabel_nltxm_25",q6="_content_nltxm_32",Aa={fieldBox:W6,label:G6,tipsLabel:K6,content:q6},Da=e=>{const{children:t,label:n,tips:r,name:o}=e;let a=n;const{formState:i,updateContext:s,updateConditionConfig:l}=h.useContext(Kc);if(h.useEffect(()=>{e.condition&&l(o,e.condition)},[]),h.useEffect(()=>{var g;const p=(e.condition??(()=>!0))(i);(g=e.onConditionValueChange)==null||g.call(e,p)},[i,e]),r){let f=r;typeof r=="function"&&(f=r()),a=w(Y.Tooltip,{title:w("span",{style:{color:"rgba(255,255,255,0.9",fontSize:"12px"},children:f}),color:"rgba(50,50,50,0.8)",children:w("span",{className:Aa.tipsLabel,children:n})})}let c=t;if(h.isValidElement(t)){const f={onValueChange:p=>{s({...i,[o]:p})}};i[o]!==void 0&&(f.value=i[o]),c=h.cloneElement(t,f)}return(e.condition??(()=>!0))(i)?e.noStyle?w(Ye,{children:c}):te("div",{className:Aa.fieldBox,children:[w("div",{className:Aa.label,children:a}),w("div",{className:Aa.content,children:c})]}):null},Y6="_switchBtn_k17cr_2",X6="_shapeFieldBox_k17cr_8",J6="_collapseHeader_k17cr_9",$a={switchBtn:Y6,shapeFieldBox:X6,collapseHeader:J6},Jm=h.createContext({defaultSetterConfig:{},onSetterChange:()=>{}}),cu=({setters:e,keyPaths:t,condition:n,useField:r=!0,...o})=>{var T,M;const[a,i]=h.useState(!0),{customSetterMap:s}=h.useContext(Kc),{onSetterChange:l,defaultSetterConfig:c,formRef:u,pluginCtx:d}=h.useContext(Jm),f={...U6,...s},[p,g]=h.useState(()=>{var D;const j=((D=c[t.join(".")])==null?void 0:D.setter)||"";return[...e].find(k=>k.componentName===j)||e[0]});let m=null;p!=null&&p.componentName&&(m=f[p==null?void 0:p.componentName]||p.component),m||(m=function(){return w("div",{style:{backgroundColor:"whitesmoke",margin:"5px 0",padding:"5px",borderRadius:"2px",color:"gray"},children:`${p==null?void 0:p.componentName} is not found.`})});const b=e.map(j=>{const D=(j==null?void 0:j.componentName)||"",k=f[D];return{key:j.componentName,label:(k==null?void 0:k.setterName)||j.componentName}}),y=({key:j})=>{const D=e.find(k=>k.componentName===j);D&&(g(D),l==null||l(t,D.componentName))};let S=w("div",{className:$a.switchBtn,onClick:j=>{j.preventDefault(),j.stopPropagation()},children:w(Y.Dropdown,{trigger:["click"],menu:{selectable:!0,items:b,onClick:y,defaultSelectedKeys:[(p==null?void 0:p.componentName)||""]},children:w(q0,{})})});b.length===1&&(S=null);const E=h.useMemo(()=>{let j={...(p==null?void 0:p.props)||{},initialValue:p==null?void 0:p.initialValue};const D=e.find(k=>k.componentName===(p==null?void 0:p.componentName));return D&&(j={...j,...D.props}),j},[e]),x={formRef:u,pluginCtx:d},[v,C]=h.useState([]),O={condition:n,onConditionValueChange:j=>{i(j)}};let R=null;const N=r===!1||(p==null?void 0:p.hiddenLabel)===!0;return["ArraySetter"].includes((p==null?void 0:p.componentName)||"")?R=w(Y.Collapse,{bordered:!1,style:{marginBottom:"10px"},defaultActiveKey:[o.name],items:[{label:te("div",{className:$a.collapseHeader,children:[w("span",{style:{flex:1},children:o.label}),v,S]}),children:N?w(m,{...E,setterContext:{...x,keyPaths:[...t],label:o.label,setCollapseHeaderExt:C}}):w(Da,{...o,noStyle:!0,...O,children:w(m,{...E,setterContext:{...x,keyPaths:[...t],label:o.label,setCollapseHeaderExt:C}})})}]}):["ShapeSetter"].includes((p==null?void 0:p.componentName)||"")?R=te("div",{className:$a.shapeFieldBox,children:[o.prefix??null,((T=p==null?void 0:p.props)==null?void 0:T.collapse)===!1&&te("div",{style:{width:"100%"},children:[!N&&w(Da,{...o,noStyle:!0,...O,children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})}),N&&w(m,{...E,setterContext:{...x,keyPaths:[...t]}})]}),((M=p==null?void 0:p.props)==null?void 0:M.collapse)!==!1&&w(Y.Collapse,{bordered:!1,style:{flex:1},items:[{key:o.name,label:te("div",{className:$a.collapseHeader,children:[w("span",{style:{flex:1},children:o.label}),S]}),children:w(Da,{...o,noStyle:!0,...O,children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})})}]}),o.suffix??null]}):R=te("div",{style:{display:"flex",alignItems:"center",paddingBottom:"8px"},children:[o.prefix??null,!N&&w(Da,{...o,condition:n,onConditionValueChange:j=>{i(j)},children:w(m,{...E,setterContext:{...x,keyPaths:[...t]}})}),N&&w(m,{...E,setterContext:{...x,keyPaths:[...t]}}),S,o.suffix??null]}),w("div",{style:{display:a?"block":"none",overflow:"auto"},children:R})},Q6="_CFromRenderBox_13lda_2",Z6={CFromRenderBox:Q6},eL=(e,t)=>{const{properties:n,initialValue:r,onValueChange:o,onSetterChange:a,defaultSetterConfig:i,pluginCtx:s,customSetterMap:l}=e,c=n;return w(Jm.Provider,{value:{defaultSetterConfig:i,onSetterChange:a,formRef:t,pluginCtx:s},children:w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w("div",{className:Z6.CFromRenderBox,style:{overflow:"auto",height:"100%"},children:w(qc,{ref:t,name:"root-form",initialValue:r,customSetterMap:l,onValueChange:u=>{o==null||o(u)},children:c.map(u=>{if(be.isSpecialMaterialPropType(u))console.log("Current not Support type config for props, wait future....");else{const d=kD(u.title),f=be.getMTitleTip(u.title),p=Jc(u.setters),g=[u.name];return w(cu,{condition:u.condition,keyPaths:g,setters:p,label:d,name:u.name||"",tips:f},u.name)}})})})})})},uu=h.forwardRef(eL),tL=e=>{var l,c,u;const{node:t}=e,n=((l=t==null?void 0:t.material)==null?void 0:l.value.props)||[],r=h.useRef(null);h.useEffect(()=>{const d=()=>{var p,g;const f=((p=t==null?void 0:t.getPlainProps)==null?void 0:p.call(t))||{};(g=r.current)==null||g.setFields(f)};d(),t==null||t.emitter.on("onNodeChange",d)},[t]);const o=((c=t==null?void 0:t.getPlainProps)==null?void 0:c.call(t))||{},a=d=>{t==null||t.updateValue({props:d})},i=(d,f)=>{t&&(t.value.configure=t.value.configure||{},t.value.configure.propsSetter=t.value.configure.propsSetter||{},t.value.configure.propsSetter[d.join(".")]={name:d.join("."),setter:f})},s=(u=e.pluginCtx.config)==null?void 0:u.customPropertySetterMap;return w("div",{className:vD.CFromRenderBox,children:w(uu,{pluginCtx:e.pluginCtx,defaultSetterConfig:(t==null?void 0:t.value.configure.propsSetter)||{},onSetterChange:i,properties:n,initialValue:o,ref:r,customSetterMap:s,onValueChange:a},t==null?void 0:t.id)})},nL={key:"Property",name:"Property",view:({node:e,pluginCtx:t})=>w(tL,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.property)!==!1}},rL=e=>{const{node:t}=e;if(!t)return w(Ye,{});const n=t.value.state||{},r=h.useRef(null);h.useEffect(()=>{var i;const a=t.value.state||{};(i=r==null?void 0:r.current)==null||i.setValue(JSON.stringify(a,null,2))},[t]);const o=a=>{try{const i=JSON.parse(a||"{}");t.value.state=i,t.updateValue()}catch(i){console.warn(i)}};return w(Ye,{children:w(sa,{initialValue:JSON.stringify(n,null,2),language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:a=>{r.current=a},onChange:o})})},oL={key:"State",name:"State",view:({node:e,pluginCtx:t})=>w(rL,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.state)!==!1}},aL="_advanceBox_9o3af_2",iL={advanceBox:aL},sL=[{name:"id",title:{label:"id",tip:"node unique id"},valueType:"string",setters:[{componentName:"StringSetter",props:{disabled:!0,bordered:!1}}]},{name:"condition",title:{label:"Render",tip:"controller component render"},valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"loop",title:"loop render",valueType:"object",setters:[{componentName:"ShapeSetter",props:{elements:[{name:"open",title:"open",valueType:"boolean",setters:["BooleanSetter","ExpressionSetter"]},{name:"data",title:"data",valueType:"array",setters:[{componentName:"ArraySetter",initialValue:[],props:{item:{setters:["JSONSetter","ExpressionSetter"],initialValue:{}}}},"JSONSetter","ExpressionSetter"]},{name:"forName",title:{label:"name",tip:"loop element name"},valueType:"string",setters:["StringSetter"]},{name:"forIndex",title:{label:"index",tip:"loop element index"},valueType:"string",setters:["StringSetter"]},{name:"key",title:{label:"key",tip:"loop element key"},valueType:"expression",setters:["ExpressionSetter"]},{name:"name",title:{label:`variable
185
+ name`,tip:"loop variable name"},valueType:"string",setters:[{componentName:"StringSetter",props:{prefix:"loopData"}}]}]},initialValue:{open:!1,data:[]}}]},{name:"refId",title:{label:"refId",tip:"unique node flag"},valueType:"string",setters:["StringSetter"]},{name:"nodeName",title:{label:te(Ye,{children:["node ",w("br",{})," name"]}),tip:"alias for node"},valueType:"string",setters:["StringSetter"]}],lL=e=>{var i;const{node:t}=e;if(!t)return w(Ye,{});const n=(s,l)=>{t.value.configure=t.value.configure||{},t.value.configure.advanceSetter=t.value.configure.advanceSetter||{},t.value.configure.advanceSetter[s.join(".")]={name:s.join("."),setter:l}},r=t.value.loop,o=h.useRef(null);h.useEffect(()=>{var l;const s={id:t.id,condition:t.value.condition||!0,loop:{open:(r==null?void 0:r.open)||!1,data:(r==null?void 0:r.data)||[],forName:(r==null?void 0:r.forName)||"item",forIndex:(r==null?void 0:r.forIndex)||"index",key:(r==null?void 0:r.key)||"",name:(r==null?void 0:r.name)||""},refId:t.value.refId,nodeName:t.value.nodeName};(l=o.current)==null||l.setFields(s)},[t]);const a=s=>{t.value.loop=s.loop,t.value.condition=s.condition,t.value.refId=s.refId,t.value.nodeName=s.nodeName,t.updateValue()};return w("div",{className:iL.advanceBox,children:w(uu,{defaultSetterConfig:((i=t.value.configure)==null?void 0:i.advanceSetter)||{},onSetterChange:n,properties:sL,initialValue:{},ref:o,onValueChange:a},t.id)})},cL={key:"Advance",name:"Advance",view:({node:e,pluginCtx:t})=>w(lL,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.advance)!==!1}},uL="_rightPanelContainer_1p332_2",dL={rightPanelContainer:uL},fL="_visualPanelBox_6q12v_2",pL="_header_6q12v_5",gp={visualPanelBox:fL,header:pL},hL={cssColors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",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:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",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:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",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:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},cssKeyValue:{"align-content":{values:["center","flex-end","flex-start","space-around","space-between","stretch"]},"align-items":{values:["baseline","center","flex-end","flex-start","stretch"]},"align-self":{values:["auto","normal","self-start","self-end","baseline","center","start","end","flex-end","flex-start","safe","stretch","unsafe"]},all:{values:[]},animation:{values:[]},"animation-delay":{values:[]},"animation-direction":{values:["alternate","alternate-reverse","normal","reverse"]},"animation-duration":{values:[]},"animation-fill-mode":{values:["backwards","both","forwards","none"]},"animation-iteration-count":{values:["infinite"]},"animation-name":{values:["none"]},"animation-play-state":{values:["paused","running"]},"animation-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"backface-visibility":{values:["hidden","visible"]},background:{values:[],type:"color"},"background-attachment":{values:["fixed","local","scroll"]},"background-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"background-clip":{values:["border-box","content-box","padding-box"]},"background-color":{values:[],type:"color"},"background-image":{values:["image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()","url()"]},"background-origin":{values:["border-box","content-box","padding-box"]},"background-position":{values:["left","center","right","bottom","top"]},"background-repeat":{values:["no-repeat","repeat","repeat-x","repeat-y","round","space"]},"background-size":{values:["auto","contain","cover"]},border:{values:[]},"border-collapse":{values:["collapse","separate"]},"border-color":{values:[],type:"color"},"border-spacing":{values:[]},"border-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom":{values:[]},"border-bottom-color":{values:[],type:"color"},"border-bottom-left-radius":{values:[]},"border-bottom-right-radius":{values:[]},"border-bottom-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-bottom-width":{values:["medium","thin","thick"]},"border-image":{values:["url()"]},"border-image-outset":{values:[]},"border-image-slice":{values:[]},"border-image-source":{values:[]},"border-image-repeat":{values:["repeat","round","space","stretch"]},"border-image-width":{values:["auto"]},"border-left":{values:[]},"border-left-color":{values:[],type:"color"},"border-left-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-left-width":{values:["medium","thin","thick"]},"border-radius":{values:[]},"border-right":{values:[]},"border-right-color":{values:[],type:"color"},"border-right-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-right-width":{values:["medium","thin","thick"]},"border-top":{values:[]},"border-top-color":{values:[],type:"color"},"border-top-left-radius":{values:[]},"border-top-right-radius":{values:[]},"border-top-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"border-top-width":{values:["medium","thin","thick"]},"border-width":{values:["medium","thin","thick"]},"box-decoration-break":{values:["clone","slice"]},"box-shadow":{values:["none"]},"box-sizing":{values:["border-box","content-box"]},bottom:{values:["auto"]},"break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"caption-side":{values:["bottom","top"]},"caret-color":{values:["auto"],type:"color"},clear:{values:["both","left","none","right"]},clip:{values:["auto"]},color:{values:[],type:"color"},columns:{values:[]},"column-count":{values:[]},"column-fill":{values:["auto","balance"]},"column-gap":{values:["normal"]},"column-rule":{values:[]},"column-rule-color":{values:[],type:"color"},"column-rule-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"column-rule-width":{values:["medium","thin","thick"]},"column-span":{values:["all","none"]},"column-width":{values:["auto"]},content:{values:["attr()","close-quote","no-close-quote","no-open-quote","normal","none","open-quote"]},"counter-increment":{values:["none"]},"counter-reset":{values:["none"]},cursor:{values:["alias","all-scroll","auto","cell","col-resize","context-menu","copy","crosshair","default","e-resize","ew-resize","grab","grabbing","help","move","n-resize","ne-resize","nesw-resize","no-drop","none","not-allowed","ns-resize","nw-resize","nwse-resize","pointer","progress","row-resize","s-resize","se-resize","sw-resize","text","vertical-text","w-resize","wait","zoom-in","zoom-out"]},direction:{values:["ltr","rtl"]},display:{values:["block","contents","flex","flow-root","grid","inline","inline-block","inline-flex","inline-grid","inline-table","list-item","none","run-in","subgrid","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group"]},"empty-cells":{values:["hide","show"]},fill:{values:[]},filter:{values:["blur()","brightness()","contrast()","custom()","drop-shadow()","grayscale()","hue-rotate()","invert()","none","opacity()","sepia()","saturate()","url()"]},flex:{values:["auto","none"]},"flex-basis":{values:["auto"]},"flex-direction":{values:["column","column-reverse","row","row-reverse"]},"flex-flow":{values:["column","column-reverse","nowrap","row","row-reverse","wrap","wrap-reverse"]},"flex-grow":{values:[]},"flex-shrink":{values:[]},"flex-wrap":{values:["nowrap","wrap","wrap-reverse"]},float:{values:["left","right","none","inline-start","inline-end"]},"flow-into":{values:["none"],type:"named-flow"},"flow-from":{values:["none"],type:"named-flow"},font:{values:[]},"font-display":{values:["auto","block","swap","fallback","optional"]},"font-family":{values:["auto","cursive","fantasy","monospace","sans-serif","serif"]},"font-feature-settings":{values:["normal"]},"font-kerning":{values:["auto","none","normal"]},"font-language-override":{values:["normal"]},"font-size":{values:["xx-small","x-small","small","medium","large","x-large","xx-large","xxx-large","larger","smaller"]},"font-size-adjust":{values:["auto","none"]},"font-stretch":{values:["condensed","expanded","extra-condensed","extra-expanded","normal","semi-condensed","semi-expanded","ultra-condensed","ultra-expanded"]},"font-style":{values:["italic","normal","oblique"]},"font-synthesis":{values:["none","style","weight"]},"font-variant":{values:["normal","small-caps"]},"font-variant-alternates":{values:["normal"]},"font-variant-caps":{values:["normal","small-caps","all-small-caps","petite-caps","all-petite-caps","unicase","titling-caps"]},"font-variant-east-asian":{values:["normal"]},"font-variant-ligatures":{values:["normal","none"]},"font-variant-numeric":{values:["normal"]},"font-variant-position":{values:["normal","sub","super"]},"font-weight":{values:["bold","bolder","lighter","normal","100","200","300","400","500","600","700","800","900"]},gap:{values:["revert-layer"]},grid:{values:[]},"grid-area":{values:[]},"grid-auto-columns":{values:[]},"grid-auto-flow":{values:["row","column","dense"]},"grid-auto-rows":{values:[]},"grid-column":{values:["auto"]},"grid-column-end":{values:[]},"grid-column-gap":{values:[]},"grid-column-start":{values:[]},"grid-gap":{values:[]},"grid-row":{values:["auto"]},"grid-row-end":{values:[]},"grid-row-start":{values:[]},"grid-row-gap":{values:[]},"grid-template":{values:["none"]},"grid-template-areas":{values:[]},"grid-template-columns":{values:["auto"]},"grid-template-rows":{values:["auto"]},"hanging-punctuation":{values:["allow-end","first","force-end","last","none"]},height:{values:["auto","max-content","min-content","fit-content"]},hyphens:{values:["auto","manual","none"]},"image-orientation":{values:[]},"image-resolution":{values:["from-image","snap"]},isolation:{values:["auto","isolate"]},"justify-content":{values:["center","flex-end","flex-start","space-around","space-between"]},"justify-items":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe","legacy"]},"justify-self":{values:["auto","normal","stretch","center","start","end","flex-start","flex-end","self-start","self-end","left","right","baseline","first","last","safe","unsafe"]},left:{values:["auto"]},"letter-spacing":{values:["normal"]},"line-height":{values:["normal"]},"list-style":{values:["none","url()","armenian","circle","decimal","decimal-leading-zero","disc","georgian","inside","lower-alpha","lower-greek","lower-latin","lower-roman","outside","square","upper-alpha","upper-latin","upper-roman"]},"list-style-image":{values:["none","url()"]},"list-style-position":{values:["inside","outside"]},"list-style-type":{values:["armenian","circle","decimal","decimal-leading-zero","disc","georgian","lower-alpha","lower-greek","lower-latin","lower-roman","none","square","upper-alpha","upper-latin","upper-roman"]},margin:{values:["auto"]},"margin-bottom":{values:["auto"]},"margin-left":{values:["auto"]},"margin-right":{values:["auto"]},"margin-top":{values:["auto"]},"max-height":{values:["none"]},"max-width":{values:["none"]},"min-height":{values:[]},"min-width":{values:[]},"mix-blend-mode":{values:["color","color-burn","color-dodge","darken","difference","exclusion","hard-light","hue","lighten","luminosity","multiply","normal","overlay","saturation","screen","soft-light"]},"object-fit":{values:["contain","cover","fill","none","scale-down"]},"object-position":{values:["left","center","right","bottom","top"]},opacity:{values:[]},order:{values:[]},orphans:{values:[]},outline:{values:[]},"outline-color":{values:["invert"],type:"color"},"outline-offset":{values:[]},"outline-style":{values:["dashed","dotted","double","groove","hidden","inset","none","outset","ridge","solid"]},"outline-width":{values:["medium","thin","thick"]},overflow:{values:["auto","hidden","scroll","visible"]},"overflow-x":{values:["auto","hidden","scroll","visible"]},"overflow-y":{values:["auto","hidden","scroll","visible"]},"overflow-wrap":{values:["normal","anywhere","break-word"]},padding:{values:[]},"padding-bottom":{values:[]},"padding-left":{values:[]},"padding-right":{values:[]},"padding-top":{values:[]},"page-break-after":{values:["always","auto","avoid","left","right"]},"page-break-before":{values:["always","auto","avoid","left","right"]},"page-break-inside":{values:["auto","avoid"]},perspective:{values:["none"]},"perspective-origin":{values:["bottom","center","left","right","top"]},"pointer-events":{values:["all","auto","fill","none","painted","stroke","visible","visibleFill","visiblePainted","visibleStroke"]},position:{values:["absolute","fixed","relative","static","sticky"]},quotes:{values:["none"]},"region-break-after":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-before":{values:["always","auto","avoid","avoid-column","avoid-page","avoid-region","column","left","page","region","right"]},"region-break-inside":{values:["auto","avoid","avoid-column","avoid-page","avoid-region"]},"region-fragment":{values:["auto","break"]},resize:{values:["both","horizontal","none","vertical"]},right:{values:["auto"]},"scroll-behavior":{values:["auto","smooth"]},"scroll-snap-type":{values:["none","x","y","block","inline","both","mandatory","proximity"]},src:{values:["url()"]},"shape-image-threshold":{values:[]},"shape-inside":{values:["auto","circle()","ellipse()","outside-shape","polygon()","rectangle()"]},"shape-margin":{values:[]},"shape-outside":{values:["none","circle()","ellipse()","polygon()","inset()","margin-box","border-box","padding-box","content-box","url()","image()","linear-gradient()","radial-gradient()","repeating-linear-gradient()","repeating-radial-gradient()"]},"tab-size":{values:[]},"table-layout":{values:["auto","fixed"]},"text-align":{values:["start","end","center","left","justify","right","match-parent","justify-all"]},"text-align-last":{values:["center","left","justify","right"]},"text-decoration":{values:["line-through","none","overline","underline"]},"text-decoration-color":{values:[],type:"color"},"text-decoration-line":{values:["line-through","none","overline","underline"]},"text-decoration-skip":{values:["edges","ink","none","objects","spaces"]},"text-decoration-style":{values:["dashed","dotted","double","solid","wavy"]},"text-emphasis":{values:[]},"text-emphasis-color":{values:[],type:"color"},"text-emphasis-position":{values:["above","below","left","right"]},"text-emphasis-style":{values:["circle","dot","double-circle","filled","none","open","sesame","triangle"]},"text-indent":{values:[]},"text-justify":{values:["auto","none","inter-word","inter-character"]},"text-overflow":{values:["clip","ellipsis"]},"text-shadow":{values:[]},"text-rendering":{values:["auto","geometricPrecision","optimizeLegibility","optimizeSpeed"]},"text-transform":{values:["capitalize","full-width","lowercase","none","uppercase"]},"text-underline-position":{values:["alphabetic","auto","below","left","right"]},top:{values:["auto"]},transform:{values:["matrix()","matrix3d()","none","perspective()","rotate()","rotate3d()","rotateX()","rotateY()","rotateZ()","scale()","scale3d()","scaleX()","scaleY()","scaleZ()","skewX()","skewY()","translate()","translate3d()","translateX()","translateY()","translateZ()"]},"transform-origin":{values:["bottom","center","left","right","top"]},"transform-style":{values:["flat","preserve-3d"]},transition:{values:[]},"transition-delay":{values:[]},"transition-duration":{values:[]},"transition-property":{values:["all","none"]},"transition-timing-function":{values:["cubic-bezier()","ease","ease-in","ease-in-out","ease-out","linear","step-end","step-start","steps()"]},"unicode-bidi":{values:["bidi-override","embed","normal"]},"unicode-range":{values:[]},"user-select":{values:["all","auto","contain","none","text"]},"vertical-align":{values:["baseline","bottom","middle","sub","super","text-bottom","text-top","top"]},visibility:{values:["collapse","hidden","visible"]},"white-space":{values:["normal","nowrap","pre","pre-line","pre-wrap"]},widows:{values:[]},width:{values:["auto","max-content","min-content","fit-content"]},"will-change":{values:["auto","contents","opacity","scroll-position"]},"word-break":{values:["normal","break-all","keep-all"]},"word-spacing":{values:["normal"]},"z-index":{values:["auto"]}}},gL=Object.keys(hL.cssKeyValue),vL="_cssFieldBox_15f2h_2",mL="_row_15f2h_9",yL="_fieldLabel_15f2h_14",bL="_leftBox_15f2h_20",wL="_rightBox_15f2h_23",SL="_inputBox_15f2h_26",xL="_cssBox_15f2h_30",fn={cssFieldBox:vL,row:mL,fieldLabel:yL,leftBox:bL,rightBox:wL,inputBox:SL,cssBox:xL},CL=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),Ts=gL.map(e=>({value:e})),vp=h.forwardRef(function(t,n){var v,C;const[r,o]=h.useState(""),[a,i]=h.useState(""),{mod:s="create"}=t,[l,c]=h.useState({key:((v=t.value)==null?void 0:v.key)||"",value:((C=t.value)==null?void 0:C.value)||{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}});h.useEffect(()=>{t.value&&c(t.value)},[t.value]);const[u,d]=h.useState(Ts),f=O=>{const R=Ts.filter(N=>N.value.includes(O));d(O?R:Ts)},p=()=>{t.onValueChange({...l})},{run:g}=lu(p,{wait:20}),[m,b]=h.useState(0);h.useEffect(()=>{CL(l.key,13.33).then(O=>{let R=parseFloat(O);l.key===""&&(R=200),b(R+6)})},[l.key]);const y=h.useRef(null),[S,E]=h.useState({key:!1,value:!1});h.useImperativeHandle(n,()=>({reset:()=>{var O;c({key:"",value:{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}}),(O=y.current)==null||O.focus()}}),[]);const x=()=>{var R,N,T;if(l.key===""){o("error");return}if(l.value.value===""){i("error");return}o(""),i("");const O=(R=t.onCreate)==null?void 0:R.call(t,l);(N=O==null?void 0:O.errorKey)!=null&&N.includes("key")&&o("error"),(T=O==null?void 0:O.errorKey)!=null&&T.includes("value")&&i("error")};return w(Ye,{children:te("div",{className:fn.cssFieldBox,children:[te("div",{className:fn.leftBox,children:[te("div",{className:fn.row,children:[w("span",{className:fn.fieldLabel,children:"Name"}),w(Y.AutoComplete,{status:r,disabled:s==="edit",ref:y,onSearch:f,popupMatchSelectWidth:200,value:l.key,onChange:O=>{o(""),c({...l,key:O})},style:{width:`${m}px`},className:dt([fn.inputBox]),onFocus:()=>{E({key:!0,value:!1})},onBlur:()=>{E({key:!1,value:!1}),g()},placeholder:"property",options:u})]}),te("div",{className:fn.row,children:[w("span",{className:fn.fieldLabel,children:"Value"}),w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w(Y.Input,{status:a,value:l.value.value,onChange:O=>{i("");const R={type:be.CNodePropsTypeEnum.EXPRESSION,value:O.target.value};c({...l,value:R})},onPressEnter:()=>{g()},onKeyDown:O=>{var R;O.code==="Enter"&&s==="create"&&(x(),(R=y.current)==null||R.focus())}})})]})]}),w("div",{className:fn.rightBox,children:t.onDelete&&s==="edit"&&w(Y.Button,{size:"small",type:"text",onClick:()=>{var O;(O=t.onDelete)==null||O.call(t)},children:w(_h,{style:{display:"inline-flex",fontSize:"12px"}})})}),t.onCreate&&s==="create"&&w("div",{children:w(Y.Button,{size:"small",type:"text",icon:w(rc,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:x})})]})})}),OL=h.forwardRef(function(t,n){const[r,o]=h.useState([]);h.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),h.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=h.useState({key:"",value:{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=h.useRef(null);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:te("div",{className:fn.cssBox,children:[r.map((c,u)=>w("div",{children:w(vp,{value:c,mod:"edit",onValueChange:d=>{if(d.key===""){r.splice(u,1),o([...r]);return}r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),w(vp,{value:a,ref:l,mod:"create",onValueChange:c=>{i(c)},onCreate:c=>{if(r.find(d=>d.key===c.key))return Y.message.error("The attribute name already exists, please replace"),{errorKey:["key"]};r.push(c),o([...r]),s(r),i({key:"",value:{type:be.CNodePropsTypeEnum.EXPRESSION,value:""}})}})]})})}),EL=[{title:"Class Names",name:"className",valueType:"array",setters:[{componentName:"ArraySetter",props:{sortLabelKey:"name",item:{setters:[{componentName:"ShapeSetter",props:{collapse:!1,elements:[{name:"name",title:"类名",valueType:"string",setters:["StringSetter"]},{name:"status",title:"启用",valueType:"boolean",setters:["ExpressionSetter"]}]},initialValue:{}}],initialValue:{name:"",status:{type:be.CNodePropsTypeEnum.EXPRESSION,value:!0}}}},initialValue:[]}]}],_L=h.forwardRef(function(t,n){return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:w("div",{children:w(uu,{initialValue:[],properties:EL,onSetterChange:function(){},onValueChange:r=>{var o;(o=t.onValueChange)==null||o.call(t,r.className||[])},defaultSetterConfig:{}})})})});function RL(e){if(Array.isArray(e))return Us(e)}function NL(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
186
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function jn(e){return RL(e)||tv(e)||Jl(e)||NL()}function du(e){for(var t=0,n,r=0,o=e.length;o>=4;++r,o-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}function Qm(e,t,n){var r=U.useRef({});return(!("value"in r.current)||n(r.current.condition,t))&&(r.current.value=e(),r.current.condition=t),r.current.value}function TL(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,r=new Set;function o(a,i){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1,l=r.has(a);if(Mn(!l,"Warning: There may be circular references"),l)return!1;if(a===i)return!0;if(n&&s>1)return!1;r.add(a);var c=s+1;if(Array.isArray(a)){if(!Array.isArray(i)||a.length!==i.length)return!1;for(var u=0;u<a.length;u++)if(!o(a[u],i[u],c))return!1;return!0}if(a&&i&&Oe(a)==="object"&&Oe(i)==="object"){var d=Object.keys(a);return d.length!==Object.keys(i).length?!1:d.every(function(f){return o(a[f],i[f],c)})}return!1}return o(e,t)}var mp="%",PL=function(){function e(t){nt(this,e),ae(this,"instanceId",void 0),ae(this,"cache",new Map),this.instanceId=t}return rt(e,[{key:"get",value:function(n){return this.cache.get(n.join(mp))||null}},{key:"update",value:function(n,r){var o=n.join(mp),a=this.cache.get(o),i=r(a);i===null?this.cache.delete(o):this.cache.set(o,i)}}]),e}(),jl="data-token-hash",Kn="data-css-hash",kL="data-cache-path",xr="__cssinjs_instance__";function jL(){var e=Math.random().toString(12).slice(2);if(typeof document<"u"&&document.head&&document.body){var t=document.body.querySelectorAll("style[".concat(Kn,"]"))||[],n=document.head.firstChild;Array.from(t).forEach(function(o){o[xr]=o[xr]||e,o[xr]===e&&document.head.insertBefore(o,n)});var r={};Array.from(document.querySelectorAll("style[".concat(Kn,"]"))).forEach(function(o){var a=o.getAttribute(Kn);if(r[a]){if(o[xr]===e){var i;(i=o.parentNode)===null||i===void 0||i.removeChild(o)}}else r[a]=!0})}return new PL(e)}var ML=U.createContext({hashPriority:"low",cache:jL(),defaultCache:!0});const fu=ML;function AL(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var pu=function(){function e(){nt(this,e),ae(this,"cache",void 0),ae(this,"keys",void 0),ae(this,"cacheCallTimes",void 0),this.cache=new Map,this.keys=[],this.cacheCallTimes=0}return rt(e,[{key:"size",value:function(){return this.keys.length}},{key:"internalGet",value:function(n){var r,o,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,i={map:this.cache};return n.forEach(function(s){if(!i)i=void 0;else{var l,c;i=(l=i)===null||l===void 0||(c=l.map)===null||c===void 0?void 0:c.get(s)}}),(r=i)!==null&&r!==void 0&&r.value&&a&&(i.value[1]=this.cacheCallTimes++),(o=i)===null||o===void 0?void 0:o.value}},{key:"get",value:function(n){var r;return(r=this.internalGet(n,!0))===null||r===void 0?void 0:r[0]}},{key:"has",value:function(n){return!!this.internalGet(n)}},{key:"set",value:function(n,r){var o=this;if(!this.has(n)){if(this.size()+1>e.MAX_CACHE_SIZE+e.MAX_CACHE_OFFSET){var a=this.keys.reduce(function(c,u){var d=Ce(c,2),f=d[1];return o.internalGet(u)[1]<f?[u,o.internalGet(u)[1]]:c},[this.keys[0],this.cacheCallTimes]),i=Ce(a,1),s=i[0];this.delete(s)}this.keys.push(n)}var l=this.cache;n.forEach(function(c,u){if(u===n.length-1)l.set(c,{value:[r,o.cacheCallTimes++]});else{var d=l.get(c);d?d.map||(d.map=new Map):l.set(c,{map:new Map}),l=l.get(c).map}})}},{key:"deleteByPath",value:function(n,r){var o=n.get(r[0]);if(r.length===1){var a;return o.map?n.set(r[0],{map:o.map}):n.delete(r[0]),(a=o.value)===null||a===void 0?void 0:a[0]}var i=this.deleteByPath(o.map,r.slice(1));return(!o.map||o.map.size===0)&&!o.value&&n.delete(r[0]),i}},{key:"delete",value:function(n){if(this.has(n))return this.keys=this.keys.filter(function(r){return!AL(r,n)}),this.deleteByPath(this.cache,n)}}]),e}();ae(pu,"MAX_CACHE_SIZE",20);ae(pu,"MAX_CACHE_OFFSET",5);var yp=0,Zm=function(){function e(t){nt(this,e),ae(this,"derivatives",void 0),ae(this,"id",void 0),this.derivatives=Array.isArray(t)?t:[t],this.id=yp,t.length===0&&ec(t.length>0,"[Ant Design CSS-in-JS] Theme should have at least one derivative function."),yp+=1}return rt(e,[{key:"getDerivativeToken",value:function(n){return this.derivatives.reduce(function(r,o){return o(n,r)},void 0)}}]),e}(),Ps=new pu;function ey(e){var t=Array.isArray(e)?e:[e];return Ps.has(t)||Ps.set(t,new Zm(t)),Ps.get(t)}var bp=new WeakMap;function mi(e){var t=bp.get(e)||"";return t||(Object.keys(e).forEach(function(n){var r=e[n];t+=n,r instanceof Zm?t+=r.id:r&&Oe(r)==="object"?t+=mi(r):t+=r}),bp.set(e,t)),t}function DL(e,t){return du("".concat(t,"_").concat(mi(e)))}var Ao="random-".concat(Date.now(),"-").concat(Math.random()).replace(/\./g,""),ty="_bAmBoO_";function $L(e,t,n){if(en()){var r,o;Do(e,Ao);var a=document.createElement("div");a.style.position="fixed",a.style.left="0",a.style.top="0",t==null||t(a),document.body.appendChild(a),"{}".NODE_ENV!=="production"&&(a.innerHTML="Test",a.style.zIndex="9999999");var i=n?n(a):(r=getComputedStyle(a).content)===null||r===void 0?void 0:r.includes(ty);return(o=a.parentNode)===null||o===void 0||o.removeChild(a),ch(Ao),i}return!1}var ks=void 0;function IL(){return ks===void 0&&(ks=$L("@layer ".concat(Ao," { .").concat(Ao,' { content: "').concat(ty,'"!important; } }'),function(e){e.className=Ao})),ks}var wp="{}".NODE_ENV!=="test"&&en()?U.useLayoutEffect:U.useEffect,LL=function(t,n){var r=U.useRef(!0);wp(function(){return t(r.current)},n),wp(function(){return r.current=!1,function(){r.current=!0}},[])},BL=H({},U),Sp=BL.useInsertionEffect,zL=function(t,n,r){U.useMemo(t,r),LL(function(){return n(!0)},r)},VL=Sp?function(e,t,n){return Sp(function(){return e(),t()},n)}:zL;const FL=VL;var HL=H({},U),UL=HL.useInsertionEffect,WL=function(t){var n=[],r=!1;function o(a){if(r){"{}".NODE_ENV!=="production"&&ec(!1,"[Ant Design CSS-in-JS] You are registering a cleanup function after unmount, which will not have any effect.");return}n.push(a)}return U.useEffect(function(){return r=!1,function(){r=!0,n.length&&n.forEach(function(a){return a()})}},t),o},GL=function(){return function(t){t()}},KL=typeof UL<"u"?WL:GL;const qL=KL;function YL(){return!1}var Ml=!1;function XL(){return Ml}const JL="{}".NODE_ENV==="production"?YL:XL;if("{}".NODE_ENV!=="production"&&typeof module<"u"&&module&&module.hot&&typeof window<"u"){var js=window;if(typeof js.webpackHotUpdate=="function"){var QL=js.webpackHotUpdate;js.webpackHotUpdate=function(){return Ml=!0,setTimeout(function(){Ml=!1},0),QL.apply(void 0,arguments)}}}function ny(e,t,n,r,o){var a=U.useContext(fu),i=a.cache,s=[e].concat(jn(t)),l=s.join("_"),c=qL([l]),u=JL(),d=function(m){i.update(s,function(b){var y=b||[],S=Ce(y,2),E=S[0],x=E===void 0?0:E,v=S[1],C=v;"{}".NODE_ENV!=="production"&&v&&u&&(r==null||r(C,u),C=null);var O=C||n(),R=[x,O];return m?m(R):R})};U.useMemo(function(){d()},[l]);var f=i.get(s);"{}".NODE_ENV!=="production"&&!f&&(d(),f=i.get(s));var p=f[1];return FL(function(){o==null||o(p)},function(g){return d(function(m){var b=Ce(m,2),y=b[0],S=b[1];return g&&y===0&&(o==null||o(p)),[y+1,S]}),function(){i.update(s,function(m){var b=m||[],y=Ce(b,2),S=y[0],E=S===void 0?0:S,x=y[1],v=E-1;return v===0?(c(function(){return r==null?void 0:r(x,!1)}),null):[E-1,x]})}},[l]),p}var ZL={},e3="{}".NODE_ENV!=="production"?"css-dev-only-do-not-override":"css",Wn=new Map;function t3(e){Wn.set(e,(Wn.get(e)||0)+1)}function n3(e,t){if(typeof document<"u"){var n=document.querySelectorAll("style[".concat(jl,'="').concat(e,'"]'));n.forEach(function(r){if(r[xr]===t){var o;(o=r.parentNode)===null||o===void 0||o.removeChild(r)}})}}var r3=0;function o3(e,t){Wn.set(e,(Wn.get(e)||0)-1);var n=Array.from(Wn.keys()),r=n.filter(function(o){var a=Wn.get(o)||0;return a<=0});n.length-r.length>r3&&r.forEach(function(o){n3(o,t),Wn.delete(o)})}var a3=function(t,n,r,o){var a=r.getDerivativeToken(t),i=H(H({},a),n);return o&&(i=o(i)),i};function i3(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=h.useContext(fu),o=r.cache.instanceId,a=n.salt,i=a===void 0?"":a,s=n.override,l=s===void 0?ZL:s,c=n.formatToken,u=n.getComputedToken,d=U.useMemo(function(){return Object.assign.apply(Object,[{}].concat(jn(t)))},[t]),f=U.useMemo(function(){return mi(d)},[d]),p=U.useMemo(function(){return mi(l)},[l]),g=ny("token",[i,e.id,f,p],function(){var m=u?u(d,l,e):a3(d,l,e,c),b=DL(m,i);m._tokenKey=b,t3(b);var y="".concat(e3,"-").concat(du(b));return m._hashId=y,[m,y]},function(m){o3(m[0]._tokenKey,o)});return g}var s3={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},ry="comm",oy="rule",ay="decl",l3="@import",c3="@keyframes",u3="@layer",d3=Math.abs,hu=String.fromCharCode;function iy(e){return e.trim()}function qa(e,t,n){return e.replace(t,n)}function f3(e,t){return e.indexOf(t)}function Xo(e,t){return e.charCodeAt(t)|0}function Jo(e,t,n){return e.slice(t,n)}function hn(e){return e.length}function p3(e){return e.length}function Ia(e,t){return t.push(e),e}var Ui=1,Fr=1,sy=0,jt=0,We=0,so="";function gu(e,t,n,r,o,a,i,s){return{value:e,root:t,parent:n,type:r,props:o,children:a,line:Ui,column:Fr,length:i,return:"",siblings:s}}function h3(){return We}function g3(){return We=jt>0?Xo(so,--jt):0,Fr--,We===10&&(Fr=1,Ui--),We}function Ht(){return We=jt<sy?Xo(so,jt++):0,Fr++,We===10&&(Fr=1,Ui++),We}function qn(){return Xo(so,jt)}function Ya(){return jt}function Wi(e,t){return Jo(so,e,t)}function Al(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function v3(e){return Ui=Fr=1,sy=hn(so=e),jt=0,[]}function m3(e){return so="",e}function Ms(e){return iy(Wi(jt-1,Dl(e===91?e+2:e===40?e+1:e)))}function y3(e){for(;(We=qn())&&We<33;)Ht();return Al(e)>2||Al(We)>3?"":" "}function b3(e,t){for(;--t&&Ht()&&!(We<48||We>102||We>57&&We<65||We>70&&We<97););return Wi(e,Ya()+(t<6&&qn()==32&&Ht()==32))}function Dl(e){for(;Ht();)switch(We){case e:return jt;case 34:case 39:e!==34&&e!==39&&Dl(We);break;case 40:e===41&&Dl(e);break;case 92:Ht();break}return jt}function w3(e,t){for(;Ht()&&e+We!==47+10;)if(e+We===42+42&&qn()===47)break;return"/*"+Wi(t,jt-1)+"*"+hu(e===47?e:Ht())}function S3(e){for(;!Al(qn());)Ht();return Wi(e,jt)}function x3(e){return m3(Xa("",null,null,null,[""],e=v3(e),0,[0],e))}function Xa(e,t,n,r,o,a,i,s,l){for(var c=0,u=0,d=i,f=0,p=0,g=0,m=1,b=1,y=1,S=0,E="",x=o,v=a,C=r,O=E;b;)switch(g=S,S=Ht()){case 40:if(g!=108&&Xo(O,d-1)==58){f3(O+=qa(Ms(S),"&","&\f"),"&\f")!=-1&&(y=-1);break}case 34:case 39:case 91:O+=Ms(S);break;case 9:case 10:case 13:case 32:O+=y3(g);break;case 92:O+=b3(Ya()-1,7);continue;case 47:switch(qn()){case 42:case 47:Ia(C3(w3(Ht(),Ya()),t,n,l),l);break;default:O+="/"}break;case 123*m:s[c++]=hn(O)*y;case 125*m:case 59:case 0:switch(S){case 0:case 125:b=0;case 59+u:y==-1&&(O=qa(O,/\f/g,"")),p>0&&hn(O)-d&&Ia(p>32?Cp(O+";",r,n,d-1,l):Cp(qa(O," ","")+";",r,n,d-2,l),l);break;case 59:O+=";";default:if(Ia(C=xp(O,t,n,c,u,o,s,E,x=[],v=[],d,a),a),S===123)if(u===0)Xa(O,t,C,C,x,a,d,s,v);else switch(f===99&&Xo(O,3)===110?100:f){case 100:case 108:case 109:case 115:Xa(e,C,C,r&&Ia(xp(e,C,C,0,0,o,s,E,o,x=[],d,v),v),o,v,d,s,r?x:v);break;default:Xa(O,C,C,C,[""],v,0,s,v)}}c=u=p=0,m=y=1,E=O="",d=i;break;case 58:d=1+hn(O),p=g;default:if(m<1){if(S==123)--m;else if(S==125&&m++==0&&g3()==125)continue}switch(O+=hu(S),S*m){case 38:y=u>0?1:(O+="\f",-1);break;case 44:s[c++]=(hn(O)-1)*y,y=1;break;case 64:qn()===45&&(O+=Ms(Ht())),f=qn(),u=d=hn(E=O+=S3(Ya())),S++;break;case 45:g===45&&hn(O)==2&&(m=0)}}return a}function xp(e,t,n,r,o,a,i,s,l,c,u,d){for(var f=o-1,p=o===0?a:[""],g=p3(p),m=0,b=0,y=0;m<r;++m)for(var S=0,E=Jo(e,f+1,f=d3(b=i[m])),x=e;S<g;++S)(x=iy(b>0?p[S]+" "+E:qa(E,/&\f/g,p[S])))&&(l[y++]=x);return gu(e,t,n,o===0?oy:s,l,c,u,d)}function C3(e,t,n,r){return gu(e,t,n,ry,hu(h3()),Jo(e,2,-2),0,r)}function Cp(e,t,n,r,o){return gu(e,t,n,ay,Jo(e,0,r),Jo(e,r+1,-1),r,o)}function $l(e,t){for(var n="",r=0;r<e.length;r++)n+=t(e[r],r,e,t)||"";return n}function O3(e,t,n,r){switch(e.type){case u3:if(e.children.length)break;case l3:case ay:return e.return=e.return||e.value;case ry:return"";case c3:return e.return=e.value+"{"+$l(e.children,r)+"}";case oy:if(!hn(e.value=e.props.join(",")))return""}return hn(n=$l(e.children,r))?e.return=e.value+"{"+n+"}":""}function ly(e,t){var n=t.path,r=t.parentSelectors;Mn(!1,"[Ant Design CSS-in-JS] ".concat(n?"Error in ".concat(n,": "):"").concat(e).concat(r.length?" Selector: ".concat(r.join(" | ")):""))}var E3=function(t,n,r){if(t==="content"){var o=/(attr|counters?|url|(((repeating-)?(linear|radial))|conic)-gradient)\(|(no-)?(open|close)-quote/,a=["normal","none","initial","inherit","unset"];(typeof n!="string"||a.indexOf(n)===-1&&!o.test(n)&&(n.charAt(0)!==n.charAt(n.length-1)||n.charAt(0)!=='"'&&n.charAt(0)!=="'"))&&ly("You seem to be using a value for 'content' without quotes, try replacing it with `content: '\"".concat(n,"\"'`."),r)}},_3=function(t,n,r){t==="animation"&&r.hashId&&n!=="none"&&ly("You seem to be using hashed animation '".concat(n,"', in which case 'animationName' with Keyframe as value is recommended."),r)},Op="data-ant-cssinjs-cache-path",cy="_FILE_STYLE__",Yn,uy=!0;function R3(){if(!Yn&&(Yn={},en())){var e=document.createElement("div");e.className=Op,e.style.position="fixed",e.style.visibility="hidden",e.style.top="-9999px",document.body.appendChild(e);var t=getComputedStyle(e).content||"";t=t.replace(/^"/,"").replace(/"$/,""),t.split(";").forEach(function(o){var a=o.split(":"),i=Ce(a,2),s=i[0],l=i[1];Yn[s]=l});var n=document.querySelector("style[".concat(Op,"]"));if(n){var r;uy=!1,(r=n.parentNode)===null||r===void 0||r.removeChild(n)}document.body.removeChild(e)}}function N3(e){return R3(),!!Yn[e]}function T3(e){var t=Yn[e],n=null;if(t&&en())if(uy)n=cy;else{var r=document.querySelector("style[".concat(Kn,'="').concat(Yn[e],'"]'));r?n=r.innerHTML:delete Yn[e]}return[n,t]}var Ep=en(),dy="_skip_check_",fy="_multi_value_";function _p(e){var t=$l(x3(e),O3);return t.replace(/\{%%%\:[^;];}/g,";")}function P3(e){return Oe(e)==="object"&&e&&(dy in e||fy in e)}function k3(e,t,n){if(!t)return e;var r=".".concat(t),o=n==="low"?":where(".concat(r,")"):r,a=e.split(",").map(function(i){var s,l=i.trim().split(/\s+/),c=l[0]||"",u=((s=c.match(/^\w+/))===null||s===void 0?void 0:s[0])||"";return c="".concat(u).concat(o).concat(c.slice(u.length)),[c].concat(jn(l.slice(1))).join(" ")});return a.join(",")}var j3=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{root:!0,parentSelectors:[]},o=r.root,a=r.injectHash,i=r.parentSelectors,s=n.hashId,l=n.layer,c=n.path,u=n.hashPriority,d=n.transformers,f=d===void 0?[]:d,p=n.linters,g=p===void 0?[]:p,m="",b={};function y(C){var O=C.getName(s);if(!b[O]){var R=e(C.style,n,{root:!1,parentSelectors:i}),N=Ce(R,1),T=N[0];b[O]="@keyframes ".concat(C.getName(s)).concat(T)}}function S(C){var O=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return C.forEach(function(R){Array.isArray(R)?S(R,O):R&&O.push(R)}),O}var E=S(Array.isArray(t)?t:[t]);if(E.forEach(function(C){var O=typeof C=="string"&&!o?{}:C;if(typeof O=="string")m+="".concat(O,`
187
+ `);else if(O._keyframe)y(O);else{var R=f.reduce(function(N,T){var M;return(T==null||(M=T.visit)===null||M===void 0?void 0:M.call(T,N))||N},O);Object.keys(R).forEach(function(N){var T=R[N];if(Oe(T)==="object"&&T&&(N!=="animationName"||!T._keyframe)&&!P3(T)){var M=!1,j=N.trim(),D=!1;(o||a)&&s?j.startsWith("@")?M=!0:j=k3(N,s,u):o&&!s&&(j==="&"||j==="")&&(j="",D=!0);var k=e(T,n,{root:D,injectHash:M,parentSelectors:[].concat(jn(i),[j])}),P=Ce(k,2),L=P[0],z=P[1];b=H(H({},b),z),m+="".concat(j).concat(L)}else{let le=function(A,$){"{}".NODE_ENV!=="production"&&(Oe(T)!=="object"||!(T!=null&&T[dy]))&&[E3,_3].concat(jn(g)).forEach(function(ie){return ie(A,$,{path:c,hashId:s,parentSelectors:i})});var W=A.replace(/[A-Z]/g,function(ie){return"-".concat(ie.toLowerCase())}),ne=$;!s3[A]&&typeof ne=="number"&&ne!==0&&(ne="".concat(ne,"px")),A==="animationName"&&$!==null&&$!==void 0&&$._keyframe&&(y($),ne=$.getName(s)),m+="".concat(W,":").concat(ne,";")};var Z,J=(Z=T==null?void 0:T.value)!==null&&Z!==void 0?Z:T;Oe(T)==="object"&&T!==null&&T!==void 0&&T[fy]&&Array.isArray(J)?J.forEach(function(A){le(N,A)}):le(N,J)}})}}),!o)m="{".concat(m,"}");else if(l&&IL()){var x=l.split(","),v=x[x.length-1].trim();m="@layer ".concat(v," {").concat(m,"}"),x.length>1&&(m="@layer ".concat(l,"{%%%:%}").concat(m))}return[m,b]};function M3(e,t){return du("".concat(e.join("%")).concat(t))}function A3(){return null}function Il(e,t){var n=e.token,r=e.path,o=e.hashId,a=e.layer,i=e.nonce,s=e.clientOnly,l=e.order,c=l===void 0?0:l,u=U.useContext(fu),d=u.autoClear,f=u.mock,p=u.defaultCache,g=u.hashPriority,m=u.container,b=u.ssrInline,y=u.transformers,S=u.linters,E=u.cache,x=n._tokenKey,v=[x].concat(jn(r)),C=Ep;"{}".NODE_ENV!=="production"&&f!==void 0&&(C=f==="client");var O=ny("style",v,function(){var j=v.join("|");if(N3(j)){var D=T3(j),k=Ce(D,2),P=k[0],L=k[1];if(P)return[P,x,L,{},s,c]}var z=t(),Z=j3(z,{hashId:o,hashPriority:g,layer:a,path:r.join("-"),transformers:y,linters:S}),J=Ce(Z,2),le=J[0],A=J[1],$=_p(le),W=M3(v,$);return[$,x,W,A,s,c]},function(j,D){var k=Ce(j,3),P=k[2];(D||d)&&Ep&&ch(P,{mark:Kn})},function(j){var D=Ce(j,4),k=D[0];D[1];var P=D[2],L=D[3];if(C&&k!==cy){var z={mark:Kn,prepend:"queue",attachTo:m,priority:c},Z=typeof i=="function"?i():i;Z&&(z.csp={nonce:Z});var J=Do(k,P,z);J[xr]=E.instanceId,J.setAttribute(jl,x),"{}".NODE_ENV!=="production"&&J.setAttribute(kL,v.join("|")),Object.keys(L).forEach(function(le){Do(_p(L[le]),"_effect-".concat(le),z)})}}),R=Ce(O,3),N=R[0],T=R[1],M=R[2];return function(j){var D;if(!b||C||!p)D=w(A3,{});else{var k;D=w("style",{...(k={},ae(k,jl,T),ae(k,Kn,M),k),dangerouslySetInnerHTML:{__html:N}})}return te(Ye,{children:[D,j]})}}function gr(e){return e.notSplit=!0,e}gr(["borderTop","borderBottom"]),gr(["borderTop"]),gr(["borderBottom"]),gr(["borderLeft","borderRight"]),gr(["borderLeft"]),gr(["borderRight"]);var D3=h.createContext({});const $3=D3;function Ll(e,t){for(var n=e,r=0;r<t.length;r+=1){if(n==null)return;n=n[t[r]]}return n}function py(e,t,n,r){if(!t.length)return n;var o=nv(t),a=o[0],i=o.slice(1),s;return!e&&typeof a=="number"?s=[]:Array.isArray(e)?s=jn(e):s=H({},e),r&&n===void 0&&i.length===1?delete s[a][i[0]]:s[a]=py(s[a],i,n,r),s}function As(e,t,n){var r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return t.length&&r&&n===void 0&&!Ll(e,t.slice(0,-1))?e:py(e,t,n,r)}function I3(e){return Oe(e)==="object"&&e!==null&&Object.getPrototypeOf(e)===Object.prototype}function Rp(e){return Array.isArray(e)?[]:{}}var L3=typeof Reflect>"u"?Object.keys:Reflect.ownKeys;function B3(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=Rp(t[0]);return t.forEach(function(o){function a(i,s){var l=new Set(s),c=Ll(o,i),u=Array.isArray(c);if(u||I3(c)){if(!l.has(c)){l.add(c);var d=Ll(r,i);u?r=As(r,i,[]):(!d||Oe(d)!=="object")&&(r=As(r,i,Rp(c))),L3(c).forEach(function(f){a([].concat(jn(i),[f]),l)})}}else r=As(r,i,c)}a([])}),r}function z3(){}let hy=z3;"{}".NODE_ENV!=="production"&&(hy=(e,t,n)=>{Mn(e,`[antd: ${t}] ${n}`),"{}".NODE_ENV==="test"&&rh()});const la=hy,V3=h.createContext(void 0),F3={items_per_page:"/ page",jump_to:"Go to",jump_to_confirm:"confirm",page:"Page",prev_page:"Previous Page",next_page:"Next Page",prev_5:"Previous 5 Pages",next_5:"Next 5 Pages",prev_3:"Previous 3 Pages",next_3:"Next 3 Pages",page_size:"Page Size"};var H3={locale:"en_US",today:"Today",now:"Now",backToToday:"Back to today",ok:"OK",clear:"Clear",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",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,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"};const U3={placeholder:"Select time",rangePlaceholder:["Start time","End time"]},gy=U3,W3={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"]},H3),timePickerLocale:Object.assign({},gy)},Np=W3,mt="${label} is not a valid ${type}",G3={locale:"en",Pagination:F3,DatePicker:Np,TimePicker:gy,Calendar:Np,global:{placeholder:"Please select"},Table:{filterTitle:"Filter menu",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"No filters",filterCheckall:"Select all items",filterSearchPlaceholder:"Search in filters",emptyText:"No data",selectAll:"Select current page",selectInvert:"Invert current page",selectNone:"Clear all data",selectionAll:"Select all data",sortTitle:"Sort",expand:"Expand row",collapse:"Collapse row",triggerDesc:"Click to sort descending",triggerAsc:"Click to sort ascending",cancelSort:"Click to cancel sorting"},Tour:{Next:"Next",Previous:"Previous",Finish:"Finish"},Modal:{okText:"OK",cancelText:"Cancel",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Cancel"},Transfer:{titles:["",""],searchPlaceholder:"Search here",itemUnit:"item",itemsUnit:"items",remove:"Remove",selectCurrent:"Select current page",removeCurrent:"Remove current page",selectAll:"Select all data",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"},PageHeader:{back:"Back"},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:mt,method:mt,array:mt,object:mt,number:mt,date:mt,boolean:mt,integer:mt,float:mt,regexp:mt,email:mt,url:mt,hex:mt},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"},ColorPicker:{presetEmpty:"Empty"}},vu=G3;let Ds=Object.assign({},vu.Modal);function Tp(e){e?Ds=Object.assign(Object.assign({},Ds),e):Ds=Object.assign({},vu.Modal)}const K3=h.createContext(void 0),vy=K3,my="internalMark",yy=e=>{const{locale:t={},children:n,_ANT_MARK__:r}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&la(r===my,"LocaleProvider","`LocaleProvider` is deprecated. Please use `locale` with `ConfigProvider` instead: http://u.ant.design/locale"),U.useEffect(()=>(Tp(t&&t.Modal),()=>{Tp()}),[t]);const o=U.useMemo(()=>Object.assign(Object.assign({},t),{exist:!0}),[t]);return w(vy.Provider,{value:o,children:n})};"{}".NODE_ENV!=="production"&&(yy.displayName="LocaleProvider");const q3=yy,Y3="5.6.3",X3=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"];var La=2,Pp=.16,J3=.05,Q3=.05,Z3=.15,by=5,wy=4,e4=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function kp(e){var t=e.r,n=e.g,r=e.b,o=Qa(t,n,r);return{h:o.h*360,s:o.s,v:o.v}}function Ba(e){var t=e.r,n=e.g,r=e.b;return"#".concat(Za(t,n,r,!1))}function t4(e,t,n){var r=n/100,o={r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b};return o}function jp(e,t,n){var r;return Math.round(e.h)>=60&&Math.round(e.h)<=240?r=n?Math.round(e.h)-La*t:Math.round(e.h)+La*t:r=n?Math.round(e.h)+La*t:Math.round(e.h)-La*t,r<0?r+=360:r>=360&&(r-=360),r}function Mp(e,t,n){if(e.h===0&&e.s===0)return e.s;var r;return n?r=e.s-Pp*t:t===wy?r=e.s+Pp:r=e.s+J3*t,r>1&&(r=1),n&&t===by&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2))}function Ap(e,t,n){var r;return n?r=e.v+Q3*t:r=e.v-Z3*t,r>1&&(r=1),Number(r.toFixed(2))}function Hr(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=[],r=Bt(e),o=by;o>0;o-=1){var a=kp(r),i=Ba(Bt({h:jp(a,o,!0),s:Mp(a,o,!0),v:Ap(a,o,!0)}));n.push(i)}n.push(Ba(r));for(var s=1;s<=wy;s+=1){var l=kp(r),c=Ba(Bt({h:jp(l,s),s:Mp(l,s),v:Ap(l,s)}));n.push(c)}return t.theme==="dark"?e4.map(function(u){var d=u.index,f=u.opacity,p=Ba(t4(Bt(t.backgroundColor||"#141414"),Bt(n[d]),f*100));return p}):n}var $s={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"},Is={},Ls={};Object.keys($s).forEach(function(e){Is[e]=Hr($s[e]),Is[e].primary=Is[e][5],Ls[e]=Hr($s[e],{theme:"dark",backgroundColor:"#141414"}),Ls[e].primary=Ls[e][5]});const n4=e=>{const{controlHeight:t}=e;return{controlHeightSM:t*.75,controlHeightXS:t*.5,controlHeightLG:t*1.25}},r4=n4;function o4(e){const{sizeUnit:t,sizeStep:n}=e;return{sizeXXL:t*(n+8),sizeXL:t*(n+4),sizeLG:t*(n+2),sizeMD:t*(n+1),sizeMS:t*n,size:t*n,sizeSM:t*(n-1),sizeXS:t*(n-2),sizeXXS:t*(n-3)}}const Sy={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"},a4=Object.assign(Object.assign({},Sy),{colorPrimary:"#1677ff",colorSuccess:"#52c41a",colorWarning:"#faad14",colorError:"#ff4d4f",colorInfo:"#1677ff",colorTextBase:"",colorBgBase:"",fontFamily:`-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
188
188
  'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol',
189
- '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}),Gi=X3;function J3(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:a,colorError:i,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=n(l),f=n(o),p=n(a),h=n(i),m=n(s),b=r(c,u);return Object.assign(Object.assign({},b),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:h[1],colorErrorBgHover:h[2],colorErrorBorder:h[3],colorErrorBorderHover:h[4],colorErrorHover:h[5],colorError:h[6],colorErrorActive:h[7],colorErrorTextHover:h[8],colorErrorText:h[9],colorErrorTextActive:h[10],colorWarningBg: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:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorBgMask:new wt("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const Q3=e=>{let t=e,n=e,r=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?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e>16?16:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}},Z3=Q3;function e4(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1},Z3(r))}const dn=(e,t)=>new wt(e).setAlpha(t).toRgbString(),wo=(e,t)=>new wt(e).darken(t).toHexString(),t4=e=>{const t=Hr(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]}},n4=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:dn(r,.88),colorTextSecondary:dn(r,.65),colorTextTertiary:dn(r,.45),colorTextQuaternary:dn(r,.25),colorFill:dn(r,.15),colorFillSecondary:dn(r,.06),colorFillTertiary:dn(r,.04),colorFillQuaternary:dn(r,.02),colorBgLayout:wo(n,4),colorBgContainer:wo(n,0),colorBgElevated:wo(n,0),colorBgSpotlight:dn(r,.85),colorBorder:wo(n,15),colorBorderSecondary:wo(n,6)}};function r4(e){const t=new Array(10).fill(null).map((n,r)=>{const o=r-1,a=e*Math.pow(2.71828,o/5),i=r>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return t[1]=e,t.map(n=>{const r=n+8;return{size:n,lineHeight:r/n}})}const o4=e=>{const t=r4(e),n=t.map(o=>o.size),r=t.map(o=>o.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:r[1],lineHeightLG:r[2],lineHeightSM:r[0],lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}},a4=o4;function i4(e){const t=Object.keys(yy).map(n=>{const r=Hr(e[n]);return new Array(10).fill(1).reduce((o,a,i)=>(o[`${n}-${i+1}`]=r[i],o[`${n}${i+1}`]=r[i],o),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),J3(e,{generateColorPalettes:t4,generateNeutralColorPalettes:n4})),a4(e.fontSize)),Y3(e)),q3(e)),e4(e))}function Bs(e){return e>=0&&e<=255}function za(e,t){const{r:n,g:r,b:o,a}=new wt(e).toRgb();if(a<1)return e;const{r:i,g:s,b:l}=new wt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-i*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Bs(u)&&Bs(d)&&Bs(f))return new wt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new wt({r:n,g:r,b:o,a:1}).toRgbString()}var s4=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function l4(e){const{override:t}=e,n=s4(e,["override"]),r=Object.assign({},t);Object.keys(Gi).forEach(f=>{delete r[f]});const o=Object.assign(Object.assign({},n),r),a=480,i=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},o),{colorLink:o.colorInfoText,colorLinkHover:o.colorInfoHover,colorLinkActive:o.colorInfoActive,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:za(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:za(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:za(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*4,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:za(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:`
189
+ '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}),Gi=a4;function i4(e,t){let{generateColorPalettes:n,generateNeutralColorPalettes:r}=t;const{colorSuccess:o,colorWarning:a,colorError:i,colorInfo:s,colorPrimary:l,colorBgBase:c,colorTextBase:u}=e,d=n(l),f=n(o),p=n(a),g=n(i),m=n(s),b=r(c,u);return Object.assign(Object.assign({},b),{colorPrimaryBg:d[1],colorPrimaryBgHover:d[2],colorPrimaryBorder:d[3],colorPrimaryBorderHover:d[4],colorPrimaryHover:d[5],colorPrimary:d[6],colorPrimaryActive:d[7],colorPrimaryTextHover:d[8],colorPrimaryText:d[9],colorPrimaryTextActive:d[10],colorSuccessBg:f[1],colorSuccessBgHover:f[2],colorSuccessBorder:f[3],colorSuccessBorderHover:f[4],colorSuccessHover:f[4],colorSuccess:f[6],colorSuccessActive:f[7],colorSuccessTextHover:f[8],colorSuccessText:f[9],colorSuccessTextActive:f[10],colorErrorBg:g[1],colorErrorBgHover:g[2],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:m[1],colorInfoBgHover:m[2],colorInfoBorder:m[3],colorInfoBorderHover:m[4],colorInfoHover:m[4],colorInfo:m[6],colorInfoActive:m[7],colorInfoTextHover:m[8],colorInfoText:m[9],colorInfoTextActive:m[10],colorBgMask:new wt("#000").setAlpha(.45).toRgbString(),colorWhite:"#fff"})}const s4=e=>{let t=e,n=e,r=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?n=4:e<8&&e>=7?n=5:e<14&&e>=8?n=6:e<16&&e>=14?n=7:e>=16&&(n=8),e<6&&e>=2?r=1:e>=6&&(r=2),e>4&&e<8?o=4:e>=8&&(o=6),{borderRadius:e>16?16:e,borderRadiusXS:r,borderRadiusSM:n,borderRadiusLG:t,borderRadiusOuter:o}},l4=s4;function c4(e){const{motionUnit:t,motionBase:n,borderRadius:r,lineWidth:o}=e;return Object.assign({motionDurationFast:`${(n+t).toFixed(1)}s`,motionDurationMid:`${(n+t*2).toFixed(1)}s`,motionDurationSlow:`${(n+t*3).toFixed(1)}s`,lineWidthBold:o+1},l4(r))}const dn=(e,t)=>new wt(e).setAlpha(t).toRgbString(),wo=(e,t)=>new wt(e).darken(t).toHexString(),u4=e=>{const t=Hr(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]}},d4=(e,t)=>{const n=e||"#fff",r=t||"#000";return{colorBgBase:n,colorTextBase:r,colorText:dn(r,.88),colorTextSecondary:dn(r,.65),colorTextTertiary:dn(r,.45),colorTextQuaternary:dn(r,.25),colorFill:dn(r,.15),colorFillSecondary:dn(r,.06),colorFillTertiary:dn(r,.04),colorFillQuaternary:dn(r,.02),colorBgLayout:wo(n,4),colorBgContainer:wo(n,0),colorBgElevated:wo(n,0),colorBgSpotlight:dn(r,.85),colorBorder:wo(n,15),colorBorderSecondary:wo(n,6)}};function f4(e){const t=new Array(10).fill(null).map((n,r)=>{const o=r-1,a=e*Math.pow(2.71828,o/5),i=r>1?Math.floor(a):Math.ceil(a);return Math.floor(i/2)*2});return t[1]=e,t.map(n=>{const r=n+8;return{size:n,lineHeight:r/n}})}const p4=e=>{const t=f4(e),n=t.map(o=>o.size),r=t.map(o=>o.lineHeight);return{fontSizeSM:n[0],fontSize:n[1],fontSizeLG:n[2],fontSizeXL:n[3],fontSizeHeading1:n[6],fontSizeHeading2:n[5],fontSizeHeading3:n[4],fontSizeHeading4:n[3],fontSizeHeading5:n[2],lineHeight:r[1],lineHeightLG:r[2],lineHeightSM:r[0],lineHeightHeading1:r[6],lineHeightHeading2:r[5],lineHeightHeading3:r[4],lineHeightHeading4:r[3],lineHeightHeading5:r[2]}},h4=p4;function g4(e){const t=Object.keys(Sy).map(n=>{const r=Hr(e[n]);return new Array(10).fill(1).reduce((o,a,i)=>(o[`${n}-${i+1}`]=r[i],o[`${n}${i+1}`]=r[i],o),{})}).reduce((n,r)=>(n=Object.assign(Object.assign({},n),r),n),{});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},e),t),i4(e,{generateColorPalettes:u4,generateNeutralColorPalettes:d4})),h4(e.fontSize)),o4(e)),r4(e)),c4(e))}function Bs(e){return e>=0&&e<=255}function za(e,t){const{r:n,g:r,b:o,a}=new wt(e).toRgb();if(a<1)return e;const{r:i,g:s,b:l}=new wt(t).toRgb();for(let c=.01;c<=1;c+=.01){const u=Math.round((n-i*(1-c))/c),d=Math.round((r-s*(1-c))/c),f=Math.round((o-l*(1-c))/c);if(Bs(u)&&Bs(d)&&Bs(f))return new wt({r:u,g:d,b:f,a:Math.round(c*100)/100}).toRgbString()}return new wt({r:n,g:r,b:o,a:1}).toRgbString()}var v4=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function m4(e){const{override:t}=e,n=v4(e,["override"]),r=Object.assign({},t);Object.keys(Gi).forEach(f=>{delete r[f]});const o=Object.assign(Object.assign({},n),r),a=480,i=576,s=768,l=992,c=1200,u=1600;if(o.motion===!1){const f="0s";o.motionDurationFast=f,o.motionDurationMid=f,o.motionDurationSlow=f}return Object.assign(Object.assign(Object.assign({},o),{colorLink:o.colorInfoText,colorLinkHover:o.colorInfoHover,colorLinkActive:o.colorInfoActive,colorFillContent:o.colorFillSecondary,colorFillContentHover:o.colorFill,colorFillAlter:o.colorFillQuaternary,colorBgContainerDisabled:o.colorFillTertiary,colorBorderBg:o.colorBgContainer,colorSplit:za(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:za(o.colorErrorBg,o.colorBgContainer),colorWarningOutline:za(o.colorWarningBg,o.colorBgContainer),fontSizeIcon:o.fontSizeSM,lineWidthFocus:o.lineWidth*4,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:za(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:`
190
190
  0 6px 16px 0 rgba(0, 0, 0, 0.08),
191
191
  0 3px 6px -4px rgba(0, 0, 0, 0.12),
192
192
  0 9px 28px 8px rgba(0, 0, 0, 0.05)
@@ -218,31 +218,31 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
218
218
  0 -6px 16px 0 rgba(0, 0, 0, 0.08),
219
219
  0 -3px 6px -4px rgba(0, 0, 0, 0.12),
220
220
  0 -9px 28px 8px rgba(0, 0, 0, 0.05)
221
- `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}function Ja(e){var t=W.useRef(!1),n=W.useState(e),r=Se(n,2),o=r[0],a=r[1];W.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(s,l){l&&t.current||a(s)}return[o,i]}const by="anticon",c4=(e,t)=>t||(e?`ant-${e}`:"ant"),ca=W.createContext({getPrefixCls:c4,iconPrefixCls:by}),u4=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),d4=()=>({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"}}),f4=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,
222
- &:hover`]:{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),p4=(e,t)=>{const{fontFamily:n,fontSize:r}=e,o=`[class^="${t}"], [class*=" ${t}"]`;return{[o]:{fontFamily:n,fontSize:r,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}};function h4(e,t,n,r){return o=>{const[a,i,s]=vu(),{getPrefixCls:l,iconPrefixCls:c,csp:u}=g.useContext(ca),d=l(),f={theme:a,token:i,hashId:s,nonce:()=>u==null?void 0:u.nonce};return Il(Object.assign(Object.assign({},f),{path:["Shared",d]}),()=>[{"&":f4(i)}]),[Il(Object.assign(Object.assign({},f),{path:[e,o,c]}),()=>{const{token:p,flush:h}=v4(i),m=Object.assign({},i[e]);if(r!=null&&r.deprecatedTokens){const{deprecatedTokens:v}=r;v.forEach(O=>{let[C,R]=O;var N;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&Mn(!(m!=null&&m[C]),`The token '${String(C)}' of ${e} had deprecated, use '${String(R)}' instead.`),(m!=null&&m[C]||m!=null&&m[R])&&((N=m[R])!==null&&N!==void 0||(m[R]=m==null?void 0:m[C]))})}const b=typeof n=="function"?n(zl(p,m??{})):n,y=Object.assign(Object.assign({},b),m),S=`.${o}`,E=zl(p,{componentCls:S,prefixCls:o,iconCls:`.${c}`,antCls:`.${d}`},y),x=t(E,{hashId:s,prefixCls:o,rootPrefixCls:d,iconPrefixCls:c,overrideComponentToken:m});return h(e,y),[(r==null?void 0:r.resetStyle)===!1?null:p4(i,o),x]}),s]}}const wy="{}".NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let Bl=!0;function zl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!wy)return Object.assign.apply(Object,[{}].concat(t));Bl=!1;const r={};return t.forEach(o=>{Object.keys(o).forEach(i=>{Object.defineProperty(r,i,{configurable:!0,enumerable:!0,get:()=>o[i]})})}),Bl=!0,r}function g4(){}function v4(e){let t,n=e,r=g4;return wy&&(t=new Set,n=new Proxy(e,{get(o,a){return Bl&&t.add(a),o[a]}}),r=(o,a)=>{Array.from(t)}),{token:n,keys:t,flush:r}}function m4(e,t){return F3.reduce((n,r)=>{const o=e[`${r}1`],a=e[`${r}3`],i=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:s}))},{})}const y4=cy(i4),Sy={token:Gi,hashed:!0},xy=g.createContext(Sy);function vu(){const{token:e,hashed:t,theme:n,components:r}=g.useContext(xy),o=`${z3}-${t||""}`,a=n||y4,[i,s]=YL(a,[Gi,e],{salt:o,override:Object.assign({override:e},r),formatToken:l4});return[a,i,t?s:""]}const b4=`-ant-${Date.now()}-${Math.random()}`;function w4(e,t){const n={},r=(i,s)=>{let l=i.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(i,s)=>{const l=new wt(i),c=Hr(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(t.primaryColor){o(t.primaryColor,"primary");const i=new wt(t.primaryColor),s=Hr(i.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(i,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(i,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(i,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(i,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(i,c=>c.setAlpha(c.getAlpha()*.12));const l=new wt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=r(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"),`
223
- :root {
224
- ${Object.keys(n).map(i=>`--${e}-${i}: ${n[i]};`).join(`
225
- `)}
226
- }
227
- `.trim()}function S4(e,t){const n=w4(e,t);en()?Do(n,`${b4}-dynamic-theme`):"{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Fl=W.createContext(!1),x4=e=>{let{children:t,disabled:n}=e;const r=W.useContext(Fl);return w(Fl.Provider,{value:n??r,children:t})},C4=Fl,O4=e=>{const t=g.useContext(Ki);return g.useMemo(()=>e?typeof e=="string"?e??t:e instanceof Function?e(t):t:t,[e,t])},E4=O4,Cy=W.createContext(void 0),_4=e=>{let{children:t,size:n}=e;const r=E4(n);return w(Cy.Provider,{value:r,children:t})},Ki=Cy;function R4(){const e=g.useContext(C4),t=g.useContext(Ki);return{componentDisabled:e,componentSize:t}}function N4(e,t){const n=e||{},r=n.inherit===!1||!t?Sy:t;return Xm(()=>{if(!e)return t;const a=Object.assign({},r.components);return Object.keys(e.components||{}).forEach(i=>{a[i]=Object.assign(Object.assign({},a[i]),e.components[i])}),Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:a})},[n,r],(a,i)=>a.some((s,l)=>{const c=i[l];return!EL(s,c,!0)}))}function T4(e){return e instanceof HTMLElement||e instanceof SVGElement}function P4(e){return T4(e)?e:e instanceof g.Component?Yt.findDOMNode(e):null}var Vl={exports:{}},pe={};/** @license React v16.13.1
221
+ `,boxShadowTabsOverflowLeft:"inset 10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowRight:"inset -10px 0 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowTop:"inset 0 10px 8px -8px rgba(0, 0, 0, 0.08)",boxShadowTabsOverflowBottom:"inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08)"}),r)}function Ja(e){var t=U.useRef(!1),n=U.useState(e),r=Ce(n,2),o=r[0],a=r[1];U.useEffect(function(){return t.current=!1,function(){t.current=!0}},[]);function i(s,l){l&&t.current||a(s)}return[o,i]}var Bl={exports:{}},he={};/** @license React v16.13.1
228
222
  * react-is.production.min.js
229
223
  *
230
224
  * Copyright (c) Facebook, Inc. and its affiliates.
231
225
  *
232
226
  * This source code is licensed under the MIT license found in the
233
227
  * LICENSE file in the root directory of this source tree.
234
- */var jp;function k4(){if(jp)return pe;jp=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(v){if(typeof v=="object"&&v!==null){var O=v.$$typeof;switch(O){case t:switch(v=v.type,v){case l:case c:case r:case a:case o:case d:return v;default:switch(v=v&&v.$$typeof,v){case s:case u:case h:case p:case i:return v;default:return O}}case n:return O}}}function x(v){return E(v)===c}return pe.AsyncMode=l,pe.ConcurrentMode=c,pe.ContextConsumer=s,pe.ContextProvider=i,pe.Element=t,pe.ForwardRef=u,pe.Fragment=r,pe.Lazy=h,pe.Memo=p,pe.Portal=n,pe.Profiler=a,pe.StrictMode=o,pe.Suspense=d,pe.isAsyncMode=function(v){return x(v)||E(v)===l},pe.isConcurrentMode=x,pe.isContextConsumer=function(v){return E(v)===s},pe.isContextProvider=function(v){return E(v)===i},pe.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},pe.isForwardRef=function(v){return E(v)===u},pe.isFragment=function(v){return E(v)===r},pe.isLazy=function(v){return E(v)===h},pe.isMemo=function(v){return E(v)===p},pe.isPortal=function(v){return E(v)===n},pe.isProfiler=function(v){return E(v)===a},pe.isStrictMode=function(v){return E(v)===o},pe.isSuspense=function(v){return E(v)===d},pe.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===c||v===a||v===o||v===d||v===f||typeof v=="object"&&v!==null&&(v.$$typeof===h||v.$$typeof===p||v.$$typeof===i||v.$$typeof===s||v.$$typeof===u||v.$$typeof===b||v.$$typeof===y||v.$$typeof===S||v.$$typeof===m)},pe.typeOf=E,pe}var he={};/** @license React v16.13.1
228
+ */var Dp;function y4(){if(Dp)return he;Dp=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(v){if(typeof v=="object"&&v!==null){var C=v.$$typeof;switch(C){case t:switch(v=v.type,v){case l:case c:case r:case a:case o:case d:return v;default:switch(v=v&&v.$$typeof,v){case s:case u:case g:case p:case i:return v;default:return C}}case n:return C}}}function x(v){return E(v)===c}return he.AsyncMode=l,he.ConcurrentMode=c,he.ContextConsumer=s,he.ContextProvider=i,he.Element=t,he.ForwardRef=u,he.Fragment=r,he.Lazy=g,he.Memo=p,he.Portal=n,he.Profiler=a,he.StrictMode=o,he.Suspense=d,he.isAsyncMode=function(v){return x(v)||E(v)===l},he.isConcurrentMode=x,he.isContextConsumer=function(v){return E(v)===s},he.isContextProvider=function(v){return E(v)===i},he.isElement=function(v){return typeof v=="object"&&v!==null&&v.$$typeof===t},he.isForwardRef=function(v){return E(v)===u},he.isFragment=function(v){return E(v)===r},he.isLazy=function(v){return E(v)===g},he.isMemo=function(v){return E(v)===p},he.isPortal=function(v){return E(v)===n},he.isProfiler=function(v){return E(v)===a},he.isStrictMode=function(v){return E(v)===o},he.isSuspense=function(v){return E(v)===d},he.isValidElementType=function(v){return typeof v=="string"||typeof v=="function"||v===r||v===c||v===a||v===o||v===d||v===f||typeof v=="object"&&v!==null&&(v.$$typeof===g||v.$$typeof===p||v.$$typeof===i||v.$$typeof===s||v.$$typeof===u||v.$$typeof===b||v.$$typeof===y||v.$$typeof===S||v.$$typeof===m)},he.typeOf=E,he}var ge={};/** @license React v16.13.1
235
229
  * react-is.development.js
236
230
  *
237
231
  * Copyright (c) Facebook, Inc. and its affiliates.
238
232
  *
239
233
  * This source code is licensed under the MIT license found in the
240
234
  * LICENSE file in the root directory of this source tree.
241
- */var Mp;function j4(){return Mp||(Mp=1,"{}".NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,h=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(z){return typeof z=="string"||typeof z=="function"||z===r||z===c||z===a||z===o||z===d||z===f||typeof z=="object"&&z!==null&&(z.$$typeof===h||z.$$typeof===p||z.$$typeof===i||z.$$typeof===s||z.$$typeof===u||z.$$typeof===b||z.$$typeof===y||z.$$typeof===S||z.$$typeof===m)}function x(z){if(typeof z=="object"&&z!==null){var Ye=z.$$typeof;switch(Ye){case t:var $e=z.type;switch($e){case l:case c:case r:case a:case o:case d:return $e;default:var Me=$e&&$e.$$typeof;switch(Me){case s:case u:case h:case p:case i:return Me;default:return Ye}}case n:return Ye}}}var v=l,O=c,C=s,R=i,N=t,T=u,k=r,j=h,I=p,M=n,P=a,D=o,V=d,ne=!1;function ee(z){return ne||(ne=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),de(z)||x(z)===l}function de(z){return x(z)===c}function A(z){return x(z)===s}function B(z){return x(z)===i}function q(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function Q(z){return x(z)===u}function ie(z){return x(z)===r}function le(z){return x(z)===h}function Qe(z){return x(z)===p}function De(z){return x(z)===n}function ze(z){return x(z)===a}function re(z){return x(z)===o}function je(z){return x(z)===d}he.AsyncMode=v,he.ConcurrentMode=O,he.ContextConsumer=C,he.ContextProvider=R,he.Element=N,he.ForwardRef=T,he.Fragment=k,he.Lazy=j,he.Memo=I,he.Portal=M,he.Profiler=P,he.StrictMode=D,he.Suspense=V,he.isAsyncMode=ee,he.isConcurrentMode=de,he.isContextConsumer=A,he.isContextProvider=B,he.isElement=q,he.isForwardRef=Q,he.isFragment=ie,he.isLazy=le,he.isMemo=Qe,he.isPortal=De,he.isProfiler=ze,he.isStrictMode=re,he.isSuspense=je,he.isValidElementType=E,he.typeOf=x}()),he}"{}".NODE_ENV==="production"?Vl.exports=k4():Vl.exports=j4();var M4=Vl.exports;function A4(e,t){typeof e=="function"?e(t):xe(e)==="object"&&e&&"current"in e&&(e.current=t)}function D4(e){var t,n,r=M4.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render))}var $4=["children"],Oy=W.createContext({});function I4(e){var t=e.children,n=Rr(e,$4);return w(Oy.Provider,{value:n,children:t})}function L4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ey(e){var t=L4();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}var B4=function(e){Zr(n,e);var t=Ey(n);function n(){return nt(this,n),t.apply(this,arguments)}return rt(n,[{key:"render",value:function(){return this.props.children}}]),n}(W.Component),Un="none",Fa="appear",Va="enter",Ha="leave",Ap="none",It="prepare",Cr="start",Or="active",mu="end",_y="prepared";function Dp(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function z4(e,t){var n={animationend:Dp("Animation","AnimationEnd"),transitionend:Dp("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var F4=z4(en(),typeof window<"u"?window:{}),Ry={};if(en()){var V4=document.createElement("div");Ry=V4.style}var Ua={};function Ny(e){if(Ua[e])return Ua[e];var t=F4[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var a=n[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in Ry)return Ua[e]=t[a],Ua[e]}return""}var Ty=Ny("animationend"),Py=Ny("transitionend"),ky=!!(Ty&&Py),$p=Ty||"animationend",Ip=Py||"transitionend";function Lp(e,t){if(!e)return null;if(xe(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const H4=function(e){var t=g.useRef(),n=g.useRef(e);n.current=e;var r=W.useCallback(function(i){n.current(i)},[]);function o(i){i&&(i.removeEventListener(Ip,r),i.removeEventListener($p,r))}function a(i){t.current&&t.current!==i&&o(t.current),i&&i!==t.current&&(i.addEventListener(Ip,r),i.addEventListener($p,r),t.current=i)}return W.useEffect(function(){return function(){o(t.current)}},[]),[a,o]};var jy=en()?g.useLayoutEffect:g.useEffect,My=function(t){return+setTimeout(t,16)},Ay=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&(My=function(t){return window.requestAnimationFrame(t)},Ay=function(t){return window.cancelAnimationFrame(t)});var Bp=0,yu=new Map;function Dy(e){yu.delete(e)}var Hl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Bp+=1;var r=Bp;function o(a){if(a===0)Dy(r),t();else{var i=My(function(){o(a-1)});yu.set(r,i)}}return o(n),r};Hl.cancel=function(e){var t=yu.get(e);return Dy(t),Ay(t)};const U4=function(){var e=W.useRef(null);function t(){Hl.cancel(e.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=Hl(function(){o<=1?r({isCanceled:function(){return a!==e.current}}):n(r,o-1)});e.current=a}return W.useEffect(function(){return function(){t()}},[]),[n,t]};var W4=[It,Cr,Or,mu],G4=[It,_y],$y=!1,K4=!0;function Iy(e){return e===Or||e===mu}const q4=function(e,t,n){var r=Ja(Ap),o=Se(r,2),a=o[0],i=o[1],s=U4(),l=Se(s,2),c=l[0],u=l[1];function d(){i(It,!0)}var f=t?G4:W4;return jy(function(){if(a!==Ap&&a!==mu){var p=f.indexOf(a),h=f[p+1],m=n(a);m===$y?i(h,!0):h&&c(function(b){function y(){b.isCanceled()||i(h,!0)}m===!0?y():Promise.resolve(m).then(y)})}},[e,a]),W.useEffect(function(){return function(){u()}},[]),[d,a]};function Y4(e,t,n,r){var o=r.motionEnter,a=o===void 0?!0:o,i=r.motionAppear,s=i===void 0?!0:i,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,p=r.onEnterPrepare,h=r.onLeavePrepare,m=r.onAppearStart,b=r.onEnterStart,y=r.onLeaveStart,S=r.onAppearActive,E=r.onEnterActive,x=r.onLeaveActive,v=r.onAppearEnd,O=r.onEnterEnd,C=r.onLeaveEnd,R=r.onVisibleChanged,N=Ja(),T=Se(N,2),k=T[0],j=T[1],I=Ja(Un),M=Se(I,2),P=M[0],D=M[1],V=Ja(null),ne=Se(V,2),ee=ne[0],de=ne[1],A=g.useRef(!1),B=g.useRef(null);function q(){return n()}var Q=g.useRef(!1);function ie(){D(Un,!0),de(null,!0)}function le(Te){var ve=q();if(!(Te&&!Te.deadline&&Te.target!==ve)){var Pe=Q.current,We;P===Fa&&Pe?We=v==null?void 0:v(ve,Te):P===Va&&Pe?We=O==null?void 0:O(ve,Te):P===Ha&&Pe&&(We=C==null?void 0:C(ve,Te)),P!==Un&&Pe&&We!==!1&&ie()}}var Qe=H4(le),De=Se(Qe,1),ze=De[0],re=function(ve){var Pe,We,Gt;switch(ve){case Fa:return Pe={},ae(Pe,It,f),ae(Pe,Cr,m),ae(Pe,Or,S),Pe;case Va:return We={},ae(We,It,p),ae(We,Cr,b),ae(We,Or,E),We;case Ha:return Gt={},ae(Gt,It,h),ae(Gt,Cr,y),ae(Gt,Or,x),Gt;default:return{}}},je=W.useMemo(function(){return re(P)},[P]),z=q4(P,!e,function(Te){if(Te===It){var ve=je[It];return ve?ve(q()):$y}if(Me in je){var Pe;de(((Pe=je[Me])===null||Pe===void 0?void 0:Pe.call(je,q(),null))||null)}return Me===Or&&(ze(q()),u>0&&(clearTimeout(B.current),B.current=setTimeout(function(){le({deadline:!0})},u))),Me===_y&&ie(),K4}),Ye=Se(z,2),$e=Ye[0],Me=Ye[1],vt=Iy(Me);Q.current=vt,jy(function(){j(t);var Te=A.current;A.current=!0;var ve;!Te&&t&&s&&(ve=Fa),Te&&t&&a&&(ve=Va),(Te&&!t&&c||!Te&&d&&!t&&c)&&(ve=Ha);var Pe=re(ve);ve&&(e||Pe[It])?(D(ve),$e()):D(Un)},[t]),g.useEffect(function(){(P===Fa&&!s||P===Va&&!a||P===Ha&&!c)&&D(Un)},[s,a,c]),g.useEffect(function(){return function(){A.current=!1,clearTimeout(B.current)}},[]);var an=W.useRef(!1);g.useEffect(function(){k&&(an.current=!0),k!==void 0&&P===Un&&((an.current||k)&&(R==null||R(k)),an.current=!0)},[k,P]);var sn=ee;return je[It]&&Me===Cr&&(sn=H({transition:"none"},sn)),[P,Me,sn,k??t]}function X4(e){var t=e;xe(e)==="object"&&(t=e.transitionSupport);function n(o,a){return!!(o.motionName&&t&&a!==!1)}var r=W.forwardRef(function(o,a){var i=o.visible,s=i===void 0?!0:i,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,d=o.children,f=o.motionName,p=o.leavedClassName,h=o.eventProps,m=W.useContext(Oy),b=m.motion,y=n(o,b),S=g.useRef(),E=g.useRef();function x(){try{return S.current instanceof HTMLElement?S.current:P4(E.current)}catch{return null}}var v=Y4(y,s,x,o),O=Se(v,4),C=O[0],R=O[1],N=O[2],T=O[3],k=W.useRef(T);T&&(k.current=!0);var j=W.useCallback(function(de){S.current=de,A4(a,de)},[a]),I,M=H(H({},h),{},{visible:s});if(!d)I=null;else if(C===Un)T?I=d(H({},M),j):!c&&k.current&&p?I=d(H(H({},M),{},{className:p}),j):u||!c&&!p?I=d(H(H({},M),{},{style:{display:"none"}}),j):I=null;else{var P,D;R===It?D="prepare":Iy(R)?D="active":R===Cr&&(D="start");var V=Lp(f,"".concat(C,"-").concat(D));I=d(H(H({},M),{},{className:Ql(Lp(f,C),(P={},ae(P,V,V&&D),ae(P,f,typeof f=="string"),P)),style:N}),j)}if(W.isValidElement(I)&&D4(I)){var ne=I,ee=ne.ref;ee||(I=W.cloneElement(I,{ref:j}))}return w(B4,{ref:E,children:I})});return r.displayName="CSSMotion",r}const J4=X4(ky);var Ul="add",Wl="keep",Gl="remove",zs="removed";function Q4(e){var t;return e&&xe(e)==="object"&&"key"in e?t=e:t={key:e},H(H({},t),{},{key:String(t.key)})}function Kl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(Q4)}function Z4(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=t.length,a=Kl(e),i=Kl(t);a.forEach(function(c){for(var u=!1,d=r;d<o;d+=1){var f=i[d];if(f.key===c.key){r<d&&(n=n.concat(i.slice(r,d).map(function(p){return H(H({},p),{},{status:Ul})})),r=d),n.push(H(H({},f),{},{status:Wl})),r+=1,u=!0;break}}u||n.push(H(H({},c),{},{status:Gl}))}),r<o&&(n=n.concat(i.slice(r).map(function(c){return H(H({},c),{},{status:Ul})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Gl}),n.forEach(function(u){u.key===c&&(u.status=Wl)})}),n}var e5=["component","children","onVisibleChanged","onAllRemoved"],t5=["status"],n5=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function r5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:J4,n=function(r){Zr(a,r);var o=Ey(a);function a(){var i;nt(this,a);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=o.call.apply(o,[this].concat(l)),ae(Jt(i),"state",{keyEntities:[]}),ae(Jt(i),"removeKey",function(u){var d=i.state.keyEntities,f=d.map(function(p){return p.key!==u?p:H(H({},p),{},{status:zs})});return i.setState({keyEntities:f}),f.filter(function(p){var h=p.status;return h!==zs}).length}),i}return rt(a,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,f=c.onVisibleChanged,p=c.onAllRemoved,h=Rr(c,e5),m=u||W.Fragment,b={};return n5.forEach(function(y){b[y]=h[y],delete h[y]}),delete h.keys,w(m,{...h,children:l.map(function(y){var S=y.status,E=Rr(y,t5),x=S===Ul||S===Wl;return g.createElement(t,{...b,key:E.key,visible:x,eventProps:E,onVisibleChanged:function(O){if(f==null||f(O,{key:E.key}),!O){var C=s.removeKey(E.key);C===0&&p&&p()}}},d)})})}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=Kl(c),f=Z4(u,d);return{keyEntities:f.filter(function(p){var h=u.find(function(m){var b=m.key;return p.key===b});return!(h&&h.status===zs&&p.status===Gl)})}}}]),a}(W.Component);return ae(n,"defaultProps",{component:"div"}),n}r5(ky);function o5(e){const{children:t}=e,[,n]=vu(),{motion:r}=n,o=W.useRef(!1);return o.current=o.current||r===!1,o.current?w(I4,{motion:r,children:t}):t}const a5=(e,t)=>{const[n,r]=vu();return Il({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce},()=>[{[`.${e}`]:Object.assign(Object.assign({},d4()),{[`.${e} .${e}-icon`]:{display:"block"}})}])},i5=a5;var s5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const l5=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form","select","button"],c5="ant";let Ly;function u5(){return Ly||c5}function d5(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const f5=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r}=e;t!==void 0&&(Ly=t),r&&d5(r)&&("{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),S4(u5(),r))},p5=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,form:o,locale:a,componentSize:i,direction:s,space:l,virtual:c,dropdownMatchSelectWidth:u,popupMatchSelectWidth:d,popupOverflow:f,legacyLocale:p,parentContext:h,iconPrefixCls:m,theme:b,componentDisabled:y}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&la(u===void 0,"ConfigProvider","`dropdownMatchSelectWidth` is deprecated. Please use `popupMatchSelectWidth` instead.");const S=W.useCallback((P,D)=>{const{prefixCls:V}=e;if(D)return D;const ne=V||h.getPrefixCls("");return P?`${ne}-${P}`:ne},[h.getPrefixCls,e.prefixCls]),E=m||h.iconPrefixCls||by,x=E!==h.iconPrefixCls,v=n||h.csp,O=i5(E,v),C=N4(b,h.theme),R={csp:v,autoInsertSpaceInButton:r,locale:a||p,direction:s,space:l,virtual:c,popupMatchSelectWidth:d??u,popupOverflow:f,getPrefixCls:S,iconPrefixCls:E,theme:C},N=Object.assign({},h);Object.keys(R).forEach(P=>{R[P]!==void 0&&(N[P]=R[P])}),l5.forEach(P=>{const D=e[P];D&&(N[P]=D)});const T=Xm(()=>N,N,(P,D)=>{const V=Object.keys(P),ne=Object.keys(D);return V.length!==ne.length||V.some(ee=>P[ee]!==D[ee])}),k=W.useMemo(()=>({prefixCls:E,csp:v}),[E,v]);let j=x?O(t):t;const I=W.useMemo(()=>{var P,D,V;return P3(((P=gu.Form)===null||P===void 0?void 0:P.defaultValidateMessages)||{},((V=(D=T.locale)===null||D===void 0?void 0:D.Form)===null||V===void 0?void 0:V.defaultValidateMessages)||{},(o==null?void 0:o.validateMessages)||{})},[T,o==null?void 0:o.validateMessages]);Object.keys(I).length>0&&(j=w(j3.Provider,{value:I,children:t})),a&&(j=w(B3,{locale:a,_ANT_MARK__:hy,children:j})),(E||v)&&(j=w(R3.Provider,{value:k,children:j})),i&&(j=w(_4,{size:i,children:j})),j=w(o5,{children:j});const M=W.useMemo(()=>{const P=C||{},{algorithm:D,token:V}=P,ne=s5(P,["algorithm","token"]),ee=D&&(!Array.isArray(D)||D.length>0)?cy(D):void 0;return Object.assign(Object.assign({},ne),{theme:ee,token:Object.assign(Object.assign({},Gi),V)})},[C]);return b&&(j=w(xy.Provider,{value:M,children:j})),y!==void 0&&(j=w(x4,{disabled:y,children:j})),w(ca.Provider,{value:T,children:j})},lo=e=>{const t=W.useContext(ca),n=W.useContext(py);return w(p5,{...Object.assign({parentContext:t,legacyLocale:n},e)})};lo.ConfigContext=ca;lo.SizeContext=Ki;lo.config=f5;lo.useConfig=R4;Object.defineProperty(lo,"SizeContext",{get:()=>("{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),Ki)});"{}".NODE_ENV!=="production"&&(lo.displayName="ConfigProvider");function h5(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Wa=(e,t,n)=>{const r=h5(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},g5=e=>m4(e,(t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{[`${e.componentCls}-${t}`]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),v5=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o}=e,a=r-n,i=t-n;return{[o]:Object.assign(Object.assign({},u4(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:i,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},m5=h4("Tag",e=>{const{lineWidth:t,fontSizeIcon:n}=e,r=e.fontSizeSM,o=`${e.lineHeightSM*r}px`,a=zl(e,{tagFontSize:r,tagLineHeight:o,tagIconSize:n-2*t,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[v5(a),g5(a),Wa(a,"success","Success"),Wa(a,"processing","Info"),Wa(a,"error","Error"),Wa(a,"warning","Warning")]},e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText}));var y5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const b5=e=>{const{prefixCls:t,className:n,checked:r,onChange:o,onClick:a}=e,i=y5(e,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:s}=W.useContext(ca),l=p=>{o==null||o(!r),a==null||a(p)},c=s("tag",t),[u,d]=m5(c),f=Ql(c,{[`${c}-checkable`]:!0,[`${c}-checkable-checked`]:r},n,d);return u(w("span",{...Object.assign({},i,{className:f,onClick:l})}))},w5=b5,S5="_cssFieldBox_4b8an_2",x5="_inputAuto_4b8an_20",C5="_active_4b8an_23",O5="_cssBox_4b8an_27",br={cssFieldBox:S5,inputAuto:x5,active:C5,cssBox:O5},E5=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),Fs=B6.map(e=>({value:e})),zp=g.forwardRef(function(t,n){const[r,o]=g.useState(""),[a,i]=g.useState(""),{mode:s="edit"}=t,l=g.useMemo(()=>s==="create",[s]),[c,u]=g.useState({key:t.value.key,value:t.value.value});g.useEffect(()=>{u(t.value)},[t.value]);const[d,f]=g.useState(Fs),[p,h]=g.useState([]),[m,b]=g.useState([]),y=M=>{const P=Fs.filter(D=>D.value.includes(M));f(M?P:Fs)},S=()=>{var D;let M=[];const P=Km[c.key];P&&(M=((D=P.values)==null?void 0:D.map(V=>({value:V})))||[]),h(M),b(M)},E=M=>{const P=m.filter(D=>D.value.includes(M));h(M?P:m)},x=()=>t.allValues.find(M=>M.key===c.key)?(Y.message.error(`${c.key} is exits`),o("error"),!1):!0,v=()=>{var M;l?c.value?(M=t.onCreate)==null||M.call(t,c):i("error"):C()},O=()=>{o(""),i(""),t.onValueChange({...c})},{run:C}=su(O,{wait:20}),[R,N]=g.useState(0);g.useEffect(()=>{E5(c.key,13.33).then(M=>{let P=parseFloat(M);c.key===""&&(P=200),N(P+6)})},[c.key]);const T=g.useRef(null),k=g.useRef(null),[j,I]=g.useState({key:!1,value:!1});return g.useImperativeHandle(n,()=>({reset:()=>{var M;u({key:"",value:""}),(M=k.current)==null||M.focus()}}),[]),te("div",{className:br.cssFieldBox,children:[w(Y.AutoComplete,{ref:k,bordered:!1,disabled:!l,onSearch:y,status:r,popupMatchSelectWidth:200,value:c.key,onChange:M=>{u({...c,key:M}),o("")},style:{width:`${R}px`},className:dt([l&&br.inputAuto,l&&j.key&&br.active]),onFocus:()=>{I({key:!0,value:!1})},onBlur:()=>{I({key:!1,value:!1}),x()},onKeyDown:M=>{var P;M.code==="Enter"&&x()&&((P=T.current)==null||P.focus())},placeholder:"property",options:d}),w("span",{children:":"}),w(Y.AutoComplete,{bordered:!1,ref:T,status:a,popupMatchSelectWidth:200,value:c.value,onChange:M=>{var P;S(),u({...c,value:M}),i(""),l||((P=t.onCreate)==null||P.call(t,c),C())},style:{flex:1},onFocus:()=>{I({key:!1,value:!0})},onBlur:()=>{I({key:!1,value:!1}),C()},className:dt([br.inputAuto,j.value&&br.active]),placeholder:"value",onSearch:E,options:p,onKeyDown:M=>{M.code==="Enter"&&v()}}),t.onDelete&&s==="edit"&&w(Y.Button,{size:"small",type:"text",onClick:()=>{var M;(M=t.onDelete)==null||M.call(t)},children:w(Oh,{style:{display:"inline-flex",fontSize:"12px"}})}),t.onCreate&&s==="create"&&w("div",{children:w(Y.Button,{size:"small",type:"text",icon:w(nc,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:v})})]})}),Fp=g.forwardRef(function(t,n){const[r,o]=g.useState([]);g.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),g.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=g.useState({key:"",value:""}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=g.useRef(null);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:te("div",{className:br.cssBox,children:[r.map((c,u)=>w("div",{children:w(zp,{mode:"edit",allValues:r,value:c,onValueChange:d=>{r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),w(zp,{allValues:r,mode:"create",value:a,ref:l,onCreate:c=>{var u;if(c.key&&c.value){const d=r.filter(f=>f.key!==c.key);d.push(c),o(d),s(d),(u=l.current)==null||u.reset(),i({key:"",value:""})}},onValueChange:c=>{i(c)}})]})})}),_5="_stateTag_5a8hc_2",R5="_stateTagClose_5a8hc_5",Vp={stateTag:_5,stateTagClose:R5},N5=["normal","hover","focus","focus-within","focus-visible","checked","disable","active"],Hp=N5.map(e=>({key:e,label:e})),T5=e=>{const[t,n]=g.useState("normal"),[r]=g.useState([{key:"991",maxWidth:"991",label:"Medial Query ( <= 991 px )"},{key:"767",maxWidth:"767",label:"Medial Query ( <= 767 px )"},{key:"479",maxWidth:"479",label:"Medial Query ( <= 479 px )"}]),o=g.useRef({}),a=b=>{n(b)},[i,s]=g.useState(["normal"]),l=g.useMemo(()=>Hp.filter(b=>!i.includes(b.key)),[i]),c=g.useMemo(()=>Hp.filter(b=>i.includes(b.key)),[i]),[u,d]=g.useState(e.initialValue??{});g.useEffect(()=>{const b=Object.keys(u);s(b)},[u]);const f=g.useMemo(()=>{const b=u==null?void 0:u[t];if(!b)return{};const y={};return Object.keys(b).forEach(S=>{y[S]=ti(b[S]||{}).normalProperty}),y},[t,u]),p=g.useCallback(()=>{Object.keys(o.current).forEach(b=>{var E;const y=(E=o.current)==null?void 0:E[b],S=f[b]||[];y&&y.setValue(S)})},[f]),h=g.useRef();h.current=p,e.handler&&(e.handler.current={setValue:async b=>{var y;d(b),await Tn(),(y=h.current)==null||y.call(h)}}),g.useEffect(()=>{p()},[t]);const m=g.useCallback((b,y)=>{var E;const S={...u,[t]:{...u[t]||{},[b]:rc(y)}};(E=e.onValueChange)==null||E.call(e,S)},[u,t]);return w(qe,{children:te(Y.Card,{size:"small",type:"inner",title:w("span",{style:{fontSize:"12px"},children:"CSS"}),extra:w(Y.Dropdown,{menu:{items:l,onClick:b=>{s(y=>[...y,b.key])}},children:w(nc,{})}),children:[w(Y.Space,{size:[0,8],wrap:!0,style:{paddingBottom:"10px"},children:c.map(b=>{const y=t.includes(b.key);return te(w5,{style:{border:y?"1px solid rgba(0,0,0,0))":"1px solid rgb(216 216 216 / 82%)"},checked:y,onChange:()=>a(b.key),className:Vp.stateTag,children:[b.label,b.key!=="normal"&&w(k0,{className:Vp.stateTagClose,onClick:S=>{S.stopPropagation(),S.preventDefault(),s(E=>E.filter(x=>x!==b.key)),n("normal")}})]},b.key)})}),w(Y.Collapse,{defaultActiveKey:["normal"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"normal",label:w("span",{children:"Normal"}),children:w(Fp,{ref:b=>{o.current.normal=b},onValueChange:b=>m("normal",b),initialValue:f.normal})},...r.map(b=>({key:b.key,label:w("span",{children:b.label}),children:w(Fp,{ref:y=>{o.current[b.key]=y},onValueChange:y=>m(b.key,y)})}))]})]})})},P5=e=>{const t=g.useRef(null),n=e.node;if(!n)return w(qe,{});const r=g.useRef(null),o=g.useRef(null),[a,i]=g.useState({}),s=g.useMemo(()=>ti(a),[a]),l=g.useRef();g.useEffect(()=>{const d=()=>{var b,y,S;l.current=n;const f=n.value.style||{};i(f);const{normalProperty:p,expressionProperty:h}=ti(f);(b=r.current)==null||b.setValue(p),(y=t.current)==null||y.setValue(h);const m=kh(n.value.css);(S=o.current)==null||S.setValue(m)};d(),n.emitter.on("onNodeChange",d),n.emitter.on("onReloadPage",d)},[n]);const c=d=>{const f=rc([...d]);i(f),n.value.style=f,n.updateValue()},u=d=>{n.value.css=Ph(`c_${n.id}`,d),n.updateValue()};return te("div",{className:pp.visualPanelBox,children:[w("div",{style:{marginBottom:"10px"},children:w(xL,{onValueChange:d=>{n.value.classNames=d,n.updateValue()}})}),w(Y.Collapse,{defaultActiveKey:["origin-css-edit"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"origin-css-edit",label:w("span",{className:pp.header,children:"Style Variable Bind"}),children:w(wL,{ref:t,initialValue:s.expressionProperty,onValueChange:d=>{c([...s.normalProperty,...d])}})}]}),w(T5,{handler:o,onValueChange:u})]})},k5={key:"VisualPanelPlus",name:"Visual",view:({node:e,pluginCtx:t})=>w(P5,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.visual)!==!1}};class j5 extends g.Component{constructor(n){super(n);L(this,"addPanel",n=>{const r=[...this.state.panels,n];this.setState({panels:r}),this.updatePanels()});L(this,"removePanel",n=>{const r=this.state.panels.filter(o=>o.name!==n);this.setState({panels:r}),this.updatePanels()});L(this,"replacePanel",(n,r)=>{const o=this.state.panels.findIndex(i=>i.name===n),a=[...this.state.panels];o>-1&&(a[o]=r),this.setState({panels:a}),this.updatePanels()});L(this,"choosePanel",n=>{this.setState({activeKey:n}),this.updatePanels()});L(this,"updatePanels",()=>{var s,l,c;const{pluginCtx:n}=this.props,{node:r,panels:o}=this.state,a=o;let i={panels:[],displayPanels:[]};if(r){const u={node:r,pluginCtx:n},d=a.filter(p=>p.show===void 0?!0:p.show(u)),f=((c=(l=(s=r.material)==null?void 0:s.value.advanceCustom)==null?void 0:l.rightPanel)==null?void 0:c.customTabs)||[];d.concat(f),i={panels:a,displayPanels:d}}else i={panels:a,displayPanels:[]};return this.setState(i),i});L(this,"onNodeChange",({node:n})=>{var u;const{pluginCtx:r}=this.props,{panels:o,activeKey:a}=this.state,i={node:n,pluginCtx:r},s=o.filter(d=>d.show===void 0?!0:d.show(i)),l=((u=s.find((d,f)=>f===0))==null?void 0:u.key)||"";s.find(d=>d.key===a)?this.setState({node:n,displayPanels:s}):this.setState({activeKey:l,node:n,displayPanels:s})});this.state={node:n.pluginCtx.engine.getActiveNode(),activeKey:"Visual",panels:[Q6,k5,eL,aL],displayPanels:[]}}componentDidMount(){var i;const{pluginCtx:n}=this.props;n.globalEmitter.on("onSelectNodeChange",this.onNodeChange),n.pageModel.emitter.on("*",()=>{const s=n.engine.getActiveNode();this.onNodeChange({node:s})});const{displayPanels:r}=this.updatePanels(),o=((i=r.find((s,l)=>l===0))==null?void 0:i.key)||"";r.find(s=>s.key===this.state.activeKey)||this.setState({activeKey:o}),n.pluginReadyOk()}render(){const{displayPanels:n,node:r,activeKey:o}=this.state,{pluginCtx:a}=this.props;if(!r)return w("div",{style:{overflow:"hidden"},children:w(Y.Empty,{image:Y.Empty.PRESENTED_IMAGE_SIMPLE,description:"Please select a node from left view"})});const i={node:r,pluginCtx:a};return w("div",{className:sL.rightPanelContainer,children:w(Y.Tabs,{activeKey:o,tabPosition:"top",style:{flex:1,height:"100%"},onChange:s=>{this.setState({activeKey:s})},items:n.map(s=>{var l;return{label:w("div",{style:{padding:"0 10px"},children:typeof s.name=="string"?s.name:(l=s.name)==null?void 0:l.call(s,i)}),key:s.key,children:s.view(i)}})})})}}const M5="RightPanel",By=e=>{const t=g.createRef();return{name:M5,async init(n){n.getWorkbench().replaceRightView(w(j5,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:n=>t==null?void 0:t.current,meta:{engine:{version:"1.0.0"}}}},A5={pluginName:"全局状态"},D5={pluginName:"Global State"},Up={zh_CN:A5,en_US:D5},$5="_box_tl0hm_2",I5={box:$5},ql="GlobalState",Vs=`plugin:${ql}`,L5=e=>{const{pluginCtx:t}=e,n=t.pageModel.value.componentsTree.value.state||{};let r=!1;const o=g.useRef(null);g.useEffect(()=>{var i;(i=o==null?void 0:o.current)==null||i.setValue(JSON.stringify(n,null,2)),t.pageModel.emitter.on("onReloadPage",s=>{var l;if(console.log(s),r){r=!1;return}(l=o.current)==null||l.setValue(JSON.stringify(t.pageModel.value.componentsTree.value.state,null,2))})},[]);const a=i=>{try{const s=JSON.parse(i||"{}");t.pageModel.value.componentsTree.value.state=s,r=!0,t.pageModel.value.componentsTree.updateValue()}catch(s){console.warn(s)}};return w("div",{className:I5.box,children:w(sa,{language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:i=>{o.current=i},onChange:a})})},zy={name:ql,async init(e){const{i18n:t}=e;Object.keys(Up).forEach(a=>{t.addResourceBundle(a,Vs,Up[a],!0,!0)});const n=Ir(Vs)(L5),r=Ir(Vs)(({t:a})=>w(qe,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:w(r,{}),name:ql,icon:w(y0,{}),render:w(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},B5=e=>{const t=e.pageModel.export(),{engineCtx:n}=e,[r,o]=g.useState(!1),a=g.useRef(null);return te(qe,{children:[w("div",{onClick:()=>{o(!0)},children:e.children}),w(Y.Modal,{open:r,title:"Source Schema",width:"100%",onCancel:()=>o(!1),onOk:async()=>{var d;o(!1);const i=(d=a.current)==null?void 0:d.getValue();if(!i)return;const s=JSON.parse(i);e.pageModel.updatePage(s),await Tn();const l=n.engine.getActiveNode(),c=await n.pluginManager.get("Designer"),u=(l==null?void 0:l.id)||"";c==null||c.ctx.emitter.on("ready",()=>{c.export.selectNode(u)}),c&&c.export.selectNode(u)},style:{height:"calc(100vh - 50px)",top:"25px"},destroyOnClose:!0,children:w("div",{style:{width:"100%",height:"calc(100vh - 200px)"},children:w(sa,{initialValue:JSON.stringify(t,null,2),language:"json",options:{automaticLayout:!0},onDidMount:i=>{a.current=i}})})})]})},z5="History",Fy=e=>{const t=e,n={historyRecords:[],currentStepIndex:0};let r=null;const o=e.pageModel.export();r=o,n.historyRecords.push(o);const a=async s=>{t&&(t.pageModel.reloadPage(s),await Tn())},i={addStep:()=>{const{currentStepIndex:s,historyRecords:l}=n,c=e.pageModel.export();s!==l.length-1&&(n.historyRecords=l.slice(0,s+1)),n.historyRecords.push(c),n.currentStepIndex=l.length-1},reset:async()=>{if(!t){console.warn("plugin ctx is null, pls check it");return}r&&(n.historyRecords=[],a(r))},preStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;if(!i.canGoPreStep())return;const c=s-1;n.currentStepIndex=c;const u=Df(l[c]);a(u)},nextStep:()=>{if(!i.canGoNextStep())return;const{currentStepIndex:s,historyRecords:l}=n,c=s+1;n.currentStepIndex=c;const u=Df(l[c]);return a(u)},canGoPreStep:()=>{const{currentStepIndex:s}=n;return!(s<=0)},canGoNextStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;return!(s>=l.length-1)}};return{name:z5,async init(s){s.pageModel.emitter.on("onNodeChange",()=>{i.addStep()}),s.pageModel.emitter.on("onPageChange",()=>{i.addStep()}),s.pluginReadyOk()},async destroy(s){console.log("destroy",s)},export:()=>i,meta:{engine:{version:"1.0.0"}}}},F5=[Wv,uD,Vv,zy,By,Fy],V5=Object.freeze(Object.defineProperty({__proto__:null,ComponentLibPlugin:Vv,DEFAULT_PLUGIN_LIST:F5,DesignerPlugin:Wv,DisplaySourceSchema:B5,GlobalStatePanelPlugin:zy,HistoryPlugin:Fy,RightPanelPlugin:By},Symbol.toStringTag,{value:"Module"})),pn={name:"$$attributes",title:"属性",valueType:"object",setters:[{componentName:"ArraySetter",props:{item:{setters:[{componentName:"ShapeSetter",props:{elements:[{name:"key",title:"属性名",valueType:"string",setters:["StringSetter"]},{name:"value",title:"值",valueType:"string",setters:["StringSetter","NumberSetter","JSONSetter","FunctionSetter","ExpressionSetter"]}],collapse:!1},initialValue:{}}],initialValue:{}}},initialValue:[]}]},vr={name:"width",title:"宽度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},mr={name:"height",title:"高度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},H5=ye.HTMl_TAGS.map(e=>({title:Av(e),componentName:e,props:[pn],snippets:[]})),U5=[{title:"块",componentName:"CBlock",props:[vr,mr,{name:"children",title:"文本",valueType:"string",setters:["StringSetter","ExpressionSetter"]},pn],groupName:"原子组件",snippets:[{title:"块",snapshotText:"Block",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"容器",componentName:"CContainer",isContainer:!0,props:[vr,mr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},pn],groupName:"原子组件",snippets:[{title:"容器",snapshotText:"Con",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"图片",componentName:"CImage",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},vr,mr,pn],groupName:"原子组件",snippets:[{title:"图片",snapshotText:"Img",category:"基础组件",schema:{props:{width:"300px",height:"150px"}}}]},{title:"视频",componentName:"CVideo",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},vr,mr,pn],fixedProps:{autoPlay:!1},advanceCustom:{wrapComponent:e=>t=>w(e,{...t,style:{pointerEvents:"none",...t.style}})},groupName:"原子组件",snippets:[{title:"视频",snapshotText:"Video",category:"基础组件",schema:{props:{width:"300px",height:"150px",src:"https://vjs.zencdn.net/v/oceans.mp4"}}}]},{title:"音频",groupName:"原子组件",componentName:"CAudio",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},vr,mr,pn],advanceCustom:{wrapComponent:()=>e=>w("div",{style:{display:"inline-block",fontSize:0},children:w("audio",{...e,style:{pointerEvents:"none",...e.style}})})},snippets:[{title:"音频",snapshotText:"Audio",category:"基础组件",schema:{props:{src:"https://vjs.zencdn.net/v/oceans.mp4",controls:!0}}}]},{title:"文本",componentName:"CText",groupName:"原子组件",props:[{name:"content",title:"内容",valueType:"string",setters:["TextAreaSetter","ExpressionSetter"]},pn],snippets:[{title:"文本",snapshotText:"Text",category:"基础组件",schema:{props:{content:"text"}}}]},{title:"Canvas",componentName:"CCanvas",props:[vr,mr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},pn],groupName:"原子组件",advanceCustom:{onNewAdd:async(e,t)=>{const n=e.getPlainProps(),r=Math.random().toString(32).slice(3,9);return n.$$attributes=[{key:"id",value:r},{key:"style",value:{display:"block",margin:"0 auto"}}],n.afterMount.value=n.afterMount.value.replace("$[id]",r),e.updateWithPlainObj({props:n}),{addNode:e}}},snippets:[{title:"画布",snapshotText:"Cavs",category:"基础组件",schema:{props:{width:"600px",height:"150px",style:{margin:"0 auto"},afterMount:{type:"FUNCTION",value:`
235
+ */var $p;function b4(){return $p||($p=1,"{}".NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,i=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,p=e?Symbol.for("react.memo"):60115,g=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,S=e?Symbol.for("react.scope"):60119;function E(V){return typeof V=="string"||typeof V=="function"||V===r||V===c||V===a||V===o||V===d||V===f||typeof V=="object"&&V!==null&&(V.$$typeof===g||V.$$typeof===p||V.$$typeof===i||V.$$typeof===s||V.$$typeof===u||V.$$typeof===b||V.$$typeof===y||V.$$typeof===S||V.$$typeof===m)}function x(V){if(typeof V=="object"&&V!==null){var Xe=V.$$typeof;switch(Xe){case t:var Be=V.type;switch(Be){case l:case c:case r:case a:case o:case d:return Be;default:var Ie=Be&&Be.$$typeof;switch(Ie){case s:case u:case g:case p:case i:return Ie;default:return Xe}}case n:return Xe}}}var v=l,C=c,O=s,R=i,N=t,T=u,M=r,j=g,D=p,k=n,P=a,L=o,z=d,Z=!1;function J(V){return Z||(Z=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),le(V)||x(V)===l}function le(V){return x(V)===c}function A(V){return x(V)===s}function $(V){return x(V)===i}function W(V){return typeof V=="object"&&V!==null&&V.$$typeof===t}function ne(V){return x(V)===u}function ie(V){return x(V)===r}function de(V){return x(V)===g}function we(V){return x(V)===p}function fe(V){return x(V)===n}function Ee(V){return x(V)===a}function re(V){return x(V)===o}function $e(V){return x(V)===d}ge.AsyncMode=v,ge.ConcurrentMode=C,ge.ContextConsumer=O,ge.ContextProvider=R,ge.Element=N,ge.ForwardRef=T,ge.Fragment=M,ge.Lazy=j,ge.Memo=D,ge.Portal=k,ge.Profiler=P,ge.StrictMode=L,ge.Suspense=z,ge.isAsyncMode=J,ge.isConcurrentMode=le,ge.isContextConsumer=A,ge.isContextProvider=$,ge.isElement=W,ge.isForwardRef=ne,ge.isFragment=ie,ge.isLazy=de,ge.isMemo=we,ge.isPortal=fe,ge.isProfiler=Ee,ge.isStrictMode=re,ge.isSuspense=$e,ge.isValidElementType=E,ge.typeOf=x}()),ge}"{}".NODE_ENV==="production"?Bl.exports=y4():Bl.exports=b4();var w4=Bl.exports;function S4(e,t){typeof e=="function"?e(t):Oe(e)==="object"&&e&&"current"in e&&(e.current=t)}function x4(e){var t,n,r=w4.isMemo(e)?e.type.type:e.type;return!(typeof r=="function"&&!((t=r.prototype)!==null&&t!==void 0&&t.render)||typeof e=="function"&&!((n=e.prototype)!==null&&n!==void 0&&n.render))}const xy="anticon",C4=(e,t)=>t||(e?`ant-${e}`:"ant"),ca=U.createContext({getPrefixCls:C4,iconPrefixCls:xy}),O4=e=>({boxSizing:"border-box",margin:0,padding:0,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight,listStyle:"none",fontFamily:e.fontFamily}),E4=()=>({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"}}),_4=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,
236
+ &:hover`]:{textDecoration:e.linkHoverDecoration,outline:0},"&:focus":{textDecoration:e.linkFocusDecoration,outline:0},"&[disabled]":{color:e.colorTextDisabled,cursor:"not-allowed"}}}),R4=(e,t)=>{const{fontFamily:n,fontSize:r}=e,o=`[class^="${t}"], [class*=" ${t}"]`;return{[o]:{fontFamily:n,fontSize:r,boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"},[o]:{boxSizing:"border-box","&::before, &::after":{boxSizing:"border-box"}}}}};function N4(e,t,n,r){return o=>{const[a,i,s]=mu(),{getPrefixCls:l,iconPrefixCls:c,csp:u}=h.useContext(ca),d=l(),f={theme:a,token:i,hashId:s,nonce:()=>u==null?void 0:u.nonce};return Il(Object.assign(Object.assign({},f),{path:["Shared",d]}),()=>[{"&":_4(i)}]),[Il(Object.assign(Object.assign({},f),{path:[e,o,c]}),()=>{const{token:p,flush:g}=P4(i),m=Object.assign({},i[e]);if(r!=null&&r.deprecatedTokens){const{deprecatedTokens:v}=r;v.forEach(C=>{let[O,R]=C;var N;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&Mn(!(m!=null&&m[O]),`The token '${String(O)}' of ${e} had deprecated, use '${String(R)}' instead.`),(m!=null&&m[O]||m!=null&&m[R])&&((N=m[R])!==null&&N!==void 0||(m[R]=m==null?void 0:m[O]))})}const b=typeof n=="function"?n(Vl(p,m??{})):n,y=Object.assign(Object.assign({},b),m),S=`.${o}`,E=Vl(p,{componentCls:S,prefixCls:o,iconCls:`.${c}`,antCls:`.${d}`},y),x=t(E,{hashId:s,prefixCls:o,rootPrefixCls:d,iconPrefixCls:c,overrideComponentToken:m});return g(e,y),[(r==null?void 0:r.resetStyle)===!1?null:R4(i,o),x]}),s]}}const Cy="{}".NODE_ENV!=="production"||typeof CSSINJS_STATISTIC<"u";let zl=!0;function Vl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];if(!Cy)return Object.assign.apply(Object,[{}].concat(t));zl=!1;const r={};return t.forEach(o=>{Object.keys(o).forEach(i=>{Object.defineProperty(r,i,{configurable:!0,enumerable:!0,get:()=>o[i]})})}),zl=!0,r}function T4(){}function P4(e){let t,n=e,r=T4;return Cy&&(t=new Set,n=new Proxy(e,{get(o,a){return zl&&t.add(a),o[a]}}),r=(o,a)=>{Array.from(t)}),{token:n,keys:t,flush:r}}function k4(e,t){return X3.reduce((n,r)=>{const o=e[`${r}1`],a=e[`${r}3`],i=e[`${r}6`],s=e[`${r}7`];return Object.assign(Object.assign({},n),t(r,{lightColor:o,lightBorderColor:a,darkColor:i,textColor:s}))},{})}const j4=ey(g4),Oy={token:Gi,hashed:!0},Ey=h.createContext(Oy);function mu(){const{token:e,hashed:t,theme:n,components:r}=h.useContext(Ey),o=`${Y3}-${t||""}`,a=n||j4,[i,s]=i3(a,[Gi,e],{salt:o,override:Object.assign({override:e},r),formatToken:m4});return[a,i,t?s:""]}const M4=`-ant-${Date.now()}-${Math.random()}`;function A4(e,t){const n={},r=(i,s)=>{let l=i.clone();return l=(s==null?void 0:s(l))||l,l.toRgbString()},o=(i,s)=>{const l=new wt(i),c=Hr(l.toRgbString());n[`${s}-color`]=r(l),n[`${s}-color-disabled`]=c[1],n[`${s}-color-hover`]=c[4],n[`${s}-color-active`]=c[6],n[`${s}-color-outline`]=l.clone().setAlpha(.2).toRgbString(),n[`${s}-color-deprecated-bg`]=c[0],n[`${s}-color-deprecated-border`]=c[2]};if(t.primaryColor){o(t.primaryColor,"primary");const i=new wt(t.primaryColor),s=Hr(i.toRgbString());s.forEach((c,u)=>{n[`primary-${u+1}`]=c}),n["primary-color-deprecated-l-35"]=r(i,c=>c.lighten(35)),n["primary-color-deprecated-l-20"]=r(i,c=>c.lighten(20)),n["primary-color-deprecated-t-20"]=r(i,c=>c.tint(20)),n["primary-color-deprecated-t-50"]=r(i,c=>c.tint(50)),n["primary-color-deprecated-f-12"]=r(i,c=>c.setAlpha(c.getAlpha()*.12));const l=new wt(s[0]);n["primary-color-active-deprecated-f-30"]=r(l,c=>c.setAlpha(c.getAlpha()*.3)),n["primary-color-active-deprecated-d-02"]=r(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"),`
237
+ :root {
238
+ ${Object.keys(n).map(i=>`--${e}-${i}: ${n[i]};`).join(`
239
+ `)}
240
+ }
241
+ `.trim()}function D4(e,t){const n=A4(e,t);en()?Do(n,`${M4}-dynamic-theme`):"{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","SSR do not support dynamic theme with css variables.")}const Fl=U.createContext(!1),$4=e=>{let{children:t,disabled:n}=e;const r=U.useContext(Fl);return w(Fl.Provider,{value:n??r,children:t})},I4=Fl,L4=e=>{const t=h.useContext(Ki);return h.useMemo(()=>e?typeof e=="string"?e??t:e instanceof Function?e(t):t:t,[e,t])},B4=L4,_y=U.createContext(void 0),z4=e=>{let{children:t,size:n}=e;const r=B4(n);return w(_y.Provider,{value:r,children:t})},Ki=_y;function V4(){const e=h.useContext(I4),t=h.useContext(Ki);return{componentDisabled:e,componentSize:t}}function F4(e,t){const n=e||{},r=n.inherit===!1||!t?Oy:t;return Qm(()=>{if(!e)return t;const a=Object.assign({},r.components);return Object.keys(e.components||{}).forEach(i=>{a[i]=Object.assign(Object.assign({},a[i]),e.components[i])}),Object.assign(Object.assign(Object.assign({},r),n),{token:Object.assign(Object.assign({},r.token),n.token),components:a})},[n,r],(a,i)=>a.some((s,l)=>{const c=i[l];return!TL(s,c,!0)}))}function H4(e){return e instanceof HTMLElement||e instanceof SVGElement}function U4(e){return H4(e)?e:e instanceof h.Component?Lt.findDOMNode(e):null}var W4=["children"],Ry=U.createContext({});function G4(e){var t=e.children,n=Rr(e,W4);return w(Ry.Provider,{value:n,children:t})}function K4(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ny(e){var t=K4();return function(){var r=kt(e),o;if(t){var a=kt(this).constructor;o=Reflect.construct(r,arguments,a)}else o=r.apply(this,arguments);return eo(this,o)}}var q4=function(e){Zr(n,e);var t=Ny(n);function n(){return nt(this,n),t.apply(this,arguments)}return rt(n,[{key:"render",value:function(){return this.props.children}}]),n}(U.Component),Un="none",Va="appear",Fa="enter",Ha="leave",Ip="none",It="prepare",Cr="start",Or="active",yu="end",Ty="prepared";function Lp(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}function Y4(e,t){var n={animationend:Lp("Animation","AnimationEnd"),transitionend:Lp("Transition","TransitionEnd")};return e&&("AnimationEvent"in t||delete n.animationend.animation,"TransitionEvent"in t||delete n.transitionend.transition),n}var X4=Y4(en(),typeof window<"u"?window:{}),Py={};if(en()){var J4=document.createElement("div");Py=J4.style}var Ua={};function ky(e){if(Ua[e])return Ua[e];var t=X4[e];if(t)for(var n=Object.keys(t),r=n.length,o=0;o<r;o+=1){var a=n[o];if(Object.prototype.hasOwnProperty.call(t,a)&&a in Py)return Ua[e]=t[a],Ua[e]}return""}var jy=ky("animationend"),My=ky("transitionend"),Ay=!!(jy&&My),Bp=jy||"animationend",zp=My||"transitionend";function Vp(e,t){if(!e)return null;if(Oe(e)==="object"){var n=t.replace(/-\w/g,function(r){return r[1].toUpperCase()});return e[n]}return"".concat(e,"-").concat(t)}const Q4=function(e){var t=h.useRef(),n=h.useRef(e);n.current=e;var r=U.useCallback(function(i){n.current(i)},[]);function o(i){i&&(i.removeEventListener(zp,r),i.removeEventListener(Bp,r))}function a(i){t.current&&t.current!==i&&o(t.current),i&&i!==t.current&&(i.addEventListener(zp,r),i.addEventListener(Bp,r),t.current=i)}return U.useEffect(function(){return function(){o(t.current)}},[]),[a,o]};var Dy=en()?h.useLayoutEffect:h.useEffect,$y=function(t){return+setTimeout(t,16)},Iy=function(t){return clearTimeout(t)};typeof window<"u"&&"requestAnimationFrame"in window&&($y=function(t){return window.requestAnimationFrame(t)},Iy=function(t){return window.cancelAnimationFrame(t)});var Fp=0,bu=new Map;function Ly(e){bu.delete(e)}var Hl=function(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;Fp+=1;var r=Fp;function o(a){if(a===0)Ly(r),t();else{var i=$y(function(){o(a-1)});bu.set(r,i)}}return o(n),r};Hl.cancel=function(e){var t=bu.get(e);return Ly(t),Iy(t)};const Z4=function(){var e=U.useRef(null);function t(){Hl.cancel(e.current)}function n(r){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:2;t();var a=Hl(function(){o<=1?r({isCanceled:function(){return a!==e.current}}):n(r,o-1)});e.current=a}return U.useEffect(function(){return function(){t()}},[]),[n,t]};var e5=[It,Cr,Or,yu],t5=[It,Ty],By=!1,n5=!0;function zy(e){return e===Or||e===yu}const r5=function(e,t,n){var r=Ja(Ip),o=Ce(r,2),a=o[0],i=o[1],s=Z4(),l=Ce(s,2),c=l[0],u=l[1];function d(){i(It,!0)}var f=t?t5:e5;return Dy(function(){if(a!==Ip&&a!==yu){var p=f.indexOf(a),g=f[p+1],m=n(a);m===By?i(g,!0):g&&c(function(b){function y(){b.isCanceled()||i(g,!0)}m===!0?y():Promise.resolve(m).then(y)})}},[e,a]),U.useEffect(function(){return function(){u()}},[]),[d,a]};function o5(e,t,n,r){var o=r.motionEnter,a=o===void 0?!0:o,i=r.motionAppear,s=i===void 0?!0:i,l=r.motionLeave,c=l===void 0?!0:l,u=r.motionDeadline,d=r.motionLeaveImmediately,f=r.onAppearPrepare,p=r.onEnterPrepare,g=r.onLeavePrepare,m=r.onAppearStart,b=r.onEnterStart,y=r.onLeaveStart,S=r.onAppearActive,E=r.onEnterActive,x=r.onLeaveActive,v=r.onAppearEnd,C=r.onEnterEnd,O=r.onLeaveEnd,R=r.onVisibleChanged,N=Ja(),T=Ce(N,2),M=T[0],j=T[1],D=Ja(Un),k=Ce(D,2),P=k[0],L=k[1],z=Ja(null),Z=Ce(z,2),J=Z[0],le=Z[1],A=h.useRef(!1),$=h.useRef(null);function W(){return n()}var ne=h.useRef(!1);function ie(){L(Un,!0),le(null,!0)}function de(Ae){var me=W();if(!(Ae&&!Ae.deadline&&Ae.target!==me)){var De=ne.current,Ge;P===Va&&De?Ge=v==null?void 0:v(me,Ae):P===Fa&&De?Ge=C==null?void 0:C(me,Ae):P===Ha&&De&&(Ge=O==null?void 0:O(me,Ae)),P!==Un&&De&&Ge!==!1&&ie()}}var we=Q4(de),fe=Ce(we,1),Ee=fe[0],re=function(me){var De,Ge,Kt;switch(me){case Va:return De={},ae(De,It,f),ae(De,Cr,m),ae(De,Or,S),De;case Fa:return Ge={},ae(Ge,It,p),ae(Ge,Cr,b),ae(Ge,Or,E),Ge;case Ha:return Kt={},ae(Kt,It,g),ae(Kt,Cr,y),ae(Kt,Or,x),Kt;default:return{}}},$e=U.useMemo(function(){return re(P)},[P]),V=r5(P,!e,function(Ae){if(Ae===It){var me=$e[It];return me?me(W()):By}if(Ie in $e){var De;le(((De=$e[Ie])===null||De===void 0?void 0:De.call($e,W(),null))||null)}return Ie===Or&&(Ee(W()),u>0&&(clearTimeout($.current),$.current=setTimeout(function(){de({deadline:!0})},u))),Ie===Ty&&ie(),n5}),Xe=Ce(V,2),Be=Xe[0],Ie=Xe[1],vt=zy(Ie);ne.current=vt,Dy(function(){j(t);var Ae=A.current;A.current=!0;var me;!Ae&&t&&s&&(me=Va),Ae&&t&&a&&(me=Fa),(Ae&&!t&&c||!Ae&&d&&!t&&c)&&(me=Ha);var De=re(me);me&&(e||De[It])?(L(me),Be()):L(Un)},[t]),h.useEffect(function(){(P===Va&&!s||P===Fa&&!a||P===Ha&&!c)&&L(Un)},[s,a,c]),h.useEffect(function(){return function(){A.current=!1,clearTimeout($.current)}},[]);var an=U.useRef(!1);h.useEffect(function(){M&&(an.current=!0),M!==void 0&&P===Un&&((an.current||M)&&(R==null||R(M)),an.current=!0)},[M,P]);var sn=J;return $e[It]&&Ie===Cr&&(sn=H({transition:"none"},sn)),[P,Ie,sn,M??t]}function a5(e){var t=e;Oe(e)==="object"&&(t=e.transitionSupport);function n(o,a){return!!(o.motionName&&t&&a!==!1)}var r=U.forwardRef(function(o,a){var i=o.visible,s=i===void 0?!0:i,l=o.removeOnLeave,c=l===void 0?!0:l,u=o.forceRender,d=o.children,f=o.motionName,p=o.leavedClassName,g=o.eventProps,m=U.useContext(Ry),b=m.motion,y=n(o,b),S=h.useRef(),E=h.useRef();function x(){try{return S.current instanceof HTMLElement?S.current:U4(E.current)}catch{return null}}var v=o5(y,s,x,o),C=Ce(v,4),O=C[0],R=C[1],N=C[2],T=C[3],M=U.useRef(T);T&&(M.current=!0);var j=U.useCallback(function(le){S.current=le,S4(a,le)},[a]),D,k=H(H({},g),{},{visible:s});if(!d)D=null;else if(O===Un)T?D=d(H({},k),j):!c&&M.current&&p?D=d(H(H({},k),{},{className:p}),j):u||!c&&!p?D=d(H(H({},k),{},{style:{display:"none"}}),j):D=null;else{var P,L;R===It?L="prepare":zy(R)?L="active":R===Cr&&(L="start");var z=Vp(f,"".concat(O,"-").concat(L));D=d(H(H({},k),{},{className:Ql(Vp(f,O),(P={},ae(P,z,z&&L),ae(P,f,typeof f=="string"),P)),style:N}),j)}if(U.isValidElement(D)&&x4(D)){var Z=D,J=Z.ref;J||(D=U.cloneElement(D,{ref:j}))}return w(q4,{ref:E,children:D})});return r.displayName="CSSMotion",r}const i5=a5(Ay);var Ul="add",Wl="keep",Gl="remove",zs="removed";function s5(e){var t;return e&&Oe(e)==="object"&&"key"in e?t=e:t={key:e},H(H({},t),{},{key:String(t.key)})}function Kl(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return e.map(s5)}function l5(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=[],r=0,o=t.length,a=Kl(e),i=Kl(t);a.forEach(function(c){for(var u=!1,d=r;d<o;d+=1){var f=i[d];if(f.key===c.key){r<d&&(n=n.concat(i.slice(r,d).map(function(p){return H(H({},p),{},{status:Ul})})),r=d),n.push(H(H({},f),{},{status:Wl})),r+=1,u=!0;break}}u||n.push(H(H({},c),{},{status:Gl}))}),r<o&&(n=n.concat(i.slice(r).map(function(c){return H(H({},c),{},{status:Ul})})));var s={};n.forEach(function(c){var u=c.key;s[u]=(s[u]||0)+1});var l=Object.keys(s).filter(function(c){return s[c]>1});return l.forEach(function(c){n=n.filter(function(u){var d=u.key,f=u.status;return d!==c||f!==Gl}),n.forEach(function(u){u.key===c&&(u.status=Wl)})}),n}var c5=["component","children","onVisibleChanged","onAllRemoved"],u5=["status"],d5=["eventProps","visible","children","motionName","motionAppear","motionEnter","motionLeave","motionLeaveImmediately","motionDeadline","removeOnLeave","leavedClassName","onAppearStart","onAppearActive","onAppearEnd","onEnterStart","onEnterActive","onEnterEnd","onLeaveStart","onLeaveActive","onLeaveEnd"];function f5(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:i5,n=function(r){Zr(a,r);var o=Ny(a);function a(){var i;nt(this,a);for(var s=arguments.length,l=new Array(s),c=0;c<s;c++)l[c]=arguments[c];return i=o.call.apply(o,[this].concat(l)),ae(Jt(i),"state",{keyEntities:[]}),ae(Jt(i),"removeKey",function(u){var d=i.state.keyEntities,f=d.map(function(p){return p.key!==u?p:H(H({},p),{},{status:zs})});return i.setState({keyEntities:f}),f.filter(function(p){var g=p.status;return g!==zs}).length}),i}return rt(a,[{key:"render",value:function(){var s=this,l=this.state.keyEntities,c=this.props,u=c.component,d=c.children,f=c.onVisibleChanged,p=c.onAllRemoved,g=Rr(c,c5),m=u||U.Fragment,b={};return d5.forEach(function(y){b[y]=g[y],delete g[y]}),delete g.keys,w(m,{...g,children:l.map(function(y){var S=y.status,E=Rr(y,u5),x=S===Ul||S===Wl;return h.createElement(t,{...b,key:E.key,visible:x,eventProps:E,onVisibleChanged:function(C){if(f==null||f(C,{key:E.key}),!C){var O=s.removeKey(E.key);O===0&&p&&p()}}},d)})})}}],[{key:"getDerivedStateFromProps",value:function(s,l){var c=s.keys,u=l.keyEntities,d=Kl(c),f=l5(u,d);return{keyEntities:f.filter(function(p){var g=u.find(function(m){var b=m.key;return p.key===b});return!(g&&g.status===zs&&p.status===Gl)})}}}]),a}(U.Component);return ae(n,"defaultProps",{component:"div"}),n}f5(Ay);function p5(e){const{children:t}=e,[,n]=mu(),{motion:r}=n,o=U.useRef(!1);return o.current=o.current||r===!1,o.current?w(G4,{motion:r,children:t}):t}const h5=(e,t)=>{const[n,r]=mu();return Il({theme:n,token:r,hashId:"",path:["ant-design-icons",e],nonce:()=>t==null?void 0:t.nonce},()=>[{[`.${e}`]:Object.assign(Object.assign({},E4()),{[`.${e} .${e}-icon`]:{display:"block"}})}])},g5=h5;var v5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const m5=["getTargetContainer","getPopupContainer","renderEmpty","pageHeader","input","pagination","form","select","button"],y5="ant";let Vy;function b5(){return Vy||y5}function w5(e){return Object.keys(e).some(t=>t.endsWith("Color"))}const S5=e=>{let{prefixCls:t,iconPrefixCls:n,theme:r}=e;t!==void 0&&(Vy=t),r&&w5(r)&&("{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","`config` of css variable theme is not work in v5. Please use new `theme` config instead."),D4(b5(),r))},x5=e=>{const{children:t,csp:n,autoInsertSpaceInButton:r,form:o,locale:a,componentSize:i,direction:s,space:l,virtual:c,dropdownMatchSelectWidth:u,popupMatchSelectWidth:d,popupOverflow:f,legacyLocale:p,parentContext:g,iconPrefixCls:m,theme:b,componentDisabled:y}=e;"{}".NODE_ENV!=="production"&&"{}".NODE_ENV!=="production"&&la(u===void 0,"ConfigProvider","`dropdownMatchSelectWidth` is deprecated. Please use `popupMatchSelectWidth` instead.");const S=U.useCallback((P,L)=>{const{prefixCls:z}=e;if(L)return L;const Z=z||g.getPrefixCls("");return P?`${Z}-${P}`:Z},[g.getPrefixCls,e.prefixCls]),E=m||g.iconPrefixCls||xy,x=E!==g.iconPrefixCls,v=n||g.csp,C=g5(E,v),O=F4(b,g.theme),R={csp:v,autoInsertSpaceInButton:r,locale:a||p,direction:s,space:l,virtual:c,popupMatchSelectWidth:d??u,popupOverflow:f,getPrefixCls:S,iconPrefixCls:E,theme:O},N=Object.assign({},g);Object.keys(R).forEach(P=>{R[P]!==void 0&&(N[P]=R[P])}),m5.forEach(P=>{const L=e[P];L&&(N[P]=L)});const T=Qm(()=>N,N,(P,L)=>{const z=Object.keys(P),Z=Object.keys(L);return z.length!==Z.length||z.some(J=>P[J]!==L[J])}),M=U.useMemo(()=>({prefixCls:E,csp:v}),[E,v]);let j=x?C(t):t;const D=U.useMemo(()=>{var P,L,z;return B3(((P=vu.Form)===null||P===void 0?void 0:P.defaultValidateMessages)||{},((z=(L=T.locale)===null||L===void 0?void 0:L.Form)===null||z===void 0?void 0:z.defaultValidateMessages)||{},(o==null?void 0:o.validateMessages)||{})},[T,o==null?void 0:o.validateMessages]);Object.keys(D).length>0&&(j=w(V3.Provider,{value:D,children:t})),a&&(j=w(q3,{locale:a,_ANT_MARK__:my,children:j})),(E||v)&&(j=w($3.Provider,{value:M,children:j})),i&&(j=w(z4,{size:i,children:j})),j=w(p5,{children:j});const k=U.useMemo(()=>{const P=O||{},{algorithm:L,token:z}=P,Z=v5(P,["algorithm","token"]),J=L&&(!Array.isArray(L)||L.length>0)?ey(L):void 0;return Object.assign(Object.assign({},Z),{theme:J,token:Object.assign(Object.assign({},Gi),z)})},[O]);return b&&(j=w(Ey.Provider,{value:k,children:j})),y!==void 0&&(j=w($4,{disabled:y,children:j})),w(ca.Provider,{value:T,children:j})},lo=e=>{const t=U.useContext(ca),n=U.useContext(vy);return w(x5,{...Object.assign({parentContext:t,legacyLocale:n},e)})};lo.ConfigContext=ca;lo.SizeContext=Ki;lo.config=S5;lo.useConfig=V4;Object.defineProperty(lo,"SizeContext",{get:()=>("{}".NODE_ENV!=="production"&&la(!1,"ConfigProvider","ConfigProvider.SizeContext is deprecated. Please use `ConfigProvider.useConfig().componentSize` instead."),Ki)});"{}".NODE_ENV!=="production"&&(lo.displayName="ConfigProvider");function C5(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Wa=(e,t,n)=>{const r=C5(n);return{[`${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},O5=e=>k4(e,(t,n)=>{let{textColor:r,lightBorderColor:o,lightColor:a,darkColor:i}=n;return{[`${e.componentCls}-${t}`]:{color:r,background:a,borderColor:o,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}}),E5=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:o}=e,a=r-n,i=t-n;return{[o]:Object.assign(Object.assign({},O4(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:a,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",[`&${o}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${o}-close-icon`]:{marginInlineStart:i,color:e.colorTextDescription,fontSize:e.tagIconSize,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${o}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},["&-checkable"]:{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${o}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},["&-hidden"]:{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:a}}),[`${o}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},_5=N4("Tag",e=>{const{lineWidth:t,fontSizeIcon:n}=e,r=e.fontSizeSM,o=`${e.lineHeightSM*r}px`,a=Vl(e,{tagFontSize:r,tagLineHeight:o,tagIconSize:n-2*t,tagPaddingHorizontal:8,tagBorderlessBg:e.colorFillTertiary});return[E5(a),O5(a),Wa(a,"success","Success"),Wa(a,"processing","Info"),Wa(a,"error","Error"),Wa(a,"warning","Warning")]},e=>({defaultBg:e.colorFillQuaternary,defaultColor:e.colorText}));var R5=globalThis&&globalThis.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const N5=e=>{const{prefixCls:t,className:n,checked:r,onChange:o,onClick:a}=e,i=R5(e,["prefixCls","className","checked","onChange","onClick"]),{getPrefixCls:s}=U.useContext(ca),l=p=>{o==null||o(!r),a==null||a(p)},c=s("tag",t),[u,d]=_5(c),f=Ql(c,{[`${c}-checkable`]:!0,[`${c}-checkable-checked`]:r},n,d);return u(w("span",{...Object.assign({},i,{className:f,onClick:l})}))},T5=N5,P5="_cssFieldBox_4b8an_2",k5="_inputAuto_4b8an_20",j5="_active_4b8an_23",M5="_cssBox_4b8an_27",br={cssFieldBox:P5,inputAuto:k5,active:j5,cssBox:M5},A5=async(e,t=14)=>new Promise((n,r)=>{const o=document.createElement("span");o.innerHTML=e,o.style.fontSize=`${t}px`,o.style.position="fixed",o.style.left="-1000px",o.style.bottom="-1000px",o.style.display="inline-block",document.body.appendChild(o),setTimeout(()=>{const a=window.getComputedStyle(o);n(a.width),setTimeout(()=>{document.body.removeChild(o)})})}),Vs=H6.map(e=>({value:e})),Hp=h.forwardRef(function(t,n){const[r,o]=h.useState(""),[a,i]=h.useState(""),{mode:s="edit"}=t,l=h.useMemo(()=>s==="create",[s]),[c,u]=h.useState({key:t.value.key,value:t.value.value});h.useEffect(()=>{u(t.value)},[t.value]);const[d,f]=h.useState(Vs),[p,g]=h.useState([]),[m,b]=h.useState([]),y=k=>{const P=Vs.filter(L=>L.value.includes(k));f(k?P:Vs)},S=()=>{var L;let k=[];const P=Ym[c.key];P&&(k=((L=P.values)==null?void 0:L.map(z=>({value:z})))||[]),g(k),b(k)},E=k=>{const P=m.filter(L=>L.value.includes(k));g(k?P:m)},x=()=>t.allValues.find(k=>k.key===c.key)?(Y.message.error(`${c.key} is exits`),o("error"),!1):!0,v=()=>{var k;l?c.value?(k=t.onCreate)==null||k.call(t,c):i("error"):O()},C=()=>{o(""),i(""),t.onValueChange({...c})},{run:O}=lu(C,{wait:20}),[R,N]=h.useState(0);h.useEffect(()=>{A5(c.key,13.33).then(k=>{let P=parseFloat(k);c.key===""&&(P=200),N(P+6)})},[c.key]);const T=h.useRef(null),M=h.useRef(null),[j,D]=h.useState({key:!1,value:!1});return h.useImperativeHandle(n,()=>({reset:()=>{var k;u({key:"",value:""}),(k=M.current)==null||k.focus()}}),[]),te("div",{className:br.cssFieldBox,children:[w(Y.AutoComplete,{ref:M,bordered:!1,disabled:!l,onSearch:y,status:r,popupMatchSelectWidth:200,value:c.key,onChange:k=>{u({...c,key:k}),o("")},style:{width:`${R}px`},className:dt([l&&br.inputAuto,l&&j.key&&br.active]),onFocus:()=>{D({key:!0,value:!1})},onBlur:()=>{D({key:!1,value:!1}),x()},onKeyDown:k=>{var P;k.code==="Enter"&&x()&&((P=T.current)==null||P.focus())},placeholder:"property",options:d}),w("span",{children:":"}),w(Y.AutoComplete,{bordered:!1,ref:T,status:a,popupMatchSelectWidth:200,value:c.value,onChange:k=>{var P;S(),u({...c,value:k}),i(""),l||((P=t.onCreate)==null||P.call(t,c),O())},style:{flex:1},onFocus:()=>{D({key:!1,value:!0})},onBlur:()=>{D({key:!1,value:!1}),O()},className:dt([br.inputAuto,j.value&&br.active]),placeholder:"value",onSearch:E,options:p,onKeyDown:k=>{k.code==="Enter"&&v()}}),t.onDelete&&s==="edit"&&w(Y.Button,{size:"small",type:"text",onClick:()=>{var k;(k=t.onDelete)==null||k.call(t)},children:w(_h,{style:{display:"inline-flex",fontSize:"12px"}})}),t.onCreate&&s==="create"&&w("div",{children:w(Y.Button,{size:"small",type:"text",icon:w(rc,{style:{fontSize:"12px",display:"inline-flex"}}),onClick:v})})]})}),Up=h.forwardRef(function(t,n){const[r,o]=h.useState([]);h.useImperativeHandle(n,()=>({setValue:c=>{o(c)}}),[]),h.useEffect(()=>{t.initialValue&&o(t.initialValue)},[]);const[a,i]=h.useState({key:"",value:""}),s=c=>{var u;(u=t.onValueChange)==null||u.call(t,c)},l=h.useRef(null);return w(Y.ConfigProvider,{theme:{token:{borderRadius:4}},children:te("div",{className:br.cssBox,children:[r.map((c,u)=>w("div",{children:w(Hp,{mode:"edit",allValues:r,value:c,onValueChange:d=>{r[u]=d,o([...r]),s(r)},onDelete:()=>{r.splice(u,1),o([...r]),s(r)}})},u)),w(Hp,{allValues:r,mode:"create",value:a,ref:l,onCreate:c=>{var u;if(c.key&&c.value){const d=r.filter(f=>f.key!==c.key);d.push(c),o(d),s(d),(u=l.current)==null||u.reset(),i({key:"",value:""})}},onValueChange:c=>{i(c)}})]})})}),D5="_stateTag_5a8hc_2",$5="_stateTagClose_5a8hc_5",Wp={stateTag:D5,stateTagClose:$5},I5=["normal","hover","focus","focus-within","focus-visible","checked","disable","active"],Gp=I5.map(e=>({key:e,label:e})),L5=e=>{const[t,n]=h.useState("normal"),[r]=h.useState([{key:"991",maxWidth:"991",label:"Medial Query ( <= 991 px )"},{key:"767",maxWidth:"767",label:"Medial Query ( <= 767 px )"},{key:"479",maxWidth:"479",label:"Medial Query ( <= 479 px )"}]),o=h.useRef({}),a=b=>{n(b)},[i,s]=h.useState(["normal"]),l=h.useMemo(()=>Gp.filter(b=>!i.includes(b.key)),[i]),c=h.useMemo(()=>Gp.filter(b=>i.includes(b.key)),[i]),[u,d]=h.useState(e.initialValue??{});h.useEffect(()=>{const b=Object.keys(u);s(b)},[u]);const f=h.useMemo(()=>{const b=u==null?void 0:u[t];if(!b)return{};const y={};return Object.keys(b).forEach(S=>{y[S]=ti(b[S]||{}).normalProperty}),y},[t,u]),p=h.useCallback(()=>{Object.keys(o.current).forEach(b=>{var E;const y=(E=o.current)==null?void 0:E[b],S=f[b]||[];y&&y.setValue(S)})},[f]),g=h.useRef();g.current=p,e.handler&&(e.handler.current={setValue:async b=>{var y;d(b),await Tn(),(y=g.current)==null||y.call(g)}}),h.useEffect(()=>{p()},[t]);const m=h.useCallback((b,y)=>{var E;const S={...u,[t]:{...u[t]||{},[b]:oc(y)}};(E=e.onValueChange)==null||E.call(e,S)},[u,t]);return w(Ye,{children:te(Y.Card,{size:"small",type:"inner",title:w("span",{style:{fontSize:"12px"},children:"CSS"}),extra:w(Y.Dropdown,{menu:{items:l,onClick:b=>{s(y=>[...y,b.key])}},children:w(rc,{})}),children:[w(Y.Space,{size:[0,8],wrap:!0,style:{paddingBottom:"10px"},children:c.map(b=>{const y=t.includes(b.key);return te(T5,{style:{border:y?"1px solid rgba(0,0,0,0))":"1px solid rgb(216 216 216 / 82%)"},checked:y,onChange:()=>a(b.key),className:Wp.stateTag,children:[b.label,b.key!=="normal"&&w(D0,{className:Wp.stateTagClose,onClick:S=>{S.stopPropagation(),S.preventDefault(),s(E=>E.filter(x=>x!==b.key)),n("normal")}})]},b.key)})}),w(Y.Collapse,{defaultActiveKey:["normal"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"normal",label:w("span",{children:"Normal"}),children:w(Up,{ref:b=>{o.current.normal=b},onValueChange:b=>m("normal",b),initialValue:f.normal})},...r.map(b=>({key:b.key,label:w("span",{children:b.label}),children:w(Up,{ref:y=>{o.current[b.key]=y},onValueChange:y=>m(b.key,y)})}))]})]})})},B5=e=>{const t=h.useRef(null),n=e.node;if(!n)return w(Ye,{});const r=h.useRef(null),o=h.useRef(null),[a,i]=h.useState({}),s=h.useMemo(()=>ti(a),[a]),l=h.useRef();h.useEffect(()=>{const d=()=>{var b,y,S;l.current=n;const f=n.value.style||{};i(f);const{normalProperty:p,expressionProperty:g}=ti(f);(b=r.current)==null||b.setValue(p),(y=t.current)==null||y.setValue(g);const m=Mh(n.value.css);(S=o.current)==null||S.setValue(m)};d(),n.emitter.on("onNodeChange",d),n.emitter.on("onReloadPage",d)},[n]);const c=d=>{const f=oc([...d]);i(f),n.value.style=f,n.updateValue()},u=d=>{n.value.css=jh(`c_${n.id}`,d),n.updateValue()};return te("div",{className:gp.visualPanelBox,children:[w("div",{style:{marginBottom:"10px"},children:w(_L,{onValueChange:d=>{n.value.classNames=d,n.updateValue()}})}),w(Y.Collapse,{defaultActiveKey:["origin-css-edit"],bordered:!1,style:{marginBottom:"10px"},items:[{key:"origin-css-edit",label:w("span",{className:gp.header,children:"Style Variable Bind"}),children:w(OL,{ref:t,initialValue:s.expressionProperty,onValueChange:d=>{c([...s.normalProperty,...d])}})}]}),w(L5,{handler:o,onValueChange:u})]})},z5={key:"VisualPanelPlus",name:"Visual",view:({node:e,pluginCtx:t})=>w(B5,{node:e,pluginCtx:t}),show:e=>{var t,n,r,o;return((o=(r=(n=(t=e.node)==null?void 0:t.material)==null?void 0:n.value.advanceCustom)==null?void 0:r.rightPanel)==null?void 0:o.visual)!==!1}};class V5 extends h.Component{constructor(n){super(n);B(this,"addPanel",n=>{const r=[...this.state.panels,n];this.setState({panels:r}),this.updatePanels()});B(this,"removePanel",n=>{const r=this.state.panels.filter(o=>o.name!==n);this.setState({panels:r}),this.updatePanels()});B(this,"replacePanel",(n,r)=>{const o=this.state.panels.findIndex(i=>i.name===n),a=[...this.state.panels];o>-1&&(a[o]=r),this.setState({panels:a}),this.updatePanels()});B(this,"choosePanel",n=>{this.setState({activeKey:n}),this.updatePanels()});B(this,"updatePanels",()=>{var s,l,c;const{pluginCtx:n}=this.props,{node:r,panels:o}=this.state,a=o;let i={panels:[],displayPanels:[]};if(r){const u={node:r,pluginCtx:n},d=a.filter(p=>p.show===void 0?!0:p.show(u)),f=((c=(l=(s=r.material)==null?void 0:s.value.advanceCustom)==null?void 0:l.rightPanel)==null?void 0:c.customTabs)||[];d.concat(f),i={panels:a,displayPanels:d}}else i={panels:a,displayPanels:[]};return this.setState(i),i});B(this,"onNodeChange",({node:n})=>{var u;const{pluginCtx:r}=this.props,{panels:o,activeKey:a}=this.state,i={node:n,pluginCtx:r},s=o.filter(d=>d.show===void 0?!0:d.show(i)),l=((u=s.find((d,f)=>f===0))==null?void 0:u.key)||"";s.find(d=>d.key===a)?this.setState({node:n,displayPanels:s}):this.setState({activeKey:l,node:n,displayPanels:s})});this.state={node:n.pluginCtx.engine.getActiveNode(),activeKey:"Visual",panels:[nL,z5,oL,cL],displayPanels:[]}}componentDidMount(){var i;const{pluginCtx:n}=this.props;n.globalEmitter.on("onSelectNodeChange",this.onNodeChange),n.pageModel.emitter.on("*",()=>{const s=n.engine.getActiveNode();this.onNodeChange({node:s})});const{displayPanels:r}=this.updatePanels(),o=((i=r.find((s,l)=>l===0))==null?void 0:i.key)||"";r.find(s=>s.key===this.state.activeKey)||this.setState({activeKey:o}),n.pluginReadyOk()}render(){const{displayPanels:n,node:r,activeKey:o}=this.state,{pluginCtx:a}=this.props;if(!r)return w("div",{style:{overflow:"hidden"},children:w(Y.Empty,{image:Y.Empty.PRESENTED_IMAGE_SIMPLE,description:"Please select a node from left view"})});const i={node:r,pluginCtx:a};return w("div",{className:dL.rightPanelContainer,children:w(Y.Tabs,{activeKey:o,tabPosition:"top",style:{flex:1,height:"100%"},onChange:s=>{this.setState({activeKey:s})},items:n.map(s=>{var l;return{label:w("div",{style:{padding:"0 10px"},children:typeof s.name=="string"?s.name:(l=s.name)==null?void 0:l.call(s,i)}),key:s.key,children:s.view(i)}})})})}}const F5="RightPanel",Fy=e=>{const t=h.createRef();return{name:F5,async init(n){n.getWorkbench().replaceRightView(w(V5,{ref:t,pluginCtx:n}))},async destroy(n){console.log("destroy",n)},export:n=>t==null?void 0:t.current,meta:{engine:{version:"1.0.0"}}}},H5={pluginName:"全局状态"},U5={pluginName:"Global State"},Kp={zh_CN:H5,en_US:U5},W5="_box_tl0hm_2",G5={box:W5},ql="GlobalState",Fs=`plugin:${ql}`,K5=e=>{const{pluginCtx:t}=e,n=t.pageModel.value.componentsTree.value.state||{};let r=!1;const o=h.useRef(null);h.useEffect(()=>{var i;(i=o==null?void 0:o.current)==null||i.setValue(JSON.stringify(n,null,2)),t.pageModel.emitter.on("onReloadPage",s=>{var l;if(console.log(s),r){r=!1;return}(l=o.current)==null||l.setValue(JSON.stringify(t.pageModel.value.componentsTree.value.state,null,2))})},[]);const a=i=>{try{const s=JSON.parse(i||"{}");t.pageModel.value.componentsTree.value.state=s,r=!0,t.pageModel.value.componentsTree.updateValue()}catch(s){console.warn(s)}};return w("div",{className:G5.box,children:w(sa,{language:"json",options:{automaticLayout:!0,tabSize:2,minimap:{enabled:!1},quickSuggestions:!1,suggestOnTriggerCharacters:!1,folding:!1},onDidMount:i=>{o.current=i},onChange:a})})},Hy={name:ql,async init(e){const{i18n:t}=e;Object.keys(Kp).forEach(a=>{t.addResourceBundle(a,Fs,Kp[a],!0,!0)});const n=Ir(Fs)(K5),r=Ir(Fs)(({t:a})=>w(Ye,{children:a("pluginName")}));e.getWorkbench().addLeftPanel({title:w(r,{}),name:ql,icon:w(x0,{}),render:w(n,{pluginCtx:e})})},async destroy(e){console.log("destroy",e)},export:e=>({}),meta:{engine:{version:"1.0.0"}}},q5=e=>{const t=e.pageModel.export(),{engineCtx:n}=e,[r,o]=h.useState(!1),a=h.useRef(null);return te(Ye,{children:[w("div",{onClick:()=>{o(!0)},children:e.children}),w(Y.Modal,{open:r,title:"Source Schema",width:"100%",onCancel:()=>o(!1),onOk:async()=>{var d;o(!1);const i=(d=a.current)==null?void 0:d.getValue();if(!i)return;const s=JSON.parse(i);e.pageModel.updatePage(s),await Tn();const l=n.engine.getActiveNode(),c=await n.pluginManager.get("Designer"),u=(l==null?void 0:l.id)||"";c==null||c.ctx.emitter.on("ready",()=>{c.export.selectNode(u)}),c&&c.export.selectNode(u)},style:{height:"calc(100vh - 50px)",top:"25px"},destroyOnClose:!0,children:w("div",{style:{width:"100%",height:"calc(100vh - 200px)"},children:w(sa,{initialValue:JSON.stringify(t,null,2),language:"json",options:{automaticLayout:!0},onDidMount:i=>{a.current=i}})})})]})},Y5="History",Uy=e=>{const t=e,n={historyRecords:[],currentStepIndex:0};let r=null;const o=e.pageModel.export();r=o,n.historyRecords.push(o);const a=async s=>{t&&(t.pageModel.reloadPage(s),await Tn())},i={addStep:()=>{const{currentStepIndex:s,historyRecords:l}=n,c=e.pageModel.export();s!==l.length-1&&(n.historyRecords=l.slice(0,s+1)),n.historyRecords.push(c),n.currentStepIndex=l.length-1},reset:async()=>{if(!t){console.warn("plugin ctx is null, pls check it");return}r&&(n.historyRecords=[],a(r))},preStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;if(!i.canGoPreStep())return;const c=s-1;n.currentStepIndex=c;const u=If(l[c]);a(u)},nextStep:()=>{if(!i.canGoNextStep())return;const{currentStepIndex:s,historyRecords:l}=n,c=s+1;n.currentStepIndex=c;const u=If(l[c]);return a(u)},canGoPreStep:()=>{const{currentStepIndex:s}=n;return!(s<=0)},canGoNextStep:()=>{const{currentStepIndex:s,historyRecords:l}=n;return!(s>=l.length-1)}};return{name:Y5,async init(s){s.pageModel.emitter.on("onNodeChange",()=>{i.addStep()}),s.pageModel.emitter.on("onPageChange",()=>{i.addStep()}),s.pluginReadyOk()},async destroy(s){console.log("destroy",s)},export:()=>i,meta:{engine:{version:"1.0.0"}}}},X5=[Kv,hD,Uv,Hy,Fy,Uy],J5=Object.freeze(Object.defineProperty({__proto__:null,ComponentLibPlugin:Uv,DEFAULT_PLUGIN_LIST:X5,DesignerPlugin:Kv,DisplaySourceSchema:q5,GlobalStatePanelPlugin:Hy,HistoryPlugin:Uy,RightPanelPlugin:Fy},Symbol.toStringTag,{value:"Module"})),pn={name:"$$attributes",title:"属性",valueType:"object",setters:[{componentName:"ArraySetter",props:{item:{setters:[{componentName:"ShapeSetter",props:{elements:[{name:"key",title:"属性名",valueType:"string",setters:["StringSetter"]},{name:"value",title:"值",valueType:"string",setters:["StringSetter","NumberSetter","JSONSetter","FunctionSetter","ExpressionSetter"]}],collapse:!1},initialValue:{}}],initialValue:{}}},initialValue:[]}]},vr={name:"width",title:"宽度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},mr={name:"height",title:"高度",valueType:"string",setters:["StringSetter","ExpressionSetter"]},Q5=be.HTMl_TAGS.map(e=>({title:$v(e),componentName:e,props:[pn],snippets:[]})),Z5=[{title:"块",componentName:"CBlock",props:[vr,mr,{name:"children",title:"文本",valueType:"string",setters:["StringSetter","ExpressionSetter"]},pn],groupName:"原子组件",snippets:[{title:"块",snapshotText:"Block",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"容器",componentName:"CContainer",isContainer:!0,props:[vr,mr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},pn],groupName:"原子组件",snippets:[{title:"容器",snapshotText:"Con",category:"基础组件",schema:{props:{width:"100%",height:"100px"}}}]},{title:"图片",componentName:"CImage",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},vr,mr,pn],groupName:"原子组件",snippets:[{title:"图片",snapshotText:"Img",category:"基础组件",schema:{props:{width:"300px",height:"150px"}}}]},{title:"视频",componentName:"CVideo",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},vr,mr,pn],fixedProps:{autoPlay:!1},advanceCustom:{wrapComponent:e=>t=>w(e,{...t,style:{pointerEvents:"none",...t.style}})},groupName:"原子组件",snippets:[{title:"视频",snapshotText:"Video",category:"基础组件",schema:{props:{width:"300px",height:"150px",src:"https://vjs.zencdn.net/v/oceans.mp4"}}}]},{title:"音频",groupName:"原子组件",componentName:"CAudio",props:[{name:"src",title:"地址",valueType:"string",setters:["StringSetter","ExpressionSetter"]},{name:"autoPlay",title:"自动播放",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},{name:"controls",title:"控制面板",valueType:"string",setters:["BooleanSetter","ExpressionSetter"]},vr,mr,pn],advanceCustom:{wrapComponent:()=>e=>w("div",{style:{display:"inline-block",fontSize:0},children:w("audio",{...e,style:{pointerEvents:"none",...e.style}})})},snippets:[{title:"音频",snapshotText:"Audio",category:"基础组件",schema:{props:{src:"https://vjs.zencdn.net/v/oceans.mp4",controls:!0}}}]},{title:"文本",componentName:"CText",groupName:"原子组件",props:[{name:"content",title:"内容",valueType:"string",setters:["TextAreaSetter","ExpressionSetter"]},pn],snippets:[{title:"文本",snapshotText:"Text",category:"基础组件",schema:{props:{content:"text"}}}]},{title:"Canvas",componentName:"CCanvas",props:[vr,mr,{name:"afterMount",title:"渲染之后",valueType:"function",setters:["FunctionSetter","ExpressionSetter","TestSetter"]},{name:"beforeDestroy",title:"销毁之前",valueType:"function",setters:["FunctionSetter","ExpressionSetter"]},pn],groupName:"原子组件",advanceCustom:{onNewAdd:async(e,t)=>{const n=e.getPlainProps(),r=Math.random().toString(32).slice(3,9);return n.$$attributes=[{key:"id",value:r},{key:"style",value:{display:"block",margin:"0 auto"}}],n.afterMount.value=n.afterMount.value.replace("$[id]",r),e.updateWithPlainObj({props:n}),{addNode:e}}},snippets:[{title:"画布",snapshotText:"Cavs",category:"基础组件",schema:{props:{width:"600px",height:"150px",style:{margin:"0 auto"},afterMount:{type:"FUNCTION",value:`
242
242
  function run () {
243
243
  var ctx = document.getElementById("$[id]").getContext("2d");
244
244
  ctx.font = "48px serif";
245
245
  ctx.fillText("Hello Canvas", 10, 50);
246
246
  }
247
- `}}}}]},{title:"HTML 标签",componentName:"CNativeTag",props:[{name:"htmlTag",title:"标签名",valueType:"string",setters:[{componentName:"SelectSetter",props:{options:ye.HTMl_TAGS.map(e=>({name:e,value:e}))}}]},pn],isContainer:!0,groupName:"原子组件",snippets:[{title:"HTML",snapshotText:"HTML",category:"基础组件",schema:{props:{htmlTag:"div"}}}]}],W5=[...U5,...H5];class Vy extends g.Component{constructor(n){super(n);L(this,"currentSelectNode");L(this,"pluginManager");L(this,"workbenchRef",g.createRef());L(this,"pageSchema");L(this,"pageModel");L(this,"material");L(this,"emitter");L(this,"updatePage",n=>{this.emitter.emit("updatePage"),console.log(n)});L(this,"updateDesignerAssets",n=>{console.log("updateDesignerAssets",n)});L(this,"updateMaterial",n=>{this.emitter.emit("updateMaterial"),console.log(n)});L(this,"refresh",()=>{this.emitter.emit("refresh"),console.log("refresh engine")});L(this,"getWorkbench",()=>this.workbenchRef.current);this.pageSchema=n.schema,this.material=n.material,this.currentSelectNode=null,window.__CHAMELEON_ENG__=this;try{this.pageModel=new ye.CPage(this.pageSchema,{materials:this.material||[],assetPackagesList:n.assetPackagesList||[]})}catch(r){console.error(r),this.pageModel=new ye.CPage(ye.EmptyPage)}this.emitter=ei()}updateCurrentSelectNode(n){this.currentSelectNode=n,this.emitter.emit("onSelectNodeChange",{node:n})}async componentDidMount(){var a,i,s,l,c,u;window.__C_ENGINE__=this;const n=this.props.plugins,r=new kT({engine:this,getWorkbench:()=>this.workbenchRef.current,emitter:this.emitter,pageModel:this.pageModel,i18n:av,assets:this.props.assetPackagesList||[]});this.pluginManager=r,r.customPlugin("Designer",d=>(d.ctx.config.beforeInitRender=Xg,d.ctx.config.customRender=Jg(this.props.components||{}),d.ctx.config.components=this.props.components,d)),(i=(a=this.props).beforePluginRun)==null||i.call(a,{pluginManager:this.pluginManager});const o=n.map(d=>this.pluginManager.add(d));(l=(s=this.props).onMount)==null||l.call(s,{pluginManager:this.pluginManager,engine:this}),await Promise.all(o),this.pageModel.emitter.on("onReloadPage",()=>{var f;if(!this.currentSelectNode)return;const d=this.pageModel.getNode((f=this.currentSelectNode)==null?void 0:f.id);d&&this.updateCurrentSelectNode(d)}),(u=(c=this.props).onReady)==null||u.call(c,{pluginManager:this.pluginManager,engine:this})}getActiveNode(){var r;if(!((r=this.currentSelectNode)!=null&&r.id))return null;const n=this.pageModel.getNode(this.currentSelectNode.id)??null;return this.currentSelectNode=n,n}render(){return w("div",{className:dt([D2.engineContainer,this.props.className]),style:this.props.style,children:w(M2,{ref:this.workbenchRef,emitter:this.emitter})})}}L(Vy,"version","0.0.26");exports.Engine=Vy;exports.InnerComponentMeta=W5;exports.LOGGER=$t;exports.beforeInitRender=Xg;exports.formatCSSProperty=ti;exports.formatCssToNodeVal=Ph;exports.formatNodeValToEditor=kh;exports.getDefaultRender=Jg;exports.plugins=V5;exports.registerCustomSetter=pD;exports.styleArr2Obj=rc;exports.waitReactUpdate=Tn;Object.keys(Xn).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>Xn[e]})});
247
+ `}}}}]},{title:"HTML 标签",componentName:"CNativeTag",props:[{name:"htmlTag",title:"标签名",valueType:"string",setters:[{componentName:"SelectSetter",props:{options:be.HTMl_TAGS.map(e=>({name:e,value:e}))}}]},pn],isContainer:!0,groupName:"原子组件",snippets:[{title:"HTML",snapshotText:"HTML",category:"基础组件",schema:{props:{htmlTag:"div"}}}]}],eB=[...Z5,...Q5];class Wy extends h.Component{constructor(n){super(n);B(this,"currentSelectNode");B(this,"pluginManager");B(this,"workbenchRef",h.createRef());B(this,"pageSchema");B(this,"pageModel");B(this,"material");B(this,"emitter");B(this,"updatePage",n=>{this.emitter.emit("updatePage"),console.log(n)});B(this,"updateDesignerAssets",n=>{console.log("updateDesignerAssets",n)});B(this,"updateMaterial",n=>{this.emitter.emit("updateMaterial"),console.log(n)});B(this,"refresh",()=>{this.emitter.emit("refresh"),console.log("refresh engine")});B(this,"getWorkbench",()=>this.workbenchRef.current);this.pageSchema=n.schema,this.material=n.material,this.currentSelectNode=null,window.__CHAMELEON_ENG__=this;try{this.pageModel=new be.CPage(this.pageSchema,{materials:this.material||[],assetPackagesList:n.assetPackagesList||[]})}catch(r){console.error(r),this.pageModel=new be.CPage(be.EmptyPage)}this.emitter=ei()}updateCurrentSelectNode(n){this.currentSelectNode=n,this.emitter.emit("onSelectNodeChange",{node:n})}async componentDidMount(){var a,i,s,l,c,u;window.__C_ENGINE__=this;const n=this.props.plugins,r=new DT({engine:this,getWorkbench:()=>this.workbenchRef.current,emitter:this.emitter,pageModel:this.pageModel,i18n:sv,assets:this.props.assetPackagesList||[]});this.pluginManager=r,r.customPlugin("Designer",d=>(d.ctx.config.beforeInitRender=Qg,d.ctx.config.customRender=Zg(this.props.components||{}),d.ctx.config.components=this.props.components,d)),(i=(a=this.props).beforePluginRun)==null||i.call(a,{pluginManager:this.pluginManager});const o=n.map(d=>this.pluginManager.add(d));(l=(s=this.props).onMount)==null||l.call(s,{pluginManager:this.pluginManager,engine:this}),await Promise.all(o),this.pageModel.emitter.on("onReloadPage",()=>{var f;if(!this.currentSelectNode)return;const d=this.pageModel.getNode((f=this.currentSelectNode)==null?void 0:f.id);d&&this.updateCurrentSelectNode(d)}),(u=(c=this.props).onReady)==null||u.call(c,{pluginManager:this.pluginManager,engine:this})}getActiveNode(){var r;if(!((r=this.currentSelectNode)!=null&&r.id))return null;const n=this.pageModel.getNode(this.currentSelectNode.id)??null;return this.currentSelectNode=n,n}render(){return w("div",{className:dt([BN.engineContainer,this.props.className]),style:this.props.style,children:w(IN,{ref:this.workbenchRef,emitter:this.emitter})})}}B(Wy,"version","0.0.28");exports.Engine=Wy;exports.InnerComponentMeta=eB;exports.LOGGER=$t;exports.beforeInitRender=Qg;exports.formatCSSProperty=ti;exports.formatCssToNodeVal=jh;exports.formatNodeValToEditor=Mh;exports.getDefaultRender=Zg;exports.plugins=J5;exports.registerCustomSetter=mD;exports.styleArr2Obj=oc;exports.waitReactUpdate=Tn;Object.keys(Xn).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>Xn[e]})});
248
248
  //# sourceMappingURL=index.js.map