@elyx-code/project-logic-tree 0.0.6377 → 0.0.6378
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -8
- package/dist/index.umd.cjs +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -30940,18 +30940,19 @@ function T4(d, u) {
|
|
|
30940
30940
|
return i;
|
|
30941
30941
|
}
|
|
30942
30942
|
function Ir(d) {
|
|
30943
|
-
|
|
30944
|
-
|
|
30945
|
-
|
|
30943
|
+
const u = d.split(/[\s-]+/).filter((p) => p.length > 0);
|
|
30944
|
+
if (u.length === 0)
|
|
30945
|
+
return "";
|
|
30946
|
+
const i = u[0], a = i[0].toLowerCase() + i.slice(1), l = u.slice(1).map((p) => p[0].toUpperCase() + p.slice(1));
|
|
30947
|
+
return [a, ...l].join("");
|
|
30946
30948
|
}
|
|
30947
30949
|
function lp(d) {
|
|
30948
|
-
return d.split(/[\s-]+/).filter((
|
|
30949
|
-
(a) => a[0].toUpperCase() + a.slice(1).toLowerCase()
|
|
30950
|
-
).join("");
|
|
30950
|
+
return d.split(/[\s-]+/).filter((i) => i.length > 0).map((i) => i[0].toUpperCase() + i.slice(1)).join("");
|
|
30951
30951
|
}
|
|
30952
30952
|
function L0t(d) {
|
|
30953
|
-
|
|
30954
|
-
|
|
30953
|
+
return (d.match(
|
|
30954
|
+
/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g
|
|
30955
|
+
) || []).join("-");
|
|
30955
30956
|
}
|
|
30956
30957
|
function wT(d) {
|
|
30957
30958
|
return L0t(d).toLowerCase();
|
package/dist/index.umd.cjs
CHANGED
|
@@ -10,7 +10,7 @@ __p+='`),T}),p+=`';
|
|
|
10
10
|
`,t="obj";p=`var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};
|
|
11
11
|
`+p+`return __p;
|
|
12
12
|
`;var y;try{y=new Function(t,"_",p)}catch(T){throw T.source=p,T}var v=function(T){return y.call(this,T,tr)};return v.source="function("+t+`){
|
|
13
|
-
`+p+"}",v}function Efe(d,u,i){u=Tc(u);var a=u.length;if(!a)return Vi(i)?i.call(d):i;for(var l=0;l<a;l++){var p=d==null?void 0:d[u[l]];p===void 0&&(p=i,l=a),d=Vi(p)?p.call(d):p}return d}var Tfe=0;function bfe(d){var u=++Tfe+"";return d?d+u:u}function Afe(d){var u=tr(d);return u._chain=!0,u}function tU(d,u,i,a,l){if(!(a instanceof u))return d.apply(i,l);var p=WM(d.prototype),t=d.apply(p,l);return ar(t)?t:p}var md=Ji(function(d,u){var i=md.placeholder,a=function(){for(var l=0,p=u.length,t=Array(p),y=0;y<p;y++)t[y]=u[y]===i?arguments[l++]:u[y];for(;l<arguments.length;)t.push(arguments[l++]);return tU(d,a,this,this,t)};return a});md.placeholder=tr;const rU=Ji(function(d,u,i){if(!Vi(d))throw new TypeError("Bind must be called on a function");var a=Ji(function(l){return tU(d,a,u,this,i.concat(l))});return a}),fs=LM(Wi);function Jo(d,u,i,a){if(a=a||[],!u&&u!==0)u=1/0;else if(u<=0)return a.concat(d);for(var l=a.length,p=0,t=Wi(d);p<t;p++){var y=d[p];if(fs(y)&&(Zo(y)||xT(y)))if(u>1)Jo(y,u-1,i,a),l=a.length;else for(var v=0,T=y.length;v<T;)a[l++]=y[v++];else i||(a[l++]=y)}return a}const Ife=Ji(function(d,u){u=Jo(u,!1,!1);var i=u.length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var a=u[i];d[a]=rU(d[a],d)}return d});function wfe(d,u){var i=function(a){var l=i.cache,p=""+(u?u.apply(this,arguments):a);return Ba(l,p)||(l[p]=d.apply(this,arguments)),l[p]};return i.cache={},i}const iU=Ji(function(d,u,i){return setTimeout(function(){return d.apply(null,i)},u)}),Rfe=md(iU,tr,1);function gfe(d,u,i){var a,l,p,t,y=0;i||(i={});var v=function(){y=i.leading===!1?0:Ic(),a=null,t=d.apply(l,p),a||(l=p=null)},T=function(){var w=Ic();!y&&i.leading===!1&&(y=w);var A=u-(w-y);return l=this,p=arguments,A<=0||A>u?(a&&(clearTimeout(a),a=null),y=w,t=d.apply(l,p),a||(l=p=null)):!a&&i.trailing!==!1&&(a=setTimeout(v,A)),t};return T.cancel=function(){clearTimeout(a),y=0,a=l=p=null},T}function _fe(d,u,i){var a,l,p,t,y,v=function(){var w=Ic()-l;u>w?a=setTimeout(v,u-w):(a=null,i||(t=d.apply(y,p)),a||(p=y=null))},T=Ji(function(w){return y=this,p=w,l=Ic(),a||(a=setTimeout(v,u),i&&(t=d.apply(y,p))),t});return T.cancel=function(){clearTimeout(a),a=p=y=null},T}function Dfe(d,u){return md(u,d)}function XT(d){return function(){return!d.apply(this,arguments)}}function Ofe(){var d=arguments,u=d.length-1;return function(){for(var i=u,a=d[u].apply(this,arguments);i--;)a=d[i].call(this,a);return a}}function Cfe(d,u){return function(){if(--d<1)return u.apply(this,arguments)}}function sU(d,u){var i;return function(){return--d>0&&(i=u.apply(this,arguments)),d<=1&&(u=null),i}}const $fe=md(sU,2);function nU(d,u,i){u=Hi(u,i);for(var a=ni(d),l,p=0,t=a.length;p<t;p++)if(l=a[p],u(d[l],l,d))return l}function aU(d){return function(u,i,a){i=Hi(i,a);for(var l=Wi(u),p=d>0?0:l-1;p>=0&&p<l;p+=d)if(i(u[p],p,u))return p;return-1}}const QT=aU(1),oU=aU(-1);function lU(d,u,i,a){i=Hi(i,a,1);for(var l=i(u),p=0,t=Wi(d);p<t;){var y=Math.floor((p+t)/2);i(d[y])<l?p=y+1:t=y}return p}function dU(d,u,i){return function(a,l,p){var t=0,y=Wi(a);if(typeof p=="number")d>0?t=p>=0?p:Math.max(p+y,t):y=p>=0?Math.min(p+1,y):p+y+1;else if(i&&p&&y)return p=i(a,l),a[p]===l?p:-1;if(l!==l)return p=u(yc.call(a,t,y),VM),p>=0?p+t:-1;for(p=d>0?t:y-1;p>=0&&p<y;p+=d)if(a[p]===l)return p;return-1}}const uU=dU(1,QT,lU),Pfe=dU(-1,oU);function eb(d,u,i){var a=fs(d)?QT:nU,l=a(d,u,i);if(l!==void 0&&l!==-1)return d[l]}function Vfe(d,u){return eb(d,bc(u))}function da(d,u,i){u=Ac(u,i);var a,l;if(fs(d))for(a=0,l=d.length;a<l;a++)u(d[a],a,d);else{var p=ni(d);for(a=0,l=p.length;a<l;a++)u(d[p[a]],p[a],d)}return d}function Wo(d,u,i){u=Hi(u,i);for(var a=!fs(d)&&ni(d),l=(a||d).length,p=Array(l),t=0;t<l;t++){var y=a?a[t]:t;p[t]=u(d[y],y,d)}return p}function cU(d){var u=function(i,a,l,p){var t=!fs(i)&&ni(i),y=(t||i).length,v=d>0?0:y-1;for(p||(l=i[t?t[v]:v],v+=d);v>=0&&v<y;v+=d){var T=t?t[v]:v;l=a(l,i[T],T,i)}return l};return function(i,a,l,p){var t=arguments.length>=3;return u(i,Ac(a,p,4),l,t)}}const tb=cU(1),pU=cU(-1);function vd(d,u,i){var a=[];return u=Hi(u,i),da(d,function(l,p,t){u(l,p,t)&&a.push(l)}),a}function Nfe(d,u,i){return vd(d,XT(Hi(u)),i)}function fU(d,u,i){u=Hi(u,i);for(var a=!fs(d)&&ni(d),l=(a||d).length,p=0;p<l;p++){var t=a?a[p]:p;if(!u(d[t],t,d))return!1}return!0}function hU(d,u,i){u=Hi(u,i);for(var a=!fs(d)&&ni(d),l=(a||d).length,p=0;p<l;p++){var t=a?a[p]:p;if(u(d[t],t,d))return!0}return!1}function ua(d,u,i,a){return fs(d)||(d=yd(d)),(typeof i!="number"||a)&&(i=0),uU(d,u,i)>=0}const Lfe=Ji(function(d,u,i){var a,l;return Vi(u)?l=u:(u=Tc(u),a=u.slice(0,-1),u=u[u.length-1]),Wo(d,function(p){var t=l;if(!t){if(a&&a.length&&(p=ZT(p,a)),p==null)return;t=p[u]}return t==null?t:t.apply(p,i)})});function rb(d,u){return Wo(d,WT(u))}function Bfe(d,u){return vd(d,bc(u))}function yU(d,u,i){var a=-1/0,l=-1/0,p,t;if(u==null||typeof u=="number"&&typeof d[0]!="object"&&d!=null){d=fs(d)?d:yd(d);for(var y=0,v=d.length;y<v;y++)p=d[y],p!=null&&p>a&&(a=p)}else u=Hi(u,i),da(d,function(T,w,A){t=u(T,w,A),(t>l||t===-1/0&&a===-1/0)&&(a=T,l=t)});return a}function Mfe(d,u,i){var a=1/0,l=1/0,p,t;if(u==null||typeof u=="number"&&typeof d[0]!="object"&&d!=null){d=fs(d)?d:yd(d);for(var y=0,v=d.length;y<v;y++)p=d[y],p!=null&&p<a&&(a=p)}else u=Hi(u,i),da(d,function(T,w,A){t=u(T,w,A),(t<l||t===1/0&&a===1/0)&&(a=T,l=t)});return a}var Ufe=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function mU(d){return d?Zo(d)?yc.call(d):MT(d)?d.match(Ufe):fs(d)?Wo(d,JT):yd(d):[]}function vU(d,u,i){if(u==null||i)return fs(d)||(d=yd(d)),d[YT(d.length-1)];var a=mU(d),l=Wi(a);u=Math.max(Math.min(u,l),0);for(var p=l-1,t=0;t<u;t++){var y=YT(t,p),v=a[t];a[t]=a[y],a[y]=v}return a.slice(0,u)}function jfe(d){return vU(d,1/0)}function xfe(d,u,i){var a=0;return u=Hi(u,i),rb(Wo(d,function(l,p,t){return{value:l,index:a++,criteria:u(l,p,t)}}).sort(function(l,p){var t=l.criteria,y=p.criteria;if(t!==y){if(t>y||t===void 0)return 1;if(t<y||y===void 0)return-1}return l.index-p.index}),"value")}function dy(d,u){return function(i,a,l){var p=u?[[],[]]:{};return a=Hi(a,l),da(i,function(t,y){var v=a(t,y,i);d(p,t,v)}),p}}const Ffe=dy(function(d,u,i){Ba(d,i)?d[i].push(u):d[i]=[u]}),Gfe=dy(function(d,u,i){d[i]=u}),Kfe=dy(function(d,u,i){Ba(d,i)?d[i]++:d[i]=1}),kfe=dy(function(d,u,i){d[i?0:1].push(u)},!0);function Sfe(d){return d==null?0:fs(d)?d.length:ni(d).length}function qfe(d,u,i){return u in i}const EU=Ji(function(d,u){var i={},a=u[0];if(d==null)return i;Vi(a)?(u.length>1&&(a=Ac(a,u[1])),u=Ec(d)):(a=qfe,u=Jo(u,!1,!1),d=Object(d));for(var l=0,p=u.length;l<p;l++){var t=u[l],y=d[t];a(y,t,d)&&(i[t]=y)}return i}),Zfe=Ji(function(d,u){var i=u[0],a;return Vi(i)?(i=XT(i),u.length>1&&(a=u[1])):(u=Wo(Jo(u,!1,!1),String),i=function(l,p){return!ua(u,p)}),EU(d,i,a)});function TU(d,u,i){return yc.call(d,0,Math.max(0,d.length-(u==null||i?1:u)))}function ib(d,u,i){return d==null||d.length<1?u==null||i?void 0:[]:u==null||i?d[0]:TU(d,d.length-u)}function uy(d,u,i){return yc.call(d,u==null||i?1:u)}function Jfe(d,u,i){return d==null||d.length<1?u==null||i?void 0:[]:u==null||i?d[d.length-1]:uy(d,Math.max(0,d.length-u))}function Wfe(d){return vd(d,Boolean)}function Hfe(d,u){return Jo(d,u,!1)}const bU=Ji(function(d,u){return u=Jo(u,!0,!0),vd(d,function(i){return!ua(u,i)})}),Yfe=Ji(function(d,u){return bU(d,u)});function sb(d,u,i,a){gM(u)||(a=i,i=u,u=!1),i!=null&&(i=Hi(i,a));for(var l=[],p=[],t=0,y=Wi(d);t<y;t++){var v=d[t],T=i?i(v,t,d):v;u&&!i?((!t||p!==T)&&l.push(v),p=T):i?ua(p,T)||(p.push(T),l.push(v)):ua(l,v)||l.push(v)}return l}const zfe=Ji(function(d){return sb(Jo(d,!0,!0))});function Xfe(d){for(var u=[],i=arguments.length,a=0,l=Wi(d);a<l;a++){var p=d[a];if(!ua(u,p)){var t;for(t=1;t<i&&ua(arguments[t],p);t++);t===i&&u.push(p)}}return u}function nb(d){for(var u=d&&yU(d,Wi).length||0,i=Array(u),a=0;a<u;a++)i[a]=rb(d,a);return i}const Qfe=Ji(nb);function ehe(d,u){for(var i={},a=0,l=Wi(d);a<l;a++)u?i[d[a]]=u[a]:i[d[a][0]]=d[a][1];return i}function the(d,u,i){u==null&&(u=d||0,d=0),i||(i=u<d?-1:1);for(var a=Math.max(Math.ceil((u-d)/i),0),l=Array(a),p=0;p<a;p++,d+=i)l[p]=d;return l}function rhe(d,u){if(u==null||u<1)return[];for(var i=[],a=0,l=d.length;a<l;)i.push(yc.call(d,a,a+=u));return i}function ab(d,u){return d._chain?tr(u).chain():u}function AU(d){return da(ST(d),function(u){var i=tr[u]=d[u];tr.prototype[u]=function(){var a=[this._wrapped];return Ope.apply(a,arguments),ab(this,i.apply(tr,a))}}),tr}da(["pop","push","reverse","shift","sort","splice","unshift"],function(d){var u=ny[d];tr.prototype[d]=function(){var i=this._wrapped;return i!=null&&(u.apply(i,arguments),(d==="shift"||d==="splice")&&i.length===0&&delete i[0]),ab(this,i)}}),da(["concat","join","slice"],function(d){var u=ny[d];tr.prototype[d]=function(){var i=this._wrapped;return i!=null&&(i=u.apply(i,arguments)),ab(this,i)}});var IU=AU(Object.freeze(Object.defineProperty({__proto__:null,VERSION:hM,after:Cfe,all:fU,allKeys:Ec,any:hU,assign:ly,before:sU,bind:rU,bindAll:Ife,chain:Afe,chunk:rhe,clone:ife,collect:Wo,compact:Wfe,compose:Ofe,constant:NM,contains:ua,countBy:Kfe,create:rfe,debounce:_fe,default:tr,defaults:JM,defer:Rfe,delay:iU,detect:eb,difference:bU,drop:uy,each:da,escape:dfe,every:fU,extend:ZM,extendOwn:ly,filter:vd,find:eb,findIndex:QT,findKey:nU,findLastIndex:oU,findWhere:Vfe,first:ib,flatten:Hfe,foldl:tb,foldr:pU,forEach:da,functions:ST,get:YM,groupBy:Ffe,has:nfe,head:ib,identity:JT,include:ua,includes:ua,indexBy:Gfe,indexOf:uU,initial:TU,inject:tb,intersection:Xfe,invert:qM,invoke:Lfe,isArguments:xT,isArray:Zo,isArrayBuffer:OM,isBoolean:gM,isDataView:ay,isDate:Mpe,isElement:Bpe,isEmpty:vc,isEqual:Jpe,isError:jpe,isFinite:Kpe,isFunction:Vi,isMap:Ype,isMatch:jM,isNaN:VM,isNull:wM,isNumber:_M,isObject:ar,isRegExp:Upe,isSet:Xpe,isString:MT,isSymbol:DM,isTypedArray:MM,isUndefined:RM,isWeakMap:zpe,isWeakSet:Qpe,iteratee:HT,keys:ni,last:Jfe,lastIndexOf:Pfe,map:Wo,mapObject:afe,matcher:bc,matches:bc,max:yU,memoize:wfe,methods:ST,min:Mfe,mixin:AU,negate:XT,noop:XM,now:Ic,object:ehe,omit:Zfe,once:$fe,pairs:efe,partial:md,partition:kfe,pick:EU,pluck:rb,property:WT,propertyOf:ofe,random:YT,range:the,reduce:tb,reduceRight:pU,reject:Nfe,rest:uy,restArguments:Ji,result:Efe,sample:vU,select:vd,shuffle:jfe,size:Sfe,some:hU,sortBy:xfe,sortedIndex:lU,tail:uy,take:ib,tap:sfe,template:vfe,templateSettings:pfe,throttle:gfe,times:lfe,toArray:mU,toPath:HM,transpose:nb,unescape:cfe,union:zfe,uniq:sb,unique:sb,uniqueId:bfe,unzip:nb,values:yd,where:Bfe,without:Yfe,wrap:Dfe,zip:Qfe},Symbol.toStringTag,{value:"Module"})));IU._=IU;function ei(d){return d.charAt(0).toUpperCase()+d.slice(1)}function Ed(d){return d.charAt(0).toLowerCase()+d.slice(1)}function wU(d,u){if(d.type!==f.Property||u.type!==f.Property)throw new Error(`Expected property entities for comparison. But got ${d.type} and ${u.type}.`);return d===u||d.id===u.id?!0:d.name!==u.name||d.static!==u.static||d.abstract!==u.abstract?!1:Cs(d.dataType,u.dataType).compatible}function RU(d,u){if(d.type!==f.DefinitionEntity||u.type!==f.DefinitionEntity)throw new Error(`Expected definition entities for comparison. But got ${d.type} and ${u.type}.`);if(d===u||d.id===u.id)return!0;if(d.properties.length!==u.properties.length)return!1;let i=[...u.properties];const a=[];for(let l=0;l<d.properties.length;l++){const p=d.properties[l];i.find(y=>{const v=wU(p,y);return v&&(i=i.filter(T=>T.id!==y.id)),v})||a.push(p)}return!(a.length>0)}var Os=(d=>(d.BothUnconstrained="both-unconstrained",d.AConstraintBUnconstrained="a-constraint-b-unconstrained",d.BConstraintAUnconstrained="b-constraint-a-unconstrained",d.Same="same",d.AIsListBIsNot="a-is-list-b-is-not",d.BIsListAIsNot="b-is-list-a-is-not",d.AIsNullableBIsNot="a-is-nullable-b-is-not",d.BIsNullableAIsNot="b-is-nullable-a-is-not",d.AIsTemplateBIsNot="a-is-template-b-is-not",d.BIsTemplateAIsNot="b-is-template-a-is-not",d.BothUntyped="both-untyped",d.AIsUntypedBIsNot="a-is-untyped-b-is-not",d.BIsUntypedAIsNot="b-is-untyped-a-is-not",d.TypeEntityMismatch="type-entity-mismatch",d.SameDefinitionEntities="same-definition-entities",d.CompatibleDefinitionEntities="compatible-definition-entities",d.IncompatibleDefinitionEntities="incompatible-definition-entities",d.SamePrimitiveEntities="same-primitive-entities",d.IncompatiblePrimitiveEntities="incompatible-primitive-entities",d.SameBuiltInBaseEntities="same-built-in-base-entities",d.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",d.CheckUnknown="check-unknown",d))(Os||{});function Cs(d,u){var l,p,t,y,v,T,w,A,V,N,j;if(d&&d.type!==f.DataType||u&&u.type!==f.DataType)throw new Error(`Expected data-type entities for comparison. But got ${d==null?void 0:d.type} and ${u==null?void 0:u.type}.`);if(d===null&&u===null)return{compatible:!0,type:"both-unconstrained"};if(d===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(u===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(d===u)return{compatible:!0,type:"same"};if(d.id===u.id)return{compatible:!0,type:"same"};if(d.isList===!1&&u.isList===!0||d.isList===!0&&u.isList===!1)return{compatible:!1,type:d.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(d.asType===!1&&u.asType===!0||d.asType===!0&&u.asType===!1)return{compatible:!1,type:d.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};let i=!d.entity||d.entity.type===f.PrimitiveEntity&&d.entity.name===Q.Untyped,a=!u.entity||u.entity.type===f.PrimitiveEntity&&u.entity.name===Q.Untyped;if(i&&!a)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(!i&&a)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(i&&a)return{compatible:!0,type:"both-untyped"};if(((l=d.entity)==null?void 0:l.type)!==((p=u.entity)==null?void 0:p.type))return{compatible:!1,type:"type-entity-mismatch"};if(((t=d.entity)==null?void 0:t.type)===f.DefinitionEntity){if(((y=d.entity)==null?void 0:y.id)===((v=u.entity)==null?void 0:v.id))return{compatible:!0,type:"same-definition-entities"};const k=RU(d.entity,u.entity);return{compatible:k,type:k?"compatible-definition-entities":"incompatible-definition-entities"}}return((T=d.entity)==null?void 0:T.type)===f.PrimitiveEntity?((w=d.entity)==null?void 0:w.id)===((A=u.entity)==null?void 0:A.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((V=d.entity)==null?void 0:V.type)===f.BuiltInBaseEntity?((N=d.entity)==null?void 0:N.id)===((j=u.entity)==null?void 0:j.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function ihe(d,u){const i=d.project.builtInBaseEntities.find(p=>p.id===Ce.EXECUTION),a={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(u==null?void 0:u.timestamp)||new Date().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},l=te(a,d.project);return l.inferred=!0,u==null||u.add(l,K.Added),l.metaSync(a,u),l.setParent(d,u),l.entity=i,l}function gU(d,u=null){return d.dataType?d.dataType:null}function ob(d,u=null){var a;const i=(a=d.declaration)==null?void 0:a.getDataType(u);return i&&i.isResolved?i:d.readsValue?Hs(d.readsValue,u):null}function lb(d,u=null){return d.dataType&&!d.dataType.inferred&&d.dataType.isResolved?d.dataType:d.readsValue?Hs(d.readsValue,u):null}function _U(d,u=null){return Hs(d.declaration,u)}function DU(d,u=null){return d.dataType&&!d.dataType.inferred?d.dataType:(d.dataType&&d.dataType.inferred||!d.dataType)&&d.project.initialized?(d.inferDataTypeAndSyncInstancesInputsAndOutputs(u),d.dataType):null}function db(d,u=null){var i;return((i=d.declaration)==null?void 0:i.dataType)||null}function OU(d,u=null){return(d==null?void 0:d.dataType)||null}function CU(d,u=null){return(d==null?void 0:d.dataType)||null}function Hs(d,u=null){switch(d.type){case f.VariableDeclaration:return DU(d,u);case f.ArgumentDeclaration:return gU(d,u);case f.ReturnDeclaration:return lb(d,u);case f.VariableInstance:return _U(d,u);case f.InputMap:return ob(d,u);case f.OutputMap:return db(d,u);case f.Property:return OU(d,u);case f.ValueDescriptor:return CU(d,u);default:throw new Error(`Cannot infer data type from entity of type ${d.type}.`)}}function cy(d,u=null){switch(d.type){case f.ArgumentDeclaration:return d.getDataType(u);case f.InputMap:return d.getDataType(u);case f.VariableDeclaration:return d.getDataType(u);case f.VariableInstance:return d.getDataType(u);case f.OutputMap:return d.getDataType(u);case f.ReturnDeclaration:return d.getDataType(u);case f.Property:return d.getDataType(u);case f.ValueDescriptor:return d.getDataType(u);default:return null}}function Ho(d){if(!d)return Q.Untyped;if(d.entity){if(d.entity.type===f.DefinitionEntity)return d.asType?Q.EntityTemplate:Q.Untyped;if(d.entity.type===f.PrimitiveEntity)return d.asType?Q.EntityTemplate:d.entity.name;if(d.entity.type===f.ActionDescriptor)return Q.ActionDescriptor;if(d.entity.type===f.BuiltInBaseEntity)return d.asType?Q.EntityTemplate:Q.Untyped}return Q.Untyped}function J(d){if(d){let u=null;return typeof d=="string"?u=d:d.entityId?u=d.entityId:d.type!==f.GenericReference&&(u=d.id),u}return null}function di(d){return d.declaration||d}function she(d){return d.type===f.VariableDeclaration?d.parent===d.project?"global-declaration":"local-declaration":d.declaration.parent===d.project?"global-instance":"local-instance"}function ub(d,u){const i=[];if(d.type===f.Project)i.push(...d.variableDeclarations);else{const l=ci(pt(d)).filter(p=>p.type===f.VariableDeclaration);i.push(...l),d.parent&&(wr.includes(d.parent.type)||d.parent.type===f.Project)&&i.push(...ub(d.parent))}return i}function Tr(d){return d.split(/[\s-]+/).filter(a=>a.length>0).map((a,l)=>l===0?a.toLowerCase():a[0].toUpperCase()+a.slice(1).toLowerCase()).join("")}function Td(d){return d.split(/[\s-]+/).filter(a=>a.length>0).map(a=>a[0].toUpperCase()+a.slice(1).toLowerCase()).join("")}function $U(d){var u;return(u=d.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))==null?void 0:u.map(i=>i.toLowerCase()).join("-")}function py(d){return $U(d).toLowerCase()}function bd(d){var i,a,l,p;if(!d)return"Any data type";let u="";if(d.interactiveEntities===!1?u+=` but only definition nodes ${d.asType?"as template ":""}that don't include non-interactive built-in functionality`:d.interactiveEntities===!0&&(u+=` but only definition nodes ${d.asType?"as template ":""}that extend or implement interactive built-in functionality`),d.staticEntities===!1?u?u+=" and that aren't a single global copy instance":u+=` but only definition nodes ${d.asType?"as template ":""}that aren't a single global copy instance`:d.staticEntities===!0&&(u?u+=" and that are a single global copy instance":u+=` but only definition nodes ${d.asType?"as template ":""}that are a single global copy instance`),d.actionEntities===!1?u?u+=" excluding executable/action nodes":u+=` excluding executable/action nodes ${d.asType?"templates ":""}`:d.actionEntities===!0&&(u?u+=" and not executable/action nodes":u+=" but not executable/action nodes"),d.entity&&(u=""),d.asType&&!u&&!((i=d.andChildrenGroup)!=null&&i.length)&&!((a=d.orChildrenGroup)!=null&&a.length)&&(u=" as template"),!d.entity){const t=d.isList;if(!((l=d.andChildrenGroup)!=null&&l.length)&&!((p=d.orChildrenGroup)!=null&&p.length))return t?`List of an any data type${u}`:`Any data type${u}`;let y="",v=!1,T=!1;return(d.andChildrenGroup||[]).forEach(w=>{const A=bd(w),V=Ed(A);v&&(y+=" and "),w.isGroup?y+="("+V+")":v?y+=V:y+=A,v=!0,T=!0}),(d.orChildrenGroup||[]).forEach(w=>{const A=bd(w),V=Ed(A);v&&(T&&(y+=","),y+=" or "),w.isGroup?y+="("+V+")":v?y+=V:y+=A,v=!0}),t?`List of ${Ed(y)}`:y}if(d.entity.type===f.PrimitiveEntity){let t=d.entity.name;switch(d.entity.name){case Q.String:t="Text";break;case Q.KeyValue:t="Data structure";break}return d.isList?`List of ${t}s${u}`:`${t.slice(0,1).toUpperCase()}${t.slice(1)}${u}`}else if(d.entity.type===f.DefinitionEntity){const t=ie(d.entity,d.project);return d.isList?`List of ${t} values${u}`:t.slice(0,1).toUpperCase()+t.slice(1)+u}else if(d.entity.type===f.BuiltInBaseEntity){const t=VU(d.entity);return d.isList?`List of ${t} values${u}`:t.slice(0,1).toUpperCase()+t.slice(1)+u}else if(d.entity.type===f.LiteralValue){if(d.entity.name===Q.Null)return"Empty value";if(d.entity.name===Q.Untyped)return"Untyped value";if(d.entity.name===Q.File)return"File";if(d.entity.name===Q.String)return`"${d.entity.value}" text`;if(d.entity.name===Q.Number)return`Number '${d.entity.value}'`;if(d.entity.name===Q.Boolean)return`${d.entity.value} value`;if(d.entity.name===Q.UUID)return`"${d.entity.value}" unique identifier`;if(d.entity.name===Q.Date)return`"${d.entity.value}" date`}return d.isList?`List of ${ie(d.entity,d.project)} values${u}`:`${ie(d.entity,d.project).slice(0,1).toUpperCase()+ie(d.entity,d.project).slice(1)} value${u}`}function nhe(d){if(!d)return"Any data type";const u=d.getDataType(null);return bd(u)}function fy(d){switch(d.declaration.id){case cr.Equal:return"is equal to";case cr.NotEqual:return"is not equal to";case cr.MoreThan:return"is greater than";case cr.MoreThanOrEqual:return"is greater than or equal to";case cr.LessThan:return"is less than";case cr.LessThanOrEqual:return"is less than or equal to";case cr.And:return"and";case cr.Or:return"or";case Mr.Empty:return"is empty";case Mr.NotEmpty:return"is not empty"}}function PU(d){return d.includes(Ce.HTTP_ENDPOINT)?"HTTP endpoint":d.includes(Ce.PERSISTED_ENTITY)?"Persisted entity":d.includes(Ce.CRON_JOB)?"Scheduled execution":d.includes(Ce.RELATIONAL_DATABASE)?"Relational database":"Entity"}function VU(d){switch(d.name){case Ce.HTTP_ENDPOINT:return"HTTP endpoint";case Ce.PERSISTED_ENTITY:return"Persisted entity";case Ce.CRON_JOB:return"Scheduled execution";case Ce.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function ahe(d){const u=zy(d);if(!u){const i=Nd(d);return i.includes(Ce.HTTP_ENDPOINT)?"HTTP endpoint":i.includes(Ce.PERSISTED_ENTITY)?"Persisted entity":i.includes(Ce.CRON_JOB)?"Scheduled execution":i.includes(Ce.RELATIONAL_DATABASE)?"Relational database":ie(d,d.project)+" entity"}return ie(u,d.project)+" entity"}function NU(d){let u="Find ";return d.outputsDeclarations.forEach((i,a)=>{const l=cy(i,null),p=Ed(l&&l.entity?ie(l.entity,d.project):"unstructured data");a===0?u+=`${p} `:a===d.outputsDeclarations.length-1?u+=`and ${p} `:u+=`, ${p} `}),u}function LU(d){switch(d.name){case Q.String:return"Text";case Q.Number:return"Number";case Q.Boolean:return"Boolean";case Q.KeyValue:return"Data structure";case Q.UUID:return"Unique identifier";case Q.Date:return"Date";case Q.EntityTemplate:return"Entity as template";case Q.Enum:return"Enumeration";case Q.File:return"File";case Q.Null:return"Empty";case Q.ActionDescriptor:return"Action descriptor";case Q.Untyped:return"Untyped";default:return d.name}}function BU(d){switch(d.id){case Ge.List:return"Loop over list items";case Ge.ManualFlow:return"Manual flow control loop";case Ge.ObjectKeys:return"Loop over object keys";case Ge.ObjectValues:return"Loop over object values";case Ge.Counted:return"Loop given number of times";case Ge.String:return"Loop over text characters";case ur.Addition:return"Sum numbers";case ur.Subtraction:return"Subtract numbers";case ur.Multiplication:return"Multiply numbers";case ur.Division:return"Divide numbers";case ur.Remainder:return"Get remainder of numbers";case ur.Exponentiation:return"Get exponent of numbers";case vt.AddIndex:return"Add at index position";case vt.DeleteFirst:return"Delete first character";case vt.DeleteLast:return"Delete last character";case vt.DeleteIndex:return"Delete at index position";case vt.Join:return"Join texts";case vt.ReplaceAllMatches:return"Replace all matches";case vt.ReplaceFirst:return"Replace first match";case vt.ReplaceLast:return"Replace last match";case vt.Split:return"Split text";case vt.ReplaceIndex:return"Replace at index position";case vt.ReplaceSingleMatch:return"Replace single match";case vt.GetFirst:return"Get first character";case vt.GetLast:return"Get last character";case vt.GetIndex:return"Get at index position";case vt.Append:return"Add at the end";case vt.Prepend:return"Add at the start";case ir.Wait:return"Wait";case ir.Parallel:return"Run in parallel";case ir.Sequential:return"Run in sequence";case li.HttpRequest:return"HTTP request";case sr.CreateNewInstance:return"Create new copy of entity";case ft.AddIndex:return"Add item at index position";case ft.DeleteFirst:return"Delete first item";case ft.DeleteLast:return"Delete last item";case ft.DeleteIndex:return"Delete item at index position";case ft.Join:return"Join lists";case ft.ReplaceAllMatches:return"Replace all matches";case ft.ReplaceFirst:return"Replace first match";case ft.ReplaceLast:return"Replace last match";case ft.Split:return"Split list";case ft.ReplaceIndex:return"Replace at index position";case ft.ReplaceSingleMatch:return"Replace single match";case ft.GetFirst:return"Get first item";case ft.GetLast:return"Get last item";case ft.GetIndex:return"Get item at index position";case ft.Append:return"Add item at the end";case ft.Prepend:return"Add item at the start";case Jn.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(d.name.slice(0,1).toUpperCase()+d.name.slice(1)).replaceAll("-"," ")}}function ie(d,u){var i;if(f.FunctionDeclaration===d.type){const a=d.name;if(Object.values(gi).includes(a))switch(a){case gi.AbortExecution:return"Abort ongoing execution";case gi.DeletePersistedEntity:return"Delete entry from database";case gi.SavePersistedEntity:return"Save entity data to database";default:return ei(d.type).replaceAll("-"," ")}return a}if(f.BuiltInBaseEntity===d.type)return PU([d.name]);if(d1.includes(d.type)&&d.type!==f.ActionDescriptor)return d.name;switch(d.type){case f.Search:return NU(d);case f.GlobalEvent:return d.implements?ie(d.implements,u):ei(d.type).replaceAll("-"," ");case f.Operation:case f.InternalCall:case f.Loop:const a=Ri(d.declaration,u);return ie(a,u);case f.ActionDescriptor:return BU(d);case f.BreakStatement:const l=Ri(d.parent,u);return`Stop loop ${ie(l,u)}`;case f.ContinueStatement:const p=Ri(d.parent,u);return`Execute next iteration of ${ie(p,u)}`;case f.FunctionCall:return Ri(d.declaration,u).name;case f.Condition:{const y=d;if((i=d.inputs)!=null&&i.length){const v=ie(y.inputs[0],y.project);if(y.inputs[1]){const T=y.inputs[1].declaration.name;return`If ${v} ${fy(y)} ${T}`}return`If ${v} ${fy(y)}`}else return`If ${fy(y)}`}case f.ReturnStatement:{const y=Ri(d.parent,u);return y?`Output of ${ie(y,u)}`:"Return statement"}case f.InputMap:if(d.declaration){const y=Ri(d.declaration,u);return ie(y,u)||""}else return d.name||"";case f.VariableInstance:{const y=Ri(d.declaration,u);return ie(y,u)||""}case f.OutputMap:if(d.declaration){const y=Ri(d.declaration,u);return(y==null?void 0:y.name)||""}else return"";case f.PrimitiveEntity:case f.LiteralValue:return LU(d);default:return ei(d.type).replaceAll("-"," ")}}function cb(d,u){const i=[];d.name||i.push(new ee({id:`${d.id}--${ae.EmptyName}`,message:`Entity with id "${d.id}" and type "${d.type}" has an empty name. Please provide a 'name' string.`,severity:Z.Error,code:ae.EmptyName,issue:null}));const a=u.entities.filter(l=>l.name===d.name);return a.length&&i.push(new ee({id:`${d.id}--${ae.NameNotUniqueInScope}`,message:`Entity with id "${d.id}" and type "${d.type}" has a name "${d.name}" that is not unique in the project. Entity with id "${a[0].id}" has the same name.
|
|
13
|
+
`+p+"}",v}function Efe(d,u,i){u=Tc(u);var a=u.length;if(!a)return Vi(i)?i.call(d):i;for(var l=0;l<a;l++){var p=d==null?void 0:d[u[l]];p===void 0&&(p=i,l=a),d=Vi(p)?p.call(d):p}return d}var Tfe=0;function bfe(d){var u=++Tfe+"";return d?d+u:u}function Afe(d){var u=tr(d);return u._chain=!0,u}function tU(d,u,i,a,l){if(!(a instanceof u))return d.apply(i,l);var p=WM(d.prototype),t=d.apply(p,l);return ar(t)?t:p}var md=Ji(function(d,u){var i=md.placeholder,a=function(){for(var l=0,p=u.length,t=Array(p),y=0;y<p;y++)t[y]=u[y]===i?arguments[l++]:u[y];for(;l<arguments.length;)t.push(arguments[l++]);return tU(d,a,this,this,t)};return a});md.placeholder=tr;const rU=Ji(function(d,u,i){if(!Vi(d))throw new TypeError("Bind must be called on a function");var a=Ji(function(l){return tU(d,a,u,this,i.concat(l))});return a}),fs=LM(Wi);function Jo(d,u,i,a){if(a=a||[],!u&&u!==0)u=1/0;else if(u<=0)return a.concat(d);for(var l=a.length,p=0,t=Wi(d);p<t;p++){var y=d[p];if(fs(y)&&(Zo(y)||xT(y)))if(u>1)Jo(y,u-1,i,a),l=a.length;else for(var v=0,T=y.length;v<T;)a[l++]=y[v++];else i||(a[l++]=y)}return a}const Ife=Ji(function(d,u){u=Jo(u,!1,!1);var i=u.length;if(i<1)throw new Error("bindAll must be passed function names");for(;i--;){var a=u[i];d[a]=rU(d[a],d)}return d});function wfe(d,u){var i=function(a){var l=i.cache,p=""+(u?u.apply(this,arguments):a);return Ba(l,p)||(l[p]=d.apply(this,arguments)),l[p]};return i.cache={},i}const iU=Ji(function(d,u,i){return setTimeout(function(){return d.apply(null,i)},u)}),Rfe=md(iU,tr,1);function gfe(d,u,i){var a,l,p,t,y=0;i||(i={});var v=function(){y=i.leading===!1?0:Ic(),a=null,t=d.apply(l,p),a||(l=p=null)},T=function(){var w=Ic();!y&&i.leading===!1&&(y=w);var A=u-(w-y);return l=this,p=arguments,A<=0||A>u?(a&&(clearTimeout(a),a=null),y=w,t=d.apply(l,p),a||(l=p=null)):!a&&i.trailing!==!1&&(a=setTimeout(v,A)),t};return T.cancel=function(){clearTimeout(a),y=0,a=l=p=null},T}function _fe(d,u,i){var a,l,p,t,y,v=function(){var w=Ic()-l;u>w?a=setTimeout(v,u-w):(a=null,i||(t=d.apply(y,p)),a||(p=y=null))},T=Ji(function(w){return y=this,p=w,l=Ic(),a||(a=setTimeout(v,u),i&&(t=d.apply(y,p))),t});return T.cancel=function(){clearTimeout(a),a=p=y=null},T}function Dfe(d,u){return md(u,d)}function XT(d){return function(){return!d.apply(this,arguments)}}function Ofe(){var d=arguments,u=d.length-1;return function(){for(var i=u,a=d[u].apply(this,arguments);i--;)a=d[i].call(this,a);return a}}function Cfe(d,u){return function(){if(--d<1)return u.apply(this,arguments)}}function sU(d,u){var i;return function(){return--d>0&&(i=u.apply(this,arguments)),d<=1&&(u=null),i}}const $fe=md(sU,2);function nU(d,u,i){u=Hi(u,i);for(var a=ni(d),l,p=0,t=a.length;p<t;p++)if(l=a[p],u(d[l],l,d))return l}function aU(d){return function(u,i,a){i=Hi(i,a);for(var l=Wi(u),p=d>0?0:l-1;p>=0&&p<l;p+=d)if(i(u[p],p,u))return p;return-1}}const QT=aU(1),oU=aU(-1);function lU(d,u,i,a){i=Hi(i,a,1);for(var l=i(u),p=0,t=Wi(d);p<t;){var y=Math.floor((p+t)/2);i(d[y])<l?p=y+1:t=y}return p}function dU(d,u,i){return function(a,l,p){var t=0,y=Wi(a);if(typeof p=="number")d>0?t=p>=0?p:Math.max(p+y,t):y=p>=0?Math.min(p+1,y):p+y+1;else if(i&&p&&y)return p=i(a,l),a[p]===l?p:-1;if(l!==l)return p=u(yc.call(a,t,y),VM),p>=0?p+t:-1;for(p=d>0?t:y-1;p>=0&&p<y;p+=d)if(a[p]===l)return p;return-1}}const uU=dU(1,QT,lU),Pfe=dU(-1,oU);function eb(d,u,i){var a=fs(d)?QT:nU,l=a(d,u,i);if(l!==void 0&&l!==-1)return d[l]}function Vfe(d,u){return eb(d,bc(u))}function da(d,u,i){u=Ac(u,i);var a,l;if(fs(d))for(a=0,l=d.length;a<l;a++)u(d[a],a,d);else{var p=ni(d);for(a=0,l=p.length;a<l;a++)u(d[p[a]],p[a],d)}return d}function Wo(d,u,i){u=Hi(u,i);for(var a=!fs(d)&&ni(d),l=(a||d).length,p=Array(l),t=0;t<l;t++){var y=a?a[t]:t;p[t]=u(d[y],y,d)}return p}function cU(d){var u=function(i,a,l,p){var t=!fs(i)&&ni(i),y=(t||i).length,v=d>0?0:y-1;for(p||(l=i[t?t[v]:v],v+=d);v>=0&&v<y;v+=d){var T=t?t[v]:v;l=a(l,i[T],T,i)}return l};return function(i,a,l,p){var t=arguments.length>=3;return u(i,Ac(a,p,4),l,t)}}const tb=cU(1),pU=cU(-1);function vd(d,u,i){var a=[];return u=Hi(u,i),da(d,function(l,p,t){u(l,p,t)&&a.push(l)}),a}function Nfe(d,u,i){return vd(d,XT(Hi(u)),i)}function fU(d,u,i){u=Hi(u,i);for(var a=!fs(d)&&ni(d),l=(a||d).length,p=0;p<l;p++){var t=a?a[p]:p;if(!u(d[t],t,d))return!1}return!0}function hU(d,u,i){u=Hi(u,i);for(var a=!fs(d)&&ni(d),l=(a||d).length,p=0;p<l;p++){var t=a?a[p]:p;if(u(d[t],t,d))return!0}return!1}function ua(d,u,i,a){return fs(d)||(d=yd(d)),(typeof i!="number"||a)&&(i=0),uU(d,u,i)>=0}const Lfe=Ji(function(d,u,i){var a,l;return Vi(u)?l=u:(u=Tc(u),a=u.slice(0,-1),u=u[u.length-1]),Wo(d,function(p){var t=l;if(!t){if(a&&a.length&&(p=ZT(p,a)),p==null)return;t=p[u]}return t==null?t:t.apply(p,i)})});function rb(d,u){return Wo(d,WT(u))}function Bfe(d,u){return vd(d,bc(u))}function yU(d,u,i){var a=-1/0,l=-1/0,p,t;if(u==null||typeof u=="number"&&typeof d[0]!="object"&&d!=null){d=fs(d)?d:yd(d);for(var y=0,v=d.length;y<v;y++)p=d[y],p!=null&&p>a&&(a=p)}else u=Hi(u,i),da(d,function(T,w,A){t=u(T,w,A),(t>l||t===-1/0&&a===-1/0)&&(a=T,l=t)});return a}function Mfe(d,u,i){var a=1/0,l=1/0,p,t;if(u==null||typeof u=="number"&&typeof d[0]!="object"&&d!=null){d=fs(d)?d:yd(d);for(var y=0,v=d.length;y<v;y++)p=d[y],p!=null&&p<a&&(a=p)}else u=Hi(u,i),da(d,function(T,w,A){t=u(T,w,A),(t<l||t===1/0&&a===1/0)&&(a=T,l=t)});return a}var Ufe=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function mU(d){return d?Zo(d)?yc.call(d):MT(d)?d.match(Ufe):fs(d)?Wo(d,JT):yd(d):[]}function vU(d,u,i){if(u==null||i)return fs(d)||(d=yd(d)),d[YT(d.length-1)];var a=mU(d),l=Wi(a);u=Math.max(Math.min(u,l),0);for(var p=l-1,t=0;t<u;t++){var y=YT(t,p),v=a[t];a[t]=a[y],a[y]=v}return a.slice(0,u)}function jfe(d){return vU(d,1/0)}function xfe(d,u,i){var a=0;return u=Hi(u,i),rb(Wo(d,function(l,p,t){return{value:l,index:a++,criteria:u(l,p,t)}}).sort(function(l,p){var t=l.criteria,y=p.criteria;if(t!==y){if(t>y||t===void 0)return 1;if(t<y||y===void 0)return-1}return l.index-p.index}),"value")}function dy(d,u){return function(i,a,l){var p=u?[[],[]]:{};return a=Hi(a,l),da(i,function(t,y){var v=a(t,y,i);d(p,t,v)}),p}}const Ffe=dy(function(d,u,i){Ba(d,i)?d[i].push(u):d[i]=[u]}),Gfe=dy(function(d,u,i){d[i]=u}),Kfe=dy(function(d,u,i){Ba(d,i)?d[i]++:d[i]=1}),kfe=dy(function(d,u,i){d[i?0:1].push(u)},!0);function Sfe(d){return d==null?0:fs(d)?d.length:ni(d).length}function qfe(d,u,i){return u in i}const EU=Ji(function(d,u){var i={},a=u[0];if(d==null)return i;Vi(a)?(u.length>1&&(a=Ac(a,u[1])),u=Ec(d)):(a=qfe,u=Jo(u,!1,!1),d=Object(d));for(var l=0,p=u.length;l<p;l++){var t=u[l],y=d[t];a(y,t,d)&&(i[t]=y)}return i}),Zfe=Ji(function(d,u){var i=u[0],a;return Vi(i)?(i=XT(i),u.length>1&&(a=u[1])):(u=Wo(Jo(u,!1,!1),String),i=function(l,p){return!ua(u,p)}),EU(d,i,a)});function TU(d,u,i){return yc.call(d,0,Math.max(0,d.length-(u==null||i?1:u)))}function ib(d,u,i){return d==null||d.length<1?u==null||i?void 0:[]:u==null||i?d[0]:TU(d,d.length-u)}function uy(d,u,i){return yc.call(d,u==null||i?1:u)}function Jfe(d,u,i){return d==null||d.length<1?u==null||i?void 0:[]:u==null||i?d[d.length-1]:uy(d,Math.max(0,d.length-u))}function Wfe(d){return vd(d,Boolean)}function Hfe(d,u){return Jo(d,u,!1)}const bU=Ji(function(d,u){return u=Jo(u,!0,!0),vd(d,function(i){return!ua(u,i)})}),Yfe=Ji(function(d,u){return bU(d,u)});function sb(d,u,i,a){gM(u)||(a=i,i=u,u=!1),i!=null&&(i=Hi(i,a));for(var l=[],p=[],t=0,y=Wi(d);t<y;t++){var v=d[t],T=i?i(v,t,d):v;u&&!i?((!t||p!==T)&&l.push(v),p=T):i?ua(p,T)||(p.push(T),l.push(v)):ua(l,v)||l.push(v)}return l}const zfe=Ji(function(d){return sb(Jo(d,!0,!0))});function Xfe(d){for(var u=[],i=arguments.length,a=0,l=Wi(d);a<l;a++){var p=d[a];if(!ua(u,p)){var t;for(t=1;t<i&&ua(arguments[t],p);t++);t===i&&u.push(p)}}return u}function nb(d){for(var u=d&&yU(d,Wi).length||0,i=Array(u),a=0;a<u;a++)i[a]=rb(d,a);return i}const Qfe=Ji(nb);function ehe(d,u){for(var i={},a=0,l=Wi(d);a<l;a++)u?i[d[a]]=u[a]:i[d[a][0]]=d[a][1];return i}function the(d,u,i){u==null&&(u=d||0,d=0),i||(i=u<d?-1:1);for(var a=Math.max(Math.ceil((u-d)/i),0),l=Array(a),p=0;p<a;p++,d+=i)l[p]=d;return l}function rhe(d,u){if(u==null||u<1)return[];for(var i=[],a=0,l=d.length;a<l;)i.push(yc.call(d,a,a+=u));return i}function ab(d,u){return d._chain?tr(u).chain():u}function AU(d){return da(ST(d),function(u){var i=tr[u]=d[u];tr.prototype[u]=function(){var a=[this._wrapped];return Ope.apply(a,arguments),ab(this,i.apply(tr,a))}}),tr}da(["pop","push","reverse","shift","sort","splice","unshift"],function(d){var u=ny[d];tr.prototype[d]=function(){var i=this._wrapped;return i!=null&&(u.apply(i,arguments),(d==="shift"||d==="splice")&&i.length===0&&delete i[0]),ab(this,i)}}),da(["concat","join","slice"],function(d){var u=ny[d];tr.prototype[d]=function(){var i=this._wrapped;return i!=null&&(i=u.apply(i,arguments)),ab(this,i)}});var IU=AU(Object.freeze(Object.defineProperty({__proto__:null,VERSION:hM,after:Cfe,all:fU,allKeys:Ec,any:hU,assign:ly,before:sU,bind:rU,bindAll:Ife,chain:Afe,chunk:rhe,clone:ife,collect:Wo,compact:Wfe,compose:Ofe,constant:NM,contains:ua,countBy:Kfe,create:rfe,debounce:_fe,default:tr,defaults:JM,defer:Rfe,delay:iU,detect:eb,difference:bU,drop:uy,each:da,escape:dfe,every:fU,extend:ZM,extendOwn:ly,filter:vd,find:eb,findIndex:QT,findKey:nU,findLastIndex:oU,findWhere:Vfe,first:ib,flatten:Hfe,foldl:tb,foldr:pU,forEach:da,functions:ST,get:YM,groupBy:Ffe,has:nfe,head:ib,identity:JT,include:ua,includes:ua,indexBy:Gfe,indexOf:uU,initial:TU,inject:tb,intersection:Xfe,invert:qM,invoke:Lfe,isArguments:xT,isArray:Zo,isArrayBuffer:OM,isBoolean:gM,isDataView:ay,isDate:Mpe,isElement:Bpe,isEmpty:vc,isEqual:Jpe,isError:jpe,isFinite:Kpe,isFunction:Vi,isMap:Ype,isMatch:jM,isNaN:VM,isNull:wM,isNumber:_M,isObject:ar,isRegExp:Upe,isSet:Xpe,isString:MT,isSymbol:DM,isTypedArray:MM,isUndefined:RM,isWeakMap:zpe,isWeakSet:Qpe,iteratee:HT,keys:ni,last:Jfe,lastIndexOf:Pfe,map:Wo,mapObject:afe,matcher:bc,matches:bc,max:yU,memoize:wfe,methods:ST,min:Mfe,mixin:AU,negate:XT,noop:XM,now:Ic,object:ehe,omit:Zfe,once:$fe,pairs:efe,partial:md,partition:kfe,pick:EU,pluck:rb,property:WT,propertyOf:ofe,random:YT,range:the,reduce:tb,reduceRight:pU,reject:Nfe,rest:uy,restArguments:Ji,result:Efe,sample:vU,select:vd,shuffle:jfe,size:Sfe,some:hU,sortBy:xfe,sortedIndex:lU,tail:uy,take:ib,tap:sfe,template:vfe,templateSettings:pfe,throttle:gfe,times:lfe,toArray:mU,toPath:HM,transpose:nb,unescape:cfe,union:zfe,uniq:sb,unique:sb,uniqueId:bfe,unzip:nb,values:yd,where:Bfe,without:Yfe,wrap:Dfe,zip:Qfe},Symbol.toStringTag,{value:"Module"})));IU._=IU;function ei(d){return d.charAt(0).toUpperCase()+d.slice(1)}function Ed(d){return d.charAt(0).toLowerCase()+d.slice(1)}function wU(d,u){if(d.type!==f.Property||u.type!==f.Property)throw new Error(`Expected property entities for comparison. But got ${d.type} and ${u.type}.`);return d===u||d.id===u.id?!0:d.name!==u.name||d.static!==u.static||d.abstract!==u.abstract?!1:Cs(d.dataType,u.dataType).compatible}function RU(d,u){if(d.type!==f.DefinitionEntity||u.type!==f.DefinitionEntity)throw new Error(`Expected definition entities for comparison. But got ${d.type} and ${u.type}.`);if(d===u||d.id===u.id)return!0;if(d.properties.length!==u.properties.length)return!1;let i=[...u.properties];const a=[];for(let l=0;l<d.properties.length;l++){const p=d.properties[l];i.find(y=>{const v=wU(p,y);return v&&(i=i.filter(T=>T.id!==y.id)),v})||a.push(p)}return!(a.length>0)}var Os=(d=>(d.BothUnconstrained="both-unconstrained",d.AConstraintBUnconstrained="a-constraint-b-unconstrained",d.BConstraintAUnconstrained="b-constraint-a-unconstrained",d.Same="same",d.AIsListBIsNot="a-is-list-b-is-not",d.BIsListAIsNot="b-is-list-a-is-not",d.AIsNullableBIsNot="a-is-nullable-b-is-not",d.BIsNullableAIsNot="b-is-nullable-a-is-not",d.AIsTemplateBIsNot="a-is-template-b-is-not",d.BIsTemplateAIsNot="b-is-template-a-is-not",d.BothUntyped="both-untyped",d.AIsUntypedBIsNot="a-is-untyped-b-is-not",d.BIsUntypedAIsNot="b-is-untyped-a-is-not",d.TypeEntityMismatch="type-entity-mismatch",d.SameDefinitionEntities="same-definition-entities",d.CompatibleDefinitionEntities="compatible-definition-entities",d.IncompatibleDefinitionEntities="incompatible-definition-entities",d.SamePrimitiveEntities="same-primitive-entities",d.IncompatiblePrimitiveEntities="incompatible-primitive-entities",d.SameBuiltInBaseEntities="same-built-in-base-entities",d.IncompatibleBuiltInBaseEntities="incompatible-built-in-base-entities",d.CheckUnknown="check-unknown",d))(Os||{});function Cs(d,u){var l,p,t,y,v,T,w,A,V,N,j;if(d&&d.type!==f.DataType||u&&u.type!==f.DataType)throw new Error(`Expected data-type entities for comparison. But got ${d==null?void 0:d.type} and ${u==null?void 0:u.type}.`);if(d===null&&u===null)return{compatible:!0,type:"both-unconstrained"};if(d===null)return{compatible:!0,type:"a-constraint-b-unconstrained"};if(u===null)return{compatible:!0,type:"b-constraint-a-unconstrained"};if(d===u)return{compatible:!0,type:"same"};if(d.id===u.id)return{compatible:!0,type:"same"};if(d.isList===!1&&u.isList===!0||d.isList===!0&&u.isList===!1)return{compatible:!1,type:d.isList?"a-is-list-b-is-not":"b-is-list-a-is-not"};if(d.asType===!1&&u.asType===!0||d.asType===!0&&u.asType===!1)return{compatible:!1,type:d.asType?"a-is-template-b-is-not":"b-is-template-a-is-not"};let i=!d.entity||d.entity.type===f.PrimitiveEntity&&d.entity.name===Q.Untyped,a=!u.entity||u.entity.type===f.PrimitiveEntity&&u.entity.name===Q.Untyped;if(i&&!a)return{compatible:!0,type:"a-is-untyped-b-is-not"};if(!i&&a)return{compatible:!0,type:"b-is-untyped-a-is-not"};if(i&&a)return{compatible:!0,type:"both-untyped"};if(((l=d.entity)==null?void 0:l.type)!==((p=u.entity)==null?void 0:p.type))return{compatible:!1,type:"type-entity-mismatch"};if(((t=d.entity)==null?void 0:t.type)===f.DefinitionEntity){if(((y=d.entity)==null?void 0:y.id)===((v=u.entity)==null?void 0:v.id))return{compatible:!0,type:"same-definition-entities"};const k=RU(d.entity,u.entity);return{compatible:k,type:k?"compatible-definition-entities":"incompatible-definition-entities"}}return((T=d.entity)==null?void 0:T.type)===f.PrimitiveEntity?((w=d.entity)==null?void 0:w.id)===((A=u.entity)==null?void 0:A.id)?{compatible:!0,type:"same-primitive-entities"}:{compatible:!1,type:"incompatible-primitive-entities"}:((V=d.entity)==null?void 0:V.type)===f.BuiltInBaseEntity?((N=d.entity)==null?void 0:N.id)===((j=u.entity)==null?void 0:j.id)?{compatible:!0,type:"same-built-in-base-entities"}:{compatible:!1,type:"incompatible-built-in-base-entities"}:{compatible:!1,type:"check-unknown"}}function ihe(d,u){const i=d.project.builtInBaseEntities.find(p=>p.id===Ce.EXECUTION),a={id:P.UUID.uuid(),version:P.UUID.uuid(),createdAt:(u==null?void 0:u.timestamp)||new Date().toISOString(),author:P.sessionAuthor,previousVersion:null,deleted:!1,type:f.DataType,isList:!1,isNullable:!1,andChildrenGroup:null,orChildrenGroup:null,asType:!1,entity:null,constant:!1,defaultValue:null,parent:null},l=te(a,d.project);return l.inferred=!0,u==null||u.add(l,K.Added),l.metaSync(a,u),l.setParent(d,u),l.entity=i,l}function gU(d,u=null){return d.dataType?d.dataType:null}function ob(d,u=null){var a;const i=(a=d.declaration)==null?void 0:a.getDataType(u);return i&&i.isResolved?i:d.readsValue?Hs(d.readsValue,u):null}function lb(d,u=null){return d.dataType&&!d.dataType.inferred&&d.dataType.isResolved?d.dataType:d.readsValue?Hs(d.readsValue,u):null}function _U(d,u=null){return Hs(d.declaration,u)}function DU(d,u=null){return d.dataType&&!d.dataType.inferred?d.dataType:(d.dataType&&d.dataType.inferred||!d.dataType)&&d.project.initialized?(d.inferDataTypeAndSyncInstancesInputsAndOutputs(u),d.dataType):null}function db(d,u=null){var i;return((i=d.declaration)==null?void 0:i.dataType)||null}function OU(d,u=null){return(d==null?void 0:d.dataType)||null}function CU(d,u=null){return(d==null?void 0:d.dataType)||null}function Hs(d,u=null){switch(d.type){case f.VariableDeclaration:return DU(d,u);case f.ArgumentDeclaration:return gU(d,u);case f.ReturnDeclaration:return lb(d,u);case f.VariableInstance:return _U(d,u);case f.InputMap:return ob(d,u);case f.OutputMap:return db(d,u);case f.Property:return OU(d,u);case f.ValueDescriptor:return CU(d,u);default:throw new Error(`Cannot infer data type from entity of type ${d.type}.`)}}function cy(d,u=null){switch(d.type){case f.ArgumentDeclaration:return d.getDataType(u);case f.InputMap:return d.getDataType(u);case f.VariableDeclaration:return d.getDataType(u);case f.VariableInstance:return d.getDataType(u);case f.OutputMap:return d.getDataType(u);case f.ReturnDeclaration:return d.getDataType(u);case f.Property:return d.getDataType(u);case f.ValueDescriptor:return d.getDataType(u);default:return null}}function Ho(d){if(!d)return Q.Untyped;if(d.entity){if(d.entity.type===f.DefinitionEntity)return d.asType?Q.EntityTemplate:Q.Untyped;if(d.entity.type===f.PrimitiveEntity)return d.asType?Q.EntityTemplate:d.entity.name;if(d.entity.type===f.ActionDescriptor)return Q.ActionDescriptor;if(d.entity.type===f.BuiltInBaseEntity)return d.asType?Q.EntityTemplate:Q.Untyped}return Q.Untyped}function J(d){if(d){let u=null;return typeof d=="string"?u=d:d.entityId?u=d.entityId:d.type!==f.GenericReference&&(u=d.id),u}return null}function di(d){return d.declaration||d}function she(d){return d.type===f.VariableDeclaration?d.parent===d.project?"global-declaration":"local-declaration":d.declaration.parent===d.project?"global-instance":"local-instance"}function ub(d,u){const i=[];if(d.type===f.Project)i.push(...d.variableDeclarations);else{const l=ci(pt(d)).filter(p=>p.type===f.VariableDeclaration);i.push(...l),d.parent&&(wr.includes(d.parent.type)||d.parent.type===f.Project)&&i.push(...ub(d.parent))}return i}function Tr(d){const u=d.split(/[\s-]+/).filter(p=>p.length>0);if(u.length===0)return"";const i=u[0],a=i[0].toLowerCase()+i.slice(1),l=u.slice(1).map(p=>p[0].toUpperCase()+p.slice(1));return[a,...l].join("")}function Td(d){return d.split(/[\s-]+/).filter(i=>i.length>0).map(i=>i[0].toUpperCase()+i.slice(1)).join("")}function $U(d){return(d.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g)||[]).join("-")}function py(d){return $U(d).toLowerCase()}function bd(d){var i,a,l,p;if(!d)return"Any data type";let u="";if(d.interactiveEntities===!1?u+=` but only definition nodes ${d.asType?"as template ":""}that don't include non-interactive built-in functionality`:d.interactiveEntities===!0&&(u+=` but only definition nodes ${d.asType?"as template ":""}that extend or implement interactive built-in functionality`),d.staticEntities===!1?u?u+=" and that aren't a single global copy instance":u+=` but only definition nodes ${d.asType?"as template ":""}that aren't a single global copy instance`:d.staticEntities===!0&&(u?u+=" and that are a single global copy instance":u+=` but only definition nodes ${d.asType?"as template ":""}that are a single global copy instance`),d.actionEntities===!1?u?u+=" excluding executable/action nodes":u+=` excluding executable/action nodes ${d.asType?"templates ":""}`:d.actionEntities===!0&&(u?u+=" and not executable/action nodes":u+=" but not executable/action nodes"),d.entity&&(u=""),d.asType&&!u&&!((i=d.andChildrenGroup)!=null&&i.length)&&!((a=d.orChildrenGroup)!=null&&a.length)&&(u=" as template"),!d.entity){const t=d.isList;if(!((l=d.andChildrenGroup)!=null&&l.length)&&!((p=d.orChildrenGroup)!=null&&p.length))return t?`List of an any data type${u}`:`Any data type${u}`;let y="",v=!1,T=!1;return(d.andChildrenGroup||[]).forEach(w=>{const A=bd(w),V=Ed(A);v&&(y+=" and "),w.isGroup?y+="("+V+")":v?y+=V:y+=A,v=!0,T=!0}),(d.orChildrenGroup||[]).forEach(w=>{const A=bd(w),V=Ed(A);v&&(T&&(y+=","),y+=" or "),w.isGroup?y+="("+V+")":v?y+=V:y+=A,v=!0}),t?`List of ${Ed(y)}`:y}if(d.entity.type===f.PrimitiveEntity){let t=d.entity.name;switch(d.entity.name){case Q.String:t="Text";break;case Q.KeyValue:t="Data structure";break}return d.isList?`List of ${t}s${u}`:`${t.slice(0,1).toUpperCase()}${t.slice(1)}${u}`}else if(d.entity.type===f.DefinitionEntity){const t=ie(d.entity,d.project);return d.isList?`List of ${t} values${u}`:t.slice(0,1).toUpperCase()+t.slice(1)+u}else if(d.entity.type===f.BuiltInBaseEntity){const t=VU(d.entity);return d.isList?`List of ${t} values${u}`:t.slice(0,1).toUpperCase()+t.slice(1)+u}else if(d.entity.type===f.LiteralValue){if(d.entity.name===Q.Null)return"Empty value";if(d.entity.name===Q.Untyped)return"Untyped value";if(d.entity.name===Q.File)return"File";if(d.entity.name===Q.String)return`"${d.entity.value}" text`;if(d.entity.name===Q.Number)return`Number '${d.entity.value}'`;if(d.entity.name===Q.Boolean)return`${d.entity.value} value`;if(d.entity.name===Q.UUID)return`"${d.entity.value}" unique identifier`;if(d.entity.name===Q.Date)return`"${d.entity.value}" date`}return d.isList?`List of ${ie(d.entity,d.project)} values${u}`:`${ie(d.entity,d.project).slice(0,1).toUpperCase()+ie(d.entity,d.project).slice(1)} value${u}`}function nhe(d){if(!d)return"Any data type";const u=d.getDataType(null);return bd(u)}function fy(d){switch(d.declaration.id){case cr.Equal:return"is equal to";case cr.NotEqual:return"is not equal to";case cr.MoreThan:return"is greater than";case cr.MoreThanOrEqual:return"is greater than or equal to";case cr.LessThan:return"is less than";case cr.LessThanOrEqual:return"is less than or equal to";case cr.And:return"and";case cr.Or:return"or";case Mr.Empty:return"is empty";case Mr.NotEmpty:return"is not empty"}}function PU(d){return d.includes(Ce.HTTP_ENDPOINT)?"HTTP endpoint":d.includes(Ce.PERSISTED_ENTITY)?"Persisted entity":d.includes(Ce.CRON_JOB)?"Scheduled execution":d.includes(Ce.RELATIONAL_DATABASE)?"Relational database":"Entity"}function VU(d){switch(d.name){case Ce.HTTP_ENDPOINT:return"HTTP endpoint";case Ce.PERSISTED_ENTITY:return"Persisted entity";case Ce.CRON_JOB:return"Scheduled execution";case Ce.RELATIONAL_DATABASE:return"Relational database"}return"Entity"}function ahe(d){const u=zy(d);if(!u){const i=Nd(d);return i.includes(Ce.HTTP_ENDPOINT)?"HTTP endpoint":i.includes(Ce.PERSISTED_ENTITY)?"Persisted entity":i.includes(Ce.CRON_JOB)?"Scheduled execution":i.includes(Ce.RELATIONAL_DATABASE)?"Relational database":ie(d,d.project)+" entity"}return ie(u,d.project)+" entity"}function NU(d){let u="Find ";return d.outputsDeclarations.forEach((i,a)=>{const l=cy(i,null),p=Ed(l&&l.entity?ie(l.entity,d.project):"unstructured data");a===0?u+=`${p} `:a===d.outputsDeclarations.length-1?u+=`and ${p} `:u+=`, ${p} `}),u}function LU(d){switch(d.name){case Q.String:return"Text";case Q.Number:return"Number";case Q.Boolean:return"Boolean";case Q.KeyValue:return"Data structure";case Q.UUID:return"Unique identifier";case Q.Date:return"Date";case Q.EntityTemplate:return"Entity as template";case Q.Enum:return"Enumeration";case Q.File:return"File";case Q.Null:return"Empty";case Q.ActionDescriptor:return"Action descriptor";case Q.Untyped:return"Untyped";default:return d.name}}function BU(d){switch(d.id){case Ge.List:return"Loop over list items";case Ge.ManualFlow:return"Manual flow control loop";case Ge.ObjectKeys:return"Loop over object keys";case Ge.ObjectValues:return"Loop over object values";case Ge.Counted:return"Loop given number of times";case Ge.String:return"Loop over text characters";case ur.Addition:return"Sum numbers";case ur.Subtraction:return"Subtract numbers";case ur.Multiplication:return"Multiply numbers";case ur.Division:return"Divide numbers";case ur.Remainder:return"Get remainder of numbers";case ur.Exponentiation:return"Get exponent of numbers";case vt.AddIndex:return"Add at index position";case vt.DeleteFirst:return"Delete first character";case vt.DeleteLast:return"Delete last character";case vt.DeleteIndex:return"Delete at index position";case vt.Join:return"Join texts";case vt.ReplaceAllMatches:return"Replace all matches";case vt.ReplaceFirst:return"Replace first match";case vt.ReplaceLast:return"Replace last match";case vt.Split:return"Split text";case vt.ReplaceIndex:return"Replace at index position";case vt.ReplaceSingleMatch:return"Replace single match";case vt.GetFirst:return"Get first character";case vt.GetLast:return"Get last character";case vt.GetIndex:return"Get at index position";case vt.Append:return"Add at the end";case vt.Prepend:return"Add at the start";case ir.Wait:return"Wait";case ir.Parallel:return"Run in parallel";case ir.Sequential:return"Run in sequence";case li.HttpRequest:return"HTTP request";case sr.CreateNewInstance:return"Create new copy of entity";case ft.AddIndex:return"Add item at index position";case ft.DeleteFirst:return"Delete first item";case ft.DeleteLast:return"Delete last item";case ft.DeleteIndex:return"Delete item at index position";case ft.Join:return"Join lists";case ft.ReplaceAllMatches:return"Replace all matches";case ft.ReplaceFirst:return"Replace first match";case ft.ReplaceLast:return"Replace last match";case ft.Split:return"Split list";case ft.ReplaceIndex:return"Replace at index position";case ft.ReplaceSingleMatch:return"Replace single match";case ft.GetFirst:return"Get first item";case ft.GetLast:return"Get last item";case ft.GetIndex:return"Get item at index position";case ft.Append:return"Add item at the end";case ft.Prepend:return"Add item at the start";case Jn.PROJECT_PUBLICATION_COMPLETED:return"Project publication completed";default:return(d.name.slice(0,1).toUpperCase()+d.name.slice(1)).replaceAll("-"," ")}}function ie(d,u){var i;if(f.FunctionDeclaration===d.type){const a=d.name;if(Object.values(gi).includes(a))switch(a){case gi.AbortExecution:return"Abort ongoing execution";case gi.DeletePersistedEntity:return"Delete entry from database";case gi.SavePersistedEntity:return"Save entity data to database";default:return ei(d.type).replaceAll("-"," ")}return a}if(f.BuiltInBaseEntity===d.type)return PU([d.name]);if(d1.includes(d.type)&&d.type!==f.ActionDescriptor)return d.name;switch(d.type){case f.Search:return NU(d);case f.GlobalEvent:return d.implements?ie(d.implements,u):ei(d.type).replaceAll("-"," ");case f.Operation:case f.InternalCall:case f.Loop:const a=Ri(d.declaration,u);return ie(a,u);case f.ActionDescriptor:return BU(d);case f.BreakStatement:const l=Ri(d.parent,u);return`Stop loop ${ie(l,u)}`;case f.ContinueStatement:const p=Ri(d.parent,u);return`Execute next iteration of ${ie(p,u)}`;case f.FunctionCall:return Ri(d.declaration,u).name;case f.Condition:{const y=d;if((i=d.inputs)!=null&&i.length){const v=ie(y.inputs[0],y.project);if(y.inputs[1]){const T=y.inputs[1].declaration.name;return`If ${v} ${fy(y)} ${T}`}return`If ${v} ${fy(y)}`}else return`If ${fy(y)}`}case f.ReturnStatement:{const y=Ri(d.parent,u);return y?`Output of ${ie(y,u)}`:"Return statement"}case f.InputMap:if(d.declaration){const y=Ri(d.declaration,u);return ie(y,u)||""}else return d.name||"";case f.VariableInstance:{const y=Ri(d.declaration,u);return ie(y,u)||""}case f.OutputMap:if(d.declaration){const y=Ri(d.declaration,u);return(y==null?void 0:y.name)||""}else return"";case f.PrimitiveEntity:case f.LiteralValue:return LU(d);default:return ei(d.type).replaceAll("-"," ")}}function cb(d,u){const i=[];d.name||i.push(new ee({id:`${d.id}--${ae.EmptyName}`,message:`Entity with id "${d.id}" and type "${d.type}" has an empty name. Please provide a 'name' string.`,severity:Z.Error,code:ae.EmptyName,issue:null}));const a=u.entities.filter(l=>l.name===d.name);return a.length&&i.push(new ee({id:`${d.id}--${ae.NameNotUniqueInScope}`,message:`Entity with id "${d.id}" and type "${d.type}" has a name "${d.name}" that is not unique in the project. Entity with id "${a[0].id}" has the same name.
|
|
14
14
|
Please provide a unique 'name' string.`,severity:Z.Error,code:ae.NameNotUniqueInScope,issue:null})),i}function pb(d,u){const i=[];d.name||i.push(new ee({id:`${d.id}--${ae.EmptyName}`,message:`Entity with id "${d.id}" and type "${d.type}" has an empty name. Please provide a 'name' string.`,severity:Z.Error,code:ae.EmptyName,issue:null}));const a=d.parent?J(d.parent):null;let l=u;a&&(l=u.get(a));const p=[];l.type===f.DefinitionEntity?p.push(...l.methods.map(y=>y)):l.type===f.Project?p.push(...l.functions.map(y=>y)):l.type===f.Loop?l.body&&p.push(l.body):l.type===f.InstalledProject&&p.push(...l.functions.map(y=>y));const t=p.filter(y=>y.name===d.name);return t.length&&i.push(new ee({id:`${d.id}--${ae.NameNotUniqueInScope}`,message:`Entity with id "${d.id}" and type "${d.type}" has a name "${d.name}" that is not unique in ${l.type===f.Project?"the globally declared project scope":"its parent entity"}. Entity with id "${t[0].id}" has the same name.
|
|
15
15
|
Please provide a unique 'name' string.`,severity:Z.Error,code:ae.NameNotUniqueInScope,issue:null})),i}function fb(d,u){const i=[];d.name||i.push(new ee({id:`${d.id}--${ae.EmptyName}`,message:`Entity with id "${d.id}" and type "${d.type}" has an empty name. Please provide a 'name' string.`,severity:Z.Error,code:ae.EmptyName,issue:null}));const a=d.parent&&Ri(d.parent,u)||u;if(!a)i.push(new ee({id:`${d.id}--parent-reference--${q.ReferencedEntityNotFound}`,message:`The entity with id '${d.parent}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:Z.Error,code:q.ReferencedEntityNotFound,issue:null}));else{const p=ub(a).filter(t=>t.name===d.name);p.length&&i.push(new ee({id:`${d.id}--${ae.NameNotUniqueInScope}`,message:`Entity with id "${d.id}" and type "${d.type}" has a name "${d.name}" that is not unique in its scope or higher scopes. Entity with id "${p[0].id}" has the same name.
|
|
16
16
|
Please provide a unique 'name' string.`,severity:Z.Error,code:ae.NameNotUniqueInScope,issue:null}))}return i}function hb(d,u){const i=[];d.name||i.push(new ee({id:`${d.id}--${ae.EmptyName}`,message:`Entity with id "${d.id}" and type "${d.type}" has an empty name. Please provide a 'name' string.`,severity:Z.Error,code:ae.EmptyName,issue:null}));const a=J(d.parent);if(!a)i.push(new ee({id:`${d.id}--parent-reference--${q.InvalidReferenceObjectStructure}`,message:`Reference object at 'parent' property for entity with id "${d.id}" and type "${d.type}" is not a valid reference. A reference needs to be a 'id' string of an existing entity in the project.`,severity:Z.Error,code:q.InvalidReferenceObjectStructure,issue:null}));else{const l=u.get(a);if(!l)i.push(new ee({id:`${d.id}--parent-reference--${q.ReferencedEntityNotFound}`,message:`The entity with id '${a}' that isn't yet found in the project. Perhaps it should be created first. Or perhaps the ID is incorrect.`,severity:Z.Error,code:q.ReferencedEntityNotFound,issue:null}));else{const t=l.properties.filter(y=>y.name===d.name);t.length&&i.push(new ee({id:`${d.id}--${ae.NameNotUniqueInScope}`,message:`Entity with id "${d.id}" and type "${d.type}" has a name "${d.name}" that is not unique among all properties in the parent entity. Entity with id "${t[0].id}" has the same name.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elyx-code/project-logic-tree",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6378",
|
|
4
4
|
"author": "Sergio Herrero",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"description": "An installable module which contains the type definitions and ephemeral state management for a projects' logic tree data structure",
|