@chamn/render 0.0.10 → 0.0.11
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.cjs.js → index.js} +2 -2
- package/dist/index.js.map +1 -0
- package/dist/{index.es.js → index.mjs} +2 -2
- package/dist/index.mjs.map +1 -0
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +11 -8
- package/.eslintignore +0 -1
- package/.eslintrc.js +0 -31
- package/.prettierrc.json +0 -7
- package/CHANGELOG.md +0 -44
- package/__tests__/demo.test.ts +0 -3
- package/build.config.ts +0 -29
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.es.js.map +0 -1
- package/index.html +0 -16
- package/jest.config.js +0 -196
- package/public/vite.svg +0 -1
- package/src/_dev_/components.tsx +0 -12
- package/src/_dev_/dev.tsx +0 -12
- package/src/_dev_/index.css +0 -13
- package/src/_dev_/page/DesignerRenderDemo.tsx +0 -65
- package/src/_dev_/page/RenderDemo.tsx +0 -60
- package/src/_dev_/router.tsx +0 -15
- package/src/commonComponent/index.tsx +0 -184
- package/src/const/index.ts +0 -5
- package/src/core/ReactErrorBoundary.ts +0 -91
- package/src/core/adapter.ts +0 -133
- package/src/core/adapterReact.ts +0 -734
- package/src/core/designReactRender.ts +0 -325
- package/src/core/refManager.ts +0 -18
- package/src/core/render.ts +0 -123
- package/src/core/storeManager.ts +0 -57
- package/src/core/type.ts +0 -10
- package/src/index.ts +0 -6
- package/src/util/assetsLoader.ts +0 -73
- package/src/util/index.ts +0 -164
- package/src/vite-env.d.ts +0 -1
- package/stats.html +0 -6177
- package/tsconfig.json +0 -26
package/dist/index.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
(function(y,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],_):(y=typeof globalThis<"u"?globalThis:y||self,_(y.CRender={},y.React,y.ReactDOM))})(this,function(y,_,ut){"use strict";var Cv=Object.defineProperty;var Ev=(y,_,ut)=>_ in y?Cv(y,_,{enumerable:!0,configurable:!0,writable:!0,value:ut}):y[_]=ut;var b=(y,_,ut)=>(Ev(y,typeof _!="symbol"?_+"":_,ut),ut);function oa(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 aa=oa(ut),ia=t=>()=>{console.warn(`${t} need to be implement getComponent`)},sa=["customPageRootRender"],Ir=["pageRender","render","convertModelToComponent","getComponent","getContext","getUtils","getDataLink","createDataLink","transformProps","transformData","transformGlobalData","errorCatch","clear"],Rr=t=>[...Ir,...sa].reduce((r,n)=>{var o;return t!=null&&t[n]?r[n]=(o=t[n])==null?void 0:o.bind(t):Ir.includes(n)&&(r[n]=ia),r},{});var ca=Object.defineProperty,ua=(t,e,r)=>e in t?ca(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,S=(t,e,r)=>(ua(t,typeof e!="symbol"?e+"":e,r),r),la=typeof global=="object"&&global&&global.Object===Object&&global;const Lr=la;var fa=typeof self=="object"&&self&&self.Object===Object&&self,pa=Lr||fa||Function("return this")();const q=pa;var da=q.Symbol;const k=da;var Fr=Object.prototype,ha=Fr.hasOwnProperty,va=Fr.toString,Ft=k?k.toStringTag:void 0;function ma(t){var e=ha.call(t,Ft),r=t[Ft];try{t[Ft]=void 0;var n=!0}catch{}var o=va.call(t);return n&&(e?t[Ft]=r:delete t[Ft]),o}var ya=Object.prototype,ga=ya.toString;function ba(t){return ga.call(t)}var _a="[object Null]",ja="[object Undefined]",Br=k?k.toStringTag:void 0;function lt(t){return t==null?t===void 0?ja:_a:Br&&Br in Object(t)?ma(t):ba(t)}function Q(t){return t!=null&&typeof t=="object"}var Sa="[object Symbol]";function we(t){return typeof t=="symbol"||Q(t)&<(t)==Sa}function Ce(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 Oa=Array.isArray;const P=Oa;var wa=1/0,Ur=k?k.prototype:void 0,kr=Ur?Ur.toString:void 0;function zr(t){if(typeof t=="string")return t;if(P(t))return Ce(t,zr)+"";if(we(t))return kr?kr.call(t):"";var e=t+"";return e=="0"&&1/t==-wa?"-0":e}function G(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function Ee(t){return t}var Ca="[object AsyncFunction]",Ea="[object Function]",Na="[object GeneratorFunction]",$a="[object Proxy]";function Ne(t){if(!G(t))return!1;var e=lt(t);return e==Ea||e==Na||e==Ca||e==$a}var Ta=q["__core-js_shared__"];const $e=Ta;var Gr=function(){var t=/[^.]+$/.exec($e&&$e.keys&&$e.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Aa(t){return!!Gr&&Gr in t}var Ma=Function.prototype,Pa=Ma.toString;function ft(t){if(t!=null){try{return Pa.call(t)}catch{}try{return t+""}catch{}}return""}var Da=/[\\^$.*+?()[\]{}|]/g,xa=/^\[object .+?Constructor\]$/,Ia=Function.prototype,Ra=Object.prototype,La=Ia.toString,Fa=Ra.hasOwnProperty,Ba=RegExp("^"+La.call(Fa).replace(Da,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ua(t){if(!G(t)||Aa(t))return!1;var e=Ne(t)?Ba:xa;return e.test(ft(t))}function ka(t,e){return t==null?void 0:t[e]}function pt(t,e){var r=ka(t,e);return Ua(r)?r:void 0}var za=pt(q,"WeakMap");const Te=za;var Hr=Object.create,Ga=function(){function t(){}return function(e){if(!G(e))return{};if(Hr)return Hr(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Ha=Ga;function Va(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 Wa(){}function Vr(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var Ja=800,qa=16,Qa=Date.now;function Ya(t){var e=0,r=0;return function(){var n=Qa(),o=qa-(n-r);if(r=n,o>0){if(++e>=Ja)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Xa(t){return function(){return t}}var Ka=function(){try{var t=pt(Object,"defineProperty");return t({},"",{}),t}catch{}}();const ne=Ka;var Za=ne?function(t,e){return ne(t,"toString",{configurable:!0,enumerable:!1,value:Xa(e),writable:!0})}:Ee,ti=Ya(Za);const Wr=ti;function ei(t,e){for(var r=-1,n=t==null?0:t.length;++r<n&&e(t[r],r,t)!==!1;);return t}function ri(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 ni(t){return t!==t}function oi(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}function ai(t,e,r){return e===e?oi(t,e,r):ri(t,ni,r)}function ii(t,e){var r=t==null?0:t.length;return!!r&&ai(t,e,0)>-1}var si=9007199254740991,ci=/^(?:0|[1-9]\d*)$/;function oe(t,e){var r=typeof t;return e=e??si,!!e&&(r=="number"||r!="symbol"&&ci.test(t))&&t>-1&&t%1==0&&t<e}function Ae(t,e,r){e=="__proto__"&&ne?ne(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function Bt(t,e){return t===e||t!==t&&e!==e}var ui=Object.prototype,li=ui.hasOwnProperty;function Me(t,e,r){var n=t[e];(!(li.call(t,e)&&Bt(n,r))||r===void 0&&!(e in t))&&Ae(t,e,r)}function _t(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?Ae(r,i,c):Me(r,i,c)}return r}var Jr=Math.max;function qr(t,e,r){return e=Jr(e===void 0?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=Jr(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),Va(t,this,i)}}function Qr(t,e){return Wr(qr(t,e,Ee),t+"")}var fi=9007199254740991;function Pe(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=fi}function ae(t){return t!=null&&Pe(t.length)&&!Ne(t)}function pi(t,e,r){if(!G(r))return!1;var n=typeof e;return(n=="number"?ae(r)&&oe(e,r.length):n=="string"&&e in r)?Bt(r[e],t):!1}function di(t){return Qr(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&&pi(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 hi=Object.prototype;function De(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||hi;return t===r}function vi(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var mi="[object Arguments]";function Yr(t){return Q(t)&<(t)==mi}var Xr=Object.prototype,yi=Xr.hasOwnProperty,gi=Xr.propertyIsEnumerable,bi=Yr(function(){return arguments}())?Yr:function(t){return Q(t)&&yi.call(t,"callee")&&!gi.call(t,"callee")};const Ut=bi;function _i(){return!1}var Kr=typeof y=="object"&&y&&!y.nodeType&&y,Zr=Kr&&typeof module=="object"&&module&&!module.nodeType&&module,ji=Zr&&Zr.exports===Kr,tn=ji?q.Buffer:void 0,Si=tn?tn.isBuffer:void 0,Oi=Si||_i;const kt=Oi;var wi="[object Arguments]",Ci="[object Array]",Ei="[object Boolean]",Ni="[object Date]",$i="[object Error]",Ti="[object Function]",Ai="[object Map]",Mi="[object Number]",Pi="[object Object]",Di="[object RegExp]",xi="[object Set]",Ii="[object String]",Ri="[object WeakMap]",Li="[object ArrayBuffer]",Fi="[object DataView]",Bi="[object Float32Array]",Ui="[object Float64Array]",ki="[object Int8Array]",zi="[object Int16Array]",Gi="[object Int32Array]",Hi="[object Uint8Array]",Vi="[object Uint8ClampedArray]",Wi="[object Uint16Array]",Ji="[object Uint32Array]",$={};$[Bi]=$[Ui]=$[ki]=$[zi]=$[Gi]=$[Hi]=$[Vi]=$[Wi]=$[Ji]=!0,$[wi]=$[Ci]=$[Li]=$[Ei]=$[Fi]=$[Ni]=$[$i]=$[Ti]=$[Ai]=$[Mi]=$[Pi]=$[Di]=$[xi]=$[Ii]=$[Ri]=!1;function qi(t){return Q(t)&&Pe(t.length)&&!!$[lt(t)]}function xe(t){return function(e){return t(e)}}var en=typeof y=="object"&&y&&!y.nodeType&&y,zt=en&&typeof module=="object"&&module&&!module.nodeType&&module,Qi=zt&&zt.exports===en,Ie=Qi&&Lr.process,Yi=function(){try{var t=zt&&zt.require&&zt.require("util").types;return t||Ie&&Ie.binding&&Ie.binding("util")}catch{}}();const jt=Yi;var rn=jt&&jt.isTypedArray,Xi=rn?xe(rn):qi;const Re=Xi;var Ki=Object.prototype,Zi=Ki.hasOwnProperty;function nn(t,e){var r=P(t),n=!r&&Ut(t),o=!r&&!n&&kt(t),a=!r&&!n&&!o&&Re(t),s=r||n||o||a,i=s?vi(t.length,String):[],c=i.length;for(var u in t)(e||Zi.call(t,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||oe(u,c)))&&i.push(u);return i}function on(t,e){return function(r){return t(e(r))}}var ts=on(Object.keys,Object);const es=ts;var rs=Object.prototype,ns=rs.hasOwnProperty;function os(t){if(!De(t))return es(t);var e=[];for(var r in Object(t))ns.call(t,r)&&r!="constructor"&&e.push(r);return e}function ie(t){return ae(t)?nn(t):os(t)}function as(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var is=Object.prototype,ss=is.hasOwnProperty;function cs(t){if(!G(t))return as(t);var e=De(t),r=[];for(var n in t)n=="constructor"&&(e||!ss.call(t,n))||r.push(n);return r}function Gt(t){return ae(t)?nn(t,!0):cs(t)}var us=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ls=/^\w*$/;function Le(t,e){if(P(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||we(t)?!0:ls.test(t)||!us.test(t)||e!=null&&t in Object(e)}var fs=pt(Object,"create");const Ht=fs;function ps(){this.__data__=Ht?Ht(null):{},this.size=0}function ds(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var hs="__lodash_hash_undefined__",vs=Object.prototype,ms=vs.hasOwnProperty;function ys(t){var e=this.__data__;if(Ht){var r=e[t];return r===hs?void 0:r}return ms.call(e,t)?e[t]:void 0}var gs=Object.prototype,bs=gs.hasOwnProperty;function _s(t){var e=this.__data__;return Ht?e[t]!==void 0:bs.call(e,t)}var js="__lodash_hash_undefined__";function Ss(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=Ht&&e===void 0?js:e,this}function dt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}dt.prototype.clear=ps,dt.prototype.delete=ds,dt.prototype.get=ys,dt.prototype.has=_s,dt.prototype.set=Ss;function Os(){this.__data__=[],this.size=0}function se(t,e){for(var r=t.length;r--;)if(Bt(t[r][0],e))return r;return-1}var ws=Array.prototype,Cs=ws.splice;function Es(t){var e=this.__data__,r=se(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Cs.call(e,r,1),--this.size,!0}function Ns(t){var e=this.__data__,r=se(e,t);return r<0?void 0:e[r][1]}function $s(t){return se(this.__data__,t)>-1}function Ts(t,e){var r=this.__data__,n=se(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function et(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}et.prototype.clear=Os,et.prototype.delete=Es,et.prototype.get=Ns,et.prototype.has=$s,et.prototype.set=Ts;var As=pt(q,"Map");const Vt=As;function Ms(){this.size=0,this.__data__={hash:new dt,map:new(Vt||et),string:new dt}}function Ps(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ce(t,e){var r=t.__data__;return Ps(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Ds(t){var e=ce(this,t).delete(t);return this.size-=e?1:0,e}function xs(t){return ce(this,t).get(t)}function Is(t){return ce(this,t).has(t)}function Rs(t,e){var r=ce(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function rt(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}rt.prototype.clear=Ms,rt.prototype.delete=Ds,rt.prototype.get=xs,rt.prototype.has=Is,rt.prototype.set=Rs;var Ls="Expected a function";function Fe(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(Ls);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(Fe.Cache||rt),r}Fe.Cache=rt;var Fs=500;function Bs(t){var e=Fe(t,function(n){return r.size===Fs&&r.clear(),n}),r=e.cache;return e}var Us=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ks=/\\(\\)?/g,zs=Bs(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(Us,function(r,n,o,a){e.push(o?a.replace(ks,"$1"):n||r)}),e});const Gs=zs;function Hs(t){return t==null?"":zr(t)}function St(t,e){return P(t)?t:Le(t,e)?[t]:Gs(Hs(t))}var Vs=1/0;function Ot(t){if(typeof t=="string"||we(t))return t;var e=t+"";return e=="0"&&1/t==-Vs?"-0":e}function ue(t,e){e=St(e,t);for(var r=0,n=e.length;t!=null&&r<n;)t=t[Ot(e[r++])];return r&&r==n?t:void 0}function an(t,e,r){var n=t==null?void 0:ue(t,e);return n===void 0?r:n}function Be(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}var sn=k?k.isConcatSpreadable:void 0;function Ws(t){return P(t)||Ut(t)||!!(sn&&t&&t[sn])}function Ue(t,e,r,n,o){var a=-1,s=t.length;for(r||(r=Ws),o||(o=[]);++a<s;){var i=t[a];e>0&&r(i)?e>1?Ue(i,e-1,r,n,o):Be(o,i):n||(o[o.length]=i)}return o}function Js(t){var e=t==null?0:t.length;return e?Ue(t,1):[]}function qs(t){return Wr(qr(t,void 0,Js),t+"")}var Qs=on(Object.getPrototypeOf,Object);const ke=Qs;var Ys="[object Object]",Xs=Function.prototype,Ks=Object.prototype,cn=Xs.toString,Zs=Ks.hasOwnProperty,tc=cn.call(Object);function F(t){if(!Q(t)||lt(t)!=Ys)return!1;var e=ke(t);if(e===null)return!0;var r=Zs.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&cn.call(r)==tc}function ec(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 rc(){this.__data__=new et,this.size=0}function nc(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function oc(t){return this.__data__.get(t)}function ac(t){return this.__data__.has(t)}var ic=200;function sc(t,e){var r=this.__data__;if(r instanceof et){var n=r.__data__;if(!Vt||n.length<ic-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new rt(n)}return r.set(t,e),this.size=r.size,this}function H(t){var e=this.__data__=new et(t);this.size=e.size}H.prototype.clear=rc,H.prototype.delete=nc,H.prototype.get=oc,H.prototype.has=ac,H.prototype.set=sc;function cc(t,e){return t&&_t(e,ie(e),t)}function uc(t,e){return t&&_t(e,Gt(e),t)}var un=typeof y=="object"&&y&&!y.nodeType&&y,ln=un&&typeof module=="object"&&module&&!module.nodeType&&module,lc=ln&&ln.exports===un,fn=lc?q.Buffer:void 0,pn=fn?fn.allocUnsafe:void 0;function dn(t,e){if(e)return t.slice();var r=t.length,n=pn?pn(r):new t.constructor(r);return t.copy(n),n}function fc(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 hn(){return[]}var pc=Object.prototype,dc=pc.propertyIsEnumerable,vn=Object.getOwnPropertySymbols,hc=vn?function(t){return t==null?[]:(t=Object(t),fc(vn(t),function(e){return dc.call(t,e)}))}:hn;const ze=hc;function vc(t,e){return _t(t,ze(t),e)}var mc=Object.getOwnPropertySymbols,yc=mc?function(t){for(var e=[];t;)Be(e,ze(t)),t=ke(t);return e}:hn;const mn=yc;function gc(t,e){return _t(t,mn(t),e)}function yn(t,e,r){var n=e(t);return P(t)?n:Be(n,r(t))}function Ge(t){return yn(t,ie,ze)}function He(t){return yn(t,Gt,mn)}var bc=pt(q,"DataView");const Ve=bc;var _c=pt(q,"Promise");const We=_c;var jc=pt(q,"Set");const wt=jc;var gn="[object Map]",Sc="[object Object]",bn="[object Promise]",_n="[object Set]",jn="[object WeakMap]",Sn="[object DataView]",Oc=ft(Ve),wc=ft(Vt),Cc=ft(We),Ec=ft(wt),Nc=ft(Te),ht=lt;(Ve&&ht(new Ve(new ArrayBuffer(1)))!=Sn||Vt&&ht(new Vt)!=gn||We&&ht(We.resolve())!=bn||wt&&ht(new wt)!=_n||Te&&ht(new Te)!=jn)&&(ht=function(t){var e=lt(t),r=e==Sc?t.constructor:void 0,n=r?ft(r):"";if(n)switch(n){case Oc:return Sn;case wc:return gn;case Cc:return bn;case Ec:return _n;case Nc:return jn}return e});const Wt=ht;var $c=Object.prototype,Tc=$c.hasOwnProperty;function Ac(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&Tc.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var Mc=q.Uint8Array;const le=Mc;function Je(t){var e=new t.constructor(t.byteLength);return new le(e).set(new le(t)),e}function Pc(t,e){var r=e?Je(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var Dc=/\w*$/;function xc(t){var e=new t.constructor(t.source,Dc.exec(t));return e.lastIndex=t.lastIndex,e}var On=k?k.prototype:void 0,wn=On?On.valueOf:void 0;function Ic(t){return wn?Object(wn.call(t)):{}}function Cn(t,e){var r=e?Je(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var Rc="[object Boolean]",Lc="[object Date]",Fc="[object Map]",Bc="[object Number]",Uc="[object RegExp]",kc="[object Set]",zc="[object String]",Gc="[object Symbol]",Hc="[object ArrayBuffer]",Vc="[object DataView]",Wc="[object Float32Array]",Jc="[object Float64Array]",qc="[object Int8Array]",Qc="[object Int16Array]",Yc="[object Int32Array]",Xc="[object Uint8Array]",Kc="[object Uint8ClampedArray]",Zc="[object Uint16Array]",tu="[object Uint32Array]";function eu(t,e,r){var n=t.constructor;switch(e){case Hc:return Je(t);case Rc:case Lc:return new n(+t);case Vc:return Pc(t,r);case Wc:case Jc:case qc:case Qc:case Yc:case Xc:case Kc:case Zc:case tu:return Cn(t,r);case Fc:return new n;case Bc:case zc:return new n(t);case Uc:return xc(t);case kc:return new n;case Gc:return Ic(t)}}function En(t){return typeof t.constructor=="function"&&!De(t)?Ha(ke(t)):{}}var ru="[object Map]";function nu(t){return Q(t)&&Wt(t)==ru}var Nn=jt&&jt.isMap,ou=Nn?xe(Nn):nu;const au=ou;var iu="[object Set]";function su(t){return Q(t)&&Wt(t)==iu}var $n=jt&&jt.isSet,cu=$n?xe($n):su;const uu=cu;var lu=1,fu=2,pu=4,Tn="[object Arguments]",du="[object Array]",hu="[object Boolean]",vu="[object Date]",mu="[object Error]",An="[object Function]",yu="[object GeneratorFunction]",gu="[object Map]",bu="[object Number]",Mn="[object Object]",_u="[object RegExp]",ju="[object Set]",Su="[object String]",Ou="[object Symbol]",wu="[object WeakMap]",Cu="[object ArrayBuffer]",Eu="[object DataView]",Nu="[object Float32Array]",$u="[object Float64Array]",Tu="[object Int8Array]",Au="[object Int16Array]",Mu="[object Int32Array]",Pu="[object Uint8Array]",Du="[object Uint8ClampedArray]",xu="[object Uint16Array]",Iu="[object Uint32Array]",N={};N[Tn]=N[du]=N[Cu]=N[Eu]=N[hu]=N[vu]=N[Nu]=N[$u]=N[Tu]=N[Au]=N[Mu]=N[gu]=N[bu]=N[Mn]=N[_u]=N[ju]=N[Su]=N[Ou]=N[Pu]=N[Du]=N[xu]=N[Iu]=!0,N[mu]=N[An]=N[wu]=!1;function Jt(t,e,r,n,o,a){var s,i=e&lu,c=e&fu,u=e&pu;if(r&&(s=o?r(t,n,o,a):r(t)),s!==void 0)return s;if(!G(t))return t;var l=P(t);if(l){if(s=Ac(t),!i)return Vr(t,s)}else{var p=Wt(t),f=p==An||p==yu;if(kt(t))return dn(t,i);if(p==Mn||p==Tn||f&&!o){if(s=c||f?{}:En(t),!i)return c?gc(t,uc(s,t)):vc(t,cc(s,t))}else{if(!N[p])return o?t:{};s=eu(t,p,i)}}a||(a=new H);var d=a.get(t);if(d)return d;a.set(t,s),uu(t)?t.forEach(function(j){s.add(Jt(j,e,r,j,t,a))}):au(t)&&t.forEach(function(j,w){s.set(w,Jt(j,e,r,w,t,a))});var h=u?c?He:Ge:c?Gt:ie,g=l?void 0:h(t);return ei(g||t,function(j,w){g&&(w=j,j=t[w]),Me(s,w,Jt(j,e,r,w,t,a))}),s}var Ru=1,Lu=4;function Pn(t){return Jt(t,Ru|Lu)}var Fu="__lodash_hash_undefined__";function Bu(t){return this.__data__.set(t,Fu),this}function Uu(t){return this.__data__.has(t)}function qt(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new rt;++e<r;)this.add(t[e])}qt.prototype.add=qt.prototype.push=Bu,qt.prototype.has=Uu;function ku(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 Dn(t,e){return t.has(e)}var zu=1,Gu=2;function xn(t,e,r,n,o,a){var s=r&zu,i=t.length,c=e.length;if(i!=c&&!(s&&c>i))return!1;var u=a.get(t),l=a.get(e);if(u&&l)return u==e&&l==t;var p=-1,f=!0,d=r&Gu?new qt:void 0;for(a.set(t,e),a.set(e,t);++p<i;){var h=t[p],g=e[p];if(n)var j=s?n(g,h,p,e,t,a):n(h,g,p,t,e,a);if(j!==void 0){if(j)continue;f=!1;break}if(d){if(!ku(e,function(w,E){if(!Dn(d,E)&&(h===w||o(h,w,r,n,a)))return d.push(E)})){f=!1;break}}else if(!(h===g||o(h,g,r,n,a))){f=!1;break}}return a.delete(t),a.delete(e),f}function Hu(t){var e=-1,r=Array(t.size);return t.forEach(function(n,o){r[++e]=[o,n]}),r}function qe(t){var e=-1,r=Array(t.size);return t.forEach(function(n){r[++e]=n}),r}var Vu=1,Wu=2,Ju="[object Boolean]",qu="[object Date]",Qu="[object Error]",Yu="[object Map]",Xu="[object Number]",Ku="[object RegExp]",Zu="[object Set]",tl="[object String]",el="[object Symbol]",rl="[object ArrayBuffer]",nl="[object DataView]",In=k?k.prototype:void 0,Qe=In?In.valueOf:void 0;function ol(t,e,r,n,o,a,s){switch(r){case nl:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case rl:return!(t.byteLength!=e.byteLength||!a(new le(t),new le(e)));case Ju:case qu:case Xu:return Bt(+t,+e);case Qu:return t.name==e.name&&t.message==e.message;case Ku:case tl:return t==e+"";case Yu:var i=Hu;case Zu:var c=n&Vu;if(i||(i=qe),t.size!=e.size&&!c)return!1;var u=s.get(t);if(u)return u==e;n|=Wu,s.set(t,e);var l=xn(i(t),i(e),n,o,a,s);return s.delete(t),l;case el:if(Qe)return Qe.call(t)==Qe.call(e)}return!1}var al=1,il=Object.prototype,sl=il.hasOwnProperty;function cl(t,e,r,n,o,a){var s=r&al,i=Ge(t),c=i.length,u=Ge(e),l=u.length;if(c!=l&&!s)return!1;for(var p=c;p--;){var f=i[p];if(!(s?f in e:sl.call(e,f)))return!1}var d=a.get(t),h=a.get(e);if(d&&h)return d==e&&h==t;var g=!0;a.set(t,e),a.set(e,t);for(var j=s;++p<c;){f=i[p];var w=t[f],E=e[f];if(n)var I=s?n(E,w,f,e,t,a):n(w,E,f,t,e,a);if(!(I===void 0?w===E||o(w,E,r,n,a):I)){g=!1;break}j||(j=f=="constructor")}if(g&&!j){var M=t.constructor,R=e.constructor;M!=R&&"constructor"in t&&"constructor"in e&&!(typeof M=="function"&&M instanceof M&&typeof R=="function"&&R instanceof R)&&(g=!1)}return a.delete(t),a.delete(e),g}var ul=1,Rn="[object Arguments]",Ln="[object Array]",fe="[object Object]",ll=Object.prototype,Fn=ll.hasOwnProperty;function fl(t,e,r,n,o,a){var s=P(t),i=P(e),c=s?Ln:Wt(t),u=i?Ln:Wt(e);c=c==Rn?fe:c,u=u==Rn?fe:u;var l=c==fe,p=u==fe,f=c==u;if(f&&kt(t)){if(!kt(e))return!1;s=!0,l=!1}if(f&&!l)return a||(a=new H),s||Re(t)?xn(t,e,r,n,o,a):ol(t,e,c,r,n,o,a);if(!(r&ul)){var d=l&&Fn.call(t,"__wrapped__"),h=p&&Fn.call(e,"__wrapped__");if(d||h){var g=d?t.value():t,j=h?e.value():e;return a||(a=new H),o(g,j,r,n,a)}}return f?(a||(a=new H),cl(t,e,r,n,o,a)):!1}function Ye(t,e,r,n,o){return t===e?!0:t==null||e==null||!Q(t)&&!Q(e)?t!==t&&e!==e:fl(t,e,r,n,Ye,o)}var pl=1,dl=2;function hl(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],u=t[c],l=i[1];if(s&&i[2]){if(u===void 0&&!(c in t))return!1}else{var p=new H;if(n)var f=n(u,l,c,t,e,p);if(!(f===void 0?Ye(l,u,pl|dl,n,p):f))return!1}}return!0}function Bn(t){return t===t&&!G(t)}function vl(t){for(var e=ie(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,Bn(o)]}return e}function Un(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function ml(t){var e=vl(t);return e.length==1&&e[0][2]?Un(e[0][0],e[0][1]):function(r){return r===t||hl(r,t,e)}}function yl(t,e){return t!=null&&e in Object(t)}function gl(t,e,r){e=St(e,t);for(var n=-1,o=e.length,a=!1;++n<o;){var s=Ot(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&&Pe(o)&&oe(s,o)&&(P(t)||Ut(t)))}function bl(t,e){return t!=null&&gl(t,e,yl)}var _l=1,jl=2;function Sl(t,e){return Le(t)&&Bn(e)?Un(Ot(t),e):function(r){var n=an(r,t);return n===void 0&&n===e?bl(r,t):Ye(e,n,_l|jl)}}function Ol(t){return function(e){return e==null?void 0:e[t]}}function wl(t){return function(e){return ue(e,t)}}function Cl(t){return Le(t)?Ol(Ot(t)):wl(t)}function Xe(t){return typeof t=="function"?t:t==null?Ee:typeof t=="object"?P(t)?Sl(t[0],t[1]):ml(t):Cl(t)}function El(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 Nl=El();const $l=Nl;function Ke(t,e,r){(r!==void 0&&!Bt(t[e],r)||r===void 0&&!(e in t))&&Ae(t,e,r)}function Ze(t){return Q(t)&&ae(t)}function tr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Tl(t){return _t(t,Gt(t))}function Al(t,e,r,n,o,a,s){var i=tr(t,r),c=tr(e,r),u=s.get(c);if(u){Ke(t,r,u);return}var l=a?a(i,c,r+"",t,e,s):void 0,p=l===void 0;if(p){var f=P(c),d=!f&&kt(c),h=!f&&!d&&Re(c);l=c,f||d||h?P(i)?l=i:Ze(i)?l=Vr(i):d?(p=!1,l=dn(c,!0)):h?(p=!1,l=Cn(c,!0)):l=[]:F(c)||Ut(c)?(l=i,Ut(i)?l=Tl(i):(!G(i)||Ne(i))&&(l=En(c))):p=!1}p&&(s.set(c,l),o(l,c,n,a,s),s.delete(c)),Ke(t,r,l)}function kn(t,e,r,n,o){t!==e&&$l(e,function(a,s){if(o||(o=new H),G(a))Al(t,e,s,r,kn,n,o);else{var i=n?n(tr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),Ke(t,s,i)}},Gt)}function Ml(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 zn(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Pl(t,e){return e.length<2?t:ue(t,ec(e,0,-1))}var Dl=di(function(t,e,r){kn(t,e,r)});const Gn=Dl;var xl="Expected a function";function Il(t){if(typeof t!="function")throw new TypeError(xl);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 Rl(t,e){return e=St(e,t),t=Pl(t,e),t==null||delete t[Ot(zn(e))]}function Ll(t){return F(t)?void 0:t}var Fl=1,Bl=2,Ul=4,kl=qs(function(t,e){var r={};if(t==null)return r;var n=!1;e=Ce(e,function(a){return a=St(a,t),n||(n=a.length>1),a}),_t(t,He(t),r),n&&(r=Jt(r,Fl|Bl|Ul,Ll));for(var o=e.length;o--;)Rl(r,e[o]);return r});const Hn=kl;function zl(t,e,r,n){if(!G(t))return t;e=St(e,t);for(var o=-1,a=e.length,s=a-1,i=t;i!=null&&++o<a;){var c=Ot(e[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(o!=s){var l=i[c];u=n?n(l,c,i):void 0,u===void 0&&(u=G(l)?l:oe(e[o+1])?[]:{})}Me(i,c,u),i=i[c]}return t}function Gl(t,e,r){for(var n=-1,o=e.length,a={};++n<o;){var s=e[n],i=ue(t,s);r(i,s)&&zl(a,St(s,t),i)}return a}function Hl(t,e){if(t==null)return{};var r=Ce(He(t),function(n){return[n]});return e=Xe(e),Gl(t,r,function(n,o){return e(n,o[0])})}function Vl(t,e){return Hl(t,Il(Xe(e)))}var Wl=1/0,Jl=wt&&1/qe(new wt([,-0]))[1]==Wl?function(t){return new wt(t)}:Wa;const ql=Jl;var Ql=200;function Yl(t,e,r){var n=-1,o=ii,a=t.length,s=!0,i=[],c=i;if(r)s=!1,o=Ml;else if(a>=Ql){var u=e?null:ql(t);if(u)return qe(u);s=!1,o=Dn,c=new qt}else c=e?[]:i;t:for(;++n<a;){var l=t[n],p=e?e(l):l;if(l=r||l!==0?l:0,s&&p===p){for(var f=c.length;f--;)if(c[f]===p)continue t;e&&c.push(p),i.push(l)}else o(c,p,r)||(c!==i&&c.push(p),i.push(l))}return i}var Xl=Qr(function(t){var e=zn(t);return Ze(e)&&(e=void 0),Yl(Ue(t,1,Ze,!0),Xe(e))});const Kl=Xl;class Vn 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=()=>n??(n=[e,...r()])}}function Zl(t){return V(t)&&typeof t[Symbol.iterator]=="function"}function V(t){return typeof t=="object"&&t!=null}function U(t){return typeof t=="symbol"?t.toString():typeof t=="string"?JSON.stringify(t):`${t}`}function tf(t){const{done:e,value:r}=t.next();return e?void 0:r}function ef(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: \`${U(n)}\``}=t;return{value:n,type:s,refinement:i,key:o[o.length-1],path:o,branch:a,...t,message:c}}function*Wn(t,e,r,n){Zl(t)||(t=[t]);for(const o of t){const a=ef(o,e,r,n);a&&(yield a)}}function*er(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"&&V(e.schema)&&V(t)&&!Array.isArray(t)))for(const u in t)e.schema[u]===void 0&&delete t[u];let c="valid";for(const u of e.validator(t,i))c="not_valid",yield[u,void 0];for(let[u,l,p]of e.entries(t,i)){const f=er(l,p,{path:u===void 0?n:[...n,u],branch:u===void 0?o:[...o,l],coerce:a,mask:s});for(const d of f)d[0]?(c=d[0].refinement!=null?"not_refined":"not_valid",yield[d[0],void 0]):a&&(l=d[1],u===void 0?t=l:t instanceof Map?t.set(u,l):t instanceof Set?t.add(l):V(t)&&(l!==void 0||u in t)&&(t[u]=l))}if(c!=="not_valid")for(const u of e.refiner(t,i))c="not_refined",yield[u,void 0];c==="valid"&&(yield[void 0,t])}class Y{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,u)=>{const l=o(c,u);return Wn(l,u,this,c)}:this.validator=()=>[],a?this.refiner=(c,u)=>{const l=a(c,u);return Wn(l,u,this,c)}:this.refiner=()=>[]}assert(e){return Jn(e,this)}create(e){return rf(e,this)}is(e){return of(e,this)}mask(e){return nf(e,this)}validate(e,r){return r===void 0&&(r={}),Ct(e,this,r)}}function Jn(t,e){const r=Ct(t,e);if(r[0])throw r[0]}function rf(t,e){const r=Ct(t,e,{coerce:!0});if(r[0])throw r[0];return r[1]}function nf(t,e){const r=Ct(t,e,{coerce:!0,mask:!0});if(r[0])throw r[0];return r[1]}function of(t,e){return!Ct(t,e)[0]}function Ct(t,e,r){r===void 0&&(r={});const n=er(t,e,r),o=tf(n);return o[0]?[new Vn(o[0],function*(){for(const a of n)a[0]&&(yield a[0])}),void 0]:[void 0,o[1]]}function rr(){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?Xn(a):C(a)}function it(t,e){return new Y({type:t,schema:null,validator:e})}function Et(t){return new Y({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 qn(t,e){const{schema:r}=t,n={...r};for(const o of e)delete n[o];switch(t.type){case"type":return Xn(n);default:return C(n)}}function x(){return it("any",()=>!0)}function D(t){return new Y({type:"array",schema:t,*entries(e){if(t&&Array.isArray(e))for(const[r,n]of e.entries())yield[r,n,t]},coercer(e){return Array.isArray(e)?e.slice():e},validator(e){return Array.isArray(e)||`Expected an array value, but received: ${U(e)}`}})}function nt(){return it("boolean",t=>typeof t=="boolean")}function nr(t){const e={},r=t.map(n=>U(n)).join();for(const n of t)e[n]=n;return new Y({type:"enums",schema:e,validator(n){return t.includes(n)||`Expected one of \`${r}\`, but received: ${U(n)}`}})}function Qn(){return it("func",t=>typeof t=="function"||`Expected a function, but received: ${U(t)}`)}function B(t){const e=U(t),r=typeof t;return new Y({type:"literal",schema:r==="string"||r==="number"||r==="boolean"?t:null,validator(n){return n===t||`Expected the literal \`${e}\`, but received: ${U(n)}`}})}function af(){return it("never",()=>!1)}function Yn(){return it("number",t=>typeof t=="number"&&!isNaN(t)||`Expected a number, but received: ${U(t)}`)}function C(t){const e=t?Object.keys(t):[],r=af();return new Y({type:"object",schema:t||null,*entries(n){if(t&&V(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 V(n)||`Expected an object, but received: ${U(n)}`},coercer(n){return V(n)?{...n}:n}})}function m(t){return new Y({...t,validator:(e,r)=>e===void 0||t.validator(e,r),refiner:(e,r)=>e===void 0||t.refiner(e,r)})}function Qt(t,e){return new Y({type:"record",schema:null,*entries(r){if(V(r))for(const n in r){const o=r[n];yield[n,n,t],yield[n,o,e]}},validator(r){return V(r)||`Expected an object, but received: ${U(r)}`}})}function v(){return it("string",t=>typeof t=="string"||`Expected a string, but received: ${U(t)}`)}function Xn(t){const e=Object.keys(t);return new Y({type:"type",schema:t,*entries(r){if(V(r))for(const n of e)yield[n,r[n],t[n]]},validator(r){return V(r)||`Expected an object, but received: ${U(r)}`}})}function L(t){const e=t.map(r=>r.type).join(" | ");return new Y({type:"union",schema:null,coercer(r,n){return(t.find(o=>{const[a]=o.validate(r,{coerce:!0});return!a})||sf()).coercer(r,n)},validator(r,n){const o=[];for(const a of t){const[...s]=er(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: ${U(r)}`,...o]}})}function sf(){return it("unknown",()=>!0)}const or=C({package:v(),version:v(),exportName:v(),destructuring:m(nt()),subName:m(v()),main:m(v())}),cf=D(or),uf=["CBlock","CContainer","CImage","CCanvas","CVideo","CAudio","CText","CNativeTag"];var z=(t=>(t.SLOT="SLOT",t.FUNCTION="FUNCTION",t.EXPRESSION="EXPRESSION",t))(z||{}),ar=(t=>(t.DESIGN="design",t.SAVE="save",t))(ar||{}),ir=(t=>(t.FUNC="FUNC",t.COMP="COMP",t))(ir||{});const lf=()=>it("normalObj",t=>!F(t)||[z.SLOT,z.EXPRESSION,z.FUNCTION].includes(t==null?void 0:t.type)?!1:(Ct(t,Qt(v(),sr)),!0)),sr=L([v(),Yn(),nt(),C({type:B(z.SLOT),renderType:nr([ir.FUNC,ir.COMP]),params:m(D(v())),value:Et(()=>L([Nt,D(Nt)]))}),C({type:B(z.EXPRESSION),value:v()}),C({type:B(z.FUNCTION),value:v()}),lf(),D(Et(()=>sr))]),Kn=C({type:B(z.EXPRESSION),value:v()}),Nt=C({id:m(v()),title:m(v()),componentName:v(),props:m(Qt(v(),sr)),stateName:m(v()),state:m(Qt(v(),x())),children:Et(()=>m(D(L([v(),Nt])))),configure:m(x()),css:m(x()),style:m(x()),classNames:m(D(x())),refId:m(v()),extra:m(Qt(x(),x())),condition:m(L([nt(),Kn])),tempDevConfig:m(x()),loop:m(C({open:nt(),data:L([D(x()),Kn]),args:m(D(v())),forName:m(v()),forIndex:m(v()),key:m(x()),name:m(v())}))}),pe=L([v(),C({label:v(),tip:m(v())})]),ff=C({type:B("shape"),value:D(C({name:v(),title:pe,valueType:Et(()=>de)}))}),pf=C({type:B("enums"),value:D(v())});C({type:B("array"),value:Et(()=>de)});const df=C({type:B("array"),value:Et(()=>D(de))}),de=L([nr(["array","boolean","number","object","string"]),nr(["component","expression","function"]),ff,pf,df]),hf=L([v(),C({componentName:v(),props:m(x()),initialValue:m(x()),component:m(x())})]),cr=C({name:v(),title:pe,valueType:de,description:m(v()),defaultValue:x(),setters:m(D(hf)),condition:m(Qn())}),vf=L([v(),Qn()]);var ur=(t=>(t.SINGLE="single",t.GROUP="group",t))(ur||{});L([v(),C({name:v(),describe:m(v()),params:m(C({name:v(),description:v()})),template:v()})]);const mf=C({id:m(v()),title:v(),snapshot:L([v(),x()]),snapshotText:m(v()),description:m(v()),tags:m(D(v())),groupName:m(v()),category:m(v()),schema:rr(qn(Nt,["id"]),C({componentName:m(v())}))}),yf=C({componentName:v(),title:v(),screenshot:m(v()),icon:m(v()),tags:m(D(v())),groupName:m(v()),category:m(v()),priority:m(Yn()),npm:m(or),snippets:D(mf),props:D(L([cr,C({title:m(pe),type:B("single"),content:cr}),C({title:m(pe),type:B("group"),content:D(cr)})])),fixedProps:m(x()),isContainer:m(L([nt(),C({placeholder:v(),width:v(),height:v()})])),isModal:m(L([nt(),C({visibleKey:v()})])),isSupportStyle:m(nt()),isSupportDispatchNativeEvent:m(nt()),isLayout:m(nt()),rootSelector:m(v()),selectionToolBars:m(D(vf)),extra:m(Qt(x(),x()))}),gf=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},lr=t=>{const{data:e,message:r,throwError:n,dataStruct:o}=t;return gf(({data:a})=>{try{return Jn(a,o),{isValidate:!0}}catch(s){let i=s;return s instanceof Vn&&(i=s.failures().map(c=>`【${c.path.join(".")}】: ${c.message}
|
|
4
|
-
`)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var $t=(t=>(t.ROOT_CONTAINER="RootContainer",t))($t||{});const bf=C({type:B(z.FUNCTION),value:v()}),_f=rr(qn(Nt,["componentName"]),C({componentName:B("RootContainer")}));function jf(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 Yt=jf(),Sf=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new mt([]);return e&&(o=e.materialsMode||new mt([])),n&&(P(n)?r.value=n.map(a=>new A(a,{parent:e,materials:o})):F(n)&&r.value.push(new A(n,{parent:e,materials:o}))),r};class Tt{constructor(e,r){S(this,"nodeType","SLOT"),S(this,"rawData"),S(this,"parent"),S(this,"emitter",Yt),S(this,"data"),S(this,"id"),S(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new mt([]);this.materialsMode=n,this.id=X(),this.data=Sf(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof A)return o.export(e);if(F(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return P(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const Zn=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===ur.SINGLE?e.push(n.content):n.type===ur.GROUP&&(e=[...e,...Zn(n.content)]):e.push(r)}),e},fr=(t,e,r)=>{if(t.type)return t.type===z.SLOT?new Tt(t,{parent:e,materials:r}):t;if(F(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=pr(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>fr(n,e,r)):t},pr=(t,e,r)=>F(t)?fr(t,e,r):P(t)?t.map(n=>fr(n,e,r)):t;class st{constructor(e,r,n){S(this,"nodeType","PROP"),S(this,"rawData"),S(this,"parent"),S(this,"emitter",Yt),S(this,"data"),S(this,"name"),S(this,"materialsMode");const o=(n==null?void 0:n.materials)||new mt([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=pr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=pr(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Tt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof A){const r=e.material;return Zn((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 st||o instanceof Tt||o instanceof A)return o.export(e);if(P(o))return o.map(a=>n(a));if(F(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const Of=t=>{if(typeof t=="string")return!0;lr({data:t,dataStruct:Nt,throwError:!0})},to=(t,e,r=new mt([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??X(),children:[],props:{},configure:Gn(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 st){n.props[a]=i;return}n.props[a]=new st(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof A)return a;if(F(a)){const s=a;return new A(s,{parent:e,materials:r})}else return a}):(t.children instanceof A&&(n.children=[t.children]),n.children=[new A(t.children,{parent:e,materials:r})])),n};class A{constructor(e,r){S(this,"nodeType","NODE"),S(this,"rawData"),S(this,"data"),S(this,"emitter",Yt),S(this,"parent"),S(this,"materialsModel"),S(this,"listenerHandle"),S(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),Of(e);const n=(r==null?void 0:r.materials)||new mt([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=to(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||X()};return new A(r,{materials:this.materialsModel})}updateValue(e){const r=this.data,n={...this.data,...e};this.data=to(n,this),this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return vr(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}export(e){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(l=>{o[l]=n.props[l].export(e)});const a=(r=n.children)==null?void 0:r.map(l=>l instanceof A?l.export(e):l),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(l=>{const p=an(i,l,!1);p&&(c[l]=p)}),s.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let u={...n,configure:s,props:o,children:a};return e==="design"&&delete u.id,u=hr(u),u}}const eo=(t,e,r)=>{const n={...t,id:X(),props:{},componentName:$t.ROOT_CONTAINER,children:[],configure:Gn(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];P(t.children)?o=t.children.map(s=>s instanceof A?s:F(s)?new A(s,{parent:e,materials:r}):s):t.children instanceof A?o.push(t.children):t.children&&F(t.children)&&o.push(new A(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 st?n.props[s]=c:n.props[s]=new st(s,c||"",{parent:e,materials:r})}),n.children=o,n};class Xt{constructor(e,{parent:r,materials:n}){S(this,"rawData"),S(this,"data"),S(this,"nodeType",$t.ROOT_CONTAINER),S(this,"emitter",Yt),S(this,"materialsModel"),S(this,"listenerHandle"),S(this,"onChangeCbQueue"),S(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=eo(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=eo(n,this,this.materialsModel),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(e){return vr(this,e)}export(e=ar.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(c=>{o[c]=n.props[c].export(e)});const a=((r=n.children)==null?void 0:r.map(c=>{var u;return(u=c==null?void 0:c.export)==null?void 0:u.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c)};let i=Hn(s,["id"]);return i=hr(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||X()};return new Xt(r,{materials:this.materialsModel,parent:null})}}const vt=t=>(t==null?void 0:t.type)===z.EXPRESSION,wf=t=>(t==null?void 0:t.type)==z.FUNCTION,X=()=>Math.random().toString(32).slice(3,9),Cf=t=>(t==null?void 0:t.nodeType)==="NODE",dr=t=>(t==null?void 0:t.nodeType)==="PROP",Ef=t=>(t==null?void 0:t.nodeType)==="SLOT",hr=t=>Vl(t,e=>F(e)?!Object.keys(e).length:P(e)?!e.length:!e);function vr(t,e){const r=[t];for(;r.length;){const n=r.shift();if((n==null?void 0:n.id)===e)return n;const o=(n==null?void 0:n.props)||{},a=i=>{if(i instanceof A){r.push(i);return}if(i instanceof Tt&&a(i.value.value),i instanceof st){a(i.value);return}if(F(i)){const c=i;Object.keys(c).map(u=>{a(c[u])});return}if(P(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof A))||[];r.push(...s)}return null}const Nf=t=>{const e=Pn(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${X()}`,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 $f{constructor(e){S(this,"rawData"),S(this,"data"),this.rawData=e,this.data=Nf(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 Tf=t=>{if(!P(t))throw new Error("Materials must be a array");return t.map(e=>new $f(e))},Af=t=>{t==null||t.forEach(e=>{lr({data:e,dataStruct:yf,throwError:!0})})};class mt{constructor(e){S(this,"rawData"),S(this,"data"),S(this,"usedMaterials",[]),this.rawData=e,Af(e),this.data=Tf(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(p=>{const f=p.category||"default";s.includes(f)||(s.push(f),i[f]=[]),i[f].push(p)});const u=[];s.forEach(p=>{i[p].length&&u.push({name:p,list:i[p]})});const l={name:a,list:u};o.push(l)}}),o}get value(){return this.data}get rawValue(){return this.rawData}}const Mf=C({version:v(),name:v(),css:m(v()),renderType:m(L([B("COMPONENT"),B("PAGE")])),methods:m(D(bf)),componentsMeta:D(rr(C({componentName:v()}),or)),thirdLibs:m(cf),componentsTree:_f,assets:m(D(x()))}),ro=t=>(lr({data:t,dataStruct:Mf,throwError:!0}),t),mr=(t,e,r)=>({...t,componentsTree:new Xt(t.componentsTree,{parent:e,materials:r})});class he{constructor(e,r){S(this,"nodeType","PAGE"),S(this,"rawData"),S(this,"emitter",Yt),S(this,"data"),S(this,"parent"),S(this,"materialsModel"),S(this,"assetPackagesList"),ro(e),this.assetPackagesList=(r==null?void 0:r.assetPackagesList)||[],this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new mt((r==null?void 0:r.materials)||[]),this.data=mr(e,this,this.materialsModel)}updatePage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=mr(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=mr(e,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(e){const r=this.data.componentsTree;return vr(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof Xt)return console.warn("Not found parent node"),!1;if(a instanceof st)return console.warn("CProp can not add node"),!1;if(a instanceof Tt){const i=a.value.value,c=i.findIndex(u=>u===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 he)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(F(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 A(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=X();const n=new A(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 A?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 A&&a instanceof A?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 Tt){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 A||n instanceof Xt){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=ar.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const u=o.find(l=>{var p;return l.package===((p=c.value.npm)==null?void 0:p.package)});return u&&a.push(u),{componentName:c.componentName,...Pn(c.value.npm||{})}}).filter(c=>{if(c.componentName&&c.package&&c.version)return!0});this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:hr(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const u=o.find(l=>{l.package,l.package});u&&a.push(u)}),i.assets=Kl(a,c=>c.package),i=Hn(i,["id"]),JSON.parse(JSON.stringify(i))}}$t.ROOT_CONTAINER;var Pf=typeof global=="object"&&global&&global.Object===Object&&global;const no=Pf;var Df=typeof self=="object"&&self&&self.Object===Object&&self,xf=no||Df||Function("return this")();const At=xf;var If=At.Symbol;const Mt=If;var oo=Object.prototype,Rf=oo.hasOwnProperty,Lf=oo.toString,Kt=Mt?Mt.toStringTag:void 0;function Ff(t){var e=Rf.call(t,Kt),r=t[Kt];try{t[Kt]=void 0;var n=!0}catch{}var o=Lf.call(t);return n&&(e?t[Kt]=r:delete t[Kt]),o}var Bf=Object.prototype,Uf=Bf.toString;function kf(t){return Uf.call(t)}var zf="[object Null]",Gf="[object Undefined]",ao=Mt?Mt.toStringTag:void 0;function Zt(t){return t==null?t===void 0?Gf:zf:ao&&ao in Object(t)?Ff(t):kf(t)}function Pt(t){return t!=null&&typeof t=="object"}var Hf="[object Symbol]";function Vf(t){return typeof t=="symbol"||Pt(t)&&Zt(t)==Hf}function Wf(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 Jf=Array.isArray;const Dt=Jf;var qf=1/0,io=Mt?Mt.prototype:void 0,so=io?io.toString:void 0;function co(t){if(typeof t=="string")return t;if(Dt(t))return Wf(t,co)+"";if(Vf(t))return so?so.call(t):"";var e=t+"";return e=="0"&&1/t==-qf?"-0":e}function yt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function uo(t){return t}var Qf="[object AsyncFunction]",Yf="[object Function]",Xf="[object GeneratorFunction]",Kf="[object Proxy]";function yr(t){if(!yt(t))return!1;var e=Zt(t);return e==Yf||e==Xf||e==Qf||e==Kf}var Zf=At["__core-js_shared__"];const gr=Zf;var lo=function(){var t=/[^.]+$/.exec(gr&&gr.keys&&gr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function tp(t){return!!lo&&lo in t}var ep=Function.prototype,rp=ep.toString;function np(t){if(t!=null){try{return rp.call(t)}catch{}try{return t+""}catch{}}return""}var op=/[\\^$.*+?()[\]{}|]/g,ap=/^\[object .+?Constructor\]$/,ip=Function.prototype,sp=Object.prototype,cp=ip.toString,up=sp.hasOwnProperty,lp=RegExp("^"+cp.call(up).replace(op,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fp(t){if(!yt(t)||tp(t))return!1;var e=yr(t)?lp:ap;return e.test(np(t))}function pp(t,e){return t==null?void 0:t[e]}function br(t,e){var r=pp(t,e);return fp(r)?r:void 0}var fo=Object.create,dp=function(){function t(){}return function(e){if(!yt(e))return{};if(fo)return fo(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const hp=dp;function vp(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function mp(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var yp=800,gp=16,bp=Date.now;function _p(t){var e=0,r=0;return function(){var n=bp(),o=gp-(n-r);if(r=n,o>0){if(++e>=yp)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function jp(t){return function(){return t}}var Sp=function(){try{var t=br(Object,"defineProperty");return t({},"",{}),t}catch{}}();const ve=Sp;var Op=ve?function(t,e){return ve(t,"toString",{configurable:!0,enumerable:!1,value:jp(e),writable:!0})}:uo,wp=_p(Op);const Cp=wp;var Ep=9007199254740991,Np=/^(?:0|[1-9]\d*)$/;function po(t,e){var r=typeof t;return e=e??Ep,!!e&&(r=="number"||r!="symbol"&&Np.test(t))&&t>-1&&t%1==0&&t<e}function _r(t,e,r){e=="__proto__"&&ve?ve(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function me(t,e){return t===e||t!==t&&e!==e}var $p=Object.prototype,Tp=$p.hasOwnProperty;function Ap(t,e,r){var n=t[e];(!(Tp.call(t,e)&&me(n,r))||r===void 0&&!(e in t))&&_r(t,e,r)}function Mp(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?_r(r,i,c):Ap(r,i,c)}return r}var ho=Math.max;function Pp(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),vp(t,this,i)}}function Dp(t,e){return Cp(Pp(t,e,uo),t+"")}var xp=9007199254740991;function vo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=xp}function jr(t){return t!=null&&vo(t.length)&&!yr(t)}function Ip(t,e,r){if(!yt(r))return!1;var n=typeof e;return(n=="number"?jr(r)&&po(e,r.length):n=="string"&&e in r)?me(r[e],t):!1}function Rp(t){return Dp(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&&Ip(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 Lp=Object.prototype;function mo(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Lp;return t===r}function Fp(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Bp="[object Arguments]";function yo(t){return Pt(t)&&Zt(t)==Bp}var go=Object.prototype,Up=go.hasOwnProperty,kp=go.propertyIsEnumerable,zp=yo(function(){return arguments}())?yo:function(t){return Pt(t)&&Up.call(t,"callee")&&!kp.call(t,"callee")};const Sr=zp;function Gp(){return!1}var bo=typeof y=="object"&&y&&!y.nodeType&&y,_o=bo&&typeof module=="object"&&module&&!module.nodeType&&module,Hp=_o&&_o.exports===bo,jo=Hp?At.Buffer:void 0,Vp=jo?jo.isBuffer:void 0,Wp=Vp||Gp;const So=Wp;var Jp="[object Arguments]",qp="[object Array]",Qp="[object Boolean]",Yp="[object Date]",Xp="[object Error]",Kp="[object Function]",Zp="[object Map]",td="[object Number]",ed="[object Object]",rd="[object RegExp]",nd="[object Set]",od="[object String]",ad="[object WeakMap]",id="[object ArrayBuffer]",sd="[object DataView]",cd="[object Float32Array]",ud="[object Float64Array]",ld="[object Int8Array]",fd="[object Int16Array]",pd="[object Int32Array]",dd="[object Uint8Array]",hd="[object Uint8ClampedArray]",vd="[object Uint16Array]",md="[object Uint32Array]",T={};T[cd]=T[ud]=T[ld]=T[fd]=T[pd]=T[dd]=T[hd]=T[vd]=T[md]=!0,T[Jp]=T[qp]=T[id]=T[Qp]=T[sd]=T[Yp]=T[Xp]=T[Kp]=T[Zp]=T[td]=T[ed]=T[rd]=T[nd]=T[od]=T[ad]=!1;function yd(t){return Pt(t)&&vo(t.length)&&!!T[Zt(t)]}function gd(t){return function(e){return t(e)}}var Oo=typeof y=="object"&&y&&!y.nodeType&&y,te=Oo&&typeof module=="object"&&module&&!module.nodeType&&module,bd=te&&te.exports===Oo,Or=bd&&no.process,_d=function(){try{var t=te&&te.require&&te.require("util").types;return t||Or&&Or.binding&&Or.binding("util")}catch{}}();const wo=_d;var Co=wo&&wo.isTypedArray,jd=Co?gd(Co):yd;const Eo=jd;var Sd=Object.prototype,Od=Sd.hasOwnProperty;function wd(t,e){var r=Dt(t),n=!r&&Sr(t),o=!r&&!n&&So(t),a=!r&&!n&&!o&&Eo(t),s=r||n||o||a,i=s?Fp(t.length,String):[],c=i.length;for(var u in t)(e||Od.call(t,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||po(u,c)))&&i.push(u);return i}function Cd(t,e){return function(r){return t(e(r))}}function Ed(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Nd=Object.prototype,$d=Nd.hasOwnProperty;function Td(t){if(!yt(t))return Ed(t);var e=mo(t),r=[];for(var n in t)n=="constructor"&&(e||!$d.call(t,n))||r.push(n);return r}function No(t){return jr(t)?wd(t,!0):Td(t)}var Ad=br(Object,"create");const ee=Ad;function Md(){this.__data__=ee?ee(null):{},this.size=0}function Pd(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Dd="__lodash_hash_undefined__",xd=Object.prototype,Id=xd.hasOwnProperty;function Rd(t){var e=this.__data__;if(ee){var r=e[t];return r===Dd?void 0:r}return Id.call(e,t)?e[t]:void 0}var Ld=Object.prototype,Fd=Ld.hasOwnProperty;function Bd(t){var e=this.__data__;return ee?e[t]!==void 0:Fd.call(e,t)}var Ud="__lodash_hash_undefined__";function kd(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ee&&e===void 0?Ud:e,this}function gt(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])}}gt.prototype.clear=Md,gt.prototype.delete=Pd,gt.prototype.get=Rd,gt.prototype.has=Bd,gt.prototype.set=kd;function zd(){this.__data__=[],this.size=0}function ye(t,e){for(var r=t.length;r--;)if(me(t[r][0],e))return r;return-1}var Gd=Array.prototype,Hd=Gd.splice;function Vd(t){var e=this.__data__,r=ye(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Hd.call(e,r,1),--this.size,!0}function Wd(t){var e=this.__data__,r=ye(e,t);return r<0?void 0:e[r][1]}function Jd(t){return ye(this.__data__,t)>-1}function qd(t,e){var r=this.__data__,n=ye(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function ot(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])}}ot.prototype.clear=zd,ot.prototype.delete=Vd,ot.prototype.get=Wd,ot.prototype.has=Jd,ot.prototype.set=qd;var Qd=br(At,"Map");const $o=Qd;function Yd(){this.size=0,this.__data__={hash:new gt,map:new($o||ot),string:new gt}}function Xd(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ge(t,e){var r=t.__data__;return Xd(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Kd(t){var e=ge(this,t).delete(t);return this.size-=e?1:0,e}function Zd(t){return ge(this,t).get(t)}function th(t){return ge(this,t).has(t)}function eh(t,e){var r=ge(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function xt(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])}}xt.prototype.clear=Yd,xt.prototype.delete=Kd,xt.prototype.get=Zd,xt.prototype.has=th,xt.prototype.set=eh;function To(t){return t==null?"":co(t)}var rh=Cd(Object.getPrototypeOf,Object);const Ao=rh;var nh="[object Object]",oh=Function.prototype,ah=Object.prototype,Mo=oh.toString,ih=ah.hasOwnProperty,sh=Mo.call(Object);function It(t){if(!Pt(t)||Zt(t)!=nh)return!1;var e=Ao(t);if(e===null)return!0;var r=ih.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Mo.call(r)==sh}function ch(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 uh(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:ch(t,e,r)}var lh="\\ud800-\\udfff",fh="\\u0300-\\u036f",ph="\\ufe20-\\ufe2f",dh="\\u20d0-\\u20ff",hh=fh+ph+dh,vh="\\ufe0e\\ufe0f",mh="\\u200d",yh=RegExp("["+mh+lh+hh+vh+"]");function Po(t){return yh.test(t)}function gh(t){return t.split("")}var Do="\\ud800-\\udfff",bh="\\u0300-\\u036f",_h="\\ufe20-\\ufe2f",jh="\\u20d0-\\u20ff",Sh=bh+_h+jh,Oh="\\ufe0e\\ufe0f",wh="["+Do+"]",wr="["+Sh+"]",Cr="\\ud83c[\\udffb-\\udfff]",Ch="(?:"+wr+"|"+Cr+")",xo="[^"+Do+"]",Io="(?:\\ud83c[\\udde6-\\uddff]){2}",Ro="[\\ud800-\\udbff][\\udc00-\\udfff]",Eh="\\u200d",Lo=Ch+"?",Fo="["+Oh+"]?",Nh="(?:"+Eh+"(?:"+[xo,Io,Ro].join("|")+")"+Fo+Lo+")*",$h=Fo+Lo+Nh,Th="(?:"+[xo+wr+"?",wr,Io,Ro,wh].join("|")+")",Ah=RegExp(Cr+"(?="+Cr+")|"+Th+$h,"g");function Mh(t){return t.match(Ah)||[]}function Ph(t){return Po(t)?Mh(t):gh(t)}function Dh(t){return function(e){e=To(e);var r=Po(e)?Ph(e):void 0,n=r?r[0]:e.charAt(0),o=r?uh(r,1).join(""):e.slice(1);return n[t]()+o}}var xh=Dh("toUpperCase");const Ih=xh;function Rh(t){return Ih(To(t).toLowerCase())}function Lh(){this.__data__=new ot,this.size=0}function Fh(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Bh(t){return this.__data__.get(t)}function Uh(t){return this.__data__.has(t)}var kh=200;function zh(t,e){var r=this.__data__;if(r instanceof ot){var n=r.__data__;if(!$o||n.length<kh-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new xt(n)}return r.set(t,e),this.size=r.size,this}function Rt(t){var e=this.__data__=new ot(t);this.size=e.size}Rt.prototype.clear=Lh,Rt.prototype.delete=Fh,Rt.prototype.get=Bh,Rt.prototype.has=Uh,Rt.prototype.set=zh;var Bo=typeof y=="object"&&y&&!y.nodeType&&y,Uo=Bo&&typeof module=="object"&&module&&!module.nodeType&&module,Gh=Uo&&Uo.exports===Bo,ko=Gh?At.Buffer:void 0,zo=ko?ko.allocUnsafe:void 0;function Hh(t,e){if(e)return t.slice();var r=t.length,n=zo?zo(r):new t.constructor(r);return t.copy(n),n}var Vh=At.Uint8Array;const Go=Vh;function Wh(t){var e=new t.constructor(t.byteLength);return new Go(e).set(new Go(t)),e}function Jh(t,e){var r=e?Wh(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function qh(t){return typeof t.constructor=="function"&&!mo(t)?hp(Ao(t)):{}}function Qh(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 Yh=Qh();const Xh=Yh;function Er(t,e,r){(r!==void 0&&!me(t[e],r)||r===void 0&&!(e in t))&&_r(t,e,r)}function Kh(t){return Pt(t)&&jr(t)}function Nr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Zh(t){return Mp(t,No(t))}function tv(t,e,r,n,o,a,s){var i=Nr(t,r),c=Nr(e,r),u=s.get(c);if(u){Er(t,r,u);return}var l=a?a(i,c,r+"",t,e,s):void 0,p=l===void 0;if(p){var f=Dt(c),d=!f&&So(c),h=!f&&!d&&Eo(c);l=c,f||d||h?Dt(i)?l=i:Kh(i)?l=mp(i):d?(p=!1,l=Hh(c,!0)):h?(p=!1,l=Jh(c,!0)):l=[]:It(c)||Sr(c)?(l=i,Sr(i)?l=Zh(i):(!yt(i)||yr(i))&&(l=qh(c))):p=!1}p&&(s.set(c,l),o(l,c,n,a,s),s.delete(c)),Er(t,r,l)}function Ho(t,e,r,n,o){t!==e&&Xh(e,function(a,s){if(o||(o=new Rt),yt(a))tv(t,e,s,r,Ho,n,o);else{var i=n?n(Nr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),Er(t,s,i)}},No)}var ev=Rp(function(t,e,r){Ho(t,e,r)});const rv=ev,nv=function(t){return!(!t||typeof t!="function"||!t.prototype)};function Vo(t){const e=t.prototype;return!!(e&&e.isReactComponent)}function Wo(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 Jo(t){class e extends _.Component{render(){return _.createElement(t,this.props)}}return e.displayName=t.displayName,e}const bt=(t,e)=>{const r=n=>{const a=`
|
|
4
|
+
`)),{isValidate:!1,message:i,error:s}}})({data:e,message:r,throwError:n})};var $t=(t=>(t.ROOT_CONTAINER="RootContainer",t))($t||{});const bf=C({type:B(z.FUNCTION),value:v()}),_f=rr(qn(Nt,["componentName"]),C({componentName:B("RootContainer")}));function jf(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 Yt=jf(),Sf=(t,e)=>{const r={...t,value:[]},n=t.value;let o=new mt([]);return e&&(o=e.materialsMode||new mt([])),n&&(P(n)?r.value=n.map(a=>new A(a,{parent:e,materials:o})):F(n)&&r.value.push(new A(n,{parent:e,materials:o}))),r};class Tt{constructor(e,r){S(this,"nodeType","SLOT"),S(this,"rawData"),S(this,"parent"),S(this,"emitter",Yt),S(this,"data"),S(this,"id"),S(this,"materialsMode"),this.parent=(r==null?void 0:r.parent)||null,this.rawData=e;const n=(r==null?void 0:r.materials)||new mt([]);this.materialsMode=n,this.id=X(),this.data=Sf(e,this)}get value(){return this.data}export(e){const r=this.data,n=o=>{if(o instanceof A)return o.export(e);if(F(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return P(o)?o.map(a=>n(a)):(e==="design"&&delete o.id,o)};return n(r)}}const Zn=t=>{let e=[];return t.forEach(r=>{const n=r;n.type?n.type===ur.SINGLE?e.push(n.content):n.type===ur.GROUP&&(e=[...e,...Zn(n.content)]):e.push(r)}),e},fr=(t,e,r)=>{if(t.type)return t.type===z.SLOT?new Tt(t,{parent:e,materials:r}):t;if(F(t)){const n={};return Object.keys(t).forEach(o=>{n[o]=pr(t[o],e,r)}),n}else return Array.isArray(t)?t.map(n=>fr(n,e,r)):t},pr=(t,e,r)=>F(t)?fr(t,e,r):P(t)?t.map(n=>fr(n,e,r)):t;class st{constructor(e,r,n){S(this,"nodeType","PROP"),S(this,"rawData"),S(this,"parent"),S(this,"emitter",Yt),S(this,"data"),S(this,"name"),S(this,"materialsMode");const o=(n==null?void 0:n.materials)||new mt([]);this.materialsMode=o,this.parent=n==null?void 0:n.parent,this.rawData=r,this.name=e,this.data=pr(r,this,o)}isIncludeSlot(){return!1}isIncludeExpression(){return!1}get value(){return this.data}updateValue(e){const r=this.data;this.data=pr(e??r,this,this.materialsMode),this.emitter.emit("onPropChange",{value:this.data,preValue:r,node:this}),this.parent&&!(this.parent instanceof Tt)&&this.emitter.emit("onNodeChange",{value:this.parent.value,preValue:this.parent.value,node:this.parent})}get material(){const e=this.parent;if(e instanceof A){const r=e.material;return Zn((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 st||o instanceof Tt||o instanceof A)return o.export(e);if(P(o))return o.map(a=>n(a));if(F(o)){const a={};return Object.keys(o||{}).forEach(s=>{a[s]=n(o[s])}),a}return o};return n(r)}}const Of=t=>{if(typeof t=="string")return!0;lr({data:t,dataStruct:Nt,throwError:!0})},to=(t,e,r=new mt([]))=>{if(typeof t=="string")return t;const n={...t,id:t.id??X(),children:[],props:{},configure:Gn(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 st){n.props[a]=i;return}n.props[a]=new st(a,i||"",{parent:e,materials:r})}),t.children&&(Array.isArray(t.children)?n.children=t.children.map(a=>{if(a instanceof A)return a;if(F(a)){const s=a;return new A(s,{parent:e,materials:r})}else return a}):(t.children instanceof A&&(n.children=[t.children]),n.children=[new A(t.children,{parent:e,materials:r})])),n};class A{constructor(e,r){S(this,"nodeType","NODE"),S(this,"rawData"),S(this,"data"),S(this,"emitter",Yt),S(this,"parent"),S(this,"materialsModel"),S(this,"listenerHandle"),S(this,"onChangeCbQueue"),this.rawData=JSON.parse(JSON.stringify(e)),Of(e);const n=(r==null?void 0:r.materials)||new mt([]);this.parent=(r==null?void 0:r.parent)||null,this.materialsModel=n,this.data=to(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||X()};return new A(r,{materials:this.materialsModel})}updateValue(e){const r=this.data,n={...this.data,...e};this.data=to(n,this),this.emitter.emit("onNodeChange",{value:n,preValue:r,node:this})}contains(e){return vr(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}export(e){var r;const n=this.data;if(typeof n=="string")return n;const o={};Object.keys(n.props||{}).forEach(l=>{o[l]=n.props[l].export(e)});const a=(r=n.children)==null?void 0:r.map(l=>l instanceof A?l.export(e):l),s=n.configure||{},i=s.propsSetter||{},c={};Object.keys(i).forEach(l=>{const p=an(i,l,!1);p&&(c[l]=p)}),s.propsSetter=c,this.material&&this.materialsModel.usedMaterials.push(this.material);let u={...n,configure:s,props:o,children:a};return e==="design"&&delete u.id,u=hr(u),u}}const eo=(t,e,r)=>{const n={...t,id:X(),props:{},componentName:$t.ROOT_CONTAINER,children:[],configure:Gn(t.configure||{},{propsSetter:{},advanceSetter:{}})};let o=[];P(t.children)?o=t.children.map(s=>s instanceof A?s:F(s)?new A(s,{parent:e,materials:r}):s):t.children instanceof A?o.push(t.children):t.children&&F(t.children)&&o.push(new A(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 st?n.props[s]=c:n.props[s]=new st(s,c||"",{parent:e,materials:r})}),n.children=o,n};class Xt{constructor(e,{parent:r,materials:n}){S(this,"rawData"),S(this,"data"),S(this,"nodeType",$t.ROOT_CONTAINER),S(this,"emitter",Yt),S(this,"materialsModel"),S(this,"listenerHandle"),S(this,"onChangeCbQueue"),S(this,"parent"),this.materialsModel=n,this.rawData=JSON.parse(JSON.stringify(e)),this.data=eo(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=eo(n,this,this.materialsModel),this.emitter.emit("onNodeChange",{value:this.data,preValue:r,node:this})}contains(e){return vr(this,e)}export(e=ar.SAVE){var r;const n=this.data,o={};Object.keys(n.props||{}).forEach(c=>{o[c]=n.props[c].export(e)});const a=((r=n.children)==null?void 0:r.map(c=>{var u;return(u=c==null?void 0:c.export)==null?void 0:u.call(c,e)}))||[],s={...n,props:o,children:a.filter(c=>c)};let i=Hn(s,["id"]);return i=hr(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||X()};return new Xt(r,{materials:this.materialsModel,parent:null})}}const vt=t=>(t==null?void 0:t.type)===z.EXPRESSION,wf=t=>(t==null?void 0:t.type)==z.FUNCTION,X=()=>Math.random().toString(32).slice(3,9),Cf=t=>(t==null?void 0:t.nodeType)==="NODE",dr=t=>(t==null?void 0:t.nodeType)==="PROP",Ef=t=>(t==null?void 0:t.nodeType)==="SLOT",hr=t=>Vl(t,e=>F(e)?!Object.keys(e).length:P(e)?!e.length:!e);function vr(t,e){const r=[t];for(;r.length;){const n=r.shift();if((n==null?void 0:n.id)===e)return n;const o=(n==null?void 0:n.props)||{},a=i=>{if(i instanceof A){r.push(i);return}if(i instanceof Tt&&a(i.value.value),i instanceof st){a(i.value);return}if(F(i)){const c=i;Object.keys(c).map(u=>{a(c[u])});return}if(P(i)){i.forEach(c=>{a(c)});return}};a(o);const s=(n==null?void 0:n.value.children.filter(i=>i instanceof A))||[];r.push(...s)}return null}const Nf=t=>{const e=Pn(t),r=e.snippets;return delete e.snippets,e.snippets=r.map(n=>({...e,...n,id:n.id||`${t.componentName}-${X()}`,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 $f{constructor(e){S(this,"rawData"),S(this,"data"),this.rawData=e,this.data=Nf(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 Tf=t=>{if(!P(t))throw new Error("Materials must be a array");return t.map(e=>new $f(e))},Af=t=>{t==null||t.forEach(e=>{lr({data:e,dataStruct:yf,throwError:!0})})};class mt{constructor(e){S(this,"rawData"),S(this,"data"),S(this,"usedMaterials",[]),this.rawData=e,Af(e),this.data=Tf(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(p=>{const f=p.category||"default";s.includes(f)||(s.push(f),i[f]=[]),i[f].push(p)});const u=[];s.forEach(p=>{i[p].length&&u.push({name:p,list:i[p]})});const l={name:a,list:u};o.push(l)}}),o}get value(){return this.data}get rawValue(){return this.rawData}}const Mf=C({version:v(),name:v(),css:m(v()),renderType:m(L([B("COMPONENT"),B("PAGE")])),methods:m(D(bf)),componentsMeta:D(rr(C({componentName:v()}),or)),thirdLibs:m(cf),componentsTree:_f,assets:m(D(x()))}),ro=t=>(lr({data:t,dataStruct:Mf,throwError:!0}),t),mr=(t,e,r)=>({...t,componentsTree:new Xt(t.componentsTree,{parent:e,materials:r})});class he{constructor(e,r){S(this,"nodeType","PAGE"),S(this,"rawData"),S(this,"emitter",Yt),S(this,"data"),S(this,"parent"),S(this,"materialsModel"),S(this,"assetPackagesList"),ro(e),this.assetPackagesList=(r==null?void 0:r.assetPackagesList)||[],this.rawData=JSON.parse(JSON.stringify(e)),this.materialsModel=new mt((r==null?void 0:r.materials)||[]),this.data=mr(e,this,this.materialsModel)}updatePage(e){const r=this.data;this.rawData=JSON.parse(JSON.stringify(e)),this.data=mr(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=mr(e,this,this.materialsModel),this.emitter.emit("onReloadPage",{value:this.data,preValue:r,node:this})}get value(){return this.data}getNode(e){const r=this.data.componentsTree;return vr(r,e)}addNode(e,r,n="AFTER"){var o;if(n==="AFTER"||n==="BEFORE"){const a=r.parent;if(a===null&&r instanceof Xt)return console.warn("Not found parent node"),!1;if(a instanceof st)return console.warn("CProp can not add node"),!1;if(a instanceof Tt){const i=a.value.value,c=i.findIndex(u=>u===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 he)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(F(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 A(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=X();const n=new A(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 A?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 A&&a instanceof A?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 Tt){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 A||n instanceof Xt){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=ar.SAVE){var r;const n=this.data.componentsTree.export(e),o=this.assetPackagesList,a=[],s=this.materialsModel.usedMaterials.map(c=>{const u=o.find(l=>{var p;return l.package===((p=c.value.npm)==null?void 0:p.package)});return u&&a.push(u),{componentName:c.componentName,...Pn(c.value.npm||{})}}).filter(c=>{if(c.componentName&&c.package&&c.version)return!0});this.materialsModel.usedMaterials=[];let i={...this.data,componentsTree:hr(n),componentsMeta:s,thirdLibs:this.data.thirdLibs,assets:[]};return(r=this.data.thirdLibs)==null||r.forEach(c=>{const u=o.find(l=>{c.package,l.package});u&&a.push(u)}),i.assets=Kl(a,c=>c.package),i=Hn(i,["id"]),JSON.parse(JSON.stringify(i))}}$t.ROOT_CONTAINER;var Pf=typeof global=="object"&&global&&global.Object===Object&&global;const no=Pf;var Df=typeof self=="object"&&self&&self.Object===Object&&self,xf=no||Df||Function("return this")();const At=xf;var If=At.Symbol;const Mt=If;var oo=Object.prototype,Rf=oo.hasOwnProperty,Lf=oo.toString,Kt=Mt?Mt.toStringTag:void 0;function Ff(t){var e=Rf.call(t,Kt),r=t[Kt];try{t[Kt]=void 0;var n=!0}catch{}var o=Lf.call(t);return n&&(e?t[Kt]=r:delete t[Kt]),o}var Bf=Object.prototype,Uf=Bf.toString;function kf(t){return Uf.call(t)}var zf="[object Null]",Gf="[object Undefined]",ao=Mt?Mt.toStringTag:void 0;function Zt(t){return t==null?t===void 0?Gf:zf:ao&&ao in Object(t)?Ff(t):kf(t)}function Pt(t){return t!=null&&typeof t=="object"}var Hf="[object Symbol]";function Vf(t){return typeof t=="symbol"||Pt(t)&&Zt(t)==Hf}function Wf(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 Jf=Array.isArray;const Dt=Jf;var qf=1/0,io=Mt?Mt.prototype:void 0,so=io?io.toString:void 0;function co(t){if(typeof t=="string")return t;if(Dt(t))return Wf(t,co)+"";if(Vf(t))return so?so.call(t):"";var e=t+"";return e=="0"&&1/t==-qf?"-0":e}function yt(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function uo(t){return t}var Qf="[object AsyncFunction]",Yf="[object Function]",Xf="[object GeneratorFunction]",Kf="[object Proxy]";function yr(t){if(!yt(t))return!1;var e=Zt(t);return e==Yf||e==Xf||e==Qf||e==Kf}var Zf=At["__core-js_shared__"];const gr=Zf;var lo=function(){var t=/[^.]+$/.exec(gr&&gr.keys&&gr.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function tp(t){return!!lo&&lo in t}var ep=Function.prototype,rp=ep.toString;function np(t){if(t!=null){try{return rp.call(t)}catch{}try{return t+""}catch{}}return""}var op=/[\\^$.*+?()[\]{}|]/g,ap=/^\[object .+?Constructor\]$/,ip=Function.prototype,sp=Object.prototype,cp=ip.toString,up=sp.hasOwnProperty,lp=RegExp("^"+cp.call(up).replace(op,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function fp(t){if(!yt(t)||tp(t))return!1;var e=yr(t)?lp:ap;return e.test(np(t))}function pp(t,e){return t==null?void 0:t[e]}function br(t,e){var r=pp(t,e);return fp(r)?r:void 0}var fo=Object.create,dp=function(){function t(){}return function(e){if(!yt(e))return{};if(fo)return fo(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const hp=dp;function vp(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function mp(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}var yp=800,gp=16,bp=Date.now;function _p(t){var e=0,r=0;return function(){var n=bp(),o=gp-(n-r);if(r=n,o>0){if(++e>=yp)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function jp(t){return function(){return t}}var Sp=function(){try{var t=br(Object,"defineProperty");return t({},"",{}),t}catch{}}();const ve=Sp;var Op=ve?function(t,e){return ve(t,"toString",{configurable:!0,enumerable:!1,value:jp(e),writable:!0})}:uo,wp=_p(Op);const Cp=wp;var Ep=9007199254740991,Np=/^(?:0|[1-9]\d*)$/;function po(t,e){var r=typeof t;return e=e??Ep,!!e&&(r=="number"||r!="symbol"&&Np.test(t))&&t>-1&&t%1==0&&t<e}function _r(t,e,r){e=="__proto__"&&ve?ve(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}function me(t,e){return t===e||t!==t&&e!==e}var $p=Object.prototype,Tp=$p.hasOwnProperty;function Ap(t,e,r){var n=t[e];(!(Tp.call(t,e)&&me(n,r))||r===void 0&&!(e in t))&&_r(t,e,r)}function Mp(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?_r(r,i,c):Ap(r,i,c)}return r}var ho=Math.max;function Pp(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),vp(t,this,i)}}function Dp(t,e){return Cp(Pp(t,e,uo),t+"")}var xp=9007199254740991;function vo(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=xp}function jr(t){return t!=null&&vo(t.length)&&!yr(t)}function Ip(t,e,r){if(!yt(r))return!1;var n=typeof e;return(n=="number"?jr(r)&&po(e,r.length):n=="string"&&e in r)?me(r[e],t):!1}function Rp(t){return Dp(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&&Ip(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 Lp=Object.prototype;function mo(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Lp;return t===r}function Fp(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}var Bp="[object Arguments]";function yo(t){return Pt(t)&&Zt(t)==Bp}var go=Object.prototype,Up=go.hasOwnProperty,kp=go.propertyIsEnumerable,zp=yo(function(){return arguments}())?yo:function(t){return Pt(t)&&Up.call(t,"callee")&&!kp.call(t,"callee")};const Sr=zp;function Gp(){return!1}var bo=typeof y=="object"&&y&&!y.nodeType&&y,_o=bo&&typeof module=="object"&&module&&!module.nodeType&&module,Hp=_o&&_o.exports===bo,jo=Hp?At.Buffer:void 0,Vp=jo?jo.isBuffer:void 0,Wp=Vp||Gp;const So=Wp;var Jp="[object Arguments]",qp="[object Array]",Qp="[object Boolean]",Yp="[object Date]",Xp="[object Error]",Kp="[object Function]",Zp="[object Map]",td="[object Number]",ed="[object Object]",rd="[object RegExp]",nd="[object Set]",od="[object String]",ad="[object WeakMap]",id="[object ArrayBuffer]",sd="[object DataView]",cd="[object Float32Array]",ud="[object Float64Array]",ld="[object Int8Array]",fd="[object Int16Array]",pd="[object Int32Array]",dd="[object Uint8Array]",hd="[object Uint8ClampedArray]",vd="[object Uint16Array]",md="[object Uint32Array]",T={};T[cd]=T[ud]=T[ld]=T[fd]=T[pd]=T[dd]=T[hd]=T[vd]=T[md]=!0,T[Jp]=T[qp]=T[id]=T[Qp]=T[sd]=T[Yp]=T[Xp]=T[Kp]=T[Zp]=T[td]=T[ed]=T[rd]=T[nd]=T[od]=T[ad]=!1;function yd(t){return Pt(t)&&vo(t.length)&&!!T[Zt(t)]}function gd(t){return function(e){return t(e)}}var Oo=typeof y=="object"&&y&&!y.nodeType&&y,te=Oo&&typeof module=="object"&&module&&!module.nodeType&&module,bd=te&&te.exports===Oo,Or=bd&&no.process,_d=function(){try{var t=te&&te.require&&te.require("util").types;return t||Or&&Or.binding&&Or.binding("util")}catch{}}();const wo=_d;var Co=wo&&wo.isTypedArray,jd=Co?gd(Co):yd;const Eo=jd;var Sd=Object.prototype,Od=Sd.hasOwnProperty;function wd(t,e){var r=Dt(t),n=!r&&Sr(t),o=!r&&!n&&So(t),a=!r&&!n&&!o&&Eo(t),s=r||n||o||a,i=s?Fp(t.length,String):[],c=i.length;for(var u in t)(e||Od.call(t,u))&&!(s&&(u=="length"||o&&(u=="offset"||u=="parent")||a&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||po(u,c)))&&i.push(u);return i}function Cd(t,e){return function(r){return t(e(r))}}function Ed(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var Nd=Object.prototype,$d=Nd.hasOwnProperty;function Td(t){if(!yt(t))return Ed(t);var e=mo(t),r=[];for(var n in t)n=="constructor"&&(e||!$d.call(t,n))||r.push(n);return r}function No(t){return jr(t)?wd(t,!0):Td(t)}var Ad=br(Object,"create");const ee=Ad;function Md(){this.__data__=ee?ee(null):{},this.size=0}function Pd(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Dd="__lodash_hash_undefined__",xd=Object.prototype,Id=xd.hasOwnProperty;function Rd(t){var e=this.__data__;if(ee){var r=e[t];return r===Dd?void 0:r}return Id.call(e,t)?e[t]:void 0}var Ld=Object.prototype,Fd=Ld.hasOwnProperty;function Bd(t){var e=this.__data__;return ee?e[t]!==void 0:Fd.call(e,t)}var Ud="__lodash_hash_undefined__";function kd(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=ee&&e===void 0?Ud:e,this}function gt(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])}}gt.prototype.clear=Md,gt.prototype.delete=Pd,gt.prototype.get=Rd,gt.prototype.has=Bd,gt.prototype.set=kd;function zd(){this.__data__=[],this.size=0}function ye(t,e){for(var r=t.length;r--;)if(me(t[r][0],e))return r;return-1}var Gd=Array.prototype,Hd=Gd.splice;function Vd(t){var e=this.__data__,r=ye(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Hd.call(e,r,1),--this.size,!0}function Wd(t){var e=this.__data__,r=ye(e,t);return r<0?void 0:e[r][1]}function Jd(t){return ye(this.__data__,t)>-1}function qd(t,e){var r=this.__data__,n=ye(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}function ot(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])}}ot.prototype.clear=zd,ot.prototype.delete=Vd,ot.prototype.get=Wd,ot.prototype.has=Jd,ot.prototype.set=qd;var Qd=br(At,"Map");const $o=Qd;function Yd(){this.size=0,this.__data__={hash:new gt,map:new($o||ot),string:new gt}}function Xd(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function ge(t,e){var r=t.__data__;return Xd(e)?r[typeof e=="string"?"string":"hash"]:r.map}function Kd(t){var e=ge(this,t).delete(t);return this.size-=e?1:0,e}function Zd(t){return ge(this,t).get(t)}function th(t){return ge(this,t).has(t)}function eh(t,e){var r=ge(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}function xt(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])}}xt.prototype.clear=Yd,xt.prototype.delete=Kd,xt.prototype.get=Zd,xt.prototype.has=th,xt.prototype.set=eh;function To(t){return t==null?"":co(t)}var rh=Cd(Object.getPrototypeOf,Object);const Ao=rh;var nh="[object Object]",oh=Function.prototype,ah=Object.prototype,Mo=oh.toString,ih=ah.hasOwnProperty,sh=Mo.call(Object);function It(t){if(!Pt(t)||Zt(t)!=nh)return!1;var e=Ao(t);if(e===null)return!0;var r=ih.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Mo.call(r)==sh}function ch(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 uh(t,e,r){var n=t.length;return r=r===void 0?n:r,!e&&r>=n?t:ch(t,e,r)}var lh="\\ud800-\\udfff",fh="\\u0300-\\u036f",ph="\\ufe20-\\ufe2f",dh="\\u20d0-\\u20ff",hh=fh+ph+dh,vh="\\ufe0e\\ufe0f",mh="\\u200d",yh=RegExp("["+mh+lh+hh+vh+"]");function Po(t){return yh.test(t)}function gh(t){return t.split("")}var Do="\\ud800-\\udfff",bh="\\u0300-\\u036f",_h="\\ufe20-\\ufe2f",jh="\\u20d0-\\u20ff",Sh=bh+_h+jh,Oh="\\ufe0e\\ufe0f",wh="["+Do+"]",wr="["+Sh+"]",Cr="\\ud83c[\\udffb-\\udfff]",Ch="(?:"+wr+"|"+Cr+")",xo="[^"+Do+"]",Io="(?:\\ud83c[\\udde6-\\uddff]){2}",Ro="[\\ud800-\\udbff][\\udc00-\\udfff]",Eh="\\u200d",Lo=Ch+"?",Fo="["+Oh+"]?",Nh="(?:"+Eh+"(?:"+[xo,Io,Ro].join("|")+")"+Fo+Lo+")*",$h=Fo+Lo+Nh,Th="(?:"+[xo+wr+"?",wr,Io,Ro,wh].join("|")+")",Ah=RegExp(Cr+"(?="+Cr+")|"+Th+$h,"g");function Mh(t){return t.match(Ah)||[]}function Ph(t){return Po(t)?Mh(t):gh(t)}function Dh(t){return function(e){e=To(e);var r=Po(e)?Ph(e):void 0,n=r?r[0]:e.charAt(0),o=r?uh(r,1).join(""):e.slice(1);return n[t]()+o}}var xh=Dh("toUpperCase");const Ih=xh;function Rh(t){return Ih(To(t).toLowerCase())}function Lh(){this.__data__=new ot,this.size=0}function Fh(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function Bh(t){return this.__data__.get(t)}function Uh(t){return this.__data__.has(t)}var kh=200;function zh(t,e){var r=this.__data__;if(r instanceof ot){var n=r.__data__;if(!$o||n.length<kh-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new xt(n)}return r.set(t,e),this.size=r.size,this}function Rt(t){var e=this.__data__=new ot(t);this.size=e.size}Rt.prototype.clear=Lh,Rt.prototype.delete=Fh,Rt.prototype.get=Bh,Rt.prototype.has=Uh,Rt.prototype.set=zh;var Bo=typeof y=="object"&&y&&!y.nodeType&&y,Uo=Bo&&typeof module=="object"&&module&&!module.nodeType&&module,Gh=Uo&&Uo.exports===Bo,ko=Gh?At.Buffer:void 0,zo=ko?ko.allocUnsafe:void 0;function Hh(t,e){if(e)return t.slice();var r=t.length,n=zo?zo(r):new t.constructor(r);return t.copy(n),n}var Vh=At.Uint8Array;const Go=Vh;function Wh(t){var e=new t.constructor(t.byteLength);return new Go(e).set(new Go(t)),e}function Jh(t,e){var r=e?Wh(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function qh(t){return typeof t.constructor=="function"&&!mo(t)?hp(Ao(t)):{}}function Qh(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 Yh=Qh();const Xh=Yh;function Er(t,e,r){(r!==void 0&&!me(t[e],r)||r===void 0&&!(e in t))&&_r(t,e,r)}function Kh(t){return Pt(t)&&jr(t)}function Nr(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function Zh(t){return Mp(t,No(t))}function tv(t,e,r,n,o,a,s){var i=Nr(t,r),c=Nr(e,r),u=s.get(c);if(u){Er(t,r,u);return}var l=a?a(i,c,r+"",t,e,s):void 0,p=l===void 0;if(p){var f=Dt(c),d=!f&&So(c),h=!f&&!d&&Eo(c);l=c,f||d||h?Dt(i)?l=i:Kh(i)?l=mp(i):d?(p=!1,l=Hh(c,!0)):h?(p=!1,l=Jh(c,!0)):l=[]:It(c)||Sr(c)?(l=i,Sr(i)?l=Zh(i):(!yt(i)||yr(i))&&(l=qh(c))):p=!1}p&&(s.set(c,l),o(l,c,n,a,s),s.delete(c)),Er(t,r,l)}function Ho(t,e,r,n,o){t!==e&&Xh(e,function(a,s){if(o||(o=new Rt),yt(a))tv(t,e,s,r,Ho,n,o);else{var i=n?n(Nr(t,s),a,s+"",t,e,o):void 0;i===void 0&&(i=a),Er(t,s,i)}},No)}var ev=Rp(function(t,e,r){Ho(t,e,r)});const rv=ev,nv=function(t){return!(!t||typeof t!="function"||!t.prototype)};function Vo(t){const e=t.prototype;return!!(e&&e.isReactComponent)}function Wo(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 Jo(t){class e extends _.Component{render(){return _.createElement(t,this.props)}}return e.displayName=t.displayName,e}const bt=(t,e)=>{const r=n=>{const a=`
|
|
5
5
|
${Object.keys(e).map(s=>`const ${s} = $$context['${s}'];`).join(`
|
|
6
6
|
`)}
|
|
7
7
|
return ${n};
|