@dappworks/urpc
Advanced tools
Comparing version 0.0.54 to 0.0.55
@@ -1,1 +0,1 @@ | ||
var UQ=Object.create;var{defineProperty:oZ,getPrototypeOf:YQ,getOwnPropertyNames:WQ}=Object;var KQ=Object.prototype.hasOwnProperty;var s=(Z,$,Q)=>{Q=Z!=null?UQ(YQ(Z)):{};const J=$||!Z||!Z.__esModule?oZ(Q,"default",{value:Z,enumerable:!0}):Q;for(let X of WQ(Z))if(!KQ.call(J,X))oZ(J,X,{get:()=>Z[X],enumerable:!0});return J};var PZ=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var DZ=PZ(($J,W$)=>{var SQ=function(Z,$){return Z==null?void 0:Z[$]},VQ=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},I=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},fQ=function(){this.__data__=h?h(null):{}},mQ=function(Z){return this.has(Z)&&delete this.__data__[Z]},dQ=function(Z){var $=this.__data__;if(h){var Q=$[Z];return Q===Z$?void 0:Q}return r.call($,Z)?$[Z]:void 0},pQ=function(Z){var $=this.__data__;return h?$[Z]!==void 0:r.call($,Z)},jQ=function(Z,$){var Q=this.__data__;return Q[Z]=h&&$===void 0?Z$:$,this},m=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},gQ=function(){this.__data__=[]},nQ=function(Z){var $=this.__data__,Q=t($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else xQ.call($,Q,1);return!0},kQ=function(Z){var $=this.__data__,Q=t($,Z);return Q<0?void 0:$[Q][1]},hQ=function(Z){return t(this.__data__,Z)>-1},bQ=function(Z,$){var Q=this.__data__,J=t(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},A=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},yQ=function(){this.__data__={hash:new I,map:new(TQ||m),string:new I}},vQ=function(Z){return a(this,Z).delete(Z)},iQ=function(Z){return a(this,Z).get(Z)},cQ=function(Z){return a(this,Z).has(Z)},uQ=function(Z,$){return a(this,Z).set(Z,$),this},lQ=function(Z,$,Q){var J=Z[$];if(!(r.call(Z,$)&&U$(J,Q))||Q===void 0&&!($ in Z))Z[$]=Q},t=function(Z,$){var Q=Z.length;while(Q--)if(U$(Z[Q][0],$))return Q;return-1},sQ=function(Z){if(!o(Z)||$8(Z))return!1;var $=B8(Z)||VQ(Z)?CQ:HQ;return $.test(X8(Z))},oQ=function(Z,$,Q,J){if(!o(Z))return Z;$=eQ($,Z)?[$]:tQ($);var X=-1,B=$.length,U=B-1,Y=Z;while(Y!=null&&++X<B){var W=J8($[X]),K=Q;if(X!=U){var R=Y[W];if(K=J?J(R,W,Y):void 0,K===void 0)K=o(R)?R:aQ($[X+1])?[]:{}}lQ(Y,W,K),Y=Y[W]}return Z},rQ=function(Z){if(typeof Z=="string")return Z;if(zZ(Z))return eZ?eZ.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-$$?"-0":$},tQ=function(Z){return Y$(Z)?Z:Q8(Z)},a=function(Z,$){var Q=Z.__data__;return Z8($)?Q[typeof $=="string"?"string":"hash"]:Q.map},B$=function(Z,$){var Q=SQ(Z,$);return sQ(Q)?Q:void 0},aQ=function(Z,$){return $=$==null?RQ:$,!!$&&(typeof Z=="number"||MQ.test(Z))&&(Z>-1&&Z%1==0&&Z<$)},eQ=function(Z,$){if(Y$(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||zZ(Z))return!0;return FQ.test(Z)||!NQ.test(Z)||$!=null&&Z in Object($)},Z8=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},$8=function(Z){return!!rZ&&rZ in Z},J8=function(Z){if(typeof Z=="string"||zZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-$$?"-0":$},X8=function(Z){if(Z!=null){try{return J$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},MZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(wQ);var Q=function(){var J=arguments,X=$?$.apply(this,J):J[0],B=Q.cache;if(B.has(X))return B.get(X);var U=Z.apply(this,J);return Q.cache=B.set(X,U),U};return Q.cache=new(MZ.Cache||A),Q},U$=function(Z,$){return Z===$||Z!==Z&&$!==$},B8=function(Z){var $=o(Z)?X$.call(Z):"";return $==GQ||$==qQ},o=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},U8=function(Z){return!!Z&&typeof Z=="object"},zZ=function(Z){return typeof Z=="symbol"||U8(Z)&&X$.call(Z)==_Q},Y8=function(Z){return Z==null?"":rQ(Z)},W8=function(Z,$,Q){return Z==null?Z:oQ(Z,$,Q)},wQ="Expected a function",Z$="__lodash_hash_undefined__",$$=1/0,RQ=9007199254740991,GQ="[object Function]",qQ="[object GeneratorFunction]",_Q="[object Symbol]",NQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FQ=/^\w*$/,EQ=/^\./,LQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PQ=/[\\^$.*+?()[\]{}|]/g,OQ=/\\(\\)?/g,HQ=/^\[object .+?Constructor\]$/,MQ=/^(?:0|[1-9]\d*)$/,zQ=typeof global=="object"&&global&&global.Object===Object&&global,DQ=typeof self=="object"&&self&&self.Object===Object&&self,HZ=zQ||DQ||Function("return this")(),IQ=Array.prototype,AQ=Function.prototype,Q$=Object.prototype,OZ=HZ["__core-js_shared__"],rZ=function(){var Z=/[^.]+$/.exec(OZ&&OZ.keys&&OZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),J$=AQ.toString,r=Q$.hasOwnProperty,X$=Q$.toString,CQ=RegExp("^"+J$.call(r).replace(PQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tZ=HZ.Symbol,xQ=IQ.splice,TQ=B$(HZ,"Map"),h=B$(Object,"create"),aZ=tZ?tZ.prototype:void 0,eZ=aZ?aZ.toString:void 0;I.prototype.clear=fQ;I.prototype.delete=mQ;I.prototype.get=dQ;I.prototype.has=pQ;I.prototype.set=jQ;m.prototype.clear=gQ;m.prototype.delete=nQ;m.prototype.get=kQ;m.prototype.has=hQ;m.prototype.set=bQ;A.prototype.clear=yQ;A.prototype.delete=vQ;A.prototype.get=iQ;A.prototype.has=cQ;A.prototype.set=uQ;var Q8=MZ(function(Z){Z=Y8(Z);var $=[];if(EQ.test(Z))$.push("");return Z.replace(LQ,function(Q,J,X,B){$.push(X?B.replace(OQ,"$1"):J||Q)}),$});MZ.Cache=A;var Y$=Array.isArray;W$.exports=W8});var v$=PZ(($Z,p)=>{var d8=function(Z,$,Q,J){var X=-1,B=Z?Z.length:0;while(++X<B){var U=Z[X];$(J,U,Q(U),Z)}return J},p8=function(Z,$){var Q=-1,J=Z?Z.length:0;while(++Q<J)if($(Z[Q],Q,Z))return!0;return!1},j8=function(Z){return function($){return $==null?void 0:$[Z]}},g8=function(Z,$){var Q=-1,J=Array(Z);while(++Q<Z)J[Q]=$(Q);return J},n8=function(Z){return function($){return Z($)}},k8=function(Z,$){return Z==null?void 0:Z[$]},TZ=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},h8=function(Z){var $=-1,Q=Array(Z.size);return Z.forEach(function(J,X){Q[++$]=[X,J]}),Q},b8=function(Z,$){return function(Q){return Z($(Q))}},y8=function(Z){var $=-1,Q=Array(Z.size);return Z.forEach(function(J){Q[++$]=J}),Q},C=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},Z1=function(){this.__data__=v?v(null):{}},$1=function(Z){return this.has(Z)&&delete this.__data__[Z]},Q1=function(Z){var $=this.__data__;if(v){var Q=$[Z];return Q===jZ?void 0:Q}return P.call($,Z)?$[Z]:void 0},J1=function(Z){var $=this.__data__;return v?$[Z]!==void 0:P.call($,Z)},X1=function(Z,$){var Q=this.__data__;return Q[Z]=v&&$===void 0?jZ:$,this},O=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},B1=function(){this.__data__=[]},U1=function(Z){var $=this.__data__,Q=RZ($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else l8.call($,Q,1);return!0},Y1=function(Z){var $=this.__data__,Q=RZ($,Z);return Q<0?void 0:$[Q][1]},W1=function(Z){return RZ(this.__data__,Z)>-1},K1=function(Z,$){var Q=this.__data__,J=RZ(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},H=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},w1=function(){this.__data__={hash:new C,map:new(y||O),string:new C}},R1=function(Z){return GZ(this,Z).delete(Z)},G1=function(Z){return GZ(this,Z).get(Z)},q1=function(Z){return GZ(this,Z).has(Z)},_1=function(Z,$){return GZ(this,Z).set(Z,$),this},YZ=function(Z){var $=-1,Q=Z?Z.length:0;this.__data__=new H;while(++$<Q)this.add(Z[$])},N1=function(Z){return this.__data__.set(Z,jZ),this},F1=function(Z){return this.__data__.has(Z)},L=function(Z){this.__data__=new O(Z)},E1=function(){this.__data__=new O},L1=function(Z){return this.__data__.delete(Z)},P1=function(Z){return this.__data__.get(Z)},O1=function(Z){return this.__data__.has(Z)},H1=function(Z,$){var Q=this.__data__;if(Q instanceof O){var J=Q.__data__;if(!y||J.length<G8-1)return J.push([Z,$]),this;Q=this.__data__=new H(J)}return Q.set(Z,$),this},M1=function(Z,$){var Q=D(Z)||b$(Z)?g8(Z.length,String):[],J=Q.length,X=!!J;for(var B in Z)if(($||P.call(Z,B))&&!(X&&(B=="length"||g$(B,J))))Q.push(B);return Q},RZ=function(Z,$){var Q=Z.length;while(Q--)if(h$(Z[Q][0],$))return Q;return-1},z1=function(Z,$,Q,J){return D1(Z,function(X,B,U){$(J,X,Q(X),U)}),J},V1=function(Z,$){return Z&&S1(Z,$,WZ)},d$=function(Z,$){$=qZ($,Z)?[$]:p$($);var Q=0,J=$.length;while(Z!=null&&Q<J)Z=Z[_Z($[Q++])];return Q&&Q==J?Z:void 0},I1=function(Z){return g.call(Z)},A1=function(Z,$){return Z!=null&&$ in Object(Z)},gZ=function(Z,$,Q,J,X){if(Z===$)return!0;if(Z==null||$==null||!NZ(Z)&&!FZ($))return Z!==Z&&$!==$;return C1(Z,$,gZ,Q,J,X)},C1=function(Z,$,Q,J,X,B){var U=D(Z),Y=D($),W=CZ,K=CZ;if(!U)W=z(Z),W=W==QZ?d:W;if(!Y)K=z($),K=K==QZ?d:K;var R=W==d&&!TZ(Z),q=K==d&&!TZ($),G=W==K;if(G&&!R)return B||(B=new L),U||a1(Z)?j$(Z,$,Q,J,X,B):y1(Z,$,W,Q,J,X,B);if(!(X&j)){var N=R&&P.call(Z,"__wrapped__"),F=q&&P.call($,"__wrapped__");if(N||F){var M=N?Z.value():Z,E=F?$.value():$;return B||(B=new L),Q(M,E,J,X,B)}}if(!G)return!1;return B||(B=new L),v1(Z,$,Q,J,X,B)},x1=function(Z,$,Q,J){var X=Q.length,B=X,U=!J;if(Z==null)return!B;Z=Object(Z);while(X--){var Y=Q[X];if(U&&Y[2]?Y[1]!==Z[Y[0]]:!(Y[0]in Z))return!1}while(++X<B){Y=Q[X];var W=Y[0],K=Z[W],R=Y[1];if(U&&Y[2]){if(K===void 0&&!(W in Z))return!1}else{var q=new L;if(J)var G=J(K,R,W,Z,$,q);if(!(G===void 0?gZ(R,K,J,KZ|j,q):G))return!1}}return!0},T1=function(Z){if(!NZ(Z)||l1(Z))return!1;var $=y$(Z)||TZ(Z)?c8:x8;return $.test(x(Z))},f1=function(Z){return FZ(Z)&&hZ(Z.length)&&!!w[g.call(Z)]},m1=function(Z){if(typeof Z=="function")return Z;if(Z==null)return Q6;if(typeof Z=="object")return D(Z)?j1(Z[0],Z[1]):p1(Z);return J6(Z)},d1=function(Z){if(!s1(Z))return s8(Z);var $=[];for(var Q in Object(Z))if(P.call(Z,Q)&&Q!="constructor")$.push(Q);return $},p1=function(Z){var $=i1(Z);if($.length==1&&$[0][2])return k$($[0][0],$[0][1]);return function(Q){return Q===Z||x1(Q,Z,$)}},j1=function(Z,$){if(qZ(Z)&&n$($))return k$(_Z(Z),$);return function(Q){var J=Z6(Q,Z);return J===void 0&&J===$?$6(Q,Z):gZ($,J,void 0,KZ|j)}},g1=function(Z){return function($){return d$($,Z)}},n1=function(Z){if(typeof Z=="string")return Z;if(bZ(Z))return P$?P$.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-O$?"-0":$},p$=function(Z){return D(Z)?Z:o1(Z)},k1=function(Z,$){return function(Q,J){var X=D(Q)?d8:z1,B=$?$():{};return X(Q,Z,m1(J,2),B)}},h1=function(Z,$){return function(Q,J){if(Q==null)return Q;if(!kZ(Q))return Z(Q,J);var X=Q.length,B=$?X:-1,U=Object(Q);while($?B--:++B<X)if(J(U[B],B,U)===!1)break;return Q}},b1=function(Z){return function($,Q,J){var X=-1,B=Object($),U=J($),Y=U.length;while(Y--){var W=U[Z?Y:++X];if(Q(B[W],W,B)===!1)break}return $}},j$=function(Z,$,Q,J,X,B){var U=X&j,Y=Z.length,W=$.length;if(Y!=W&&!(U&&W>Y))return!1;var K=B.get(Z);if(K&&B.get($))return K==$;var R=-1,q=!0,G=X&KZ?new YZ:void 0;B.set(Z,$),B.set($,Z);while(++R<Y){var N=Z[R],F=$[R];if(J)var M=U?J(F,N,R,$,Z,B):J(N,F,R,Z,$,B);if(M!==void 0){if(M)continue;q=!1;break}if(G){if(!p8($,function(E,V){if(!G.has(V)&&(N===E||Q(N,E,J,X,B)))return G.add(V)})){q=!1;break}}else if(!(N===F||Q(N,F,J,X,B))){q=!1;break}}return B.delete(Z),B.delete($),q},y1=function(Z,$,Q,J,X,B,U){switch(Q){case BZ:if(Z.byteLength!=$.byteLength||Z.byteOffset!=$.byteOffset)return!1;Z=Z.buffer,$=$.buffer;case x$:if(Z.byteLength!=$.byteLength||!J(new L$(Z),new L$($)))return!1;return!0;case M$:case z$:case V$:return h$(+Z,+$);case D$:return Z.name==$.name&&Z.message==$.message;case I$:case A$:return Z==$+"";case JZ:var Y=h8;case XZ:var W=B&j;if(Y||(Y=y8),Z.size!=$.size&&!W)return!1;var K=U.get(Z);if(K)return K==$;B|=KZ,U.set(Z,$);var R=j$(Y(Z),Y($),J,X,B,U);return U.delete(Z),R;case C$:if(AZ)return AZ.call(Z)==AZ.call($)}return!1},v1=function(Z,$,Q,J,X,B){var U=X&j,Y=WZ(Z),W=Y.length,K=WZ($),R=K.length;if(W!=R&&!U)return!1;var q=W;while(q--){var G=Y[q];if(!(U?G in $:P.call($,G)))return!1}var N=B.get(Z);if(N&&B.get($))return N==$;var F=!0;B.set(Z,$),B.set($,Z);var M=U;while(++q<W){G=Y[q];var E=Z[G],V=$[G];if(J)var sZ=U?J(V,E,G,$,Z,B):J(E,V,G,Z,$,B);if(!(sZ===void 0?E===V||Q(E,V,J,X,B):sZ)){F=!1;break}M||(M=G=="constructor")}if(F&&!M){var u=Z.constructor,l=$.constructor;if(u!=l&&(("constructor"in Z)&&("constructor"in $))&&!(typeof u=="function"&&u instanceof u&&typeof l=="function"&&l instanceof l))F=!1}return B.delete(Z),B.delete($),F},GZ=function(Z,$){var Q=Z.__data__;return u1($)?Q[typeof $=="string"?"string":"hash"]:Q.map},i1=function(Z){var $=WZ(Z),Q=$.length;while(Q--){var J=$[Q],X=Z[J];$[Q]=[J,X,n$(X)]}return $},n=function(Z,$){var Q=k8(Z,$);return T1(Q)?Q:void 0},c1=function(Z,$,Q){$=qZ($,Z)?[$]:p$($);var J,X=-1,U=$.length;while(++X<U){var B=_Z($[X]);if(!(J=Z!=null&&Q(Z,B)))break;Z=Z[B]}if(J)return J;var U=Z?Z.length:0;return!!U&&hZ(U)&&g$(B,U)&&(D(Z)||b$(Z))},g$=function(Z,$){return $=$==null?H$:$,!!$&&(typeof Z=="number"||T8.test(Z))&&(Z>-1&&Z%1==0&&Z<$)},qZ=function(Z,$){if(D(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||bZ(Z))return!0;return S8.test(Z)||!D8.test(Z)||$!=null&&Z in Object($)},u1=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},l1=function(Z){return!!F$&&F$ in Z},s1=function(Z){var $=Z&&Z.constructor,Q=typeof $=="function"&&$.prototype||wZ;return Z===Q},n$=function(Z){return Z===Z&&!NZ(Z)},k$=function(Z,$){return function(Q){if(Q==null)return!1;return Q[Z]===$&&($!==void 0||(Z in Object(Q)))}},_Z=function(Z){if(typeof Z=="string"||bZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-O$?"-0":$},x=function(Z){if(Z!=null){try{return m$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},nZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(q8);var Q=function(){var J=arguments,X=$?$.apply(this,J):J[0],B=Q.cache;if(B.has(X))return B.get(X);var U=Z.apply(this,J);return Q.cache=B.set(X,U),U};return Q.cache=new(nZ.Cache||H),Q},h$=function(Z,$){return Z===$||Z!==Z&&$!==$},b$=function(Z){return t1(Z)&&P.call(Z,"callee")&&(!u8.call(Z,"callee")||g.call(Z)==QZ)},kZ=function(Z){return Z!=null&&hZ(Z.length)&&!y$(Z)},t1=function(Z){return FZ(Z)&&kZ(Z)},y$=function(Z){var $=NZ(Z)?g.call(Z):"";return $==S$||$==_8},hZ=function(Z){return typeof Z=="number"&&Z>-1&&Z%1==0&&Z<=H$},NZ=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},FZ=function(Z){return!!Z&&typeof Z=="object"},bZ=function(Z){return typeof Z=="symbol"||FZ(Z)&&g.call(Z)==C$},e1=function(Z){return Z==null?"":n1(Z)},Z6=function(Z,$,Q){var J=Z==null?void 0:d$(Z,$);return J===void 0?Q:J},$6=function(Z,$){return Z!=null&&c1(Z,$,A1)},WZ=function(Z){return kZ(Z)?M1(Z):d1(Z)},Q6=function(Z){return Z},J6=function(Z){return qZ(Z)?j8(_Z(Z)):g1(Z)},G8=200,q8="Expected a function",jZ="__lodash_hash_undefined__",KZ=1,j=2,O$=1/0,H$=9007199254740991,QZ="[object Arguments]",CZ="[object Array]",M$="[object Boolean]",z$="[object Date]",D$="[object Error]",S$="[object Function]",_8="[object GeneratorFunction]",JZ="[object Map]",V$="[object Number]",d="[object Object]",R$="[object Promise]",I$="[object RegExp]",XZ="[object Set]",A$="[object String]",C$="[object Symbol]",xZ="[object WeakMap]",x$="[object ArrayBuffer]",BZ="[object DataView]",N8="[object Float32Array]",F8="[object Float64Array]",E8="[object Int8Array]",L8="[object Int16Array]",P8="[object Int32Array]",O8="[object Uint8Array]",H8="[object Uint8ClampedArray]",M8="[object Uint16Array]",z8="[object Uint32Array]",D8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,S8=/^\w*$/,V8=/^\./,I8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A8=/[\\^$.*+?()[\]{}|]/g,C8=/\\(\\)?/g,x8=/^\[object .+?Constructor\]$/,T8=/^(?:0|[1-9]\d*)$/,w={};w[N8]=w[F8]=w[E8]=w[L8]=w[P8]=w[O8]=w[H8]=w[M8]=w[z8]=!0;w[QZ]=w[CZ]=w[x$]=w[M$]=w[BZ]=w[z$]=w[D$]=w[S$]=w[JZ]=w[V$]=w[d]=w[I$]=w[XZ]=w[A$]=w[xZ]=!1;var T$=typeof global=="object"&&global&&global.Object===Object&&global,f8=typeof self=="object"&&self&&self.Object===Object&&self,S=T$||f8||Function("return this")(),f$=typeof $Z=="object"&&$Z&&!$Z.nodeType&&$Z,G$=f$&&typeof p=="object"&&p&&!p.nodeType&&p,m8=G$&&G$.exports===f$,q$=m8&&T$.process,_$=function(){try{return q$&&q$.binding("util")}catch(Z){}}(),N$=_$&&_$.isTypedArray,v8=Array.prototype,i8=Function.prototype,wZ=Object.prototype,IZ=S["__core-js_shared__"],F$=function(){var Z=/[^.]+$/.exec(IZ&&IZ.keys&&IZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),m$=i8.toString,P=wZ.hasOwnProperty,g=wZ.toString,c8=RegExp("^"+m$.call(P).replace(A8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E$=S.Symbol,L$=S.Uint8Array,u8=wZ.propertyIsEnumerable,l8=v8.splice,s8=b8(Object.keys,Object),fZ=n(S,"DataView"),y=n(S,"Map"),mZ=n(S,"Promise"),dZ=n(S,"Set"),pZ=n(S,"WeakMap"),v=n(Object,"create"),o8=x(fZ),r8=x(y),t8=x(mZ),a8=x(dZ),e8=x(pZ),UZ=E$?E$.prototype:void 0,AZ=UZ?UZ.valueOf:void 0,P$=UZ?UZ.toString:void 0;C.prototype.clear=Z1;C.prototype.delete=$1;C.prototype.get=Q1;C.prototype.has=J1;C.prototype.set=X1;O.prototype.clear=B1;O.prototype.delete=U1;O.prototype.get=Y1;O.prototype.has=W1;O.prototype.set=K1;H.prototype.clear=w1;H.prototype.delete=R1;H.prototype.get=G1;H.prototype.has=q1;H.prototype.set=_1;YZ.prototype.add=YZ.prototype.push=N1;YZ.prototype.has=F1;L.prototype.clear=E1;L.prototype.delete=L1;L.prototype.get=P1;L.prototype.has=O1;L.prototype.set=H1;var D1=h1(V1),S1=b1(),z=I1;if(fZ&&z(new fZ(new ArrayBuffer(1)))!=BZ||y&&z(new y)!=JZ||mZ&&z(mZ.resolve())!=R$||dZ&&z(new dZ)!=XZ||pZ&&z(new pZ)!=xZ)z=function(Z){var $=g.call(Z),Q=$==d?Z.constructor:void 0,J=Q?x(Q):void 0;if(J)switch(J){case o8:return BZ;case r8:return JZ;case t8:return R$;case a8:return XZ;case e8:return xZ}return $};var o1=nZ(function(Z){Z=e1(Z);var $=[];if(V8.test(Z))$.push("");return Z.replace(I8,function(Q,J,X,B){$.push(X?B.replace(C8,"$1"):J||Q)}),$}),r1=k1(function(Z,$,Q){Z[Q]=$});nZ.Cache=H;var D=Array.isArray,a1=N$?n8(N$):f1;p.exports=r1});var XQ=PZ((FJ,JQ)=>{var E6=function(Z,$){return Z==null?void 0:Z[$]},L6=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},T=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},D6=function(){this.__data__=c?c(null):{}},S6=function(Z){return this.has(Z)&&delete this.__data__[Z]},V6=function(Z){var $=this.__data__;if(c){var Q=$[Z];return Q===o$?void 0:Q}return cZ.call($,Z)?$[Z]:void 0},I6=function(Z){var $=this.__data__;return c?$[Z]!==void 0:cZ.call($,Z)},A6=function(Z,$){var Q=this.__data__;return Q[Z]=c&&$===void 0?o$:$,this},k=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},C6=function(){this.__data__=[]},x6=function(Z){var $=this.__data__,Q=EZ($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else M6.call($,Q,1);return!0},T6=function(Z){var $=this.__data__,Q=EZ($,Z);return Q<0?void 0:$[Q][1]},f6=function(Z){return EZ(this.__data__,Z)>-1},m6=function(Z,$){var Q=this.__data__,J=EZ(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},f=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},d6=function(){this.__data__={hash:new T,map:new(z6||k),string:new T}},p6=function(Z){return LZ(this,Z).delete(Z)},j6=function(Z){return LZ(this,Z).get(Z)},g6=function(Z){return LZ(this,Z).has(Z)},n6=function(Z,$){return LZ(this,Z).set(Z,$),this},EZ=function(Z,$){var Q=Z.length;while(Q--)if(o6(Z[Q][0],$))return Q;return-1},k6=function(Z,$){$=v6($,Z)?[$]:y6($);var Q=0,J=$.length;while(Z!=null&&Q<J)Z=Z[l6($[Q++])];return Q&&Q==J?Z:void 0},h6=function(Z){if(!QQ(Z)||c6(Z))return!1;var $=r6(Z)||L6(Z)?H6:_6;return $.test(s6(Z))},b6=function(Z){if(typeof Z=="string")return Z;if(lZ(Z))return s$?s$.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-r$?"-0":$},y6=function(Z){return $Q(Z)?Z:u6(Z)},LZ=function(Z,$){var Q=Z.__data__;return i6($)?Q[typeof $=="string"?"string":"hash"]:Q.map},ZQ=function(Z,$){var Q=E6(Z,$);return h6(Q)?Q:void 0},v6=function(Z,$){if($Q(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||lZ(Z))return!0;return K6.test(Z)||!W6.test(Z)||$!=null&&Z in Object($)},i6=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},c6=function(Z){return!!c$&&c$ in Z},l6=function(Z){if(typeof Z=="string"||lZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-r$?"-0":$},s6=function(Z){if(Z!=null){try{return a$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},uZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(X6);var Q=function(){var J=arguments,X=$?$.apply(this,J):J[0],B=Q.cache;if(B.has(X))return B.get(X);var U=Z.apply(this,J);return Q.cache=B.set(X,U),U};return Q.cache=new(uZ.Cache||f),Q},o6=function(Z,$){return Z===$||Z!==Z&&$!==$},r6=function(Z){var $=QQ(Z)?e$.call(Z):"";return $==B6||$==U6},QQ=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},t6=function(Z){return!!Z&&typeof Z=="object"},lZ=function(Z){return typeof Z=="symbol"||t6(Z)&&e$.call(Z)==Y6},a6=function(Z){return Z==null?"":b6(Z)},e6=function(Z,$,Q){var J=Z==null?void 0:k6(Z,$);return J===void 0?Q:J},X6="Expected a function",o$="__lodash_hash_undefined__",r$=1/0,B6="[object Function]",U6="[object GeneratorFunction]",Y6="[object Symbol]",W6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K6=/^\w*$/,w6=/^\./,R6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G6=/[\\^$.*+?()[\]{}|]/g,q6=/\\(\\)?/g,_6=/^\[object .+?Constructor\]$/,N6=typeof global=="object"&&global&&global.Object===Object&&global,F6=typeof self=="object"&&self&&self.Object===Object&&self,iZ=N6||F6||Function("return this")(),P6=Array.prototype,O6=Function.prototype,t$=Object.prototype,vZ=iZ["__core-js_shared__"],c$=function(){var Z=/[^.]+$/.exec(vZ&&vZ.keys&&vZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),a$=O6.toString,cZ=t$.hasOwnProperty,e$=t$.toString,H6=RegExp("^"+a$.call(cZ).replace(G6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),u$=iZ.Symbol,M6=P6.splice,z6=ZQ(iZ,"Map"),c=ZQ(Object,"create"),l$=u$?u$.prototype:void 0,s$=l$?l$.toString:void 0;T.prototype.clear=D6;T.prototype.delete=S6;T.prototype.get=V6;T.prototype.has=I6;T.prototype.set=A6;k.prototype.clear=C6;k.prototype.delete=x6;k.prototype.get=T6;k.prototype.has=f6;k.prototype.set=m6;f.prototype.clear=d6;f.prototype.delete=p6;f.prototype.get=j6;f.prototype.has=g6;f.prototype.set=n6;var u6=uZ(function(Z){Z=a6(Z);var $=[];if(w6.test(Z))$.push("");return Z.replace(R6,function(Q,J,X,B){$.push(X?B.replace(q6,"$1"):J||Q)}),$});uZ.Cache=f;var $Q=Array.isArray;JQ.exports=e6});var K$=s(DZ(),1),e={isNamespace:(Z)=>Z&&!Z.type,flattenSchema(Z,$){return Object.entries(Z).reduce((Q,[J,X])=>{const B=$?`${$}.${J}`:J;if(e.isNamespace(X))Q={...Q,...e.flattenSchema(X,B)};else Object.assign(X,{name:B}),Q[B]=X;return Q},{})},wrapSchema(Z){return Object.values(Z).reduce(($,Q)=>{return K$.default($,Q.path,Q),$},{})}};var ZZ,K8=new Uint8Array(16);function SZ(){if(!ZZ){if(ZZ=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ZZ)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}return ZZ(K8)}function w$(Z,$=0){return _[Z[$+0]]+_[Z[$+1]]+_[Z[$+2]]+_[Z[$+3]]+"-"+_[Z[$+4]]+_[Z[$+5]]+"-"+_[Z[$+6]]+_[Z[$+7]]+"-"+_[Z[$+8]]+_[Z[$+9]]+"-"+_[Z[$+10]]+_[Z[$+11]]+_[Z[$+12]]+_[Z[$+13]]+_[Z[$+14]]+_[Z[$+15]]}var _=[];for(let Z=0;Z<256;++Z)_.push((Z+256).toString(16).slice(1));var w8=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),VZ={randomUUID:w8};var R8=function(Z,$,Q){if(VZ.randomUUID&&!$&&!Z)return VZ.randomUUID();Z=Z||{};const J=Z.random||(Z.rng||SZ)();if(J[6]=J[6]&15|64,J[8]=J[8]&63|128,$){Q=Q||0;for(let X=0;X<16;++X)$[Q+X]=J[X];return $}return w$(J)},b=R8;var i$=s(v$(),1),yZ=s(DZ(),1);class i{schemas;falttenSchema;uidSchemas;static type(Z){return Z}static Namespace(Z){return Z}static Var(Z){if(!Z.get)throw new Error("invalid Var params");const $=Z.get;return Z.get=async()=>{const Q=await $();return Z.value=Q,Q},{...Z,type:"var",uid:b()}}static Func(Z){return{...Z,type:"func",uid:b()}}static Action(Z){return{...Z,type:"action",uid:b()}}constructor(Z={}){Object.assign(this,Z),this.falttenSchema=e.flattenSchema(this.schemas),this.uidSchemas=i$.default(Object.values(this.falttenSchema),"uid")}static utils={async formatVar(Z){const{uid:$,type:Q,get:J,name:X}=Z,B=await J(),U=Z.schema?Z.schema(B):{},Y={uid:$,type:Q,name:X,value:B,set:!!Z.set,_schema:U};return await i.utils.formatSchema(Y),Z._schema=Y._schema,Y.schema=Y._schema,Y._schema=void 0,Y},async formatFunc(Z,$){const{uid:Q,type:J,name:X,func:B}=Z,U=typeof Z.uiConfig=="function"?await Z.uiConfig():Z.uiConfig||{},Y={uid:Q,type:J,name:X,uiConfig:U,input:{}},W=(typeof Z.input=="function"?await Z.input($):Z.input)||{};return await Promise.all(Object.entries(W).map(async([K,R])=>{const q=typeof R=="function"?await R():R;if(!Y.uiConfig[K])Y.uiConfig[K]={};if(q.uiConfig)Object.assign(Y.uiConfig[K],q.uiConfig);if(q.enums)yZ.default(Y,`uiConfig[${K}].selectOptions`,q.enums.map((G)=>({label:G.label??G,value:G.value??G})));Y.input[K]=q.default})),Y},async formatSchema(Z){if(Z._schema){let $=Array.isArray(Z.value)&&typeof Z.value[0]=="object"?Z.value[0]:Z.value;if(Z.value)Object.entries($).map(([Q,J])=>{if(Z._schema[Q])return;Z._schema[Q]={type:typeof J,default:J}});await Promise.all(Object.entries(Z._schema).map(async([Q,J])=>{if(!J)return;const X=typeof J=="function"?J():J;Z._schema[Q]=X;const B=X;if(B.enums)yZ.default(Z._schema[Q],"uiConfig.selectOptions",B.enums.map((U)=>({label:U.label??U,value:U.value??U})));if(X.uiConfig&&typeof X.uiConfig=="function")X.uiConfig=X.uiConfig();if(X.input)Z._schema[Q]=await i.utils.formatFunc(X,Z)}))}}};async loadFull(Z){return Promise.all(Object.entries(this.falttenSchema).filter(([$,Q])=>{if(Z?.namespace&&!$.startsWith(Z.namespace))return;return!0}).map(async([$,Q])=>{if(Q.type=="func")return i.utils.formatFunc(Q);if(Q.type=="var")return i.utils.formatVar(Q);return{type:"unknown",name:$}}))}async loadVars(Z){return Promise.all(Object.entries(this.falttenSchema).filter(([$,Q])=>{if(Z?.namespace&&!$.startsWith(Z.namespace))return;if(Q.type=="var")return Q.type=="var"}).map(async([$,Q])=>{const{get:J,name:X}=Q,B=await J();return{name:X,value:B}}))}}var BQ=s(XQ(),1),EJ=(Z)=>{return{schema:{async loadFull($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadFull",params:$})}).then((Q)=>Q.json())},async loadVars($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadVars",params:$})}).then((Q)=>Q.json())}},func:{async call($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"func.call",params:$})}).then((Q)=>Q.json())}},var:{async set($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.set",params:$})}).then((Q)=>Q.json())},async action($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.action",params:$})}).then((Q)=>Q.json())},async call($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.call",params:$})}).then((Q)=>Q.json())}}}},LJ=({urpc:Z})=>{const $={urpc:Z,handle({name:Q,params:J}){const X=BQ.default($,Q);if(!X)throw new Error("invalid name");return X(J)},schema:{async loadFull(Q){return Z.loadFull(Q)},async loadVars(Q){return Z.loadVars(Q)}},func:{async call(Q){const J=Z.uidSchemas[Q.method]||Z.falttenSchema[Q.method];if(!J)throw new Error("invalid func name");return J.func(Q)}},var:{async set(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");if(!J.set)throw new Error("variable can't be set");return J.set(Q.value)},async action(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");const X=J._schema[Q.action];if(!X)throw new Error("invalid action name");return X.func({...Q,val:Q.value})},async call(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");const X=J._schema[Q.method];if(!X)throw new Error("invalid func name");return Q.value=J.value,X.func({...Q,val:J.value})}}};return $};export{e as utils,EJ as createSimpleHttpClient,LJ as createServerClient,i as URPC}; | ||
var UQ=Object.create;var{defineProperty:oZ,getPrototypeOf:YQ,getOwnPropertyNames:WQ}=Object;var KQ=Object.prototype.hasOwnProperty;var s=(Z,$,Q)=>{Q=Z!=null?UQ(YQ(Z)):{};const J=$||!Z||!Z.__esModule?oZ(Q,"default",{value:Z,enumerable:!0}):Q;for(let X of WQ(Z))if(!KQ.call(J,X))oZ(J,X,{get:()=>Z[X],enumerable:!0});return J};var PZ=(Z,$)=>()=>($||Z(($={exports:{}}).exports,$),$.exports);var DZ=PZ(($J,W$)=>{var SQ=function(Z,$){return Z==null?void 0:Z[$]},VQ=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},I=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},fQ=function(){this.__data__=h?h(null):{}},mQ=function(Z){return this.has(Z)&&delete this.__data__[Z]},dQ=function(Z){var $=this.__data__;if(h){var Q=$[Z];return Q===Z$?void 0:Q}return r.call($,Z)?$[Z]:void 0},pQ=function(Z){var $=this.__data__;return h?$[Z]!==void 0:r.call($,Z)},jQ=function(Z,$){var Q=this.__data__;return Q[Z]=h&&$===void 0?Z$:$,this},m=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},gQ=function(){this.__data__=[]},nQ=function(Z){var $=this.__data__,Q=t($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else xQ.call($,Q,1);return!0},kQ=function(Z){var $=this.__data__,Q=t($,Z);return Q<0?void 0:$[Q][1]},hQ=function(Z){return t(this.__data__,Z)>-1},bQ=function(Z,$){var Q=this.__data__,J=t(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},A=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},yQ=function(){this.__data__={hash:new I,map:new(TQ||m),string:new I}},vQ=function(Z){return a(this,Z).delete(Z)},iQ=function(Z){return a(this,Z).get(Z)},cQ=function(Z){return a(this,Z).has(Z)},uQ=function(Z,$){return a(this,Z).set(Z,$),this},lQ=function(Z,$,Q){var J=Z[$];if(!(r.call(Z,$)&&U$(J,Q))||Q===void 0&&!($ in Z))Z[$]=Q},t=function(Z,$){var Q=Z.length;while(Q--)if(U$(Z[Q][0],$))return Q;return-1},sQ=function(Z){if(!o(Z)||$8(Z))return!1;var $=B8(Z)||VQ(Z)?CQ:HQ;return $.test(X8(Z))},oQ=function(Z,$,Q,J){if(!o(Z))return Z;$=eQ($,Z)?[$]:tQ($);var X=-1,B=$.length,U=B-1,Y=Z;while(Y!=null&&++X<B){var W=J8($[X]),K=Q;if(X!=U){var R=Y[W];if(K=J?J(R,W,Y):void 0,K===void 0)K=o(R)?R:aQ($[X+1])?[]:{}}lQ(Y,W,K),Y=Y[W]}return Z},rQ=function(Z){if(typeof Z=="string")return Z;if(zZ(Z))return eZ?eZ.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-$$?"-0":$},tQ=function(Z){return Y$(Z)?Z:Q8(Z)},a=function(Z,$){var Q=Z.__data__;return Z8($)?Q[typeof $=="string"?"string":"hash"]:Q.map},B$=function(Z,$){var Q=SQ(Z,$);return sQ(Q)?Q:void 0},aQ=function(Z,$){return $=$==null?RQ:$,!!$&&(typeof Z=="number"||MQ.test(Z))&&(Z>-1&&Z%1==0&&Z<$)},eQ=function(Z,$){if(Y$(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||zZ(Z))return!0;return FQ.test(Z)||!NQ.test(Z)||$!=null&&Z in Object($)},Z8=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},$8=function(Z){return!!rZ&&rZ in Z},J8=function(Z){if(typeof Z=="string"||zZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-$$?"-0":$},X8=function(Z){if(Z!=null){try{return J$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},MZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(wQ);var Q=function(){var J=arguments,X=$?$.apply(this,J):J[0],B=Q.cache;if(B.has(X))return B.get(X);var U=Z.apply(this,J);return Q.cache=B.set(X,U),U};return Q.cache=new(MZ.Cache||A),Q},U$=function(Z,$){return Z===$||Z!==Z&&$!==$},B8=function(Z){var $=o(Z)?X$.call(Z):"";return $==GQ||$==qQ},o=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},U8=function(Z){return!!Z&&typeof Z=="object"},zZ=function(Z){return typeof Z=="symbol"||U8(Z)&&X$.call(Z)==_Q},Y8=function(Z){return Z==null?"":rQ(Z)},W8=function(Z,$,Q){return Z==null?Z:oQ(Z,$,Q)},wQ="Expected a function",Z$="__lodash_hash_undefined__",$$=1/0,RQ=9007199254740991,GQ="[object Function]",qQ="[object GeneratorFunction]",_Q="[object Symbol]",NQ=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,FQ=/^\w*$/,EQ=/^\./,LQ=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,PQ=/[\\^$.*+?()[\]{}|]/g,OQ=/\\(\\)?/g,HQ=/^\[object .+?Constructor\]$/,MQ=/^(?:0|[1-9]\d*)$/,zQ=typeof global=="object"&&global&&global.Object===Object&&global,DQ=typeof self=="object"&&self&&self.Object===Object&&self,HZ=zQ||DQ||Function("return this")(),IQ=Array.prototype,AQ=Function.prototype,Q$=Object.prototype,OZ=HZ["__core-js_shared__"],rZ=function(){var Z=/[^.]+$/.exec(OZ&&OZ.keys&&OZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),J$=AQ.toString,r=Q$.hasOwnProperty,X$=Q$.toString,CQ=RegExp("^"+J$.call(r).replace(PQ,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),tZ=HZ.Symbol,xQ=IQ.splice,TQ=B$(HZ,"Map"),h=B$(Object,"create"),aZ=tZ?tZ.prototype:void 0,eZ=aZ?aZ.toString:void 0;I.prototype.clear=fQ;I.prototype.delete=mQ;I.prototype.get=dQ;I.prototype.has=pQ;I.prototype.set=jQ;m.prototype.clear=gQ;m.prototype.delete=nQ;m.prototype.get=kQ;m.prototype.has=hQ;m.prototype.set=bQ;A.prototype.clear=yQ;A.prototype.delete=vQ;A.prototype.get=iQ;A.prototype.has=cQ;A.prototype.set=uQ;var Q8=MZ(function(Z){Z=Y8(Z);var $=[];if(EQ.test(Z))$.push("");return Z.replace(LQ,function(Q,J,X,B){$.push(X?B.replace(OQ,"$1"):J||Q)}),$});MZ.Cache=A;var Y$=Array.isArray;W$.exports=W8});var v$=PZ(($Z,p)=>{var d8=function(Z,$,Q,J){var X=-1,B=Z?Z.length:0;while(++X<B){var U=Z[X];$(J,U,Q(U),Z)}return J},p8=function(Z,$){var Q=-1,J=Z?Z.length:0;while(++Q<J)if($(Z[Q],Q,Z))return!0;return!1},j8=function(Z){return function($){return $==null?void 0:$[Z]}},g8=function(Z,$){var Q=-1,J=Array(Z);while(++Q<Z)J[Q]=$(Q);return J},n8=function(Z){return function($){return Z($)}},k8=function(Z,$){return Z==null?void 0:Z[$]},TZ=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},h8=function(Z){var $=-1,Q=Array(Z.size);return Z.forEach(function(J,X){Q[++$]=[X,J]}),Q},b8=function(Z,$){return function(Q){return Z($(Q))}},y8=function(Z){var $=-1,Q=Array(Z.size);return Z.forEach(function(J){Q[++$]=J}),Q},C=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},Z1=function(){this.__data__=v?v(null):{}},$1=function(Z){return this.has(Z)&&delete this.__data__[Z]},Q1=function(Z){var $=this.__data__;if(v){var Q=$[Z];return Q===jZ?void 0:Q}return P.call($,Z)?$[Z]:void 0},J1=function(Z){var $=this.__data__;return v?$[Z]!==void 0:P.call($,Z)},X1=function(Z,$){var Q=this.__data__;return Q[Z]=v&&$===void 0?jZ:$,this},O=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},B1=function(){this.__data__=[]},U1=function(Z){var $=this.__data__,Q=RZ($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else l8.call($,Q,1);return!0},Y1=function(Z){var $=this.__data__,Q=RZ($,Z);return Q<0?void 0:$[Q][1]},W1=function(Z){return RZ(this.__data__,Z)>-1},K1=function(Z,$){var Q=this.__data__,J=RZ(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},H=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},w1=function(){this.__data__={hash:new C,map:new(y||O),string:new C}},R1=function(Z){return GZ(this,Z).delete(Z)},G1=function(Z){return GZ(this,Z).get(Z)},q1=function(Z){return GZ(this,Z).has(Z)},_1=function(Z,$){return GZ(this,Z).set(Z,$),this},YZ=function(Z){var $=-1,Q=Z?Z.length:0;this.__data__=new H;while(++$<Q)this.add(Z[$])},N1=function(Z){return this.__data__.set(Z,jZ),this},F1=function(Z){return this.__data__.has(Z)},L=function(Z){this.__data__=new O(Z)},E1=function(){this.__data__=new O},L1=function(Z){return this.__data__.delete(Z)},P1=function(Z){return this.__data__.get(Z)},O1=function(Z){return this.__data__.has(Z)},H1=function(Z,$){var Q=this.__data__;if(Q instanceof O){var J=Q.__data__;if(!y||J.length<G8-1)return J.push([Z,$]),this;Q=this.__data__=new H(J)}return Q.set(Z,$),this},M1=function(Z,$){var Q=D(Z)||b$(Z)?g8(Z.length,String):[],J=Q.length,X=!!J;for(var B in Z)if(($||P.call(Z,B))&&!(X&&(B=="length"||g$(B,J))))Q.push(B);return Q},RZ=function(Z,$){var Q=Z.length;while(Q--)if(h$(Z[Q][0],$))return Q;return-1},z1=function(Z,$,Q,J){return D1(Z,function(X,B,U){$(J,X,Q(X),U)}),J},V1=function(Z,$){return Z&&S1(Z,$,WZ)},d$=function(Z,$){$=qZ($,Z)?[$]:p$($);var Q=0,J=$.length;while(Z!=null&&Q<J)Z=Z[_Z($[Q++])];return Q&&Q==J?Z:void 0},I1=function(Z){return g.call(Z)},A1=function(Z,$){return Z!=null&&$ in Object(Z)},gZ=function(Z,$,Q,J,X){if(Z===$)return!0;if(Z==null||$==null||!NZ(Z)&&!FZ($))return Z!==Z&&$!==$;return C1(Z,$,gZ,Q,J,X)},C1=function(Z,$,Q,J,X,B){var U=D(Z),Y=D($),W=CZ,K=CZ;if(!U)W=z(Z),W=W==QZ?d:W;if(!Y)K=z($),K=K==QZ?d:K;var R=W==d&&!TZ(Z),q=K==d&&!TZ($),G=W==K;if(G&&!R)return B||(B=new L),U||a1(Z)?j$(Z,$,Q,J,X,B):y1(Z,$,W,Q,J,X,B);if(!(X&j)){var N=R&&P.call(Z,"__wrapped__"),F=q&&P.call($,"__wrapped__");if(N||F){var M=N?Z.value():Z,E=F?$.value():$;return B||(B=new L),Q(M,E,J,X,B)}}if(!G)return!1;return B||(B=new L),v1(Z,$,Q,J,X,B)},x1=function(Z,$,Q,J){var X=Q.length,B=X,U=!J;if(Z==null)return!B;Z=Object(Z);while(X--){var Y=Q[X];if(U&&Y[2]?Y[1]!==Z[Y[0]]:!(Y[0]in Z))return!1}while(++X<B){Y=Q[X];var W=Y[0],K=Z[W],R=Y[1];if(U&&Y[2]){if(K===void 0&&!(W in Z))return!1}else{var q=new L;if(J)var G=J(K,R,W,Z,$,q);if(!(G===void 0?gZ(R,K,J,KZ|j,q):G))return!1}}return!0},T1=function(Z){if(!NZ(Z)||l1(Z))return!1;var $=y$(Z)||TZ(Z)?c8:x8;return $.test(x(Z))},f1=function(Z){return FZ(Z)&&hZ(Z.length)&&!!w[g.call(Z)]},m1=function(Z){if(typeof Z=="function")return Z;if(Z==null)return Q6;if(typeof Z=="object")return D(Z)?j1(Z[0],Z[1]):p1(Z);return J6(Z)},d1=function(Z){if(!s1(Z))return s8(Z);var $=[];for(var Q in Object(Z))if(P.call(Z,Q)&&Q!="constructor")$.push(Q);return $},p1=function(Z){var $=i1(Z);if($.length==1&&$[0][2])return k$($[0][0],$[0][1]);return function(Q){return Q===Z||x1(Q,Z,$)}},j1=function(Z,$){if(qZ(Z)&&n$($))return k$(_Z(Z),$);return function(Q){var J=Z6(Q,Z);return J===void 0&&J===$?$6(Q,Z):gZ($,J,void 0,KZ|j)}},g1=function(Z){return function($){return d$($,Z)}},n1=function(Z){if(typeof Z=="string")return Z;if(bZ(Z))return P$?P$.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-O$?"-0":$},p$=function(Z){return D(Z)?Z:o1(Z)},k1=function(Z,$){return function(Q,J){var X=D(Q)?d8:z1,B=$?$():{};return X(Q,Z,m1(J,2),B)}},h1=function(Z,$){return function(Q,J){if(Q==null)return Q;if(!kZ(Q))return Z(Q,J);var X=Q.length,B=$?X:-1,U=Object(Q);while($?B--:++B<X)if(J(U[B],B,U)===!1)break;return Q}},b1=function(Z){return function($,Q,J){var X=-1,B=Object($),U=J($),Y=U.length;while(Y--){var W=U[Z?Y:++X];if(Q(B[W],W,B)===!1)break}return $}},j$=function(Z,$,Q,J,X,B){var U=X&j,Y=Z.length,W=$.length;if(Y!=W&&!(U&&W>Y))return!1;var K=B.get(Z);if(K&&B.get($))return K==$;var R=-1,q=!0,G=X&KZ?new YZ:void 0;B.set(Z,$),B.set($,Z);while(++R<Y){var N=Z[R],F=$[R];if(J)var M=U?J(F,N,R,$,Z,B):J(N,F,R,Z,$,B);if(M!==void 0){if(M)continue;q=!1;break}if(G){if(!p8($,function(E,V){if(!G.has(V)&&(N===E||Q(N,E,J,X,B)))return G.add(V)})){q=!1;break}}else if(!(N===F||Q(N,F,J,X,B))){q=!1;break}}return B.delete(Z),B.delete($),q},y1=function(Z,$,Q,J,X,B,U){switch(Q){case BZ:if(Z.byteLength!=$.byteLength||Z.byteOffset!=$.byteOffset)return!1;Z=Z.buffer,$=$.buffer;case x$:if(Z.byteLength!=$.byteLength||!J(new L$(Z),new L$($)))return!1;return!0;case M$:case z$:case V$:return h$(+Z,+$);case D$:return Z.name==$.name&&Z.message==$.message;case I$:case A$:return Z==$+"";case JZ:var Y=h8;case XZ:var W=B&j;if(Y||(Y=y8),Z.size!=$.size&&!W)return!1;var K=U.get(Z);if(K)return K==$;B|=KZ,U.set(Z,$);var R=j$(Y(Z),Y($),J,X,B,U);return U.delete(Z),R;case C$:if(AZ)return AZ.call(Z)==AZ.call($)}return!1},v1=function(Z,$,Q,J,X,B){var U=X&j,Y=WZ(Z),W=Y.length,K=WZ($),R=K.length;if(W!=R&&!U)return!1;var q=W;while(q--){var G=Y[q];if(!(U?G in $:P.call($,G)))return!1}var N=B.get(Z);if(N&&B.get($))return N==$;var F=!0;B.set(Z,$),B.set($,Z);var M=U;while(++q<W){G=Y[q];var E=Z[G],V=$[G];if(J)var sZ=U?J(V,E,G,$,Z,B):J(E,V,G,Z,$,B);if(!(sZ===void 0?E===V||Q(E,V,J,X,B):sZ)){F=!1;break}M||(M=G=="constructor")}if(F&&!M){var u=Z.constructor,l=$.constructor;if(u!=l&&(("constructor"in Z)&&("constructor"in $))&&!(typeof u=="function"&&u instanceof u&&typeof l=="function"&&l instanceof l))F=!1}return B.delete(Z),B.delete($),F},GZ=function(Z,$){var Q=Z.__data__;return u1($)?Q[typeof $=="string"?"string":"hash"]:Q.map},i1=function(Z){var $=WZ(Z),Q=$.length;while(Q--){var J=$[Q],X=Z[J];$[Q]=[J,X,n$(X)]}return $},n=function(Z,$){var Q=k8(Z,$);return T1(Q)?Q:void 0},c1=function(Z,$,Q){$=qZ($,Z)?[$]:p$($);var J,X=-1,U=$.length;while(++X<U){var B=_Z($[X]);if(!(J=Z!=null&&Q(Z,B)))break;Z=Z[B]}if(J)return J;var U=Z?Z.length:0;return!!U&&hZ(U)&&g$(B,U)&&(D(Z)||b$(Z))},g$=function(Z,$){return $=$==null?H$:$,!!$&&(typeof Z=="number"||T8.test(Z))&&(Z>-1&&Z%1==0&&Z<$)},qZ=function(Z,$){if(D(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||bZ(Z))return!0;return S8.test(Z)||!D8.test(Z)||$!=null&&Z in Object($)},u1=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},l1=function(Z){return!!F$&&F$ in Z},s1=function(Z){var $=Z&&Z.constructor,Q=typeof $=="function"&&$.prototype||wZ;return Z===Q},n$=function(Z){return Z===Z&&!NZ(Z)},k$=function(Z,$){return function(Q){if(Q==null)return!1;return Q[Z]===$&&($!==void 0||(Z in Object(Q)))}},_Z=function(Z){if(typeof Z=="string"||bZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-O$?"-0":$},x=function(Z){if(Z!=null){try{return m$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},nZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(q8);var Q=function(){var J=arguments,X=$?$.apply(this,J):J[0],B=Q.cache;if(B.has(X))return B.get(X);var U=Z.apply(this,J);return Q.cache=B.set(X,U),U};return Q.cache=new(nZ.Cache||H),Q},h$=function(Z,$){return Z===$||Z!==Z&&$!==$},b$=function(Z){return t1(Z)&&P.call(Z,"callee")&&(!u8.call(Z,"callee")||g.call(Z)==QZ)},kZ=function(Z){return Z!=null&&hZ(Z.length)&&!y$(Z)},t1=function(Z){return FZ(Z)&&kZ(Z)},y$=function(Z){var $=NZ(Z)?g.call(Z):"";return $==S$||$==_8},hZ=function(Z){return typeof Z=="number"&&Z>-1&&Z%1==0&&Z<=H$},NZ=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},FZ=function(Z){return!!Z&&typeof Z=="object"},bZ=function(Z){return typeof Z=="symbol"||FZ(Z)&&g.call(Z)==C$},e1=function(Z){return Z==null?"":n1(Z)},Z6=function(Z,$,Q){var J=Z==null?void 0:d$(Z,$);return J===void 0?Q:J},$6=function(Z,$){return Z!=null&&c1(Z,$,A1)},WZ=function(Z){return kZ(Z)?M1(Z):d1(Z)},Q6=function(Z){return Z},J6=function(Z){return qZ(Z)?j8(_Z(Z)):g1(Z)},G8=200,q8="Expected a function",jZ="__lodash_hash_undefined__",KZ=1,j=2,O$=1/0,H$=9007199254740991,QZ="[object Arguments]",CZ="[object Array]",M$="[object Boolean]",z$="[object Date]",D$="[object Error]",S$="[object Function]",_8="[object GeneratorFunction]",JZ="[object Map]",V$="[object Number]",d="[object Object]",R$="[object Promise]",I$="[object RegExp]",XZ="[object Set]",A$="[object String]",C$="[object Symbol]",xZ="[object WeakMap]",x$="[object ArrayBuffer]",BZ="[object DataView]",N8="[object Float32Array]",F8="[object Float64Array]",E8="[object Int8Array]",L8="[object Int16Array]",P8="[object Int32Array]",O8="[object Uint8Array]",H8="[object Uint8ClampedArray]",M8="[object Uint16Array]",z8="[object Uint32Array]",D8=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,S8=/^\w*$/,V8=/^\./,I8=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,A8=/[\\^$.*+?()[\]{}|]/g,C8=/\\(\\)?/g,x8=/^\[object .+?Constructor\]$/,T8=/^(?:0|[1-9]\d*)$/,w={};w[N8]=w[F8]=w[E8]=w[L8]=w[P8]=w[O8]=w[H8]=w[M8]=w[z8]=!0;w[QZ]=w[CZ]=w[x$]=w[M$]=w[BZ]=w[z$]=w[D$]=w[S$]=w[JZ]=w[V$]=w[d]=w[I$]=w[XZ]=w[A$]=w[xZ]=!1;var T$=typeof global=="object"&&global&&global.Object===Object&&global,f8=typeof self=="object"&&self&&self.Object===Object&&self,S=T$||f8||Function("return this")(),f$=typeof $Z=="object"&&$Z&&!$Z.nodeType&&$Z,G$=f$&&typeof p=="object"&&p&&!p.nodeType&&p,m8=G$&&G$.exports===f$,q$=m8&&T$.process,_$=function(){try{return q$&&q$.binding("util")}catch(Z){}}(),N$=_$&&_$.isTypedArray,v8=Array.prototype,i8=Function.prototype,wZ=Object.prototype,IZ=S["__core-js_shared__"],F$=function(){var Z=/[^.]+$/.exec(IZ&&IZ.keys&&IZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),m$=i8.toString,P=wZ.hasOwnProperty,g=wZ.toString,c8=RegExp("^"+m$.call(P).replace(A8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),E$=S.Symbol,L$=S.Uint8Array,u8=wZ.propertyIsEnumerable,l8=v8.splice,s8=b8(Object.keys,Object),fZ=n(S,"DataView"),y=n(S,"Map"),mZ=n(S,"Promise"),dZ=n(S,"Set"),pZ=n(S,"WeakMap"),v=n(Object,"create"),o8=x(fZ),r8=x(y),t8=x(mZ),a8=x(dZ),e8=x(pZ),UZ=E$?E$.prototype:void 0,AZ=UZ?UZ.valueOf:void 0,P$=UZ?UZ.toString:void 0;C.prototype.clear=Z1;C.prototype.delete=$1;C.prototype.get=Q1;C.prototype.has=J1;C.prototype.set=X1;O.prototype.clear=B1;O.prototype.delete=U1;O.prototype.get=Y1;O.prototype.has=W1;O.prototype.set=K1;H.prototype.clear=w1;H.prototype.delete=R1;H.prototype.get=G1;H.prototype.has=q1;H.prototype.set=_1;YZ.prototype.add=YZ.prototype.push=N1;YZ.prototype.has=F1;L.prototype.clear=E1;L.prototype.delete=L1;L.prototype.get=P1;L.prototype.has=O1;L.prototype.set=H1;var D1=h1(V1),S1=b1(),z=I1;if(fZ&&z(new fZ(new ArrayBuffer(1)))!=BZ||y&&z(new y)!=JZ||mZ&&z(mZ.resolve())!=R$||dZ&&z(new dZ)!=XZ||pZ&&z(new pZ)!=xZ)z=function(Z){var $=g.call(Z),Q=$==d?Z.constructor:void 0,J=Q?x(Q):void 0;if(J)switch(J){case o8:return BZ;case r8:return JZ;case t8:return R$;case a8:return XZ;case e8:return xZ}return $};var o1=nZ(function(Z){Z=e1(Z);var $=[];if(V8.test(Z))$.push("");return Z.replace(I8,function(Q,J,X,B){$.push(X?B.replace(C8,"$1"):J||Q)}),$}),r1=k1(function(Z,$,Q){Z[Q]=$});nZ.Cache=H;var D=Array.isArray,a1=N$?n8(N$):f1;p.exports=r1});var XQ=PZ((FJ,JQ)=>{var E6=function(Z,$){return Z==null?void 0:Z[$]},L6=function(Z){var $=!1;if(Z!=null&&typeof Z.toString!="function")try{$=!!(Z+"")}catch(Q){}return $},T=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},D6=function(){this.__data__=c?c(null):{}},S6=function(Z){return this.has(Z)&&delete this.__data__[Z]},V6=function(Z){var $=this.__data__;if(c){var Q=$[Z];return Q===o$?void 0:Q}return cZ.call($,Z)?$[Z]:void 0},I6=function(Z){var $=this.__data__;return c?$[Z]!==void 0:cZ.call($,Z)},A6=function(Z,$){var Q=this.__data__;return Q[Z]=c&&$===void 0?o$:$,this},k=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},C6=function(){this.__data__=[]},x6=function(Z){var $=this.__data__,Q=EZ($,Z);if(Q<0)return!1;var J=$.length-1;if(Q==J)$.pop();else M6.call($,Q,1);return!0},T6=function(Z){var $=this.__data__,Q=EZ($,Z);return Q<0?void 0:$[Q][1]},f6=function(Z){return EZ(this.__data__,Z)>-1},m6=function(Z,$){var Q=this.__data__,J=EZ(Q,Z);if(J<0)Q.push([Z,$]);else Q[J][1]=$;return this},f=function(Z){var $=-1,Q=Z?Z.length:0;this.clear();while(++$<Q){var J=Z[$];this.set(J[0],J[1])}},d6=function(){this.__data__={hash:new T,map:new(z6||k),string:new T}},p6=function(Z){return LZ(this,Z).delete(Z)},j6=function(Z){return LZ(this,Z).get(Z)},g6=function(Z){return LZ(this,Z).has(Z)},n6=function(Z,$){return LZ(this,Z).set(Z,$),this},EZ=function(Z,$){var Q=Z.length;while(Q--)if(o6(Z[Q][0],$))return Q;return-1},k6=function(Z,$){$=v6($,Z)?[$]:y6($);var Q=0,J=$.length;while(Z!=null&&Q<J)Z=Z[l6($[Q++])];return Q&&Q==J?Z:void 0},h6=function(Z){if(!QQ(Z)||c6(Z))return!1;var $=r6(Z)||L6(Z)?H6:_6;return $.test(s6(Z))},b6=function(Z){if(typeof Z=="string")return Z;if(lZ(Z))return s$?s$.call(Z):"";var $=Z+"";return $=="0"&&1/Z==-r$?"-0":$},y6=function(Z){return $Q(Z)?Z:u6(Z)},LZ=function(Z,$){var Q=Z.__data__;return i6($)?Q[typeof $=="string"?"string":"hash"]:Q.map},ZQ=function(Z,$){var Q=E6(Z,$);return h6(Q)?Q:void 0},v6=function(Z,$){if($Q(Z))return!1;var Q=typeof Z;if(Q=="number"||Q=="symbol"||Q=="boolean"||Z==null||lZ(Z))return!0;return K6.test(Z)||!W6.test(Z)||$!=null&&Z in Object($)},i6=function(Z){var $=typeof Z;return $=="string"||$=="number"||$=="symbol"||$=="boolean"?Z!=="__proto__":Z===null},c6=function(Z){return!!c$&&c$ in Z},l6=function(Z){if(typeof Z=="string"||lZ(Z))return Z;var $=Z+"";return $=="0"&&1/Z==-r$?"-0":$},s6=function(Z){if(Z!=null){try{return a$.call(Z)}catch($){}try{return Z+""}catch($){}}return""},uZ=function(Z,$){if(typeof Z!="function"||$&&typeof $!="function")throw new TypeError(X6);var Q=function(){var J=arguments,X=$?$.apply(this,J):J[0],B=Q.cache;if(B.has(X))return B.get(X);var U=Z.apply(this,J);return Q.cache=B.set(X,U),U};return Q.cache=new(uZ.Cache||f),Q},o6=function(Z,$){return Z===$||Z!==Z&&$!==$},r6=function(Z){var $=QQ(Z)?e$.call(Z):"";return $==B6||$==U6},QQ=function(Z){var $=typeof Z;return!!Z&&($=="object"||$=="function")},t6=function(Z){return!!Z&&typeof Z=="object"},lZ=function(Z){return typeof Z=="symbol"||t6(Z)&&e$.call(Z)==Y6},a6=function(Z){return Z==null?"":b6(Z)},e6=function(Z,$,Q){var J=Z==null?void 0:k6(Z,$);return J===void 0?Q:J},X6="Expected a function",o$="__lodash_hash_undefined__",r$=1/0,B6="[object Function]",U6="[object GeneratorFunction]",Y6="[object Symbol]",W6=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,K6=/^\w*$/,w6=/^\./,R6=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G6=/[\\^$.*+?()[\]{}|]/g,q6=/\\(\\)?/g,_6=/^\[object .+?Constructor\]$/,N6=typeof global=="object"&&global&&global.Object===Object&&global,F6=typeof self=="object"&&self&&self.Object===Object&&self,iZ=N6||F6||Function("return this")(),P6=Array.prototype,O6=Function.prototype,t$=Object.prototype,vZ=iZ["__core-js_shared__"],c$=function(){var Z=/[^.]+$/.exec(vZ&&vZ.keys&&vZ.keys.IE_PROTO||"");return Z?"Symbol(src)_1."+Z:""}(),a$=O6.toString,cZ=t$.hasOwnProperty,e$=t$.toString,H6=RegExp("^"+a$.call(cZ).replace(G6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),u$=iZ.Symbol,M6=P6.splice,z6=ZQ(iZ,"Map"),c=ZQ(Object,"create"),l$=u$?u$.prototype:void 0,s$=l$?l$.toString:void 0;T.prototype.clear=D6;T.prototype.delete=S6;T.prototype.get=V6;T.prototype.has=I6;T.prototype.set=A6;k.prototype.clear=C6;k.prototype.delete=x6;k.prototype.get=T6;k.prototype.has=f6;k.prototype.set=m6;f.prototype.clear=d6;f.prototype.delete=p6;f.prototype.get=j6;f.prototype.has=g6;f.prototype.set=n6;var u6=uZ(function(Z){Z=a6(Z);var $=[];if(w6.test(Z))$.push("");return Z.replace(R6,function(Q,J,X,B){$.push(X?B.replace(q6,"$1"):J||Q)}),$});uZ.Cache=f;var $Q=Array.isArray;JQ.exports=e6});var K$=s(DZ(),1),e={isNamespace:(Z)=>Z&&!Z.type,flattenSchema(Z,$){return Object.entries(Z).reduce((Q,[J,X])=>{const B=$?`${$}.${J}`:J;if(e.isNamespace(X))Q={...Q,...e.flattenSchema(X,B)};else Object.assign(X,{name:B}),Q[B]=X;return Q},{})},wrapSchema(Z){return Object.values(Z).reduce(($,Q)=>{return K$.default($,Q.path,Q),$},{})}};var ZZ,K8=new Uint8Array(16);function SZ(){if(!ZZ){if(ZZ=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!ZZ)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}return ZZ(K8)}function w$(Z,$=0){return _[Z[$+0]]+_[Z[$+1]]+_[Z[$+2]]+_[Z[$+3]]+"-"+_[Z[$+4]]+_[Z[$+5]]+"-"+_[Z[$+6]]+_[Z[$+7]]+"-"+_[Z[$+8]]+_[Z[$+9]]+"-"+_[Z[$+10]]+_[Z[$+11]]+_[Z[$+12]]+_[Z[$+13]]+_[Z[$+14]]+_[Z[$+15]]}var _=[];for(let Z=0;Z<256;++Z)_.push((Z+256).toString(16).slice(1));var w8=typeof crypto!=="undefined"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),VZ={randomUUID:w8};var R8=function(Z,$,Q){if(VZ.randomUUID&&!$&&!Z)return VZ.randomUUID();Z=Z||{};const J=Z.random||(Z.rng||SZ)();if(J[6]=J[6]&15|64,J[8]=J[8]&63|128,$){Q=Q||0;for(let X=0;X<16;++X)$[Q+X]=J[X];return $}return w$(J)},b=R8;var i$=s(v$(),1),yZ=s(DZ(),1);class i{schemas;falttenSchema;uidSchemas;static type(Z){return Z}static Namespace(Z){return Z}static Var(Z){if(!Z.get)throw new Error("invalid Var params");const $=Z.get;return Z.get=async()=>{const Q=await $();return Z.value=Q,Q},{...Z,type:"var",uid:b()}}static Func(Z){return{...Z,type:"func",uid:b()}}static Action(Z){return{...Z,type:"action",uid:b()}}constructor(Z={}){Object.assign(this,Z),this.falttenSchema=e.flattenSchema(this.schemas),this.uidSchemas=i$.default(Object.values(this.falttenSchema),"uid")}static utils={async formatVar(Z){const{uid:$,type:Q,get:J,name:X}=Z,B=await J(),U=Z.schema?Z.schema(B):{},Y={uid:$,type:Q,name:X,value:B,set:!!Z.set,_schema:U};return await i.utils.formatSchema(Y),Z._schema=Y._schema,Y.schema=Y._schema,Y._schema=void 0,Y},async formatFunc(Z,$){const{uid:Q,type:J,name:X,func:B}=Z,U=typeof Z.uiConfig=="function"?await Z.uiConfig():Z.uiConfig||{},Y={uid:Q,type:J,name:X,uiConfig:U,input:{}},W=(typeof Z.input=="function"?await Z.input($):Z.input)||{};return await Promise.all(Object.entries(W).map(async([K,R])=>{const q=typeof R=="function"?await R():R;if(!Y.uiConfig[K])Y.uiConfig[K]={};if(q.uiConfig)Object.assign(Y.uiConfig[K],q.uiConfig);if(q.enums)yZ.default(Y,`uiConfig[${K}].selectOptions`,q.enums.map((G)=>({label:G.label??G,value:G.value??G})));Y.input[K]=q.default||q})),Y},async formatSchema(Z){if(Z._schema){let $=Array.isArray(Z.value)&&typeof Z.value[0]=="object"?Z.value[0]:Z.value;if(Z.value)Object.entries($).map(([Q,J])=>{if(Z._schema[Q])return;Z._schema[Q]={type:typeof J,default:J}});await Promise.all(Object.entries(Z._schema).map(async([Q,J])=>{if(!J)return;const X=typeof J=="function"?J():J;Z._schema[Q]=X;const B=X;if(B.enums)yZ.default(Z._schema[Q],"uiConfig.selectOptions",B.enums.map((U)=>({label:U.label??U,value:U.value??U})));if(X.uiConfig&&typeof X.uiConfig=="function")X.uiConfig=X.uiConfig();if(X.input)Z._schema[Q]=await i.utils.formatFunc(X,Z)}))}}};async loadFull(Z){return Promise.all(Object.entries(this.falttenSchema).filter(([$,Q])=>{if(Z?.namespace&&!$.startsWith(Z.namespace))return;return!0}).map(async([$,Q])=>{if(Q.type=="func")return i.utils.formatFunc(Q);if(Q.type=="var")return i.utils.formatVar(Q);return{type:"unknown",name:$}}))}async loadVars(Z){return Promise.all(Object.entries(this.falttenSchema).filter(([$,Q])=>{if(Z?.namespace&&!$.startsWith(Z.namespace))return;if(Q.type=="var")return Q.type=="var"}).map(async([$,Q])=>{const{get:J,name:X}=Q,B=await J();return{name:X,value:B}}))}}var BQ=s(XQ(),1),EJ=(Z)=>{return{schema:{async loadFull($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadFull",params:$})}).then((Q)=>Q.json())},async loadVars($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"schema.loadVars",params:$})}).then((Q)=>Q.json())}},func:{async call($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"func.call",params:$})}).then((Q)=>Q.json())}},var:{async set($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.set",params:$})}).then((Q)=>Q.json())},async action($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.action",params:$})}).then((Q)=>Q.json())},async call($){return fetch(`${Z.url}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"var.call",params:$})}).then((Q)=>Q.json())}}}},LJ=({urpc:Z})=>{const $={urpc:Z,handle({name:Q,params:J}){const X=BQ.default($,Q);if(!X)throw new Error("invalid name");return X(J)},schema:{async loadFull(Q){return Z.loadFull(Q)},async loadVars(Q){return Z.loadVars(Q)}},func:{async call(Q){const J=Z.uidSchemas[Q.method]||Z.falttenSchema[Q.method];if(!J)throw new Error("invalid func name");return J.func(Q)}},var:{async set(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");if(!J.set)throw new Error("variable can't be set");return J.set(Q.value)},async action(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");const X=J._schema[Q.action];if(!X)throw new Error("invalid action name");return X.func({...Q,val:Q.value})},async call(Q){const J=Z.uidSchemas[Q.name]||Z.falttenSchema[Q.name];if(!J)throw new Error("invalid var name");const X=J._schema[Q.method];if(!X)throw new Error("invalid func name");return Q.value=J.value,X.func({...Q,val:J.value})}}};return $};export{e as utils,EJ as createSimpleHttpClient,LJ as createServerClient,i as URPC}; |
{ | ||
"name": "@dappworks/urpc", | ||
"version": "0.0.54", | ||
"version": "0.0.55", | ||
"module": "index.ts", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
37741