@chamn/render 0.0.32 → 0.0.33

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.
@@ -26,7 +26,9 @@ export declare class DesignRender extends React.Component<DesignRenderProp> {
26
26
  instanceManager: ComponentInstanceManager;
27
27
  renderRef: React.MutableRefObject<Render | null>;
28
28
  dropPlaceholder: Required<DesignRenderProp>['dropPlaceholder'];
29
+ _components: Record<string, any>;
29
30
  constructor(props: DesignRenderProp);
31
+ updateComponents(newComponents?: Record<string, string>): void;
30
32
  componentDidMount(): void;
31
33
  getPageModel(): CPage | undefined;
32
34
  onGetComponent: (comp: any, node: CNode | CRootNode) => React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<unknown>>;
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- "use strict";var ma=Object.defineProperty;var ga=(t,e,r)=>e in t?ma(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var y=(t,e,r)=>(ga(t,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),ya=require("react-dom");function ba(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const _a=ba(ya),Sa=t=>()=>{console.warn(`${t} need to be implement getComponent`)},ja=["customPageRootRender"],Br=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],Ln=t=>[...Br,...ja].reduce((r,n)=>{var o;return t!=null&&t[n]?r[n]=(o=t[n])==null?void 0:o.bind(t):Br.includes(n)&&(r[n]=Sa),r},{});var Oa=Object.defineProperty,wa=(t,e,r)=>e in t?Oa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_=(t,e,r)=>(wa(t,typeof e!="symbol"?e+"":e,r),r),Ca=typeof global=="object"&&global&&global.Object===Object&&global;const Fn=Ca;var Ea=typeof self=="object"&&self&&self.Object===Object&&self,$a=Fn||Ea||Function("return this")();const K=$a;var Na=K.Symbol;const z=Na;var Bn=Object.prototype,Ta=Bn.hasOwnProperty,xa=Bn.toString,kt=z?z.toStringTag:void 0;function Ma(t){var e=Ta.call(t,kt),r=t[kt];try{t[kt]=void 0;var n=!0}catch{}var o=xa.call(t);return n&&(e?t[kt]=r:delete t[kt]),o}var Aa=Object.prototype,Pa=Aa.toString;function Ra(t){return Pa.call(t)}var Da="[object Null]",Ia="[object Undefined]",Ur=z?z.toStringTag:void 0;function vt(t){return t==null?t===void 0?Ia:Da:Ur&&Ur in Object(t)?Ma(t):Ra(t)}function Y(t){return t!=null&&typeof t=="object"}var La="[object Symbol]";function or(t){return typeof t=="symbol"||Y(t)&&vt(t)==La}function ar(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var Fa=Array.isArray;const R=Fa;var Ba=1/0,kr=z?z.prototype:void 0,Vr=kr?kr.toString:void 0;function Un(t){if(typeof t=="string")return t;if(R(t))return ar(t,Un)+"";if(or(t))return Vr?Vr.call(t):"";var e=t+"";return e=="0"&&1/t==-Ba?"-0":e}function Q(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function sr(t){return t}var Ua="[object AsyncFunction]",ka="[object Function]",Va="[object GeneratorFunction]",za="[object Proxy]";function ir(t){if(!Q(t))return!1;var e=vt(t);return e==ka||e==Va||e==Ua||e==za}var Ga=K["__core-js_shared__"];const Me=Ga;var zr=function(){var t=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ha(t){return!!zr&&zr in t}var Wa=Function.prototype,Ja=Wa.toString;function mt(t){if(t!=null){try{return Ja.call(t)}catch{}try{return t+""}catch{}}return""}var Qa=/[\\^$.*+?()[\]{}|]/g,qa=/^\[object .+?Constructor\]$/,Ya=Function.prototype,Ka=Object.prototype,Xa=Ya.toString,Za=Ka.hasOwnProperty,ts=RegExp("^"+Xa.call(Za).replace(Qa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function es(t){if(!Q(t)||Ha(t))return!1;var e=ir(t)?ts:qa;return e.test(mt(t))}function rs(t,e){return t==null?void 0:t[e]}function gt(t,e){var r=rs(t,e);return es(r)?r:void 0}var ns=gt(K,"WeakMap");const Be=ns;var Gr=Object.create,os=function(){function t(){}return function(e){if(!Q(e))return{};if(Gr)return Gr(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const as=os;function ss(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function is(){}function kn(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var cs=800,us=16,ls=Date.now;function fs(t){var e=0,r=0;return function(){var n=ls(),o=us-(n-r);if(r=n,o>0){if(++e>=cs)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ps(t){return function(){return t}}var ds=function(){try{var t=gt(Object,"defineProperty");return t({},"",{}),t}catch{}}();const fe=ds;var hs=fe?function(t,e){return fe(t,"toString",{configurable:!0,enumerable:!1,value:ps(e),writable:!0})}:sr;const vs=hs;var ms=fs(vs);const Vn=ms;function gs(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function ys(t,e,r,n){for(var o=t.length,a=r+(n?1:-1);n?a--:++a<o;)if(e(t[a],a,t))return a;return-1}function bs(t){return t!==t}function _s(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function Ss(t,e,r){return e===e?_s(t,e,r):ys(t,bs,r)}function js(t,e){var r=t==null?0:t.length;return!!r&&Ss(t,e,0)>-1}var Os=9007199254740991,ws=/^(?:0|[1-9]\d*)$/;function me(t,e){var r=typeof t;return e=e??Os,!!e&&(r=="number"||r!="symbol"&&ws.test(t))&&t>-1&&t%1==0&&t<e}function cr(t,e,r){e=="__proto__"&&fe?fe(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ee(t,e){return t===e||t!==t&&e!==e}var Cs=Object.prototype,Es=Cs.hasOwnProperty;function ur(t,e,r){var n=t[e];(!(Es.call(t,e)&&ee(n,r))||r===void 0&&!(e in t))&&cr(t,e,r)}function Nt(t,e,r,n){var o=!r;r||(r={});for(var a=-1,i=e.length;++a<i;){var s=e[a],c=n?n(r[s],t[s],s,r,t):void 0;c===void 0&&(c=t[s]),o?cr(r,s,c):ur(r,s,c)}return r}var Hr=Math.max;function zn(t,e,r){return e=Hr(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Hr(n.length-e,0),i=Array(a);++o<a;)i[o]=n[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=n[o];return s[e]=r(i),ss(t,this,s)}}function Gn(t,e){return Vn(zn(t,e,sr),t+"")}var $s=9007199254740991;function lr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=$s}function ge(t){return t!=null&&lr(t.length)&&!ir(t)}function Ns(t,e,r){if(!Q(r))return!1;var n=typeof e;return(n=="number"?ge(r)&&me(e,r.length):n=="string"&&e in r)?ee(r[e],t):!1}function Ts(t){return Gn(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,i&&Ns(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var s=r[n];s&&t(e,s,n,a)}return e})}var xs=Object.prototype;function fr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||xs;return t===r}function Ms(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var As="[object Arguments]";function Wr(t){return Y(t)&&vt(t)==As}var Hn=Object.prototype,Ps=Hn.hasOwnProperty,Rs=Hn.propertyIsEnumerable,Ds=Wr(function(){return arguments}())?Wr:function(t){return Y(t)&&Ps.call(t,"callee")&&!Rs.call(t,"callee")};const Jt=Ds;function Is(){return!1}var Wn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jr=Wn&&typeof module=="object"&&module&&!module.nodeType&&module,Ls=Jr&&Jr.exports===Wn,Qr=Ls?K.Buffer:void 0,Fs=Qr?Qr.isBuffer:void 0,Bs=Fs||Is;const Qt=Bs;var Us="[object Arguments]",ks="[object Array]",Vs="[object Boolean]",zs="[object Date]",Gs="[object Error]",Hs="[object Function]",Ws="[object Map]",Js="[object Number]",Qs="[object Object]",qs="[object RegExp]",Ys="[object Set]",Ks="[object String]",Xs="[object WeakMap]",Zs="[object ArrayBuffer]",ti="[object DataView]",ei="[object Float32Array]",ri="[object Float64Array]",ni="[object Int8Array]",oi="[object Int16Array]",ai="[object Int32Array]",si="[object Uint8Array]",ii="[object Uint8ClampedArray]",ci="[object Uint16Array]",ui="[object Uint32Array]",$={};$[ei]=$[ri]=$[ni]=$[oi]=$[ai]=$[si]=$[ii]=$[ci]=$[ui]=!0;$[Us]=$[ks]=$[Zs]=$[Vs]=$[ti]=$[zs]=$[Gs]=$[Hs]=$[Ws]=$[Js]=$[Qs]=$[qs]=$[Ys]=$[Ks]=$[Xs]=!1;function li(t){return Y(t)&&lr(t.length)&&!!$[vt(t)]}function pr(t){return function(e){return t(e)}}var Jn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zt=Jn&&typeof module=="object"&&module&&!module.nodeType&&module,fi=zt&&zt.exports===Jn,Ae=fi&&Fn.process,pi=function(){try{var t=zt&&zt.require&&zt.require("util").types;return t||Ae&&Ae.binding&&Ae.binding("util")}catch{}}();const St=pi;var qr=St&&St.isTypedArray,di=qr?pr(qr):li;const dr=di;var hi=Object.prototype,vi=hi.hasOwnProperty;function Qn(t,e){var r=R(t),n=!r&&Jt(t),o=!r&&!n&&Qt(t),a=!r&&!n&&!o&&dr(t),i=r||n||o||a,s=i?Ms(t.length,String):[],c=s.length;for(var u in t)(e||vi.call(t,u))&&!(i&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||me(u,c)))&&s.push(u);return s}function qn(t,e){return function(r){return t(e(r))}}var mi=qn(Object.keys,Object);const gi=mi;var yi=Object.prototype,bi=yi.hasOwnProperty;function _i(t){if(!fr(t))return gi(t);var e=[];for(var r in Object(t))bi.call(t,r)&&r!="constructor"&&e.push(r);return e}function ye(t){return ge(t)?Qn(t):_i(t)}function Si(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ji=Object.prototype,Oi=ji.hasOwnProperty;function wi(t){if(!Q(t))return Si(t);var e=fr(t),r=[];for(var n in t)n=="constructor"&&(e||!Oi.call(t,n))||r.push(n);return r}function re(t){return ge(t)?Qn(t,!0):wi(t)}var Ci=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ei=/^\w*$/;function hr(t,e){if(R(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||or(t)?!0:Ei.test(t)||!Ci.test(t)||e!=null&&t in Object(e)}var $i=gt(Object,"create");const qt=$i;function Ni(){this.__data__=qt?qt(null):{},this.size=0}function Ti(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var xi="__lodash_hash_undefined__",Mi=Object.prototype,Ai=Mi.hasOwnProperty;function Pi(t){var e=this.__data__;if(qt){var r=e[t];return r===xi?void 0:r}return Ai.call(e,t)?e[t]:void 0}var Ri=Object.prototype,Di=Ri.hasOwnProperty;function Ii(t){var e=this.__data__;return qt?e[t]!==void 0:Di.call(e,t)}var Li="__lodash_hash_undefined__";function Fi(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=qt&&e===void 0?Li:e,this}function ft(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ft.prototype.clear=Ni;ft.prototype.delete=Ti;ft.prototype.get=Pi;ft.prototype.has=Ii;ft.prototype.set=Fi;function Bi(){this.__data__=[],this.size=0}function be(t,e){for(var r=t.length;r--;)if(ee(t[r][0],e))return r;return-1}var Ui=Array.prototype,ki=Ui.splice;function Vi(t){var e=this.__data__,r=be(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ki.call(e,r,1),--this.size,!0}function zi(t){var e=this.__data__,r=be(e,t);return r<0?void 0:e[r][1]}function Gi(t){return be(this.__data__,t)>-1}function Hi(t,e){var r=this.__data__,n=be(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function tt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}tt.prototype.clear=Bi;tt.prototype.delete=Vi;tt.prototype.get=zi;tt.prototype.has=Gi;tt.prototype.set=Hi;var Wi=gt(K,"Map");const Yt=Wi;function Ji(){this.size=0,this.__data__={hash:new ft,map:new(Yt||tt),string:new ft}}function Qi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function _e(t,e){var r=t.__data__;return Qi(e)?r[typeof e=="string"?"string":"hash"]:r.map}function qi(t){var e=_e(this,t).delete(t);return this.size-=e?1:0,e}function Yi(t){return _e(this,t).get(t)}function Ki(t){return _e(this,t).has(t)}function Xi(t,e){var r=_e(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function et(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}et.prototype.clear=Ji;et.prototype.delete=qi;et.prototype.get=Yi;et.prototype.has=Ki;et.prototype.set=Xi;var Zi="Expected a function";function vr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Zi);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(vr.Cache||et),r}vr.Cache=et;var tc=500;function ec(t){var e=vr(t,function(n){return r.size===tc&&r.clear(),n}),r=e.cache;return e}var rc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nc=/\\(\\)?/g,oc=ec(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(rc,function(r,n,o,a){e.push(o?a.replace(nc,"$1"):n||r)}),e});const ac=oc;function sc(t){return t==null?"":Un(t)}function Tt(t,e){return R(t)?t:hr(t,e)?[t]:ac(sc(t))}var ic=1/0;function xt(t){if(typeof t=="string"||or(t))return t;var e=t+"";return e=="0"&&1/t==-ic?"-0":e}function Se(t,e){e=Tt(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[xt(e[r++])];return r&&r==n?t:void 0}function Yn(t,e,r){var n=t==null?void 0:Se(t,e);return n===void 0?r:n}function mr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var Yr=z?z.isConcatSpreadable:void 0;function cc(t){return R(t)||Jt(t)||!!(Yr&&t&&t[Yr])}function gr(t,e,r,n,o){var a=-1,i=t.length;for(r||(r=cc),o||(o=[]);++a<i;){var s=t[a];e>0&&r(s)?e>1?gr(s,e-1,r,n,o):mr(o,s):n||(o[o.length]=s)}return o}function uc(t){var e=t==null?0:t.length;return e?gr(t,1):[]}function lc(t){return Vn(zn(t,void 0,uc),t+"")}var fc=qn(Object.getPrototypeOf,Object);const yr=fc;var pc="[object Object]",dc=Function.prototype,hc=Object.prototype,Kn=dc.toString,vc=hc.hasOwnProperty,mc=Kn.call(Object);function B(t){if(!Y(t)||vt(t)!=pc)return!1;var e=yr(t);if(e===null)return!0;var r=vc.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Kn.call(r)==mc}function gc(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(o);++n<o;)a[n]=t[n+e];return a}function yc(){this.__data__=new tt,this.size=0}function bc(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function _c(t){return this.__data__.get(t)}function Sc(t){return this.__data__.has(t)}var jc=200;function Oc(t,e){var r=this.__data__;if(r instanceof tt){var n=r.__data__;if(!Yt||n.length<jc-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new et(n)}return r.set(t,e),this.size=r.size,this}function W(t){var e=this.__data__=new tt(t);this.size=e.size}W.prototype.clear=yc;W.prototype.delete=bc;W.prototype.get=_c;W.prototype.has=Sc;W.prototype.set=Oc;function wc(t,e){return t&&Nt(e,ye(e),t)}function Cc(t,e){return t&&Nt(e,re(e),t)}var Xn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kr=Xn&&typeof module=="object"&&module&&!module.nodeType&&module,Ec=Kr&&Kr.exports===Xn,Xr=Ec?K.Buffer:void 0,Zr=Xr?Xr.allocUnsafe:void 0;function Zn(t,e){if(e)return t.slice();var r=t.length,n=Zr?Zr(r):new t.constructor(r);return t.copy(n),n}function $c(t,e){for(var r=-1,n=t==null?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a}function to(){return[]}var Nc=Object.prototype,Tc=Nc.propertyIsEnumerable,tn=Object.getOwnPropertySymbols,xc=tn?function(t){return t==null?[]:(t=Object(t),$c(tn(t),function(e){return Tc.call(t,e)}))}:to;const br=xc;function Mc(t,e){return Nt(t,br(t),e)}var Ac=Object.getOwnPropertySymbols,Pc=Ac?function(t){for(var e=[];t;)mr(e,br(t)),t=yr(t);return e}:to;const eo=Pc;function Rc(t,e){return Nt(t,eo(t),e)}function ro(t,e,r){var n=e(t);return R(t)?n:mr(n,r(t))}function Ue(t){return ro(t,ye,br)}function _r(t){return ro(t,re,eo)}var Dc=gt(K,"DataView");const ke=Dc;var Ic=gt(K,"Promise");const Ve=Ic;var Lc=gt(K,"Set");const _t=Lc;var en="[object Map]",Fc="[object Object]",rn="[object Promise]",nn="[object Set]",on="[object WeakMap]",an="[object DataView]",Bc=mt(ke),Uc=mt(Yt),kc=mt(Ve),Vc=mt(_t),zc=mt(Be),ut=vt;(ke&&ut(new ke(new ArrayBuffer(1)))!=an||Yt&&ut(new Yt)!=en||Ve&&ut(Ve.resolve())!=rn||_t&&ut(new _t)!=nn||Be&&ut(new Be)!=on)&&(ut=function(t){var e=vt(t),r=e==Fc?t.constructor:void 0,n=r?mt(r):"";if(n)switch(n){case Bc:return an;case Uc:return en;case kc:return rn;case Vc:return nn;case zc:return on}return e});const Kt=ut;var Gc=Object.prototype,Hc=Gc.hasOwnProperty;function Wc(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Hc.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Jc=K.Uint8Array;const pe=Jc;function Sr(t){var e=new t.constructor(t.byteLength);return new pe(e).set(new pe(t)),e}function Qc(t,e){var r=e?Sr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var qc=/\w*$/;function Yc(t){var e=new t.constructor(t.source,qc.exec(t));return e.lastIndex=t.lastIndex,e}var sn=z?z.prototype:void 0,cn=sn?sn.valueOf:void 0;function Kc(t){return cn?Object(cn.call(t)):{}}function no(t,e){var r=e?Sr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Xc="[object Boolean]",Zc="[object Date]",tu="[object Map]",eu="[object Number]",ru="[object RegExp]",nu="[object Set]",ou="[object String]",au="[object Symbol]",su="[object ArrayBuffer]",iu="[object DataView]",cu="[object Float32Array]",uu="[object Float64Array]",lu="[object Int8Array]",fu="[object Int16Array]",pu="[object Int32Array]",du="[object Uint8Array]",hu="[object Uint8ClampedArray]",vu="[object Uint16Array]",mu="[object Uint32Array]";function gu(t,e,r){var n=t.constructor;switch(e){case su:return Sr(t);case Xc:case Zc:return new n(+t);case iu:return Qc(t,r);case cu:case uu:case lu:case fu:case pu:case du:case hu:case vu:case mu:return no(t,r);case tu:return new n;case eu:case ou:return new n(t);case ru:return Yc(t);case nu:return new n;case au:return Kc(t)}}function oo(t){return typeof t.constructor=="function"&&!fr(t)?as(yr(t)):{}}var yu="[object Map]";function bu(t){return Y(t)&&Kt(t)==yu}var un=St&&St.isMap,_u=un?pr(un):bu;const Su=_u;var ju="[object Set]";function Ou(t){return Y(t)&&Kt(t)==ju}var ln=St&&St.isSet,wu=ln?pr(ln):Ou;const Cu=wu;var Eu=1,$u=2,Nu=4,ao="[object Arguments]",Tu="[object Array]",xu="[object Boolean]",Mu="[object Date]",Au="[object Error]",so="[object Function]",Pu="[object GeneratorFunction]",Ru="[object Map]",Du="[object Number]",io="[object Object]",Iu="[object RegExp]",Lu="[object Set]",Fu="[object String]",Bu="[object Symbol]",Uu="[object WeakMap]",ku="[object ArrayBuffer]",Vu="[object DataView]",zu="[object Float32Array]",Gu="[object Float64Array]",Hu="[object Int8Array]",Wu="[object Int16Array]",Ju="[object Int32Array]",Qu="[object Uint8Array]",qu="[object Uint8ClampedArray]",Yu="[object Uint16Array]",Ku="[object Uint32Array]",E={};E[ao]=E[Tu]=E[ku]=E[Vu]=E[xu]=E[Mu]=E[zu]=E[Gu]=E[Hu]=E[Wu]=E[Ju]=E[Ru]=E[Du]=E[io]=E[Iu]=E[Lu]=E[Fu]=E[Bu]=E[Qu]=E[qu]=E[Yu]=E[Ku]=!0;E[Au]=E[so]=E[Uu]=!1;function Gt(t,e,r,n,o,a){var i,s=e&Eu,c=e&$u,u=e&Nu;if(r&&(i=o?r(t,n,o,a):r(t)),i!==void 0)return i;if(!Q(t))return t;var l=R(t);if(l){if(i=Wc(t),!s)return kn(t,i)}else{var p=Kt(t),f=p==so||p==Pu;if(Qt(t))return Zn(t,s);if(p==io||p==ao||f&&!o){if(i=c||f?{}:oo(t),!s)return c?Rc(t,Cc(i,t)):Mc(t,wc(i,t))}else{if(!E[p])return o?t:{};i=gu(t,p,s)}}a||(a=new W);var d=a.get(t);if(d)return d;a.set(t,i),Cu(t)?t.forEach(function(b){i.add(Gt(b,e,r,b,t,a))}):Su(t)&&t.forEach(function(b,j){i.set(j,Gt(b,e,r,j,t,a))});var h=u?c?_r:Ue:c?re:ye,g=l?void 0:h(t);return gs(g||t,function(b,j){g&&(j=b,b=t[j]),ur(i,j,Gt(b,e,r,j,t,a))}),i}var Xu=1,Zu=4;function co(t){return Gt(t,Xu|Zu)}var tl="__lodash_hash_undefined__";function el(t){return this.__data__.set(t,tl),this}function rl(t){return this.__data__.has(t)}function Xt(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new et;++e<r;)this.add(t[e])}Xt.prototype.add=Xt.prototype.push=el;Xt.prototype.has=rl;function nl(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function uo(t,e){return t.has(e)}var ol=1,al=2;function lo(t,e,r,n,o,a){var i=r&ol,s=t.length,c=e.length;if(s!=c&&!(i&&c>s))return!1;var u=a.get(t),l=a.get(e);if(u&&l)return u==e&&l==t;var p=-1,f=!0,d=r&al?new Xt:void 0;for(a.set(t,e),a.set(e,t);++p<s;){var h=t[p],g=e[p];if(n)var b=i?n(g,h,p,e,t,a):n(h,g,p,t,e,a);if(b!==void 0){if(b)continue;f=!1;break}if(d){if(!nl(e,function(j,O){if(!uo(d,O)&&(h===j||o(h,j,r,n,a)))return d.push(O)})){f=!1;break}}else if(!(h===g||o(h,g,r,n,a))){f=!1;break}}return a.delete(t),a.delete(e),f}function sl(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function jr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var il=1,cl=2,ul="[object Boolean]",ll="[object Date]",fl="[object Error]",pl="[object Map]",dl="[object Number]",hl="[object RegExp]",vl="[object Set]",ml="[object String]",gl="[object Symbol]",yl="[object ArrayBuffer]",bl="[object DataView]",fn=z?z.prototype:void 0,Pe=fn?fn.valueOf:void 0;function _l(t,e,r,n,o,a,i){switch(r){case bl:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case yl:return!(t.byteLength!=e.byteLength||!a(new pe(t),new pe(e)));case ul:case ll:case dl:return ee(+t,+e);case fl:return t.name==e.name&&t.message==e.message;case hl:case ml:return t==e+"";case pl:var s=sl;case vl:var c=n&il;if(s||(s=jr),t.size!=e.size&&!c)return!1;var u=i.get(t);if(u)return u==e;n|=cl,i.set(t,e);var l=lo(s(t),s(e),n,o,a,i);return i.delete(t),l;case gl:if(Pe)return Pe.call(t)==Pe.call(e)}return!1}var Sl=1,jl=Object.prototype,Ol=jl.hasOwnProperty;function wl(t,e,r,n,o,a){var i=r&Sl,s=Ue(t),c=s.length,u=Ue(e),l=u.length;if(c!=l&&!i)return!1;for(var p=c;p--;){var f=s[p];if(!(i?f in e:Ol.call(e,f)))return!1}var d=a.get(t),h=a.get(e);if(d&&h)return d==e&&h==t;var g=!0;a.set(t,e),a.set(e,t);for(var b=i;++p<c;){f=s[p];var j=t[f],O=e[f];if(n)var T=i?n(O,j,f,e,t,a):n(j,O,f,t,e,a);if(!(T===void 0?j===O||o(j,O,r,n,a):T)){g=!1;break}b||(b=f=="constructor")}if(g&&!b){var A=t.constructor,I=e.constructor;A!=I&&"constructor"in t&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof I=="function"&&I instanceof I)&&(g=!1)}return a.delete(t),a.delete(e),g}var Cl=1,pn="[object Arguments]",dn="[object Array]",ce="[object Object]",El=Object.prototype,hn=El.hasOwnProperty;function $l(t,e,r,n,o,a){var i=R(t),s=R(e),c=i?dn:Kt(t),u=s?dn:Kt(e);c=c==pn?ce:c,u=u==pn?ce:u;var l=c==ce,p=u==ce,f=c==u;if(f&&Qt(t)){if(!Qt(e))return!1;i=!0,l=!1}if(f&&!l)return a||(a=new W),i||dr(t)?lo(t,e,r,n,o,a):_l(t,e,c,r,n,o,a);if(!(r&Cl)){var d=l&&hn.call(t,"__wrapped__"),h=p&&hn.call(e,"__wrapped__");if(d||h){var g=d?t.value():t,b=h?e.value():e;return a||(a=new W),o(g,b,r,n,a)}}return f?(a||(a=new W),wl(t,e,r,n,o,a)):!1}function Or(t,e,r,n,o){return t===e?!0:t==null||e==null||!Y(t)&&!Y(e)?t!==t&&e!==e:$l(t,e,r,n,Or,o)}var Nl=1,Tl=2;function xl(t,e,r,n){var o=r.length,a=o,i=!n;if(t==null)return!a;for(t=Object(t);o--;){var s=r[o];if(i&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<a;){s=r[o];var c=s[0],u=t[c],l=s[1];if(i&&s[2]){if(u===void 0&&!(c in t))return!1}else{var p=new W;if(n)var f=n(u,l,c,t,e,p);if(!(f===void 0?Or(l,u,Nl|Tl,n,p):f))return!1}}return!0}function fo(t){return t===t&&!Q(t)}function Ml(t){for(var e=ye(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,fo(o)]}return e}function po(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function Al(t){var e=Ml(t);return e.length==1&&e[0][2]?po(e[0][0],e[0][1]):function(r){return r===t||xl(r,t,e)}}function Pl(t,e){return t!=null&&e in Object(t)}function Rl(t,e,r){e=Tt(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var i=xt(e[n]);if(!(a=t!=null&&r(t,i)))break;t=t[i]}return a||++n!=o?a:(o=t==null?0:t.length,!!o&&lr(o)&&me(i,o)&&(R(t)||Jt(t)))}function Dl(t,e){return t!=null&&Rl(t,e,Pl)}var Il=1,Ll=2;function Fl(t,e){return hr(t)&&fo(e)?po(xt(t),e):function(r){var n=Yn(r,t);return n===void 0&&n===e?Dl(r,t):Or(e,n,Il|Ll)}}function Bl(t){return function(e){return e==null?void 0:e[t]}}function Ul(t){return function(e){return Se(e,t)}}function kl(t){return hr(t)?Bl(xt(t)):Ul(t)}function wr(t){return typeof t=="function"?t:t==null?sr:typeof t=="object"?R(t)?Fl(t[0],t[1]):Al(t):kl(t)}function Vl(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),s=i.length;s--;){var c=i[t?s:++o];if(r(a[c],c,a)===!1)break}return e}}var zl=Vl();const Gl=zl;function ze(t,e,r){(r!==void 0&&!ee(t[e],r)||r===void 0&&!(e in t))&&cr(t,e,r)}function Ge(t){return Y(t)&&ge(t)}function He(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Hl(t){return Nt(t,re(t))}function Wl(t,e,r,n,o,a,i){var s=He(t,r),c=He(e,r),u=i.get(c);if(u){ze(t,r,u);return}var l=a?a(s,c,r+"",t,e,i):void 0,p=l===void 0;if(p){var f=R(c),d=!f&&Qt(c),h=!f&&!d&&dr(c);l=c,f||d||h?R(s)?l=s:Ge(s)?l=kn(s):d?(p=!1,l=Zn(c,!0)):h?(p=!1,l=no(c,!0)):l=[]:B(c)||Jt(c)?(l=s,Jt(s)?l=Hl(s):(!Q(s)||ir(s))&&(l=oo(c))):p=!1}p&&(i.set(c,l),o(l,c,n,a,i),i.delete(c)),ze(t,r,l)}function ho(t,e,r,n,o){t!==e&&Gl(e,function(a,i){if(o||(o=new W),Q(a))Wl(t,e,i,r,ho,n,o);else{var s=n?n(He(t,i),a,i+"",t,e,o):void 0;s===void 0&&(s=a),ze(t,i,s)}},re)}function Jl(t,e,r){for(var n=-1,o=t==null?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}function vo(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Ql(t,e){return e.length<2?t:Se(t,gc(e,0,-1))}var ql=Ts(function(t,e,r){ho(t,e,r)});const mo=ql;var Yl="Expected a function";function Kl(t){if(typeof t!="function")throw new TypeError(Yl);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Xl(t,e){return e=Tt(e,t),t=Ql(t,e),t==null||delete t[xt(vo(e))]}function Zl(t){return B(t)?void 0:t}var tf=1,ef=2,rf=4,nf=lc(function(t,e){var r={};if(t==null)return r;var n=!1;e=ar(e,function(a){return a=Tt(a,t),n||(n=a.length>1),a}),Nt(t,_r(t),r),n&&(r=Gt(r,tf|ef|rf,Zl));for(var o=e.length;o--;)Xl(r,e[o]);return r});const go=nf;function of(t,e,r,n){if(!Q(t))return t;e=Tt(e,t);for(var o=-1,a=e.length,i=a-1,s=t;s!=null&&++o<a;){var c=xt(e[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=i){var l=s[c];u=n?n(l,c,s):void 0,u===void 0&&(u=Q(l)?l:me(e[o+1])?[]:{})}ur(s,c,u),s=s[c]}return t}function af(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var i=e[n],s=Se(t,i);r(s,i)&&of(a,Tt(i,t),s)}return a}function sf(t,e){if(t==null)return{};var r=ar(_r(t),function(n){return[n]});return e=wr(e),af(t,r,function(n,o){return e(n,o[0])})}function cf(t,e){return sf(t,Kl(wr(e)))}var uf=1/0,lf=_t&&1/jr(new _t([,-0]))[1]==uf?function(t){return new _t(t)}:is;const ff=lf;var pf=200;function df(t,e,r){var n=-1,o=js,a=t.length,i=!0,s=[],c=s;if(r)i=!1,o=Jl;else if(a>=pf){var u=e?null:ff(t);if(u)return jr(u);i=!1,o=uo,c=new Xt}else c=e?[]:s;t:for(;++n<a;){var l=t[n],p=e?e(l):l;if(l=r||l!==0?l:0,i&&p===p){for(var f=c.length;f--;)if(c[f]===p)continue t;e&&c.push(p),s.push(l)}else o(c,p,r)||(c!==s&&c.push(p),s.push(l))}return s}var hf=Gn(function(t){var e=vo(t);return Ge(e)&&(e=void 0),df(gr(t,1,Ge,!0),wr(e))});const vf=hf;class yo extends TypeError{constructor(e,r){let n;const{message:o,...a}=e,{path:i}=e,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var c;return(c=n)!=null?c:n=[e,...r()]}}}function mf(t){return J(t)&&typeof t[Symbol.iterator]=="function"}function J(t){return typeof t=="object"&&t!=null}function U(t){return typeof t=="string"?JSON.stringify(t):""+t}function gf(t){const{done:e,value:r}=t.next();return e?void 0:r}function yf(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:o,branch:a}=e,{type:i}=r,{refinement:s,message:c="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+U(n)+"`"}=t;return{value:n,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*vn(t,e,r,n){mf(t)||(t=[t]);for(const o of t){const a=yf(o,e,r,n);a&&(yield a)}}function*Cr(t,e,r){r===void 0&&(r={});const{path:n=[],branch:o=[t],coerce:a=!1,mask:i=!1}=r,s={path:n,branch:o};if(a&&(t=e.coercer(t,s),i&&e.type!=="type"&&J(e.schema)&&J(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,s))c="not_valid",yield[u,void 0];for(let[u,l,p]of e.entries(t,s)){const f=Cr(l,p,{path:u===void 0?n:[...n,u],branch:u===void 0?o:[...o,l],coerce:a,mask:i});for(const d of f)d[0]?(c=d[0].refinement!=null?"not_refined":"not_valid",yield[d[0],void 0]):a&&(l=d[1],u===void 0?t=l:t instanceof Map?t.set(u,l):t instanceof Set?t.add(l):J(t)&&(t[u]=l))}if(c!=="not_valid")for(const u of e.refiner(t,s))c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class X{constructor(e){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=c=>c,entries:s=function*(){}}=e;this.type=r,this.schema=n,this.entries=s,this.coercer=i,o?this.validator=(c,u)=>{const l=o(c,u);return vn(l,u,this,c)}:this.validator=()=>[],a?this.refiner=(c,u)=>{const l=a(c,u);return vn(l,u,this,c)}:this.refiner=()=>[]}assert(e){return bo(e,this)}create(e){return bf(e,this)}is(e){return Sf(e,this)}mask(e){return _f(e,this)}validate(e,r){return r===void 0&&(r={}),Mt(e,this,r)}}function bo(t,e){const r=Mt(t,e);if(r[0])throw r[0]}function bf(t,e){const r=Mt(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function _f(t,e){const r=Mt(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function Sf(t,e){return!Mt(t,e)[0]}function Mt(t,e,r){r===void 0&&(r={});const n=Cr(t,e,r),o=gf(n);return o[0]?[new yo(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Er(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const n=e[0].type==="type",o=e.map(i=>i.schema),a=Object.assign({},...o);return n?Oo(a):w(a)}function st(t,e){return new X({type:t,schema:null,validator:e})}function jt(t){return new X({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function _o(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return Oo(n);default:return w(n)}}function x(){return st("any",()=>!0)}function P(t){return new X({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||"Expected an array value, but received: "+U(e)}})}function pt(){return st("boolean",t=>typeof t=="boolean")}function We(t){const e={},r=t.map(n=>U(n)).join();for(const n of t)e[n]=n;return new X({type:"enums",schema:e,validator(n){return t.includes(n)||"Expected one of `"+r+"`, but received: "+U(n)}})}function So(){return st("func",t=>typeof t=="function"||"Expected a function, but received: "+U(t))}function L(t){const e=U(t),r=typeof t;return new X({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||"Expected the literal `"+e+"`, but received: "+U(n)}})}function jf(){return st("never",()=>!1)}function jo(){return st("number",t=>typeof t=="number"&&!isNaN(t)||"Expected a number, but received: "+U(t))}function w(t){const e=t?Object.keys(t):[],r=jf();return new X({type:"object",schema:t||null,*entries(n){if(t&&J(n)){const o=new Set(Object.keys(n));for(const a of e)o.delete(a),yield[a,n[a],t[a]];for(const a of o)yield[a,n[a],r]}},validator(n){return J(n)||"Expected an object, but received: "+U(n)},coercer(n){return J(n)?{...n}:n}})}function v(t){return new X({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Ht(t,e){return new X({type:"record",schema:null,*entries(r){if(J(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return J(r)||"Expected an object, but received: "+U(r)}})}function m(){return st("string",t=>typeof t=="string"||"Expected a string, but received: "+U(t))}function Oo(t){const e=Object.keys(t);return new X({type:"type",schema:t,*entries(r){if(J(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return J(r)||"Expected an object, but received: "+U(r)}})}function F(t){const e=t.map(r=>r.type).join(" | ");return new X({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||Of()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...i]=Cr(r,a,n),[s]=i;if(s[0])for(const[c]of i)c&&o.push(c);else return[]}return["Expected the value to satisfy a union of `"+e+"`, but received: "+U(r),...o]}})}function Of(){return st("unknown",()=>!0)}const $r=w({package:m(),version:m(),name:m(),exportName:v(m()),destructuring:v(pt()),subName:v(m()),main:v(m()),cssPaths:v(P(m()))}),wf=P($r),Cf=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var V=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t))(V||{}),Nr=(t=>(t.DESIGN="design",t.SAVE="save",t))(Nr||{}),Je=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(Je||{});const Ef=()=>st("normalObj",t=>!B(t)||[V.SLOT,V.EXPRESSION,V.FUNCTION].includes(t==null?void 0:t.type)?!1:(Mt(t,Ht(m(),Tr)),!0)),Tr=F([m(),jo(),pt(),w({type:L(V.SLOT),renderType:We([Je.FUNC,Je.COMP]),params:v(P(m())),value:jt(()=>F([Ot,P(Ot)]))}),w({type:L(V.EXPRESSION),value:m()}),w({type:L(V.FUNCTION),value:m()}),Ef(),P(jt(()=>Tr))]),mn=w({type:L(V.EXPRESSION),value:m()}),Ot=w({id:v(m()),title:v(m()),componentName:m(),props:v(Ht(m(),Tr)),nodeName:v(m()),state:v(Ht(m(),x())),children:jt(()=>v(P(F([m(),Ot])))),configure:v(x()),css:v(x()),style:v(x()),classNames:v(P(x())),refId:v(m()),extra:v(Ht(x(),x())),condition:v(F([pt(),mn])),loop:v(w({open:pt(),data:F([P(x()),mn]),args:v(P(m())),forName:v(m()),forIndex:v(m()),key:v(x()),name:v(m())})),methods:v(P(x()))}),de=F([m(),w({label:m(),tip:v(m())})]),$f=w({type:L("shape"),value:P(w({name:m(),title:de,valueType:jt(()=>je)}))}),Nf=w({type:L("enums"),value:P(m())});w({type:L("array"),value:jt(()=>je)});const Tf=w({type:L("array"),value:jt(()=>P(je))}),je=F([We(["array","boolean","number","object","string"]),We(["component","expression","function"]),$f,Nf,Tf]),xf=F([m(),w({componentName:m(),props:v(x()),initialValue:v(x()),component:v(x()),hiddenLabel:v(pt())})]),Re=w({name:m(),title:de,valueType:je,description:v(m()),defaultValue:x(),setters:v(P(xf)),condition:v(So())});F([m(),So()]);var Qe=(t=>(t.SINGLE="single",t.GROUP="group",t))(Qe||{});F([m(),w({name:m(),describe:v(m()),params:v(w({name:m(),description:m()})),template:m()})]);const Mf=w({id:v(m()),title:m(),snapshot:F([m(),x()]),snapshotText:v(m()),description:v(m()),tags:v(P(m())),groupName:v(m()),category:v(m()),schema:Er(_o(Ot,["id"]),w({componentName:v(m())}))}),Af=w({componentName:m(),title:m(),screenshot:v(m()),icon:v(m()),tags:v(P(m())),groupName:v(m()),category:v(m()),priority:v(jo()),npm:v($r),snippets:P(Mf),props:P(F([Re,w({title:v(de),type:L("single"),content:Re}),w({title:v(de),type:L("group"),content:P(Re)})])),fixedProps:v(x()),isContainer:v(F([pt(),w({placeholder:m(),width:m(),height:m()})])),disableEditorDragDom:v(x()),isLayout:v(pt()),rootSelector:v(m()),advanceCustom:v(x()),extra:v(Ht(x(),x()))}),Pf=t=>({data:e,message:r,throwError:n})=>{const o=t({data:e,message:r,throwError:n});if(o.isValidate)return o;if(n)throw o.message||r?new Error(`${o.message||r}
1
+ "use strict";var va=Object.defineProperty;var ga=(t,e,r)=>e in t?va(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var y=(t,e,r)=>(ga(t,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("react"),ya=require("react-dom");function ba(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const _a=ba(ya),Sa=t=>()=>{console.warn(`${t} need to be implement getComponent`)},ja=["customPageRootRender"],Br=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],Ln=t=>[...Br,...ja].reduce((r,n)=>{var o;return t!=null&&t[n]?r[n]=(o=t[n])==null?void 0:o.bind(t):Br.includes(n)&&(r[n]=Sa),r},{});var Oa=Object.defineProperty,wa=(t,e,r)=>e in t?Oa(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,_=(t,e,r)=>(wa(t,typeof e!="symbol"?e+"":e,r),r),Ca=typeof global=="object"&&global&&global.Object===Object&&global;const Fn=Ca;var Ea=typeof self=="object"&&self&&self.Object===Object&&self,$a=Fn||Ea||Function("return this")();const K=$a;var Na=K.Symbol;const z=Na;var Bn=Object.prototype,Ta=Bn.hasOwnProperty,xa=Bn.toString,kt=z?z.toStringTag:void 0;function Ma(t){var e=Ta.call(t,kt),r=t[kt];try{t[kt]=void 0;var n=!0}catch{}var o=xa.call(t);return n&&(e?t[kt]=r:delete t[kt]),o}var Aa=Object.prototype,Pa=Aa.toString;function Ra(t){return Pa.call(t)}var Da="[object Null]",Ia="[object Undefined]",Ur=z?z.toStringTag:void 0;function mt(t){return t==null?t===void 0?Ia:Da:Ur&&Ur in Object(t)?Ma(t):Ra(t)}function Y(t){return t!=null&&typeof t=="object"}var La="[object Symbol]";function or(t){return typeof t=="symbol"||Y(t)&&mt(t)==La}function ar(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var Fa=Array.isArray;const R=Fa;var Ba=1/0,kr=z?z.prototype:void 0,Vr=kr?kr.toString:void 0;function Un(t){if(typeof t=="string")return t;if(R(t))return ar(t,Un)+"";if(or(t))return Vr?Vr.call(t):"";var e=t+"";return e=="0"&&1/t==-Ba?"-0":e}function Q(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function sr(t){return t}var Ua="[object AsyncFunction]",ka="[object Function]",Va="[object GeneratorFunction]",za="[object Proxy]";function ir(t){if(!Q(t))return!1;var e=mt(t);return e==ka||e==Va||e==Ua||e==za}var Ga=K["__core-js_shared__"];const Me=Ga;var zr=function(){var t=/[^.]+$/.exec(Me&&Me.keys&&Me.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ha(t){return!!zr&&zr in t}var Wa=Function.prototype,Ja=Wa.toString;function vt(t){if(t!=null){try{return Ja.call(t)}catch{}try{return t+""}catch{}}return""}var Qa=/[\\^$.*+?()[\]{}|]/g,qa=/^\[object .+?Constructor\]$/,Ya=Function.prototype,Ka=Object.prototype,Xa=Ya.toString,Za=Ka.hasOwnProperty,ts=RegExp("^"+Xa.call(Za).replace(Qa,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function es(t){if(!Q(t)||Ha(t))return!1;var e=ir(t)?ts:qa;return e.test(vt(t))}function rs(t,e){return t==null?void 0:t[e]}function gt(t,e){var r=rs(t,e);return es(r)?r:void 0}var ns=gt(K,"WeakMap");const Be=ns;var Gr=Object.create,os=function(){function t(){}return function(e){if(!Q(e))return{};if(Gr)return Gr(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const as=os;function ss(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function is(){}function kn(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var cs=800,us=16,ls=Date.now;function fs(t){var e=0,r=0;return function(){var n=ls(),o=us-(n-r);if(r=n,o>0){if(++e>=cs)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ps(t){return function(){return t}}var ds=function(){try{var t=gt(Object,"defineProperty");return t({},"",{}),t}catch{}}();const fe=ds;var hs=fe?function(t,e){return fe(t,"toString",{configurable:!0,enumerable:!1,value:ps(e),writable:!0})}:sr;const ms=hs;var vs=fs(ms);const Vn=vs;function gs(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function ys(t,e,r,n){for(var o=t.length,a=r+(n?1:-1);n?a--:++a<o;)if(e(t[a],a,t))return a;return-1}function bs(t){return t!==t}function _s(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function Ss(t,e,r){return e===e?_s(t,e,r):ys(t,bs,r)}function js(t,e){var r=t==null?0:t.length;return!!r&&Ss(t,e,0)>-1}var Os=9007199254740991,ws=/^(?:0|[1-9]\d*)$/;function ve(t,e){var r=typeof t;return e=e??Os,!!e&&(r=="number"||r!="symbol"&&ws.test(t))&&t>-1&&t%1==0&&t<e}function cr(t,e,r){e=="__proto__"&&fe?fe(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function ee(t,e){return t===e||t!==t&&e!==e}var Cs=Object.prototype,Es=Cs.hasOwnProperty;function ur(t,e,r){var n=t[e];(!(Es.call(t,e)&&ee(n,r))||r===void 0&&!(e in t))&&cr(t,e,r)}function Nt(t,e,r,n){var o=!r;r||(r={});for(var a=-1,i=e.length;++a<i;){var s=e[a],c=n?n(r[s],t[s],s,r,t):void 0;c===void 0&&(c=t[s]),o?cr(r,s,c):ur(r,s,c)}return r}var Hr=Math.max;function zn(t,e,r){return e=Hr(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Hr(n.length-e,0),i=Array(a);++o<a;)i[o]=n[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=n[o];return s[e]=r(i),ss(t,this,s)}}function Gn(t,e){return Vn(zn(t,e,sr),t+"")}var $s=9007199254740991;function lr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=$s}function ge(t){return t!=null&&lr(t.length)&&!ir(t)}function Ns(t,e,r){if(!Q(r))return!1;var n=typeof e;return(n=="number"?ge(r)&&ve(e,r.length):n=="string"&&e in r)?ee(r[e],t):!1}function Ts(t){return Gn(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,i&&Ns(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var s=r[n];s&&t(e,s,n,a)}return e})}var xs=Object.prototype;function fr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||xs;return t===r}function Ms(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var As="[object Arguments]";function Wr(t){return Y(t)&&mt(t)==As}var Hn=Object.prototype,Ps=Hn.hasOwnProperty,Rs=Hn.propertyIsEnumerable,Ds=Wr(function(){return arguments}())?Wr:function(t){return Y(t)&&Ps.call(t,"callee")&&!Rs.call(t,"callee")};const Jt=Ds;function Is(){return!1}var Wn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Jr=Wn&&typeof module=="object"&&module&&!module.nodeType&&module,Ls=Jr&&Jr.exports===Wn,Qr=Ls?K.Buffer:void 0,Fs=Qr?Qr.isBuffer:void 0,Bs=Fs||Is;const Qt=Bs;var Us="[object Arguments]",ks="[object Array]",Vs="[object Boolean]",zs="[object Date]",Gs="[object Error]",Hs="[object Function]",Ws="[object Map]",Js="[object Number]",Qs="[object Object]",qs="[object RegExp]",Ys="[object Set]",Ks="[object String]",Xs="[object WeakMap]",Zs="[object ArrayBuffer]",ti="[object DataView]",ei="[object Float32Array]",ri="[object Float64Array]",ni="[object Int8Array]",oi="[object Int16Array]",ai="[object Int32Array]",si="[object Uint8Array]",ii="[object Uint8ClampedArray]",ci="[object Uint16Array]",ui="[object Uint32Array]",$={};$[ei]=$[ri]=$[ni]=$[oi]=$[ai]=$[si]=$[ii]=$[ci]=$[ui]=!0;$[Us]=$[ks]=$[Zs]=$[Vs]=$[ti]=$[zs]=$[Gs]=$[Hs]=$[Ws]=$[Js]=$[Qs]=$[qs]=$[Ys]=$[Ks]=$[Xs]=!1;function li(t){return Y(t)&&lr(t.length)&&!!$[mt(t)]}function pr(t){return function(e){return t(e)}}var Jn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zt=Jn&&typeof module=="object"&&module&&!module.nodeType&&module,fi=zt&&zt.exports===Jn,Ae=fi&&Fn.process,pi=function(){try{var t=zt&&zt.require&&zt.require("util").types;return t||Ae&&Ae.binding&&Ae.binding("util")}catch{}}();const St=pi;var qr=St&&St.isTypedArray,di=qr?pr(qr):li;const dr=di;var hi=Object.prototype,mi=hi.hasOwnProperty;function Qn(t,e){var r=R(t),n=!r&&Jt(t),o=!r&&!n&&Qt(t),a=!r&&!n&&!o&&dr(t),i=r||n||o||a,s=i?Ms(t.length,String):[],c=s.length;for(var u in t)(e||mi.call(t,u))&&!(i&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||ve(u,c)))&&s.push(u);return s}function qn(t,e){return function(r){return t(e(r))}}var vi=qn(Object.keys,Object);const gi=vi;var yi=Object.prototype,bi=yi.hasOwnProperty;function _i(t){if(!fr(t))return gi(t);var e=[];for(var r in Object(t))bi.call(t,r)&&r!="constructor"&&e.push(r);return e}function ye(t){return ge(t)?Qn(t):_i(t)}function Si(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var ji=Object.prototype,Oi=ji.hasOwnProperty;function wi(t){if(!Q(t))return Si(t);var e=fr(t),r=[];for(var n in t)n=="constructor"&&(e||!Oi.call(t,n))||r.push(n);return r}function re(t){return ge(t)?Qn(t,!0):wi(t)}var Ci=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ei=/^\w*$/;function hr(t,e){if(R(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||or(t)?!0:Ei.test(t)||!Ci.test(t)||e!=null&&t in Object(e)}var $i=gt(Object,"create");const qt=$i;function Ni(){this.__data__=qt?qt(null):{},this.size=0}function Ti(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var xi="__lodash_hash_undefined__",Mi=Object.prototype,Ai=Mi.hasOwnProperty;function Pi(t){var e=this.__data__;if(qt){var r=e[t];return r===xi?void 0:r}return Ai.call(e,t)?e[t]:void 0}var Ri=Object.prototype,Di=Ri.hasOwnProperty;function Ii(t){var e=this.__data__;return qt?e[t]!==void 0:Di.call(e,t)}var Li="__lodash_hash_undefined__";function Fi(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=qt&&e===void 0?Li:e,this}function ft(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ft.prototype.clear=Ni;ft.prototype.delete=Ti;ft.prototype.get=Pi;ft.prototype.has=Ii;ft.prototype.set=Fi;function Bi(){this.__data__=[],this.size=0}function be(t,e){for(var r=t.length;r--;)if(ee(t[r][0],e))return r;return-1}var Ui=Array.prototype,ki=Ui.splice;function Vi(t){var e=this.__data__,r=be(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():ki.call(e,r,1),--this.size,!0}function zi(t){var e=this.__data__,r=be(e,t);return r<0?void 0:e[r][1]}function Gi(t){return be(this.__data__,t)>-1}function Hi(t,e){var r=this.__data__,n=be(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function tt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}tt.prototype.clear=Bi;tt.prototype.delete=Vi;tt.prototype.get=zi;tt.prototype.has=Gi;tt.prototype.set=Hi;var Wi=gt(K,"Map");const Yt=Wi;function Ji(){this.size=0,this.__data__={hash:new ft,map:new(Yt||tt),string:new ft}}function Qi(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function _e(t,e){var r=t.__data__;return Qi(e)?r[typeof e=="string"?"string":"hash"]:r.map}function qi(t){var e=_e(this,t).delete(t);return this.size-=e?1:0,e}function Yi(t){return _e(this,t).get(t)}function Ki(t){return _e(this,t).has(t)}function Xi(t,e){var r=_e(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function et(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}et.prototype.clear=Ji;et.prototype.delete=qi;et.prototype.get=Yi;et.prototype.has=Ki;et.prototype.set=Xi;var Zi="Expected a function";function mr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Zi);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],a=r.cache;if(a.has(o))return a.get(o);var i=t.apply(this,n);return r.cache=a.set(o,i)||a,i};return r.cache=new(mr.Cache||et),r}mr.Cache=et;var tc=500;function ec(t){var e=mr(t,function(n){return r.size===tc&&r.clear(),n}),r=e.cache;return e}var rc=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,nc=/\\(\\)?/g,oc=ec(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(rc,function(r,n,o,a){e.push(o?a.replace(nc,"$1"):n||r)}),e});const ac=oc;function sc(t){return t==null?"":Un(t)}function Tt(t,e){return R(t)?t:hr(t,e)?[t]:ac(sc(t))}var ic=1/0;function xt(t){if(typeof t=="string"||or(t))return t;var e=t+"";return e=="0"&&1/t==-ic?"-0":e}function Se(t,e){e=Tt(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[xt(e[r++])];return r&&r==n?t:void 0}function Yn(t,e,r){var n=t==null?void 0:Se(t,e);return n===void 0?r:n}function vr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var Yr=z?z.isConcatSpreadable:void 0;function cc(t){return R(t)||Jt(t)||!!(Yr&&t&&t[Yr])}function gr(t,e,r,n,o){var a=-1,i=t.length;for(r||(r=cc),o||(o=[]);++a<i;){var s=t[a];e>0&&r(s)?e>1?gr(s,e-1,r,n,o):vr(o,s):n||(o[o.length]=s)}return o}function uc(t){var e=t==null?0:t.length;return e?gr(t,1):[]}function lc(t){return Vn(zn(t,void 0,uc),t+"")}var fc=qn(Object.getPrototypeOf,Object);const yr=fc;var pc="[object Object]",dc=Function.prototype,hc=Object.prototype,Kn=dc.toString,mc=hc.hasOwnProperty,vc=Kn.call(Object);function B(t){if(!Y(t)||mt(t)!=pc)return!1;var e=yr(t);if(e===null)return!0;var r=mc.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Kn.call(r)==vc}function gc(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(o);++n<o;)a[n]=t[n+e];return a}function yc(){this.__data__=new tt,this.size=0}function bc(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function _c(t){return this.__data__.get(t)}function Sc(t){return this.__data__.has(t)}var jc=200;function Oc(t,e){var r=this.__data__;if(r instanceof tt){var n=r.__data__;if(!Yt||n.length<jc-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new et(n)}return r.set(t,e),this.size=r.size,this}function W(t){var e=this.__data__=new tt(t);this.size=e.size}W.prototype.clear=yc;W.prototype.delete=bc;W.prototype.get=_c;W.prototype.has=Sc;W.prototype.set=Oc;function wc(t,e){return t&&Nt(e,ye(e),t)}function Cc(t,e){return t&&Nt(e,re(e),t)}var Xn=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Kr=Xn&&typeof module=="object"&&module&&!module.nodeType&&module,Ec=Kr&&Kr.exports===Xn,Xr=Ec?K.Buffer:void 0,Zr=Xr?Xr.allocUnsafe:void 0;function Zn(t,e){if(e)return t.slice();var r=t.length,n=Zr?Zr(r):new t.constructor(r);return t.copy(n),n}function $c(t,e){for(var r=-1,n=t==null?0:t.length,o=0,a=[];++r<n;){var i=t[r];e(i,r,t)&&(a[o++]=i)}return a}function to(){return[]}var Nc=Object.prototype,Tc=Nc.propertyIsEnumerable,tn=Object.getOwnPropertySymbols,xc=tn?function(t){return t==null?[]:(t=Object(t),$c(tn(t),function(e){return Tc.call(t,e)}))}:to;const br=xc;function Mc(t,e){return Nt(t,br(t),e)}var Ac=Object.getOwnPropertySymbols,Pc=Ac?function(t){for(var e=[];t;)vr(e,br(t)),t=yr(t);return e}:to;const eo=Pc;function Rc(t,e){return Nt(t,eo(t),e)}function ro(t,e,r){var n=e(t);return R(t)?n:vr(n,r(t))}function Ue(t){return ro(t,ye,br)}function _r(t){return ro(t,re,eo)}var Dc=gt(K,"DataView");const ke=Dc;var Ic=gt(K,"Promise");const Ve=Ic;var Lc=gt(K,"Set");const _t=Lc;var en="[object Map]",Fc="[object Object]",rn="[object Promise]",nn="[object Set]",on="[object WeakMap]",an="[object DataView]",Bc=vt(ke),Uc=vt(Yt),kc=vt(Ve),Vc=vt(_t),zc=vt(Be),ut=mt;(ke&&ut(new ke(new ArrayBuffer(1)))!=an||Yt&&ut(new Yt)!=en||Ve&&ut(Ve.resolve())!=rn||_t&&ut(new _t)!=nn||Be&&ut(new Be)!=on)&&(ut=function(t){var e=mt(t),r=e==Fc?t.constructor:void 0,n=r?vt(r):"";if(n)switch(n){case Bc:return an;case Uc:return en;case kc:return rn;case Vc:return nn;case zc:return on}return e});const Kt=ut;var Gc=Object.prototype,Hc=Gc.hasOwnProperty;function Wc(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Hc.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Jc=K.Uint8Array;const pe=Jc;function Sr(t){var e=new t.constructor(t.byteLength);return new pe(e).set(new pe(t)),e}function Qc(t,e){var r=e?Sr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var qc=/\w*$/;function Yc(t){var e=new t.constructor(t.source,qc.exec(t));return e.lastIndex=t.lastIndex,e}var sn=z?z.prototype:void 0,cn=sn?sn.valueOf:void 0;function Kc(t){return cn?Object(cn.call(t)):{}}function no(t,e){var r=e?Sr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Xc="[object Boolean]",Zc="[object Date]",tu="[object Map]",eu="[object Number]",ru="[object RegExp]",nu="[object Set]",ou="[object String]",au="[object Symbol]",su="[object ArrayBuffer]",iu="[object DataView]",cu="[object Float32Array]",uu="[object Float64Array]",lu="[object Int8Array]",fu="[object Int16Array]",pu="[object Int32Array]",du="[object Uint8Array]",hu="[object Uint8ClampedArray]",mu="[object Uint16Array]",vu="[object Uint32Array]";function gu(t,e,r){var n=t.constructor;switch(e){case su:return Sr(t);case Xc:case Zc:return new n(+t);case iu:return Qc(t,r);case cu:case uu:case lu:case fu:case pu:case du:case hu:case mu:case vu:return no(t,r);case tu:return new n;case eu:case ou:return new n(t);case ru:return Yc(t);case nu:return new n;case au:return Kc(t)}}function oo(t){return typeof t.constructor=="function"&&!fr(t)?as(yr(t)):{}}var yu="[object Map]";function bu(t){return Y(t)&&Kt(t)==yu}var un=St&&St.isMap,_u=un?pr(un):bu;const Su=_u;var ju="[object Set]";function Ou(t){return Y(t)&&Kt(t)==ju}var ln=St&&St.isSet,wu=ln?pr(ln):Ou;const Cu=wu;var Eu=1,$u=2,Nu=4,ao="[object Arguments]",Tu="[object Array]",xu="[object Boolean]",Mu="[object Date]",Au="[object Error]",so="[object Function]",Pu="[object GeneratorFunction]",Ru="[object Map]",Du="[object Number]",io="[object Object]",Iu="[object RegExp]",Lu="[object Set]",Fu="[object String]",Bu="[object Symbol]",Uu="[object WeakMap]",ku="[object ArrayBuffer]",Vu="[object DataView]",zu="[object Float32Array]",Gu="[object Float64Array]",Hu="[object Int8Array]",Wu="[object Int16Array]",Ju="[object Int32Array]",Qu="[object Uint8Array]",qu="[object Uint8ClampedArray]",Yu="[object Uint16Array]",Ku="[object Uint32Array]",E={};E[ao]=E[Tu]=E[ku]=E[Vu]=E[xu]=E[Mu]=E[zu]=E[Gu]=E[Hu]=E[Wu]=E[Ju]=E[Ru]=E[Du]=E[io]=E[Iu]=E[Lu]=E[Fu]=E[Bu]=E[Qu]=E[qu]=E[Yu]=E[Ku]=!0;E[Au]=E[so]=E[Uu]=!1;function Gt(t,e,r,n,o,a){var i,s=e&Eu,c=e&$u,u=e&Nu;if(r&&(i=o?r(t,n,o,a):r(t)),i!==void 0)return i;if(!Q(t))return t;var l=R(t);if(l){if(i=Wc(t),!s)return kn(t,i)}else{var p=Kt(t),f=p==so||p==Pu;if(Qt(t))return Zn(t,s);if(p==io||p==ao||f&&!o){if(i=c||f?{}:oo(t),!s)return c?Rc(t,Cc(i,t)):Mc(t,wc(i,t))}else{if(!E[p])return o?t:{};i=gu(t,p,s)}}a||(a=new W);var d=a.get(t);if(d)return d;a.set(t,i),Cu(t)?t.forEach(function(b){i.add(Gt(b,e,r,b,t,a))}):Su(t)&&t.forEach(function(b,j){i.set(j,Gt(b,e,r,j,t,a))});var h=u?c?_r:Ue:c?re:ye,g=l?void 0:h(t);return gs(g||t,function(b,j){g&&(j=b,b=t[j]),ur(i,j,Gt(b,e,r,j,t,a))}),i}var Xu=1,Zu=4;function co(t){return Gt(t,Xu|Zu)}var tl="__lodash_hash_undefined__";function el(t){return this.__data__.set(t,tl),this}function rl(t){return this.__data__.has(t)}function Xt(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new et;++e<r;)this.add(t[e])}Xt.prototype.add=Xt.prototype.push=el;Xt.prototype.has=rl;function nl(t,e){for(var r=-1,n=t==null?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function uo(t,e){return t.has(e)}var ol=1,al=2;function lo(t,e,r,n,o,a){var i=r&ol,s=t.length,c=e.length;if(s!=c&&!(i&&c>s))return!1;var u=a.get(t),l=a.get(e);if(u&&l)return u==e&&l==t;var p=-1,f=!0,d=r&al?new Xt:void 0;for(a.set(t,e),a.set(e,t);++p<s;){var h=t[p],g=e[p];if(n)var b=i?n(g,h,p,e,t,a):n(h,g,p,t,e,a);if(b!==void 0){if(b)continue;f=!1;break}if(d){if(!nl(e,function(j,O){if(!uo(d,O)&&(h===j||o(h,j,r,n,a)))return d.push(O)})){f=!1;break}}else if(!(h===g||o(h,g,r,n,a))){f=!1;break}}return a.delete(t),a.delete(e),f}function sl(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function jr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var il=1,cl=2,ul="[object Boolean]",ll="[object Date]",fl="[object Error]",pl="[object Map]",dl="[object Number]",hl="[object RegExp]",ml="[object Set]",vl="[object String]",gl="[object Symbol]",yl="[object ArrayBuffer]",bl="[object DataView]",fn=z?z.prototype:void 0,Pe=fn?fn.valueOf:void 0;function _l(t,e,r,n,o,a,i){switch(r){case bl:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case yl:return!(t.byteLength!=e.byteLength||!a(new pe(t),new pe(e)));case ul:case ll:case dl:return ee(+t,+e);case fl:return t.name==e.name&&t.message==e.message;case hl:case vl:return t==e+"";case pl:var s=sl;case ml:var c=n&il;if(s||(s=jr),t.size!=e.size&&!c)return!1;var u=i.get(t);if(u)return u==e;n|=cl,i.set(t,e);var l=lo(s(t),s(e),n,o,a,i);return i.delete(t),l;case gl:if(Pe)return Pe.call(t)==Pe.call(e)}return!1}var Sl=1,jl=Object.prototype,Ol=jl.hasOwnProperty;function wl(t,e,r,n,o,a){var i=r&Sl,s=Ue(t),c=s.length,u=Ue(e),l=u.length;if(c!=l&&!i)return!1;for(var p=c;p--;){var f=s[p];if(!(i?f in e:Ol.call(e,f)))return!1}var d=a.get(t),h=a.get(e);if(d&&h)return d==e&&h==t;var g=!0;a.set(t,e),a.set(e,t);for(var b=i;++p<c;){f=s[p];var j=t[f],O=e[f];if(n)var T=i?n(O,j,f,e,t,a):n(j,O,f,t,e,a);if(!(T===void 0?j===O||o(j,O,r,n,a):T)){g=!1;break}b||(b=f=="constructor")}if(g&&!b){var A=t.constructor,I=e.constructor;A!=I&&"constructor"in t&&"constructor"in e&&!(typeof A=="function"&&A instanceof A&&typeof I=="function"&&I instanceof I)&&(g=!1)}return a.delete(t),a.delete(e),g}var Cl=1,pn="[object Arguments]",dn="[object Array]",ce="[object Object]",El=Object.prototype,hn=El.hasOwnProperty;function $l(t,e,r,n,o,a){var i=R(t),s=R(e),c=i?dn:Kt(t),u=s?dn:Kt(e);c=c==pn?ce:c,u=u==pn?ce:u;var l=c==ce,p=u==ce,f=c==u;if(f&&Qt(t)){if(!Qt(e))return!1;i=!0,l=!1}if(f&&!l)return a||(a=new W),i||dr(t)?lo(t,e,r,n,o,a):_l(t,e,c,r,n,o,a);if(!(r&Cl)){var d=l&&hn.call(t,"__wrapped__"),h=p&&hn.call(e,"__wrapped__");if(d||h){var g=d?t.value():t,b=h?e.value():e;return a||(a=new W),o(g,b,r,n,a)}}return f?(a||(a=new W),wl(t,e,r,n,o,a)):!1}function Or(t,e,r,n,o){return t===e?!0:t==null||e==null||!Y(t)&&!Y(e)?t!==t&&e!==e:$l(t,e,r,n,Or,o)}var Nl=1,Tl=2;function xl(t,e,r,n){var o=r.length,a=o,i=!n;if(t==null)return!a;for(t=Object(t);o--;){var s=r[o];if(i&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++o<a;){s=r[o];var c=s[0],u=t[c],l=s[1];if(i&&s[2]){if(u===void 0&&!(c in t))return!1}else{var p=new W;if(n)var f=n(u,l,c,t,e,p);if(!(f===void 0?Or(l,u,Nl|Tl,n,p):f))return!1}}return!0}function fo(t){return t===t&&!Q(t)}function Ml(t){for(var e=ye(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,fo(o)]}return e}function po(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function Al(t){var e=Ml(t);return e.length==1&&e[0][2]?po(e[0][0],e[0][1]):function(r){return r===t||xl(r,t,e)}}function Pl(t,e){return t!=null&&e in Object(t)}function Rl(t,e,r){e=Tt(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var i=xt(e[n]);if(!(a=t!=null&&r(t,i)))break;t=t[i]}return a||++n!=o?a:(o=t==null?0:t.length,!!o&&lr(o)&&ve(i,o)&&(R(t)||Jt(t)))}function Dl(t,e){return t!=null&&Rl(t,e,Pl)}var Il=1,Ll=2;function Fl(t,e){return hr(t)&&fo(e)?po(xt(t),e):function(r){var n=Yn(r,t);return n===void 0&&n===e?Dl(r,t):Or(e,n,Il|Ll)}}function Bl(t){return function(e){return e==null?void 0:e[t]}}function Ul(t){return function(e){return Se(e,t)}}function kl(t){return hr(t)?Bl(xt(t)):Ul(t)}function wr(t){return typeof t=="function"?t:t==null?sr:typeof t=="object"?R(t)?Fl(t[0],t[1]):Al(t):kl(t)}function Vl(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),s=i.length;s--;){var c=i[t?s:++o];if(r(a[c],c,a)===!1)break}return e}}var zl=Vl();const Gl=zl;function ze(t,e,r){(r!==void 0&&!ee(t[e],r)||r===void 0&&!(e in t))&&cr(t,e,r)}function Ge(t){return Y(t)&&ge(t)}function He(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Hl(t){return Nt(t,re(t))}function Wl(t,e,r,n,o,a,i){var s=He(t,r),c=He(e,r),u=i.get(c);if(u){ze(t,r,u);return}var l=a?a(s,c,r+"",t,e,i):void 0,p=l===void 0;if(p){var f=R(c),d=!f&&Qt(c),h=!f&&!d&&dr(c);l=c,f||d||h?R(s)?l=s:Ge(s)?l=kn(s):d?(p=!1,l=Zn(c,!0)):h?(p=!1,l=no(c,!0)):l=[]:B(c)||Jt(c)?(l=s,Jt(s)?l=Hl(s):(!Q(s)||ir(s))&&(l=oo(c))):p=!1}p&&(i.set(c,l),o(l,c,n,a,i),i.delete(c)),ze(t,r,l)}function ho(t,e,r,n,o){t!==e&&Gl(e,function(a,i){if(o||(o=new W),Q(a))Wl(t,e,i,r,ho,n,o);else{var s=n?n(He(t,i),a,i+"",t,e,o):void 0;s===void 0&&(s=a),ze(t,i,s)}},re)}function Jl(t,e,r){for(var n=-1,o=t==null?0:t.length;++n<o;)if(r(e,t[n]))return!0;return!1}function mo(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Ql(t,e){return e.length<2?t:Se(t,gc(e,0,-1))}var ql=Ts(function(t,e,r){ho(t,e,r)});const vo=ql;var Yl="Expected a function";function Kl(t){if(typeof t!="function")throw new TypeError(Yl);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}function Xl(t,e){return e=Tt(e,t),t=Ql(t,e),t==null||delete t[xt(mo(e))]}function Zl(t){return B(t)?void 0:t}var tf=1,ef=2,rf=4,nf=lc(function(t,e){var r={};if(t==null)return r;var n=!1;e=ar(e,function(a){return a=Tt(a,t),n||(n=a.length>1),a}),Nt(t,_r(t),r),n&&(r=Gt(r,tf|ef|rf,Zl));for(var o=e.length;o--;)Xl(r,e[o]);return r});const go=nf;function of(t,e,r,n){if(!Q(t))return t;e=Tt(e,t);for(var o=-1,a=e.length,i=a-1,s=t;s!=null&&++o<a;){var c=xt(e[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=i){var l=s[c];u=n?n(l,c,s):void 0,u===void 0&&(u=Q(l)?l:ve(e[o+1])?[]:{})}ur(s,c,u),s=s[c]}return t}function af(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var i=e[n],s=Se(t,i);r(s,i)&&of(a,Tt(i,t),s)}return a}function sf(t,e){if(t==null)return{};var r=ar(_r(t),function(n){return[n]});return e=wr(e),af(t,r,function(n,o){return e(n,o[0])})}function cf(t,e){return sf(t,Kl(wr(e)))}var uf=1/0,lf=_t&&1/jr(new _t([,-0]))[1]==uf?function(t){return new _t(t)}:is;const ff=lf;var pf=200;function df(t,e,r){var n=-1,o=js,a=t.length,i=!0,s=[],c=s;if(r)i=!1,o=Jl;else if(a>=pf){var u=e?null:ff(t);if(u)return jr(u);i=!1,o=uo,c=new Xt}else c=e?[]:s;t:for(;++n<a;){var l=t[n],p=e?e(l):l;if(l=r||l!==0?l:0,i&&p===p){for(var f=c.length;f--;)if(c[f]===p)continue t;e&&c.push(p),s.push(l)}else o(c,p,r)||(c!==s&&c.push(p),s.push(l))}return s}var hf=Gn(function(t){var e=mo(t);return Ge(e)&&(e=void 0),df(gr(t,1,Ge,!0),wr(e))});const mf=hf;class yo extends TypeError{constructor(e,r){let n;const{message:o,...a}=e,{path:i}=e,s=i.length===0?o:"At path: "+i.join(".")+" -- "+o;super(s),this.value=void 0,this.key=void 0,this.type=void 0,this.refinement=void 0,this.path=void 0,this.branch=void 0,this.failures=void 0,Object.assign(this,a),this.name=this.constructor.name,this.failures=()=>{var c;return(c=n)!=null?c:n=[e,...r()]}}}function vf(t){return J(t)&&typeof t[Symbol.iterator]=="function"}function J(t){return typeof t=="object"&&t!=null}function U(t){return typeof t=="string"?JSON.stringify(t):""+t}function gf(t){const{done:e,value:r}=t.next();return e?void 0:r}function yf(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:o,branch:a}=e,{type:i}=r,{refinement:s,message:c="Expected a value of type `"+i+"`"+(s?" with refinement `"+s+"`":"")+", but received: `"+U(n)+"`"}=t;return{value:n,type:i,refinement:s,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*mn(t,e,r,n){vf(t)||(t=[t]);for(const o of t){const a=yf(o,e,r,n);a&&(yield a)}}function*Cr(t,e,r){r===void 0&&(r={});const{path:n=[],branch:o=[t],coerce:a=!1,mask:i=!1}=r,s={path:n,branch:o};if(a&&(t=e.coercer(t,s),i&&e.type!=="type"&&J(e.schema)&&J(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,s))c="not_valid",yield[u,void 0];for(let[u,l,p]of e.entries(t,s)){const f=Cr(l,p,{path:u===void 0?n:[...n,u],branch:u===void 0?o:[...o,l],coerce:a,mask:i});for(const d of f)d[0]?(c=d[0].refinement!=null?"not_refined":"not_valid",yield[d[0],void 0]):a&&(l=d[1],u===void 0?t=l:t instanceof Map?t.set(u,l):t instanceof Set?t.add(l):J(t)&&(t[u]=l))}if(c!=="not_valid")for(const u of e.refiner(t,s))c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class X{constructor(e){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=c=>c,entries:s=function*(){}}=e;this.type=r,this.schema=n,this.entries=s,this.coercer=i,o?this.validator=(c,u)=>{const l=o(c,u);return mn(l,u,this,c)}:this.validator=()=>[],a?this.refiner=(c,u)=>{const l=a(c,u);return mn(l,u,this,c)}:this.refiner=()=>[]}assert(e){return bo(e,this)}create(e){return bf(e,this)}is(e){return Sf(e,this)}mask(e){return _f(e,this)}validate(e,r){return r===void 0&&(r={}),Mt(e,this,r)}}function bo(t,e){const r=Mt(t,e);if(r[0])throw r[0]}function bf(t,e){const r=Mt(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function _f(t,e){const r=Mt(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function Sf(t,e){return!Mt(t,e)[0]}function Mt(t,e,r){r===void 0&&(r={});const n=Cr(t,e,r),o=gf(n);return o[0]?[new yo(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function Er(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];const n=e[0].type==="type",o=e.map(i=>i.schema),a=Object.assign({},...o);return n?Oo(a):w(a)}function st(t,e){return new X({type:t,schema:null,validator:e})}function jt(t){return new X({type:"dynamic",schema:null,*entries(e,r){yield*t(e,r).entries(e,r)},validator(e,r){return t(e,r).validator(e,r)},coercer(e,r){return t(e,r).coercer(e,r)},refiner(e,r){return t(e,r).refiner(e,r)}})}function _o(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return Oo(n);default:return w(n)}}function x(){return st("any",()=>!0)}function P(t){return new X({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||"Expected an array value, but received: "+U(e)}})}function pt(){return st("boolean",t=>typeof t=="boolean")}function We(t){const e={},r=t.map(n=>U(n)).join();for(const n of t)e[n]=n;return new X({type:"enums",schema:e,validator(n){return t.includes(n)||"Expected one of `"+r+"`, but received: "+U(n)}})}function So(){return st("func",t=>typeof t=="function"||"Expected a function, but received: "+U(t))}function L(t){const e=U(t),r=typeof t;return new X({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||"Expected the literal `"+e+"`, but received: "+U(n)}})}function jf(){return st("never",()=>!1)}function jo(){return st("number",t=>typeof t=="number"&&!isNaN(t)||"Expected a number, but received: "+U(t))}function w(t){const e=t?Object.keys(t):[],r=jf();return new X({type:"object",schema:t||null,*entries(n){if(t&&J(n)){const o=new Set(Object.keys(n));for(const a of e)o.delete(a),yield[a,n[a],t[a]];for(const a of o)yield[a,n[a],r]}},validator(n){return J(n)||"Expected an object, but received: "+U(n)},coercer(n){return J(n)?{...n}:n}})}function m(t){return new X({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Ht(t,e){return new X({type:"record",schema:null,*entries(r){if(J(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return J(r)||"Expected an object, but received: "+U(r)}})}function v(){return st("string",t=>typeof t=="string"||"Expected a string, but received: "+U(t))}function Oo(t){const e=Object.keys(t);return new X({type:"type",schema:t,*entries(r){if(J(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return J(r)||"Expected an object, but received: "+U(r)}})}function F(t){const e=t.map(r=>r.type).join(" | ");return new X({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||Of()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...i]=Cr(r,a,n),[s]=i;if(s[0])for(const[c]of i)c&&o.push(c);else return[]}return["Expected the value to satisfy a union of `"+e+"`, but received: "+U(r),...o]}})}function Of(){return st("unknown",()=>!0)}const $r=w({package:v(),version:v(),name:v(),exportName:m(v()),destructuring:m(pt()),subName:m(v()),main:m(v()),cssPaths:m(P(v()))}),wf=P($r),Cf=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var V=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t))(V||{}),Nr=(t=>(t.DESIGN="design",t.SAVE="save",t))(Nr||{}),Je=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(Je||{});const Ef=()=>st("normalObj",t=>!B(t)||[V.SLOT,V.EXPRESSION,V.FUNCTION].includes(t==null?void 0:t.type)?!1:(Mt(t,Ht(v(),Tr)),!0)),Tr=F([v(),jo(),pt(),w({type:L(V.SLOT),renderType:We([Je.FUNC,Je.COMP]),params:m(P(v())),value:jt(()=>F([Ot,P(Ot)]))}),w({type:L(V.EXPRESSION),value:v()}),w({type:L(V.FUNCTION),value:v()}),Ef(),P(jt(()=>Tr))]),vn=w({type:L(V.EXPRESSION),value:v()}),Ot=w({id:m(v()),title:m(v()),componentName:v(),props:m(Ht(v(),Tr)),nodeName:m(v()),state:m(Ht(v(),x())),children:jt(()=>m(P(F([v(),Ot])))),configure:m(x()),css:m(x()),style:m(x()),classNames:m(P(x())),refId:m(v()),extra:m(Ht(x(),x())),condition:m(F([pt(),vn])),loop:m(w({open:pt(),data:F([P(x()),vn]),args:m(P(v())),forName:m(v()),forIndex:m(v()),key:m(x()),name:m(v())})),methods:m(P(x()))}),de=F([v(),w({label:v(),tip:m(v())})]),$f=w({type:L("shape"),value:P(w({name:v(),title:de,valueType:jt(()=>je)}))}),Nf=w({type:L("enums"),value:P(v())});w({type:L("array"),value:jt(()=>je)});const Tf=w({type:L("array"),value:jt(()=>P(je))}),je=F([We(["array","boolean","number","object","string"]),We(["component","expression","function"]),$f,Nf,Tf]),xf=F([v(),w({componentName:v(),props:m(x()),initialValue:m(x()),component:m(x()),hiddenLabel:m(pt())})]),Re=w({name:v(),title:de,valueType:je,description:m(v()),defaultValue:x(),setters:m(P(xf)),condition:m(So())});F([v(),So()]);var Qe=(t=>(t.SINGLE="single",t.GROUP="group",t))(Qe||{});F([v(),w({name:v(),describe:m(v()),params:m(w({name:v(),description:v()})),template:v()})]);const Mf=w({id:m(v()),title:v(),snapshot:F([v(),x()]),snapshotText:m(v()),description:m(v()),tags:m(P(v())),groupName:m(v()),category:m(v()),schema:Er(_o(Ot,["id"]),w({componentName:m(v())}))}),Af=w({componentName:v(),title:v(),screenshot:m(v()),icon:m(v()),tags:m(P(v())),groupName:m(v()),category:m(v()),priority:m(jo()),npm:m($r),snippets:P(Mf),props:P(F([Re,w({title:m(de),type:L("single"),content:Re}),w({title:m(de),type:L("group"),content:P(Re)})])),fixedProps:m(x()),isContainer:m(F([pt(),w({placeholder:v(),width:v(),height:v()})])),disableEditorDragDom:m(x()),isLayout:m(pt()),rootSelector:m(v()),advanceCustom:m(x()),extra:m(Ht(x(),x()))}),Pf=t=>({data:e,message:r,throwError:n})=>{const o=t({data:e,message:r,throwError:n});if(o.isValidate)return o;if(n)throw o.message||r?new Error(`${o.message||r}
2
2
  originData: ${JSON.stringify(e)}`):new Error(`${JSON.stringify(e)}
3
3
  data struct format is invalidate`);return o.message||r?console.warn(`${o.message||r}
4
4
  originData: ${JSON.stringify(e)}`):console.warn(`${JSON.stringify(e)}
5
5
  data struct format is invalidate`),o},xr=t=>{const{data:e,message:r,throwError:n,dataStruct:o}=t;return Pf(({data:a})=>{try{return bo(a,o),{isValidate:!0}}catch(i){let s=i;return i instanceof yo&&(s=i.failures().map(c=>`【${c.path.join(".")}】: ${c.message}
6
- `)),{isValidate:!1,message:s,error:i}}})({data:e,message:r,throwError:n})};var At=(t=>(t.ROOT_CONTAINER="RootContainer",t))(At||{});const Rf=w({type:L(V.FUNCTION),value:m()}),Df=Er(_o(Ot,["componentName"]),w({componentName:L("RootContainer")}));function If(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}const ne=If(),Lf=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new dt([]);return e&&(o=e.materialsMode||new dt([])),n&&(R(n)?r.value=n.map(a=>new M(a,{parent:e,materials:o})):B(n)&&r.value.push(new M(n,{parent:e,materials:o}))),r};class wt{constructor(e,r){_(this,"nodeType","SLOT"),_(this,"rawData"),_(this,"parent"),_(this,"emitter",ne),_(this,"data"),_(this,"id"),_(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new dt([]);this.materialsMode=n,this.id=Z(),this.data=Lf(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof M)return o.export(e);if(B(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return R(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const wo=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===Qe.SINGLE?e.push(n.content):n.type===Qe.GROUP&&(e=[...e,...wo(n.content)]):e.push(r)}),e},qe=(t,e,r)=>{if(t.type)return t.type===V.SLOT?new wt(t,{parent:e,materials:r}):t;if(B(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=Ye(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>qe(n,e,r)):t},Ye=(t,e,r)=>B(t)?qe(t,e,r):R(t)?t.map(n=>qe(n,e,r)):t;class at{constructor(e,r,n){_(this,"nodeType","PROP"),_(this,"rawData"),_(this,"parent"),_(this,"emitter",ne),_(this,"data"),_(this,"name"),_(this,"materialsMode");const o=(n==null?void 0:n.materials)||new dt([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=Ye(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=Ye(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof wt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof M){const r=e.material;return wo((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(e){const r=this.data,n=o=>{if(o instanceof at||o instanceof wt||o instanceof M)return o.export(e);if(R(o))return o.map(a=>n(a));if(B(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return o};return n(r)}}const Ff=t=>{if(typeof t=="string")return!0;xr({data:t,dataStruct:Ot,throwError:!1})},gn=(t,e,r=new dt([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??Z(),children:[],props:{},methods:t.methods||[],configure:mo(t.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(t.props||{});return o.length&&o.forEach(a=>{var i;const s=(i=t.props)==null?void 0:i[a];if(s instanceof at){n.props[a]=s;return}n.props[a]=new at(a,s||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof M)return a;if(B(a)){const i=a;return new M(i,{parent:e,materials:r})}else return a}):(t.children instanceof M&&(n.children=[t.children]),n.children=[new M(t.children,{parent:e,materials:r})])),n};class M{constructor(e,r){_(this,"nodeType","NODE"),_(this,"rawData"),_(this,"data"),_(this,"emitter",ne),_(this,"parent"),_(this,"materialsModel"),_(this,"listenerHandle"),_(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),Ff(e);const n=(r==null?void 0:r.materials)||new dt([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=gn(e,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const e=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",e),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",e)})}onChange(e){return this.onChangeCbQueue.push(e),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==e)}}destroy(){this.listenerHandle.forEach(e=>e())}get id(){return this.data.id}get value(){return this.data}clone(e){const r={...this.export("design"),id:e||Z()};return new M(r,{materials:this.materialsModel})}updateWithPlainObj(e){const r={...this.data,...e};return this.data=gn(r,this),r}updateValue(e){const r=this.data,n=this.updateWithPlainObj(e);this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return Ar(this,e)}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(l=>{o[l]=n.props[l].export(e)});const a=(r=n.children)==null?void 0:r.map(l=>l instanceof M?l.export(e):l),i=n.configure||{},s=i.propsSetter||{},c={};Object.keys(s).forEach(l=>{const p=Yn(s,l,!1);p&&(c[l]=p)}),i.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let u={...n,configure:i,props:o,children:a,condition:n.condition};return e==="design"&&delete u.id,u=Mr(u),u}}const yn=(t,e,r)=>{const n={...t,id:Z(),props:{},componentName:At.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:mo(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];R(t.children)?o=t.children.map(i=>i instanceof M?i:B(i)?new M(i,{parent:e,materials:r}):i):t.children instanceof M?o.push(t.children):t.children&&B(t.children)&&o.push(new M(t.children,{parent:e,materials:r}));const a=Object.keys(t.props||{});return a.length&&a.forEach(i=>{var s;const c=(s=t.props)==null?void 0:s[i];c instanceof at?n.props[i]=c:n.props[i]=new at(i,c||"",{parent:e,materials:r})}),n.children=o,n};class Zt{constructor(e,{parent:r,materials:n}){_(this,"rawData"),_(this,"data"),_(this,"nodeType",At.ROOT_CONTAINER),_(this,"emitter",ne),_(this,"materialsModel"),_(this,"listenerHandle"),_(this,"onChangeCbQueue"),_(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=yn(e,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=r}registerListener(){const e=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",e),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",e)})}onChange(e){return this.onChangeCbQueue.push(e),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==e)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}updateWithPlainObj(e){const r={...this.data,...e};return this.data=yn(r,this,this.materialsModel),r}updateValue(e){const r=this.data;this.updateWithPlainObj(e),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(e){return Ar(this,e)}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e=Nr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(c=>{o[c]=n.props[c].export(e)});const a=((r=n.children)==null?void 0:r.map(c=>{var u;return(u=c==null?void 0:c.export)==null?void 0:u.call(c,e)}))||[],i={...n,props:o,children:a.filter(c=>c),condition:n.condition};let s=go(i,["id"]);return s=Mr(s),s}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}destroy(){this.listenerHandle.forEach(e=>e())}clone(e){const r={...this.export("design"),id:e||Z()};return new Zt(r,{materials:this.materialsModel,parent:null})}}const ct=t=>(t==null?void 0:t.type)===V.EXPRESSION,Bf=t=>(t==null?void 0:t.type)===V.FUNCTION,Z=()=>Math.random().toString(32).slice(3,9),Uf=t=>(t==null?void 0:t.nodeType)==="NODE",De=t=>(t==null?void 0:t.nodeType)==="PROP",kf=t=>(t==null?void 0:t.nodeType)==="SLOT",Mr=t=>cf(t,e=>B(e)?!Object.keys(e).length:R(e)?!e.length:!e);function Vf(t,e){const r=[t];for(;r.length;){const n=r.shift();if(n&&e(n))return n;const o=(n==null?void 0:n.props)||{},a=s=>{if(s instanceof M){r.push(s);return}if(s instanceof wt&&a(s.value.value),s instanceof at){a(s.value);return}if(B(s)){const c=s;Object.keys(c).forEach(u=>{a(c[u])});return}if(R(s)){s.forEach(c=>{a(c)});return}};a(o);const i=(n==null?void 0:n.value.children.filter(s=>s instanceof M))||[];r.push(...i)}}function Ar(t,e){return Vf(t,r=>r.id===e)}const zf=t=>{const e=co(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${Z()}`,title:n.title||t.title,category:n.category||t.category,tags:[...n.tags||[],...t.tags||[]],groupName:n.groupName||t.groupName,snapshot:n.snapshot||t.icon,snapshotText:n.snapshotText,schema:{...n.schema,componentName:n.schema.componentName||t.componentName}})),e};class Gf{constructor(e){_(this,"rawData"),_(this,"data"),this.rawData=e,this.data=zf(e)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(e){return this.data.snippets.find(r=>r.id===e)}}const bn=t=>{if(!R(t))throw new Error("Materials must be a array");return t.map(e=>new Gf(e))},Hf=t=>{t==null||t.forEach(e=>{xr({data:e,dataStruct:Af,throwError:!1})})};class dt{constructor(e){_(this,"rawData"),_(this,"data"),_(this,"usedMaterials",[]),this.rawData=e,Hf(e),this.data=bn(e)}addMaterials(e){const r=bn(e);this.data.push(...r)}removeMaterial(e){const r=this.data.filter(n=>!e.includes(n.componentName));this.data=r}findByComponentName(e){return this.data.find(r=>r.componentName===e)}findSnippetById(e){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(e)}return n}getAllSnippets(){const e=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]),r=[],n={default:[]};e.forEach(a=>{const i=a.groupName||"default";r.includes(i)||(r.push(i),n[i]=[]),n[i].push(a)});let o=[];return r.forEach(a=>{const i=["default"],s={default:[]},c=n[a];if(c.length!==0){c.forEach(p=>{const f=p.category||"default";i.includes(f)||(i.push(f),s[f]=[]),s[f].push(p)});const u=[];i.forEach(p=>{s[p].length&&u.push({name:p,list:s[p]})});const l={name:a,list:u};o.push(l)}}),o=o.sort((a,i)=>(a.name||"")>(i.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}}const Wf=w({version:m(),name:m(),css:v(m()),renderType:v(F([L("COMPONENT"),L("PAGE")])),loadType:v(x()),lifecycle:v(x()),props:v(x()),methods:v(P(Rf)),componentsMeta:P(Er(w({componentName:m()}),$r)),thirdLibs:v(wf),componentsTree:Df,assets:v(P(x()))}),Co=t=>(xr({data:t,dataStruct:Wf,throwError:!1}),t),Ie=(t,e,r)=>({...t,componentsTree:new Zt(t.componentsTree,{parent:e,materials:r})});class he{constructor(e,r){_(this,"nodeType","PAGE"),_(this,"rawData"),_(this,"emitter",ne),_(this,"data"),_(this,"parent"),_(this,"materialsModel"),_(this,"assetPackagesList"),Co(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new dt((r==null?void 0:r.materials)||[]),this.data=Ie(e,this,this.materialsModel),this.assetPackagesList=[...(r==null?void 0:r.assetPackagesList)||[],...this.data.assets||[]]}updatePage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=Ie(e,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=Ie(e,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(e){if(!e)return;const r=this.data.componentsTree;return Ar(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof Zt)return console.warn("Not found parent node"),!1;if(a instanceof at)return console.warn("CProp can not add node"),!1;if(a instanceof wt){const s=a.value.value,c=s.findIndex(u=>u===r)??-1;return c>=0?(n==="BEFORE"?s.splice(c,0,e):s.splice(c+1,0,e),e.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof he)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,e):a==null||a.value.children.splice(i+1,0,e),e.parent=a,a==null||a.updateValue(),!0):(console.warn("Not found target node"),!1)}if(n==="CHILD_START")return r.value.children.unshift(e),e.parent=r,r.updateValue(),!0;if(n==="CHILD_END")return r.value.children.push(e),e.parent=r,r.updateValue(),!0;if(B(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,e):r==null||r.value.children.splice(s+1,0,e),e.parent=r,r.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(e){return delete e.id,new M(e,{parent:null,materials:this.materialsModel})}addNodeById(e,r,n="AFTER"){const o=this.getNode(r);return o?this.addNode(e,o,n):(console.warn(`Not find a node by ${r}, pls check it`),!1)}copyNode(e){const r=e.export("design");r.id=Z();const n=new M(r,{parent:e.parent,materials:this.materialsModel});return this.addNode(n,e,"AFTER"),n}copyNodeById(e){const r=this.getNode(e);return r&&r instanceof M?this.copyNode(r):!1}moveNode(e,r,n){this.deleteNode(e);let o=r;return["AFTER","BEFORE"].includes(n)&&(o=r.parent),e.parent=o,this.addNode(e,r,n)}moveNodeById(e,r,n){const o=this.getNode(e),a=this.getNode(r);return o&&a&&o instanceof M&&a instanceof M?this.moveNode(o,a,n):!1}deleteNode(e){var r;const n=e.parent;if(!n)throw new Error("parent node is null or undefined, pls check it");if(n instanceof wt){const o=n.value.value,a=o.findIndex(s=>s===e),i=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),i}if(n instanceof M||n instanceof Zt){const o=n.value.children,a=o.findIndex(s=>s===e),i=o[a];return o.splice(a,1),n.updateValue(),i}}deleteNodeById(e){const r=this.getNode(e);if(r)return this.deleteNode(r)}export(e=Nr.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(c=>{const u=o.find(l=>{var p;return l.package===((p=c.value.npm)==null?void 0:p.package)});return u&&a.push(u),{componentName:c.componentName,...co(c.value.npm||{})}}).filter(c=>!!(c.componentName&&c.package&&c.version));this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:Mr(n),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const u=o.find(l=>c.package===l.package);u&&a.push(u)}),s.assets=vf(a,c=>c.package),s=go(s,["id"]),JSON.parse(JSON.stringify(s))}getRootNode(){return this.data.componentsTree}}At.ROOT_CONTAINER;var Jf=typeof global=="object"&&global&&global.Object===Object&&global;const Eo=Jf;var Qf=typeof self=="object"&&self&&self.Object===Object&&self,qf=Eo||Qf||Function("return this")();const Pt=qf;var Yf=Pt.Symbol;const Ct=Yf;var $o=Object.prototype,Kf=$o.hasOwnProperty,Xf=$o.toString,Vt=Ct?Ct.toStringTag:void 0;function Zf(t){var e=Kf.call(t,Vt),r=t[Vt];try{t[Vt]=void 0;var n=!0}catch{}var o=Xf.call(t);return n&&(e?t[Vt]=r:delete t[Vt]),o}var tp=Object.prototype,ep=tp.toString;function rp(t){return ep.call(t)}var np="[object Null]",op="[object Undefined]",_n=Ct?Ct.toStringTag:void 0;function oe(t){return t==null?t===void 0?op:np:_n&&_n in Object(t)?Zf(t):rp(t)}function Rt(t){return t!=null&&typeof t=="object"}var ap="[object Symbol]";function sp(t){return typeof t=="symbol"||Rt(t)&&oe(t)==ap}function ip(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var cp=Array.isArray;const Et=cp;var up=1/0,Sn=Ct?Ct.prototype:void 0,jn=Sn?Sn.toString:void 0;function No(t){if(typeof t=="string")return t;if(Et(t))return ip(t,No)+"";if(sp(t))return jn?jn.call(t):"";var e=t+"";return e=="0"&&1/t==-up?"-0":e}function yt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function To(t){return t}var lp="[object AsyncFunction]",fp="[object Function]",pp="[object GeneratorFunction]",dp="[object Proxy]";function Pr(t){if(!yt(t))return!1;var e=oe(t);return e==fp||e==pp||e==lp||e==dp}var hp=Pt["__core-js_shared__"];const Le=hp;var On=function(){var t=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function vp(t){return!!On&&On in t}var mp=Function.prototype,gp=mp.toString;function yp(t){if(t!=null){try{return gp.call(t)}catch{}try{return t+""}catch{}}return""}var bp=/[\\^$.*+?()[\]{}|]/g,_p=/^\[object .+?Constructor\]$/,Sp=Function.prototype,jp=Object.prototype,Op=Sp.toString,wp=jp.hasOwnProperty,Cp=RegExp("^"+Op.call(wp).replace(bp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ep(t){if(!yt(t)||vp(t))return!1;var e=Pr(t)?Cp:_p;return e.test(yp(t))}function $p(t,e){return t==null?void 0:t[e]}function Rr(t,e){var r=$p(t,e);return Ep(r)?r:void 0}var wn=Object.create,Np=function(){function t(){}return function(e){if(!yt(e))return{};if(wn)return wn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Tp=Np;function xp(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Mp(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Ap=800,Pp=16,Rp=Date.now;function Dp(t){var e=0,r=0;return function(){var n=Rp(),o=Pp-(n-r);if(r=n,o>0){if(++e>=Ap)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Ip(t){return function(){return t}}var Lp=function(){try{var t=Rr(Object,"defineProperty");return t({},"",{}),t}catch{}}();const ve=Lp;var Fp=ve?function(t,e){return ve(t,"toString",{configurable:!0,enumerable:!1,value:Ip(e),writable:!0})}:To;const Bp=Fp;var Up=Dp(Bp);const kp=Up;var Vp=9007199254740991,zp=/^(?:0|[1-9]\d*)$/;function xo(t,e){var r=typeof t;return e=e??Vp,!!e&&(r=="number"||r!="symbol"&&zp.test(t))&&t>-1&&t%1==0&&t<e}function Dr(t,e,r){e=="__proto__"&&ve?ve(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Oe(t,e){return t===e||t!==t&&e!==e}var Gp=Object.prototype,Hp=Gp.hasOwnProperty;function Wp(t,e,r){var n=t[e];(!(Hp.call(t,e)&&Oe(n,r))||r===void 0&&!(e in t))&&Dr(t,e,r)}function Jp(t,e,r,n){var o=!r;r||(r={});for(var a=-1,i=e.length;++a<i;){var s=e[a],c=n?n(r[s],t[s],s,r,t):void 0;c===void 0&&(c=t[s]),o?Dr(r,s,c):Wp(r,s,c)}return r}var Cn=Math.max;function Qp(t,e,r){return e=Cn(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Cn(n.length-e,0),i=Array(a);++o<a;)i[o]=n[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=n[o];return s[e]=r(i),xp(t,this,s)}}function qp(t,e){return kp(Qp(t,e,To),t+"")}var Yp=9007199254740991;function Mo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Yp}function Ir(t){return t!=null&&Mo(t.length)&&!Pr(t)}function Kp(t,e,r){if(!yt(r))return!1;var n=typeof e;return(n=="number"?Ir(r)&&xo(e,r.length):n=="string"&&e in r)?Oe(r[e],t):!1}function Xp(t){return qp(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,i&&Kp(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var s=r[n];s&&t(e,s,n,a)}return e})}var Zp=Object.prototype;function Ao(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Zp;return t===r}function td(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var ed="[object Arguments]";function En(t){return Rt(t)&&oe(t)==ed}var Po=Object.prototype,rd=Po.hasOwnProperty,nd=Po.propertyIsEnumerable,od=En(function(){return arguments}())?En:function(t){return Rt(t)&&rd.call(t,"callee")&&!nd.call(t,"callee")};const Ke=od;function ad(){return!1}var Ro=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$n=Ro&&typeof module=="object"&&module&&!module.nodeType&&module,sd=$n&&$n.exports===Ro,Nn=sd?Pt.Buffer:void 0,id=Nn?Nn.isBuffer:void 0,cd=id||ad;const Do=cd;var ud="[object Arguments]",ld="[object Array]",fd="[object Boolean]",pd="[object Date]",dd="[object Error]",hd="[object Function]",vd="[object Map]",md="[object Number]",gd="[object Object]",yd="[object RegExp]",bd="[object Set]",_d="[object String]",Sd="[object WeakMap]",jd="[object ArrayBuffer]",Od="[object DataView]",wd="[object Float32Array]",Cd="[object Float64Array]",Ed="[object Int8Array]",$d="[object Int16Array]",Nd="[object Int32Array]",Td="[object Uint8Array]",xd="[object Uint8ClampedArray]",Md="[object Uint16Array]",Ad="[object Uint32Array]",N={};N[wd]=N[Cd]=N[Ed]=N[$d]=N[Nd]=N[Td]=N[xd]=N[Md]=N[Ad]=!0;N[ud]=N[ld]=N[jd]=N[fd]=N[Od]=N[pd]=N[dd]=N[hd]=N[vd]=N[md]=N[gd]=N[yd]=N[bd]=N[_d]=N[Sd]=!1;function Pd(t){return Rt(t)&&Mo(t.length)&&!!N[oe(t)]}function Rd(t){return function(e){return t(e)}}var Io=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wt=Io&&typeof module=="object"&&module&&!module.nodeType&&module,Dd=Wt&&Wt.exports===Io,Fe=Dd&&Eo.process,Id=function(){try{var t=Wt&&Wt.require&&Wt.require("util").types;return t||Fe&&Fe.binding&&Fe.binding("util")}catch{}}();const Tn=Id;var xn=Tn&&Tn.isTypedArray,Ld=xn?Rd(xn):Pd;const Lo=Ld;var Fd=Object.prototype,Bd=Fd.hasOwnProperty;function Ud(t,e){var r=Et(t),n=!r&&Ke(t),o=!r&&!n&&Do(t),a=!r&&!n&&!o&&Lo(t),i=r||n||o||a,s=i?td(t.length,String):[],c=s.length;for(var u in t)(e||Bd.call(t,u))&&!(i&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||xo(u,c)))&&s.push(u);return s}function kd(t,e){return function(r){return t(e(r))}}function Vd(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var zd=Object.prototype,Gd=zd.hasOwnProperty;function Hd(t){if(!yt(t))return Vd(t);var e=Ao(t),r=[];for(var n in t)n=="constructor"&&(e||!Gd.call(t,n))||r.push(n);return r}function Fo(t){return Ir(t)?Ud(t,!0):Hd(t)}var Wd=Rr(Object,"create");const te=Wd;function Jd(){this.__data__=te?te(null):{},this.size=0}function Qd(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var qd="__lodash_hash_undefined__",Yd=Object.prototype,Kd=Yd.hasOwnProperty;function Xd(t){var e=this.__data__;if(te){var r=e[t];return r===qd?void 0:r}return Kd.call(e,t)?e[t]:void 0}var Zd=Object.prototype,th=Zd.hasOwnProperty;function eh(t){var e=this.__data__;return te?e[t]!==void 0:th.call(e,t)}var rh="__lodash_hash_undefined__";function nh(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=te&&e===void 0?rh:e,this}function ht(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ht.prototype.clear=Jd;ht.prototype.delete=Qd;ht.prototype.get=Xd;ht.prototype.has=eh;ht.prototype.set=nh;function oh(){this.__data__=[],this.size=0}function we(t,e){for(var r=t.length;r--;)if(Oe(t[r][0],e))return r;return-1}var ah=Array.prototype,sh=ah.splice;function ih(t){var e=this.__data__,r=we(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():sh.call(e,r,1),--this.size,!0}function ch(t){var e=this.__data__,r=we(e,t);return r<0?void 0:e[r][1]}function uh(t){return we(this.__data__,t)>-1}function lh(t,e){var r=this.__data__,n=we(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function rt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}rt.prototype.clear=oh;rt.prototype.delete=ih;rt.prototype.get=ch;rt.prototype.has=uh;rt.prototype.set=lh;var fh=Rr(Pt,"Map");const Bo=fh;function ph(){this.size=0,this.__data__={hash:new ht,map:new(Bo||rt),string:new ht}}function dh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Ce(t,e){var r=t.__data__;return dh(e)?r[typeof e=="string"?"string":"hash"]:r.map}function hh(t){var e=Ce(this,t).delete(t);return this.size-=e?1:0,e}function vh(t){return Ce(this,t).get(t)}function mh(t){return Ce(this,t).has(t)}function gh(t,e){var r=Ce(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Dt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dt.prototype.clear=ph;Dt.prototype.delete=hh;Dt.prototype.get=vh;Dt.prototype.has=mh;Dt.prototype.set=gh;function Uo(t){return t==null?"":No(t)}var yh=kd(Object.getPrototypeOf,Object);const ko=yh;var bh="[object Object]",_h=Function.prototype,Sh=Object.prototype,Vo=_h.toString,jh=Sh.hasOwnProperty,Oh=Vo.call(Object);function $t(t){if(!Rt(t)||oe(t)!=bh)return!1;var e=ko(t);if(e===null)return!0;var r=jh.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Vo.call(r)==Oh}function wh(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(o);++n<o;)a[n]=t[n+e];return a}function Ch(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:wh(t,e,r)}var Eh="\\ud800-\\udfff",$h="\\u0300-\\u036f",Nh="\\ufe20-\\ufe2f",Th="\\u20d0-\\u20ff",xh=$h+Nh+Th,Mh="\\ufe0e\\ufe0f",Ah="\\u200d",Ph=RegExp("["+Ah+Eh+xh+Mh+"]");function zo(t){return Ph.test(t)}function Rh(t){return t.split("")}var Go="\\ud800-\\udfff",Dh="\\u0300-\\u036f",Ih="\\ufe20-\\ufe2f",Lh="\\u20d0-\\u20ff",Fh=Dh+Ih+Lh,Bh="\\ufe0e\\ufe0f",Uh="["+Go+"]",Xe="["+Fh+"]",Ze="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Xe+"|"+Ze+")",Ho="[^"+Go+"]",Wo="(?:\\ud83c[\\udde6-\\uddff]){2}",Jo="[\\ud800-\\udbff][\\udc00-\\udfff]",Vh="\\u200d",Qo=kh+"?",qo="["+Bh+"]?",zh="(?:"+Vh+"(?:"+[Ho,Wo,Jo].join("|")+")"+qo+Qo+")*",Gh=qo+Qo+zh,Hh="(?:"+[Ho+Xe+"?",Xe,Wo,Jo,Uh].join("|")+")",Wh=RegExp(Ze+"(?="+Ze+")|"+Hh+Gh,"g");function Jh(t){return t.match(Wh)||[]}function Qh(t){return zo(t)?Jh(t):Rh(t)}function qh(t){return function(e){e=Uo(e);var r=zo(e)?Qh(e):void 0,n=r?r[0]:e.charAt(0),o=r?Ch(r,1).join(""):e.slice(1);return n[t]()+o}}var Yh=qh("toUpperCase");const Kh=Yh;function Xh(t){return Kh(Uo(t).toLowerCase())}function Zh(){this.__data__=new rt,this.size=0}function tv(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function ev(t){return this.__data__.get(t)}function rv(t){return this.__data__.has(t)}var nv=200;function ov(t,e){var r=this.__data__;if(r instanceof rt){var n=r.__data__;if(!Bo||n.length<nv-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Dt(n)}return r.set(t,e),this.size=r.size,this}function It(t){var e=this.__data__=new rt(t);this.size=e.size}It.prototype.clear=Zh;It.prototype.delete=tv;It.prototype.get=ev;It.prototype.has=rv;It.prototype.set=ov;var Yo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mn=Yo&&typeof module=="object"&&module&&!module.nodeType&&module,av=Mn&&Mn.exports===Yo,An=av?Pt.Buffer:void 0,Pn=An?An.allocUnsafe:void 0;function sv(t,e){if(e)return t.slice();var r=t.length,n=Pn?Pn(r):new t.constructor(r);return t.copy(n),n}var iv=Pt.Uint8Array;const Rn=iv;function cv(t){var e=new t.constructor(t.byteLength);return new Rn(e).set(new Rn(t)),e}function uv(t,e){var r=e?cv(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function lv(t){return typeof t.constructor=="function"&&!Ao(t)?Tp(ko(t)):{}}function fv(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),s=i.length;s--;){var c=i[t?s:++o];if(r(a[c],c,a)===!1)break}return e}}var pv=fv();const dv=pv;function tr(t,e,r){(r!==void 0&&!Oe(t[e],r)||r===void 0&&!(e in t))&&Dr(t,e,r)}function hv(t){return Rt(t)&&Ir(t)}function er(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function vv(t){return Jp(t,Fo(t))}function mv(t,e,r,n,o,a,i){var s=er(t,r),c=er(e,r),u=i.get(c);if(u){tr(t,r,u);return}var l=a?a(s,c,r+"",t,e,i):void 0,p=l===void 0;if(p){var f=Et(c),d=!f&&Do(c),h=!f&&!d&&Lo(c);l=c,f||d||h?Et(s)?l=s:hv(s)?l=Mp(s):d?(p=!1,l=sv(c,!0)):h?(p=!1,l=uv(c,!0)):l=[]:$t(c)||Ke(c)?(l=s,Ke(s)?l=vv(s):(!yt(s)||Pr(s))&&(l=lv(c))):p=!1}p&&(i.set(c,l),o(l,c,n,a,i),i.delete(c)),tr(t,r,l)}function Ko(t,e,r,n,o){t!==e&&dv(e,function(a,i){if(o||(o=new It),yt(a))mv(t,e,i,r,Ko,n,o);else{var s=n?n(er(t,i),a,i+"",t,e,o):void 0;s===void 0&&(s=a),tr(t,i,s)}},Fo)}var gv=Xp(function(t,e,r){Ko(t,e,r)});const yv=gv,bv=function(t){return!(!t||typeof t!="function"||!t.prototype)};function Xo(t){const e=t==null?void 0:t.prototype;return!!(e&&e.isReactComponent)}function Zo(t){var n,o;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(t==null?void 0:t.$$typeof)===r||((n=t==null?void 0:t.prototype)==null?void 0:n.isReactComponent)||((o=t==null?void 0:t.prototype)==null?void 0:o.setState)||t._forwardRef}function ta(t){class e extends S.Component{render(){return S.createElement(t,this.props)}}return e.displayName=t.displayName,e}const lt=(t,e)=>{const r=n=>{const a=`
6
+ `)),{isValidate:!1,message:s,error:i}}})({data:e,message:r,throwError:n})};var At=(t=>(t.ROOT_CONTAINER="RootContainer",t))(At||{});const Rf=w({type:L(V.FUNCTION),value:v()}),Df=Er(_o(Ot,["componentName"]),w({componentName:L("RootContainer")}));function If(t){return{all:t=t||new Map,on:function(e,r){var n=t.get(e);n?n.push(r):t.set(e,[r])},off:function(e,r){var n=t.get(e);n&&(r?n.splice(n.indexOf(r)>>>0,1):t.set(e,[]))},emit:function(e,r){var n=t.get(e);n&&n.slice().map(function(o){o(r)}),(n=t.get("*"))&&n.slice().map(function(o){o(e,r)})}}}const ne=If(),Lf=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new dt([]);return e&&(o=e.materialsMode||new dt([])),n&&(R(n)?r.value=n.map(a=>new M(a,{parent:e,materials:o})):B(n)&&r.value.push(new M(n,{parent:e,materials:o}))),r};class wt{constructor(e,r){_(this,"nodeType","SLOT"),_(this,"rawData"),_(this,"parent"),_(this,"emitter",ne),_(this,"data"),_(this,"id"),_(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new dt([]);this.materialsMode=n,this.id=Z(),this.data=Lf(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof M)return o.export(e);if(B(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return R(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const wo=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===Qe.SINGLE?e.push(n.content):n.type===Qe.GROUP&&(e=[...e,...wo(n.content)]):e.push(r)}),e},qe=(t,e,r)=>{if(t.type)return t.type===V.SLOT?new wt(t,{parent:e,materials:r}):t;if(B(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=Ye(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>qe(n,e,r)):t},Ye=(t,e,r)=>B(t)?qe(t,e,r):R(t)?t.map(n=>qe(n,e,r)):t;class at{constructor(e,r,n){_(this,"nodeType","PROP"),_(this,"rawData"),_(this,"parent"),_(this,"emitter",ne),_(this,"data"),_(this,"name"),_(this,"materialsMode");const o=(n==null?void 0:n.materials)||new dt([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=Ye(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=Ye(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof wt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof M){const r=e.material;return wo((r==null?void 0:r.value.props)||[]).find(n=>n.name===this.name)}else return null}export(e){const r=this.data,n=o=>{if(o instanceof at||o instanceof wt||o instanceof M)return o.export(e);if(R(o))return o.map(a=>n(a));if(B(o)){const a={};return Object.keys(o||{}).forEach(i=>{a[i]=n(o[i])}),a}return o};return n(r)}}const Ff=t=>{if(typeof t=="string")return!0;xr({data:t,dataStruct:Ot,throwError:!1})},gn=(t,e,r=new dt([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??Z(),children:[],props:{},methods:t.methods||[],configure:vo(t.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(t.props||{});return o.length&&o.forEach(a=>{var i;const s=(i=t.props)==null?void 0:i[a];if(s instanceof at){n.props[a]=s;return}n.props[a]=new at(a,s||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof M)return a;if(B(a)){const i=a;return new M(i,{parent:e,materials:r})}else return a}):(t.children instanceof M&&(n.children=[t.children]),n.children=[new M(t.children,{parent:e,materials:r})])),n};class M{constructor(e,r){_(this,"nodeType","NODE"),_(this,"rawData"),_(this,"data"),_(this,"emitter",ne),_(this,"parent"),_(this,"materialsModel"),_(this,"listenerHandle"),_(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),Ff(e);const n=(r==null?void 0:r.materials)||new dt([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=gn(e,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener()}registerListener(){const e=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",e),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",e)})}onChange(e){return this.onChangeCbQueue.push(e),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==e)}}destroy(){this.listenerHandle.forEach(e=>e())}get id(){return this.data.id}get value(){return this.data}clone(e){const r={...this.export("design"),id:e||Z()};return new M(r,{materials:this.materialsModel})}updateWithPlainObj(e){const r={...this.data,...e};return this.data=gn(r,this),r}updateValue(e){const r=this.data,n=this.updateWithPlainObj(e);this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return Ar(this,e)}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(l=>{o[l]=n.props[l].export(e)});const a=(r=n.children)==null?void 0:r.map(l=>l instanceof M?l.export(e):l),i=n.configure||{},s=i.propsSetter||{},c={};Object.keys(s).forEach(l=>{const p=Yn(s,l,!1);p&&(c[l]=p)}),i.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let u={...n,configure:i,props:o,children:a,condition:n.condition};return e==="design"&&delete u.id,u=Mr(u),u}}const yn=(t,e,r)=>{const n={...t,id:Z(),props:{},componentName:At.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:vo(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];R(t.children)?o=t.children.map(i=>i instanceof M?i:B(i)?new M(i,{parent:e,materials:r}):i):t.children instanceof M?o.push(t.children):t.children&&B(t.children)&&o.push(new M(t.children,{parent:e,materials:r}));const a=Object.keys(t.props||{});return a.length&&a.forEach(i=>{var s;const c=(s=t.props)==null?void 0:s[i];c instanceof at?n.props[i]=c:n.props[i]=new at(i,c||"",{parent:e,materials:r})}),n.children=o,n};class Zt{constructor(e,{parent:r,materials:n}){_(this,"rawData"),_(this,"data"),_(this,"nodeType",At.ROOT_CONTAINER),_(this,"emitter",ne),_(this,"materialsModel"),_(this,"listenerHandle"),_(this,"onChangeCbQueue"),_(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=yn(e,this,n),this.listenerHandle=[],this.onChangeCbQueue=[],this.registerListener(),this.parent=r}registerListener(){const e=r=>{const{node:n}=r;n===this&&n.id===this.id&&this.onChangeCbQueue.forEach(o=>o(r))};this.emitter.on("onNodeChange",e),this.listenerHandle.push(()=>{this.emitter.off("onNodeChange",e)})}onChange(e){return this.onChangeCbQueue.push(e),()=>{this.onChangeCbQueue=this.onChangeCbQueue.filter(r=>r!==e)}}get id(){return this.data.id}get value(){return this.data}get props(){return this.data.props}get material(){const e=this.materialsModel;return e==null?void 0:e.findByComponentName(this.data.componentName)}updateWithPlainObj(e){const r={...this.data,...e};return this.data=yn(r,this,this.materialsModel),r}updateValue(e){const r=this.data;this.updateWithPlainObj(e),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(e){return Ar(this,e)}getMaterialConfig(e){var r;return this.data.configure[e]!==void 0?this.data.configure.isContainer:(r=this.material)==null?void 0:r.value.isContainer}isContainer(){return this.getMaterialConfig("isContainer")}export(e=Nr.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(c=>{o[c]=n.props[c].export(e)});const a=((r=n.children)==null?void 0:r.map(c=>{var u;return(u=c==null?void 0:c.export)==null?void 0:u.call(c,e)}))||[],i={...n,props:o,children:a.filter(c=>c),condition:n.condition};let s=go(i,["id"]);return s=Mr(s),s}getPlainProps(){const e=this.data,r={};return Object.keys(e.props||{}).forEach(n=>{r[n]=e.props[n].export("design")}),r}destroy(){this.listenerHandle.forEach(e=>e())}clone(e){const r={...this.export("design"),id:e||Z()};return new Zt(r,{materials:this.materialsModel,parent:null})}}const ct=t=>(t==null?void 0:t.type)===V.EXPRESSION,Bf=t=>(t==null?void 0:t.type)===V.FUNCTION,Z=()=>Math.random().toString(32).slice(3,9),Uf=t=>(t==null?void 0:t.nodeType)==="NODE",De=t=>(t==null?void 0:t.nodeType)==="PROP",kf=t=>(t==null?void 0:t.nodeType)==="SLOT",Mr=t=>cf(t,e=>B(e)?!Object.keys(e).length:R(e)?!e.length:!e);function Vf(t,e){const r=[t];for(;r.length;){const n=r.shift();if(n&&e(n))return n;const o=(n==null?void 0:n.props)||{},a=s=>{if(s instanceof M){r.push(s);return}if(s instanceof wt&&a(s.value.value),s instanceof at){a(s.value);return}if(B(s)){const c=s;Object.keys(c).forEach(u=>{a(c[u])});return}if(R(s)){s.forEach(c=>{a(c)});return}};a(o);const i=(n==null?void 0:n.value.children.filter(s=>s instanceof M))||[];r.push(...i)}}function Ar(t,e){return Vf(t,r=>r.id===e)}const zf=t=>{const e=co(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${Z()}`,title:n.title||t.title,category:n.category||t.category,tags:[...n.tags||[],...t.tags||[]],groupName:n.groupName||t.groupName,snapshot:n.snapshot||t.icon,snapshotText:n.snapshotText,schema:{...n.schema,componentName:n.schema.componentName||t.componentName}})),e};class Gf{constructor(e){_(this,"rawData"),_(this,"data"),this.rawData=e,this.data=zf(e)}get value(){return this.data}get rawValue(){return this.rawData}get componentName(){return this.data.componentName}get snippets(){return this.data.snippets}getSnippetById(e){return this.data.snippets.find(r=>r.id===e)}}const bn=t=>{if(!R(t))throw new Error("Materials must be a array");return t.map(e=>new Gf(e))},Hf=t=>{t==null||t.forEach(e=>{xr({data:e,dataStruct:Af,throwError:!1})})};class dt{constructor(e){_(this,"rawData"),_(this,"data"),_(this,"usedMaterials",[]),this.rawData=e,Hf(e),this.data=bn(e)}addMaterials(e){const r=bn(e);this.data.push(...r)}removeMaterial(e){const r=this.data.filter(n=>!e.includes(n.componentName));this.data=r}findByComponentName(e){return this.data.find(r=>r.componentName===e)}findSnippetById(e){const r=[...this.data];let n=null;for(;!n&&r.length;){const o=r.pop();n=o==null?void 0:o.getSnippetById(e)}return n}getAllSnippets(){const e=this.data.reduce((a,i)=>(a.push(...i.snippets),a),[]),r=[],n={default:[]};e.forEach(a=>{const i=a.groupName||"default";r.includes(i)||(r.push(i),n[i]=[]),n[i].push(a)});let o=[];return r.forEach(a=>{const i=["default"],s={default:[]},c=n[a];if(c.length!==0){c.forEach(p=>{const f=p.category||"default";i.includes(f)||(i.push(f),s[f]=[]),s[f].push(p)});const u=[];i.forEach(p=>{s[p].length&&u.push({name:p,list:s[p]})});const l={name:a,list:u};o.push(l)}}),o=o.sort((a,i)=>(a.name||"")>(i.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}}const Wf=w({version:v(),name:v(),css:m(v()),renderType:m(F([L("COMPONENT"),L("PAGE")])),loadType:m(x()),lifecycle:m(x()),props:m(x()),methods:m(P(Rf)),componentsMeta:P(Er(w({componentName:v()}),$r)),thirdLibs:m(wf),componentsTree:Df,assets:m(P(x()))}),Co=t=>(xr({data:t,dataStruct:Wf,throwError:!1}),t),Ie=(t,e,r)=>({...t,componentsTree:new Zt(t.componentsTree,{parent:e,materials:r})});class he{constructor(e,r){_(this,"nodeType","PAGE"),_(this,"rawData"),_(this,"emitter",ne),_(this,"data"),_(this,"parent"),_(this,"materialsModel"),_(this,"assetPackagesList"),Co(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new dt((r==null?void 0:r.materials)||[]),this.data=Ie(e,this,this.materialsModel),this.assetPackagesList=[...(r==null?void 0:r.assetPackagesList)||[],...this.data.assets||[]]}updatePage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=Ie(e,this,this.materialsModel),this.emitter.emit("onPageChange",{value:this.data,preValue:r,node:this})}reloadPage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=Ie(e,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(e){if(!e)return;const r=this.data.componentsTree;return Ar(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof Zt)return console.warn("Not found parent node"),!1;if(a instanceof at)return console.warn("CProp can not add node"),!1;if(a instanceof wt){const s=a.value.value,c=s.findIndex(u=>u===r)??-1;return c>=0?(n==="BEFORE"?s.splice(c,0,e):s.splice(c+1,0,e),e.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof he)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,e):a==null||a.value.children.splice(i+1,0,e),e.parent=a,a==null||a.updateValue(),!0):(console.warn("Not found target node"),!1)}if(n==="CHILD_START")return r.value.children.unshift(e),e.parent=r,r.updateValue(),!0;if(n==="CHILD_END")return r.value.children.push(e),e.parent=r,r.updateValue(),!0;if(B(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,e):r==null||r.value.children.splice(s+1,0,e),e.parent=r,r.updateValue(),!0}else console.warn("Can not parse pos obj")}return!1}createNode(e){return delete e.id,new M(e,{parent:null,materials:this.materialsModel})}addNodeById(e,r,n="AFTER"){const o=this.getNode(r);return o?this.addNode(e,o,n):(console.warn(`Not find a node by ${r}, pls check it`),!1)}copyNode(e){const r=e.export("design");r.id=Z();const n=new M(r,{parent:e.parent,materials:this.materialsModel});return this.addNode(n,e,"AFTER"),n}copyNodeById(e){const r=this.getNode(e);return r&&r instanceof M?this.copyNode(r):!1}moveNode(e,r,n){this.deleteNode(e);let o=r;return["AFTER","BEFORE"].includes(n)&&(o=r.parent),e.parent=o,this.addNode(e,r,n)}moveNodeById(e,r,n){const o=this.getNode(e),a=this.getNode(r);return o&&a&&o instanceof M&&a instanceof M?this.moveNode(o,a,n):!1}deleteNode(e){var r;const n=e.parent;if(!n)throw new Error("parent node is null or undefined, pls check it");if(n instanceof wt){const o=n.value.value,a=o.findIndex(s=>s===e),i=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),i}if(n instanceof M||n instanceof Zt){const o=n.value.children,a=o.findIndex(s=>s===e),i=o[a];return o.splice(a,1),n.updateValue(),i}}deleteNodeById(e){const r=this.getNode(e);if(r)return this.deleteNode(r)}export(e=Nr.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],i=this.materialsModel.usedMaterials.map(c=>{const u=o.find(l=>{var p;return l.package===((p=c.value.npm)==null?void 0:p.package)});return u&&a.push(u),{componentName:c.componentName,...co(c.value.npm||{})}}).filter(c=>!!(c.componentName&&c.package&&c.version));this.materialsModel.usedMaterials=[];let s={...this.data,componentsTree:Mr(n),componentsMeta:i,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const u=o.find(l=>c.package===l.package);u&&a.push(u)}),s.assets=mf(a,c=>c.package),s=go(s,["id"]),JSON.parse(JSON.stringify(s))}getRootNode(){return this.data.componentsTree}}At.ROOT_CONTAINER;var Jf=typeof global=="object"&&global&&global.Object===Object&&global;const Eo=Jf;var Qf=typeof self=="object"&&self&&self.Object===Object&&self,qf=Eo||Qf||Function("return this")();const Pt=qf;var Yf=Pt.Symbol;const Ct=Yf;var $o=Object.prototype,Kf=$o.hasOwnProperty,Xf=$o.toString,Vt=Ct?Ct.toStringTag:void 0;function Zf(t){var e=Kf.call(t,Vt),r=t[Vt];try{t[Vt]=void 0;var n=!0}catch{}var o=Xf.call(t);return n&&(e?t[Vt]=r:delete t[Vt]),o}var tp=Object.prototype,ep=tp.toString;function rp(t){return ep.call(t)}var np="[object Null]",op="[object Undefined]",_n=Ct?Ct.toStringTag:void 0;function oe(t){return t==null?t===void 0?op:np:_n&&_n in Object(t)?Zf(t):rp(t)}function Rt(t){return t!=null&&typeof t=="object"}var ap="[object Symbol]";function sp(t){return typeof t=="symbol"||Rt(t)&&oe(t)==ap}function ip(t,e){for(var r=-1,n=t==null?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var cp=Array.isArray;const Et=cp;var up=1/0,Sn=Ct?Ct.prototype:void 0,jn=Sn?Sn.toString:void 0;function No(t){if(typeof t=="string")return t;if(Et(t))return ip(t,No)+"";if(sp(t))return jn?jn.call(t):"";var e=t+"";return e=="0"&&1/t==-up?"-0":e}function yt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function To(t){return t}var lp="[object AsyncFunction]",fp="[object Function]",pp="[object GeneratorFunction]",dp="[object Proxy]";function Pr(t){if(!yt(t))return!1;var e=oe(t);return e==fp||e==pp||e==lp||e==dp}var hp=Pt["__core-js_shared__"];const Le=hp;var On=function(){var t=/[^.]+$/.exec(Le&&Le.keys&&Le.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function mp(t){return!!On&&On in t}var vp=Function.prototype,gp=vp.toString;function yp(t){if(t!=null){try{return gp.call(t)}catch{}try{return t+""}catch{}}return""}var bp=/[\\^$.*+?()[\]{}|]/g,_p=/^\[object .+?Constructor\]$/,Sp=Function.prototype,jp=Object.prototype,Op=Sp.toString,wp=jp.hasOwnProperty,Cp=RegExp("^"+Op.call(wp).replace(bp,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ep(t){if(!yt(t)||mp(t))return!1;var e=Pr(t)?Cp:_p;return e.test(yp(t))}function $p(t,e){return t==null?void 0:t[e]}function Rr(t,e){var r=$p(t,e);return Ep(r)?r:void 0}var wn=Object.create,Np=function(){function t(){}return function(e){if(!yt(e))return{};if(wn)return wn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Tp=Np;function xp(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function Mp(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Ap=800,Pp=16,Rp=Date.now;function Dp(t){var e=0,r=0;return function(){var n=Rp(),o=Pp-(n-r);if(r=n,o>0){if(++e>=Ap)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Ip(t){return function(){return t}}var Lp=function(){try{var t=Rr(Object,"defineProperty");return t({},"",{}),t}catch{}}();const me=Lp;var Fp=me?function(t,e){return me(t,"toString",{configurable:!0,enumerable:!1,value:Ip(e),writable:!0})}:To;const Bp=Fp;var Up=Dp(Bp);const kp=Up;var Vp=9007199254740991,zp=/^(?:0|[1-9]\d*)$/;function xo(t,e){var r=typeof t;return e=e??Vp,!!e&&(r=="number"||r!="symbol"&&zp.test(t))&&t>-1&&t%1==0&&t<e}function Dr(t,e,r){e=="__proto__"&&me?me(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Oe(t,e){return t===e||t!==t&&e!==e}var Gp=Object.prototype,Hp=Gp.hasOwnProperty;function Wp(t,e,r){var n=t[e];(!(Hp.call(t,e)&&Oe(n,r))||r===void 0&&!(e in t))&&Dr(t,e,r)}function Jp(t,e,r,n){var o=!r;r||(r={});for(var a=-1,i=e.length;++a<i;){var s=e[a],c=n?n(r[s],t[s],s,r,t):void 0;c===void 0&&(c=t[s]),o?Dr(r,s,c):Wp(r,s,c)}return r}var Cn=Math.max;function Qp(t,e,r){return e=Cn(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Cn(n.length-e,0),i=Array(a);++o<a;)i[o]=n[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=n[o];return s[e]=r(i),xp(t,this,s)}}function qp(t,e){return kp(Qp(t,e,To),t+"")}var Yp=9007199254740991;function Mo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Yp}function Ir(t){return t!=null&&Mo(t.length)&&!Pr(t)}function Kp(t,e,r){if(!yt(r))return!1;var n=typeof e;return(n=="number"?Ir(r)&&xo(e,r.length):n=="string"&&e in r)?Oe(r[e],t):!1}function Xp(t){return qp(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,i=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,i&&Kp(r[0],r[1],i)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var s=r[n];s&&t(e,s,n,a)}return e})}var Zp=Object.prototype;function Ao(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Zp;return t===r}function td(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var ed="[object Arguments]";function En(t){return Rt(t)&&oe(t)==ed}var Po=Object.prototype,rd=Po.hasOwnProperty,nd=Po.propertyIsEnumerable,od=En(function(){return arguments}())?En:function(t){return Rt(t)&&rd.call(t,"callee")&&!nd.call(t,"callee")};const Ke=od;function ad(){return!1}var Ro=typeof exports=="object"&&exports&&!exports.nodeType&&exports,$n=Ro&&typeof module=="object"&&module&&!module.nodeType&&module,sd=$n&&$n.exports===Ro,Nn=sd?Pt.Buffer:void 0,id=Nn?Nn.isBuffer:void 0,cd=id||ad;const Do=cd;var ud="[object Arguments]",ld="[object Array]",fd="[object Boolean]",pd="[object Date]",dd="[object Error]",hd="[object Function]",md="[object Map]",vd="[object Number]",gd="[object Object]",yd="[object RegExp]",bd="[object Set]",_d="[object String]",Sd="[object WeakMap]",jd="[object ArrayBuffer]",Od="[object DataView]",wd="[object Float32Array]",Cd="[object Float64Array]",Ed="[object Int8Array]",$d="[object Int16Array]",Nd="[object Int32Array]",Td="[object Uint8Array]",xd="[object Uint8ClampedArray]",Md="[object Uint16Array]",Ad="[object Uint32Array]",N={};N[wd]=N[Cd]=N[Ed]=N[$d]=N[Nd]=N[Td]=N[xd]=N[Md]=N[Ad]=!0;N[ud]=N[ld]=N[jd]=N[fd]=N[Od]=N[pd]=N[dd]=N[hd]=N[md]=N[vd]=N[gd]=N[yd]=N[bd]=N[_d]=N[Sd]=!1;function Pd(t){return Rt(t)&&Mo(t.length)&&!!N[oe(t)]}function Rd(t){return function(e){return t(e)}}var Io=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Wt=Io&&typeof module=="object"&&module&&!module.nodeType&&module,Dd=Wt&&Wt.exports===Io,Fe=Dd&&Eo.process,Id=function(){try{var t=Wt&&Wt.require&&Wt.require("util").types;return t||Fe&&Fe.binding&&Fe.binding("util")}catch{}}();const Tn=Id;var xn=Tn&&Tn.isTypedArray,Ld=xn?Rd(xn):Pd;const Lo=Ld;var Fd=Object.prototype,Bd=Fd.hasOwnProperty;function Ud(t,e){var r=Et(t),n=!r&&Ke(t),o=!r&&!n&&Do(t),a=!r&&!n&&!o&&Lo(t),i=r||n||o||a,s=i?td(t.length,String):[],c=s.length;for(var u in t)(e||Bd.call(t,u))&&!(i&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||xo(u,c)))&&s.push(u);return s}function kd(t,e){return function(r){return t(e(r))}}function Vd(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var zd=Object.prototype,Gd=zd.hasOwnProperty;function Hd(t){if(!yt(t))return Vd(t);var e=Ao(t),r=[];for(var n in t)n=="constructor"&&(e||!Gd.call(t,n))||r.push(n);return r}function Fo(t){return Ir(t)?Ud(t,!0):Hd(t)}var Wd=Rr(Object,"create");const te=Wd;function Jd(){this.__data__=te?te(null):{},this.size=0}function Qd(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var qd="__lodash_hash_undefined__",Yd=Object.prototype,Kd=Yd.hasOwnProperty;function Xd(t){var e=this.__data__;if(te){var r=e[t];return r===qd?void 0:r}return Kd.call(e,t)?e[t]:void 0}var Zd=Object.prototype,th=Zd.hasOwnProperty;function eh(t){var e=this.__data__;return te?e[t]!==void 0:th.call(e,t)}var rh="__lodash_hash_undefined__";function nh(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=te&&e===void 0?rh:e,this}function ht(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}ht.prototype.clear=Jd;ht.prototype.delete=Qd;ht.prototype.get=Xd;ht.prototype.has=eh;ht.prototype.set=nh;function oh(){this.__data__=[],this.size=0}function we(t,e){for(var r=t.length;r--;)if(Oe(t[r][0],e))return r;return-1}var ah=Array.prototype,sh=ah.splice;function ih(t){var e=this.__data__,r=we(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():sh.call(e,r,1),--this.size,!0}function ch(t){var e=this.__data__,r=we(e,t);return r<0?void 0:e[r][1]}function uh(t){return we(this.__data__,t)>-1}function lh(t,e){var r=this.__data__,n=we(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function rt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}rt.prototype.clear=oh;rt.prototype.delete=ih;rt.prototype.get=ch;rt.prototype.has=uh;rt.prototype.set=lh;var fh=Rr(Pt,"Map");const Bo=fh;function ph(){this.size=0,this.__data__={hash:new ht,map:new(Bo||rt),string:new ht}}function dh(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Ce(t,e){var r=t.__data__;return dh(e)?r[typeof e=="string"?"string":"hash"]:r.map}function hh(t){var e=Ce(this,t).delete(t);return this.size-=e?1:0,e}function mh(t){return Ce(this,t).get(t)}function vh(t){return Ce(this,t).has(t)}function gh(t,e){var r=Ce(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function Dt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Dt.prototype.clear=ph;Dt.prototype.delete=hh;Dt.prototype.get=mh;Dt.prototype.has=vh;Dt.prototype.set=gh;function Uo(t){return t==null?"":No(t)}var yh=kd(Object.getPrototypeOf,Object);const ko=yh;var bh="[object Object]",_h=Function.prototype,Sh=Object.prototype,Vo=_h.toString,jh=Sh.hasOwnProperty,Oh=Vo.call(Object);function $t(t){if(!Rt(t)||oe(t)!=bh)return!1;var e=ko(t);if(e===null)return!0;var r=jh.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Vo.call(r)==Oh}function wh(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),r=r>o?o:r,r<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var a=Array(o);++n<o;)a[n]=t[n+e];return a}function Ch(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:wh(t,e,r)}var Eh="\\ud800-\\udfff",$h="\\u0300-\\u036f",Nh="\\ufe20-\\ufe2f",Th="\\u20d0-\\u20ff",xh=$h+Nh+Th,Mh="\\ufe0e\\ufe0f",Ah="\\u200d",Ph=RegExp("["+Ah+Eh+xh+Mh+"]");function zo(t){return Ph.test(t)}function Rh(t){return t.split("")}var Go="\\ud800-\\udfff",Dh="\\u0300-\\u036f",Ih="\\ufe20-\\ufe2f",Lh="\\u20d0-\\u20ff",Fh=Dh+Ih+Lh,Bh="\\ufe0e\\ufe0f",Uh="["+Go+"]",Xe="["+Fh+"]",Ze="\\ud83c[\\udffb-\\udfff]",kh="(?:"+Xe+"|"+Ze+")",Ho="[^"+Go+"]",Wo="(?:\\ud83c[\\udde6-\\uddff]){2}",Jo="[\\ud800-\\udbff][\\udc00-\\udfff]",Vh="\\u200d",Qo=kh+"?",qo="["+Bh+"]?",zh="(?:"+Vh+"(?:"+[Ho,Wo,Jo].join("|")+")"+qo+Qo+")*",Gh=qo+Qo+zh,Hh="(?:"+[Ho+Xe+"?",Xe,Wo,Jo,Uh].join("|")+")",Wh=RegExp(Ze+"(?="+Ze+")|"+Hh+Gh,"g");function Jh(t){return t.match(Wh)||[]}function Qh(t){return zo(t)?Jh(t):Rh(t)}function qh(t){return function(e){e=Uo(e);var r=zo(e)?Qh(e):void 0,n=r?r[0]:e.charAt(0),o=r?Ch(r,1).join(""):e.slice(1);return n[t]()+o}}var Yh=qh("toUpperCase");const Kh=Yh;function Xh(t){return Kh(Uo(t).toLowerCase())}function Zh(){this.__data__=new rt,this.size=0}function tm(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function em(t){return this.__data__.get(t)}function rm(t){return this.__data__.has(t)}var nm=200;function om(t,e){var r=this.__data__;if(r instanceof rt){var n=r.__data__;if(!Bo||n.length<nm-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Dt(n)}return r.set(t,e),this.size=r.size,this}function It(t){var e=this.__data__=new rt(t);this.size=e.size}It.prototype.clear=Zh;It.prototype.delete=tm;It.prototype.get=em;It.prototype.has=rm;It.prototype.set=om;var Yo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Mn=Yo&&typeof module=="object"&&module&&!module.nodeType&&module,am=Mn&&Mn.exports===Yo,An=am?Pt.Buffer:void 0,Pn=An?An.allocUnsafe:void 0;function sm(t,e){if(e)return t.slice();var r=t.length,n=Pn?Pn(r):new t.constructor(r);return t.copy(n),n}var im=Pt.Uint8Array;const Rn=im;function cm(t){var e=new t.constructor(t.byteLength);return new Rn(e).set(new Rn(t)),e}function um(t,e){var r=e?cm(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function lm(t){return typeof t.constructor=="function"&&!Ao(t)?Tp(ko(t)):{}}function fm(t){return function(e,r,n){for(var o=-1,a=Object(e),i=n(e),s=i.length;s--;){var c=i[t?s:++o];if(r(a[c],c,a)===!1)break}return e}}var pm=fm();const dm=pm;function tr(t,e,r){(r!==void 0&&!Oe(t[e],r)||r===void 0&&!(e in t))&&Dr(t,e,r)}function hm(t){return Rt(t)&&Ir(t)}function er(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function mm(t){return Jp(t,Fo(t))}function vm(t,e,r,n,o,a,i){var s=er(t,r),c=er(e,r),u=i.get(c);if(u){tr(t,r,u);return}var l=a?a(s,c,r+"",t,e,i):void 0,p=l===void 0;if(p){var f=Et(c),d=!f&&Do(c),h=!f&&!d&&Lo(c);l=c,f||d||h?Et(s)?l=s:hm(s)?l=Mp(s):d?(p=!1,l=sm(c,!0)):h?(p=!1,l=um(c,!0)):l=[]:$t(c)||Ke(c)?(l=s,Ke(s)?l=mm(s):(!yt(s)||Pr(s))&&(l=lm(c))):p=!1}p&&(i.set(c,l),o(l,c,n,a,i),i.delete(c)),tr(t,r,l)}function Ko(t,e,r,n,o){t!==e&&dm(e,function(a,i){if(o||(o=new It),yt(a))vm(t,e,i,r,Ko,n,o);else{var s=n?n(er(t,i),a,i+"",t,e,o):void 0;s===void 0&&(s=a),tr(t,i,s)}},Fo)}var gm=Xp(function(t,e,r){Ko(t,e,r)});const ym=gm,bm=function(t){return!(!t||typeof t!="function"||!t.prototype)};function Xo(t){const e=t==null?void 0:t.prototype;return!!(e&&e.isReactComponent)}function Zo(t){var n,o;const r=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.forward_ref"):60112;return(t==null?void 0:t.$$typeof)===r||((n=t==null?void 0:t.prototype)==null?void 0:n.isReactComponent)||((o=t==null?void 0:t.prototype)==null?void 0:o.setState)||t._forwardRef}function ta(t){class e extends S.Component{render(){return S.createElement(t,this.props)}}return e.displayName=t.displayName,e}const lt=(t,e)=>{const r=n=>{const a=`
7
7
  ${Object.keys(e).map(i=>`const ${i} = $$context['${i}'];`).join(`
8
8
  `)}
9
9
  return ${n};
@@ -17,7 +17,7 @@ function $$_run_$$() {
17
17
  return $$_f_$$.apply($$_f_$$, $$$__args__$$$);
18
18
  }
19
19
  return $$_run_$$();
20
- `,new Function(a)(...o,e,r)}catch(i){console.log(a),console.warn(i)}},rr=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},nr=(t=[])=>{const e={};return t.forEach(({property:r,value:n})=>{let o=r.replace("-webkit","Webkit");o=o.replace("-ms","ms"),o=o.replace("-moz","Moz"),o=o.replace("-o","O");let a=o.split("-");a.length>=2&&(a=a.map((i,s)=>s!==0?Xh(i):i)),e[a.join("")]=n}),e},_v=t=>{let e="";return Object.keys(t||{}).forEach(r=>{e+=`${r}:${t[r]};`}),e},Sv=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o)}}),r},jv=(t,e=1)=>{let r=0,n=t,o={},a={};for(;r<e;)Object.keys(n).forEach(i=>{o={...o,...n[i]}}),a=o,n=o,o={},r+=1;return a},ra=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},na=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},Ov=(t,e)=>na(t,e),wv=(t,e)=>na(t,e),le=t=>{var r;return((r=t.value.css)==null?void 0:r.class)||`c_${t.id}`},ue="DYNAMIC",Cv=["$$context","$$nodeModel"],Dn=t=>{let e;const r=new Set,n=(c,u)=>{const l=typeof c=="function"?c(e):c;if(!Object.is(l,e)){const p=e;e=u??typeof l!="object"?l:Object.assign({},e,l),r.forEach(f=>f(e,p))}},o=()=>e,s={setState:n,getState:o,subscribe:c=>(r.add(c),()=>r.delete(c)),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 e=t(n,o,s),s},Ev=t=>t?Dn(t):Dn;class $v{constructor(){y(this,"storeMap",new Map)}addStore(e,r){const n=Ev(r);return this.storeMap.set(e,n),n.name=e,n}setStore(e,r){this.storeMap.set(e,r)}removeStore(e){this.storeMap.delete(e)}getStore(e){return this.storeMap.get(e)}getState(e){var r;return(r=this.storeMap.get(e))==null?void 0:r.getState()}getStateObj(e){return{state:this.getState(e),updateState:r=>{this.setState(e,r)}}}setState(e,r){var n;return(n=this.storeMap.get(e))==null?void 0:n.setState(r)}connect(e,r){const n=this.storeMap.get(e);return n?n.subscribe(r):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const e={};return this.storeMap.forEach((r,n)=>{e[n]=this.getStateObj(n)}),e}destroy(){this.storeMap=new Map}}class Nv{constructor(){y(this,"varSpace",new Map)}get(e){return this.varSpace.get(e)}add(e,r){this.varSpace.set(e,r)}remove(e){this.varSpace.delete(e)}destroy(){this.varSpace.clear()}getStateSnapshot(){const e={};return this.varSpace.forEach((r,n)=>{e[n]=r}),e}}class oa{constructor(){y(this,"renderMode","normal");y(this,"components",{});y(this,"storeManager",new $v);y(this,"variableManager",new Nv);y(this,"runtimeComponentCache",new Map);y(this,"onGetRef");y(this,"onGetComponent");y(this,"onComponentMount");y(this,"onComponentDestroy");y(this,"processNodeConfigHook")}getComponent(e){var o;const r=e.value.componentName;let n=this.components[r]||(()=>`Component [${r}] not found`);return Zo(n)||(n=ta(n),this.components[r]=n),this.onGetComponent&&(n=(o=this.onGetComponent)==null?void 0:o.call(this,n,e)),n}getContext(e={},r){let n=e;return r&&(n={...e},n.__proto__=r||null),n}pageRender(e,{components:r,onGetRef:n,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:c,processNodeConfigHook:u}){this.renderMode=c,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=u;const l=e.value.componentsTree,p=this.getComponent(l),f=this.convertModelToComponent(p,e.value.componentsTree),d={},h=l.props;return Object.keys(h).forEach(g=>{d[g]=h[g].value}),d.$$context=o,this.render(f,d)}transformProps(e={},{$$context:r}){const n=e,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(De(i))return o(i.value);if(kf(i)){const s=i.value,c=s.value;if(!c)return console.warn("slot value is null, this maybe cause some error, pls check it",e),()=>{};const u=l=>{const p=`${l.id}-${ue}`;if(this.runtimeComponentCache.get(l.id))return{key:p,component:this.runtimeComponentCache.get(l.id)};const f=this.getComponent(l),d=this.convertModelToComponent(f,l),h=s.params||[];return{component:(...j)=>{const O=rr(j,h),T=this.getContext({params:O},r);return this.render(d,{$$context:T,key:p})},key:p}};if(Array.isArray(c)){const l=c==null?void 0:c.map(p=>u(p));return(...p)=>l.map(f=>{if(Xo(f.component)){const h=f.component;return S.createElement(h,{$$context:r,key:f.key})}else{const h=f.component;return h==null?void 0:h(...p)}})}else return u(c).component}else{if(ct(i))return lt(i.value,r||{});if(Bf(i))return ea(i.value,r,this.storeManager);if($t(i)){let s=i;De(i)&&(s=i.value);const c=s,u={};return Object.keys(s).forEach(l=>{u[l]=o(c[l])}),u}else return i}},a={};return Object.keys(n).forEach(i=>{const s=n[i];a[i]=o(s)}),a}collectSpecialProps(e={},r){const n=[],o=(a,i)=>{let s=i;De(i)&&(s=i.value),r(s)?n.push({keyPath:a,val:s}):Et(s)?s.forEach((c,u)=>{o([...a,String(u)],c)}):$t(s)&&Object.keys(s).forEach(c=>{o([...a,c],s[c])})};return o(["$root"],e),n}convertModelToComponent(e,r){const n=this;class o extends S.Component{constructor(s){super(s);y(this,"_CONDITION",!0);y(this,"_DESIGN_BOX",!1);y(this,"_NODE_MODEL",r);y(this,"_NODE_ID",r.id);y(this,"UNIQUE_ID",`${r.id}_${Z()}`);y(this,"targetComponentRef");y(this,"listenerHandle",[]);y(this,"storeState");y(this,"storeListenDisposeList",[]);y(this,"domHeader");y(this,"mediaStyleDomMap",{});y(this,"variableSpace");y(this,"nodeName");y(this,"updateState",s=>{this.storeState.setState(s),this.forceUpdate()});y(this,"getStyleDomById",s=>{const c=this.mediaStyleDomMap;let u=c[s];return u||(u=document.createElement("style"),c[s]=u),u.id=s,u});y(this,"addMediaCSS",()=>{var u;let s=this.domHeader;if(s||(s=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=s),!this.domHeader)return;const c=this._NODE_MODEL.value.css;c&&c.value.forEach(l=>{var d;const p=`${this.UNIQUE_ID}_${l.state}`;let f=le(this._NODE_MODEL);if(l.state!=="normal"&&(f=`${f}:${l.state}`),l.text){const h=this.getStyleDomById(p);h.innerText=`.${f} { ${l.text} }`,s==null||s.appendChild(h)}(d=l.media)!=null&&d.length&&l.media.forEach(h=>{const g=`${p}_${h.type}_${h.value}`,b=this.getStyleDomById(g);b.media=`screen and (${h.type}:${h.value}px)`,b.innerHTML=`.${f} { ${h.text} }`,s==null||s.appendChild(b)})})});y(this,"removeMediaCSS",()=>{const s=this.mediaStyleDomMap;Object.keys(s).forEach(c=>{var u;(u=this.domHeader)==null||u.removeChild(s[c])}),this.mediaStyleDomMap={}});y(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(s=>s()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()});this.targetComponentRef=S.createRef(),this.state=r.value.state||{};const c=r.value.nodeName||r.id;this.nodeName=c;const u=n.storeManager.getStore(c);u?(this.storeState=u,u.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(c,()=>({...r.value.state||{}})),this.storeState.subscribe(p=>{this.setState({...p})}),this.connectStore();const l=n.variableManager.get(c);l?this.variableSpace=l:(this.variableSpace={staticVar:{},methods:{}},n.variableManager.add(c,this.variableSpace))}connectStore(){const s=n.collectSpecialProps(r.props,f=>!!ct(f)),c=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},f=>!!ct(f));let u=[];[...s,...c].map(f=>{const d=f.val,h=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],g=ra(d.value,h);u=[...u,...g]}).filter(Boolean);const l=Array.from(new Set(u)),p=[];l.length&&l.forEach(f=>{n.storeManager.getStore(f)||(n.storeManager.addStore(f,()=>({})),console.warn(n.storeManager,f,"not exits"));const h=n.storeManager.connect(f,()=>{this.forceUpdate()});p.push(h)}),this.storeListenDisposeList=p}componentDidMount(){var c;this.addMediaCSS(),n.onGetRef&&n.onGetRef(this.targetComponentRef,r,this),(c=n.onComponentMount)==null||c.call(n,this,r);const s=()=>{n.storeManager.setStore(r.value.nodeName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(s)}componentWillUnmount(){var s;this.storeListenDisposeList.forEach(c=>c()),this.removeMediaCSS(),(s=n.onComponentDestroy)==null||s.call(n,this,r)}render(){var ae;const{$$context:s,...c}=this.props,u=r.value.nodeName||r.id,l={key:r.id,...r.props,...c},p={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:n.storeManager,getState:()=>n.storeManager.getStateObj(u),getStateObj:()=>n.storeManager.getStateObj(u),getStateObjById:D=>n.storeManager.getStateObj(D),stateManager:n.storeManager.getStateSnapshot(),getMethods:()=>n.variableManager.get(u).methods,getMethodsById:D=>n.variableManager.get(D).methods,getStaticVar:()=>n.variableManager.get(u).staticVar,getStaticVarById:D=>n.variableManager.get(D).staticVar};r.value.componentName===At.ROOT_CONTAINER&&(p.globalState=this.state,p.updateGlobalState=this.updateState);const f=n.getContext(p,s),g=n.transformProps({methods:r.value.methods},{$$context:f}).methods.reduce((D,G)=>(D[G.name]=G.define,D),{});f.methods=g,this.variableSpace.methods=Object.assign(this.variableSpace.methods,g);const b=r.value.loop;let j=[];if(b&&b.open){this.targetComponentRef.current=[];let D=b.data||[];if(ct(b.data)){const G=b.data;D=lt(G.value,f||{})}return j=D.map((...G)=>{var Lr;const Ft=G[1],bt=[b.forName||"item",b.forIndex||"index"],$e=rr(G,bt);let Ne="loopData";b.name&&(Ne=`${Ne}${b.name}`);const Bt=n.getContext({[Ne]:$e},f),q=n.transformProps(l,{$$context:Bt}),da=((Lr=r.value.classNames)==null?void 0:Lr.map(H=>{var ie;const Ut=H.name;return(ct(H.status)?lt(String(((ie=H.status)==null?void 0:ie.value)||""),Bt):!1)?Ut:""}))||[];let Te=`${q.className??""} ${da.join(" ")}`.trim();r.value.css&&(Te=`${le(r)} ${Te}`.trim()),q.className=Te;const ha=n.transformProps({style:r.value.style},{$$context:Bt});r.value.style&&(q.style=nr(ha.style||[]));const{children:se}=q;let xe=[];if(se!==void 0)delete q.children,xe=Array.isArray(se)?se:[se];else{const H=[];r.value.children.forEach((Fr,ie)=>{const va=n.buildComponent(Fr,{$$context:Bt,idx:ie});H.push(va)}),xe=H}if(q.key=`${q.key}-${Ft}`,ct(b.key)){const H=b.key,Ut=lt(H.value,Bt||{});q.key+=`-${Ut}`}return q.ref=H=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[Ft]=H},n.render(e,q,...xe)}),j}const O=n.transformProps(l,{$$context:f}),{children:T}=O;let A=[];if(T!==void 0)delete O.children,A=Array.isArray(T)?T:[T];else{const D=[];r.value.children.forEach((Ft,bt)=>{const $e=n.buildComponent(Ft,{$$context:f,idx:bt});D.push($e)}),A=D}O.ref=this.targetComponentRef;const I=((ae=r.value.classNames)==null?void 0:ae.map(D=>{var bt;const G=D.name;return(ct(D.status)?lt(((bt=D.status)==null?void 0:bt.value)||"",f):!1)?G:""}))||[];let k=`${O.className??""} ${I.join(" ")}`.trim();r.value.css&&(k=`${le(r)} ${k}`.trim()),O.className=k;const Lt=n.transformProps({style:r.value.style},{$$context:f});r.value.style&&(O.style=nr(Lt.style||[]));let C=r.value.condition??!0;typeof C!="boolean"&&(C=lt(C.value,f||{}));let ot={condition:C,props:O};n.processNodeConfigHook&&(ot=n.processNodeConfigHook(ot,r));const it=n.render(e,ot.props,...A);return this._CONDITION=ot.condition,ot.condition?it:S.createElement("div",{style:{display:"none"}},it)}}return y(o,"__CP_TYPE__",ue),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(e,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof e=="string"?this.render(e):Uf(e)?(({currentNode:a})=>{const i=a.value.id;let s=null;if(n.get(i)){const l=n.get(i);s=l==null?void 0:l.component}else{const l=this.getComponent(a);s=this.convertModelToComponent(l,a),!n.get(i)&&this.renderMode!=="design"&&n.set(i,{component:s})}const c=`${i}-${ue}`,u={$$context:r,$$nodeModel:e,key:c};return this.render(s,u)})({currentNode:e}):void 0}render(e,r={},...n){return typeof e=="string"||typeof e=="number"?String(e):(Cv.forEach(a=>{a in r&&e.__CP_TYPE__!==ue&&delete r[a]}),S.createElement(e,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const Tv=Ln(new oa),xv=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var Mv=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Av(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var aa={exports:{}},Ee={};/**
20
+ `,new Function(a)(...o,e,r)}catch(i){console.log(a),console.warn(i)}},rr=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},nr=(t=[])=>{const e={};return t.forEach(({property:r,value:n})=>{let o=r.replace("-webkit","Webkit");o=o.replace("-ms","ms"),o=o.replace("-moz","Moz"),o=o.replace("-o","O");let a=o.split("-");a.length>=2&&(a=a.map((i,s)=>s!==0?Xh(i):i)),e[a.join("")]=n}),e},_m=t=>{let e="";return Object.keys(t||{}).forEach(r=>{e+=`${r}:${t[r]};`}),e},Sm=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o)}}),r},jm=(t,e=1)=>{let r=0,n=t,o={},a={};for(;r<e;)Object.keys(n).forEach(i=>{o={...o,...n[i]}}),a=o,n=o,o={},r+=1;return a},ra=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},na=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},Om=(t,e)=>na(t,e),wm=(t,e)=>na(t,e),le=t=>{var r;return((r=t.value.css)==null?void 0:r.class)||`c_${t.id}`},ue="DYNAMIC",Cm=["$$context","$$nodeModel"],Dn=t=>{let e;const r=new Set,n=(c,u)=>{const l=typeof c=="function"?c(e):c;if(!Object.is(l,e)){const p=e;e=u??typeof l!="object"?l:Object.assign({},e,l),r.forEach(f=>f(e,p))}},o=()=>e,s={setState:n,getState:o,subscribe:c=>(r.add(c),()=>r.delete(c)),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 e=t(n,o,s),s},Em=t=>t?Dn(t):Dn;class $m{constructor(){y(this,"storeMap",new Map)}addStore(e,r){const n=Em(r);return this.storeMap.set(e,n),n.name=e,n}setStore(e,r){this.storeMap.set(e,r)}removeStore(e){this.storeMap.delete(e)}getStore(e){return this.storeMap.get(e)}getState(e){var r;return(r=this.storeMap.get(e))==null?void 0:r.getState()}getStateObj(e){return{state:this.getState(e),updateState:r=>{this.setState(e,r)}}}setState(e,r){var n;return(n=this.storeMap.get(e))==null?void 0:n.setState(r)}connect(e,r){const n=this.storeMap.get(e);return n?n.subscribe(r):(console.warn("store not exits"),()=>{})}getStateSnapshot(){const e={};return this.storeMap.forEach((r,n)=>{e[n]=this.getStateObj(n)}),e}destroy(){this.storeMap=new Map}}class Nm{constructor(){y(this,"varSpace",new Map)}get(e){return this.varSpace.get(e)}add(e,r){this.varSpace.set(e,r)}remove(e){this.varSpace.delete(e)}destroy(){this.varSpace.clear()}getStateSnapshot(){const e={};return this.varSpace.forEach((r,n)=>{e[n]=r}),e}}class oa{constructor(){y(this,"renderMode","normal");y(this,"components",{});y(this,"storeManager",new $m);y(this,"variableManager",new Nm);y(this,"runtimeComponentCache",new Map);y(this,"onGetRef");y(this,"onGetComponent");y(this,"onComponentMount");y(this,"onComponentDestroy");y(this,"processNodeConfigHook")}getComponent(e){var o;const r=e.value.componentName;let n=this.components[r]||(()=>`Component [${r}] not found`);return Zo(n)||(n=ta(n),this.components[r]=n),this.onGetComponent&&(n=(o=this.onGetComponent)==null?void 0:o.call(this,n,e)),n}getContext(e={},r){let n=e;return r&&(n={...e},n.__proto__=r||null),n}pageRender(e,{components:r,onGetRef:n,$$context:o={},onGetComponent:a,onComponentMount:i,onComponentDestroy:s,renderMode:c,processNodeConfigHook:u}){this.renderMode=c,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=i,this.onComponentDestroy=s,this.processNodeConfigHook=u;const l=e.value.componentsTree,p=this.getComponent(l),f=this.convertModelToComponent(p,e.value.componentsTree),d={},h=l.props;return Object.keys(h).forEach(g=>{d[g]=h[g].value}),d.$$context=o,this.render(f,d)}transformProps(e={},{$$context:r}){const n=e,o=i=>{if(Array.isArray(i))return i.map(s=>o(s));if(De(i))return o(i.value);if(kf(i)){const s=i.value,c=s.value;if(!c)return console.warn("slot value is null, this maybe cause some error, pls check it",e),()=>{};const u=l=>{const p=`${l.id}-${ue}`;if(this.runtimeComponentCache.get(l.id))return{key:p,component:this.runtimeComponentCache.get(l.id)};const f=this.getComponent(l),d=this.convertModelToComponent(f,l),h=s.params||[];return{component:(...j)=>{const O=rr(j,h),T=this.getContext({params:O},r);return this.render(d,{$$context:T,key:p})},key:p}};if(Array.isArray(c)){const l=c==null?void 0:c.map(p=>u(p));return(...p)=>l.map(f=>{if(Xo(f.component)){const h=f.component;return S.createElement(h,{$$context:r,key:f.key})}else{const h=f.component;return h==null?void 0:h(...p)}})}else return u(c).component}else{if(ct(i))return lt(i.value,r||{});if(Bf(i))return ea(i.value,r,this.storeManager);if($t(i)){let s=i;De(i)&&(s=i.value);const c=s,u={};return Object.keys(s).forEach(l=>{u[l]=o(c[l])}),u}else return i}},a={};return Object.keys(n).forEach(i=>{const s=n[i];a[i]=o(s)}),a}collectSpecialProps(e={},r){const n=[],o=(a,i)=>{let s=i;De(i)&&(s=i.value),r(s)?n.push({keyPath:a,val:s}):Et(s)?s.forEach((c,u)=>{o([...a,String(u)],c)}):$t(s)&&Object.keys(s).forEach(c=>{o([...a,c],s[c])})};return o(["$root"],e),n}convertModelToComponent(e,r){const n=this;class o extends S.Component{constructor(s){super(s);y(this,"_CONDITION",!0);y(this,"_DESIGN_BOX",!1);y(this,"_NODE_MODEL",r);y(this,"_NODE_ID",r.id);y(this,"UNIQUE_ID",`${r.id}_${Z()}`);y(this,"targetComponentRef");y(this,"listenerHandle",[]);y(this,"storeState");y(this,"storeListenDisposeList",[]);y(this,"domHeader");y(this,"mediaStyleDomMap",{});y(this,"variableSpace");y(this,"nodeName");y(this,"updateState",s=>{this.storeState.setState(s),this.forceUpdate()});y(this,"getStyleDomById",s=>{const c=this.mediaStyleDomMap;let u=c[s];return u||(u=document.createElement("style"),c[s]=u),u.id=s,u});y(this,"addMediaCSS",()=>{var u;let s=this.domHeader;if(s||(s=(u=document.getElementsByTagName("head"))==null?void 0:u[0],this.domHeader=s),!this.domHeader)return;const c=this._NODE_MODEL.value.css;c&&c.value.forEach(l=>{var d;const p=`${this.UNIQUE_ID}_${l.state}`;let f=le(this._NODE_MODEL);if(l.state!=="normal"&&(f=`${f}:${l.state}`),l.text){const h=this.getStyleDomById(p);h.innerText=`.${f} { ${l.text} }`,s==null||s.appendChild(h)}(d=l.media)!=null&&d.length&&l.media.forEach(h=>{const g=`${p}_${h.type}_${h.value}`,b=this.getStyleDomById(g);b.media=`screen and (${h.type}:${h.value}px)`,b.innerHTML=`.${f} { ${h.text} }`,s==null||s.appendChild(b)})})});y(this,"removeMediaCSS",()=>{const s=this.mediaStyleDomMap;Object.keys(s).forEach(c=>{var u;(u=this.domHeader)==null||u.removeChild(s[c])}),this.mediaStyleDomMap={}});y(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(s=>s()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()});this.targetComponentRef=S.createRef(),this.state=r.value.state||{};const c=r.value.nodeName||r.id;this.nodeName=c;const u=n.storeManager.getStore(c);u?(this.storeState=u,u.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(c,()=>({...r.value.state||{}})),this.storeState.subscribe(p=>{this.setState({...p})}),this.connectStore();const l=n.variableManager.get(c);l?this.variableSpace=l:(this.variableSpace={staticVar:{},methods:{}},n.variableManager.add(c,this.variableSpace))}connectStore(){const s=n.collectSpecialProps(r.props,f=>!!ct(f)),c=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},f=>!!ct(f));let u=[];[...s,...c].map(f=>{const d=f.val,h=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],g=ra(d.value,h);u=[...u,...g]}).filter(Boolean);const l=Array.from(new Set(u)),p=[];l.length&&l.forEach(f=>{n.storeManager.getStore(f)||(n.storeManager.addStore(f,()=>({})),console.warn(n.storeManager,f,"not exits"));const h=n.storeManager.connect(f,()=>{this.forceUpdate()});p.push(h)}),this.storeListenDisposeList=p}componentDidMount(){var c;this.addMediaCSS(),n.onGetRef&&n.onGetRef(this.targetComponentRef,r,this),(c=n.onComponentMount)==null||c.call(n,this,r);const s=()=>{n.storeManager.setStore(r.value.nodeName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(s)}componentWillUnmount(){var s;this.storeListenDisposeList.forEach(c=>c()),this.removeMediaCSS(),(s=n.onComponentDestroy)==null||s.call(n,this,r)}render(){var ae;const{$$context:s,...c}=this.props,u=r.value.nodeName||r.id,l={key:r.id,...r.props,...c},p={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:n.storeManager,getState:()=>n.storeManager.getStateObj(u),getStateObj:()=>n.storeManager.getStateObj(u),getStateObjById:D=>n.storeManager.getStateObj(D),stateManager:n.storeManager.getStateSnapshot(),getMethods:()=>n.variableManager.get(u).methods,getMethodsById:D=>n.variableManager.get(D).methods,getStaticVar:()=>n.variableManager.get(u).staticVar,getStaticVarById:D=>n.variableManager.get(D).staticVar};r.value.componentName===At.ROOT_CONTAINER&&(p.globalState=this.state,p.updateGlobalState=this.updateState);const f=n.getContext(p,s),g=n.transformProps({methods:r.value.methods},{$$context:f}).methods.reduce((D,G)=>(D[G.name]=G.define,D),{});f.methods=g,this.variableSpace.methods=Object.assign(this.variableSpace.methods,g);const b=r.value.loop;let j=[];if(b&&b.open){this.targetComponentRef.current=[];let D=b.data||[];if(ct(b.data)){const G=b.data;D=lt(G.value,f||{})}return j=D.map((...G)=>{var Lr;const Ft=G[1],bt=[b.forName||"item",b.forIndex||"index"],$e=rr(G,bt);let Ne="loopData";b.name&&(Ne=`${Ne}${b.name}`);const Bt=n.getContext({[Ne]:$e},f),q=n.transformProps(l,{$$context:Bt}),da=((Lr=r.value.classNames)==null?void 0:Lr.map(H=>{var ie;const Ut=H.name;return(ct(H.status)?lt(String(((ie=H.status)==null?void 0:ie.value)||""),Bt):!1)?Ut:""}))||[];let Te=`${q.className??""} ${da.join(" ")}`.trim();r.value.css&&(Te=`${le(r)} ${Te}`.trim()),q.className=Te;const ha=n.transformProps({style:r.value.style},{$$context:Bt});r.value.style&&(q.style=nr(ha.style||[]));const{children:se}=q;let xe=[];if(se!==void 0)delete q.children,xe=Array.isArray(se)?se:[se];else{const H=[];r.value.children.forEach((Fr,ie)=>{const ma=n.buildComponent(Fr,{$$context:Bt,idx:ie});H.push(ma)}),xe=H}if(q.key=`${q.key}-${Ft}`,ct(b.key)){const H=b.key,Ut=lt(H.value,Bt||{});q.key+=`-${Ut}`}return q.ref=H=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[Ft]=H},n.render(e,q,...xe)}),j}const O=n.transformProps(l,{$$context:f}),{children:T}=O;let A=[];if(T!==void 0)delete O.children,A=Array.isArray(T)?T:[T];else{const D=[];r.value.children.forEach((Ft,bt)=>{const $e=n.buildComponent(Ft,{$$context:f,idx:bt});D.push($e)}),A=D}O.ref=this.targetComponentRef;const I=((ae=r.value.classNames)==null?void 0:ae.map(D=>{var bt;const G=D.name;return(ct(D.status)?lt(((bt=D.status)==null?void 0:bt.value)||"",f):!1)?G:""}))||[];let k=`${O.className??""} ${I.join(" ")}`.trim();r.value.css&&(k=`${le(r)} ${k}`.trim()),O.className=k;const Lt=n.transformProps({style:r.value.style},{$$context:f});r.value.style&&(O.style=nr(Lt.style||[]));let C=r.value.condition??!0;typeof C!="boolean"&&(C=lt(C.value,f||{}));let ot={condition:C,props:O};n.processNodeConfigHook&&(ot=n.processNodeConfigHook(ot,r));const it=n.render(e,ot.props,...A);return this._CONDITION=ot.condition,ot.condition?it:S.createElement("div",{style:{display:"none"}},it)}}return y(o,"__CP_TYPE__",ue),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(e,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof e=="string"?this.render(e):Uf(e)?(({currentNode:a})=>{const i=a.value.id;let s=null;if(n.get(i)){const l=n.get(i);s=l==null?void 0:l.component}else{const l=this.getComponent(a);s=this.convertModelToComponent(l,a),!n.get(i)&&this.renderMode!=="design"&&n.set(i,{component:s})}const c=`${i}-${ue}`,u={$$context:r,$$nodeModel:e,key:c};return this.render(s,u)})({currentNode:e}):void 0}render(e,r={},...n){return typeof e=="string"||typeof e=="number"?String(e):(Cm.forEach(a=>{a in r&&e.__CP_TYPE__!==ue&&delete r[a]}),S.createElement(e,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const Tm=Ln(new oa),xm=["a","abbr","acronym","address","applet","area","article","aside","audio","b","base","basefont","bdi","bdo","bgsound","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","command","content","data","datalist","dd","del","details","dfn","dialog","dir","div","dl","dt","element","em","embed","fieldset","figcaption","figure","font","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","image","img","input","ins","isindex","kbd","keygen","label","legend","li","link","listing","main","map","mark","marquee","math","menu","menuitem","meta","meter","multicol","nav","nextid","nobr","noembed","noframes","noscript","object","ol","optgroup","option","output","p","param","picture","plaintext","pre","progress","q","rb","rbc","rp","rt","rtc","ruby","s","samp","script","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","tt","u","ul","var","video","wbr","xmp"];var Mm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Am(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var aa={exports:{}},Ee={};/**
21
21
  * @license React
22
22
  * react-jsx-runtime.production.min.js
23
23
  *
@@ -25,5 +25,5 @@ return $$_run_$$();
25
25
  *
26
26
  * This source code is licensed under the MIT license found in the
27
27
  * LICENSE file in the root directory of this source tree.
28
- */var Pv=S,Rv=Symbol.for("react.element"),Dv=Symbol.for("react.fragment"),Iv=Object.prototype.hasOwnProperty,Lv=Pv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Fv={key:!0,ref:!0,__self:!0,__source:!0};function sa(t,e,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(i=e.ref);for(n in e)Iv.call(e,n)&&!Fv.hasOwnProperty(n)&&(o[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)o[n]===void 0&&(o[n]=e[n]);return{$$typeof:Rv,type:t,key:a,ref:i,props:o,_owner:Lv.current}}Ee.Fragment=Dv;Ee.jsx=sa;Ee.jsxs=sa;aa.exports=Ee;var Bv=aa.exports;const Uv=Bv.jsx,nt=t=>{const e={};return t.forEach(r=>{e[r.key]=r.value}),e},kv=[...xv,...Cf],Vv=kv.reduce((t,e)=>(t[e]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),S.createElement(e,{...o,...nt(n)},...a)},t),{}),zv=({children:t,width:e,height:r,$$attributes:n=[],...o})=>{let a=t;Array.isArray(t)||(a=[t]),a=a.filter(u=>u!==void 0);const{style:i={},...s}=nt(n),c={height:r,width:e,...i,...o.style||{}};return S.createElement("div",{...o,...s,style:c},...a)},Gv=({afterMount:t,beforeDestroy:e,$$attributes:r=[],...n})=>(S.useEffect(()=>(t==null||t(n),()=>{e==null||e(n)}),[]),S.createElement("canvas",{...n,...nt(r)})),Hv=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("img",{...r,...nt(e)},...n)},Wv=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("video",{...r,...nt(e)},...n)},Jv=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("audio",{...r,...nt(e)},...n)},Qv=({$$attributes:t=[],content:e,...r})=>S.createElement("span",{...r,...nt(t)},e),qv=({children:t,$$attributes:e=[],afterMount:r,beforeDestroy:n,...o})=>{let a=t;return Array.isArray(t)||(a=[t]),S.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),Uv("div",{...o,...nt(e),children:a})},Yv=({children:t,$$attributes:e=[],htmlTag:r="div",...n})=>{let o=t;Array.isArray(t)||(o=[t]);const{style:a={},...i}=nt(e),s={...a,...n.style||{}};return S.createElement(r,{...n,...i,style:s},...o)},Kv={RootContainer:({children:t})=>t,...Vv,CContainer:qv,CVideo:Wv,CAudio:Jv,CBlock:zv,CImage:Hv,CText:Qv,CCanvas:Gv,CNativeTag:Yv};class Xv{constructor(){y(this,"refMap",new Map)}get(e){return this.refMap.get(e)}add(e,r){this.refMap.set(e,r)}remove(e){this.refMap.delete(e)}destroy(){this.refMap.clear()}}class ia extends S.Component{constructor(r){super(r);y(this,"refManager");y(this,"dynamicComponentInstanceMap",new Map);y(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)});y(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if($t(r)&&Co(r)){const n=r;this.setState({pageModel:new he(n,{materials:this.state.pageModel.materialsModel.rawValue})})}});this.state={pageModel:r.pageModel||new he(r.page)},this.refManager=new Xv}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:r}=this.props;r&&(r.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:r}=this,{adapter:n,onGetComponent:o,onComponentDestroy:a,onComponentMount:i}=r,{pageModel:s}=this.state;if(!s)return console.warn("pageModel is null"),null;const c={...Kv,...r.components},u=this.props.$$context??{};return u.refs=this.refManager,n.pageRender(s,{libs:{},components:c,onGetRef:this.onGetRef,onGetComponent:o,onComponentMount:i,onComponentDestroy:a,$$context:u,renderMode:r.renderMode,processNodeConfigHook:r.processNodeConfigHook})}}const Zv=()=>{const t=S.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)}}};class tm extends S.Component{constructor(r){super(r);y(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:""}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){var o,a;(a=(o=this.props).onError)==null||a.call(o,n)}render(){if(this.state.hasError){const{onDoubleClick:r}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const o=S.createElement("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"}},"Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,S.createElement("p",null,"msg: ",String(this.state.error)),S.createElement("button",{onDoubleClick:r,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"}},"double click to refresh"),S.createElement("div",{style:{display:"none"}}));return S.createElement(this.props.targetComponent,{onlyRenderChild:!0},o)}return this.props.children}}class ca{constructor(){y(this,"instanceMap",new Map)}get(e){return this.instanceMap.get(e)}add(e,r){const n=this.instanceMap.get(e);n?n.push(r):this.instanceMap.set(e,[r])}remove(e,r){const n=this.instanceMap.get(e);if(r!==void 0&&Array.isArray(n)){const o=n.filter(a=>a!==r);this.instanceMap.set(e,o)}else this.instanceMap.delete(e)}destroy(){this.instanceMap.clear()}}const ua=t=>{const{node:e}=t,r=S.useMemo(()=>{const s=e.isContainer();return $t(s)?s:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[t.node]),{placeholder:n,height:o,width:a,style:i}=r;return S.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",width:a,height:o,...i}},n)};class em extends S.Component{constructor(r){super(r);y(this,"instanceManager",new ca);y(this,"renderRef");y(this,"dropPlaceholder",ua);y(this,"onGetComponent",(r,n)=>{var c,u;const o=this;let a=r;const i=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.wrapComponent;i&&(a=i(r,{node:n,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class s extends S.Component{constructor(){super(...arguments);y(this,"_DESIGN_BOX",!0);y(this,"_NODE_MODEL",n);y(this,"_NODE_ID",n.id);y(this,"_UNIQUE_ID",`${n.id}_${Z()}`);y(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){var j,O;const{children:f=[],onlyRenderChild:d,...h}=this.props;let g=f;if(Et(f)||(g=[f]),!!!g.filter(Boolean).length&&(n.isContainer()||n.value.componentName===At.ROOT_CONTAINER)){const T=(O=(j=n.material)==null?void 0:j.value.advanceCustom)==null?void 0:O.dropPlaceholder;g.push(S.createElement(T||o.dropPlaceholder,{node:n}))}return d?g:S.createElement(a,h,...g)}}return S.forwardRef(function(p,f){return S.createElement(tm,{node:n,targetComponent:s},S.createElement(s,{ref:f,...p}))})});this.renderRef=S.createRef(),r.dropPlaceholder&&(this.dropPlaceholder=r.dropPlaceholder)}componentDidMount(){var r,n;(n=(r=this.props).onMount)==null||n.call(r,this)}getPageModel(){var r;return(r=this.renderRef.current)==null?void 0:r.state.pageModel}rerender(r){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(r)}getInstancesById(r,n){let o=[...this.instanceManager.get(r)||[]];return n!==void 0&&(o=o.filter(a=>n===(a==null?void 0:a._UNIQUE_ID))),o}getInstanceByDom(r){const n=la(r);if(!n)return null;const o=fa(n);return(o==null?void 0:o.stateNode)||null}getDomsById(r,n){const o=this.getInstancesById(r),a=[];return o==null||o.forEach(i=>{var c;if((i==null?void 0:i._STATUS)==="DESTROY")return;const s=_a.findDOMNode(i);if(s&&!(s instanceof Text))if(n){const u=Array.from(((c=s.querySelectorAll)==null?void 0:c.call(s,n))||[]);a.push(...u)}else a.push(s)}),a}getDomRectById(r,n){return this.getDomsById(r,n).map(i=>i==null?void 0:i.getBoundingClientRect()).filter(Boolean)}render(){const{props:r,onGetComponent:n}=this,{render:o,...a}=r;return o&&(o.ref.current=this),S.createElement(ia,{onGetComponent:n,...a,processNodeConfigHook:(i,s)=>{var h,g;if(s.nodeType!=="NODE")return i;const{props:c,condition:u}=i;let l={...c};const p=((h=s.value.configure)==null?void 0:h.devState)||{},f=(g=s.material)==null?void 0:g.value.fixedProps;if(f!==void 0){if($t(f))l={...l,...f};else if(typeof f=="function"){const b=f(l);l={...l,...b}}}let d=u;return p.condition===!1&&(d=p.condition),{props:yv(l,p.props||{}),condition:d}},ref:this.renderRef})}}const la=t=>{if(!t)return null;const e=Object.keys(t).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return e?t[e]:la(t.parentElement)},fa=t=>{var e;return t?(e=t==null?void 0:t.stateNode)!=null&&e._DESIGN_BOX?t:fa(t.return):null},rm=()=>{const t=S.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)},getInstancesById(e,r){var n;return((n=t.current)==null?void 0:n.getInstancesById(e,r))||[]},getInstanceByDom(e){var r;return((r=t.current)==null?void 0:r.getInstanceByDom(e))||null},getDomsById(e,r){var n;return((n=t.current)==null?void 0:n.getDomsById(e,r))||[]},getDomRectById(e,r){var n;return((n=t.current)==null?void 0:n.getDomRectById(e,r))||[]}}};var pa={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Mv,function(){var r=function(){},n={},o={},a={};function i(f,d){f=f.push?f:[f];var h=[],g=f.length,b=g,j,O,T,A;for(j=function(I,k){k.length&&h.push(I),b--,b||d(h)};g--;){if(O=f[g],T=o[O],T){j(O,T);continue}A=a[O]=a[O]||[],A.push(j)}}function s(f,d){if(f){var h=a[f];if(o[f]=d,!!h)for(;h.length;)h[0](f,d),h.splice(0,1)}}function c(f,d){f.call&&(f={success:f}),d.length?(f.error||r)(d):(f.success||r)(f)}function u(f,d,h,g){var b=document,j=h.async,O=(h.numRetries||0)+1,T=h.before||r,A=f.replace(/[\?|#].*$/,""),I=f.replace(/^(css|img|module|nomodule)!/,""),k,Lt,C;if(g=g||0,/(^css!|\.css$)/.test(A))C=b.createElement("link"),C.rel="stylesheet",C.href=I,k="hideFocus"in C,k&&C.relList&&(k=0,C.rel="preload",C.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(A))C=b.createElement("img"),C.src=I;else if(C=b.createElement("script"),C.src=I,C.async=j===void 0?!0:j,Lt="noModule"in C,/^module!/.test(A)){if(!Lt)return d(f,"l");C.type="module"}else if(/^nomodule!/.test(A)&&Lt)return d(f,"l");C.onload=C.onerror=C.onbeforeload=function(ot){var it=ot.type[0];if(k)try{C.sheet.cssText.length||(it="e")}catch(ae){ae.code!=18&&(it="e")}if(it=="e"){if(g+=1,g<O)return u(f,d,h,g)}else if(C.rel=="preload"&&C.as=="style")return C.rel="stylesheet";d(f,it,ot.defaultPrevented)},T(f,C)!==!1&&b.head.appendChild(C)}function l(f,d,h){f=f.push?f:[f];var g=f.length,b=g,j=[],O,T;for(O=function(A,I,k){if(I=="e"&&j.push(A),I=="b")if(k)j.push(A);else return;g--,g||d(j)},T=0;T<b;T++)u(f[T],O,h)}function p(f,d,h){var g,b;if(d&&d.trim&&(g=d),b=(g?h:d)||{},g){if(g in n)throw"LoadJS";n[g]=!0}function j(O,T){l(f,function(A){c(b,A),O&&c({success:O,error:T},A),s(g,A)},b)}if(b.returnPromise)return new Promise(j);j()}return p.ready=function(d,h){return i(d,function(g){c(h,g)}),p},p.done=function(d){s(d,[])},p.reset=function(){n={},o={},a={}},p.isDefined=function(d){return d in n},p})})(pa);var nm=pa.exports;const In=Av(nm);class om{constructor(e,r){y(this,"assets");y(this,"loadStatus");y(this,"win",window);y(this,"_onSuccessList",[]);y(this,"_onErrorList",[]);this.assets=JSON.parse(JSON.stringify(e||[])),this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(){const e=this.assets||[],r=[];for(let n=0;n<e.length;n++){const o=e[n];o.id||(o.id=Z()),r.push(o.id);const a=o.resources.map(i=>i.src);a.length&&In(a,o.id,{async:!1,before:(i,s)=>(this.win.document.body.appendChild(s),!1)})}return new Promise((n,o)=>{if(e.length===0){this._onSuccessList.forEach(a=>a()),n("");return}In.ready(r,{success:()=>{this._onSuccessList.forEach(a=>a()),n("")},error:a=>{this._onErrorList.forEach(i=>i(a)),o(a)}})})}onSuccess(e){return this._onSuccessList.push(e),this}onError(e){return this._onErrorList.push(e),this}}exports.AssetLoader=om;exports.ComponentInstanceManager=ca;exports.DefaultDropPlaceholder=ua;exports.DefineReactAdapter=oa;exports.DesignRender=em;exports.ReactAdapter=Tv;exports.Render=ia;exports.canAcceptsRef=Zo;exports.collectVariable=Sv;exports.compWrapper=ta;exports.convertCodeStringToFunction=ea;exports.flatObject=jv;exports.formatSourceStylePropertyName=nr;exports.getAdapter=Ln;exports.getCSSTextValue=_v;exports.getComponentsLibs=Ov;exports.getMatchVal=ra;exports.getNodeCssClassName=le;exports.getObjFromArrayMap=rr;exports.getThirdLibs=wv;exports.isClass=bv;exports.runExpression=lt;exports.shouldConstruct=Xo;exports.useDesignRender=rm;exports.useRender=Zv;
28
+ */var Pm=S,Rm=Symbol.for("react.element"),Dm=Symbol.for("react.fragment"),Im=Object.prototype.hasOwnProperty,Lm=Pm.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,Fm={key:!0,ref:!0,__self:!0,__source:!0};function sa(t,e,r){var n,o={},a=null,i=null;r!==void 0&&(a=""+r),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(i=e.ref);for(n in e)Im.call(e,n)&&!Fm.hasOwnProperty(n)&&(o[n]=e[n]);if(t&&t.defaultProps)for(n in e=t.defaultProps,e)o[n]===void 0&&(o[n]=e[n]);return{$$typeof:Rm,type:t,key:a,ref:i,props:o,_owner:Lm.current}}Ee.Fragment=Dm;Ee.jsx=sa;Ee.jsxs=sa;aa.exports=Ee;var Bm=aa.exports;const Um=Bm.jsx,nt=t=>{const e={};return t.forEach(r=>{e[r.key]=r.value}),e},km=[...xm,...Cf],Vm=km.reduce((t,e)=>(t[e]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),S.createElement(e,{...o,...nt(n)},...a)},t),{}),zm=({children:t,width:e,height:r,$$attributes:n=[],...o})=>{let a=t;Array.isArray(t)||(a=[t]),a=a.filter(u=>u!==void 0);const{style:i={},...s}=nt(n),c={height:r,width:e,...i,...o.style||{}};return S.createElement("div",{...o,...s,style:c},...a)},Gm=({afterMount:t,beforeDestroy:e,$$attributes:r=[],...n})=>(S.useEffect(()=>(t==null||t(n),()=>{e==null||e(n)}),[]),S.createElement("canvas",{...n,...nt(r)})),Hm=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("img",{...r,...nt(e)},...n)},Wm=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("video",{...r,...nt(e)},...n)},Jm=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),S.createElement("audio",{...r,...nt(e)},...n)},Qm=({$$attributes:t=[],content:e,...r})=>S.createElement("span",{...r,...nt(t)},e),qm=({children:t,$$attributes:e=[],afterMount:r,beforeDestroy:n,...o})=>{let a=t;return Array.isArray(t)||(a=[t]),S.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),Um("div",{...o,...nt(e),children:a})},Ym=({children:t,$$attributes:e=[],htmlTag:r="div",...n})=>{let o=t;Array.isArray(t)||(o=[t]);const{style:a={},...i}=nt(e),s={...a,...n.style||{}};return S.createElement(r,{...n,...i,style:s},...o)},Km={RootContainer:({children:t})=>t,...Vm,CContainer:qm,CVideo:Wm,CAudio:Jm,CBlock:zm,CImage:Hm,CText:Qm,CCanvas:Gm,CNativeTag:Ym};class Xm{constructor(){y(this,"refMap",new Map)}get(e){return this.refMap.get(e)}add(e,r){this.refMap.set(e,r)}remove(e){this.refMap.delete(e)}destroy(){this.refMap.clear()}}class ia extends S.Component{constructor(r){super(r);y(this,"refManager");y(this,"dynamicComponentInstanceMap",new Map);y(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)});y(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if($t(r)&&Co(r)){const n=r;this.setState({pageModel:new he(n,{materials:this.state.pageModel.materialsModel.rawValue})})}});this.state={pageModel:r.pageModel||new he(r.page)},this.refManager=new Xm}getPageModel(){return this.state.pageModel}componentDidMount(){const{render:r}=this.props;r&&(r.ref.current=this)}componentWillUnmount(){this.refManager.destroy()}render(){const{props:r}=this,{adapter:n,onGetComponent:o,onComponentDestroy:a,onComponentMount:i}=r,{pageModel:s}=this.state;if(!s)return console.warn("pageModel is null"),null;const c={...Km,...r.components},u=this.props.$$context??{};return u.refs=this.refManager,n.pageRender(s,{libs:{},components:c,onGetRef:this.onGetRef,onGetComponent:o,onComponentMount:i,onComponentDestroy:a,$$context:u,renderMode:r.renderMode,processNodeConfigHook:r.processNodeConfigHook})}}const Zm=()=>{const t=S.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)}}};class tv extends S.Component{constructor(r){super(r);y(this,"onDoubleClick",()=>{this.setState({hasError:!1,error:null})});this.state={hasError:!1,error:""}}static getDerivedStateFromError(r){return{hasError:!0,error:r}}componentDidCatch(r,n){var o,a;(a=(o=this.props).onError)==null||a.call(o,n)}render(){if(this.state.hasError){const{onDoubleClick:r}=this,n=this.props.node.value;console.error(this.props.node,this.props.children);const o=S.createElement("div",{style:{backgroundColor:"rgb(255 206 215 / 13%)",padding:"5px",color:"#ff0000b0",textAlign:"center",fontSize:"12px"}},"Render error, node id: ",n.id,", node name:",n.title," component name:",n.title||n.componentName,S.createElement("p",null,"msg: ",String(this.state.error)),S.createElement("button",{onDoubleClick:r,style:{border:"1px solid rgba(100,100,100,0.1)",backgroundColor:"#fff",padding:"5px 10px",borderRadius:"2px",color:"gray",cursor:"pointer",marginTop:"5px"}},"double click to refresh"),S.createElement("div",{style:{display:"none"}}));return S.createElement(this.props.targetComponent,{onlyRenderChild:!0},o)}return this.props.children}}class ca{constructor(){y(this,"instanceMap",new Map)}get(e){return this.instanceMap.get(e)}add(e,r){const n=this.instanceMap.get(e);n?n.push(r):this.instanceMap.set(e,[r])}remove(e,r){const n=this.instanceMap.get(e);if(r!==void 0&&Array.isArray(n)){const o=n.filter(a=>a!==r);this.instanceMap.set(e,o)}else this.instanceMap.delete(e)}destroy(){this.instanceMap.clear()}}const ua=t=>{const{node:e}=t,r=S.useMemo(()=>{const s=e.isContainer();return $t(s)?s:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[t.node]),{placeholder:n,height:o,width:a,style:i}=r;return S.createElement("div",{style:{margin:0,padding:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"rgba(200,200,200,0.1)",border:"1px solid rgba(0,0,0,0.1)",borderRadius:"2px",fontSize:"14px",color:"gray",cursor:"default",width:a,height:o,...i}},n)};class ev extends S.Component{constructor(r){super(r);y(this,"instanceManager",new ca);y(this,"renderRef");y(this,"dropPlaceholder",ua);y(this,"_components",{});y(this,"onGetComponent",(r,n)=>{var c,u;const o=this;let a=r;const i=(u=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:u.wrapComponent;i&&(a=i(r,{node:n,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class s extends S.Component{constructor(){super(...arguments);y(this,"_DESIGN_BOX",!0);y(this,"_NODE_MODEL",n);y(this,"_NODE_ID",n.id);y(this,"_UNIQUE_ID",`${n.id}_${Z()}`);y(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){var j,O;const{children:f=[],onlyRenderChild:d,...h}=this.props;let g=f;if(Et(f)||(g=[f]),!!!g.filter(Boolean).length&&(n.isContainer()||n.value.componentName===At.ROOT_CONTAINER)){const T=(O=(j=n.material)==null?void 0:j.value.advanceCustom)==null?void 0:O.dropPlaceholder;g.push(S.createElement(T||o.dropPlaceholder,{node:n}))}return d?g:S.createElement(a,h,...g)}}return S.forwardRef(function(p,f){return S.createElement(tv,{node:n,targetComponent:s},S.createElement(s,{ref:f,...p}))})});this.updateComponents(this.props.components),this.renderRef=S.createRef(),r.dropPlaceholder&&(this.dropPlaceholder=r.dropPlaceholder)}updateComponents(r={}){this._components=Object.assign(this._components,r),this.forceUpdate()}componentDidMount(){var r,n;this.updateComponents(this.props.components),(n=(r=this.props).onMount)==null||n.call(r,this)}getPageModel(){var r;return(r=this.renderRef.current)==null?void 0:r.state.pageModel}rerender(r){var n;return(n=this.renderRef.current)==null?void 0:n.rerender(r)}getInstancesById(r,n){let o=[...this.instanceManager.get(r)||[]];return n!==void 0&&(o=o.filter(a=>n===(a==null?void 0:a._UNIQUE_ID))),o}getInstanceByDom(r){const n=la(r);if(!n)return null;const o=fa(n);return(o==null?void 0:o.stateNode)||null}getDomsById(r,n){const o=this.getInstancesById(r),a=[];return o==null||o.forEach(i=>{var c;if((i==null?void 0:i._STATUS)==="DESTROY")return;const s=_a.findDOMNode(i);if(s&&!(s instanceof Text))if(n){const u=Array.from(((c=s.querySelectorAll)==null?void 0:c.call(s,n))||[]);a.push(...u)}else a.push(s)}),a}getDomRectById(r,n){return this.getDomsById(r,n).map(i=>i==null?void 0:i.getBoundingClientRect()).filter(Boolean)}render(){const{props:r,onGetComponent:n}=this,{render:o,...a}=r;return o&&(o.ref.current=this),S.createElement(ia,{onGetComponent:n,...a,components:this._components,processNodeConfigHook:(i,s)=>{var h,g;if(s.nodeType!=="NODE")return i;const{props:c,condition:u}=i;let l={...c};const p=((h=s.value.configure)==null?void 0:h.devState)||{},f=(g=s.material)==null?void 0:g.value.fixedProps;if(f!==void 0){if($t(f))l={...l,...f};else if(typeof f=="function"){const b=f(l);l={...l,...b}}}let d=u;return p.condition===!1&&(d=p.condition),{props:ym(l,p.props||{}),condition:d}},ref:this.renderRef})}}const la=t=>{if(!t)return null;const e=Object.keys(t).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return e?t[e]:la(t.parentElement)},fa=t=>{var e;return t?(e=t==null?void 0:t.stateNode)!=null&&e._DESIGN_BOX?t:fa(t.return):null},rv=()=>{const t=S.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)},getInstancesById(e,r){var n;return((n=t.current)==null?void 0:n.getInstancesById(e,r))||[]},getInstanceByDom(e){var r;return((r=t.current)==null?void 0:r.getInstanceByDom(e))||null},getDomsById(e,r){var n;return((n=t.current)==null?void 0:n.getDomsById(e,r))||[]},getDomRectById(e,r){var n;return((n=t.current)==null?void 0:n.getDomRectById(e,r))||[]}}};var pa={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(Mm,function(){var r=function(){},n={},o={},a={};function i(f,d){f=f.push?f:[f];var h=[],g=f.length,b=g,j,O,T,A;for(j=function(I,k){k.length&&h.push(I),b--,b||d(h)};g--;){if(O=f[g],T=o[O],T){j(O,T);continue}A=a[O]=a[O]||[],A.push(j)}}function s(f,d){if(f){var h=a[f];if(o[f]=d,!!h)for(;h.length;)h[0](f,d),h.splice(0,1)}}function c(f,d){f.call&&(f={success:f}),d.length?(f.error||r)(d):(f.success||r)(f)}function u(f,d,h,g){var b=document,j=h.async,O=(h.numRetries||0)+1,T=h.before||r,A=f.replace(/[\?|#].*$/,""),I=f.replace(/^(css|img|module|nomodule)!/,""),k,Lt,C;if(g=g||0,/(^css!|\.css$)/.test(A))C=b.createElement("link"),C.rel="stylesheet",C.href=I,k="hideFocus"in C,k&&C.relList&&(k=0,C.rel="preload",C.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(A))C=b.createElement("img"),C.src=I;else if(C=b.createElement("script"),C.src=I,C.async=j===void 0?!0:j,Lt="noModule"in C,/^module!/.test(A)){if(!Lt)return d(f,"l");C.type="module"}else if(/^nomodule!/.test(A)&&Lt)return d(f,"l");C.onload=C.onerror=C.onbeforeload=function(ot){var it=ot.type[0];if(k)try{C.sheet.cssText.length||(it="e")}catch(ae){ae.code!=18&&(it="e")}if(it=="e"){if(g+=1,g<O)return u(f,d,h,g)}else if(C.rel=="preload"&&C.as=="style")return C.rel="stylesheet";d(f,it,ot.defaultPrevented)},T(f,C)!==!1&&b.head.appendChild(C)}function l(f,d,h){f=f.push?f:[f];var g=f.length,b=g,j=[],O,T;for(O=function(A,I,k){if(I=="e"&&j.push(A),I=="b")if(k)j.push(A);else return;g--,g||d(j)},T=0;T<b;T++)u(f[T],O,h)}function p(f,d,h){var g,b;if(d&&d.trim&&(g=d),b=(g?h:d)||{},g){if(g in n)throw"LoadJS";n[g]=!0}function j(O,T){l(f,function(A){c(b,A),O&&c({success:O,error:T},A),s(g,A)},b)}if(b.returnPromise)return new Promise(j);j()}return p.ready=function(d,h){return i(d,function(g){c(h,g)}),p},p.done=function(d){s(d,[])},p.reset=function(){n={},o={},a={}},p.isDefined=function(d){return d in n},p})})(pa);var nv=pa.exports;const In=Am(nv);class ov{constructor(e,r){y(this,"assets");y(this,"loadStatus");y(this,"win",window);y(this,"_onSuccessList",[]);y(this,"_onErrorList",[]);this.assets=JSON.parse(JSON.stringify(e||[])),this.loadStatus="INIT",r!=null&&r.window&&(this.win=r.window)}load(){const e=this.assets||[],r=[];for(let n=0;n<e.length;n++){const o=e[n];o.id||(o.id=Z()),r.push(o.id);const a=o.resources.map(i=>i.src);a.length&&In(a,o.id,{async:!1,before:(i,s)=>(this.win.document.body.appendChild(s),!1)})}return new Promise((n,o)=>{if(e.length===0){this._onSuccessList.forEach(a=>a()),n("");return}In.ready(r,{success:()=>{this._onSuccessList.forEach(a=>a()),n("")},error:a=>{this._onErrorList.forEach(i=>i(a)),o(a)}})})}onSuccess(e){return this._onSuccessList.push(e),this}onError(e){return this._onErrorList.push(e),this}}exports.AssetLoader=ov;exports.ComponentInstanceManager=ca;exports.DefaultDropPlaceholder=ua;exports.DefineReactAdapter=oa;exports.DesignRender=ev;exports.ReactAdapter=Tm;exports.Render=ia;exports.canAcceptsRef=Zo;exports.collectVariable=Sm;exports.compWrapper=ta;exports.convertCodeStringToFunction=ea;exports.flatObject=jm;exports.formatSourceStylePropertyName=nr;exports.getAdapter=Ln;exports.getCSSTextValue=_m;exports.getComponentsLibs=Om;exports.getMatchVal=ra;exports.getNodeCssClassName=le;exports.getObjFromArrayMap=rr;exports.getThirdLibs=wm;exports.isClass=bm;exports.runExpression=lt;exports.shouldConstruct=Xo;exports.useDesignRender=rv;exports.useRender=Zm;
29
29
  //# sourceMappingURL=index.js.map