@chamn/render 0.0.23 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,23 +1,23 @@
1
- "use strict";var wi=Object.defineProperty;var Ei=(t,e,r)=>e in t?wi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var O=(t,e,r)=>(Ei(t,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),Ci=require("react-dom");function Ti(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 Ri=Ti(Ci),Ni=t=>()=>{console.warn(`${t} need to be implement getComponent`)},xi=["customPageRootRender"],Nn=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],Ro=t=>[...Nn,...xi].reduce((r,n)=>{var o;return t!=null&&t[n]?r[n]=(o=t[n])==null?void 0:o.bind(t):Nn.includes(n)&&(r[n]=Ni),r},{});var Pi=Object.defineProperty,$i=(t,e,r)=>e in t?Pi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,E=(t,e,r)=>($i(t,typeof e!="symbol"?e+"":e,r),r),Ai=typeof global=="object"&&global&&global.Object===Object&&global;const No=Ai;var Mi=typeof self=="object"&&self&&self.Object===Object&&self,Di=No||Mi||Function("return this")();const pt=Di;var Ii=pt.Symbol;const it=Ii;var xo=Object.prototype,Li=xo.hasOwnProperty,Fi=xo.toString,pe=it?it.toStringTag:void 0;function ki(t){var e=Li.call(t,pe),r=t[pe];try{t[pe]=void 0;var n=!0}catch{}var o=Fi.call(t);return n&&(e?t[pe]=r:delete t[pe]),o}var Ui=Object.prototype,Bi=Ui.toString;function Vi(t){return Bi.call(t)}var Gi="[object Null]",zi="[object Undefined]",xn=it?it.toStringTag:void 0;function Dt(t){return t==null?t===void 0?zi:Gi:xn&&xn in Object(t)?ki(t):Vi(t)}function ft(t){return t!=null&&typeof t=="object"}var Wi="[object Symbol]";function Dr(t){return typeof t=="symbol"||ft(t)&&Dt(t)==Wi}function Ir(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 Hi=Array.isArray;const z=Hi;var Yi=1/0,Pn=it?it.prototype:void 0,$n=Pn?Pn.toString:void 0;function Po(t){if(typeof t=="string")return t;if(z(t))return Ir(t,Po)+"";if(Dr(t))return $n?$n.call(t):"";var e=t+"";return e=="0"&&1/t==-Yi?"-0":e}function lt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Lr(t){return t}var Ji="[object AsyncFunction]",qi="[object Function]",Qi="[object GeneratorFunction]",Ki="[object Proxy]";function Fr(t){if(!lt(t))return!1;var e=Dt(t);return e==qi||e==Qi||e==Ji||e==Ki}var Xi=pt["__core-js_shared__"];const ir=Xi;var An=function(){var t=/[^.]+$/.exec(ir&&ir.keys&&ir.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Zi(t){return!!An&&An in t}var ts=Function.prototype,es=ts.toString;function It(t){if(t!=null){try{return es.call(t)}catch{}try{return t+""}catch{}}return""}var rs=/[\\^$.*+?()[\]{}|]/g,ns=/^\[object .+?Constructor\]$/,os=Function.prototype,as=Object.prototype,is=os.toString,ss=as.hasOwnProperty,cs=RegExp("^"+is.call(ss).replace(rs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function us(t){if(!lt(t)||Zi(t))return!1;var e=Fr(t)?cs:ns;return e.test(It(t))}function ls(t,e){return t==null?void 0:t[e]}function Lt(t,e){var r=ls(t,e);return us(r)?r:void 0}var fs=Lt(pt,"WeakMap");const hr=fs;var Mn=Object.create,ps=function(){function t(){}return function(e){if(!lt(e))return{};if(Mn)return Mn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const ds=ps;function hs(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 vs(){}function $o(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var gs=800,ms=16,ys=Date.now;function bs(t){var e=0,r=0;return function(){var n=ys(),o=ms-(n-r);if(r=n,o>0){if(++e>=gs)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function _s(t){return function(){return t}}var Ss=function(){try{var t=Lt(Object,"defineProperty");return t({},"",{}),t}catch{}}();const Ue=Ss;var Os=Ue?function(t,e){return Ue(t,"toString",{configurable:!0,enumerable:!1,value:_s(e),writable:!0})}:Lr;const js=Os;var ws=bs(js);const Ao=ws;function Es(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function Cs(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 Ts(t){return t!==t}function Rs(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function Ns(t,e,r){return e===e?Rs(t,e,r):Cs(t,Ts,r)}function xs(t,e){var r=t==null?0:t.length;return!!r&&Ns(t,e,0)>-1}var Ps=9007199254740991,$s=/^(?:0|[1-9]\d*)$/;function We(t,e){var r=typeof t;return e=e??Ps,!!e&&(r=="number"||r!="symbol"&&$s.test(t))&&t>-1&&t%1==0&&t<e}function kr(t,e,r){e=="__proto__"&&Ue?Ue(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Re(t,e){return t===e||t!==t&&e!==e}var As=Object.prototype,Ms=As.hasOwnProperty;function Ur(t,e,r){var n=t[e];(!(Ms.call(t,e)&&Re(n,r))||r===void 0&&!(e in t))&&kr(t,e,r)}function ee(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=n?n(r[i],t[i],i,r,t):void 0;c===void 0&&(c=t[i]),o?kr(r,i,c):Ur(r,i,c)}return r}var Dn=Math.max;function Mo(t,e,r){return e=Dn(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Dn(n.length-e,0),s=Array(a);++o<a;)s[o]=n[e+o];o=-1;for(var i=Array(e+1);++o<e;)i[o]=n[o];return i[e]=r(s),hs(t,this,i)}}function Do(t,e){return Ao(Mo(t,e,Lr),t+"")}var Ds=9007199254740991;function Br(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ds}function He(t){return t!=null&&Br(t.length)&&!Fr(t)}function Is(t,e,r){if(!lt(r))return!1;var n=typeof e;return(n=="number"?He(r)&&We(e,r.length):n=="string"&&e in r)?Re(r[e],t):!1}function Ls(t){return Do(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,s&&Is(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var i=r[n];i&&t(e,i,n,a)}return e})}var Fs=Object.prototype;function Vr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Fs;return t===r}function ks(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Us="[object Arguments]";function In(t){return ft(t)&&Dt(t)==Us}var Io=Object.prototype,Bs=Io.hasOwnProperty,Vs=Io.propertyIsEnumerable,Gs=In(function(){return arguments}())?In:function(t){return ft(t)&&Bs.call(t,"callee")&&!Vs.call(t,"callee")};const _e=Gs;function zs(){return!1}var Lo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ln=Lo&&typeof module=="object"&&module&&!module.nodeType&&module,Ws=Ln&&Ln.exports===Lo,Fn=Ws?pt.Buffer:void 0,Hs=Fn?Fn.isBuffer:void 0,Ys=Hs||zs;const Se=Ys;var Js="[object Arguments]",qs="[object Array]",Qs="[object Boolean]",Ks="[object Date]",Xs="[object Error]",Zs="[object Function]",tc="[object Map]",ec="[object Number]",rc="[object Object]",nc="[object RegExp]",oc="[object Set]",ac="[object String]",ic="[object WeakMap]",sc="[object ArrayBuffer]",cc="[object DataView]",uc="[object Float32Array]",lc="[object Float64Array]",fc="[object Int8Array]",pc="[object Int16Array]",dc="[object Int32Array]",hc="[object Uint8Array]",vc="[object Uint8ClampedArray]",gc="[object Uint16Array]",mc="[object Uint32Array]",I={};I[uc]=I[lc]=I[fc]=I[pc]=I[dc]=I[hc]=I[vc]=I[gc]=I[mc]=!0;I[Js]=I[qs]=I[sc]=I[Qs]=I[cc]=I[Ks]=I[Xs]=I[Zs]=I[tc]=I[ec]=I[rc]=I[nc]=I[oc]=I[ac]=I[ic]=!1;function yc(t){return ft(t)&&Br(t.length)&&!!I[Dt(t)]}function Gr(t){return function(e){return t(e)}}var Fo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ge=Fo&&typeof module=="object"&&module&&!module.nodeType&&module,bc=ge&&ge.exports===Fo,sr=bc&&No.process,_c=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||sr&&sr.binding&&sr.binding("util")}catch{}}();const Yt=_c;var kn=Yt&&Yt.isTypedArray,Sc=kn?Gr(kn):yc;const zr=Sc;var Oc=Object.prototype,jc=Oc.hasOwnProperty;function ko(t,e){var r=z(t),n=!r&&_e(t),o=!r&&!n&&Se(t),a=!r&&!n&&!o&&zr(t),s=r||n||o||a,i=s?ks(t.length,String):[],c=i.length;for(var l in t)(e||jc.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||We(l,c)))&&i.push(l);return i}function Uo(t,e){return function(r){return t(e(r))}}var wc=Uo(Object.keys,Object);const Ec=wc;var Cc=Object.prototype,Tc=Cc.hasOwnProperty;function Rc(t){if(!Vr(t))return Ec(t);var e=[];for(var r in Object(t))Tc.call(t,r)&&r!="constructor"&&e.push(r);return e}function Ye(t){return He(t)?ko(t):Rc(t)}function Nc(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var xc=Object.prototype,Pc=xc.hasOwnProperty;function $c(t){if(!lt(t))return Nc(t);var e=Vr(t),r=[];for(var n in t)n=="constructor"&&(e||!Pc.call(t,n))||r.push(n);return r}function Ne(t){return He(t)?ko(t,!0):$c(t)}var Ac=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mc=/^\w*$/;function Wr(t,e){if(z(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Dr(t)?!0:Mc.test(t)||!Ac.test(t)||e!=null&&t in Object(e)}var Dc=Lt(Object,"create");const Oe=Dc;function Ic(){this.__data__=Oe?Oe(null):{},this.size=0}function Lc(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Fc="__lodash_hash_undefined__",kc=Object.prototype,Uc=kc.hasOwnProperty;function Bc(t){var e=this.__data__;if(Oe){var r=e[t];return r===Fc?void 0:r}return Uc.call(e,t)?e[t]:void 0}var Vc=Object.prototype,Gc=Vc.hasOwnProperty;function zc(t){var e=this.__data__;return Oe?e[t]!==void 0:Gc.call(e,t)}var Wc="__lodash_hash_undefined__";function Hc(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Oe&&e===void 0?Wc:e,this}function $t(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])}}$t.prototype.clear=Ic;$t.prototype.delete=Lc;$t.prototype.get=Bc;$t.prototype.has=zc;$t.prototype.set=Hc;function Yc(){this.__data__=[],this.size=0}function Je(t,e){for(var r=t.length;r--;)if(Re(t[r][0],e))return r;return-1}var Jc=Array.prototype,qc=Jc.splice;function Qc(t){var e=this.__data__,r=Je(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():qc.call(e,r,1),--this.size,!0}function Kc(t){var e=this.__data__,r=Je(e,t);return r<0?void 0:e[r][1]}function Xc(t){return Je(this.__data__,t)>-1}function Zc(t,e){var r=this.__data__,n=Je(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function mt(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])}}mt.prototype.clear=Yc;mt.prototype.delete=Qc;mt.prototype.get=Kc;mt.prototype.has=Xc;mt.prototype.set=Zc;var tu=Lt(pt,"Map");const je=tu;function eu(){this.size=0,this.__data__={hash:new $t,map:new(je||mt),string:new $t}}function ru(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qe(t,e){var r=t.__data__;return ru(e)?r[typeof e=="string"?"string":"hash"]:r.map}function nu(t){var e=qe(this,t).delete(t);return this.size-=e?1:0,e}function ou(t){return qe(this,t).get(t)}function au(t){return qe(this,t).has(t)}function iu(t,e){var r=qe(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function yt(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])}}yt.prototype.clear=eu;yt.prototype.delete=nu;yt.prototype.get=ou;yt.prototype.has=au;yt.prototype.set=iu;var su="Expected a function";function Hr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(su);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 s=t.apply(this,n);return r.cache=a.set(o,s)||a,s};return r.cache=new(Hr.Cache||yt),r}Hr.Cache=yt;var cu=500;function uu(t){var e=Hr(t,function(n){return r.size===cu&&r.clear(),n}),r=e.cache;return e}var lu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fu=/\\(\\)?/g,pu=uu(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(lu,function(r,n,o,a){e.push(o?a.replace(fu,"$1"):n||r)}),e});const du=pu;function hu(t){return t==null?"":Po(t)}function re(t,e){return z(t)?t:Wr(t,e)?[t]:du(hu(t))}var vu=1/0;function ne(t){if(typeof t=="string"||Dr(t))return t;var e=t+"";return e=="0"&&1/t==-vu?"-0":e}function Qe(t,e){e=re(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[ne(e[r++])];return r&&r==n?t:void 0}function Bo(t,e,r){var n=t==null?void 0:Qe(t,e);return n===void 0?r:n}function Yr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var Un=it?it.isConcatSpreadable:void 0;function gu(t){return z(t)||_e(t)||!!(Un&&t&&t[Un])}function Jr(t,e,r,n,o){var a=-1,s=t.length;for(r||(r=gu),o||(o=[]);++a<s;){var i=t[a];e>0&&r(i)?e>1?Jr(i,e-1,r,n,o):Yr(o,i):n||(o[o.length]=i)}return o}function mu(t){var e=t==null?0:t.length;return e?Jr(t,1):[]}function yu(t){return Ao(Mo(t,void 0,mu),t+"")}var bu=Uo(Object.getPrototypeOf,Object);const qr=bu;var _u="[object Object]",Su=Function.prototype,Ou=Object.prototype,Vo=Su.toString,ju=Ou.hasOwnProperty,wu=Vo.call(Object);function Z(t){if(!ft(t)||Dt(t)!=_u)return!1;var e=qr(t);if(e===null)return!0;var r=ju.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Vo.call(r)==wu}function Eu(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 Cu(){this.__data__=new mt,this.size=0}function Tu(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Ru(t){return this.__data__.get(t)}function Nu(t){return this.__data__.has(t)}var xu=200;function Pu(t,e){var r=this.__data__;if(r instanceof mt){var n=r.__data__;if(!je||n.length<xu-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new yt(n)}return r.set(t,e),this.size=r.size,this}function ct(t){var e=this.__data__=new mt(t);this.size=e.size}ct.prototype.clear=Cu;ct.prototype.delete=Tu;ct.prototype.get=Ru;ct.prototype.has=Nu;ct.prototype.set=Pu;function $u(t,e){return t&&ee(e,Ye(e),t)}function Au(t,e){return t&&ee(e,Ne(e),t)}var Go=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Bn=Go&&typeof module=="object"&&module&&!module.nodeType&&module,Mu=Bn&&Bn.exports===Go,Vn=Mu?pt.Buffer:void 0,Gn=Vn?Vn.allocUnsafe:void 0;function zo(t,e){if(e)return t.slice();var r=t.length,n=Gn?Gn(r):new t.constructor(r);return t.copy(n),n}function Du(t,e){for(var r=-1,n=t==null?0:t.length,o=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[o++]=s)}return a}function Wo(){return[]}var Iu=Object.prototype,Lu=Iu.propertyIsEnumerable,zn=Object.getOwnPropertySymbols,Fu=zn?function(t){return t==null?[]:(t=Object(t),Du(zn(t),function(e){return Lu.call(t,e)}))}:Wo;const Qr=Fu;function ku(t,e){return ee(t,Qr(t),e)}var Uu=Object.getOwnPropertySymbols,Bu=Uu?function(t){for(var e=[];t;)Yr(e,Qr(t)),t=qr(t);return e}:Wo;const Ho=Bu;function Vu(t,e){return ee(t,Ho(t),e)}function Yo(t,e,r){var n=e(t);return z(t)?n:Yr(n,r(t))}function vr(t){return Yo(t,Ye,Qr)}function Kr(t){return Yo(t,Ne,Ho)}var Gu=Lt(pt,"DataView");const gr=Gu;var zu=Lt(pt,"Promise");const mr=zu;var Wu=Lt(pt,"Set");const Ht=Wu;var Wn="[object Map]",Hu="[object Object]",Hn="[object Promise]",Yn="[object Set]",Jn="[object WeakMap]",qn="[object DataView]",Yu=It(gr),Ju=It(je),qu=It(mr),Qu=It(Ht),Ku=It(hr),xt=Dt;(gr&&xt(new gr(new ArrayBuffer(1)))!=qn||je&&xt(new je)!=Wn||mr&&xt(mr.resolve())!=Hn||Ht&&xt(new Ht)!=Yn||hr&&xt(new hr)!=Jn)&&(xt=function(t){var e=Dt(t),r=e==Hu?t.constructor:void 0,n=r?It(r):"";if(n)switch(n){case Yu:return qn;case Ju:return Wn;case qu:return Hn;case Qu:return Yn;case Ku:return Jn}return e});const we=xt;var Xu=Object.prototype,Zu=Xu.hasOwnProperty;function tl(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Zu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var el=pt.Uint8Array;const Be=el;function Xr(t){var e=new t.constructor(t.byteLength);return new Be(e).set(new Be(t)),e}function rl(t,e){var r=e?Xr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var nl=/\w*$/;function ol(t){var e=new t.constructor(t.source,nl.exec(t));return e.lastIndex=t.lastIndex,e}var Qn=it?it.prototype:void 0,Kn=Qn?Qn.valueOf:void 0;function al(t){return Kn?Object(Kn.call(t)):{}}function Jo(t,e){var r=e?Xr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var il="[object Boolean]",sl="[object Date]",cl="[object Map]",ul="[object Number]",ll="[object RegExp]",fl="[object Set]",pl="[object String]",dl="[object Symbol]",hl="[object ArrayBuffer]",vl="[object DataView]",gl="[object Float32Array]",ml="[object Float64Array]",yl="[object Int8Array]",bl="[object Int16Array]",_l="[object Int32Array]",Sl="[object Uint8Array]",Ol="[object Uint8ClampedArray]",jl="[object Uint16Array]",wl="[object Uint32Array]";function El(t,e,r){var n=t.constructor;switch(e){case hl:return Xr(t);case il:case sl:return new n(+t);case vl:return rl(t,r);case gl:case ml:case yl:case bl:case _l:case Sl:case Ol:case jl:case wl:return Jo(t,r);case cl:return new n;case ul:case pl:return new n(t);case ll:return ol(t);case fl:return new n;case dl:return al(t)}}function qo(t){return typeof t.constructor=="function"&&!Vr(t)?ds(qr(t)):{}}var Cl="[object Map]";function Tl(t){return ft(t)&&we(t)==Cl}var Xn=Yt&&Yt.isMap,Rl=Xn?Gr(Xn):Tl;const Nl=Rl;var xl="[object Set]";function Pl(t){return ft(t)&&we(t)==xl}var Zn=Yt&&Yt.isSet,$l=Zn?Gr(Zn):Pl;const Al=$l;var Ml=1,Dl=2,Il=4,Qo="[object Arguments]",Ll="[object Array]",Fl="[object Boolean]",kl="[object Date]",Ul="[object Error]",Ko="[object Function]",Bl="[object GeneratorFunction]",Vl="[object Map]",Gl="[object Number]",Xo="[object Object]",zl="[object RegExp]",Wl="[object Set]",Hl="[object String]",Yl="[object Symbol]",Jl="[object WeakMap]",ql="[object ArrayBuffer]",Ql="[object DataView]",Kl="[object Float32Array]",Xl="[object Float64Array]",Zl="[object Int8Array]",tf="[object Int16Array]",ef="[object Int32Array]",rf="[object Uint8Array]",nf="[object Uint8ClampedArray]",of="[object Uint16Array]",af="[object Uint32Array]",M={};M[Qo]=M[Ll]=M[ql]=M[Ql]=M[Fl]=M[kl]=M[Kl]=M[Xl]=M[Zl]=M[tf]=M[ef]=M[Vl]=M[Gl]=M[Xo]=M[zl]=M[Wl]=M[Hl]=M[Yl]=M[rf]=M[nf]=M[of]=M[af]=!0;M[Ul]=M[Ko]=M[Jl]=!1;function me(t,e,r,n,o,a){var s,i=e&Ml,c=e&Dl,l=e&Il;if(r&&(s=o?r(t,n,o,a):r(t)),s!==void 0)return s;if(!lt(t))return t;var f=z(t);if(f){if(s=tl(t),!i)return $o(t,s)}else{var d=we(t),p=d==Ko||d==Bl;if(Se(t))return zo(t,i);if(d==Xo||d==Qo||p&&!o){if(s=c||p?{}:qo(t),!i)return c?Vu(t,Au(s,t)):ku(t,$u(s,t))}else{if(!M[d])return o?t:{};s=El(t,d,i)}}a||(a=new ct);var v=a.get(t);if(v)return v;a.set(t,s),Al(t)?t.forEach(function(S){s.add(me(S,e,r,S,t,a))}):Nl(t)&&t.forEach(function(S,C){s.set(C,me(S,e,r,C,t,a))});var m=l?c?Kr:vr:c?Ne:Ye,_=f?void 0:m(t);return Es(_||t,function(S,C){_&&(C=S,S=t[C]),Ur(s,C,me(S,e,r,C,t,a))}),s}var sf=1,cf=4;function Zo(t){return me(t,sf|cf)}var uf="__lodash_hash_undefined__";function lf(t){return this.__data__.set(t,uf),this}function ff(t){return this.__data__.has(t)}function Ee(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new yt;++e<r;)this.add(t[e])}Ee.prototype.add=Ee.prototype.push=lf;Ee.prototype.has=ff;function pf(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 ta(t,e){return t.has(e)}var df=1,hf=2;function ea(t,e,r,n,o,a){var s=r&df,i=t.length,c=e.length;if(i!=c&&!(s&&c>i))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var d=-1,p=!0,v=r&hf?new Ee:void 0;for(a.set(t,e),a.set(e,t);++d<i;){var m=t[d],_=e[d];if(n)var S=s?n(_,m,d,e,t,a):n(m,_,d,t,e,a);if(S!==void 0){if(S)continue;p=!1;break}if(v){if(!pf(e,function(C,j){if(!ta(v,j)&&(m===C||o(m,C,r,n,a)))return v.push(j)})){p=!1;break}}else if(!(m===_||o(m,_,r,n,a))){p=!1;break}}return a.delete(t),a.delete(e),p}function vf(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function Zr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var gf=1,mf=2,yf="[object Boolean]",bf="[object Date]",_f="[object Error]",Sf="[object Map]",Of="[object Number]",jf="[object RegExp]",wf="[object Set]",Ef="[object String]",Cf="[object Symbol]",Tf="[object ArrayBuffer]",Rf="[object DataView]",to=it?it.prototype:void 0,cr=to?to.valueOf:void 0;function Nf(t,e,r,n,o,a,s){switch(r){case Rf:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Tf:return!(t.byteLength!=e.byteLength||!a(new Be(t),new Be(e)));case yf:case bf:case Of:return Re(+t,+e);case _f:return t.name==e.name&&t.message==e.message;case jf:case Ef:return t==e+"";case Sf:var i=vf;case wf:var c=n&gf;if(i||(i=Zr),t.size!=e.size&&!c)return!1;var l=s.get(t);if(l)return l==e;n|=mf,s.set(t,e);var f=ea(i(t),i(e),n,o,a,s);return s.delete(t),f;case Cf:if(cr)return cr.call(t)==cr.call(e)}return!1}var xf=1,Pf=Object.prototype,$f=Pf.hasOwnProperty;function Af(t,e,r,n,o,a){var s=r&xf,i=vr(t),c=i.length,l=vr(e),f=l.length;if(c!=f&&!s)return!1;for(var d=c;d--;){var p=i[d];if(!(s?p in e:$f.call(e,p)))return!1}var v=a.get(t),m=a.get(e);if(v&&m)return v==e&&m==t;var _=!0;a.set(t,e),a.set(e,t);for(var S=s;++d<c;){p=i[d];var C=t[p],j=e[p];if(n)var F=s?n(j,C,p,e,t,a):n(C,j,p,t,e,a);if(!(F===void 0?C===j||o(C,j,r,n,a):F)){_=!1;break}S||(S=p=="constructor")}if(_&&!S){var D=t.constructor,Y=e.constructor;D!=Y&&"constructor"in t&&"constructor"in e&&!(typeof D=="function"&&D instanceof D&&typeof Y=="function"&&Y instanceof Y)&&(_=!1)}return a.delete(t),a.delete(e),_}var Mf=1,eo="[object Arguments]",ro="[object Array]",Fe="[object Object]",Df=Object.prototype,no=Df.hasOwnProperty;function If(t,e,r,n,o,a){var s=z(t),i=z(e),c=s?ro:we(t),l=i?ro:we(e);c=c==eo?Fe:c,l=l==eo?Fe:l;var f=c==Fe,d=l==Fe,p=c==l;if(p&&Se(t)){if(!Se(e))return!1;s=!0,f=!1}if(p&&!f)return a||(a=new ct),s||zr(t)?ea(t,e,r,n,o,a):Nf(t,e,c,r,n,o,a);if(!(r&Mf)){var v=f&&no.call(t,"__wrapped__"),m=d&&no.call(e,"__wrapped__");if(v||m){var _=v?t.value():t,S=m?e.value():e;return a||(a=new ct),o(_,S,r,n,a)}}return p?(a||(a=new ct),Af(t,e,r,n,o,a)):!1}function tn(t,e,r,n,o){return t===e?!0:t==null||e==null||!ft(t)&&!ft(e)?t!==t&&e!==e:If(t,e,r,n,tn,o)}var Lf=1,Ff=2;function kf(t,e,r,n){var o=r.length,a=o,s=!n;if(t==null)return!a;for(t=Object(t);o--;){var i=r[o];if(s&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++o<a;){i=r[o];var c=i[0],l=t[c],f=i[1];if(s&&i[2]){if(l===void 0&&!(c in t))return!1}else{var d=new ct;if(n)var p=n(l,f,c,t,e,d);if(!(p===void 0?tn(f,l,Lf|Ff,n,d):p))return!1}}return!0}function ra(t){return t===t&&!lt(t)}function Uf(t){for(var e=Ye(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,ra(o)]}return e}function na(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function Bf(t){var e=Uf(t);return e.length==1&&e[0][2]?na(e[0][0],e[0][1]):function(r){return r===t||kf(r,t,e)}}function Vf(t,e){return t!=null&&e in Object(t)}function Gf(t,e,r){e=re(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var s=ne(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s]}return a||++n!=o?a:(o=t==null?0:t.length,!!o&&Br(o)&&We(s,o)&&(z(t)||_e(t)))}function zf(t,e){return t!=null&&Gf(t,e,Vf)}var Wf=1,Hf=2;function Yf(t,e){return Wr(t)&&ra(e)?na(ne(t),e):function(r){var n=Bo(r,t);return n===void 0&&n===e?zf(r,t):tn(e,n,Wf|Hf)}}function Jf(t){return function(e){return e==null?void 0:e[t]}}function qf(t){return function(e){return Qe(e,t)}}function Qf(t){return Wr(t)?Jf(ne(t)):qf(t)}function en(t){return typeof t=="function"?t:t==null?Lr:typeof t=="object"?z(t)?Yf(t[0],t[1]):Bf(t):Qf(t)}function Kf(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[t?i:++o];if(r(a[c],c,a)===!1)break}return e}}var Xf=Kf();const Zf=Xf;function yr(t,e,r){(r!==void 0&&!Re(t[e],r)||r===void 0&&!(e in t))&&kr(t,e,r)}function br(t){return ft(t)&&He(t)}function _r(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function tp(t){return ee(t,Ne(t))}function ep(t,e,r,n,o,a,s){var i=_r(t,r),c=_r(e,r),l=s.get(c);if(l){yr(t,r,l);return}var f=a?a(i,c,r+"",t,e,s):void 0,d=f===void 0;if(d){var p=z(c),v=!p&&Se(c),m=!p&&!v&&zr(c);f=c,p||v||m?z(i)?f=i:br(i)?f=$o(i):v?(d=!1,f=zo(c,!0)):m?(d=!1,f=Jo(c,!0)):f=[]:Z(c)||_e(c)?(f=i,_e(i)?f=tp(i):(!lt(i)||Fr(i))&&(f=qo(c))):d=!1}d&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),yr(t,r,f)}function oa(t,e,r,n,o){t!==e&&Zf(e,function(a,s){if(o||(o=new ct),lt(a))ep(t,e,s,r,oa,n,o);else{var i=n?n(_r(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),yr(t,s,i)}},Ne)}function rp(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 aa(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function np(t,e){return e.length<2?t:Qe(t,Eu(e,0,-1))}var op=Ls(function(t,e,r){oa(t,e,r)});const ia=op;var ap="Expected a function";function ip(t){if(typeof t!="function")throw new TypeError(ap);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 sp(t,e){return e=re(e,t),t=np(t,e),t==null||delete t[ne(aa(e))]}function cp(t){return Z(t)?void 0:t}var up=1,lp=2,fp=4,pp=yu(function(t,e){var r={};if(t==null)return r;var n=!1;e=Ir(e,function(a){return a=re(a,t),n||(n=a.length>1),a}),ee(t,Kr(t),r),n&&(r=me(r,up|lp|fp,cp));for(var o=e.length;o--;)sp(r,e[o]);return r});const sa=pp;function dp(t,e,r,n){if(!lt(t))return t;e=re(e,t);for(var o=-1,a=e.length,s=a-1,i=t;i!=null&&++o<a;){var c=ne(e[o]),l=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var f=i[c];l=n?n(f,c,i):void 0,l===void 0&&(l=lt(f)?f:We(e[o+1])?[]:{})}Ur(i,c,l),i=i[c]}return t}function hp(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var s=e[n],i=Qe(t,s);r(i,s)&&dp(a,re(s,t),i)}return a}function vp(t,e){if(t==null)return{};var r=Ir(Kr(t),function(n){return[n]});return e=en(e),hp(t,r,function(n,o){return e(n,o[0])})}function gp(t,e){return vp(t,ip(en(e)))}var mp=1/0,yp=Ht&&1/Zr(new Ht([,-0]))[1]==mp?function(t){return new Ht(t)}:vs;const bp=yp;var _p=200;function Sp(t,e,r){var n=-1,o=xs,a=t.length,s=!0,i=[],c=i;if(r)s=!1,o=rp;else if(a>=_p){var l=e?null:bp(t);if(l)return Zr(l);s=!1,o=ta,c=new Ee}else c=e?[]:i;t:for(;++n<a;){var f=t[n],d=e?e(f):f;if(f=r||f!==0?f:0,s&&d===d){for(var p=c.length;p--;)if(c[p]===d)continue t;e&&c.push(d),i.push(f)}else o(c,d,r)||(c!==i&&c.push(d),i.push(f))}return i}var Op=Do(function(t){var e=aa(t);return br(e)&&(e=void 0),Sp(Jr(t,1,br,!0),en(e))});const jp=Op;class ca extends TypeError{constructor(e,r){let n;const{message:o,...a}=e,{path:s}=e,i=s.length===0?o:"At path: "+s.join(".")+" -- "+o;super(i),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 wp(t){return ut(t)&&typeof t[Symbol.iterator]=="function"}function ut(t){return typeof t=="object"&&t!=null}function rt(t){return typeof t=="string"?JSON.stringify(t):""+t}function Ep(t){const{done:e,value:r}=t.next();return e?void 0:r}function Cp(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:o,branch:a}=e,{type:s}=r,{refinement:i,message:c="Expected a value of type `"+s+"`"+(i?" with refinement `"+i+"`":"")+", but received: `"+rt(n)+"`"}=t;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*oo(t,e,r,n){wp(t)||(t=[t]);for(const o of t){const a=Cp(o,e,r,n);a&&(yield a)}}function*rn(t,e,r){r===void 0&&(r={});const{path:n=[],branch:o=[t],coerce:a=!1,mask:s=!1}=r,i={path:n,branch:o};if(a&&(t=e.coercer(t,i),s&&e.type!=="type"&&ut(e.schema)&&ut(t)&&!Array.isArray(t)))for(const l in t)e.schema[l]===void 0&&delete t[l];let c="valid";for(const l of e.validator(t,i))c="not_valid",yield[l,void 0];for(let[l,f,d]of e.entries(t,i)){const p=rn(f,d,{path:l===void 0?n:[...n,l],branch:l===void 0?o:[...o,f],coerce:a,mask:s});for(const v of p)v[0]?(c=v[0].refinement!=null?"not_refined":"not_valid",yield[v[0],void 0]):a&&(f=v[1],l===void 0?t=f:t instanceof Map?t.set(l,f):t instanceof Set?t.add(f):ut(t)&&(t[l]=f))}if(c!=="not_valid")for(const l of e.refiner(t,i))c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,t])}class dt{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:s=c=>c,entries:i=function*(){}}=e;this.type=r,this.schema=n,this.entries=i,this.coercer=s,o?this.validator=(c,l)=>{const f=o(c,l);return oo(f,l,this,c)}:this.validator=()=>[],a?this.refiner=(c,l)=>{const f=a(c,l);return oo(f,l,this,c)}:this.refiner=()=>[]}assert(e){return ua(e,this)}create(e){return Tp(e,this)}is(e){return Np(e,this)}mask(e){return Rp(e,this)}validate(e,r){return r===void 0&&(r={}),oe(e,this,r)}}function ua(t,e){const r=oe(t,e);if(r[0])throw r[0]}function Tp(t,e){const r=oe(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function Rp(t,e){const r=oe(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function Np(t,e){return!oe(t,e)[0]}function oe(t,e,r){r===void 0&&(r={});const n=rn(t,e,r),o=Ep(n);return o[0]?[new ca(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function nn(){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(s=>s.schema),a=Object.assign({},...o);return n?da(a):$(a)}function Et(t,e){return new dt({type:t,schema:null,validator:e})}function Jt(t){return new dt({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 la(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return da(n);default:return $(n)}}function G(){return Et("any",()=>!0)}function B(t){return new dt({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: "+rt(e)}})}function qt(){return Et("boolean",t=>typeof t=="boolean")}function Sr(t){const e={},r=t.map(n=>rt(n)).join();for(const n of t)e[n]=n;return new dt({type:"enums",schema:e,validator(n){return t.includes(n)||"Expected one of `"+r+"`, but received: "+rt(n)}})}function fa(){return Et("func",t=>typeof t=="function"||"Expected a function, but received: "+rt(t))}function K(t){const e=rt(t),r=typeof t;return new dt({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||"Expected the literal `"+e+"`, but received: "+rt(n)}})}function xp(){return Et("never",()=>!1)}function pa(){return Et("number",t=>typeof t=="number"&&!isNaN(t)||"Expected a number, but received: "+rt(t))}function $(t){const e=t?Object.keys(t):[],r=xp();return new dt({type:"object",schema:t||null,*entries(n){if(t&&ut(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 ut(n)||"Expected an object, but received: "+rt(n)},coercer(n){return ut(n)?{...n}:n}})}function b(t){return new dt({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function ye(t,e){return new dt({type:"record",schema:null,*entries(r){if(ut(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return ut(r)||"Expected an object, but received: "+rt(r)}})}function y(){return Et("string",t=>typeof t=="string"||"Expected a string, but received: "+rt(t))}function da(t){const e=Object.keys(t);return new dt({type:"type",schema:t,*entries(r){if(ut(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return ut(r)||"Expected an object, but received: "+rt(r)}})}function X(t){const e=t.map(r=>r.type).join(" | ");return new dt({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||Pp()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...s]=rn(r,a,n),[i]=s;if(i[0])for(const[c]of s)c&&o.push(c);else return[]}return["Expected the value to satisfy a union of `"+e+"`, but received: "+rt(r),...o]}})}function Pp(){return Et("unknown",()=>!0)}const on=$({package:y(),version:y(),name:y(),exportName:b(y()),destructuring:b(qt()),subName:b(y()),main:b(y()),cssPaths:b(B(y()))}),$p=B(on),Ap=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var at=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t))(at||{}),an=(t=>(t.DESIGN="design",t.SAVE="save",t))(an||{}),Or=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(Or||{});const Mp=()=>Et("normalObj",t=>!Z(t)||[at.SLOT,at.EXPRESSION,at.FUNCTION].includes(t==null?void 0:t.type)?!1:(oe(t,ye(y(),sn)),!0)),sn=X([y(),pa(),qt(),$({type:K(at.SLOT),renderType:Sr([Or.FUNC,Or.COMP]),params:b(B(y())),value:Jt(()=>X([Qt,B(Qt)]))}),$({type:K(at.EXPRESSION),value:y()}),$({type:K(at.FUNCTION),value:y()}),Mp(),B(Jt(()=>sn))]),ao=$({type:K(at.EXPRESSION),value:y()}),Qt=$({id:b(y()),title:b(y()),componentName:y(),props:b(ye(y(),sn)),nodeName:b(y()),state:b(ye(y(),G())),children:Jt(()=>b(B(X([y(),Qt])))),configure:b(G()),css:b(G()),style:b(G()),classNames:b(B(G())),refId:b(y()),extra:b(ye(G(),G())),condition:b(X([qt(),ao])),loop:b($({open:qt(),data:X([B(G()),ao]),args:b(B(y())),forName:b(y()),forIndex:b(y()),key:b(G()),name:b(y())})),methods:b(B(G()))}),Ve=X([y(),$({label:y(),tip:b(y())})]),Dp=$({type:K("shape"),value:B($({name:y(),title:Ve,valueType:Jt(()=>Ke)}))}),Ip=$({type:K("enums"),value:B(y())});$({type:K("array"),value:Jt(()=>Ke)});const Lp=$({type:K("array"),value:Jt(()=>B(Ke))}),Ke=X([Sr(["array","boolean","number","object","string"]),Sr(["component","expression","function"]),Dp,Ip,Lp]),Fp=X([y(),$({componentName:y(),props:b(G()),initialValue:b(G()),component:b(G())})]),ur=$({name:y(),title:Ve,valueType:Ke,description:b(y()),defaultValue:G(),setters:b(B(Fp)),condition:b(fa())});X([y(),fa()]);var jr=(t=>(t.SINGLE="single",t.GROUP="group",t))(jr||{});X([y(),$({name:y(),describe:b(y()),params:b($({name:y(),description:y()})),template:y()})]);const kp=$({id:b(y()),title:y(),snapshot:X([y(),G()]),snapshotText:b(y()),description:b(y()),tags:b(B(y())),groupName:b(y()),category:b(y()),schema:nn(la(Qt,["id"]),$({componentName:b(y())}))}),Up=$({componentName:y(),title:y(),screenshot:b(y()),icon:b(y()),tags:b(B(y())),groupName:b(y()),category:b(y()),priority:b(pa()),npm:b(on),snippets:B(kp),props:B(X([ur,$({title:b(Ve),type:K("single"),content:ur}),$({title:b(Ve),type:K("group"),content:B(ur)})])),fixedProps:b(G()),isContainer:b(X([qt(),$({placeholder:y(),width:y(),height:y()})])),disableEditorDragDom:b(G()),isLayout:b(qt()),rootSelector:b(y()),advanceCustom:b(G()),extra:b(ye(G(),G()))}),Bp=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 Ei=Object.defineProperty;var wi=(t,e,r)=>e in t?Ei(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var O=(t,e,r)=>(wi(t,typeof e!="symbol"?e+"":e,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("react"),Ci=require("react-dom");function Ti(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 $i=Ti(Ci),Ri=t=>()=>{console.warn(`${t} need to be implement getComponent`)},Ni=["customPageRootRender"],Rn=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],$o=t=>[...Rn,...Ni].reduce((r,n)=>{var o;return t!=null&&t[n]?r[n]=(o=t[n])==null?void 0:o.bind(t):Rn.includes(n)&&(r[n]=Ri),r},{});var xi=Object.defineProperty,Pi=(t,e,r)=>e in t?xi(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,w=(t,e,r)=>(Pi(t,typeof e!="symbol"?e+"":e,r),r),Ai=typeof global=="object"&&global&&global.Object===Object&&global;const Ro=Ai;var Mi=typeof self=="object"&&self&&self.Object===Object&&self,Di=Ro||Mi||Function("return this")();const dt=Di;var Ii=dt.Symbol;const it=Ii;var No=Object.prototype,Li=No.hasOwnProperty,Fi=No.toString,de=it?it.toStringTag:void 0;function ki(t){var e=Li.call(t,de),r=t[de];try{t[de]=void 0;var n=!0}catch{}var o=Fi.call(t);return n&&(e?t[de]=r:delete t[de]),o}var Ui=Object.prototype,Bi=Ui.toString;function Vi(t){return Bi.call(t)}var zi="[object Null]",Gi="[object Undefined]",Nn=it?it.toStringTag:void 0;function Dt(t){return t==null?t===void 0?Gi:zi:Nn&&Nn in Object(t)?ki(t):Vi(t)}function ft(t){return t!=null&&typeof t=="object"}var Wi="[object Symbol]";function Dr(t){return typeof t=="symbol"||ft(t)&&Dt(t)==Wi}function Ir(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 Hi=Array.isArray;const G=Hi;var Yi=1/0,xn=it?it.prototype:void 0,Pn=xn?xn.toString:void 0;function xo(t){if(typeof t=="string")return t;if(G(t))return Ir(t,xo)+"";if(Dr(t))return Pn?Pn.call(t):"";var e=t+"";return e=="0"&&1/t==-Yi?"-0":e}function lt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Lr(t){return t}var Ji="[object AsyncFunction]",qi="[object Function]",Qi="[object GeneratorFunction]",Ki="[object Proxy]";function Fr(t){if(!lt(t))return!1;var e=Dt(t);return e==qi||e==Qi||e==Ji||e==Ki}var Xi=dt["__core-js_shared__"];const ir=Xi;var An=function(){var t=/[^.]+$/.exec(ir&&ir.keys&&ir.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Zi(t){return!!An&&An in t}var ts=Function.prototype,es=ts.toString;function It(t){if(t!=null){try{return es.call(t)}catch{}try{return t+""}catch{}}return""}var rs=/[\\^$.*+?()[\]{}|]/g,ns=/^\[object .+?Constructor\]$/,os=Function.prototype,as=Object.prototype,is=os.toString,ss=as.hasOwnProperty,cs=RegExp("^"+is.call(ss).replace(rs,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function us(t){if(!lt(t)||Zi(t))return!1;var e=Fr(t)?cs:ns;return e.test(It(t))}function ls(t,e){return t==null?void 0:t[e]}function Lt(t,e){var r=ls(t,e);return us(r)?r:void 0}var fs=Lt(dt,"WeakMap");const hr=fs;var Mn=Object.create,ds=function(){function t(){}return function(e){if(!lt(e))return{};if(Mn)return Mn(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const ps=ds;function hs(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 vs(){}function Po(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var gs=800,ms=16,ys=Date.now;function bs(t){var e=0,r=0;return function(){var n=ys(),o=ms-(n-r);if(r=n,o>0){if(++e>=gs)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function _s(t){return function(){return t}}var Ss=function(){try{var t=Lt(Object,"defineProperty");return t({},"",{}),t}catch{}}();const Ue=Ss;var Os=Ue?function(t,e){return Ue(t,"toString",{configurable:!0,enumerable:!1,value:_s(e),writable:!0})}:Lr;const js=Os;var Es=bs(js);const Ao=Es;function ws(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function Cs(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 Ts(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 Rs(t,e,r){return e===e?$s(t,e,r):Cs(t,Ts,r)}function Ns(t,e){var r=t==null?0:t.length;return!!r&&Rs(t,e,0)>-1}var xs=9007199254740991,Ps=/^(?:0|[1-9]\d*)$/;function We(t,e){var r=typeof t;return e=e??xs,!!e&&(r=="number"||r!="symbol"&&Ps.test(t))&&t>-1&&t%1==0&&t<e}function kr(t,e,r){e=="__proto__"&&Ue?Ue(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function $e(t,e){return t===e||t!==t&&e!==e}var As=Object.prototype,Ms=As.hasOwnProperty;function Ur(t,e,r){var n=t[e];(!(Ms.call(t,e)&&$e(n,r))||r===void 0&&!(e in t))&&kr(t,e,r)}function ee(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=n?n(r[i],t[i],i,r,t):void 0;c===void 0&&(c=t[i]),o?kr(r,i,c):Ur(r,i,c)}return r}var Dn=Math.max;function Mo(t,e,r){return e=Dn(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Dn(n.length-e,0),s=Array(a);++o<a;)s[o]=n[e+o];o=-1;for(var i=Array(e+1);++o<e;)i[o]=n[o];return i[e]=r(s),hs(t,this,i)}}function Do(t,e){return Ao(Mo(t,e,Lr),t+"")}var Ds=9007199254740991;function Br(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Ds}function He(t){return t!=null&&Br(t.length)&&!Fr(t)}function Is(t,e,r){if(!lt(r))return!1;var n=typeof e;return(n=="number"?He(r)&&We(e,r.length):n=="string"&&e in r)?$e(r[e],t):!1}function Ls(t){return Do(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,s&&Is(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var i=r[n];i&&t(e,i,n,a)}return e})}var Fs=Object.prototype;function Vr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Fs;return t===r}function ks(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Us="[object Arguments]";function In(t){return ft(t)&&Dt(t)==Us}var Io=Object.prototype,Bs=Io.hasOwnProperty,Vs=Io.propertyIsEnumerable,zs=In(function(){return arguments}())?In:function(t){return ft(t)&&Bs.call(t,"callee")&&!Vs.call(t,"callee")};const _e=zs;function Gs(){return!1}var Lo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Ln=Lo&&typeof module=="object"&&module&&!module.nodeType&&module,Ws=Ln&&Ln.exports===Lo,Fn=Ws?dt.Buffer:void 0,Hs=Fn?Fn.isBuffer:void 0,Ys=Hs||Gs;const Se=Ys;var Js="[object Arguments]",qs="[object Array]",Qs="[object Boolean]",Ks="[object Date]",Xs="[object Error]",Zs="[object Function]",tc="[object Map]",ec="[object Number]",rc="[object Object]",nc="[object RegExp]",oc="[object Set]",ac="[object String]",ic="[object WeakMap]",sc="[object ArrayBuffer]",cc="[object DataView]",uc="[object Float32Array]",lc="[object Float64Array]",fc="[object Int8Array]",dc="[object Int16Array]",pc="[object Int32Array]",hc="[object Uint8Array]",vc="[object Uint8ClampedArray]",gc="[object Uint16Array]",mc="[object Uint32Array]",I={};I[uc]=I[lc]=I[fc]=I[dc]=I[pc]=I[hc]=I[vc]=I[gc]=I[mc]=!0;I[Js]=I[qs]=I[sc]=I[Qs]=I[cc]=I[Ks]=I[Xs]=I[Zs]=I[tc]=I[ec]=I[rc]=I[nc]=I[oc]=I[ac]=I[ic]=!1;function yc(t){return ft(t)&&Br(t.length)&&!!I[Dt(t)]}function zr(t){return function(e){return t(e)}}var Fo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ge=Fo&&typeof module=="object"&&module&&!module.nodeType&&module,bc=ge&&ge.exports===Fo,sr=bc&&Ro.process,_c=function(){try{var t=ge&&ge.require&&ge.require("util").types;return t||sr&&sr.binding&&sr.binding("util")}catch{}}();const Yt=_c;var kn=Yt&&Yt.isTypedArray,Sc=kn?zr(kn):yc;const Gr=Sc;var Oc=Object.prototype,jc=Oc.hasOwnProperty;function ko(t,e){var r=G(t),n=!r&&_e(t),o=!r&&!n&&Se(t),a=!r&&!n&&!o&&Gr(t),s=r||n||o||a,i=s?ks(t.length,String):[],c=i.length;for(var l in t)(e||jc.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||We(l,c)))&&i.push(l);return i}function Uo(t,e){return function(r){return t(e(r))}}var Ec=Uo(Object.keys,Object);const wc=Ec;var Cc=Object.prototype,Tc=Cc.hasOwnProperty;function $c(t){if(!Vr(t))return wc(t);var e=[];for(var r in Object(t))Tc.call(t,r)&&r!="constructor"&&e.push(r);return e}function Ye(t){return He(t)?ko(t):$c(t)}function Rc(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Nc=Object.prototype,xc=Nc.hasOwnProperty;function Pc(t){if(!lt(t))return Rc(t);var e=Vr(t),r=[];for(var n in t)n=="constructor"&&(e||!xc.call(t,n))||r.push(n);return r}function Re(t){return He(t)?ko(t,!0):Pc(t)}var Ac=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Mc=/^\w*$/;function Wr(t,e){if(G(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Dr(t)?!0:Mc.test(t)||!Ac.test(t)||e!=null&&t in Object(e)}var Dc=Lt(Object,"create");const Oe=Dc;function Ic(){this.__data__=Oe?Oe(null):{},this.size=0}function Lc(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Fc="__lodash_hash_undefined__",kc=Object.prototype,Uc=kc.hasOwnProperty;function Bc(t){var e=this.__data__;if(Oe){var r=e[t];return r===Fc?void 0:r}return Uc.call(e,t)?e[t]:void 0}var Vc=Object.prototype,zc=Vc.hasOwnProperty;function Gc(t){var e=this.__data__;return Oe?e[t]!==void 0:zc.call(e,t)}var Wc="__lodash_hash_undefined__";function Hc(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Oe&&e===void 0?Wc:e,this}function Pt(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])}}Pt.prototype.clear=Ic;Pt.prototype.delete=Lc;Pt.prototype.get=Bc;Pt.prototype.has=Gc;Pt.prototype.set=Hc;function Yc(){this.__data__=[],this.size=0}function Je(t,e){for(var r=t.length;r--;)if($e(t[r][0],e))return r;return-1}var Jc=Array.prototype,qc=Jc.splice;function Qc(t){var e=this.__data__,r=Je(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():qc.call(e,r,1),--this.size,!0}function Kc(t){var e=this.__data__,r=Je(e,t);return r<0?void 0:e[r][1]}function Xc(t){return Je(this.__data__,t)>-1}function Zc(t,e){var r=this.__data__,n=Je(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function mt(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])}}mt.prototype.clear=Yc;mt.prototype.delete=Qc;mt.prototype.get=Kc;mt.prototype.has=Xc;mt.prototype.set=Zc;var tu=Lt(dt,"Map");const je=tu;function eu(){this.size=0,this.__data__={hash:new Pt,map:new(je||mt),string:new Pt}}function ru(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function qe(t,e){var r=t.__data__;return ru(e)?r[typeof e=="string"?"string":"hash"]:r.map}function nu(t){var e=qe(this,t).delete(t);return this.size-=e?1:0,e}function ou(t){return qe(this,t).get(t)}function au(t){return qe(this,t).has(t)}function iu(t,e){var r=qe(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function yt(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])}}yt.prototype.clear=eu;yt.prototype.delete=nu;yt.prototype.get=ou;yt.prototype.has=au;yt.prototype.set=iu;var su="Expected a function";function Hr(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(su);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 s=t.apply(this,n);return r.cache=a.set(o,s)||a,s};return r.cache=new(Hr.Cache||yt),r}Hr.Cache=yt;var cu=500;function uu(t){var e=Hr(t,function(n){return r.size===cu&&r.clear(),n}),r=e.cache;return e}var lu=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fu=/\\(\\)?/g,du=uu(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(lu,function(r,n,o,a){e.push(o?a.replace(fu,"$1"):n||r)}),e});const pu=du;function hu(t){return t==null?"":xo(t)}function re(t,e){return G(t)?t:Wr(t,e)?[t]:pu(hu(t))}var vu=1/0;function ne(t){if(typeof t=="string"||Dr(t))return t;var e=t+"";return e=="0"&&1/t==-vu?"-0":e}function Qe(t,e){e=re(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[ne(e[r++])];return r&&r==n?t:void 0}function Bo(t,e,r){var n=t==null?void 0:Qe(t,e);return n===void 0?r:n}function Yr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var Un=it?it.isConcatSpreadable:void 0;function gu(t){return G(t)||_e(t)||!!(Un&&t&&t[Un])}function Jr(t,e,r,n,o){var a=-1,s=t.length;for(r||(r=gu),o||(o=[]);++a<s;){var i=t[a];e>0&&r(i)?e>1?Jr(i,e-1,r,n,o):Yr(o,i):n||(o[o.length]=i)}return o}function mu(t){var e=t==null?0:t.length;return e?Jr(t,1):[]}function yu(t){return Ao(Mo(t,void 0,mu),t+"")}var bu=Uo(Object.getPrototypeOf,Object);const qr=bu;var _u="[object Object]",Su=Function.prototype,Ou=Object.prototype,Vo=Su.toString,ju=Ou.hasOwnProperty,Eu=Vo.call(Object);function Z(t){if(!ft(t)||Dt(t)!=_u)return!1;var e=qr(t);if(e===null)return!0;var r=ju.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Vo.call(r)==Eu}function wu(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 Cu(){this.__data__=new mt,this.size=0}function Tu(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function $u(t){return this.__data__.get(t)}function Ru(t){return this.__data__.has(t)}var Nu=200;function xu(t,e){var r=this.__data__;if(r instanceof mt){var n=r.__data__;if(!je||n.length<Nu-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new yt(n)}return r.set(t,e),this.size=r.size,this}function ct(t){var e=this.__data__=new mt(t);this.size=e.size}ct.prototype.clear=Cu;ct.prototype.delete=Tu;ct.prototype.get=$u;ct.prototype.has=Ru;ct.prototype.set=xu;function Pu(t,e){return t&&ee(e,Ye(e),t)}function Au(t,e){return t&&ee(e,Re(e),t)}var zo=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Bn=zo&&typeof module=="object"&&module&&!module.nodeType&&module,Mu=Bn&&Bn.exports===zo,Vn=Mu?dt.Buffer:void 0,zn=Vn?Vn.allocUnsafe:void 0;function Go(t,e){if(e)return t.slice();var r=t.length,n=zn?zn(r):new t.constructor(r);return t.copy(n),n}function Du(t,e){for(var r=-1,n=t==null?0:t.length,o=0,a=[];++r<n;){var s=t[r];e(s,r,t)&&(a[o++]=s)}return a}function Wo(){return[]}var Iu=Object.prototype,Lu=Iu.propertyIsEnumerable,Gn=Object.getOwnPropertySymbols,Fu=Gn?function(t){return t==null?[]:(t=Object(t),Du(Gn(t),function(e){return Lu.call(t,e)}))}:Wo;const Qr=Fu;function ku(t,e){return ee(t,Qr(t),e)}var Uu=Object.getOwnPropertySymbols,Bu=Uu?function(t){for(var e=[];t;)Yr(e,Qr(t)),t=qr(t);return e}:Wo;const Ho=Bu;function Vu(t,e){return ee(t,Ho(t),e)}function Yo(t,e,r){var n=e(t);return G(t)?n:Yr(n,r(t))}function vr(t){return Yo(t,Ye,Qr)}function Kr(t){return Yo(t,Re,Ho)}var zu=Lt(dt,"DataView");const gr=zu;var Gu=Lt(dt,"Promise");const mr=Gu;var Wu=Lt(dt,"Set");const Ht=Wu;var Wn="[object Map]",Hu="[object Object]",Hn="[object Promise]",Yn="[object Set]",Jn="[object WeakMap]",qn="[object DataView]",Yu=It(gr),Ju=It(je),qu=It(mr),Qu=It(Ht),Ku=It(hr),Nt=Dt;(gr&&Nt(new gr(new ArrayBuffer(1)))!=qn||je&&Nt(new je)!=Wn||mr&&Nt(mr.resolve())!=Hn||Ht&&Nt(new Ht)!=Yn||hr&&Nt(new hr)!=Jn)&&(Nt=function(t){var e=Dt(t),r=e==Hu?t.constructor:void 0,n=r?It(r):"";if(n)switch(n){case Yu:return qn;case Ju:return Wn;case qu:return Hn;case Qu:return Yn;case Ku:return Jn}return e});const Ee=Nt;var Xu=Object.prototype,Zu=Xu.hasOwnProperty;function tl(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Zu.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var el=dt.Uint8Array;const Be=el;function Xr(t){var e=new t.constructor(t.byteLength);return new Be(e).set(new Be(t)),e}function rl(t,e){var r=e?Xr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var nl=/\w*$/;function ol(t){var e=new t.constructor(t.source,nl.exec(t));return e.lastIndex=t.lastIndex,e}var Qn=it?it.prototype:void 0,Kn=Qn?Qn.valueOf:void 0;function al(t){return Kn?Object(Kn.call(t)):{}}function Jo(t,e){var r=e?Xr(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var il="[object Boolean]",sl="[object Date]",cl="[object Map]",ul="[object Number]",ll="[object RegExp]",fl="[object Set]",dl="[object String]",pl="[object Symbol]",hl="[object ArrayBuffer]",vl="[object DataView]",gl="[object Float32Array]",ml="[object Float64Array]",yl="[object Int8Array]",bl="[object Int16Array]",_l="[object Int32Array]",Sl="[object Uint8Array]",Ol="[object Uint8ClampedArray]",jl="[object Uint16Array]",El="[object Uint32Array]";function wl(t,e,r){var n=t.constructor;switch(e){case hl:return Xr(t);case il:case sl:return new n(+t);case vl:return rl(t,r);case gl:case ml:case yl:case bl:case _l:case Sl:case Ol:case jl:case El:return Jo(t,r);case cl:return new n;case ul:case dl:return new n(t);case ll:return ol(t);case fl:return new n;case pl:return al(t)}}function qo(t){return typeof t.constructor=="function"&&!Vr(t)?ps(qr(t)):{}}var Cl="[object Map]";function Tl(t){return ft(t)&&Ee(t)==Cl}var Xn=Yt&&Yt.isMap,$l=Xn?zr(Xn):Tl;const Rl=$l;var Nl="[object Set]";function xl(t){return ft(t)&&Ee(t)==Nl}var Zn=Yt&&Yt.isSet,Pl=Zn?zr(Zn):xl;const Al=Pl;var Ml=1,Dl=2,Il=4,Qo="[object Arguments]",Ll="[object Array]",Fl="[object Boolean]",kl="[object Date]",Ul="[object Error]",Ko="[object Function]",Bl="[object GeneratorFunction]",Vl="[object Map]",zl="[object Number]",Xo="[object Object]",Gl="[object RegExp]",Wl="[object Set]",Hl="[object String]",Yl="[object Symbol]",Jl="[object WeakMap]",ql="[object ArrayBuffer]",Ql="[object DataView]",Kl="[object Float32Array]",Xl="[object Float64Array]",Zl="[object Int8Array]",tf="[object Int16Array]",ef="[object Int32Array]",rf="[object Uint8Array]",nf="[object Uint8ClampedArray]",of="[object Uint16Array]",af="[object Uint32Array]",M={};M[Qo]=M[Ll]=M[ql]=M[Ql]=M[Fl]=M[kl]=M[Kl]=M[Xl]=M[Zl]=M[tf]=M[ef]=M[Vl]=M[zl]=M[Xo]=M[Gl]=M[Wl]=M[Hl]=M[Yl]=M[rf]=M[nf]=M[of]=M[af]=!0;M[Ul]=M[Ko]=M[Jl]=!1;function me(t,e,r,n,o,a){var s,i=e&Ml,c=e&Dl,l=e&Il;if(r&&(s=o?r(t,n,o,a):r(t)),s!==void 0)return s;if(!lt(t))return t;var f=G(t);if(f){if(s=tl(t),!i)return Po(t,s)}else{var p=Ee(t),d=p==Ko||p==Bl;if(Se(t))return Go(t,i);if(p==Xo||p==Qo||d&&!o){if(s=c||d?{}:qo(t),!i)return c?Vu(t,Au(s,t)):ku(t,Pu(s,t))}else{if(!M[p])return o?t:{};s=wl(t,p,i)}}a||(a=new ct);var v=a.get(t);if(v)return v;a.set(t,s),Al(t)?t.forEach(function(S){s.add(me(S,e,r,S,t,a))}):Rl(t)&&t.forEach(function(S,C){s.set(C,me(S,e,r,C,t,a))});var m=l?c?Kr:vr:c?Re:Ye,_=f?void 0:m(t);return ws(_||t,function(S,C){_&&(C=S,S=t[C]),Ur(s,C,me(S,e,r,C,t,a))}),s}var sf=1,cf=4;function Zo(t){return me(t,sf|cf)}var uf="__lodash_hash_undefined__";function lf(t){return this.__data__.set(t,uf),this}function ff(t){return this.__data__.has(t)}function we(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new yt;++e<r;)this.add(t[e])}we.prototype.add=we.prototype.push=lf;we.prototype.has=ff;function df(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 ta(t,e){return t.has(e)}var pf=1,hf=2;function ea(t,e,r,n,o,a){var s=r&pf,i=t.length,c=e.length;if(i!=c&&!(s&&c>i))return!1;var l=a.get(t),f=a.get(e);if(l&&f)return l==e&&f==t;var p=-1,d=!0,v=r&hf?new we:void 0;for(a.set(t,e),a.set(e,t);++p<i;){var m=t[p],_=e[p];if(n)var S=s?n(_,m,p,e,t,a):n(m,_,p,t,e,a);if(S!==void 0){if(S)continue;d=!1;break}if(v){if(!df(e,function(C,j){if(!ta(v,j)&&(m===C||o(m,C,r,n,a)))return v.push(j)})){d=!1;break}}else if(!(m===_||o(m,_,r,n,a))){d=!1;break}}return a.delete(t),a.delete(e),d}function vf(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function Zr(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var gf=1,mf=2,yf="[object Boolean]",bf="[object Date]",_f="[object Error]",Sf="[object Map]",Of="[object Number]",jf="[object RegExp]",Ef="[object Set]",wf="[object String]",Cf="[object Symbol]",Tf="[object ArrayBuffer]",$f="[object DataView]",to=it?it.prototype:void 0,cr=to?to.valueOf:void 0;function Rf(t,e,r,n,o,a,s){switch(r){case $f:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Tf:return!(t.byteLength!=e.byteLength||!a(new Be(t),new Be(e)));case yf:case bf:case Of:return $e(+t,+e);case _f:return t.name==e.name&&t.message==e.message;case jf:case wf:return t==e+"";case Sf:var i=vf;case Ef:var c=n&gf;if(i||(i=Zr),t.size!=e.size&&!c)return!1;var l=s.get(t);if(l)return l==e;n|=mf,s.set(t,e);var f=ea(i(t),i(e),n,o,a,s);return s.delete(t),f;case Cf:if(cr)return cr.call(t)==cr.call(e)}return!1}var Nf=1,xf=Object.prototype,Pf=xf.hasOwnProperty;function Af(t,e,r,n,o,a){var s=r&Nf,i=vr(t),c=i.length,l=vr(e),f=l.length;if(c!=f&&!s)return!1;for(var p=c;p--;){var d=i[p];if(!(s?d in e:Pf.call(e,d)))return!1}var v=a.get(t),m=a.get(e);if(v&&m)return v==e&&m==t;var _=!0;a.set(t,e),a.set(e,t);for(var S=s;++p<c;){d=i[p];var C=t[d],j=e[d];if(n)var F=s?n(j,C,d,e,t,a):n(C,j,d,t,e,a);if(!(F===void 0?C===j||o(C,j,r,n,a):F)){_=!1;break}S||(S=d=="constructor")}if(_&&!S){var D=t.constructor,Y=e.constructor;D!=Y&&"constructor"in t&&"constructor"in e&&!(typeof D=="function"&&D instanceof D&&typeof Y=="function"&&Y instanceof Y)&&(_=!1)}return a.delete(t),a.delete(e),_}var Mf=1,eo="[object Arguments]",ro="[object Array]",Fe="[object Object]",Df=Object.prototype,no=Df.hasOwnProperty;function If(t,e,r,n,o,a){var s=G(t),i=G(e),c=s?ro:Ee(t),l=i?ro:Ee(e);c=c==eo?Fe:c,l=l==eo?Fe:l;var f=c==Fe,p=l==Fe,d=c==l;if(d&&Se(t)){if(!Se(e))return!1;s=!0,f=!1}if(d&&!f)return a||(a=new ct),s||Gr(t)?ea(t,e,r,n,o,a):Rf(t,e,c,r,n,o,a);if(!(r&Mf)){var v=f&&no.call(t,"__wrapped__"),m=p&&no.call(e,"__wrapped__");if(v||m){var _=v?t.value():t,S=m?e.value():e;return a||(a=new ct),o(_,S,r,n,a)}}return d?(a||(a=new ct),Af(t,e,r,n,o,a)):!1}function tn(t,e,r,n,o){return t===e?!0:t==null||e==null||!ft(t)&&!ft(e)?t!==t&&e!==e:If(t,e,r,n,tn,o)}var Lf=1,Ff=2;function kf(t,e,r,n){var o=r.length,a=o,s=!n;if(t==null)return!a;for(t=Object(t);o--;){var i=r[o];if(s&&i[2]?i[1]!==t[i[0]]:!(i[0]in t))return!1}for(;++o<a;){i=r[o];var c=i[0],l=t[c],f=i[1];if(s&&i[2]){if(l===void 0&&!(c in t))return!1}else{var p=new ct;if(n)var d=n(l,f,c,t,e,p);if(!(d===void 0?tn(f,l,Lf|Ff,n,p):d))return!1}}return!0}function ra(t){return t===t&&!lt(t)}function Uf(t){for(var e=Ye(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,ra(o)]}return e}function na(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function Bf(t){var e=Uf(t);return e.length==1&&e[0][2]?na(e[0][0],e[0][1]):function(r){return r===t||kf(r,t,e)}}function Vf(t,e){return t!=null&&e in Object(t)}function zf(t,e,r){e=re(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var s=ne(e[n]);if(!(a=t!=null&&r(t,s)))break;t=t[s]}return a||++n!=o?a:(o=t==null?0:t.length,!!o&&Br(o)&&We(s,o)&&(G(t)||_e(t)))}function Gf(t,e){return t!=null&&zf(t,e,Vf)}var Wf=1,Hf=2;function Yf(t,e){return Wr(t)&&ra(e)?na(ne(t),e):function(r){var n=Bo(r,t);return n===void 0&&n===e?Gf(r,t):tn(e,n,Wf|Hf)}}function Jf(t){return function(e){return e==null?void 0:e[t]}}function qf(t){return function(e){return Qe(e,t)}}function Qf(t){return Wr(t)?Jf(ne(t)):qf(t)}function en(t){return typeof t=="function"?t:t==null?Lr:typeof t=="object"?G(t)?Yf(t[0],t[1]):Bf(t):Qf(t)}function Kf(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[t?i:++o];if(r(a[c],c,a)===!1)break}return e}}var Xf=Kf();const Zf=Xf;function yr(t,e,r){(r!==void 0&&!$e(t[e],r)||r===void 0&&!(e in t))&&kr(t,e,r)}function br(t){return ft(t)&&He(t)}function _r(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function td(t){return ee(t,Re(t))}function ed(t,e,r,n,o,a,s){var i=_r(t,r),c=_r(e,r),l=s.get(c);if(l){yr(t,r,l);return}var f=a?a(i,c,r+"",t,e,s):void 0,p=f===void 0;if(p){var d=G(c),v=!d&&Se(c),m=!d&&!v&&Gr(c);f=c,d||v||m?G(i)?f=i:br(i)?f=Po(i):v?(p=!1,f=Go(c,!0)):m?(p=!1,f=Jo(c,!0)):f=[]:Z(c)||_e(c)?(f=i,_e(i)?f=td(i):(!lt(i)||Fr(i))&&(f=qo(c))):p=!1}p&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),yr(t,r,f)}function oa(t,e,r,n,o){t!==e&&Zf(e,function(a,s){if(o||(o=new ct),lt(a))ed(t,e,s,r,oa,n,o);else{var i=n?n(_r(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),yr(t,s,i)}},Re)}function rd(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 aa(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function nd(t,e){return e.length<2?t:Qe(t,wu(e,0,-1))}var od=Ls(function(t,e,r){oa(t,e,r)});const ia=od;var ad="Expected a function";function id(t){if(typeof t!="function")throw new TypeError(ad);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 sd(t,e){return e=re(e,t),t=nd(t,e),t==null||delete t[ne(aa(e))]}function cd(t){return Z(t)?void 0:t}var ud=1,ld=2,fd=4,dd=yu(function(t,e){var r={};if(t==null)return r;var n=!1;e=Ir(e,function(a){return a=re(a,t),n||(n=a.length>1),a}),ee(t,Kr(t),r),n&&(r=me(r,ud|ld|fd,cd));for(var o=e.length;o--;)sd(r,e[o]);return r});const sa=dd;function pd(t,e,r,n){if(!lt(t))return t;e=re(e,t);for(var o=-1,a=e.length,s=a-1,i=t;i!=null&&++o<a;){var c=ne(e[o]),l=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var f=i[c];l=n?n(f,c,i):void 0,l===void 0&&(l=lt(f)?f:We(e[o+1])?[]:{})}Ur(i,c,l),i=i[c]}return t}function hd(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var s=e[n],i=Qe(t,s);r(i,s)&&pd(a,re(s,t),i)}return a}function vd(t,e){if(t==null)return{};var r=Ir(Kr(t),function(n){return[n]});return e=en(e),hd(t,r,function(n,o){return e(n,o[0])})}function gd(t,e){return vd(t,id(en(e)))}var md=1/0,yd=Ht&&1/Zr(new Ht([,-0]))[1]==md?function(t){return new Ht(t)}:vs;const bd=yd;var _d=200;function Sd(t,e,r){var n=-1,o=Ns,a=t.length,s=!0,i=[],c=i;if(r)s=!1,o=rd;else if(a>=_d){var l=e?null:bd(t);if(l)return Zr(l);s=!1,o=ta,c=new we}else c=e?[]:i;t:for(;++n<a;){var f=t[n],p=e?e(f):f;if(f=r||f!==0?f:0,s&&p===p){for(var d=c.length;d--;)if(c[d]===p)continue t;e&&c.push(p),i.push(f)}else o(c,p,r)||(c!==i&&c.push(p),i.push(f))}return i}var Od=Do(function(t){var e=aa(t);return br(e)&&(e=void 0),Sd(Jr(t,1,br,!0),en(e))});const jd=Od;class ca extends TypeError{constructor(e,r){let n;const{message:o,...a}=e,{path:s}=e,i=s.length===0?o:"At path: "+s.join(".")+" -- "+o;super(i),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 Ed(t){return ut(t)&&typeof t[Symbol.iterator]=="function"}function ut(t){return typeof t=="object"&&t!=null}function rt(t){return typeof t=="string"?JSON.stringify(t):""+t}function wd(t){const{done:e,value:r}=t.next();return e?void 0:r}function Cd(t,e,r,n){if(t===!0)return;t===!1?t={}:typeof t=="string"&&(t={message:t});const{path:o,branch:a}=e,{type:s}=r,{refinement:i,message:c="Expected a value of type `"+s+"`"+(i?" with refinement `"+i+"`":"")+", but received: `"+rt(n)+"`"}=t;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*oo(t,e,r,n){Ed(t)||(t=[t]);for(const o of t){const a=Cd(o,e,r,n);a&&(yield a)}}function*rn(t,e,r){r===void 0&&(r={});const{path:n=[],branch:o=[t],coerce:a=!1,mask:s=!1}=r,i={path:n,branch:o};if(a&&(t=e.coercer(t,i),s&&e.type!=="type"&&ut(e.schema)&&ut(t)&&!Array.isArray(t)))for(const l in t)e.schema[l]===void 0&&delete t[l];let c="valid";for(const l of e.validator(t,i))c="not_valid",yield[l,void 0];for(let[l,f,p]of e.entries(t,i)){const d=rn(f,p,{path:l===void 0?n:[...n,l],branch:l===void 0?o:[...o,f],coerce:a,mask:s});for(const v of d)v[0]?(c=v[0].refinement!=null?"not_refined":"not_valid",yield[v[0],void 0]):a&&(f=v[1],l===void 0?t=f:t instanceof Map?t.set(l,f):t instanceof Set?t.add(f):ut(t)&&(t[l]=f))}if(c!=="not_valid")for(const l of e.refiner(t,i))c="not_refined",yield[l,void 0];c==="valid"&&(yield[void 0,t])}class pt{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:s=c=>c,entries:i=function*(){}}=e;this.type=r,this.schema=n,this.entries=i,this.coercer=s,o?this.validator=(c,l)=>{const f=o(c,l);return oo(f,l,this,c)}:this.validator=()=>[],a?this.refiner=(c,l)=>{const f=a(c,l);return oo(f,l,this,c)}:this.refiner=()=>[]}assert(e){return ua(e,this)}create(e){return Td(e,this)}is(e){return Rd(e,this)}mask(e){return $d(e,this)}validate(e,r){return r===void 0&&(r={}),oe(e,this,r)}}function ua(t,e){const r=oe(t,e);if(r[0])throw r[0]}function Td(t,e){const r=oe(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function $d(t,e){const r=oe(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function Rd(t,e){return!oe(t,e)[0]}function oe(t,e,r){r===void 0&&(r={});const n=rn(t,e,r),o=wd(n);return o[0]?[new ca(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function nn(){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(s=>s.schema),a=Object.assign({},...o);return n?pa(a):P(a)}function wt(t,e){return new pt({type:t,schema:null,validator:e})}function Jt(t){return new pt({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 la(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return pa(n);default:return P(n)}}function z(){return wt("any",()=>!0)}function B(t){return new pt({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: "+rt(e)}})}function qt(){return wt("boolean",t=>typeof t=="boolean")}function Sr(t){const e={},r=t.map(n=>rt(n)).join();for(const n of t)e[n]=n;return new pt({type:"enums",schema:e,validator(n){return t.includes(n)||"Expected one of `"+r+"`, but received: "+rt(n)}})}function fa(){return wt("func",t=>typeof t=="function"||"Expected a function, but received: "+rt(t))}function K(t){const e=rt(t),r=typeof t;return new pt({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||"Expected the literal `"+e+"`, but received: "+rt(n)}})}function Nd(){return wt("never",()=>!1)}function da(){return wt("number",t=>typeof t=="number"&&!isNaN(t)||"Expected a number, but received: "+rt(t))}function P(t){const e=t?Object.keys(t):[],r=Nd();return new pt({type:"object",schema:t||null,*entries(n){if(t&&ut(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 ut(n)||"Expected an object, but received: "+rt(n)},coercer(n){return ut(n)?{...n}:n}})}function b(t){return new pt({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function ye(t,e){return new pt({type:"record",schema:null,*entries(r){if(ut(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return ut(r)||"Expected an object, but received: "+rt(r)}})}function y(){return wt("string",t=>typeof t=="string"||"Expected a string, but received: "+rt(t))}function pa(t){const e=Object.keys(t);return new pt({type:"type",schema:t,*entries(r){if(ut(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return ut(r)||"Expected an object, but received: "+rt(r)}})}function X(t){const e=t.map(r=>r.type).join(" | ");return new pt({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||xd()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...s]=rn(r,a,n),[i]=s;if(i[0])for(const[c]of s)c&&o.push(c);else return[]}return["Expected the value to satisfy a union of `"+e+"`, but received: "+rt(r),...o]}})}function xd(){return wt("unknown",()=>!0)}const on=P({package:y(),version:y(),name:y(),exportName:b(y()),destructuring:b(qt()),subName:b(y()),main:b(y()),cssPaths:b(B(y()))}),Pd=B(on),Ad=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var at=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t))(at||{}),an=(t=>(t.DESIGN="design",t.SAVE="save",t))(an||{}),Or=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(Or||{});const Md=()=>wt("normalObj",t=>!Z(t)||[at.SLOT,at.EXPRESSION,at.FUNCTION].includes(t==null?void 0:t.type)?!1:(oe(t,ye(y(),sn)),!0)),sn=X([y(),da(),qt(),P({type:K(at.SLOT),renderType:Sr([Or.FUNC,Or.COMP]),params:b(B(y())),value:Jt(()=>X([Qt,B(Qt)]))}),P({type:K(at.EXPRESSION),value:y()}),P({type:K(at.FUNCTION),value:y()}),Md(),B(Jt(()=>sn))]),ao=P({type:K(at.EXPRESSION),value:y()}),Qt=P({id:b(y()),title:b(y()),componentName:y(),props:b(ye(y(),sn)),nodeName:b(y()),state:b(ye(y(),z())),children:Jt(()=>b(B(X([y(),Qt])))),configure:b(z()),css:b(z()),style:b(z()),classNames:b(B(z())),refId:b(y()),extra:b(ye(z(),z())),condition:b(X([qt(),ao])),loop:b(P({open:qt(),data:X([B(z()),ao]),args:b(B(y())),forName:b(y()),forIndex:b(y()),key:b(z()),name:b(y())})),methods:b(B(z()))}),Ve=X([y(),P({label:y(),tip:b(y())})]),Dd=P({type:K("shape"),value:B(P({name:y(),title:Ve,valueType:Jt(()=>Ke)}))}),Id=P({type:K("enums"),value:B(y())});P({type:K("array"),value:Jt(()=>Ke)});const Ld=P({type:K("array"),value:Jt(()=>B(Ke))}),Ke=X([Sr(["array","boolean","number","object","string"]),Sr(["component","expression","function"]),Dd,Id,Ld]),Fd=X([y(),P({componentName:y(),props:b(z()),initialValue:b(z()),component:b(z())})]),ur=P({name:y(),title:Ve,valueType:Ke,description:b(y()),defaultValue:z(),setters:b(B(Fd)),condition:b(fa())});X([y(),fa()]);var jr=(t=>(t.SINGLE="single",t.GROUP="group",t))(jr||{});X([y(),P({name:y(),describe:b(y()),params:b(P({name:y(),description:y()})),template:y()})]);const kd=P({id:b(y()),title:y(),snapshot:X([y(),z()]),snapshotText:b(y()),description:b(y()),tags:b(B(y())),groupName:b(y()),category:b(y()),schema:nn(la(Qt,["id"]),P({componentName:b(y())}))}),Ud=P({componentName:y(),title:y(),screenshot:b(y()),icon:b(y()),tags:b(B(y())),groupName:b(y()),category:b(y()),priority:b(da()),npm:b(on),snippets:B(kd),props:B(X([ur,P({title:b(Ve),type:K("single"),content:ur}),P({title:b(Ve),type:K("group"),content:B(ur)})])),fixedProps:b(z()),isContainer:b(X([qt(),P({placeholder:y(),width:y(),height:y()})])),disableEditorDragDom:b(z()),isLayout:b(qt()),rootSelector:b(y()),advanceCustom:b(z()),extra:b(ye(z(),z()))}),Bd=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
- data struct format is invalidate`),o},cn=t=>{const{data:e,message:r,throwError:n,dataStruct:o}=t;return Bp(({data:a})=>{try{return ua(a,o),{isValidate:!0}}catch(s){let i=s;return s instanceof ca&&(i=s.failures().map(c=>`【${c.path.join(".")}】: ${c.message}
6
- `)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var ae=(t=>(t.ROOT_CONTAINER="RootContainer",t))(ae||{});const Vp=$({type:K(at.FUNCTION),value:y()}),Gp=nn(la(Qt,["componentName"]),$({componentName:K("RootContainer")}));function zp(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 xe=zp(),Wp=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new At([]);return e&&(o=e.materialsMode||new At([])),n&&(z(n)?r.value=n.map(a=>new k(a,{parent:e,materials:o})):Z(n)&&r.value.push(new k(n,{parent:e,materials:o}))),r};class Kt{constructor(e,r){E(this,"nodeType","SLOT"),E(this,"rawData"),E(this,"parent"),E(this,"emitter",xe),E(this,"data"),E(this,"id"),E(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new At([]);this.materialsMode=n,this.id=ht(),this.data=Wp(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof k)return o.export(e);if(Z(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return z(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const ha=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===jr.SINGLE?e.push(n.content):n.type===jr.GROUP&&(e=[...e,...ha(n.content)]):e.push(r)}),e},wr=(t,e,r)=>{if(t.type)return t.type===at.SLOT?new Kt(t,{parent:e,materials:r}):t;if(Z(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=Er(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>wr(n,e,r)):t},Er=(t,e,r)=>Z(t)?wr(t,e,r):z(t)?t.map(n=>wr(n,e,r)):t;class wt{constructor(e,r,n){E(this,"nodeType","PROP"),E(this,"rawData"),E(this,"parent"),E(this,"emitter",xe),E(this,"data"),E(this,"name"),E(this,"materialsMode");const o=(n==null?void 0:n.materials)||new At([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=Er(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=Er(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Kt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof k){const r=e.material;return ha((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 wt||o instanceof Kt||o instanceof k)return o.export(e);if(z(o))return o.map(a=>n(a));if(Z(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const Hp=t=>{if(typeof t=="string")return!0;cn({data:t,dataStruct:Qt,throwError:!1})},io=(t,e,r=new At([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??ht(),children:[],props:{},methods:t.methods||[],configure:ia(t.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(t.props||{});return o.length&&o.forEach(a=>{var s;const i=(s=t.props)==null?void 0:s[a];if(i instanceof wt){n.props[a]=i;return}n.props[a]=new wt(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof k)return a;if(Z(a)){const s=a;return new k(s,{parent:e,materials:r})}else return a}):(t.children instanceof k&&(n.children=[t.children]),n.children=[new k(t.children,{parent:e,materials:r})])),n};class k{constructor(e,r){E(this,"nodeType","NODE"),E(this,"rawData"),E(this,"data"),E(this,"emitter",xe),E(this,"parent"),E(this,"materialsModel"),E(this,"listenerHandle"),E(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),Hp(e);const n=(r==null?void 0:r.materials)||new At([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=io(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||ht()};return new k(r,{materials:this.materialsModel})}updateValue(e){const r=this.data,n={...this.data,...e};this.data=io(n,this),this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return ln(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(f=>{o[f]=n.props[f].export(e)});const a=(r=n.children)==null?void 0:r.map(f=>f instanceof k?f.export(e):f),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(f=>{const d=Bo(i,f,!1);d&&(c[f]=d)}),s.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let l={...n,configure:s,props:o,children:a};return e==="design"&&delete l.id,l=un(l),l}}const so=(t,e,r)=>{const n={...t,id:ht(),props:{},componentName:ae.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:ia(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];z(t.children)?o=t.children.map(s=>s instanceof k?s:Z(s)?new k(s,{parent:e,materials:r}):s):t.children instanceof k?o.push(t.children):t.children&&Z(t.children)&&o.push(new k(t.children,{parent:e,materials:r}));const a=Object.keys(t.props||{});return a.length&&a.forEach(s=>{var i;const c=(i=t.props)==null?void 0:i[s];c instanceof wt?n.props[s]=c:n.props[s]=new wt(s,c||"",{parent:e,materials:r})}),n.children=o,n};class Ce{constructor(e,{parent:r,materials:n}){E(this,"rawData"),E(this,"data"),E(this,"nodeType",ae.ROOT_CONTAINER),E(this,"emitter",xe),E(this,"materialsModel"),E(this,"listenerHandle"),E(this,"onChangeCbQueue"),E(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=so(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)}updateValue(e){const r=this.data,n={...this.data,...e};this.data=so(n,this,this.materialsModel),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(e){return ln(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=an.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 l;return(l=c==null?void 0:c.export)==null?void 0:l.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c)};let i=sa(s,["id"]);return i=un(i),i}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||ht()};return new Ce(r,{materials:this.materialsModel,parent:null})}}const Nt=t=>(t==null?void 0:t.type)===at.EXPRESSION,Yp=t=>(t==null?void 0:t.type)===at.FUNCTION,ht=()=>Math.random().toString(32).slice(3,9),Jp=t=>(t==null?void 0:t.nodeType)==="NODE",lr=t=>(t==null?void 0:t.nodeType)==="PROP",qp=t=>(t==null?void 0:t.nodeType)==="SLOT",un=t=>gp(t,e=>Z(e)?!Object.keys(e).length:z(e)?!e.length:!e);function Qp(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=i=>{if(i instanceof k){r.push(i);return}if(i instanceof Kt&&a(i.value.value),i instanceof wt){a(i.value);return}if(Z(i)){const c=i;Object.keys(c).forEach(l=>{a(c[l])});return}if(z(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof k))||[];r.push(...s)}}function ln(t,e){return Qp(t,r=>r.id===e)}const Kp=t=>{const e=Zo(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${ht()}`,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 Xp{constructor(e){E(this,"rawData"),E(this,"data"),this.rawData=e,this.data=Kp(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 Zp=t=>{if(!z(t))throw new Error("Materials must be a array");return t.map(e=>new Xp(e))},td=t=>{t==null||t.forEach(e=>{cn({data:e,dataStruct:Up,throwError:!1})})};class At{constructor(e){E(this,"rawData"),E(this,"data"),E(this,"usedMaterials",[]),this.rawData=e,td(e),this.data=Zp(e)}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(){let e=this.data.reduce((a,s)=>(a.push(...s.snippets),a),[]);const r=[],n={default:[]};e=e.sort((a,s)=>(a.category||"")>(s.category||"")?1:-1),e.forEach(a=>{const s=a.groupName||"default";r.includes(s)||(r.push(s),n[s]=[]),n[s].push(a)});const o=[];return r.forEach(a=>{const s=["default"],i={default:[]},c=n[a];if(c.length!==0){c.forEach(d=>{const p=d.category||"default";s.includes(p)||(s.push(p),i[p]=[]),i[p].push(d)});const l=[];s.forEach(d=>{i[d].length&&l.push({name:d,list:i[d]})});const f={name:a,list:l};o.push(f)}}),o}get value(){return this.data}get rawValue(){return this.rawData}}const ed=$({version:y(),name:y(),css:b(y()),renderType:b(X([K("COMPONENT"),K("PAGE")])),methods:b(B(Vp)),componentsMeta:B(nn($({componentName:y()}),on)),thirdLibs:b($p),componentsTree:Gp,assets:b(B(G()))}),va=t=>(cn({data:t,dataStruct:ed,throwError:!1}),t),fr=(t,e,r)=>({...t,componentsTree:new Ce(t.componentsTree,{parent:e,materials:r})});class Ge{constructor(e,r){E(this,"nodeType","PAGE"),E(this,"rawData"),E(this,"emitter",xe),E(this,"data"),E(this,"parent"),E(this,"materialsModel"),E(this,"assetPackagesList"),va(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new At((r==null?void 0:r.materials)||[]),this.data=fr(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=fr(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=fr(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 ln(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof Ce)return console.warn("Not found parent node"),!1;if(a instanceof wt)return console.warn("CProp can not add node"),!1;if(a instanceof Kt){const i=a.value.value,c=i.findIndex(l=>l===r)??-1;return c>=0?(n==="BEFORE"?i.splice(c,0,e):i.splice(c+1,0,e),e.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof Ge)return!1;const s=(a==null?void 0:a.value.children.findIndex(i=>i===r))??-1;return s>=0?(n==="BEFORE"?a==null||a.value.children.splice(s,0,e):a==null||a.value.children.splice(s+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(Z(n)){const a=n;if(a.type==="CHILD"){const s=a.pos,i=a.index||0;return s==="BEFORE"?r==null||r.value.children.splice(i,0,e):r==null||r.value.children.splice(i+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 k(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=ht();const n=new k(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 k?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 k&&a instanceof k?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 Kt){const o=n.value.value,a=o.findIndex(i=>i===e),s=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),s}if(n instanceof k||n instanceof Ce){const o=n.value.children,a=o.findIndex(i=>i===e),s=o[a];return o.splice(a,1),n.updateValue(),s}}deleteNodeById(e){const r=this.getNode(e);if(r)return this.deleteNode(r)}export(e=an.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const l=o.find(f=>{var d;return f.package===((d=c.value.npm)==null?void 0:d.package)});return l&&a.push(l),{componentName:c.componentName,...Zo(c.value.npm||{})}}).filter(c=>!!(c.componentName&&c.package&&c.version));this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:un(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const l=o.find(f=>c.package===f.package);l&&a.push(l)}),i.assets=jp(a,c=>c.package),i=sa(i,["id"]),JSON.parse(JSON.stringify(i))}getRootNode(){return this.data.componentsTree}}ae.ROOT_CONTAINER;var rd=typeof global=="object"&&global&&global.Object===Object&&global;const ga=rd;var nd=typeof self=="object"&&self&&self.Object===Object&&self,od=ga||nd||Function("return this")();const ie=od;var ad=ie.Symbol;const Xt=ad;var ma=Object.prototype,id=ma.hasOwnProperty,sd=ma.toString,de=Xt?Xt.toStringTag:void 0;function cd(t){var e=id.call(t,de),r=t[de];try{t[de]=void 0;var n=!0}catch{}var o=sd.call(t);return n&&(e?t[de]=r:delete t[de]),o}var ud=Object.prototype,ld=ud.toString;function fd(t){return ld.call(t)}var pd="[object Null]",dd="[object Undefined]",co=Xt?Xt.toStringTag:void 0;function Pe(t){return t==null?t===void 0?dd:pd:co&&co in Object(t)?cd(t):fd(t)}function se(t){return t!=null&&typeof t=="object"}var hd="[object Symbol]";function vd(t){return typeof t=="symbol"||se(t)&&Pe(t)==hd}function gd(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 md=Array.isArray;const Zt=md;var yd=1/0,uo=Xt?Xt.prototype:void 0,lo=uo?uo.toString:void 0;function ya(t){if(typeof t=="string")return t;if(Zt(t))return gd(t,ya)+"";if(vd(t))return lo?lo.call(t):"";var e=t+"";return e=="0"&&1/t==-yd?"-0":e}function Ft(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ba(t){return t}var bd="[object AsyncFunction]",_d="[object Function]",Sd="[object GeneratorFunction]",Od="[object Proxy]";function fn(t){if(!Ft(t))return!1;var e=Pe(t);return e==_d||e==Sd||e==bd||e==Od}var jd=ie["__core-js_shared__"];const pr=jd;var fo=function(){var t=/[^.]+$/.exec(pr&&pr.keys&&pr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function wd(t){return!!fo&&fo in t}var Ed=Function.prototype,Cd=Ed.toString;function Td(t){if(t!=null){try{return Cd.call(t)}catch{}try{return t+""}catch{}}return""}var Rd=/[\\^$.*+?()[\]{}|]/g,Nd=/^\[object .+?Constructor\]$/,xd=Function.prototype,Pd=Object.prototype,$d=xd.toString,Ad=Pd.hasOwnProperty,Md=RegExp("^"+$d.call(Ad).replace(Rd,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Dd(t){if(!Ft(t)||wd(t))return!1;var e=fn(t)?Md:Nd;return e.test(Td(t))}function Id(t,e){return t==null?void 0:t[e]}function pn(t,e){var r=Id(t,e);return Dd(r)?r:void 0}var po=Object.create,Ld=function(){function t(){}return function(e){if(!Ft(e))return{};if(po)return po(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Fd=Ld;function kd(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 Ud(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Bd=800,Vd=16,Gd=Date.now;function zd(t){var e=0,r=0;return function(){var n=Gd(),o=Vd-(n-r);if(r=n,o>0){if(++e>=Bd)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Wd(t){return function(){return t}}var Hd=function(){try{var t=pn(Object,"defineProperty");return t({},"",{}),t}catch{}}();const ze=Hd;var Yd=ze?function(t,e){return ze(t,"toString",{configurable:!0,enumerable:!1,value:Wd(e),writable:!0})}:ba;const Jd=Yd;var qd=zd(Jd);const Qd=qd;var Kd=9007199254740991,Xd=/^(?:0|[1-9]\d*)$/;function _a(t,e){var r=typeof t;return e=e??Kd,!!e&&(r=="number"||r!="symbol"&&Xd.test(t))&&t>-1&&t%1==0&&t<e}function dn(t,e,r){e=="__proto__"&&ze?ze(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Xe(t,e){return t===e||t!==t&&e!==e}var Zd=Object.prototype,th=Zd.hasOwnProperty;function eh(t,e,r){var n=t[e];(!(th.call(t,e)&&Xe(n,r))||r===void 0&&!(e in t))&&dn(t,e,r)}function rh(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=n?n(r[i],t[i],i,r,t):void 0;c===void 0&&(c=t[i]),o?dn(r,i,c):eh(r,i,c)}return r}var ho=Math.max;function nh(t,e,r){return e=ho(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=ho(n.length-e,0),s=Array(a);++o<a;)s[o]=n[e+o];o=-1;for(var i=Array(e+1);++o<e;)i[o]=n[o];return i[e]=r(s),kd(t,this,i)}}function oh(t,e){return Qd(nh(t,e,ba),t+"")}var ah=9007199254740991;function Sa(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ah}function hn(t){return t!=null&&Sa(t.length)&&!fn(t)}function ih(t,e,r){if(!Ft(r))return!1;var n=typeof e;return(n=="number"?hn(r)&&_a(e,r.length):n=="string"&&e in r)?Xe(r[e],t):!1}function sh(t){return oh(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,s&&ih(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var i=r[n];i&&t(e,i,n,a)}return e})}var ch=Object.prototype;function Oa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ch;return t===r}function uh(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var lh="[object Arguments]";function vo(t){return se(t)&&Pe(t)==lh}var ja=Object.prototype,fh=ja.hasOwnProperty,ph=ja.propertyIsEnumerable,dh=vo(function(){return arguments}())?vo:function(t){return se(t)&&fh.call(t,"callee")&&!ph.call(t,"callee")};const Cr=dh;function hh(){return!1}var wa=typeof exports=="object"&&exports&&!exports.nodeType&&exports,go=wa&&typeof module=="object"&&module&&!module.nodeType&&module,vh=go&&go.exports===wa,mo=vh?ie.Buffer:void 0,gh=mo?mo.isBuffer:void 0,mh=gh||hh;const Ea=mh;var yh="[object Arguments]",bh="[object Array]",_h="[object Boolean]",Sh="[object Date]",Oh="[object Error]",jh="[object Function]",wh="[object Map]",Eh="[object Number]",Ch="[object Object]",Th="[object RegExp]",Rh="[object Set]",Nh="[object String]",xh="[object WeakMap]",Ph="[object ArrayBuffer]",$h="[object DataView]",Ah="[object Float32Array]",Mh="[object Float64Array]",Dh="[object Int8Array]",Ih="[object Int16Array]",Lh="[object Int32Array]",Fh="[object Uint8Array]",kh="[object Uint8ClampedArray]",Uh="[object Uint16Array]",Bh="[object Uint32Array]",L={};L[Ah]=L[Mh]=L[Dh]=L[Ih]=L[Lh]=L[Fh]=L[kh]=L[Uh]=L[Bh]=!0;L[yh]=L[bh]=L[Ph]=L[_h]=L[$h]=L[Sh]=L[Oh]=L[jh]=L[wh]=L[Eh]=L[Ch]=L[Th]=L[Rh]=L[Nh]=L[xh]=!1;function Vh(t){return se(t)&&Sa(t.length)&&!!L[Pe(t)]}function Gh(t){return function(e){return t(e)}}var Ca=typeof exports=="object"&&exports&&!exports.nodeType&&exports,be=Ca&&typeof module=="object"&&module&&!module.nodeType&&module,zh=be&&be.exports===Ca,dr=zh&&ga.process,Wh=function(){try{var t=be&&be.require&&be.require("util").types;return t||dr&&dr.binding&&dr.binding("util")}catch{}}();const yo=Wh;var bo=yo&&yo.isTypedArray,Hh=bo?Gh(bo):Vh;const Ta=Hh;var Yh=Object.prototype,Jh=Yh.hasOwnProperty;function qh(t,e){var r=Zt(t),n=!r&&Cr(t),o=!r&&!n&&Ea(t),a=!r&&!n&&!o&&Ta(t),s=r||n||o||a,i=s?uh(t.length,String):[],c=i.length;for(var l in t)(e||Jh.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||_a(l,c)))&&i.push(l);return i}function Qh(t,e){return function(r){return t(e(r))}}function Kh(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Xh=Object.prototype,Zh=Xh.hasOwnProperty;function tv(t){if(!Ft(t))return Kh(t);var e=Oa(t),r=[];for(var n in t)n=="constructor"&&(e||!Zh.call(t,n))||r.push(n);return r}function Ra(t){return hn(t)?qh(t,!0):tv(t)}var ev=pn(Object,"create");const Te=ev;function rv(){this.__data__=Te?Te(null):{},this.size=0}function nv(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ov="__lodash_hash_undefined__",av=Object.prototype,iv=av.hasOwnProperty;function sv(t){var e=this.__data__;if(Te){var r=e[t];return r===ov?void 0:r}return iv.call(e,t)?e[t]:void 0}var cv=Object.prototype,uv=cv.hasOwnProperty;function lv(t){var e=this.__data__;return Te?e[t]!==void 0:uv.call(e,t)}var fv="__lodash_hash_undefined__";function pv(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Te&&e===void 0?fv:e,this}function Mt(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])}}Mt.prototype.clear=rv;Mt.prototype.delete=nv;Mt.prototype.get=sv;Mt.prototype.has=lv;Mt.prototype.set=pv;function dv(){this.__data__=[],this.size=0}function Ze(t,e){for(var r=t.length;r--;)if(Xe(t[r][0],e))return r;return-1}var hv=Array.prototype,vv=hv.splice;function gv(t){var e=this.__data__,r=Ze(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():vv.call(e,r,1),--this.size,!0}function mv(t){var e=this.__data__,r=Ze(e,t);return r<0?void 0:e[r][1]}function yv(t){return Ze(this.__data__,t)>-1}function bv(t,e){var r=this.__data__,n=Ze(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function bt(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])}}bt.prototype.clear=dv;bt.prototype.delete=gv;bt.prototype.get=mv;bt.prototype.has=yv;bt.prototype.set=bv;var _v=pn(ie,"Map");const Na=_v;function Sv(){this.size=0,this.__data__={hash:new Mt,map:new(Na||bt),string:new Mt}}function Ov(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function tr(t,e){var r=t.__data__;return Ov(e)?r[typeof e=="string"?"string":"hash"]:r.map}function jv(t){var e=tr(this,t).delete(t);return this.size-=e?1:0,e}function wv(t){return tr(this,t).get(t)}function Ev(t){return tr(this,t).has(t)}function Cv(t,e){var r=tr(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ce(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])}}ce.prototype.clear=Sv;ce.prototype.delete=jv;ce.prototype.get=wv;ce.prototype.has=Ev;ce.prototype.set=Cv;function xa(t){return t==null?"":ya(t)}var Tv=Qh(Object.getPrototypeOf,Object);const Pa=Tv;var Rv="[object Object]",Nv=Function.prototype,xv=Object.prototype,$a=Nv.toString,Pv=xv.hasOwnProperty,$v=$a.call(Object);function te(t){if(!se(t)||Pe(t)!=Rv)return!1;var e=Pa(t);if(e===null)return!0;var r=Pv.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&$a.call(r)==$v}function Av(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 Mv(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Av(t,e,r)}var Dv="\\ud800-\\udfff",Iv="\\u0300-\\u036f",Lv="\\ufe20-\\ufe2f",Fv="\\u20d0-\\u20ff",kv=Iv+Lv+Fv,Uv="\\ufe0e\\ufe0f",Bv="\\u200d",Vv=RegExp("["+Bv+Dv+kv+Uv+"]");function Aa(t){return Vv.test(t)}function Gv(t){return t.split("")}var Ma="\\ud800-\\udfff",zv="\\u0300-\\u036f",Wv="\\ufe20-\\ufe2f",Hv="\\u20d0-\\u20ff",Yv=zv+Wv+Hv,Jv="\\ufe0e\\ufe0f",qv="["+Ma+"]",Tr="["+Yv+"]",Rr="\\ud83c[\\udffb-\\udfff]",Qv="(?:"+Tr+"|"+Rr+")",Da="[^"+Ma+"]",Ia="(?:\\ud83c[\\udde6-\\uddff]){2}",La="[\\ud800-\\udbff][\\udc00-\\udfff]",Kv="\\u200d",Fa=Qv+"?",ka="["+Jv+"]?",Xv="(?:"+Kv+"(?:"+[Da,Ia,La].join("|")+")"+ka+Fa+")*",Zv=ka+Fa+Xv,tg="(?:"+[Da+Tr+"?",Tr,Ia,La,qv].join("|")+")",eg=RegExp(Rr+"(?="+Rr+")|"+tg+Zv,"g");function rg(t){return t.match(eg)||[]}function ng(t){return Aa(t)?rg(t):Gv(t)}function og(t){return function(e){e=xa(e);var r=Aa(e)?ng(e):void 0,n=r?r[0]:e.charAt(0),o=r?Mv(r,1).join(""):e.slice(1);return n[t]()+o}}var ag=og("toUpperCase");const ig=ag;function sg(t){return ig(xa(t).toLowerCase())}function cg(){this.__data__=new bt,this.size=0}function ug(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function lg(t){return this.__data__.get(t)}function fg(t){return this.__data__.has(t)}var pg=200;function dg(t,e){var r=this.__data__;if(r instanceof bt){var n=r.__data__;if(!Na||n.length<pg-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ce(n)}return r.set(t,e),this.size=r.size,this}function ue(t){var e=this.__data__=new bt(t);this.size=e.size}ue.prototype.clear=cg;ue.prototype.delete=ug;ue.prototype.get=lg;ue.prototype.has=fg;ue.prototype.set=dg;var Ua=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_o=Ua&&typeof module=="object"&&module&&!module.nodeType&&module,hg=_o&&_o.exports===Ua,So=hg?ie.Buffer:void 0,Oo=So?So.allocUnsafe:void 0;function vg(t,e){if(e)return t.slice();var r=t.length,n=Oo?Oo(r):new t.constructor(r);return t.copy(n),n}var gg=ie.Uint8Array;const jo=gg;function mg(t){var e=new t.constructor(t.byteLength);return new jo(e).set(new jo(t)),e}function yg(t,e){var r=e?mg(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function bg(t){return typeof t.constructor=="function"&&!Oa(t)?Fd(Pa(t)):{}}function _g(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[t?i:++o];if(r(a[c],c,a)===!1)break}return e}}var Sg=_g();const Og=Sg;function Nr(t,e,r){(r!==void 0&&!Xe(t[e],r)||r===void 0&&!(e in t))&&dn(t,e,r)}function jg(t){return se(t)&&hn(t)}function xr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function wg(t){return rh(t,Ra(t))}function Eg(t,e,r,n,o,a,s){var i=xr(t,r),c=xr(e,r),l=s.get(c);if(l){Nr(t,r,l);return}var f=a?a(i,c,r+"",t,e,s):void 0,d=f===void 0;if(d){var p=Zt(c),v=!p&&Ea(c),m=!p&&!v&&Ta(c);f=c,p||v||m?Zt(i)?f=i:jg(i)?f=Ud(i):v?(d=!1,f=vg(c,!0)):m?(d=!1,f=yg(c,!0)):f=[]:te(c)||Cr(c)?(f=i,Cr(i)?f=wg(i):(!Ft(i)||fn(i))&&(f=bg(c))):d=!1}d&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),Nr(t,r,f)}function Ba(t,e,r,n,o){t!==e&&Og(e,function(a,s){if(o||(o=new ue),Ft(a))Eg(t,e,s,r,Ba,n,o);else{var i=n?n(xr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),Nr(t,s,i)}},Ra)}var Cg=sh(function(t,e,r){Ba(t,e,r)});const Tg=Cg,Rg=function(t){return!(!t||typeof t!="function"||!t.prototype)};function Va(t){const e=t.prototype;return!!(e&&e.isReactComponent)}function Ga(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 za(t){class e extends T.Component{render(){return T.createElement(t,this.props)}}return e.displayName=t.displayName,e}const Pt=(t,e)=>{const r=n=>{const a=`
5
+ data struct format is invalidate`),o},cn=t=>{const{data:e,message:r,throwError:n,dataStruct:o}=t;return Bd(({data:a})=>{try{return ua(a,o),{isValidate:!0}}catch(s){let i=s;return s instanceof ca&&(i=s.failures().map(c=>`【${c.path.join(".")}】: ${c.message}
6
+ `)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var ae=(t=>(t.ROOT_CONTAINER="RootContainer",t))(ae||{});const Vd=P({type:K(at.FUNCTION),value:y()}),zd=nn(la(Qt,["componentName"]),P({componentName:K("RootContainer")}));function Gd(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=Gd(),Wd=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new At([]);return e&&(o=e.materialsMode||new At([])),n&&(G(n)?r.value=n.map(a=>new k(a,{parent:e,materials:o})):Z(n)&&r.value.push(new k(n,{parent:e,materials:o}))),r};class Kt{constructor(e,r){w(this,"nodeType","SLOT"),w(this,"rawData"),w(this,"parent"),w(this,"emitter",Ne),w(this,"data"),w(this,"id"),w(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new At([]);this.materialsMode=n,this.id=ht(),this.data=Wd(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof k)return o.export(e);if(Z(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return G(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const ha=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===jr.SINGLE?e.push(n.content):n.type===jr.GROUP&&(e=[...e,...ha(n.content)]):e.push(r)}),e},Er=(t,e,r)=>{if(t.type)return t.type===at.SLOT?new Kt(t,{parent:e,materials:r}):t;if(Z(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=wr(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>Er(n,e,r)):t},wr=(t,e,r)=>Z(t)?Er(t,e,r):G(t)?t.map(n=>Er(n,e,r)):t;class Et{constructor(e,r,n){w(this,"nodeType","PROP"),w(this,"rawData"),w(this,"parent"),w(this,"emitter",Ne),w(this,"data"),w(this,"name"),w(this,"materialsMode");const o=(n==null?void 0:n.materials)||new At([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=wr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=wr(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Kt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof k){const r=e.material;return ha((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 Et||o instanceof Kt||o instanceof k)return o.export(e);if(G(o))return o.map(a=>n(a));if(Z(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const Hd=t=>{if(typeof t=="string")return!0;cn({data:t,dataStruct:Qt,throwError:!1})},io=(t,e,r=new At([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??ht(),children:[],props:{},methods:t.methods||[],configure:ia(t.configure||{},{propsSetter:{},advanceSetter:{}})},o=Object.keys(t.props||{});return o.length&&o.forEach(a=>{var s;const i=(s=t.props)==null?void 0:s[a];if(i instanceof Et){n.props[a]=i;return}n.props[a]=new Et(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof k)return a;if(Z(a)){const s=a;return new k(s,{parent:e,materials:r})}else return a}):(t.children instanceof k&&(n.children=[t.children]),n.children=[new k(t.children,{parent:e,materials:r})])),n};class k{constructor(e,r){w(this,"nodeType","NODE"),w(this,"rawData"),w(this,"data"),w(this,"emitter",Ne),w(this,"parent"),w(this,"materialsModel"),w(this,"listenerHandle"),w(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),Hd(e);const n=(r==null?void 0:r.materials)||new At([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=io(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||ht()};return new k(r,{materials:this.materialsModel})}updateWithPlainObj(e){const r={...this.data,...e};return this.data=io(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 ln(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(f=>{o[f]=n.props[f].export(e)});const a=(r=n.children)==null?void 0:r.map(f=>f instanceof k?f.export(e):f),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(f=>{const p=Bo(i,f,!1);p&&(c[f]=p)}),s.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let l={...n,configure:s,props:o,children:a};return e==="design"&&delete l.id,l=un(l),l}}const so=(t,e,r)=>{const n={...t,id:ht(),props:{},componentName:ae.ROOT_CONTAINER,children:[],methods:t.methods||[],configure:ia(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];G(t.children)?o=t.children.map(s=>s instanceof k?s:Z(s)?new k(s,{parent:e,materials:r}):s):t.children instanceof k?o.push(t.children):t.children&&Z(t.children)&&o.push(new k(t.children,{parent:e,materials:r}));const a=Object.keys(t.props||{});return a.length&&a.forEach(s=>{var i;const c=(i=t.props)==null?void 0:i[s];c instanceof Et?n.props[s]=c:n.props[s]=new Et(s,c||"",{parent:e,materials:r})}),n.children=o,n};class Ce{constructor(e,{parent:r,materials:n}){w(this,"rawData"),w(this,"data"),w(this,"nodeType",ae.ROOT_CONTAINER),w(this,"emitter",Ne),w(this,"materialsModel"),w(this,"listenerHandle"),w(this,"onChangeCbQueue"),w(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=so(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=so(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 ln(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=an.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 l;return(l=c==null?void 0:c.export)==null?void 0:l.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c)};let i=sa(s,["id"]);return i=un(i),i}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||ht()};return new Ce(r,{materials:this.materialsModel,parent:null})}}const Rt=t=>(t==null?void 0:t.type)===at.EXPRESSION,Yd=t=>(t==null?void 0:t.type)===at.FUNCTION,ht=()=>Math.random().toString(32).slice(3,9),Jd=t=>(t==null?void 0:t.nodeType)==="NODE",lr=t=>(t==null?void 0:t.nodeType)==="PROP",qd=t=>(t==null?void 0:t.nodeType)==="SLOT",un=t=>gd(t,e=>Z(e)?!Object.keys(e).length:G(e)?!e.length:!e);function Qd(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=i=>{if(i instanceof k){r.push(i);return}if(i instanceof Kt&&a(i.value.value),i instanceof Et){a(i.value);return}if(Z(i)){const c=i;Object.keys(c).forEach(l=>{a(c[l])});return}if(G(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof k))||[];r.push(...s)}}function ln(t,e){return Qd(t,r=>r.id===e)}const Kd=t=>{const e=Zo(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${ht()}`,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 Xd{constructor(e){w(this,"rawData"),w(this,"data"),this.rawData=e,this.data=Kd(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 Zd=t=>{if(!G(t))throw new Error("Materials must be a array");return t.map(e=>new Xd(e))},tp=t=>{t==null||t.forEach(e=>{cn({data:e,dataStruct:Ud,throwError:!1})})};class At{constructor(e){w(this,"rawData"),w(this,"data"),w(this,"usedMaterials",[]),this.rawData=e,tp(e),this.data=Zd(e)}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,s)=>(a.push(...s.snippets),a),[]),r=[],n={default:[]};e.forEach(a=>{const s=a.groupName||"default";r.includes(s)||(r.push(s),n[s]=[]),n[s].push(a)});let o=[];return r.forEach(a=>{const s=["default"],i={default:[]},c=n[a];if(c.length!==0){c.forEach(p=>{const d=p.category||"default";s.includes(d)||(s.push(d),i[d]=[]),i[d].push(p)});const l=[];s.forEach(p=>{i[p].length&&l.push({name:p,list:i[p]})});const f={name:a,list:l};o.push(f)}}),o=o.sort((a,s)=>(a.name||"")>(s.name||"")?1:-1),o}get value(){return this.data}get rawValue(){return this.rawData}}const ep=P({version:y(),name:y(),css:b(y()),renderType:b(X([K("COMPONENT"),K("PAGE")])),methods:b(B(Vd)),componentsMeta:B(nn(P({componentName:y()}),on)),thirdLibs:b(Pd),componentsTree:zd,assets:b(B(z()))}),va=t=>(cn({data:t,dataStruct:ep,throwError:!1}),t),fr=(t,e,r)=>({...t,componentsTree:new Ce(t.componentsTree,{parent:e,materials:r})});class ze{constructor(e,r){w(this,"nodeType","PAGE"),w(this,"rawData"),w(this,"emitter",Ne),w(this,"data"),w(this,"parent"),w(this,"materialsModel"),w(this,"assetPackagesList"),va(e),this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new At((r==null?void 0:r.materials)||[]),this.data=fr(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=fr(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=fr(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 ln(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof Ce)return console.warn("Not found parent node"),!1;if(a instanceof Et)return console.warn("CProp can not add node"),!1;if(a instanceof Kt){const i=a.value.value,c=i.findIndex(l=>l===r)??-1;return c>=0?(n==="BEFORE"?i.splice(c,0,e):i.splice(c+1,0,e),e.parent=a,(o=a.parent)==null||o.updateValue(),!0):!1}if(a instanceof ze)return!1;const s=(a==null?void 0:a.value.children.findIndex(i=>i===r))??-1;return s>=0?(n==="BEFORE"?a==null||a.value.children.splice(s,0,e):a==null||a.value.children.splice(s+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(Z(n)){const a=n;if(a.type==="CHILD"){const s=a.pos,i=a.index||0;return s==="BEFORE"?r==null||r.value.children.splice(i,0,e):r==null||r.value.children.splice(i+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 k(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=ht();const n=new k(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 k?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 k&&a instanceof k?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 Kt){const o=n.value.value,a=o.findIndex(i=>i===e),s=o[a];return o.splice(a,1),(r=n.parent)==null||r.updateValue(),s}if(n instanceof k||n instanceof Ce){const o=n.value.children,a=o.findIndex(i=>i===e),s=o[a];return o.splice(a,1),n.updateValue(),s}}deleteNodeById(e){const r=this.getNode(e);if(r)return this.deleteNode(r)}export(e=an.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const l=o.find(f=>{var p;return f.package===((p=c.value.npm)==null?void 0:p.package)});return l&&a.push(l),{componentName:c.componentName,...Zo(c.value.npm||{})}}).filter(c=>!!(c.componentName&&c.package&&c.version));this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:un(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const l=o.find(f=>c.package===f.package);l&&a.push(l)}),i.assets=jd(a,c=>c.package),i=sa(i,["id"]),JSON.parse(JSON.stringify(i))}getRootNode(){return this.data.componentsTree}}ae.ROOT_CONTAINER;var rp=typeof global=="object"&&global&&global.Object===Object&&global;const ga=rp;var np=typeof self=="object"&&self&&self.Object===Object&&self,op=ga||np||Function("return this")();const ie=op;var ap=ie.Symbol;const Xt=ap;var ma=Object.prototype,ip=ma.hasOwnProperty,sp=ma.toString,pe=Xt?Xt.toStringTag:void 0;function cp(t){var e=ip.call(t,pe),r=t[pe];try{t[pe]=void 0;var n=!0}catch{}var o=sp.call(t);return n&&(e?t[pe]=r:delete t[pe]),o}var up=Object.prototype,lp=up.toString;function fp(t){return lp.call(t)}var dp="[object Null]",pp="[object Undefined]",co=Xt?Xt.toStringTag:void 0;function xe(t){return t==null?t===void 0?pp:dp:co&&co in Object(t)?cp(t):fp(t)}function se(t){return t!=null&&typeof t=="object"}var hp="[object Symbol]";function vp(t){return typeof t=="symbol"||se(t)&&xe(t)==hp}function gp(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 mp=Array.isArray;const Zt=mp;var yp=1/0,uo=Xt?Xt.prototype:void 0,lo=uo?uo.toString:void 0;function ya(t){if(typeof t=="string")return t;if(Zt(t))return gp(t,ya)+"";if(vp(t))return lo?lo.call(t):"";var e=t+"";return e=="0"&&1/t==-yp?"-0":e}function Ft(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function ba(t){return t}var bp="[object AsyncFunction]",_p="[object Function]",Sp="[object GeneratorFunction]",Op="[object Proxy]";function fn(t){if(!Ft(t))return!1;var e=xe(t);return e==_p||e==Sp||e==bp||e==Op}var jp=ie["__core-js_shared__"];const dr=jp;var fo=function(){var t=/[^.]+$/.exec(dr&&dr.keys&&dr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Ep(t){return!!fo&&fo in t}var wp=Function.prototype,Cp=wp.toString;function Tp(t){if(t!=null){try{return Cp.call(t)}catch{}try{return t+""}catch{}}return""}var $p=/[\\^$.*+?()[\]{}|]/g,Rp=/^\[object .+?Constructor\]$/,Np=Function.prototype,xp=Object.prototype,Pp=Np.toString,Ap=xp.hasOwnProperty,Mp=RegExp("^"+Pp.call(Ap).replace($p,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Dp(t){if(!Ft(t)||Ep(t))return!1;var e=fn(t)?Mp:Rp;return e.test(Tp(t))}function Ip(t,e){return t==null?void 0:t[e]}function dn(t,e){var r=Ip(t,e);return Dp(r)?r:void 0}var po=Object.create,Lp=function(){function t(){}return function(e){if(!Ft(e))return{};if(po)return po(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Fp=Lp;function kp(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 Up(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Bp=800,Vp=16,zp=Date.now;function Gp(t){var e=0,r=0;return function(){var n=zp(),o=Vp-(n-r);if(r=n,o>0){if(++e>=Bp)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Wp(t){return function(){return t}}var Hp=function(){try{var t=dn(Object,"defineProperty");return t({},"",{}),t}catch{}}();const Ge=Hp;var Yp=Ge?function(t,e){return Ge(t,"toString",{configurable:!0,enumerable:!1,value:Wp(e),writable:!0})}:ba;const Jp=Yp;var qp=Gp(Jp);const Qp=qp;var Kp=9007199254740991,Xp=/^(?:0|[1-9]\d*)$/;function _a(t,e){var r=typeof t;return e=e??Kp,!!e&&(r=="number"||r!="symbol"&&Xp.test(t))&&t>-1&&t%1==0&&t<e}function pn(t,e,r){e=="__proto__"&&Ge?Ge(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Xe(t,e){return t===e||t!==t&&e!==e}var Zp=Object.prototype,th=Zp.hasOwnProperty;function eh(t,e,r){var n=t[e];(!(th.call(t,e)&&Xe(n,r))||r===void 0&&!(e in t))&&pn(t,e,r)}function rh(t,e,r,n){var o=!r;r||(r={});for(var a=-1,s=e.length;++a<s;){var i=e[a],c=n?n(r[i],t[i],i,r,t):void 0;c===void 0&&(c=t[i]),o?pn(r,i,c):eh(r,i,c)}return r}var ho=Math.max;function nh(t,e,r){return e=ho(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=ho(n.length-e,0),s=Array(a);++o<a;)s[o]=n[e+o];o=-1;for(var i=Array(e+1);++o<e;)i[o]=n[o];return i[e]=r(s),kp(t,this,i)}}function oh(t,e){return Qp(nh(t,e,ba),t+"")}var ah=9007199254740991;function Sa(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ah}function hn(t){return t!=null&&Sa(t.length)&&!fn(t)}function ih(t,e,r){if(!Ft(r))return!1;var n=typeof e;return(n=="number"?hn(r)&&_a(e,r.length):n=="string"&&e in r)?Xe(r[e],t):!1}function sh(t){return oh(function(e,r){var n=-1,o=r.length,a=o>1?r[o-1]:void 0,s=o>2?r[2]:void 0;for(a=t.length>3&&typeof a=="function"?(o--,a):void 0,s&&ih(r[0],r[1],s)&&(a=o<3?void 0:a,o=1),e=Object(e);++n<o;){var i=r[n];i&&t(e,i,n,a)}return e})}var ch=Object.prototype;function Oa(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ch;return t===r}function uh(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var lh="[object Arguments]";function vo(t){return se(t)&&xe(t)==lh}var ja=Object.prototype,fh=ja.hasOwnProperty,dh=ja.propertyIsEnumerable,ph=vo(function(){return arguments}())?vo:function(t){return se(t)&&fh.call(t,"callee")&&!dh.call(t,"callee")};const Cr=ph;function hh(){return!1}var Ea=typeof exports=="object"&&exports&&!exports.nodeType&&exports,go=Ea&&typeof module=="object"&&module&&!module.nodeType&&module,vh=go&&go.exports===Ea,mo=vh?ie.Buffer:void 0,gh=mo?mo.isBuffer:void 0,mh=gh||hh;const wa=mh;var yh="[object Arguments]",bh="[object Array]",_h="[object Boolean]",Sh="[object Date]",Oh="[object Error]",jh="[object Function]",Eh="[object Map]",wh="[object Number]",Ch="[object Object]",Th="[object RegExp]",$h="[object Set]",Rh="[object String]",Nh="[object WeakMap]",xh="[object ArrayBuffer]",Ph="[object DataView]",Ah="[object Float32Array]",Mh="[object Float64Array]",Dh="[object Int8Array]",Ih="[object Int16Array]",Lh="[object Int32Array]",Fh="[object Uint8Array]",kh="[object Uint8ClampedArray]",Uh="[object Uint16Array]",Bh="[object Uint32Array]",L={};L[Ah]=L[Mh]=L[Dh]=L[Ih]=L[Lh]=L[Fh]=L[kh]=L[Uh]=L[Bh]=!0;L[yh]=L[bh]=L[xh]=L[_h]=L[Ph]=L[Sh]=L[Oh]=L[jh]=L[Eh]=L[wh]=L[Ch]=L[Th]=L[$h]=L[Rh]=L[Nh]=!1;function Vh(t){return se(t)&&Sa(t.length)&&!!L[xe(t)]}function zh(t){return function(e){return t(e)}}var Ca=typeof exports=="object"&&exports&&!exports.nodeType&&exports,be=Ca&&typeof module=="object"&&module&&!module.nodeType&&module,Gh=be&&be.exports===Ca,pr=Gh&&ga.process,Wh=function(){try{var t=be&&be.require&&be.require("util").types;return t||pr&&pr.binding&&pr.binding("util")}catch{}}();const yo=Wh;var bo=yo&&yo.isTypedArray,Hh=bo?zh(bo):Vh;const Ta=Hh;var Yh=Object.prototype,Jh=Yh.hasOwnProperty;function qh(t,e){var r=Zt(t),n=!r&&Cr(t),o=!r&&!n&&wa(t),a=!r&&!n&&!o&&Ta(t),s=r||n||o||a,i=s?uh(t.length,String):[],c=i.length;for(var l in t)(e||Jh.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||a&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||_a(l,c)))&&i.push(l);return i}function Qh(t,e){return function(r){return t(e(r))}}function Kh(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Xh=Object.prototype,Zh=Xh.hasOwnProperty;function tv(t){if(!Ft(t))return Kh(t);var e=Oa(t),r=[];for(var n in t)n=="constructor"&&(e||!Zh.call(t,n))||r.push(n);return r}function $a(t){return hn(t)?qh(t,!0):tv(t)}var ev=dn(Object,"create");const Te=ev;function rv(){this.__data__=Te?Te(null):{},this.size=0}function nv(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var ov="__lodash_hash_undefined__",av=Object.prototype,iv=av.hasOwnProperty;function sv(t){var e=this.__data__;if(Te){var r=e[t];return r===ov?void 0:r}return iv.call(e,t)?e[t]:void 0}var cv=Object.prototype,uv=cv.hasOwnProperty;function lv(t){var e=this.__data__;return Te?e[t]!==void 0:uv.call(e,t)}var fv="__lodash_hash_undefined__";function dv(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Te&&e===void 0?fv:e,this}function Mt(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])}}Mt.prototype.clear=rv;Mt.prototype.delete=nv;Mt.prototype.get=sv;Mt.prototype.has=lv;Mt.prototype.set=dv;function pv(){this.__data__=[],this.size=0}function Ze(t,e){for(var r=t.length;r--;)if(Xe(t[r][0],e))return r;return-1}var hv=Array.prototype,vv=hv.splice;function gv(t){var e=this.__data__,r=Ze(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():vv.call(e,r,1),--this.size,!0}function mv(t){var e=this.__data__,r=Ze(e,t);return r<0?void 0:e[r][1]}function yv(t){return Ze(this.__data__,t)>-1}function bv(t,e){var r=this.__data__,n=Ze(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function bt(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])}}bt.prototype.clear=pv;bt.prototype.delete=gv;bt.prototype.get=mv;bt.prototype.has=yv;bt.prototype.set=bv;var _v=dn(ie,"Map");const Ra=_v;function Sv(){this.size=0,this.__data__={hash:new Mt,map:new(Ra||bt),string:new Mt}}function Ov(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function tr(t,e){var r=t.__data__;return Ov(e)?r[typeof e=="string"?"string":"hash"]:r.map}function jv(t){var e=tr(this,t).delete(t);return this.size-=e?1:0,e}function Ev(t){return tr(this,t).get(t)}function wv(t){return tr(this,t).has(t)}function Cv(t,e){var r=tr(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function ce(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])}}ce.prototype.clear=Sv;ce.prototype.delete=jv;ce.prototype.get=Ev;ce.prototype.has=wv;ce.prototype.set=Cv;function Na(t){return t==null?"":ya(t)}var Tv=Qh(Object.getPrototypeOf,Object);const xa=Tv;var $v="[object Object]",Rv=Function.prototype,Nv=Object.prototype,Pa=Rv.toString,xv=Nv.hasOwnProperty,Pv=Pa.call(Object);function te(t){if(!se(t)||xe(t)!=$v)return!1;var e=xa(t);if(e===null)return!0;var r=xv.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Pa.call(r)==Pv}function Av(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 Mv(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:Av(t,e,r)}var Dv="\\ud800-\\udfff",Iv="\\u0300-\\u036f",Lv="\\ufe20-\\ufe2f",Fv="\\u20d0-\\u20ff",kv=Iv+Lv+Fv,Uv="\\ufe0e\\ufe0f",Bv="\\u200d",Vv=RegExp("["+Bv+Dv+kv+Uv+"]");function Aa(t){return Vv.test(t)}function zv(t){return t.split("")}var Ma="\\ud800-\\udfff",Gv="\\u0300-\\u036f",Wv="\\ufe20-\\ufe2f",Hv="\\u20d0-\\u20ff",Yv=Gv+Wv+Hv,Jv="\\ufe0e\\ufe0f",qv="["+Ma+"]",Tr="["+Yv+"]",$r="\\ud83c[\\udffb-\\udfff]",Qv="(?:"+Tr+"|"+$r+")",Da="[^"+Ma+"]",Ia="(?:\\ud83c[\\udde6-\\uddff]){2}",La="[\\ud800-\\udbff][\\udc00-\\udfff]",Kv="\\u200d",Fa=Qv+"?",ka="["+Jv+"]?",Xv="(?:"+Kv+"(?:"+[Da,Ia,La].join("|")+")"+ka+Fa+")*",Zv=ka+Fa+Xv,tg="(?:"+[Da+Tr+"?",Tr,Ia,La,qv].join("|")+")",eg=RegExp($r+"(?="+$r+")|"+tg+Zv,"g");function rg(t){return t.match(eg)||[]}function ng(t){return Aa(t)?rg(t):zv(t)}function og(t){return function(e){e=Na(e);var r=Aa(e)?ng(e):void 0,n=r?r[0]:e.charAt(0),o=r?Mv(r,1).join(""):e.slice(1);return n[t]()+o}}var ag=og("toUpperCase");const ig=ag;function sg(t){return ig(Na(t).toLowerCase())}function cg(){this.__data__=new bt,this.size=0}function ug(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function lg(t){return this.__data__.get(t)}function fg(t){return this.__data__.has(t)}var dg=200;function pg(t,e){var r=this.__data__;if(r instanceof bt){var n=r.__data__;if(!Ra||n.length<dg-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new ce(n)}return r.set(t,e),this.size=r.size,this}function ue(t){var e=this.__data__=new bt(t);this.size=e.size}ue.prototype.clear=cg;ue.prototype.delete=ug;ue.prototype.get=lg;ue.prototype.has=fg;ue.prototype.set=pg;var Ua=typeof exports=="object"&&exports&&!exports.nodeType&&exports,_o=Ua&&typeof module=="object"&&module&&!module.nodeType&&module,hg=_o&&_o.exports===Ua,So=hg?ie.Buffer:void 0,Oo=So?So.allocUnsafe:void 0;function vg(t,e){if(e)return t.slice();var r=t.length,n=Oo?Oo(r):new t.constructor(r);return t.copy(n),n}var gg=ie.Uint8Array;const jo=gg;function mg(t){var e=new t.constructor(t.byteLength);return new jo(e).set(new jo(t)),e}function yg(t,e){var r=e?mg(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function bg(t){return typeof t.constructor=="function"&&!Oa(t)?Fp(xa(t)):{}}function _g(t){return function(e,r,n){for(var o=-1,a=Object(e),s=n(e),i=s.length;i--;){var c=s[t?i:++o];if(r(a[c],c,a)===!1)break}return e}}var Sg=_g();const Og=Sg;function Rr(t,e,r){(r!==void 0&&!Xe(t[e],r)||r===void 0&&!(e in t))&&pn(t,e,r)}function jg(t){return se(t)&&hn(t)}function Nr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Eg(t){return rh(t,$a(t))}function wg(t,e,r,n,o,a,s){var i=Nr(t,r),c=Nr(e,r),l=s.get(c);if(l){Rr(t,r,l);return}var f=a?a(i,c,r+"",t,e,s):void 0,p=f===void 0;if(p){var d=Zt(c),v=!d&&wa(c),m=!d&&!v&&Ta(c);f=c,d||v||m?Zt(i)?f=i:jg(i)?f=Up(i):v?(p=!1,f=vg(c,!0)):m?(p=!1,f=yg(c,!0)):f=[]:te(c)||Cr(c)?(f=i,Cr(i)?f=Eg(i):(!Ft(i)||fn(i))&&(f=bg(c))):p=!1}p&&(s.set(c,f),o(f,c,n,a,s),s.delete(c)),Rr(t,r,f)}function Ba(t,e,r,n,o){t!==e&&Og(e,function(a,s){if(o||(o=new ue),Ft(a))wg(t,e,s,r,Ba,n,o);else{var i=n?n(Nr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),Rr(t,s,i)}},$a)}var Cg=sh(function(t,e,r){Ba(t,e,r)});const Tg=Cg,$g=function(t){return!(!t||typeof t!="function"||!t.prototype)};function Va(t){const e=t.prototype;return!!(e&&e.isReactComponent)}function za(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 Ga(t){class e extends T.Component{render(){return T.createElement(t,this.props)}}return e.displayName=t.displayName,e}const xt=(t,e)=>{const r=n=>{const a=`
7
7
  ${Object.keys(e).map(s=>`const ${s} = $$context['${s}'];`).join(`
8
8
  `)}
9
9
  return ${n};
10
- `;return new Function("$$context",a)(e)};try{return r(t)}catch(n){console.warn(n);const o=`[${t}] expression run failed`;return console.warn(o),null}},Wa=(t,e,r)=>function(...o){try{const a=`
11
- var args = Array.from(arguments);
12
- function runTimeFunc() {
13
- var f = ${t};
14
- var __$$storeManager__ = args.pop();
15
- var $$context = args.pop();
16
- $$context.stateManager = __$$storeManager__.getStateSnapshot();
17
- return f.apply(f, args)
18
- }
19
- return runTimeFunc();
20
- `;new Function(a)(...o,e,r)}catch(a){console.warn(a)}},Pr=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},$r=t=>{const e={};return Object.keys(t).forEach(r=>{let n=r.replace("-webkit","Webkit");n=n.replace("-ms","ms"),n=n.replace("-moz","Moz"),n=n.replace("-o","O");let o=n.split("-");o.length>=2&&(o=o.map((a,s)=>s!==0?sg(a):a)),e[o.join("")]=t[r]}),e},Ar=t=>{let e="";return Object.keys(t).forEach(r=>{e+=`${r}:${t[r]};`}),e},Ng=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o)}}),r},xg=(t,e=1)=>{let r=0,n=t,o={},a={};for(;r<e;)Object.keys(n).forEach(s=>{o={...o,...n[s]}}),a=o,n=o,o={},r+=1;return a},Ha=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},Ya=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},Pg=(t,e)=>Ya(t,e),$g=(t,e)=>Ya(t,e),ke="DYNAMIC",Ag=["$$context","$$nodeModel"],wo=t=>{let e;const r=new Set,n=(c,l)=>{const f=typeof c=="function"?c(e):c;if(!Object.is(f,e)){const d=e;e=l??typeof f!="object"?f:Object.assign({},e,f),r.forEach(p=>p(e,d))}},o=()=>e,i={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,i),i},Mg=t=>t?wo(t):wo;class Dg{constructor(){O(this,"storeMap",new Map)}addStore(e,r){const n=Mg(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 Ig{constructor(){O(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 Ja{constructor(){O(this,"renderMode","normal");O(this,"components",{});O(this,"storeManager",new Dg);O(this,"variableManager",new Ig);O(this,"runtimeComponentCache",new Map);O(this,"onGetRef");O(this,"onGetComponent");O(this,"onComponentMount");O(this,"onComponentDestroy");O(this,"processNodeConfigHook")}getComponent(e){var o;const r=e.value.componentName;let n=this.components[r]||(()=>`Component [${r}] not found`);return Ga(n)||(n=za(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:s,onComponentDestroy:i,renderMode:c,processNodeConfigHook:l}){this.renderMode=c,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=s,this.onComponentDestroy=i,this.processNodeConfigHook=l;const f=e.value.componentsTree,d=this.getComponent(f),p=this.convertModelToComponent(d,e.value.componentsTree),v={},m=f.props;return Object.keys(m).forEach(_=>{v[_]=m[_].value}),v.$$context=o,this.render(p,v)}transformProps(e={},{$$context:r}){const n=e,o=s=>{if(Array.isArray(s))return s.map(i=>o(i));if(lr(s))return o(s.value);if(qp(s)){const i=s.value,c=i.value;if(!c)return console.warn("slot value is null, this maybe cause some error, pls check it",e),()=>{};const l=f=>{const d=`${f.id}-${ke}`;if(this.runtimeComponentCache.get(f.id))return{key:d,component:this.runtimeComponentCache.get(f.id)};const p=this.getComponent(f),v=this.convertModelToComponent(p,f),m=i.params||[];return{component:(...C)=>{const j=Pr(C,m),F=this.getContext({params:j},r);return this.render(v,{$$context:F,key:d})},key:d}};if(Array.isArray(c)){const f=c==null?void 0:c.map(d=>l(d));return(...d)=>f.map(p=>Va(p.component)?T.createElement(p.component,{$$context:r,key:p.key}):p.component(...d))}else return l(c).component}else{if(Nt(s))return Pt(s.value,r||{});if(Yp(s))return Wa(s.value,r,this.storeManager);if(te(s)){let i=s;lr(s)&&(i=s.value);const c=i,l={};return Object.keys(i).forEach(f=>{l[f]=o(c[f])}),l}else return s}},a={};return Object.keys(n).forEach(s=>{const i=n[s];a[s]=o(i)}),a}collectSpecialProps(e={},r){const n=[],o=(a,s)=>{let i=s;lr(s)&&(i=s.value),r(i)?n.push({keyPath:a,val:i}):Zt(i)?i.forEach((c,l)=>{o([...a,String(l)],c)}):te(i)&&Object.keys(i).forEach(c=>{o([...a,c],i[c])})};return o(["$root"],e),n}convertModelToComponent(e,r){const n=this;class o extends T.Component{constructor(i){super(i);O(this,"_CONDITION",!0);O(this,"_DESIGN_BOX",!1);O(this,"_NODE_MODEL",r);O(this,"_NODE_ID",r.id);O(this,"UNIQUE_ID",`${r.id}_${ht()}`);O(this,"targetComponentRef");O(this,"listenerHandle",[]);O(this,"storeState");O(this,"storeListenDisposeList",[]);O(this,"domHeader");O(this,"mediaStyleDomMap",{});O(this,"variableSpace");O(this,"nodeName");O(this,"updateState",i=>{this.storeState.setState(i),this.forceUpdate()});O(this,"getStyleDomById",i=>{const c=this.mediaStyleDomMap;let l=c[i];return l||(l=document.createElement("style"),c[i]=l),l.id=i,l});O(this,"addMediaCSS",()=>{var l;let i=this.domHeader;if(i||(i=(l=document.getElementsByTagName("head"))==null?void 0:l[0],this.domHeader=i),!this.domHeader)return;const c=this._NODE_MODEL.value.css;c&&c.value.forEach(f=>{var v;const d=`${this.UNIQUE_ID}_${f.state}`;let p=`.${c.class}`;if(f.state!=="normal"&&(p=`${p}:${f.state}`),Object.keys(f.style).length!==0){const m=this.getStyleDomById(d);m.innerText=`${p} { ${Ar(f.style)} }`,i==null||i.appendChild(m)}(v=f.media)!=null&&v.length&&f.media.forEach(m=>{const _=`${d}_${m.type}_${m.value}`,S=this.getStyleDomById(_);S.media=`screen and (${m.type}:${m.value}px)`,S.innerHTML=`${p} { ${Ar(m.style)} }`,i==null||i.appendChild(S)})})});O(this,"removeMediaCSS",()=>{const i=this.mediaStyleDomMap;Object.keys(i).forEach(c=>{var l;(l=this.domHeader)==null||l.removeChild(i[c])}),this.mediaStyleDomMap={}});O(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(i=>i()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()});this.targetComponentRef=T.createRef(),this.state=r.value.state||{};const c=r.value.nodeName||r.id;this.nodeName=c;const l=n.storeManager.getStore(c);l?(this.storeState=l,l.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(c,()=>({...r.value.state||{}})),this.storeState.subscribe(d=>{this.setState({...d})}),this.connectStore();const f=n.variableManager.get(c);f?this.variableSpace=f:(this.variableSpace={staticVar:{},methods:{}},n.variableManager.add(c,this.variableSpace))}connectStore(){const i=n.collectSpecialProps(r.props,p=>!!Nt(p)),c=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},p=>!!Nt(p));let l=[];[...i,...c].map(p=>{const v=p.val,m=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],_=Ha(v.value,m);l=[...l,..._]}).filter(Boolean);const f=Array.from(new Set(l)),d=[];f.length&&f.forEach(p=>{n.storeManager.getStore(p)||(n.storeManager.addStore(p,()=>({})),console.warn(n.storeManager,p,"not exits"));const m=n.storeManager.connect(p,()=>{this.forceUpdate()});d.push(m)}),this.storeListenDisposeList=d}componentDidMount(){var c;this.addMediaCSS(),n.onGetRef&&n.onGetRef(this.targetComponentRef,r,this),(c=n.onComponentMount)==null||c.call(n,this,r);const i=()=>{n.storeManager.setStore(r.value.nodeName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(i)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(c=>c()),this.removeMediaCSS(),(i=n.onComponentDestroy)==null||i.call(n,this,r)}render(){var kt;const{$$context:i,...c}=this.props,l=r.value.nodeName||r.id,f={key:r.id,...r.props,...c},d={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:n.storeManager,getState:()=>n.storeManager.getStateObj(l),getStateObj:()=>n.storeManager.getStateObj(l),getStateObjById:U=>n.storeManager.getStateObj(U),stateManager:n.storeManager.getStateSnapshot(),getMethods:()=>n.variableManager.get(l).methods,getMethodsById:U=>n.variableManager.get(U).methods,getStaticVar:()=>n.variableManager.get(l).staticVar,getStaticVarById:U=>n.variableManager.get(U).staticVar};r.value.componentName===ae.ROOT_CONTAINER&&(d.globalState=this.state,d.updateGlobalState=this.updateState);const p=n.getContext(d,i),_=n.transformProps({methods:r.value.methods},{$$context:p}).methods.reduce((U,W)=>(U[W.name]=W.define,U),{});p.methods=_,this.variableSpace.methods=Object.assign(this.variableSpace.methods,_);const S=r.value.loop;let C=[];if(S&&S.open){this.targetComponentRef.current=[];let U=S.data||[];if(Nt(S.data)){const W=S.data;U=Pt(W.value,p||{})}return C=U.map((...W)=>{var Me;const tt=W[1],nt=[S.forName||"item",S.forIndex||"index"],Ut=Pr(W,nt);let Bt="loopData";S.name&&(Bt=`${Bt}${S.name}`);const St=n.getContext({[Bt]:Ut},p),et=n.transformProps(f,{$$context:St}),$e=((Me=r.value.classNames)==null?void 0:Me.map(J=>{var jt;const Ot=J.name;return(Nt(J.status)?Pt(String(((jt=J.status)==null?void 0:jt.value)||""),St):!1)?Ot:""}))||[];let Vt=`${et.className??""} ${$e.join(" ")}`.trim();r.value.css&&(Vt=`${r.value.css.class} ${Vt}`.trim()),et.className=Vt;const Ae=n.transformProps(r.value.style,{$$context:St});r.value.style&&(et.style=$r(Ae||{}));const{children:Tt}=et;let le=[];if(Tt!==void 0)delete et.children,le=Array.isArray(Tt)?Tt:[Tt];else{const J=[];r.value.children.forEach((Rt,jt)=>{const Gt=n.buildComponent(Rt,{$$context:St,idx:jt});J.push(Gt)}),le=J}if(et.key=`${et.key}-${tt}`,Nt(S.key)){const J=S.key,Ot=Pt(J.value,St||{});et.key+=`-${Ot}`}return et.ref=J=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[tt]=J},n.render(e,et,...le)}),C}const j=n.transformProps(f,{$$context:p}),{children:F}=j;let D=[];if(F!==void 0)delete j.children,D=Array.isArray(F)?F:[F];else{const U=[];r.value.children.forEach((tt,nt)=>{const Ut=n.buildComponent(tt,{$$context:p,idx:nt});U.push(Ut)}),D=U}j.ref=this.targetComponentRef;const Y=((kt=r.value.classNames)==null?void 0:kt.map(U=>{var nt;const W=U.name;return(Nt(U.status)?Pt(((nt=U.status)==null?void 0:nt.value)||"",p):!1)?W:""}))||[];let Q=`${j.className??""} ${Y.join(" ")}`.trim();r.value.css&&(Q=`${r.value.css.class} ${Q}`.trim()),j.className=Q;const Ct=n.transformProps(r.value.style,{$$context:p});r.value.style&&(j.style=$r(Ct||{}));let P=r.value.condition??!0;typeof P!="boolean"&&(P=Pt(P.value,p||{}));let st={condition:P,props:j};n.processNodeConfigHook&&(st=n.processNodeConfigHook(st,r));const vt=n.render(e,st.props,...D);return this._CONDITION=st.condition,st.condition?vt:T.createElement("div",{style:{display:"none"}},vt)}}return O(o,"__CP_TYPE__",ke),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(e,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof e=="string"?this.render(e):Jp(e)?(({currentNode:a})=>{const s=a.value.id;let i=null;if(n.get(s))i=n.get(s);else{const f=this.getComponent(a);i=this.convertModelToComponent(f,a)}!n.get(s)&&this.renderMode!=="design"&&n.set(s,i);const c=`${s}-${ke}`,l={$$context:r,$$nodeModel:e,key:c};return this.render(i,l)})({currentNode:e}):void 0}render(e,r={},...n){return typeof e=="string"||typeof e=="number"?String(e):(Ag.forEach(a=>{a in r&&e.__CP_TYPE__!==ke&&delete r[a]}),T.createElement(e,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const Lg=Ro(new Ja),Fg=["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 kg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ug(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Mr={exports:{}},he={};/**
10
+ `;return new Function("$$context",a)(e)};try{return r(t)}catch(n){console.warn(n);const o=`[${t}] expression run failed`;return console.warn(o),null}},Wa=(t,e,r)=>function(...o){let a;try{a=`
11
+ var $$$__args__$$$ = Array.from(arguments);
12
+ function $$_run_$$() {
13
+ var $$_f_$$ = ${t||"function () {}"};
14
+ var __$$storeManager__ = $$$__args__$$$.pop();
15
+ var $$context = $$$__args__$$$.pop();
16
+ $$context.stateManager = __$$storeManager__.getStateSnapshot();
17
+ return $$_f_$$.apply($$_f_$$, $$$__args__$$$);
18
+ }
19
+ return $$_run_$$();
20
+ `,new Function(a)(...o,e,r)}catch(s){console.log(a),console.warn(s)}},xr=(t,e)=>{const r={};return e.forEach((n,o)=>{r[n]=t[o]}),r},Pr=t=>{const e={};return Object.keys(t).forEach(r=>{let n=r.replace("-webkit","Webkit");n=n.replace("-ms","ms"),n=n.replace("-moz","Moz"),n=n.replace("-o","O");let o=n.split("-");o.length>=2&&(o=o.map((a,s)=>s!==0?sg(a):a)),e[o.join("")]=t[r]}),e},Ar=t=>{let e="";return Object.keys(t).forEach(r=>{e+=`${r}:${t[r]};`}),e},Rg=(t,e)=>{const r={};return t.forEach(n=>{if(n.globalName){const o=e[n.globalName];o&&(r[n.globalName]=o)}}),r},Ng=(t,e=1)=>{let r=0,n=t,o={},a={};for(;r<e;)Object.keys(n).forEach(s=>{o={...o,...n[s]}}),a=o,n=o,o={},r+=1;return a},Ha=(t,e)=>{const r=[];return e.forEach(n=>{const a=n.exec(t);a!=null&&a.length&&r.push(a[1])}),r},Ya=(t,e)=>{const r={};return e.forEach(n=>{t[n.name]&&(r[n.name]=t[n.name])}),r},xg=(t,e)=>Ya(t,e),Pg=(t,e)=>Ya(t,e),ke="DYNAMIC",Ag=["$$context","$$nodeModel"],Eo=t=>{let e;const r=new Set,n=(c,l)=>{const f=typeof c=="function"?c(e):c;if(!Object.is(f,e)){const p=e;e=l??typeof f!="object"?f:Object.assign({},e,f),r.forEach(d=>d(e,p))}},o=()=>e,i={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,i),i},Mg=t=>t?Eo(t):Eo;class Dg{constructor(){O(this,"storeMap",new Map)}addStore(e,r){const n=Mg(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 Ig{constructor(){O(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 Ja{constructor(){O(this,"renderMode","normal");O(this,"components",{});O(this,"storeManager",new Dg);O(this,"variableManager",new Ig);O(this,"runtimeComponentCache",new Map);O(this,"onGetRef");O(this,"onGetComponent");O(this,"onComponentMount");O(this,"onComponentDestroy");O(this,"processNodeConfigHook")}getComponent(e){var o;const r=e.value.componentName;let n=this.components[r]||(()=>`Component [${r}] not found`);return za(n)||(n=Ga(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:s,onComponentDestroy:i,renderMode:c,processNodeConfigHook:l}){this.renderMode=c,this.components=r,this.onGetRef=n,this.onGetComponent=a,this.onComponentMount=s,this.onComponentDestroy=i,this.processNodeConfigHook=l;const f=e.value.componentsTree,p=this.getComponent(f),d=this.convertModelToComponent(p,e.value.componentsTree),v={},m=f.props;return Object.keys(m).forEach(_=>{v[_]=m[_].value}),v.$$context=o,this.render(d,v)}transformProps(e={},{$$context:r}){const n=e,o=s=>{if(Array.isArray(s))return s.map(i=>o(i));if(lr(s))return o(s.value);if(qd(s)){const i=s.value,c=i.value;if(!c)return console.warn("slot value is null, this maybe cause some error, pls check it",e),()=>{};const l=f=>{const p=`${f.id}-${ke}`;if(this.runtimeComponentCache.get(f.id))return{key:p,component:this.runtimeComponentCache.get(f.id)};const d=this.getComponent(f),v=this.convertModelToComponent(d,f),m=i.params||[];return{component:(...C)=>{const j=xr(C,m),F=this.getContext({params:j},r);return this.render(v,{$$context:F,key:p})},key:p}};if(Array.isArray(c)){const f=c==null?void 0:c.map(p=>l(p));return(...p)=>f.map(d=>Va(d.component)?T.createElement(d.component,{$$context:r,key:d.key}):d.component(...p))}else return l(c).component}else{if(Rt(s))return xt(s.value,r||{});if(Yd(s))return Wa(s.value,r,this.storeManager);if(te(s)){let i=s;lr(s)&&(i=s.value);const c=i,l={};return Object.keys(i).forEach(f=>{l[f]=o(c[f])}),l}else return s}},a={};return Object.keys(n).forEach(s=>{const i=n[s];a[s]=o(i)}),a}collectSpecialProps(e={},r){const n=[],o=(a,s)=>{let i=s;lr(s)&&(i=s.value),r(i)?n.push({keyPath:a,val:i}):Zt(i)?i.forEach((c,l)=>{o([...a,String(l)],c)}):te(i)&&Object.keys(i).forEach(c=>{o([...a,c],i[c])})};return o(["$root"],e),n}convertModelToComponent(e,r){const n=this;class o extends T.Component{constructor(i){super(i);O(this,"_CONDITION",!0);O(this,"_DESIGN_BOX",!1);O(this,"_NODE_MODEL",r);O(this,"_NODE_ID",r.id);O(this,"UNIQUE_ID",`${r.id}_${ht()}`);O(this,"targetComponentRef");O(this,"listenerHandle",[]);O(this,"storeState");O(this,"storeListenDisposeList",[]);O(this,"domHeader");O(this,"mediaStyleDomMap",{});O(this,"variableSpace");O(this,"nodeName");O(this,"updateState",i=>{this.storeState.setState(i),this.forceUpdate()});O(this,"getStyleDomById",i=>{const c=this.mediaStyleDomMap;let l=c[i];return l||(l=document.createElement("style"),c[i]=l),l.id=i,l});O(this,"addMediaCSS",()=>{var l;let i=this.domHeader;if(i||(i=(l=document.getElementsByTagName("head"))==null?void 0:l[0],this.domHeader=i),!this.domHeader)return;const c=this._NODE_MODEL.value.css;c&&c.value.forEach(f=>{var v;const p=`${this.UNIQUE_ID}_${f.state}`;let d=`.${c.class}`;if(f.state!=="normal"&&(d=`${d}:${f.state}`),Object.keys(f.style).length!==0){const m=this.getStyleDomById(p);m.innerText=`${d} { ${Ar(f.style)} }`,i==null||i.appendChild(m)}(v=f.media)!=null&&v.length&&f.media.forEach(m=>{const _=`${p}_${m.type}_${m.value}`,S=this.getStyleDomById(_);S.media=`screen and (${m.type}:${m.value}px)`,S.innerHTML=`${d} { ${Ar(m.style)} }`,i==null||i.appendChild(S)})})});O(this,"removeMediaCSS",()=>{const i=this.mediaStyleDomMap;Object.keys(i).forEach(c=>{var l;(l=this.domHeader)==null||l.removeChild(i[c])}),this.mediaStyleDomMap={}});O(this,"rebuildNode",()=>{this.storeListenDisposeList.forEach(i=>i()),this.removeMediaCSS(),this.connectStore(),this.addMediaCSS(),this.forceUpdate()});this.targetComponentRef=T.createRef(),this.state=r.value.state||{};const c=r.value.nodeName||r.id;this.nodeName=c;const l=n.storeManager.getStore(c);l?(this.storeState=l,l.setState({...r.value.state||{}})):this.storeState=n.storeManager.addStore(c,()=>({...r.value.state||{}})),this.storeState.subscribe(p=>{this.setState({...p})}),this.connectStore();const f=n.variableManager.get(c);f?this.variableSpace=f:(this.variableSpace={staticVar:{},methods:{}},n.variableManager.add(c,this.variableSpace))}connectStore(){const i=n.collectSpecialProps(r.props,d=>!!Rt(d)),c=n.collectSpecialProps({css:r.value.css,class:r.value.classNames},d=>!!Rt(d));let l=[];[...i,...c].map(d=>{const v=d.val,m=[/\$\$context.stateManager\.(.+?)\./gim,/\$\$context.stateManager\["(.+?)"\]/gim,/\$\$context.stateManager\['(.+?)'\]/gim,/getStateObj\('(.+?)'\)/gim,/getStateObj\("(.+?)"\)/gim,/getStateById\('(.+?)'\)/gim,/getStateById\("(.+?)"\)/gim],_=Ha(v.value,m);l=[...l,..._]}).filter(Boolean);const f=Array.from(new Set(l)),p=[];f.length&&f.forEach(d=>{n.storeManager.getStore(d)||(n.storeManager.addStore(d,()=>({})),console.warn(n.storeManager,d,"not exits"));const m=n.storeManager.connect(d,()=>{this.forceUpdate()});p.push(m)}),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 i=()=>{n.storeManager.setStore(r.value.nodeName||r.id,this.storeState),this.storeState.setState({...this.state,...r.value.state||{}}),this.rebuildNode()};r.onChange(i)}componentWillUnmount(){var i;this.storeListenDisposeList.forEach(c=>c()),this.removeMediaCSS(),(i=n.onComponentDestroy)==null||i.call(n,this,r)}render(){var kt;const{$$context:i,...c}=this.props,l=r.value.nodeName||r.id,f={key:r.id,...r.props,...c},p={state:this.state||{},staticVar:this.variableSpace.staticVar,updateState:this.updateState,storeManager:n.storeManager,getState:()=>n.storeManager.getStateObj(l),getStateObj:()=>n.storeManager.getStateObj(l),getStateObjById:U=>n.storeManager.getStateObj(U),stateManager:n.storeManager.getStateSnapshot(),getMethods:()=>n.variableManager.get(l).methods,getMethodsById:U=>n.variableManager.get(U).methods,getStaticVar:()=>n.variableManager.get(l).staticVar,getStaticVarById:U=>n.variableManager.get(U).staticVar};r.value.componentName===ae.ROOT_CONTAINER&&(p.globalState=this.state,p.updateGlobalState=this.updateState);const d=n.getContext(p,i),_=n.transformProps({methods:r.value.methods},{$$context:d}).methods.reduce((U,W)=>(U[W.name]=W.define,U),{});d.methods=_,this.variableSpace.methods=Object.assign(this.variableSpace.methods,_);const S=r.value.loop;let C=[];if(S&&S.open){this.targetComponentRef.current=[];let U=S.data||[];if(Rt(S.data)){const W=S.data;U=xt(W.value,d||{})}return C=U.map((...W)=>{var Me;const tt=W[1],nt=[S.forName||"item",S.forIndex||"index"],Ut=xr(W,nt);let Bt="loopData";S.name&&(Bt=`${Bt}${S.name}`);const St=n.getContext({[Bt]:Ut},d),et=n.transformProps(f,{$$context:St}),Pe=((Me=r.value.classNames)==null?void 0:Me.map(J=>{var jt;const Ot=J.name;return(Rt(J.status)?xt(String(((jt=J.status)==null?void 0:jt.value)||""),St):!1)?Ot:""}))||[];let Vt=`${et.className??""} ${Pe.join(" ")}`.trim();r.value.css&&(Vt=`${r.value.css.class} ${Vt}`.trim()),et.className=Vt;const Ae=n.transformProps(r.value.style,{$$context:St});r.value.style&&(et.style=Pr(Ae||{}));const{children:Tt}=et;let le=[];if(Tt!==void 0)delete et.children,le=Array.isArray(Tt)?Tt:[Tt];else{const J=[];r.value.children.forEach(($t,jt)=>{const zt=n.buildComponent($t,{$$context:St,idx:jt});J.push(zt)}),le=J}if(et.key=`${et.key}-${tt}`,Rt(S.key)){const J=S.key,Ot=xt(J.value,St||{});et.key+=`-${Ot}`}return et.ref=J=>{this.targetComponentRef.current=this.targetComponentRef.current||[],this.targetComponentRef.current[tt]=J},n.render(e,et,...le)}),C}const j=n.transformProps(f,{$$context:d}),{children:F}=j;let D=[];if(F!==void 0)delete j.children,D=Array.isArray(F)?F:[F];else{const U=[];r.value.children.forEach((tt,nt)=>{const Ut=n.buildComponent(tt,{$$context:d,idx:nt});U.push(Ut)}),D=U}j.ref=this.targetComponentRef;const Y=((kt=r.value.classNames)==null?void 0:kt.map(U=>{var nt;const W=U.name;return(Rt(U.status)?xt(((nt=U.status)==null?void 0:nt.value)||"",d):!1)?W:""}))||[];let Q=`${j.className??""} ${Y.join(" ")}`.trim();r.value.css&&(Q=`${r.value.css.class} ${Q}`.trim()),j.className=Q;const Ct=n.transformProps(r.value.style,{$$context:d});r.value.style&&(j.style=Pr(Ct||{}));let x=r.value.condition??!0;typeof x!="boolean"&&(x=xt(x.value,d||{}));let st={condition:x,props:j};n.processNodeConfigHook&&(st=n.processNodeConfigHook(st,r));const vt=n.render(e,st.props,...D);return this._CONDITION=st.condition,st.condition?vt:T.createElement("div",{style:{display:"none"}},vt)}}return O(o,"__CP_TYPE__",ke),o.displayName=`${r.value.componentName}Dynamic`,o}buildComponent(e,{$$context:r={}}){const n=this.runtimeComponentCache;return typeof e=="string"?this.render(e):Jd(e)?(({currentNode:a})=>{const s=a.value.id;let i=null;if(n.get(s))i=n.get(s);else{const f=this.getComponent(a);i=this.convertModelToComponent(f,a)}!n.get(s)&&this.renderMode!=="design"&&n.set(s,i);const c=`${s}-${ke}`,l={$$context:r,$$nodeModel:e,key:c};return this.render(i,l)})({currentNode:e}):void 0}render(e,r={},...n){return typeof e=="string"||typeof e=="number"?String(e):(Ag.forEach(a=>{a in r&&e.__CP_TYPE__!==ke&&delete r[a]}),T.createElement(e,r,...n))}clear(){this.runtimeComponentCache.clear(),this.storeManager.destroy()}}const Lg=$o(new Ja),Fg=["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 kg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ug(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Mr={exports:{}},he={};/**
21
21
  * @license React
22
22
  * react-jsx-runtime.production.min.js
23
23
  *
@@ -25,7 +25,7 @@
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 Eo;function Bg(){if(Eo)return he;Eo=1;var t=T,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(i,c,l){var f,d={},p=null,v=null;l!==void 0&&(p=""+l),c.key!==void 0&&(p=""+c.key),c.ref!==void 0&&(v=c.ref);for(f in c)n.call(c,f)&&!a.hasOwnProperty(f)&&(d[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)d[f]===void 0&&(d[f]=c[f]);return{$$typeof:e,type:i,key:p,ref:v,props:d,_owner:o.current}}return he.Fragment=r,he.jsx=s,he.jsxs=s,he}var ve={};/**
28
+ */var wo;function Bg(){if(wo)return he;wo=1;var t=T,e=Symbol.for("react.element"),r=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,o=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(i,c,l){var f,p={},d=null,v=null;l!==void 0&&(d=""+l),c.key!==void 0&&(d=""+c.key),c.ref!==void 0&&(v=c.ref);for(f in c)n.call(c,f)&&!a.hasOwnProperty(f)&&(p[f]=c[f]);if(i&&i.defaultProps)for(f in c=i.defaultProps,c)p[f]===void 0&&(p[f]=c[f]);return{$$typeof:e,type:i,key:d,ref:v,props:p,_owner:o.current}}return he.Fragment=r,he.jsx=s,he.jsxs=s,he}var ve={};/**
29
29
  * @license React
30
30
  * react-jsx-runtime.development.js
31
31
  *
@@ -33,15 +33,15 @@
33
33
  *
34
34
  * This source code is licensed under the MIT license found in the
35
35
  * LICENSE file in the root directory of this source tree.
36
- */var Co;function Vg(){return Co||(Co=1,process.env.NODE_ENV!=="production"&&function(){var t=T,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,_="@@iterator";function S(u){if(u===null||typeof u!="object")return null;var h=m&&u[m]||u[_];return typeof h=="function"?h:null}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(u){{for(var h=arguments.length,g=new Array(h>1?h-1:0),w=1;w<h;w++)g[w-1]=arguments[w];F("error",u,g)}}function F(u,h,g){{var w=C.ReactDebugCurrentFrame,x=w.getStackAddendum();x!==""&&(h+="%s",g=g.concat([x]));var A=g.map(function(N){return String(N)});A.unshift("Warning: "+h),Function.prototype.apply.call(console[u],console,A)}}var D=!1,Y=!1,Q=!1,Ct=!1,P=!1,st;st=Symbol.for("react.module.reference");function vt(u){return!!(typeof u=="string"||typeof u=="function"||u===n||u===a||P||u===o||u===l||u===f||Ct||u===v||D||Y||Q||typeof u=="object"&&u!==null&&(u.$$typeof===p||u.$$typeof===d||u.$$typeof===s||u.$$typeof===i||u.$$typeof===c||u.$$typeof===st||u.getModuleId!==void 0))}function kt(u,h,g){var w=u.displayName;if(w)return w;var x=h.displayName||h.name||"";return x!==""?g+"("+x+")":g}function U(u){return u.displayName||"Context"}function W(u){if(u==null)return null;if(typeof u.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case i:var h=u;return U(h)+".Consumer";case s:var g=u;return U(g._context)+".Provider";case c:return kt(u,u.render,"ForwardRef");case d:var w=u.displayName||null;return w!==null?w:W(u.type)||"Memo";case p:{var x=u,A=x._payload,N=x._init;try{return W(N(A))}catch{return null}}}return null}var tt=Object.assign,nt=0,Ut,Bt,St,et,$e,Vt,Ae;function Tt(){}Tt.__reactDisabledLog=!0;function le(){{if(nt===0){Ut=console.log,Bt=console.info,St=console.warn,et=console.error,$e=console.group,Vt=console.groupCollapsed,Ae=console.groupEnd;var u={configurable:!0,enumerable:!0,value:Tt,writable:!0};Object.defineProperties(console,{info:u,log:u,warn:u,error:u,group:u,groupCollapsed:u,groupEnd:u})}nt++}}function Me(){{if(nt--,nt===0){var u={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:tt({},u,{value:Ut}),info:tt({},u,{value:Bt}),warn:tt({},u,{value:St}),error:tt({},u,{value:et}),group:tt({},u,{value:$e}),groupCollapsed:tt({},u,{value:Vt}),groupEnd:tt({},u,{value:Ae})})}nt<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=C.ReactCurrentDispatcher,Ot;function Rt(u,h,g){{if(Ot===void 0)try{throw Error()}catch(x){var w=x.stack.trim().match(/\n( *(at )?)/);Ot=w&&w[1]||""}return`
37
- `+Ot+u}}var jt=!1,Gt;{var ei=typeof WeakMap=="function"?WeakMap:Map;Gt=new ei}function vn(u,h){if(!u||jt)return"";{var g=Gt.get(u);if(g!==void 0)return g}var w;jt=!0;var x=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var A;A=J.current,J.current=null,le();try{if(h){var N=function(){throw Error()};if(Object.defineProperty(N.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(N,[])}catch(gt){w=gt}Reflect.construct(u,[],N)}else{try{N.call()}catch(gt){w=gt}u.call(N.prototype)}}else{try{throw Error()}catch(gt){w=gt}u()}}catch(gt){if(gt&&w&&typeof gt.stack=="string"){for(var R=gt.stack.split(`
38
- `),q=w.stack.split(`
39
- `),V=R.length-1,H=q.length-1;V>=1&&H>=0&&R[V]!==q[H];)H--;for(;V>=1&&H>=0;V--,H--)if(R[V]!==q[H]){if(V!==1||H!==1)do if(V--,H--,H<0||R[V]!==q[H]){var ot=`
40
- `+R[V].replace(" at new "," at ");return u.displayName&&ot.includes("<anonymous>")&&(ot=ot.replace("<anonymous>",u.displayName)),typeof u=="function"&&Gt.set(u,ot),ot}while(V>=1&&H>=0);break}}}finally{jt=!1,J.current=A,Me(),Error.prepareStackTrace=x}var Wt=u?u.displayName||u.name:"",Rn=Wt?Rt(Wt):"";return typeof u=="function"&&Gt.set(u,Rn),Rn}function ri(u,h,g){return vn(u,!1)}function ni(u){var h=u.prototype;return!!(h&&h.isReactComponent)}function De(u,h,g){if(u==null)return"";if(typeof u=="function")return vn(u,ni(u));if(typeof u=="string")return Rt(u);switch(u){case l:return Rt("Suspense");case f:return Rt("SuspenseList")}if(typeof u=="object")switch(u.$$typeof){case c:return ri(u.render);case d:return De(u.type,h,g);case p:{var w=u,x=w._payload,A=w._init;try{return De(A(x),h,g)}catch{}}}return""}var Ie=Object.prototype.hasOwnProperty,gn={},mn=C.ReactDebugCurrentFrame;function Le(u){if(u){var h=u._owner,g=De(u.type,u._source,h?h.type:null);mn.setExtraStackFrame(g)}else mn.setExtraStackFrame(null)}function oi(u,h,g,w,x){{var A=Function.call.bind(Ie);for(var N in u)if(A(u,N)){var R=void 0;try{if(typeof u[N]!="function"){var q=Error((w||"React class")+": "+g+" type `"+N+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[N]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw q.name="Invariant Violation",q}R=u[N](h,N,w,g,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V){R=V}R&&!(R instanceof Error)&&(Le(x),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",w||"React class",g,N,typeof R),Le(null)),R instanceof Error&&!(R.message in gn)&&(gn[R.message]=!0,Le(x),j("Failed %s type: %s",g,R.message),Le(null))}}}var ai=Array.isArray;function er(u){return ai(u)}function ii(u){{var h=typeof Symbol=="function"&&Symbol.toStringTag,g=h&&u[Symbol.toStringTag]||u.constructor.name||"Object";return g}}function si(u){try{return yn(u),!1}catch{return!0}}function yn(u){return""+u}function bn(u){if(si(u))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ii(u)),yn(u)}var fe=C.ReactCurrentOwner,ci={key:!0,ref:!0,__self:!0,__source:!0},_n,Sn,rr;rr={};function ui(u){if(Ie.call(u,"ref")){var h=Object.getOwnPropertyDescriptor(u,"ref").get;if(h&&h.isReactWarning)return!1}return u.ref!==void 0}function li(u){if(Ie.call(u,"key")){var h=Object.getOwnPropertyDescriptor(u,"key").get;if(h&&h.isReactWarning)return!1}return u.key!==void 0}function fi(u,h){if(typeof u.ref=="string"&&fe.current&&h&&fe.current.stateNode!==h){var g=W(fe.current.type);rr[g]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W(fe.current.type),u.ref),rr[g]=!0)}}function pi(u,h){{var g=function(){_n||(_n=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};g.isReactWarning=!0,Object.defineProperty(u,"key",{get:g,configurable:!0})}}function di(u,h){{var g=function(){Sn||(Sn=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};g.isReactWarning=!0,Object.defineProperty(u,"ref",{get:g,configurable:!0})}}var hi=function(u,h,g,w,x,A,N){var R={$$typeof:e,type:u,key:h,ref:g,props:N,_owner:A};return R._store={},Object.defineProperty(R._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(R,"_self",{configurable:!1,enumerable:!1,writable:!1,value:w}),Object.defineProperty(R,"_source",{configurable:!1,enumerable:!1,writable:!1,value:x}),Object.freeze&&(Object.freeze(R.props),Object.freeze(R)),R};function vi(u,h,g,w,x){{var A,N={},R=null,q=null;g!==void 0&&(bn(g),R=""+g),li(h)&&(bn(h.key),R=""+h.key),ui(h)&&(q=h.ref,fi(h,x));for(A in h)Ie.call(h,A)&&!ci.hasOwnProperty(A)&&(N[A]=h[A]);if(u&&u.defaultProps){var V=u.defaultProps;for(A in V)N[A]===void 0&&(N[A]=V[A])}if(R||q){var H=typeof u=="function"?u.displayName||u.name||"Unknown":u;R&&pi(N,H),q&&di(N,H)}return hi(u,R,q,x,w,fe.current,N)}}var nr=C.ReactCurrentOwner,On=C.ReactDebugCurrentFrame;function zt(u){if(u){var h=u._owner,g=De(u.type,u._source,h?h.type:null);On.setExtraStackFrame(g)}else On.setExtraStackFrame(null)}var or;or=!1;function ar(u){return typeof u=="object"&&u!==null&&u.$$typeof===e}function jn(){{if(nr.current){var u=W(nr.current.type);if(u)return`
36
+ */var Co;function Vg(){return Co||(Co=1,process.env.NODE_ENV!=="production"&&function(){var t=T,e=Symbol.for("react.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),i=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),l=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen"),m=Symbol.iterator,_="@@iterator";function S(u){if(u===null||typeof u!="object")return null;var h=m&&u[m]||u[_];return typeof h=="function"?h:null}var C=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function j(u){{for(var h=arguments.length,g=new Array(h>1?h-1:0),E=1;E<h;E++)g[E-1]=arguments[E];F("error",u,g)}}function F(u,h,g){{var E=C.ReactDebugCurrentFrame,N=E.getStackAddendum();N!==""&&(h+="%s",g=g.concat([N]));var A=g.map(function(R){return String(R)});A.unshift("Warning: "+h),Function.prototype.apply.call(console[u],console,A)}}var D=!1,Y=!1,Q=!1,Ct=!1,x=!1,st;st=Symbol.for("react.module.reference");function vt(u){return!!(typeof u=="string"||typeof u=="function"||u===n||u===a||x||u===o||u===l||u===f||Ct||u===v||D||Y||Q||typeof u=="object"&&u!==null&&(u.$$typeof===d||u.$$typeof===p||u.$$typeof===s||u.$$typeof===i||u.$$typeof===c||u.$$typeof===st||u.getModuleId!==void 0))}function kt(u,h,g){var E=u.displayName;if(E)return E;var N=h.displayName||h.name||"";return N!==""?g+"("+N+")":g}function U(u){return u.displayName||"Context"}function W(u){if(u==null)return null;if(typeof u.tag=="number"&&j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof u=="function")return u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case n:return"Fragment";case r:return"Portal";case a:return"Profiler";case o:return"StrictMode";case l:return"Suspense";case f:return"SuspenseList"}if(typeof u=="object")switch(u.$$typeof){case i:var h=u;return U(h)+".Consumer";case s:var g=u;return U(g._context)+".Provider";case c:return kt(u,u.render,"ForwardRef");case p:var E=u.displayName||null;return E!==null?E:W(u.type)||"Memo";case d:{var N=u,A=N._payload,R=N._init;try{return W(R(A))}catch{return null}}}return null}var tt=Object.assign,nt=0,Ut,Bt,St,et,Pe,Vt,Ae;function Tt(){}Tt.__reactDisabledLog=!0;function le(){{if(nt===0){Ut=console.log,Bt=console.info,St=console.warn,et=console.error,Pe=console.group,Vt=console.groupCollapsed,Ae=console.groupEnd;var u={configurable:!0,enumerable:!0,value:Tt,writable:!0};Object.defineProperties(console,{info:u,log:u,warn:u,error:u,group:u,groupCollapsed:u,groupEnd:u})}nt++}}function Me(){{if(nt--,nt===0){var u={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:tt({},u,{value:Ut}),info:tt({},u,{value:Bt}),warn:tt({},u,{value:St}),error:tt({},u,{value:et}),group:tt({},u,{value:Pe}),groupCollapsed:tt({},u,{value:Vt}),groupEnd:tt({},u,{value:Ae})})}nt<0&&j("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var J=C.ReactCurrentDispatcher,Ot;function $t(u,h,g){{if(Ot===void 0)try{throw Error()}catch(N){var E=N.stack.trim().match(/\n( *(at )?)/);Ot=E&&E[1]||""}return`
37
+ `+Ot+u}}var jt=!1,zt;{var ei=typeof WeakMap=="function"?WeakMap:Map;zt=new ei}function vn(u,h){if(!u||jt)return"";{var g=zt.get(u);if(g!==void 0)return g}var E;jt=!0;var N=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var A;A=J.current,J.current=null,le();try{if(h){var R=function(){throw Error()};if(Object.defineProperty(R.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(R,[])}catch(gt){E=gt}Reflect.construct(u,[],R)}else{try{R.call()}catch(gt){E=gt}u.call(R.prototype)}}else{try{throw Error()}catch(gt){E=gt}u()}}catch(gt){if(gt&&E&&typeof gt.stack=="string"){for(var $=gt.stack.split(`
38
+ `),q=E.stack.split(`
39
+ `),V=$.length-1,H=q.length-1;V>=1&&H>=0&&$[V]!==q[H];)H--;for(;V>=1&&H>=0;V--,H--)if($[V]!==q[H]){if(V!==1||H!==1)do if(V--,H--,H<0||$[V]!==q[H]){var ot=`
40
+ `+$[V].replace(" at new "," at ");return u.displayName&&ot.includes("<anonymous>")&&(ot=ot.replace("<anonymous>",u.displayName)),typeof u=="function"&&zt.set(u,ot),ot}while(V>=1&&H>=0);break}}}finally{jt=!1,J.current=A,Me(),Error.prepareStackTrace=N}var Wt=u?u.displayName||u.name:"",$n=Wt?$t(Wt):"";return typeof u=="function"&&zt.set(u,$n),$n}function ri(u,h,g){return vn(u,!1)}function ni(u){var h=u.prototype;return!!(h&&h.isReactComponent)}function De(u,h,g){if(u==null)return"";if(typeof u=="function")return vn(u,ni(u));if(typeof u=="string")return $t(u);switch(u){case l:return $t("Suspense");case f:return $t("SuspenseList")}if(typeof u=="object")switch(u.$$typeof){case c:return ri(u.render);case p:return De(u.type,h,g);case d:{var E=u,N=E._payload,A=E._init;try{return De(A(N),h,g)}catch{}}}return""}var Ie=Object.prototype.hasOwnProperty,gn={},mn=C.ReactDebugCurrentFrame;function Le(u){if(u){var h=u._owner,g=De(u.type,u._source,h?h.type:null);mn.setExtraStackFrame(g)}else mn.setExtraStackFrame(null)}function oi(u,h,g,E,N){{var A=Function.call.bind(Ie);for(var R in u)if(A(u,R)){var $=void 0;try{if(typeof u[R]!="function"){var q=Error((E||"React class")+": "+g+" type `"+R+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof u[R]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw q.name="Invariant Violation",q}$=u[R](h,R,E,g,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(V){$=V}$&&!($ instanceof Error)&&(Le(N),j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",E||"React class",g,R,typeof $),Le(null)),$ instanceof Error&&!($.message in gn)&&(gn[$.message]=!0,Le(N),j("Failed %s type: %s",g,$.message),Le(null))}}}var ai=Array.isArray;function er(u){return ai(u)}function ii(u){{var h=typeof Symbol=="function"&&Symbol.toStringTag,g=h&&u[Symbol.toStringTag]||u.constructor.name||"Object";return g}}function si(u){try{return yn(u),!1}catch{return!0}}function yn(u){return""+u}function bn(u){if(si(u))return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",ii(u)),yn(u)}var fe=C.ReactCurrentOwner,ci={key:!0,ref:!0,__self:!0,__source:!0},_n,Sn,rr;rr={};function ui(u){if(Ie.call(u,"ref")){var h=Object.getOwnPropertyDescriptor(u,"ref").get;if(h&&h.isReactWarning)return!1}return u.ref!==void 0}function li(u){if(Ie.call(u,"key")){var h=Object.getOwnPropertyDescriptor(u,"key").get;if(h&&h.isReactWarning)return!1}return u.key!==void 0}function fi(u,h){if(typeof u.ref=="string"&&fe.current&&h&&fe.current.stateNode!==h){var g=W(fe.current.type);rr[g]||(j('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',W(fe.current.type),u.ref),rr[g]=!0)}}function di(u,h){{var g=function(){_n||(_n=!0,j("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};g.isReactWarning=!0,Object.defineProperty(u,"key",{get:g,configurable:!0})}}function pi(u,h){{var g=function(){Sn||(Sn=!0,j("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",h))};g.isReactWarning=!0,Object.defineProperty(u,"ref",{get:g,configurable:!0})}}var hi=function(u,h,g,E,N,A,R){var $={$$typeof:e,type:u,key:h,ref:g,props:R,_owner:A};return $._store={},Object.defineProperty($._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty($,"_self",{configurable:!1,enumerable:!1,writable:!1,value:E}),Object.defineProperty($,"_source",{configurable:!1,enumerable:!1,writable:!1,value:N}),Object.freeze&&(Object.freeze($.props),Object.freeze($)),$};function vi(u,h,g,E,N){{var A,R={},$=null,q=null;g!==void 0&&(bn(g),$=""+g),li(h)&&(bn(h.key),$=""+h.key),ui(h)&&(q=h.ref,fi(h,N));for(A in h)Ie.call(h,A)&&!ci.hasOwnProperty(A)&&(R[A]=h[A]);if(u&&u.defaultProps){var V=u.defaultProps;for(A in V)R[A]===void 0&&(R[A]=V[A])}if($||q){var H=typeof u=="function"?u.displayName||u.name||"Unknown":u;$&&di(R,H),q&&pi(R,H)}return hi(u,$,q,N,E,fe.current,R)}}var nr=C.ReactCurrentOwner,On=C.ReactDebugCurrentFrame;function Gt(u){if(u){var h=u._owner,g=De(u.type,u._source,h?h.type:null);On.setExtraStackFrame(g)}else On.setExtraStackFrame(null)}var or;or=!1;function ar(u){return typeof u=="object"&&u!==null&&u.$$typeof===e}function jn(){{if(nr.current){var u=W(nr.current.type);if(u)return`
41
41
 
42
42
  Check the render method of \``+u+"`."}return""}}function gi(u){{if(u!==void 0){var h=u.fileName.replace(/^.*[\\\/]/,""),g=u.lineNumber;return`
43
43
 
44
- Check your code at `+h+":"+g+"."}return""}}var wn={};function mi(u){{var h=jn();if(!h){var g=typeof u=="string"?u:u.displayName||u.name;g&&(h=`
44
+ Check your code at `+h+":"+g+"."}return""}}var En={};function mi(u){{var h=jn();if(!h){var g=typeof u=="string"?u:u.displayName||u.name;g&&(h=`
45
45
 
46
- Check the top-level render call using <`+g+">.")}return h}}function En(u,h){{if(!u._store||u._store.validated||u.key!=null)return;u._store.validated=!0;var g=mi(h);if(wn[g])return;wn[g]=!0;var w="";u&&u._owner&&u._owner!==nr.current&&(w=" It was passed a child from "+W(u._owner.type)+"."),zt(u),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',g,w),zt(null)}}function Cn(u,h){{if(typeof u!="object")return;if(er(u))for(var g=0;g<u.length;g++){var w=u[g];ar(w)&&En(w,h)}else if(ar(u))u._store&&(u._store.validated=!0);else if(u){var x=S(u);if(typeof x=="function"&&x!==u.entries)for(var A=x.call(u),N;!(N=A.next()).done;)ar(N.value)&&En(N.value,h)}}}function yi(u){{var h=u.type;if(h==null||typeof h=="string")return;var g;if(typeof h=="function")g=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===c||h.$$typeof===d))g=h.propTypes;else return;if(g){var w=W(h);oi(g,u.props,"prop",w,u)}else if(h.PropTypes!==void 0&&!or){or=!0;var x=W(h);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",x||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function bi(u){{for(var h=Object.keys(u.props),g=0;g<h.length;g++){var w=h[g];if(w!=="children"&&w!=="key"){zt(u),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",w),zt(null);break}}u.ref!==null&&(zt(u),j("Invalid attribute `ref` supplied to `React.Fragment`."),zt(null))}}function Tn(u,h,g,w,x,A){{var N=vt(u);if(!N){var R="";(u===void 0||typeof u=="object"&&u!==null&&Object.keys(u).length===0)&&(R+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var q=gi(x);q?R+=q:R+=jn();var V;u===null?V="null":er(u)?V="array":u!==void 0&&u.$$typeof===e?(V="<"+(W(u.type)||"Unknown")+" />",R=" Did you accidentally export a JSX literal instead of a component?"):V=typeof u,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",V,R)}var H=vi(u,h,g,x,A);if(H==null)return H;if(N){var ot=h.children;if(ot!==void 0)if(w)if(er(ot)){for(var Wt=0;Wt<ot.length;Wt++)Cn(ot[Wt],u);Object.freeze&&Object.freeze(ot)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Cn(ot,u)}return u===n?bi(H):yi(H),H}}function _i(u,h,g){return Tn(u,h,g,!0)}function Si(u,h,g){return Tn(u,h,g,!1)}var Oi=Si,ji=_i;ve.Fragment=n,ve.jsx=Oi,ve.jsxs=ji}()),ve}process.env.NODE_ENV==="production"?Mr.exports=Bg():Mr.exports=Vg();var Gg=Mr.exports;const zg=Gg.jsx,_t=t=>{const e={};return t.forEach(r=>{e[r.key]=r.value}),e},Wg=[...Fg,...Ap],Hg=Wg.reduce((t,e)=>(t[e]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),T.createElement(e,{...o,..._t(n)},...a)},t),{}),Yg=({children:t,width:e,height:r,$$attributes:n=[],...o})=>{let a=t;Array.isArray(t)||(a=[t]),a=a.filter(l=>l!==void 0);const{style:s={},...i}=_t(n),c={height:r,width:e,...s,...o.style||{}};return T.createElement("div",{...o,...i,style:c},...a)},Jg=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),T.createElement("canvas",{...r,..._t(e)},...n)},qg=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),T.createElement("img",{...r,..._t(e)},...n)},Qg=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),T.createElement("video",{...r,..._t(e)},...n)},Kg=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),T.createElement("audio",{...r,..._t(e)},...n)},Xg=({$$attributes:t=[],content:e,...r})=>T.createElement("span",{...r,..._t(t)},e),Zg=({children:t,$$attributes:e=[],afterMount:r,beforeDestroy:n,...o})=>{let a=t;return Array.isArray(t)||(a=[t]),T.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),zg("div",{...o,..._t(e),children:a})},tm=({children:t,$$attributes:e=[],htmlTag:r="div",...n})=>{let o=t;Array.isArray(t)||(o=[t]);const{style:a={},...s}=_t(e),i={...a,...n.style||{}};return T.createElement(r,{...n,...s,style:i},...o)},em={RootContainer:({children:t})=>t,...Hg,CContainer:Zg,CVideo:Qg,CAudio:Kg,CBlock:Yg,CImage:qg,CText:Xg,CCanvas:Jg,CNativeTag:tm};class rm{constructor(){O(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 qa extends T.Component{constructor(r){super(r);O(this,"refManager");O(this,"dynamicComponentInstanceMap",new Map);O(this,"onGetRef",(r,n,o)=>{var a,s;(s=(a=this.props).onGetRef)==null||s.call(a,r,n,o),this.dynamicComponentInstanceMap.set(n.id,o),this.refManager.add(n.value.refId||n.id,r)});O(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(te(r)&&va(r)){const n=r;this.setState({pageModel:new Ge(n,{materials:this.state.pageModel.materialsModel.rawValue})})}});this.state={pageModel:r.pageModel||new Ge(r.page)},this.refManager=new rm}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:s}=r,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const c={...em,...r.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:c,onGetRef:this.onGetRef,onGetComponent:o,onComponentMount:s,onComponentDestroy:a,$$context:l,renderMode:r.renderMode,processNodeConfigHook:r.processNodeConfigHook})}}const nm=()=>{const t=T.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)}}};class om extends T.Component{constructor(r){super(r);O(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=T.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,T.createElement("p",null,"msg: ",String(this.state.error)),T.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"),T.createElement("div",{style:{display:"none"}}));return T.createElement(this.props.targetComponent,{onlyRenderChild:!0},o)}return this.props.children}}class Qa{constructor(){O(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 Ka=t=>{const{node:e}=t,r=T.useMemo(()=>{const i=e.isContainer();return te(i)?i:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[t.node]),{placeholder:n,height:o,width:a,style:s}=r;return T.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",minWidth:"300px",minHeight:"50px",width:a,height:o,...s}},n)};class am extends T.Component{constructor(r){super(r);O(this,"instanceManager",new Qa);O(this,"renderRef");O(this,"dropPlaceholder",Ka);O(this,"onGetComponent",(r,n)=>{var c,l;const o=this;let a=r;const s=(l=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:l.wrapComponent;s&&(a=s(r,{node:n,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class i extends T.Component{constructor(){super(...arguments);O(this,"_DESIGN_BOX",!0);O(this,"_NODE_MODEL",n);O(this,"_NODE_ID",n.id);O(this,"_UNIQUE_ID",`${n.id}_${ht()}`);O(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){const{children:p=[],onlyRenderChild:v,...m}=this.props;let _=p;return Zt(p)||(_=[p]),!!!_.filter(Boolean).length&&(n.isContainer()||n.value.componentName===ae.ROOT_CONTAINER)&&_.push(T.createElement(o.dropPlaceholder,{node:n})),v?_:T.createElement(a,m,..._)}}return T.forwardRef(function(d,p){return T.createElement(om,{node:n,targetComponent:i},T.createElement(i,{ref:p,...d}))})});this.renderRef=T.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=Xa(r);if(!n)return null;const o=Za(n);return(o==null?void 0:o.stateNode)||null}getDomsById(r,n){const o=this.getInstancesById(r),a=[];return o==null||o.forEach(s=>{var c;if((s==null?void 0:s._STATUS)==="DESTROY")return;const i=Ri.findDOMNode(s);if(i&&!(i instanceof Text))if(n){const l=Array.from(((c=i.querySelectorAll)==null?void 0:c.call(i,n))||[]);a.push(...l)}else a.push(i)}),a}getDomRectById(r,n){return this.getDomsById(r,n).map(s=>s==null?void 0:s.getBoundingClientRect()).filter(Boolean)}render(){const{props:r,onGetComponent:n}=this,{render:o,...a}=r;return o&&(o.ref.current=this),T.createElement(qa,{onGetComponent:n,...a,processNodeConfigHook:(s,i)=>{var m,_;if(i.nodeType!=="NODE")return s;const{props:c,condition:l}=s;let f={...c};const d=((m=i.value.configure)==null?void 0:m.devState)||{},p=(_=i.material)==null?void 0:_.value.fixedProps;if(p!==void 0){if(te(p))f={...f,...p};else if(typeof p=="function"){const S=p(f);f={...f,...S}}}let v=l;return d.condition===!1&&(v=d.condition),{props:Tg(f,d.props||{}),condition:v}},ref:this.renderRef})}}const Xa=t=>{if(!t)return null;const e=Object.keys(t).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return e?t[e]:Xa(t.parentElement)},Za=t=>{var e;return t?(e=t==null?void 0:t.stateNode)!=null&&e._DESIGN_BOX?t:Za(t.return):null},im=()=>{const t=T.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 ti={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(kg,function(){var r=function(){},n={},o={},a={};function s(p,v){p=p.push?p:[p];var m=[],_=p.length,S=_,C,j,F,D;for(C=function(Y,Q){Q.length&&m.push(Y),S--,S||v(m)};_--;){if(j=p[_],F=o[j],F){C(j,F);continue}D=a[j]=a[j]||[],D.push(C)}}function i(p,v){if(p){var m=a[p];if(o[p]=v,!!m)for(;m.length;)m[0](p,v),m.splice(0,1)}}function c(p,v){p.call&&(p={success:p}),v.length?(p.error||r)(v):(p.success||r)(p)}function l(p,v,m,_){var S=document,C=m.async,j=(m.numRetries||0)+1,F=m.before||r,D=p.replace(/[\?|#].*$/,""),Y=p.replace(/^(css|img|module|nomodule)!/,""),Q,Ct,P;if(_=_||0,/(^css!|\.css$)/.test(D))P=S.createElement("link"),P.rel="stylesheet",P.href=Y,Q="hideFocus"in P,Q&&P.relList&&(Q=0,P.rel="preload",P.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(D))P=S.createElement("img"),P.src=Y;else if(P=S.createElement("script"),P.src=Y,P.async=C===void 0?!0:C,Ct="noModule"in P,/^module!/.test(D)){if(!Ct)return v(p,"l");P.type="module"}else if(/^nomodule!/.test(D)&&Ct)return v(p,"l");P.onload=P.onerror=P.onbeforeload=function(st){var vt=st.type[0];if(Q)try{P.sheet.cssText.length||(vt="e")}catch(kt){kt.code!=18&&(vt="e")}if(vt=="e"){if(_+=1,_<j)return l(p,v,m,_)}else if(P.rel=="preload"&&P.as=="style")return P.rel="stylesheet";v(p,vt,st.defaultPrevented)},F(p,P)!==!1&&S.head.appendChild(P)}function f(p,v,m){p=p.push?p:[p];var _=p.length,S=_,C=[],j,F;for(j=function(D,Y,Q){if(Y=="e"&&C.push(D),Y=="b")if(Q)C.push(D);else return;_--,_||v(C)},F=0;F<S;F++)l(p[F],j,m)}function d(p,v,m){var _,S;if(v&&v.trim&&(_=v),S=(_?m:v)||{},_){if(_ in n)throw"LoadJS";n[_]=!0}function C(j,F){f(p,function(D){c(S,D),j&&c({success:j,error:F},D),i(_,D)},S)}if(S.returnPromise)return new Promise(C);C()}return d.ready=function(v,m){return s(v,function(_){c(m,_)}),d},d.done=function(v){i(v,[])},d.reset=function(){n={},o={},a={}},d.isDefined=function(v){return v in n},d})})(ti);var sm=ti.exports;const To=Ug(sm);class cm{constructor(e,r){O(this,"assets");O(this,"loadStatus");O(this,"win",window);O(this,"_onSuccessList",[]);O(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=ht()),r.push(o.id);const a=o.resources.map(s=>s.src);a.length&&To(a,o.id,{async:!1,before:(s,i)=>(this.win.document.body.appendChild(i),!1)})}return new Promise((n,o)=>{if(e.length===0){this._onSuccessList.forEach(a=>a()),n("");return}To.ready(r,{success:()=>{this._onSuccessList.forEach(a=>a()),n("")},error:a=>{this._onErrorList.forEach(s=>s(a)),o(a)}})})}onSuccess(e){return this._onSuccessList.push(e),this}onError(e){return this._onErrorList.push(e),this}}exports.AssetLoader=cm;exports.ComponentInstanceManager=Qa;exports.DefaultDropPlaceholder=Ka;exports.DefineReactAdapter=Ja;exports.DesignRender=am;exports.ReactAdapter=Lg;exports.Render=qa;exports.canAcceptsRef=Ga;exports.collectVariable=Ng;exports.compWrapper=za;exports.convertCodeStringToFunction=Wa;exports.flatObject=xg;exports.formatSourceStylePropertyName=$r;exports.getAdapter=Ro;exports.getCSSTextValue=Ar;exports.getComponentsLibs=Pg;exports.getMatchVal=Ha;exports.getObjFromArrayMap=Pr;exports.getThirdLibs=$g;exports.isClass=Rg;exports.runExpression=Pt;exports.shouldConstruct=Va;exports.useDesignRender=im;exports.useRender=nm;
46
+ Check the top-level render call using <`+g+">.")}return h}}function wn(u,h){{if(!u._store||u._store.validated||u.key!=null)return;u._store.validated=!0;var g=mi(h);if(En[g])return;En[g]=!0;var E="";u&&u._owner&&u._owner!==nr.current&&(E=" It was passed a child from "+W(u._owner.type)+"."),Gt(u),j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',g,E),Gt(null)}}function Cn(u,h){{if(typeof u!="object")return;if(er(u))for(var g=0;g<u.length;g++){var E=u[g];ar(E)&&wn(E,h)}else if(ar(u))u._store&&(u._store.validated=!0);else if(u){var N=S(u);if(typeof N=="function"&&N!==u.entries)for(var A=N.call(u),R;!(R=A.next()).done;)ar(R.value)&&wn(R.value,h)}}}function yi(u){{var h=u.type;if(h==null||typeof h=="string")return;var g;if(typeof h=="function")g=h.propTypes;else if(typeof h=="object"&&(h.$$typeof===c||h.$$typeof===p))g=h.propTypes;else return;if(g){var E=W(h);oi(g,u.props,"prop",E,u)}else if(h.PropTypes!==void 0&&!or){or=!0;var N=W(h);j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",N||"Unknown")}typeof h.getDefaultProps=="function"&&!h.getDefaultProps.isReactClassApproved&&j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function bi(u){{for(var h=Object.keys(u.props),g=0;g<h.length;g++){var E=h[g];if(E!=="children"&&E!=="key"){Gt(u),j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",E),Gt(null);break}}u.ref!==null&&(Gt(u),j("Invalid attribute `ref` supplied to `React.Fragment`."),Gt(null))}}function Tn(u,h,g,E,N,A){{var R=vt(u);if(!R){var $="";(u===void 0||typeof u=="object"&&u!==null&&Object.keys(u).length===0)&&($+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var q=gi(N);q?$+=q:$+=jn();var V;u===null?V="null":er(u)?V="array":u!==void 0&&u.$$typeof===e?(V="<"+(W(u.type)||"Unknown")+" />",$=" Did you accidentally export a JSX literal instead of a component?"):V=typeof u,j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",V,$)}var H=vi(u,h,g,N,A);if(H==null)return H;if(R){var ot=h.children;if(ot!==void 0)if(E)if(er(ot)){for(var Wt=0;Wt<ot.length;Wt++)Cn(ot[Wt],u);Object.freeze&&Object.freeze(ot)}else j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Cn(ot,u)}return u===n?bi(H):yi(H),H}}function _i(u,h,g){return Tn(u,h,g,!0)}function Si(u,h,g){return Tn(u,h,g,!1)}var Oi=Si,ji=_i;ve.Fragment=n,ve.jsx=Oi,ve.jsxs=ji}()),ve}process.env.NODE_ENV==="production"?Mr.exports=Bg():Mr.exports=Vg();var zg=Mr.exports;const Gg=zg.jsx,_t=t=>{const e={};return t.forEach(r=>{e[r.key]=r.value}),e},Wg=[...Fg,...Ad],Hg=Wg.reduce((t,e)=>(t[e]=({children:r,$$attributes:n=[],...o})=>{let a=r;return Array.isArray(r)||(a=[r]),T.createElement(e,{...o,..._t(n)},...a)},t),{}),Yg=({children:t,width:e,height:r,$$attributes:n=[],...o})=>{let a=t;Array.isArray(t)||(a=[t]),a=a.filter(l=>l!==void 0);const{style:s={},...i}=_t(n),c={height:r,width:e,...s,...o.style||{}};return T.createElement("div",{...o,...i,style:c},...a)},Jg=({afterMount:t,beforeDestroy:e,$$attributes:r=[],...n})=>(T.useEffect(()=>(t==null||t(n),()=>{e==null||e(n)}),[]),T.createElement("canvas",{...n,..._t(r)})),qg=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),T.createElement("img",{...r,..._t(e)},...n)},Qg=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),T.createElement("video",{...r,..._t(e)},...n)},Kg=({children:t,$$attributes:e=[],...r})=>{let n=t;return Array.isArray(t)||(n=[t]),T.createElement("audio",{...r,..._t(e)},...n)},Xg=({$$attributes:t=[],content:e,...r})=>T.createElement("span",{...r,..._t(t)},e),Zg=({children:t,$$attributes:e=[],afterMount:r,beforeDestroy:n,...o})=>{let a=t;return Array.isArray(t)||(a=[t]),T.useEffect(()=>(r==null||r(o),()=>{n==null||n(o)}),[]),Gg("div",{...o,..._t(e),children:a})},tm=({children:t,$$attributes:e=[],htmlTag:r="div",...n})=>{let o=t;Array.isArray(t)||(o=[t]);const{style:a={},...s}=_t(e),i={...a,...n.style||{}};return T.createElement(r,{...n,...s,style:i},...o)},em={RootContainer:({children:t})=>t,...Hg,CContainer:Zg,CVideo:Qg,CAudio:Kg,CBlock:Yg,CImage:qg,CText:Xg,CCanvas:Jg,CNativeTag:tm};class rm{constructor(){O(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 qa extends T.Component{constructor(r){super(r);O(this,"refManager");O(this,"dynamicComponentInstanceMap",new Map);O(this,"onGetRef",(r,n,o)=>{var a,s;(s=(a=this.props).onGetRef)==null||s.call(a,r,n,o),this.dynamicComponentInstanceMap.set(n.id,o),this.refManager.add(n.value.refId||n.id,r)});O(this,"rerender",r=>{if(this.props.adapter.clear(),(r==null?void 0:r.nodeType)==="PAGE"&&r)this.setState({pageModel:r});else if(te(r)&&va(r)){const n=r;this.setState({pageModel:new ze(n,{materials:this.state.pageModel.materialsModel.rawValue})})}});this.state={pageModel:r.pageModel||new ze(r.page)},this.refManager=new rm}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:s}=r,{pageModel:i}=this.state;if(!i)return console.warn("pageModel is null"),null;const c={...em,...r.components},l=this.props.$$context??{};return l.refs=this.refManager,n.pageRender(i,{libs:{},components:c,onGetRef:this.onGetRef,onGetComponent:o,onComponentMount:s,onComponentDestroy:a,$$context:l,renderMode:r.renderMode,processNodeConfigHook:r.processNodeConfigHook})}}const nm=()=>{const t=T.useRef(null);return{ref:t,rerender:function(...e){t.current&&t.current.rerender(...e)}}};class om extends T.Component{constructor(r){super(r);O(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=T.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,T.createElement("p",null,"msg: ",String(this.state.error)),T.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"),T.createElement("div",{style:{display:"none"}}));return T.createElement(this.props.targetComponent,{onlyRenderChild:!0},o)}return this.props.children}}class Qa{constructor(){O(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 Ka=t=>{const{node:e}=t,r=T.useMemo(()=>{const i=e.isContainer();return te(i)?i:{placeholder:"Drag the component to place it",width:"100%",height:"100%",style:{}}},[t.node]),{placeholder:n,height:o,width:a,style:s}=r;return T.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",minWidth:"300px",minHeight:"50px",width:a,height:o,...s}},n)};class am extends T.Component{constructor(r){super(r);O(this,"instanceManager",new Qa);O(this,"renderRef");O(this,"dropPlaceholder",Ka);O(this,"onGetComponent",(r,n)=>{var c,l;const o=this;let a=r;const s=(l=(c=n.material)==null?void 0:c.value.advanceCustom)==null?void 0:l.wrapComponent;s&&(a=s(r,{node:n,ctx:window.__C_ENGINE_DESIGNER_PLUGIN_CTX__}));class i extends T.Component{constructor(){super(...arguments);O(this,"_DESIGN_BOX",!0);O(this,"_NODE_MODEL",n);O(this,"_NODE_ID",n.id);O(this,"_UNIQUE_ID",`${n.id}_${ht()}`);O(this,"_STATUS")}componentDidMount(){o.instanceManager.add(n.id,this)}componentWillUnmount(){this._STATUS="DESTROY",o.instanceManager.remove(n.id,this)}render(){const{children:d=[],onlyRenderChild:v,...m}=this.props;let _=d;return Zt(d)||(_=[d]),!!!_.filter(Boolean).length&&(n.isContainer()||n.value.componentName===ae.ROOT_CONTAINER)&&_.push(T.createElement(o.dropPlaceholder,{node:n})),v?_:T.createElement(a,m,..._)}}return T.forwardRef(function(p,d){return T.createElement(om,{node:n,targetComponent:i},T.createElement(i,{ref:d,...p}))})});this.renderRef=T.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=Xa(r);if(!n)return null;const o=Za(n);return(o==null?void 0:o.stateNode)||null}getDomsById(r,n){const o=this.getInstancesById(r),a=[];return o==null||o.forEach(s=>{var c;if((s==null?void 0:s._STATUS)==="DESTROY")return;const i=$i.findDOMNode(s);if(i&&!(i instanceof Text))if(n){const l=Array.from(((c=i.querySelectorAll)==null?void 0:c.call(i,n))||[]);a.push(...l)}else a.push(i)}),a}getDomRectById(r,n){return this.getDomsById(r,n).map(s=>s==null?void 0:s.getBoundingClientRect()).filter(Boolean)}render(){const{props:r,onGetComponent:n}=this,{render:o,...a}=r;return o&&(o.ref.current=this),T.createElement(qa,{onGetComponent:n,...a,processNodeConfigHook:(s,i)=>{var m,_;if(i.nodeType!=="NODE")return s;const{props:c,condition:l}=s;let f={...c};const p=((m=i.value.configure)==null?void 0:m.devState)||{},d=(_=i.material)==null?void 0:_.value.fixedProps;if(d!==void 0){if(te(d))f={...f,...d};else if(typeof d=="function"){const S=d(f);f={...f,...S}}}let v=l;return p.condition===!1&&(v=p.condition),{props:Tg(f,p.props||{}),condition:v}},ref:this.renderRef})}}const Xa=t=>{if(!t)return null;const e=Object.keys(t).find(r=>r.startsWith("__reactInternalInstance$")||r.startsWith("__reactFiber$"))||"";return e?t[e]:Xa(t.parentElement)},Za=t=>{var e;return t?(e=t==null?void 0:t.stateNode)!=null&&e._DESIGN_BOX?t:Za(t.return):null},im=()=>{const t=T.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 ti={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(kg,function(){var r=function(){},n={},o={},a={};function s(d,v){d=d.push?d:[d];var m=[],_=d.length,S=_,C,j,F,D;for(C=function(Y,Q){Q.length&&m.push(Y),S--,S||v(m)};_--;){if(j=d[_],F=o[j],F){C(j,F);continue}D=a[j]=a[j]||[],D.push(C)}}function i(d,v){if(d){var m=a[d];if(o[d]=v,!!m)for(;m.length;)m[0](d,v),m.splice(0,1)}}function c(d,v){d.call&&(d={success:d}),v.length?(d.error||r)(v):(d.success||r)(d)}function l(d,v,m,_){var S=document,C=m.async,j=(m.numRetries||0)+1,F=m.before||r,D=d.replace(/[\?|#].*$/,""),Y=d.replace(/^(css|img|module|nomodule)!/,""),Q,Ct,x;if(_=_||0,/(^css!|\.css$)/.test(D))x=S.createElement("link"),x.rel="stylesheet",x.href=Y,Q="hideFocus"in x,Q&&x.relList&&(Q=0,x.rel="preload",x.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(D))x=S.createElement("img"),x.src=Y;else if(x=S.createElement("script"),x.src=Y,x.async=C===void 0?!0:C,Ct="noModule"in x,/^module!/.test(D)){if(!Ct)return v(d,"l");x.type="module"}else if(/^nomodule!/.test(D)&&Ct)return v(d,"l");x.onload=x.onerror=x.onbeforeload=function(st){var vt=st.type[0];if(Q)try{x.sheet.cssText.length||(vt="e")}catch(kt){kt.code!=18&&(vt="e")}if(vt=="e"){if(_+=1,_<j)return l(d,v,m,_)}else if(x.rel=="preload"&&x.as=="style")return x.rel="stylesheet";v(d,vt,st.defaultPrevented)},F(d,x)!==!1&&S.head.appendChild(x)}function f(d,v,m){d=d.push?d:[d];var _=d.length,S=_,C=[],j,F;for(j=function(D,Y,Q){if(Y=="e"&&C.push(D),Y=="b")if(Q)C.push(D);else return;_--,_||v(C)},F=0;F<S;F++)l(d[F],j,m)}function p(d,v,m){var _,S;if(v&&v.trim&&(_=v),S=(_?m:v)||{},_){if(_ in n)throw"LoadJS";n[_]=!0}function C(j,F){f(d,function(D){c(S,D),j&&c({success:j,error:F},D),i(_,D)},S)}if(S.returnPromise)return new Promise(C);C()}return p.ready=function(v,m){return s(v,function(_){c(m,_)}),p},p.done=function(v){i(v,[])},p.reset=function(){n={},o={},a={}},p.isDefined=function(v){return v in n},p})})(ti);var sm=ti.exports;const To=Ug(sm);class cm{constructor(e,r){O(this,"assets");O(this,"loadStatus");O(this,"win",window);O(this,"_onSuccessList",[]);O(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=ht()),r.push(o.id);const a=o.resources.map(s=>s.src);a.length&&To(a,o.id,{async:!1,before:(s,i)=>(this.win.document.body.appendChild(i),!1)})}return new Promise((n,o)=>{if(e.length===0){this._onSuccessList.forEach(a=>a()),n("");return}To.ready(r,{success:()=>{this._onSuccessList.forEach(a=>a()),n("")},error:a=>{this._onErrorList.forEach(s=>s(a)),o(a)}})})}onSuccess(e){return this._onSuccessList.push(e),this}onError(e){return this._onErrorList.push(e),this}}exports.AssetLoader=cm;exports.ComponentInstanceManager=Qa;exports.DefaultDropPlaceholder=Ka;exports.DefineReactAdapter=Ja;exports.DesignRender=am;exports.ReactAdapter=Lg;exports.Render=qa;exports.canAcceptsRef=za;exports.collectVariable=Rg;exports.compWrapper=Ga;exports.convertCodeStringToFunction=Wa;exports.flatObject=Ng;exports.formatSourceStylePropertyName=Pr;exports.getAdapter=$o;exports.getCSSTextValue=Ar;exports.getComponentsLibs=xg;exports.getMatchVal=Ha;exports.getObjFromArrayMap=xr;exports.getThirdLibs=Pg;exports.isClass=$g;exports.runExpression=xt;exports.shouldConstruct=Va;exports.useDesignRender=im;exports.useRender=nm;
47
47
  //# sourceMappingURL=index.js.map