@chamn/engine 0.0.9 → 0.0.10

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.
Files changed (110) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/Engine.module.scss.d.ts +5 -0
  3. package/dist/component/CSSEditor/index.d.ts +16 -0
  4. package/dist/component/CSSEditor/style.module.scss.d.ts +6 -0
  5. package/dist/component/CSSPropertiesEditor/cssProperties.d.ts +898 -0
  6. package/dist/component/CSSPropertiesEditor/index.d.ts +43 -0
  7. package/dist/component/CSSPropertiesEditor/style.module.scss.d.ts +15 -0
  8. package/dist/component/CSSPropertiesEditor/util.d.ts +1 -0
  9. package/dist/component/CSSPropertiesVariableBindEditor/cssProperties.d.ts +898 -0
  10. package/dist/component/CSSPropertiesVariableBindEditor/index.d.ts +37 -0
  11. package/dist/component/CSSPropertiesVariableBindEditor/style.module.scss.d.ts +15 -0
  12. package/dist/component/CSSPropertiesVariableBindEditor/util.d.ts +1 -0
  13. package/dist/component/ClassNameEditor/index.d.ts +16 -0
  14. package/dist/component/CustomSchemaForm/components/Form/Field/index.d.ts +11 -0
  15. package/dist/component/CustomSchemaForm/components/Form/Field/style.module.scss.d.ts +8 -0
  16. package/dist/component/CustomSchemaForm/components/Form/context.d.ts +10 -0
  17. package/dist/component/CustomSchemaForm/components/Form/index.d.ts +17 -0
  18. package/dist/component/CustomSchemaForm/components/SetterSwitcher/index.d.ts +12 -0
  19. package/dist/component/CustomSchemaForm/components/SetterSwitcher/style.module.scss.d.ts +7 -0
  20. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/ArrayItem.d.ts +11 -0
  21. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/SortItemOrderModal.d.ts +10 -0
  22. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/index.d.ts +14 -0
  23. package/dist/component/CustomSchemaForm/components/Setters/ArraySetter/style.module.scss.d.ts +7 -0
  24. package/dist/component/CustomSchemaForm/components/Setters/BooleanSetter/index.d.ts +5 -0
  25. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/index.d.ts +6 -0
  26. package/dist/component/CustomSchemaForm/components/Setters/CSSValueSetter/style.module.scss.d.ts +6 -0
  27. package/dist/component/CustomSchemaForm/components/Setters/ExpressionSetter/index.d.ts +8 -0
  28. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/defaultDts.d.ts +1 -0
  29. package/dist/component/CustomSchemaForm/components/Setters/FunctionSetter/index.d.ts +2 -0
  30. package/dist/component/CustomSchemaForm/components/Setters/JSONSetter/index.d.ts +2 -0
  31. package/dist/component/CustomSchemaForm/components/Setters/NumberSetter/index.d.ts +3 -0
  32. package/dist/component/CustomSchemaForm/components/Setters/SelectSetter/index.d.ts +3 -0
  33. package/dist/component/CustomSchemaForm/components/Setters/ShapeSetter/index.d.ts +8 -0
  34. package/dist/component/CustomSchemaForm/components/Setters/StringSetter/index.d.ts +3 -0
  35. package/dist/component/CustomSchemaForm/components/Setters/TextAreaSetter/index.d.ts +3 -0
  36. package/dist/component/CustomSchemaForm/components/Setters/index.d.ts +3 -0
  37. package/dist/component/CustomSchemaForm/components/Setters/type.d.ts +19 -0
  38. package/dist/component/CustomSchemaForm/context.d.ts +15 -0
  39. package/dist/component/CustomSchemaForm/index.d.ts +17 -0
  40. package/dist/component/CustomSchemaForm/style.module.scss.d.ts +11 -0
  41. package/dist/component/CustomSchemaForm/utils.d.ts +2 -0
  42. package/dist/component/MonacoEditor/index.d.ts +15 -0
  43. package/dist/component/Workbench/index.d.ts +57 -0
  44. package/dist/component/Workbench/style.module.scss.d.ts +25 -0
  45. package/dist/core/pluginManager.d.ts +56 -0
  46. package/dist/i18n/en_US/index.d.ts +5 -0
  47. package/dist/i18n/index.d.ts +6 -0
  48. package/dist/i18n/zh_CN/index.d.ts +5 -0
  49. package/dist/index.cjs.js +34 -34
  50. package/dist/index.cjs.js.map +1 -1
  51. package/dist/index.d.ts +43 -0
  52. package/dist/index.es.js +6407 -6132
  53. package/dist/index.es.js.map +1 -1
  54. package/dist/material/innerMaterial.d.ts +2 -0
  55. package/dist/plugins/AdvancePanel/index.d.ts +10 -0
  56. package/dist/plugins/AdvancePanel/style.module.scss.d.ts +7 -0
  57. package/dist/plugins/ComponentLibrary/components/DragItem/index.d.ts +12 -0
  58. package/dist/plugins/ComponentLibrary/components/DragItem/style.module.scss.d.ts +9 -0
  59. package/dist/plugins/ComponentLibrary/components/ListView/index.d.ts +9 -0
  60. package/dist/plugins/ComponentLibrary/components/ListView/style.module.scss.d.ts +12 -0
  61. package/dist/plugins/ComponentLibrary/index.d.ts +3 -0
  62. package/dist/plugins/ComponentLibrary/localize/en_US/index.d.ts +1 -0
  63. package/dist/plugins/ComponentLibrary/localize/index.d.ts +2 -0
  64. package/dist/plugins/ComponentLibrary/localize/zh_CN/index.d.ts +1 -0
  65. package/dist/plugins/ComponentLibrary/style.module.scss.d.ts +11 -0
  66. package/dist/plugins/ComponentLibrary/util.d.ts +1 -0
  67. package/dist/plugins/ComponentStatePanel/index.d.ts +10 -0
  68. package/dist/plugins/Designer/components/DefaultSelectToolBar/index.d.ts +10 -0
  69. package/dist/plugins/Designer/components/DefaultSelectToolBar/style.module.scss.d.ts +11 -0
  70. package/dist/plugins/Designer/components/GhostView/index.d.ts +5 -0
  71. package/dist/plugins/Designer/config.d.ts +1 -0
  72. package/dist/plugins/Designer/index.d.ts +15 -0
  73. package/dist/plugins/Designer/localize/en_US/index.d.ts +1 -0
  74. package/dist/plugins/Designer/localize/index.d.ts +2 -0
  75. package/dist/plugins/Designer/localize/zh_CN/index.d.ts +1 -0
  76. package/dist/plugins/Designer/style.module.scss.d.ts +5 -0
  77. package/dist/plugins/Designer/util.d.ts +2 -0
  78. package/dist/plugins/Designer/view.d.ts +30 -0
  79. package/dist/plugins/DisplaySourceSchema/index.d.ts +9 -0
  80. package/dist/plugins/GlobalStatePanel/index.d.ts +3 -0
  81. package/dist/plugins/GlobalStatePanel/localize/en_US/index.d.ts +1 -0
  82. package/dist/plugins/GlobalStatePanel/localize/index.d.ts +2 -0
  83. package/dist/plugins/GlobalStatePanel/localize/zh_CN/index.d.ts +1 -0
  84. package/dist/plugins/GlobalStatePanel/style.module.scss.d.ts +5 -0
  85. package/dist/plugins/History/index.d.ts +2 -0
  86. package/dist/plugins/OutlineTree/components/TreeView/context.d.ts +30 -0
  87. package/dist/plugins/OutlineTree/components/TreeView/dataStruct.d.ts +21 -0
  88. package/dist/plugins/OutlineTree/components/TreeView/index.d.ts +34 -0
  89. package/dist/plugins/OutlineTree/components/TreeView/style.module.scss.d.ts +16 -0
  90. package/dist/plugins/OutlineTree/components/TreeView/treeNode.d.ts +9 -0
  91. package/dist/plugins/OutlineTree/index.d.ts +3 -0
  92. package/dist/plugins/OutlineTree/localize/en_US/index.d.ts +1 -0
  93. package/dist/plugins/OutlineTree/localize/index.d.ts +2 -0
  94. package/dist/plugins/OutlineTree/localize/zh_CN/index.d.ts +1 -0
  95. package/dist/plugins/OutlineTree/util.d.ts +15 -0
  96. package/dist/plugins/PropertyPanel/index.d.ts +9 -0
  97. package/dist/plugins/PropertyPanel/style.module.scss.d.ts +10 -0
  98. package/dist/plugins/RightPanel/index.d.ts +2 -0
  99. package/dist/plugins/RightPanel/style.module.scss.d.ts +10 -0
  100. package/dist/plugins/RightPanel/view.d.ts +34 -0
  101. package/dist/plugins/VisualPanelPlus/index.d.ts +9 -0
  102. package/dist/plugins/VisualPanelPlus/style.module.scss.d.ts +10 -0
  103. package/dist/plugins/index.d.ts +9 -0
  104. package/dist/utils/css.d.ts +19 -0
  105. package/dist/utils/defaultEngineConfig.d.ts +5 -0
  106. package/dist/utils/index.d.ts +6 -0
  107. package/dist/utils/logger.d.ts +1 -0
  108. package/package.json +7 -7
  109. package/public/render.umd.js +12 -12
  110. package/public/render.umd.js.map +1 -1
@@ -1,4 +1,4 @@
1
- (function(x,ot){typeof exports=="object"&&typeof module<"u"?module.exports=ot(require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","react-dom"],ot):(x=typeof globalThis<"u"?globalThis:x||self,x.CRender=ot(x.React,x.ReactDOM))})(this,function(x,ot){"use strict";function Qa(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const Xa=Qa(ot);var xt={},Ka={get exports(){return xt},set exports(e){xt=e}},at={};/**
1
+ (function(x,ot){typeof exports=="object"&&typeof module<"u"?module.exports=ot(require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["react","react-dom"],ot):(x=typeof globalThis<"u"?globalThis:x||self,x.CRender=ot(x.React,x.ReactDOM))})(this,function(x,ot){"use strict";function ei(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const ti=ei(ot);var xt={},ri={get exports(){return xt},set exports(e){xt=e}},at={};/**
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 hn;function Za(){if(hn)return at;hn=1;var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=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,u,l){var f,d={},p=null,v=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)n.call(u,f)&&!a.hasOwnProperty(f)&&(d[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)d[f]===void 0&&(d[f]=u[f]);return{$$typeof:t,type:s,key:p,ref:v,props:d,_owner:o.current}}return at.Fragment=r,at.jsx=i,at.jsxs=i,at}var it={};/**
9
+ */var mn;function ni(){if(mn)return at;mn=1;var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=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,u,l){var f,d={},p=null,v=null;l!==void 0&&(p=""+l),u.key!==void 0&&(p=""+u.key),u.ref!==void 0&&(v=u.ref);for(f in u)n.call(u,f)&&!a.hasOwnProperty(f)&&(d[f]=u[f]);if(s&&s.defaultProps)for(f in u=s.defaultProps,u)d[f]===void 0&&(d[f]=u[f]);return{$$typeof:t,type:s,key:p,ref:v,props:d,_owner:o.current}}return at.Fragment=r,at.jsx=i,at.jsxs=i,at}var it={};/**
10
10
  * @license React
11
11
  * react-jsx-runtime.development.js
12
12
  *
@@ -14,29 +14,29 @@
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 vn;function ei(){return vn||(vn=1,{}.NODE_ENV!=="production"&&function(){var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=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"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b=Symbol.iterator,_="@@iterator";function E(c){if(c===null||typeof c!="object")return null;var h=b&&c[b]||c[_];return typeof h=="function"?h:null}var w=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function S(c){{for(var h=arguments.length,y=new Array(h>1?h-1:0),O=1;O<h;O++)y[O-1]=arguments[O];W("error",c,y)}}function W(c,h,y){{var O=w.ReactDebugCurrentFrame,A=O.getStackAddendum();A!==""&&(h+="%s",y=y.concat([A]));var $=y.map(function(T){return String(T)});$.unshift("Warning: "+h),Function.prototype.apply.call(console[c],console,$)}}var D=!1,U=!1,Z=!1,J=!1,N=!1,ae;ae=Symbol.for("react.module.reference");function le(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===a||N||c===o||c===l||c===f||J||c===v||D||U||Z||typeof c=="object"&&c!==null&&(c.$$typeof===p||c.$$typeof===d||c.$$typeof===i||c.$$typeof===s||c.$$typeof===u||c.$$typeof===ae||c.getModuleId!==void 0))}function Ct(c,h,y){var O=c.displayName;if(O)return O;var A=h.displayName||h.name||"";return A!==""?y+"("+A+")":y}function Ht(c){return c.displayName||"Context"}function ee(c){if(c==null)return null;if(typeof c.tag=="number"&&S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case s:var h=c;return Ht(h)+".Consumer";case i:var y=c;return Ht(y._context)+".Provider";case u:return Ct(c,c.render,"ForwardRef");case d:var O=c.displayName||null;return O!==null?O:ee(c.type)||"Memo";case p:{var A=c,$=A._payload,T=A._init;try{return ee(T($))}catch{return null}}}return null}var te=Object.assign,H=0,Yt,Ze,Jt,$e,et,re,_e;function tt(){}tt.__reactDisabledLog=!0;function on(){{if(H===0){Yt=console.log,Ze=console.info,Jt=console.warn,$e=console.error,et=console.group,re=console.groupCollapsed,_e=console.groupEnd;var c={configurable:!0,enumerable:!0,value:tt,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}H++}}function Ny(){{if(H--,H===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},c,{value:Yt}),info:te({},c,{value:Ze}),warn:te({},c,{value:Jt}),error:te({},c,{value:$e}),group:te({},c,{value:et}),groupCollapsed:te({},c,{value:re}),groupEnd:te({},c,{value:_e})})}H<0&&S("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var an=w.ReactCurrentDispatcher,sn;function qt(c,h,y){{if(sn===void 0)try{throw Error()}catch(A){var O=A.stack.trim().match(/\n( *(at )?)/);sn=O&&O[1]||""}return`
18
- `+sn+c}}var cn=!1,Qt;{var Ty=typeof WeakMap=="function"?WeakMap:Map;Qt=new Ty}function ka(c,h){if(!c||cn)return"";{var y=Qt.get(c);if(y!==void 0)return y}var O;cn=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $;$=an.current,an.current=null,on();try{if(h){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(je){O=je}Reflect.construct(c,[],T)}else{try{T.call()}catch(je){O=je}c.call(T.prototype)}}else{try{throw Error()}catch(je){O=je}c()}}catch(je){if(je&&O&&typeof je.stack=="string"){for(var R=je.stack.split(`
17
+ */var gn;function oi(){return gn||(gn=1,{}.NODE_ENV!=="production"&&function(){var e=x,t=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=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"),u=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),b=Symbol.iterator,_="@@iterator";function E(c){if(c===null||typeof c!="object")return null;var h=b&&c[b]||c[_];return typeof h=="function"?h:null}var S=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function w(c){{for(var h=arguments.length,y=new Array(h>1?h-1:0),O=1;O<h;O++)y[O-1]=arguments[O];W("error",c,y)}}function W(c,h,y){{var O=S.ReactDebugCurrentFrame,A=O.getStackAddendum();A!==""&&(h+="%s",y=y.concat([A]));var $=y.map(function(T){return String(T)});$.unshift("Warning: "+h),Function.prototype.apply.call(console[c],console,$)}}var D=!1,U=!1,Z=!1,J=!1,N=!1,ae;ae=Symbol.for("react.module.reference");function le(c){return!!(typeof c=="string"||typeof c=="function"||c===n||c===a||N||c===o||c===l||c===f||J||c===v||D||U||Z||typeof c=="object"&&c!==null&&(c.$$typeof===p||c.$$typeof===d||c.$$typeof===i||c.$$typeof===s||c.$$typeof===u||c.$$typeof===ae||c.getModuleId!==void 0))}function Ct(c,h,y){var O=c.displayName;if(O)return O;var A=h.displayName||h.name||"";return A!==""?y+"("+A+")":y}function Ht(c){return c.displayName||"Context"}function ee(c){if(c==null)return null;if(typeof c.tag=="number"&&w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof c=="function")return c.displayName||c.name||null;if(typeof c=="string")return c;switch(c){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof c=="object")switch(c.$$typeof){case s:var h=c;return Ht(h)+".Consumer";case i:var y=c;return Ht(y._context)+".Provider";case u:return Ct(c,c.render,"ForwardRef");case d:var O=c.displayName||null;return O!==null?O:ee(c.type)||"Memo";case p:{var A=c,$=A._payload,T=A._init;try{return ee(T($))}catch{return null}}}return null}var te=Object.assign,H=0,Yt,Ze,Jt,Pe,et,re,_e;function tt(){}tt.__reactDisabledLog=!0;function cn(){{if(H===0){Yt=console.log,Ze=console.info,Jt=console.warn,Pe=console.error,et=console.group,re=console.groupCollapsed,_e=console.groupEnd;var c={configurable:!0,enumerable:!0,value:tt,writable:!0};Object.defineProperties(console,{info:c,log:c,warn:c,error:c,group:c,groupCollapsed:c,groupEnd:c})}H++}}function My(){{if(H--,H===0){var c={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:te({},c,{value:Yt}),info:te({},c,{value:Ze}),warn:te({},c,{value:Jt}),error:te({},c,{value:Pe}),group:te({},c,{value:et}),groupCollapsed:te({},c,{value:re}),groupEnd:te({},c,{value:_e})})}H<0&&w("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var un=S.ReactCurrentDispatcher,ln;function qt(c,h,y){{if(ln===void 0)try{throw Error()}catch(A){var O=A.stack.trim().match(/\n( *(at )?)/);ln=O&&O[1]||""}return`
18
+ `+ln+c}}var fn=!1,Qt;{var $y=typeof WeakMap=="function"?WeakMap:Map;Qt=new $y}function Ba(c,h){if(!c||fn)return"";{var y=Qt.get(c);if(y!==void 0)return y}var O;fn=!0;var A=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var $;$=un.current,un.current=null,cn();try{if(h){var T=function(){throw Error()};if(Object.defineProperty(T.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(T,[])}catch(je){O=je}Reflect.construct(c,[],T)}else{try{T.call()}catch(je){O=je}c.call(T.prototype)}}else{try{throw Error()}catch(je){O=je}c()}}catch(je){if(je&&O&&typeof je.stack=="string"){for(var R=je.stack.split(`
19
19
  `),q=O.stack.split(`
20
20
  `),z=R.length-1,V=q.length-1;z>=1&&V>=0&&R[z]!==q[V];)V--;for(;z>=1&&V>=0;z--,V--)if(R[z]!==q[V]){if(z!==1||V!==1)do if(z--,V--,V<0||R[z]!==q[V]){var ie=`
21
- `+R[z].replace(" at new "," at ");return c.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",c.displayName)),typeof c=="function"&&Qt.set(c,ie),ie}while(z>=1&&V>=0);break}}}finally{cn=!1,an.current=$,Ny(),Error.prepareStackTrace=A}var nt=c?c.displayName||c.name:"",qa=nt?qt(nt):"";return typeof c=="function"&&Qt.set(c,qa),qa}function Ay(c,h,y){return ka(c,!1)}function My(c){var h=c.prototype;return!!(h&&h.isReactComponent)}function Xt(c,h,y){if(c==null)return"";if(typeof c=="function")return ka(c,My(c));if(typeof c=="string")return qt(c);switch(c){case l:return qt("Suspense");case f:return qt("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case u:return Ay(c.render);case d:return Xt(c.type,h,y);case p:{var O=c,A=O._payload,$=O._init;try{return Xt($(A),h,y)}catch{}}}return""}var Kt=Object.prototype.hasOwnProperty,Ia={},Fa=w.ReactDebugCurrentFrame;function Zt(c){if(c){var h=c._owner,y=Xt(c.type,c._source,h?h.type:null);Fa.setExtraStackFrame(y)}else Fa.setExtraStackFrame(null)}function $y(c,h,y,O,A){{var $=Function.call.bind(Kt);for(var T in c)if($(c,T)){var R=void 0;try{if(typeof c[T]!="function"){var q=Error((O||"React class")+": "+y+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw q.name="Invariant Violation",q}R=c[T](h,T,O,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(z){R=z}R&&!(R instanceof Error)&&(Zt(A),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).",O||"React class",y,T,typeof R),Zt(null)),R instanceof Error&&!(R.message in Ia)&&(Ia[R.message]=!0,Zt(A),S("Failed %s type: %s",y,R.message),Zt(null))}}}var Py=Array.isArray;function un(c){return Py(c)}function Dy(c){{var h=typeof Symbol=="function"&&Symbol.toStringTag,y=h&&c[Symbol.toStringTag]||c.constructor.name||"Object";return y}}function ky(c){try{return La(c),!1}catch{return!0}}function La(c){return""+c}function Ba(c){if(ky(c))return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Dy(c)),La(c)}var wt=w.ReactCurrentOwner,Iy={key:!0,ref:!0,__self:!0,__source:!0},Ua,za,ln;ln={};function Fy(c){if(Kt.call(c,"ref")){var h=Object.getOwnPropertyDescriptor(c,"ref").get;if(h&&h.isReactWarning)return!1}return c.ref!==void 0}function Ly(c){if(Kt.call(c,"key")){var h=Object.getOwnPropertyDescriptor(c,"key").get;if(h&&h.isReactWarning)return!1}return c.key!==void 0}function By(c,h){if(typeof c.ref=="string"&&wt.current&&h&&wt.current.stateNode!==h){var y=ee(wt.current.type);ln[y]||(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',ee(wt.current.type),c.ref),ln[y]=!0)}}function Uy(c,h){{var y=function(){Ua||(Ua=!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)",h))};y.isReactWarning=!0,Object.defineProperty(c,"key",{get:y,configurable:!0})}}function zy(c,h){{var y=function(){za||(za=!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)",h))};y.isReactWarning=!0,Object.defineProperty(c,"ref",{get:y,configurable:!0})}}var Vy=function(c,h,y,O,A,$,T){var R={$$typeof:t,type:c,key:h,ref:y,props:T,_owner:$};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function Gy(c,h,y,O,A){{var $,T={},R=null,q=null;y!==void 0&&(Ba(y),R=""+y),Ly(h)&&(Ba(h.key),R=""+h.key),Fy(h)&&(q=h.ref,By(h,A));for($ in h)Kt.call(h,$)&&!Iy.hasOwnProperty($)&&(T[$]=h[$]);if(c&&c.defaultProps){var z=c.defaultProps;for($ in z)T[$]===void 0&&(T[$]=z[$])}if(R||q){var V=typeof c=="function"?c.displayName||c.name||"Unknown":c;R&&Uy(T,V),q&&zy(T,V)}return Vy(c,R,q,A,O,wt.current,T)}}var fn=w.ReactCurrentOwner,Va=w.ReactDebugCurrentFrame;function rt(c){if(c){var h=c._owner,y=Xt(c.type,c._source,h?h.type:null);Va.setExtraStackFrame(y)}else Va.setExtraStackFrame(null)}var dn;dn=!1;function pn(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function Ga(){{if(fn.current){var c=ee(fn.current.type);if(c)return`
21
+ `+R[z].replace(" at new "," at ");return c.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",c.displayName)),typeof c=="function"&&Qt.set(c,ie),ie}while(z>=1&&V>=0);break}}}finally{fn=!1,un.current=$,My(),Error.prepareStackTrace=A}var nt=c?c.displayName||c.name:"",Za=nt?qt(nt):"";return typeof c=="function"&&Qt.set(c,Za),Za}function Py(c,h,y){return Ba(c,!1)}function Dy(c){var h=c.prototype;return!!(h&&h.isReactComponent)}function Xt(c,h,y){if(c==null)return"";if(typeof c=="function")return Ba(c,Dy(c));if(typeof c=="string")return qt(c);switch(c){case l:return qt("Suspense");case f:return qt("SuspenseList")}if(typeof c=="object")switch(c.$$typeof){case u:return Py(c.render);case d:return Xt(c.type,h,y);case p:{var O=c,A=O._payload,$=O._init;try{return Xt($(A),h,y)}catch{}}}return""}var Kt=Object.prototype.hasOwnProperty,Ua={},za=S.ReactDebugCurrentFrame;function Zt(c){if(c){var h=c._owner,y=Xt(c.type,c._source,h?h.type:null);za.setExtraStackFrame(y)}else za.setExtraStackFrame(null)}function ky(c,h,y,O,A){{var $=Function.call.bind(Kt);for(var T in c)if($(c,T)){var R=void 0;try{if(typeof c[T]!="function"){var q=Error((O||"React class")+": "+y+" type `"+T+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof c[T]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw q.name="Invariant Violation",q}R=c[T](h,T,O,y,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(z){R=z}R&&!(R instanceof Error)&&(Zt(A),w("%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).",O||"React class",y,T,typeof R),Zt(null)),R instanceof Error&&!(R.message in Ua)&&(Ua[R.message]=!0,Zt(A),w("Failed %s type: %s",y,R.message),Zt(null))}}}var Iy=Array.isArray;function dn(c){return Iy(c)}function Fy(c){{var h=typeof Symbol=="function"&&Symbol.toStringTag,y=h&&c[Symbol.toStringTag]||c.constructor.name||"Object";return y}}function Ly(c){try{return Va(c),!1}catch{return!0}}function Va(c){return""+c}function Ga(c){if(Ly(c))return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Fy(c)),Va(c)}var St=S.ReactCurrentOwner,By={key:!0,ref:!0,__self:!0,__source:!0},Wa,Ha,pn;pn={};function Uy(c){if(Kt.call(c,"ref")){var h=Object.getOwnPropertyDescriptor(c,"ref").get;if(h&&h.isReactWarning)return!1}return c.ref!==void 0}function zy(c){if(Kt.call(c,"key")){var h=Object.getOwnPropertyDescriptor(c,"key").get;if(h&&h.isReactWarning)return!1}return c.key!==void 0}function Vy(c,h){if(typeof c.ref=="string"&&St.current&&h&&St.current.stateNode!==h){var y=ee(St.current.type);pn[y]||(w('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',ee(St.current.type),c.ref),pn[y]=!0)}}function Gy(c,h){{var y=function(){Wa||(Wa=!0,w("%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)",h))};y.isReactWarning=!0,Object.defineProperty(c,"key",{get:y,configurable:!0})}}function Wy(c,h){{var y=function(){Ha||(Ha=!0,w("%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)",h))};y.isReactWarning=!0,Object.defineProperty(c,"ref",{get:y,configurable:!0})}}var Hy=function(c,h,y,O,A,$,T){var R={$$typeof:t,type:c,key:h,ref:y,props:T,_owner:$};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:O}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:A}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function Yy(c,h,y,O,A){{var $,T={},R=null,q=null;y!==void 0&&(Ga(y),R=""+y),zy(h)&&(Ga(h.key),R=""+h.key),Uy(h)&&(q=h.ref,Vy(h,A));for($ in h)Kt.call(h,$)&&!By.hasOwnProperty($)&&(T[$]=h[$]);if(c&&c.defaultProps){var z=c.defaultProps;for($ in z)T[$]===void 0&&(T[$]=z[$])}if(R||q){var V=typeof c=="function"?c.displayName||c.name||"Unknown":c;R&&Gy(T,V),q&&Wy(T,V)}return Hy(c,R,q,A,O,St.current,T)}}var hn=S.ReactCurrentOwner,Ya=S.ReactDebugCurrentFrame;function rt(c){if(c){var h=c._owner,y=Xt(c.type,c._source,h?h.type:null);Ya.setExtraStackFrame(y)}else Ya.setExtraStackFrame(null)}var vn;vn=!1;function yn(c){return typeof c=="object"&&c!==null&&c.$$typeof===t}function Ja(){{if(hn.current){var c=ee(hn.current.type);if(c)return`
22
22
 
23
- Check the render method of \``+c+"`."}return""}}function Wy(c){{if(c!==void 0){var h=c.fileName.replace(/^.*[\\\/]/,""),y=c.lineNumber;return`
23
+ Check the render method of \``+c+"`."}return""}}function Jy(c){{if(c!==void 0){var h=c.fileName.replace(/^.*[\\\/]/,""),y=c.lineNumber;return`
24
24
 
25
- Check your code at `+h+":"+y+"."}return""}}var Wa={};function Hy(c){{var h=Ga();if(!h){var y=typeof c=="string"?c:c.displayName||c.name;y&&(h=`
25
+ Check your code at `+h+":"+y+"."}return""}}var qa={};function qy(c){{var h=Ja();if(!h){var y=typeof c=="string"?c:c.displayName||c.name;y&&(h=`
26
26
 
27
- Check the top-level render call using <`+y+">.")}return h}}function Ha(c,h){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var y=Hy(h);if(Wa[y])return;Wa[y]=!0;var O="";c&&c._owner&&c._owner!==fn.current&&(O=" It was passed a child from "+ee(c._owner.type)+"."),rt(c),S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,O),rt(null)}}function Ya(c,h){{if(typeof c!="object")return;if(un(c))for(var y=0;y<c.length;y++){var O=c[y];pn(O)&&Ha(O,h)}else if(pn(c))c._store&&(c._store.validated=!0);else if(c){var A=E(c);if(typeof A=="function"&&A!==c.entries)for(var $=A.call(c),T;!(T=$.next()).done;)pn(T.value)&&Ha(T.value,h)}}}function Yy(c){{var h=c.type;if(h==null||typeof h=="string")return;var y;if(typeof h=="function")y=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===u||h.$$typeof===d))y=h.propTypes;else return;if(y){var O=ee(h);$y(y,c.props,"prop",O,c)}else if(h.PropTypes!==void 0&&!dn){dn=!0;var A=ee(h);S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Jy(c){{for(var h=Object.keys(c.props),y=0;y<h.length;y++){var O=h[y];if(O!=="children"&&O!=="key"){rt(c),S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",O),rt(null);break}}c.ref!==null&&(rt(c),S("Invalid attribute `ref` supplied to `React.Fragment`."),rt(null))}}function Ja(c,h,y,O,A,$){{var T=le(c);if(!T){var R="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(R+=" 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 q=Wy(A);q?R+=q:R+=Ga();var z;c===null?z="null":un(c)?z="array":c!==void 0&&c.$$typeof===t?(z="<"+(ee(c.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):z=typeof c,S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",z,R)}var V=Gy(c,h,y,A,$);if(V==null)return V;if(T){var ie=h.children;if(ie!==void 0)if(O)if(un(ie)){for(var nt=0;nt<ie.length;nt++)Ya(ie[nt],c);Object.freeze&&Object.freeze(ie)}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 Ya(ie,c)}return c===n?Jy(V):Yy(V),V}}function qy(c,h,y){return Ja(c,h,y,!0)}function Qy(c,h,y){return Ja(c,h,y,!1)}var Xy=Qy,Ky=qy;it.Fragment=n,it.jsx=Xy,it.jsxs=Ky}()),it}(function(e){({}).NODE_ENV==="production"?e.exports=Za():e.exports=ei()})(Ka);const Pe=xt.jsx,yn=xt.jsxs;var ti=Object.defineProperty,ri=(e,t,r)=>t in e?ti(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t,r)=>(ri(e,typeof t!="symbol"?t+"":t,r),r);const ni=e=>()=>{console.warn(`${e} need to be implement getComponent`)},oi=["customPageRootRender"],mn=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],gn=e=>[...mn,...oi].reduce((t,r)=>{var n;return e!=null&&e[r]?t[r]=(n=e[r])==null?void 0:n.bind(e):mn.includes(r)&&(t[r]=ni),t},{});var ai=Object.defineProperty,ii=(e,t,r)=>t in e?ai(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t,r)=>(ii(e,typeof t!="symbol"?t+"":t,r),r),si=typeof global=="object"&&global&&global.Object===Object&&global;const bn=si;var ci=typeof self=="object"&&self&&self.Object===Object&&self,ui=bn||ci||Function("return this")();const fe=ui;var li=fe.Symbol;const ne=li;var _n=Object.prototype,fi=_n.hasOwnProperty,di=_n.toString,st=ne?ne.toStringTag:void 0;function pi(e){var t=fi.call(e,st),r=e[st];try{e[st]=void 0;var n=!0}catch{}var o=di.call(e);return n&&(t?e[st]=r:delete e[st]),o}var hi=Object.prototype,vi=hi.toString;function yi(e){return vi.call(e)}var mi="[object Null]",gi="[object Undefined]",jn=ne?ne.toStringTag:void 0;function Se(e){return e==null?e===void 0?gi:mi:jn&&jn in Object(e)?pi(e):yi(e)}function de(e){return e!=null&&typeof e=="object"}var bi="[object Symbol]";function er(e){return typeof e=="symbol"||de(e)&&Se(e)==bi}function tr(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var _i=Array.isArray;const L=_i;var ji=1/0,En=ne?ne.prototype:void 0,On=En?En.toString:void 0;function Sn(e){if(typeof e=="string")return e;if(L(e))return tr(e,Sn)+"";if(er(e))return On?On.call(e):"";var t=e+"";return t=="0"&&1/e==-ji?"-0":t}function se(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function rr(e){return e}var Ei="[object AsyncFunction]",Oi="[object Function]",Si="[object GeneratorFunction]",Ci="[object Proxy]";function nr(e){if(!se(e))return!1;var t=Se(e);return t==Oi||t==Si||t==Ei||t==Ci}var wi=fe["__core-js_shared__"];const or=wi;var Cn=function(){var e=/[^.]+$/.exec(or&&or.keys&&or.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function xi(e){return!!Cn&&Cn in e}var Ri=Function.prototype,Ni=Ri.toString;function Ce(e){if(e!=null){try{return Ni.call(e)}catch{}try{return e+""}catch{}}return""}var Ti=/[\\^$.*+?()[\]{}|]/g,Ai=/^\[object .+?Constructor\]$/,Mi=Function.prototype,$i=Object.prototype,Pi=Mi.toString,Di=$i.hasOwnProperty,ki=RegExp("^"+Pi.call(Di).replace(Ti,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ii(e){if(!se(e)||xi(e))return!1;var t=nr(e)?ki:Ai;return t.test(Ce(e))}function Fi(e,t){return e==null?void 0:e[t]}function we(e,t){var r=Fi(e,t);return Ii(r)?r:void 0}var Li=we(fe,"WeakMap");const ar=Li;var wn=Object.create,Bi=function(){function e(){}return function(t){if(!se(t))return{};if(wn)return wn(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const Ui=Bi;function zi(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Vi(){}function xn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Gi=800,Wi=16,Hi=Date.now;function Yi(e){var t=0,r=0;return function(){var n=Hi(),o=Wi-(n-r);if(r=n,o>0){if(++t>=Gi)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ji(e){return function(){return e}}var qi=function(){try{var e=we(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Rt=qi;var Qi=Rt?function(e,t){return Rt(e,"toString",{configurable:!0,enumerable:!1,value:Ji(t),writable:!0})}:rr,Xi=Yi(Qi);const Rn=Xi;function Ki(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function Zi(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function es(e){return e!==e}function ts(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function rs(e,t,r){return t===t?ts(e,t,r):Zi(e,es,r)}function ns(e,t){var r=e==null?0:e.length;return!!r&&rs(e,t,0)>-1}var os=9007199254740991,as=/^(?:0|[1-9]\d*)$/;function Nt(e,t){var r=typeof e;return t=t??os,!!t&&(r=="number"||r!="symbol"&&as.test(e))&&e>-1&&e%1==0&&e<t}function ir(e,t,r){t=="__proto__"&&Rt?Rt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ct(e,t){return e===t||e!==e&&t!==t}var is=Object.prototype,ss=is.hasOwnProperty;function sr(e,t,r){var n=e[t];(!(ss.call(e,t)&&ct(n,r))||r===void 0&&!(t in e))&&ir(e,t,r)}function De(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),o?ir(r,s,u):sr(r,s,u)}return r}var Nn=Math.max;function Tn(e,t,r){return t=Nn(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=Nn(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),zi(e,this,s)}}function An(e,t){return Rn(Tn(e,t,rr),e+"")}var cs=9007199254740991;function cr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cs}function Tt(e){return e!=null&&cr(e.length)&&!nr(e)}function us(e,t,r){if(!se(r))return!1;var n=typeof t;return(n=="number"?Tt(r)&&Nt(t,r.length):n=="string"&&t in r)?ct(r[t],e):!1}function ls(e){return An(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&us(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t})}var fs=Object.prototype;function ur(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||fs;return e===r}function ds(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ps="[object Arguments]";function Mn(e){return de(e)&&Se(e)==ps}var $n=Object.prototype,hs=$n.hasOwnProperty,vs=$n.propertyIsEnumerable,ys=Mn(function(){return arguments}())?Mn:function(e){return de(e)&&hs.call(e,"callee")&&!vs.call(e,"callee")};const ut=ys;function ms(){return!1}var Pn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Dn=Pn&&typeof module=="object"&&module&&!module.nodeType&&module,gs=Dn&&Dn.exports===Pn,kn=gs?fe.Buffer:void 0,bs=kn?kn.isBuffer:void 0,_s=bs||ms;const lt=_s;var js="[object Arguments]",Es="[object Array]",Os="[object Boolean]",Ss="[object Date]",Cs="[object Error]",ws="[object Function]",xs="[object Map]",Rs="[object Number]",Ns="[object Object]",Ts="[object RegExp]",As="[object Set]",Ms="[object String]",$s="[object WeakMap]",Ps="[object ArrayBuffer]",Ds="[object DataView]",ks="[object Float32Array]",Is="[object Float64Array]",Fs="[object Int8Array]",Ls="[object Int16Array]",Bs="[object Int32Array]",Us="[object Uint8Array]",zs="[object Uint8ClampedArray]",Vs="[object Uint16Array]",Gs="[object Uint32Array]",k={};k[ks]=k[Is]=k[Fs]=k[Ls]=k[Bs]=k[Us]=k[zs]=k[Vs]=k[Gs]=!0,k[js]=k[Es]=k[Ps]=k[Os]=k[Ds]=k[Ss]=k[Cs]=k[ws]=k[xs]=k[Rs]=k[Ns]=k[Ts]=k[As]=k[Ms]=k[$s]=!1;function Ws(e){return de(e)&&cr(e.length)&&!!k[Se(e)]}function lr(e){return function(t){return e(t)}}var In=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ft=In&&typeof module=="object"&&module&&!module.nodeType&&module,Hs=ft&&ft.exports===In,fr=Hs&&bn.process,Ys=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||fr&&fr.binding&&fr.binding("util")}catch{}}();const ke=Ys;var Fn=ke&&ke.isTypedArray,Js=Fn?lr(Fn):Ws;const dr=Js;var qs=Object.prototype,Qs=qs.hasOwnProperty;function Ln(e,t){var r=L(e),n=!r&&ut(e),o=!r&&!n&&lt(e),a=!r&&!n&&!o&&dr(e),i=r||n||o||a,s=i?ds(e.length,String):[],u=s.length;for(var l in e)(t||Qs.call(e,l))&&!(i&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Nt(l,u)))&&s.push(l);return s}function Bn(e,t){return function(r){return e(t(r))}}var Xs=Bn(Object.keys,Object);const Ks=Xs;var Zs=Object.prototype,ec=Zs.hasOwnProperty;function tc(e){if(!ur(e))return Ks(e);var t=[];for(var r in Object(e))ec.call(e,r)&&r!="constructor"&&t.push(r);return t}function At(e){return Tt(e)?Ln(e):tc(e)}function rc(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var nc=Object.prototype,oc=nc.hasOwnProperty;function ac(e){if(!se(e))return rc(e);var t=ur(e),r=[];for(var n in e)n=="constructor"&&(t||!oc.call(e,n))||r.push(n);return r}function dt(e){return Tt(e)?Ln(e,!0):ac(e)}var ic=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sc=/^\w*$/;function pr(e,t){if(L(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||er(e)?!0:sc.test(e)||!ic.test(e)||t!=null&&e in Object(t)}var cc=we(Object,"create");const pt=cc;function uc(){this.__data__=pt?pt(null):{},this.size=0}function lc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var fc="__lodash_hash_undefined__",dc=Object.prototype,pc=dc.hasOwnProperty;function hc(e){var t=this.__data__;if(pt){var r=t[e];return r===fc?void 0:r}return pc.call(t,e)?t[e]:void 0}var vc=Object.prototype,yc=vc.hasOwnProperty;function mc(e){var t=this.__data__;return pt?t[e]!==void 0:yc.call(t,e)}var gc="__lodash_hash_undefined__";function bc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pt&&t===void 0?gc:t,this}function xe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xe.prototype.clear=uc,xe.prototype.delete=lc,xe.prototype.get=hc,xe.prototype.has=mc,xe.prototype.set=bc;function _c(){this.__data__=[],this.size=0}function Mt(e,t){for(var r=e.length;r--;)if(ct(e[r][0],t))return r;return-1}var jc=Array.prototype,Ec=jc.splice;function Oc(e){var t=this.__data__,r=Mt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Ec.call(t,r,1),--this.size,!0}function Sc(e){var t=this.__data__,r=Mt(t,e);return r<0?void 0:t[r][1]}function Cc(e){return Mt(this.__data__,e)>-1}function wc(e,t){var r=this.__data__,n=Mt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ve(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ve.prototype.clear=_c,ve.prototype.delete=Oc,ve.prototype.get=Sc,ve.prototype.has=Cc,ve.prototype.set=wc;var xc=we(fe,"Map");const ht=xc;function Rc(){this.size=0,this.__data__={hash:new xe,map:new(ht||ve),string:new xe}}function Nc(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $t(e,t){var r=e.__data__;return Nc(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Tc(e){var t=$t(this,e).delete(e);return this.size-=t?1:0,t}function Ac(e){return $t(this,e).get(e)}function Mc(e){return $t(this,e).has(e)}function $c(e,t){var r=$t(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ye(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ye.prototype.clear=Rc,ye.prototype.delete=Tc,ye.prototype.get=Ac,ye.prototype.has=Mc,ye.prototype.set=$c;var Pc="Expected a function";function hr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Pc);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(hr.Cache||ye),r}hr.Cache=ye;var Dc=500;function kc(e){var t=hr(e,function(n){return r.size===Dc&&r.clear(),n}),r=t.cache;return t}var Ic=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fc=/\\(\\)?/g,Lc=kc(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Ic,function(r,n,o,a){t.push(o?a.replace(Fc,"$1"):n||r)}),t});const Bc=Lc;function Uc(e){return e==null?"":Sn(e)}function Ie(e,t){return L(e)?e:pr(e,t)?[e]:Bc(Uc(e))}var zc=1/0;function Fe(e){if(typeof e=="string"||er(e))return e;var t=e+"";return t=="0"&&1/e==-zc?"-0":t}function Pt(e,t){t=Ie(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Fe(t[r++])];return r&&r==n?e:void 0}function Un(e,t,r){var n=e==null?void 0:Pt(e,t);return n===void 0?r:n}function vr(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var zn=ne?ne.isConcatSpreadable:void 0;function Vc(e){return L(e)||ut(e)||!!(zn&&e&&e[zn])}function yr(e,t,r,n,o){var a=-1,i=e.length;for(r||(r=Vc),o||(o=[]);++a<i;){var s=e[a];t>0&&r(s)?t>1?yr(s,t-1,r,n,o):vr(o,s):n||(o[o.length]=s)}return o}function Gc(e){var t=e==null?0:e.length;return t?yr(e,1):[]}function Wc(e){return Rn(Tn(e,void 0,Gc),e+"")}var Hc=Bn(Object.getPrototypeOf,Object);const mr=Hc;var Yc="[object Object]",Jc=Function.prototype,qc=Object.prototype,Vn=Jc.toString,Qc=qc.hasOwnProperty,Xc=Vn.call(Object);function Q(e){if(!de(e)||Se(e)!=Yc)return!1;var t=mr(e);if(t===null)return!0;var r=Qc.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Vn.call(r)==Xc}function Kc(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}function Zc(){this.__data__=new ve,this.size=0}function eu(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function tu(e){return this.__data__.get(e)}function ru(e){return this.__data__.has(e)}var nu=200;function ou(e,t){var r=this.__data__;if(r instanceof ve){var n=r.__data__;if(!ht||n.length<nu-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ye(n)}return r.set(e,t),this.size=r.size,this}function ce(e){var t=this.__data__=new ve(e);this.size=t.size}ce.prototype.clear=Zc,ce.prototype.delete=eu,ce.prototype.get=tu,ce.prototype.has=ru,ce.prototype.set=ou;function au(e,t){return e&&De(t,At(t),e)}function iu(e,t){return e&&De(t,dt(t),e)}var Gn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wn=Gn&&typeof module=="object"&&module&&!module.nodeType&&module,su=Wn&&Wn.exports===Gn,Hn=su?fe.Buffer:void 0,Yn=Hn?Hn.allocUnsafe:void 0;function Jn(e,t){if(t)return e.slice();var r=e.length,n=Yn?Yn(r):new e.constructor(r);return e.copy(n),n}function cu(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}function qn(){return[]}var uu=Object.prototype,lu=uu.propertyIsEnumerable,Qn=Object.getOwnPropertySymbols,fu=Qn?function(e){return e==null?[]:(e=Object(e),cu(Qn(e),function(t){return lu.call(e,t)}))}:qn;const gr=fu;function du(e,t){return De(e,gr(e),t)}var pu=Object.getOwnPropertySymbols,hu=pu?function(e){for(var t=[];e;)vr(t,gr(e)),e=mr(e);return t}:qn;const Xn=hu;function vu(e,t){return De(e,Xn(e),t)}function Kn(e,t,r){var n=t(e);return L(e)?n:vr(n,r(e))}function br(e){return Kn(e,At,gr)}function _r(e){return Kn(e,dt,Xn)}var yu=we(fe,"DataView");const jr=yu;var mu=we(fe,"Promise");const Er=mu;var gu=we(fe,"Set");const Le=gu;var Zn="[object Map]",bu="[object Object]",eo="[object Promise]",to="[object Set]",ro="[object WeakMap]",no="[object DataView]",_u=Ce(jr),ju=Ce(ht),Eu=Ce(Er),Ou=Ce(Le),Su=Ce(ar),Re=Se;(jr&&Re(new jr(new ArrayBuffer(1)))!=no||ht&&Re(new ht)!=Zn||Er&&Re(Er.resolve())!=eo||Le&&Re(new Le)!=to||ar&&Re(new ar)!=ro)&&(Re=function(e){var t=Se(e),r=t==bu?e.constructor:void 0,n=r?Ce(r):"";if(n)switch(n){case _u:return no;case ju:return Zn;case Eu:return eo;case Ou:return to;case Su:return ro}return t});const vt=Re;var Cu=Object.prototype,wu=Cu.hasOwnProperty;function xu(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&wu.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Ru=fe.Uint8Array;const Dt=Ru;function Or(e){var t=new e.constructor(e.byteLength);return new Dt(t).set(new Dt(e)),t}function Nu(e,t){var r=t?Or(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Tu=/\w*$/;function Au(e){var t=new e.constructor(e.source,Tu.exec(e));return t.lastIndex=e.lastIndex,t}var oo=ne?ne.prototype:void 0,ao=oo?oo.valueOf:void 0;function Mu(e){return ao?Object(ao.call(e)):{}}function io(e,t){var r=t?Or(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var $u="[object Boolean]",Pu="[object Date]",Du="[object Map]",ku="[object Number]",Iu="[object RegExp]",Fu="[object Set]",Lu="[object String]",Bu="[object Symbol]",Uu="[object ArrayBuffer]",zu="[object DataView]",Vu="[object Float32Array]",Gu="[object Float64Array]",Wu="[object Int8Array]",Hu="[object Int16Array]",Yu="[object Int32Array]",Ju="[object Uint8Array]",qu="[object Uint8ClampedArray]",Qu="[object Uint16Array]",Xu="[object Uint32Array]";function Ku(e,t,r){var n=e.constructor;switch(t){case Uu:return Or(e);case $u:case Pu:return new n(+e);case zu:return Nu(e,r);case Vu:case Gu:case Wu:case Hu:case Yu:case Ju:case qu:case Qu:case Xu:return io(e,r);case Du:return new n;case ku:case Lu:return new n(e);case Iu:return Au(e);case Fu:return new n;case Bu:return Mu(e)}}function so(e){return typeof e.constructor=="function"&&!ur(e)?Ui(mr(e)):{}}var Zu="[object Map]";function el(e){return de(e)&&vt(e)==Zu}var co=ke&&ke.isMap,tl=co?lr(co):el;const rl=tl;var nl="[object Set]";function ol(e){return de(e)&&vt(e)==nl}var uo=ke&&ke.isSet,al=uo?lr(uo):ol;const il=al;var sl=1,cl=2,ul=4,lo="[object Arguments]",ll="[object Array]",fl="[object Boolean]",dl="[object Date]",pl="[object Error]",fo="[object Function]",hl="[object GeneratorFunction]",vl="[object Map]",yl="[object Number]",po="[object Object]",ml="[object RegExp]",gl="[object Set]",bl="[object String]",_l="[object Symbol]",jl="[object WeakMap]",El="[object ArrayBuffer]",Ol="[object DataView]",Sl="[object Float32Array]",Cl="[object Float64Array]",wl="[object Int8Array]",xl="[object Int16Array]",Rl="[object Int32Array]",Nl="[object Uint8Array]",Tl="[object Uint8ClampedArray]",Al="[object Uint16Array]",Ml="[object Uint32Array]",P={};P[lo]=P[ll]=P[El]=P[Ol]=P[fl]=P[dl]=P[Sl]=P[Cl]=P[wl]=P[xl]=P[Rl]=P[vl]=P[yl]=P[po]=P[ml]=P[gl]=P[bl]=P[_l]=P[Nl]=P[Tl]=P[Al]=P[Ml]=!0,P[pl]=P[fo]=P[jl]=!1;function yt(e,t,r,n,o,a){var i,s=t&sl,u=t&cl,l=t&ul;if(r&&(i=o?r(e,n,o,a):r(e)),i!==void 0)return i;if(!se(e))return e;var f=L(e);if(f){if(i=xu(e),!s)return xn(e,i)}else{var d=vt(e),p=d==fo||d==hl;if(lt(e))return Jn(e,s);if(d==po||d==lo||p&&!o){if(i=u||p?{}:so(e),!s)return u?vu(e,iu(i,e)):du(e,au(i,e))}else{if(!P[d])return o?e:{};i=Ku(e,d,s)}}a||(a=new ce);var v=a.get(e);if(v)return v;a.set(e,i),il(e)?e.forEach(function(E){i.add(yt(E,t,r,E,e,a))}):rl(e)&&e.forEach(function(E,w){i.set(w,yt(E,t,r,w,e,a))});var b=l?u?_r:br:u?dt:At,_=f?void 0:b(e);return Ki(_||e,function(E,w){_&&(w=E,E=e[w]),sr(i,w,yt(E,t,r,w,e,a))}),i}var $l=1,Pl=4;function ho(e){return yt(e,$l|Pl)}var Dl="__lodash_hash_undefined__";function kl(e){return this.__data__.set(e,Dl),this}function Il(e){return this.__data__.has(e)}function mt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ye;++t<r;)this.add(e[t])}mt.prototype.add=mt.prototype.push=kl,mt.prototype.has=Il;function Fl(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function vo(e,t){return e.has(t)}var Ll=1,Bl=2;function yo(e,t,r,n,o,a){var i=r&Ll,s=e.length,u=t.length;if(s!=u&&!(i&&u>s))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,v=r&Bl?new mt:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var b=e[d],_=t[d];if(n)var E=i?n(_,b,d,t,e,a):n(b,_,d,e,t,a);if(E!==void 0){if(E)continue;p=!1;break}if(v){if(!Fl(t,function(w,S){if(!vo(v,S)&&(b===w||o(b,w,r,n,a)))return v.push(S)})){p=!1;break}}else if(!(b===_||o(b,_,r,n,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function Ul(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function Sr(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var zl=1,Vl=2,Gl="[object Boolean]",Wl="[object Date]",Hl="[object Error]",Yl="[object Map]",Jl="[object Number]",ql="[object RegExp]",Ql="[object Set]",Xl="[object String]",Kl="[object Symbol]",Zl="[object ArrayBuffer]",ef="[object DataView]",mo=ne?ne.prototype:void 0,Cr=mo?mo.valueOf:void 0;function tf(e,t,r,n,o,a,i){switch(r){case ef:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Zl:return!(e.byteLength!=t.byteLength||!a(new Dt(e),new Dt(t)));case Gl:case Wl:case Jl:return ct(+e,+t);case Hl:return e.name==t.name&&e.message==t.message;case ql:case Xl:return e==t+"";case Yl:var s=Ul;case Ql:var u=n&zl;if(s||(s=Sr),e.size!=t.size&&!u)return!1;var l=i.get(e);if(l)return l==t;n|=Vl,i.set(e,t);var f=yo(s(e),s(t),n,o,a,i);return i.delete(e),f;case Kl:if(Cr)return Cr.call(e)==Cr.call(t)}return!1}var rf=1,nf=Object.prototype,of=nf.hasOwnProperty;function af(e,t,r,n,o,a){var i=r&rf,s=br(e),u=s.length,l=br(t),f=l.length;if(u!=f&&!i)return!1;for(var d=u;d--;){var p=s[d];if(!(i?p in t:of.call(t,p)))return!1}var v=a.get(e),b=a.get(t);if(v&&b)return v==t&&b==e;var _=!0;a.set(e,t),a.set(t,e);for(var E=i;++d<u;){p=s[d];var w=e[p],S=t[p];if(n)var W=i?n(S,w,p,t,e,a):n(w,S,p,e,t,a);if(!(W===void 0?w===S||o(w,S,r,n,a):W)){_=!1;break}E||(E=p=="constructor")}if(_&&!E){var D=e.constructor,U=t.constructor;D!=U&&"constructor"in e&&"constructor"in t&&!(typeof D=="function"&&D instanceof D&&typeof U=="function"&&U instanceof U)&&(_=!1)}return a.delete(e),a.delete(t),_}var sf=1,go="[object Arguments]",bo="[object Array]",kt="[object Object]",cf=Object.prototype,_o=cf.hasOwnProperty;function uf(e,t,r,n,o,a){var i=L(e),s=L(t),u=i?bo:vt(e),l=s?bo:vt(t);u=u==go?kt:u,l=l==go?kt:l;var f=u==kt,d=l==kt,p=u==l;if(p&&lt(e)){if(!lt(t))return!1;i=!0,f=!1}if(p&&!f)return a||(a=new ce),i||dr(e)?yo(e,t,r,n,o,a):tf(e,t,u,r,n,o,a);if(!(r&sf)){var v=f&&_o.call(e,"__wrapped__"),b=d&&_o.call(t,"__wrapped__");if(v||b){var _=v?e.value():e,E=b?t.value():t;return a||(a=new ce),o(_,E,r,n,a)}}return p?(a||(a=new ce),af(e,t,r,n,o,a)):!1}function wr(e,t,r,n,o){return e===t?!0:e==null||t==null||!de(e)&&!de(t)?e!==e&&t!==t:uf(e,t,r,n,wr,o)}var lf=1,ff=2;function df(e,t,r,n){var o=r.length,a=o,i=!n;if(e==null)return!a;for(e=Object(e);o--;){var s=r[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=r[o];var u=s[0],l=e[u],f=s[1];if(i&&s[2]){if(l===void 0&&!(u in e))return!1}else{var d=new ce;if(n)var p=n(l,f,u,e,t,d);if(!(p===void 0?wr(f,l,lf|ff,n,d):p))return!1}}return!0}function jo(e){return e===e&&!se(e)}function pf(e){for(var t=At(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,jo(o)]}return t}function Eo(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function hf(e){var t=pf(e);return t.length==1&&t[0][2]?Eo(t[0][0],t[0][1]):function(r){return r===e||df(r,e,t)}}function vf(e,t){return e!=null&&t in Object(e)}function yf(e,t,r){t=Ie(t,e);for(var n=-1,o=t.length,a=!1;++n<o;){var i=Fe(t[n]);if(!(a=e!=null&&r(e,i)))break;e=e[i]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&cr(o)&&Nt(i,o)&&(L(e)||ut(e)))}function mf(e,t){return e!=null&&yf(e,t,vf)}var gf=1,bf=2;function _f(e,t){return pr(e)&&jo(t)?Eo(Fe(e),t):function(r){var n=Un(r,e);return n===void 0&&n===t?mf(r,e):wr(t,n,gf|bf)}}function jf(e){return function(t){return t==null?void 0:t[e]}}function Ef(e){return function(t){return Pt(t,e)}}function Of(e){return pr(e)?jf(Fe(e)):Ef(e)}function xr(e){return typeof e=="function"?e:e==null?rr:typeof e=="object"?L(e)?_f(e[0],e[1]):hf(e):Of(e)}function Sf(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),s=i.length;s--;){var u=i[e?s:++o];if(r(a[u],u,a)===!1)break}return t}}var Cf=Sf();const wf=Cf;function Rr(e,t,r){(r!==void 0&&!ct(e[t],r)||r===void 0&&!(t in e))&&ir(e,t,r)}function Nr(e){return de(e)&&Tt(e)}function Tr(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function xf(e){return De(e,dt(e))}function Rf(e,t,r,n,o,a,i){var s=Tr(e,r),u=Tr(t,r),l=i.get(u);if(l){Rr(e,r,l);return}var f=a?a(s,u,r+"",e,t,i):void 0,d=f===void 0;if(d){var p=L(u),v=!p&&lt(u),b=!p&&!v&&dr(u);f=u,p||v||b?L(s)?f=s:Nr(s)?f=xn(s):v?(d=!1,f=Jn(u,!0)):b?(d=!1,f=io(u,!0)):f=[]:Q(u)||ut(u)?(f=s,ut(s)?f=xf(s):(!se(s)||nr(s))&&(f=so(u))):d=!1}d&&(i.set(u,f),o(f,u,n,a,i),i.delete(u)),Rr(e,r,f)}function Oo(e,t,r,n,o){e!==t&&wf(t,function(a,i){if(o||(o=new ce),se(a))Rf(e,t,i,r,Oo,n,o);else{var s=n?n(Tr(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),Rr(e,i,s)}},dt)}function Nf(e,t,r){for(var n=-1,o=e==null?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function So(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Tf(e,t){return t.length<2?e:Pt(e,Kc(t,0,-1))}var Af=ls(function(e,t,r){Oo(e,t,r)});const Co=Af;var Mf="Expected a function";function $f(e){if(typeof e!="function")throw new TypeError(Mf);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 Pf(e,t){return t=Ie(t,e),e=Tf(e,t),e==null||delete e[Fe(So(t))]}function Df(e){return Q(e)?void 0:e}var kf=1,If=2,Ff=4,Lf=Wc(function(e,t){var r={};if(e==null)return r;var n=!1;t=tr(t,function(a){return a=Ie(a,e),n||(n=a.length>1),a}),De(e,_r(e),r),n&&(r=yt(r,kf|If|Ff,Df));for(var o=t.length;o--;)Pf(r,t[o]);return r});const wo=Lf;function Bf(e,t,r,n){if(!se(e))return e;t=Ie(t,e);for(var o=-1,a=t.length,i=a-1,s=e;s!=null&&++o<a;){var u=Fe(t[o]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(o!=i){var f=s[u];l=n?n(f,u,s):void 0,l===void 0&&(l=se(f)?f:Nt(t[o+1])?[]:{})}sr(s,u,l),s=s[u]}return e}function Uf(e,t,r){for(var n=-1,o=t.length,a={};++n<o;){var i=t[n],s=Pt(e,i);r(s,i)&&Bf(a,Ie(i,e),s)}return a}function zf(e,t){if(e==null)return{};var r=tr(_r(e),function(n){return[n]});return t=xr(t),Uf(e,r,function(n,o){return t(n,o[0])})}function Vf(e,t){return zf(e,$f(xr(t)))}var Gf=1/0,Wf=Le&&1/Sr(new Le([,-0]))[1]==Gf?function(e){return new Le(e)}:Vi;const Hf=Wf;var Yf=200;function Jf(e,t,r){var n=-1,o=ns,a=e.length,i=!0,s=[],u=s;if(r)i=!1,o=Nf;else if(a>=Yf){var l=t?null:Hf(e);if(l)return Sr(l);i=!1,o=vo,u=new mt}else u=t?[]:s;e:for(;++n<a;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,i&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;t&&u.push(d),s.push(f)}else o(u,d,r)||(u!==s&&u.push(d),s.push(f))}return s}var qf=An(function(e){var t=So(e);return Nr(t)&&(t=void 0),Jf(yr(e,1,Nr,!0),xr(t))});const Qf=qf;class xo extends TypeError{constructor(t,r){let n;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=()=>n??(n=[t,...r()])}}function Xf(e){return ue(e)&&typeof e[Symbol.iterator]=="function"}function ue(e){return typeof e=="object"&&e!=null}function K(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function Kf(e){const{done:t,value:r}=e.next();return t?void 0:r}function Zf(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=r,{refinement:s,message:u=`Expected a value of type \`${i}\`${s?` with refinement \`${s}\``:""}, but received: \`${K(n)}\``}=e;return{value:n,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:u}}function*Ro(e,t,r,n){Xf(e)||(e=[e]);for(const o of e){const a=Zf(o,t,r,n);a&&(yield a)}}function*Ar(e,t,r){r===void 0&&(r={});const{path:n=[],branch:o=[e],coerce:a=!1,mask:i=!1}=r,s={path:n,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&ue(t.schema)&&ue(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let u="valid";for(const l of t.validator(e,s))u="not_valid",yield[l,void 0];for(let[l,f,d]of t.entries(e,s)){const p=Ar(f,d,{path:l===void 0?n:[...n,l],branch:l===void 0?o:[...o,f],coerce:a,mask:i});for(const v of p)v[0]?(u=v[0].refinement!=null?"not_refined":"not_valid",yield[v[0],void 0]):a&&(f=v[1],l===void 0?e=f:e instanceof Map?e.set(l,f):e instanceof Set?e.add(f):ue(e)&&(f!==void 0||l in e)&&(e[l]=f))}if(u!=="not_valid")for(const l of t.refiner(e,s))u="not_refined",yield[l,void 0];u==="valid"&&(yield[void 0,e])}class pe{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:r,schema:n,validator:o,refiner:a,coercer:i=u=>u,entries:s=function*(){}}=t;this.type=r,this.schema=n,this.entries=s,this.coercer=i,o?this.validator=(u,l)=>{const f=o(u,l);return Ro(f,l,this,u)}:this.validator=()=>[],a?this.refiner=(u,l)=>{const f=a(u,l);return Ro(f,l,this,u)}:this.refiner=()=>[]}assert(t){return No(t,this)}create(t){return ed(t,this)}is(t){return rd(t,this)}mask(t){return td(t,this)}validate(t,r){return r===void 0&&(r={}),Be(t,this,r)}}function No(e,t){const r=Be(e,t);if(r[0])throw r[0]}function ed(e,t){const r=Be(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function td(e,t){const r=Be(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function rd(e,t){return!Be(e,t)[0]}function Be(e,t,r){r===void 0&&(r={});const n=Ar(e,t,r),o=Kf(n);return o[0]?[new xo(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Mr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return n?$o(a):M(a)}function Ee(e,t){return new pe({type:e,schema:null,validator:t})}function Ue(e){return new pe({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function To(e,t){const{schema:r}=e,n={...r};for(const o of t)delete n[o];switch(e.type){case"type":return $o(n);default:return M(n)}}function G(){return Ee("any",()=>!0)}function B(e){return new pe({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${K(t)}`}})}function me(){return Ee("boolean",e=>typeof e=="boolean")}function $r(e){const t={},r=e.map(n=>K(n)).join();for(const n of e)t[n]=n;return new pe({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${K(n)}`}})}function Ao(){return Ee("func",e=>typeof e=="function"||`Expected a function, but received: ${K(e)}`)}function X(e){const t=K(e),r=typeof e;return new pe({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${K(n)}`}})}function nd(){return Ee("never",()=>!1)}function Mo(){return Ee("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${K(e)}`)}function M(e){const t=e?Object.keys(e):[],r=nd();return new pe({type:"object",schema:e||null,*entries(n){if(e&&ue(n)){const o=new Set(Object.keys(n));for(const a of t)o.delete(a),yield[a,n[a],e[a]];for(const a of o)yield[a,n[a],r]}},validator(n){return ue(n)||`Expected an object, but received: ${K(n)}`},coercer(n){return ue(n)?{...n}:n}})}function g(e){return new pe({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function gt(e,t){return new pe({type:"record",schema:null,*entries(r){if(ue(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator(r){return ue(r)||`Expected an object, but received: ${K(r)}`}})}function m(){return Ee("string",e=>typeof e=="string"||`Expected a string, but received: ${K(e)}`)}function $o(e){const t=Object.keys(e);return new pe({type:"type",schema:e,*entries(r){if(ue(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return ue(r)||`Expected an object, but received: ${K(r)}`}})}function Y(e){const t=e.map(r=>r.type).join(" | ");return new pe({type:"union",schema:null,coercer(r,n){return(e.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||od()).coercer(r,n)},validator(r,n){const o=[];for(const a of e){const[...i]=Ar(r,a,n),[s]=i;if(s[0])for(const[u]of i)u&&o.push(u);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${K(r)}`,...o]}})}function od(){return Ee("unknown",()=>!0)}const Pr=M({package:m(),version:m(),exportName:m(),destructuring:g(me()),subName:g(m()),main:g(m())}),ad=B(Pr),id=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var oe=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(oe||{}),Dr=(e=>(e.DESIGN="design",e.SAVE="save",e))(Dr||{}),kr=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(kr||{});const sd=()=>Ee("normalObj",e=>!Q(e)||[oe.SLOT,oe.EXPRESSION,oe.FUNCTION].includes(e==null?void 0:e.type)?!1:(Be(e,gt(m(),Ir)),!0)),Ir=Y([m(),Mo(),me(),M({type:X(oe.SLOT),renderType:$r([kr.FUNC,kr.COMP]),params:g(B(m())),value:Ue(()=>Y([ze,B(ze)]))}),M({type:X(oe.EXPRESSION),value:m()}),M({type:X(oe.FUNCTION),value:m()}),sd(),B(Ue(()=>Ir))]),Po=M({type:X(oe.EXPRESSION),value:m()}),ze=M({id:g(m()),title:g(m()),componentName:m(),props:g(gt(m(),Ir)),stateName:g(m()),state:g(gt(m(),G())),children:Ue(()=>g(B(Y([m(),ze])))),configure:g(G()),css:g(G()),style:g(G()),classNames:g(B(G())),refId:g(m()),extra:g(gt(G(),G())),condition:g(Y([me(),Po])),tempDevConfig:g(G()),loop:g(M({open:me(),data:Y([B(G()),Po]),args:g(B(m())),forName:g(m()),forIndex:g(m()),key:g(G()),name:g(m())}))}),It=Y([m(),M({label:m(),tip:g(m())})]),cd=M({type:X("shape"),value:B(M({name:m(),title:It,valueType:Ue(()=>Ft)}))}),ud=M({type:X("enums"),value:B(m())});M({type:X("array"),value:Ue(()=>Ft)});const ld=M({type:X("array"),value:Ue(()=>B(Ft))}),Ft=Y([$r(["array","boolean","number","object","string"]),$r(["component","expression","function"]),cd,ud,ld]),fd=Y([m(),M({componentName:m(),props:g(G()),initialValue:g(G()),component:g(G())})]),Fr=M({name:m(),title:It,valueType:Ft,description:g(m()),defaultValue:G(),setters:g(B(fd)),condition:g(Ao())}),dd=Y([m(),Ao()]);var Lr=(e=>(e.SINGLE="single",e.GROUP="group",e))(Lr||{});Y([m(),M({name:m(),describe:g(m()),params:g(M({name:m(),description:m()})),template:m()})]);const pd=M({id:g(m()),title:m(),snapshot:Y([m(),G()]),snapshotText:g(m()),description:g(m()),tags:g(B(m())),groupName:g(m()),category:g(m()),schema:Mr(To(ze,["id"]),M({componentName:g(m())}))}),hd=M({componentName:m(),title:m(),screenshot:g(m()),icon:g(m()),tags:g(B(m())),groupName:g(m()),category:g(m()),priority:g(Mo()),npm:g(Pr),snippets:B(pd),props:B(Y([Fr,M({title:g(It),type:X("single"),content:Fr}),M({title:g(It),type:X("group"),content:B(Fr)})])),fixedProps:g(G()),isContainer:g(Y([me(),M({placeholder:m(),width:m(),height:m()})])),isModal:g(Y([me(),M({visibleKey:m()})])),isSupportStyle:g(me()),isSupportDispatchNativeEvent:g(me()),isLayout:g(me()),rootSelector:g(m()),selectionToolBars:g(B(dd)),extra:g(gt(G(),G()))}),vd=e=>({data:t,message:r,throwError:n})=>{const o=e({data:t,message:r,throwError:n});if(o.isValidate)return o;if(n)throw o.message||r?new Error(`${o.message||r}
27
+ Check the top-level render call using <`+y+">.")}return h}}function Qa(c,h){{if(!c._store||c._store.validated||c.key!=null)return;c._store.validated=!0;var y=qy(h);if(qa[y])return;qa[y]=!0;var O="";c&&c._owner&&c._owner!==hn.current&&(O=" It was passed a child from "+ee(c._owner.type)+"."),rt(c),w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',y,O),rt(null)}}function Xa(c,h){{if(typeof c!="object")return;if(dn(c))for(var y=0;y<c.length;y++){var O=c[y];yn(O)&&Qa(O,h)}else if(yn(c))c._store&&(c._store.validated=!0);else if(c){var A=E(c);if(typeof A=="function"&&A!==c.entries)for(var $=A.call(c),T;!(T=$.next()).done;)yn(T.value)&&Qa(T.value,h)}}}function Qy(c){{var h=c.type;if(h==null||typeof h=="string")return;var y;if(typeof h=="function")y=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===u||h.$$typeof===d))y=h.propTypes;else return;if(y){var O=ee(h);ky(y,c.props,"prop",O,c)}else if(h.PropTypes!==void 0&&!vn){vn=!0;var A=ee(h);w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",A||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xy(c){{for(var h=Object.keys(c.props),y=0;y<h.length;y++){var O=h[y];if(O!=="children"&&O!=="key"){rt(c),w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",O),rt(null);break}}c.ref!==null&&(rt(c),w("Invalid attribute `ref` supplied to `React.Fragment`."),rt(null))}}function Ka(c,h,y,O,A,$){{var T=le(c);if(!T){var R="";(c===void 0||typeof c=="object"&&c!==null&&Object.keys(c).length===0)&&(R+=" 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 q=Jy(A);q?R+=q:R+=Ja();var z;c===null?z="null":dn(c)?z="array":c!==void 0&&c.$$typeof===t?(z="<"+(ee(c.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):z=typeof c,w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",z,R)}var V=Yy(c,h,y,A,$);if(V==null)return V;if(T){var ie=h.children;if(ie!==void 0)if(O)if(dn(ie)){for(var nt=0;nt<ie.length;nt++)Xa(ie[nt],c);Object.freeze&&Object.freeze(ie)}else w("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 Xa(ie,c)}return c===n?Xy(V):Qy(V),V}}function Ky(c,h,y){return Ka(c,h,y,!0)}function Zy(c,h,y){return Ka(c,h,y,!1)}var em=Zy,tm=Ky;it.Fragment=n,it.jsx=em,it.jsxs=tm}()),it}(function(e){({}).NODE_ENV==="production"?e.exports=ni():e.exports=oi()})(ri);const De=xt.jsx,bn=xt.jsxs;var ai=Object.defineProperty,ii=(e,t,r)=>t in e?ai(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t,r)=>(ii(e,typeof t!="symbol"?t+"":t,r),r);const si=e=>()=>{console.warn(`${e} need to be implement getComponent`)},ci=["customPageRootRender"],_n=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],jn=e=>[..._n,...ci].reduce((t,r)=>{var n;return e!=null&&e[r]?t[r]=(n=e[r])==null?void 0:n.bind(e):_n.includes(r)&&(t[r]=si),t},{});var ui=Object.defineProperty,li=(e,t,r)=>t in e?ui(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,C=(e,t,r)=>(li(e,typeof t!="symbol"?t+"":t,r),r),fi=typeof global=="object"&&global&&global.Object===Object&&global;const En=fi;var di=typeof self=="object"&&self&&self.Object===Object&&self,pi=En||di||Function("return this")();const fe=pi;var hi=fe.Symbol;const ne=hi;var On=Object.prototype,vi=On.hasOwnProperty,yi=On.toString,st=ne?ne.toStringTag:void 0;function mi(e){var t=vi.call(e,st),r=e[st];try{e[st]=void 0;var n=!0}catch{}var o=yi.call(e);return n&&(t?e[st]=r:delete e[st]),o}var gi=Object.prototype,bi=gi.toString;function _i(e){return bi.call(e)}var ji="[object Null]",Ei="[object Undefined]",wn=ne?ne.toStringTag:void 0;function we(e){return e==null?e===void 0?Ei:ji:wn&&wn in Object(e)?mi(e):_i(e)}function de(e){return e!=null&&typeof e=="object"}var Oi="[object Symbol]";function er(e){return typeof e=="symbol"||de(e)&&we(e)==Oi}function tr(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var wi=Array.isArray;const L=wi;var Ci=1/0,Cn=ne?ne.prototype:void 0,Sn=Cn?Cn.toString:void 0;function xn(e){if(typeof e=="string")return e;if(L(e))return tr(e,xn)+"";if(er(e))return Sn?Sn.call(e):"";var t=e+"";return t=="0"&&1/e==-Ci?"-0":t}function se(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function rr(e){return e}var Si="[object AsyncFunction]",xi="[object Function]",Ri="[object GeneratorFunction]",Ni="[object Proxy]";function nr(e){if(!se(e))return!1;var t=we(e);return t==xi||t==Ri||t==Si||t==Ni}var Ti=fe["__core-js_shared__"];const or=Ti;var Rn=function(){var e=/[^.]+$/.exec(or&&or.keys&&or.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Ai(e){return!!Rn&&Rn in e}var Mi=Function.prototype,$i=Mi.toString;function Ce(e){if(e!=null){try{return $i.call(e)}catch{}try{return e+""}catch{}}return""}var Pi=/[\\^$.*+?()[\]{}|]/g,Di=/^\[object .+?Constructor\]$/,ki=Function.prototype,Ii=Object.prototype,Fi=ki.toString,Li=Ii.hasOwnProperty,Bi=RegExp("^"+Fi.call(Li).replace(Pi,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ui(e){if(!se(e)||Ai(e))return!1;var t=nr(e)?Bi:Di;return t.test(Ce(e))}function zi(e,t){return e==null?void 0:e[t]}function Se(e,t){var r=zi(e,t);return Ui(r)?r:void 0}var Vi=Se(fe,"WeakMap");const ar=Vi;var Nn=Object.create,Gi=function(){function e(){}return function(t){if(!se(t))return{};if(Nn)return Nn(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const Wi=Gi;function Hi(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function Yi(){}function Tn(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Ji=800,qi=16,Qi=Date.now;function Xi(e){var t=0,r=0;return function(){var n=Qi(),o=qi-(n-r);if(r=n,o>0){if(++t>=Ji)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ki(e){return function(){return e}}var Zi=function(){try{var e=Se(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Rt=Zi;var es=Rt?function(e,t){return Rt(e,"toString",{configurable:!0,enumerable:!1,value:Ki(t),writable:!0})}:rr,ts=Xi(es);const An=ts;function rs(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}function ns(e,t,r,n){for(var o=e.length,a=r+(n?1:-1);n?a--:++a<o;)if(t(e[a],a,e))return a;return-1}function os(e){return e!==e}function as(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}function is(e,t,r){return t===t?as(e,t,r):ns(e,os,r)}function ss(e,t){var r=e==null?0:e.length;return!!r&&is(e,t,0)>-1}var cs=9007199254740991,us=/^(?:0|[1-9]\d*)$/;function Nt(e,t){var r=typeof e;return t=t??cs,!!t&&(r=="number"||r!="symbol"&&us.test(e))&&e>-1&&e%1==0&&e<t}function ir(e,t,r){t=="__proto__"&&Rt?Rt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function ct(e,t){return e===t||e!==e&&t!==t}var ls=Object.prototype,fs=ls.hasOwnProperty;function sr(e,t,r){var n=e[t];(!(fs.call(e,t)&&ct(n,r))||r===void 0&&!(t in e))&&ir(e,t,r)}function ke(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),o?ir(r,s,u):sr(r,s,u)}return r}var Mn=Math.max;function $n(e,t,r){return t=Mn(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=Mn(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),Hi(e,this,s)}}function Pn(e,t){return An($n(e,t,rr),e+"")}var ds=9007199254740991;function cr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ds}function Tt(e){return e!=null&&cr(e.length)&&!nr(e)}function ps(e,t,r){if(!se(r))return!1;var n=typeof t;return(n=="number"?Tt(r)&&Nt(t,r.length):n=="string"&&t in r)?ct(r[t],e):!1}function hs(e){return Pn(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&ps(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t})}var vs=Object.prototype;function ur(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||vs;return e===r}function ys(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var ms="[object Arguments]";function Dn(e){return de(e)&&we(e)==ms}var kn=Object.prototype,gs=kn.hasOwnProperty,bs=kn.propertyIsEnumerable,_s=Dn(function(){return arguments}())?Dn:function(e){return de(e)&&gs.call(e,"callee")&&!bs.call(e,"callee")};const ut=_s;function js(){return!1}var In=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Fn=In&&typeof module=="object"&&module&&!module.nodeType&&module,Es=Fn&&Fn.exports===In,Ln=Es?fe.Buffer:void 0,Os=Ln?Ln.isBuffer:void 0,ws=Os||js;const lt=ws;var Cs="[object Arguments]",Ss="[object Array]",xs="[object Boolean]",Rs="[object Date]",Ns="[object Error]",Ts="[object Function]",As="[object Map]",Ms="[object Number]",$s="[object Object]",Ps="[object RegExp]",Ds="[object Set]",ks="[object String]",Is="[object WeakMap]",Fs="[object ArrayBuffer]",Ls="[object DataView]",Bs="[object Float32Array]",Us="[object Float64Array]",zs="[object Int8Array]",Vs="[object Int16Array]",Gs="[object Int32Array]",Ws="[object Uint8Array]",Hs="[object Uint8ClampedArray]",Ys="[object Uint16Array]",Js="[object Uint32Array]",k={};k[Bs]=k[Us]=k[zs]=k[Vs]=k[Gs]=k[Ws]=k[Hs]=k[Ys]=k[Js]=!0,k[Cs]=k[Ss]=k[Fs]=k[xs]=k[Ls]=k[Rs]=k[Ns]=k[Ts]=k[As]=k[Ms]=k[$s]=k[Ps]=k[Ds]=k[ks]=k[Is]=!1;function qs(e){return de(e)&&cr(e.length)&&!!k[we(e)]}function lr(e){return function(t){return e(t)}}var Bn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ft=Bn&&typeof module=="object"&&module&&!module.nodeType&&module,Qs=ft&&ft.exports===Bn,fr=Qs&&En.process,Xs=function(){try{var e=ft&&ft.require&&ft.require("util").types;return e||fr&&fr.binding&&fr.binding("util")}catch{}}();const Ie=Xs;var Un=Ie&&Ie.isTypedArray,Ks=Un?lr(Un):qs;const dr=Ks;var Zs=Object.prototype,ec=Zs.hasOwnProperty;function zn(e,t){var r=L(e),n=!r&&ut(e),o=!r&&!n&&lt(e),a=!r&&!n&&!o&&dr(e),i=r||n||o||a,s=i?ys(e.length,String):[],u=s.length;for(var l in e)(t||ec.call(e,l))&&!(i&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Nt(l,u)))&&s.push(l);return s}function Vn(e,t){return function(r){return e(t(r))}}var tc=Vn(Object.keys,Object);const rc=tc;var nc=Object.prototype,oc=nc.hasOwnProperty;function ac(e){if(!ur(e))return rc(e);var t=[];for(var r in Object(e))oc.call(e,r)&&r!="constructor"&&t.push(r);return t}function At(e){return Tt(e)?zn(e):ac(e)}function ic(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var sc=Object.prototype,cc=sc.hasOwnProperty;function uc(e){if(!se(e))return ic(e);var t=ur(e),r=[];for(var n in e)n=="constructor"&&(t||!cc.call(e,n))||r.push(n);return r}function dt(e){return Tt(e)?zn(e,!0):uc(e)}var lc=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fc=/^\w*$/;function pr(e,t){if(L(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||er(e)?!0:fc.test(e)||!lc.test(e)||t!=null&&e in Object(t)}var dc=Se(Object,"create");const pt=dc;function pc(){this.__data__=pt?pt(null):{},this.size=0}function hc(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var vc="__lodash_hash_undefined__",yc=Object.prototype,mc=yc.hasOwnProperty;function gc(e){var t=this.__data__;if(pt){var r=t[e];return r===vc?void 0:r}return mc.call(t,e)?t[e]:void 0}var bc=Object.prototype,_c=bc.hasOwnProperty;function jc(e){var t=this.__data__;return pt?t[e]!==void 0:_c.call(t,e)}var Ec="__lodash_hash_undefined__";function Oc(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=pt&&t===void 0?Ec:t,this}function xe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}xe.prototype.clear=pc,xe.prototype.delete=hc,xe.prototype.get=gc,xe.prototype.has=jc,xe.prototype.set=Oc;function wc(){this.__data__=[],this.size=0}function Mt(e,t){for(var r=e.length;r--;)if(ct(e[r][0],t))return r;return-1}var Cc=Array.prototype,Sc=Cc.splice;function xc(e){var t=this.__data__,r=Mt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Sc.call(t,r,1),--this.size,!0}function Rc(e){var t=this.__data__,r=Mt(t,e);return r<0?void 0:t[r][1]}function Nc(e){return Mt(this.__data__,e)>-1}function Tc(e,t){var r=this.__data__,n=Mt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ve(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ve.prototype.clear=wc,ve.prototype.delete=xc,ve.prototype.get=Rc,ve.prototype.has=Nc,ve.prototype.set=Tc;var Ac=Se(fe,"Map");const ht=Ac;function Mc(){this.size=0,this.__data__={hash:new xe,map:new(ht||ve),string:new xe}}function $c(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function $t(e,t){var r=e.__data__;return $c(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Pc(e){var t=$t(this,e).delete(e);return this.size-=t?1:0,t}function Dc(e){return $t(this,e).get(e)}function kc(e){return $t(this,e).has(e)}function Ic(e,t){var r=$t(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function ye(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ye.prototype.clear=Mc,ye.prototype.delete=Pc,ye.prototype.get=Dc,ye.prototype.has=kc,ye.prototype.set=Ic;var Fc="Expected a function";function hr(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(Fc);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=e.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(hr.Cache||ye),r}hr.Cache=ye;var Lc=500;function Bc(e){var t=hr(e,function(n){return r.size===Lc&&r.clear(),n}),r=t.cache;return t}var Uc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,zc=/\\(\\)?/g,Vc=Bc(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(Uc,function(r,n,o,a){t.push(o?a.replace(zc,"$1"):n||r)}),t});const Gc=Vc;function Wc(e){return e==null?"":xn(e)}function Fe(e,t){return L(e)?e:pr(e,t)?[e]:Gc(Wc(e))}var Hc=1/0;function Le(e){if(typeof e=="string"||er(e))return e;var t=e+"";return t=="0"&&1/e==-Hc?"-0":t}function Pt(e,t){t=Fe(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Le(t[r++])];return r&&r==n?e:void 0}function Gn(e,t,r){var n=e==null?void 0:Pt(e,t);return n===void 0?r:n}function vr(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var Wn=ne?ne.isConcatSpreadable:void 0;function Yc(e){return L(e)||ut(e)||!!(Wn&&e&&e[Wn])}function yr(e,t,r,n,o){var a=-1,i=e.length;for(r||(r=Yc),o||(o=[]);++a<i;){var s=e[a];t>0&&r(s)?t>1?yr(s,t-1,r,n,o):vr(o,s):n||(o[o.length]=s)}return o}function Jc(e){var t=e==null?0:e.length;return t?yr(e,1):[]}function qc(e){return An($n(e,void 0,Jc),e+"")}var Qc=Vn(Object.getPrototypeOf,Object);const mr=Qc;var Xc="[object Object]",Kc=Function.prototype,Zc=Object.prototype,Hn=Kc.toString,eu=Zc.hasOwnProperty,tu=Hn.call(Object);function Q(e){if(!de(e)||we(e)!=Xc)return!1;var t=mr(e);if(t===null)return!0;var r=eu.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&Hn.call(r)==tu}function ru(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}function nu(){this.__data__=new ve,this.size=0}function ou(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function au(e){return this.__data__.get(e)}function iu(e){return this.__data__.has(e)}var su=200;function cu(e,t){var r=this.__data__;if(r instanceof ve){var n=r.__data__;if(!ht||n.length<su-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new ye(n)}return r.set(e,t),this.size=r.size,this}function ce(e){var t=this.__data__=new ve(e);this.size=t.size}ce.prototype.clear=nu,ce.prototype.delete=ou,ce.prototype.get=au,ce.prototype.has=iu,ce.prototype.set=cu;function uu(e,t){return e&&ke(t,At(t),e)}function lu(e,t){return e&&ke(t,dt(t),e)}var Yn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jn=Yn&&typeof module=="object"&&module&&!module.nodeType&&module,fu=Jn&&Jn.exports===Yn,qn=fu?fe.Buffer:void 0,Qn=qn?qn.allocUnsafe:void 0;function Xn(e,t){if(t)return e.slice();var r=e.length,n=Qn?Qn(r):new e.constructor(r);return e.copy(n),n}function du(e,t){for(var r=-1,n=e==null?0:e.length,o=0,a=[];++r<n;){var i=e[r];t(i,r,e)&&(a[o++]=i)}return a}function Kn(){return[]}var pu=Object.prototype,hu=pu.propertyIsEnumerable,Zn=Object.getOwnPropertySymbols,vu=Zn?function(e){return e==null?[]:(e=Object(e),du(Zn(e),function(t){return hu.call(e,t)}))}:Kn;const gr=vu;function yu(e,t){return ke(e,gr(e),t)}var mu=Object.getOwnPropertySymbols,gu=mu?function(e){for(var t=[];e;)vr(t,gr(e)),e=mr(e);return t}:Kn;const eo=gu;function bu(e,t){return ke(e,eo(e),t)}function to(e,t,r){var n=t(e);return L(e)?n:vr(n,r(e))}function br(e){return to(e,At,gr)}function _r(e){return to(e,dt,eo)}var _u=Se(fe,"DataView");const jr=_u;var ju=Se(fe,"Promise");const Er=ju;var Eu=Se(fe,"Set");const Be=Eu;var ro="[object Map]",Ou="[object Object]",no="[object Promise]",oo="[object Set]",ao="[object WeakMap]",io="[object DataView]",wu=Ce(jr),Cu=Ce(ht),Su=Ce(Er),xu=Ce(Be),Ru=Ce(ar),Re=we;(jr&&Re(new jr(new ArrayBuffer(1)))!=io||ht&&Re(new ht)!=ro||Er&&Re(Er.resolve())!=no||Be&&Re(new Be)!=oo||ar&&Re(new ar)!=ao)&&(Re=function(e){var t=we(e),r=t==Ou?e.constructor:void 0,n=r?Ce(r):"";if(n)switch(n){case wu:return io;case Cu:return ro;case Su:return no;case xu:return oo;case Ru:return ao}return t});const vt=Re;var Nu=Object.prototype,Tu=Nu.hasOwnProperty;function Au(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&Tu.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var Mu=fe.Uint8Array;const Dt=Mu;function Or(e){var t=new e.constructor(e.byteLength);return new Dt(t).set(new Dt(e)),t}function $u(e,t){var r=t?Or(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Pu=/\w*$/;function Du(e){var t=new e.constructor(e.source,Pu.exec(e));return t.lastIndex=e.lastIndex,t}var so=ne?ne.prototype:void 0,co=so?so.valueOf:void 0;function ku(e){return co?Object(co.call(e)):{}}function uo(e,t){var r=t?Or(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Iu="[object Boolean]",Fu="[object Date]",Lu="[object Map]",Bu="[object Number]",Uu="[object RegExp]",zu="[object Set]",Vu="[object String]",Gu="[object Symbol]",Wu="[object ArrayBuffer]",Hu="[object DataView]",Yu="[object Float32Array]",Ju="[object Float64Array]",qu="[object Int8Array]",Qu="[object Int16Array]",Xu="[object Int32Array]",Ku="[object Uint8Array]",Zu="[object Uint8ClampedArray]",el="[object Uint16Array]",tl="[object Uint32Array]";function rl(e,t,r){var n=e.constructor;switch(t){case Wu:return Or(e);case Iu:case Fu:return new n(+e);case Hu:return $u(e,r);case Yu:case Ju:case qu:case Qu:case Xu:case Ku:case Zu:case el:case tl:return uo(e,r);case Lu:return new n;case Bu:case Vu:return new n(e);case Uu:return Du(e);case zu:return new n;case Gu:return ku(e)}}function lo(e){return typeof e.constructor=="function"&&!ur(e)?Wi(mr(e)):{}}var nl="[object Map]";function ol(e){return de(e)&&vt(e)==nl}var fo=Ie&&Ie.isMap,al=fo?lr(fo):ol;const il=al;var sl="[object Set]";function cl(e){return de(e)&&vt(e)==sl}var po=Ie&&Ie.isSet,ul=po?lr(po):cl;const ll=ul;var fl=1,dl=2,pl=4,ho="[object Arguments]",hl="[object Array]",vl="[object Boolean]",yl="[object Date]",ml="[object Error]",vo="[object Function]",gl="[object GeneratorFunction]",bl="[object Map]",_l="[object Number]",yo="[object Object]",jl="[object RegExp]",El="[object Set]",Ol="[object String]",wl="[object Symbol]",Cl="[object WeakMap]",Sl="[object ArrayBuffer]",xl="[object DataView]",Rl="[object Float32Array]",Nl="[object Float64Array]",Tl="[object Int8Array]",Al="[object Int16Array]",Ml="[object Int32Array]",$l="[object Uint8Array]",Pl="[object Uint8ClampedArray]",Dl="[object Uint16Array]",kl="[object Uint32Array]",P={};P[ho]=P[hl]=P[Sl]=P[xl]=P[vl]=P[yl]=P[Rl]=P[Nl]=P[Tl]=P[Al]=P[Ml]=P[bl]=P[_l]=P[yo]=P[jl]=P[El]=P[Ol]=P[wl]=P[$l]=P[Pl]=P[Dl]=P[kl]=!0,P[ml]=P[vo]=P[Cl]=!1;function yt(e,t,r,n,o,a){var i,s=t&fl,u=t&dl,l=t&pl;if(r&&(i=o?r(e,n,o,a):r(e)),i!==void 0)return i;if(!se(e))return e;var f=L(e);if(f){if(i=Au(e),!s)return Tn(e,i)}else{var d=vt(e),p=d==vo||d==gl;if(lt(e))return Xn(e,s);if(d==yo||d==ho||p&&!o){if(i=u||p?{}:lo(e),!s)return u?bu(e,lu(i,e)):yu(e,uu(i,e))}else{if(!P[d])return o?e:{};i=rl(e,d,s)}}a||(a=new ce);var v=a.get(e);if(v)return v;a.set(e,i),ll(e)?e.forEach(function(E){i.add(yt(E,t,r,E,e,a))}):il(e)&&e.forEach(function(E,S){i.set(S,yt(E,t,r,S,e,a))});var b=l?u?_r:br:u?dt:At,_=f?void 0:b(e);return rs(_||e,function(E,S){_&&(S=E,E=e[S]),sr(i,S,yt(E,t,r,S,e,a))}),i}var Il=1,Fl=4;function mo(e){return yt(e,Il|Fl)}var Ll="__lodash_hash_undefined__";function Bl(e){return this.__data__.set(e,Ll),this}function Ul(e){return this.__data__.has(e)}function mt(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new ye;++t<r;)this.add(e[t])}mt.prototype.add=mt.prototype.push=Bl,mt.prototype.has=Ul;function zl(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function go(e,t){return e.has(t)}var Vl=1,Gl=2;function bo(e,t,r,n,o,a){var i=r&Vl,s=e.length,u=t.length;if(s!=u&&!(i&&u>s))return!1;var l=a.get(e),f=a.get(t);if(l&&f)return l==t&&f==e;var d=-1,p=!0,v=r&Gl?new mt:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var b=e[d],_=t[d];if(n)var E=i?n(_,b,d,t,e,a):n(b,_,d,e,t,a);if(E!==void 0){if(E)continue;p=!1;break}if(v){if(!zl(t,function(S,w){if(!go(v,w)&&(b===S||o(b,S,r,n,a)))return v.push(w)})){p=!1;break}}else if(!(b===_||o(b,_,r,n,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function Wl(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}function wr(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Hl=1,Yl=2,Jl="[object Boolean]",ql="[object Date]",Ql="[object Error]",Xl="[object Map]",Kl="[object Number]",Zl="[object RegExp]",ef="[object Set]",tf="[object String]",rf="[object Symbol]",nf="[object ArrayBuffer]",of="[object DataView]",_o=ne?ne.prototype:void 0,Cr=_o?_o.valueOf:void 0;function af(e,t,r,n,o,a,i){switch(r){case of:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case nf:return!(e.byteLength!=t.byteLength||!a(new Dt(e),new Dt(t)));case Jl:case ql:case Kl:return ct(+e,+t);case Ql:return e.name==t.name&&e.message==t.message;case Zl:case tf:return e==t+"";case Xl:var s=Wl;case ef:var u=n&Hl;if(s||(s=wr),e.size!=t.size&&!u)return!1;var l=i.get(e);if(l)return l==t;n|=Yl,i.set(e,t);var f=bo(s(e),s(t),n,o,a,i);return i.delete(e),f;case rf:if(Cr)return Cr.call(e)==Cr.call(t)}return!1}var sf=1,cf=Object.prototype,uf=cf.hasOwnProperty;function lf(e,t,r,n,o,a){var i=r&sf,s=br(e),u=s.length,l=br(t),f=l.length;if(u!=f&&!i)return!1;for(var d=u;d--;){var p=s[d];if(!(i?p in t:uf.call(t,p)))return!1}var v=a.get(e),b=a.get(t);if(v&&b)return v==t&&b==e;var _=!0;a.set(e,t),a.set(t,e);for(var E=i;++d<u;){p=s[d];var S=e[p],w=t[p];if(n)var W=i?n(w,S,p,t,e,a):n(S,w,p,e,t,a);if(!(W===void 0?S===w||o(S,w,r,n,a):W)){_=!1;break}E||(E=p=="constructor")}if(_&&!E){var D=e.constructor,U=t.constructor;D!=U&&"constructor"in e&&"constructor"in t&&!(typeof D=="function"&&D instanceof D&&typeof U=="function"&&U instanceof U)&&(_=!1)}return a.delete(e),a.delete(t),_}var ff=1,jo="[object Arguments]",Eo="[object Array]",kt="[object Object]",df=Object.prototype,Oo=df.hasOwnProperty;function pf(e,t,r,n,o,a){var i=L(e),s=L(t),u=i?Eo:vt(e),l=s?Eo:vt(t);u=u==jo?kt:u,l=l==jo?kt:l;var f=u==kt,d=l==kt,p=u==l;if(p&&lt(e)){if(!lt(t))return!1;i=!0,f=!1}if(p&&!f)return a||(a=new ce),i||dr(e)?bo(e,t,r,n,o,a):af(e,t,u,r,n,o,a);if(!(r&ff)){var v=f&&Oo.call(e,"__wrapped__"),b=d&&Oo.call(t,"__wrapped__");if(v||b){var _=v?e.value():e,E=b?t.value():t;return a||(a=new ce),o(_,E,r,n,a)}}return p?(a||(a=new ce),lf(e,t,r,n,o,a)):!1}function Sr(e,t,r,n,o){return e===t?!0:e==null||t==null||!de(e)&&!de(t)?e!==e&&t!==t:pf(e,t,r,n,Sr,o)}var hf=1,vf=2;function yf(e,t,r,n){var o=r.length,a=o,i=!n;if(e==null)return!a;for(e=Object(e);o--;){var s=r[o];if(i&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<a;){s=r[o];var u=s[0],l=e[u],f=s[1];if(i&&s[2]){if(l===void 0&&!(u in e))return!1}else{var d=new ce;if(n)var p=n(l,f,u,e,t,d);if(!(p===void 0?Sr(f,l,hf|vf,n,d):p))return!1}}return!0}function wo(e){return e===e&&!se(e)}function mf(e){for(var t=At(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,wo(o)]}return t}function Co(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function gf(e){var t=mf(e);return t.length==1&&t[0][2]?Co(t[0][0],t[0][1]):function(r){return r===e||yf(r,e,t)}}function bf(e,t){return e!=null&&t in Object(e)}function _f(e,t,r){t=Fe(t,e);for(var n=-1,o=t.length,a=!1;++n<o;){var i=Le(t[n]);if(!(a=e!=null&&r(e,i)))break;e=e[i]}return a||++n!=o?a:(o=e==null?0:e.length,!!o&&cr(o)&&Nt(i,o)&&(L(e)||ut(e)))}function jf(e,t){return e!=null&&_f(e,t,bf)}var Ef=1,Of=2;function wf(e,t){return pr(e)&&wo(t)?Co(Le(e),t):function(r){var n=Gn(r,e);return n===void 0&&n===t?jf(r,e):Sr(t,n,Ef|Of)}}function Cf(e){return function(t){return t==null?void 0:t[e]}}function Sf(e){return function(t){return Pt(t,e)}}function xf(e){return pr(e)?Cf(Le(e)):Sf(e)}function xr(e){return typeof e=="function"?e:e==null?rr:typeof e=="object"?L(e)?wf(e[0],e[1]):gf(e):xf(e)}function Rf(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),s=i.length;s--;){var u=i[e?s:++o];if(r(a[u],u,a)===!1)break}return t}}var Nf=Rf();const Tf=Nf;function Rr(e,t,r){(r!==void 0&&!ct(e[t],r)||r===void 0&&!(t in e))&&ir(e,t,r)}function Nr(e){return de(e)&&Tt(e)}function Tr(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Af(e){return ke(e,dt(e))}function Mf(e,t,r,n,o,a,i){var s=Tr(e,r),u=Tr(t,r),l=i.get(u);if(l){Rr(e,r,l);return}var f=a?a(s,u,r+"",e,t,i):void 0,d=f===void 0;if(d){var p=L(u),v=!p&&lt(u),b=!p&&!v&&dr(u);f=u,p||v||b?L(s)?f=s:Nr(s)?f=Tn(s):v?(d=!1,f=Xn(u,!0)):b?(d=!1,f=uo(u,!0)):f=[]:Q(u)||ut(u)?(f=s,ut(s)?f=Af(s):(!se(s)||nr(s))&&(f=lo(u))):d=!1}d&&(i.set(u,f),o(f,u,n,a,i),i.delete(u)),Rr(e,r,f)}function So(e,t,r,n,o){e!==t&&Tf(t,function(a,i){if(o||(o=new ce),se(a))Mf(e,t,i,r,So,n,o);else{var s=n?n(Tr(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),Rr(e,i,s)}},dt)}function $f(e,t,r){for(var n=-1,o=e==null?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}function xo(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}function Pf(e,t){return t.length<2?e:Pt(e,ru(t,0,-1))}var Df=hs(function(e,t,r){So(e,t,r)});const Ro=Df;var kf="Expected a function";function If(e){if(typeof e!="function")throw new TypeError(kf);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 Ff(e,t){return t=Fe(t,e),e=Pf(e,t),e==null||delete e[Le(xo(t))]}function Lf(e){return Q(e)?void 0:e}var Bf=1,Uf=2,zf=4,Vf=qc(function(e,t){var r={};if(e==null)return r;var n=!1;t=tr(t,function(a){return a=Fe(a,e),n||(n=a.length>1),a}),ke(e,_r(e),r),n&&(r=yt(r,Bf|Uf|zf,Lf));for(var o=t.length;o--;)Ff(r,t[o]);return r});const No=Vf;function Gf(e,t,r,n){if(!se(e))return e;t=Fe(t,e);for(var o=-1,a=t.length,i=a-1,s=e;s!=null&&++o<a;){var u=Le(t[o]),l=r;if(u==="__proto__"||u==="constructor"||u==="prototype")return e;if(o!=i){var f=s[u];l=n?n(f,u,s):void 0,l===void 0&&(l=se(f)?f:Nt(t[o+1])?[]:{})}sr(s,u,l),s=s[u]}return e}function Wf(e,t,r){for(var n=-1,o=t.length,a={};++n<o;){var i=t[n],s=Pt(e,i);r(s,i)&&Gf(a,Fe(i,e),s)}return a}function Hf(e,t){if(e==null)return{};var r=tr(_r(e),function(n){return[n]});return t=xr(t),Wf(e,r,function(n,o){return t(n,o[0])})}function Yf(e,t){return Hf(e,If(xr(t)))}var Jf=1/0,qf=Be&&1/wr(new Be([,-0]))[1]==Jf?function(e){return new Be(e)}:Yi;const Qf=qf;var Xf=200;function Kf(e,t,r){var n=-1,o=ss,a=e.length,i=!0,s=[],u=s;if(r)i=!1,o=$f;else if(a>=Xf){var l=t?null:Qf(e);if(l)return wr(l);i=!1,o=go,u=new mt}else u=t?[]:s;e:for(;++n<a;){var f=e[n],d=t?t(f):f;if(f=r||f!==0?f:0,i&&d===d){for(var p=u.length;p--;)if(u[p]===d)continue e;t&&u.push(d),s.push(f)}else o(u,d,r)||(u!==s&&u.push(d),s.push(f))}return s}var Zf=Pn(function(e){var t=xo(e);return Nr(t)&&(t=void 0),Kf(yr(e,1,Nr,!0),xr(t))});const ed=Zf;class To extends TypeError{constructor(t,r){let n;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=()=>n??(n=[t,...r()])}}function td(e){return ue(e)&&typeof e[Symbol.iterator]=="function"}function ue(e){return typeof e=="object"&&e!=null}function K(e){return typeof e=="symbol"?e.toString():typeof e=="string"?JSON.stringify(e):`${e}`}function rd(e){const{done:t,value:r}=e.next();return t?void 0:r}function nd(e,t,r,n){if(e===!0)return;e===!1?e={}:typeof e=="string"&&(e={message:e});const{path:o,branch:a}=t,{type:i}=r,{refinement:s,message:u=`Expected a value of type \`${i}\`${s?` with refinement \`${s}\``:""}, but received: \`${K(n)}\``}=e;return{value:n,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...e,message:u}}function*Ao(e,t,r,n){td(e)||(e=[e]);for(const o of e){const a=nd(o,t,r,n);a&&(yield a)}}function*Ar(e,t,r){r===void 0&&(r={});const{path:n=[],branch:o=[e],coerce:a=!1,mask:i=!1}=r,s={path:n,branch:o};if(a&&(e=t.coercer(e,s),i&&t.type!=="type"&&ue(t.schema)&&ue(e)&&!Array.isArray(e)))for(const l in e)t.schema[l]===void 0&&delete e[l];let u="valid";for(const l of t.validator(e,s))u="not_valid",yield[l,void 0];for(let[l,f,d]of t.entries(e,s)){const p=Ar(f,d,{path:l===void 0?n:[...n,l],branch:l===void 0?o:[...o,f],coerce:a,mask:i});for(const v of p)v[0]?(u=v[0].refinement!=null?"not_refined":"not_valid",yield[v[0],void 0]):a&&(f=v[1],l===void 0?e=f:e instanceof Map?e.set(l,f):e instanceof Set?e.add(f):ue(e)&&(f!==void 0||l in e)&&(e[l]=f))}if(u!=="not_valid")for(const l of t.refiner(e,s))u="not_refined",yield[l,void 0];u==="valid"&&(yield[void 0,e])}class pe{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:r,schema:n,validator:o,refiner:a,coercer:i=u=>u,entries:s=function*(){}}=t;this.type=r,this.schema=n,this.entries=s,this.coercer=i,o?this.validator=(u,l)=>{const f=o(u,l);return Ao(f,l,this,u)}:this.validator=()=>[],a?this.refiner=(u,l)=>{const f=a(u,l);return Ao(f,l,this,u)}:this.refiner=()=>[]}assert(t){return Mo(t,this)}create(t){return od(t,this)}is(t){return id(t,this)}mask(t){return ad(t,this)}validate(t,r){return r===void 0&&(r={}),Ue(t,this,r)}}function Mo(e,t){const r=Ue(e,t);if(r[0])throw r[0]}function od(e,t){const r=Ue(e,t,{coerce:!0});if(r[0])throw r[0];return r[1]}function ad(e,t){const r=Ue(e,t,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function id(e,t){return!Ue(e,t)[0]}function Ue(e,t,r){r===void 0&&(r={});const n=Ar(e,t,r),o=rd(n);return o[0]?[new To(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Mr(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];const n=t[0].type==="type",o=t.map(i=>i.schema),a=Object.assign({},...o);return n?ko(a):M(a)}function Ee(e,t){return new pe({type:e,schema:null,validator:t})}function ze(e){return new pe({type:"dynamic",schema:null,*entries(t,r){yield*e(t,r).entries(t,r)},validator(t,r){return e(t,r).validator(t,r)},coercer(t,r){return e(t,r).coercer(t,r)},refiner(t,r){return e(t,r).refiner(t,r)}})}function $o(e,t){const{schema:r}=e,n={...r};for(const o of t)delete n[o];switch(e.type){case"type":return ko(n);default:return M(n)}}function G(){return Ee("any",()=>!0)}function B(e){return new pe({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer(t){return Array.isArray(t)?t.slice():t},validator(t){return Array.isArray(t)||`Expected an array value, but received: ${K(t)}`}})}function me(){return Ee("boolean",e=>typeof e=="boolean")}function $r(e){const t={},r=e.map(n=>K(n)).join();for(const n of e)t[n]=n;return new pe({type:"enums",schema:t,validator(n){return e.includes(n)||`Expected one of \`${r}\`, but received: ${K(n)}`}})}function Po(){return Ee("func",e=>typeof e=="function"||`Expected a function, but received: ${K(e)}`)}function X(e){const t=K(e),r=typeof e;return new pe({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?e:null,validator(n){return n===e||`Expected the literal \`${t}\`, but received: ${K(n)}`}})}function sd(){return Ee("never",()=>!1)}function Do(){return Ee("number",e=>typeof e=="number"&&!isNaN(e)||`Expected a number, but received: ${K(e)}`)}function M(e){const t=e?Object.keys(e):[],r=sd();return new pe({type:"object",schema:e||null,*entries(n){if(e&&ue(n)){const o=new Set(Object.keys(n));for(const a of t)o.delete(a),yield[a,n[a],e[a]];for(const a of o)yield[a,n[a],r]}},validator(n){return ue(n)||`Expected an object, but received: ${K(n)}`},coercer(n){return ue(n)?{...n}:n}})}function g(e){return new pe({...e,validator:(t,r)=>t===void 0||e.validator(t,r),refiner:(t,r)=>t===void 0||e.refiner(t,r)})}function gt(e,t){return new pe({type:"record",schema:null,*entries(r){if(ue(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator(r){return ue(r)||`Expected an object, but received: ${K(r)}`}})}function m(){return Ee("string",e=>typeof e=="string"||`Expected a string, but received: ${K(e)}`)}function ko(e){const t=Object.keys(e);return new pe({type:"type",schema:e,*entries(r){if(ue(r))for(const n of t)yield[n,r[n],e[n]]},validator(r){return ue(r)||`Expected an object, but received: ${K(r)}`}})}function Y(e){const t=e.map(r=>r.type).join(" | ");return new pe({type:"union",schema:null,coercer(r,n){return(e.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||cd()).coercer(r,n)},validator(r,n){const o=[];for(const a of e){const[...i]=Ar(r,a,n),[s]=i;if(s[0])for(const[u]of i)u&&o.push(u);else return[]}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${K(r)}`,...o]}})}function cd(){return Ee("unknown",()=>!0)}const Pr=M({package:m(),version:m(),exportName:m(),destructuring:g(me()),subName:g(m()),main:g(m())}),ud=B(Pr),ld=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var oe=(e=>(e.SLOT="SLOT",e.FUNCTION="FUNCTION",e.EXPRESSION="EXPRESSION",e))(oe||{}),Dr=(e=>(e.DESIGN="design",e.SAVE="save",e))(Dr||{}),kr=(e=>(e.FUNC="FUNC",e.COMP="COMP",e))(kr||{});const fd=()=>Ee("normalObj",e=>!Q(e)||[oe.SLOT,oe.EXPRESSION,oe.FUNCTION].includes(e==null?void 0:e.type)?!1:(Ue(e,gt(m(),Ir)),!0)),Ir=Y([m(),Do(),me(),M({type:X(oe.SLOT),renderType:$r([kr.FUNC,kr.COMP]),params:g(B(m())),value:ze(()=>Y([Ve,B(Ve)]))}),M({type:X(oe.EXPRESSION),value:m()}),M({type:X(oe.FUNCTION),value:m()}),fd(),B(ze(()=>Ir))]),Io=M({type:X(oe.EXPRESSION),value:m()}),Ve=M({id:g(m()),title:g(m()),componentName:m(),props:g(gt(m(),Ir)),stateName:g(m()),state:g(gt(m(),G())),children:ze(()=>g(B(Y([m(),Ve])))),configure:g(G()),css:g(G()),style:g(G()),classNames:g(B(G())),refId:g(m()),extra:g(gt(G(),G())),condition:g(Y([me(),Io])),tempDevConfig:g(G()),loop:g(M({open:me(),data:Y([B(G()),Io]),args:g(B(m())),forName:g(m()),forIndex:g(m()),key:g(G()),name:g(m())}))}),It=Y([m(),M({label:m(),tip:g(m())})]),dd=M({type:X("shape"),value:B(M({name:m(),title:It,valueType:ze(()=>Ft)}))}),pd=M({type:X("enums"),value:B(m())});M({type:X("array"),value:ze(()=>Ft)});const hd=M({type:X("array"),value:ze(()=>B(Ft))}),Ft=Y([$r(["array","boolean","number","object","string"]),$r(["component","expression","function"]),dd,pd,hd]),vd=Y([m(),M({componentName:m(),props:g(G()),initialValue:g(G()),component:g(G())})]),Fr=M({name:m(),title:It,valueType:Ft,description:g(m()),defaultValue:G(),setters:g(B(vd)),condition:g(Po())}),yd=Y([m(),Po()]);var Lr=(e=>(e.SINGLE="single",e.GROUP="group",e))(Lr||{});Y([m(),M({name:m(),describe:g(m()),params:g(M({name:m(),description:m()})),template:m()})]);const md=M({id:g(m()),title:m(),snapshot:Y([m(),G()]),snapshotText:g(m()),description:g(m()),tags:g(B(m())),groupName:g(m()),category:g(m()),schema:Mr($o(Ve,["id"]),M({componentName:g(m())}))}),gd=M({componentName:m(),title:m(),screenshot:g(m()),icon:g(m()),tags:g(B(m())),groupName:g(m()),category:g(m()),priority:g(Do()),npm:g(Pr),snippets:B(md),props:B(Y([Fr,M({title:g(It),type:X("single"),content:Fr}),M({title:g(It),type:X("group"),content:B(Fr)})])),fixedProps:g(G()),isContainer:g(Y([me(),M({placeholder:m(),width:m(),height:m()})])),isModal:g(Y([me(),M({visibleKey:m()})])),isSupportStyle:g(me()),isSupportDispatchNativeEvent:g(me()),isLayout:g(me()),rootSelector:g(m()),selectionToolBars:g(B(yd)),extra:g(gt(G(),G()))}),bd=e=>({data:t,message:r,throwError:n})=>{const o=e({data:t,message:r,throwError:n});if(o.isValidate)return o;if(n)throw o.message||r?new Error(`${o.message||r}
28
28
  originData: ${JSON.stringify(t)}`):new Error(`${JSON.stringify(t)}
29
- data struct format is invalidate`);return o},Br=e=>{const{data:t,message:r,throwError:n,dataStruct:o}=e;return vd(({data:a})=>{try{return No(a,o),{isValidate:!0}}catch(i){let s=i;return i instanceof xo&&(s=i.failures().map(u=>`【${u.path.join(".")}】: ${u.message}
30
- `)),{isValidate:!1,message:s,error:i}}})({data:t,message:r,throwError:n})};var Ve=(e=>(e.ROOT_CONTAINER="RootContainer",e))(Ve||{});const yd=M({type:X(oe.FUNCTION),value:m()}),md=Mr(To(ze,["componentName"]),M({componentName:X("RootContainer")}));function gd(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(o){o(r)}),(n=e.get("*"))&&n.slice().map(function(o){o(t,r)})}}}const bt=gd(),bd=(e,t)=>{const r={...e,value:[]},n=e.value;let o=new Te([]);return t&&(o=t.materialsMode||new Te([])),n&&(L(n)?r.value=n.map(a=>new F(a,{parent:t,materials:o})):Q(n)&&r.value.push(new F(n,{parent:t,materials:o}))),r};class Ge{constructor(t,r){C(this,"nodeType","SLOT"),C(this,"rawData"),C(this,"parent"),C(this,"emitter",bt),C(this,"data"),C(this,"id"),C(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=t;const n=(r==null?void 0:r.materials)||new Te([]);this.materialsMode=n,this.id=he(),this.data=bd(t,this)}get value(){return this.data}export(t){const r=this.data,n=o=>{if(o instanceof F)return o.export(t);if(Q(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return L(o)?o.map(a=>n(a)):(t==="design"&&delete o.id,o)};return n(r)}}const Do=e=>{let t=[];return e.forEach(r=>{const n=r;n.type?n.type===Lr.SINGLE?t.push(n.content):n.type===Lr.GROUP&&(t=[...t,...Do(n.content)]):t.push(r)}),t},Ur=(e,t,r)=>{if(e.type)return e.type===oe.SLOT?new Ge(e,{parent:t,materials:r}):e;if(Q(e)){const n={};return Object.keys(e).forEach(o=>{n[o]=zr(e[o],t,r)}),n}else return Array.isArray(e)?e.map(n=>Ur(n,t,r)):e},zr=(e,t,r)=>Q(e)?Ur(e,t,r):L(e)?e.map(n=>Ur(n,t,r)):e;class Oe{constructor(t,r,n){C(this,"nodeType","PROP"),C(this,"rawData"),C(this,"parent"),C(this,"emitter",bt),C(this,"data"),C(this,"name"),C(this,"materialsMode");const o=(n==null?void 0:n.materials)||new Te([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=t,this.data=zr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const r=this.data;this.data=zr(t??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Ge)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof F){const r=t.material;return Do((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(t){const r=this.data,n=o=>{if(o instanceof Oe||o instanceof Ge||o instanceof F)return o.export(t);if(L(o))return o.map(a=>n(a));if(Q(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return o};return n(r)}}const _d=e=>{if(typeof e=="string")return!0;Br({data:e,dataStruct:ze,throwError:!0})},ko=(e,t,r=new Te([]))=>{if(typeof e=="string")return e;const n={...e,id:e.id??he(),children:[],props:{},configure:Co(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 Oe){n.props[a]=s;return}n.props[a]=new Oe(a,s||"",{parent:t,materials:r})}),e.children&&(Array.isArray(e.children)?n.children=e.children.map(a=>{if(a instanceof F)return a;if(Q(a)){const i=a;return new F(i,{parent:t,materials:r})}else return a}):(e.children instanceof F&&(n.children=[e.children]),n.children=[new F(e.children,{parent:t,materials:r})])),n};class F{constructor(t,r){C(this,"nodeType","NODE"),C(this,"rawData"),C(this,"data"),C(this,"emitter",bt),C(this,"parent"),C(this,"materialsModel"),C(this,"listenerHandle"),C(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),_d(t);const n=(r==null?void 0:r.materials)||new Te([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=ko(t,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};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(r=>r!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const r={...this.export("design"),id:t||he()};return new F(r,{materials:this.materialsModel})}updateValue(t){const r=this.data,n={...this.data,...t};this.data=ko(n,this),this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(t){return Wr(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,r={};return Object.keys(t.props||{}).forEach(n=>{r[n]=t.props[n].export("design")}),r}export(t){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(f=>{o[f]=n.props[f].export(t)});const a=(r=n.children)==null?void 0:r.map(f=>f instanceof F?f.export(t):f),i=n.configure||{},s=i.propsSetter||{},u={};Object.keys(s).forEach(f=>{const d=Un(s,f,!1);d&&(u[f]=d)}),i.propsSetter=u,this.material&&this.materialsModel.usedMaterials.push(this.material);let l={...n,configure:i,props:o,children:a};return t==="design"&&delete l.id,l=Gr(l),l}}const Io=(e,t,r)=>{const n={...e,id:he(),props:{},componentName:Ve.ROOT_CONTAINER,children:[],configure:Co(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];L(e.children)?o=e.children.map(i=>i instanceof F?i:Q(i)?new F(i,{parent:t,materials:r}):i):e.children instanceof F?o.push(e.children):e.children&&Q(e.children)&&o.push(new F(e.children,{parent:t,materials:r}));const a=Object.keys(e.props||{});return a.length&&a.forEach(i=>{var s;const u=(s=e.props)==null?void 0:s[i];u instanceof Oe?n.props[i]=u:n.props[i]=new Oe(i,u||"",{parent:t,materials:r})}),n.children=o,n};class _t{constructor(t,{parent:r,materials:n}){C(this,"rawData"),C(this,"data"),C(this,"nodeType",Ve.ROOT_CONTAINER),C(this,"emitter",bt),C(this,"materialsModel"),C(this,"listenerHandle"),C(this,"onChangeCbQueue"),C(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(t)),this.data=Io(t,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=r}registerListener(){const t=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};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(r=>r!==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)}updateValue(t){const r=this.data,n={...this.data,...t};this.data=Io(n,this,this.materialsModel),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(t){return Wr(this,t)}export(t=Dr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(u=>{o[u]=n.props[u].export(t)});const a=((r=n.children)==null?void 0:r.map(u=>{var l;return(l=u==null?void 0:u.export)==null?void 0:l.call(u,t)}))||[],i={...n,props:o,children:a.filter(u=>u)};let s=wo(i,["id"]);return s=Gr(s),s}getPlainProps(){const t=this.data,r={};return Object.keys(t.props||{}).forEach(n=>{r[n]=t.props[n].export("design")}),r}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const r={...this.export("design"),id:t||he()};return new _t(r,{materials:this.materialsModel,parent:null})}}const Ne=e=>(e==null?void 0:e.type)===oe.EXPRESSION,jd=e=>(e==null?void 0:e.type)==oe.FUNCTION,he=()=>Math.random().toString(32).slice(3,9),Ed=e=>(e==null?void 0:e.nodeType)==="NODE",Vr=e=>(e==null?void 0:e.nodeType)==="PROP",Od=e=>(e==null?void 0:e.nodeType)==="SLOT",Gr=e=>Vf(e,t=>Q(t)?!Object.keys(t).length:L(t)?!t.length:!t);function Wr(e,t){const r=[e];for(;r.length;){const n=r.shift();if((n==null?void 0:n.id)===t)return n;const o=(n==null?void 0:n.props)||{},a=s=>{if(s instanceof F){r.push(s);return}if(s instanceof Ge&&a(s.value.value),s instanceof Oe){a(s.value);return}if(Q(s)){const u=s;Object.keys(u).map(l=>{a(u[l])});return}if(L(s)){s.forEach(u=>{a(u)});return}};a(o);const i=(n==null?void 0:n.value.children.filter(s=>s instanceof F))||[];r.push(...i)}return null}const Sd=e=>{const t=ho(e),r=t.snippets;return delete t.snippets,t.snippets=r.map(n=>({...t,...n,id:n.id||`${e.componentName}-${he()}`,title:n.title||e.title,category:n.category||e.category,tags:[...n.tags||[],...e.tags||[]],groupName:n.groupName||e.groupName,snapshot:n.snapshot||e.icon,snapshotText:n.snapshotText,schema:{...n.schema,componentName:n.schema.componentName||e.componentName}})),t};class Cd{constructor(t){C(this,"rawData"),C(this,"data"),this.rawData=t,this.data=Sd(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(r=>r.id===t)}}const wd=e=>{if(!L(e))throw new Error("Materials must be a array");return e.map(t=>new Cd(t))},xd=e=>{e==null||e.forEach(t=>{Br({data:t,dataStruct:hd,throwError:!0})})};class Te{constructor(t){C(this,"rawData"),C(this,"data"),C(this,"usedMaterials",[]),this.rawData=t,xd(t),this.data=wd(t)}findByComponentName(t){return this.data.find(r=>r.componentName===t)}findSnippetById(t){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(t)}return n}getAllSnippets(){let t=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]);const r=[],n={default:[]};t=t.sort((a,i)=>(a.category||"")>(i.category||"")?1:-1),t.forEach(a=>{const i=a.groupName||"default";r.includes(i)||(r.push(i),n[i]=[]),n[i].push(a)});const o=[];return r.forEach(a=>{const i=["default"],s={default:[]},u=n[a];if(u.length!==0){u.forEach(d=>{const p=d.category||"default";i.includes(p)||(i.push(p),s[p]=[]),s[p].push(d)});const l=[];i.forEach(d=>{s[d].length&&l.push({name:d,list:s[d]})});const f={name:a,list:l};o.push(f)}}),o}get value(){return this.data}get rawValue(){return this.rawData}}const Rd=M({version:m(),name:m(),css:g(m()),renderType:g(Y([X("COMPONENT"),X("PAGE")])),methods:g(B(yd)),componentsMeta:B(Mr(M({componentName:m()}),Pr)),thirdLibs:g(ad),componentsTree:md,assets:g(B(G()))}),Fo=e=>(Br({data:e,dataStruct:Rd,throwError:!0}),e),Hr=(e,t,r)=>({...e,componentsTree:new _t(e.componentsTree,{parent:t,materials:r})});class Lt{constructor(t,r){C(this,"nodeType","PAGE"),C(this,"rawData"),C(this,"emitter",bt),C(this,"data"),C(this,"parent"),C(this,"materialsModel"),C(this,"assetPackagesList"),Fo(t),this.assetPackagesList=(r==null?void 0:r.assetPackagesList)||[],this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new Te((r==null?void 0:r.materials)||[]),this.data=Hr(t,this,this.materialsModel)}updatePage(t){const r=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=Hr(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(t){const r=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=Hr(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(t){const r=this.data.componentsTree;return Wr(r,t)}addNode(t,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof _t)return console.warn("Not found parent node"),!1;if(a instanceof Oe)return console.warn("CProp can not add node"),!1;if(a instanceof Ge){const s=a.value.value,u=s.findIndex(l=>l===r)??-1;return u>=0?(n==="BEFORE"?s.splice(u,0,t):s.splice(u+1,0,t),t.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof Lt)return!1;const i=(a==null?void 0:a.value.children.findIndex(s=>s===r))??-1;return i>=0?(n==="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(n==="CHILD_START")return r.value.children.unshift(t),t.parent=r,r.updateValue(),!0;if(n==="CHILD_END")return r.value.children.push(t),t.parent=r,r.updateValue(),!0;if(Q(n)){const a=n;if(a.type==="CHILD"){const i=a.pos,s=a.index||0;return i==="BEFORE"?r==null||r.value.children.splice(s,0,t):r==null||r.value.children.splice(s+1,0,t),t.parent=r,r.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new F(t,{parent:null,materials:this.materialsModel})}addNodeById(t,r,n="AFTER"){const o=this.getNode(r);return o?this.addNode(t,o,n):(console.warn(`Not find a node by ${r}, pls check it`),!1)}copyNode(t){const r=t.export("design");r.id=he();const n=new F(r,{parent:t.parent,materials:this.materialsModel});return this.addNode(n,t,"AFTER"),n}copyNodeById(t){const r=this.getNode(t);return r&&r instanceof F?this.copyNode(r):!1}moveNode(t,r,n){this.deleteNode(t);let o=r;return["AFTER","BEFORE"].includes(n)&&(o=r.parent),t.parent=o,this.addNode(t,r,n)}moveNodeById(t,r,n){const o=this.getNode(t),a=this.getNode(r);return o&&a&&o instanceof F&&a instanceof F?this.moveNode(o,a,n):!1}deleteNode(t){var r;const n=t.parent;if(!n)throw new Error("parent node is null or undefined, pls check it");if(n instanceof Ge){const o=n.value.value,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),i}if(n instanceof F||n instanceof _t){const o=n.value.children,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),n.updateValue(),i}}deleteNodeById(t){const r=this.getNode(t);if(r)return this.deleteNode(r)}export(t=Dr.SAVE){var r;const n=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(u=>{const l=o.find(f=>{var d;return f.package===((d=u.value.npm)==null?void 0:d.package)});return l&&a.push(l),{componentName:u.componentName,...ho(u.value.npm||{})}}).filter(u=>{if(u.componentName&&u.package&&u.version)return!0});this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:Gr(n),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(u=>{const l=o.find(f=>{f.package,f.package});l&&a.push(l)}),s.assets=Qf(a,u=>u.package),s=wo(s,["id"]),JSON.parse(JSON.stringify(s))}}Ve.ROOT_CONTAINER;var Nd=typeof global=="object"&&global&&global.Object===Object&&global;const Lo=Nd;var Td=typeof self=="object"&&self&&self.Object===Object&&self,Ad=Lo||Td||Function("return this")();const We=Ad;var Md=We.Symbol;const He=Md;var Bo=Object.prototype,$d=Bo.hasOwnProperty,Pd=Bo.toString,jt=He?He.toStringTag:void 0;function Dd(e){var t=$d.call(e,jt),r=e[jt];try{e[jt]=void 0;var n=!0}catch{}var o=Pd.call(e);return n&&(t?e[jt]=r:delete e[jt]),o}var kd=Object.prototype,Id=kd.toString;function Fd(e){return Id.call(e)}var Ld="[object Null]",Bd="[object Undefined]",Uo=He?He.toStringTag:void 0;function Et(e){return e==null?e===void 0?Bd:Ld:Uo&&Uo in Object(e)?Dd(e):Fd(e)}function Ye(e){return e!=null&&typeof e=="object"}var Ud="[object Symbol]";function zd(e){return typeof e=="symbol"||Ye(e)&&Et(e)==Ud}function Vd(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Gd=Array.isArray;const Je=Gd;var Wd=1/0,zo=He?He.prototype:void 0,Vo=zo?zo.toString:void 0;function Go(e){if(typeof e=="string")return e;if(Je(e))return Vd(e,Go)+"";if(zd(e))return Vo?Vo.call(e):"";var t=e+"";return t=="0"&&1/e==-Wd?"-0":t}function Ae(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Wo(e){return e}var Hd="[object AsyncFunction]",Yd="[object Function]",Jd="[object GeneratorFunction]",qd="[object Proxy]";function Yr(e){if(!Ae(e))return!1;var t=Et(e);return t==Yd||t==Jd||t==Hd||t==qd}var Qd=We["__core-js_shared__"];const Jr=Qd;var Ho=function(){var e=/[^.]+$/.exec(Jr&&Jr.keys&&Jr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function Xd(e){return!!Ho&&Ho in e}var Kd=Function.prototype,Zd=Kd.toString;function ep(e){if(e!=null){try{return Zd.call(e)}catch{}try{return e+""}catch{}}return""}var tp=/[\\^$.*+?()[\]{}|]/g,rp=/^\[object .+?Constructor\]$/,np=Function.prototype,op=Object.prototype,ap=np.toString,ip=op.hasOwnProperty,sp=RegExp("^"+ap.call(ip).replace(tp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function cp(e){if(!Ae(e)||Xd(e))return!1;var t=Yr(e)?sp:rp;return t.test(ep(e))}function up(e,t){return e==null?void 0:e[t]}function qr(e,t){var r=up(e,t);return cp(r)?r:void 0}var Yo=Object.create,lp=function(){function e(){}return function(t){if(!Ae(t))return{};if(Yo)return Yo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const fp=lp;function dp(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function pp(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var hp=800,vp=16,yp=Date.now;function mp(e){var t=0,r=0;return function(){var n=yp(),o=vp-(n-r);if(r=n,o>0){if(++t>=hp)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function gp(e){return function(){return e}}var bp=function(){try{var e=qr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Bt=bp;var _p=Bt?function(e,t){return Bt(e,"toString",{configurable:!0,enumerable:!1,value:gp(t),writable:!0})}:Wo,jp=mp(_p);const Ep=jp;var Op=9007199254740991,Sp=/^(?:0|[1-9]\d*)$/;function Jo(e,t){var r=typeof e;return t=t??Op,!!t&&(r=="number"||r!="symbol"&&Sp.test(e))&&e>-1&&e%1==0&&e<t}function Qr(e,t,r){t=="__proto__"&&Bt?Bt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Ut(e,t){return e===t||e!==e&&t!==t}var Cp=Object.prototype,wp=Cp.hasOwnProperty;function xp(e,t,r){var n=e[t];(!(wp.call(e,t)&&Ut(n,r))||r===void 0&&!(t in e))&&Qr(e,t,r)}function Rp(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),o?Qr(r,s,u):xp(r,s,u)}return r}var qo=Math.max;function Np(e,t,r){return t=qo(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=qo(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),dp(e,this,s)}}function Tp(e,t){return Ep(Np(e,t,Wo),e+"")}var Ap=9007199254740991;function Qo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Ap}function Xr(e){return e!=null&&Qo(e.length)&&!Yr(e)}function Mp(e,t,r){if(!Ae(r))return!1;var n=typeof t;return(n=="number"?Xr(r)&&Jo(t,r.length):n=="string"&&t in r)?Ut(r[t],e):!1}function $p(e){return Tp(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&Mp(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t})}var Pp=Object.prototype;function Xo(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Pp;return e===r}function Dp(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var kp="[object Arguments]";function Ko(e){return Ye(e)&&Et(e)==kp}var Zo=Object.prototype,Ip=Zo.hasOwnProperty,Fp=Zo.propertyIsEnumerable,Lp=Ko(function(){return arguments}())?Ko:function(e){return Ye(e)&&Ip.call(e,"callee")&&!Fp.call(e,"callee")};const Kr=Lp;function Bp(){return!1}var ea=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ta=ea&&typeof module=="object"&&module&&!module.nodeType&&module,Up=ta&&ta.exports===ea,ra=Up?We.Buffer:void 0,zp=ra?ra.isBuffer:void 0,Vp=zp||Bp;const na=Vp;var Gp="[object Arguments]",Wp="[object Array]",Hp="[object Boolean]",Yp="[object Date]",Jp="[object Error]",qp="[object Function]",Qp="[object Map]",Xp="[object Number]",Kp="[object Object]",Zp="[object RegExp]",eh="[object Set]",th="[object String]",rh="[object WeakMap]",nh="[object ArrayBuffer]",oh="[object DataView]",ah="[object Float32Array]",ih="[object Float64Array]",sh="[object Int8Array]",ch="[object Int16Array]",uh="[object Int32Array]",lh="[object Uint8Array]",fh="[object Uint8ClampedArray]",dh="[object Uint16Array]",ph="[object Uint32Array]",I={};I[ah]=I[ih]=I[sh]=I[ch]=I[uh]=I[lh]=I[fh]=I[dh]=I[ph]=!0,I[Gp]=I[Wp]=I[nh]=I[Hp]=I[oh]=I[Yp]=I[Jp]=I[qp]=I[Qp]=I[Xp]=I[Kp]=I[Zp]=I[eh]=I[th]=I[rh]=!1;function hh(e){return Ye(e)&&Qo(e.length)&&!!I[Et(e)]}function vh(e){return function(t){return e(t)}}var oa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ot=oa&&typeof module=="object"&&module&&!module.nodeType&&module,yh=Ot&&Ot.exports===oa,Zr=yh&&Lo.process,mh=function(){try{var e=Ot&&Ot.require&&Ot.require("util").types;return e||Zr&&Zr.binding&&Zr.binding("util")}catch{}}();const aa=mh;var ia=aa&&aa.isTypedArray,gh=ia?vh(ia):hh;const sa=gh;var bh=Object.prototype,_h=bh.hasOwnProperty;function jh(e,t){var r=Je(e),n=!r&&Kr(e),o=!r&&!n&&na(e),a=!r&&!n&&!o&&sa(e),i=r||n||o||a,s=i?Dp(e.length,String):[],u=s.length;for(var l in e)(t||_h.call(e,l))&&!(i&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Jo(l,u)))&&s.push(l);return s}function Eh(e,t){return function(r){return e(t(r))}}function Oh(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Sh=Object.prototype,Ch=Sh.hasOwnProperty;function wh(e){if(!Ae(e))return Oh(e);var t=Xo(e),r=[];for(var n in e)n=="constructor"&&(t||!Ch.call(e,n))||r.push(n);return r}function ca(e){return Xr(e)?jh(e,!0):wh(e)}var xh=qr(Object,"create");const St=xh;function Rh(){this.__data__=St?St(null):{},this.size=0}function Nh(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Th="__lodash_hash_undefined__",Ah=Object.prototype,Mh=Ah.hasOwnProperty;function $h(e){var t=this.__data__;if(St){var r=t[e];return r===Th?void 0:r}return Mh.call(t,e)?t[e]:void 0}var Ph=Object.prototype,Dh=Ph.hasOwnProperty;function kh(e){var t=this.__data__;return St?t[e]!==void 0:Dh.call(t,e)}var Ih="__lodash_hash_undefined__";function Fh(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=St&&t===void 0?Ih:t,this}function Me(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Me.prototype.clear=Rh,Me.prototype.delete=Nh,Me.prototype.get=$h,Me.prototype.has=kh,Me.prototype.set=Fh;function Lh(){this.__data__=[],this.size=0}function zt(e,t){for(var r=e.length;r--;)if(Ut(e[r][0],t))return r;return-1}var Bh=Array.prototype,Uh=Bh.splice;function zh(e){var t=this.__data__,r=zt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Uh.call(t,r,1),--this.size,!0}function Vh(e){var t=this.__data__,r=zt(t,e);return r<0?void 0:t[r][1]}function Gh(e){return zt(this.__data__,e)>-1}function Wh(e,t){var r=this.__data__,n=zt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ge.prototype.clear=Lh,ge.prototype.delete=zh,ge.prototype.get=Vh,ge.prototype.has=Gh,ge.prototype.set=Wh;var Hh=qr(We,"Map");const ua=Hh;function Yh(){this.size=0,this.__data__={hash:new Me,map:new(ua||ge),string:new Me}}function Jh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vt(e,t){var r=e.__data__;return Jh(t)?r[typeof t=="string"?"string":"hash"]:r.map}function qh(e){var t=Vt(this,e).delete(e);return this.size-=t?1:0,t}function Qh(e){return Vt(this,e).get(e)}function Xh(e){return Vt(this,e).has(e)}function Kh(e,t){var r=Vt(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}qe.prototype.clear=Yh,qe.prototype.delete=qh,qe.prototype.get=Qh,qe.prototype.has=Xh,qe.prototype.set=Kh;function la(e){return e==null?"":Go(e)}var Zh=Eh(Object.getPrototypeOf,Object);const fa=Zh;var ev="[object Object]",tv=Function.prototype,rv=Object.prototype,da=tv.toString,nv=rv.hasOwnProperty,ov=da.call(Object);function Qe(e){if(!Ye(e)||Et(e)!=ev)return!1;var t=fa(e);if(t===null)return!0;var r=nv.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&da.call(r)==ov}function av(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}function iv(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:av(e,t,r)}var sv="\\ud800-\\udfff",cv="\\u0300-\\u036f",uv="\\ufe20-\\ufe2f",lv="\\u20d0-\\u20ff",fv=cv+uv+lv,dv="\\ufe0e\\ufe0f",pv="\\u200d",hv=RegExp("["+pv+sv+fv+dv+"]");function pa(e){return hv.test(e)}function vv(e){return e.split("")}var ha="\\ud800-\\udfff",yv="\\u0300-\\u036f",mv="\\ufe20-\\ufe2f",gv="\\u20d0-\\u20ff",bv=yv+mv+gv,_v="\\ufe0e\\ufe0f",jv="["+ha+"]",en="["+bv+"]",tn="\\ud83c[\\udffb-\\udfff]",Ev="(?:"+en+"|"+tn+")",va="[^"+ha+"]",ya="(?:\\ud83c[\\udde6-\\uddff]){2}",ma="[\\ud800-\\udbff][\\udc00-\\udfff]",Ov="\\u200d",ga=Ev+"?",ba="["+_v+"]?",Sv="(?:"+Ov+"(?:"+[va,ya,ma].join("|")+")"+ba+ga+")*",Cv=ba+ga+Sv,wv="(?:"+[va+en+"?",en,ya,ma,jv].join("|")+")",xv=RegExp(tn+"(?="+tn+")|"+wv+Cv,"g");function Rv(e){return e.match(xv)||[]}function Nv(e){return pa(e)?Rv(e):vv(e)}function Tv(e){return function(t){t=la(t);var r=pa(t)?Nv(t):void 0,n=r?r[0]:t.charAt(0),o=r?iv(r,1).join(""):t.slice(1);return n[e]()+o}}var Av=Tv("toUpperCase");const Mv=Av;function $v(e){return Mv(la(e).toLowerCase())}function Pv(){this.__data__=new ge,this.size=0}function Dv(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function kv(e){return this.__data__.get(e)}function Iv(e){return this.__data__.has(e)}var Fv=200;function Lv(e,t){var r=this.__data__;if(r instanceof ge){var n=r.__data__;if(!ua||n.length<Fv-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new qe(n)}return r.set(e,t),this.size=r.size,this}function Xe(e){var t=this.__data__=new ge(e);this.size=t.size}Xe.prototype.clear=Pv,Xe.prototype.delete=Dv,Xe.prototype.get=kv,Xe.prototype.has=Iv,Xe.prototype.set=Lv;var _a=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ja=_a&&typeof module=="object"&&module&&!module.nodeType&&module,Bv=ja&&ja.exports===_a,Ea=Bv?We.Buffer:void 0,Oa=Ea?Ea.allocUnsafe:void 0;function Uv(e,t){if(t)return e.slice();var r=e.length,n=Oa?Oa(r):new e.constructor(r);return e.copy(n),n}var zv=We.Uint8Array;const Sa=zv;function Vv(e){var t=new e.constructor(e.byteLength);return new Sa(t).set(new Sa(e)),t}function Gv(e,t){var r=t?Vv(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function Wv(e){return typeof e.constructor=="function"&&!Xo(e)?fp(fa(e)):{}}function Hv(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),s=i.length;s--;){var u=i[e?s:++o];if(r(a[u],u,a)===!1)break}return t}}var Yv=Hv();const Jv=Yv;function rn(e,t,r){(r!==void 0&&!Ut(e[t],r)||r===void 0&&!(t in e))&&Qr(e,t,r)}function qv(e){return Ye(e)&&Xr(e)}function nn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function Qv(e){return Rp(e,ca(e))}function Xv(e,t,r,n,o,a,i){var s=nn(e,r),u=nn(t,r),l=i.get(u);if(l){rn(e,r,l);return}var f=a?a(s,u,r+"",e,t,i):void 0,d=f===void 0;if(d){var p=Je(u),v=!p&&na(u),b=!p&&!v&&sa(u);f=u,p||v||b?Je(s)?f=s:qv(s)?f=pp(s):v?(d=!1,f=Uv(u,!0)):b?(d=!1,f=Gv(u,!0)):f=[]:Qe(u)||Kr(u)?(f=s,Kr(s)?f=Qv(s):(!Ae(s)||Yr(s))&&(f=Wv(u))):d=!1}d&&(i.set(u,f),o(f,u,n,a,i),i.delete(u)),rn(e,r,f)}function Ca(e,t,r,n,o){e!==t&&Jv(t,function(a,i){if(o||(o=new Xe),Ae(a))Xv(e,t,i,r,Ca,n,o);else{var s=n?n(nn(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),rn(e,i,s)}},ca)}var Kv=$p(function(e,t,r){Ca(e,t,r)});const Zv=Kv;function ey(e){const t=e.prototype;return!!(t&&t.isReactComponent)}function ty(e){var t,r;const n=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===n||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((r=e==null?void 0:e.prototype)==null?void 0:r.setState)||e._forwardRef}function ry(e){class t extends x.Component{render(){return x.createElement(e,this.props)}}return t.displayName=e.displayName,t}const Ke=(e,t)=>{const r=n=>{const o=`
29
+ data struct format is invalidate`);return o},Br=e=>{const{data:t,message:r,throwError:n,dataStruct:o}=e;return bd(({data:a})=>{try{return Mo(a,o),{isValidate:!0}}catch(i){let s=i;return i instanceof To&&(s=i.failures().map(u=>`【${u.path.join(".")}】: ${u.message}
30
+ `)),{isValidate:!1,message:s,error:i}}})({data:t,message:r,throwError:n})};var Ge=(e=>(e.ROOT_CONTAINER="RootContainer",e))(Ge||{});const _d=M({type:X(oe.FUNCTION),value:m()}),jd=Mr($o(Ve,["componentName"]),M({componentName:X("RootContainer")}));function Ed(e){return{all:e=e||new Map,on:function(t,r){var n=e.get(t);n?n.push(r):e.set(t,[r])},off:function(t,r){var n=e.get(t);n&&(r?n.splice(n.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var n=e.get(t);n&&n.slice().map(function(o){o(r)}),(n=e.get("*"))&&n.slice().map(function(o){o(t,r)})}}}const bt=Ed(),Od=(e,t)=>{const r={...e,value:[]},n=e.value;let o=new Te([]);return t&&(o=t.materialsMode||new Te([])),n&&(L(n)?r.value=n.map(a=>new F(a,{parent:t,materials:o})):Q(n)&&r.value.push(new F(n,{parent:t,materials:o}))),r};class We{constructor(t,r){C(this,"nodeType","SLOT"),C(this,"rawData"),C(this,"parent"),C(this,"emitter",bt),C(this,"data"),C(this,"id"),C(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=t;const n=(r==null?void 0:r.materials)||new Te([]);this.materialsMode=n,this.id=he(),this.data=Od(t,this)}get value(){return this.data}export(t){const r=this.data,n=o=>{if(o instanceof F)return o.export(t);if(Q(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return L(o)?o.map(a=>n(a)):(t==="design"&&delete o.id,o)};return n(r)}}const Fo=e=>{let t=[];return e.forEach(r=>{const n=r;n.type?n.type===Lr.SINGLE?t.push(n.content):n.type===Lr.GROUP&&(t=[...t,...Fo(n.content)]):t.push(r)}),t},Ur=(e,t,r)=>{if(e.type)return e.type===oe.SLOT?new We(e,{parent:t,materials:r}):e;if(Q(e)){const n={};return Object.keys(e).forEach(o=>{n[o]=zr(e[o],t,r)}),n}else return Array.isArray(e)?e.map(n=>Ur(n,t,r)):e},zr=(e,t,r)=>Q(e)?Ur(e,t,r):L(e)?e.map(n=>Ur(n,t,r)):e;class Oe{constructor(t,r,n){C(this,"nodeType","PROP"),C(this,"rawData"),C(this,"parent"),C(this,"emitter",bt),C(this,"data"),C(this,"name"),C(this,"materialsMode");const o=(n==null?void 0:n.materials)||new Te([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=t,this.data=zr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(t){const r=this.data;this.data=zr(t??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof We)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const t=this.parent;if(t instanceof F){const r=t.material;return Fo((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(t){const r=this.data,n=o=>{if(o instanceof Oe||o instanceof We||o instanceof F)return o.export(t);if(L(o))return o.map(a=>n(a));if(Q(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return o};return n(r)}}const wd=e=>{if(typeof e=="string")return!0;Br({data:e,dataStruct:Ve,throwError:!0})},Lo=(e,t,r=new Te([]))=>{if(typeof e=="string")return e;const n={...e,id:e.id??he(),children:[],props:{},configure:Ro(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 Oe){n.props[a]=s;return}n.props[a]=new Oe(a,s||"",{parent:t,materials:r})}),e.children&&(Array.isArray(e.children)?n.children=e.children.map(a=>{if(a instanceof F)return a;if(Q(a)){const i=a;return new F(i,{parent:t,materials:r})}else return a}):(e.children instanceof F&&(n.children=[e.children]),n.children=[new F(e.children,{parent:t,materials:r})])),n};class F{constructor(t,r){C(this,"nodeType","NODE"),C(this,"rawData"),C(this,"data"),C(this,"emitter",bt),C(this,"parent"),C(this,"materialsModel"),C(this,"listenerHandle"),C(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(t)),wd(t);const n=(r==null?void 0:r.materials)||new Te([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=Lo(t,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const t=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};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(r=>r!==t)}}destroy(){this.listenerHandle.forEach(t=>t())}get id(){return this.data.id}get value(){return this.data}clone(t){const r={...this.export("design"),id:t||he()};return new F(r,{materials:this.materialsModel})}updateValue(t){const r=this.data,n={...this.data,...t};this.data=Lo(n,this),this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(t){return Wr(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,r={};return Object.keys(t.props||{}).forEach(n=>{r[n]=t.props[n].export("design")}),r}export(t){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(f=>{o[f]=n.props[f].export(t)});const a=(r=n.children)==null?void 0:r.map(f=>f instanceof F?f.export(t):f),i=n.configure||{},s=i.propsSetter||{},u={};Object.keys(s).forEach(f=>{const d=Gn(s,f,!1);d&&(u[f]=d)}),i.propsSetter=u,this.material&&this.materialsModel.usedMaterials.push(this.material);let l={...n,configure:i,props:o,children:a};return t==="design"&&delete l.id,l=Gr(l),l}}const Bo=(e,t,r)=>{const n={...e,id:he(),props:{},componentName:Ge.ROOT_CONTAINER,children:[],configure:Ro(e.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];L(e.children)?o=e.children.map(i=>i instanceof F?i:Q(i)?new F(i,{parent:t,materials:r}):i):e.children instanceof F?o.push(e.children):e.children&&Q(e.children)&&o.push(new F(e.children,{parent:t,materials:r}));const a=Object.keys(e.props||{});return a.length&&a.forEach(i=>{var s;const u=(s=e.props)==null?void 0:s[i];u instanceof Oe?n.props[i]=u:n.props[i]=new Oe(i,u||"",{parent:t,materials:r})}),n.children=o,n};class _t{constructor(t,{parent:r,materials:n}){C(this,"rawData"),C(this,"data"),C(this,"nodeType",Ge.ROOT_CONTAINER),C(this,"emitter",bt),C(this,"materialsModel"),C(this,"listenerHandle"),C(this,"onChangeCbQueue"),C(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(t)),this.data=Bo(t,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=r}registerListener(){const t=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};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(r=>r!==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)}updateValue(t){const r=this.data,n={...this.data,...t};this.data=Bo(n,this,this.materialsModel),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(t){return Wr(this,t)}export(t=Dr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(u=>{o[u]=n.props[u].export(t)});const a=((r=n.children)==null?void 0:r.map(u=>{var l;return(l=u==null?void 0:u.export)==null?void 0:l.call(u,t)}))||[],i={...n,props:o,children:a.filter(u=>u)};let s=No(i,["id"]);return s=Gr(s),s}getPlainProps(){const t=this.data,r={};return Object.keys(t.props||{}).forEach(n=>{r[n]=t.props[n].export("design")}),r}destroy(){this.listenerHandle.forEach(t=>t())}clone(t){const r={...this.export("design"),id:t||he()};return new _t(r,{materials:this.materialsModel,parent:null})}}const Ne=e=>(e==null?void 0:e.type)===oe.EXPRESSION,Cd=e=>(e==null?void 0:e.type)==oe.FUNCTION,he=()=>Math.random().toString(32).slice(3,9),Sd=e=>(e==null?void 0:e.nodeType)==="NODE",Vr=e=>(e==null?void 0:e.nodeType)==="PROP",xd=e=>(e==null?void 0:e.nodeType)==="SLOT",Gr=e=>Yf(e,t=>Q(t)?!Object.keys(t).length:L(t)?!t.length:!t);function Wr(e,t){const r=[e];for(;r.length;){const n=r.shift();if((n==null?void 0:n.id)===t)return n;const o=(n==null?void 0:n.props)||{},a=s=>{if(s instanceof F){r.push(s);return}if(s instanceof We&&a(s.value.value),s instanceof Oe){a(s.value);return}if(Q(s)){const u=s;Object.keys(u).map(l=>{a(u[l])});return}if(L(s)){s.forEach(u=>{a(u)});return}};a(o);const i=(n==null?void 0:n.value.children.filter(s=>s instanceof F))||[];r.push(...i)}return null}const Rd=e=>{const t=mo(e),r=t.snippets;return delete t.snippets,t.snippets=r.map(n=>({...t,...n,id:n.id||`${e.componentName}-${he()}`,title:n.title||e.title,category:n.category||e.category,tags:[...n.tags||[],...e.tags||[]],groupName:n.groupName||e.groupName,snapshot:n.snapshot||e.icon,snapshotText:n.snapshotText,schema:{...n.schema,componentName:n.schema.componentName||e.componentName}})),t};class Nd{constructor(t){C(this,"rawData"),C(this,"data"),this.rawData=t,this.data=Rd(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(r=>r.id===t)}}const Td=e=>{if(!L(e))throw new Error("Materials must be a array");return e.map(t=>new Nd(t))},Ad=e=>{e==null||e.forEach(t=>{Br({data:t,dataStruct:gd,throwError:!0})})};class Te{constructor(t){C(this,"rawData"),C(this,"data"),C(this,"usedMaterials",[]),this.rawData=t,Ad(t),this.data=Td(t)}findByComponentName(t){return this.data.find(r=>r.componentName===t)}findSnippetById(t){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(t)}return n}getAllSnippets(){let t=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]);const r=[],n={default:[]};t=t.sort((a,i)=>(a.category||"")>(i.category||"")?1:-1),t.forEach(a=>{const i=a.groupName||"default";r.includes(i)||(r.push(i),n[i]=[]),n[i].push(a)});const o=[];return r.forEach(a=>{const i=["default"],s={default:[]},u=n[a];if(u.length!==0){u.forEach(d=>{const p=d.category||"default";i.includes(p)||(i.push(p),s[p]=[]),s[p].push(d)});const l=[];i.forEach(d=>{s[d].length&&l.push({name:d,list:s[d]})});const f={name:a,list:l};o.push(f)}}),o}get value(){return this.data}get rawValue(){return this.rawData}}const Md=M({version:m(),name:m(),css:g(m()),renderType:g(Y([X("COMPONENT"),X("PAGE")])),methods:g(B(_d)),componentsMeta:B(Mr(M({componentName:m()}),Pr)),thirdLibs:g(ud),componentsTree:jd,assets:g(B(G()))}),Uo=e=>(Br({data:e,dataStruct:Md,throwError:!0}),e),Hr=(e,t,r)=>({...e,componentsTree:new _t(e.componentsTree,{parent:t,materials:r})});class Lt{constructor(t,r){C(this,"nodeType","PAGE"),C(this,"rawData"),C(this,"emitter",bt),C(this,"data"),C(this,"parent"),C(this,"materialsModel"),C(this,"assetPackagesList"),Uo(t),this.assetPackagesList=(r==null?void 0:r.assetPackagesList)||[],this.rawData=JSON.parse(JSON.stringify(t)),this.materialsModel=new Te((r==null?void 0:r.materials)||[]),this.data=Hr(t,this,this.materialsModel)}updatePage(t){const r=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=Hr(t,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(t){const r=this.data;this.rawData=JSON.parse(JSON.stringify(t)),this.data=Hr(t,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(t){const r=this.data.componentsTree;return Wr(r,t)}addNode(t,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof _t)return console.warn("Not found parent node"),!1;if(a instanceof Oe)return console.warn("CProp can not add node"),!1;if(a instanceof We){const s=a.value.value,u=s.findIndex(l=>l===r)??-1;return u>=0?(n==="BEFORE"?s.splice(u,0,t):s.splice(u+1,0,t),t.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof Lt)return!1;const i=(a==null?void 0:a.value.children.findIndex(s=>s===r))??-1;return i>=0?(n==="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(n==="CHILD_START")return r.value.children.unshift(t),t.parent=r,r.updateValue(),!0;if(n==="CHILD_END")return r.value.children.push(t),t.parent=r,r.updateValue(),!0;if(Q(n)){const a=n;if(a.type==="CHILD"){const i=a.pos,s=a.index||0;return i==="BEFORE"?r==null||r.value.children.splice(s,0,t):r==null||r.value.children.splice(s+1,0,t),t.parent=r,r.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(t){return delete t.id,new F(t,{parent:null,materials:this.materialsModel})}addNodeById(t,r,n="AFTER"){const o=this.getNode(r);return o?this.addNode(t,o,n):(console.warn(`Not find a node by ${r}, pls check it`),!1)}copyNode(t){const r=t.export("design");r.id=he();const n=new F(r,{parent:t.parent,materials:this.materialsModel});return this.addNode(n,t,"AFTER"),n}copyNodeById(t){const r=this.getNode(t);return r&&r instanceof F?this.copyNode(r):!1}moveNode(t,r,n){this.deleteNode(t);let o=r;return["AFTER","BEFORE"].includes(n)&&(o=r.parent),t.parent=o,this.addNode(t,r,n)}moveNodeById(t,r,n){const o=this.getNode(t),a=this.getNode(r);return o&&a&&o instanceof F&&a instanceof F?this.moveNode(o,a,n):!1}deleteNode(t){var r;const n=t.parent;if(!n)throw new Error("parent node is null or undefined, pls check it");if(n instanceof We){const o=n.value.value,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),i}if(n instanceof F||n instanceof _t){const o=n.value.children,a=o.findIndex(s=>s===t),i=o[a];return o.splice(a,1),n.updateValue(),i}}deleteNodeById(t){const r=this.getNode(t);if(r)return this.deleteNode(r)}export(t=Dr.SAVE){var r;const n=this.data.componentsTree.export(t),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(u=>{const l=o.find(f=>{var d;return f.package===((d=u.value.npm)==null?void 0:d.package)});return l&&a.push(l),{componentName:u.componentName,...mo(u.value.npm||{})}}).filter(u=>{if(u.componentName&&u.package&&u.version)return!0});this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:Gr(n),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(u=>{const l=o.find(f=>{f.package,f.package});l&&a.push(l)}),s.assets=ed(a,u=>u.package),s=No(s,["id"]),JSON.parse(JSON.stringify(s))}}Ge.ROOT_CONTAINER;var $d=typeof global=="object"&&global&&global.Object===Object&&global;const zo=$d;var Pd=typeof self=="object"&&self&&self.Object===Object&&self,Dd=zo||Pd||Function("return this")();const He=Dd;var kd=He.Symbol;const Ye=kd;var Vo=Object.prototype,Id=Vo.hasOwnProperty,Fd=Vo.toString,jt=Ye?Ye.toStringTag:void 0;function Ld(e){var t=Id.call(e,jt),r=e[jt];try{e[jt]=void 0;var n=!0}catch{}var o=Fd.call(e);return n&&(t?e[jt]=r:delete e[jt]),o}var Bd=Object.prototype,Ud=Bd.toString;function zd(e){return Ud.call(e)}var Vd="[object Null]",Gd="[object Undefined]",Go=Ye?Ye.toStringTag:void 0;function Et(e){return e==null?e===void 0?Gd:Vd:Go&&Go in Object(e)?Ld(e):zd(e)}function Je(e){return e!=null&&typeof e=="object"}var Wd="[object Symbol]";function Hd(e){return typeof e=="symbol"||Je(e)&&Et(e)==Wd}function Yd(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var Jd=Array.isArray;const qe=Jd;var qd=1/0,Wo=Ye?Ye.prototype:void 0,Ho=Wo?Wo.toString:void 0;function Yo(e){if(typeof e=="string")return e;if(qe(e))return Yd(e,Yo)+"";if(Hd(e))return Ho?Ho.call(e):"";var t=e+"";return t=="0"&&1/e==-qd?"-0":t}function Ae(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function Jo(e){return e}var Qd="[object AsyncFunction]",Xd="[object Function]",Kd="[object GeneratorFunction]",Zd="[object Proxy]";function Yr(e){if(!Ae(e))return!1;var t=Et(e);return t==Xd||t==Kd||t==Qd||t==Zd}var ep=He["__core-js_shared__"];const Jr=ep;var qo=function(){var e=/[^.]+$/.exec(Jr&&Jr.keys&&Jr.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function tp(e){return!!qo&&qo in e}var rp=Function.prototype,np=rp.toString;function op(e){if(e!=null){try{return np.call(e)}catch{}try{return e+""}catch{}}return""}var ap=/[\\^$.*+?()[\]{}|]/g,ip=/^\[object .+?Constructor\]$/,sp=Function.prototype,cp=Object.prototype,up=sp.toString,lp=cp.hasOwnProperty,fp=RegExp("^"+up.call(lp).replace(ap,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dp(e){if(!Ae(e)||tp(e))return!1;var t=Yr(e)?fp:ip;return t.test(op(e))}function pp(e,t){return e==null?void 0:e[t]}function qr(e,t){var r=pp(e,t);return dp(r)?r:void 0}var Qo=Object.create,hp=function(){function e(){}return function(t){if(!Ae(t))return{};if(Qo)return Qo(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();const vp=hp;function yp(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function mp(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var gp=800,bp=16,_p=Date.now;function jp(e){var t=0,r=0;return function(){var n=_p(),o=bp-(n-r);if(r=n,o>0){if(++t>=gp)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Ep(e){return function(){return e}}var Op=function(){try{var e=qr(Object,"defineProperty");return e({},"",{}),e}catch{}}();const Bt=Op;var wp=Bt?function(e,t){return Bt(e,"toString",{configurable:!0,enumerable:!1,value:Ep(t),writable:!0})}:Jo,Cp=jp(wp);const Sp=Cp;var xp=9007199254740991,Rp=/^(?:0|[1-9]\d*)$/;function Xo(e,t){var r=typeof e;return t=t??xp,!!t&&(r=="number"||r!="symbol"&&Rp.test(e))&&e>-1&&e%1==0&&e<t}function Qr(e,t,r){t=="__proto__"&&Bt?Bt(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}function Ut(e,t){return e===t||e!==e&&t!==t}var Np=Object.prototype,Tp=Np.hasOwnProperty;function Ap(e,t,r){var n=e[t];(!(Tp.call(e,t)&&Ut(n,r))||r===void 0&&!(t in e))&&Qr(e,t,r)}function Mp(e,t,r,n){var o=!r;r||(r={});for(var a=-1,i=t.length;++a<i;){var s=t[a],u=n?n(r[s],e[s],s,r,e):void 0;u===void 0&&(u=e[s]),o?Qr(r,s,u):Ap(r,s,u)}return r}var Ko=Math.max;function $p(e,t,r){return t=Ko(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,a=Ko(n.length-t,0),i=Array(a);++o<a;)i[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(i),yp(e,this,s)}}function Pp(e,t){return Sp($p(e,t,Jo),e+"")}var Dp=9007199254740991;function Zo(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Dp}function Xr(e){return e!=null&&Zo(e.length)&&!Yr(e)}function kp(e,t,r){if(!Ae(r))return!1;var n=typeof t;return(n=="number"?Xr(r)&&Xo(t,r.length):n=="string"&&t in r)?Ut(r[t],e):!1}function Ip(e){return Pp(function(t,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(o--,a):void 0,i&&kp(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,a)}return t})}var Fp=Object.prototype;function ea(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Fp;return e===r}function Lp(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var Bp="[object Arguments]";function ta(e){return Je(e)&&Et(e)==Bp}var ra=Object.prototype,Up=ra.hasOwnProperty,zp=ra.propertyIsEnumerable,Vp=ta(function(){return arguments}())?ta:function(e){return Je(e)&&Up.call(e,"callee")&&!zp.call(e,"callee")};const Kr=Vp;function Gp(){return!1}var na=typeof exports=="object"&&exports&&!exports.nodeType&&exports,oa=na&&typeof module=="object"&&module&&!module.nodeType&&module,Wp=oa&&oa.exports===na,aa=Wp?He.Buffer:void 0,Hp=aa?aa.isBuffer:void 0,Yp=Hp||Gp;const ia=Yp;var Jp="[object Arguments]",qp="[object Array]",Qp="[object Boolean]",Xp="[object Date]",Kp="[object Error]",Zp="[object Function]",eh="[object Map]",th="[object Number]",rh="[object Object]",nh="[object RegExp]",oh="[object Set]",ah="[object String]",ih="[object WeakMap]",sh="[object ArrayBuffer]",ch="[object DataView]",uh="[object Float32Array]",lh="[object Float64Array]",fh="[object Int8Array]",dh="[object Int16Array]",ph="[object Int32Array]",hh="[object Uint8Array]",vh="[object Uint8ClampedArray]",yh="[object Uint16Array]",mh="[object Uint32Array]",I={};I[uh]=I[lh]=I[fh]=I[dh]=I[ph]=I[hh]=I[vh]=I[yh]=I[mh]=!0,I[Jp]=I[qp]=I[sh]=I[Qp]=I[ch]=I[Xp]=I[Kp]=I[Zp]=I[eh]=I[th]=I[rh]=I[nh]=I[oh]=I[ah]=I[ih]=!1;function gh(e){return Je(e)&&Zo(e.length)&&!!I[Et(e)]}function bh(e){return function(t){return e(t)}}var sa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ot=sa&&typeof module=="object"&&module&&!module.nodeType&&module,_h=Ot&&Ot.exports===sa,Zr=_h&&zo.process,jh=function(){try{var e=Ot&&Ot.require&&Ot.require("util").types;return e||Zr&&Zr.binding&&Zr.binding("util")}catch{}}();const ca=jh;var ua=ca&&ca.isTypedArray,Eh=ua?bh(ua):gh;const la=Eh;var Oh=Object.prototype,wh=Oh.hasOwnProperty;function Ch(e,t){var r=qe(e),n=!r&&Kr(e),o=!r&&!n&&ia(e),a=!r&&!n&&!o&&la(e),i=r||n||o||a,s=i?Lp(e.length,String):[],u=s.length;for(var l in e)(t||wh.call(e,l))&&!(i&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||Xo(l,u)))&&s.push(l);return s}function Sh(e,t){return function(r){return e(t(r))}}function xh(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Rh=Object.prototype,Nh=Rh.hasOwnProperty;function Th(e){if(!Ae(e))return xh(e);var t=ea(e),r=[];for(var n in e)n=="constructor"&&(t||!Nh.call(e,n))||r.push(n);return r}function fa(e){return Xr(e)?Ch(e,!0):Th(e)}var Ah=qr(Object,"create");const wt=Ah;function Mh(){this.__data__=wt?wt(null):{},this.size=0}function $h(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Ph="__lodash_hash_undefined__",Dh=Object.prototype,kh=Dh.hasOwnProperty;function Ih(e){var t=this.__data__;if(wt){var r=t[e];return r===Ph?void 0:r}return kh.call(t,e)?t[e]:void 0}var Fh=Object.prototype,Lh=Fh.hasOwnProperty;function Bh(e){var t=this.__data__;return wt?t[e]!==void 0:Lh.call(t,e)}var Uh="__lodash_hash_undefined__";function zh(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=wt&&t===void 0?Uh:t,this}function Me(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Me.prototype.clear=Mh,Me.prototype.delete=$h,Me.prototype.get=Ih,Me.prototype.has=Bh,Me.prototype.set=zh;function Vh(){this.__data__=[],this.size=0}function zt(e,t){for(var r=e.length;r--;)if(Ut(e[r][0],t))return r;return-1}var Gh=Array.prototype,Wh=Gh.splice;function Hh(e){var t=this.__data__,r=zt(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():Wh.call(t,r,1),--this.size,!0}function Yh(e){var t=this.__data__,r=zt(t,e);return r<0?void 0:t[r][1]}function Jh(e){return zt(this.__data__,e)>-1}function qh(e,t){var r=this.__data__,n=zt(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}function ge(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}ge.prototype.clear=Vh,ge.prototype.delete=Hh,ge.prototype.get=Yh,ge.prototype.has=Jh,ge.prototype.set=qh;var Qh=qr(He,"Map");const da=Qh;function Xh(){this.size=0,this.__data__={hash:new Me,map:new(da||ge),string:new Me}}function Kh(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Vt(e,t){var r=e.__data__;return Kh(t)?r[typeof t=="string"?"string":"hash"]:r.map}function Zh(e){var t=Vt(this,e).delete(e);return this.size-=t?1:0,t}function ev(e){return Vt(this,e).get(e)}function tv(e){return Vt(this,e).has(e)}function rv(e,t){var r=Vt(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}function Qe(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Qe.prototype.clear=Xh,Qe.prototype.delete=Zh,Qe.prototype.get=ev,Qe.prototype.has=tv,Qe.prototype.set=rv;function pa(e){return e==null?"":Yo(e)}var nv=Sh(Object.getPrototypeOf,Object);const ha=nv;var ov="[object Object]",av=Function.prototype,iv=Object.prototype,va=av.toString,sv=iv.hasOwnProperty,cv=va.call(Object);function Xe(e){if(!Je(e)||Et(e)!=ov)return!1;var t=ha(e);if(t===null)return!0;var r=sv.call(t,"constructor")&&t.constructor;return typeof r=="function"&&r instanceof r&&va.call(r)==cv}function uv(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(o);++n<o;)a[n]=e[n+t];return a}function lv(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:uv(e,t,r)}var fv="\\ud800-\\udfff",dv="\\u0300-\\u036f",pv="\\ufe20-\\ufe2f",hv="\\u20d0-\\u20ff",vv=dv+pv+hv,yv="\\ufe0e\\ufe0f",mv="\\u200d",gv=RegExp("["+mv+fv+vv+yv+"]");function ya(e){return gv.test(e)}function bv(e){return e.split("")}var ma="\\ud800-\\udfff",_v="\\u0300-\\u036f",jv="\\ufe20-\\ufe2f",Ev="\\u20d0-\\u20ff",Ov=_v+jv+Ev,wv="\\ufe0e\\ufe0f",Cv="["+ma+"]",en="["+Ov+"]",tn="\\ud83c[\\udffb-\\udfff]",Sv="(?:"+en+"|"+tn+")",ga="[^"+ma+"]",ba="(?:\\ud83c[\\udde6-\\uddff]){2}",_a="[\\ud800-\\udbff][\\udc00-\\udfff]",xv="\\u200d",ja=Sv+"?",Ea="["+wv+"]?",Rv="(?:"+xv+"(?:"+[ga,ba,_a].join("|")+")"+Ea+ja+")*",Nv=Ea+ja+Rv,Tv="(?:"+[ga+en+"?",en,ba,_a,Cv].join("|")+")",Av=RegExp(tn+"(?="+tn+")|"+Tv+Nv,"g");function Mv(e){return e.match(Av)||[]}function $v(e){return ya(e)?Mv(e):bv(e)}function Pv(e){return function(t){t=pa(t);var r=ya(t)?$v(t):void 0,n=r?r[0]:t.charAt(0),o=r?lv(r,1).join(""):t.slice(1);return n[e]()+o}}var Dv=Pv("toUpperCase");const kv=Dv;function Iv(e){return kv(pa(e).toLowerCase())}function Fv(){this.__data__=new ge,this.size=0}function Lv(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function Bv(e){return this.__data__.get(e)}function Uv(e){return this.__data__.has(e)}var zv=200;function Vv(e,t){var r=this.__data__;if(r instanceof ge){var n=r.__data__;if(!da||n.length<zv-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Qe(n)}return r.set(e,t),this.size=r.size,this}function Ke(e){var t=this.__data__=new ge(e);this.size=t.size}Ke.prototype.clear=Fv,Ke.prototype.delete=Lv,Ke.prototype.get=Bv,Ke.prototype.has=Uv,Ke.prototype.set=Vv;var Oa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wa=Oa&&typeof module=="object"&&module&&!module.nodeType&&module,Gv=wa&&wa.exports===Oa,Ca=Gv?He.Buffer:void 0,Sa=Ca?Ca.allocUnsafe:void 0;function Wv(e,t){if(t)return e.slice();var r=e.length,n=Sa?Sa(r):new e.constructor(r);return e.copy(n),n}var Hv=He.Uint8Array;const xa=Hv;function Yv(e){var t=new e.constructor(e.byteLength);return new xa(t).set(new xa(e)),t}function Jv(e,t){var r=t?Yv(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}function qv(e){return typeof e.constructor=="function"&&!ea(e)?vp(ha(e)):{}}function Qv(e){return function(t,r,n){for(var o=-1,a=Object(t),i=n(t),s=i.length;s--;){var u=i[e?s:++o];if(r(a[u],u,a)===!1)break}return t}}var Xv=Qv();const Kv=Xv;function rn(e,t,r){(r!==void 0&&!Ut(e[t],r)||r===void 0&&!(t in e))&&Qr(e,t,r)}function Zv(e){return Je(e)&&Xr(e)}function nn(e,t){if(!(t==="constructor"&&typeof e[t]=="function")&&t!="__proto__")return e[t]}function ey(e){return Mp(e,fa(e))}function ty(e,t,r,n,o,a,i){var s=nn(e,r),u=nn(t,r),l=i.get(u);if(l){rn(e,r,l);return}var f=a?a(s,u,r+"",e,t,i):void 0,d=f===void 0;if(d){var p=qe(u),v=!p&&ia(u),b=!p&&!v&&la(u);f=u,p||v||b?qe(s)?f=s:Zv(s)?f=mp(s):v?(d=!1,f=Wv(u,!0)):b?(d=!1,f=Jv(u,!0)):f=[]:Xe(u)||Kr(u)?(f=s,Kr(s)?f=ey(s):(!Ae(s)||Yr(s))&&(f=qv(u))):d=!1}d&&(i.set(u,f),o(f,u,n,a,i),i.delete(u)),rn(e,r,f)}function Ra(e,t,r,n,o){e!==t&&Kv(t,function(a,i){if(o||(o=new Ke),Ae(a))ty(e,t,i,r,Ra,n,o);else{var s=n?n(nn(e,i),a,i+"",e,t,o):void 0;s===void 0&&(s=a),rn(e,i,s)}},fa)}var ry=Ip(function(e,t,r){Ra(e,t,r)});const ny=ry,oy=function(e){return!(!e||typeof e!="function"||!e.prototype)};function Na(e){const t=e.prototype;return!!(t&&t.isReactComponent)}function Ta(e){var t,r;const n=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(e==null?void 0:e.$$typeof)===n||((t=e==null?void 0:e.prototype)==null?void 0:t.isReactComponent)||((r=e==null?void 0:e.prototype)==null?void 0:r.setState)||e._forwardRef}function Aa(e){class t extends x.Component{render(){return x.createElement(e,this.props)}}return t.displayName=e.displayName,t}const $e=(e,t)=>{const r=n=>{const o=`
31
31
  ${Object.keys(t).map(a=>`const ${a} = $$context['${a}'];`).join(`
32
32
  `)}
33
33
  return ${n};
34
- `;return new Function("$$context",o)(t)};try{return r(e)}catch(n){console.warn(n);const o=`[${e}] expression run failed`;return console.warn(o),null}},ny=(e,t,r)=>function(...n){try{const o=`
34
+ `;return new Function("$$context",o)(t)};try{return r(e)}catch(n){console.warn(n);const o=`[${e}] expression run failed`;return console.warn(o),null}},Ma=(e,t,r)=>function(...n){try{const o=`
35
35
  var f = ${e};
36
36
  var args = Array.from(arguments);
37
37
  var __$$storeManager__ = args.pop();
38
38
  var $$context = args.pop();
39
39
  $$context.stateManager = __$$storeManager__.getStateSnapshot();
40
40
  return f.apply(f, args)
41
- `;new Function(o)(...n,t,r)}catch(o){console.warn(o)}},wa=(e,t)=>{const r={};return t.forEach((n,o)=>{r[n]=e[o]}),r},xa=e=>{const t={};return Object.keys(e).forEach(r=>{let n=r.replace("-webkit","Webkit");n=n.replace("-ms","ms"),n=n.replace("-moz","Moz"),n=n.replace("-o","O");let o=n.split("-");o.length>=2&&(o=o.map((a,i)=>i!==0?$v(a):a)),t[o.join("")]=e[r]}),t},Ra=e=>{let t="";return Object.keys(e).forEach(r=>{t+=`${r}:${e[r]};`}),t},Gt="DYNAMIC",oy=["$$context","$$nodeModel"],Na=e=>{let t;const r=new Set,n=(i,s)=>{const u=typeof i=="function"?i(t):i;if(!Object.is(u,t)){const l=t;t=s??typeof u!="object"?u:Object.assign({},t,u),r.forEach(f=>f(t,l))}},o=()=>t,a={setState:n,getState:o,subscribe:i=>(r.add(i),()=>r.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."),r.clear()}};return t=e(n,o,a),a},ay=e=>e?Na(e):Na;var iy=e=>(({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'."),ay(e));class sy{constructor(){j(this,"storeMap",new Map)}addStore(t,r){const n=iy(r);return this.storeMap.set(t,n),n.name=t,n}setStore(t,r){this.storeMap.set(t,r)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}connect(t,r){const n=this.storeMap.get(t);return n?n.subscribe(r):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((r,n)=>{t[n]={state:r.getState(),updateState:o=>{r.setState(o)}}}),t}destroy(){this.storeMap.forEach(t=>{t.destroy()}),this.storeMap=new Map}}class Ta{constructor(){j(this,"renderMode","normal"),j(this,"components",{}),j(this,"storeManager",new sy),j(this,"runtimeComponentCache",new Map),j(this,"onGetRef"),j(this,"onGetComponent"),j(this,"onComponentMount"),j(this,"onComponentDestroy"),j(this,"processNodeConfigHook")}getComponent(t){var r;const n=t.value.componentName;let o=this.components[n]||(()=>`Component [${n}] not found`);return ty(o)||(o=ry(o),this.components[n]=o),this.onGetComponent&&(o=(r=this.onGetComponent)==null?void 0:r.call(this,o,t)),o}getContext(t={},r){let n=t;return r&&(n={...t},n.__proto__=r||null),n}pageRender(t,{components:r,onGetRef:n,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:u,processNodeConfigHook:l}){this.renderMode=u,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=l;const f=t.value.componentsTree,d=this.getComponent(f),p=this.convertModelToComponent(d,t.value.componentsTree),v={},b=f.props;return Object.keys(b).forEach(_=>{v[_]=b[_].value}),v.$$context=o,this.render(p,v)}transformProps(t={},{$$context:r}){const n=t,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(Vr(i))return o(i.value);if(Od(i)){const s=i.value,u=s.value;if(!u)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const l=f=>{const d=`${f.id}-${Gt}`;if(this.runtimeComponentCache.get(f.id))return{key:d,component:this.runtimeComponentCache.get(f.id)};const p=this.getComponent(f),v=this.convertModelToComponent(p,f),b=s.params||[];return{component:(..._)=>{const E=wa(_,b),w=this.getContext({params:E},r);return this.render(v,{$$context:w,key:d})},key:d}};if(Array.isArray(u)){const f=u==null?void 0:u.map(d=>l(d));return(...d)=>f.map(p=>ey(p.component)?x.createElement(p.component,{$$context:r,key:p.key}):p.component(...d))}else return l(u).component}else{if(Ne(i))return Ke(i.value,r||{});if(jd(i))return ny(i.value,r,this.storeManager);if(Qe(i)){let s=i;Vr(i)&&(s=i.value);const u=s,l={};return Object.keys(s).forEach(f=>{l[f]=o(u[f])}),l}else return i}},a={};return Object.keys(n).forEach(i=>{const s=n[i];a[i]=o(s)}),a}collectSpecialProps(t={},r){const n=[],o=(a,i)=>{let s=i;Vr(i)&&(s=i.value),r(s)?n.push({keyPath:a,val:s}):Je(s)?s.forEach((u,l)=>{o([...a,String(l)],u)}):Qe(s)&&Object.keys(s).forEach(u=>{o([...a,u],s[u])})};return o(["$root"],t),n}convertModelToComponent(t,r){const n=this;class o extends x.Component{constructor(i){super(i),j(this,"_CONDITION",!0),j(this,"_DESIGN_BOX",!1),j(this,"_NODE_MODEL",r),j(this,"_NODE_ID",r.id),j(this,"UNIQUE_ID",`${r.id}_${he()}`),j(this,"targetComponentRef"),j(this,"listenerHandle",[]),j(this,"storeState"),j(this,"staticState",{}),j(this,"storeListenDisposeLint",[]),j(this,"domHeader"),j(this,"mediaStyleDomMap",{}),j(this,"updateState",l=>{this.storeState.setState(l),this.forceUpdate()}),j(this,"getStyleDomById",l=>{const f=this.mediaStyleDomMap;let d=f[l];return d||(d=document.createElement("style"),d.type="text/css",f[l]=d),d.id=l,d}),j(this,"addMediaCSS",()=>{var l;let f=this.domHeader;if(f||(f=(l=document.getElementsByTagName("head"))==null?void 0:l[0],this.domHeader=f),!this.domHeader)return;const d=this._NODE_MODEL.value.css;d&&d.value.forEach(p=>{var v;const b=`${this.UNIQUE_ID}_${p.state}`;let _=`.${d.class}`;if(p.state!=="normal"&&(_=`${_}:${p.state}`),Object.keys(p.style).length!==0){const E=this.getStyleDomById(b);E.innerText=`${_} { ${Ra(p.style)} }`,f==null||f.appendChild(E)}(v=p.media)!=null&&v.length&&p.media.forEach(E=>{const w=`${b}_${E.type}_${E.value}`,S=this.getStyleDomById(w);S.media=`screen and (${E.type}:${E.value}px)`,S.innerHTML=`${_} { ${Ra(E.style)} }`,f==null||f.appendChild(S)})})}),j(this,"removeMediaCSS",()=>{const l=this.mediaStyleDomMap;Object.keys(l).forEach(f=>{var d;(d=this.domHeader)==null||d.removeChild(l[f])})}),j(this,"rebuildNode",()=>{this.storeListenDisposeLint.forEach(l=>l()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=x.createRef(),this.state=r.value.state||{};const s=r.value.stateName||r.id,u=n.storeManager.getStore(s);u?(this.storeState=u,u.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(s,()=>({...r.value.state||{}})),this.storeState.subscribe(l=>{this.setState({...l})}),this.connectStore()}connectStore(){const i=n.collectSpecialProps(r.props,d=>!!Ne(d)),s=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},d=>!!Ne(d)),u=[...i,...s].map(d=>{const p=d.val,v=/\$\$context.stateManager\.(.+?)\./gim.exec(p.value);return v!=null&&v.length?v[1]:""}).filter(Boolean),l=Array.from(new Set(u)),f=[];l.length&&l.forEach(d=>{n.storeManager.getStore(d)||(n.storeManager.addStore(d,()=>({})),console.log(n.storeManager,d,"not exits"));const p=n.storeManager.connect(d,()=>{this.forceUpdate()});f.push(p)}),this.storeListenDisposeLint=f}componentDidMount(){var i;this.addMediaCSS(),n.onGetRef&&n.onGetRef(this.targetComponentRef,r,this),(i=n.onComponentMount)==null||i.call(n,this,r);const s=()=>{n.storeManager.setStore(r.value.stateName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(s)}componentWillUnmount(){var i;this.storeListenDisposeLint.forEach(s=>s()),this.removeMediaCSS(),(i=n.onComponentDestroy)==null||i.call(n,this,r)}render(){var i;const{$$context:s,...u}=this.props,l={key:r.id,...r.props,...u},f={state:this.state||{},updateState:this.updateState,staticState:this.staticState};r.value.componentName===Ve.ROOT_CONTAINER&&(f.globalState=this.state,f.updateGlobalState=this.updateState),f.stateManager=n.storeManager.getStateSnapshot();const d=n.getContext(f,s),p=r.value.loop;let v=[];if(p&&p.open){this.targetComponentRef.current=[];let J=p.data||[];if(Ne(p.data)){const N=p.data;J=Ke(N.value,d||{})}return v=J.map((...N)=>{var ae;const le=N[1],Ct=[p.forName||"item",p.forIndex||"index"],Ht=wa(N,Ct);let ee="loopData";p.name&&(ee=`${ee}${p.name}`);const te=n.getContext({[ee]:Ht,staticState:this.staticState},d),H=n.transformProps(l,{$$context:te}),Yt=((ae=r.value.classNames)==null?void 0:ae.map(re=>{var _e;const tt=re.name;return Ne(re.status)&&Ke(String(((_e=re.status)==null?void 0:_e.value)||""),te)?tt:""}))||[];let Ze=`${H.className??""} ${Yt.join(" ")}`.trim();r.value.css&&(Ze=`${r.value.css.class} ${Ze}`.trim()),H.className=Ze;const Jt=n.transformProps(r.value.style,{$$context:te});r.value.style&&(H.style=xa(Jt||{}));const{children:$e}=H;let et=[];if($e!==void 0)delete H.children,et=Array.isArray($e)?$e:[$e];else{const re=[];r.value.children.forEach((_e,tt)=>{const on=n.buildComponent(_e,{$$context:te,idx:tt});re.push(on)}),et=re}if(H.key=`${H.key}-${le}`,Ne(p.key)){const re=p.key,_e=Ke(re.value,te||{});H.key+=`-${_e}`}return H.ref=re=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[le]=re},n.render(t,H,...et)}),v}const b=n.transformProps(l,{$$context:d}),{children:_}=b;let E=[];if(_!==void 0)delete b.children,E=Array.isArray(_)?_:[_];else{const J=[];r.value.children.forEach((N,ae)=>{const le=n.buildComponent(N,{$$context:d,idx:ae});J.push(le)}),E=J}b.ref=this.targetComponentRef;const w=((i=r.value.classNames)==null?void 0:i.map(J=>{var N;const ae=J.name;return Ne(J.status)&&Ke(((N=J.status)==null?void 0:N.value)||"",d)?ae:""}))||[];let S=`${b.className??""} ${w.join(" ")}`.trim();r.value.css&&(S=`${r.value.css.class} ${S}`.trim()),b.className=S;const W=n.transformProps(r.value.style,{$$context:d});r.value.style&&(b.style=xa(W||{}));let D=r.value.condition??!0;typeof D!="boolean"&&(D=Ke(D.value,d||{}));let U={condition:D,props:b};n.processNodeConfigHook&&(U=n.processNodeConfigHook(U,r));const Z=n.render(t,U.props,...E);return this._CONDITION=U.condition,U.condition?Z:Pe("div",{style:{display:"none"},children:Z})}}return j(o,"__CP_TYPE__",Gt),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(t,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof t=="string"?this.render(t):Ed(t)?(({currentNode:o})=>{const a=o.value.id;let i=null;if(n.get(a))i=n.get(a);else{const l=this.getComponent(o);i=this.convertModelToComponent(l,o)}!n.get(a)&&this.renderMode!=="design"&&n.set(a,i);const s=`${a}-${Gt}`,u={$$context:r,$$nodeModel:t,key:s};return this.render(i,u)})({currentNode:t}):void 0}render(t,r={},...n){return typeof t=="string"||typeof t=="number"?String(t):(oy.forEach(o=>{o in r&&t.__CP_TYPE__!==Gt&&delete r[o]}),x.createElement(t,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const cy=gn(new Ta),uy=["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","search","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"],be=e=>{const t={};return e.forEach(r=>{t[r.key]=r.value}),t},ly=[...uy,...id],fy=ly.reduce((e,t)=>(e[t]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),x.createElement(t,{...o,...be(n)},...a)},e),{}),dy=({children:e,width:t,height:r,$$attributes:n=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(l=>l!==void 0);const{style:i={},...s}=be(n),u={height:r,width:t,...i,...o.style||{}};return x.createElement("div",{...o,...s,style:u},...a)},py=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("canvas",{...r,...be(t)},...n)},hy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("img",{...r,...be(t)},...n)},vy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("video",{...r,...be(t)},...n)},yy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("video",{...r,...be(t)},...n)},my=({children:e,$$attributes:t=[],content:r,...n})=>Pe("span",{...n,...be(t),children:r}),gy=({children:e,$$attributes:t=[],afterMount:r,beforeDestroy:n,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),x.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),x.createElement("div",{...o,...be(t)},...a)},by=({children:e,$$attributes:t=[],htmlTag:r="div",...n})=>{let o=e;return Array.isArray(e)||(o=[e]),x.createElement(r,{...n,...be(t)},...o)},_y={RootContainer:({children:e})=>e,...fy,CContainer:gy,CVideo:vy,CAudio:yy,CBlock:dy,CImage:hy,CText:my,CCanvas:py,CNativeTag:by};class jy{constructor(){j(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,r){this.refMap.set(t,r)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class Aa extends x.Component{constructor(t){super(t),j(this,"refManager"),j(this,"dynamicComponentInstanceMap",new Map),j(this,"onGetRef",(r,n,o)=>{var a,i;(i=(a=this.props).onGetRef)==null||i.call(a,r,n,o),this.dynamicComponentInstanceMap.set(n.id,o),this.refManager.add(n.value.refId||n.id,r)}),j(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(Qe(r)&&Fo(r)){const n=r;this.setState({pageModel:new Lt(n,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new Lt(t.page)},this.refManager=new jy}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:r,onGetComponent:n,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const s={..._y,...t.components};return r.pageRender(i,{libs:{},components:s,onGetRef:this.onGetRef,onGetComponent:n,onComponentMount:a,onComponentDestroy:o,$$context:{refs:this.refManager},renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}const Ey=()=>{const e=x.useRef(null);return{ref:e,rerender:function(...t){e.current&&e.current.rerender(...t)}}};class Oy extends x.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,r){var n,o;(o=(n=this.props).onError)==null||o.call(n,r)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,r=this.props.node.value;console.error(this.props.node,this.props.children);const n=yn("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",r.id,", node name:",r.title," component name:",r.title||r.componentName,yn("p",{children:["msg: ",String(this.state.error)]}),Pe("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"}),Pe("div",{style:{display:"none"}})]});return x.createElement(this.props.targetComponent,{onlyRenderChild:!0},n)}return this.props.children}}class Ma{constructor(){j(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,r){const n=this.instanceMap.get(t);n?n.push(r):this.instanceMap.set(t,[r])}remove(t,r){const n=this.instanceMap.get(t);if(r!==void 0&&Array.isArray(n)){const o=n.filter(a=>a!==r);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const $a=e=>{const{node:t}=e,r=x.useMemo(()=>{var s,u;const l=(u=(s=t.material)==null?void 0:s.value)==null?void 0:u.isContainer;return Qe(l)?l:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:n,height:o,width:a,style:i}=r;return Pe("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:n})};class Sy extends x.Component{constructor(t){super(t),j(this,"instanceManager",new Ma),j(this,"renderRef"),j(this,"dropPlaceholder",$a),j(this,"onGetComponent",(r,n)=>{const o=this;class a extends x.Component{constructor(){super(...arguments),j(this,"_DESIGN_BOX",!0),j(this,"_NODE_MODEL",n),j(this,"_NODE_ID",n.id),j(this,"_UNIQUE_ID",`${n.id}_${he()}`),j(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){var s;const{children:u=[],onlyRenderChild:l,...f}=this.props;let d=u;return Je(u)||(d=[u]),!d.filter(Boolean).length&&((s=n.material)!=null&&s.value.isContainer||n.value.componentName===Ve.ROOT_CONTAINER)&&d.push(x.createElement(o.dropPlaceholder,{node:n})),l?d:x.createElement(r,f,...d)}}return x.forwardRef(function(i,s){return x.createElement(Oy,{node:n,targetComponent:a},x.createElement(a,{ref:s,...i}))})}),this.renderRef=x.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,r;(r=(t=this.props).onMount)==null||r.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var r;return(r=this.renderRef.current)==null?void 0:r.rerender(t)}getInstancesById(t,r){let n=[...this.instanceManager.get(t)||[]];return r!==void 0&&(n=n.filter(o=>r===(o==null?void 0:o._UNIQUE_ID))),n}getInstanceByDom(t){const r=Pa(t);if(!r)return null;const n=Da(r);return(n==null?void 0:n.stateNode)||null}getDomsById(t,r){const n=this.getInstancesById(t),o=[];return n==null||n.forEach(a=>{if((a==null?void 0:a._STATUS)==="DESTROY")return;const i=Xa.findDOMNode(a);if(i&&!(i instanceof Text))if(r){const s=Array.from(i.querySelectorAll(r));o.push(...s)}else o.push(i)}),o}getDomRectById(t,r){return this.getDomsById(t,r).map(n=>n==null?void 0:n.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:r}=this,{render:n,...o}=t;return n&&(n.ref.current=this),Pe(Aa,{onGetComponent:r,...o,processNodeConfigHook:(a,i)=>{var s,u;if(i.nodeType!=="NODE")return a;const{props:l,condition:f}=a;let d={...l};const p=((s=i.value.configure)==null?void 0:s.devState)||{},v=(u=i.material)==null?void 0:u.value.fixedProps;if(v!==void 0){if(Qe(v))d={...d,...v};else if(typeof v=="function"){const _=v(d);d={...d,..._}}}let b=f;return p.condition===!1&&(b=p.condition),{props:Zv(d,p.props||{}),condition:b}},ref:this.renderRef})}}const Pa=e=>{if(!e)return null;const t=Object.keys(e).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return t?e[t]:Pa(e.parentElement)},Da=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:Da(e.return):null},Cy=()=>{const e=x.useRef(null);return{ref:e,rerender:function(...t){e.current&&e.current.rerender(...t)},getInstancesById(t,r){var n;return((n=e.current)==null?void 0:n.getInstancesById(t,r))||[]},getInstanceByDom(t){var r;return((r=e.current)==null?void 0:r.getInstanceByDom(t))||null},getDomsById(t,r){var n;return((n=e.current)==null?void 0:n.getDomsById(t,r))||[]},getDomRectById(t,r){var n;return((n=e.current)==null?void 0:n.getDomRectById(t,r))||[]}}};var wy=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Wt={},xy={get exports(){return Wt},set exports(e){Wt=e}};(function(e,t){(function(r,n){e.exports=n()})(wy,function(){var r=function(){},n={},o={},a={};function i(p,v){p=p.push?p:[p];var b=[],_=p.length,E=_,w,S,W,D;for(w=function(U,Z){Z.length&&b.push(U),E--,E||v(b)};_--;){if(S=p[_],W=o[S],W){w(S,W);continue}D=a[S]=a[S]||[],D.push(w)}}function s(p,v){if(p){var b=a[p];if(o[p]=v,!!b)for(;b.length;)b[0](p,v),b.splice(0,1)}}function u(p,v){p.call&&(p={success:p}),v.length?(p.error||r)(v):(p.success||r)(p)}function l(p,v,b,_){var E=document,w=b.async,S=(b.numRetries||0)+1,W=b.before||r,D=p.replace(/[\?|#].*$/,""),U=p.replace(/^(css|img|module|nomodule)!/,""),Z,J,N;if(_=_||0,/(^css!|\.css$)/.test(D))N=E.createElement("link"),N.rel="stylesheet",N.href=U,Z="hideFocus"in N,Z&&N.relList&&(Z=0,N.rel="preload",N.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(D))N=E.createElement("img"),N.src=U;else if(N=E.createElement("script"),N.src=U,N.async=w===void 0?!0:w,J="noModule"in N,/^module!/.test(D)){if(!J)return v(p,"l");N.type="module"}else if(/^nomodule!/.test(D)&&J)return v(p,"l");N.onload=N.onerror=N.onbeforeload=function(ae){var le=ae.type[0];if(Z)try{N.sheet.cssText.length||(le="e")}catch(Ct){Ct.code!=18&&(le="e")}if(le=="e"){if(_+=1,_<S)return l(p,v,b,_)}else if(N.rel=="preload"&&N.as=="style")return N.rel="stylesheet";v(p,le,ae.defaultPrevented)},W(p,N)!==!1&&E.head.appendChild(N)}function f(p,v,b){p=p.push?p:[p];var _=p.length,E=_,w=[],S,W;for(S=function(D,U,Z){if(U=="e"&&w.push(D),U=="b")if(Z)w.push(D);else return;_--,_||v(w)},W=0;W<E;W++)l(p[W],S,b)}function d(p,v,b){var _,E;if(v&&v.trim&&(_=v),E=(_?b:v)||{},_){if(_ in n)throw"LoadJS";n[_]=!0}function w(S,W){f(p,function(D){u(E,D),S&&u({success:S,error:W},D),s(_,D)},E)}if(E.returnPromise)return new Promise(w);w()}return d.ready=function(p,v){return i(p,function(b){u(v,b)}),d},d.done=function(p){s(p,[])},d.reset=function(){n={},o={},a={}},d.isDefined=function(p){return p in n},d})})(xy);class Ry{constructor(t,r){j(this,"assets"),j(this,"loadStatus"),j(this,"win",window),j(this,"_onSuccessList",[]),j(this,"_onErrorList",[]),this.assets=t,this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(){const t=this.assets||[],r=[];for(let n=0;n<t.length;n++){const o=t[n];o.id||(o.id=he()),r.push(o.id);const a=o.resources.map(i=>i.src);Wt(a,o.id,{async:!1,before:(i,s)=>(this.win.document.body.appendChild(s),!1)})}if(t.length===0){this._onSuccessList.forEach(n=>n());return}return setTimeout(()=>{Wt.ready(r,{success:()=>{this._onSuccessList.forEach(n=>n())},error:n=>{this._onErrorList.forEach(o=>o(n))}})},0),this}onSuccess(t){return this._onSuccessList.push(t),this}onError(t){return this._onErrorList.push(t),this}}return Object.freeze(Object.defineProperty({__proto__:null,AssetLoader:Ry,ComponentInstanceManager:Ma,DefaultDropPlaceholder:$a,DefineReactAdapter:Ta,DesignRender:Sy,ReactAdapter:cy,Render:Aa,getAdapter:gn,useDesignRender:Cy,useRender:Ey},Symbol.toStringTag,{value:"Module"}))});
41
+ `;new Function(o)(...n,t,r)}catch(o){console.warn(o)}},on=(e,t)=>{const r={};return t.forEach((n,o)=>{r[n]=e[o]}),r},an=e=>{const t={};return Object.keys(e).forEach(r=>{let n=r.replace("-webkit","Webkit");n=n.replace("-ms","ms"),n=n.replace("-moz","Moz"),n=n.replace("-o","O");let o=n.split("-");o.length>=2&&(o=o.map((a,i)=>i!==0?Iv(a):a)),t[o.join("")]=e[r]}),t},sn=e=>{let t="";return Object.keys(e).forEach(r=>{t+=`${r}:${e[r]};`}),t},ay=(e,t)=>{const r={};return e.forEach(n=>{if(n.globalName){const o=t[n.globalName];o&&(r[n.globalName]=o)}}),r},iy=(e,t=1)=>{let r=0,n=e,o={},a={};for(;r<t;)Object.keys(n).forEach(i=>{o={...o,...n[i]}}),a=o,n=o,o={},r+=1;return a},Gt="DYNAMIC",sy=["$$context","$$nodeModel"],$a=e=>{let t;const r=new Set,n=(i,s)=>{const u=typeof i=="function"?i(t):i;if(!Object.is(u,t)){const l=t;t=s??typeof u!="object"?u:Object.assign({},t,u),r.forEach(f=>f(t,l))}},o=()=>t,a={setState:n,getState:o,subscribe:i=>(r.add(i),()=>r.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."),r.clear()}};return t=e(n,o,a),a},cy=e=>e?$a(e):$a;var uy=e=>(({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0,SSR:!1}&&"production")!=="production"&&console.warn("[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'."),cy(e));class ly{constructor(){j(this,"storeMap",new Map)}addStore(t,r){const n=uy(r);return this.storeMap.set(t,n),n.name=t,n}setStore(t,r){this.storeMap.set(t,r)}removeStore(t){this.storeMap.delete(t)}getStore(t){return this.storeMap.get(t)}connect(t,r){const n=this.storeMap.get(t);return n?n.subscribe(r):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const t={};return this.storeMap.forEach((r,n)=>{t[n]={state:r.getState(),updateState:o=>{r.setState(o)}}}),t}destroy(){this.storeMap.forEach(t=>{t.destroy()}),this.storeMap=new Map}}class Pa{constructor(){j(this,"renderMode","normal"),j(this,"components",{}),j(this,"storeManager",new ly),j(this,"runtimeComponentCache",new Map),j(this,"onGetRef"),j(this,"onGetComponent"),j(this,"onComponentMount"),j(this,"onComponentDestroy"),j(this,"processNodeConfigHook")}getComponent(t){var r;const n=t.value.componentName;let o=this.components[n]||(()=>`Component [${n}] not found`);return Ta(o)||(o=Aa(o),this.components[n]=o),this.onGetComponent&&(o=(r=this.onGetComponent)==null?void 0:r.call(this,o,t)),o}getContext(t={},r){let n=t;return r&&(n={...t},n.__proto__=r||null),n}pageRender(t,{components:r,onGetRef:n,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:u,processNodeConfigHook:l}){this.renderMode=u,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=l;const f=t.value.componentsTree,d=this.getComponent(f),p=this.convertModelToComponent(d,t.value.componentsTree),v={},b=f.props;return Object.keys(b).forEach(_=>{v[_]=b[_].value}),v.$$context=o,this.render(p,v)}transformProps(t={},{$$context:r}){const n=t,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(Vr(i))return o(i.value);if(xd(i)){const s=i.value,u=s.value;if(!u)return console.warn("slot value is null, this maybe cause some error, pls check it",t),()=>{};const l=f=>{const d=`${f.id}-${Gt}`;if(this.runtimeComponentCache.get(f.id))return{key:d,component:this.runtimeComponentCache.get(f.id)};const p=this.getComponent(f),v=this.convertModelToComponent(p,f),b=s.params||[];return{component:(..._)=>{const E=on(_,b),S=this.getContext({params:E},r);return this.render(v,{$$context:S,key:d})},key:d}};if(Array.isArray(u)){const f=u==null?void 0:u.map(d=>l(d));return(...d)=>f.map(p=>Na(p.component)?x.createElement(p.component,{$$context:r,key:p.key}):p.component(...d))}else return l(u).component}else{if(Ne(i))return $e(i.value,r||{});if(Cd(i))return Ma(i.value,r,this.storeManager);if(Xe(i)){let s=i;Vr(i)&&(s=i.value);const u=s,l={};return Object.keys(s).forEach(f=>{l[f]=o(u[f])}),l}else return i}},a={};return Object.keys(n).forEach(i=>{const s=n[i];a[i]=o(s)}),a}collectSpecialProps(t={},r){const n=[],o=(a,i)=>{let s=i;Vr(i)&&(s=i.value),r(s)?n.push({keyPath:a,val:s}):qe(s)?s.forEach((u,l)=>{o([...a,String(l)],u)}):Xe(s)&&Object.keys(s).forEach(u=>{o([...a,u],s[u])})};return o(["$root"],t),n}convertModelToComponent(t,r){const n=this;class o extends x.Component{constructor(i){super(i),j(this,"_CONDITION",!0),j(this,"_DESIGN_BOX",!1),j(this,"_NODE_MODEL",r),j(this,"_NODE_ID",r.id),j(this,"UNIQUE_ID",`${r.id}_${he()}`),j(this,"targetComponentRef"),j(this,"listenerHandle",[]),j(this,"storeState"),j(this,"staticState",{}),j(this,"storeListenDisposeLint",[]),j(this,"domHeader"),j(this,"mediaStyleDomMap",{}),j(this,"updateState",l=>{this.storeState.setState(l),this.forceUpdate()}),j(this,"getStyleDomById",l=>{const f=this.mediaStyleDomMap;let d=f[l];return d||(d=document.createElement("style"),d.type="text/css",f[l]=d),d.id=l,d}),j(this,"addMediaCSS",()=>{var l;let f=this.domHeader;if(f||(f=(l=document.getElementsByTagName("head"))==null?void 0:l[0],this.domHeader=f),!this.domHeader)return;const d=this._NODE_MODEL.value.css;d&&d.value.forEach(p=>{var v;const b=`${this.UNIQUE_ID}_${p.state}`;let _=`.${d.class}`;if(p.state!=="normal"&&(_=`${_}:${p.state}`),Object.keys(p.style).length!==0){const E=this.getStyleDomById(b);E.innerText=`${_} { ${sn(p.style)} }`,f==null||f.appendChild(E)}(v=p.media)!=null&&v.length&&p.media.forEach(E=>{const S=`${b}_${E.type}_${E.value}`,w=this.getStyleDomById(S);w.media=`screen and (${E.type}:${E.value}px)`,w.innerHTML=`${_} { ${sn(E.style)} }`,f==null||f.appendChild(w)})})}),j(this,"removeMediaCSS",()=>{const l=this.mediaStyleDomMap;Object.keys(l).forEach(f=>{var d;(d=this.domHeader)==null||d.removeChild(l[f])})}),j(this,"rebuildNode",()=>{this.storeListenDisposeLint.forEach(l=>l()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()}),this.targetComponentRef=x.createRef(),this.state=r.value.state||{};const s=r.value.stateName||r.id,u=n.storeManager.getStore(s);u?(this.storeState=u,u.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(s,()=>({...r.value.state||{}})),this.storeState.subscribe(l=>{this.setState({...l})}),this.connectStore()}connectStore(){const i=n.collectSpecialProps(r.props,d=>!!Ne(d)),s=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},d=>!!Ne(d)),u=[...i,...s].map(d=>{const p=d.val,v=/\$\$context.stateManager\.(.+?)\./gim.exec(p.value);return v!=null&&v.length?v[1]:""}).filter(Boolean),l=Array.from(new Set(u)),f=[];l.length&&l.forEach(d=>{n.storeManager.getStore(d)||(n.storeManager.addStore(d,()=>({})),console.log(n.storeManager,d,"not exits"));const p=n.storeManager.connect(d,()=>{this.forceUpdate()});f.push(p)}),this.storeListenDisposeLint=f}componentDidMount(){var i;this.addMediaCSS(),n.onGetRef&&n.onGetRef(this.targetComponentRef,r,this),(i=n.onComponentMount)==null||i.call(n,this,r);const s=()=>{n.storeManager.setStore(r.value.stateName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(s)}componentWillUnmount(){var i;this.storeListenDisposeLint.forEach(s=>s()),this.removeMediaCSS(),(i=n.onComponentDestroy)==null||i.call(n,this,r)}render(){var i;const{$$context:s,...u}=this.props,l={key:r.id,...r.props,...u},f={state:this.state||{},updateState:this.updateState,staticState:this.staticState};r.value.componentName===Ge.ROOT_CONTAINER&&(f.globalState=this.state,f.updateGlobalState=this.updateState),f.stateManager=n.storeManager.getStateSnapshot();const d=n.getContext(f,s),p=r.value.loop;let v=[];if(p&&p.open){this.targetComponentRef.current=[];let J=p.data||[];if(Ne(p.data)){const N=p.data;J=$e(N.value,d||{})}return v=J.map((...N)=>{var ae;const le=N[1],Ct=[p.forName||"item",p.forIndex||"index"],Ht=on(N,Ct);let ee="loopData";p.name&&(ee=`${ee}${p.name}`);const te=n.getContext({[ee]:Ht,staticState:this.staticState},d),H=n.transformProps(l,{$$context:te}),Yt=((ae=r.value.classNames)==null?void 0:ae.map(re=>{var _e;const tt=re.name;return Ne(re.status)&&$e(String(((_e=re.status)==null?void 0:_e.value)||""),te)?tt:""}))||[];let Ze=`${H.className??""} ${Yt.join(" ")}`.trim();r.value.css&&(Ze=`${r.value.css.class} ${Ze}`.trim()),H.className=Ze;const Jt=n.transformProps(r.value.style,{$$context:te});r.value.style&&(H.style=an(Jt||{}));const{children:Pe}=H;let et=[];if(Pe!==void 0)delete H.children,et=Array.isArray(Pe)?Pe:[Pe];else{const re=[];r.value.children.forEach((_e,tt)=>{const cn=n.buildComponent(_e,{$$context:te,idx:tt});re.push(cn)}),et=re}if(H.key=`${H.key}-${le}`,Ne(p.key)){const re=p.key,_e=$e(re.value,te||{});H.key+=`-${_e}`}return H.ref=re=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[le]=re},n.render(t,H,...et)}),v}const b=n.transformProps(l,{$$context:d}),{children:_}=b;let E=[];if(_!==void 0)delete b.children,E=Array.isArray(_)?_:[_];else{const J=[];r.value.children.forEach((N,ae)=>{const le=n.buildComponent(N,{$$context:d,idx:ae});J.push(le)}),E=J}b.ref=this.targetComponentRef;const S=((i=r.value.classNames)==null?void 0:i.map(J=>{var N;const ae=J.name;return Ne(J.status)&&$e(((N=J.status)==null?void 0:N.value)||"",d)?ae:""}))||[];let w=`${b.className??""} ${S.join(" ")}`.trim();r.value.css&&(w=`${r.value.css.class} ${w}`.trim()),b.className=w;const W=n.transformProps(r.value.style,{$$context:d});r.value.style&&(b.style=an(W||{}));let D=r.value.condition??!0;typeof D!="boolean"&&(D=$e(D.value,d||{}));let U={condition:D,props:b};n.processNodeConfigHook&&(U=n.processNodeConfigHook(U,r));const Z=n.render(t,U.props,...E);return this._CONDITION=U.condition,U.condition?Z:De("div",{style:{display:"none"},children:Z})}}return j(o,"__CP_TYPE__",Gt),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(t,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof t=="string"?this.render(t):Sd(t)?(({currentNode:o})=>{const a=o.value.id;let i=null;if(n.get(a))i=n.get(a);else{const l=this.getComponent(o);i=this.convertModelToComponent(l,o)}!n.get(a)&&this.renderMode!=="design"&&n.set(a,i);const s=`${a}-${Gt}`,u={$$context:r,$$nodeModel:t,key:s};return this.render(i,u)})({currentNode:t}):void 0}render(t,r={},...n){return typeof t=="string"||typeof t=="number"?String(t):(sy.forEach(o=>{o in r&&t.__CP_TYPE__!==Gt&&delete r[o]}),x.createElement(t,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const fy=jn(new Pa),dy=["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","search","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"],be=e=>{const t={};return e.forEach(r=>{t[r.key]=r.value}),t},py=[...dy,...ld],hy=py.reduce((e,t)=>(e[t]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),x.createElement(t,{...o,...be(n)},...a)},e),{}),vy=({children:e,width:t,height:r,$$attributes:n=[],...o})=>{let a=e;Array.isArray(e)||(a=[e]),a=a.filter(l=>l!==void 0);const{style:i={},...s}=be(n),u={height:r,width:t,...i,...o.style||{}};return x.createElement("div",{...o,...s,style:u},...a)},yy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("canvas",{...r,...be(t)},...n)},my=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("img",{...r,...be(t)},...n)},gy=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("video",{...r,...be(t)},...n)},by=({children:e,$$attributes:t=[],...r})=>{let n=e;return Array.isArray(e)||(n=[e]),x.createElement("video",{...r,...be(t)},...n)},_y=({children:e,$$attributes:t=[],content:r,...n})=>De("span",{...n,...be(t),children:r}),jy=({children:e,$$attributes:t=[],afterMount:r,beforeDestroy:n,...o})=>{let a=e;return Array.isArray(e)||(a=[e]),x.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),x.createElement("div",{...o,...be(t)},...a)},Ey=({children:e,$$attributes:t=[],htmlTag:r="div",...n})=>{let o=e;return Array.isArray(e)||(o=[e]),x.createElement(r,{...n,...be(t)},...o)},Oy={RootContainer:({children:e})=>e,...hy,CContainer:jy,CVideo:gy,CAudio:by,CBlock:vy,CImage:my,CText:_y,CCanvas:yy,CNativeTag:Ey};class wy{constructor(){j(this,"refMap",new Map)}get(t){return this.refMap.get(t)}add(t,r){this.refMap.set(t,r)}remove(t){this.refMap.delete(t)}destroy(){this.refMap.clear()}}class Da extends x.Component{constructor(t){super(t),j(this,"refManager"),j(this,"dynamicComponentInstanceMap",new Map),j(this,"onGetRef",(r,n,o)=>{var a,i;(i=(a=this.props).onGetRef)==null||i.call(a,r,n,o),this.dynamicComponentInstanceMap.set(n.id,o),this.refManager.add(n.value.refId||n.id,r)}),j(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(Xe(r)&&Uo(r)){const n=r;this.setState({pageModel:new Lt(n,{materials:this.state.pageModel.materialsModel.rawValue})})}}),this.state={pageModel:t.pageModel||new Lt(t.page)},this.refManager=new wy}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:r,onGetComponent:n,onComponentDestroy:o,onComponentMount:a}=t,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const s={...Oy,...t.components};return r.pageRender(i,{libs:{},components:s,onGetRef:this.onGetRef,onGetComponent:n,onComponentMount:a,onComponentDestroy:o,$$context:{refs:this.refManager},renderMode:t.renderMode,processNodeConfigHook:t.processNodeConfigHook})}}const Cy=()=>{const e=x.useRef(null);return{ref:e,rerender:function(...t){e.current&&e.current.rerender(...t)}}};class Sy extends x.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,r){var n,o;(o=(n=this.props).onError)==null||o.call(n,r)}render(){if(this.state.hasError){const{onDoubleClick:t}=this,r=this.props.node.value;console.error(this.props.node,this.props.children);const n=bn("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"},children:["Render error, node id: ",r.id,", node name:",r.title," component name:",r.title||r.componentName,bn("p",{children:["msg: ",String(this.state.error)]}),De("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"}),De("div",{style:{display:"none"}})]});return x.createElement(this.props.targetComponent,{onlyRenderChild:!0},n)}return this.props.children}}class ka{constructor(){j(this,"instanceMap",new Map)}get(t){return this.instanceMap.get(t)}add(t,r){const n=this.instanceMap.get(t);n?n.push(r):this.instanceMap.set(t,[r])}remove(t,r){const n=this.instanceMap.get(t);if(r!==void 0&&Array.isArray(n)){const o=n.filter(a=>a!==r);this.instanceMap.set(t,o)}else this.instanceMap.delete(t)}destroy(){this.instanceMap.clear()}}const Ia=e=>{const{node:t}=e,r=x.useMemo(()=>{var s,u;const l=(u=(s=t.material)==null?void 0:s.value)==null?void 0:u.isContainer;return Xe(l)?l:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[e.node]),{placeholder:n,height:o,width:a,style:i}=r;return De("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:n})};class xy extends x.Component{constructor(t){super(t),j(this,"instanceManager",new ka),j(this,"renderRef"),j(this,"dropPlaceholder",Ia),j(this,"onGetComponent",(r,n)=>{const o=this;class a extends x.Component{constructor(){super(...arguments),j(this,"_DESIGN_BOX",!0),j(this,"_NODE_MODEL",n),j(this,"_NODE_ID",n.id),j(this,"_UNIQUE_ID",`${n.id}_${he()}`),j(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){var s;const{children:u=[],onlyRenderChild:l,...f}=this.props;let d=u;return qe(u)||(d=[u]),!d.filter(Boolean).length&&((s=n.material)!=null&&s.value.isContainer||n.value.componentName===Ge.ROOT_CONTAINER)&&d.push(x.createElement(o.dropPlaceholder,{node:n})),l?d:x.createElement(r,f,...d)}}return x.forwardRef(function(i,s){return x.createElement(Sy,{node:n,targetComponent:a},x.createElement(a,{ref:s,...i}))})}),this.renderRef=x.createRef(),t.dropPlaceholder&&(this.dropPlaceholder=t.dropPlaceholder)}componentDidMount(){var t,r;(r=(t=this.props).onMount)==null||r.call(t,this)}getPageModel(){var t;return(t=this.renderRef.current)==null?void 0:t.state.pageModel}rerender(t){var r;return(r=this.renderRef.current)==null?void 0:r.rerender(t)}getInstancesById(t,r){let n=[...this.instanceManager.get(t)||[]];return r!==void 0&&(n=n.filter(o=>r===(o==null?void 0:o._UNIQUE_ID))),n}getInstanceByDom(t){const r=Fa(t);if(!r)return null;const n=La(r);return(n==null?void 0:n.stateNode)||null}getDomsById(t,r){const n=this.getInstancesById(t),o=[];return n==null||n.forEach(a=>{if((a==null?void 0:a._STATUS)==="DESTROY")return;const i=ti.findDOMNode(a);if(i&&!(i instanceof Text))if(r){const s=Array.from(i.querySelectorAll(r));o.push(...s)}else o.push(i)}),o}getDomRectById(t,r){return this.getDomsById(t,r).map(n=>n==null?void 0:n.getBoundingClientRect()).filter(Boolean)}render(){const{props:t,onGetComponent:r}=this,{render:n,...o}=t;return n&&(n.ref.current=this),De(Da,{onGetComponent:r,...o,processNodeConfigHook:(a,i)=>{var s,u;if(i.nodeType!=="NODE")return a;const{props:l,condition:f}=a;let d={...l};const p=((s=i.value.configure)==null?void 0:s.devState)||{},v=(u=i.material)==null?void 0:u.value.fixedProps;if(v!==void 0){if(Xe(v))d={...d,...v};else if(typeof v=="function"){const _=v(d);d={...d,..._}}}let b=f;return p.condition===!1&&(b=p.condition),{props:ny(d,p.props||{}),condition:b}},ref:this.renderRef})}}const Fa=e=>{if(!e)return null;const t=Object.keys(e).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return t?e[t]:Fa(e.parentElement)},La=e=>{var t;return e?(t=e==null?void 0:e.stateNode)!=null&&t._DESIGN_BOX?e:La(e.return):null},Ry=()=>{const e=x.useRef(null);return{ref:e,rerender:function(...t){e.current&&e.current.rerender(...t)},getInstancesById(t,r){var n;return((n=e.current)==null?void 0:n.getInstancesById(t,r))||[]},getInstanceByDom(t){var r;return((r=e.current)==null?void 0:r.getInstanceByDom(t))||null},getDomsById(t,r){var n;return((n=e.current)==null?void 0:n.getDomsById(t,r))||[]},getDomRectById(t,r){var n;return((n=e.current)==null?void 0:n.getDomRectById(t,r))||[]}}};var Ny=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},Wt={},Ty={get exports(){return Wt},set exports(e){Wt=e}};(function(e,t){(function(r,n){e.exports=n()})(Ny,function(){var r=function(){},n={},o={},a={};function i(p,v){p=p.push?p:[p];var b=[],_=p.length,E=_,S,w,W,D;for(S=function(U,Z){Z.length&&b.push(U),E--,E||v(b)};_--;){if(w=p[_],W=o[w],W){S(w,W);continue}D=a[w]=a[w]||[],D.push(S)}}function s(p,v){if(p){var b=a[p];if(o[p]=v,!!b)for(;b.length;)b[0](p,v),b.splice(0,1)}}function u(p,v){p.call&&(p={success:p}),v.length?(p.error||r)(v):(p.success||r)(p)}function l(p,v,b,_){var E=document,S=b.async,w=(b.numRetries||0)+1,W=b.before||r,D=p.replace(/[\?|#].*$/,""),U=p.replace(/^(css|img|module|nomodule)!/,""),Z,J,N;if(_=_||0,/(^css!|\.css$)/.test(D))N=E.createElement("link"),N.rel="stylesheet",N.href=U,Z="hideFocus"in N,Z&&N.relList&&(Z=0,N.rel="preload",N.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(D))N=E.createElement("img"),N.src=U;else if(N=E.createElement("script"),N.src=U,N.async=S===void 0?!0:S,J="noModule"in N,/^module!/.test(D)){if(!J)return v(p,"l");N.type="module"}else if(/^nomodule!/.test(D)&&J)return v(p,"l");N.onload=N.onerror=N.onbeforeload=function(ae){var le=ae.type[0];if(Z)try{N.sheet.cssText.length||(le="e")}catch(Ct){Ct.code!=18&&(le="e")}if(le=="e"){if(_+=1,_<w)return l(p,v,b,_)}else if(N.rel=="preload"&&N.as=="style")return N.rel="stylesheet";v(p,le,ae.defaultPrevented)},W(p,N)!==!1&&E.head.appendChild(N)}function f(p,v,b){p=p.push?p:[p];var _=p.length,E=_,S=[],w,W;for(w=function(D,U,Z){if(U=="e"&&S.push(D),U=="b")if(Z)S.push(D);else return;_--,_||v(S)},W=0;W<E;W++)l(p[W],w,b)}function d(p,v,b){var _,E;if(v&&v.trim&&(_=v),E=(_?b:v)||{},_){if(_ in n)throw"LoadJS";n[_]=!0}function S(w,W){f(p,function(D){u(E,D),w&&u({success:w,error:W},D),s(_,D)},E)}if(E.returnPromise)return new Promise(S);S()}return d.ready=function(p,v){return i(p,function(b){u(v,b)}),d},d.done=function(p){s(p,[])},d.reset=function(){n={},o={},a={}},d.isDefined=function(p){return p in n},d})})(Ty);class Ay{constructor(t,r){j(this,"assets"),j(this,"loadStatus"),j(this,"win",window),j(this,"_onSuccessList",[]),j(this,"_onErrorList",[]),this.assets=t,this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(){const t=this.assets||[],r=[];for(let n=0;n<t.length;n++){const o=t[n];o.id||(o.id=he()),r.push(o.id);const a=o.resources.map(i=>i.src);Wt(a,o.id,{async:!1,before:(i,s)=>(this.win.document.body.appendChild(s),!1)})}if(t.length===0){this._onSuccessList.forEach(n=>n());return}return new Promise((n,o)=>{Wt.ready(r,{success:()=>{this._onSuccessList.forEach(a=>a()),n("")},error:a=>{this._onErrorList.forEach(i=>i(a)),o(a)}})})}onSuccess(t){return this._onSuccessList.push(t),this}onError(t){return this._onErrorList.push(t),this}}return Object.freeze(Object.defineProperty({__proto__:null,AssetLoader:Ay,ComponentInstanceManager:ka,DefaultDropPlaceholder:Ia,DefineReactAdapter:Pa,DesignRender:xy,ReactAdapter:fy,Render:Da,canAcceptsRef:Ta,collectVariable:ay,compWrapper:Aa,convertCodeStringToFunction:Ma,flatObject:iy,formatSourceStylePropertyName:an,getAdapter:jn,getCSSTextValue:sn,getObjFromArrayMap:on,isClass:oy,runExpression:$e,shouldConstruct:Na,useDesignRender:Ry,useRender:Cy},Symbol.toStringTag,{value:"Module"}))});
42
42
  //# sourceMappingURL=render.umd.js.map